rk
2026-04-28 a59ff44b2eaa7020f0529632d9ec064c4dc38e27
admin/src/views/business/memberList.vue
@@ -34,8 +34,15 @@
        <el-table-column prop="createTime" label="创建时间" min-width="160px"></el-table-column>
        <el-table-column label="状态" min-width="80px">
          <template slot-scope="{row}">
            {{ row.status === 0 ? '正常' : row.status === 1 ? '停用' : '已注销' }}
          </template>
              <el-switch
                  @change="handleStatusChange($event, row)"
                  v-model="row.status"
                  active-color="#13ce66"
                  inactive-color="#ff4949"
                  :active-value="0"
                  :inactive-value="1"
              ></el-switch>
            </template>
        </el-table-column>
        <el-table-column label="操作" min-width="100" fixed="right">
          <template slot-scope="{row}">
@@ -99,6 +106,14 @@
    },
    handleDetail (row) {
      this.$refs.operaMemberDetailWindow.open('会员详情', row)
    },
    handleStatusChange (val, row) {
      this.api.updateStatus({ id: row.id, status: val }).then(res => {
        this.$tip.apiSuccess(res || '修改成功')
      }).catch(e => {
        row.status = val === 1 ? 0 : 1
        this.$tip.apiFailed(e)
      })
    }
  }
}