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