Elbert Chen пре 2 година
родитељ
комит
5281666236

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+.DS_Store

+ 6 - 1
app.json

@@ -41,7 +41,6 @@
                 "pages/bossInviteCode/bossInviteCode",
                 "pages/coupon/myCoupon",
                 "pages/couponCenter/couponCenter",
-                "pages/bonusShop/bonusShop",
                 "pages/identityCheck/identityCheck",
                 "pages/riceCard/myExchangeCardDetails/myExchangeCardDetails",
                 "pages/riceCard/exchangeDetails/exchangeDetails",
@@ -162,6 +161,12 @@
                 "pages/webView/webView",
                 "pages/memberAgreement/memberAgreement"
             ]
+        },
+        {
+            "root": "pages/bonus/",
+            "pages": [
+                "pages/bonusShop/bonusShop"
+            ]
         }
     ],
     "lazyCodeLoading": "requiredComponents",

+ 330 - 0
pages/bonus/pages/bonusShop/bonusShop.js

@@ -0,0 +1,330 @@
+const app = getApp();
+const api = require("../../../../request/api.js");
+const http = require("../../../../request/http.js");
+const utils = require("../../../../utils/util.js");
+const storeKeys = require("../../../../utils/storageKeys.js");
+Page({
+  data: {
+    isLoading: true, //是否处于加载
+    goodsList: [], //积分商品
+    exchangeList: [],
+    Limitcouponlist: [], //限时抢购优惠券
+    couponState: 0, //0:可领取 1:已领取 2:领完啦
+    showConfirmModal: false, //是否显示确定激活弹窗
+    couponInputValue: "",
+    page: 1, //分页
+    list: [], //页面数据
+    dataObj: {}, //页面对象
+    is_bottom: false, //到底了
+    price: 100,
+    inputFocusValue: false,
+    isOnLoad: true,
+    tabSelected: 0,
+    info: {},
+  },
+  onLoad: function (options) {
+    this.getData();
+  },
+  onShow: function (options) {
+    if (!this.data.isOnLoad) {
+      this.getData();
+    }
+    this.data.isOnLoad = false;
+  },
+  //获取页面内容
+  getData(noLoading) {
+    if (!noLoading) {
+      wx.showLoading({
+        title: "加载中",
+        mask: true,
+      });
+    }
+    let promise1 = new Promise(resolve => {
+      this.getPageData(() => {
+        resolve();
+      });
+    });
+    let promise2 = new Promise(resolve => {
+      this.getUserInfo(() => {
+        resolve();
+      });
+    });
+    Promise.all([promise1, promise2])
+      .then(values => {
+        !noLoading && wx.hideLoading();
+        this.setData({
+          isLoading: false,
+        });
+      })
+      .catch(error => {});
+  },
+  changeNavTab(e) {
+    let { index } = e.currentTarget.dataset;
+    let tabSelected = this.data.tabSelected
+    this.setData({
+      tabSelected: parseInt(index),
+    });
+    if (index < 2 && tabSelected !== index) {
+        this.getPageData()
+    } else if (index == 2) {
+        this.getExchangeList()
+    }
+  },
+  //获取积分产品
+  getPageData(noLoading) {
+    wx.showLoading({
+      title: "加载中",
+      mask: true,
+    });
+    http.request({
+      url:
+        api.URL +
+        "/api/goods/list?goods_type=40&sortStyle=" +
+        this.data.sortStyle +
+        "&sortSort=" +
+        this.data.sortSort +
+        "&page=" +
+        this.data.page,
+      token: utils.getStorageSync(storeKeys.TOKEN),
+      method: "GET",
+      success: res => {
+        let list = [];
+        let tmpList = res.data.data.list.data;
+        if (this.data.page == 1) {
+          list = tmpList;
+        } else {
+          list = this.data.list.concat(tmpList);
+        }
+        this.setData({
+          list: list.filter(i => this.data.tabSelected === 1 ? i.points_to_exchange <= this.data.info.accumulate_points : true),
+          dataObj: res.data.data.list,
+        });
+        setTimeout(() => {
+          this.setData({
+            isLoading: false,
+          });
+        }, 300);
+        wx.hideLoading();
+      },
+      error: res => {
+        this.setData({
+          isLoading: false,
+        });
+        wx.hideLoading();
+      },
+    });
+  },
+
+  //获取用户信息
+  getUserInfo() {
+    http.request({
+      url: api.URL + "/api/user/info",
+      method: "GET",
+      token: utils.getStorageSync(storeKeys.TOKEN),
+      success: res => {
+        let info = res.data.data.userInfo;
+        // 开发专用
+
+        if (info.mobile == "17573207179") {
+          // info.show_cash_box = true;
+          // info.role = 1;
+          // info.seller_grade = 3;
+          info.grade_id = 10001;
+          info.is_pickup = 1;
+        }
+        //是否为特殊身份
+        let chara = false;
+        if ((info.role && info.role != 1) || info.show_cash_box) {
+          chara = true;
+        }
+        info.chara = chara;
+        utils.setStorageSync(storeKeys.USERINFO, info);
+        this.setData({
+          info,
+        });
+        setTimeout(() => {
+          this.setData({
+            isLoading: false,
+          });
+        }, 300);
+      },
+      error: res => {
+        utils.toast(res.data.message);
+      },
+    });
+  },
+  onCardCouponSecInput: function (e) {
+    let couponInputValue = e.detail.value.replace(/\s+/g, "");
+    this.setData({
+      couponInputValue,
+    });
+    // this.data.couponInputValue = e.detail.value;
+  },
+  onItemButtonClicked: utils.throttle(function (e) {
+    if (!utils.getStorageSync(storeKeys.TOKEN)) {
+      wx.navigateTo({
+        url: "/pages/tabBar/login/login",
+      });
+      return;
+    }
+    let item = e.currentTarget.dataset.item;
+    let index = e.currentTarget.dataset.index;
+    let state = e.currentTarget.dataset.type;
+    let id = item.coupon_id;
+    let num = item.avaiable_num;
+    if (state == 1) {
+      wx.showLoading({
+        title: "加载中",
+      });
+      http.request({
+        url: api.URL + "/api/MyCoupon/receive?coupon_id=" + id,
+        method: "GET",
+        token: utils.getStorageSync(storeKeys.TOKEN),
+        success: res => {
+          wx.hideLoading();
+          if (res.data.status == 200) {
+            wx.showToast({
+              title: "领取成功",
+              icon: "success",
+              duration: 3000,
+            });
+            this.getData(true);
+          }
+        },
+        error: res => {
+          wx.hideLoading();
+
+          wx.showToast({
+            title: "领取失败",
+            icon: "error",
+            duration: 3000,
+          });
+        },
+      });
+    } else if (state == 0) {
+      wx.switchTab({
+        url: "/pages/tabBar/allGoods/allGoods",
+      });
+    }
+  }),
+  activateCode: utils.throttle(function (e) {
+    wx.showLoading({
+      title: "加载中",
+    });
+    http.request({
+      url:
+        api.URL +
+        "/api/MyCoupon/exchange?redeemCode=" +
+        this.data.couponInputValue,
+      method: "GET",
+      token: utils.getStorageSync(storeKeys.TOKEN),
+      success: res => {
+        // wx.hideLoading();
+
+        if (res.data.status == 200) {
+          // this.getPageData()
+          this.setData({
+            couponInputValue: "",
+          });
+          wx.showToast({
+            title: "兑换成功",
+            icon: "success",
+            duration: 3000,
+          });
+        }
+      },
+      error: res => {
+        wx.hideLoading();
+        this.setData({
+          inputFocusValue: true,
+          couponInputValue: "",
+        });
+        // wx.showToast({
+        //     title: res.data.message,
+        //     icon: 'error',
+        //     duration: 3000
+        // })
+
+        utils.toast(res.data.message);
+      },
+    });
+  }),
+  //显示确定激活弹窗
+  showConfirmModal(e) {
+    if (this.data.couponInputValue.length == 0) {
+      return;
+    }
+    this.setData({
+      showConfirmModal: true,
+    });
+  },
+  //关闭确定激活弹窗
+  hideConfirmModal() {
+    this.setData({
+      showConfirmModal: false,
+    });
+  },
+  onButtonActiveCode() {
+    this.setData({
+      showConfirmModal: false,
+    });
+    this.activateCode();
+  },
+  //前往兑换
+  goExchange(e) {
+    let { item } = e.currentTarget.dataset;
+    console.log(item)
+    let data = {
+      mode: "pointsExchange",
+      goodsId: item.goods_id, //商品ID
+      goodsSkuId: item.goods_sku_id || 0, //商品规格ID
+      goodsNum: 1, //商品数量
+    };
+    // return
+    let url = "/pages/cart/pages/confirmOrder/confirmOrder?data=" + JSON.stringify(data);
+    app.navigateToUrl(url);
+  },
+  //列表
+  getExchangeList(){
+    // dataType  //订单类型 (all全部 payment待付款 received待发货 received待收货 comment待评价)
+    let that = this, request_url = '';
+    wx.showLoading({
+			title: "加载中"
+		});
+    http.request({
+      method: 'GET',
+      url: api.URL + '/api/order/list?isExchange=1&dataType=all',
+      token: utils.getStorageSync(storeKeys.TOKEN),
+      success: (res) => {
+				wx.hideLoading();
+        let data_obj = res.data.data.list
+        data_obj.data.forEach((item)=>{
+          item.isShowMoreBtn = false
+          if(item.state_value==30 && item.za){//已完成
+            item.isShowMoreBtn = true
+            item.leftBox = false
+          }
+        })
+        console.log(data_obj.data)
+        let list = [];
+        if (that.data.page == 1) {
+          list = data_obj.data;
+        } else {
+          list = that.data.list.concat(data_obj.data);
+        }
+        that.setData({ 
+          exchangeList: list,
+          isLoading: false
+        });
+        // console.log(that.data.list)
+        if (data_obj.total == 0) {
+          that.setData({ is_bottom: false });
+        }
+        if (data_obj.current_page >= data_obj.last_page && data_obj.total > 0) {
+          that.setData({ is_bottom: true });
+        }
+      },
+      error: (res) => {},
+    })
+  },
+});

