ソースを参照

chore[litemall-vue]: 删除客服组件

Junling Bu 6 年 前
コミット
8f2890f87a

BIN
litemall-vue/src/assets/images/qc_code.png


+ 262 - 274
litemall-vue/src/views/items/detail/index.vue

@@ -1,274 +1,262 @@
-<template>
-  <div class="item_detail">
-    <van-swipe :autoplay="3000">
-      <van-swipe-item v-for="(image, index) in itemImgs" :key="index">
-        <!-- <img v-lazy="image" width="100%"> -->
-        <img :src="image" width="100%">
-      </van-swipe-item>
-    </van-swipe>
-    <van-cell-group class="item_cell_group" v-if="goods">
-      <van-cell class="item_info">
-        <div>
-          <span class="item_price">{{ goods.retailPrice*100 | yuan }}</span>
-          <span class="item_market_price">{{goods.counterPrice*100 | yuan}}</span>
-        </div>
-        <div class="item-title">
-          <!-- <van-tag plain type="danger" v-if="goods.is_haitao">海淘</van-tag> -->
-          {{ goods.name }}
-        </div>
-        <!-- <div class="item_intro">{{goods.sell_point}}</div> ???-->
-        <!-- <div class="item_dispatch">发货地: {{}}</div> -->
-      </van-cell>
-    </van-cell-group>
-
-    <component
-      v-if="goods"
-      ref="goodAction"
-      v-bind:is="'entity-group'"
-      :selectSku.sync="selectSku"
-      :addressVal.sync="addressVal"
-      :mobile="mobile"
-      :goods-info="goods"
-      @skuBuy="doBuyNow"
-      @cart-count="cartEvent"
-    />
-
-    <div class="item_desc" v-if="goods">
-      <div class="item_desc_title">商品详情</div>
-      <div class="item_desc_wrap" v-if="goods.detail.length === 0" style="padding-left: 170px;">
-        <p>无详情</p>
-      </div>
-      <div class="item_desc_wrap" v-html="goods.detail"></div>
-    </div>
-
-    <van-goods-action>
-      <!-- <van-goods-action-mini-btn @click="doContact" icon="wangwang" iconClass="red afterTag"/> -->
-      <van-goods-action-mini-btn @click="toCart" icon="cart" :info="cartInfo"/>
-      <van-goods-action-mini-btn
-        :style="collectAdd ? 'color: #f7b444;':''"
-        @click="addCollect"
-        icon="shoucang"
-      />
-      <van-goods-action-big-btn @click="openSku('cart')" text="加入购物车"/>
-      <van-goods-action-big-btn primary @click="openSku('buy')" text="立即购买"/>
-    </van-goods-action>
-
-    <van-popup v-model="showContact">
-      <md-kefu mobile="16454193338"/>
-    </van-popup>
-  </div>
-</template>
-
-<script>
-import { GOODS_DETAIL } from '@/api/goods';
-
-import {
-  Swipe,
-  SwipeItem,
-  GoodsAction,
-  GoodsActionBigBtn,
-  GoodsActionMiniBtn,
-  Popup
-} from 'vant';
-
-import md_kefu from '@/vue/components/md-kefu/';
-
-export default {
-  props: {
-    itemId: [String, Number]
-  },
-
-  data() {
-    const isLogin = !!localStorage.getItem('Authorization');
-    return {
-      isLogin,
-      itemImgs: [],
-      collectAdd: false,
-      showContact: false,
-      cartInfo: '0',
-      mobile: '13454193338',
-      selectSku: {
-        selectedNum: 1,
-        selectedSkuComb: {}
-      },
-      addressVal: {
-        id: null,
-        area_name: '',
-        district: '',
-        city: '',
-        province: ''
-      },
-      goods: null,
-      productList: []
-    };
-  },
-
-  computed: {
-    // itemImgs() {
-    //   debugger;
-    //   return this.goods.info.gallery;
-    // }
-  },
-
-  created() {
-    this.initData();
-  },
-
-  methods: {
-    async initData() {
-      // let a = this.$route.params.itemId;
-      this.$reqGet(`/wx/goods/detail?id=${this.itemId}`).then(
-        res => {
-          this.goods = res.data.data.info;
-          this.goods.attribute = res.data.data.attribute;
-          this.goods.specificationList = res.data.data.specificationList;
-          this.goods.productList = res.data.data.productList;
-          this.productList = res.data.data.productList;
-          this.itemImgs = res.data.data.info.gallery || [];
-          this.collectAdd = res.data.data.userHasCollect === 1;
-        }
-      );
-
-      let { data } = await this.$reqGet('/wx/cart/goodscount');
-      this.cartInfo = data.data;
-
-      // this.$reqGet(GOODS_DETAIL).then(res => {
-      //   this.goods = res.data.data;
-      // });
-    },
-    openSku(status) {
-      const goodAction = this.$refs.goodAction;
-      goodAction.skuClick(status);
-    },
-    cartEvent(count) {
-      this.cartInfo = ~~this.cartInfo + ~~count + '';
-    },
-    doBuyNow() {
-      // if (
-      //   (this.goods.has_sku && this.selectSku.sku_id) ||
-      //   !this.goods.has_sku
-      // ) {
-      //   this.$router.push({ name: 'placeOrderEntity' });
-      // } else {
-      //   const goodAction = this.$refs.goodAction;
-      //   goodAction.showSku = true;
-      //   goodAction.isSkuBuy = true;
-      // }
-    },
-    addCart() {
-      // debugger;
-      // if (this.goods.has_sku && this.selectSku.sku_id) {
-      // this.$reqPost('/wx/cart/add', {
-      //   goodsId: this.itemId,
-      //   number: 1
-      // }).then(() => {
-      //   this.$toast({
-      //     message: '已添加至购物车',
-      //     duration: 1500
-      //   });
-      //   this.cartInfo = String(parseInt(this.cartInfo) + 1);
-      // });
-      // }
-    },
-    doContact() {
-      this.showContact = true;
-    },
-    toCart() {
-      this.$router.push({
-        name: 'cart'
-      });
-    },
-    async addCollect() {
-      let { data } = await this.$reqPost(
-        '/wx/collect/addordelete',
-        {
-          valueId: this.itemId,
-          type: 0
-        }
-      );
-      let type = data.data.type;
-      this.collectAdd = type === 'add' ? true : false;
-      this.$toast({
-        message: this.collectAdd ? '添加成功' : '取消成功',
-        duration: 1500
-      });
-    }
-  },
-
-  components: {
-    [md_kefu.name]: md_kefu,
-    [Popup.name]: Popup,
-    [Swipe.name]: Swipe,
-    [SwipeItem.name]: SwipeItem,
-    [GoodsAction.name]: GoodsAction,
-    [GoodsActionBigBtn.name]: GoodsActionBigBtn,
-    [GoodsActionMiniBtn.name]: GoodsActionMiniBtn,
-    'entity-group': () =>
-      import(/* webpackChunkName: "EntityGroup" */ './EntityGroup/index'),
-    'virtual-group': () =>
-      import(/* webpackChunkName: "VirtualGroup" */ './VirtualGroup/index.vue')
-  }
-};
-</script>
-
-<style lang="scss" scoped>
-.item_detail {
-  img {
-    max-width: 100%;
-  }
-}
-
-.item_cell_group {
-  margin-bottom: 15px;
-}
-
-.item_price {
-  font-size: 20px;
-  color: $red;
-  margin-right: 10px;
-}
-
-.item_market_price {
-  color: $font-color-gray;
-  text-decoration: line-through;
-  font-size: $font-size-small;
-}
-
-.item-title {
-  line-height: 1.4;
-}
-
-.item_dispatch {
-  font-size: $font-size-small;
-  color: $font-color-gray;
-}
-
-.item_intro {
-  line-height: 18px;
-  margin: 5px 0;
-  font-size: $font-size-small;
-  color: $font-color-gray;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 3;
-}
-
-.item_desc {
-  background-color: #fff;
-  p {
-    padding: 0 10px;
-  }
-  /deep/ img {
-    max-width: 100%;
-    display: block;
-  }
-}
-
-.item_desc_title {
-  @include one-border;
-  padding: 10px 0;
-  text-align: center;
-}
-</style>
+<template>
+  <div class="item_detail">
+    <van-swipe :autoplay="3000">
+      <van-swipe-item v-for="(image, index) in itemImgs" :key="index">
+        <!-- <img v-lazy="image" width="100%"> -->
+        <img :src="image" width="100%">
+      </van-swipe-item>
+    </van-swipe>
+    <van-cell-group class="item_cell_group" v-if="goods">
+      <van-cell class="item_info">
+        <div>
+          <span class="item_price">{{ goods.retailPrice*100 | yuan }}</span>
+          <span class="item_market_price">{{goods.counterPrice*100 | yuan}}</span>
+        </div>
+        <div class="item-title">
+          <!-- <van-tag plain type="danger" v-if="goods.is_haitao">海淘</van-tag> -->
+          {{ goods.name }}
+        </div>
+        <!-- <div class="item_intro">{{goods.sell_point}}</div> ???-->
+        <!-- <div class="item_dispatch">发货地: {{}}</div> -->
+      </van-cell>
+    </van-cell-group>
+
+    <component
+      v-if="goods"
+      ref="goodAction"
+      v-bind:is="'entity-group'"
+      :selectSku.sync="selectSku"
+      :addressVal.sync="addressVal"
+      :mobile="mobile"
+      :goods-info="goods"
+      @skuBuy="doBuyNow"
+      @cart-count="cartEvent"
+    />
+
+    <div class="item_desc" v-if="goods">
+      <div class="item_desc_title">商品详情</div>
+      <div class="item_desc_wrap" v-if="goods.detail.length === 0" style="padding-left: 170px;">
+        <p>无详情</p>
+      </div>
+      <div class="item_desc_wrap" v-html="goods.detail"></div>
+    </div>
+
+    <van-goods-action>
+      <van-goods-action-mini-btn @click="toCart" icon="cart" :info="cartInfo"/>
+      <van-goods-action-mini-btn
+        :style="collectAdd ? 'color: #f7b444;':''"
+        @click="addCollect"
+        icon="shoucang"
+      />
+      <van-goods-action-big-btn @click="openSku('cart')" text="加入购物车"/>
+      <van-goods-action-big-btn primary @click="openSku('buy')" text="立即购买"/>
+    </van-goods-action>
+
+  </div>
+</template>
+
+<script>
+import { GOODS_DETAIL } from '@/api/goods';
+
+import {
+  Swipe,
+  SwipeItem,
+  GoodsAction,
+  GoodsActionBigBtn,
+  GoodsActionMiniBtn,
+  Popup
+} from 'vant';
+
+export default {
+  props: {
+    itemId: [String, Number]
+  },
+
+  data() {
+    const isLogin = !!localStorage.getItem('Authorization');
+    return {
+      isLogin,
+      itemImgs: [],
+      collectAdd: false,
+      cartInfo: '0',
+      selectSku: {
+        selectedNum: 1,
+        selectedSkuComb: {}
+      },
+      addressVal: {
+        id: null,
+        area_name: '',
+        district: '',
+        city: '',
+        province: ''
+      },
+      goods: null,
+      productList: []
+    };
+  },
+
+  computed: {
+    // itemImgs() {
+    //   debugger;
+    //   return this.goods.info.gallery;
+    // }
+  },
+
+  created() {
+    this.initData();
+  },
+
+  methods: {
+    async initData() {
+      // let a = this.$route.params.itemId;
+      this.$reqGet(`/wx/goods/detail?id=${this.itemId}`).then(
+        res => {
+          this.goods = res.data.data.info;
+          this.goods.attribute = res.data.data.attribute;
+          this.goods.specificationList = res.data.data.specificationList;
+          this.goods.productList = res.data.data.productList;
+          this.productList = res.data.data.productList;
+          this.itemImgs = res.data.data.info.gallery || [];
+          this.collectAdd = res.data.data.userHasCollect === 1;
+        }
+      );
+
+      let { data } = await this.$reqGet('/wx/cart/goodscount');
+      this.cartInfo = data.data;
+
+      // this.$reqGet(GOODS_DETAIL).then(res => {
+      //   this.goods = res.data.data;
+      // });
+    },
+    openSku(status) {
+      const goodAction = this.$refs.goodAction;
+      goodAction.skuClick(status);
+    },
+    cartEvent(count) {
+      this.cartInfo = ~~this.cartInfo + ~~count + '';
+    },
+    doBuyNow() {
+      // if (
+      //   (this.goods.has_sku && this.selectSku.sku_id) ||
+      //   !this.goods.has_sku
+      // ) {
+      //   this.$router.push({ name: 'placeOrderEntity' });
+      // } else {
+      //   const goodAction = this.$refs.goodAction;
+      //   goodAction.showSku = true;
+      //   goodAction.isSkuBuy = true;
+      // }
+    },
+    addCart() {
+      // debugger;
+      // if (this.goods.has_sku && this.selectSku.sku_id) {
+      // this.$reqPost('/wx/cart/add', {
+      //   goodsId: this.itemId,
+      //   number: 1
+      // }).then(() => {
+      //   this.$toast({
+      //     message: '已添加至购物车',
+      //     duration: 1500
+      //   });
+      //   this.cartInfo = String(parseInt(this.cartInfo) + 1);
+      // });
+      // }
+    },
+    toCart() {
+      this.$router.push({
+        name: 'cart'
+      });
+    },
+    async addCollect() {
+      let { data } = await this.$reqPost(
+        '/wx/collect/addordelete',
+        {
+          valueId: this.itemId,
+          type: 0
+        }
+      );
+      let type = data.data.type;
+      this.collectAdd = type === 'add' ? true : false;
+      this.$toast({
+        message: this.collectAdd ? '添加成功' : '取消成功',
+        duration: 1500
+      });
+    }
+  },
+
+  components: {
+    [Popup.name]: Popup,
+    [Swipe.name]: Swipe,
+    [SwipeItem.name]: SwipeItem,
+    [GoodsAction.name]: GoodsAction,
+    [GoodsActionBigBtn.name]: GoodsActionBigBtn,
+    [GoodsActionMiniBtn.name]: GoodsActionMiniBtn,
+    'entity-group': () =>
+      import(/* webpackChunkName: "EntityGroup" */ './EntityGroup/index'),
+    'virtual-group': () =>
+      import(/* webpackChunkName: "VirtualGroup" */ './VirtualGroup/index.vue')
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.item_detail {
+  img {
+    max-width: 100%;
+  }
+}
+
+.item_cell_group {
+  margin-bottom: 15px;
+}
+
+.item_price {
+  font-size: 20px;
+  color: $red;
+  margin-right: 10px;
+}
+
+.item_market_price {
+  color: $font-color-gray;
+  text-decoration: line-through;
+  font-size: $font-size-small;
+}
+
+.item-title {
+  line-height: 1.4;
+}
+
+.item_dispatch {
+  font-size: $font-size-small;
+  color: $font-color-gray;
+}
+
+.item_intro {
+  line-height: 18px;
+  margin: 5px 0;
+  font-size: $font-size-small;
+  color: $font-color-gray;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 3;
+}
+
+.item_desc {
+  background-color: #fff;
+  p {
+    padding: 0 10px;
+  }
+  /deep/ img {
+    max-width: 100%;
+    display: block;
+  }
+}
+
+.item_desc_title {
+  @include one-border;
+  padding: 10px 0;
+  text-align: center;
+}
+</style>

+ 28 - 30
litemall-vue/src/views/user/module-server/index.vue

@@ -1,30 +1,28 @@
-<template>
-  <div>
-    <van-cell-group>
-      <van-cell title="联系客服" @click="showKefu = true" isLink></van-cell>
-      <van-cell title="意见反馈" isLink></van-cell>
-      <van-cell title="常见问题" isLink></van-cell>
-    </van-cell-group>
-    <van-popup v-model="showKefu">
-      <md-kefu mobile="16454193338"/>
-    </van-popup>
-  </div>
-</template>
-
-<script>
-import { Popup } from 'vant';
-import md_kefu from '@/vue/components/md-kefu/';
-
-export default {
-  data() {
-    return {
-      showKefu: false
-    };
-  },
-
-  components: {
-    [Popup.name]: Popup,
-    [md_kefu.name]: md_kefu
-  }
-};
-</script>
+<template>
+  <div>
+    <van-cell-group>
+      <van-cell title="联系客服" @click="showKefu = true" isLink></van-cell>
+      <van-cell title="意见反馈" isLink></van-cell>
+      <van-cell title="常见问题" isLink></van-cell>
+    </van-cell-group>
+    <van-popup v-model="showKefu">
+      电话 XXX
+    </van-popup>
+  </div>
+</template>
+
+<script>
+import { Popup } from 'vant';
+
+export default {
+  data() {
+    return {
+      showKefu: false
+    };
+  },
+
+  components: {
+    [Popup.name]: Popup
+  }
+};
+</script>

+ 25 - 25
litemall-vue/src/views/user/tabbar-user-module.vue

@@ -1,25 +1,25 @@
-<template>
-  <div class="user_module">
-    <van-cell-group>
-      <van-cell icon="shoucang" title="我的收藏" to="/user/collect" isLink/>
-      <!-- <van-cell icon="team" title="我的团队" to="/user/team" isLink /> -->
-      <!-- <van-cell icon="gold-bean" title="我的金豆" isLink /> -->
-      <van-cell icon="dingwei" title="收货地址" to="/user/address" isLink/>
-      <!-- <van-cell icon="id-card" title="实名认证" to="/user/autonym" isLink /> -->
-      <!-- <van-cell icon="kefu" title="服务中心" to="/user/server" isLink/> -->
-    </van-cell-group>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'user-module'
-};
-</script>
-
-
-<style scoped lang="scss">
-.user_module {
-  background-color: #fff;
-}
-</style>
+<template>
+  <div class="user_module">
+    <van-cell-group>
+      <van-cell icon="shoucang" title="我的收藏" to="/user/collect" isLink/>
+      <!-- <van-cell icon="team" title="我的团队" to="/user/team" isLink /> -->
+      <!-- <van-cell icon="gold-bean" title="我的金豆" isLink /> -->
+      <van-cell icon="dingwei" title="收货地址" to="/user/address" isLink/>
+      <!-- <van-cell icon="id-card" title="实名认证" to="/user/autonym" isLink /> -->
+      <van-cell icon="kefu" title="服务中心" to="/user/server" isLink/>
+    </van-cell-group>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'user-module'
+};
+</script>
+
+
+<style scoped lang="scss">
+.user_module {
+  background-color: #fff;
+}
+</style>

