From 6780654aae5c65aaeab218fd84cb71563831796e Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 28 May 2021 17:25:07 +0800 Subject: [PATCH] =?UTF-8?q?im=E5=AF=B9=E6=8E=A5=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/index.html | 2 +- buyer/src/components/coupon/Coupon.vue | 4 +- .../src/components/goodsDetail/ShowGoods.vue | 30 +------- buyer/src/components/header/ShopHeader.vue | 52 ++----------- buyer/src/components/nav/cateNav.vue | 75 +++++++++---------- buyer/src/config/index.js | 16 ++-- buyer/src/main.js | 4 + buyer/src/pages/GoodsDetail.vue | 35 ++++++--- buyer/src/pages/Merchant.vue | 5 +- seller/src/styles/common.scss | 3 - seller/src/styles/table-common.scss | 3 - seller/src/views/goods/goods-seller/goods.vue | 7 +- 12 files changed, 85 insertions(+), 151 deletions(-) diff --git a/buyer/index.html b/buyer/index.html index 13a70c4d..3b299f1a 100644 --- a/buyer/index.html +++ b/buyer/index.html @@ -4,7 +4,7 @@ - + LILI diff --git a/buyer/src/components/coupon/Coupon.vue b/buyer/src/components/coupon/Coupon.vue index f73aabe4..30055ed6 100644 --- a/buyer/src/components/coupon/Coupon.vue +++ b/buyer/src/components/coupon/Coupon.vue @@ -104,7 +104,7 @@ export default { diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 26cbbab2..871f9ecd 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -20,7 +20,7 @@
{{isCollected?'已收藏':'收藏'}} - +
@@ -60,7 +60,7 @@ :key="index" @click="receiveCoupon(item.id)" > - 满{{ item.consumeThreshold }}减{{item.price | unitPrice}} + 满{{ item.consumeThreshold }}减{{item.price}} 满{{ item.consumeThreshold }}打{{item.couponDiscount}}折

@@ -126,32 +126,6 @@ - - diff --git a/buyer/src/components/header/ShopHeader.vue b/buyer/src/components/header/ShopHeader.vue index 3d7ec3e6..0b2bda67 100644 --- a/buyer/src/components/header/ShopHeader.vue +++ b/buyer/src/components/header/ShopHeader.vue @@ -1,10 +1,10 @@ @@ -86,12 +84,12 @@ export default { } }, computed: { - navList () { + navList () { // 导航列表 return JSON.parse(storage.getItem('navList')) || [] } }, methods: { - getCate () { + getCate () { // 获取分类数据 getCategory(0).then(res => { if (res.success) { this.cateList = res.result; @@ -99,7 +97,7 @@ export default { } }); }, - showDetail (index) { + showDetail (index) { // 展示全部分类 this.panel = true this.panelData = this.cateList[index].children }, @@ -245,9 +243,6 @@ export default { .nav-detail-item span:hover { background-color: $theme_color; } -.detail-item-panel ul { - list-style: none; -} .detail-item-panel li { line-height: 30px; // margin-left: 40px; diff --git a/buyer/src/config/index.js b/buyer/src/config/index.js index a2cfb5f5..89602323 100644 --- a/buyer/src/config/index.js +++ b/buyer/src/config/index.js @@ -17,15 +17,15 @@ export default { * @description api请求基础路径 */ api_dev: { - // common: 'http://192.168.0.103:8890', - // buyer: 'http://192.168.0.103:8888', - // seller: 'http://192.168.0.103:8889', - // manager: 'http://192.168.0.103:8887' + common: 'http://192.168.0.109:8890', + buyer: 'http://192.168.0.109:8888', + seller: 'http://192.168.0.109:8889', + manager: 'http://192.168.0.109:8887' - common: 'https://common-api.pickmall.cn', - buyer: 'https://buyer-api.pickmall.cn', - seller: 'https://store-api.pickmall.cn', - manager: 'https://admin-api.pickmall.cn' + // common: 'https://common-api.pickmall.cn', + // buyer: 'https://buyer-api.pickmall.cn', + // seller: 'https://store-api.pickmall.cn', + // manager: 'https://admin-api.pickmall.cn' }, api_prod: { common: 'https://common-api.pickmall.cn', diff --git a/buyer/src/main.js b/buyer/src/main.js index c2274aa3..752532ae 100644 --- a/buyer/src/main.js +++ b/buyer/src/main.js @@ -37,6 +37,10 @@ Vue.prototype.linkTo = function (url) { window.open(url, '_blank') } } +Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') { // 联系客服 + const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign + window.open(url, '_blank') +} Vue.prototype.Cookies = storage /* eslint-disable no-new */ new Vue({ diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index 663bd301..773d4b50 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -3,7 +3,7 @@ - +
@@ -11,8 +11,9 @@ {{item.name}}
- {{goodsMsg.data.storeName}} + {{goodsMsg.data.storeName}} {{storeCollected?'已收藏店铺':'收藏店铺'}} + 联系客服
@@ -40,6 +41,7 @@ import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail'; import ShowLikeGoods from '@/components/like'; import { goodsSkuDetail } from '@/api/goods'; import { cancelCollect, collectGoods, isCollection } from '@/api/member'; +import {getDetailById} from '@/api/shopentry' export default { name: 'GoodsDetail', beforeRouteEnter (to, from, next) { @@ -48,20 +50,15 @@ export default { }, created () { this.getGoodsDetail(); - if (this.Cookies.getItem('userInfo')) { - isCollection('STORE', this.goodsMsg.data.storeId).then(res => { - if (res.success && res.result) { - this.storeCollected = true; - } - }) - } + }, data () { return { goodsMsg: {}, // 商品信息 isLoading: false, // 加载状态 categoryBar: [], // 分类 - storeCollected: false // 商品收藏 + storeCollected: false, // 商品收藏 + storeMsg: {} // 店铺信息 }; }, methods: { @@ -83,6 +80,20 @@ export default { }); this.categoryBar = cateArr; this.goodsMsg = res.result; + // 判断是否收藏 + if (this.Cookies.getItem('userInfo')) { + isCollection('STORE', this.goodsMsg.data.storeId).then(res => { + if (res.success && res.result) { + this.storeCollected = true; + } + }) + } + // 获取店铺信息 + getDetailById(this.goodsMsg.data.storeId).then(res => { + if (res.success) { + this.storeMsg = res.result + } + }) } else { this.$Message.error(res.message) this.$router.push('/') @@ -91,7 +102,7 @@ export default { this.$router.push('/') }); }, - goGoodsList (currIndex) { + goGoodsList (currIndex) { // 跳转商品列表 const arr = [] this.categoryBar.forEach((e, index) => { if (index <= currIndex) { @@ -132,7 +143,6 @@ export default { } }; -