+ 0 - 0
pages/index/pages/bonusShop/bonusShop.json → pages/bonus/pages/bonusShop/bonusShop.json


+ 114 - 0
pages/bonus/pages/bonusShop/bonusShop.wxml

@@ -0,0 +1,114 @@
+<wxs module="textUtil" src="../../../../utils/textUtil.wxs" />
+<view class="pageContainer" >
+    <view class="top-view">
+        <image class="background-image" src="../../static/bonus_shop_bg.png" />
+        <view class="my-bonus">
+            <image class="bonus-star" src="../../static/bonus_star.png" />
+            {{info.accumulate_points || 0}}
+        </view>
+    </view>
+    <view class="pageDataBox">
+        <view class="tabs">
+            <view class="item {{ tabSelected === 0 ? 'selected' : '' }}" bind:tap="changeNavTab" data-index="0">
+                <view class="label">积分商城</view>
+                <view wx:if="{{tabSelected === 0}}" class="underline"></view>
+            </view>
+            <view class="item {{ tabSelected === 1 ? 'selected' : '' }}" bind:tap="changeNavTab" data-index="1">
+                <view class="label">我可兑换</view>
+                <view wx:if="{{tabSelected === 1}}" class="underline"></view>
+            </view>
+            <view class="item {{ tabSelected === 2 ? 'selected' : '' }}" bind:tap="changeNavTab" data-index="2">
+                <view class="label">兑换记录</view>
+                <view wx:if="{{tabSelected === 2}}" class="underline"></view>
+            </view>
+        </view>
+        <view class="pageMian" wx:if="{{tabSelected === 0 || tabSelected === 1}}">
+            <!-- 商品列表 -->
+            <view class="goodsList flex">
+                <block wx:for="{{list}}" wx:for-item="item" wx:key="index">
+                    <view class="goodsItem" bindtap="navigateTo" data-url="/pages/cart/pages/goodsDetail/goodsDetail?goods_id={{item.goods_id}}">
+                        <view class="goodsContent">
+                            <view class="goodsImgBox">
+                                <image src="{{item.goods_image+textUtil.imageMiddle()}}" mode="aspectFill" lazy-load="{{true}}"></image>
+                            </view>
+                            <view class="goodsInfoBox">
+                                <view>
+                                    <view class="title textSpill2">
+                                        <!-- 秒杀标识 -->
+                                        <image wx:if="{{item.miaosha && item.miaosha.type == 4}}" class="icon" src="/static/icon/goodsMx.png" mode="aspectFill"></image>
+                                        <image wx:elif="{{item.za}}" class="icon goodsMyZy" src="/static/icon/goodsMyZy.png" mode="aspectFill"></image>
+                                        <view class="goodsNameText">{{item.goods_name}}</view>
+                                    </view>
+                                    <view class="sales flex">
+                                        <view class="bonus-star">
+                                            <image class="bonus-star" src="../../static/bonus_star.png" />
+                                        </view>
+                                        <view class="number ">
+                                            {{textUtil.priceFixed(item.points_to_exchange)}}
+                                        </view>
+                                    </view>
+                                </view>
+                                <view class="exchange-box ">
+                                    <view class="hr"></view>
+                                    <view wx:if="{{info.accumulate_points >= item.points_to_exchange && item.goods_stocks > 0}}" class="exchange" bind:tap="goExchange" data-item="{{item}}">
+                                        立即兑换
+                                    </view>
+                                    <view wx:else class="exchange inactive">
+                                        立即兑换
+                                    </view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </block>
+            </view>
+            <view class="emptyPage flex-column-c" wx:if="{{list.length <= 0}}">
+                <image class="image" src="/static/images/image_not_log.png" mode=""></image>
+                <view class="tips">暂无商品</view>
+            </view>
+        </view>
+        <view class="pageMian" wx:else>
+             <view class="every_box" wx:for="{{exchangeList}}" wx:key="order_id"  data-idx='{{index}}' data-id='{{item.order_id}}'>
+                <view class="part_1 flex-c">
+                    <view class="time">{{item.create_time}}</view>
+                    <view class='{{item.state_text=="待付款" || item.state_text=="待收货"?"status status_item":"status"}}'>{{item.state_text}}</view>
+                </view>
+                <view class="goods_box flex-c">
+                    <view class="left" wx:if='{{item.goods.length>1}}'>
+                        <view class="img_box">
+                            <image wx:for="{{item.goods}}" wx:for-item="i" wx:key="goods_id" src="{{i.goods_image+textUtil.imageSmall()}}" mode="aspectFill"></image>
+                        </view>
+                    </view>
+                    <view class="img_1 flex-c" wx:if='{{item.goods.length==1}}' wx:for="{{item.goods}}" wx:for-item="i" wx:key="goods_id">
+                        <image src="{{i.goods_image+textUtil.imageSmall()}}" mode="aspectFill"></image>
+                        <view class="t textSpill2">{{i.goods_name}}</view>
+                    </view>
+                    <view class="right">
+                        <view class='price_style'>
+                            ¥<text>{{textUtil.priceSplit(item.pay_price)[0]}}</text>.{{textUtil.priceSplit(item.pay_price)[1]}}
+                        </view>
+                        <view class="t">共{{item.goods_total_num}}件</view>
+                    </view>
+                </view>
+                <!-- "state_value": 11  //售后状态码 20已取消 30已完成 11待支付 12待收货未发货 13待收货已发货 -->
+                <view class="part_btn flex" wx:if='{{item.state_value==11}}'>
+                    <!-- 待付款 -->
+                    <view class="btn flex-c-c" catchtap='btnStatus' data-type='1' data-item='{{item}}' data-index='{{index}}'>取消订单</view>
+                    <view class="btn flex-c-c item" catchtap='commit' data-id='{{item.order_id}}' data-index='{{index}}'>立即支付</view>
+                </view>
+            </view>
+            <view class='is_bottom' wx:if='{{dataObj.total > 0 && is_bottom}}'>~没有更多了~</view>
+        </view>
+    </view>
+</view>
+<tui-modal show="{{showConfirmModal}}" custom padding="0rpx" width="600rpx" radius="16rpx">
+    <view class="modalCustom-coupon">
+        <view class="closeModal" bind:tap="hideConfirmModal">
+            <image class="icon" src="/static/icon/icon_modal_x.png" mode="aspectFill"></image>
+        </view>
+        <view class="newModalTitle space">确认要立即兑换该优惠券吗?</view>
+        <view class="newModalButtonBox flex-c-c">
+            <view class="mButton flex-c-c" bind:tap="onButtonActiveCode">确认</view>
+        </view>
+    </view>
+</tui-modal>

