Skip to content

Commit 15d1cf8

Browse files
author
王东升
committed
'aaa'
1 parent 5541103 commit 15d1cf8

File tree

8 files changed

+15
-45
lines changed

8 files changed

+15
-45
lines changed

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@
117117
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
118118
<allow-navigation href="http://192.168.0.105:8102" />
119119
<plugin name="cordova-plugin-shake" spec="^0.6.0" />
120-
<plugin name="com.hutchind.cordova.plugins.streamingmedia" spec="~0.1.4" />
121120
<plugin name="cordova-plugin-file" spec="^4.3.3" />
122121
<plugin name="cordova-plugin-file-transfer" spec="^1.7.0" />
122+
<plugin name="com.hutchind.cordova.plugins.streamingmedia" spec="~0.1.4" />
123123
<engine name="android" spec="^6.2.3" />
124124
<engine name="ios" spec="~4.4.0" />
125125
</widget>

package-lock.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pages/find/find.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ export class FindPage {
3636
}
3737
// 跳转至find分类页面
3838
public toFind(route){
39-
if(route == 'CompanyPage'){
40-
this.navCtrl.push(route,{
41-
id:1
42-
});
43-
}else{
44-
this.navCtrl.push(route);
45-
}
46-
39+
this.navCtrl.push(route);
4740
}
4841
}

src/pages/live-study/live-study.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</li>
1818
<li>
1919
<p>
20-
2.下载地址:<a style="color: #007aff;text-decoration: underline;" href="http://wx.51muma.com/live.apk" target="_self">点击下载APK直播软件</a>
20+
2.下载地址:<a style="color: #007aff;text-decoration: underline;" href="http://vapp.51muma.com/live.apk" target="_self">点击下载APK直播软件</a>
2121
</p>
2222
</li>
2323
<li>

src/providers/article.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ export class ArticleProvider {
1717

1818
//获取文章详情
1919
getInfo(cid,id){
20-
let options = {
21-
op: "get_article",
20+
return this.http.post('article',{
2221
id:id,
2322
cid:cid
24-
};
25-
return this.http.post(options);
23+
});
2624
}
2725

2826
}

src/providers/company.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ export class CompanyProvider {
1313

1414
//获取公司详情
1515
getInfo(id){
16-
let options = {
17-
op: "get_company_info",
16+
return this.http.post('company',{
1817
id:id
19-
};
20-
return this.http.post(options);
18+
});
2119
}
2220

2321
}

src/providers/http.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ export class HttpProvider {
5151
}
5252

5353
/**
54-
* post方式请求
55-
* @param {string} url
56-
* @param body //如:paramObj:{name:'大见',age:'23'}
57-
* @param {string} contentType //post请求的编码方式 application/x-www-form-urlencoded multipart/form-data application/json text/xml
58-
* @return {Promise<never | {}>}
54+
* @param sub_url
55+
* @param body
56+
* @param {string} contentType
57+
* @returns {any}
5958
*/
6059
post(sub_url,body: any = {}, contentType: string = "application/x-www-form-urlencoded") {
6160
let headers = new HttpHeaders({'Content-Type': contentType});
@@ -207,7 +206,6 @@ export class HttpProvider {
207206
return key;
208207
}
209208
return key + '=' + encodeURIComponent(value === null ? '' : String(value));
210-
// return key + '=' +(value === null ? '' : String(value));
211209
}
212210

213211
private toSignPair(key, value) {
@@ -227,18 +225,13 @@ export class HttpProvider {
227225
*/
228226
private handleError(err: any): void {
229227
this.Pop.hideLoading();
230-
console.log('%c 请求失败 %c', 'color:red', 'err', err);
231228
if (err instanceof TimeoutError) {
232229
this.Pop.alert('请求超时,请稍后再试!');
233230
return;
234231
}
235-
// if (!this.NativeProvider.isConnecting()) {
236-
// this.AlertProvider.alert('请求失败,请连接网络');
237-
// return;
238-
// }
239232
let msg = '请求发生异常';
240233
try {
241-
let result = err.json();
234+
let result = JSON.parse(err.toString());
242235
this.Pop.alert(result.message || msg);
243236
} catch (err) {
244237
let status = err.status;
@@ -250,10 +243,6 @@ export class HttpProvider {
250243
msg = '请求失败,服务器出错,请稍后再试';
251244
}
252245
this.Pop.alert(msg);
253-
// this.logger.httpLog(err, msg, {
254-
// url: url,
255-
// status: status
256-
// });
257246
}
258247

259248
}

src/providers/user.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,19 +231,17 @@ export class UserProvider {
231231

232232
//设置直播信息
233233
public setLiveConfig(params = {}){
234-
params['op'] = "set_live_config";
235-
return this.Auth.authLogin(params);
234+
return this.Auth.authLogin(params,'live/set');
236235
}
237236

238237
//获取直播信息
239238
public getLiveConfig(){
240-
return this.Auth.authLogin({op:'get_live_config '});
239+
return this.Auth.authLogin({},'live/config');
241240
}
242241

243242
//获取直播列表信息
244243
public getLives(page){
245-
return this.http.post({
246-
op:'get_lives ',
244+
return this.http.post('live',{
247245
page:page
248246
});
249247
}

0 commit comments

Comments
 (0)