wangxiaoping 4 years ago
parent b2fb58243b
commit 86d662b5d4

@ -69,6 +69,9 @@ Vue.prototype.reqByToken = (url, params, cb, method) => {
} else {
uni.showToast({title: r.data.msg, duration: 2000, icon: 'none'})
}
},
complete(r) {
console.log(r)
}
})
}

@ -193,9 +193,18 @@
if (this.checkLogin()) {
this.$refs.popup.close()
let package_id = this.packages.length > 0 ? this.packages[this.cardActive].id : 0
uni.navigateTo({
url: "../../packages/packageBuy/pages/buyMember/buyMember?package_id=" + package_id
});
if( this.packages.length == 0){
uni.showToast({
title: '请选择套餐',
icon:'none',
duration: 1000
});
}
else{
uni.navigateTo({
url: "../../packages/packageBuy/pages/buyMember/buyMember?package_id=" + package_id
});
}
}
},
//h5
@ -217,9 +226,20 @@
// #endif
},
getPackages() {
this.reqByToken('/api/member/get-packages', {}, r => {
this.packages = r
}, 'GET')
// this.reqByToken('/api/member/get-packages', {}, r => {
// this.packages = r
// }, 'GET')
const phone_token = uni.getStorageSync('phone_token')
uni.request({
url: this.baseUrl + '/api/member/get-packages',
method: 'GET',
data: {
token: phone_token.token
},
success: r => {
this.packages = this.packages.concat(r.data.data)
}
})
},
}
}

Loading…
Cancel
Save