完善商品邀请
This commit is contained in:
10
App.vue
10
App.vue
@@ -29,6 +29,7 @@
|
||||
onShow() {
|
||||
uni.getClipboardData({
|
||||
success: res=> {
|
||||
// 包含分享邀请码
|
||||
if(res.data.indexOf('$InviTaTiOn$CoDe/$-?') === 2){
|
||||
let parentId = res.data.replace('$InviTaTiOn$CoDe/$-?', '')
|
||||
this.globalData.parentId = parentId.substr(0, 10)
|
||||
@@ -39,6 +40,15 @@
|
||||
this.$Router.push({name: 'goodsDetails', params: {id: goodsId}})
|
||||
}, 1000)
|
||||
}
|
||||
return
|
||||
}
|
||||
// 不包含用户信息
|
||||
if(res.data.indexOf('&GoodsId/$-?') > -1){
|
||||
let goodsId = res.data.substr(12, res.data.length - 1)
|
||||
setTimeout(() => {
|
||||
if(this.$Route.name === 'goodsDetails' && this.$Route.query.id === goodsId) return
|
||||
this.$Router.push({name: 'goodsDetails', params: {id: goodsId}})
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
12
unpackage/dist/dev/app-plus/app-service.js
vendored
12
unpackage/dist/dev/app-plus/app-service.js
vendored
@@ -70388,6 +70388,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
onShow: function onShow() {var _this = this;
|
||||
uni.getClipboardData({
|
||||
success: function success(res) {
|
||||
// 包含分享邀请码
|
||||
if (res.data.indexOf('$InviTaTiOn$CoDe/$-?') === 2) {
|
||||
var parentId = res.data.replace('$InviTaTiOn$CoDe/$-?', '');
|
||||
_this.globalData.parentId = parentId.substr(0, 10);
|
||||
@@ -70398,12 +70399,21 @@ __webpack_require__.r(__webpack_exports__);
|
||||
_this.$Router.push({ name: 'goodsDetails', params: { id: goodsId } });
|
||||
}, 1000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// 不包含用户信息
|
||||
if (res.data.indexOf('&GoodsId/$-?') > -1) {
|
||||
var _goodsId = res.data.substr(12, res.data.length - 1);
|
||||
setTimeout(function () {
|
||||
if (_this.$Route.name === 'goodsDetails' && _this.$Route.query.id === _goodsId) return;
|
||||
_this.$Router.push({ name: 'goodsDetails', params: { id: _goodsId } });
|
||||
}, 1000);
|
||||
}
|
||||
} });
|
||||
|
||||
},
|
||||
onHide: function onHide() {
|
||||
__f__("log", 'App Hide', " at App.vue:47");
|
||||
__f__("log", 'App Hide', " at App.vue:57");
|
||||
},
|
||||
globalData: {
|
||||
mainColor: 'white',
|
||||
|
||||
Reference in New Issue
Block a user