Commit 437c2dc6c7e8500d9fa99f98788850ba09e6d6db
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
3 changed files
with
27 additions
and
23 deletions
packageD/pages/AI-test-skin/index/aiskin.js
| 1 | /* | 1 | /* |
| 2 | * @Author: abson | 2 | * @Author: abson |
| 3 | * @Date: 2022-02-11 14:13:05 | 3 | * @Date: 2022-02-11 14:13:05 |
| 4 | - * @LastEditTime: 2022-02-22 15:17:48 | 4 | + * @LastEditTime: 2022-03-26 17:03:01 |
| 5 | * @LastEditors: Please set LastEditors | 5 | * @LastEditors: Please set LastEditors |
| 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| 7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\index\aiskin.js | 7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\index\aiskin.js |
| @@ -25,11 +25,13 @@ Page({ | @@ -25,11 +25,13 @@ Page({ | ||
| 25 | * 生命周期函数--监听页面加载 | 25 | * 生命周期函数--监听页面加载 |
| 26 | */ | 26 | */ |
| 27 | onLoad: function (options) { | 27 | onLoad: function (options) { |
| 28 | - var user=getApp().globalData.userInfo; | ||
| 29 | - if(!user){ | ||
| 30 | - let url = "/pages/togoin/togoin"; | ||
| 31 | - app.goto(url); | ||
| 32 | - } | 28 | + getApp().globalData.user_id = options?.user_id; |
| 29 | + getApp().getUserFir(); | ||
| 30 | + var user = getApp().globalData.userInfo; | ||
| 31 | + if (!user || !getApp().globalData.user_id) { | ||
| 32 | + let url = "/pages/togoin/togoin"; | ||
| 33 | + app.goto(url); | ||
| 34 | + } | ||
| 33 | }, | 35 | }, |
| 34 | 36 | ||
| 35 | /** | 37 | /** |
| @@ -57,8 +59,8 @@ Page({ | @@ -57,8 +59,8 @@ Page({ | ||
| 57 | goto(e) { | 59 | goto(e) { |
| 58 | 60 | ||
| 59 | this.check_num(function () { | 61 | this.check_num(function () { |
| 60 | - var user=getApp().globalData.userInfo; | ||
| 61 | - if(!user){ | 62 | + var user = getApp().globalData.userInfo; |
| 63 | + if (!user) { | ||
| 62 | wx.showToast({ | 64 | wx.showToast({ |
| 63 | title: "请先授权登陆", | 65 | title: "请先授权登陆", |
| 64 | icon: 'none', | 66 | icon: 'none', |
| @@ -68,14 +70,14 @@ Page({ | @@ -68,14 +70,14 @@ Page({ | ||
| 68 | setTimeout(function () { | 70 | setTimeout(function () { |
| 69 | let url = "/pages/togoin/togoin"; | 71 | let url = "/pages/togoin/togoin"; |
| 70 | app.goto(url); | 72 | app.goto(url); |
| 71 | - },1000) | 73 | + }, 1000) |
| 72 | return false; | 74 | return false; |
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | let url = e.currentTarget.dataset.url; | 77 | let url = e.currentTarget.dataset.url; |
| 76 | app.goto(url); | 78 | app.goto(url); |
| 77 | }) | 79 | }) |
| 78 | - | 80 | + |
| 79 | }, | 81 | }, |
| 80 | 82 | ||
| 81 | /** | 83 | /** |
| @@ -102,26 +104,27 @@ Page({ | @@ -102,26 +104,27 @@ Page({ | ||
| 102 | /** | 104 | /** |
| 103 | * 用户点击右上角分享 | 105 | * 用户点击右上角分享 |
| 104 | */ | 106 | */ |
| 105 | - onShareAppMessage: function () { getApp().globalData.no_clear=1 | 107 | + onShareAppMessage: function () { |
| 108 | + getApp().globalData.no_clear = 1 | ||
| 106 | 109 | ||
| 107 | }, | 110 | }, |
| 108 | 111 | ||
| 109 | - check_num:function (func) { | 112 | + check_num: function (func) { |
| 110 | //判断右没有开AI测肤 | 113 | //判断右没有开AI测肤 |
| 111 | - getApp().promiseGet("/api/weshop/wx/weappSkin/get/"+setting.stoid,{}).then(rs=>{ | ||
| 112 | - if(rs.data.code!=0 || !rs.data.data){ | 114 | + getApp().promiseGet("/api/weshop/wx/weappSkin/get/" + setting.stoid, {}).then(rs => { |
| 115 | + if (rs.data.code != 0 || !rs.data.data) { | ||
| 113 | wx.showToast({ | 116 | wx.showToast({ |
| 114 | title: "未开通测肤功能,请联系商家", | 117 | title: "未开通测肤功能,请联系商家", |
| 115 | icon: 'none', | 118 | icon: 'none', |
| 116 | duration: 3000 | 119 | duration: 3000 |
| 117 | }) | 120 | }) |
| 118 | - }else if(!rs.data.data.skin_num || rs.data.data.skin_num<=0){ | 121 | + } else if (!rs.data.data.skin_num || rs.data.data.skin_num <= 0) { |
| 119 | wx.showToast({ | 122 | wx.showToast({ |
| 120 | title: "测肤功能的使用次数已经达到上限,请联系商家", | 123 | title: "测肤功能的使用次数已经达到上限,请联系商家", |
| 121 | icon: 'none', | 124 | icon: 'none', |
| 122 | duration: 3000 | 125 | duration: 3000 |
| 123 | }) | 126 | }) |
| 124 | - }else{ | 127 | + } else { |
| 125 | func(); | 128 | func(); |
| 126 | } | 129 | } |
| 127 | }) | 130 | }) |
| @@ -139,14 +142,14 @@ Page({ | @@ -139,14 +142,14 @@ Page({ | ||
| 139 | store_id: setting.stoid, | 142 | store_id: setting.stoid, |
| 140 | user_id: os.user_id, | 143 | user_id: os.user_id, |
| 141 | page: 1, | 144 | page: 1, |
| 142 | - pageSize:1, | 145 | + pageSize: 1, |
| 143 | } | 146 | } |
| 144 | }); | 147 | }); |
| 145 | // initChart.setOption(option); | 148 | // initChart.setOption(option); |
| 146 | if (res.code == 0 && res.data.pageData.length > 0) { | 149 | if (res.code == 0 && res.data.pageData.length > 0) { |
| 147 | - this.setData({show_his:1}) | 150 | + this.setData({ show_his: 1 }) |
| 148 | } | 151 | } |
| 149 | } | 152 | } |
| 150 | - | ||
| 151 | - | 153 | + |
| 154 | + | ||
| 152 | }) | 155 | }) |
| 153 | \ No newline at end of file | 156 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.js
| @@ -1248,7 +1248,7 @@ Page({ | @@ -1248,7 +1248,7 @@ Page({ | ||
| 1248 | 1248 | ||
| 1249 | //让商品带上房间号 | 1249 | //让商品带上房间号 |
| 1250 | //让商品带上房间号 | 1250 | //让商品带上房间号 |
| 1251 | - if (th.data.sys_switch.is_skuroom_id == 1) { | 1251 | + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) { |
| 1252 | if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | 1252 | if (th.data.data.goods_id == getApp().globalData.room_goods_id) { |
| 1253 | newd.room_id = getApp().globalData.room_id; | 1253 | newd.room_id = getApp().globalData.room_id; |
| 1254 | } | 1254 | } |
| @@ -1354,7 +1354,7 @@ Page({ | @@ -1354,7 +1354,7 @@ Page({ | ||
| 1354 | 1354 | ||
| 1355 | //让商品带上房间号 | 1355 | //让商品带上房间号 |
| 1356 | //让商品带上房间号 | 1356 | //让商品带上房间号 |
| 1357 | - if (th.data.sys_switch.is_skuroom_id == 1) { | 1357 | + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) { |
| 1358 | if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | 1358 | if (th.data.data.goods_id == getApp().globalData.room_goods_id) { |
| 1359 | newd.room_id = getApp().globalData.room_id; | 1359 | newd.room_id = getApp().globalData.room_id; |
| 1360 | } | 1360 | } |
| @@ -4243,7 +4243,7 @@ Page({ | @@ -4243,7 +4243,7 @@ Page({ | ||
| 4243 | } | 4243 | } |
| 4244 | 4244 | ||
| 4245 | //让商品带上房间号 | 4245 | //让商品带上房间号 |
| 4246 | - if (th.data.sys_switch.is_skuroom_id == 1) { | 4246 | + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) { |
| 4247 | if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | 4247 | if (th.data.data.goods_id == getApp().globalData.room_goods_id) { |
| 4248 | newd.room_id = getApp().globalData.room_id; | 4248 | newd.room_id = getApp().globalData.room_id; |
| 4249 | } | 4249 | } |
pages/user/return_goods/return_goods.js
| @@ -50,6 +50,7 @@ Page({ | @@ -50,6 +50,7 @@ Page({ | ||
| 50 | data: { | 50 | data: { |
| 51 | goods_id: t.rec_id, | 51 | goods_id: t.rec_id, |
| 52 | order_id: t.order_id, | 52 | order_id: t.order_id, |
| 53 | + store_id:os.stoid | ||
| 53 | }, | 54 | }, |
| 54 | success: function(t) { | 55 | success: function(t) { |
| 55 | console.log('requestReturnGoods'); | 56 | console.log('requestReturnGoods'); |