Skip to content

Commit

Permalink
限时购设置商品功能完善
Browse files Browse the repository at this point in the history
  • Loading branch information
zhh committed Nov 19, 2018
1 parent fc34f1b commit 04f9f7e
Show file tree
Hide file tree
Showing 6 changed files with 469 additions and 17 deletions.
28 changes: 28 additions & 0 deletions src/api/flashProductRelation.js
Original file line number Diff line number Diff line change
@@ -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
})
}
45 changes: 29 additions & 16 deletions src/api/flashSession.js
Original file line number Diff line number Diff line change
@@ -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
})
}
14 changes: 14 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 4 additions & 1 deletion src/views/sms/flash/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<template slot-scope="scope">
<el-button size="mini"
type="text"
@click="handleView(scope.$index, scope.row)">设置商品
@click="handleSelectSession(scope.$index, scope.row)">设置商品
</el-button>
<el-button size="mini"
type="text"
Expand Down Expand Up @@ -275,6 +275,9 @@
}
})
},
handleSelectSession(index,row){
this.$router.push({path:'/sms/selectSession',query:{flashPromotionId:row.id}})
},
getList() {
this.listLoading = true;
fetchList(this.listQuery).then(response => {
Expand Down
Loading

0 comments on commit 04f9f7e

Please sign in to comment.