From 31bd50111e8cf1e8476c80d8cae2df09aa30979b Mon Sep 17 00:00:00 2001 From: axlrose2333 <690927457@qq.com> Date: Fri, 17 Mar 2023 16:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E7=AB=9E=E6=8B=8D=EF=BC=8C?= =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common.js | 9 +- src/api/integral.js | 14 ++ src/api/market.js | 14 ++ src/utils/custom.js | 12 ++ src/view/auctionManage/index.vue | 50 ++++++- src/view/drawManage/index.vue | 45 +++++- src/view/marketManage/managerList/index.vue | 130 ++++++++++++++++-- .../managerList/managerDetail.vue | 4 +- src/view/userManage/view.vue | 4 +- 9 files changed, 258 insertions(+), 24 deletions(-) diff --git a/src/api/common.js b/src/api/common.js index df94a5b..f359507 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -10,6 +10,13 @@ const api = { method: 'POST', headers }) - } + }, + getUserList: data => { // 用户列表 + return service({ + url: '/user', + method: 'get', + params:data + }) + }, } export default api diff --git a/src/api/integral.js b/src/api/integral.js index 6ee24e0..23d9b14 100644 --- a/src/api/integral.js +++ b/src/api/integral.js @@ -65,5 +65,19 @@ const api = { data }) }, + auctionStateFunc: data => { // 竞拍 上级、下架 + return service({ + url: '/auction/push', + method: 'put', + data + }) + }, + drawStateFunc: data => { // 抽奖 上级、下架 + return service({ + url: '/lottery/push', + method: 'put', + data + }) + }, } export default api diff --git a/src/api/market.js b/src/api/market.js index 138c3a8..ba5be88 100644 --- a/src/api/market.js +++ b/src/api/market.js @@ -30,5 +30,19 @@ const api = { params:data }) }, + addManager: data => { // 添加主管 + return service({ + url: '/manager', + method: 'post', + data + }) + }, + delManager: data => { // 删除主管 + return service({ + url: '/manager', + method: 'delete', + data + }) + }, } export default api diff --git a/src/utils/custom.js b/src/utils/custom.js index 38702cf..e9177a4 100644 --- a/src/utils/custom.js +++ b/src/utils/custom.js @@ -110,6 +110,18 @@ const custom = { // console.log(date) return date }, + timestampToDate2(stamp) { // 时间戳转日期 精确到秒 + var time = new Date(stamp); + var y = time.getFullYear(); + var m = time.getMonth()+1; + var d = time.getDate(); + var h = time.getHours(); + var min = time.getMinutes(); + var s = time.getSeconds(); + const date = `${y}-${m}-${d} ${h}:${min}:${s}` + // console.log(date) + return date + }, getSTdPerson(num) { const flag = 10000 if(num { + console.log(action) + if(action === 'confirm') { + const res = await api.auctionStateFunc({id:row.id,status:type}) + if(res.code === 0) { + ElMessage({ + type: 'success', + message: `修改成功`, + }) + getAuctionList() + } + } + }, + }) +} @@ -403,9 +443,9 @@ function fileChange(index) { - - - + + +