+ 0 - 0
pages/index/pages/bonusShop/bonusShop.wxs → pages/bonus/pages/bonusShop/bonusShop.wxs


+ 0 - 0
pages/index/pages/bonusShop/bonusShop.wxss → pages/bonus/pages/bonusShop/bonusShop.wxss


BIN
pages/bonus/static/bonus_shop_bg.png


+ 0 - 0
pages/index/static/bonus_star.png → pages/bonus/static/bonus_star.png


+ 59 - 323
pages/index/pages/bonusShop/bonusShop.js

@@ -1,330 +1,66 @@
-const app = getApp();
-const api = require("../../../../request/api.js");
-const http = require("../../../../request/http.js");
-const utils = require("../../../../utils/util.js");
-const storeKeys = require("../../../../utils/storageKeys.js");
+// pages/index/pages/bonusShop/bonusShop.js
 Page({
-  data: {
-    isLoading: true, //是否处于加载
-    goodsList: [], //积分商品
-    exchangeList: [],
-    Limitcouponlist: [], //限时抢购优惠券
-    couponState: 0, //0:可领取 1:已领取 2:领完啦
-    showConfirmModal: false, //是否显示确定激活弹窗
-    couponInputValue: "",
-    page: 1, //分页
-    list: [], //页面数据
-    dataObj: {}, //页面对象
-    is_bottom: false, //到底了
-    price: 100,
-    inputFocusValue: false,
-    isOnLoad: true,
-    tabSelected: 0,
-    info: {},
-  },
-  onLoad: function (options) {
-    this.getData();
-  },
-  onShow: function (options) {
-    if (!this.data.isOnLoad) {
-      this.getData();
-    }
-    this.data.isOnLoad = false;
-  },
-  //获取页面内容
-  getData(noLoading) {
-    if (!noLoading) {
-      wx.showLoading({
-        title: "加载中",
-        mask: true,
-      });
-    }
-    let promise1 = new Promise(resolve => {
-      this.getPageData(() => {
-        resolve();
-      });
-    });
-    let promise2 = new Promise(resolve => {
-      this.getUserInfo(() => {
-        resolve();
-      });
-    });
-    Promise.all([promise1, promise2])
-      .then(values => {
-        !noLoading && wx.hideLoading();
-        this.setData({
-          isLoading: false,
-        });
-      })
-      .catch(error => {});
-  },
-  changeNavTab(e) {
-    let { index } = e.currentTarget.dataset;
-    let tabSelected = this.data.tabSelected
-    this.setData({
-      tabSelected: parseInt(index),
-    });
-    if (index < 2 && tabSelected !== index) {
-        this.getPageData()
-    } else if (index == 2) {
-        this.getExchangeList()
-    }
-  },
-  //获取积分产品
-  getPageData(noLoading) {
-    wx.showLoading({
-      title: "加载中",
-      mask: true,
-    });
-    http.request({
-      url:
-        api.URL +
-        "/api/goods/list?goods_type=40&sortStyle=" +
-        this.data.sortStyle +
-        "&sortSort=" +
-        this.data.sortSort +
-        "&page=" +
-        this.data.page,
-      token: utils.getStorageSync(storeKeys.TOKEN),
-      method: "GET",
-      success: res => {
-        let list = [];
-        let tmpList = res.data.data.list.data;
-        if (this.data.page == 1) {
-          list = tmpList;
-        } else {
-          list = this.data.list.concat(tmpList);
-        }
-        this.setData({
-          list: list.filter(i => this.data.tabSelected === 1 ? i.points_to_exchange <= this.data.info.accumulate_points : true),
-          dataObj: res.data.data.list,
-        });
-        setTimeout(() => {
-          this.setData({
-            isLoading: false,
-          });
-        }, 300);
-        wx.hideLoading();
-      },
-      error: res => {
-        this.setData({
-          isLoading: false,
-        });
-        wx.hideLoading();
-      },
-    });
-  },
 
-  //获取用户信息
-  getUserInfo() {
-    http.request({
-      url: api.URL + "/api/user/info",
-      method: "GET",
-      token: utils.getStorageSync(storeKeys.TOKEN),
-      success: res => {
-        let info = res.data.data.userInfo;
-        // 开发专用
+    /**
+     * Page initial data
+     */
+    data: {
 
-        if (info.mobile == "17573207179") {
-          // info.show_cash_box = true;
-          // info.role = 1;
-          // info.seller_grade = 3;
-          info.grade_id = 10001;
-          info.is_pickup = 1;
-        }
-        //是否为特殊身份
-        let chara = false;
-        if ((info.role && info.role != 1) || info.show_cash_box) {
-          chara = true;
-        }
-        info.chara = chara;
-        utils.setStorageSync(storeKeys.USERINFO, info);
-        this.setData({
-          info,
-        });
-        setTimeout(() => {
-          this.setData({
-            isLoading: false,
-          });
-        }, 300);
-      },
-      error: res => {
-        utils.toast(res.data.message);
-      },
-    });
-  },
-  onCardCouponSecInput: function (e) {
-    let couponInputValue = e.detail.value.replace(/\s+/g, "");
-    this.setData({
-      couponInputValue,
-    });
-    // this.data.couponInputValue = e.detail.value;
-  },
-  onItemButtonClicked: utils.throttle(function (e) {
-    if (!utils.getStorageSync(storeKeys.TOKEN)) {
-      wx.navigateTo({
-        url: "/pages/tabBar/login/login",
-      });
-      return;
-    }
-    let item = e.currentTarget.dataset.item;
-    let index = e.currentTarget.dataset.index;
-    let state = e.currentTarget.dataset.type;
-    let id = item.coupon_id;
-    let num = item.avaiable_num;
-    if (state == 1) {
-      wx.showLoading({
-        title: "加载中",
-      });
-      http.request({
-        url: api.URL + "/api/MyCoupon/receive?coupon_id=" + id,
-        method: "GET",
-        token: utils.getStorageSync(storeKeys.TOKEN),
-        success: res => {
-          wx.hideLoading();
-          if (res.data.status == 200) {
-            wx.showToast({
-              title: "领取成功",
-              icon: "success",
-              duration: 3000,
-            });
-            this.getData(true);
-          }
-        },
-        error: res => {
-          wx.hideLoading();
+    },
 
-          wx.showToast({
-            title: "领取失败",
-            icon: "error",
-            duration: 3000,
-          });
-        },
-      });
-    } else if (state == 0) {
-      wx.switchTab({
-        url: "/pages/tabBar/allGoods/allGoods",
-      });
-    }
-  }),
-  activateCode: utils.throttle(function (e) {
-    wx.showLoading({
-      title: "加载中",
-    });
-    http.request({
-      url:
-        api.URL +
-        "/api/MyCoupon/exchange?redeemCode=" +
-        this.data.couponInputValue,
-      method: "GET",
-      token: utils.getStorageSync(storeKeys.TOKEN),
-      success: res => {
-        // wx.hideLoading();
+    /**
+     * Lifecycle function--Called when page load
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * Lifecycle function--Called when page is initially rendered
+     */
+    onReady() {
+
+    },
+
+    /**
+     * Lifecycle function--Called when page show
+     */
+    onShow() {
+
+    },
+
+    /**
+     * Lifecycle function--Called when page hide
+     */
+    onHide() {
+
+    },
+
+    /**
+     * Lifecycle function--Called when page unload
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * Page event handler function--Called when user drop down
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * Called when page reach bottom
+     */
+    onReachBottom() {
+
+    },
 
-        if (res.data.status == 200) {
-          // this.getPageData()
-          this.setData({
-            couponInputValue: "",
-          });
-          wx.showToast({
-            title: "兑换成功",
-            icon: "success",
-            duration: 3000,
-          });
-        }
-      },
-      error: res => {
-        wx.hideLoading();
-        this.setData({
-          inputFocusValue: true,
-          couponInputValue: "",
-        });
-        // wx.showToast({
-        //     title: res.data.message,
-        //     icon: 'error',
-        //     duration: 3000
-        // })
+    /**
+     * Called when user click on the top right corner to share
+     */
+    onShareAppMessage() {
 
-        utils.toast(res.data.message);
-      },
-    });
-  }),
-  //显示确定激活弹窗
-  showConfirmModal(e) {
-    if (this.data.couponInputValue.length == 0) {
-      return;
     }
-    this.setData({
-      showConfirmModal: true,
-    });
-  },
-  //关闭确定激活弹窗
-  hideConfirmModal() {
-    this.setData({
-      showConfirmModal: false,
-    });
-  },
-  onButtonActiveCode() {
-    this.setData({
-      showConfirmModal: false,
-    });
-    this.activateCode();
-  },
-  //前往兑换
-  goExchange(e) {
-    let { item } = e.currentTarget.dataset;
-    console.log(item)
-    let data = {
-      mode: "pointsExchange",
-      goodsId: item.goods_id, //商品ID
-      goodsSkuId: item.goods_sku_id || 0, //商品规格ID
-      goodsNum: 1, //商品数量
-    };
-    // return
-    let url = "/pages/cart/pages/confirmOrder/confirmOrder?data=" + JSON.stringify(data);
-    app.navigateToUrl(url);
-  },
-  //列表
-  getExchangeList(){
-    // dataType  //订单类型 (all全部 payment待付款 received待发货 received待收货 comment待评价)
-    let that = this, request_url = '';
-    wx.showLoading({
-			title: "加载中"
-		});
-    http.request({
-      method: 'GET',
-      url: api.URL + '/api/order/list?isExchange=1&dataType=all',
-      token: utils.getStorageSync(storeKeys.TOKEN),
-      success: (res) => {
-				wx.hideLoading();
-        let data_obj = res.data.data.list
-        data_obj.data.forEach((item)=>{
-          item.isShowMoreBtn = false
-          if(item.state_value==30 && item.za){//已完成
-            item.isShowMoreBtn = true
-            item.leftBox = false
-          }
-        })
-        console.log(data_obj.data)
-        let list = [];
-        if (that.data.page == 1) {
-          list = data_obj.data;
-        } else {
-          list = that.data.list.concat(data_obj.data);
-        }
-        that.setData({ 
-          exchangeList: list,
-          isLoading: false
-        });
-        // console.log(that.data.list)
-        if (data_obj.total == 0) {
-          that.setData({ is_bottom: false });
-        }
-        if (data_obj.current_page >= data_obj.last_page && data_obj.total > 0) {
-          that.setData({ is_bottom: true });
-        }
-      },
-      error: (res) => {},
-    })
-  },
-});
+})

