完善商城转跳

This commit is contained in:
唐明明
2022-01-13 17:36:31 +08:00
parent 8eef1d2a4b
commit 8ac82fffc9
2 changed files with 32 additions and 2 deletions

View File

@@ -41,6 +41,7 @@
<script> <script>
import { goods } from '@/apis/interfaces/store' import { goods } from '@/apis/interfaces/store'
import userAuth from '@/public/userAuth'
export default { export default {
data() { data() {
return { return {
@@ -66,6 +67,11 @@
}) })
}, },
buy(){ buy(){
if(this.$store.state.token === ''){
const Auth = new userAuth()
Auth.Login()
return
}
this.$Router.push({ this.$Router.push({
name: 'StoreBuy', name: 'StoreBuy',
params: { params: {

View File

@@ -130,7 +130,7 @@
export default { export default {
data() { data() {
return { return {
cardText: ['用户专属特权', '老用户专属健康会员'], cardText: ['用户首单即赠会员', '老用户专属验证开通会员'],
userInfo: { userInfo: {
nickname: "", nickname: "",
avatar : "" avatar : ""
@@ -164,7 +164,31 @@
this.Login() this.Login()
return return
} }
console.log("开通会员") uni.showActionSheet({
itemList: ["我是新用户", "我是老用户"],
success: res=> {
switch (res.tapIndex){
case 0:
uni.showModal({
title: '开通提示',
content: '平台新用户完成手笔订单即可获赠ZH健康会员',
showCancel:false,
cancelText: '去完成',
success: res => {
console.log(res)
this.$Router.pushTab({name: 'Store'})
}
})
break;
case 1:
uni.showToast({
title: '老用户渠道暂未开放',
icon : 'none'
})
break;
}
}
})
}, },
// 开通钱包 // 开通钱包
onWallet(){ onWallet(){