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 @@ + + + + +