Commit ad2cb64c authored by liwei's avatar liwei

增加了禁言弹窗

parent ec779add
...@@ -319,6 +319,10 @@ export default{ ...@@ -319,6 +319,10 @@ export default{
} }
uni.setStorageSync("isRefresh", true) uni.setStorageSync("isRefresh", true)
this.getArticleDetail() this.getArticleDetail()
} else if (res.data.code === 1008 || res.data.code === 1009){
this.tipMsg = res.data.message;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM> <ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
<ELM ref="elmPay" :msg="tipMsg" :isConfirm="isPayConfirm" @confirm="payConfirm"></ELM> <ELM ref="elmPay" :msg="tipMsg" :isConfirm="isPayConfirm" @confirm="payConfirm"></ELM>
<ELM ref="elmReject" :msg="tipMsg" :isConfirm="isRejectConfirm" :isCancel="false" @confirm="rejectConfirm"></ELM>
</view> </view>
</template> </template>
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
//话题id //话题id
topicId:null, topicId:null,
// oss上传类型 aliYun local // oss上传类型 aliYun local
uploadType: 'aliYun_direct' uploadType: 'aliYun_direct',
isRejectConfirm:false
} }
}, },
components: { components: {
...@@ -92,6 +93,12 @@ ...@@ -92,6 +93,12 @@
//将params转成json //将params转成json
publishArticle(params).then( res => { publishArticle(params).then( res => {
if (res.data.code == 200){ if (res.data.code == 200){
if (res.data.data.examStatus == '3'){
const remarks = JSON.parse(res.data.data.remarks)
this.tipMsg = remarks[0].msg;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else {
uni.showToast({ uni.showToast({
title: '发表成功', title: '发表成功',
icon: 'none' icon: 'none'
...@@ -102,12 +109,17 @@ ...@@ -102,12 +109,17 @@
delta: 1, //返回层数,2则上上页 delta: 1, //返回层数,2则上上页
}) })
},1000) },1000)
}
} else if (res.data.code === 1002){ } else if (res.data.code === 1002){
//留言超出限制 是否采用金币进行留言 //留言超出限制 是否采用金币进行留言
this.isPayConfirm = true; this.isPayConfirm = true;
this.tipMsg = "已超出免费发动态次数,是否花费"+ this.payCount +"金币再进行发布"; this.tipMsg = "已超出免费发动态次数,是否花费"+ this.payCount +"金币再进行发布";
this.$refs.elmPay.showDialog(); this.$refs.elmPay.showDialog();
} else{ } else if (res.data.code === 1008 || res.data.code === 1009){
this.tipMsg = res.data.message;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
icon: 'none' icon: 'none'
...@@ -244,6 +256,12 @@ ...@@ -244,6 +256,12 @@
} }
publishArticle(form).then(res=>{ publishArticle(form).then(res=>{
if (res.data.code == 200){ if (res.data.code == 200){
if (res.data.data.examStatus == '3'){
const remarks = JSON.parse(res.data.data.remarks)
this.tipMsg = remarks[0].msg;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else {
uni.showToast({ uni.showToast({
title: '发表成功', title: '发表成功',
icon: 'none' icon: 'none'
...@@ -254,10 +272,15 @@ ...@@ -254,10 +272,15 @@
url: '/pages/tab/article', url: '/pages/tab/article',
}); });
},1000) },1000)
}
} else if (res.data.code === 1003) { } else if (res.data.code === 1003) {
this.isConfirm = true; this.isConfirm = true;
this.tipMsg = res.data.message; this.tipMsg = res.data.message;
this.$refs.elm.showDialog(); this.$refs.elm.showDialog();
} else if(res.data.code === 1008 || res.data.code === 1009){
this.tipMsg = res.data.message;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} }
}) })
}, },
...@@ -275,6 +298,9 @@ ...@@ -275,6 +298,9 @@
this.h = 0 this.h = 0
this.focus = false this.focus = false
}, },
rejectConfirm(){
this.isRejectConfirm = false;
}
} }
} }
</script> </script>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<ELM ref="elm" :msg="tipMsg" :isCancel="false" :isConfirm="isConfirm" @confirm="confirm"></ELM> <ELM ref="elm" :msg="tipMsg" :isCancel="false" :isConfirm="isConfirm" @confirm="confirm"></ELM>
<ELM ref="elmMessage" :msg="tipMsg" :isConfirm="isMessageConfirm" @confirm="messageConfirm"></ELM> <ELM ref="elmMessage" :msg="tipMsg" :isConfirm="isMessageConfirm" @confirm="messageConfirm"></ELM>
<ELM ref="elmPay" :msg="tipMsg" :isConfirm="isPayConfirm" @confirm="payConfirm"></ELM> <ELM ref="elmPay" :msg="tipMsg" :isConfirm="isPayConfirm" @confirm="payConfirm"></ELM>
<ELM ref="elmReject" :msg="tipMsg" :isConfirm="isRejectConfirm" :isCancel="false" @confirm="rejectConfirm"></ELM>
</view> </view>
</template> </template>
<script> <script>
...@@ -62,6 +63,12 @@ ...@@ -62,6 +63,12 @@
} }
addMessage(data).then(res => { addMessage(data).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.examStatus == '3'){
const remarks = JSON.parse(res.data.data.remarks)
this.tipMsg = remarks[0].msg;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else {
uni.showToast({ uni.showToast({
title: '发送成功', title: '发送成功',
icon: 'none' icon: 'none'
...@@ -69,6 +76,7 @@ ...@@ -69,6 +76,7 @@
setTimeout(() => { setTimeout(() => {
this.backbar() this.backbar()
}, 500) }, 500)
}
} else if (res.data.code === 1001){ } else if (res.data.code === 1001){
//留言超出限制 是否采用金币进行留言 //留言超出限制 是否采用金币进行留言
this.isPayConfirm = true; this.isPayConfirm = true;
...@@ -80,6 +88,15 @@ ...@@ -80,6 +88,15 @@
title: res.data.message, title: res.data.message,
icon: 'none' icon: 'none'
}) })
} else if (res.data.code === 1008 || res.data.code === 1009){
this.tipMsg = res.data.message;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
})
} }
}) })
} }
...@@ -107,6 +124,12 @@ ...@@ -107,6 +124,12 @@
} }
addMessage(form).then(res=>{ addMessage(form).then(res=>{
if (res.data.code == 200){ if (res.data.code == 200){
if (res.data.data.examStatus == '3'){
const remarks = JSON.parse(res.data.data.remarks)
this.tipMsg = remarks[0].msg;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else {
uni.showToast({ uni.showToast({
title: '发送成功', title: '发送成功',
icon: 'none' icon: 'none'
...@@ -114,11 +137,16 @@ ...@@ -114,11 +137,16 @@
setTimeout(() => { setTimeout(() => {
this.backbar() this.backbar()
}, 500) }, 500)
}
} else if (res.data.code === 1001){ } else if (res.data.code === 1001){
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
icon: 'none' icon: 'none'
}) })
} else if (res.data.code === 1008 || res.data.code === 1009){
this.tipMsg = res.data.message;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else { } else {
this.isMessageConfirm = true; this.isMessageConfirm = true;
this.tipMsg = res.data.message; this.tipMsg = res.data.message;
...@@ -136,7 +164,10 @@ ...@@ -136,7 +164,10 @@
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
} },
rejectConfirm(){
this.isRejectConfirm = false;
},
} }
} }
</script> </script>
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<ELM ref="elmMessagePay" :msg='tipMsg' :isConfirm="isMessagePayConfirm" @confirm="messagePayConfirm"></ELM> <ELM ref="elmMessagePay" :msg='tipMsg' :isConfirm="isMessagePayConfirm" @confirm="messagePayConfirm"></ELM>
<ELM ref="elmApplyPay" :msg='tipMsg' :isConfirm="isApplyPayConfirm" @confirm="applyPayConfirm"></ELM> <ELM ref="elmApplyPay" :msg='tipMsg' :isConfirm="isApplyPayConfirm" @confirm="applyPayConfirm"></ELM>
<ELM ref="elmAgain" :msg="tipMsg" :isConfirm="isAgainConfirm" confirmName="申请" @confirm="againConfirm"></ELM> <ELM ref="elmAgain" :msg="tipMsg" :isConfirm="isAgainConfirm" confirmName="申请" @confirm="againConfirm"></ELM>
<ELM ref="elmReject" :msg="tipMsg" :isConfirm="isRejectConfirm" :isCancel="false" @confirm="rejectConfirm"></ELM>
</view> </view>
</template> </template>
...@@ -121,7 +122,8 @@ export default { ...@@ -121,7 +122,8 @@ export default {
applyWxPayment:0, applyWxPayment:0,
acceptWxPayment:0, acceptWxPayment:0,
isAgainConfirm: false, isAgainConfirm: false,
wxTask:[] wxTask:[],
isRejectConfirm:false
} }
}, },
components: { components: {
...@@ -261,8 +263,15 @@ export default { ...@@ -261,8 +263,15 @@ export default {
} }
addMessage(data).then(res => { addMessage(data).then(res => {
if (res.data.code == 200){ if (res.data.code == 200){
if (res.data.data.examStatus == '3'){
const remarks = JSON.parse(res.data.data.remarks)
this.tipMsg = remarks[0].msg;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} else {
this.$refs.paging.reload(); this.$refs.paging.reload();
this.inputTemp = '' this.inputTemp = ''
}
} else if (res.data.code === 1001){ } else if (res.data.code === 1001){
//留言超出限制 是否采用金币进行留言 //留言超出限制 是否采用金币进行留言
this.isMessagePayConfirm = true; this.isMessagePayConfirm = true;
...@@ -273,6 +282,10 @@ export default { ...@@ -273,6 +282,10 @@ export default {
title: res.data.message, title: res.data.message,
icon: 'none' icon: 'none'
}) })
} else if (res.data.code === 1008 || res.data.code === 1009){
this.tipMsg = res.data.message;
this.isRejectConfirm = true;
this.$refs.elmReject.showDialog();
} }
}) })
// 滚动到页面底部 // 滚动到页面底部
...@@ -525,7 +538,10 @@ export default { ...@@ -525,7 +538,10 @@ export default {
uni.navigateBack({ uni.navigateBack({
delta: 1, // 返回层数,2则上上页 delta: 1, // 返回层数,2则上上页
}) })
} },
rejectConfirm(){
this.isRejectConfirm = false;
},
}, },
} }
</script> </script>
......
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