4
0

10 Коммитууд ee5a9182bd ... 4d9d6ed0c0

Эзэн SHA1 Мессеж Огноо
  文杰 4d9d6ed0c0 Merge branch 'dev' 4 долоо хоног өмнө
  文杰 5602d9ff8f 线上版本 4 долоо хоног өмнө
  文杰 3ca0ce1a9f 修改店铺 1 сар өмнө
  文杰 a9218a03f5 修改接口参数 1 сар өмнө
  文杰 cdf5a01990 修改渠道 1 сар өмнө
  文杰 03bab3b0f4 修改渠道 1 сар өмнө
  文杰 070bb191b2 接口添加字段 1 сар өмнө
  文杰 a4ddb43a32 修改bug 1 сар өмнө
  文杰 db5af04c2d 评论功能对接 1 сар өмнө
  文杰 bb57b93267 添加相似商品 1 сар өмнө
100 өөрчлөгдсөн 1743 нэмэгдсэн , 4315 устгасан
  1. 8 3
      app.js
  2. 3 12
      app.json
  3. 0 72
      components/coupon/coupon.js
  4. 0 4
      components/coupon/coupon.json
  5. 0 30
      components/coupon/coupon.wxml
  6. 0 118
      components/coupon/coupon.wxss
  7. 0 34
      components/loginPopup/loginPopup.js
  8. 0 4
      components/loginPopup/loginPopup.json
  9. 0 11
      components/loginPopup/loginPopup.wxml
  10. 0 54
      components/loginPopup/loginPopup.wxss
  11. BIN
      images/icon/coupon-banner.png
  12. BIN
      images/icon/coupon-bg.png
  13. BIN
      images/icon/coupon-ot.png
  14. BIN
      images/icon/coupon-received.png
  15. BIN
      images/icon/coupon-robbed.png
  16. BIN
      images/icon/coupon-used.png
  17. BIN
      images/icon/enough.png
  18. BIN
      images/icon/erweima.png
  19. BIN
      images/icon/flash-banner.png
  20. BIN
      images/icon/flash-bg.png
  21. BIN
      images/icon/group-banner.png
  22. BIN
      images/icon/menu-01.png
  23. BIN
      images/icon/menu-02.png
  24. BIN
      images/icon/menu-03.png
  25. BIN
      images/icon/menu-04.png
  26. BIN
      images/icon/miaosha.png
  27. BIN
      images/icon/spell-group-order.png
  28. BIN
      images/icon/thumb (1).png
  29. BIN
      images/icon/tuiguang01.png
  30. BIN
      images/icon/tuiguang02.png
  31. BIN
      images/icon/tuiguang03.png
  32. BIN
      images/icon/tuijian.png
  33. 1 3
      packageMemberIntegral/pages/convertProdDet/convertProdDet.json
  34. 0 1
      packageMemberIntegral/pages/convertProdDet/convertProdDet.wxml
  35. 2 2
      packageMemberIntegral/pages/integralIndex/integralIndex.js
  36. 0 1
      packageMemberIntegral/pages/integralSubmitOrder/integralSubmitOrder.json
  37. 74 13
      pages/Review/Review.js
  38. 27 18
      pages/Review/Review.wxml
  39. 13 0
      pages/Review/Review.wxss
  40. 22 1
      pages/afterSales/afterSales.js
  41. 6 0
      pages/afterSales/afterSales.wxml
  42. 14 0
      pages/afterSales/afterSales.wxss
  43. 49 4
      pages/basket/basket.js
  44. 15 4
      pages/basket/basket.wxml
  45. 66 8
      pages/basket/basket.wxss
  46. 39 78
      pages/category/category.js
  47. 2 2
      pages/category/category.wxml
  48. 98 35
      pages/category1/category.js
  49. 21 8
      pages/category1/category.wxml
  50. 51 0
      pages/category1/category.wxss
  51. 3 2
      pages/commResult/commResult.wxss
  52. 0 209
      pages/couponCenter/couponCenter.js
  53. 0 6
      pages/couponCenter/couponCenter.json
  54. 0 127
      pages/couponCenter/couponCenter.wxml
  55. 0 710
      pages/couponCenter/couponCenter.wxss
  56. 0 159
      pages/dis-center/dis-center.js
  57. 0 4
      pages/dis-center/dis-center.json
  58. 0 128
      pages/dis-center/dis-center.wxml
  59. 0 306
      pages/dis-center/dis-center.wxss
  60. 1 1
      pages/groupConfirmOrder/groupConfirmOrder.js
  61. 55 28
      pages/index/index.js
  62. 0 8
      pages/index/index.wxml
  63. 7 3
      pages/locationAdd/locationAdd.js
  64. 22 4
      pages/login/login.js
  65. 0 213
      pages/myCoupon/myCoupon.js
  66. 0 7
      pages/myCoupon/myCoupon.json
  67. 0 23
      pages/myCoupon/myCoupon.wxml
  68. 0 54
      pages/myCoupon/myCoupon.wxss
  69. 0 643
      pages/openAShop/openAShop.js
  70. 0 4
      pages/openAShop/openAShop.json
  71. 0 186
      pages/openAShop/openAShop.wxml
  72. 0 258
      pages/openAShop/openAShop.wxss
  73. 40 5
      pages/order-detail/order-detail.js
  74. 13 5
      pages/order-detail/order-detail.wxml
  75. 5 0
      pages/order-detail/order-detail.wxss
  76. 2 3
      pages/orderList/orderList.js
  77. 2 2
      pages/orderList/orderList.wxml
  78. 393 31
      pages/prod/prod.js
  79. 2 3
      pages/prod/prod.json
  80. 184 173
      pages/prod/prod.wxml
  81. 403 12
      pages/prod/prod.wxss
  82. 55 59
      pages/prodComm/prodComm.js
  83. 19 4
      pages/prodComm/prodComm.wxml
  84. 2 1
      pages/prodComm/prodComm.wxss
  85. 0 121
      pages/recent-news/recent-news.js
  86. 0 4
      pages/recent-news/recent-news.json
  87. 0 23
      pages/recent-news/recent-news.wxml
  88. 0 33
      pages/recent-news/recent-news.wxss
  89. 16 16
      pages/search-page/search-page.js
  90. 2 2
      pages/search-page/search-page.wxml
  91. 1 1
      pages/search-prod-show/search-prod-show.js
  92. 2 1
      pages/shopCategory/shopCategory.js
  93. 0 66
      pages/shopCollect/shopCollect.js
  94. 0 4
      pages/shopCollect/shopCollect.json
  95. 0 36
      pages/shopCollect/shopCollect.wxml
  96. 0 103
      pages/shopCollect/shopCollect.wxss
  97. 1 1
      pages/shopPage/shopPage.js
  98. 1 1
      pages/shopProds/shopProds.js
  99. 1 1
      pages/shopSearchResult/shopSearchResult.js
  100. 0 1
      pages/snapUpDetail/snapUpDetail.json

+ 8 - 3
app.js

@@ -6,9 +6,14 @@ App({
     http.getToken();
     //自定义导航栏 获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度)
     const windowInfo = wx.getWindowInfo()
-        let custom = wx.getMenuButtonBoundingClientRect()
-        this.globalData.statusBarHeight = windowInfo.statusBarHeight
-        this.globalData.navBarHeight = custom.height + (custom.top - windowInfo.statusBarHeight) * 2
+    let custom = wx.getMenuButtonBoundingClientRect()
+    this.globalData.statusBarHeight = windowInfo.statusBarHeight
+    this.globalData.navBarHeight = custom.height + (custom.top - windowInfo.statusBarHeight) * 2
+
+    // 默认店铺
+    if(!wx.getStorageSync('shopInfo')){
+      wx.setStorageSync('shopInfo',{shopName:'瑞果商链-“星闪豹”',shopId:1})
+    }
   },
   globalData: {
     // 定义全局请求队列

+ 3 - 12
app.json

@@ -4,7 +4,6 @@
     "pages/logs/logs",
     "pages/user/user",
     "pages/basket/basket",
-    "pages/myCoupon/myCoupon",
     "pages/category/category",
     "pages/category1/category",
     "pages/search-page/search-page",
@@ -18,10 +17,7 @@
     "pages/search-prod-show/search-prod-show",
     "pages/prod/prod",
     "pages/login/login",
-    "pages/couponCenter/couponCenter",
-    "pages/recent-news/recent-news",
     "pages/news-detail/news-detail",
-    "pages/dis-center/dis-center",
     "pages/my-users/my-users",
     "pages/income-details/income-details",
     "pages/take-notes/take-notes",
@@ -32,18 +28,13 @@
     "pages/withdrawal/withdrawal",
     "pages/claimer/claimer",
     "pages/confirmOrder/confirmOrder",
-    "pages/snapUpList/snapUpList",
-    "pages/snapUpDetail/snapUpDetail",
     "pages/prodComm/prodComm",
-    "pages/spellGoodsDetails/spellGoodsDetails",
     "pages/applyRefund/applyRefund",
     "pages/afterSales/afterSales",
     "pages/DetailsOfRefund/DetailsOfRefund",
     "pages/chooseRefundWay/chooseRefundWay",
     "pages/writeReturnLogistics/writeReturnLogistics",
     "pages/groupConfirmOrder/groupConfirmOrder",
-    "pages/shopCollect/shopCollect",
-    "pages/openAShop/openAShop",
     "pages/accountSettings/accountSettings",
     "pages/shopPage/shopPage",
     "pages/shopProds/shopProds",
@@ -94,9 +85,9 @@
   },
   "window": {
     "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#006CE8",
-    "navigationBarTitleText": "星闪豹",
-    "navigationBarTextStyle": "white"
+    "navigationBarBackgroundColor": "#FFF",
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "星闪豹"
   },
   "tabBar": {
     "selectedColor": "#04358D",

+ 0 - 72
components/coupon/coupon.js

@@ -1,72 +0,0 @@
-var http = require('../../utils/http.js');
-var util = require('../../utils/util.js');
-
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    item: Object,
-    type: Number,
-    order: Boolean,
-    canUse: Boolean,
-    index: Number,
-    showTimeType: Number
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    stsType: 4
-
-  },
-  // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
-  attached: function() {
-    //console.log(this.data.item);
-  },
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    receiveCoupon() {
-      util.checkAuthInfo(()=>{
-        var couponId = this.data.item.couponId;
-        http.request({
-          url: "/p/myCoupon/receive",
-          method: "POST",
-          data: couponId,
-          callBack: () => {
-            var coupon = this.data.item;
-            coupon.canReceive = false;
-            this.setData({
-              item: coupon
-            })
-          }
-        })
-      })
-    },
-    checkCoupon(e) {
-      this.data.item.choose = !this.data.item.choose
-      this.triggerEvent('checkCoupon', {
-        couponId: e.currentTarget.dataset.couponid,
-        index: this.data.index
-      });
-    },
-    /**
-     * 立即使用
-     */
-    useCoupon() {
-      var url = '/pages/prod-classify/prod-classify?sts=' + this.data.stsType;
-      var id = this.data.item.couponId;
-      var title = "优惠券活动商品";
-      if (id) {
-        url += "&tagid=" + id + "&title=" + title;
-      }
-      wx.navigateTo({
-        url: url
-      })
-
-    }
-  }
-})

+ 0 - 4
components/coupon/coupon.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 30
components/coupon/coupon.wxml

@@ -1,30 +0,0 @@
-<view class="coupon-item {{canUse?'':'gray'}}">
-  <view class='left'>
-    <view class="num" wx:if="{{item.couponType == 1 || item.couponType == 3}}">
-      ¥
-      <text class="coupon-price">{{item.reduceAmount}}</text>
-    </view>
-    <view class="num" wx:if="{{item.couponType == 2}}">
-      <text class="coupon-price">{{item.couponDiscount}}</text>折
-    </view>
-    <view class='condition'>
-      满{{item.cashCondition}}元可用
-    </view>
-  </view>
-  <view class='right'>
-    <view class="c-des">
-      <text class="c-type">{{item.suitableProdType==0?'通用':'商品'}}</text> {{item.suitableProdType==0?'全场通用':'指定商品可用'}}
-    </view>
-    <view class="c-date">
-      <text wx:if="{{showTimeType==1 && item.validTimeType==2}}" class="c-data-info">领券{{item.validDays}}天后失效</text>
-      <text wx:else class="c-data-info">{{item.startTime}}~{{item.endTime}}</text>
-      <text class="c-btn" wx:if="{{item.canReceive && !order}}" bindtap='receiveCoupon'>立即领取</text>
-      <text class="c-btn get-btn" wx:if="{{!item.canReceive && !order}}" bindtap='useCoupon'>立即使用</text>
-    </view>
-    <view wx:if="{{order && canUse}}" class="sel-btn">
-      <checkbox color="#eb2444" data-couponid="{{item.couponId}}" checked="{{item.choose}}" bindtap="checkCoupon"></checkbox>
-    </view>
-  </view>
-  <image class="tag-img" src="../../images/icon/coupon-used.png" wx:if="{{type==1}}"></image>
-  <image class="tag-img" src="../../images/icon/coupon-ot.png" wx:if="{{type==2}}"></image>
-</view>

+ 0 - 118
components/coupon/coupon.wxss