+ 0 - 61
litemall-vue/src/vue/components/md-kefu/index.vue

@@ -1,61 +0,0 @@
-<template>
-	<div class="contact_popup">
-		<div class="contact_box contact_top">
-			<div>微信长按识别店主二维码</div>
-			<div><img src="../../../assets/images/qc_code.png" alt="店主二维码"></div>
-		</div>
-		<div class="contact_box">
-			<div><van-icon name="phone" /> {{mobile}}</div>
-			<div class="contact_btn"><a :href="'tel:' + mobile">联系店家</a></div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-  name: 'md-kefu',
-  props: {
-    qcCode: String,
-    mobile: String
-  }
-};
-</script>
-
-
-<style lang="scss" scoped>
-.contact_popup {
-  white-space: nowrap;
-  background-color: $bg-color;
-  text-align: center;
-  border-radius: 5px;
-  .contact_box {
-    padding: 20px 30px;
-    > div:first-child {
-      margin-bottom: 20px;
-    }
-  }
-  .contact_top {
-    @include one-border;
-    &::after {
-      border-bottom-color: #999;
-    }
-  }
-  .contact_btn {
-    border: 1px solid $red;
-    width: 80%;
-    margin: 0 auto;
-    color: #fff;
-    background-color: $red;
-    padding: 5px 0;
-    border-radius: 3px;
-    a {
-      color: #fff;
-      display: block;
-    }
-  }
-  img {
-    max-width: 100%;
-    max-height: 100%;
-  }
-}
-</style>