|
@@ -41,9 +41,9 @@
|
41
|
41
|
<div class="flex">
|
42
|
42
|
<!-- S 禁用 -->
|
43
|
43
|
<el-popconfirm
|
44
|
|
- @confirm="forbiddenCode(row.id)"
|
|
44
|
+ @confirm="handleDelCode(row.id)"
|
45
|
45
|
:disabled="row.status!==1"
|
46
|
|
- :title="`禁用【${row.name}】渠道活码后,将无法启用,是否还要继续?`"
|
|
46
|
+ :title="`禁用【${row.name}】渠道群活码后,将无法启用,是否还要继续?`"
|
47
|
47
|
>
|
48
|
48
|
<div slot="reference" :class="row.status==1 ? 'c-00B38A pointer' : 'c-999 pointer-drop'">禁用</div>
|
49
|
49
|
</el-popconfirm>
|
|
@@ -174,23 +174,21 @@ export default {
|
174
|
174
|
})
|
175
|
175
|
},
|
176
|
176
|
// 禁用
|
177
|
|
- forbiddenCode(id){
|
178
|
|
- this.loading = true
|
179
|
|
- this.$axios.post(this.URL.BASEURL + this.URL.channel_code_forbidden, {
|
180
|
|
- id:id
|
181
|
|
- }).then((res) => {
|
182
|
|
- var res = res.data
|
183
|
|
- this.loading = false
|
184
|
|
- this.$message({
|
185
|
|
- message: res.err,
|
186
|
|
- type: "warning"
|
|
177
|
+ async handleDelCode(rule_id) {
|
|
178
|
+ try {
|
|
179
|
+ this.loading = true
|
|
180
|
+ const { data: res = {} } = await this.$axios.get(this.URL.BASEURL + this.URL.groupCode_delQrcode, {
|
|
181
|
+ params: { rule_id }
|
187
|
182
|
})
|
188
|
183
|
if (res && res.errno == 0) {
|
189
|
|
- this.init(1)
|
|
184
|
+ this.$message.warning(res.err || '操作成功')
|
|
185
|
+ this.handleGetCodeList()
|
190
|
186
|
}
|
191
|
|
- }).catch((err) => {
|
|
187
|
+ } catch (error) {
|
|
188
|
+ console.log('error => ', error)
|
|
189
|
+ } finally {
|
192
|
190
|
this.loading = false
|
193
|
|
- });
|
|
191
|
+ }
|
194
|
192
|
},
|
195
|
193
|
// 编辑
|
196
|
194
|
editCode(id){
|