@@ -1,118 +0,0 @@
-.coupon-item{
-    margin: 15px 0;
-    position: relative;
-    box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
-    height: 95px;
-    background: #fff;
-}
-.coupon-item .left{
-      float: left;
-    color: #fff;
-    text-align: center;
-    border-left: 1px dashed #fff;
-    padding: 20px 0;
-    background: -webkit-gradient(linear,left top,right top,from(#F45C43),to(#eb2444));
-    background: -o-linear-gradient(left,#F45C43,#eb2444);
-    background: linear-gradient(left,#F45C43,#eb2444);
-    background: -webkit-linear-gradient(left,#F45C43,#eb2444);
-    width: 260rpx;
-    height: 55px;
-}
-.coupon-item .left .num{
-  font-weight:600;
-  font-size:36rpx;
-  height:70rpx;
-  line-height:70rpx;
-  font-family:arial;
-}
-.coupon-item .left .num .coupon-price{
-      font-size: 72rpx;
-    line-height: 72rpx;
-        display: inline-block;
-    font-family: arial;
-}
-.coupon-item .left .condition{
-    font-size: 28rpx;
-    line-height: 28rpx;
-    display: block;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    padding: 0 2px;
-    font-family: arial;
-}
-.coupon-item .right{
-  margin-left: 280rpx;
-    padding: 5px;
-    position: relative;
-}
-.coupon-item .right .c-des{
-  height: 30px;
-    font-size: 26rpx;
-    line-height: 30px;
-    overflow: hidden;
-    font-weight: 600;
-}
-.coupon-item .right .c-des .c-type{
-  font-size: 24rpx;
-    background: #fdf0f0;
-    color: #e43130;
-    border-radius: 8px;
-    padding:3px 10px;
-}
-.coupon-item .right .c-date{
-  font-size: 24rpx;
-  margin-top:25px;
-}
-.coupon-item .right .c-date .c-data-info{
-  font-family: arial;
-}
-.coupon-item .right .c-date .c-btn{
-    position: absolute;
-    bottom:0;
-    right:10px;
-    color: #fff;
-    font-size: 24rpx;
-    font-family: arial;
-    border-radius: 14px;
-    padding:3px 7px;
-    /* background: -webkit-gradient(linear,left top,right top,from(#6c96da),to(#6b83d7));
-    background: -o-linear-gradient(left,#6c96da,#6b83d7);
-    background: linear-gradient(left,#6c96da,#6b83d7);
-    background: -webkit-linear-gradient(left,#6c96da,#6b83d7); */
-    background: #e43130;
-    border: 1px solid #e43130;
-}
-
-.coupon-item .right .c-date .c-btn.get-btn{
-  background: #fff;
-  border: 1px solid #e43130;
-  color:#e43130;
-}
-
-.coupon-item.gray .left{
-  background: #bbb;
-}
-
-.coupon-item.gray .right .c-des .c-type{
-  background: #bbb;
-    color: #fff;
-}
-
-.coupon-item.gray .right .c-date .c-btn{
-  display: none;
-}
-
-.coupon-item .tag-img{
-  position: absolute;
-  top:0;
-  right:0;
-  width:120rpx;
-  height:120rpx;
-}
-
-.coupon-item .sel-btn{
-  position:absolute;
-  right:10px;
-  top:35px;
-}

+ 0 - 34
components/loginPopup/loginPopup.js

@@ -1,34 +0,0 @@
-var http = require("../../utils/http.js");
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    isAuthInfo:Boolean
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    /**
-      * 获取用户信息
-      */
-    onGetUserInfo: function (e) {
-      this.triggerEvent('onGotUserInfo',e.detail);
-    },
-
-    hidePopup:function(){
-      this.setData({
-        isAuthInfo:true
-      });
-    }
-  }
-})

+ 0 - 4
components/loginPopup/loginPopup.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 11
components/loginPopup/loginPopup.wxml

@@ -1,11 +0,0 @@
-<!-- 提示登录弹框 -->
-<view class="login-popup" wx:if="{{!isAuthInfo}}">
-  <view class="log-pop-main">
-    <view class="log-pop-tit">欢迎来到星闪豹</view>
-    <view class="log-pop-msg">请授权登录,获得完整购物体验</view>
-    <view class="log-pop-btns">
-      <button class="log-pop-no" bindtap="hidePopup">取消</button>
-      <button class="log-pop-ok"  open-type="getUserInfo" lang = "zh_CN" bindgetuserinfo = "onGetUserInfo">确定</button>
-    </view>
-  </view>
-</view>

+ 0 - 54
components/loginPopup/loginPopup.wxss

@@ -1,54 +0,0 @@
-/* components/loginPopup/loginPopup.wxss */
-.login-popup{
-  background: rgba(0, 0, 0, 0.5);
-  width:100%;
-  height:100%;
-  position: fixed;
-  top:0;
-  left:0;
-  z-index: 1000;
-}
-.log-pop-main{
-  position: absolute;
-  background: #fff;
-  bottom:50rpx;
-  width:570rpx;
-  height:200rpx;
-  left:50rpx;
-  right:0;
-  padding:40rpx;
-  padding-top:20rpx;
-  border-radius: 10rpx;
-}
-.log-pop-tit{
-  font-size: 34rpx;
-  font-weight: bold;
-  height:80rpx;
-  line-height: 80rpx;
-}
-.log-pop-msg {
-  font-size: 28rpx;
-  height:60rpx;
-  line-height: 60rpx;
-}
-.log-pop-btns{
-  display: flex;
-  height:90rpx;
-  line-height: 90rpx;
-}
-
-.log-pop-btns button{
-  background: #fff;
-  font-size: 30rpx;
-  height:90rpx;
-  line-height: 90rpx;
-}
-.log-pop-btns button::after{
-  border:0;
-}
-.log-pop-no{
-  color:#999;
-}
-.log-pop-ok{
-  color:red;
-}

BIN
images/icon/coupon-banner.png


BIN
images/icon/coupon-bg.png


BIN
images/icon/coupon-ot.png


BIN
images/icon/coupon-received.png


BIN
images/icon/coupon-robbed.png


BIN
images/icon/coupon-used.png


BIN
images/icon/enough.png


BIN
images/icon/erweima.png


BIN
images/icon/flash-banner.png


BIN
images/icon/flash-bg.png


BIN
images/icon/group-banner.png


BIN
images/icon/menu-01.png


BIN
images/icon/menu-02.png


BIN
images/icon/menu-03.png


BIN
images/icon/menu-04.png


BIN
images/icon/miaosha.png


BIN
images/icon/spell-group-order.png


BIN
images/icon/thumb (1).png


BIN
images/icon/tuiguang01.png


BIN
images/icon/tuiguang02.png


BIN
images/icon/tuiguang03.png


BIN
images/icon/tuijian.png


+ 1 - 3
packageMemberIntegral/pages/convertProdDet/convertProdDet.json

@@ -1,8 +1,6 @@
 {
   "usingComponents": {
-    "coupon": "/components/coupon/coupon",
-    "comm-star": "/components/commStar/commStar",
-    "login-popup": "/components/loginPopup/loginPopup"
+    "comm-star": "/components/commStar/commStar"
   },
   "navigationBarTitleText": "积分兑换商品详情"
 }

+ 0 - 1
packageMemberIntegral/pages/convertProdDet/convertProdDet.wxml

@@ -112,4 +112,3 @@
 
 <wxs module="wxs" src="../../../wxs/number.wxs" />
 
-<!-- <login-popup bind:onGotUserInfo="onGotUserInfo" isAuthInfo="{{isAuthInfo}}"></login-popup> -->

+ 2 - 2
packageMemberIntegral/pages/integralIndex/integralIndex.js

@@ -58,7 +58,7 @@ Page({
       url: '/p/score/scoreInfo',
       method: 'GET',
       data: {
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: res => {
         this.setData({
@@ -79,7 +79,7 @@ Page({
       data: {
         current: this.data.current,
         size: 10,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: (res) => {
         wx.hideLoading()

+ 0 - 1
packageMemberIntegral/pages/integralSubmitOrder/integralSubmitOrder.json

@@ -1,6 +1,5 @@
 {
   "usingComponents": {
-    "coupon": "/components/coupon/coupon"
   },
   "backgroundTextStyle": "light",
   "navigationBarTitleText": "积分商品提交订单"

+ 74 - 13
pages/Review/Review.js

@@ -1,35 +1,82 @@
 // pages/Review.js
+var http = require('../../utils/http.js');
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    current:1,
+    pages:0,
+    list:[]
   },
 
-  getList(){},
-
-   /**
-   * 评价图片预览
-   */
+  /**
+ * 评价图片预览
+ */
   comPicPreView(e){
     var idx = e.currentTarget.dataset.idx
-    var urls = []
-    this.data.orderItemInfo.images.forEach(el => {
-      urls.push(el.url)
-    })
+    var urls = e.currentTarget.dataset.pics
+  
     wx.previewImage({
       current: urls[idx],
       urls: urls
     })
   },
 
+  // 获取列表
+  getList(){
+    http.request({
+      url: "/p/prodComm/myCommList",
+      method: "GET",
+      data: {
+        current: this.data.current,
+        size: 10,
+      },
+      callBack: (res) => {
+
+          if(res.records&&res.records.length){
+            let list = []
+            let img = ''
+            res.records.map(e => {
+              if(e.pics){
+                img = e.pics.split(',')
+                e.pics = img
+              }
+            })
+            if (this.data.current == 1) {
+              list = res.records
+              this.setData({
+                list: res.records,
+                pages: res.pages,
+                current: res.current
+              });
+            } else {
+              list = this.data.list
+              list.push(...res.records)
+              this.setData({
+                list
+              })
+            }
+            console.log(list.length,res.total);
+            if (list.length >= res.total) {
+              this.setData({
+                isAll: true
+              })
+            }
+          }
+          
+        
+      }
+    })
+
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-
+    this.getList()
   },
 
   /**
@@ -70,8 +117,22 @@ Page({
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom() {
-    this.getList()
+  onReachBottom: function () {
+    this.getNextPage()
+  },
+  // 触底加载下一页
+  getNextPage() {
+    console.log('getNextPage',this.data.current);
+    if (this.data.pages > this.data.current) {
+      this.setData({
+        current: this.data.current + 1
+      })
+      this.getList()
+    } else {
+      this.setData({
+        isAll: true
+      })
+    }
   },
 
   /**

+ 27 - 18
pages/Review/Review.wxml

@@ -1,50 +1,59 @@
 <view class="review">
-   <view class="item">
+  <view wx:if="{{list.length>0}}">
+   <view class="item" wx:for="{{list}}">
         <view class="goods-box">
           <view class="shop-info">
             <image src="../../images/icon/shop.png" mode="" class="icon"/>
-            <view class="shop-name">中数超市(富力中心店)</view>
+            <view class="shop-name">{{item.shopName}}</view>
           </view>
 
           <view class="relative">
             <scroll-view class="goods-list"  scroll-x="true">
-              <view class="img"></view>
-              <!-- <image src="{{item}}" mode="aspectFill"  class="img" wx:for="{{}}" data-idx="{{index}}" bind:tap="comPicPreView"/> -->
+              <image src="{{prod.column}}" mode="aspectFill"  class="img" wx:for="{{item.orderItems}}" wx:for-item="prod" wx:for-index="d" data-idx="{{d}}" bind:tap="comPicPreView"/>
             </scroll-view>
               <view class="total-box">
-                <view class="price">¥13.95</view>
-                <view class="num">共5件</view>
+                <view class="price">¥{{item.totalPrice}}</view>
+                <view class="num">共{{item.totalCount}}件</view>
               </view>
           </view>
         </view>
         <view class="comment">
           <view class="info">
             <view class="user-info">
-              <view class="head"></view>
-              <view class="name">饼饼</view>
+              <image src="{{item.avatar}}" mode="" class="head" />
+              <view class="name">{{item.nickName}}</view>
             </view>
-            <view class="time">03-20</view>
+            <view class="time">{{item.recTime}}</view>
           </view>
           <view class="score-box">
-            <view class="num">4.0</view>
-            <image class="star" wx:for="{{4}}" src="../../images/icon/star-red.png" mode=""/>
+            <view class="num">{{item.score}}.0</view>
+            <image class="star" wx:for="{{item.score}}" src="../../images/icon/star-red.png" mode=""/>
           </view>
 
           <view class="content">
-            <view class="desc">这个大闸蟹非常好,非常新鲜,秋季正是吃大闸蟹的
-  好时候</view>
+            <view class="desc">{{item.content}}</view>
 
               <view class="img-box">
-                <view class="img"></view>
-                <view class="img"></view>
-                <view class="img"></view>
+                <image bind:tap="comPicPreView" data-pics="{{item.pics}}" data-idx="{{d}}" wx:for="{{item.pics}}" wx:for-item="i" wx:for-index="d" src="{{i}}" mode="" class="img" />
               </view>
 
-              <view class="reply">
+              <view class="reply" wx:if="{{item.replyContent}}">
                 <view class="label">平台回复</view>
-                <view class="value">谢谢您的评价,我们会做得更好</view>
+                <view class="value">{{item.replyContent}}</view>
               </view>
           </view>
         </view>
    </view>
+  </view>
+   <block wx:else>
+      <view style="height: 500rpx;">
+        <van-empty  description="你还没有评论哦" />
+      </view>
+    </block>
+   <block wx:if="{{list.length>0}}">
+    <view class="tips" wx:if="{{isAll}}">已经到底咯~</view>
+    <view class="loading-box" wx:else>
+      <van-loading size="20px" type="spinner" color="#006CE8">加载中...</van-loading>
+    </view>
+  </block>
 </view>

+ 13 - 0
pages/Review/Review.wxss

@@ -168,4 +168,17 @@
   font-size: 24rpx;
   color: #222222;
   margin-left: 20rpx;
+}
+
+.tips {
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+.loading-box{
+  text-align: center;
+  line-height: 80rpx;
+  height: 80rpx;
 }

+ 22 - 1
pages/afterSales/afterSales.js

@@ -11,6 +11,7 @@ Page({
     pages: 0,
     startTime: '',  //开始时间
     endTime: '',  //结束时间
+    isAll:false
     //orderItems: '',  //订单项
   },
 
@@ -51,6 +52,11 @@ Page({
           list = this.data.list;
           Array.prototype.push.apply(list, res.records);
         }
+        if (list.length >= res.total) {
+          this.setData({
+            isAll: true
+          })
+        }
         this.setData({
           list: list,
           pages: res.pages,
@@ -167,11 +173,26 @@ Page({
 
   },
 
+  // 触底加载下一页
+  getNextPage() {
+    console.log('getNextPage',this.data.current);
+    if (this.data.pages > this.data.current) {
+      this.setData({
+        current: this.data.current + 1
+      })
+      this.myRefundOrder()
+    } else {
+      this.setData({
+        isAll: true
+      })
+    }
+  },
+  
   /**
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
-
+    this.getNextPage()
   },
 
   /**

+ 6 - 0
pages/afterSales/afterSales.wxml

@@ -79,6 +79,12 @@
       </view>
       <view class="empty-text">还没有退款/售后相关订单~</view>
     </view>
+    <block wx:if="{{list.length>0}}">
+      <view class="tips" wx:if="{{isAll}}">已经到底咯~</view>
+      <view class="loading-box" wx:else>
+        <van-loading size="20px" type="spinner" color="#006CE8">加载中...</van-loading>
+      </view>
+    </block>
     
   </view>
 </view>

+ 14 - 0
pages/afterSales/afterSales.wxss

@@ -210,4 +210,18 @@ image {
 }
 
 
+.tips {
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+.loading-box{
+  text-align: center;
+  line-height: 80rpx;
+  height: 80rpx;
+}
+
+
 

+ 49 - 4
pages/basket/basket.js

@@ -171,7 +171,7 @@ Page({
     }
     wx.setStorageSync("basketIds", JSON.stringify(basketIds));
     wx.navigateTo({
-      url: '/pages/submit-order/submit-order?orderEntry=0',
+      url: '/pages/submit-order/submit-order?orderEntry=0&shopId='+arr[0].shopId,
     })
   },
 
@@ -198,7 +198,9 @@ Page({
       for (var i = 0; i < shopCartItemDiscounts.length; i++) {
         var cItems = shopCartItemDiscounts[i].shopCartItems;
         for (var j = 0; j < cItems.length; j++) {
-          cItems[j].checked = allChecked;
+          if(cItems[j].isDelete == 0&&cItems[j].stock>0){
+            cItems[j].checked = allChecked;
+          }
         }
       }
 
@@ -218,6 +220,11 @@ Page({
     var index = e.currentTarget.dataset.index; // 获取data- 传进来的index
     var scindex = e.currentTarget.dataset.scindex;
     var topindex = e.currentTarget.dataset.topindex;
+    var stock = e.currentTarget.dataset.stock;
+    if(stock == 0){
+      return
+    }
+   
 
     var shopCartOrders = this.data.shopCartOrders;
     var shopCartItemDiscounts = shopCartOrders[topindex].shopCartItemDiscounts; // 获取购物车列表
@@ -252,7 +259,9 @@ Page({
     shopCartOrders[topindex].shopCartItemDiscounts.forEach(shopCartItem => {
       var cItems = shopCartItem.shopCartItems;
       for (var j = 0; j < cItems.length; j++) {
-        cItems[j].checked = !checked;
+        if(cItems[j].isDelete == 0&&cItems[j].stock>0){
+          cItems[j].checked = !checked;
+        }
       }
     })
     this.setData({
@@ -378,9 +387,15 @@ Page({
         prodId: shopCartItemDiscounts[scindex].shopCartItems[index].prodId,
         skuId: shopCartItemDiscounts[scindex].shopCartItems[index].skuId,
         shopId: shopCartItemDiscounts[scindex].shopCartItems[index].shopId,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: function (res) {
+        if(res.code == 500){
+          return wx.showToast({
+            title:res.msg,
+            icon:'none'
+          })
+        }
         shopCartItemDiscounts[scindex].shopCartItems[index].prodCount += prodCount;
         ths.setData({
           shopCartOrders: shopCartOrders
@@ -395,6 +410,36 @@ Page({
     };
     http.request(params);
   },
+  /**
+   * 删除购物车单个商品
+   */
+  onDelProd: function (e) {
+    var ths = this;
+    let basketId = e.currentTarget.dataset.basketid
+      wx.showModal({
+        title: '',
+        content: '确认要删除选中的商品吗?',
+        confirmColor: "#eb2444",
+        success(res) {
+          if (res.confirm) {
+            wx.showLoading({
+              mask: true
+            });
+            var params = {
+              url: "/p/shopCart/deleteItem",
+              method: "DELETE",
+              data: [basketId],
+              callBack: function (res) {
+                wx.hideLoading();
+                ths.onShow();
+              }
+            };
+            http.request(params);
+          }
+        }
+      })
+
+  },
 
   /**
    * 删除购物车商品

+ 15 - 4
pages/basket/basket.wxml

@@ -29,17 +29,24 @@
 						<!-- 商品item -->
 						<block wx:for="{{item.shopCartItems}}" wx:key='index' wx:for-item="prod">
 							<view class="goods-item">
+              <view class="disable" wx:if="{{prod.isDelete == 1}}"></view>
 								<!-- 商品信息 -->
 								<view class='item'>
 									<view class="btn">
 										<label>
-											<checkbox bindtap='onSelectedItem' data-topindex="{{topIndex}}" data-scindex="{{scIndex}}" data-index="{{index}}" value="{{prod.prodId}}" checked="{{prod.checked}}" color="#105c3e" />
+											<checkbox bindtap='onSelectedItem' data-topindex="{{topIndex}}" data-scindex="{{scIndex}}" data-index="{{index}}" data-stock="{{prod.stock}}" value="{{prod.prodId}}" checked="{{prod.checked}}" color="#105c3e" />
 										</label>
 									</view>
 									<view class='prodinfo'>
-										<view class="pic" bindtap="toProdPage" data-prodid="{{prod.prodId}}">
+                    <view class="pic-box">
+                      <image class="pic" src="{{prod.pic}}" mode="" bindtap="toProdPage" data-prodid="{{prod.prodId}}" />
+                      <view class="sell-out" wx:if="{{prod.stock == 0}}">
+                        <view class="sell-out-text">已售罄</view>
+                      </view>
+                    </view>
+										<!-- <view class="pic" bindtap="toProdPage" data-prodid="{{prod.prodId}}">
 											<image src='{{prod.pic}}' />
-										</view>
+										</view> -->
 										<view class="opt">
 											<view class='prod-name'>{{prod.prodName}}</view>
 											<view class="prod-center-row">
@@ -49,7 +56,7 @@
 												</view>
 												<view class='prod-info-text {{prod.skuName?"":"empty-n"}}' wx:if="{{prod.skuName}}">{{prod.skuName}}</view>
 											</view>
-											<view class='price-count'>
+											<view class='price-count' wx:if="{{prod.isDelete == 0}}">
 												<view class='price'>
 													<text class=''>¥</text>
 													<text class=''>{{wxs.parsePrice(prod.price)[0]}}</text>
@@ -61,6 +68,10 @@
                           <image bindtap='onCountPlus' class="btn" data-topindex="{{topIndex}}" data-scindex="{{scIndex}}" data-index="{{index}}" src="/images/icon/add.png" mode=""/>
 												</view>
 											</view>
+                      <view class="del-box" wx:else>
+                          <view class="del-label">商品已被删除</view>
+                          <view class="del-btn" bindtap='onDelProd' data-basketid="{{prod.basketId}}">删除</view>
+                      </view>
 										</view>
 									</view>
 								</view>

+ 66 - 8
pages/basket/basket.wxss

@@ -111,6 +111,16 @@ page {
 .shop-item .prod-block .goods-item {
   position: relative;
 }
+.shop-item .prod-block .goods-item .disable{
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(255,255,255,0.6);
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+  z-index: 4;
+}
 
 .shop-item .prod-block.discount .goods-item::after{
   position: absolute;
@@ -144,20 +154,42 @@ page {
   margin-left: 10rpx;
 }
 
-.shop-item .prod-block .item .prodinfo .pic {
-  text-align: center;
+.shop-item .prod-block .item .prodinfo .pic-box{
+  position: relative;
+}
+.shop-item .prod-block .item .prodinfo .pic{
   width: 200rpx;
   height: 200rpx;
-  line-height: 180rpx;
-  font-size: 0;
+  background: #F6F6F6;
+  border-radius: 16rpx;
+  flex-shrink: 0;
+  margin: 20rpx 0;
 }
 
-.shop-item .prod-block .item .prodinfo .pic image {
-  width: 100%;
-  height: 100%;
-  border-radius: 16rpx;
+.shop-item .prod-block .item .prodinfo .sell-out{
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 200rpx;
+  height: 240rpx;
+  background: rgba(255,255,255,0.6);
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.shop-item .prod-block .item .prodinfo .sell-out-text{
+  width: 112rpx;
+  height: 36rpx;
+  line-height: 36rpx;
+  text-align: center;
+  background: rgba(0,0,0,0.6);
+  border-radius: 18rpx 18rpx 18rpx 18rpx;
+  font-size: 24rpx;
+  color: #FFFFFF
 }
 
+
 .shop-item .prod-block .item .prodinfo .opt {
   margin-left: 20rpx;
   flex: 1;
@@ -232,6 +264,31 @@ page {
 .shop-item .prod-block .item .prodinfo .opt .prod-center-row .prod-info-text.empty-n {
   display: none;
 }
+.shop-item .prod-block .item .prodinfo .opt .del-box{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  height: 56rpx;
+  margin-top: 20rpx;
+  
+}
+.shop-item .prod-block .item .prodinfo .opt .del-box .del-label{
+  font-size: 28rpx;
+  color: #222222;
+}
+
+.shop-item .prod-block .item .prodinfo .opt .del-box .del-btn{
+  width: 128rpx;
+  height: 44rpx;
+  line-height: 44rpx;
+  text-align: center;
+  background: #006CE8;
+  border-radius: 22rpx 22rpx 22rpx 22rpx;
+  font-size: 24rpx;
+  color: #FFFFFF;
+  position: relative;
+  z-index: 5;
+}
 
 .shop-item .prod-block .item .prodinfo .opt .price-count {
   display: flex;
@@ -244,6 +301,7 @@ page {
   color: #FF4D3A;
 }
 
+
 /* 加减框 */
 /* .car-box .item .info .price-box .num-box{ */
   .num-box{

+ 39 - 78
pages/category/category.js

@@ -54,9 +54,15 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    
+    console.log('onload');
     this.getRecommended()
-    this.get_neighborShop()
+    // this.get_neighborShop()
+    this.setData({
+      shopId:wx.getStorageSync('shopInfo').shopId
+    })
+    this.resetData()
+    this.get_categoryInfo(wx.getStorageSync('shopInfo').shopId)
+    this.getCarData(wx.getStorageSync('shopInfo').shopId)
     // this.get_categoryInfo()
   },
   scroll(){
@@ -123,6 +129,7 @@ Page({
   },
   resetData(){
     this.setData({
+      productList:[],
       subIndex:0,
       thridIndex:-1,
       subCategoryId:0,
@@ -140,11 +147,11 @@ Page({
         "prodId": item.prodId,
         "shopId": item.shopId,
         "skuId": item.skuId||item.skuList[0].skuId,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       }
       this.changeCar(data)
       if(type == 'add'){
-        // this.addAnimate(e)
+        this.addAnimate(e)
       }
     })
   },
@@ -185,58 +192,7 @@ Page({
     })
   },
 
-  // 获取点击位置和购物车位置
-  getNodePositions(index) {
-    const query = wx.createSelectorQuery().in(this);
-
-    // 1. 获取"加入购物车"按钮的位置(动画起始点)
-    query.select(`.product-item:nth-child(${index + 1}) .info .price-box .test`).boundingClientRect(btnRect => {
-      if (!btnRect) return; // 容错:防止节点未找到
-      const startX = btnRect.left + btnRect.width / 2 - 20; // 20 = 40rpx/2(图标宽高)
-      const startY = btnRect.top + btnRect.height / 2 - 20;
-
-      // 2. 获取购物车位置(动画结束点)
-      query.select('.bottom-box .left .icon').boundingClientRect(cartRect => {
-        if (!cartRect) return;
-        const endX = cartRect.left + cartRect.width / 2 - 20;
-        const endY = cartRect.top + cartRect.height / 2 - 20;
-
-        // 3. 计算抛物线中间点(控制弧度)
-        const midX = (startX + endX) / 2;
-        const midY = startY - 80; // 向上凸起80px,可调整弧度
-
-        // 4. 创建动画图标
-        this.createAnimationIcon(startX, startY, midX, midY, endX, endY);
-      }).exec();
-    }).exec();
-  },
-
-  // 创建抛物线动画(数据驱动,无DOM操作)
-  createAnimationIcon(startX, startY, midX, midY, endX, endY) {
-    // 生成唯一ID,避免key冲突
-    const iconId = Date.now() + Math.floor(Math.random() * 1000);
-    const newIcon = {
-      id: iconId,
-      startX,
-      startY,
-      midX,
-      midY,
-      endX,
-      endY
-    };
-
-    // 添加动画图标到数组(自动渲染)
-    this.setData({
-      animationIcons: [...this.data.animationIcons, newIcon]
-    });
-
-    // 动画结束后移除图标+更新购物车
-    setTimeout(() => {
-      this.setData({
-        animationIcons: this.data.animationIcons.filter(icon => icon.id !== iconId),
-      });
-    }, 700); // 与动画时长保持一致(0.7s)
-  },
+  
   
   handleAll(){
     this.setData({
@@ -270,7 +226,7 @@ Page({
       data: {
         lat: wx.getStorageSync('LATITUDE'),
         lon: wx.getStorageSync('LONGITUDE'),
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: (res) => {
         // this.get_categoryInfo(res)
@@ -290,8 +246,13 @@ Page({
     //加载分类列表
     var params = {
       // url: "/category/categoryInfo",
-      url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+      // url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+      url: "/category/listCategoryForUser",
       method: "GET",
+      data:{
+        shopId:this.data.testShopId||shopid,
+        channelId:wx.getStorageSync('channelId')||3,
+      },
       callBack: function (res) {
         ths.setData({
           categoryList: res,
@@ -371,24 +332,23 @@ Page({
    */
   onShow: function () {
     console.log('show');
-    if(this.data.shopId){
+
+    
+    
+    
+    // 每次重新加载
+    if(this.data.shopId != wx.getStorageSync('shopInfo').shopId){
+      console.log('店铺切换了 刷新');
+      this.setData({
+        shopId:wx.getStorageSync('shopInfo').shopId
+      })
+      this.resetData()
+      this.get_categoryInfo(wx.getStorageSync('shopInfo').shopId)
+      this.getCarData(wx.getStorageSync('shopInfo').shopId)
+      // this.get_neighborShop()
+    }else if(this.data.shopId){
       this.getCarData(this.data.shopId)
     }
-    // if (getApp().globalData.categoryId) {
-    //   let categoryId = getApp().globalData.categoryId
-    //   let index = getApp().globalData.index
-    //   let pic = getApp().globalData.pic
-
-    //   this.setData({
-    //     categoryImg: pic,
-    //     selIndex: index
-    //   });
-    // }else{
-    // this.get_neighborShop()
-    // }
-    // 之前逻辑 每次重新加载
-    // this.resetData()
-    // this.get_neighborShop()
 
   },
 
@@ -536,7 +496,7 @@ Page({
         orderBy:this.data.paramsObj.orderBy,
         sort:this.data.paramsObj.sort,
         isAllProdType: true,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3,
         // lat: wx.getStorageSync('LATITUDE'),
         // lon: wx.getStorageSync('LONGITUDE'),
         // distance: wx.getStorageSync('DISTANCE') || 0
@@ -581,6 +541,7 @@ Page({
         categoryId,
         current: 1,
         size: 999999,
+        channelId:wx.getStorageSync('channelId')||3,
         shopId:this.data.testShopId||this.data.shopId
       },
       callBack: (res) => {
@@ -730,10 +691,10 @@ Page({
    */
   toProdPage: function (e) {
     var prodid = e.currentTarget.dataset.prodid;
-    console.log(22222222,e);
+    var shopid = e.currentTarget.dataset.shopid;
     if (prodid) {
       wx.navigateTo({
-        url: '/pages/prod/prod?prodid=' + prodid,
+        url: `/pages/prod/prod?prodid=${prodid}&shopid=${shopid}`,
       })
     }
   },
@@ -747,7 +708,7 @@ Page({
     })
     wx.setStorageSync("basketIds", JSON.stringify(basketIds));
     wx.navigateTo({
-      url: '/pages/submit-order/submit-order?orderEntry=0',
+      url: '/pages/submit-order/submit-order?orderEntry=0&shopId='+this.data.carData[0].shopId,
     })
   }
 

+ 2 - 2
pages/category/category.wxml

@@ -121,7 +121,7 @@
       </view>
       <scroll-view class="right-box"  scroll-y="true" 	enable-passive 	upper-threshold="10" 	lower-threshold="10"  scroll-top="{{topHeight}}" bindscroll="scroll" bindscrolltoupper="scrollTop" bindscrolltolower="scrollBottom">
         <view style="height:20px"></view>
-        <view class="product-item" id="{{'test'+index}}" data-index="{{index}}" wx:for="{{productList}}" data-prodId="{{item.prodId}}" bind:tap="toProdPage">
+        <view class="product-item" id="{{'test'+index}}" data-index="{{index}}" wx:for="{{productList}}" data-prodId="{{item.prodId}}" data-shopId="{{item.shopId}}" bind:tap="toProdPage">
         <view class="pic-box">
           <image class="pic" src="{{item.pic}}" mode="" />
           <view class="sell-out" wx:if="{{item.totalStocks == 0}}">
@@ -129,7 +129,7 @@
           </view>
         </view>
           <view class="info">
-            <view class="title" data-prodId="{{item.prodId}}" bind:tap="toProdPage">{{item.prodName}}</view>
+            <view class="title" data-prodId="{{item.prodId}}"  data-shopId="{{item.shopId}}" bind:tap="toProdPage">{{item.prodName}}</view>
               <view class="salesVolume">已售{{item.salesVolume||0}}</view>
             <view class="price-box">
               <view class="price">¥{{item.price}}</view>

+ 98 - 35
pages/category1/category.js

@@ -41,15 +41,28 @@ Page({
     topCurrentIndex: 0,
     productList:[],
     carData:[],//购物车数据
+    animateInfo:{
+      startX:99999,
+      startY:0,
+      endX:0,
+      endY:0,
+    },
+    move:false
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    
+    console.log('onload');
     this.getRecommended()
-    this.get_neighborShop()
+    // this.get_neighborShop()
+    this.setData({
+      shopId:wx.getStorageSync('shopInfo').shopId
+    })
+    this.resetData()
+    this.get_categoryInfo(wx.getStorageSync('shopInfo').shopId)
+    this.getCarData(wx.getStorageSync('shopInfo').shopId)
     // this.get_categoryInfo()
   },
   scroll(){
@@ -116,6 +129,7 @@ Page({
   },
   resetData(){
     this.setData({
+      productList:[],
       subIndex:0,
       thridIndex:-1,
       subCategoryId:0,
@@ -123,19 +137,63 @@ Page({
   },
   // 点击购物车内加减按钮
   handleNum(e){
-    let {num,item} = e.currentTarget.dataset
-    console.log(num,item);
-    let data = {
-      "basketId": item.basketId||0,
-      "count": num,
-      "distributionCardNo": item.distributionCardNo||'',
-      "prodId": item.prodId,
-      "shopId": item.shopId,
-      "skuId": item.skuId||item.skuList[0].skuId,
-      platform:1
+    // 查看是否授权
+    util.checkAuthInfo(()=>{
+      let {num,item,type,index} = e.currentTarget.dataset
+      let data = {
+        "basketId": item.basketId||0,
+        "count": num,
+        "distributionCardNo": item.distributionCardNo||'',
+        "prodId": item.prodId,
+        "shopId": item.shopId,
+        "skuId": item.skuId||item.skuList[0].skuId,
+        channelId:wx.getStorageSync('channelId')||3
+      }
+      this.changeCar(data)
+      if(type == 'add'){
+        this.addAnimate(e)
+      }
+    })
+  },
+  addAnimate(e){
+    let startX = e.touches[0].clientX-10
+    let startY = e.touches[0].clientY-10
+    const query = wx.createSelectorQuery().in(this);
+    query.select('.bottom-box .left .icon').boundingClientRect(cartRect => {
+      console.log(222222,cartRect);
+      if (!cartRect) return;
+      let animateInfo = {
+        startX,
+        startY,
+        endX:cartRect.left,
+        endY:cartRect.bottom,
+      }
+      this.setData({
+        move:true,
+        animateInfo
+      })
+      console.log(animateInfo);
+    }).exec();
+
+   
+  
+  },
+  endAnimate(){
+    console.log('ddddd');
+    let animateInfo = {
+      startX:9999,
+      startY:0,
+      endX:0,
+      endY:0,
     }
-    this.changeCar(data)
+    this.setData({
+      move:false,
+      animateInfo
+    })
   },
+
+  
+  
   handleAll(){
     this.setData({
       show:true
@@ -168,7 +226,7 @@ Page({
       data: {
         lat: wx.getStorageSync('LATITUDE'),
         lon: wx.getStorageSync('LONGITUDE'),
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: (res) => {
         // this.get_categoryInfo(res)
@@ -188,8 +246,13 @@ Page({
     //加载分类列表
     var params = {
       // url: "/category/categoryInfo",
-      url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+      // url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+      url: "/category/listCategoryForUser",
       method: "GET",
+      data:{
+        shopId:this.data.testShopId||shopid,
+        channelId:wx.getStorageSync('channelId')||3,
+      },
       callBack: function (res) {
         ths.setData({
           categoryList: res,
@@ -269,24 +332,23 @@ Page({
    */
   onShow: function () {
     console.log('show');
-    if(this.data.shopId){
+
+    
+    
+    
+    // 每次重新加载
+    if(this.data.shopId != wx.getStorageSync('shopInfo').shopId){
+      console.log('店铺切换了 刷新');
+      this.setData({
+        shopId:wx.getStorageSync('shopInfo').shopId
+      })
+      this.resetData()
+      this.get_categoryInfo(wx.getStorageSync('shopInfo').shopId)
+      this.getCarData(wx.getStorageSync('shopInfo').shopId)
+      // this.get_neighborShop()
+    }else if(this.data.shopId){
       this.getCarData(this.data.shopId)
     }
-    // if (getApp().globalData.categoryId) {
-    //   let categoryId = getApp().globalData.categoryId
-    //   let index = getApp().globalData.index
-    //   let pic = getApp().globalData.pic
-
-    //   this.setData({
-    //     categoryImg: pic,
-    //     selIndex: index
-    //   });
-    // }else{
-    // this.get_neighborShop()
-    // }
-    // 之前逻辑 每次重新加载
-    // this.resetData()
-    // this.get_neighborShop()
 
   },
 
@@ -434,7 +496,7 @@ Page({
         orderBy:this.data.paramsObj.orderBy,
         sort:this.data.paramsObj.sort,
         isAllProdType: true,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3,
         // lat: wx.getStorageSync('LATITUDE'),
         // lon: wx.getStorageSync('LONGITUDE'),
         // distance: wx.getStorageSync('DISTANCE') || 0
@@ -479,6 +541,7 @@ Page({
         categoryId,
         current: 1,
         size: 999999,
+        channelId:wx.getStorageSync('channelId')||3,
         shopId:this.data.testShopId||this.data.shopId
       },
       callBack: (res) => {
@@ -628,10 +691,10 @@ Page({
    */
   toProdPage: function (e) {
     var prodid = e.currentTarget.dataset.prodid;
-    console.log(22222222,e);
+    var shopid = e.currentTarget.dataset.shopid;
     if (prodid) {
       wx.navigateTo({
-        url: '/pages/prod/prod?prodid=' + prodid,
+        url: `/pages/prod/prod?prodid=${prodid}&shopid=${shopid}`,
       })
     }
   },
@@ -645,7 +708,7 @@ Page({
     })
     wx.setStorageSync("basketIds", JSON.stringify(basketIds));
     wx.navigateTo({
-      url: '/pages/submit-order/submit-order?orderEntry=0',
+      url: '/pages/submit-order/submit-order?orderEntry=0&shopId='+this.data.carData[0].shopId,
     })
   }
 

+ 21 - 8
pages/category1/category.wxml

@@ -12,7 +12,7 @@
   </navbar>
 
   <!-- 全部分类弹窗 -->
-  <van-popup show="{{ show }}" position="top" close-on-click-overlay="{{false}}" z-index="{{99999}}" round bind:close="onClose">
+  <van-popup show="{{ show }}" position="top" z-index="{{99999}}" round bind:close="onClose">
     <view class="popup-box" style="padding-top: {{pageTopHeight}}px;">
       <!-- 搜索 -->
       <navbar>
@@ -121,24 +121,24 @@
       </view>
       <scroll-view class="right-box"  scroll-y="true" 	enable-passive 	upper-threshold="10" 	lower-threshold="10"  scroll-top="{{topHeight}}" bindscroll="scroll" bindscrolltoupper="scrollTop" bindscrolltolower="scrollBottom">
         <view style="height:20px"></view>
-        <view class="product-item" id="{{'test'+index}}" wx:for="{{productList}}">
+        <view class="product-item" id="{{'test'+index}}" data-index="{{index}}" wx:for="{{productList}}" data-prodId="{{item.prodId}}" data-shopId="{{item.shopId}}" bind:tap="toProdPage">
         <view class="pic-box">
-          <image class="pic" src="{{item.pic}}" mode="" data-prodId="{{item.prodId}}" bind:tap="toProdPage" />
+          <image class="pic" src="{{item.pic}}" mode="" />
           <view class="sell-out" wx:if="{{item.totalStocks == 0}}">
             <view class="sell-out-text">已售罄</view>
           </view>
         </view>
           <view class="info">
-            <view class="title" data-prodId="{{item.prodId}}" bind:tap="toProdPage">{{item.prodName}}</view>
+            <view class="title" data-prodId="{{item.prodId}}" data-shopId="{{item.shopId}}" bind:tap="toProdPage">{{item.prodName}}</view>
               <view class="salesVolume">已售{{item.salesVolume||0}}</view>
             <view class="price-box">
               <view class="price">¥{{item.price}}</view>
               <view wx:if="{{item.show}}" class="num-box">
-              <image class="btn" data-num="-1" data-item="{{item}}" bind:tap="handleNum" src="/images/icon/reduce.png" mode=""/>
+              <image class="btn" data-num="-1" data-item="{{item}}" catch:tap="handleNum" src="/images/icon/reduce.png" mode=""/>
                 <view class="num">{{item.prodCount}}</view>
-              <image class="btn" data-num="1" data-item="{{item}}" bind:tap="handleNum" src="/images/icon/add.png" mode=""/>
+              <image class="btn" data-num="1" data-item="{{item}}" data-type="add" catch:tap="handleNum" src="/images/icon/add.png" mode=""/>
               </view>
-              <image wx:else style="width:52rpx;height:52rpx;" src="/images/icon/car-btn.png" mode="" data-num="1" data-item="{{item}}" bind:tap="handleNum" />
+              <image wx:else class="test" style="width:52rpx;height:52rpx;" src="/images/icon/car-btn.png" mode="" data-img="/images/icon/car-btn.png" data-type="add" data-num="1" data-item="{{item}}" data-index="{{index}}" catch:tap="handleNum" />
             </view>
           </view>
         </view>
@@ -179,7 +179,7 @@
               <view class="num-box">
                 <image class="btn" data-num="-1" data-item="{{item}}" bind:tap="handleNum" src="/images/icon/reduce.png" mode=""/>
                 <view class="num">{{item.prodCount}}</view>
-              <image class="btn" data-num="1" data-item="{{item}}" bind:tap="handleNum" src="/images/icon/add.png" mode=""/>
+              <image class="btn" data-num="1" data-type="add" data-item="{{item}}" bind:tap="handleNum" src="/images/icon/add.png" mode=""/>
               </view>
 
             </view>
@@ -216,6 +216,19 @@
     <view class="btn" bind:tap="handleBuy">结算</view>
   </view>
   <tabbar active="1" class="my-tabbar"></tabbar>
+
+
+<!-- 抛物线动画容器(数据驱动渲染) -->
+<view class="animation-wrap" id="animationWrap">
+  <view class="{{move?'move-x':''}}" style="position:absolute;width: 50rpx;height: 50rpx;left:{{animateInfo.startX}}px;top:{{animateInfo.startY}}px;--endX: {{animateInfo.endX-animateInfo.startX}}px;--endY: {{animateInfo.endY-animateInfo.startY}}px;" bind:animationend="endAnimate" >
+    <image 
+      class="{{move?'move-y':''}}"
+      src="/images/icon/car-btn.png"
+      style="width: 40rpx;height: 40rpx;--endX: {{animateInfo.endX-animateInfo.startX}}px; --endY: {{animateInfo.endY-animateInfo.startY}}px;"
+      bind:animationend="endAnimate"
+    ></image>
+  </view>
+</view>
   
 
 </view>

+ 51 - 0
pages/category1/category.wxss

@@ -772,4 +772,55 @@ align-items: center;
 
 .none .van-empty__description{
   margin-top: -30rpx;
+}
+/* 动画容器:全屏覆盖,不影响下层交互 */
+.animation-wrap {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  height: 100vh;
+  pointer-events: none;
+  z-index: 9999;
+}
+
+/* 抛物线小图标样式 */
+.move-x {
+  animation: 
+    moveX .5s linear forwards;  /* X轴匀速 */
+   
+}
+.move-y{
+  animation: moveY .5s cubic-bezier(0.5, -0.5, 1, 1)  forwards; 
+}
+
+/* 核心抛物线动画:贝塞尔曲线轨迹 */
+@keyframes moveX  {
+  from {
+    transform: translateX(0);
+  }
+  to {
+    transform: translateX(var(--endX));
+  }
+}
+
+/* 核心抛物线动画:贝塞尔曲线轨迹 */
+@keyframes moveY  {
+  from {
+    transform: translateY(0);
+  }
+  to {
+    transform: translateY(var(--endY));
+  }
+}
+
+/* 购物车缩放动画 */
+.cart-pulse {
+  animation: pulse 0.3s ease-in-out;
+}
+
+@keyframes pulse {
+  0% { transform: scale(1); }
+  50% { transform: scale(1.3); }
+  100% { transform: scale(1); }
 }

+ 3 - 2
pages/commResult/commResult.wxss

@@ -1,6 +1,6 @@
 /* pages/commResult/commResult.wxss */
 .commResult{
-  background: linear-gradient( 180deg, #E5F1FF 0%, rgba(229,241,255,0) 406rpx,#fff 100%);
+  background: #f6f6f6;
   border-radius: 0rpx 0rpx 0rpx 0rpx;
   display: flex;
   flex-direction: column;
@@ -12,6 +12,7 @@
 .commResult .icon{
   width: 200rpx;
   height: 200rpx;
+  margin-top: 80rpx;
 }
 
 .commResult .title{
@@ -28,7 +29,7 @@
 }
 .commResult .btn-box{
   display: flex;
-
+  margin-top: 60rpx;
 }
 .commResult .btn-box .btn{
   width: 240rpx;

+ 0 - 209
pages/couponCenter/couponCenter.js

@@ -1,209 +0,0 @@
-// pages/couponCenter/couponCenter.js
-
-var http = require("../../utils/http.js");
-var config = require("../../utils/config.js");
-var util = require('../../utils/util.js');
-
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    couponList: [], // 通用券列表
-    prodCouponList: [], // 商品券列表
-    selectedCouponId:0, // 要领取的优惠券id
-    current: 1, // 当前页数
-    pages: 1, // 总页数
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    //获取通用列表
-
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-    this.getCouponList();
-    this.getProdCouponList(1);
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  },
-  /**
-   * 获取通用列表
-   */
-  getCouponList() {
-    var params = {
-      url: "/p/myCoupon/generalCouponList",
-      method: "GET",
-      callBack: (res) => {
-        this.initCouponCanGoUseFlag(res)
-        this.setData({
-          couponList: res
-        });
-      }
-    };
-    http.request(params);
-  },
-  /**
-   * 获取指定商品券
-   */
-  getProdCouponList(cur) {
-    var params = {
-      url: "/p/myCoupon/getCouponPage",
-      method: "GET",
-      data: {
-        current: cur,
-        size: 20,
-      },
-      callBack: (res) => {
-        this.initCouponCanGoUseFlag(res.records)
-        let list = []
-        if (res.current == 1) {
-          list = res.records
-        } else {
-          list = this.data.prodCouponList
-          list = list.concat(res.records)
-        }
-        this.setData({
-          prodCouponList: list,
-          pages: res.pages,
-          current: res.current
-        });
-      }
-    };
-    http.request(params);
-  },
-  /**
-   * 初始化优惠券去可以使用的标记
-   */
-  initCouponCanGoUseFlag(couponList){
-    couponList.forEach(coupon => {
-      coupon.canGoUse = (coupon.curUserReceiveCount >= coupon.limitNum)
-    });
-  },
-  /**
-   * 设置优惠券去可以使用的标记
-   */
-  setCouponCanGoUseFlag(index, couponType) {
-    if (couponType == 1) {
-      var tempCouponList = this.data.couponList
-      tempCouponList[index].canGoUse = true
-      tempCouponList[index].stocks -= 1
-      this.setData({
-        couponList: tempCouponList
-      })
-    } else if (couponType == 2) {
-      var tempCouponList = this.data.prodCouponList
-      tempCouponList[index].canGoUse = true
-      tempCouponList[index].stocks -= 1
-      this.setData({
-        prodCouponList: tempCouponList
-      })
-    }
-  },
-  /**
-   * 立即领取
-   */
-  receiveCoupon(e) {
-    this.setData({
-      selectedCouponId: e.currentTarget.dataset.couponid
-    })
-    util.checkAuthInfo(()=>{
-      var ths = this
-      if (ths.data.selectedCouponId) {
-        wx.showLoading();
-        http.request({
-          url: "/p/myCoupon/receive",
-          method: "POST",
-          data: ths.data.selectedCouponId,
-          callBack: (data) => {
-            wx.hideLoading();
-            wx.showToast({
-              title: '领券成功',
-              icon: 'success',
-              duration: 2000
-            })
-            this.setCouponCanGoUseFlag(e.currentTarget.dataset.couponindex,e.currentTarget.dataset.coupontype)
-          }
-        })
-      }
-    })
-  },
-  /**
-   * 立即使用
-   */
-  useCoupon(e) {
-    let url = '/pages/prod-classify/prod-classify?sts=4';
-    let couponId = e.currentTarget.dataset.couponid;
-    var title = "优惠券活动商品";
-    var prodList = e.currentTarget.dataset.prodlist
-    if (prodList && prodList.length == 1) {
-      wx.navigateTo({
-        url: '/pages/prod/prod?prodid=' + prodList[0].prodId
-      })
-    }else {
-      if (couponId) {
-        url += "&tagid=" + couponId + "&title=" + title;
-      }
-      wx.navigateTo({
-        url: url
-      })
-    }
-  },
-    /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-    if (this.data.current < this.data.pages) {
-      this.getProdCouponList(this.data.current + 1);
-    }
-  },
-
-})

+ 0 - 6
pages/couponCenter/couponCenter.json

@@ -1,6 +0,0 @@
-{
-  "usingComponents": {},
-  "navigationBarTitleText": "领券中心",
-  "navigationBarBackgroundColor": "#fff",
-  "navigationBarTextStyle": "black"
-}

+ 0 - 127
pages/couponCenter/couponCenter.wxml

@@ -1,127 +0,0 @@
-<view class="container">
-  <view class="coupons">
-    <view class="banner">
-      <view class="bg"><image src="../../images/icon/coupon-bg.png"></image></view>
-      <view class="img"><image src="../../images/icon/coupon-banner.png"></image></view>
-    </view>
-    <view class="con-box">
-      <view class="c-tit" wx:if="{{couponList.length}}">通用神券</view>
-      <scroll-view scroll-x="true" class="general-box" wx:if="{{couponList.length}}">
-        <view class="general">
-          <view class="item" wx:for='{{couponList}}' wx:key='couponId'>
-           <view class="item-box {{(item.canGoUse) ? 'received' : ((!item.stocks && !item.curUserReceiveCount) ? 'robbed' : '') }}">
-            <view class="item-con">
-              <view class="number" wx:if="{{item.couponType == 1}}">
-                <view class="symbol">¥</view>
-                <view class="text">{{item.reduceAmount}}</view>
-              </view>
-              <view class="number" wx:if="{{item.couponType == 2}}">
-                <view class="text">{{item.couponDiscount}}</view>
-                <view class="symbol">折</view>
-              </view>
-              <view class="condition">满{{item.cashCondition}}元可用</view>
-              <view class="scope" wx:if="{{item.suitableProdType == 0}}">全品类商品通用</view>
-              <view class="scope" wx:if="{{item.suitableProdType != 0}}">仅可购买平台部分商品</view>
-              <view class="progress-box">
-                <view class="text" wx:if="{{item.stocks == 0}}">已抢光</view>
-                <view class="text" wx:if="{{item.stocks != 0}}">已抢{{wxs.rounding((item.sourceStock - item.stocks) * 100 / item.sourceStock)}}%</view>
-                <view class="progress" style="width: {{wxs.rounding((item.sourceStock - item.stocks) * 100 / item.sourceStock)}}%"></view>
-              </view>
-            </view>
-            <view class="item-btn" wx-if="{{!item.canGoUse && item.stocks}}" data-couponid="{{item.couponId}}" data-coupontype="1" data-couponindex="{{index}}" bindtap='receiveCoupon'>立即领取</view>
-            <view class="item-btn" wx-if="{{item.canGoUse}}" data-couponid="{{item.couponId}}" bindtap='useCoupon'>去使用</view>
-            <view class="item-btn" wx-if="{{!item.canGoUse && !item.stocks}}">已抢光</view>
-            <view class="icon" wx-if="{{item.canGoUse}}"><image src="../../images/icon/coupon-received.png"></image></view>
-            <view class="icon" wx-if="{{!item.canGoUse && !item.stocks}}"><image src="../../images/icon/coupon-robbed.png"></image></view>
-           </view>
-          </view>
-        </view>
-      </scroll-view>
-      <view class="c-tit" wx:if="{{prodCouponList.length}}">推荐好券</view>
-      <view class="special" wx:if="{{prodCouponList.length}}">
-        <view class="item" wx:for='{{prodCouponList}}' wx:key='couponId'>
-          <view class="item-box {{(item.canGoUse) ? 'received' : ((!item.stocks && !item.curUserReceiveCount) ? 'robbed' : '')}}">
-            <!-- 多商品券 -->
-            <view class="item-con" wx:if="{{item.prods.length > 1}}">
-              <view class="shop-msg">
-                <view class="logo"><image src="{{item.shopLogo}}"></image></view>
-                <view class="name">{{item.shopName}}</view>
-              </view>
-              <view class="prod-msg">
-                <view class="p-item" wx:for='{{item.prods}}' wx:for-item="prod" wx:for-index="prodIndex" wx:key='prodIndex'>
-                  <view class="img"><image src="{{prod.pic}}"></image></view>
-                  <view class="price">¥{{prod.price}}</view>
-                </view>
-              </view>
-            </view>
-            <view class="item-btn" wx:if="{{item.prods.length > 1}}">
-              <view class="btn-box">
-                <view class="number" wx:if="{{item.couponType == 1}}">
-                  <view class="symbol">¥</view>
-                  <view class="text">{{item.reduceAmount}}</view>
-                </view>
-                <view class="number" wx:if="{{item.couponType == 2}}">
-                  <view class="text">{{item.couponDiscount}}</view>
-                  <view class="symbol">折</view>
-                </view>
-                <view class="condition">满{{item.cashCondition}}元可用</view>
-                <view class="progress-box">
-                  <view class="text" wx:if="{{item.stocks == 0}}">已抢光</view>
-                  <view class="text" wx:if="{{item.stocks != 0}}">已抢{{wxs.rounding((item.sourceStock - item.stocks) * 100 / item.sourceStock)}}%</view>
-                  <view class="progress" style="width: {{wxs.rounding((item.sourceStock - item.stocks) * 100 / item.sourceStock)}}%"></view>
-                </view>
-                <view class="btn" wx-if="{{!item.canGoUse && item.stocks}}" data-couponid="{{item.couponId}}" data-coupontype="2" data-couponindex="{{index}}" bindtap='receiveCoupon'>立即领取</view>
-                <view class="btn" wx-if="{{item.canGoUse}}" data-couponid="{{item.couponId}}" data-prodlist="{{item.prods}}" bindtap='useCoupon'>去使用</view>
-                <view class="btn" wx-if="{{!item.canGoUse && !item.stocks}}">已抢光</view>
-              </view>
-            </view>
-            <!-- /多商品券 -->
-            <!-- 单商品券 -->
-            <view class="left" wx:if="{{item.prods.length == 1}}">
-              <view class="img"><image src="{{item.prods[0].pic}}"></image></view>
-              <view class="text-box">
-                <view class="goods-name">{{item.prods[0].prodName}}</view>
-                <view class="coupon-number">
-                  <view class="number" wx:if="{{item.couponType == 1}}">
-                    <view class="symbol">¥</view>
-                    <view class="text">{{item.reduceAmount}}</view>
-                  </view>
-                  <view class="number" wx:if="{{item.couponType == 2}}">
-                    <view class="text">{{item.couponDiscount}}</view>
-                    <view class="symbol">折</view>
-                  </view>
-                  <view class="condition">满{{item.cashCondition}}元可用</view>
-                </view>
-              </view>
-            </view>
-            <view class="right" wx:if="{{item.prods.length == 1}}">
-              <view class="btn-box">
-                <view class="progress-text" wx:if="{{item.stocks == 0}}">已抢光</view>
-                <view class="progress-text" wx:if="{{item.stocks != 0}}">已抢{{wxs.rounding((item.sourceStock - item.stocks) * 100 / item.sourceStock)}}%</view>
-                <view class="progress-box">
-                  <view class="progress" style="width: {{wxs.rounding((item.sourceStock - item.stocks) * 100 / item.sourceStock)}}%"></view>
-                </view>
-                <view class="btn" wx-if="{{!item.canGoUse && item.stocks}}" data-couponid="{{item.couponId}}" data-coupontype="2" data-couponindex="{{index}}" bindtap='receiveCoupon'>立即领取</view>
-                <view class="btn" wx-if="{{item.canGoUse}}" data-couponid="{{item.couponId}}" data-prodlist="{{item.prods}}" bindtap='useCoupon'>去使用</view>
-                <view class="btn" wx-if="{{!item.canGoUse && !item.stocks}}">已抢光</view>
-              </view>
-            </view>
-            <!-- /单商品券 -->
-            <view class="icon" wx-if="{{item.canGoUse}}"><image src="../../images/icon/coupon-received.png"></image></view>
-            <view class="icon" wx-if="{{!item.canGoUse && !item.stocks}}"><image src="../../images/icon/coupon-robbed.png"></image></view>
-          </view>
-        </view>
-      </view>
-    </view>
-
-    <!-- 空 -->
-    <view class="empty" wx:if="{{couponList.length==0 && prodCouponList.length==0}}">
-      <view class="empty-icon">
-        <image src="../../images/icon/empty.png"></image>
-      </view>
-      <view class="empty-text">商家还未发布优惠券哦</view>
-    </view>
-  </view>
-</view>
-
-<wxs module="wxs" src="../../wxs/number.wxs" />

+ 0 - 710
pages/couponCenter/couponCenter.wxss

@@ -1,710 +0,0 @@
-page {
-  background: #f4f4f4;
-}
-
-.coupons image {
-  width: 100%;
-  height: 100%;
-}
-
-.coupons .banner {
-  position: relative;
-  width: 750rpx;
-  height: 284rpx;
-  padding-top: 24rpx;
-}
-
-.coupons .banner .bg {
-  position: absolute;
-  top: 0;
-  left: 0;
-  font-size: 0;
-  width: 750rpx;
-  height: 220rpx;
-}
-
-.coupons .banner .img {
-  font-size: 0;
-  width: 710rpx;
-  height: 280rpx;
-  margin: 0 auto;
-  position: relative;
-}
-
-.coupons .con-box {
-  padding: 0 20rpx;
-}
-
-.coupons .con-box .c-tit {
-  padding: 20rpx;
-  font-size: 28rpx;
-  font-weight: 600;
-  position: relative;
-  margin-top: 10rpx;
-}
-
-.coupons .con-box .c-tit::before {
-  position: absolute;
-  left: 0;
-  top: 50%;
-  transform: translateY(-50%);
-  display: block;
-  width: 0;
-  height: 0;
-  content: " ";
-  font-size: 0;
-  border: 10rpx solid transparent;
-  border-left: 12rpx solid #f2171a;
-  border-radius: 6rpx;
-}
-
-/* 通用券 */
-.coupons .con-box .general-box {
-  background: #fff;
-  padding: 20rpx;
-  width: 710rpx;
-  height: 206rpx;
-  box-sizing: border-box;
-  border-radius: 10rpx;
-}
-
-.coupons .con-box .general {
-  display: flex;
-  align-items: center;
-}
-
-.coupons .con-box .general .item {
-  margin-right: 20rpx;
-}
-
-.coupons .con-box .general .item:last-child {
-  margin-right: 0;
-}
-
-.coupons .con-box .general .item .item-box {
-  border-radius: 10rpx;
-  display: flex;
-  align-items: center;
-  position: relative;
-  width: 258rpx;
-  height: 166rpx;
-  overflow: hidden;
-  background: #fef1ef;
-}
-
-.coupons .con-box .general .item .item-box::before,
-.coupons .con-box .general .item .item-box::after {
-  position: absolute;
-  z-index: 1;
-  right: 38rpx;
-  display: block;
-  width: 20rpx;
-  height: 20rpx;
-  content: " ";
-  font-size: 0;
-  background: #fff;
-  border-radius: 50%;
-}
-
-.coupons .con-box .general .item .item-box::before {
-  top: -10rpx;
-}
-
-.coupons .con-box .general .item .item-box::after {
-  bottom: -10rpx;
-}
-
-.coupons .con-box .general .item .item-box .item-con {
-  flex: 1;
-  text-align: center;
-  padding: 0 20rpx;
-  position: relative;
-  z-index: 2;
-}
-
-.coupons .con-box .general .item .item-box .item-con .number {
-  display: flex;
-  align-items: baseline;
-  justify-content: center;
-  color: #f2171a;
-  font-family: arial;
-  font-weight: 600;
-  line-height: 1;
-  position: relative;
-}
-
-.coupons .con-box .general .item .item-box .item-con .number .symbol {
-  font-size: 28rpx;
-}
-
-.coupons .con-box .general .item .item-box .item-con .number .text {
-  font-size: 44rpx;
-}
-
-.coupons .con-box .general .item .item-box .item-con .condition,
-.coupons .con-box .general .item .item-box .item-con .scope {
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 1;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-.coupons .con-box .general .item .item-box .item-con .condition {
-  font-size: 24rpx;
-  line-height: 28rpx;
-  margin: 6rpx 0;
-}
-
-.coupons .con-box .general .item .item-box .item-con .scope {
-  font-size: 20rpx;
-  line-height: 24rpx;
-  color: #999;
-}
-
-.coupons .con-box .general .item .item-box .item-con .progress-box {
-  width: 100%;
-  height: 22rpx;
-  background: #ffb5af;
-  border-radius: 30rpx;
-  position: relative;
-  margin-top: 6rpx;
-  overflow: hidden;
-}
-
-.coupons .con-box .general .item .item-box .item-con .progress-box .text {
-  position: absolute;
-  left: 0;
-  top: 0;
-  width: 100%;
-  height: 22rpx;
-  line-height: 22rpx;
-  font-size: 20rpx;
-  color: #fff;
-  text-align: center;
-}
-
-.coupons .con-box .general .item .item-box .item-con .progress-box .progress {
-  height: 22rpx;
-  border-radius: 30rpx;
-  background: #f53e17;
-}
-
-.coupons .con-box .general .item .item-box .item-btn {
-  position: relative;
-  font-size: 24rpx;
-  color: #fff;
-  width: 30rpx;
-  padding: 0 10rpx;
-  height: 100%;
-  display: flex;
-  align-items: center;
-  text-align: center;
-  flex-wrap: nowrap;
-  line-height: 30rpx;
-  background: -webkit-linear-gradient(left, #f53e17, #f2171a);
-  background: linear-gradient(to right, #f53e17, #f2171a);
-}
-
-.coupons .con-box .general .item .item-box .item-btn::before {
-  position: absolute;
-  left: 0;
-  top: 28rpx;
-  bottom: 28rpx;
-  display: none;
-  width: 2rpx;
-  height: auto;
-  content: " ";
-  font-size: 0;
-  border-left: 2rpx dashed #f2171a;
-  opacity: 0.1;
-}
-
-.coupons .con-box .general .item .item-box .icon {
-  position: absolute;
-  top: -24rpx;
-  right: 60rpx;
-  display: none;
-  width: 80rpx;
-  height: 80rpx;
-}
-
-.coupons .con-box .general .item .item-box.received .icon,
-.coupons .con-box .general .item .item-box.robbed .icon {
-  display: block;
-}
-
-.coupons .con-box .general .item .item-box.received .item-btn {
-  color: #f2171a;
-  line-height: 32rpx;
-  background: none;
-}
-
-.coupons .con-box .general .item .item-box.received .item-btn::before {
-  display: block;
-}
-
-.coupons .con-box .general .item .item-box.robbed {
-  background: #f3f3f3;
-}
-
-.coupons .con-box .general .item .item-box.robbed .item-con .number,
-.coupons .con-box .general .item .item-box.robbed .item-con .condition {
-  color: #999;
-}
-
-.coupons .con-box .general .item .item-box.robbed .item-con .progress-box,
-.coupons .con-box .general .item .item-box.robbed .item-con .progress-box .progress {
-  background: #ccc;
-}
-
-.coupons .con-box .general .item .item-box.robbed .item-btn {
-  color: #999;
-  line-height: 32rpx;
-  background: none;
-}
-
-.coupons .con-box .general .item .item-box.robbed .item-btn::before {
-  display: block;
-  border-left: 2rpx dashed #333;
-}
-/* 通用券 end */
-
-/* 店铺券 */
-.coupons .con-box .special .item {
-  margin-bottom: 20rpx;
-}
-
-.coupons .con-box .special .item .item-box {
-  background: #fff;
-  position: relative;
-  border-radius: 10rpx;
-  display: flex;
-  overflow: hidden;
-}
-
-.coupons .con-box .special .item .item-box::before,
-.coupons .con-box .special .item .item-box::after  {
-  position: absolute;
-  right: 198rpx;
-  display: block;
-  width: 24rpx;
-  height: 24rpx;
-  content: " ";
-  font-size: 0;
-  background: #f4f4f4;
-  border-radius: 50%;
-  z-index: 1;
-}
-
-.coupons .con-box .special .item .item-box::before {
-  top: -12rpx;
-}
-
-.coupons .con-box .special .item .item-box::after {
-  bottom: -12rpx;
-}
-
-.coupons .con-box .special .item .item-box .item-con {
-  flex: 1;
-  padding: 20rpx;
-}
-
-.coupons .con-box .special .item .item-box .item-con .shop-msg {
-  display: flex;
-  align-items: center;
-}
-
-.coupons .con-box .special .item .item-box .item-con .shop-msg .logo {
-  width: 40rpx;
-  height: 40rpx;
-  font-size: 0;
-  border-radius: 50%;
-  overflow: hidden;
-}
-
-.coupons .con-box .special .item .item-box .item-con .shop-msg .logo image {
-  border-radius: 50%;
-}
-
-.coupons .con-box .special .item .item-box .item-con .shop-msg .name {
-  flex: 1;
-  margin-left: 10rpx;
-  font-size: 24rpx;
-  font-weight: 600;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 1;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-.coupons .con-box .special .item .item-box .item-con .prod-msg {
-  margin-top: 20rpx;
-  display: flex;
-}
-
-.coupons .con-box .special .item .item-box .item-con .prod-msg .p-item {
-  margin-left: 20rpx;
-}
-
-.coupons .con-box .special .item .item-box .item-con .prod-msg .p-item:first-child {
-  margin-left: 0;
-}
-
-.coupons .con-box .special .item .item-box .item-con .prod-msg .img {
-  width: 140rpx;
-  height: 140rpx;
-  border-radius: 10rpx;
-  overflow: hidden;
-  font-size: 0;
-}
-
-.coupons .con-box .special .item .item-box .item-con .prod-msg .img image {
-  border-radius: 10rpx;
-}
-
-.coupons .con-box .special .item .item-box .item-con .prod-msg .price {
-  color: #333;
-  font-size: 22rpx;
-  display: block;
-  text-align: center;
-}
-
-.coupons .con-box .special .item .item-box .item-btn {
-  text-align: center;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  position: relative;
-  padding: 20rpx;
-  width: 170rpx;
-  background: -webkit-linear-gradient(left, #fef1ef, #fffaf9);
-  background: linear-gradient(to right, #fef1ef, #fffaf9);
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box {
-  position: relative;
-  z-index: 1;
-  flex: 1;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .number {
-  display: flex;
-  align-items: baseline;
-  justify-content: center;
-  color: #f2171a;
-  font-family: arial;
-  font-weight: 600;
-  line-height: 1;
-  position: relative;
-  z-index: 2;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .number .symbol {
-  font-size: 28rpx;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .number .text {
-  font-size: 44rpx;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .condition {
-  font-size: 24rpx;
-  line-height: 28rpx;
-  margin: 10rpx 0;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 1;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .progress-box {
-  height: 22rpx;
-  background: #ffb5af;
-  border-radius: 30rpx;
-  position: relative;
-  margin: 0 6rpx;
-  overflow: hidden;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .progress-box .text {
-  position: absolute;
-  left: 0;
-  top: 0;
-  width: 100%;
-  height: 22rpx;
-  line-height: 22rpx;
-  font-size: 20rpx;
-  color: #fff;
-  text-align: center;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .progress-box .progress {
-  height: 22rpx;
-  border-radius: 30rpx;
-  background: #f53e17;
-}
-
-.coupons .con-box .special .item .item-box .item-btn .btn-box .btn {
-  font-size: 24rpx;
-  color: #fff;
-  margin-top: 24rpx;
-  height: 50rpx;
-  line-height: 50rpx;
-  box-sizing: border-box;
-  text-align: center;
-  border-radius: 50rpx;
-  background: -webkit-linear-gradient(left, #f53e17, #f2171a);
-  background: linear-gradient(to right, #f53e17, #f2171a);
-}
-
-.coupons .con-box .special .item .item-box .item-btn::before {
-  position: absolute;
-  left: 0;
-  top: 30rpx;
-  bottom: 30rpx;
-  display: block;
-  width: 2rpx;
-  height: auto;
-  content: " ";
-  font-size: 0;
-  border-left: 2rpx dashed #f2171a;
-  opacity: 0.1;
-}
-
-.coupons .con-box .special .item .item-box.robbed .item-btn::before {
-  border-left: 2rpx dashed #333;
-}
-
-.coupons .con-box .special .item .item-box .icon {
-  width: 100rpx;
-  height: 100rpx;
-  position: absolute;
-  right: 20rpx;
-  top: -30rpx;
-  display: none;
-}
-
-.coupons .con-box .special .item .item-box.received .icon,
-.coupons .con-box .special .item .item-box.robbed .icon {
-  display: block;
-}
-
-.coupons .con-box .special .item .item-box.received .item-btn {
-  background: #fff;
-}
-
-.coupons .con-box .special .item .item-box.received .item-btn .btn-box .btn {
-  border: 2rpx solid #f2171a;
-  color: #f2171a;
-  background: #fff;
-  line-height: 46rpx;
-}
-
-.coupons .con-box .special .item .item-box.robbed .item-btn {
-  background: #fff;
-}
-
-.coupons .con-box .special .item .item-box.robbed .item-btn .btn-box .number,
-.coupons .con-box .special .item .item-box.robbed .item-btn .btn-box .condition {
-  color: #999;
-}
-
-.coupons .con-box .special .item .item-box.robbed .item-btn .btn-box .progress-box,
-.coupons .con-box .special .item .item-box.robbed .item-btn .btn-box .progress-box .progress {
-  background: #ccc;
-}
-
-.coupons .con-box .special .item .item-box.robbed .item-btn .btn-box .btn {
-  border: 2rpx solid #ddd;
-  color: #999;
-  background: #fff;
-  line-height: 46rpx;
-}
-/* 店铺券 end */
-
-/* 商品券 */
-
-.coupons .con-box .special .item .item-box .left {
-  flex: 1;
-  display: flex;
-  padding: 20rpx;
-}
-
-.coupons .con-box .special .item .item-box .left .img {
-  width: 180rpx;
-  height: 180rpx;
-  border-radius: 10rpx;
-  overflow: hidden;
-  font-size: 0;
-}
-
-.coupons .con-box .special .item .item-box .left .img image {
-  border-radius: 10rpx;
-}
-
-.coupons .con-box .special .item .item-box .left .text-box {
-  flex: 1;
-  margin-left: 20rpx;
-}
-
-.coupons .con-box .special .item .item-box .left .text-box .goods-name {
-  font-size: 24rpx;
-  height: 72rpx;
-  line-height: 36rpx;
-  font-weight: 600;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  position: relative;
-}
-
-.coupons .con-box .special .item .item-box .left .text-box .coupon-number {
-  display: flex;
-  align-items: baseline;
-  margin-top: 40rpx;
-}
-
-
-.coupons .con-box .special .item .item-box .left .text-box .coupon-number .number {
-  display: flex;
-  align-items: baseline;
-  color: #f2171a;
-  font-family: arial;
-  font-weight: 600;
-}
-
-.coupons .con-box .special .item .item-box .left .text-box .coupon-number .number .symbol {
-  font-size: 28rpx;
-}
-
-.coupons .con-box .special .item .item-box .left .text-box .coupon-number .number .text {
-  font-size: 44rpx;
-}
-
-.coupons .con-box .special .item .item-box .left .text-box .coupon-number .condition {
-  font-size: 24rpx;
-  flex: 1;
-  margin-left: 10rpx;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 1;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-.coupons .con-box .special .item .item-box .right {
-  text-align: center;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  position: relative;
-  padding: 20rpx;
-  width: 170rpx;
-}
-
-.coupons .con-box .special .item .item-box .right::before {
-  position: absolute;
-  left: -2rpx;
-  top: 30rpx;
-  bottom: 30rpx;
-  display: block;
-  width: 2rpx;
-  height: auto;
-  content: " ";
-  font-size: 0;
-  border-right: 2rpx dashed #f2171a;
-  opacity: 0.1;
-}
-
-.coupons .con-box .special .item .item-box .right .btn-box {
-  flex: 1;
-  position: relative;
-  z-index: 1;
-}
-
-.coupons .con-box .special .item .item-box .right .btn-box .progress-text {
-  font-size: 24rpx;
-}
-
-.coupons .con-box .special .item .item-box .right .btn-box .progress-box {
-  height: 22rpx;
-  background: #f0f0f0;
-  border-radius: 30rpx;
-  margin: 10rpx 6rpx 0;
-  overflow: hidden;
-}
-
-.coupons .con-box .special .item .item-box .right .btn-box .progress-box .progress {
-  height: 22rpx;
-  border-radius: 30rpx;
-  background: #f53e17;
-}
-
-.coupons .con-box .special .item .item-box .right .btn-box .btn {
-  font-size: 24rpx;
-  color: #fff;
-  height: 50rpx;
-  line-height: 50rpx;
-  box-sizing: border-box;
-  text-align: center;
-  border-radius: 50rpx;
-  background: -webkit-linear-gradient(left, #f53e17, #f2171a);
-  background: linear-gradient(to right, #f53e17, #f2171a);
-  margin-top: 20rpx;
-}
-
-.coupons .con-box .special .item .item-box.received .right .btn-box .btn {
-  border: 2rpx solid #f2171a;
-  color: #f2171a;
-  background: none;
-  line-height: 46rpx;
-}
-
-.coupons .con-box .special .item .item-box.robbed .right .btn-box .btn {
-  border: 2rpx solid #ddd;
-  color: #999;
-  background: none;
-  line-height: 46rpx;
-}
-
-.coupons .con-box .special .item .item-box.robbed .right .btn-box .progress-text {
-  color: #999;
-}
-
-.coupons .con-box .special .item .item-box.robbed .right .btn-box .progress-box,
-.coupons .con-box .special .item .item-box.robbed .right .btn-box .progress-box .progress {
-  background: #eee;
-}
-/* 商品券 end */
-
-/* 列表为空 */
-.empty {
-  margin-top: 100rpx;
-  text-align: cneter;
-}
-
-.empty-icon {
-  display: block;
-  width: 80rpx;
-  height: 80rpx;
-  margin: 0 auto;
-  margin-bottom: 20rpx;
-}
-
-.empty-icon > image {
-  width: 100%;
-  height: 100%;
-}
-
-.empty-text {
-  font-size: 24rpx;
-  text-align: center;
-  color: #999;
-  line-height: 40rpx;
-  margin-top: 10rpx;
-}

+ 0 - 159
pages/dis-center/dis-center.js

@@ -1,159 +0,0 @@
-// pages/dis-centers/dis-center.js
-var http = require("../../utils/http.js");
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    unsettledAmount: 0, // 待结算金额
-    settledAmount: 0, // 可提现金额
-    invalidAmount: 0, // 已失效金额
-    addupAmount: 0, // 累计收益
-    disNotice: [], // 分销公告
-    distInfo: {}
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    this.getDistributionMsg()
-    this.setData({
-      loginResult: wx.getStorageSync('loginResult'),
-      distInfo: wx.getStorageSync("distInfo")
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-    this.getDisInfoData()
-  },
-
-  // 跳转到分销员等级页面
-  toSalesmanLevel() {
-    console.log('跳转到分销等级')
-    wx.navigateTo({
-      url:'/pages/salesmanLevel/salesmanLevel'
-    })
-  },
-
-  // 跳转到公告页面
-  toNotice() {
-    wx.navigateTo({
-      url: '/pages/recent-news/recent-news?isDist=' + true,
-    })
-  },
-
-  // 获取分销公告
-  getDistributionMsg: function() {
-    var ths = this
-    var params = {
-      url: '/p/distribution/msg/page',
-      method: 'GET',
-      data: {
-        // current: 1,
-        isTop: 1,
-        // size: 10
-      },
-      callBack: res => {
-        ths.setData({
-          disNotice: res.records
-        })
-      }
-    }
-    http.request(params)
-
-  },
-
-  /**
-   * 获取用户钱包数据
-   */
-  getDisInfoData: function() {
-    wx.showLoading();
-    var params = {
-      url: "/p/distribution/user/info",
-      method: "GET",
-      // data: {
-      //   shopId: 1
-      // },
-      callBack: res => {
-        this.setData({
-          settledAmount: res.distributionUserWallet.settledAmount,
-          addupAmount: res.distributionUserWallet.addupAmount
-        });
-        wx.hideLoading();
-      }
-    }
-    http.request(params);
-  },
-  /**
-   * 跳转收入明细
-   */
-  toIncomeDetailsPage: function() {
-    wx.navigateTo({
-      url: '/pages/income-details/income-details',
-    })
-  },
-  /**
-   * 跳转提现记录
-   */
-  toWalletCashPage: function() {
-    wx.navigateTo({
-      url: '/pages/take-notes/take-notes',
-    })
-  },
-  /**
-   * 跳转提现规则
-   */
-  toWalletCashRulePage: function() {
-    wx.navigateTo({
-      url: '/pages/draw-rule/draw-rule',
-    })
-  },
-  /**
-   * 跳转至我的用户
-   */
-  toMyUserPage: function() {
-    wx.navigateTo({
-      url: '/pages/my-users/my-users',
-    })
-  },
-  /**
-   * 跳转我的推广界面
-   */
-  toPromotionOrderPage: function() {
-    wx.navigateTo({
-      url: '/pages/promotion-order/promotion-order',
-    })
-  },
-
-  /**
-   * 跳转我的推广商品
-   */
-  toPromotionProdPage: function() {
-    wx.navigateTo({
-      url: '/pages/promotionProd/promotionProd',
-    })
-  },
-
-  /**
-   * 跳转到邀请好友页面
-   */
-  toInvitationCards: function () {
-    wx.navigateTo({
-      url: '/pages/InvitationCards/InvitationCards',
-    })
-  },
-
-  /**
-   * 跳转到提现
-   */
-  toWithdrawal: function() {
-    wx.navigateTo({
-      url: '/pages/withdrawal/withdrawal',
-    })
-  }
-
-})

+ 0 - 4
pages/dis-center/dis-center.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {},
-  "navigationBarTitleText": "分销中心"
-}

+ 0 - 128
pages/dis-center/dis-center.wxml

@@ -1,128 +0,0 @@
-<!--pages/dis-centers/dis-center.wxml-->
-<view class='container'>
-
-  <!-- 用户信息 -->
-  <view class="user-information">
-    <view class="user-info-box">
-      <view class="user-head-portrait">
-        <image src="{{loginResult.pic?loginResult.pic:'../../images/icon/head04.png'}}"></image>
-        <!-- <open-data type="userAvatarUrl"></open-data> -->
-      </view>
-      <view class="username">{{loginResult.nickName}}</view>
-      <!-- <open-data type="userNickName"></open-data> -->
-    </view>
-    <!-- 等级入口 -->
-    <view class="enter-grade" bindtap="toSalesmanLevel">
-      <view class="grade-icon">
-        <image src="../../images/icon/grade.png"></image>
-      </view>
-      <view class="grade-text">{{distInfo.levelName}}</view>
-    </view>
-    <view class="notice" bindtap="toNotice" data-dist="true">
-      <view class="notice-icon">
-        <image src="../../images/icon/notice.png"></image>
-      </view>
-      <!-- <view class="notice-txt">升级到高级分销员,赚取更多佣金!</view> -->
-      <swiper vertical='true' autoplay='true' duration='1000' class='swiper-cont'>
-        <block wx:for='{{disNotice}}' wx:key='index'>
-          <swiper-item class="items">{{item.msgTitle}}</swiper-item>
-        </block>
-      </swiper>
-      <view class="right-more">
-        <image src="../../images/icon/more2.png"></image>
-      </view>
-    </view>
-  </view>
-
-  <view class='user-info'>
-    <view class='info-cont'>
-      <!-- 竖排 -->
-      <!-- <view class='total-income'>
-        <view class='income-dt '>
-          <view class='total'>总收益(元)</view>
-          <view class='num '>498.98</view>
-        </view>
-        <view class='rule '>
-          <text class='symbol-what'>?</text>
-          <text class='rule-tip'>提现规则</text>
-        </view>
-      </view>
-      <view class='withdraw'>
-        <text class='could-draw'>可提现金额: 100.00元</text>
-        <text class='draw-btn'>提现</text>
-      </view> -->
-
-      <!-- 横排 -->
-      <view class='income'>
-        <view class='income-left'>
-          <view class='item'>我的余额(元)</view>
-          <view class='num'>{{wxs.toPrice(settledAmount)}}</view>
-        </view>
-        <view class='income-right'>
-          <view class='item'>总收益(元)</view>
-          <view class='num'>{{wxs.toPrice(addupAmount)}}</view>
-        </view>
-
-      </view>
-      <!-- <view class='rule ' bindtap='toWalletCashRulePage'>
-          <text class='symbol-what'>?</text>
-          <text class='rule-tip'>提现规则</text>
-        </view> -->
-      <view class='draw-btn' bindtap="toWithdrawal">立即提现</view>
-    </view>
-  </view>
-
-  <view class='lists'>
-    <view class='list-item' bindtap='toPromotionProdPage'>
-      <image src='../../images/icon/tuiguang02.png' class='icon' mode="widthFix"></image>
-      <text class='item-text'>推广商品</text>
-    </view>
-    <view class='list-item' bindtap="toInvitationCards">
-      <image src='../../images/icon/tuiguang01.png' class='icon' mode="widthFix"></image>
-      <text class='item-text'>邀请好友</text>
-    </view>
-
-    <!-- <view class='list-item'>
-      <image src='../../images/icon/tuiguang03.png' class='icon' mode="widthFix"></image>
-      <text class='item-text'>推广海报</text>
-    </view> -->
-  </view>
-
-
-  <view class='sorting-menu'>
-    <view class='menu-cont'>
-      <view class='menu-cont-list' bindtap='toMyUserPage'>
-        <view class='icon'>
-          <image src='../../images/icon/menu-01.png' mode="widthFix"></image>
-        </view>
-        <view class='list-title'>我的用户</view>
-        <text class='arrow'></text>
-      </view>
-      <view class='menu-cont-list' bindtap='toPromotionOrderPage'>
-        <view class='icon'>
-          <image src='../../images/icon/menu-02.png' mode="widthFix"></image>
-        </view>
-        <view class='list-title'>我的推广</view>
-        <text class='arrow'></text>
-      </view>
-    </view>
-    <view class='menu-cont'>
-      <view class='menu-cont-list' bindtap='toIncomeDetailsPage'>
-        <view class='icon'>
-          <image src='../../images/icon/menu-03.png' mode="widthFix"></image>
-        </view>
-        <view class='list-title'>收益明细</view>
-        <text class='arrow'></text>
-      </view>
-      <view class='menu-cont-list' bindtap='toWalletCashPage'>
-        <view class='icon'>
-          <image src='../../images/icon/menu-04.png' mode="widthFix"></image>
-        </view>
-        <view class='list-title'>提现记录</view>
-        <text class='arrow'></text>
-      </view>
-    </view>
-  </view>
-</view>
-
-<wxs module="wxs" src="../../wxs/number.wxs" />

+ 0 - 306
pages/dis-center/dis-center.wxss

@@ -1,306 +0,0 @@
-/* pages/dis-centers/dis-center.wxss */
-
-page {
-  background: #f4f4f4;
-}
-
-/* 用户信息 */
-.user-information image {
-  display: block;
-  width: 100%;
-  height: 100%;
-}
-
-.user-information {
-  position: relative;
-  background-image: linear-gradient(180deg, #e43130 20%, #df3636 80%);
-  color: #fff;
-}
-
-.user-info-box {
-  padding: 30rpx 25rpx;
-  border-bottom: 1px solid #e43130;
-}
-
-.user-head-portrait {
-  display: inline-block;
-  width: 100rpx;
-  height: 100rpx;
-  border-radius: 50%;
-  vertical-align: middle;
-  margin-right: 20rpx;
-  overflow: hidden;
-}
-
-.username {
-  display: inline-block;
-  vertical-align: middle;
-  font-size: 28rpx;
-}
-
-.enter-grade {
-  position: absolute;
-  right: 0;
-  top: 22%;
-  /* transform: translateY(-50%); */
-  display: inline-block;
-  padding: 5rpx 10rpx;
-  font-size: 24rpx;
-  background: #b39566;
-  border-radius: 50rpx 0 0 50rpx;
-  color: #fff;
-}
-
-.grade-icon {
-  display: inline-block;
-  width: 40rpx;
-  height: 40rpx;
-  vertical-align: middle;
-}
-
-.grade-text {
-  display: inline-block;
-  vertical-align: middle;
-  /* line-height: 1em; */
-}
-
-.notice {
-  position: relative;
-  padding: 10rpx 1em;
-  height: 50rpx;
-  line-height: 50rpx;
-}
-
-.notice-txt {
-  display: inline-block;
-  font-size: 23rpx;
-  color: #eee;
-}
-
-.notice-icon {
-  display: inline-block;
-  width: 30rpx;
-  height: 30rpx;
-  margin-right: 0.5em;
-  vertical-align: middle;
-}
-
-.right-more {
-  position: absolute;
-  right: 1em;
-  top: 50%;
-  transform: translateY(-50%);
-  display: inline-block;
-  width: 20rpx;
-  height: 20rpx;
-}
-/* /用户信息 */
-
-
-.user-info {
-  /* background: #3a86b9; *//* background: #00a0e9;  亚米蓝 */
-  background: #fff;
-}
-
-.user-info .info-cont {
-  padding: 30rpx 50rpx 30rpx 50rpx;
-}
-
-/* 横排 */
-
-.income {
-  display: flex;
-  color: #000;
-  margin-bottom: 25rpx;
-}
-
-.income .income-left {
-  width: 50%;
-  text-align: center;
-  /* border-right: 1rpx solid #ffffff80; */
-  border-right: 1rpx solid #8a8a8a80;
-}
-
-.income .income-right {
-  width: 50%;
-  text-align: center;
-}
-
-.income .item {
-  font-size: 28rpx;
-  margin-bottom: 20rpx;
-  color: #999;
-}
-
-.income .num {
-  font-size: 40rpx;
-}
-
-.user-info .info-cont  .rule {
-  color: #000;
-  text-align: center;
-  margin-bottom: 10rpx;
-}
-
-.user-info .info-cont .rule .symbol-what {
-  font-size: 23rpx;
-  border: 1rpx solid #999;
-  border-radius: 50rpx;
-  padding: 0rpx 8rpx;
-  color: #999;
-}
-
-.user-info .info-cont .rule .rule-tip {
-  font-size: 24rpx;
-  margin-left: 10rpx;
-  color: #999;
-}
-
-.user-info .info-cont .draw-btn {
-  width: 180rpx;
-  background: #fff;
-  border: 2rpx solid #e43130;
-  border-radius: 50rpx;
-  padding: 8rpx 0rpx;
-  color: #e43130;
-  margin: auto;
-  text-align: center;
-  font-size: 28rpx;
-}
-
-/* 竖排 */
-
-/* .user-info .info-cont .total-income {
-  display: flex;
-  justify-content: space-between;
-  border-bottom: 1rpx solid #ffffff80;
-  padding-bottom: 20rpx;
-}
-
-.user-info .info-cont .total-income .income-dt {
-  color: #fff;
-  line-height: 60rpx;
-}
-
-.user-info .info-cont .total-income .income-dt .total {
-  font-size: 26rpx;
-}
-
-.user-info .info-cont .total-income .income-dt .num {
-  font-size: 50rpx;
-}
-
-.user-info .info-cont .total-income .rule {
-  color: #fff;
-}
-
-.user-info .info-cont .total-income .rule .symbol-what {
-  font-size: 26rpx;
-  border: 1rpx solid #fff;
-  border-radius: 50rpx;
-  padding: 0rpx 8rpx;
-}
-
-.user-info .info-cont .total-income .rule .rule-tip {
-  font-size: 26rpx;
-  margin-left: 10rpx;
-}
-
-.user-info .info-cont .withdraw {
-  color: #fff;
-  font-size: 26rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding-top: 20rpx;
-}
-
-.user-info .info-cont .withdraw .draw-btn {
-  border: 2rpx solid #fff;
-  border-radius: 8rpx;
-  padding: 2rpx 26rpx;
-} */
-
-.lists {
-  display: flex;
-  justify-content: space-around;
-  background: #fff;
-  margin-top: 10rpx;
-}
-
-.lists .list-item {
-  width: 33.33%;
-  text-align: center;
-}
-
-.lists .list-item .item-text {
-  font-size: 28rpx;
-}
-
-.list-item {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 25rpx 0;
-}
-
-.list-item .icon {
-  width: 40rpx;
-  margin-bottom: 15rpx;
-}
-
-.menu-cont {
-  margin-top: 10rpx;
-}
-
-.notice .swiper-cont {
-  height: 60rpx;
-  line-height: 60rpx;
-  width: 70%;
-  display: inline-block;
-  vertical-align: middle;
-  font-size: 24rpx;
-}
-
-.menu-cont .menu-cont-list {
-  display: flex;
-  align-items: center;
-  padding: 28rpx;
-  background: #fff;
-  border-bottom: 2rpx solid #eff3f5;
-}
-
-.menu-cont .menu-cont-list:last-child {
-  border: none;
-}
-
-.menu-cont .menu-cont-list .icon {
-  width: 40rpx;
-  height: 40rpx;
-  font-size: 0;
-}
-
-.menu-cont .menu-cont-list .icon image {
-  width: 100%;
-}
-
-.menu-cont .menu-cont-list .list-title {
-  font-size: 30rpx;
-  margin-left: 20rpx;
-  flex: 1;
-}
-
-.arrow {
-  width: 15rpx;
-  height: 15rpx;
-  border-top: 2rpx solid #999;
-  border-right: 2rpx solid #999;
-  transform: rotate(45deg);
-  margin-left: 10rpx;
-}
-
-.menu-cont-list .small-icon {
-  width: 40rpx;
-  height: 40rpx;
-  font-size: 0;
-}

+ 1 - 1
pages/groupConfirmOrder/groupConfirmOrder.js

@@ -37,7 +37,7 @@ Page({
         groupSkuId: groupOrderItem.groupSkuId,
         groupTeamId: groupOrderItem.groupTeamId,
         prodCount: groupOrderItem.prodCount,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: res => {
         console.log(res)

+ 55 - 28
pages/index/index.js

@@ -79,9 +79,19 @@ Page({
     this.setData({
       select_address: wx.getStorageSync('ADDRESS')
     })
-    setTimeout(() => {
-      this.getAllData();
-    }, 1000)
+    // 默认店铺
+    if(!wx.getStorageSync('shopInfo')){
+      wx.setStorageSync('shopInfo',{shopName:'瑞果商链-“星闪豹”',shopId:1})
+    }
+    if(wx.getStorageSync('loginResult').userId){
+      this.getUserInfo().then(()=>{
+        this.getAllData();
+      })
+    }else{
+      setTimeout(() => {
+        this.getAllData();
+      }, 1000)
+    }
   },
 
   handleTab(e){
@@ -395,6 +405,25 @@ Page({
     return result;
   },
 
+   /**
+   * 获取用户信息
+   */
+   getUserInfo: function() {
+    return new Promise((resolve,reject)=>{
+      var that = this;
+      var param = {
+        url: '/p/user/userInfo',
+        method: 'GET',
+        data: {},
+        callBack: (res) => {
+          res.channelId&&wx.setStorageSync('channelId',res.channelId)
+          resolve()
+        }
+      }
+      http.request(param)
+    })
+  },
+
   /**
    * 宫格分类
    */
@@ -402,21 +431,20 @@ Page({
     let _this = this
     //加载分类列表
     var params = {
-      url: "/category/categoryInfo",
+      url: "/category/listCategoryForUser",
       method: "GET",
       data: {
-        shopId: shopId,
-        current:1,
-        size:99999
+        shopId: wx.getStorageSync('shopInfo').shopId,
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: function (res) {
         console.log(res);
         let categoryName = ''
-        res.records.forEach(e => {
+        res.forEach(e => {
           categoryName = e.categoryName.split('>')
           e.categoryName = categoryName[0]
         })
-        let newRes = _this.splitList(res.records)
+        let newRes = _this.splitList(res)
         let categoryList = newRes.splice(0,2)
         if(categoryList.length == 2){
           categoryList = categoryList[0].concat(categoryList[1])
@@ -443,20 +471,6 @@ Page({
     let index = e.currentTarget.dataset.index + this.data.currentTop
     let pic = e.currentTarget.dataset.pic
     let categories = e.currentTarget.dataset.categories
-    // if(!hassecond) return
-    // if (categories == null || categories.length < 1) {
-    //   wx.navigateTo({
-    //     url: `/pages/sub-category/sub-category?categoryId=${categoryId}&shopId=${this.data.shop_id}`,
-    //   })
-    // } else {
-    //   getApp().globalData.categoryId = categoryId
-    //   getApp().globalData.index = index
-    //   getApp().globalData.pic = pic
-    //   wx.navigateTo({
-    //     url: '/pages/category/category'
-    //   })
-    // }
-    // eventBus.emit('categoryId', categoryId);
     wx.setStorageSync('categoryId', categoryId)
     wx.navigateTo({
       url: '/pages/category1/category'
@@ -504,7 +518,7 @@ Page({
     var shopid = e.currentTarget.dataset.shopid;
     if (prodid) {
       wx.navigateTo({
-        url: `/pages/prod/prod?prodid=${prodid}&shopid=${shopid}`,
+        url: `/pages/prod/prod?prodid=${prodid}&shopid=${this.data.shop_id}`,
       })
     }
   },
@@ -640,7 +654,7 @@ Page({
       data: {
         lat: wx.getStorageSync('LATITUDE'),
         lon: wx.getStorageSync('LONGITUDE'),
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: (res) => {
         if(typeof res == 'number'){
@@ -800,6 +814,7 @@ Page({
   },
 
   onShow: function () {
+    
     // this.get_test()
     this.setData({
       select_address: wx.getStorageSync('ADDRESS')
@@ -828,7 +843,13 @@ Page({
    * 选择定位后更新列表
    */
   go_update() {
-    this.get_neighborShop()
+    // this.get_neighborShop()
+    this.setData({
+      current:1,
+      shop_id: wx.getStorageSync("shopInfo").shopId,
+      shopName:wx.getStorageSync("shopInfo").shopName
+    })
+    
     setTimeout(() => {
       this.getNewList();
       this.getSnapUpList();
@@ -836,9 +857,15 @@ Page({
     }, 1000)
   },
   getAllData() {
+    this.setData({
+      current:1,
+      shop_id: wx.getStorageSync("shopInfo").shopId,
+      shopName:wx.getStorageSync("shopInfo").shopName
+    })
     http.getCartCount(); //重新计算购物车总数量
     this.getIndexImgs();
-    this.get_neighborShop()
+    this.getClassInfo(this.data.shopId);
+    // this.get_neighborShop()
     // this.getNoticeList();
     this.getAbulk();
     this.getRecommended()
@@ -905,7 +932,7 @@ Page({
         lon: wx.getStorageSync('LONGITUDE'),
         distance: 9999999||wx.getStorageSync('DISTANCE') || 0,
         shopId: this.data.shop_id,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: (res) => {
         var hotSalesList = []

+ 0 - 8
pages/index/index.wxml

@@ -62,14 +62,6 @@
     <!-- <view class="swiper-grid-box" wx:if="{{categoryList1.length>0}}"> -->
     <view class="swiper-grid-box" wx:if="{{categoryList.length>0}}">
     <view class="grid-box">
-      <!-- <van-grid border="{{false}}" column-num="5">
-            <van-grid-item class="my-grid-item" use-slot bind:click="selectMenu" wx:for="{{categoryList}}" wx:key="categoryId" data-pic="{{item.pic}}" data-itemid="{{item.categoryId}}" data-index="{{index}}" data-categories="{{item.categories}}" data-categoryName="{{item.categoryName}}" badge="应季水果">
-              <image class="swiper-grid-image" src="{{item.icon}}" />
-              <text class="swiper-grid-text">{{item.categoryName}}</text>
-              <view class="label" wx:if="{{item.label}}">{{'应季果蔬'||item.label}}</view>
-            </van-grid-item>
-          </van-grid> -->
-
             <view class="my-grid-item" use-slot bind:tap="selectMenu" wx:for="{{categoryList}}" wx:key="categoryId" data-pic="{{item.pic}}" data-hassecond="{{item.hasSecond}}" data-itemid="{{item.categoryId}}" data-index="{{index}}" data-categories="{{item.categories}}" data-categoryName="{{item.categoryName}}">
               <view class='pic-box  {{selIndex==index?"active":""}}'>
                 <!-- <view wx:if="{{!item.hasSecond}}" class='sell-out-box'>

+ 7 - 3
pages/locationAdd/locationAdd.js

@@ -73,7 +73,8 @@ Page({
         addrId:'',
         lat: wx.getStorageSync('LATITUDE'),
         lon: wx.getStorageSync('LONGITUDE'),
-        platform:1},
+        channelId:wx.getStorageSync('channelId')||3
+      },
       callBack: (res) => {
         if(res&&res.length){
           let data = res
@@ -106,7 +107,8 @@ Page({
     wx.setStorageSync('LATITUDE', e.currentTarget.dataset.item.lat)
     wx.setStorageSync('LONGITUDE', e.currentTarget.dataset.item.lon)
     // this.getTxmap()
-    wx.setStorageSync('ADDRESS', e.currentTarget.dataset.item.address)
+    // wx.setStorageSync('ADDRESS', e.currentTarget.dataset.item.address)
+    wx.setStorageSync('shopInfo', e.currentTarget.dataset.item)
         setTimeout(() => {
           let pages = getCurrentPages();
           let prevPage = pages[pages.length - 2]; //获取A页面
@@ -114,7 +116,9 @@ Page({
             delta: 1,
             success: function (e) { // 成功的回调
               if (prevPage == undefined || prevPage == null) return;
-              prevPage.go_update(); // 调用A页面的方法, 并将值传过去
+              // prevPage.go_update(); // 调用A页面的方法, 并将值传过去
+              prevPage.getAllData(); // 调用A页面的方法, 并将值传过去
+              
             }
           })
         }, 500)

+ 22 - 4
pages/login/login.js

@@ -37,6 +37,7 @@ Page({
    */
   getPhoneNumber(e) {
     if (e.detail.errMsg === 'getPhoneNumber:ok') {
+      let that = this
       var params = {
         url: '/user/registerOrBindUser',
         method: 'PUT',
@@ -47,12 +48,12 @@ Page({
           img: wx.getStorageSync('userInfo').avatarUrl || '',
           nickName: wx.getStorageSync('userInfo').nickName || '',
           validateType: 2,
-          platform:1,
+          channelId:wx.getStorageSync('channelId')||3,
           registerOrBind:2 // 验证类型 1注册 2绑定
         },
         callBack: res => {
-          http.loginSuccess(res)
-          wx.switchTab({
+          http.loginSuccess(res,that.getUserInfo)
+          wx.reLaunch({
             url: '/pages/index/index'
           })
         }
@@ -65,6 +66,20 @@ Page({
       })
     }
   },
+  /**
+   * 获取用户信息
+   */
+  getUserInfo: function() {
+    var param = {
+      url: '/p/user/userInfo',
+      method: 'GET',
+      data: {},
+      callBack: (res) => {
+        res.channelId&&wx.setStorageSync('channelId',res.channelId)
+      }
+    }
+    http.request(param)
+  },
 
   /**
    * 跳转账号登陆
@@ -76,7 +91,10 @@ Page({
   },
 
   goback(){
-    wx.navigateBack()
+    wx.reLaunch({
+      url: '/pages/index/index',
+    })
+    // wx.navigateBack()
   },
   /**
    * 生命周期函数--监听页面加载

+ 0 - 213
pages/myCoupon/myCoupon.js

@@ -1,213 +0,0 @@
-// pages/myCoupon/myCoupon.js
-var http = require("../../utils/http.js");
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    type: 1,
-    couponList: [],
-    unUseCount: 0,
-    useCount: 0,
-    expiredCount: 0,
-    pages: 0,
-    current: 1,
-    size: 10
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    this.couponCount()
-    this.loadMyCouponData(1)
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-    if (this.data.current < this.data.pages) {
-      this.loadOrderData(this.data.sts, this.data.current + 1);
-    }
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-    if (this.data.current < this.data.pages) {
-      this.setData({
-        current: this.data.current + 1
-      })
-      this.loadMyCouponData(this.data.type)
-    }
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  },
-
-  /**
-   * 获取我的优惠券列表
-   */
-  loadMyCouponData(type) {
-    // 我的优惠券状态(0:过期 1:可用 2:已用)
-    let status;
-    if (type == 1) {
-      status = 2
-    } else if (type == 0) {
-      status = 1
-    } else if (type == 2) {
-      status = 0
-    }
-    var params = {
-      url: "/p/myCoupon/getCouponList",
-      method: "GET",
-      data: {
-        status: status,
-        current: this.data.current,
-        size: this.data.size
-      },
-      callBack: (res) => {
-        let list = []
-        if (res.current == 1) {
-          list = res.records
-        } else {
-          list = this.data.couponList
-          list = list.concat(res.records)
-        }
-        this.setData({
-          couponList: list,
-          pages: res.pages
-        })
-
-        if (status == 0) {
-          // 已过期数量
-          this.setData({
-            expiredCount: res.total
-          });
-        } else if (status == 1) {
-          // 可用数量
-          this.setData({
-            unUseCount: res.total
-          });
-
-        } else if (status == 2) {
-          // 使用过总数量
-          this.setData({
-            useCount: res.total
-          });
-        }
-      }
-    };
-    http.request(params);
-  },
-
-  /**
-   *  标签切换事件
-   */
-  changeTab(e) {
-    this.setData({
-      current: 1,
-      type: e.currentTarget.dataset.type,
-      couponList: []
-    });
-    this.loadMyCouponData(this.data.type)
-  },
-
-  /**
-   *  获取各个状态下优惠券数量
-   */
-  couponCount() {
-    var ths = this
-    var params = {
-      url: "/p/myCoupon/getMyCouponsStatusCount",
-      method: "GET",
-      data: {},
-      callBack: function(res) {
-        ths.setData({
-          unUseCount: res.unUseCount,
-          expiredCount: res.expiredCount,
-          useCount: res.useCount,
-        })
-      }
-    }
-    http.request(params);
-  },
-
-  /**
-   * 删除优惠券
-   */
-  delCouponHandle(e) {
-    let couponUserId = e.currentTarget.dataset.couponuserid
-    let ths = this
-    wx.showModal({
-      title: '',
-      content: '确定要删除此优惠券吗?',
-      confirmColor: "#eb2444",
-      success(res) {
-        if (res.confirm) {
-          wx.showLoading();
-          let params = {
-            url: "/p/myCoupon/delCoupon/" + couponUserId,
-            method: "DELETE",
-            data: {},
-            callBack: function(res) {
-              wx.hideLoading();
-              ths.setData({
-                current: 1,
-                pages: 0
-              })
-              wx.showToast({
-                title: res,
-                duration: 1000
-              })
-              setTimeout(() => {
-                ths.loadMyCouponData(ths.data.type)
-              },1000)
-            }
-          }
-          http.request(params);
-        } else if (res.cancel) {
-          console.log('用户点击取消')
-        }
-      }
-    })
-  }
-})

+ 0 - 7
pages/myCoupon/myCoupon.json

@@ -1,7 +0,0 @@
-{
-  "usingComponents": {
-    "coupon": "/components/coupon/coupon"
-  },
-  "navigationBarTitleText": "我的优惠券",
-  "onReachBottomDistance": 0
-}

+ 0 - 23
pages/myCoupon/myCoupon.wxml

@@ -1,23 +0,0 @@
-<!-- 我的优惠券 -->
-<view class="container">
-  <view class="h-tabs">
-    <view class="h-tab {{type==0?'on':''}}" data-type="0" bindtap='changeTab'>未使用({{unUseCount}})</view>
-    <view class="h-tab {{type==1?'on':''}}" data-type="1" bindtap='changeTab'>使用记录({{useCount}})</view>
-    <view class="h-tab {{type==2?'on':''}}" data-type="2" bindtap='changeTab'>已过期({{expiredCount}})</view>
-  </view>
-  <view class="coupons">
-    <block wx:for="{{couponList}}" wx:key="id">
-      <coupon bindlongtap="delCouponHandle" data-couponuserid="{{item.couponUserId}}" canUse="{{type == 0}}" item="{{item}}" type="{{type}}"></coupon>
-    </block>
-  </view>
-
-  <!-- <view class="empty" wx:if="{{!couponList.length}}">这里还没有任何东西~</view> -->
-  <!-- 空 -->
-  <view class="empty" wx:if="{{!couponList.length}}">
-    <view class="empty-icon">
-      <image src="../../images/icon/empty.png"></image>
-    </view>
-    <view class="empty-text">这里还没有相关优惠券~</view>
-  </view>
-
-</view>

+ 0 - 54
pages/myCoupon/myCoupon.wxss

@@ -1,54 +0,0 @@
-.h-tabs {
-  border-bottom: 1px solid #f2f2f2;
-  display: flex;
-  justify-content: space-around;
-  font-size: 14px;
-  position: fixed;
-  top: 0;
-  z-index: 1000;
-  width: 100%;
-  background: #fff;
-}
-
-.h-tab {
-  padding: 8px 0;
-}
-
-.h-tab.on {
-  border-bottom: 3px solid #006CE8;
-  font-weight: bold;
-}
-
-.coupons {
-  margin-top: 50px;
-  padding: 0 10px;
-}
-
-/* .empty {
-  text-align: center;
-  padding-top: 50rpx;
-  color: #999999;
-  font-size: 28rpx;
-} */
-/* 列表为空 */
-.empty {
-  margin-top: 200rpx;
-  text-align: cneter;
-}
-.empty-icon {
-  display: block;
-  width: 80rpx;
-  height: 80rpx;
-  margin: 0 auto;
-  margin-bottom: 20rpx;
-}
-.empty-icon > image {
-  width: 100%;
-  height: 100%;
-}
-.empty-text {
-  font-size: 28rpx;
-  text-align: center;
-  color: #999;
-  line-height: 2em;
-}

+ 0 - 643
pages/openAShop/openAShop.js

@@ -1,643 +0,0 @@
-// pages/openAShop/openAShop.js
-var http = require('../../utils/http.js');
-var config = require("../../utils/config.js");
-const util = require('../../utils/util.js');
-var index = [18, 0, 0];
-
-var t = 0;
-var show = false;
-var moveY = 200;
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    logoImg: {},
-    idcardFrontImg: {},
-    idcardBackImg: {},
-    bussLicenImg: {},
-    value: [0, 0, 0],
-    provArray: [],
-    cityArray: [],
-    areaArray: [],
-    province: "",
-    city: "",
-    area: "",
-    provinceId: 0,
-    cityId: 0,
-    areaId: 0,
-    latitude: '', //经度
-    longitude: '', //纬度
-    mapAddress: '', //地图定位详细地址
-    mapAddrName: '', //地图上的地址名称
-    shopNameValue: '', //店铺名字
-    shopDescribeValue: '', //店铺描述
-    shopAddrValue: '', //详细地址
-    shopOwnerValue: '', //店主姓名
-    shopOwnerPhoneValue: '', //店主联系电话
-    auditRemarks: ""
-  },
-
-  /**
-   * 请求接口传数据
-   */
-  submitApply: function() {
-    if (this.data.shopNameValue.trim().length < 2 || this.data.shopNameValue.trim().length > 10) {
-      wx.showToast({
-        title: '请输入正确的店铺名称',
-        icon: "none"
-      })
-    } else if (this.data.shopDescribeValue.trim().length < 10 || this.data.shopDescribeValue.trim().length > 200) {
-      wx.showToast({
-        title: '请输入正确店铺描述',
-        icon: "none"
-      })
-    } else if (!this.data.logoImg.path) {
-      wx.showToast({
-        title: '请上传店铺LOGO',
-        icon: "none"
-      })
-    } else if (this.data.shopAddrValue.trim().length < 5) {
-      wx.showToast({
-        title: '请输入正确的详细地址:不得少于5字',
-        icon: "none"
-      })
-    } else if (this.data.latitude == '') {
-      wx.showToast({
-        title: '请选择地理位置',
-        icon: "none"
-      })
-    } else if (this.data.shopOwnerPhoneValue.trim().length < 7) {
-      wx.showToast({
-        title: '请输入正确的联系电话',
-        icon: "none"
-      })
-    } else if (!this.data.bussLicenImg.path) {
-      wx.showToast({
-        title: '请上传营业执照',
-        icon: "none"
-      })
-    } else if (!this.data.idcardFrontImg.path || !this.data.idcardBackImg.path) {
-      wx.showToast({
-        title: '请上传身份证正反两面',
-        icon: "none"
-      })
-    } else {
-      wx.showLoading();
-      var params = {
-        url: "/p/shop/apply",
-        method: "POST",
-        data: {
-          "area": this.data.area,
-          "areaId": this.data.areaId,
-          "businessLicense": this.data.bussLicenImg.path,
-          "city": this.data.city,
-          "cityId": this.data.cityId,
-          "identityCardFront": this.data.idcardFrontImg.path,
-          "identityCardLater": this.data.idcardBackImg.path,
-          "intro": this.data.shopDescribeValue.trim(),
-          "province": this.data.province,
-          "provinceId": this.data.provinceId,
-          "shopAddress": this.data.shopAddrValue,
-          "shopLogo": this.data.logoImg.path,
-          "shopName": this.data.shopNameValue.trim(),
-          "shopPhotos": "",
-          "tel": this.data.shopOwnerPhoneValue.trim(),
-          "shopLat": this.data.latitude,
-          "shopLng": this.data.longitude,
-        },
-        callBack: function(res) {
-          wx.hideLoading();
-          wx.showModal({
-            title: '提交成功,等待审核',
-            content: '',
-            showCancel: false,
-            success: function() {
-              wx.switchTab({
-                url: '/pages/user/user',
-              })
-            }
-          })
-
-        }
-      }
-      http.request(params);
-    }
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    if (options.shopAuditStatus == -1) {
-      wx.showModal({
-        title: '提示',
-        content: '您的开店申请审核未通过,请您修改申请信息后再次提交开店申请',
-        success: (res) => {
-          if (res.confirm) {
-            console.log('用户点击确定')
-            wx.showLoading();
-            var params = {
-              url: "/p/shop",
-              method: "GET",
-              data: {},
-              callBack: (res) => {
-                wx.hideLoading();
-                this.setData({
-                  logoImg: {
-                    url: res.shopLogo,
-                    path: res.shopLogo.indexOf(config.picDomain) > -1 ? res.shopLogo.replace(config.picDomain,'') : res.shopLogo
-                  },
-                  idcardFrontImg: {
-                    url: res.identityCardFront,
-                    path: res.identityCardFront.indexOf(config.picDomain) > -1 ? res.identityCardFront.replace(config.picDomain,'') : res.identityCardFront
-                  },
-                  idcardBackImg: {
-                    url: res.identityCardLater,
-                    path: res.identityCardLater.indexOf(config.picDomain) > -1 ? res.identityCardLater.replace(config.picDomain,'') : res.identityCardLater
-                  },
-                  bussLicenImg: {
-                    url: res.businessLicense,
-                    path: res.businessLicense.indexOf(config.picDomain) > -1 ? res.businessLicense.replace(config.picDomain,'') : res.businessLicense
-                  },
-                  province: res.province,
-                  city: res.city,
-                  area: res.area,
-                  provinceId: res.provinceId,
-                  cityId: res.cityId,
-                  areaId: res.areaId,
-                  latitude: res.shopLat,
-                  longitude: res.shopLng,
-                  shopNameValue: res.shopName, //店铺名字
-                  shopDescribeValue: res.intro, //店铺描述
-                  shopAddrValue: res.shopAddress, //详细地址
-                  shopOwnerPhoneValue: res.tel
-                });
-                this.initCityData(this.data.provinceId, this.data.cityId, this.data.areaId);
-                this.getAuditMsg();
-              }
-            }
-          } else if (res.cancel) {
-            console.log('用户点击取消')
-            wx.switchTab({
-              url: '/pages/user/user',
-            })
-          }
-          http.request(params);
-        }
-      })
-    } else {
-      this.initCityData(this.data.provinceId, this.data.cityId, this.data.areaId);
-    }
-  },
-
-  getAuditMsg() {
-    http.request({
-      url: "/p/shop/shopAudit",
-      method: "GET",
-      data: {},
-      callBack: (res) => {
-        this.setData({
-          auditRemarks: res.remarks
-        });
-      }
-    });
-  },
-
-  /**
-   * 获取经纬度
-   */
-  chooseLocation: function(e) {
-    var that = this
-    wx.chooseLocation({
-      success: function (res) {
-        console.log('succes1')
-        console.log(res)
-        that.setMapData(res)
-      },
-      fail: function () {
-        wx.getSetting({
-          success(res) {
-            if (!res.authSetting['scope.userLocation']) {
-              console.log("f1")
-              wx.authorize({
-                scope: 'scope.userLocation',
-                success() {
-                  wx.chooseLocation({
-                    success: function (res) {
-                      that.setMapData(res)
-                    },
-                  })
-                  console.log('success2')
-                },
-                fail() {
-                  wx.showToast({
-                    title: '请在「右上角」 - 「关于」 - 「右上角」 - 「设置」授予获取位置信息的权限',
-                    icon: 'none'
-                  })
-                }
-              })
-            }
-          }
-        })
-      }
-    })
-  },
-  setMapData(res) {
-    var latitude = res.latitude
-    var longitude = res.longitude
-    var address = res.address
-    var name = res.name
-    console.log("经度:" + latitude, "纬度:" + longitude, "详细地址:" + address)
-    this.setData({
-      latitude: latitude,
-      longitude: longitude,
-      mapAddress: address,
-      mapAddrName: name
-    })
-  },
-  /**
-   * 获取input数据
-   */
-  bindShopNameInt: function(e) {
-    this.setData({
-      shopNameValue: e.detail.value
-    })
-  },
-  bindShopDescribeInt: function(e) {
-    this.setData({
-      shopDescribeValue: e.detail.value
-    })
-  },
-  bindShopAddrInt: function(e) {
-    this.setData({
-      shopAddrValue: e.detail.value
-    })
-  },
-  bindShopOwnerInt: function(e) {
-    this.setData({
-      shopOwnerValue: e.detail.value
-    })
-  },
-  bindShopOwnerPhoneInt: function(e) {
-    this.setData({
-      shopOwnerPhoneValue: e.detail.value
-    })
-  },
-
-
-  /**
-   * 上传图片
-   */
-  getUploadImg: function(e) {
-    const type = e.target.dataset.type
-
-    console.log(type);
-    var ths = this;
-    wx.chooseImage({
-      count: 1, // 默认9
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success: function(res) {
-        // 图片的本地临时文件路径列表
-        var tempFilePaths = res.tempFilePaths;
-        wx.showLoading({
-          mask: true
-        })
-        var params = {
-          url: "/p/file/upload",
-          filePath: tempFilePaths[0],
-          name: 'file',
-          callBack: function(res2) {
-            wx.hideLoading();
-            var img = {};
-            img.path = JSON.parse(res2).filePath;
-            img.url = JSON.parse(res2).resourcesUrl + JSON.parse(res2).filePath;
-            if (type == 'bussLicenImg') {
-              ths.setData({
-                bussLicenImg: img
-              })
-            } else if (type == 'logoImg') {
-              ths.setData({
-                logoImg: img
-              })
-            } else if (type == 'idcardFrontImg') {
-              ths.setData({
-                idcardFrontImg: img
-              })
-            } else if (type == 'idcardBackImg') {
-              ths.setData({
-                idcardBackImg: img
-              })
-            }
-          }
-        };
-        http.upload(params);
-      }
-    })
-  },
-
-  /**
-   * 删除图片
-   */
-  removeImage: function(e) {
-    const type = e.target.dataset.type
-    if (type == 'logoImg') {
-      this.setData({
-        logoImg: {}
-      });
-    } else if (type == 'idcardFrontImg') {
-      this.setData({
-        idcardFrontImg: {}
-      });
-    } else if (type == 'idcardBackImg') {
-      this.setData({
-        idcardBackImg: {}
-      });
-    } else if (type == 'bussLicenImg') {
-      this.setData({
-        bussLicenImg: {}
-      });
-    }
-    console.log('删除图片')
-  },
-
-
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-    // 底部弹框动画
-    this.animation = wx.createAnimation({
-      transformOrigin: "50% 50%",
-      duration: 0,
-      timingFunction: "ease",
-      delay: 0
-    })
-    this.animation.translateY(200 + 'vh').step();
-    this.setData({
-      animation: this.animation.export(),
-      show: show
-    })
-  },
-
-  /**
-   * 获取省市区
-   */
-  initCityData: function(provinceId, cityId, areaId) {
-    var ths = this;
-    wx.showLoading();
-    var params = {
-      url: "/p/area/listByPid",
-      method: "GET",
-      data: {
-        pid: 0
-      },
-      callBack: function(res) {
-        //console.log(res)
-        ths.setData({
-          provArray: res
-        });
-        if (provinceId) {
-          for (var index in res) {
-            if (res[index].areaId == provinceId) {
-              ths.setData({
-                value: [index, ths.data.value[1], ths.data.value[2]]
-              });
-            }
-          }
-        }
-        ths.getCityArray(provinceId ? provinceId : res[0].areaId, cityId, areaId);
-        wx.hideLoading();
-      }
-    }
-    http.request(params);
-  },
-
-
-  /**
-   * 滑动事件
-   */
-  bindChange: function(e) {
-    var ths = this;
-    var val = e.detail.value
-
-    //判断滑动的是第几个column
-    //若省份column做了滑动则定位到地级市和区县第一位
-    if (index[0] != val[0]) {
-      val[1] = 0;
-      val[2] = 0;
-      //更新数据
-      ths.getCityArray(this.data.provArray[val[0]].areaId); //获取地级市数据
-    } else { //若省份column未做滑动,地级市做了滑动则定位区县第一位
-      if (index[1] != val[1]) {
-        val[2] = 0;
-        //更新数据
-        ths.getAreaArray(this.data.cityArray[val[1]].areaId); //获取区县数据
-      } else {
-
-      }
-    }
-    index = val;
-    this.setData({
-      value: [val[0], val[1], val[2]],
-    })
-    ths.setData({
-      province: ths.data.provArray[ths.data.value[0]].areaName,
-      city: ths.data.cityArray[ths.data.value[1]].areaName,
-      area: ths.data.areaArray[ths.data.value[2]].areaName,
-      provinceId: ths.data.provArray[ths.data.value[0]].areaId,
-      cityId: ths.data.cityArray[ths.data.value[1]].areaId,
-      areaId: ths.data.areaArray[ths.data.value[2]].areaId
-    })
-  },
-
-
-  /**
-   * 根据省份ID获取 城市数据
-   */
-  getCityArray: function(provinceId, cityId, areaId) {
-    var ths = this;
-    var params = {
-      url: "/p/area/listByPid",
-      method: "GET",
-      data: {
-        pid: provinceId
-      },
-      callBack: function(res) {
-        //console.log(res)
-        ths.setData({
-          cityArray: res
-        });
-        if (cityId) {
-          for (var index in res) {
-            if (res[index].areaId == cityId) {
-              ths.setData({
-                value: [ths.data.value[0], index, ths.data.value[2]]
-              });
-            }
-          }
-        }
-        ths.getAreaArray(cityId ? cityId : res[0].areaId, areaId);
-        wx.hideLoading();
-      }
-    }
-    http.request(params);
-  },
-
-  /**
-   * 根据城市ID获取 区数据
-   */
-  getAreaArray: function(cityId, areaId) {
-    var ths = this;
-    var params = {
-      url: "/p/area/listByPid",
-      method: "GET",
-      data: {
-        pid: cityId
-      },
-      callBack: function(res) {
-        //console.log(res)
-        ths.setData({
-          areaArray: res
-        });
-        if (areaId) {
-
-          for (var _index in res) {
-            if (res[_index].areaId == areaId) {
-              ths.setData({
-                value: [ths.data.value[0], ths.data.value[1], _index]
-              });
-            }
-          }
-
-          index = ths.data.value;
-
-          ths.setData({
-            province: ths.data.province,
-            city: ths.data.city,
-            area: ths.data.area,
-            provinceId: ths.data.provinceId,
-            cityId: ths.data.cityId,
-            areaId: ths.data.areaId
-          })
-
-        } else {
-          ths.setData({
-            province: ths.data.provArray[ths.data.value[0]].areaName,
-            city: ths.data.cityArray[ths.data.value[1]].areaName,
-            area: ths.data.areaArray[ths.data.value[2]].areaName,
-            provinceId: ths.data.provArray[ths.data.value[0]].areaId,
-            cityId: ths.data.cityArray[ths.data.value[1]].areaId,
-            areaId: ths.data.areaArray[ths.data.value[2]].areaId
-          })
-        }
-
-        wx.hideLoading();
-      }
-    }
-    http.request(params);
-  },
-
-
-  /**
-   * 移动按钮点击事件
-   */
-  translate: function(e) {
-    if (t == 0) {
-      moveY = 0;
-      show = false;
-      t = 1;
-    } else {
-      moveY = 200;
-      show = true;
-      t = 0;
-    }
-    this.setData({
-      show: true
-    });
-    // this.animation.translate(arr[0], arr[1]).step();
-    this.animationEvents(this, moveY, show);
-
-  },
-
-
-  /**
-   * 隐藏弹窗浮层
-   */
-  hiddenFloatView(e) {
-    //console.log(e);
-    moveY = 200;
-    show = true;
-    t = 0;
-    this.animationEvents(this, moveY, show);
-
-  },
-
-
-  /**
-   * 动画事件
-   */
-  animationEvents: function(that, moveY, show) {
-    //console.log("moveY:" + moveY + "\nshow:" + show);
-    that.animation = wx.createAnimation({
-      transformOrigin: "50% 50%",
-      duration: 400,
-      timingFunction: "ease",
-      delay: 0
-    })
-    that.animation.translateY(moveY + 'vh').step()
-
-    that.setData({
-      animation: that.animation.export()
-    })
-
-  },
-
-
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  }
-})

+ 0 - 4
pages/openAShop/openAShop.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {},
-  "navigationBarTitleText": "申请开店"
-}

+ 0 - 186
pages/openAShop/openAShop.wxml

@@ -1,186 +0,0 @@
-<!-- 申请开店 -->
-<!--pages/openAShop/openAShop.wxml-->
-
-<view class="apple-for-ashop">
-  <view wx:if="{{auditRemarks}}" class="audit-remark">审核失败:{{auditRemarks}}</view>
-  <!-- 店铺信息 -->
-  <form class="msg-box">
-    <view class="msg-tit">
-      <view class="shop-icon">
-        <image src="../../images/icon/shop-icon.png"></image>
-      </view>
-      <view class="shop-msg-tit">店铺信息</view>
-    </view>
-    <!-- 店铺名称 -->
-    <view class="msg-cont-box">
-      <label class="cont-txt">
-        <text class="red">*</text>店铺名称</label>
-      <input type="text" class="cont-int" bindinput="bindShopNameInt" value="{{shopNameValue}}" maxlength="10" placeholder="输入店铺名称,2-10字"></input>
-    </view>
-
-    <!-- 店铺描述 -->
-    <view class="msg-cont-box">
-      <label class="cont-txt align-top">
-        <text class="red">*</text>店铺描述</label>
-      <textarea type="text" bindinput="bindShopDescribeInt" value="{{shopDescribeValue}}" class="cont-int cont-textarea" maxlength="200" placeholder="填写店铺描述,10-200字"></textarea>
-    </view>
-    <!-- logo -->
-    <view class="msg-cont-box">
-      <label class="cont-txt">
-        <text class="red">*</text>店铺Logo</label>
-      <!-- 上传文件 -->
-      <view class="upload-files align-top">
-        <view class="upload-tips">上传店铺Logo</view>
-        <!-- 预览图片 -->
-        <view class="preview-img-box preview-logo" wx:if="{{logoImg.url}}">
-          <image class="preview-img" src="{{logoImg.url}}" mode="aspectFill" data-idx="{{idx}}"></image>
-          <!-- 删除 -->
-          <image bindtap="removeImage" class="preview-img-del" data-type="logoImg" src="../../images/icon/close2.png"></image>
-        </view>
-        <!-- 上传 -->
-        <view class="upload-icon upload-logo" wx:if="{{!logoImg.url}}" bindtap="getUploadImg" data-type="logoImg">+</view>
-      </view>
-      <!-- 上传文件end -->
-    </view>
-
-    <!-- 店铺地址 -->
-    <view class="msg-cont-box addr" bindtap="translate">
-      <label class="cont-txt">
-        <text class="red">*</text>所在地区</label>
-      <!-- 展示 -->
-      <view class="pca">{{province}} {{city}} {{area}}</view>
-      <!-- <view class="pca">广东省 广州市 番禺区</view> -->
-      <view class='arrow'>
-        <image src='../../images/icon/more.png'></image>
-      </view>
-      <!-- 弹框 -->
-      <view class="animation-element-wrapper" animation="{{animation}}" style="visibility:{{show ? 'visible':'hidden'}}" catchtap="hiddenFloatView">
-        <view class="animation-element" catchtap="nono">
-          <text class="right-bt" catchtap="hiddenFloatView">确定</text>
-          <view class="line"></view>
-          <picker-view indicator-style="height: 50rpx;" value="{{value}}" bindchange="bindChange" catchtap="nono">
-            <!--省-->
-            <picker-view-column>
-              <view wx:for="{{provArray}}" wx:key="index">
-                {{item.areaName}}
-              </view>
-            </picker-view-column>
-            <!--地级市-->
-            <picker-view-column>
-              <view wx:for="{{cityArray}}" wx:key="index">
-                {{item.areaName}}
-              </view>
-            </picker-view-column>
-            <!--区县-->
-            <picker-view-column>
-              <view wx:for="{{areaArray}}" wx:key="index">
-                {{item.areaName}}
-              </view>
-            </picker-view-column>
-          </picker-view>
-        </view>
-      </view>
-
-    </view>
-
-    <!-- 详细地址 -->
-    <view class="msg-cont-box">
-      <label class="cont-txt">
-        <text class="red">*</text>详细地址</label>
-      <input type="text" bindinput="bindShopAddrInt" value="{{shopAddrValue}}" class="cont-int" placeholder="请手动填写详细地址,不得少于5字"></input>
-    </view>
-
-    <!-- 经纬度(调用微信地图获取) -->
-    <view class="msg-cont-box wx-map clearfix">
-      <view class="cont-txt ">
-        <text class="red">*</text>地理位置</view>
-      <!-- <view class="show-location" wx:if="{{latitude}}">{{'纬度:' + latitude + ' 经度:' + longitude}}</view> -->
-      <view class="show-location" wx:if="{{latitude}}">
-        <view>{{ mapAddress}}</view>
-      </view>
-      <view class="map" bindtap="chooseLocation">点击获取位置</view>
-    </view>
-
-    <!-- 店铺联系电话 -->
-    <view class="msg-cont-box">
-      <text class="cont-txt" space="emsp"><text class="red">*</text>店铺电话</text>
-      <input type="text" bindinput="bindShopOwnerPhoneInt" value="{{shopOwnerPhoneValue}}" class="cont-int" placeholder="请填写店铺联系电话"></input>
-    </view>
-
-    <!-- 店铺营业执照(选填) -->
-    <view class="msg-cont-box">
-      <label class="cont-txt"><text class="red">*</text>营业执照</label>
-      <view class="upload-files">
-        <view class="upload-tips">上传营业执照</view>
-        <!-- 预览图片 -->
-        <view class="preview-img-box" wx:if="{{bussLicenImg.url}}">
-          <image class="preview-img" src="{{bussLicenImg.url}}" mode="aspectFill"></image>
-          <!-- 删除 -->
-          <image bindtap="removeImage" class="preview-img-del" data-type="bussLicenImg" src="../../images/icon/close2.png"></image>
-        </view>
-        <!-- 上传 -->
-        <view class="upload-icon" wx:if="{{!bussLicenImg.url}}" bindtap="getUploadImg" data-type="bussLicenImg">+</view>
-      </view>
-    </view>
-
-    <!-- 申请人身份证正反面 -->
-    <view class="msg-cont-box">
-      <text class="cont-txt" space="emsp"><text class="red">*</text>身份证件</text>
-      <view class="upload-files">
-        <view class="upload-tips">上传身份证正反两面</view>
-        <!-- 正面预览图片 -->
-        <view class="card-upload">
-          <view class="preview-img-box" wx:if="{{idcardFrontImg.url}}">
-            <image class="preview-img" src="{{idcardFrontImg.url}}" mode="aspectFill" data-idx="{{idx}}"></image>
-            <!-- 删除 -->
-            <image bindtap="removeImage" class="preview-img-del" data-type="idcardFrontImg" src="../../images/icon/close2.png"></image>
-          </view>
-          <!-- 上传 -->
-          <view class="upload-icon" wx:if="{{!idcardFrontImg.url}}" bindtap="getUploadImg" data-type="idcardFrontImg">+</view>
-          <view class="card-txt">正面</view>
-        </view>
-
-        <!-- 反面预览图片 -->
-        <view class="card-upload">
-          <view class="preview-img-box" wx:if="{{idcardBackImg.url}}">
-            <image class="preview-img" src="{{idcardBackImg.url}}" mode="aspectFill" data-idx="{{idx}}"></image>
-            <!-- 删除 -->
-            <image bindtap="removeImage" class="preview-img-del" data-type="idcardBackImg" src="../../images/icon/close2.png"></image>
-          </view>
-          <!-- 上传 -->
-          <view class="upload-icon" wx:if="{{!idcardBackImg.url}}" bindtap="getUploadImg" data-type="idcardBackImg">+</view>
-          <view class="card-txt">反面</view>
-        </view>
-
-      </view>
-    </view>
-
-  </form>
-
-
-  <!-- 申请人信息 -->
-  <!-- <form class="msg-box">
-    <view class="msg-tit">
-      <view class="shop-icon"><image src="../../images/icon/user-icon.png"></image></view>
-      <view class="shop-msg-tit">店主信息</view>
-    </view>
-    <!-- 申请人姓名 -->
-  <!-- <view class="msg-cont-box">
-      <text class="cont-txt"space="emsp"><text class="red">*</text>姓  名</text>
-      <input type="text" bindinput="bindShopOwnerInt" class="cont-int" placeholder="请填写申请人姓名"></input>
-    </view> -->
-
-  <!-- </form> -->
-
-
-
-  <!-- 提交申请 -->
-  <view class="apply-btn">
-    <view class="btn" bindtap="submitApply">
-      提交申请
-    </view>
-    <view class="foot-tips">
-      <text class="red">*</text>为必填信息。申请人必须保证以上所填信息的真实性。如有虚假信息,因此而产生的所有后果均由申请人承担。</view>
-  </view>
-
-</view>

+ 0 - 258
pages/openAShop/openAShop.wxss

@@ -1,258 +0,0 @@
-/* pages/openAShop/openAShop.wxss */
-image {
-  width: 100%;
-  height: 100%;
-}
-.red {
-  color: red;
-}
-
-.apple-for-ashop {
-  background: #f7f7f7;
-  width: 100%;
-  height: 100%;
-  overflow: auto;
-}
-.msg-box {
-  display: block;
-  background: #fff;
-  margin-bottom: 15rpx;
-  width: 100%;
-  height: 100%;
-}
-.msg-tit {
-  padding: 20rpx;
-  border-bottom: 1rpx solid #f2f2f2;
-}
-.shop-icon {
-  display: inline-block;
-  width: 40rpx;
-  height: 40rpx;
-  margin-right: 15rpx;
-  vertical-align: middle;
-}
-.shop-icon > image {
-  display: block;
-  width: 100%;
-  height: 100%;
-}
-.shop-msg-tit {
-  display: inline-block;
-  font-size: 32rpx;
-  font-weight: bold;
-  vertical-align: middle;
-}
-.msg-cont-box {
-  font-size: 30rpx;
-  padding: 25rpx 0;
-  margin: 0 20rpx;
-  border-bottom: 1rpx solid #f2f2f2;
-}
-.cont-txt {
-  display: inline-block;
-  margin-right: 50rpx;
-  vertical-align: middle;
-}
-.cont-int {
-  display: inline-block;
-  vertical-align: middle;
-  width: 70%;
-}
-.align-top {
-  vertical-align: top;
-}
-.cont-textarea {
-  box-sizing: border-box;
-  vertical-align: top;
-  line-height: 1.5em;
-  border: 1rpx solid #ececec;
-  border-radius: 8rpx;
-  padding: 10rpx 15rpx;
-}
-
-/* 地址 */
-.addr {
-  position: relative;
-}
-.pca {
-  display: inline-block;
-  width: 70%;
-  /* padding: 0 20rpx; */
-  vertical-align: middle;
-}
-.arrow {
-  position: absolute;
-  right: 20rpx;
-  top: 50%;
-  transform: translateY(-50%);
-  width: 25rpx;
-  height: 25rpx;
-}
-.arrow image {
-  width: 100%;
-  height: 100%;
-  vertical-align: top;
-}
-.animation-element-wrapper {
-  display: flex;
-  position: fixed;
-  left: 0;
-  top: 0;
-  height: 100%;
-  width: 100%;
-  background-color: rgba(0, 0, 0, 0.6);
-  z-index: 999;
-}
-.animation-element {
-  display: flex;
-  position: fixed;
-  width: 100%;
-  height: 470rpx;
-  bottom: 0;
-  background-color: rgba(255, 255, 255, 1);
-}
-.right-bt {
-  right: 20rpx;
-  top: 20rpx;
-  position: absolute;
-  width: 80rpx !important;
-}
-.line {
-  display: block;
-  position: fixed;
-  height: 2rpx;
-  width: 100%;
-  margin-top: 89rpx;
-  background-color: #eee;
-}
-picker-view {
-  background-color: white;
-  padding: 0;
-  width: 100%;
-  height: 380rpx;
-  bottom: 0;
-  position: fixed;
-}
-picker-view-column view {
-  vertical-align: middle;
-  font-size: 28rpx;
-  line-height: 28rpx;
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-
-/* 经纬度 */
-.show-location {
-  display: inline-block;
-  vertical-align: middle;
-  font-size: 30rpx;
-  line-height: 1.5em;
-  width: 45%;
-}
-.map {
-  float: right;
-  color:#ffffff;
-  background: #e43130;
-  font-size: 25rpx;
-  line-height: 1em;
-  padding: 18rpx 15rpx 20rpx 15rpx;
-  border-radius: 8rpx;
-  /* margin-right: 20rpx; */
-  vertical-align: middle;
-}
-/* 清除浮动 */
-.clearfix::after {
-  display: block;
-  height: 0;
-  overflow: hidden;
-  content: '';
-  clear: both;
-}
-
-
-/* 上传 */
-.upload-files {
-  display: inline-block;
-  vertical-align: top;
-}
-.upload-tips {
-  font-size: 26rpx;
-  color: #888888;
-  line-height: 2em;
-  margin-bottom: 15rpx;
-}
-/* 预览 */
-.preview-img-box {
-  position: relative;
-  width: 120rpx;
-  height: 120rpx;
-  display: inline-block;
-  margin-bottom: 15rpx;
-  background: #eee;
-}
-.preview-logo{
-  width: 120rpx;
-  height: 120rpx;
-}
-image.preview-img {
-  width: 100%;
-  height: 100%;
-}
-.preview-img-del {
-  position: absolute;
-  top: -5rpx;
-  right: -5rpx;
-  width: 28rpx;
-  height: 28rpx;
-}
-.card-upload {
-  display: inline-block;
-  margin-right: 50rpx;
-}
-.card-txt {
-  font-size: 24rpx;
-  text-align: center;
-  color: #777;
-}
-.upload-icon {
-  display: inline-block;
-  width: 120rpx;
-  height: 120rpx;
-  line-height: 110rpx;
-  text-align: center;
-  border: 1rpx solid #e0e0e0;
-  vertical-align: top;
-  font-size: 90rpx;
-  color: #ddd;
-  margin-bottom: 15rpx;
-}
-
-/* 提交申请 */
-.apply-btn {
-  padding: 100rpx 30rpx 150rpx 30rpx;
-}
-.btn {
-  font-size: 30rpx;
-  text-align: center;
-  background: #e43130;
-  padding-top: 20rpx;
-  padding-bottom: 20rpx;
-  color: #fff;
-  border-radius: 8rpx;
-}
-.foot-tips {
-  font-size: 28rpx;
-  color: #aaa;
-  /* padding: 0 20rpx; */
-  line-height: 1.5em;
-  margin-top: 20rpx;
-}
-.audit-remark{
-  font-size: 26rpx;
-  background: #ffffcd;
-  color:#333;
-  padding:20rpx;
-}

+ 40 - 5
pages/order-detail/order-detail.js

@@ -31,6 +31,7 @@ Page({
     remarks: "",
     actualTotal: 0,
     canRefund:false,
+    shopId:0,
     userAddrDto: null,
     orderNumber: "",
     createTime: "",
@@ -52,11 +53,13 @@ Page({
     estimatedTime: '',
     estimatedTimeStr: '',
     sendInfo:null,//骑手信息
+    cancelReason:null,
     markers:[
     ],
     polyline:[],
     includePoints:[],//存放点位 显示完整图标
     timer:null,//定时器
+    commSts:1,//评论状态: 0 未评价  1 已评价
   },
 
   /**
@@ -178,6 +181,7 @@ Page({
           orderItemDtos: res.orderItemDtos,
           createTime: res.createTime,
           status: res.status,
+          shopId: res.shopId,
           // status: res.status,//海博订单状态
           productTotalAmount: res.total, //所有商品总额
           transfee: res.transfee, //运费
@@ -190,7 +194,8 @@ Page({
           orderScore: res.orderScore, // 整单使用积分
           estimatedTime: res.estimatedTime,
           estimatedTimeStr: res.estimatedTimeStr,
-
+          cancelReason: res.cancelReason,
+          commSts: res.commSts,
         });
         
         wx.hideLoading();
@@ -347,7 +352,7 @@ Page({
       })
     }else{
       wx.navigateTo({
-        url: '/pages/prod/prod?prodid=' + prodid,
+        url: `/pages/prod/prod?prodid=${prodid}&shopid=${this.data.shopId}`,
       })
     }
   },
@@ -426,10 +431,8 @@ Page({
    * 去评价
    */
   goWrite(e){
-    var info = e.currentTarget.dataset.info;
-    wx.setStorageSync("orderItemInfo", this.data.orderItemDtos);
     wx.navigateTo({
-      url: '/pages/prodComm/prodComm',
+      url: '/pages/prodComm/prodComm?orderNumber='+this.data.orderNumber,
     })
   },
 
@@ -468,6 +471,38 @@ Page({
     })
   },
 
+  /**
+   * 确认收货
+   */
+  onConfirmReceive: function (e) {
+    var ths = this;
+    wx.showModal({
+      title: '',
+      content: '我已收到货?',
+      confirmColor: "#006CE8",
+      success(res) {
+        if (res.confirm) {
+          wx.showLoading({
+            mask: true
+          });
+          var params = {
+            url: "/p/myOrder/receipt/" + ths.data.orderNumber,
+            method: "PUT",
+            data: {},
+            callBack: function (res) {
+              wx.hideLoading();
+              ths.loadOrderDetail(ths.data.orderNumber)  //请求订单详情数据
+
+            }
+          };
+          http.request(params);
+        } else if (res.cancel) {
+          //console.log('用户点击取消')
+        }
+      }
+    })
+  },
+
   /**
    * 申请退款
    */

+ 13 - 5
pages/order-detail/order-detail.wxml

@@ -1,7 +1,7 @@
 
 <view class="order-detail">
   <map 
-  wx:if="{{(type==3&&sendInfo&&status==40)||(type == 1&&shopInfo.lat)}}"
+  wx:if="{{(type==3&&sendInfo&&status==40)||(type == 1&&shopInfo.lat&&status!=0&&status!=60)}}"
   id="orderMap"
   longitude="{{type==3?sendInfo.longitude:shopInfo.lon}}"  
   latitude="{{type==3?sendInfo.latitude:shopInfo.lat}}"   
@@ -21,8 +21,10 @@
     </cover-view>
   </cover-view>
   </map>
-
-  <view class="order-sts" wx:else>{{statusObject[status]}}</view>
+  <view wx:else> 
+    <view class="order-sts">{{statusObject[status]}}</view>
+    <view class="order-desc" wx:if="{{cancelReason&&status==60}}">取消原因:{{cancelReason}}</view>
+  </view>
 
     <view class="pay-box" wx:if="{{status == 0&&time}}">
       <view class="notice-box">
@@ -75,12 +77,18 @@
         </view>
       </view>
       <!-- <view class="item" bind:tap="goWrite"> -->
-      <!-- <view class="item" wx:if="{{status == 80}}" bind:tap="goWrite">
+      <view class="item" wx:if="{{status == 80&&commSts == 0}}" bind:tap="goWrite">
         <image class="icon" src="../../images/icon/write.png" mode=""/>
         <view class="label">
           评价晒单
         </view>
-      </view> -->
+      </view>
+      <view class="item" wx:if="{{status == 70}}">
+        <image class="icon" src="../../images/icon/buy-icon.png" mode=""/>
+        <view class="label">
+          确认收货
+        </view>
+      </view>
       <!-- <view class="item" wx:if="{{status != 0}}">
         <image class="icon" src="../../images/icon/buy-icon.png" mode=""/>
         <view class="label">

+ 5 - 0
pages/order-detail/order-detail.wxss

@@ -97,6 +97,11 @@
   color: #222222;
   margin-bottom: 20rpx;
 }
+.order-desc{
+  font-size: 28rpx;
+  color: #AAAAAA;
+  margin-bottom: 20rpx;
+}
 
 .notice-box{
   display: flex;

+ 2 - 3
pages/orderList/orderList.js

@@ -360,10 +360,9 @@ Page({
    * 跳转评价页面
    */
   onComment: function (e) {
-    var info = e.currentTarget.dataset.info;
-    wx.setStorageSync("orderItemInfo", info);
+    var ordernum = e.currentTarget.dataset.ordernum;
     wx.navigateTo({
-      url: '/pages/prodComm/prodComm',
+      url: '/pages/prodComm/prodComm?orderNumber='+ordernum,
     })
   }
 

+ 2 - 2
pages/orderList/orderList.wxml

@@ -139,9 +139,9 @@
             <!-- <text class="button warn" bindtap="" data-ordernum="{{item.orderNumber}}" hover-class='none'>再次购买</text> -->
             <text wx:if="{{item.hbOrderStatus==0}}" class="button warn" data-ordertype="{{item.orderType}}" bindtap="onPayAgain" data-ordernum="{{item.orderNumber}}" hover-class='none'>付款</text>
             <!-- <text wx:if="{{item.hbOrderStatus==20 ||item.hbOrderStatus==30 ||item.hbOrderStatus==40 || item.hbOrderStatus==80}}" class="button" bindtap="toDeliveryPage" data-lat="{{item.latitude}}" data-lon="{{item.longitude}}" data-ordernum="{{item.orderNumber}}" hover-class='none'>查看物流</text> -->
-            <text wx:if="{{item.hbOrderStatus==70&&item.dvyType == 1}}" class="button warn" bindtap="onConfirmReceive" data-ordernum="{{item.orderNumber}}" hover-class='none'>确认收货</text>
+            <text wx:if="{{item.hbOrderStatus==70}}" class="button warn" bindtap="onConfirmReceive" data-ordernum="{{item.orderNumber}}" hover-class='none'>确认收货</text>
             <!-- 评价status==5 -->
-            <text wx:if="{{item.hbOrderStatus==80 && item.orderItemDtos[0].commSts==0}}" class="button warn" bindtap="onComment" data-info="{{item.orderItemDtos}}" data-ordernum="{{item.orderNumber}}" hover-class='none'>评价</text>
+            <text wx:if="{{item.hbOrderStatus==80 && item.commSts==0}}" class="button warn" bindtap="onComment" data-info="{{item.orderItemDtos}}" data-ordernum="{{item.orderNumber}}" hover-class='none'>评价</text>
           </view>
         </view>
       </view>

+ 393 - 31
pages/prod/prod.js

@@ -1,14 +1,20 @@
 // pages/prod/prod.js
-const app = getApp()
+
+const app = getApp();
 var http = require('../../utils/http.js');
 var config = require('../../utils/config.js');
 var util = require('../../utils/util.js');
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    active:0,
+    opacity:0,
+    tab:0,
+    list:[],//相似商品和一起买
     shopId: 1,
     shopName: '',
     picDomain: config.picDomain,
@@ -30,6 +36,8 @@ Page({
     content: '',
     prodId: 0,
     brief: '',
+    halfTitle: '',
+    brandName:'',
     skuId: 0,
     popupShow: false,
     // 是否获取过用户领取过的优惠券id
@@ -54,8 +62,12 @@ Page({
       pages: 0,
       records: []
     },
+    isAll:false,
+    prodList: [],
+    pages: 0,
+    current: 1,
     littleCommPage: [],
-    evaluate: -1,
+    commStatus: -1,
     isCollection: false,
     shareShow: false,
     isDist: false, //是否分销员
@@ -83,6 +95,13 @@ Page({
     videoContext: '', // 视频组件
     isPlaying: false, // 视频是否播放中
     currentSwiper: 0, // 当前轮播index
+    animateInfo:{
+      startX:99999,
+      startY:0,
+      endX:0,
+      endY:0,
+    },
+    move:false
   },
 
   /**
@@ -135,7 +154,10 @@ Page({
     this.getProdInfo();
     // 获取商品所有促销活动
     this.getPordDiscountList()
-
+    //获取推荐商品 
+    this.getProdRecommended()
+    // 获取相似商品
+    this.getSimilarProdList()
   },
 
 
@@ -177,7 +199,60 @@ Page({
   onUnload: function () {
     clearTimeout(this.data.endOfGroupTimer)
   },
+  handleTab(e){
+    let tab = e.currentTarget.dataset.tab
+    if(tab == this.data.tab) return
+    this.setData({
+      tab,
+      list:[]
+    })
+    if(tab == 0){//相似商品
+      this.getSimilarProdList()
+    }else{
+      this.getOften()
+    }
+  },
 
+  handleFixed(e){
+    let active = e.currentTarget.dataset.active
+    if(active == this.data.active) return
+    const query = wx.createSelectorQuery().in(this);
+    if(active == 0){
+      wx.pageScrollTo({
+        scrollTop:0
+      })
+    }else if(active == 1){
+      query.select('.container .content .cmt-wrap').boundingClientRect(rect => { 
+        if (!rect) return; // 容错:元素未找到时直接返回
+        wx.pageScrollTo({
+          scrollTop:rect.top - 20
+        })
+      }).exec()
+    }else if(active == 2){
+      query.select('.container .content .prod-detail').boundingClientRect(rect => { 
+        if (!rect) return; // 容错:元素未找到时直接返回
+        wx.pageScrollTo({
+          scrollTop:rect.top - 20
+        })
+      }).exec()
+
+    }else if(active == 3){
+      query.select('.container .content .prod-content').boundingClientRect(rect => { 
+        if (!rect) return; // 容错:元素未找到时直接返回
+        wx.pageScrollTo({
+          scrollTop:rect.top - 20
+        })
+      }).exec()
+
+
+    }
+    this.setData({
+      active
+    })
+
+   
+
+  },
   /**
    * 分销绑定用户
    */
@@ -313,7 +388,7 @@ Page({
       method: "GET",
       data: {
         prodId: this.data.prodId,
-        platform:1,
+        channelId:wx.getStorageSync('channelId')||3,
         shopId:this.data.shopId
         // userType: 0
       },
@@ -335,6 +410,8 @@ Page({
           prodName: res.prodName,
           prodId: res.prodId,
           brief: res.brief,
+          halfTitle: res.halfTitle,
+          brandName: res.brandName,
           totalStocks: res.totalStocks,
           // skuId: res.skuId
           skuList: res.skuList,
@@ -347,19 +424,19 @@ Page({
           this.getVideoInfo()
         }
         // 团购商品
-        if (res.prodType === 1) {
-          this.setData({
-            groupActivityId: res.activityId
-          });
-          this.getGroupActivity();
-          this.getJoinGroupList();
-        }
+        // if (res.prodType === 1) {
+        //   this.setData({
+        //     groupActivityId: res.activityId
+        //   });
+        //   this.getGroupActivity();
+        //   this.getJoinGroupList();
+        // }
         // 获取优惠券
-        this.getCouponList();
+        // this.getCouponList();
         // 组装sku
         res.skuList&&this.groupSkuProp(res.skuList);
 
-        this.getShopInfo();
+        // this.getShopInfo();
 
         wx.hideLoading();
       },
@@ -406,10 +483,12 @@ Page({
   },
   getProdCommData() {
     http.request({
-      url: "/prod/prodCommData",
+      url: "/p/prodComm/commentCount",
       method: "GET",
       data: {
         prodId: this.data.prodId,
+        channelId:wx.getStorageSync('channelId')||3,
+        shopId:this.data.shopId
       },
       callBack: (res) => {
         this.setData({
@@ -431,7 +510,7 @@ Page({
   // 获取分页获取评论
   getProdCommPage(e) {
     if (e) {
-      if (e.currentTarget.dataset.evaluate === this.data.evaluate) {
+      if (e.currentTarget.dataset.commStatus === this.data.commStatus) {
         return;
       }
       this.setData({
@@ -440,18 +519,23 @@ Page({
           pages: 0,
           records: []
         },
-        evaluate: e.currentTarget.dataset.evaluate
+        commStatus: e.currentTarget.dataset.commstatus
       })
     }
+    let data =  {
+      channelId:wx.getStorageSync('channelId')||3,
+      prodId: this.data.prodId,
+      shopId: this.data.shopId,
+      size: 10,
+      current: this.data.prodCommPage.current + 1,
+    }
+      if(this.data.commStatus !=-1){
+          data.commStatus = this.data.commStatus
+      }
     http.request({
-      url: "/prod/prodCommPageByProd",
+      url: "/p/prodComm/commList",
       method: "GET",
-      data: {
-        prodId: this.data.prodId,
-        size: 10,
-        current: this.data.prodCommPage.current + 1,
-        evaluate: this.data.evaluate
-      },
+      data,
       callBack: (res) => {
         res.records.forEach(item => {
           if (item.pics) {
@@ -505,6 +589,238 @@ Page({
       }
     })
   },
+  // 获取推荐商品
+  getProdRecommended(){
+    http.request({
+      url: "/prod/prodRecommended",
+      method: "GET",
+      data: {
+        current: this.data.current,
+        size: 10,
+      },
+      callBack: (res) => {
+
+          if(res.records&&res.records.length){
+            let prodList = []
+            let img = ''
+            res.records.map(e => {
+              if(e.pic){
+                img = e.pic.split(',')
+                e.pic = img[0]
+              }
+            })
+            if (this.data.current == 1) {
+              prodList = res.records
+              this.setData({
+                prodList: res.records,
+                pages: res.pages,
+                current: res.current
+              });
+            } else {
+              prodList = this.data.prodList
+              prodList.push(...res.records)
+              this.setData({
+                prodList
+              })
+            }
+            if (prodList.length >= res.total) {
+              this.setData({
+                isAll: true
+              })
+            }
+          }
+          
+        
+      }
+    })
+
+  },
+   // 获取经常一起买
+   getOften(){
+    let that = this
+    http.request({
+      url: "/sku/buyTogetherOften",
+      method: "GET",
+      data: {
+        shopId:this.data.shopId,
+        prodId:this.data.prodId,
+        channelId:wx.getStorageSync('channelId')||3,
+        userId:wx.getStorageSync('loginResult').userId||'',
+        current: 1,
+        size: 18,
+      },
+      callBack: (res) => {
+          let list = that.splitArrayToPages(res.records)
+          that.setData({
+            list
+          })
+      }
+    })
+
+  },
+
+  
+
+  // 获取相似商品
+  getSimilarProdList(){
+    let that = this
+    http.request({
+      url: "/prod/similarProdList",
+      method: "GET",
+      data: {
+        shopId:this.data.shopId,
+        prodId:this.data.prodId,
+        channelId:wx.getStorageSync('channelId')||3,
+        userId:wx.getStorageSync('loginResult').userId||'',
+        current: 1,
+        size: 18,
+      },
+      callBack: (res) => {
+          if(res.code == 200){
+            let list = that.splitArrayToPages(res.data.records)
+            that.setData({
+              list
+            })
+          }
+      }
+    })
+
+  },
+  // 工具函数:拆分数组为「最多3页,每页6个」
+    splitArrayToPages(arr) {
+      const pageSize = 6; // 每页6个
+      const maxPages = 3; // 最多3页
+      const result = [];
+
+      // 循环拆分:最多循环3次(确保只分3页)
+      for (let i = 0; i < maxPages; i++) {
+        // 计算当前页的起始索引:i * 6(第0页:0-5,第1页:6-11,第2页:12-17)
+        const start = i * pageSize;
+        // 截取当前页元素(不足6个时取剩余所有,超过18个时截取到17索引)
+        const page = arr.slice(start, start + pageSize);
+        // 加入结果数组(不足3页时,后续循环会push空数组)
+        result.push(page);
+      }
+
+      return result;
+    },
+  
+  /**
+   * 跳转到商品详情页
+   */
+  toProdPage: function (e) {
+    var prodid = e.currentTarget.dataset.prodid;
+    var shopid = e.currentTarget.dataset.shopid;
+    if (prodid) {
+      wx.navigateTo({
+        url: `/pages/prod/prod?prodid=${prodid}&shopid=${shopid}`,
+      })
+    }
+  },
+
+  // 点击购物车内加减按钮
+  handleAdd(e){
+    // 查看是否授权
+    util.checkAuthInfo(()=>{
+      let {num,item,subindex,index,type} = e.currentTarget.dataset
+      let data = {
+        "basketId": item.basketId||0,
+        "count": num,
+        "distributionCardNo": item.distributionCardNo||'',
+        "prodId": item.prodId,
+        "shopId": item.shopId,
+        "skuId": item.skuId||item.skuList[0].skuId,
+        channelId:wx.getStorageSync('channelId')||3
+      }
+      this.changeCar(data,'handleAdd',index,subindex)
+      this.addAnimate(e)
+    })
+  },
+  // 点击购物车内加减按钮
+  handleNum(e){
+    // 查看是否授权
+    util.checkAuthInfo(()=>{
+      let {num,item,type,index} = e.currentTarget.dataset
+      let data = {
+        "basketId": item.basketId||0,
+        "count": num,
+        "distributionCardNo": item.distributionCardNo||'',
+        "prodId": item.prodId,
+        "shopId": item.shopId,
+        "skuId": item.skuId||item.skuList[0].skuId,
+        channelId:wx.getStorageSync('channelId')||3
+      }
+      this.changeCar(data,'handleNum')
+      if(type == 'add'){
+        this.addAnimate(e)
+      }
+    })
+  },
+  addAnimate(e){
+    let startX = e.touches[0].clientX-10
+    let startY = e.touches[0].clientY-10
+    const query = wx.createSelectorQuery().in(this);
+    query.select('.cart-footer .car-box').boundingClientRect(cartRect => {
+      console.log(222222,cartRect);
+      if (!cartRect) return;
+      let animateInfo = {
+        startX,
+        startY,
+        endX:cartRect.left,
+        endY:cartRect.bottom,
+      }
+      this.setData({
+        move:true,
+        animateInfo
+      })
+      console.log(animateInfo);
+    }).exec();
+
+   
+  
+  },
+  endAnimate(){
+    let animateInfo = {
+      startX:9999,
+      startY:0,
+      endX:0,
+      endY:0,
+    }
+    this.setData({
+      move:false,
+      animateInfo
+    })
+  },
+  // 添加修改购物车数量
+  changeCar(data,name,index,subIndex) {
+    var params = {
+      url: "/p/shopCart/changeItem?t="+new Date().getTime(),
+      method: "post",
+      data,
+      callBack: (res) => {
+        if(res.code == 500){
+          wx.showToast({
+            title: res.msg,
+            icon:'none'
+          })
+        }else{
+          if(name == 'handleNum'){//加减 为你推荐
+            this.setData({
+              totalCartNum: this.data.totalCartNum + this.data.prodNum,
+            });
+          }else{//加
+            let list = this.data.list
+            list[index][subIndex].prodCount+=1
+            this.setData({
+              totalCartNum: this.data.totalCartNum + this.data.prodNum,
+              list
+            });
+          }
+        }
+      }
+    };
+    http.request(params);
+  },
 
   /**
    * 团购商品详情信息
@@ -751,7 +1067,7 @@ Page({
       url: "/p/shopCart/prodCount",
       method: "GET",
       dontTrunLogin: true,
-      data: {platform:1},
+      data: {channelId:wx.getStorageSync('channelId')||3},
       callBack: (res) => {
         if (res > 0) {
           // wx.setTabBarBadge({
@@ -793,7 +1109,21 @@ Page({
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
-
+    this.getNextPage()
+  },
+  // 触底加载下一页
+  getNextPage() {
+    console.log('getNextPage',this.data.current);
+    if (this.data.pages > this.data.current) {
+      this.setData({
+        current: this.data.current + 1
+      })
+      this.getProdRecommended()
+    } else {
+      this.setData({
+        isAll: true
+      })
+    }
   },
 
   /**
@@ -903,14 +1233,20 @@ Page({
         shopName: this.data.shopName,
         skuId: this.data.defaultSku.skuId,
         distributionCardNo: this.data.distributionCardNo,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3
       },
       callBack: (res) => {
+        wx.hideLoading();
+        if(res.code == 500){
+         return wx.showToast({
+            title: "加入购物车成功",
+            icon: "none"
+          })
+        }
         this.setData({
           totalCartNum: this.data.totalCartNum + this.data.prodNum,
           skuShow: false,
         });
-        wx.hideLoading();
         wx.showToast({
           title: "加入购物车成功",
           icon: "none"
@@ -969,7 +1305,7 @@ Page({
       distributionCardNo: ctx.data.distributionCardNo
     }));
     wx.navigateTo({
-      url: '/pages/submit-order/submit-order?orderEntry=1',
+      url: '/pages/submit-order/submit-order?orderEntry=1&shopId='+ctx.data.shopId,
     })
   },
 
@@ -1025,13 +1361,13 @@ Page({
       var cardno = wx.getStorageSync("distCardNo");
       return {
         title: this.data.prodName,
-        path: '/pages/prod/prod?prodid=' + this.data.prodId + '&cardno=' + cardno + '&type=' + this.data.shareType,
+        path: `/pages/prod/prod?prodid=${this.data.prodId}&shopid=${this.data.shopId}&cardno=${cardno}&type=${this.data.shareType}`,
         imageUrl: this.data.pic,
       }
     } else {
       return {
         title: this.data.prodName,
-        path: '/pages/prod/prod?prodid=' + this.data.prodId
+        path: `/pages/prod/prod?prodid=${this.data.prodId}&shopid=${this.data.shopId}`
       }
     }
   },
@@ -1161,6 +1497,33 @@ Page({
         showBacktop: false
       })
     }
+
+    if(e.scrollTop > 400){
+      let active = 1
+      if(e.scrollTop<659){
+        active = 1
+      }else if(e.scrollTop>659){
+        active = 2
+      }
+      this.setData({
+        opacity:1,
+        active
+      })
+    }else {
+      let opacity = 1
+
+      if(e.scrollTop < 400&&e.scrollTop > 300){
+        opacity = .6
+      }else if(e.scrollTop < 300&&e.scrollTop > 100){
+        opacity = .4
+      }else{
+        opacity = 0
+      }
+      this.setData({
+        opacity,
+        active:0
+      })
+    }
   },
 
   closeEarn: function () {
@@ -1175,7 +1538,6 @@ Page({
       url: '/pages/dis-center/dis-center',
     })
   },
-
   /**
    * 生成小程序二维码
    */

+ 2 - 3
pages/prod/prod.json

@@ -1,8 +1,7 @@
 {
   "usingComponents":{
-   "coupon": "/components/coupon/coupon",
-   "comm-star": "/components/commStar/commStar",
-   "login-popup": "/components/loginPopup/loginPopup"
+   "comm-star": "/components/commStar/commStar"
   },
   "navigationBarTitleText": "商品详情"
+  
 }

+ 184 - 173
pages/prod/prod.wxml

@@ -1,5 +1,11 @@
 <!-- 商品详情 -->
 <view class="container ">
+  <view class="fixed-box" style="opacity: {{opacity}};">
+    <view class="fixed-item {{active == 0?'active':''}}" data-active="0" catch:tap="handleFixed">商品</view>
+    <view class="fixed-item {{active == 1?'active':''}}" data-active="1" catch:tap="handleFixed">评价</view>
+    <view class="fixed-item {{active == 2?'active':''}}" data-active="2" catch:tap="handleFixed">详情</view>
+    <view class="fixed-item {{active == 3?'active':''}}" data-active="3" catch:tap="handleFixed">推荐</view>
+  </view>
   <!-- 轮播图 -->
   <view class="swiper-con">
     <view class="video-container" wx:if="{{video && isPlaying}}">
@@ -9,7 +15,7 @@
       <image class="play-icon" wx:if="{{!isPlaying}}" src="../../images/icon/play-red.png"></image>
       <text class="play-text {{isPlaying?'video-stop':'video-play'}}">{{isPlaying?'退出播放': videoDuration}}</text>
     </view>
-    <swiper wx:if="{{!isPlaying}}" circular="{{true}}" indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActiveColor}}">
+    <swiper class="swiper" wx:if="{{!isPlaying}}" circular="{{true}}" indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActiveColor}}">
       <block wx:for="{{imgs}}" wx:key='index'>
         <swiper-item>
           <image src='{{item}}'></image>
@@ -20,126 +26,55 @@
   <!-- 轮播图end -->
 
   <view class="content">
-
-    <!-- 倒计时栏 -->
-    <view class="countdown-box clearfix" wx-if="{{groupActivityId}}">
-      <!-- 拼团 -->
-      <text class="second-kill">拼团</text>
-      <view class="countdown-content">
-        <text class="countdown-tips" wx-if="{{groupActivity.activityStatus === 1}}">距开始仅剩</text>
-        <text class="countdown-tips" wx-if="{{groupActivity.activityStatus !== 1}}">距结束仅剩</text>
-        <text class="countdown-time">{{endOfGroupTime.day}} 天 {{endOfGroupTime.hou}} 时 {{endOfGroupTime.min}} 分 {{endOfGroupTime.sec}} 秒
-        </text>
-      </view>
-    </view>
     <!-- 普通商品价格 -->
     <view class="prod-price" wx-if="{{!groupActivityId}}">
       <text class="price">¥<text class="price-num">{{wxs.parsePrice(defaultSku.price)[0]}}</text>.{{wxs.parsePrice(defaultSku.price)[1]}}</text>
-      <!-- <text class="sales"></text> -->
     </view>
     <!-- 商品信息 -->
     <view class='prod-info'>
       <view class="tit-wrap">
         <view class="prod-tit">{{prodName}}</view>
-        <view class="col" bindtap='addOrCannelCollection'>
+        <!-- <view class="col" bindtap='addOrCannelCollection'>
           <image wx-if="{{!isCollection}}" src="../../images/icon/prod-col.png"></image>
           <image wx-if="{{isCollection}}" src="../../images/icon/prod-col-red.png"></image>
-          <!-- 收藏 -->
-        </view>
-      </view>
-      <view class="sales-p">{{brief}}</view>
-
-      <!-- 拼团商品价格 -->
-      <view class="goods-price" wx-if="{{groupActivityId}}">
-        <view class="current-price">
-          <text class="current-price">
-            <text class="price">¥<text class="price-num">{{wxs.parsePrice(detaultGroupSku.actPrice)[0]}}</text> .{{wxs.parsePrice(detaultGroupSku.actPrice)[1]}}</text>
-            <!-- <text class="sub">¥{{detaultGroupSku.actPrice}}</text> -->
-          </text>
-          <text class="condition">{{groupActivity.groupNumber}}人拼团价</text>
-        </view>
-        <view class="original">
-          原价
-          <text class="original-price">¥{{wxs.toPrice(detaultGroupSku.price)}}</text>
-        </view>
+        </view> -->
       </view>
-      <!-- 积分商品价格 -->
-      <!-- <view class="integral-prod-price" wx-if="">100积分</view> -->
+      <view class="sub-title" wx:if="{{halfTitle}}">{{halfTitle}}</view>
+      <view class="sales-p" wx:if="{{brief}}">{{brief}}</view>
     </view>
     <!-- 商品信息end -->
 
-    <!-- 满减折 -->
-    <view class="discount border-radius-box" wx:if="{{prodDiscountList.length}}" bindtap="clickDiscount">
-      <view class="coupon-tit">促销</view>
-      <view class="coupon-con discount-con">
-        <block wx:for="{{prodDiscountList}}" wx:key="discountId" wx:if="{{index<1}}">
-          <view class="discount-item">
-            <view class="discount-tag">{{wxs.parseDiscount(item.discountRule)}}</view>
-            <text class="discount-content">
-              <text wx:if="{{item.discountType}}">每</text> {{item.discountName}},最高减免{{item.maxReduceAmount}}元
-            </text>
-          </view>
-        </block>
+    <view class="intro-box">
+      <view class="intro-item">
+       <view class="title">{{brandName}}</view>
+       <view class="desc">品牌</view>
       </view>
-      <!-- <view class="num">共{{prodDiscountList.length}}张</view> -->
-      <view class="more">...</view>
-    </view>
-    <!-- 满减折end -->
-
-    <!-- 领券 -->
-    <view class="coupon border-radius-box" bindtap='showPopup' wx:if="{{couponList.length && !groupActivityId}}">
-      <view class="coupon-tit">领券</view>
-      <view class="coupon-con">
-        <text class="item" wx:for="{{couponList}}" wx:if="{{index<2}}" wx:key="couponId">满{{item.cashCondition}}<block wx:if="{{item.couponType == 1}}">减{{item.reduceAmount}}</block>
-          <block wx:if="{{item.couponType == 2}}">打{{item.couponDiscount}}折</block>
-        </text>
-      </view>
-      <view class="num">共{{couponList.length}}张</view>
-      <view class="more">...</view>
-    </view>
-    <!-- 领券end -->
-    <!-- 拼团信息 -->
-    <view class="spell-infor" wx-if="{{joinGroupList.length}}">
-      <view class="spell-infor-title">以下小伙伴正在发起拼团,你可以直接参加</view>
-      <view class="spell-infor-content" wx:for="{{joinGroupList}}" wx:key='groupTeamId'>
-        <!-- 头像 -->
-        <view class="head-img">
-          <image src="{{item.sharePic}}"></image>
-        </view>
-        <!-- 信息 -->
-        <view class="spell-msg">
-          <view class="username">{{item.shareNickName}}</view>
-          <view class="spell-text">
-            还差
-            <text class="red-font">{{item.groupNumber - item.joinNum}}</text> 人成团,剩余 {{item.endOfGroupTime.hou}}时{{item.endOfGroupTime.min}}分{{item.endOfGroupTime.sec}}秒
-          </view>
-        </view>
-        <!-- 凑团按钮 -->
-        <view class="join-group" bindtap="toSpellGroupDetail" data-groupteamid="{{item.groupTeamId}}">
-          去凑团
-        </view>
+      <view class="intro-item">
+       <view class="title">{{skuList[0].weight}}克</view>
+       <view class="desc">重量</view>
       </view>
-      <!-- 详情 -->
-      <view class="rules clearfix">
-        <text class="rules-text01">支付开团邀请{{groupActivity.groupNumber}}人参团,人数不足自动退款</text>
+      <view class="intro-item">
+       <view class="title">{{skuList[0].weightUnit}}</view>
+       <view class="desc">单位</view>
       </view>
+      <image class="more" src="/images/icon/more.png" mode="" />
     </view>
-    <!-- 拼团信息end -->
+
     <!-- 已选规格 -->
-    <view class="sku border-radius-box" bindtap='showSku'>
+    <!-- <view class="sku border-radius-box" bindtap='showSku'>
       <view class="sku-tit">已选</view>
       <view class="sku-con">{{selectedProp.length>1?selectedProp+',':selectedProp}}{{prodNum}}件</view>
       <view class="more">...</view>
-    </view>
+    </view> -->
     <!-- 已选规格end -->
     <!-- 评价 -->
     <view class='cmt-wrap border-radius-box'>
       <view class="cmt-tit" bindtap='showComment'>
         <view class="cmt-t">
-          评价({{prodCommData.number}})
+          评价({{prodCommData.all}})
           <!-- <text class="cmt-good">好评{{prodCommData.positiveRating}}%</text> -->
         </view>
-        <text class="cmt-good">好评{{prodCommData.positiveRating}}%     <text class="cmt-more"></text></text>
+        <text class="cmt-good">好评{{prodCommData.goodRate}}    <text class="cmt-more"></text></text>
 
         <!-- <view class="cmt-count">
           共{{prodCommData.number}}条
@@ -148,11 +83,11 @@
       </view>
       <view class="cmt-cont">
         <view class="cmt-tag" bindtap='showComment'>
-          <text>全部({{prodCommData.number}})</text>
-          <text>好评({{prodCommData.praiseNumber}})</text>
-          <text>中评({{prodCommData.secondaryNumber}})</text>
-          <text>差评({{prodCommData.negativeNumber}})</text>
-          <text>有图({{prodCommData.picNumber}})</text>
+          <text>全部({{prodCommData.all}})</text>
+          <text>好评({{prodCommData.goodCount}})</text>
+          <text>中评({{prodCommData.middleCount}})</text>
+          <text>差评({{prodCommData.badCount}})</text>
+          <text>有图({{prodCommData.picCount}})</text>
         </view>
         <view class="cmt-items">
           <view class="cmt-item" wx:for="{{littleCommPage}}" wx:key="prodCommId">
@@ -176,17 +111,44 @@
       </view>
     </view>
     <!-- 评价 end -->
+
+    <!-- 相似商品和一起购买 -->
+    <view class="swiper-box">
+      <view class="tab-box">
+        <view class="tab {{tab == 0?'active':''}}" data-tab="0" bind:tap="handleTab">相似商品</view>
+        <view class="tab {{tab == 1?'active':''}}" data-tab="1" bind:tap="handleTab">经常一起买</view>
+      </view>
+      <swiper class="swiper-prod {{list[0].length>3?'h844':''}}"  wx-if="{{list[0].length>0}}" indicator-dots="true" indicator-active-color="#006CE8" >
+        <swiper-item class="swiper-item" wx:if="{{item.length}}" wx:for="{{list}}">
+            <view class="item" wx:for="{{item}}" wx:for-item="i" wx:for-index="d" wx:key="{{d}}" bindtap='toProdPage' data-prodid="{{i.prodId}}" data-shopid="{{i.shopId}}">
+              <image lazy-load class="item-img" src="{{i.pic}}" mode="widthFix"></image>
+              <view class="item-title">{{i.prodName}}</view>
+              <view class="price-box">
+                  <view class="name-price" style="font-size:26rpx;color: #FF4D3A;">¥{{i.channelProdPrice}}</view>
+                  <view style="position: relative;"  data-index="{{index}}" data-subindex="{{d}}" data-num="1" data-item="{{i}}" catch:tap="handleAdd">
+                    <image style="width:44rpx;height:44rpx;" src="/images/icon/car-btn.png" mode=""/>
+                    <view class="num" wx:if="{{i.prodCount}}">{{i.prodCount}}</view>
+                  </view>
+              </view>
+            </view>
+        </swiper-item>
+      </swiper>
+        <view class="none" wx:if="{{list[0].length==0||list.length == 0}}">
+          <van-empty image="/images/icon/none.png" description="暂无商品" />
+        </view>
+
+    </view>
+
     <!-- 店铺 -->
-    <view class="shop-box border-radius-box">
+    <!-- <view class="shop-box border-radius-box"> -->
       <!-- top -->
-      <view class="shopbox-head">
+      <!-- <view class="shopbox-head">
         <view class="shop-logo">
           <image src="{{shopLogo}}"></image>
         </view>
         <view class="shop-name">{{shopName}}</view>
-        <!-- <view class="self-operate" wx-if="{{shopId==1}}">自营店铺</view> -->
         <view class="self-operate" >自营店铺</view>
-      </view>
+      </view> -->
       <!-- middle -->
       <!-- <view class="shop-situation">
       <view class="situation-item">
@@ -209,13 +171,108 @@
         <text class="handle-txt">进入店铺</text>
       </view>
     </view> -->
-    </view>
+    <!-- </view> -->
     <!-- 店铺end -->
     <!-- 商品详情 -->
     <view class="prod-detail">
       <rich-text nodes="{{content}}"></rich-text>
     </view>
     <!-- 商品详情end -->
+
+    <!-- 为你推荐-->
+    <view class="text-block" wx:if="{{prodList.length>0}}">
+      <image src="/images/icon/tuijian.png" mode="" class="icon"></image>
+      <view class="title">为你推荐</view>
+      <image src="/images/icon/tuijian.png" mode="" class="icon"></image>
+    </view>
+    <view class="prod-content" wx:if="{{prodList.length>0}}">
+        <view class="left">
+          <block wx:for="{{prodList}}" wx:key="index">
+            <view wx:if="{{index%2==0}}">
+              <view class="item" bindtap='toProdPage' data-prodid="{{item.prodId}}" data-shopid="{{item.shopId}}">
+                <view wx:if="{{item.stocks == 0}}" class="sell-out-box">
+                  <view class="sell-out-text">商品已售罄</view>
+                </view>
+                <image lazy-load class="item-img" src="{{item.pic}}" mode="widthFix"></image>
+                <view class="item-title-box">
+                  <view class="item-title">{{item.prodName}}</view>
+                </view>
+                <view class="name">
+                  <!-- <view class="name-title">{{'已售'+item.salesVolume}}</view> -->
+                  <!-- <view class="tag-box">
+                    <view class="tag">自营</view>
+                    <view class="text">月回头客5999+人</view>
+                  </view> -->
+                  <view class="heart">
+                    <view class="name-price">
+                      <view style="font-size:26rpx;color: #FF4D3A;">¥</view>{{wxs.toPrice(item.price)}}
+                    </view>
+
+                    <view wx:if="{{item.prodCount}}" class="num-box">
+                      <image class="btn" data-num="-1" data-item="{{item}}" catch:tap="handleNum" src="/images/icon/reduce.png" mode=""/>
+                        <view class="num">{{item.prodCount||0}}</view>
+                      <image class="btn" data-num="1" data-item="{{item}}" data-type="add" catch:tap="handleNum" src="/images/icon/add.png" mode=""/>
+                     </view>
+                    <image wx:else class="test" style="width:52rpx;height:52rpx;" src="/images/icon/car-btn.png" mode="" data-img="/images/icon/car-btn.png" data-type="add" data-num="1" data-item="{{item}}" data-index="{{index}}" catch:tap="handleNum" />
+                  </view>
+                  <!-- <view class="rank-box">
+                    <image src="/images/icon/top-icon.png" mode="" class="icon"/>
+                    <view class="text">粮油调味热卖榜</view>
+                    <image src="/images/icon/top1.png" mode="" class="top"/>
+                  </view> -->
+                </view>
+              </view>
+            </view>
+          </block>
+        </view>
+        <view class="right">
+          <block wx:for="{{prodList}}" wx:key="index">
+            <view wx:if="{{index%2==1}}">
+              <view class="item" bindtap='toProdPage' data-prodid="{{item.prodId}}"  data-shopid="{{item.shopId}}">
+                <view wx:if="{{item.stocks == 0}}" class="sell-out-box">
+                  <view class="sell-out-text">商品已售罄</view>
+                </view>
+                <image class="item-img" lazy-load src="{{item.pic}}" mode="widthFix"></image>
+                <view class="item-title-box">
+                  <view class="item-title">{{item.prodName}}</view>
+                </view>
+                <view class="name">
+                  <!-- <view class="name-title">{{'已售'+item.salesVolume}}</view> -->
+                  <!-- <view class="tag-box">
+                    <view class="tag">自营</view>
+                    <view class="text">月回头客5999+人</view>
+                  </view> -->
+                  <view class="heart">
+                    <view class="name-price">
+                      <view style="font-size:26rpx;color: #FF4D3A;">¥</view>{{wxs.toPrice(item.price)}}
+                    </view>
+                    <view wx:if="{{item.prodCount}}" class="num-box">
+                      <image class="btn" data-num="-1" data-item="{{item}}" catch:tap="handleNum" src="/images/icon/reduce.png" mode=""/>
+                        <view class="num">{{item.prodCount||0}}</view>
+                      <image class="btn" data-num="1" data-item="{{item}}" data-type="add" catch:tap="handleNum" src="/images/icon/add.png" mode=""/>
+                     </view>
+                    <image wx:else class="test" style="width:52rpx;height:52rpx;" src="/images/icon/car-btn.png" mode="" data-img="/images/icon/car-btn.png" data-type="add" data-num="1" data-item="{{item}}" data-index="{{index}}" catch:tap="handleNum" />
+                  </view>
+                  <!-- <view class="rank-box">
+                    <image src="/images/icon/top-icon.png" mode="" class="icon"/>
+                    <view class="text">粮油调味热卖榜</view>
+                    <image src="/images/icon/top1.png" mode="" class="top"/>
+                  </view> -->
+                </view>
+              </view>
+            </view>
+          </block>
+        </view>
+      </view>
+      <block wx:if="{{prodList.length>0}}">
+        <view class="tips" wx:if="{{isAll}}">已经到底咯~</view>
+        <view class="loading-box" wx:else>
+          <van-loading size="20px" type="spinner" color="#006CE8">加载中...</van-loading>
+        </view>
+      </block>
+
+      <!-- 为你推荐end -->
+
   </view>
 
   <!-- 底部按钮 -->
@@ -229,7 +286,7 @@
       客服
       <button class="contact-btn" open-type="contact" bindcontact="handleContact" session-from="sessionFrom"></button>
     </view>
-    <view class="btn icon" bindtap='toCartPage'>
+    <view class="btn icon car-box" bindtap='toCartPage'>
       <image src="../../images/tabbar/basket.png"></image>
       购物车
       <view class='badge badge-1' wx:if="{{totalCartNum>0}}">{{totalCartNum}}</view>
@@ -246,72 +303,13 @@
   <!-- <view class="ex-integral-foot">
     <view class="ex-integral-btn">立即兑换</view>
   </view> -->
-  <!-- 【拼团】底部按钮 -->
-  <view class="foot-box" wx-if="{{groupActivityId}}">
-    <view class="footer">
-      <view class="foot-btn" bindtap='toHomePage'>
-        <image src="../../images/tabbar/homepage.png"></image>
-        首页
-      </view>
-      <view catchtap='freeTell' class='foot-btn'>
-        <image src='../../images/icon/shop-customer-service.png'></image>
-        客服
-      </view>
-      <view class="foot-btn" bindtap='toCartPage'>
-        <image src="../../images/tabbar/basket.png"></image>
-        购物车
-        <view class='badge badge-1' wx:if="{{totalCartNum>0}}">{{totalCartNum}}</view>
-      </view>
-      <view class="buy-btn alone-buy cart-radius" bindtap='showSku' data-alonebuy="1">
-        <text>单独购买</text>
-      </view>
-      <view class="buy-btn group-buy cart-radius" bindtap='showGroupSku'>
-        <text>开团</text>
-      </view>
-    </view>
-  </view>
-  <!-- end 底部按钮 -->
+
 </view>
 
 
-<!-- 满减折弹窗 -->
-<view class="popup-hide" wx:if="{{showDiscountPopup}}">
-  <view class="popup-box border-radius-t-r">
-    <view class="popup-tit border-radius-t-r">
-      <text>促销</text>
-      <text class="close" bindtap='clickDiscount'></text>
-    </view>
-    <view class='popup-cnt popup-discount'>
-      <view class="coupon-con discount-con">
-        <block wx:for="{{prodDiscountList}}" wx:key="discountId">
-          <view class="discount-item">
-            <view class="discount-tag">{{wxs.parseDiscount(item.discountRule)}}</view>
-            <text class="discount-content">
-              <text wx:if="{{item.discountType}}">每</text> {{item.discountName}},最高减免{{item.maxReduceAmount}}元
-            </text>
-          </view>
-        </block>
-      </view>
-    </view>
-  </view>
-</view>
-<!-- 满减折弹窗 end -->
 
-<!-- 优惠券弹窗 -->
-<view class="popup-hide" wx:if="{{popupShow}}">
-  <view class="popup-box border-radius-t-r">
-    <view class="popup-tit border-radius-t-r">
-      <text>优惠券</text>
-      <text class="close" bindtap='closePopup'></text>
-    </view>
-    <view class='popup-cnt'>
-      <block wx:for="{{couponList}}" wx:key='couponId'>
-        <coupon showTimeType="{{1}}" canUse="{{true}}" item="{{item}}"></coupon>
-      </block>
-    </view>
-  </view>
-</view>
-<!-- 优惠券 end -->
+
+
 <!-- 规格弹窗 -->
 <view class="pup-sku" wx:if="{{skuShow}}">
   <view class="pup-sku-main border-radius-t-r">
@@ -377,17 +375,17 @@
   <view class="cmt-tit">
     <view class="cmt-t">
       商品评价
-      <text class="cmt-good">好评度{{prodCommData.positiveRating}}%</text>
+      <text class="cmt-good">好评度{{prodCommData.goodRate}}</text>
     </view>
     <text class="close" bindtap='closePopup'></text>
   </view>
   <view class="cmt-cont">
     <view class="cmt-tag">
-      <text bindtap='getProdCommPage' data-evaluate="-1" class="{{evaluate==-1?'selected':''}}">全部({{prodCommData.number}})</text>
-      <text bindtap='getProdCommPage' data-evaluate="0" class="{{evaluate==0?'selected':''}}">好评({{prodCommData.praiseNumber}})</text>
-      <text bindtap='getProdCommPage' data-evaluate="1" class="{{evaluate==1?'selected':''}}">中评({{prodCommData.secondaryNumber}})</text>
-      <text bindtap='getProdCommPage' data-evaluate="2" class="{{evaluate==2?'selected':''}}">差评({{prodCommData.negativeNumber}})</text>
-      <text bindtap='getProdCommPage' data-evaluate="3" class="{{evaluate==3?'selected':''}}">有图({{prodCommData.picNumber}})</text>
+      <text bindtap='getProdCommPage' data-commStatus="-1" class="{{commStatus==-1?'selected':''}}">全部({{prodCommData.all}})</text>
+      <text bindtap='getProdCommPage' data-commStatus="0" class="{{commStatus==0?'selected':''}}">好评({{prodCommData.goodCount}})</text>
+      <text bindtap='getProdCommPage' data-commStatus="1" class="{{commStatus==1?'selected':''}}">中评({{prodCommData.middleCount}})</text>
+      <text bindtap='getProdCommPage' data-commStatus="2" class="{{commStatus==2?'selected':''}}">差评({{prodCommData.badCount}})</text>
+      <text bindtap='getProdCommPage' data-commStatus="3" class="{{commStatus==3?'selected':''}}">有图({{prodCommData.picCount}})</text>
     </view>
     <view class="cmt-items">
       <view class="cmt-item" wx:for="{{prodCommPage.records}}" wx:key="prodCommId">
@@ -478,6 +476,19 @@
     <view class="code-txt" bindtap="downloadImg">保存至相册</view>
   </view>
 </view>
+
+
+
+<!-- 抛物线动画容器(数据驱动渲染) -->
+<view class="animation-wrap" id="animationWrap">
+  <view class="{{move?'move-x':''}}" style="position:absolute;width: 50rpx;height: 50rpx;left:{{animateInfo.startX}}px;top:{{animateInfo.startY}}px;--endX: {{animateInfo.endX-animateInfo.startX}}px;--endY: {{animateInfo.endY-animateInfo.startY}}px;" bind:animationend="endAnimate" >
+    <image 
+      class="{{move?'move-y':''}}"
+      src="/images/icon/car-btn.png"
+      style="width: 40rpx;height: 40rpx;--endX: {{animateInfo.endX-animateInfo.startX}}px; --endY: {{animateInfo.endY-animateInfo.startY}}px;"
+      bind:animationend="endAnimate"
+    ></image>
+  </view>
+</view>
 <!-- 二维码弹窗 end -->
-<wxs module="wxs" src="../../wxs/number.wxs" />
-<!-- <login-popup bind:onGotUserInfo="onGotUserInfo" isAuthInfo="{{isAuthInfo}}"></login-popup> -->
+<wxs module="wxs" src="../../wxs/number.wxs" />

+ 403 - 12
pages/prod/prod.wxss

@@ -2,6 +2,40 @@ page {
   background: #f4f4f4;
   height: 100%;
 }
+.fixed-box{
+  display: flex;
+  justify-content: space-between;
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  padding: 16rpx 24rpx;
+  box-sizing: border-box;
+  z-index: 9;
+}
+
+.fixed-box .fixed-item{
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #AAAAAA;
+}
+.fixed-box .fixed-item.active{
+  color: #222222;
+  position: relative;
+}
+.fixed-box .fixed-item.active::after{
+  display: block;
+  content: '';
+  position: absolute;
+  bottom: -12rpx;
+  left: calc(50% - 20rpx);
+  width: 40rpx;
+  height: 8rpx;
+  background: #006CE8;
+  border-radius: 6rpx 6rpx 6rpx 6rpx;
+
+}
 
 image {
   width: 100%;
@@ -18,12 +52,12 @@ image {
   position: relative;
 }
 
-swiper {
+.swiper {
   height: 750rpx;
   width: 100%;
 }
 
-swiper image {
+.swiper image {
   height: 750rpx;
   width: 100%;
 }
@@ -94,9 +128,8 @@ swiper image {
 /** 商品信息 */
 
 .prod-info {
-  padding: 20rpx;
+  padding: 0 20rpx;
   position: relative;
-  background: #fff;
   border-radius: 16rpx;
 }
 
@@ -145,14 +178,24 @@ swiper image {
   left: 0;
 }
 
+.sub-title{
+  font-size: 24rpx;
+  color: #AAAAAA;
+  margin-top: 16rpx;
+}
+
 .sales-p {
-  background: #fff;
-  line-height: 40rpx;
-  color: #999;
-  font-size: 28rpx;
-  margin-top: 6rpx;
-  margin-right: 104rpx;
-  text-align: justify;
+  height: 44rpx;
+  line-height: 44rpx;
+  padding: 0 16rpx;
+  background: #FFF5E9;
+  border-radius: 8rpx 8rpx 8rpx 8rpx;
+  border: 1rpx solid #BC9264;
+  font-weight: bold;
+  font-size: 24rpx;
+  color: #BC9264;
+  display: inline-block;
+  margin-top: 20rpx;
 }
 
 .prod-price {
@@ -401,7 +444,6 @@ swiper image {
 }
 
 .cmt-t {
-  width: 300rpx;
   font-size: 32rpx;
   color: #222222;
   font-weight: bold;
@@ -671,6 +713,40 @@ swiper image {
   margin-left: 15rpx;
 }
 
+.swiper-box{
+  padding: 20rpx;
+  background: #fff;
+  margin-top: 20rpx;
+  border-radius: 16rpx;
+}
+.swiper-box .tab-box{
+  display: flex;
+}
+.swiper-box .tab-box .tab{
+  font-size: 32rpx;
+  color: #222222;
+  padding-bottom: 18rpx;
+  margin-right: 48rpx;
+}
+.swiper-box .tab-box .tab.active{
+  position: relative;
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #222222;
+}
+.swiper-box .tab-box .tab.active::after{
+  content: '';
+  display: block;
+  position: absolute;
+  left: calc(50% - 20rpx);
+  bottom: 0;
+  width: 40rpx;
+  height: 8rpx;
+  background: #006CE8;
+  border-radius: 8rpx 8rpx 8rpx 8rpx;
+
+}
+
 /* 粉丝&商品 */
 .shop-situation {
   margin: 25rpx 0;
@@ -1746,4 +1822,319 @@ button.btn-type::after {
   text-align: center;
   color: #999;
   line-height: 2em;
+}
+
+.text-block{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 28rpx;
+  margin-bottom: 20rpx;
+}
+.text-block .icon{
+  width: 26rpx;
+  height: 26rpx;
+}
+.text-block .title{
+  font-weight: bold;
+  font-size: 36rpx;
+  color: #006CE8;
+  padding: 0 12rpx;
+}
+
+.prod-content {
+  text-align: justify;
+  display: flex;
+  justify-content: space-between;
+}
+.left,
+.right {
+  display: inline-block;
+  vertical-align: top;
+  width: 344rpx;
+}
+
+.swiper-prod{
+  margin-top: 24rpx;
+  min-height: 424rpx;
+}
+.swiper-prod.h844{
+  min-height: 844rpx;
+}
+.swiper-prod  .wx-swiper-dots {
+  position: absolute;  /* 绝对定位,基于swiper容器 */
+  bottom: 0;        /* 距离底部20px(垂直位置核心) */
+
+}
+.swiper-prod .swiper-item{
+  display: grid;
+  /* 列规则:5列等宽(1fr 代表"剩余空间等份分配") */
+  grid-template-columns: repeat(3, 1fr);
+  /* 行列间距:10rpx(小程序常用 rpx 适配多端) */
+  gap: 20rpx;
+  /* 容器内边距:避免网格贴边 */
+  align-items: start;
+}
+.swiper-prod .item{
+  width: 204rpx;
+  border: 2rpx solid #F0F0F0;
+  border-radius: 16rpx;
+}
+.swiper-prod .item .item-img{
+  width: 100%;
+  vertical-align: bottom;
+}
+
+.swiper-prod .item .item-title{
+  font-weight: bold;
+  font-size: 24rpx;
+  color: #222222;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+  padding: 0 20rpx;
+  margin-top: 20rpx;
+  height: 60rpx;
+}
+
+.swiper-prod .item .price-box{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-right: 8rpx;
+  margin-top: 20rpx;
+  padding: 0 20rpx;
+}
+
+.swiper-prod .item .price-box .num{
+  width: 24rpx;
+  height: 24rpx;
+  line-height: 24rpx;
+  text-align: center;
+  background: #FF4D3A;
+  border-radius: 50%;
+  font-size: 20rpx;
+  color: #FFFFFF;
+  position: absolute;
+  top: -12rpx;
+  right: -6rpx;
+}
+
+.swiper-prod .item .price-box .name-price{
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #FF4D3A;
+}
+
+
+.prod-content .item {
+  background-color: #fff;
+  /* margin-top: 20rpx; */
+  margin-bottom: 14rpx;
+  display: inline-block;
+  width: 344rpx;
+  border-radius: 16rpx;
+  overflow: hidden;
+  padding-bottom: 16rpx;
+  position: relative;
+}
+.prod-content .item .sell-out-box{
+  position: absolute;
+  top: 0;
+  left: 0;
+  border-radius: 16rpx;
+  width: 344rpx;
+  height: 100%;
+  background: rgba(255,255,255,0.6);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.prod-content .item .sell-out-text{
+  width: 156rpx;
+  height: 156rpx;
+  line-height: 156rpx;
+  border-radius: 50%;
+  text-align: center;
+  background: rgba(0,0,0,0.6);
+  font-size: 28rpx;
+  color: #FFFFFF;
+}
+.prod-content .heart {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-right: 8rpx;
+  margin-top: 20rpx;
+}
+
+.prod-content .name-price {
+  display: flex;
+  align-items: center;
+  font-weight: 800;
+  font-size: 36rpx;
+  color: #FF4D3A;
+}
+
+.prod-content .num-box{
+  display: flex;
+  align-items: center;
+}
+
+.prod-content .num-box .btn{
+  font-size: 20rpx;
+  width: 44rpx;
+  height: 44rpx;
+  text-align: center;
+}
+.prod-content .num-box .num{
+  width: 80rpx;
+  height: 44rpx;
+  background: #FFFFFF;
+  text-align: center;
+  line-height: 40rpx;
+  font-size: 24rpx ;
+  color: #222222;
+  border-bottom: 2rpx solid #F0F0F0;
+  border-top: 2rpx solid #F0F0F0;
+  box-sizing: border-box;
+}
+
+.prod-content .item-img {
+  width: 100%;
+  vertical-align: bottom;
+}
+
+.prod-content .item-title {
+  font-weight: bold;
+  font-size: 28rpx;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+  font-family: 'PingFang SC-Medium';
+  color: #1e1e1e;
+  padding: 0 20rpx;
+  /* height: 40rpx; */
+  line-height: 40rpx;
+  /* background-color: turquoise; */
+}
+
+.prod-content .item .name {
+  padding: 0 15rpx;
+  margin-top: 20rpx;
+  padding-bottom: 10rpx;
+  align-items: center;
+  font-size: 22rpx;
+  font-family: 'PingFang SC-Medium';
+}
+
+
+.prod-content .item-title-box {
+  display: flex;
+  position: relative;
+  z-index: 2;
+}
+
+.tips {
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+.loading-box{
+  text-align: center;
+  line-height: 80rpx;
+  height: 80rpx;
+}
+
+.none .van-empty__description{
+  margin-top: -30rpx;
+}
+
+
+/* 动画容器:全屏覆盖,不影响下层交互 */
+.animation-wrap {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  height: 100vh;
+  pointer-events: none;
+  z-index: 9999;
+}
+
+/* 抛物线小图标样式 */
+.move-x {
+  animation: 
+    moveX .5s linear forwards;  /* X轴匀速 */
+   
+}
+.move-y{
+  animation: moveY .5s cubic-bezier(0.5, -0.5, 1, 1)  forwards; 
+}
+
+/* 核心抛物线动画:贝塞尔曲线轨迹 */
+@keyframes moveX  {
+  from {
+    transform: translateX(0);
+  }
+  to {
+    transform: translateX(var(--endX));
+  }
+}
+
+/* 核心抛物线动画:贝塞尔曲线轨迹 */
+@keyframes moveY  {
+  from {
+    transform: translateY(0);
+    opacity: 1;
+  }
+  to {
+    transform: translateY(var(--endY));
+    opacity: 0;
+  }
+}
+
+
+.intro-box{
+  display: flex;
+  background: #FFFFFF;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+  padding: 24rpx 20rpx 24rpx 0;
+  margin-top: 20rpx;
+  position: relative;
+}
+.intro-box .intro-item{
+  flex: 1;
+  border-right: 2rpx solid #F0F0F0;
+  padding-left: 20rpx;
+  /* text-align: center; */
+}
+.intro-box .intro-item:last-child{
+  border-right: none;
+}
+
+.intro-box .intro-item .title{
+  font-weight: 800;
+  font-size: 28rpx;
+  color: #222222;
+  text-emphasis: emphasis;
+}
+.intro-box .more{
+  position: absolute;
+  width: 20rpx;
+  height: 20rpx;
+  top: calc(50% - 10rpx);
+  right: 20rpx;
+}
+
+.intro-box .intro-item .desc{
+  font-size: 24rpx;
+  color: #AAAAAA;
+  margin-top: 16rpx;
 }

+ 55 - 59
pages/prodComm/prodComm.js

@@ -5,12 +5,17 @@ Page({
    * 页面的初始数据
    */
   data: {
-    orderItemInfo: {
-      images: [],
+    loading:false,
+    orderNumber:'',
+    prodCommInfo: {
+      orderNumber:'',
+      pics: [],
       content: "",
+      isAnonymous: 0,
       score: 5,
-      isAnonymous: 1,
-      evaluate: 0,
+      deliveryPack: 5,
+      deliveryService: 5,
+      deliverySpeed: 5,
     },  //订单列表页参数
   },
 
@@ -18,60 +23,58 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    // 获取上页(订单列表)数据
-    // var orderItemInfo = wx.getStorageSync("orderItemInfo");
-    // // console.log(orderItemInfo);
-    // for (var i = 0; i < orderItemInfo.length; i++){
-    //   orderItemInfo[i].images = [];
-    //   orderItemInfo[i].content = "";
-    //   orderItemInfo[i].score = 5;
-    //   orderItemInfo[i].isAnonymous = 1;
-    //   orderItemInfo[i].evaluate = 0;
-    // }
-    // this.setData({
-    //   orderItemInfo: orderItemInfo
-    // })
-    // console.log(orderItemInfo)
+    console.log(options);
+    this.setData({
+      orderNumber:options.orderNumber
+    })
   },
   
   /**
    * 发表评论
    */
   submitComm: function (e) {
-      var orderItemInfo = this.data.orderItemInfo;
-        if(orderItemInfo.content.trim()==""){
+
+      let that = this
+      var prodCommInfo = this.data.prodCommInfo;
+      prodCommInfo.orderNumber = this.data.orderNumber
+        if(prodCommInfo.content.trim()==""){
          return wx.showToast({
             title: '评价不能为空',
             icon:"none"
           })
+        }else if(this.loading){
+          return
         }
+        this.loading = true
         wx.showLoading();
         var pics = '';
-        orderItemInfo.images.forEach(function(item){
+        prodCommInfo.pics.forEach(function(item){
           pics += item.path + ',';
         });
         if(pics!=''){
           pics = pics.substring(0,pics.length-1)
         }
+        prodCommInfo.pics = pics
+
         // 发布评论
         var params = {
           url: "/p/prodComm",
           method: "POST",
-          data: {
-            content: orderItemInfo.content,
-            score: orderItemInfo.score,
-            evaluate: orderItemInfo.evaluate,
-            isAnonymous: orderItemInfo.isAnonymous,
-            orderItemId: orderItemInfo.orderItemId,
-            prodId: orderItemInfo.prodId,
-            pics: pics
-          },
+          data: prodCommInfo,
           callBack:  (res) => {
-            
+            that.loading = true
             wx.hideLoading();
-            wx.navigateTo({
-              url: '/pages/commResult/commResult',
-            })
+            if(res.code == 500){
+              wx.showToast({
+                title:res.msg,
+                icon:'none'
+              })
+            }else{
+              wx.navigateTo({
+                url: '/pages/commResult/commResult',
+              })
+             
+            }
           }
         };
         http.request(params);
@@ -102,10 +105,10 @@ Page({
             var img = {};
             img.path = JSON.parse(res2).filePath;
             img.url = JSON.parse(res2).resourcesUrl + JSON.parse(res2).filePath;
-            var orderItemInfo = ths.data.orderItemInfo;
-            orderItemInfo.images.push(img);
+            var prodCommInfo = ths.data.prodCommInfo;
+            prodCommInfo.pics.push(img);
             ths.setData({
-              orderItemInfo: orderItemInfo
+              prodCommInfo: prodCommInfo
             })
           }
         };
@@ -119,19 +122,19 @@ Page({
    */
   removeImage(e) {
     const idx = e.target.dataset.idx
-    var orderItemInfo = this.data.orderItemInfo;
-    orderItemInfo.images.splice(idx, 1)
+    var prodCommInfo = this.data.prodCommInfo;
+    prodCommInfo.pics.splice(idx, 1)
     this.setData({
-      orderItemInfo: orderItemInfo
+      prodCommInfo: prodCommInfo
     });
   },
 
   onContentInput:function(e){
     const index = e.target.dataset.index
-    var orderItemInfo = this.data.orderItemInfo;
-    orderItemInfo.content = e.detail.value;
+    var prodCommInfo = this.data.prodCommInfo;
+    prodCommInfo.content = e.detail.value;
     this.setData({
-      orderItemInfo: orderItemInfo
+      prodCommInfo: prodCommInfo
     });
   },
 
@@ -141,34 +144,27 @@ Page({
   * 每一项的选择事件
   */
   onSelectedItem: function (e) {
-    var orderItemInfo = this.data.orderItemInfo;// 获取评论项
-    var isAnonymous = orderItemInfo.isAnonymous; // 获取当前评价的选中状态
+    var prodCommInfo = this.data.prodCommInfo;// 获取评论项
+    var isAnonymous = prodCommInfo.isAnonymous; // 获取当前评价的选中状态
     if (isAnonymous==1){
       isAnonymous = 0;
     }else{
       isAnonymous = 1;
     }
-    orderItemInfo.isAnonymous = isAnonymous; // 改变状态
+    prodCommInfo.isAnonymous = isAnonymous; // 改变状态
     this.setData({
-      orderItemInfo: orderItemInfo
+      prodCommInfo: prodCommInfo
     });
   },
 
   onStarChange:function(e){
-    var index = e.detail.idx;
     var val = e.detail.val;
+    let key = e.currentTarget.dataset.key
     console.log(e);
-    var evaluate = 0;
-    var orderItemInfo = this.data.orderItemInfo;
-    if(val<3){
-      evaluate = 2;
-    }else if(val==3){
-      evaluate = 1;
-    }
-    orderItemInfo.score = val;
-    orderItemInfo.evaluate = evaluate;
+    var prodCommInfo = this.data.prodCommInfo;
+    prodCommInfo[key] = val;
     this.setData({
-      orderItemInfo: orderItemInfo
+      prodCommInfo: prodCommInfo
     });
   },
 
@@ -179,7 +175,7 @@ Page({
   comPicPreView(e){
     var idx = e.currentTarget.dataset.idx
     var urls = []
-    this.data.orderItemInfo.images.forEach(el => {
+    this.data.prodCommInfo.pics.forEach(el => {
       urls.push(el.url)
     })
     wx.previewImage({

+ 19 - 4
pages/prodComm/prodComm.wxml

@@ -5,7 +5,7 @@
         <textarea placeholder="把使用心得分享给想买的他们吧" value="{{content}}" bindinput="onContentInput" data-index="{{index}}" maxlength="150">{{ content }}</textarea>
          <!-- 添加图片 -->
         <view class="img-box">
-          <view class="img-item"  wx:for="{{orderItemInfo.images}}" wx:key="*this" wx:for-index="idx" wx:for-item="imgItem">
+          <view class="img-item"  wx:for="{{prodCommInfo.pics}}" wx:key="*this" wx:for-index="idx" wx:for-item="imgItem">
             <image src="../../images/icon/del.png" data-idx="{{idx}}" bindtap="removeImage" mode="" class="del"/>
             <image src="{{imgItem.url}}" mode="aspectFill" class="img" data-idx="{{idx}}" bindtap="comPicPreView"/>
           </view>
@@ -27,9 +27,24 @@
     <view class="box">
         <!-- 评价星级 -->
         <view class="item-star">
-          <view class="label">评分</view>
-          <comm-star value="5" type="write" bind:onStarChange="onStarChange"></comm-star>
-          <view class="num">{{orderItemInfo.score}}.0</view>
+          <view class="label">商品评价</view>
+          <comm-star value="5" type="write" data-key="score" bind:onStarChange="onStarChange"></comm-star>
+          <view class="num">{{prodCommInfo.score}}.0</view>
+        </view>
+        <view class="item-star">
+          <view class="label">配送打包</view>
+          <comm-star value="5" type="write" data-key="deliveryPack" bind:onStarChange="onStarChange"></comm-star>
+          <view class="num">{{prodCommInfo.deliveryPack}}.0</view>
+        </view>
+        <view class="item-star">
+          <view class="label">送货速度</view>
+          <comm-star value="5" type="write" data-key="deliverySpeed" bind:onStarChange="onStarChange"></comm-star>
+          <view class="num">{{prodCommInfo.deliverySpeed}}.0</view>
+        </view>
+        <view class="item-star">
+          <view class="label">配送员服务</view>
+          <comm-star value="5" type="write" data-key="deliveryService" bind:onStarChange="onStarChange"></comm-star>
+          <view class="num">{{prodCommInfo.deliveryService}}.0</view>
         </view>
     </view>
    

+ 2 - 1
pages/prodComm/prodComm.wxss

@@ -148,7 +148,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
   -webkit-transform: translate(-50%, -50%) scale(1);
 }
 .item-star{
-  padding:20rpx;
+  padding:20rpx 0;
   display: flex;
   align-items: center;
   font-size: 28rpx;
@@ -159,6 +159,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
 .item-star .label{
   font-size: 28rpx;
   color: #222222;
+  width: 142rpx;
 }
 .item-star .num{
   font-weight: bold;

+ 0 - 121
pages/recent-news/recent-news.js

@@ -1,121 +0,0 @@
-// pages/recent-news/recent-news.js
-var http = require("../../utils/http.js");
-var config = require("../../utils/config.js");
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    news: [],
-    distNews: [] // 分销公告
-  },
-
-
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    console.log(options)
-    this.setData({
-      isDist: options.isDist
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-    var ths = this;
-    if (this.data.isDist == 'true') {
-      // 加载分销的公告
-      var params = {
-        url: "/p/distribution/msg/page",
-        method: "GET",
-        data: {},
-        callBack: function(res) {
-          console.log(res);
-          ths.setData({
-            distNews: res.records,
-          });
-        }
-      };
-      http.request(params);
-    } else {
-      //加载普通公告
-      var params = {
-        url: "/shop/notice/noticeList/0",
-        method: "GET",
-        data: {},
-        callBack: function(res) {
-          // console.log(res);
-          ths.setData({
-            news: res.records,
-          });
-        }
-      };
-      http.request(params);
-    }
-
-  },
-
-  // 跳转公告详情页
-  toNewsDetail: function(e) {
-    console.log(e)
-    var id = e.currentTarget.dataset.id
-    var type = e.currentTarget.dataset.type
-    if (type == 'dist') {
-      wx.navigateTo({
-        url: '/pages/news-detail/news-detail?id=' + e.currentTarget.dataset.id + '&type=' + type,
-      })
-    } else {
-      wx.navigateTo({
-        url: '/pages/news-detail/news-detail?id=' + e.currentTarget.dataset.id,
-      })
-    }
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  }
-})

+ 0 - 4
pages/recent-news/recent-news.json

@@ -1,4 +0,0 @@
-{
-  "backgroundTextStyle": "light",
-  "navigationBarTitleText": "最新公告"
-}

+ 0 - 23
pages/recent-news/recent-news.wxml

@@ -1,23 +0,0 @@
-<!--pages/recent-news/recent-news.wxml-->
-<view class='container'>
-  <view class='recent-news'>
-
-    <block wx:for='{{distNews}}' wx:key='index'>
-      <view class='news-item' bindtap='toNewsDetail' data-id="{{item.msgId}}" data-type="dist">
-        <view class='news-item-title'>{{item.msgTitle}}</view>
-        <view class='news-item-date'>
-          {{item.startTime}}
-        </view>
-      </view>
-    </block>
-
-    <block wx:for='{{news}}' wx:key='index'>
-      <view class='news-item' bindtap='toNewsDetail' data-id="{{item.id}}">
-        <view class='news-item-title'>{{item.title}}</view>
-        <view class='news-item-date'>
-          {{item.publishTime}}
-        </view>
-      </view>
-    </block>
-  </view>
-</view>

+ 0 - 33
pages/recent-news/recent-news.wxss

@@ -1,33 +0,0 @@
-/* pages/recent-news/recent-news.wxss */
-
-.recent-news {
-  background: #fff;
-}
-
-.recent-news .news-item {
-  padding: 20rpx 20rpx 0 20rpx;
-  position: relative;
-}
-
-.recent-news .news-item::after {
-  content: " ";
-  width: 100%;
-  height: 2rpx;
-  background-color: #e1e1e1;
-  left: 20rpx;
-  display: block;
-  position: absolute;
-}
-
-.recent-news .news-item .news-item-title {
-  font-size: 28rpx;
-  text-align: left;
-}
-
-.recent-news .news-item .news-item-date {
-  font-size: 24rpx;
-  color: #999;
-  text-align: right;
-  margin-top: 10rpx;
-  margin-bottom: 20rpx;
-}

+ 16 - 16
pages/search-page/search-page.js

@@ -36,23 +36,23 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    var ths = this;
-    //热门搜索
-    var params = {
-      url: "/search/hotSearch",
-      method: "GET",
-      data: {
-        number:10,
-        sort:1,
-      },
+    // var ths = this;
+    // //热门搜索
+    // var params = {
+    //   url: "/search/hotSearch",
+    //   method: "GET",
+    //   data: {
+    //     number:10,
+    //     sort:1,
+    //   },
    
-      callBack: function (res) {
-        ths.setData({
-        hotSearchList:res,
-        });
-      },
-    };
-    http.request(params);
+    //   callBack: function (res) {
+    //     ths.setData({
+    //     hotSearchList:res,
+    //     });
+    //   },
+    // };
+    // http.request(params);
 
     // 获取历史搜索
     this.getRecentSearch();

+ 2 - 2
pages/search-page/search-page.wxml

@@ -12,7 +12,7 @@
 
   <view class='search-display'>
     <!-- 热门搜索 -->
-    <view class='hot-search'>
+    <!-- <view class='hot-search'>
       <view class='title-text'>
         热门搜索
       </view>
@@ -21,7 +21,7 @@
         <text class='tags' bindtap='onHistSearch' data-name="{{item.content}}" >{{item.title}}</text>
         </block> 
       </view>
-    </view>
+    </view> -->
 
     <!-- 搜索历史 -->
     <view class='history-search'>

+ 1 - 1
pages/search-prod-show/search-prod-show.js

@@ -70,7 +70,7 @@ Page({
       size: this.data.size,
       sort: this.data.sts,
       isAllProdType: true,
-      platform:1,
+      channelId:wx.getStorageSync('channelId')||3,
       lat: wx.getStorageSync('LATITUDE'),
       lon: wx.getStorageSync('LONGITUDE'),
       distance: 9999999||wx.getStorageSync('DISTANCE') || 0

+ 2 - 1
pages/shopCategory/shopCategory.js

@@ -68,7 +68,8 @@ Page({
         size:10,
         sort:0,
         isAllProdType: true,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3,
+
       },
       callBack:res=>{
         this.setData({

+ 0 - 66
pages/shopCollect/shopCollect.js

@@ -1,66 +0,0 @@
-// pages/shopCollect/shopCollect.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 4
pages/shopCollect/shopCollect.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {},
-  "navigationBarTitleText": "收藏店铺"
-}

+ 0 - 36
pages/shopCollect/shopCollect.wxml

@@ -1,36 +0,0 @@
-<!-- 店铺收藏 -->
-<!--pages/shopCollect/shopCollect.wxml-->
-
-<view class="shop-collect">
-  <view class="top-fixed">
-    <view class="show-shop-num clearfix">
-      <view class="shop-num">您收藏了 <text class="red"> 3 </text> 个店铺</view>
-      <view class="editor red">编辑</view>
-    </view>
-  </view>
-
-  <!-- 店铺 -->
-  <view class="shop-item">
-    <view class="logo">
-      <image src=""></image>
-    </view>
-    <view class="shop-name">店铺名称店铺名称店铺名称店铺名称店铺名称</view>
-    <view class="self-operate">自营</view>
-  </view>
-
-  <view class="shop-item">
-    <view class="logo">
-      <image src=""></image>
-    </view>
-    <view class="shop-name">店铺名称</view>
-  </view>
-
-  <!-- 如果无收藏店铺 -->
-  <!-- <view class="empty">
-    <view class="empty-icon">
-      <image src="../../images/icon/empty.png"></image>
-    </view>
-    <view class="empty-text">您还没有收藏店铺</view>
-  </view> -->
-
-</view>

+ 0 - 103
pages/shopCollect/shopCollect.wxss

@@ -1,103 +0,0 @@
-/* 店铺收藏 */
-/* pages/shopCollect/shopCollect.wxss */
-/* 清除浮动 */
-.clearfix:after {
-  content: ".";
-  display: block;
-  height: 0;
-  clear: both;
-  visibility: hidden;
-}
-
-.shop-collect {
-  position: fixed;
-  width: 100%;
-  background: #f7f7f7;
-  height: 100%;
-  overflow: auto;
-}
-/* 头部固定 */
-.top-fixed {
-  margin-bottom: 80rpx;
-}
-.show-shop-num {
-  box-sizing: border-box;
-  position: fixed;
-  width: 100%;
-  top: 0;
-  padding: 20rpx;
-  background: #f7f7f7;
-  font-size: 28rpx;
-}
-.shop-num {
-  float: left;
-}
-.editor {
-  float: right;
-}
-.red {
-  color: #e4393c;
-}
-
-/* 店铺item */
-.shop-item {
-  background: #fff;
-  margin-bottom: 10rpx;
-  padding: 20rpx;
-}
-.logo,
-.shop-name {
-  display: inline-block;
-  vertical-align: middle;
-}
-.logo {
-  width: 220rpx;
-  height: 80rpx;
-  background: #eee;
-}
-.logo > image {
-  width: 100%;
-  height: 100%;
-}
-.shop-name {
-  font-size: 28rpx;
-  max-width: 50%;
-  overflow: hidden;
-  text-overflow:ellipsis;
-  white-space: nowrap;
-  margin: 0 20rpx;
-}
-/* 自营 */
-.self-operate {
-  display: inline-block;
-  font-size: 23rpx;
-  background: #e4393c;
-  color: #fff;
-  padding: 5rpx 7rpx 6rpx 7rpx;
-  border-radius: 5rpx;
-  line-height: 1em;
-}
-
-
-/* 列表为空 */
-.empty {
-  margin-top: 70rpx;
-  text-align: cneter;
-}
-.empty-icon {
-  display: block;
-  width: 80rpx;
-  height: 80rpx;
-  margin: 0 auto;
-  margin-bottom: 20rpx;
-}
-.empty-icon > image {
-  width: 100%;
-  height: 100%;
-}
-.empty-text {
-  font-size: 28rpx;
-  text-align: center;
-  color: #999;
-  line-height: 2em;
-}

+ 1 - 1
pages/shopPage/shopPage.js

@@ -115,7 +115,7 @@ Page({
       method: 'GET',
       data: {
         shopId: this.data.shopId,
-        platform:1,
+        channelId:wx.getStorageSync('channelId')||3,
         isAllProdType: true
       },
       callBack: (res) => {

+ 1 - 1
pages/shopProds/shopProds.js

@@ -54,7 +54,7 @@ Page({
         sort: this.data.sort,
         current: this.data.current,
         isAllProdType: true,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3,
       },
       callBack: (res) => {
         wx.hideLoading()

+ 1 - 1
pages/shopSearchResult/shopSearchResult.js

@@ -81,7 +81,7 @@ Page({
         sort: this.data.sts,
         shopId: this.data.shopId,
         isAllProdType: true,
-        platform:1
+        channelId:wx.getStorageSync('channelId')||3,
       },
       callBack: function (res) {
         ths.setData({

+ 0 - 1
pages/snapUpDetail/snapUpDetail.json

@@ -1,6 +1,5 @@
 {
   "usingComponents": {
-    "login-popup": "/components/loginPopup/loginPopup"
   },
   "backgroundTextStyle": "light",
   "navigationBarTitleText": "秒杀商品详情"

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно