From fc34f1b6bb7d1731dad77658a23c4bc73883601b Mon Sep 17 00:00:00 2001 From: zhh Date: Mon, 19 Nov 2018 13:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E6=97=B6=E8=B4=AD=E5=9C=BA=E6=AC=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/flashSession.js | 35 +++++ src/router/index.js | 7 + src/views/sms/flash/index.vue | 6 +- src/views/sms/flash/sessionList.vue | 208 ++++++++++++++++++++++++++++ 4 files changed, 253 insertions(+), 3 deletions(-) create mode 100644 src/api/flashSession.js create mode 100644 src/views/sms/flash/sessionList.vue diff --git a/src/api/flashSession.js b/src/api/flashSession.js new file mode 100644 index 0000000..3c83204 --- /dev/null +++ b/src/api/flashSession.js @@ -0,0 +1,35 @@ +import request from '@/utils/request' +export function fetchList(params) { + return request({ + url:'/flashSession/list', + method:'get', + params:params + }) +} +export function updateStatus(id,params) { + return request({ + url:'/flashSession/update/status/'+id, + method:'post', + params:params + }) +} +export function deleteSession(id) { + return request({ + url:'/flashSession/delete/'+id, + method:'post' + }) +} +export function createSession(data) { + return request({ + url:'/flashSession/create', + method:'post', + data:data + }) +} +export function updateSession(id,data) { + return request({ + url:'/flashSession/update/'+id, + method:'post', + data:data + }) +} diff --git a/src/router/index.js b/src/router/index.js index 2c18d5e..4a54451 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -207,6 +207,13 @@ export const constantRouterMap = [ component: () => import('@/views/sms/flash/index'), meta: {title: '秒杀活动列表', icon: 'sms-flash'} }, + { + path: 'flashSession', + name: 'flashSession', + component: () => import('@/views/sms/flash/sessionList'), + meta: {title: '秒杀时间段列表'}, + hidden:true + }, { path: 'coupon', name: 'coupon', diff --git a/src/views/sms/flash/index.vue b/src/views/sms/flash/index.vue index 664ef84..670bfe9 100644 --- a/src/views/sms/flash/index.vue +++ b/src/views/sms/flash/index.vue @@ -181,7 +181,7 @@ } let date = new Date(time); return formatDate(date, 'yyyy-MM-dd') - }, + } }, methods: { handleResetSearch() { @@ -206,7 +206,7 @@ this.flashPromotion = Object.assign({},defaultFlashPromotion); }, handleShowSessionList() { - console.log("handleShowSessionList"); + this.$router.push({path: '/sms/flashSession'}) }, handleStatusChange(index, row) { this.$confirm('是否要修改该状态?', '提示', { @@ -246,7 +246,7 @@ handleUpdate(index, row) { this.dialogVisible = true; this.isEdit = true; - this.flashPromotion = row; + this.flashPromotion = Object.assign({},row); }, handleDialogConfirm() { this.$confirm('是否要确认?', '提示', { diff --git a/src/views/sms/flash/sessionList.vue b/src/views/sms/flash/sessionList.vue new file mode 100644 index 0000000..f032ed2 --- /dev/null +++ b/src/views/sms/flash/sessionList.vue @@ -0,0 +1,208 @@ + + + + +