|
@ -54,7 +54,7 @@ export default { |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
...mapGetters('user', ['userId']), |
|
|
...mapGetters('user', ['userId']), |
|
|
...mapState('yanyuan', ['enterByCode']), |
|
|
...mapState('yanyuan', ['enterByCode', 'enterOptions', 'scene']), |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
mounted() { |
|
|
mounted() { |
|
@ -91,15 +91,9 @@ export default { |
|
|
this.$refs.uTips.show({ |
|
|
this.$refs.uTips.show({ |
|
|
title: '绑定成功, 即将跳转', |
|
|
title: '绑定成功, 即将跳转', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
duration: '2000', |
|
|
duration: '3000', |
|
|
}); |
|
|
}); |
|
|
let url = ''; |
|
|
this.JumpPage(); |
|
|
if (this.enterByCode) { |
|
|
|
|
|
url = `/pages/index/index?u=${this.userId}&code=true`; |
|
|
|
|
|
} else { |
|
|
|
|
|
url = `/pages/index/index?u=${this.userId}`; |
|
|
|
|
|
} |
|
|
|
|
|
setTimeout(() => uni.reLaunch({ url }), 2000); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.phone = data.phone; |
|
|
this.phone = data.phone; |
|
|
} |
|
|
} |
|
@ -136,26 +130,14 @@ export default { |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
duration: '3000', |
|
|
duration: '3000', |
|
|
}); |
|
|
}); |
|
|
let url = ''; |
|
|
this.JumpPage(); |
|
|
if (this.enterByCode) { |
|
|
|
|
|
url = `/pages/index/index?u=${this.userId}&code=true`; |
|
|
|
|
|
} else { |
|
|
|
|
|
url = `/pages/index/index?u=${this.userId}`; |
|
|
|
|
|
} |
|
|
|
|
|
setTimeout(() => uni.reLaunch({ url }), 3000); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.$refs.uTips.show({ |
|
|
this.$refs.uTips.show({ |
|
|
title: '即将跳转上一页', |
|
|
title: '即将跳转上一页', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
duration: '3000', |
|
|
duration: '3000', |
|
|
}); |
|
|
}); |
|
|
let url = ''; |
|
|
this.JumpPage(); |
|
|
if (this.enterByCode) { |
|
|
|
|
|
url = `/pages/index/index?u=${this.userId}&code=true`; |
|
|
|
|
|
} else { |
|
|
|
|
|
url = `/pages/index/index?u=${this.userId}`; |
|
|
|
|
|
} |
|
|
|
|
|
setTimeout(() => uni.reLaunch({ url }), 3000); |
|
|
|
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('error: ', error); |
|
|
console.error('error: ', error); |
|
@ -167,7 +149,6 @@ export default { |
|
|
// 取消 返回首页 |
|
|
// 取消 返回首页 |
|
|
back() { |
|
|
back() { |
|
|
let url = ''; |
|
|
let url = ''; |
|
|
console.log('this.enterByCode: ', this.enterByCode); |
|
|
|
|
|
if (this.enterByCode) { |
|
|
if (this.enterByCode) { |
|
|
url = `/pages/index/index?u=${this.userId}&code=true`; |
|
|
url = `/pages/index/index?u=${this.userId}&code=true`; |
|
|
} else { |
|
|
} else { |
|
@ -175,6 +156,35 @@ export default { |
|
|
} |
|
|
} |
|
|
uni.reLaunch({ url }); |
|
|
uni.reLaunch({ url }); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 进入首页 |
|
|
|
|
|
JumpPage() { |
|
|
|
|
|
if (this.enterByCode) { |
|
|
|
|
|
let url = `/pages/index/index?u=${this.userId}&code=true`; |
|
|
|
|
|
setTimeout(() => uni.reLaunch({ url }), 3000); |
|
|
|
|
|
} else { |
|
|
|
|
|
if (this.scene === 1007 || (this.scene === 1008 && this.enterOptions.path === 'pagesProject/project/project')) { |
|
|
|
|
|
this.enterProject(); |
|
|
|
|
|
} else { |
|
|
|
|
|
let url = `/pages/index/index?u=${this.userId}`; |
|
|
|
|
|
setTimeout(() => uni.reLaunch({ url }), 3000); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 进入项目详情页 |
|
|
|
|
|
enterProject() { |
|
|
|
|
|
const { userId } = this; |
|
|
|
|
|
const { path, query } = this.enterOptions; |
|
|
|
|
|
const { code, p, pname, url, u } = query; |
|
|
|
|
|
this.$u.route(`/${path}`, { |
|
|
|
|
|
u: userId || u, |
|
|
|
|
|
p, |
|
|
|
|
|
pname: pname, |
|
|
|
|
|
url: encodeURIComponent(url), |
|
|
|
|
|
code, |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|