diff --git a/app.js b/app.js index 5159588..09a79b2 100644 --- a/app.js +++ b/app.js @@ -201,18 +201,10 @@ App({ //调用接口判断是不是会员 app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + e.data.data.user_id, {}).then(res => { if (res.data.code == 0) { - - - // ut.m_toast('获取到导购:'+res.data.data.id) - + app.globalData.guide_id = res.data.data.id; app.globalData.guide_pick_id = res.data.data.pickup_id; - - // setTimeout(()=>{ - - // ut.m_toast('globalData中导购id:'+app.globalData.guide_id) - // },1200) - + } }) diff --git a/app.json b/app.json index 818696f..88e89fd 100644 --- a/app.json +++ b/app.json @@ -13,8 +13,7 @@ "pages/activity/seckill_list/seckill_list", "pages/activity/pind_list/pind_list", "pages/team/team_show/team_show", - "pages/user/userqy/userqy", - "pages/user/user_spsy/user_spsy", + "pages/user/userqy/userqy", "pages/user/plus/plus", "pages/user/my_service/i_service", "pages/giftpack/birthdaygift/birthdaygift", @@ -251,7 +250,8 @@ "root": "packageH/", "name": "pack8", "pages": [ - "pages/goodsInfo/goodsInfo" + "pages/goodsInfo/goodsInfo", + "pages/user/user_spsy/user_spsy" ] } ], diff --git a/packageA/pages/myGift/myGift.wxml b/packageA/pages/myGift/myGift.wxml index 9c22274..c32fd33 100644 --- a/packageA/pages/myGift/myGift.wxml +++ b/packageA/pages/myGift/myGift.wxml @@ -10,7 +10,7 @@ - + diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js index 86f3a58..1033966 100644 --- a/packageA/pages/profile/profile.js +++ b/packageA/pages/profile/profile.js @@ -1050,7 +1050,22 @@ Page({ if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; - } else { + } + else if(e.data.code==-3){ + wx.showModal({ + title: e.data.msg, + success: function (e) { + if(e.confirm){ + dd.isreplacemobile=1; + if (th.data.loading) return false; + th.setData({loading: 1}); + th.zu_ce(dd); + } + } + }); + return false; + } + else { return ut.m_toast("授权登入失败!" + e.data.msg); } getApp().globalData.login_back = 1; diff --git a/packageB/pages/user/user_coupon/c_filter.wxs b/packageB/pages/user/user_coupon/c_filter.wxs index 7112486..6c6337f 100644 --- a/packageB/pages/user/user_coupon/c_filter.wxs +++ b/packageB/pages/user/user_coupon/c_filter.wxs @@ -9,26 +9,42 @@ var filters = { fm=fm + ' '+ [d.getHours(), d.getMinutes(), d.getSeconds()].join(':') return fm; }, + //全场为 红色 商品除了全场为蓝色 卡项为绿色 setcolor:function(ind){ if(ind==0) return "red"; - if(ind==1) return "green"; - if(ind==2) return "blue"; - if(ind==11) return "green"; - if(ind==13) return "red"; + if(ind==1) return "blue"; + if(ind==2) return "blue"; + if(ind==11) return "blue"; + if(ind==12) return "blue"; - if(ind==20) return "green"; - if(ind==14) return "red"; + if(ind==13) return "blue"; + + if(ind==14) return "blue"; + if(ind==20) return "blue"; + + if(ind==21) return "green"; + if(ind==22) return "green"; + + if(ind==24) return "green"; + if(ind==25) return "green"; return ""; }, setbgcolor: function (ind) { - if (ind == 0) return "#ffa1b9"; - if (ind == 1) return "#59e1d2"; - if (ind == 2) return "#a3bcff"; - if (ind == 11) return "#59e1d2"; - if (ind == 12) return "#a3bcff"; - if (ind == 20) return "#6d87cd"; - if (ind==13) return "#ffa1b9"; - if (ind==14) return "#59e1d2"; + if (ind == 0) return "#ffa1b9";//红 + if (ind == 1) return "#a3bcff";//蓝 + if (ind == 2) return "#a3bcff";//蓝 + if (ind == 11) return "#a3bcff";//蓝 + if (ind == 12) return "#a3bcff";//蓝 + + if (ind==13) return "#a3bcff";//蓝 + + if (ind==14) return "#a3bcff";//蓝 + if (ind == 20) return "#a3bcff";//蓝 + if (ind==21) return "#59e1d2";//绿 + if (ind==22) return "#59e1d2";//绿 + + if (ind==24) return "#59e1d2";//绿 + if (ind==25) return "#59e1d2";//绿 return ""; }, @@ -38,10 +54,14 @@ var filters = { if (ind == 1) return "品牌"; if (ind == 2) return "品类"; if (ind == 11) return "用途"; - if (ind == 12) return "分类1"; + if (ind == 12) return "分类一"; if (ind == 13) return "自定义"; - if (ind == 14) return "分类2"; - if (ind == 20) return "指定单品"; + if (ind == 14) return "分类二"; + if (ind == 20) return "单品"; + if (ind == 21) return "卡项类别"; + if (ind == 22) return "自选项目"; + if (ind == 24) return "全部卡项"; + if (ind == 25) return "卡项"; return ""; }, get_type_card:function(ind){ @@ -49,10 +69,14 @@ var filters = { if (ind == 1) return "指定品牌"; if (ind == 2) return "指定品类"; if (ind == 11) return "指定用途"; - if (ind == 12) return "指定分类1"; - if (ind == 14) return "指定分类2"; + if (ind == 12) return "指定分类一"; + if (ind == 14) return "指定分类二"; if (ind == 13) return "自定义"; if (ind == 20) return "指定单品"; + if (ind == 21) return "卡项类别"; + if (ind == 22) return "自选项目"; + if (ind == 24) return "全部卡项"; + if (ind == 25) return "卡项"; return ""; }, diff --git a/packageB/pages/user/user_coupon/user_coupon.js b/packageB/pages/user/user_coupon/user_coupon.js index 2344df9..c6b493c 100644 --- a/packageB/pages/user/user_coupon/user_coupon.js +++ b/packageB/pages/user/user_coupon/user_coupon.js @@ -14,6 +14,11 @@ Page({ GradeId:null, FormId:null, now:'', + ismore: 0, //数据是否全部加载完成 + is_read: 0, //是否查询过我的礼包接口 + curpage: 1, //当前分页数 + pageSize: 10, //页大小 + total: 0, //总数量 }, clik_coupon:function(){ this.setData({ @@ -41,30 +46,85 @@ Page({ /** * 生命周期函数--监听页面显示 */ - onShow:async function () { - var th = this,q_list=null; - - //--获取列表-- - await getApp().request.promiseGet("/api/weshop/users/grade/wechat/cash/page", { - data:{ storeId:os.stoid,FormId:th.data.FormId,GradeId:th.data.GradeId,userId:getApp().globalData.user_id} - }).then(res => { - q_list = res.data.data.pageData; - }) - //取分类最后一级 - for(var i in q_list){ - var name=q_list[i].UseObjectName; - var arr=name.split("\\") - q_list[i].UseObjectName=arr[arr.length-1]; - q_list[i].Remark = q_list[i].Remark.replace(/\n/g, "\n") - } - th.setData({quan_list:q_list}); - + onShow:function () { + this.getList(); }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { + var th = this; + if (th.data.total <= th.data.pageSize) return; + if (th.data.ismore) return; + th.getList(); + + + }, + getList: function () { + + if(this.data.ismore) return false; + if(this.data.searching) return false; + this.data.searching=1; + + wx.showLoading({ + title: '加载中.', + }) + + var th = this,q_list=null; + + //--获取列表-- + getApp().request.promiseGet("/api/weshop/users/grade/wechat/cash/page", { + data:{ storeId:os.stoid, + FormId:th.data.FormId, + GradeId:th.data.GradeId, + userId:getApp().globalData.user_id, + page: th.data.curpage, + pageSize: th.data.pageSize} + }).then(res => { + th.data.searching=0; + if (utils.ajax_ok(res)){ + + + q_list = res.data.data.pageData; + + //取分类最后一级 + for(var i in q_list){ + var name=q_list[i].UseObjectName; + var arr=name.split("\\") + q_list[i].UseObjectName=arr[arr.length-1]; + q_list[i].Remark = q_list[i].Remark.replace(/\n/g, "\n") + } + th.data.curpage++; + + var quan_list=th.data.quan_list||[]; + + quan_list=quan_list.concat(q_list); + if (quan_list.length>=res.data.data.total) { + th.setData({ + is_read: 1, + ismore: 1, + is_get:1, + }) + } + th.setData({ + quan_list:quan_list, + total: res.data.data.total + }); + } + else { + + th.setData({ + is_read: 1, + ismore: 1, + is_get:1, + }) + } + wx.hideLoading(); + + }) + + }, diff --git a/packageB/pages/user/user_coupon/user_coupon.wxml b/packageB/pages/user/user_coupon/user_coupon.wxml index 7b6df4a..024d38b 100644 --- a/packageB/pages/user/user_coupon/user_coupon.wxml +++ b/packageB/pages/user/user_coupon/user_coupon.wxml @@ -6,6 +6,8 @@ + + @@ -104,6 +106,11 @@ + + + + —— 已经到底了 —— + diff --git a/packageB/pages/user/user_coupon/user_coupon.wxss b/packageB/pages/user/user_coupon/user_coupon.wxss index 53b47d6..2d82079 100644 --- a/packageB/pages/user/user_coupon/user_coupon.wxss +++ b/packageB/pages/user/user_coupon/user_coupon.wxss @@ -178,4 +178,10 @@ margin:0 0rpx 0 22rpx; .blue{background-color:#5e82e3;} .g_gray{background-color: #aaaaaa} -.f_text{text-align: center; height:96rpx; } \ No newline at end of file +.f_text{text-align: center; height:96rpx; } +.noMore { + padding: 20rpx; + color: #bbb; + text-align: center; + font-size: 22rpx; +} \ No newline at end of file diff --git a/packageD/components/diy_login/login.js b/packageD/components/diy_login/login.js index 6533841..beee326 100644 --- a/packageD/components/diy_login/login.js +++ b/packageD/components/diy_login/login.js @@ -77,6 +77,10 @@ Component({ return app.my_warnning("登录需要授权手机号码!", 0, this); return false; } + + if(this.data.sub) return false; + this.setData({ sub: 1 }); + var sessionKey = getApp().globalData.sessionKey; var openid = getApp().globalData.openid; var r = getApp().globalData.getu; @@ -175,103 +179,245 @@ Component({ }) }, - + + save_the_data: async function (r, e, sessionKey, openid) { var app = getApp(), a = app, th = this; - var dd = { - oauth: "miniapp", - nickname: a.clear_word(r.nickName), - head_pic: r.avatarUrl, - sex: r.gender, - terminal: "miniapp", - sessionKey: sessionKey, - openid: openid, - encryptedData: e.encryptedData, - iv: e.iv, - store_id: getApp().globalData.setting.stoid, - }; - //--如果有邀请人的时候-- - if (th.data.first_leader) { - //判断一下分享人是不是分享商 - await app.request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + th.data.first_leader, {}).then(res => { - if (res.data.code == 0) { - var user = res.data.data; - if (user.is_distribut == 1) { + + app.request.get("/api/weshop/manager/managerConfig/get", { + data: { + storeId: getApp().globalData.setting.stoid + }, + success: function (res2) { + if (res2.data.code == 0) { + if (res2.data.data.is_newphone == 1) { + var dd = { + oauth: "miniapp", + nickname: a.clear_word(r.nickName), + head_pic: r.avatarUrl, + sex: r.gender, + terminal: "miniapp", + sessionKey: sessionKey, + openid: openid, + code: e.code, + isNewPhone: 1, + store_id: getApp().globalData.setting.stoid, + }; + } else { + var dd = { + oauth: "miniapp", + nickname: a.clear_word(r.nickName), + head_pic: r.avatarUrl, + sex: r.gender, + terminal: "miniapp", + sessionKey: sessionKey, + openid: openid, + encryptedData: e.encryptedData, + iv: e.iv, + store_id: getApp().globalData.setting.stoid, + }; + } + + + //--如果有邀请人的时候-- + if (th.data.first_leader) { dd.first_leader = th.data.first_leader; } + //-- 导购会员ID -- + if (getApp().globalData.guide_id) { + dd.guide_id = getApp().globalData.guide_id; + } + + //门店的扫描识别码 + if (getApp().globalData.store_number) { + dd.SunCode = encodeURIComponent(getApp().globalData.store_number.trim()); + } + + console.log("-----会员注册的信息-------"); + console.log(dd); + + + var need_go = 0; + //如果有需要完善的信息没有完善,就需要跳转 + if (th.data.name_need_go) { need_go = 1; } + if (th.data.birth_need_go) { need_go = 1; } + if (th.data.idcard_need_go) { need_go = 1; } + if (th.data.address_need_go) { need_go = 1; } + if (th.data.pick_need_go) { need_go = 1; } + if (th.data.sex_need_go) { need_go = 1; } + if (th.data.introducer_need_go) { need_go = 1; } + + if (need_go) { + + if (res2.data.data.is_newphone == 1) { + var req_data = { + sessionKey: sessionKey, + code: e.code, + isNewPhone: 1, + store_id: getApp().globalData.setting.stoid, + } + }else{ + var req_data = { + sessionKey: sessionKey, + encryptedData: e.encryptedData, + iv: e.iv, + store_id: getApp().globalData.setting.stoid, + } + } + //-- 获取一下手机 -- + getApp().request.promiseGet("/api/weshop/users/getmobile", { data: req_data }).then(res => { + if (res.data.code == 0) { + dd.mobile = res.data.data; + getApp().globalData.zc_dd = dd; + + var g_url="/packageA/pages/profile/profile?is_back=1"; + if(th.data.is_reg){ + g_url+="&is_reg=1"; + } + + th.cancle_bind();//关闭 + wx.navigateTo({ + url:g_url + }) + } + }) + + } else { + if (th.data.is_lable_set) { + if (res2.data.data.is_newphone == 1) { + var req_data = { + sessionKey: sessionKey, + code: e.code, + isNewPhone: 1, + store_id: getApp().globalData.setting.stoid, + } + }else{ + var req_data = { + sessionKey: sessionKey, + encryptedData: e.encryptedData, + iv: e.iv, + store_id: getApp().globalData.setting.stoid, + } + } + + //-- 获取一下手机 -- + getApp().request.promiseGet("/api/weshop/users/getmobile", { data: req_data }).then(res => { + if (res.data.code == 0) { + dd.mobile = res.data.data; + getApp().globalData.zc_dd = dd; + + var g_url="/packageE/pages/user/labels/labels?pageType=1"; + if(th.data.is_reg){ + g_url+="&is_reg=1"; + } + + th.cancle_bind();//关闭 + wx.navigateTo({ url: g_url }) + } + }) + } else { + + th.setData({ sub: 0 }); + wx.showLoading({ + title: '处理中.', + mask: true + }) + th.zu_ce(dd); //调用注册的函数 + } + } + + + } else { + th.setData({ sub: 0 }); + return app.my_warnning("授权登入失败,请稍后再试!", 0, that); } - }) - } - //-- 导购会员ID -- - if (getApp().globalData.guide_id) { - dd.guide_id = getApp().globalData.guide_id; - } + }, + failStatus: function (t) { + th.setData({ sub: 0 }); + return app.my_warnning("授权登入失败,请稍后再试!", 0, that); + }, + fail: function (t) { + th.setData({ sub: 0 }); + return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; + } + }); + }, + + zu_ce: function (dd) { + - //门店的扫描识别码 - if (getApp().globalData.store_number) { - dd.SunCode = encodeURIComponent(getApp().globalData.store_number.trim()); + if(this.data.sub) return false; + this.setData({ sub: 1 }); + + if(getApp().globalData.h5_openid){ + dd.wxopenid=getApp().globalData.h5_openid; } - console.log("-----会员注册的信息-------"); - console.log(dd); + var th = this; app.request.get("/api/weshop/users/thirdLogin", { data: dd, success: function (e) { + wx.hideLoading(); + th.setData({ sub: 0 }); + if (e.data.code == 0) { + th.cancle_bind();//关闭 app.globalData.user_id = e.data.data.user_id; - } else { + app.globalData.userInfo = e.data.data; + } + else if(e.data.code==-3){ + wx.showModal({ + title: e.data.msg, + success: function (e) { + if(e.confirm){ + dd.isreplacemobile=1; + th.zu_ce(dd); + } + } + }); + return false; + } + else { return app.showWarning("授权登入失败!" + e.data.msg); } + getApp().globalData.login_back = 1; + wx.setStorageSync("userinfo", e.data.data); + wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = t.getFullUrl(app.globalData.userInfo.head_pic); + //调用接口判断是不是会员 + app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + e.data.data.user_id, {}).then(res => { + if (res.data.code == 0) { + getApp().globalData.guide_id = res.data.data.id; + getApp().globalData.guide_pick_id = res.data.data.pickup_id + } + }) - var need_go = 0; - var t_user = e.data.data; + getApp().showWarning("绑定成功"); + setTimeout(()=>{ + //-- 看情况,是跳转等级卡,还是跳转到新人有礼 -- + getApp().go_to_page(th.data.is_reg,function (){ - getApp().globalData.login_back = 1; - wx.setStorageSync("userinfo", e.data.data); - wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = t.getFullUrl(a.globalData.userInfo.head_pic); + }) + },1000) - //如果有需要完善的信息没有完善,就需要跳转 - if (!t_user['vipname'] && th.data.name_need_go) { - need_go = 1; - } - if (!t_user['birthday'] && th.data.birth_need_go) { - need_go = 1; - } - if (!t_user['idcard'] && th.data.idcard_need_go) { - need_go = 1; - } - if (!t_user['address'] && th.data.address_need_go) { - need_go = 1; - } - if (!t_user['pickup_id'] && th.data.pick_need_go) { - need_go = 1; - } - if (!t_user['sex'] && th.data.sex_need_go) { - need_go = 1; - } - if (!t_user['fromuser_id'] && th.data.introducer_need_go) { - need_go = 1; - } - if (need_go) { - getApp().goto("/packageA/pages/profile/profile?is_back=1"); - } else { - that.cancle_bind();//关闭 - } }, failStatus: function (t) { - return app.my_warnning("授权登入失败,请稍后再试!", 0, that); + th.setData({ sub: 0 }); + return app.my_warnning("授权登入失败,请稍后再试!", 0, th); }, fail: function (t) { + th.setData({ sub: 0 }); return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; } }); }, + + bind_bnerr: function (e) { var _errImg = e.target.dataset.errorimg; var _errObj = {}; diff --git a/packageD/components/diy_login/login.wxml b/packageD/components/diy_login/login.wxml index 2f325d8..042960d 100644 --- a/packageD/components/diy_login/login.wxml +++ b/packageD/components/diy_login/login.wxml @@ -61,14 +61,14 @@ - + 登录手机号,同步会员信息以及订单记录 暂不授权 - + diff --git a/packageD/components/diy_login/login.wxss b/packageD/components/diy_login/login.wxss index 9ef1954..261f85b 100644 --- a/packageD/components/diy_login/login.wxss +++ b/packageD/components/diy_login/login.wxss @@ -49,7 +49,7 @@ button{ top:50%; margin-top: -180rpx; background-color: #fff; - z-index: 12; + z-index: 22222; position: fixed; } diff --git a/packageE/pages/togoin/togoin.js b/packageE/pages/togoin/togoin.js index dce08a5..40268af 100644 --- a/packageE/pages/togoin/togoin.js +++ b/packageE/pages/togoin/togoin.js @@ -12,7 +12,8 @@ Page({ first_leader: '', //-- 邀请人 -- config2: null, sub: 0, - is_reg:1 + is_reg:1, + openid:'' }, onLoad: function (options) { if (wx.getUserProfile) { @@ -22,6 +23,14 @@ Page({ } getApp().globalData.isLoad_ad = 1; + if(options.openid){ + this.data.openid=options.openid; + getApp().globalData.h5_openid=options.openid; + + console.log("options.openid") + console.log(options.openid) + } + // if(options.is_reg){ // this.data.is_reg=1; // } @@ -78,6 +87,20 @@ Page({ th.setData({ template_id: template_id }); } }) + + setTimeout(()=>{ + if(getApp().globalData.user_id){ + getApp().goto('/pages/user/index/index'); + }else{ + if(!this.data.openid){ + //getApp().goto('/packageH/pages/getopenid/index'); + } + } + + },800) + + + }, @@ -380,7 +403,7 @@ Page({ } }) } else { - th.setData({ sub: 1 }); + th.setData({ sub: 0 }); wx.showLoading({ title: '处理中.', mask: true @@ -406,22 +429,45 @@ Page({ }); }, + + zu_ce: function (dd) { + + + if(this.data.sub) return false; + this.setData({ sub: 1 }); + + if(getApp().globalData.h5_openid){ + dd.wxopenid=getApp().globalData.h5_openid; + } + var th = this; app.request.get("/api/weshop/users/thirdLogin", { data: dd, success: function (e) { + + wx.hideLoading(); + th.setData({ sub: 0 }); + if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; - } else { - - wx.showToast({ - title: "授权登入失败!" + e.data.msg, - icon: 'none', - duration: 2000 + app.globalData.userInfo = e.data.data; + } + else if(e.data.code==-3){ + wx.showModal({ + title: e.data.msg, + success: function (e) { + if(e.confirm){ + dd.isreplacemobile=1; + th.zu_ce(dd); + } + } }); return false; } + else { + return app.showWarning("授权登入失败!" + e.data.msg); + } getApp().globalData.login_back = 1; wx.setStorageSync("userinfo", e.data.data); wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = t.getFullUrl(app.globalData.userInfo.head_pic); @@ -440,7 +486,6 @@ Page({ }) - }, failStatus: function (t) { th.setData({ sub: 0 }); @@ -453,7 +498,6 @@ Page({ }); }, - bind_bnerr: function (e) { var _errImg = e.target.dataset.errorimg; var _errObj = {}; diff --git a/packageE/pages/user/labels/labels.js b/packageE/pages/user/labels/labels.js index 93db6f3..af1028d 100644 --- a/packageE/pages/user/labels/labels.js +++ b/packageE/pages/user/labels/labels.js @@ -247,16 +247,38 @@ Page({ th.setData({ is_check: 1 }) - + + if(getApp().globalData.h5_openid){ + getApp().globalData.zc_dd.openid=getApp().globalData.h5_openid; + } + app.request.get("/api/weshop/users/thirdLogin", { data: getApp().globalData.zc_dd, success: function (e) { wx.hideLoading(); if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; - } else { + } + else if(e.data.code==-3){ + th.setData({loading: 0,is_check:0}); + wx.showModal({ + title: e.data.msg, + success: function (e) { + if(e.confirm){ + getApp().globalData.zc_dd.isreplacemobile=1; + + th.update_label(); + } + } + }); + return false; + } + + else { + th.setData({loading: 0,is_check:0}); return app.showWarning("授权登入失败!" + e.data.msg); } + getApp().globalData.login_back = 1; wx.setStorageSync("userinfo", e.data.data); wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = s.getFullUrl(app.globalData.userInfo.head_pic); @@ -291,7 +313,10 @@ Page({ }) }, 2000); - } else { + } + + + else { getApp().my_warnning("系统繁忙,请稍后再试", 0, th); th.setData({ is_check: 0 @@ -429,13 +454,36 @@ Page({ this.setData({ is_check: 1 }) + if(getApp().globalData.h5_openid){ + getApp().globalData.zc_dd.openid=getApp().globalData.h5_openid; + } + app.request.get("/api/weshop/users/thirdLogin", { data: getApp().globalData.zc_dd, success: function (e) { wx.hideLoading(); + th.setData({loading: 0,is_check:0}); + if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; - } else { + } + + else if(e.data.code==-3){ + + wx.showModal({ + title: e.data.msg, + success: function (e) { + if(e.confirm){ + getApp().globalData.zc_dd.isreplacemobile=1; + + th.goto_user(); + } + } + }); + return false; + } + + else { return app.showWarning("授权登入失败!" + e.data.msg); } getApp().globalData.login_back = 1; diff --git a/packageE/pages/user/user_fw/user_fw.js b/packageE/pages/user/user_fw/user_fw.js index 548a5be..a0be16f 100644 --- a/packageE/pages/user/user_fw/user_fw.js +++ b/packageE/pages/user/user_fw/user_fw.js @@ -39,7 +39,7 @@ Page({ var fw_list=null; //--获取列表-- await getApp().request.promiseGet("/api/weshop/users/grade/wechat/sm/page", { - data:{ storeId:os.stoid,FormId:th.data.FormId,GradeId:th.data.GradeId,userId:getApp().globalData.user_id} + data:{ storeId:os.stoid,FormId:th.data.FormId,GradeId:th.data.GradeId,userId:getApp().globalData.user_id,pageSize:100} }).then(res => { fw_list = res.data.data.pageData; }) diff --git a/packageG/pages/user/userqy/userqy.js b/packageG/pages/user/userqy/userqy.js index 917baa6..6e8cf17 100644 --- a/packageG/pages/user/userqy/userqy.js +++ b/packageG/pages/user/userqy/userqy.js @@ -209,7 +209,7 @@ Page({ getApp().goto("/packageE/pages/user/user_fw/user_fw?gradeId="+th.data.gradeId+"&FormId="+item.Id); break; case "03": - getApp().goto("/pages/user/user_spsy/user_spsy?img="+url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id); + getApp().goto("/packageH/pages/user/user_spsy/user_spsy?img="+url+"&gradeId="+th.data.gradeId+"&FormId="+item.Id); break; case "10": getApp().request.get("/api/weshop/users/grade/vipprivilegelist/other/get",{ diff --git a/packageH/pages/goodsInfo/goodsInfo.js b/packageH/pages/goodsInfo/goodsInfo.js index ed029eb..5d93355 100644 --- a/packageH/pages/goodsInfo/goodsInfo.js +++ b/packageH/pages/goodsInfo/goodsInfo.js @@ -228,6 +228,16 @@ Page({ //------初始化加载---------- onLoad:async function(t) { + + + //主包超包,从主包空文件跳转处理 + if(t.transfer){ + let obj=getApp().globalData.ts_trans_data; + t= JSON.parse(JSON.stringify(obj)); + getApp().globalData.ts_trans_data=null; + } + + self = this; this.setData({ diff --git a/pages/user/user_spsy/user_spsy.js b/packageH/pages/user/user_spsy/user_spsy.js index 01f1f68..4b29dad 100644 --- a/pages/user/user_spsy/user_spsy.js +++ b/packageH/pages/user/user_spsy/user_spsy.js @@ -1,8 +1,8 @@ // pages/user/usersy/usersy.js var e = getApp(), os = e.globalData.setting; -var ut = require('../../../utils/util'); -var regeneratorRuntime = require('../../../utils/runtime.js'); +var ut = require('../../../../utils/util'); +var regeneratorRuntime = require('../../../../utils/runtime.js'); Page({ /** @@ -126,6 +126,7 @@ Page({ FormId, storeId: os.stoid, userId: getApp().globalData.user_id, + pageSize:100 } const res = await getApp().request.promiseGet("/api/weshop/users/grade/wechat/wares/page", { data: req_data, diff --git a/pages/user/user_spsy/user_spsy.json b/packageH/pages/user/user_spsy/user_spsy.json index 7a0404b..7a0404b 100644 --- a/pages/user/user_spsy/user_spsy.json +++ b/packageH/pages/user/user_spsy/user_spsy.json diff --git a/pages/user/user_spsy/user_spsy.wxml b/packageH/pages/user/user_spsy/user_spsy.wxml index 6b9c677..6b9c677 100644 --- a/pages/user/user_spsy/user_spsy.wxml +++ b/packageH/pages/user/user_spsy/user_spsy.wxml diff --git a/pages/user/user_spsy/user_spsy.wxss b/packageH/pages/user/user_spsy/user_spsy.wxss index 2f78a2c..2f78a2c 100644 --- a/pages/user/user_spsy/user_spsy.wxss +++ b/packageH/pages/user/user_spsy/user_spsy.wxss diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml index db3772f..8340691 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxml +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml @@ -8,7 +8,7 @@ - + diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxml b/pages/giftpack/mygiftpack/mygiftpack.wxml index 5405cf3..5cc0131 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.wxml +++ b/pages/giftpack/mygiftpack/mygiftpack.wxml @@ -7,7 +7,7 @@ - + diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 9db801d..034bdf8 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -1820,11 +1820,6 @@ Page({ newd.prom_type = 0; newd.prom_id = 0; } - - - - // ut.m_toast('商品详情,购买globalData中导购id:'+getApp().globalData.guide_id ); - //---是不是从收藏夹出来的--- if (th.data.c_guide_id) { newd['guide_id'] = th.data.c_guide_id;