|
@@ -80,40 +80,37 @@
|
|
|
async handleHelpClick() {
|
|
|
let state = this.getUrlParams('state')
|
|
|
console.log("state", state)
|
|
|
- switch (state) {
|
|
|
- case '0':
|
|
|
- this.$toast('已关注的老用户,不可助力!')
|
|
|
- break;
|
|
|
- case '1':
|
|
|
- this.$toast('您已助力!')
|
|
|
- break;
|
|
|
- case '2':
|
|
|
- this.isLoading = true
|
|
|
- let obj = {}
|
|
|
- obj.acjoinId = this.acjoinId
|
|
|
- obj.unionid = this.getUrlParams('unionid')
|
|
|
- const { data: response } = await reqHelper(obj)
|
|
|
- if(response.success!==1) {
|
|
|
+
|
|
|
+ if (state === '1') {
|
|
|
+ this.$toast('您已助力')
|
|
|
+ } else if (state === '0' || state === '2') {
|
|
|
+ this.isLoading = true
|
|
|
+ let obj = {}
|
|
|
+ obj.acjoinId = this.acjoinId
|
|
|
+ obj.unionid = this.getUrlParams('unionid')
|
|
|
+ const { data: response } = await reqHelper(obj)
|
|
|
+ if (response.success !== 1) {
|
|
|
+ setTimeout(() => {
|
|
|
this.$toast(response.message)
|
|
|
- this.isLoading = false
|
|
|
+ }, 1000);
|
|
|
+ console.log(response.message)
|
|
|
+ if (this.skiptype === 'view') {
|
|
|
// 跳转H5网页
|
|
|
setTimeout(() => {
|
|
|
window.location.href = this.pathlink
|
|
|
}, 1000);
|
|
|
- return
|
|
|
}
|
|
|
+ } else {
|
|
|
this.$toast('助力成功!')
|
|
|
- this.isLoading = false
|
|
|
- break
|
|
|
+ }
|
|
|
}
|
|
|
+ this.isLoading = false
|
|
|
// 跳转H5页面或者微信小程序
|
|
|
if (this.skiptype === 'view') {
|
|
|
// 跳转H5网页
|
|
|
setTimeout(() => {
|
|
|
window.location.href = this.pathlink
|
|
|
}, 1000);
|
|
|
- } else {
|
|
|
- // 跳转微信小程序
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -130,6 +127,7 @@
|
|
|
})
|
|
|
},
|
|
|
created() {
|
|
|
+ console.log("comming...")
|
|
|
this.acjoinId = this.getUrlParams('acjoinId')
|
|
|
this.getActivityInfo()
|
|
|
|