icssoa vor 6 Jahren
Ursprung
Commit
0cbab0dbb5

+ 14 - 0
admin-update/src/service/common/index.js

@@ -221,6 +221,20 @@ export class CommonService extends BaseService {
 			url: '/usage/list'
 		});
 	}
+
+	updateRemind(params) {
+		return this.request({
+			url: '/admin/update-remind',
+			params
+		});
+	}
+
+	updateStatus(params) {
+		return this.request({
+			url: '/admin/update-status',
+			params
+		});
+	}
 }
 
 export default new CommonService();

+ 21 - 13
admin-update/src/views/member/list.vue

@@ -23,11 +23,10 @@
 					:src="scope.row.smallAvatarUrl"
 					:style="{ margin: 'auto' }"
 				></cl-avatar>
-
 			</template>
 
 			<template #table-column-id="{scope}">
-				<span >{{ scope.row.id }}</span>
+				<span>{{ scope.row.id }}</span>
 			</template>
 
 			<template #table-column-mobile="{scope}">
@@ -36,8 +35,12 @@
 			</template>
 
 			<template #table-column-userName="{scope}">
-
-				<el-link :underline="false" @click="detailShowFn(scope.row)" style="font-size:12px;">{{ scope.row.userName}}</el-link>
+				<el-link
+					:underline="false"
+					@click="detailShowFn(scope.row)"
+					style="font-size:12px;"
+					>{{ scope.row.userName }}</el-link
+				>
 			</template>
 
 			<template #table-column-balance="{scope}">
@@ -49,12 +52,12 @@
 			</template>
 
 			<template #table-column-subscribe="{scope}">
-					<i
-						class="el-icon-success"
-						v-if="scope.row.subscribe == 1"
-						style="color:#67C23A;font-size:19px;"
-					></i>
-					<i class="el-icon-success" v-else style="color:#C0C4CC;font-size:19px;"></i>
+				<i
+					class="el-icon-success"
+					v-if="scope.row.subscribe == 1"
+					style="color:#67C23A;font-size:19px;"
+				></i>
+				<i class="el-icon-success" v-else style="color:#C0C4CC;font-size:19px;"></i>
 			</template>
 
 			<template #table-column-store="{scope}">
@@ -76,11 +79,15 @@
 
 			<!-- 充值 -->
 			<template #slot-recharge="{scope}">
-				<el-button type="text" @click="rechargeShowFn(scope.row)">充值</el-button>
+				<el-button type="text" size="mini" @click="rechargeShowFn(scope.row)"
+					>充值</el-button
+				>
 			</template>
 			<!-- 升级 -->
 			<template #slot-upgrade="{scope}">
-				<el-button type="text" @click="upgradeShowFn(scope.row)">升级</el-button>
+				<el-button type="text" size="mini" @click="upgradeShowFn(scope.row)"
+					>升级</el-button
+				>
 			</template>
 
 			<!-- 发货 -->
@@ -363,7 +370,8 @@ export default {
 						{
 							prop: 'visitTimeFormat',
 							label: '最近访问',
-							align: 'center'
+							align: 'center',
+							width: 140
 						}
 					],
 					// 操作列

+ 34 - 21
admin-update/src/views/staff/list.vue

@@ -2,30 +2,32 @@
 	<div class="app-list-content">
 		<cl-crud class="liu-crud-wrap" @load="onLoad">
 			<template #table-column-userId="{scope}">
-
-                <i
-                    class="el-icon-success"
-                    v-if="scope.row.userId != 0"
-                    style="color:#67C23A;font-size:19px;"
-                ></i>
-                <i class="el-icon-success" v-else style="color:#C0C4CC;font-size:19px;"></i>
-
+				<i
+					class="el-icon-success"
+					v-if="scope.row.userId != 0"
+					style="color:#67C23A;font-size:19px;"
+				></i>
+				<i class="el-icon-success" v-else style="color:#C0C4CC;font-size:19px;"></i>
 			</template>
 			<template #table-column-avatar="{scope}">
-                <cl-avatar
-                    shape="circle"
-                    :size="24"
-                    :src="scope.row.avatarUrl"
-                    :style="{ margin: 'auto' }"
-                ></cl-avatar>
-            </template>
+				<cl-avatar
+					shape="circle"
+					:size="24"
+					:src="scope.row.avatarUrl"
+					:style="{ margin: 'auto' }"
+				></cl-avatar>
+			</template>
 
 			<template #table-column-incomeNotice="{scope}">
 				<el-switch
-					v-model="scope.row.incomeNotice"
+					v-model="scope.row.remind"
 					active-value="1"
 					inactive-value="0"
-					@change="changeNotice(scope.row)"
+					@change="
+						v => {
+							changeNotice(scope.row.id, v);
+						}
+					"
 				></el-switch>
 			</template>
 
@@ -34,7 +36,11 @@
 					v-model="scope.row.status"
 					active-value="1"
 					inactive-value="0"
-					@change="changeStatus(scope.row)"
+					@change="
+						v => {
+							changeStatus(scope.row.id, v);
+						}
+					"
 				></el-switch>
 			</template>
 
@@ -302,10 +308,17 @@ export default {
 			this.ruleForm.password.required = true;
 		},
 		// 切换收款通知
-		changeNotice(item) {},
-		changeStatus(item) {
-			this.$service.staff.updateStatus({ id: item.id, status: item.status }).then(res => {
+		changeNotice(id, val) {
+			this.$service.common.updateRemind({ id, remind: val }).then(res => {
+				this.$message.success('操作成功!');
+				this.app.refresh();
+			});
+		},
+		// 启用状态
+		changeStatus(id, val) {
+			this.$service.common.updateStatus({ id, status: val }).then(res => {
 				this.$message.success('操作成功!');
+				this.app.refresh();
 			});
 		},
 		// dialog