修复bug
This commit is contained in:
parent
8d84fd1736
commit
f8bb35182f
1
App.vue
1
App.vue
@ -37,6 +37,7 @@
|
||||
data
|
||||
} = await userInfo();
|
||||
this.$store.commit('setUserInfo', data);
|
||||
uni.$emit('home_initUserInfo', data);
|
||||
}catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
|
@ -60,7 +60,8 @@
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx4789d9f1b50390ba",
|
||||
// "appid" : "wx4789d9f1b50390ba",
|
||||
"appid" : "wx9d68c92b550ddd1e", // 商城
|
||||
"UniversalLinks" : "https://worker-task.lihaink.cn/"
|
||||
}
|
||||
},
|
||||
|
@ -262,6 +262,7 @@
|
||||
this.showToask();
|
||||
// this.initOaHomeDada();
|
||||
this.getOrderList();
|
||||
uni.$on('home_initUserInfo',this.initUserInfo);
|
||||
//#ifdef APP-PLUS
|
||||
this.noticeFn();
|
||||
// #endif
|
||||
@ -324,7 +325,8 @@
|
||||
url: "/pages/logistics/index",
|
||||
});
|
||||
},
|
||||
initUserInfo() {
|
||||
initUserInfo(data=null) {
|
||||
if(data) return this.myOaInfo = data;
|
||||
this.$store.state.app.userInfo ?
|
||||
(this.myOaInfo = this.$store.state.app.userInfo) :
|
||||
(this.myOaInfo.avatar = "");
|
||||
|
@ -9,7 +9,7 @@
|
||||
<view class="card">
|
||||
<view class="title">任务描述</view>
|
||||
<u-line style="margin: 14rpx 0;"></u-line>
|
||||
<view class="text">{{task.content}}</view>
|
||||
<view class="text">{{task.content||'暂无任务描述'}}</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title">事件记录</view>
|
||||
|
@ -42,6 +42,8 @@
|
||||
payMoney: {
|
||||
money: ''
|
||||
},
|
||||
// 微信支付信息
|
||||
payData: null,
|
||||
payTimer: null,
|
||||
timeCount: 5,
|
||||
task_id: -1, //任务id,当为任务时,不可自选充值金额
|
||||
@ -62,7 +64,28 @@
|
||||
this.loadTask();
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
onShow() {
|
||||
if(this.payData){
|
||||
payStatus({
|
||||
order_id: payData.order_id,
|
||||
from: payData.from,
|
||||
}).then((status)=>{
|
||||
uni.showToast({
|
||||
icon: status.data.pay_status?'success':'none',
|
||||
title: status.data.pay_status?'支付成功':'支付失败'
|
||||
})
|
||||
if(this.task_id>0){
|
||||
uni.$emit('upBuyShare');
|
||||
uni.navigateBack();
|
||||
}
|
||||
else{
|
||||
userInfo().then(user=>{
|
||||
this.$store.commit('setUserInfo', user.data);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changePrice(index){
|
||||
if(this.changeMoney == index)this.changeMoney = -1;
|
||||
@ -112,6 +135,7 @@
|
||||
queryData.task_id = this.task_id;
|
||||
}
|
||||
let { data } = await recharge(queryData);
|
||||
this.payData = data;
|
||||
let res = await payWay({
|
||||
order_id: data.order_id,
|
||||
from: data.from,
|
||||
@ -147,24 +171,6 @@
|
||||
success: (e) => {
|
||||
// console.log('成功', e);
|
||||
uni.hideLoading();
|
||||
payStatus({
|
||||
order_id: data.order_id,
|
||||
from: data.from,
|
||||
}).then((status)=>{
|
||||
uni.showToast({
|
||||
icon: status.data.pay_status?'success':'none',
|
||||
title: status.data.pay_status?'支付成功':'支付失败'
|
||||
})
|
||||
if(this.task_id>0){
|
||||
uni.$emit('upBuyShare');
|
||||
uni.navigateBack();
|
||||
}
|
||||
else{
|
||||
userInfo().then(user=>{
|
||||
this.$store.commit('setUserInfo', user.data);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
@ -175,7 +181,7 @@
|
||||
})
|
||||
},
|
||||
complete: () => {
|
||||
this.payMoney.money = '';
|
||||
if(this.task_id<=0)this.payMoney.money = '';
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user