121
This commit is contained in:
@@ -9,28 +9,34 @@
|
||||
<Acheak @click="ChangeChat('2')" :on-value="type" on-cheak="2">帮派</Acheak>.
|
||||
<Acheak @click="ChangeChat('3')" :on-value="type" on-cheak="3">全区</Acheak>.
|
||||
<Acheak @click="ChangeChat('4')" :on-value="type" on-cheak="4">全服</Acheak>.
|
||||
<Acheak @click="ChangeChat('5')" :on-value="type" on-cheak="5">系统</Acheak>
|
||||
<Acheak @click="ChangeChat('5')" :on-value="type" on-cheak="5">系统</Acheak>
|
||||
</div>
|
||||
<div class="content">
|
||||
<GameChat :data="data" :show-time="1"></GameChat>
|
||||
<GameChat :data="data" :show-time="1" :role="chatRole" @delChat="DelChat"></GameChat>
|
||||
<span v-if="data.length == 0">暂无发言.</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Pagination :currentPage="currentPage" :limit="10" :total="total" @pageChange="handlePageChange" />
|
||||
</div>
|
||||
<div class="content" v-if="type != '5'">
|
||||
<span>请输入聊天信息:</span><br>
|
||||
<div v-if="goodsName != ''">
|
||||
{{ goodsName }}:{{ goodsCount }} <span style="font-size: 18px;">(每次发言需要1个哦)</span>
|
||||
<div class="common" v-if="chatRole < 0">
|
||||
*发言权限已封禁!
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="sign" id="sign" rows="2" cols="20" maxlength="80" class="ipt emojiTxt"
|
||||
v-model="sign"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="发言" class="btn btn-danger" @click="SendChat" />.
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
<div class="common" v-else>
|
||||
<span>请输入聊天信息:</span><br>
|
||||
<div v-if="goodsName != ''">
|
||||
{{ goodsName }}:{{ goodsCount }} <span style="font-size: 18px;">(每次发言需要1个哦)</span>
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="sign" id="sign" rows="2" cols="20" maxlength="80" class="ipt emojiTxt"
|
||||
v-model="sign"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="发言" class="btn btn-danger" @click="SendChat" />.
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<Abar href="/customer/chat">*公聊频道发言规范</Abar><br />
|
||||
@@ -51,6 +57,7 @@ const data = ref<Array<any>>([]);
|
||||
const goodsCount = ref(0);
|
||||
const goodsName = ref('');
|
||||
const sign = ref('');
|
||||
const chatRole = ref(0);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -68,6 +75,7 @@ const BindData = async (): Promise<void> => {
|
||||
goodsCount.value = result.data.sendGoodsCount
|
||||
goodsName.value = result.data.sendGoodsName
|
||||
total.value = result.data.total;
|
||||
chatRole.value = result.data.chatRole;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
@@ -121,4 +129,22 @@ const ChangeChat = async (typeid: string): Promise<void> => {
|
||||
await BindData();
|
||||
};
|
||||
|
||||
//删除记录
|
||||
const DelChat = async (data: any) => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("频道管理", `您确定要删除该发言吗?`, async () => {
|
||||
MessageExtend.LoadingToast("删除中...");
|
||||
let result = await ChatService.DeleteChat(data.chatId);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("删除成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("删除操作", result.msg);
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user