1
This commit is contained in:
parent
88a583f2a8
commit
b29534f716
@ -82,7 +82,8 @@
|
|||||||
import {
|
import {
|
||||||
saveOrder,
|
saveOrder,
|
||||||
getOrderList,
|
getOrderList,
|
||||||
prepayment
|
prepayment,
|
||||||
|
getMemberCoupon
|
||||||
} from '@/api/business/member.js'
|
} from '@/api/business/member.js'
|
||||||
import {
|
import {
|
||||||
toast
|
toast
|
||||||
@ -127,7 +128,6 @@
|
|||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.menuIndex = option.index || 0
|
this.menuIndex = option.index || 0
|
||||||
this.coupon = option.coupon || 0
|
|
||||||
this.initCoupon();
|
this.initCoupon();
|
||||||
this.initOrder()
|
this.initOrder()
|
||||||
//获取url中的search
|
//获取url中的search
|
||||||
@ -143,9 +143,10 @@
|
|||||||
let that = this
|
let that = this
|
||||||
getWebAccessTokenAndOpenid(result.code).then(res => {
|
getWebAccessTokenAndOpenid(result.code).then(res => {
|
||||||
that.$store.dispatch('GzhLogin', res).then(() => {
|
that.$store.dispatch('GzhLogin', res).then(() => {
|
||||||
this.initCoupon();
|
that.initCoupon();
|
||||||
this.initOrder()
|
that.initOrder()
|
||||||
that.loginSuccess()
|
that.loginSuccess()
|
||||||
|
that.initMyCoupon()
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
@ -159,7 +160,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow(){
|
||||||
|
if (getToken()){
|
||||||
|
this.initMyCoupon()
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initMyCoupon(){
|
||||||
|
getMemberCoupon().then(res=>{
|
||||||
|
this.coupon = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
openVip() {
|
openVip() {
|
||||||
// 在你想触发跳转的地方
|
// 在你想触发跳转的地方
|
||||||
wx.openOfficialAccountProfile({
|
wx.openOfficialAccountProfile({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user