Browse Source

修改购物车为空时显示图标,新增虚拟商品退款判断,修改个人中心背景图

lemon橪 4 năm trước cách đây
mục cha
commit
5612636b29

+ 2 - 6
config/api.js

@@ -4,12 +4,8 @@
  */
 // 开发环境
 const dev = {
-  common: "http://192.168.0.100:8890",
-  buyer: "http://192.168.0.100:8888",
-  // common: "https://common-api.pickmall.cn",
-  // buyer: "https://buyer-api.pickmall.cn",
-  // common: 'http://192.168.0.109:8890',
-  // buyer: 'http://192.168.0.109:8888',
+  common: "https://common-api.pickmall.cn",
+  buyer: "https://buyer-api.pickmall.cn",
 };
 // 生产环境
 const prod = {

+ 22 - 17
pages/mine/distribution/list.vue

@@ -156,9 +156,7 @@ export default {
     this.routers = options;
   },
   watch: {
-    showFlag(val) {
-   
-    },
+    showFlag(val) {},
   },
   onShow() {
     this.goodsList = [];
@@ -172,27 +170,34 @@ export default {
     },
 
     async handleLink(goods) {
+      uni.showToast({
+        title: "请请按住保存图片",
+        duration: 2000,
+        icon: "none",
+      });
       let page = `pages/product/goods`;
       let scene = `${goods.skuId},${goods.id},${this.routers.id}`;
       let result = await getMpCode({ page, scene });
-      if(result.data.success){
-      let callback = result.data.result;
-      this.res.container.title = `${goods.goodsName}`;
-      this.res.bottom.code = `data:image/png;base64,${callback}`;
-      this.res.bottom.price = this.$options.filters.unitPrice(goods.price, "¥");
-      this.res.bottom.desc = `${goods.goodsName}`;
-      this.res.bottom.img = `${goods.thumbnail}`;
+      if (result.data.success) {
+        let callback = result.data.result;
+        this.res.container.title = `${goods.goodsName}`;
+        this.res.bottom.code = `data:image/png;base64,${callback}`;
+        this.res.bottom.price = this.$options.filters.unitPrice(
+          goods.price,
+          "¥"
+        );
+        this.res.bottom.desc = `${goods.goodsName}`;
+        this.res.bottom.img = `${goods.thumbnail}`;
 
-      if (this.showFlag) {
-        this.$refs.drawCanvas.init();
-      }
-      this.showFlag = true;
-      }
-      else{
+        if (this.showFlag) {
+          this.$refs.drawCanvas.init();
+        }
+        this.showFlag = true;
+      } else {
         uni.showToast({
           title: `制作二维码失败!请稍后重试`,
           duration: 2000,
-          icon:"none"
+          icon: "none",
         });
       }
     },

+ 1 - 1
pages/order/afterSales/afterSalesDetail.vue

@@ -149,7 +149,7 @@ export default {
       customStyle: {
         backgroundColor: this.$lightColor,
       },
-      applyInfo: {},
+      applyInfo: {}, 
       form: {
         orderItemSn: "", // 订单sn
         skuId: "",

+ 18 - 3
pages/order/afterSales/afterSalesSelect.vue

@@ -26,7 +26,7 @@
     </view>
 
     <view class="select-view">
-      <view class="select-cell" @click="onSelect(1)">
+      <view class="select-cell"  v-if="applyInfo.returnGoods"  @click="onSelect(1)">
         <view class="select-image">
           <image style="height: 51rpx; width: 51rpx" src="/static/order/t1.png"></image>
         </view>
@@ -38,7 +38,7 @@
           </view>
         </view>
       </view>
-      <view class="select-cell" @click="onSelect(3)">
+      <view class="select-cell" v-if="applyInfo.returnMoney"  @click="onSelect(3)">
         <view class="select-image">
           <image style="height: 51rpx; width: 51rpx" src="/static/order/t3.png"></image>
         </view>
@@ -56,14 +56,17 @@
 
 <script>
 import UniIcons from "@/components/uni-icons/uni-icons.vue";
+
+import { getAfterSaleInfo } from "@/api/after-sale";
 export default {
   components: {
     UniIcons,
   },
   data() {
     return {
-      sn: "", 
+      sn: "",
       sku: {}, //sku
+      applyInfo:""
     };
   },
   onLoad(options) {
@@ -71,8 +74,20 @@ export default {
     let dData = decodeURIComponent(options.sku);
     let newData = JSON.parse(dData);
     this.sku = newData;
+
+    // 查看当前商品是否支持退款退货
+    this.init()
   },
   methods: {
+    // 初始化数据
+    init() {
+      getAfterSaleInfo(this.sn).then((response) => {
+        if (response.data.success) {
+          this.applyInfo = response.data.result;
+        }
+      });
+    },
+
     /**
      * 选择退货流程
      */

+ 1 - 1
pages/tabbar/cart/cartList.vue

@@ -3,7 +3,7 @@
     <u-navbar :isBack="false" title="购物车"></u-navbar>
     <!-- 空白页-->
     <view v-if="cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail" class="empty">
-      <image src="/static/emptyCart.jpg" mode="aspectFit"></image>
+      <image src="/static/emptyCart.png" mode="aspectFit"></image>
       <view class="empty-tips">
         空空如也
         <navigator class="navigator" url="/pages/tabbar/home/index" open-type="switchTab">随便逛逛></navigator>

BIN
static/emptyCart.jpg


BIN
static/emptyCart.png


BIN
static/img/main-bg.png


BIN
static/logo.png


BIN
static/signIn.png