diff --git a/packageA/pages/my_service/i_service.js b/packageA/pages/my_service/i_service.js index e820f39..d3dfbd8 100644 --- a/packageA/pages/my_service/i_service.js +++ b/packageA/pages/my_service/i_service.js @@ -50,8 +50,11 @@ Page({ */ onShow: function() { var th = this; - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open_cancel(0); + setTimeout(function (){ + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open_cancel(0); + },1000); + }, onReachBottom: function() { diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js index 0cbb3d3..b8dcc73 100644 --- a/packageA/pages/profile/profile.js +++ b/packageA/pages/profile/profile.js @@ -93,16 +93,21 @@ Page({ }).then(res => { if (res.data.code == 0) { var data = res.data.data; - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签 - var dateList = data.VipLabel.split(","); - for (var i in dateList) { - if (dateList[i] != "") { - VipLabel.push(dateList[i]); - } + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签 + if(VipLabel){ + var dateList = data.VipLabel.split(","); + var arr=[]; + for (var i in dateList) { + if (dateList[i] != "") { + arr.push(dateList[i]); + } + } + th.setData({ + check_label: arr + }) } - th.setData({ - check_label: VipLabel - }) + + } else { getApp().my_warnning("系统繁忙,请稍后再试", 0, th); } diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js index bb1c73e..7fc7652 100644 --- a/pages/cart/cart2/cart2.js +++ b/pages/cart/cart2/cart2.js @@ -3023,7 +3023,7 @@ Page({ arr[ind].check_quan_price_list=check_quan_price_list; //是否关闭使用优惠券 - if (th.data.is_close_quan != 1 && !is_xz_yh) { + if (th.data.is_close_quan != 1 && !is_xz_yh && check_quan_ware_list && check_quan_ware_list!="") { //--调用接口,获取优惠券的列表,3秒钟内控制接口请求-- var url="/api/weshop/couponList/getUseCouponList"; await app.request.promiseGet(url,{ data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100}}).then(res=>{ @@ -3059,7 +3059,7 @@ Page({ th.data.ckeck_quan_price=good.offline_price; //如果有线下取价,就用线下价 } //--如果商家后台没有限制使用优惠券,同时商品的优惠活动没有限制使用优惠券-- - if(th.data.is_close_quan != 1 && th.data.bn_goods.is_xz_yh!=1) + if(th.data.is_close_quan != 1 && th.data.bn_goods.is_xz_yh!=1 && th.data.check_quan_ware_list && th.data.check_quan_ware_list!='') { var url0 = "/api/weshop/users/frozenQuan/listFrozenQuan/" + app.globalData.user_id; var url="/api/weshop/couponList/getUseCouponList"; diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js index adcd413..a699bee 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.js +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -30,8 +30,13 @@ Page({ onLoad: function(options) { var th = this; - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open_cancel(0); + setTimeout(function (){ + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open_cancel(0); + },1000) + + + th.setData({ getStorageID: a.stoid, getUserID: d.user_id diff --git a/pages/user/labels/labels.js b/pages/user/labels/labels.js index 5666231..bde14dd 100644 --- a/pages/user/labels/labels.js +++ b/pages/user/labels/labels.js @@ -117,7 +117,7 @@ Page({ }) th.query_checklabels(); } else { - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); + getApp().my_warnning("系统未设置兴趣标签集合", 0, th); th.setData({ isread: 1 }) @@ -136,7 +136,7 @@ Page({ storeId: a.stoid } }).then(res => { - if (res.data.code == 0) { + if (res.data.code == 0 && res.data.data && res.data.data.VipLabelId) { var data = res.data.data; var arr = []; var VipLabelId = []; //通过id标签找到已选择的标签 @@ -165,7 +165,7 @@ Page({ interest_lables: interest_lables }) } else { - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); + //getApp().my_warnning("系统繁忙,请稍后再试", 0, th); return false; } }) diff --git a/pages/user/my_service/i_service.js b/pages/user/my_service/i_service.js index 54d868b..243edd5 100644 --- a/pages/user/my_service/i_service.js +++ b/pages/user/my_service/i_service.js @@ -45,8 +45,11 @@ Page({ */ onShow: function() { var th = this; - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open_cancel(0); + setTimeout(function (){ + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open_cancel(0); + },1000) + }, onReachBottom: function() { var th = this; diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js index b0661fa..b199dce 100644 --- a/pages/user/userinfo/userinfo.js +++ b/pages/user/userinfo/userinfo.js @@ -115,20 +115,19 @@ Page({ storeId: r.stoid } }).then(res => { - if (res.data.code == 0) { + if (res.data.code == 0 && res.data.data && res.data.data.VipLabel) { var data = res.data.data; - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签 + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签 var dateList = data.VipLabel.split(","); + var arr=[]; for (var i in dateList) { if (dateList[i] != "") { - VipLabel.push(dateList[i]); + arr.push(dateList[i]); } } th.setData({ - check_label: VipLabel + check_label: arr }) - } else { - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); } }) }, @@ -678,8 +677,8 @@ Page({ if(!a) a={}; var time ="",birthday =""; - if(a && a.reg_time) time=util.formatTime(a.reg_time, "'Y/M/D"); - if(a && a.birthday) birthday=util.formatTime(a.birthday, "'Y/M/D"); + if(a && a.reg_time) time=util.formar_no_full(a.reg_time); + if(a && a.birthday) birthday=util.formar_no_full(a.birthday); a.reg_time = time; a.birthday = birthday @@ -708,9 +707,9 @@ Page({ user2:a, datet:a.birthday }); - } }) + a.getUserInfo(function(a) { var txt = util.formatTime(a.birthday, 'yyyy-M-d'), arr = txt.split(' '); @@ -718,7 +717,7 @@ Page({ var txt2 = util.formatTime(a.reg_time, 'yyyy-M-d'), arr2 = txt.split(' '); a.reg_time = arr2[0]; - if (a.pickup_id != null) { + if (a.pickup_id && a.pickup_id>0) { req.get("/api/weshop/pickup/get/" + r.stoid + "/" + a.pickup_id, { success: function(da) { if(da.data.data){ @@ -891,10 +890,8 @@ Page({ } if(this.data.confirmed) return false; - this.data.confirmed=1; - + this.data.confirmed=1; - var datas = { mobile: phone, //手机号码 store_id: r.stoid, @@ -907,7 +904,7 @@ Page({ address: address, //地址 pickup_id: sto_sele_id ,//自提门店 所属门店 islunar:th.data.iscalendar, - birthday:th.data.datet + birthday:th.data.datet } //往上提交美导的ID if(th.data.fir_guide_id!=th.data.user.staffId){ diff --git a/pages/user/userinfo/userinfo.wxml b/pages/user/userinfo/userinfo.wxml index 3b0f03d..188beb2 100644 --- a/pages/user/userinfo/userinfo.wxml +++ b/pages/user/userinfo/userinfo.wxml @@ -150,7 +150,7 @@ - {{datet==""? user.birthday==""?"":filters.replace_time2(user.birthday):datet}} + {{datet==""? user.birthday==""?"":filters.format_time(user.birthday):datet}}