Commit 9f4d9f7b by 吴娟华

'修改'

1 parent 495b60c1
...@@ -107,6 +107,9 @@ export default { ...@@ -107,6 +107,9 @@ export default {
sessionStorage.setItem('URL_PARAM', JSON.stringify(urlObj)) sessionStorage.setItem('URL_PARAM', JSON.stringify(urlObj))
//console.log(JSON.parse(sessionStorage.getItem('URL_PARAM'))) //console.log(JSON.parse(sessionStorage.getItem('URL_PARAM')))
}
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(('appId' in urlObj) && ('courseId' in urlObj) && ('channl' in urlObj) && ('merchantId' in urlObj) && ('fissionUser' in urlObj)) {
if(urlObj.fissionUser === 'false') { if(urlObj.fissionUser === 'false') {
this.showLoading() this.showLoading()
...@@ -116,18 +119,22 @@ export default { ...@@ -116,18 +119,22 @@ export default {
if (code == 0) { if (code == 0) {
if(data.presentNumber>0) { if(data.presentNumber>0) {
this.openCard(urlObj) this.openCard(urlObj)
}else{
this.showToast('赠送名额已失效,请联系门店')
this.init()
} }
} else { } else {
this.showToast(message) this.showToast(message)
this.init()
} }
}) })
}else if (urlObj.fissionUser === 'true') { }else if (urlObj.fissionUser === 'true') {
this.openCard(urlObj) this.openCard(urlObj)
} }
}else{
this.init()
} }
}
this.init()
}, },
methods: { methods: {
...@@ -149,9 +156,6 @@ export default { ...@@ -149,9 +156,6 @@ export default {
} }
}, },
openCard(data) { openCard(data) {
let { sessionId } = this.$store.state
if (sessionId) {
this.showLoading() this.showLoading()
equity.openCardFission({...data}).then(res => { equity.openCardFission({...data}).then(res => {
let { code, message } = res let { code, message } = res
...@@ -161,8 +165,8 @@ export default { ...@@ -161,8 +165,8 @@ export default {
} else { } else {
this.showToast(message) this.showToast(message)
} }
this.init()
}) })
}
}, },
receive () { receive () {
let { sessionId, phone } = this.$store.state 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!