+ 2 - 114
pages/index/pages/bonusShop/bonusShop.wxml

@@ -1,114 +1,2 @@
-<wxs module="textUtil" src="../../../../utils/textUtil.wxs" />
-<view class="pageContainer" >
-    <view class="top-view">
-        <image class="background-image" src="../../static/bonus_shop_bg.png" />
-        <view class="my-bonus">
-            <image class="bonus-star" src="../../static/bonus_star.png" />
-            {{info.accumulate_points || 0}}
-        </view>
-    </view>
-    <view class="pageDataBox">
-        <view class="tabs">
-            <view class="item {{ tabSelected === 0 ? 'selected' : '' }}" bind:tap="changeNavTab" data-index="0">
-                <view class="label">积分商城</view>
-                <view wx:if="{{tabSelected === 0}}" class="underline"></view>
-            </view>
-            <view class="item {{ tabSelected === 1 ? 'selected' : '' }}" bind:tap="changeNavTab" data-index="1">
-                <view class="label">我可兑换</view>
-                <view wx:if="{{tabSelected === 1}}" class="underline"></view>
-            </view>
-            <view class="item {{ tabSelected === 2 ? 'selected' : '' }}" bind:tap="changeNavTab" data-index="2">
-                <view class="label">兑换记录</view>
-                <view wx:if="{{tabSelected === 2}}" class="underline"></view>
-            </view>
-        </view>
-        <view class="pageMian" wx:if="{{tabSelected === 0 || tabSelected === 1}}">
-            <!-- 商品列表 -->
-            <view class="goodsList flex">
-                <block wx:for="{{list}}" wx:for-item="item" wx:key="index">
-                    <view class="goodsItem" bindtap="navigateTo" data-url="/pages/cart/pages/goodsDetail/goodsDetail?goods_id={{item.goods_id}}">
-                        <view class="goodsContent">
-                            <view class="goodsImgBox">
-                                <image src="{{item.goods_image+textUtil.imageMiddle()}}" mode="aspectFill" lazy-load="{{true}}"></image>
-                            </view>
-                            <view class="goodsInfoBox">
-                                <view>
-                                    <view class="title textSpill2">
-                                        <!-- 秒杀标识 -->
-                                        <image wx:if="{{item.miaosha && item.miaosha.type == 4}}" class="icon" src="/static/icon/goodsMx.png" mode="aspectFill"></image>
-                                        <image wx:elif="{{item.za}}" class="icon goodsMyZy" src="/static/icon/goodsMyZy.png" mode="aspectFill"></image>
-                                        <view class="goodsNameText">{{item.goods_name}}</view>
-                                    </view>
-                                    <view class="sales flex">
-                                        <view class="bonus-star">
-                                            <image class="bonus-star" src="../../static/bonus_star.png" />
-                                        </view>
-                                        <view class="number ">
-                                            {{textUtil.priceFixed(item.points_to_exchange)}}
-                                        </view>
-                                    </view>
-                                </view>
-                                <view class="exchange-box ">
-                                    <view class="hr"></view>
-                                    <view wx:if="{{info.accumulate_points >= item.points_to_exchange && item.goods_stocks > 0}}" class="exchange" bind:tap="goExchange" data-item="{{item}}">
-                                        立即兑换
-                                    </view>
-                                    <view wx:else class="exchange inactive">
-                                        立即兑换
-                                    </view>
-                                </view>
-                            </view>
-                        </view>
-                    </view>
-                </block>
-            </view>
-            <view class="emptyPage flex-column-c" wx:if="{{list.length <= 0}}">
-                <image class="image" src="/static/images/image_not_log.png" mode=""></image>
-                <view class="tips">暂无商品</view>
-            </view>
-        </view>
-        <view class="pageMian" wx:else>
-             <view class="every_box" wx:for="{{exchangeList}}" wx:key="order_id"  data-idx='{{index}}' data-id='{{item.order_id}}'>
-                <view class="part_1 flex-c">
-                    <view class="time">{{item.create_time}}</view>
-                    <view class='{{item.state_text=="待付款" || item.state_text=="待收货"?"status status_item":"status"}}'>{{item.state_text}}</view>
-                </view>
-                <view class="goods_box flex-c">
-                    <view class="left" wx:if='{{item.goods.length>1}}'>
-                        <view class="img_box">
-                            <image wx:for="{{item.goods}}" wx:for-item="i" wx:key="goods_id" src="{{i.goods_image+textUtil.imageSmall()}}" mode="aspectFill"></image>
-                        </view>
-                    </view>
-                    <view class="img_1 flex-c" wx:if='{{item.goods.length==1}}' wx:for="{{item.goods}}" wx:for-item="i" wx:key="goods_id">
-                        <image src="{{i.goods_image+textUtil.imageSmall()}}" mode="aspectFill"></image>
-                        <view class="t textSpill2">{{i.goods_name}}</view>
-                    </view>
-                    <view class="right">
-                        <view class='price_style'>
-                            ¥<text>{{textUtil.priceSplit(item.pay_price)[0]}}</text>.{{textUtil.priceSplit(item.pay_price)[1]}}
-                        </view>
-                        <view class="t">共{{item.goods_total_num}}件</view>
-                    </view>
-                </view>
-                <!-- "state_value": 11  //售后状态码 20已取消 30已完成 11待支付 12待收货未发货 13待收货已发货 -->
-                <view class="part_btn flex" wx:if='{{item.state_value==11}}'>
-                    <!-- 待付款 -->
-                    <view class="btn flex-c-c" catchtap='btnStatus' data-type='1' data-item='{{item}}' data-index='{{index}}'>取消订单</view>
-                    <view class="btn flex-c-c item" catchtap='commit' data-id='{{item.order_id}}' data-index='{{index}}'>立即支付</view>
-                </view>
-            </view>
-            <view class='is_bottom' wx:if='{{dataObj.total > 0 && is_bottom}}'>~没有更多了~</view>
-        </view>
-    </view>
-</view>
-<tui-modal show="{{showConfirmModal}}" custom padding="0rpx" width="600rpx" radius="16rpx">
-    <view class="modalCustom-coupon">
-        <view class="closeModal" bind:tap="hideConfirmModal">
-            <image class="icon" src="/static/icon/icon_modal_x.png" mode="aspectFill"></image>
-        </view>
-        <view class="newModalTitle space">确认要立即兑换该优惠券吗?</view>
-        <view class="newModalButtonBox flex-c-c">
-            <view class="mButton flex-c-c" bind:tap="onButtonActiveCode">确认</view>
-        </view>
-    </view>
-</tui-modal>
+<!--pages/index/pages/bonusShop/bonusShop.wxml-->
+<text>pages/index/pages/bonusShop/bonusShop.wxml</text>

