From d8bbfbf984aba64d3826968f5f692c4916965b3f Mon Sep 17 00:00:00 2001 From: Eddie <102564160@qq.com> Date: Thu, 12 Aug 2021 14:59:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member-management.js | 27 +++ src/api/sort-management.js | 18 ++ src/components/ActionButton/index.vue | 32 ++-- .../components/delete-dialog.vue | 115 +++++++++++++ .../components/memberDialog.vue | 138 ++++++++------- .../otherSettingsDialog.vue | 114 +++++++------ src/views/member-management/index.vue | 137 +++++++++++++-- .../components/check-books-dialog.vue | 2 +- src/views/sort-management/index.vue | 159 +++++++++++------- 9 files changed, 539 insertions(+), 203 deletions(-) create mode 100644 src/api/member-management.js create mode 100644 src/api/sort-management.js create mode 100644 src/views/member-management/components/delete-dialog.vue diff --git a/src/api/member-management.js b/src/api/member-management.js new file mode 100644 index 0000000..cbb4350 --- /dev/null +++ b/src/api/member-management.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function getUserList(params) { + return request({ + url: 'user/list', + method: 'get', + params: params + }) +} + + +export function getUserDelete(id) { + return request({ + url: `user/delete/${id}`, + method: 'DELETE', + }) +} + + + +export function getUserUpdate(id, params) { + return request({ + url: `user/update/${id}`, + method: 'PUT', + params: params, + }) +} diff --git a/src/api/sort-management.js b/src/api/sort-management.js new file mode 100644 index 0000000..e29a763 --- /dev/null +++ b/src/api/sort-management.js @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +export function getPlatformList() { + return request({ + url: 'platform/index', + method: 'get' + }) +} + + +export function getCategoryList(params) { + return request({ + url: 'category/index', + method: 'get', + params: params + }) +} + diff --git a/src/components/ActionButton/index.vue b/src/components/ActionButton/index.vue index 038d419..4683c28 100644 --- a/src/components/ActionButton/index.vue +++ b/src/components/ActionButton/index.vue @@ -38,7 +38,6 @@ {{ textBtn2 }} - {{ textBtn4 }} - - - - - + + - - 黄金糕 - 狮子头 - 螺蛳粉 - 双皮奶 - 蚵仔煎 + + + + {{ item.name }} + - - @@ -136,6 +130,10 @@ export default { type: String, default: "mini", }, + dropdownData: { + type: Array, + default: ()=> [] + }, // 按钮1 openBtn1: { type: Boolean, @@ -301,8 +299,10 @@ export default { handleButton4() { this.$emit("handle-button4"); }, - handleButton5() { - this.$emit("handle-button5"); + handleButton5() {}, + + onCommand(data) { + this.$emit("handle-button5", data); }, }, }; diff --git a/src/views/member-management/components/delete-dialog.vue b/src/views/member-management/components/delete-dialog.vue new file mode 100644 index 0000000..616ae1b --- /dev/null +++ b/src/views/member-management/components/delete-dialog.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/src/views/member-management/components/memberDialog.vue b/src/views/member-management/components/memberDialog.vue index 6e8718b..92f9350 100644 --- a/src/views/member-management/components/memberDialog.vue +++ b/src/views/member-management/components/memberDialog.vue @@ -21,30 +21,39 @@
avatar + avatar - +
- + - +
- + - +
- + - +
- +
- +
支付宝账号 - ****** - {{ selectItem.alipay_account || "-" }} + 更改绑定账号
-
+
钱包数据
余额变动 - 0.0000 - {{ + selectItem.balance || "0.00" + }} + 调整
积分变动 - 0.0000 - {{ + selectItem.integral || "0.00" + }} + 调整
@@ -132,7 +170,7 @@ @@ -174,6 +212,7 @@ export default { formData: {}, // 校验规则 rules: {}, + defaultAvatar: "./pic/default/default_avatar.png", // isOtherSettings: false, @@ -181,24 +220,12 @@ export default { options: [ { - value: "选项1", - label: "黄金糕", - }, - { - value: "选项2", - label: "双皮奶", + value: 1, + label: "正常", }, { - value: "选项3", - label: "蚵仔煎", - }, - { - value: "选项4", - label: "龙须面", - }, - { - value: "选项5", - label: "北京烤鸭", + value: -1, + label: "不正常", }, ], value: "", @@ -216,21 +243,15 @@ export default { handleClose() { this.$emit("handle-close"); }, - // 提交弹窗 - handleSuccess() { - this.$emit("handle-success"); - }, + // 初始化弹窗参数 initDataView() { console.log("初始化弹窗参数"); }, // 提交表单 submitForm() { - this.$refs.formData.validate((valid) => { - if (valid && this.customValidate()) { - console.log("提交表单"); - } - }); + this.$emit("handle-success"); + }, customValidate() { let rlt = true; @@ -239,19 +260,18 @@ export default { }, // 自定义邀请码 - setInvitation(title){ - - this.othoerItem = { - title: title, - data: [] - } - this.isOtherSettings = true + setInvitation(title) { + this.othoerItem = { + title: title, + data: [], + }; + this.isOtherSettings = true; }, - OtherClose(){ - console.log(123) - this.isOtherSettings = false - } + OtherClose() { + console.log(123); + this.isOtherSettings = false; + }, }, }; diff --git a/src/views/member-management/components/otherSettingsDialog/otherSettingsDialog.vue b/src/views/member-management/components/otherSettingsDialog/otherSettingsDialog.vue index 885495e..0bbace9 100644 --- a/src/views/member-management/components/otherSettingsDialog/otherSettingsDialog.vue +++ b/src/views/member-management/components/otherSettingsDialog/otherSettingsDialog.vue @@ -10,14 +10,21 @@
- 15326713918 - - + avatar + {{ + selectItem.mobile + }} + - + - - - + + - - - + + - - - - - - - + +
@@ -79,7 +95,7 @@ export default { }, // 选中的数据 selectItem: { - type: Array, + type: Object, default: () => {}, }, dialogTitle: { @@ -89,9 +105,7 @@ export default { }, }, }, - mounted(){ - console.log(this.selectItem) - }, + mounted() {}, data() { return { // dialog样式 @@ -105,27 +119,16 @@ export default { formData: {}, // 校验规则 rules: {}, + defaultAvatar: "./pic/default/default_avatar.png", options: [ { - value: "选项1", - label: "黄金糕", - }, - { - value: "选项2", - label: "双皮奶", - }, - { - value: "选项3", - label: "蚵仔煎", - }, - { - value: "选项4", - label: "龙须面", + value: 1, + label: "正常", }, { - value: "选项5", - label: "北京烤鸭", + value: -1, + label: "不正常", }, ], value: "", @@ -141,7 +144,6 @@ export default { methods: { // 关闭弹窗 handleClose() { - console.log(123) this.$emit("handle-close"); }, // 提交弹窗 @@ -151,14 +153,30 @@ export default { // 初始化弹窗参数 initDataView() { console.log("初始化弹窗参数"); + + this.formData = JSON.parse(JSON.stringify(this.selectItem)); }, // 提交表单 submitForm() { - this.$refs.formData.validate((valid) => { - if (valid && this.customValidate()) { - console.log("提交表单"); - } - }); + if (this.dialogTitle === "修改绑定的支付宝") { + this.selectItem.alipay_account = this.formData.alipay_account; + this.handleClose(); + return; + } + + if (this.dialogTitle === "调整余额") { + this.selectItem.balance = this.formData.balance; + this.handleClose(); + return; + } + + if (this.dialogTitle === "调整积分") { + this.selectItem.integral = this.formData.integral; + this.handleClose(); + return; + } + + console.log(this.dialogTitle); }, customValidate() { let rlt = true; diff --git a/src/views/member-management/index.vue b/src/views/member-management/index.vue index 1f7556d..c742dc3 100644 --- a/src/views/member-management/index.vue +++ b/src/views/member-management/index.vue @@ -29,26 +29,57 @@
- + - - - - - - + + + + + + + + + + diff --git a/src/views/sort-management/components/check-books-dialog.vue b/src/views/sort-management/components/check-books-dialog.vue index d1de267..9850181 100644 --- a/src/views/sort-management/components/check-books-dialog.vue +++ b/src/views/sort-management/components/check-books-dialog.vue @@ -148,7 +148,7 @@ export default { '--title-height': '51px' }, dialogTitle: '查看书籍', - dialogSubTitle: '笔趣谷', + dialogSubTitle: '笔趣阁', isSearchVisible: true, // 表格数据 tableData: [ diff --git a/src/views/sort-management/index.vue b/src/views/sort-management/index.vue index 5276e6b..1bc4c5b 100644 --- a/src/views/sort-management/index.vue +++ b/src/views/sort-management/index.vue @@ -5,43 +5,24 @@ :open-btn1="true" :text-btn1="'新增分类'" :open-btn5="true" - :text-btn5="'书源'" + :text-btn5="btn5Data.name" :type-btn5="'warning'" :icon-btn5="'el-icon-tickets'" + @handle-button5="handleButton5" @handle-refresh="refreshData" @handle-button1="openEditDialog(null)" + :dropdownData="dropdownData" />
- - - - - - + + + + + + + +