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

修改弹窗

parent 53f39874
...@@ -70,6 +70,11 @@ ...@@ -70,6 +70,11 @@
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM> <ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
<ELM ref="elm" :msg='tipMsg' :isConfirm="showApply" @confirm="apply" @cancel="refuse"></ELM> <ELM ref="elm" :msg='tipMsg' :isConfirm="showApply" @confirm="apply" @cancel="refuse"></ELM>
<ELM ref="elmMessage" :msg="tipMsg" :isConfirm="isMessageConfirm" @confirm="messageConfirm"></ELM> <ELM ref="elmMessage" :msg="tipMsg" :isConfirm="isMessageConfirm" @confirm="messageConfirm"></ELM>
<ELM ref="elm" :msg='tipMsg' :isConfirm="isBlackConfirm" @confirm="blackConfirm"></ELM>
<ELM ref="elm" :msg='tipMsg' :isConfirm="isMessagePayConfirm" @confirm="messagePayConfirm"></ELM>
<ELM ref="elm" :msg='tipMsg' :isConfirm="isApplyPayConfirm" @confirm="applyPayConfirm"></ELM>
<ELM ref="elm" :msg='tipMsg' :isConfirm="isAcceptPayConfirm" @confirm="acceptPayConfirm"></ELM>
<ELM ref="elm" :msg='tipMsg' :isConfirm="isRefuseConfirm" @confirm="refuseConfirm"></ELM>
</view> </view>
</template> </template>
...@@ -105,6 +110,11 @@ export default { ...@@ -105,6 +110,11 @@ export default {
tipMsg: '', tipMsg: '',
isConfirm: false, isConfirm: false,
isMessageConfirm: false, isMessageConfirm: false,
isBlackConfirm: false,
isMessagePayConfirm: false,
isApplyPayConfirm: false,
isAcceptPayConfirm: false,
isRefuseConfirm: false,
applyWxPayment:0, applyWxPayment:0,
acceptWxPayment:0, acceptWxPayment:0,
wxTask:[] wxTask:[]
...@@ -225,23 +235,9 @@ export default { ...@@ -225,23 +235,9 @@ export default {
}, },
//拉黑 //拉黑
addBlack() { addBlack() {
uni.showModal({ this.isBlackConfirm = true
title: '提示', this.tipMsg = "确定拉黑该用户吗?";
content: '确定拉黑该用户吗?', this.$refs.elm.showDialog();
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId
}
addBlack(form).then(res=>{
if (res.data.code == 200){
uni.setStorageSync("isRefresh", true)
this.backbar()
}
})
}
}
})
}, },
/** /**
* 发送 * 发送
...@@ -267,32 +263,9 @@ export default { ...@@ -267,32 +263,9 @@ export default {
this.inputTemp = '' this.inputTemp = ''
} else if (res.data.code === 1001){ } else if (res.data.code === 1001){
//留言超出限制 是否采用金币进行留言 //留言超出限制 是否采用金币进行留言
uni.showModal({ this.isMessagePayConfirm = true;
title: '提示', this.tipMsg = '已超出留言次数,是否花费'+ this.payCount +'金币再进行留言';
content: '已超出留言次数,是否花费'+ this.payCount +'金币再进行留言', this.$refs.elm.showDialog();
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId,//目标id
content: inputValue,//输入的内容
isPay:'1',//1花费 0不花费
wxOpenid: this.userInfo.wxOpenid
}
addMessage(form).then(res=>{
if (res.data.code == 200){
this.$refs.paging.reload();
this.inputTemp = ''
} else {
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
this.$refs.elm.showDialog();
}
})
} else if (res.cancel) {
}
}
});
this.inputTemp = '' this.inputTemp = ''
} else if(res.data.code === 1002){ } else if(res.data.code === 1002){
uni.showToast({ uni.showToast({
...@@ -333,37 +306,9 @@ export default { ...@@ -333,37 +306,9 @@ export default {
}).exec() }).exec()
}, },
wantWxC(){ wantWxC(){
uni.showModal({ this.isApplyPayConfirm = true
title: '提示', this.tipMsg = "是否花费"+ this.applyWxPayment +"金币,向对方发起请求";
content: '是否花费'+ this.applyWxPayment +'金币,向对方发起请求', this.$refs.elm.showDialog();
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId,
type: '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.elm.showDialog();
}
})
}
}
})
}, },
close() { close() {
this.show = false this.show = false
...@@ -380,66 +325,14 @@ export default { ...@@ -380,66 +325,14 @@ export default {
this.$refs.elm.showDialog(); this.$refs.elm.showDialog();
}, },
apply(){ apply(){
uni.showModal({ this.isAcceptPayConfirm = true
title: '提示', this.tipMsg = '是否花费'+ this.acceptWxPayment +'金币,向对方发起请求';
content: '是否同意花费'+ this.acceptWxPayment +'金币,接受对方请求', this.$refs.elm.showDialog();
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId,
status: '1',
type: '2',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
this.getWxTask()
uni.showToast({
title: '已接受请求',
icon: 'none'
})
this.showApply = false
} else {
this.showApply = false
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
this.$refs.elm.showDialog();
}
})
}
}
})
}, },
refuse(){ refuse(){
uni.showModal({ this.isRefuseConfirm = true
title: '提示', this.tipMsg = '是否确认拒绝对方请求';
content: '是否确认拒绝对方请求', this.$refs.elm.showDialog();
success: (res) => {
if (res.confirm) {
const form = {
targetId: this.targetId,
status: '2',
type: '2',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
this.getWxTask()
uni.showToast({
title: '已拒绝请求',
icon: 'none'
})
this.showApply = false
} else {
this.showApply = false
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
this.$refs.elm.showDialog();
}
})
}
}
})
}, },
getWxTask(){ getWxTask(){
const form = { const form = {
...@@ -464,6 +357,106 @@ export default { ...@@ -464,6 +357,106 @@ export default {
url: "/pagesme/goldCoin/recharge" url: "/pagesme/goldCoin/recharge"
}) })
}, },
blackConfirm(){
const form = {
targetId: this.targetId
}
addBlack(form).then(res=>{
if (res.data.code == 200){
uni.setStorageSync("isRefresh", true)
this.backbar()
}
})
},
messagePayConfirm(){
const form = {
targetId: this.targetId,//目标id
content: this.inputTemp,//输入的内容
isPay:'1',//1花费 0不花费
wxOpenid: this.userInfo.wxOpenid
}
addMessage(form).then(res=>{
if (res.data.code == 200){
this.$refs.paging.reload();
this.inputTemp = ''
} else {
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
this.$refs.elm.showDialog();
}
})
},
applyPayConfirm(){
const form = {
targetId: this.targetId,
type: '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.elm.showDialog();
}
})
},
acceptPayConfirm(){
const form = {
targetId: this.targetId,
status: '1',
type: '2',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
this.getWxTask()
uni.showToast({
title: '已接受请求',
icon: 'none'
})
this.showApply = false
} else {
this.showApply = false
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
this.$refs.elm.showDialog();
}
})
},
refuseConfirm(){
const form = {
targetId: this.targetId,
status: '2',
type: '2',
wxOpenid: this.userInfo.wxOpenid
}
wantWeChatTask(form).then(res=>{
if (res.data.code == 200){
this.getWxTask()
uni.showToast({
title: '已拒绝请求',
icon: 'none'
})
this.showApply = false
} else {
this.showApply = false
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
this.$refs.elm.showDialog();
}
})
},
phoneClick(){ phoneClick(){
uni.showToast({ uni.showToast({
title: '功能待开发', title: '功能待开发',
......
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