BIN
pages/index/static/bonus_shop_bg.png


+ 1 - 1
pages/member/pages/membership/membership.wxml

@@ -1,6 +1,6 @@
 <view class="pageContainer" wx:if="{{!isLoading}}">
     <view class="post">
-        <image class="post-img" src="../../static/membership-post.png" mode="aspectFill"></image>
+        <image class="post-img" src="https://skyh.oss-cn-beijing.aliyuncs.com/default/test/membership-post.png" mode="aspectFill"></image>
         <view class="join-btn">
             <view class="btnItem flex-c-c" bind:tap="clickJoin">点击立即加盟</view>
         </view>

BIN
pages/member/static/membership-post.png


+ 1 - 1
pages/tabBar/index/index.wxml

@@ -44,7 +44,7 @@
                 <view class="benefitItem" bindtap="navigateTo" data-url="/pages/index/pages/riceCard/cardList/cardList">
                     <image class="back" lazy-load="{{true}}" src="/static/images/image_index_h1.png" mode="aspectFill"></image>
                 </view>
-                <view class="benefitItem" bindtap="navigateTo" data-url="/pages/index/pages/bonusShop/bonusShop">
+                <view class="benefitItem" bindtap="navigateTo" data-url="/pages/bonus/pages/bonusShop/bonusShop">
                     <image class="back" lazy-load="{{true}}" src="/static/images/image_index_h2.png" mode="aspectFill"></image>
                 </view>
             </view>

BIN
pages/user/static/image_addGroup_one.png


BIN
pages/user/static/image_addGroup_two.png


BIN
pages/user/static/image_pu_scc.png


BIN
pages/user/static/image_upgrade_back.png


+ 1 - 1
project.config.json

@@ -45,7 +45,7 @@
     },
     "compileType": "miniprogram",
     "libVersion": "2.20.1",
-    "appid": "wx1f365a1958760912 ",
+    "appid": "wx1f365a1958760912",
     "projectname": "lachang-wxapp",
     "simulatorType": "wechat",
     "simulatorPluginLibVersion": {},

+ 3 - 2
project.private.config.json

@@ -1,7 +1,8 @@
 {
     "setting": {
         "urlCheck": false,
-        "compileHotReLoad": true
+        "compileHotReLoad": true,
+        "bigPackageSizeSupport": false
     },
     "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
     "libVersion": "2.24.6",
@@ -17,7 +18,7 @@
                 },
                 {
                     "name": "bonus shop",
-                    "pathName": "pages/index/pages/bonusShop/bonusShop",
+                    "pathName": "pages/bonus/pages/bonusShop/bonusShop",
                     "query": "",
                     "launchMode": "default",
                     "scene": null

BIN
static/images/home_joinmembership.png