Commit 7ae6bf9be6dc7c53bfdb9b91e6b9c29a1eadc44d
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
3 changed files
with
53 additions
and
7 deletions
app.js
| ... | ... | @@ -1460,6 +1460,15 @@ App({ |
| 1460 | 1460 | //-- 获取判断注册成功后,是跳转等级卡,还是新人有礼 -- |
| 1461 | 1461 | async go_to_page(func){ |
| 1462 | 1462 | |
| 1463 | + //如果是从企业专属导购跳过来的话,就要返回专属导购处理页面 | |
| 1464 | + let qyzsdg = wx.getStorageSync('qyzsdg') //如果是专属导购 | |
| 1465 | + if (qyzsdg) { | |
| 1466 | + wx.reLaunch({ | |
| 1467 | + url: `/packageE/pages/qy/contactMe/contactMe?scene=${qyzsdg}`, | |
| 1468 | + }) | |
| 1469 | + return | |
| 1470 | + } | |
| 1471 | + | |
| 1463 | 1472 | //新判断新人有礼 |
| 1464 | 1473 | var res= await getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", { |
| 1465 | 1474 | data: { | ... | ... |
packageE/pages/qy/contactMe/contactMe.js
| ... | ... | @@ -92,7 +92,21 @@ Page({ |
| 92 | 92 | this.setData({ |
| 93 | 93 | id: f_arr[2] |
| 94 | 94 | }) |
| 95 | - this.getopenuserid(f_arr[2]) | |
| 95 | + //判断是否有注册,如果没有注册必须先注册 | |
| 96 | + let userinfo = wx.getStorageSync('userinfo'); | |
| 97 | + if (!userinfo) { | |
| 98 | + wx.setStorageSync('qyzsdg', tt.scene) | |
| 99 | + wx.navigateTo({ | |
| 100 | + url: '/packageE/pages/togoin/togoin', | |
| 101 | + }) | |
| 102 | + }else{ | |
| 103 | + wx.removeStorageSync('qyzsdg') | |
| 104 | + this.setData({ | |
| 105 | + phone:userinfo.mobile | |
| 106 | + }) | |
| 107 | + this.getopenuserid(f_arr[2]) | |
| 108 | + } | |
| 109 | + | |
| 96 | 110 | // getApp().globalData.groupchat_id = f_arr[2]; |
| 97 | 111 | } |
| 98 | 112 | |
| ... | ... | @@ -145,7 +159,17 @@ Page({ |
| 145 | 159 | // } |
| 146 | 160 | // }) |
| 147 | 161 | }, |
| 148 | - | |
| 162 | + onShow:function(){ | |
| 163 | + let userinfo = wx.getStorageSync('userinfo'); | |
| 164 | + if (userinfo) { | |
| 165 | + this.setData({ | |
| 166 | + phone:userinfo.mobile | |
| 167 | + }) | |
| 168 | + } | |
| 169 | + if (this.data.id) { | |
| 170 | + this.getopenuserid(this.data.id) | |
| 171 | + } | |
| 172 | + }, | |
| 149 | 173 | getopenuserid(id) { |
| 150 | 174 | let url = `/api/weshop/qyWeChat/qywxStaffcode/get/${id}` |
| 151 | 175 | getApp().request.promiseGet(url, { data: {} }).then(res => { |
| ... | ... | @@ -158,6 +182,10 @@ Page({ |
| 158 | 182 | openuserid, |
| 159 | 183 | skip_verify |
| 160 | 184 | }) |
| 185 | + if (this.data.phone) { | |
| 186 | + | |
| 187 | + this.befgetqy() | |
| 188 | + } | |
| 161 | 189 | // if (this.data.phone) { |
| 162 | 190 | // this.getqy() |
| 163 | 191 | // } | ... | ... |
packageE/pages/user/labels/labels.js
| ... | ... | @@ -111,9 +111,14 @@ Page({ |
| 111 | 111 | var pages = getCurrentPages(); |
| 112 | 112 | var prevPage = pages[pages.length - 2]; //上一个页面 |
| 113 | 113 | //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 |
| 114 | - prevPage.setData({ | |
| 115 | - is_zy: 1 | |
| 116 | - }) | |
| 114 | + try { | |
| 115 | + prevPage.setData({ | |
| 116 | + is_zy: 1 | |
| 117 | + }) | |
| 118 | + } catch (error) { | |
| 119 | + | |
| 120 | + } | |
| 121 | + | |
| 117 | 122 | th.query_nolabels(); |
| 118 | 123 | th.get_config(); |
| 119 | 124 | }, |
| ... | ... | @@ -291,9 +296,13 @@ Page({ |
| 291 | 296 | } |
| 292 | 297 | }) |
| 293 | 298 | }else{ |
| 294 | - wx.reLaunch({ | |
| 295 | - url: '/pages/user/index/index', | |
| 299 | + getApp().go_to_page(function (){ | |
| 300 | + // wx.navigateBack({ delta: 1 }) | |
| 301 | + wx.reLaunch({ | |
| 302 | + url: '/pages/user/index/index', | |
| 303 | + }) | |
| 296 | 304 | }) |
| 305 | + | |
| 297 | 306 | } |
| 298 | 307 | |
| 299 | 308 | }, | ... | ... |