This commit is contained in:
weipengfei 2023-08-29 09:27:40 +08:00
parent e1e583b14c
commit b10fef315f
4 changed files with 16 additions and 10 deletions

View File

@ -271,7 +271,6 @@ export default {
onShow () { onShow () {
// this.getUserIndex() // this.getUserIndex()
// this.getIndexList() // this.getIndexList()
this.$store.dispatch('initConfig');
this.getApproveList(); this.getApproveList();
this.initUserInfo(); this.initUserInfo();
this.showToask(); this.showToask();

View File

@ -109,7 +109,6 @@
}) })
let res = await loginAccount(that.formData); let res = await loginAccount(that.formData);
encrypt.encode('ACT', this.formData); encrypt.encode('ACT', this.formData);
this.$store.dispatch('initConfig');
this.$store.commit('SET_USERINFO', { this.$store.commit('SET_USERINFO', {
user: data, user: data,
token: res.data.token token: res.data.token
@ -118,6 +117,7 @@
data data
} = await userInfo(); } = await userInfo();
this.$store.commit('setUserInfo', data); this.$store.commit('setUserInfo', data);
await this.$store.dispatch('initConfig');
uni.hideLoading() uni.hideLoading()
if (data.is_new_user) { if (data.is_new_user) {
uni.showLoading({ uni.showLoading({

View File

@ -22,8 +22,8 @@
<u-steps-item title="2023-08-30 20:23:59" desc="XXXX公司发布任务任务未开始"></u-steps-item> <u-steps-item title="2023-08-30 20:23:59" desc="XXXX公司发布任务任务未开始"></u-steps-item>
</u-steps> </u-steps>
</view> --> </view> -->
<mybtn text="前往支付页面" @click="navTo(`/subpkg/topUp/topUp?task_id=${task_id}`)"></mybtn> <mybtn v-if="task.status!=3 && task.status!=5" text="前往支付页面" @click="navTo(`/subpkg/topUp/topUp?task_id=${task_id}`)"></mybtn>
<!-- <mybtn text="已支付" my_btn_disabled="true"></mybtn> --> <mybtn v-else text="已支付" my_btn_disabled="true"></mybtn>
</view> </view>
</template> </template>
@ -39,6 +39,7 @@
onLoad(options) { onLoad(options) {
this.task_id = options.task_id; this.task_id = options.task_id;
this.loadTask(); this.loadTask();
uni.$on('upBuyShare', this.loadTask);
}, },
methods:{ methods:{
async loadTask(){ async loadTask(){

View File

@ -109,7 +109,7 @@
money: this.payMoney.money money: this.payMoney.money
}; };
if(this.task_id>0) { if(this.task_id>0) {
queryData.id = this.task_id; queryData.task_id = this.task_id;
} }
let { data } = await recharge(queryData); let { data } = await recharge(queryData);
let res = await payWay({ let res = await payWay({
@ -155,9 +155,15 @@
icon: status.data.pay_status?'success':'none', icon: status.data.pay_status?'success':'none',
title: status.data.pay_status?'支付成功':'支付失败' title: status.data.pay_status?'支付成功':'支付失败'
}) })
if(this.task_id>0){
uni.$emit('upBuyShare');
uni.navigateBack();
}
else{
userInfo().then(user=>{ userInfo().then(user=>{
this.$store.commit('setUserInfo', user.data); this.$store.commit('setUserInfo', user.data);
}) })
}
}) })
}, },
fail: (e) => { fail: (e) => {
@ -236,7 +242,7 @@
.item { .item {
display: flex; display: flex;
justify-content: space-around; justify-content: space-between;
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;