From d2585cdd8b45285f0be709203be1c1870022efda Mon Sep 17 00:00:00 2001 From: xuwenbo <7175767226@qq.com> Date: Sun, 22 Dec 2019 13:34:25 +0800 Subject: [PATCH] =?UTF-8?q?YSHOP1.6=E6=96=B0=E5=A2=9E=E7=A0=8D=E4=BB=B7?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/yxStoreBargain.js | 24 +++ src/views/activity/bargain/form.vue | 242 +++++++++++++++++++++++++++ src/views/activity/bargain/index.vue | 168 +++++++++++++++++++ src/views/shop/goods/index.vue | 44 ++++- 4 files changed, 475 insertions(+), 3 deletions(-) create mode 100644 src/api/yxStoreBargain.js create mode 100644 src/views/activity/bargain/form.vue create mode 100644 src/views/activity/bargain/index.vue 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