消息提醒

This commit is contained in:
liushiwei
2023-08-14 22:36:21 +08:00
parent cfb0896f37
commit 1f80c05a93

View File

@@ -34,7 +34,7 @@
<el-table-column slot="options" label="操作" align="center" fixed="right" width="140px">
<template v-slot="{ row }">
<div class="table-options">
<el-button type="text" @click="edit(row)">修改姓名</el-button>
<el-button type="text" @click="edit(row)">修改</el-button>
<el-button type="text" @click="remove(row)">删除</el-button>
</div>
</template>
@@ -53,7 +53,7 @@
</div>
</AiDialog>
<AiDialog
title="修改姓名"
title="修改信息"
:visible.sync="isShowForm"
:close-on-click-modal="false"
width="580px"
@@ -63,6 +63,16 @@
<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '请输入姓名', trigger: 'blur'}]">
<el-input v-model="form.name" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="店铺" style="width: 100%;" prop="mallId">
<el-select style="width: 380px" v-model="form.mallId" clearable placeholder="请选择" @change="mallChange">
<el-option
v-for="item in $store.state.mallList"
:key="item.mallId"
:label="item.mallName"
:value="item.mallId">
</el-option>
</el-select>
</el-form-item>
</el-form>
</AiDialog>
</template>
@@ -75,6 +85,7 @@
return {
colConfigs: [
{ prop: 'name', label: '姓名', align: 'left' },
{ prop: 'mallName', label: '店铺名称', align: 'left', format: v => !v ? '所有店铺': v },
{ slot: 'send' },
{ prop: 'createTime', label: '绑定时间', align: 'center' },
],
@@ -87,7 +98,9 @@
size: 10
},
form: {
name: ''
name: '',
mallId: '',
mallName: ''
},
isShowForm: false,
sence: '',
@@ -103,10 +116,7 @@
methods: {
onChange (id, isSend) {
console.log(isSend)
this.$http.post(`/api/malluser/updateWxuserInfo`, {
id,
isSend: isSend
}).then(res => {
this.$http.post(`/api/malluser/updateWxuserStatus?id=${id}&isSend=${isSend}`).then(res => {
if (res.code === 0) {
this.$message.success('操作成功')
this.getList()
@@ -119,7 +129,9 @@
if (valid) {
this.$http.post('/api/malluser/updateWxuserInfo', {
id: this.id,
name: this.form.name
name: this.form.name,
mallId: this.form.mallId,
mallName: this.form.mallName
}).then(res => {
if (res.code === 0) {
this.isShowForm = false
@@ -150,22 +162,6 @@
})
},
collection (id, isFavorite) {
this.$confirm(isFavorite === '0' ? '确定收藏该文章?' : '确定取消收藏?', '温馨提示', {
confirmButtonText: '确定',
callback: action => {
if (action === 'confirm') {
this.$http.post(isFavorite === '0' ? `/api/learning/addFavorite?id=${id}` : `/api/learning/delFavorite?id=${id}`).then(res => {
if (res.code === 0) {
this.$message.success(isFavorite === '1' ? '取消成功' : '收藏成功')
this.getList()
}
})
}
}
})
},
getQRCodeUrl () {
this.$http.post('/api/malluser/getQRCodeUrl').then(res => {
if (res.code === 0) {
@@ -186,6 +182,17 @@
this.total = res.data.length
}
})
},
mallChange() {
console.log(this.form.mallId)
if (!this.form.mallId) {
this.form.mallName = ''
return
}
let mallInfo = this.$store.state.mallList.filter(item => {
return item.mallId == this.form.mallId
})
this.form.mallName = mallInfo[0].mallName
}
}
}