Commit 9f4d9f7b by 吴娟华

'修改'

1 parent 495b60c1
......@@ -107,27 +107,34 @@ export default {
sessionStorage.setItem('URL_PARAM', JSON.stringify(urlObj))
//console.log(JSON.parse(sessionStorage.getItem('URL_PARAM')))
if(('appId' in urlObj) && ('courseId' in urlObj) && ('channl' in urlObj) && ('merchantId' in urlObj) && ('fissionUser' in urlObj)) {
if(urlObj.fissionUser === 'false') {
this.showLoading()
equity.getFissionInfo({merchantId: urlObj.merchantId}).then(res => {
let { code, data, message } = res
this.hideLoading()
if (code == 0) {
if(data.presentNumber>0) {
this.openCard(urlObj)
}
} else {
this.showToast(message)
}
let urlObj = JSON.parse(sessionStorage.getItem('URL_PARAM'))
if(('appId' in urlObj) && ('courseId' in urlObj) && ('channl' in urlObj) && ('merchantId' in urlObj) && ('fissionUser' in urlObj)) {
if(urlObj.fissionUser === 'false') {
this.showLoading()
equity.getFissionInfo({merchantId: urlObj.merchantId}).then(res => {
let { code, data, message } = res
this.hideLoading()
if (code == 0) {
if(data.presentNumber>0) {
this.openCard(urlObj)
}else{
this.showToast('赠送名额已失效,请联系门店')
this.init()
}
})
}else if (urlObj.fissionUser === 'true') {
this.openCard(urlObj)
}
} else {
this.showToast(message)
this.init()
}
})
}else if (urlObj.fissionUser === 'true') {
this.openCard(urlObj)
}
}else{
this.init()
}
this.init()
},
methods: {
......@@ -149,20 +156,17 @@ export default {
}
},
openCard(data) {
let { sessionId } = this.$store.state
if (sessionId) {
this.showLoading()
equity.openCardFission({...data}).then(res => {
let { code, message } = res
this.hideLoading()
if (code == 0) {
//
} else {
this.showToast(message)
}
})
}
this.showLoading()
equity.openCardFission({...data}).then(res => {
let { code, message } = res
this.hideLoading()
if (code == 0) {
//
} else {
this.showToast(message)
}
this.init()
})
},
receive () {
let { sessionId, phone } = this.$store.state
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!