|
|
@@ -258,11 +258,20 @@
|
|
|
// 刷新用户信息
|
|
|
that.getUserInfo()
|
|
|
},
|
|
|
- fail: res => {
|
|
|
- uni.showModal({
|
|
|
- content: '支付失败',
|
|
|
- showCancel: false
|
|
|
- });
|
|
|
+ fail: err => {
|
|
|
+ console.log(err)
|
|
|
+ if (err.errMsg === "requestPayment:fail cancel"){
|
|
|
+ uni.showModal({
|
|
|
+ content: '支付取消',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ uni.showModal({
|
|
|
+ content: '支付失败',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
@@ -271,6 +280,7 @@
|
|
|
getUserInfo(){
|
|
|
this.$api.getUserInfo().then(res=>{
|
|
|
console.log('++++++++++++获取用户信息++++++++++++++++++',res)
|
|
|
+
|
|
|
uni.setStorageSync('userInfo',res.data.data)
|
|
|
this.userInfo = res.data.data
|
|
|
})
|