Commit ad2cb64c authored by liwei's avatar liwei

增加了禁言弹窗

parent ec779add
......@@ -319,6 +319,10 @@ export default{
}
uni.setStorageSync("isRefresh", true)
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 {
uni.showToast({
title: res.data.message,
......
......@@ -22,7 +22,7 @@
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
<ELM ref="elmPay" :msg="tipMsg" :isConfirm="isPayConfirm" @confirm="payConfirm"></ELM>
<ELM ref="elmReject" :msg="tipMsg" :isConfirm="isRejectConfirm" :isCancel="false" @confirm="rejectConfirm"></ELM>
</view>
</template>
......@@ -50,7 +50,8 @@
//话题id
topicId:null,
// oss上传类型 aliYun local
uploadType: 'aliYun_direct'
uploadType: 'aliYun_direct',
isRejectConfirm:false
}
},
components: {
......@@ -92,22 +93,33 @@
//将params转成json
publishArticle(params).then( res => {
if (res.data.code == 200){
uni.showToast({
title: '发表成功',
icon: 'none'
})
uni.setStorageSync("isRefresh", true)
setTimeout(() => {
uni.navigateBack({
delta: 1, //返回层数,2则上上页
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({
title: '发表成功',
icon: 'none'
})
},1000)
uni.setStorageSync("isRefresh", true)
setTimeout(() => {
uni.navigateBack({
delta: 1, //返回层数,2则上上页
})
},1000)
}
} else if (res.data.code === 1002){
//留言超出限制 是否采用金币进行留言
this.isPayConfirm = true;
this.tipMsg = "已超出免费发动态次数,是否花费"+ this.payCount +"金币再进行发布";
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({
title: res.data.message,
icon: 'none'
......@@ -244,20 +256,31 @@
}
publishArticle(form).then(res=>{
if (res.data.code == 200){
uni.showToast({
title: '发表成功',
icon: 'none'
})
uni.setStorageSync("isRefresh", true)
setTimeout(() => {
uni.switchTab({
url: '/pages/tab/article',
});
},1000)
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({
title: '发表成功',
icon: 'none'
})
uni.setStorageSync("isRefresh", true)
setTimeout(() => {
uni.switchTab({
url: '/pages/tab/article',
});
},1000)
}
} else if (res.data.code === 1003) {
this.isConfirm = true;
this.tipMsg = res.data.message;
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 @@
this.h = 0
this.focus = false
},
rejectConfirm(){
this.isRejectConfirm = false;
}
}
}
</script>
......
......@@ -10,6 +10,7 @@
<ELM ref="elm" :msg="tipMsg" :isCancel="false" :isConfirm="isConfirm" @confirm="confirm"></ELM>
<ELM ref="elmMessage" :msg="tipMsg" :isConfirm="isMessageConfirm" @confirm="messageConfirm"></ELM>
<ELM ref="elmPay" :msg="tipMsg" :isConfirm="isPayConfirm" @confirm="payConfirm"></ELM>
<ELM ref="elmReject" :msg="tipMsg" :isConfirm="isRejectConfirm" :isCancel="false" @confirm="rejectConfirm"></ELM>
</view>
</template>
<script>
......@@ -62,13 +63,20 @@
}
addMessage(data).then(res => {
if (res.data.code == 200) {
uni.showToast({
title: '发送成功',
icon: 'none'
})
setTimeout(() => {
this.backbar()
}, 500)
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({
title: '发送成功',
icon: 'none'
})
setTimeout(() => {
this.backbar()
}, 500)
}
} else if (res.data.code === 1001){
//留言超出限制 是否采用金币进行留言
this.isPayConfirm = true;
......@@ -80,6 +88,15 @@
title: res.data.message,
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,18 +124,29 @@
}
addMessage(form).then(res=>{
if (res.data.code == 200){
uni.showToast({
title: '发送成功',
icon: 'none'
})
setTimeout(() => {
this.backbar()
}, 500)
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({
title: '发送成功',
icon: 'none'
})
setTimeout(() => {
this.backbar()
}, 500)
}
} else if (res.data.code === 1001){
uni.showToast({
title: res.data.message,
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 {
this.isMessageConfirm = true;
this.tipMsg = res.data.message;
......@@ -136,7 +164,10 @@
uni.navigateBack({
delta: 1
})
}
},
rejectConfirm(){
this.isRejectConfirm = false;
},
}
}
</script>
......
......@@ -78,6 +78,7 @@
<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="againConfirm"></ELM>
<ELM ref="elmReject" :msg="tipMsg" :isConfirm="isRejectConfirm" :isCancel="false" @confirm="rejectConfirm"></ELM>
</view>
</template>
......@@ -121,7 +122,8 @@ export default {
applyWxPayment:0,
acceptWxPayment:0,
isAgainConfirm: false,
wxTask:[]
wxTask:[],
isRejectConfirm:false
}
},
components: {
......@@ -261,8 +263,15 @@ export default {
}
addMessage(data).then(res => {
if (res.data.code == 200){
this.$refs.paging.reload();
this.inputTemp = ''
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.inputTemp = ''
}
} else if (res.data.code === 1001){
//留言超出限制 是否采用金币进行留言
this.isMessagePayConfirm = true;
......@@ -273,6 +282,10 @@ export default {
title: res.data.message,
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 {
uni.navigateBack({
delta: 1, // 返回层数,2则上上页
})
}
},
rejectConfirm(){
this.isRejectConfirm = false;
},
},
}
</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