Skip to content

Commit 137d8a7

Browse files
author
王东升
committed
'cccc'
1 parent 15d1cf8 commit 137d8a7

File tree

15 files changed

+32
-94
lines changed

15 files changed

+32
-94
lines changed

src/components/add-comment/add-comment.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export class AddCommentComponent implements OnChanges{
4444
// 订阅添加评论输入框显示状态
4545
public subComment() {
4646
this.TongXin.obComment.subscribe(res => {
47-
console.log(res)
4847
this.showStatus = res.showStatus;
4948
this.commentInfo.zid = res.commentData.id;
5049
this.commentData = res.commentData;
@@ -89,7 +88,6 @@ export class AddCommentComponent implements OnChanges{
8988
}
9089
// 发送圈子评论
9190
public sendComment(){
92-
console.log(this.commentInfo)
9391
this.Publish.sendComment(this.commentInfo).subscribe(res=>{
9492
if(res === "toLogin"){
9593
this.navCtrl.push("LoginPage");

src/pages/address-add/address-add.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export class AddressAddPage{
4040
ionViewDidLoad() {
4141
// 获取省市区城市列表数据
4242
this.User.cityListData(this.cityList);
43-
console.log('ionViewDidLoad AddressAddPage');
4443

4544
}
4645

src/pages/address-edit/address-edit.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@ export class AddressEditPage {
4141
public Goods:GoodsProvider,
4242
public Pop:PopProvider
4343
) {
44-
console.log(this.userInfo)
4544
this.addressId = this.navParams.get("id");
4645
}
4746

4847
ionViewDidLoad() {
4948
// 获取省市区城市列表数据
5049
this.User.cityListData(this.cityList);
51-
console.log('ionViewDidLoad AddressAddPage');
5250
this.getAddressInfo();
5351
}
5452
// 获取地址详情

src/pages/address-list/address-list.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,12 @@ export class AddressListPage {
2727
}
2828

2929
ionViewDidLoad() {
30-
console.log('ionViewDidLoad AddressListPage');
31-
3230
}
3331
ionViewDidEnter(){
3432
this.addressListData();
3533
}
3634
// 获取地址列表数据
3735
public addressListData(){
38-
// this.http.get("./assets/data.json").subscribe(data=>{
39-
// this.addressList = data['addressList'];
40-
// console.log(data['addressList'])
41-
// });
4236
this.Goods.addressList().subscribe(res =>{
4337
if(res === "toLogin"){
4438
this.navCtrl.push("LoginPage");

src/pages/cart/cart.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,17 @@ export class CartPage {
3232
}
3333

3434
ionViewDidLoad() {
35-
console.log('ionViewDidLoad CartPage');
3635
this.getCartList();
3736
}
3837

3938
// 购物车列表数据
4039
public getCartList(){
41-
console.log(1111)
4240
this.User.getCartData().subscribe(res =>{
4341
if(res === "toLogin"){
4442
this.navCtrl.push("LoginPage");
4543
return false;
4644
}
4745
this.Pop.toast(res.message);
48-
console.log(res.data)
4946
res.data.forEach((shop,index,arr) => {
5047
shop.kaiguan = true;
5148
shop.status = false;

src/pages/circle/circle.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,17 @@ export class CirclePage {
3131
}
3232

3333
ionViewDidLoad() {
34-
console.log('ionViewDidLoad CirclePage');
3534
this.getData();
3635
}
3736
ionViewWillLeave(){
3837
this.Utils.toggleTabs(false);
3938
}
4039
// 获取圈子页面数据
41-
// public getCircleData() {
42-
// this.http.get("./assets/data.json").subscribe(data => {
43-
// this.circle = data['circle'];
44-
// });
45-
// }
4640
public getData(type = 0,page = 1){
4741
this.storage.get('token').then((token)=>{
4842
this.Find.getCircleList(type,page,token).subscribe(res=>{
4943
if(res.code == 0){
5044
this.circleData = res.data.list;
51-
console.log(this.circleData)
5245
return true;
5346
}
5447
this.pop.toast(res.message);

src/pages/comment/comment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class CommentPage {
5555
}
5656

5757
ionViewDidLoad() {
58-
console.log('ionViewDidLoad CommentPage');
58+
5959
}
6060
//选择上传的图片
6161
public uploadPics() {

src/pages/good/good.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ export class GoodPage {
2929
}
3030

3131
ionViewDidLoad() {
32-
console.log('ionViewDidLoad GoodPage');
32+
3333
}
3434

3535
// 请求商品详情页数据
3636
public goodsData() {
3737
let id = this.navParams.get("id");
38-
console.log(id)
3938
this.Goods.getGoodDetail(id).subscribe(res => {
4039
if(res.code == 0){
4140
res.data.num = 1;

src/pages/live-config/live-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class LiveConfigPage {
4747
}
4848

4949
ionViewDidLoad() {
50-
console.log('ionViewDidLoad LiveConfigPage');
50+
5151
}
5252

5353
//跳转到设置教程

src/providers/find.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export class FindProvider {
1616
}
1717
//获取我的圈子列表
1818
public getCircleList(type = 0, page = 1, token = '') {
19-
return this.Http.post({
20-
op: 'get_circle_list',
19+
return this.Http.post('circle',{
2120
type: type,
2221
page: page,
2322
token: token
@@ -26,9 +25,8 @@ export class FindProvider {
2625
// 获取缘分列表
2726
public getLuckList(params){
2827
let options = {
29-
op:"luck",
3028
page:params.page
3129
};
32-
return this.Http.post(options);
30+
return this.Http.post('luck',options);
3331
}
3432
}

src/providers/goods.ts

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,23 @@ export class GoodsProvider {
2020
// 获取商品详情
2121
public getGoodDetail(id){
2222
let options = {
23-
op:"get_goods_detail",
2423
id:id
2524
};
26-
return this.Http.post(options);
25+
return this.Http.post('goods/detail',options);
2726
}
2827
// 获取更多商品列表
2928
public moreGoods(params){
3029
let options = {
31-
op:"get_goods_detail",
3230
id:params.catId,
3331
page:params.page
3432
};
35-
return this.Http.post(options);
33+
return this.Http.post('goods/detail',options);
3634
}
3735
// 购买商品
3836
public goodsBuy(params,type = ""){
3937
let options = {};
40-
console.log(type)
4138
if(type == ''){
4239
options = {
43-
op:"check_order",
4440
goods_id :params.id,
4541
sku_key :params.sku_key,
4642
sku_desc :params.sku_desc,
@@ -49,98 +45,85 @@ export class GoodsProvider {
4945
};
5046
}else{
5147
options = {
52-
op:"check_order",
5348
id :params.ids,
5449
// ids :params.ids
5550
};
5651
}
57-
console.log(params)
58-
return this.Auth.authLogin(options);
52+
return this.Auth.authLogin(options,'order/check');
5953
}
6054
// 添加至购物车
6155
public goodsAddCart(params){
6256
let options = {
63-
op:"add_cart",
6457
goods_id :params.id,
6558
sku_key :params.sku_key,
6659
sku_desc :params.sku_desc,
6760
buy_num :params.num,
6861
address_id:params.address_id
6962
};
70-
return this.Auth.authLogin(options);
63+
return this.Auth.authLogin(options,'cart/add');
7164
}
7265
// 删除购物车商品
7366
public delCartGoods(id){
7467
let options = {
75-
op:"delete_cart",
7668
id:id
7769
};
78-
return this.Auth.authLogin(options);
70+
return this.Auth.authLogin(options,'cart/delete');
7971
}
8072
// 修改购物车商品数量
8173
public editCartGoods(params){
8274
let options = {
83-
op:"update_cart",
8475
cart_id:params.cartId,
8576
buy_num:params.buyNum
8677
};
87-
return this.Auth.authLogin(options);
78+
return this.Auth.authLogin(options,'cart/update');
8879
}
8980
// 获取用户地址列表
9081
public addressList(){
91-
let options = {
92-
op:"get_address",
93-
};
94-
return this.Auth.authLogin(options);
82+
return this.Auth.authLogin({},'address');
9583
}
9684
// 添加新地址
9785
public addNewAddress(params){
9886
let options = {
99-
op:"add_address",
10087
realname:params.name,
10188
mobile:params.mobile,
10289
province:params.province,
10390
city:params.city,
10491
district:params.district,
10592
address:params.area
10693
};
107-
return this.Auth.authLogin(options);
94+
return this.Auth.authLogin(options,'address/add');
10895
}
10996
// 获取当前地址详情
11097
public getAddressInfo(id){
11198
let options = {
112-
op:"address_detail",
11399
id:id
114100
};
115-
return this.Auth.authLogin(options);
101+
return this.Auth.authLogin(options,'address/detail');
116102
}
117103
// 编辑保存当前地址
118104
public editSaveAddress(params){
119105
let options = {
120-
op:"update_address",
121106
realname:params.name,
122107
mobile:params.mobile,
123108
province:params.province,
124109
city:params.city,
125110
district:params.district,
126111
address:params.area
127112
};
128-
return this.Auth.authLogin(options);
113+
return this.Auth.authLogin(options,'address/update');
129114
}
130115
// 删除当前收货地址
131116
public delAddress(id){
132117
let options = {
133-
op:"delete_address",
134118
id:id
135119
};
136-
return this.Auth.authLogin(options);
120+
return this.Auth.authLogin(options,'address/delete');
137121
}
138122
// 设为默认地址
139123
public defaultAddress(id){
140124
let options = {
141-
op:"set_default_address",
142125
id:id
143126
};
144-
return this.Auth.authLogin(options);
127+
return this.Auth.authLogin(options,'address/set_default');
145128
}
146129
}

src/providers/order.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,46 +47,41 @@ export class OrderProvider {
4747
// 获取已下单订单的详情信息
4848
public getOrderInfo(id){
4949
let options = {
50-
op:"pay",
5150
id:id
5251
};
53-
return this.Auth.authLogin(options);
52+
return this.Auth.authLogin(options,'pay');
5453
}
5554
// 支付宝、微信、余额付款
5655
public payMoney(params,pwd = 0){
5756
let options = {};
5857
if(pwd === 0){
5958
options = {
60-
op:"push_pay",
6159
id:params.id,
6260
pay_method:params.payMethod
6361
};
6462
}else{
6563
options = {
66-
op:"push_pay",
6764
id:params.id,
6865
pay_method:params.payMethod,
6966
password:pwd
7067
};
7168
}
7269

73-
return this.Auth.authLogin(options);
70+
return this.Auth.authLogin(options,'pay/push');
7471
}
7572
// 已下单订单信息页数据
7673
public orderInfo(id){
7774
let options = {
78-
op:"get_orders",
7975
id:id
8076
};
81-
return this.Auth.authLogin(options);
77+
return this.Auth.authLogin(options,'order');
8278
}
8379
// 获取所有订单状态列表
8480
public orderList(params){
8581
let options = {
86-
op:"get_orders",
8782
status:params.status,
8883
page:params.page
8984
};
90-
return this.Auth.authLogin(options);
85+
return this.Auth.authLogin(options,'order');
9186
}
9287
}

src/providers/publish.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,34 @@ export class PublishProvider {
2424
public pubCircle(params) {
2525

2626
let options = {
27-
op: "push_circle",
2827
content:params.content,
2928
src: params.src
3029
};
31-
return this.Auth.authLogin(options);
30+
return this.Auth.authLogin(options,'circle/push');
3231
}
3332
// 点赞功能
3433
public dianZan(zid){
3534
let options = {
36-
op:"push_circle_like",
3735
circle_id:zid
3836
};
39-
return this.Auth.authLogin(options);
37+
return this.Auth.authLogin(options,'circle/push_like');
4038
}
4139
// 发送圈子评论
4240
public sendComment(params){
4341
let options = {
44-
op:"push_circle_talk",
4542
circle_id:params.zid,
4643
content:params.content,
4744
thumb:params.thumb
4845
};
49-
return this.Auth.authLogin(options);
46+
return this.Auth.authLogin(options,'circle/push_talk');
5047
}
5148
// 头条、新闻、客服页面添加评论
5249
public addComment(params){
5350
let options = {
54-
op:params.op,
5551
id:params.id,
5652
content:params.content,
5753
src:params.src
5854
};
59-
return this.Auth.authLogin(options);
55+
return this.Auth.authLogin(options,'circle/'+params.op);
6056
}
6157
}

0 commit comments

Comments
 (0)