From 04f9f7ecdf66617ecffdf8b529943d3ef1f2a55d Mon Sep 17 00:00:00 2001 From: zhh Date: Mon, 19 Nov 2018 16:11:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E6=97=B6=E8=B4=AD=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/flashProductRelation.js | 28 ++ src/api/flashSession.js | 45 ++- src/router/index.js | 14 + src/views/sms/flash/index.vue | 5 +- src/views/sms/flash/productRelationList.vue | 311 ++++++++++++++++++++ src/views/sms/flash/selectSessionList.vue | 83 ++++++ 6 files changed, 469 insertions(+), 17 deletions(-) create mode 100644 src/api/flashProductRelation.js create mode 100644 src/views/sms/flash/productRelationList.vue create mode 100644 src/views/sms/flash/selectSessionList.vue diff --git a/src/api/flashProductRelation.js b/src/api/flashProductRelation.js new file mode 100644 index 00000000..0e739d59 --- /dev/null +++ b/src/api/flashProductRelation.js @@ -0,0 +1,28 @@ +import request from '@/utils/request' +export function fetchList(params) { + return request({ + url:'/flashProductRelation/list', + method:'get', + params:params + }) +} +export function createFlashProductRelation(data) { + return request({ + url:'/flashProductRelation/create', + method:'post', + data:data + }) +} +export function deleteFlashProductRelation(id) { + return request({ + url:'/flashProductRelation/delete/'+id, + method:'post' + }) +} +export function updateFlashProductRelation(id,data) { + return request({ + url:'/flashProductRelation/update/'+id, + method:'post', + data:data + }) +} diff --git a/src/api/flashSession.js b/src/api/flashSession.js index 3c832045..2349f895 100644 --- a/src/api/flashSession.js +++ b/src/api/flashSession.js @@ -1,35 +1,48 @@ import request from '@/utils/request' + export function fetchList(params) { return request({ - url:'/flashSession/list', - method:'get', - params:params + url: '/flashSession/list', + method: 'get', + params: params }) } -export function updateStatus(id,params) { + +export function fetchSelectList(params) { return request({ - url:'/flashSession/update/status/'+id, - method:'post', - params:params + url: '/flashSession/selectList', + 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' + url: '/flashSession/delete/' + id, + method: 'post' }) } + export function createSession(data) { return request({ - url:'/flashSession/create', - method:'post', - data:data + url: '/flashSession/create', + method: 'post', + data: data }) } -export function updateSession(id,data) { + +export function updateSession(id, data) { return request({ - url:'/flashSession/update/'+id, - method:'post', - data:data + url: '/flashSession/update/' + id, + method: 'post', + data: data }) } diff --git a/src/router/index.js b/src/router/index.js index 4a54451d..3bda3df1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -214,6 +214,20 @@ export const constantRouterMap = [ meta: {title: '秒杀时间段列表'}, hidden:true }, + { + path: 'selectSession', + name: 'selectSession', + component: () => import('@/views/sms/flash/selectSessionList'), + meta: {title: '秒杀时间段选择'}, + hidden:true + }, + { + path: 'flashProductRelation', + name: 'flashProductRelation', + component: () => import('@/views/sms/flash/productRelationList'), + 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 670bfe96..fd4b3db2 100644 --- a/src/views/sms/flash/index.vue +++ b/src/views/sms/flash/index.vue @@ -67,7 +67,7 @@