diff --git a/package.json b/package.json index 6a46cc5..36a268a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "若依", "license": "MIT", "scripts": { - "dev": "vue-cli-service serve", + "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", diff --git a/src/api/product/attributeGroup.js b/src/api/product/attributeGroup.js index 22544a2..85c94e5 100644 --- a/src/api/product/attributeGroup.js +++ b/src/api/product/attributeGroup.js @@ -42,3 +42,11 @@ export function delAttributeGroup(id) { method: 'delete' }) } + + +export function updateAttributeGroupState(id,states) { + return request({ + url: '/product/attributeGroup/'+id+ '/' + states , + method: 'put', + }) +} diff --git a/src/api/product/buy.js b/src/api/product/buy.js new file mode 100644 index 0000000..01117d6 --- /dev/null +++ b/src/api/product/buy.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询拼团列表 +export function listBuy(query) { + return request({ + url: '/product/buy/list', + method: 'get', + params: query + }) +} + +// 查询拼团详细 +export function getBuy(id) { + return request({ + url: '/product/buy/' + id, + method: 'get' + }) +} + +// 新增拼团 +export function addBuy(data) { + return request({ + url: '/product/buy', + method: 'post', + data: data + }) +} + +// 修改拼团 +export function updateBuy(data) { + return request({ + url: '/product/buy/'+data.id, + method: 'put', + data: data + }) +} + +// 删除拼团 +export function delBuy(id) { + return request({ + url: '/product/buy/' + id, + method: 'delete' + }) +} diff --git a/src/api/product/category.js b/src/api/product/category.js index fade048..ae4c349 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -50,6 +50,14 @@ export function updateCategory(data) { }) } +export function updateCateStates(id,start) { + return request({ + url: '/product/category/'+id + '/' + start, + method: 'put', + }) +} + + // 删除品类信息 export function delCategory(id) { return request({ diff --git a/src/api/product/rule.js b/src/api/product/rule.js index f2de650..f687f26 100644 --- a/src/api/product/rule.js +++ b/src/api/product/rule.js @@ -34,7 +34,12 @@ export function updateRule(data) { data: data }) } - +export function updateStatusRule(id,status) { + return request({ + url: '/product/rule/'+id + '/' + status, + method: 'put', + }) +} // 删除商品规格 export function delRule(id) { return request({ diff --git a/src/views/product/attributeGroup/index.vue b/src/views/product/attributeGroup/index.vue index 4a3b7df..a33708e 100644 --- a/src/views/product/attributeGroup/index.vue +++ b/src/views/product/attributeGroup/index.vue @@ -83,7 +83,16 @@ @@ -141,7 +150,7 @@ - +