merge
This commit is contained in:
35
App.vue
35
App.vue
@@ -25,24 +25,36 @@
|
||||
// 获取系统版本号
|
||||
console.log(plus.runtime.versionCode)
|
||||
console.log(plus.runtime.uniVersion)
|
||||
|
||||
// 请求一个接口
|
||||
// 是否需要更新
|
||||
// 弹出更新提示
|
||||
// 下载文件安装
|
||||
|
||||
console.log('检查更新')
|
||||
//#endif
|
||||
},
|
||||
onShow() {
|
||||
uni.getClipboardData({
|
||||
success: res=> {
|
||||
if(res.data.indexOf('$InviTaTiOn$CoDe/$-?') === 2){
|
||||
this.globalData.parentId = res.data.replace('$InviTaTiOn$CoDe/$-?', '')
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
success: res=> {
|
||||
// 包含分享邀请码
|
||||
if(res.data.indexOf('$InviTaTiOn$CoDe/$-?') === 2){
|
||||
let parentId = res.data.replace('$InviTaTiOn$CoDe/$-?', '')
|
||||
this.globalData.parentId = parentId.substr(0, 10)
|
||||
if(res.data.indexOf('^GoodsId/$-?') === 30){
|
||||
let goodsId = res.data.substr(42, 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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -50,7 +62,8 @@
|
||||
console.log('App Hide');
|
||||
},
|
||||
globalData: {
|
||||
mainColor: 'white'
|
||||
mainColor: 'white',
|
||||
parentId:''
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user