diff --git a/src/view/Message.vue b/src/view/Message.vue index 95882b3..cbf6c2d 100644 --- a/src/view/Message.vue +++ b/src/view/Message.vue @@ -34,7 +34,7 @@ @@ -53,7 +53,7 @@ + + + + + + @@ -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 } } }