Commit 40546680 authored by 罗林杰's avatar 罗林杰

修改互换微信逻辑

parent b28b868c
......@@ -77,7 +77,7 @@
<ELM ref="elmBlack" :msg='tipMsg' :isConfirm="isBlackConfirm" @confirm="blackConfirm"></ELM>
<ELM ref="elmMessagePay" :msg='tipMsg' :isConfirm="isMessagePayConfirm" @confirm="messagePayConfirm"></ELM>
<ELM ref="elmApplyPay" :msg='tipMsg' :isConfirm="isApplyPayConfirm" @confirm="applyPayConfirm"></ELM>
<ELM ref="elmAgain" :msg="tipMsg" :isConfirm="isAgainConfirm" confirmName="申请" @confirm="applyPayConfirm"></ELM>
<ELM ref="elmAgain" :msg="tipMsg" :isConfirm="isAgainConfirm" confirmName="申请" @confirm="againConfirm"></ELM>
</view>
</template>
......@@ -179,11 +179,13 @@ export default {
this.open()
} else if (this.wxTask.type == '2' && this.wxTask.status == '2'){
if (this.wxTask.targetId == this.targetId){
this.wantWxC()
} else {
this.tipMsg = "对方已拒绝请求,是否再次申请?";
this.tipMsg = "对方已拒绝请求,是否花费"+ this.applyWxPayment +"金币再次申请?";
this.isAgainConfirm = true;
this.$refs.elmAgain.showDialog();
} else {
this.tipMsg = "已拒绝对方请求";
this.isConfirm = true;
this.$refs.elm.showDialog();
}
}
}
......@@ -381,10 +383,37 @@ export default {
}
})
},
againConfirm(){
const form = {
targetId: this.targetId,
type: '2',
againRequest: '1',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
this.getWxTask()
uni.showToast({
title: '已发送请求',
icon: 'none'
})
} else if(res.data.code == 1005 || res.data.code == 1006){
uni.showToast({
title: res.data.message,
icon: 'none'
})
} else {
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
this.$refs.elmMessage.showDialog();
}
})
},
applyPayConfirm(){
const form = {
targetId: this.targetId,
type: '1',
againRequest: '0',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
......@@ -411,6 +440,7 @@ export default {
targetId: this.targetId,
status: '1',
type: '2',
againRequest: '0',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
......@@ -439,6 +469,7 @@ export default {
targetId: this.targetId,
status: '2',
type: '2',
againRequest: '0',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment