diff --git a/src/api/yxStoreBargain.js b/src/api/yxStoreBargain.js new file mode 100644 index 0000000..7892430 --- /dev/null +++ b/src/api/yxStoreBargain.js @@ -0,0 +1,24 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/yxStoreBargain', + method: 'post', + data + }) +} + +export function del(id) { + return request({ + url: 'api/yxStoreBargain/' + id, + method: 'delete' + }) +} + +export function edit(data) { + return request({ + url: 'api/yxStoreBargain', + method: 'put', + data + }) +} diff --git a/src/views/activity/bargain/form.vue b/src/views/activity/bargain/form.vue new file mode 100644 index 0000000..af01830 --- /dev/null +++ b/src/views/activity/bargain/form.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/src/views/activity/bargain/index.vue b/src/views/activity/bargain/index.vue new file mode 100644 index 0000000..f6ceca5 --- /dev/null +++ b/src/views/activity/bargain/index.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/src/views/shop/goods/index.vue b/src/views/shop/goods/index.vue index 52f846d..3ad4331 100644 --- a/src/views/shop/goods/index.vue +++ b/src/views/shop/goods/index.vue @@ -24,6 +24,7 @@ + @@ -71,12 +72,16 @@ 开启拼团 + type="success" @click="editC(scope.row)">开启拼团 - 开启秒杀 + + 开启砍价 + @@ -101,8 +106,9 @@ import eForm from './form' import eAttr from './attr' import comForm from '@/views/activity/combination/form' import killForm from '@/views/activity/seckill/form' +import bargainForm from '@/views/activity/bargain/form' export default { - components: { eForm, eAttr, comForm, killForm }, + components: { eForm, eAttr, comForm, killForm, bargainForm }, mixins: [initData], data() { return { @@ -279,6 +285,38 @@ export default { } _this.dialog = true }, + editE(data) { + this.isAdd = false + const _this = this.$refs.form5 + _this.form = { + productId: data.id, + merId: data.merId, + image: data.image, + images: data.sliderImage, + title: data.storeName, + info: data.storeInfo, + postage: data.postage, + unitName: data.unitName, + sort: data.sort, + sales: data.sales, + stock: data.stock, + isShow: data.isShow, + status: 1, + isHot: data.isHot, + description: data.description, + isPostage: data.isPostage, + people: 0, + price: 0.01, + effectiveTime: 24, + otPrice: data.otPrice, + cost: data.cost, + num: 1, + giveIntegral: 0, + isDel: 0, + browse: 0 + } + _this.dialog = true + }, attr(data) { console.log(3333) this.isAttr = false