wenjie 23 цаг өмнө
parent
commit
0a3495d179
95 өөрчлөгдсөн 1777 нэмэгдсэн , 412 устгасан
  1. 9 4
      app.json
  2. 1 1
      components/loginPopup/loginPopup.wxml
  3. 1 1
      components/production/production.wxss
  4. 112 0
      components/tabbar/tabbar.js
  5. 4 0
      components/tabbar/tabbar.json
  6. 27 0
      components/tabbar/tabbar.wxml
  7. 55 0
      components/tabbar/tabbar.wxss
  8. 6 3
      components/topNavtar/topNavtar.js
  9. 1 1
      components/topNavtar/topNavtar.wxml
  10. BIN
      images/icon/add.png
  11. BIN
      images/icon/car-btn.png
  12. BIN
      images/icon/good-icon.png
  13. BIN
      images/icon/head04.png
  14. BIN
      images/icon/hot-icon.png
  15. BIN
      images/icon/more-icon.png
  16. BIN
      images/icon/new-icon.png
  17. BIN
      images/icon/notice.png
  18. BIN
      images/icon/reduce.png
  19. BIN
      images/icon/refund.png
  20. BIN
      images/icon/sort1.png
  21. BIN
      images/icon/sort2.png
  22. BIN
      images/icon/sort3.png
  23. BIN
      images/icon/toComment.png
  24. BIN
      images/icon/toPay.png
  25. BIN
      images/icon/toTake.png
  26. BIN
      images/icon/user-bg.png
  27. BIN
      images/imgs/adv.png
  28. BIN
      images/imgs/banner.png
  29. BIN
      images/logo.png
  30. BIN
      images/tabbar/home.png
  31. BIN
      images/tabbar/mine.png
  32. BIN
      images/tabbar/scroll_home.png
  33. BIN
      images/tabbar/select_home.png
  34. BIN
      images/tabbar/select_mine.png
  35. BIN
      images/tabbar/select_shop_car.png
  36. BIN
      images/tabbar/select_sort.png
  37. BIN
      images/tabbar/shop_car.png
  38. BIN
      images/tabbar/sort.png
  39. 1 1
      packageMemberIntegral/pages/buyVip/buyVip.json
  40. 4 5
      pages/DetailsOfRefund/DetailsOfRefund.wxml
  41. 1 1
      pages/DetailsOfRefund/DetailsOfRefund.wxss
  42. 1 1
      pages/DetailsOfRefund2/DetailsOfRefund.wxml
  43. 3 3
      pages/DetailsOfRefund2/DetailsOfRefund.wxss
  44. 2 2
      pages/MaterialFlow/MaterialFlow.js
  45. 2 2
      pages/MaterialFlowInfo/MaterialFlowInfo.js
  46. 2 2
      pages/MaterialFlowInfo/MaterialFlowInfo.wxml
  47. 2 2
      pages/MaterialFlowInfo/MaterialFlowInfo.wxss
  48. 3 3
      pages/applyRefund/applyRefund.wxml
  49. 3 3
      pages/applyRefund/applyRefund.wxss
  50. 1 1
      pages/applyRefund1/applyRefund.wxss
  51. 7 4
      pages/basket/basket.wxml
  52. 37 52
      pages/basket/basket.wxss
  53. 21 8
      pages/category/category.js
  54. 27 17
      pages/category/category.wxml
  55. 101 35
      pages/category/category.wxss
  56. 433 70
      pages/category1/category.js
  57. 2 1
      pages/category1/category.json
  58. 160 33
      pages/category1/category.wxml
  59. 498 9
      pages/category1/category.wxss
  60. 2 2
      pages/confirmOrder/confirmOrder.wxss
  61. 1 1
      pages/delivery-address/delivery-address.wxml
  62. 1 1
      pages/delivery-address/delivery-address.wxss
  63. 1 1
      pages/editAddress/editAddress.js
  64. 3 3
      pages/editAddress/editAddress.wxss
  65. 25 6
      pages/index/index.js
  66. 41 27
      pages/index/index.wxml
  67. 101 47
      pages/index/index.wxss
  68. 2 2
      pages/locationAdd/locationAdd.js
  69. 1 1
      pages/locationAdd/locationAdd.wxml
  70. 3 3
      pages/locationAdd/locationAdd.wxss
  71. 1 1
      pages/login/login.json
  72. 1 1
      pages/login/login.wxml
  73. 1 1
      pages/login/login.wxss
  74. 1 1
      pages/myCoupon/myCoupon.wxss
  75. 2 2
      pages/order-detail/order-detail.js
  76. 1 1
      pages/order-detail/order-detail.wxss
  77. 2 2
      pages/order-detail2/order-detail.js
  78. 1 1
      pages/order-detail2/order-detail.wxss
  79. 2 2
      pages/orderList/orderList.js
  80. 4 2
      pages/orderList/orderList.wxml
  81. 4 4
      pages/orderList/orderList.wxss
  82. 2 2
      pages/pay-result/pay-result.wxss
  83. 1 1
      pages/prod-classify/prod-classify.json
  84. 3 3
      pages/prod/prod.js
  85. 7 7
      pages/prod/prod.wxss
  86. 1 1
      pages/search-prod-show/search-prod-show.wxss
  87. 1 1
      pages/shopInfo/shopInfo.wxml
  88. 5 5
      pages/snapUpDetail/snapUpDetail.wxss
  89. 1 1
      pages/snapUpList/snapUpList.wxss
  90. 2 2
      pages/sub-category/sub-category.wxss
  91. 6 6
      pages/submit-order/submit-order.wxss
  92. 3 0
      pages/user/user.wxml
  93. 5 3
      pages/user/user.wxss
  94. 9 2
      project.private.config.json
  95. 3 1
      utils/eventBus.js

+ 9 - 4
app.json

@@ -6,6 +6,7 @@
     "pages/basket/basket",
     "pages/myCoupon/myCoupon",
     "pages/category/category",
+    "pages/category1/category",
     "pages/search-page/search-page",
     "pages/delivery-address/delivery-address",
     "pages/editAddress/editAddress",
@@ -69,7 +70,8 @@
     "pages/MaterialFlow/MaterialFlow",
     "pages/MaterialFlowInfo/MaterialFlowInfo",
     "pages/ledRedPackage/ledRedPackage",
-    "pages/Review/Review"
+    "pages/Review/Review",
+    "components/tabbar/tabbar"
   ],
   "subpackages": [
     {
@@ -90,13 +92,14 @@
   ],
   "window": {
     "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#FF941A",
-    "navigationBarTitleText": "市民请集合",
+    "navigationBarBackgroundColor": "#006CE8",
+    "navigationBarTitleText": "星闪豹",
     "navigationBarTextStyle": "white"
   },
   "tabBar": {
-    "selectedColor": "#FF941A",
+    "selectedColor": "#04358D",
     "color": "#222222",
+    "custom": true,
     "list": [
       {
         "pagePath": "pages/index/index",
@@ -138,6 +141,7 @@
       "desc": "你的位置信息将用于小程序位置接口的效果展示"
     }
   },
+  "useSkyline": true,
   "sitemapLocation": "sitemap.json",
   "usingComponents": {
     "van-button": "@vant/weapp/button/index",
@@ -151,6 +155,7 @@
     "van-empty": "@vant/weapp/empty/index",
     "van-toast": "@vant/weapp/toast/index",
     "navbar": "/components/topNavtar/topNavtar",
+    "tabbar": "/components/tabbar/tabbar",
     "van-loading": "@vant/weapp/loading/index",
     "van-action-sheet": "@vant/weapp/action-sheet/index"
   }

+ 1 - 1
components/loginPopup/loginPopup.wxml

@@ -1,7 +1,7 @@
 <!-- 提示登录弹框 -->
 <view class="login-popup" wx:if="{{!isAuthInfo}}">
   <view class="log-pop-main">
-    <view class="log-pop-tit">欢迎来到市民请集合</view>
+    <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>

+ 1 - 1
components/production/production.wxss

@@ -67,7 +67,7 @@ page {
   color: #e43130;
 }
 .prod-items .hot-text .prod-text-info .collection-btn{
-  color: #FF941A;
+  color: #006CE8;
 }
 .deadline-price{
   font-size: 22rpx;

+ 112 - 0
components/tabbar/tabbar.js

@@ -0,0 +1,112 @@
+// components/tabbar/tabbar.js
+Component({
+  properties:{
+    active: { // 属性名
+      type: Number,
+      value: 0
+    },
+    isScroll: { // 属性名
+      type: Boolean,
+      value: false
+    },
+  },
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    num:0
+    // active:0,
+    // isScroll:true,
+  },
+  methods:{
+
+    handleTab(e){
+      let url = e.currentTarget.dataset.url
+      console.log(1111111,url);
+      wx.switchTab({
+        url,
+      })
+    },
+    /**
+   * 回到顶部
+   */
+  backToTop: function () {
+    wx.pageScrollTo({
+      scrollTop: 0
+    })
+  },
+  },
+  pageLifetimes: {
+    show: function() {
+      // 页面被展示
+      var app = getApp();
+      this.setData({
+        num:app.globalData.totalCartCount
+      })
+      
+    },
+    hide: function() {
+      // 页面被隐藏
+    },
+    resize: function(size) {
+      // 页面尺寸变化
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  
+})

+ 4 - 0
components/tabbar/tabbar.json

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

+ 27 - 0
components/tabbar/tabbar.wxml

@@ -0,0 +1,27 @@
+<!--components/tabbar/tabbar.wxml-->
+<view class="tabbar">
+ 
+  <view class="tabbar-item pic-item" wx:if="{{active == 0}}">
+    <image class="icon" wx:if="{{isScroll}}" bind:tap="backToTop" src="../../images/tabbar/scroll_home.png" mode=""/>
+    <image class="icon" wx:else src="../../images/tabbar/select_home.png" mode=""/>
+  </view>
+  <view class="tabbar-item" data-url="/pages/index/index" bind:tap="handleTab"  wx:else>
+    <image class="icon" src="../../images/tabbar/home.png" mode=""/>
+    <view class="name">首页</view>
+  </view>
+   
+  <view class="tabbar-item {{active == 1?'active':''}}"  data-url="/pages/category/category" bind:tap="handleTab">
+    <image class="icon" src="{{active == 1?'../../images/tabbar/select_sort.png':'../../images/tabbar/sort.png'}}" mode=""/>
+    <view class="name">分类</view>
+  </view>
+  <view class="tabbar-item {{active == 2?'active':''}}"  data-url="/pages/basket/basket" bind:tap="handleTab">
+    <view class="num" wx:if="{{num}}">{{num}}</view>
+    <image class="icon" src="{{active == 2?'../../images/tabbar/select_shop_car.png':'../../images/tabbar/shop_car.png'}}" mode=""/>
+    <view class="name">购物车</view>
+  </view>
+  <view class="tabbar-item {{active == 3?'active':''}}" data-url="/pages/user/user" bind:tap="handleTab">
+    <image class="icon" src="{{active == 3?'../../images/tabbar/select_mine.png':'../../images/tabbar/mine.png'}}" mode=""/>
+    <view class="name">我的</view>
+  </view>
+  
+</view>

+ 55 - 0
components/tabbar/tabbar.wxss

@@ -0,0 +1,55 @@
+/* components/tabbar/tabbar.wxss */
+.tabbar{
+  display: flex;
+  justify-content: space-between;
+  padding: 24rpx 74rpx;
+  width: 750rpx;
+  height: 166rpx;
+  background: #fff;
+  box-sizing: border-box;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  z-index: 999999999;
+  box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0,0,0,0.09);
+  border-radius: 32rpx 32rpx 0rpx 0rpx;
+}
+.tabbar .tabbar-item{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  width: 76rpx;
+  height: 76rpx;
+  position: relative;
+}
+.tabbar .tabbar-item .num{
+  position: absolute;
+  top: 0;
+  left: calc(100% - 25rpx) ;
+  /* width: 30rpx; */
+  height: 30rpx;
+  padding: 0 10rpx;
+  line-height: 30rpx;
+  text-align: center;
+  background: #FF4D3A;
+  border-radius: 15rpx;
+  font-size: 22rpx;
+  color: #FFFFFF;
+}
+.tabbar .tabbar-item .icon{
+  width: 44rpx;
+  height: 44rpx;
+}
+.tabbar .tabbar-item.pic-item .icon{
+  width: 76rpx;
+  height: 76rpx;
+}
+.tabbar .tabbar-item .name{
+  font-size: 20rpx;
+  color: #222222;
+}
+
+.tabbar .tabbar-item.active .name{
+  color: #006CE8;
+}

+ 6 - 3
components/topNavtar/topNavtar.js

@@ -5,21 +5,24 @@ Component({
    * 页面的初始数据
    */
   data: {
-    paddingTopNum: wx.getWindowInfo().statusBarHeight+7
+    // paddingTopNum: wx.getWindowInfo().statusBarHeight+7
+    height:0,//
+    paddingTopNum:wx.getMenuButtonBoundingClientRect().bottom -  wx.getMenuButtonBoundingClientRect().height
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
+     
 
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
-  onReady() {
-
+  ready() {
+  
   },
 
   /**

+ 1 - 1
components/topNavtar/topNavtar.wxml

@@ -1,4 +1,4 @@
 <!--components/topNavtar.wxml-->
-<view class="head" style="padding-top: {{paddingTopNum+2}}px;">
+<view class="head" id="targetBox" style="padding-top: {{paddingTopNum}}px;">
   <slot></slot>
 </view>

BIN
images/icon/add.png


BIN
images/icon/car-btn.png


BIN
images/icon/good-icon.png


BIN
images/icon/head04.png


BIN
images/icon/hot-icon.png


BIN
images/icon/more-icon.png


BIN
images/icon/new-icon.png


BIN
images/icon/notice.png


BIN
images/icon/reduce.png


BIN
images/icon/refund.png


BIN
images/icon/sort1.png


BIN
images/icon/sort2.png


BIN
images/icon/sort3.png


BIN
images/icon/toComment.png


BIN
images/icon/toPay.png


BIN
images/icon/toTake.png


BIN
images/icon/user-bg.png


BIN
images/imgs/adv.png


BIN
images/imgs/banner.png


BIN
images/logo.png


BIN
images/tabbar/home.png


BIN
images/tabbar/mine.png


BIN
images/tabbar/scroll_home.png


BIN
images/tabbar/select_home.png


BIN
images/tabbar/select_mine.png


BIN
images/tabbar/select_shop_car.png


BIN
images/tabbar/select_sort.png


BIN
images/tabbar/shop_car.png


BIN
images/tabbar/sort.png


+ 1 - 1
packageMemberIntegral/pages/buyVip/buyVip.json

@@ -1,6 +1,6 @@
 {
   "usingComponents": {},
   "navigationBarBackgroundColor": "#ffffff",
-  "navigationBarTitleText": "市民请集合-会员中心",
+  "navigationBarTitleText": "星闪豹-会员中心",
   "navigationBarTextStyle": "black"
 }

+ 4 - 5
pages/DetailsOfRefund/DetailsOfRefund.wxml

@@ -9,7 +9,8 @@
       <view class="title small">退款金额</view>
       <view class="price">¥{{goodsTotal}}</view>
     </view>
-      <view class="desc">申请通过后,将退回至原账户</view>
+      <view class="desc" wx:if="{{returnMoneySts == 70}}">推荐金额:20 退还积分:100(已过期20)</view>
+      <view class="desc" wx:else>申请通过后,将退回至原账户</view>
     </view>
   </view>
 
@@ -79,7 +80,7 @@
         </view> -->
     </view>
 
-    <view class="goods-info box">
+    <!-- <view class="goods-info box">
       <view class="item">
         <view class="label">商品金额</view>
         <view class="value">¥{{goodsTotal}}</view>
@@ -95,10 +96,8 @@
       <view class="total">
         <view class="label">总计:</view>
         <view class="value">¥{{refundAmount}}</view>
-        <!-- <view class="value" wx:if="{{refundAmount}}">¥{{refundAmount}}</view>
-        <view class="value" wx:else="">¥{{offsetPoints}}</view> -->
       </view>
-    </view>
+    </view> -->
 
     <view class="order-info box">
       <view class="title">订单信息</view>

+ 1 - 1
pages/DetailsOfRefund/DetailsOfRefund.wxss

@@ -123,7 +123,7 @@
   z-index: 9;
 }
 .DetailsOfRefund .process-box .step-box .step-item .point.active{
-  background: #FF941A;
+  background: #006CE8;
 }
 
 .DetailsOfRefund .process-box .step-box .step-item .line{

+ 1 - 1
pages/DetailsOfRefund2/DetailsOfRefund.wxml

@@ -182,7 +182,7 @@
     </view>
   </van-popup>
   <van-popup show="{{ flowShow }}" closeable round position="bottom" custom-style="height: 45%" bind:close="flowOnClose">
-    <van-steps custom-class="steps-style" steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#FF941A" />
+    <van-steps custom-class="steps-style" steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#006CE8" />
   </van-popup>
   <!-- 【退货退款状态下,买家同意后】退货地址 -->
   <view class="return-address" wx:if="{{returnMoneySts == 2 && applyType == 2}}">

+ 3 - 3
pages/DetailsOfRefund2/DetailsOfRefund.wxss

@@ -408,7 +408,7 @@ image {
 .bottom-button {
   width: 702rpx;
   height: 80rpx;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 40rpx;
   margin-top: 30rpx;
   font-family: PingFang SC, PingFang SC;
@@ -440,7 +440,7 @@ image {
 .sendpay-btn {
   width: 220rpx;
   height: 80rpx;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 40rpx;
   font-family: PingFang SC, PingFang SC;
   font-weight: bold;
@@ -560,7 +560,7 @@ image {
 /* 联系商家 */
 .contact-merchant {
   font-size: 28rpx;
-  color: #FF941A;
+  color: #006CE8;
   text-align: center;
   padding-top: 20rpx;
   margin-top: 20rpx;

+ 2 - 2
pages/MaterialFlow/MaterialFlow.js

@@ -91,7 +91,7 @@ Page({
             display: 'ALWAYS',
             padding: 10,
             borderRadius: 6,
-            color: '#FF941A'
+            color: '#006CE8'
           }
         },
         {
@@ -107,7 +107,7 @@ Page({
             display: 'ALWAYS',
             padding: 10,
             borderRadius: 6,
-            color: '#FF941A'
+            color: '#006CE8'
           },
         }
       ]

+ 2 - 2
pages/MaterialFlowInfo/MaterialFlowInfo.js

@@ -148,7 +148,7 @@ Page({
                     display: 'ALWAYS',
                     padding: 5,
                     borderRadius: 6,
-                    color: '#FF941A'
+                    color: '#006CE8'
                   }
                 };
                 let endMarker = {
@@ -162,7 +162,7 @@ Page({
                     display: 'ALWAYS',
                     padding: 5,
                     borderRadius: 6,
-                    color: '#FF941A'
+                    color: '#006CE8'
                   }
                 };
                 /*起终点配置end*/

+ 2 - 2
pages/MaterialFlowInfo/MaterialFlowInfo.wxml

@@ -27,7 +27,7 @@
       <view class="update-info" bindtap="updateInfo">
         <van-icon name="replay" />
       刷新</view>
-      <van-steps desc-class="" steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#FF941A" />
+      <van-steps desc-class="" steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#006CE8" />
     </view>
   </view>
   <view class="con4" wx:else>
@@ -36,7 +36,7 @@
 </block>
 <block wx:else>
   <view class="con4" wx:if="{{steps.length>0}}">
-    <van-steps steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#FF941A" />
+    <van-steps steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#006CE8" />
   </view>
   <view class="con4" wx:else>
     <van-empty description="暂无信息" />

+ 2 - 2
pages/MaterialFlowInfo/MaterialFlowInfo.wxss

@@ -13,7 +13,7 @@ page{
 }
 .con1{
   width: 700rpx;
-  background: #FF941A;
+  background: #006CE8;
   box-shadow: 0px 5rpx 18rpx 3rpx rgba(176, 176, 176, 0.06);
   border-radius: 20rpx;
   margin: 40rpx 25rpx;
@@ -88,7 +88,7 @@ page{
 .con4_time{
   font-size: 28rpx;
   font-weight: 500;
-  color: #FF941A;
+  color: #006CE8;
 }
 .con4_icon1{
   position: absolute;

+ 3 - 3
pages/applyRefund/applyRefund.wxml

@@ -10,14 +10,14 @@
     <view class="title">售后类型</view>
     <radio-group bindchange="radioChange">
       <view class="item">
-          <radio class="radio" checked="{{applyType == 1}}" value="1" color="#FF941A" />
+          <radio class="radio" checked="{{applyType == 1}}" value="1" color="#006CE8" />
           <view class="info">
             <view class="title">我要退款</view>
             <view class="desc">没收到货,货已收到货与商家协商后无需退货只退款</view>
           </view>
       </view>
       <view class="item">
-          <radio class="radio" value="2" checked="{{applyType == 2}}" color="#FF941A"/>
+          <radio class="radio" value="2" checked="{{applyType == 2}}" color="#006CE8"/>
           <view class="info">
             <view class="title">我要退货退款</view>
             <view class="desc">已收到货,需要退还已收到的商品</view>
@@ -94,7 +94,7 @@
           </view>
           <radio-group bindchange="chooseReason">
             <view class="item" wx:for="{{reasonList}}" wx:key="{{index}}">
-              <radio class="radio" checked="{{buyerReason === index}}" value="{{index}}" color="#FF941A" />
+              <radio class="radio" checked="{{buyerReason === index}}" value="{{index}}" color="#006CE8" />
               <view class="text">{{item.name}}</view>
             </view>
           </radio-group>

+ 3 - 3
pages/applyRefund/applyRefund.wxss

@@ -255,7 +255,7 @@
   height: 80rpx;
   line-height: 80rpx;
   text-align: center;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 40rpx 40rpx 40rpx 40rpx;
   font-weight: bold;
   font-size: 28rpx;
@@ -315,8 +315,8 @@ checkbox .wx-checkbox-input {
 checkbox .wx-checkbox-input.wx-checkbox-input-checked {
   /* background: #e43130;
   border-color: #e43130; */
-  background: #FF941A;
-  border-color: #FF941A;
+  background: #006CE8;
+  border-color: #006CE8;
 }
 
 /*checkbox选中后图标样式  */

+ 1 - 1
pages/applyRefund1/applyRefund.wxss

@@ -440,7 +440,7 @@ input::placeholder {
 /* 提交按钮 */
 
 .submit-btn {
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
   margin: 30rpx 20rpx;
   margin-top: 70rpx;

+ 7 - 4
pages/basket/basket.wxml

@@ -55,10 +55,10 @@
 													<text class='big-num'>{{wxs.parsePrice(prod.price)[0]}}</text>
 													<text class='small-num'>.{{wxs.parsePrice(prod.price)[1]}}</text>
 												</view>
-												<view class="m-numSelector">
-													<view bindtap='onCountMinus' class="minus" data-topindex="{{topIndex}}" data-scindex="{{scIndex}}" data-index="{{index}}"></view>
-													<input type='number' value='{{prod.prodCount}}' disabled></input>
-													<view bindtap='onCountPlus' class="plus" data-topindex="{{topIndex}}" data-scindex="{{scIndex}}" data-index="{{index}}"></view>
+												<view class="m-numSelector"  class="num-box">
+                        <image bindtap='onCountMinus' class="btn" data-topindex="{{topIndex}}" data-scindex="{{scIndex}}" data-index="{{index}}" src="/images/icon/reduce.png" mode=""/>
+													<input class="num" type='number' value='{{prod.prodCount}}' disabled></input>
+                          <image bindtap='onCountPlus' class="btn" data-topindex="{{topIndex}}" data-scindex="{{scIndex}}" data-index="{{index}}" src="/images/icon/add.png" mode=""/>
 												</view>
 											</view>
 										</view>
@@ -154,6 +154,9 @@
 			</view>
 			<view class="empty-text">您还没有添加商品到购物车哦~</view>
 		</view>
+
+    <tabbar active="2"></tabbar>
+
 	</view>
 
 <wxs module="wxs" src="../../wxs/number.wxs" />

+ 37 - 52
pages/basket/basket.wxss

@@ -237,54 +237,39 @@ page {
 }
 
 /* 加减框 */
-
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector {
-  display: flex;
-  box-sizing: border-box;
-  border: 2rpx solid #eee;
-  border-radius: 4rpx;
-}
-
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector .minus,
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector .plus {
-  height: 56rpx;
-  width: 56rpx;
-  box-sizing: border-box;
-  position: relative;
-}
-
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector input {
-  width: 56rpx;
-  height: 56rpx;
-  text-align: center;
-  color: #333;
-  border-left: 2rpx solid #eee;
-  border-right: 2rpx solid #eee;
-  font-size: 24rpx;
-  font-family: arial;
-}
-
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector .minus::before,
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector .plus::before,
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector .plus::after {
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  margin: auto;
-  content: ' ';
-  width: 22rpx;
-  height: 2rpx;
-  background-color: #7f7f7f;
-}
-
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector .plus::after {
-  transform: rotate(90deg);
-}
-
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector:not(.disabled) .minus:not(.disabled):active,
-.shop-item .prod-block .item .prodinfo .opt .m-numSelector:not(.disabled) .plus:not(.disabled):active {
+/* .car-box .item .info .price-box .num-box{ */
+  .num-box{
+    display: flex;
+    align-items: center;
+  }
+  
+  /* .car-box .item .info .price-box .num-box .btn{ */
+   .num-box .btn{
+    font-size: 20rpx;
+    width: 44rpx;
+    height: 44rpx;
+    text-align: center;
+  }
+  /* .car-box .item .info .price-box .num-box .num{ */
+   .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;
+  }
+
+
+
+
+
+
+.shop-item .prod-block .item .prodinfo .opt .num-box:not(.disabled) .btn:not(.disabled):active {
   opacity: 0.6;
 }
 
@@ -301,8 +286,8 @@ checkbox .wx-checkbox-input {
 checkbox .wx-checkbox-input.wx-checkbox-input-checked {
   /* background: #e43130;
   border-color: #e43130; */
-  background: #FF941A;
-  border-color: #FF941A;
+  background: #006CE8;
+  border-color: #006CE8;
 }
 
 /*checkbox选中后图标样式  */
@@ -321,7 +306,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
 
 .cart-footer {
   position: fixed;
-  bottom: 0;
+  bottom: 166rpx;
   left: 0;
   width: 100%;
   display: flex;
@@ -387,7 +372,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
   /* padding: 0 50rpx; */
   width: 220rpx;
   text-align: center;
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
   border-radius: 70rpx;
   margin-right: 20rpx;

+ 21 - 8
pages/category/category.js

@@ -10,6 +10,7 @@ Page({
    * 页面的初始数据
    */
   data: {
+    showTabbar:true,
     showLoading:false,
     rightView:'',
     paramsObj:{
@@ -186,25 +187,36 @@ Page({
       url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
       method: "GET",
       callBack: function (res) {
-
         ths.setData({
           categoryList: res,
           subCategoryList: res[ths.data.selIndex].children
         });
-        eventBus.on('categoryId', (data) => {
+        let categoryId =wx.getStorageSync('categoryId')
+        if(categoryId){
+
           that.data.categoryList.map((item,index)=>{
-              if(item.categoryId == data){
-                
+            if(item.categoryId == categoryId){
                 that.setData({
-                  selCategory:data,
+                  selCategory:categoryId,
                   selIndex:index,
                   subCategoryList:res[index].children
                 })
-                eventBus.clear('categoryId')
               }
           })
-        });
-        console.log(ths.data.subCategoryList);
+          wx.removeStorageSync('categoryId')
+        }
+        // eventBus.on('categoryId', (data) => {
+        //   eventBus.clear()
+        //   that.data.categoryList.map((item,index)=>{
+        //     if(item.categoryId == data){
+        //         that.setData({
+        //           selCategory:data,
+        //           selIndex:index,
+        //           subCategoryList:res[index].children
+        //         })
+        //       }
+        //   })
+        // });
         ths.getData(ths.data.subCategoryList[0])
    
       }
@@ -244,6 +256,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
+    console.log('show');
     this.resetData()
     // if (getApp().globalData.categoryId) {
     //   let categoryId = getApp().globalData.categoryId

+ 27 - 17
pages/category/category.wxml

@@ -28,7 +28,7 @@
       <view class="top-box top-all-box">
         <view wx:for='{{categoryList}}' class="type-item" wx:key='categoryId' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onMenuTab'>
           <!-- <view class="icon"></view> -->
-          <image class="icon" src="{{imgUrl+item.icon}}" mode="" />
+          <image class='icon {{selIndex==index?"active":""}}' src="{{imgUrl+item.icon}}" mode="" />
           <view class='name {{selIndex==index?"active":""}} '>
             {{item.categoryName}}
           </view>
@@ -48,15 +48,17 @@
 
   <!-- 顶部滚动分类 -->
   <view class="top-content">
-    <scroll-view scroll-x="true" class='top-box' scroll-into-view="{{'item'+selCategory}}">
+    <scroll-view scroll-x="true" class='top-box' 	scroll-into-view-offset="-150" 	scroll-with-animation		enable-passive scroll-into-view="{{'item'+selCategory}}">
       <view wx:for='{{categoryList}}' id="{{'item'+item.categoryId}}" class="type-item" wx:key='{{item.categoryId}}' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onMenuTab'>
-        <image class="icon" src="{{imgUrl+item.icon}}" mode="" />
+        <image class='icon {{selIndex==index?"active":""}}' src="{{imgUrl+item.icon}}" mode="" />
         <view class='name {{selIndex==index?"active":""}} '>
           {{item.categoryName}}
         </view>
       </view>
+      <view class="type-item" style="width: 100rpx;height: 44rpx"></view>
+
     </scroll-view>
-    <view wx:if="{{categoryList.length}}" class="all" bind:tap="handleAll">全部
+    <view wx:if="{{categoryList.length}}" class="all" bind:tap="handleAll">展开
       <image class="icon" src="../../images/icon/more-icon.png" mode="" />
     </view>
   </view>
@@ -69,6 +71,9 @@
     <scroll-view scroll-y="true" class='leftmenu'  scroll-into-view="{{'item'+subIndex}}">
       <view wx:for='{{subCategoryList}}' id="{{'item'+index}}" wx:key='categoryId'>
         <view class='menu-item {{subIndex==index?"active":""}} ' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onleftMenuTab'>
+        <image wx:if="{{index == 0}}" class="icon" src="../../images/icon/good-icon.png" mode=""/>
+        <image wx:if="{{index == 1 || index ==4}}" class="icon" src="../../images/icon/hot-icon.png" mode=""/>
+        <image wx:if="{{index == 5}}" class="icon" src="../../images/icon/new-icon.png" mode=""/>
           {{item.categoryName}}
         </view>
       </view>
@@ -77,10 +82,12 @@
     <!-- 左侧菜单end -->
 
     <!-- 右侧内容start -->
-    <scroll-view scroll-y="true" class='rightcontent' 	enable-passive scroll-into-view="{{rightView}}"	upper-threshold="10" 	lower-threshold="10"  scroll-top="{{topHeight}}" bindscroll="scroll"bindscrolltoupper="scrollTop" bindscrolltolower="scrollBottom">
+    <!-- scroll-view  -->
+    <view scroll-y="true" class='rightcontent' 	enable-passive scroll-into-view="{{rightView}}"	upper-threshold="10" 	lower-threshold="10"  scroll-top="{{topHeight}}" bindscroll="scroll"bindscrolltoupper="scrollTop" bindscrolltolower="scrollBottom">
+      <image class="banner" src="../../images/imgs/banner.png" mode="" />
       <!-- <text wx:if="{{subCategoryList.length>0}}" class="sub-title" >{{subCategoryList[subIndex].categoryName}}</text> -->
     <view class="loading" wx:if="{{showLoading}}">
-      <!-- <van-icon class="icon" color="#FF941A" size="50rpx" name="replay" /> -->
+      <!-- <van-icon class="icon" color="#006CE8" size="50rpx" name="replay" /> -->
       <image class="icon" src="../../images/imgs/loading-icon.png" mode=""/>
     </view>
       <view class="right-top-box">
@@ -91,14 +98,16 @@
         <view class="filter-box">
           <view class="filter-item {{sort == 1 ?'active':''}}" bind:tap="handleSale">销量</view>
           <view class="filter-item" bind:tap="handlePrice">价格 
-            <view class="icon-box"> 
-              <van-icon class="down" size="20rpx" color="{{sort ==2? '#FF941A':'#AAAAAA'}}" name="play" />
-              <van-icon class="up" size="20rpx" color="{{sort ==3? '#FF941A':'#AAAAAA'}}" name="play" />
-            </view> 
+            <!-- <view class="icon-box"> 
+              <van-icon class="down" size="20rpx" color="{{sort ==2? '#006CE8':'#AAAAAA'}}" name="play" />
+              <van-icon class="up" size="20rpx" color="{{sort ==3? '#006CE8':'#AAAAAA'}}" name="play" />
+            </view>  -->
+            <image wx:if="{{sort == 0}}" class="icon" src="../../images/icon/sort1.png" mode=""/>
+            <image wx:else class="icon" src="{{sort ==2?'../../images/icon/sort2.png':'../../images/icon/sort3.png'}}" mode=""/>
           </view>
         </view>
       </view>
-      <view class="right-box">
+      <scroll-view class="right-box"  scroll-y="true" 	enable-passive scroll-into-view="{{rightView}}"	upper-threshold="10" 	lower-threshold="10"  scroll-top="{{topHeight}}" bindscroll="scroll"bindscrolltoupper="scrollTop" bindscrolltolower="scrollBottom">
         <view class="product-item" id="{{'test'+index}}" wx:for="{{productList}}">
           <image class="pic" src="{{item.pic}}" mode="" data-prodId="{{item.prodId}}" bind:tap="toProdPage" />
           <view class="info">
@@ -107,9 +116,9 @@
             <view class="price-box">
               <view class="price">¥{{item.price}}</view>
               <view wx:if="{{item.show}}" class="num-box">
-                <view class="btn" data-num="-1" data-item="{{item}}" bind:tap="handleNum">-</view>
+              <image class="btn" data-num="-1" data-item="{{item}}" bind:tap="handleNum" src="/images/icon/reduce.png" mode=""/>
                 <view class="num">{{item.prodCount}}</view>
-                <view class="btn" data-num="1" data-item="{{item}}" bind:tap="handleNum">+</view>
+              <image class="btn" data-num="1" data-item="{{item}}" bind: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" />
             </view>
@@ -119,17 +128,17 @@
         <view class="sub-cate-title not-category-data" wx:if="{{subCategoryList.length==0}}">
           <view class="sub-cate-text">无二级分类</view>
         </view>
-      </view>
-    </scroll-view>
+      </scroll-view>
+    </view>
     <!-- 右侧内容end -->
   </view>
   <view class="not-data-list" wx:else>
     <van-empty image="search" description="附近暂无可配送门店" />
-    <view class="reset-localization" bindtap="toLocationPage">定位不准确?<text style="color: rgb(40,120,255);">点击手动定位</text></view>
+    <!-- <view class="reset-localization" bindtap="toLocationPage">定位不准确?<text style="color: rgb(40,120,255);">点击手动定位</text></view> -->
   </view>
 
   <!-- 购物车弹窗 -->
-  <van-popup show="{{ showCar }}" position="bottom" safe-area-inset-bottom="{{false}}" close-on-click-overlay="{{true}}" z-index="{{99999}}" round bind:close="onCarClose">
+  <van-popup show="{{ showCar }}" position="bottom" safe-area-tab-bar safe-area-inset-bottom close-on-click-overlay="{{true}}" z-index="{{99999}}" round bind:close="onCarClose">
     <view class="car-box">
       <view wx:if="{{carData.length}}">
         <view class="item" wx:for="{{carData}}">
@@ -179,6 +188,7 @@
 
     <view class="btn" bind:tap="handleBuy">去结算</view>
   </view>
+  <tabbar active="1"></tabbar>
 
 </view>
 <wxs module="wxs" src="../../wxs/number.wxs" />

+ 101 - 35
pages/category/category.wxss

@@ -2,6 +2,7 @@
 
 page {
   height: 100%;
+  background: #E5F1FF;
 }
 
 .container {
@@ -21,13 +22,14 @@ page {
 /* 搜索栏 */
 .top-search-input {
   margin-left: 20rpx;
-  margin-top: -10rpx;
   display: flex;
   align-items: center;
   width: 500rpx;
-  border: 2rpx solid #FF941A;
+  border: 2rpx solid #006CE8;
   border-radius: 40rpx;
   height: 60rpx;
+  background: #fff;
+  box-sizing: border-box;
 }
 
 .top-search-swiper {
@@ -50,7 +52,7 @@ page {
   width: 100rpx;
   font-weight: bold;
   font-size: 28rpx;
-  color: #FF941A;
+  color: #006CE8;
 }
 
 
@@ -67,6 +69,8 @@ page {
   width: 100%;
   padding-left: 24rpx;
   box-sizing: border-box;
+  background: #E5F1FF;
+  padding-bottom: 18rpx;
 }
 
 .top-content .all{
@@ -74,12 +78,13 @@ position: absolute;
 top: 0;
 right: 0;
 width: 64rpx;
-height: 144rpx;
+height: 100%;
 display: flex;
 justify-content: center;
 align-items: center;
 letter-spacing: 10rpx;
-background: linear-gradient( 180deg, #FFFFFF 0%, #F8F8F8 100%);
+background: linear-gradient( 180deg, rgba(219,230,244,0) 0%, #DDE9F7 11%, #E5F1FF 100%);
+box-shadow: -10rpx 0rpx 12rpx 2rpx rgba(0,0,0,0.07);
 writing-mode: vertical-rl;
 font-weight: bold;
 font-size: 24rpx;
@@ -93,10 +98,15 @@ color: #222222;
 }
 
 .top-all-box {
-  display: flex;
+  /* display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
-  align-items: flex-start;
+  align-items: flex-start; */
+  display: grid;
+  /* 列规则:5列等宽(1fr 代表"剩余空间等份分配") */
+  grid-template-columns: repeat(5, 1fr);
+  /* 行列间距:10rpx(小程序常用 rpx 适配多端) */
+  gap: 16rpx;
   padding: 0 32rpx 150rpx;
   box-sizing: border-box;
   max-height: 750rpx;
@@ -104,24 +114,28 @@ color: #222222;
   overflow-x: hidden;
 }
 
-.top-all-box .type-item{
-margin-bottom: 24rpx;
+.top-box.top-all-box .type-item{
+  margin-bottom: 24rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
 }
 
 .top-box .type-item{
   display: inline-block;
+  text-align: center;
 }
 
 .top-box .type-item .icon{
-  width: 100rpx;
-  height: 100rpx;
+  width: 72rpx;
+  height: 72rpx;
   background: #F6F6F6;
   margin-left: 8rpx;
-  border-radius: 50%;
+  border-radius: 16rpx;
 
 }
 .top-box .type-item .name{
-  font-size: 24rpx;
+  font-size: 22rpx;
   color: #222222;
   width: 116rpx;
   height: 36rpx;
@@ -133,14 +147,24 @@ margin-bottom: 24rpx;
   overflow: hidden;
 }
 
+.top-box .type-item .icon.active{
+  width: 88rpx;
+  height: 88rpx;
+  border: 5rpx solid #006CE8;
+  border-radius: 32rpx;
+}
+
 .top-box .type-item .name.active{
-  background: #FFDF00;
+  font-size: 24rpx;
+  background: #006CE8;
   border-radius: 18rpx 18rpx 18rpx 18rpx;
+  color: #FFFFFF;
 }
 
 
 .popup-box{
   position: relative;
+  background: #E5F1FF;
 }
  .close-box{
    position: absolute;
@@ -153,7 +177,8 @@ margin-bottom: 24rpx;
   text-align: center;
   line-height: 82rpx;
   border-top: 1rpx solid #F0F0F0;
-  background: #fff;
+  background: #E5F1FF;
+
 }
 
  .close-box .icon{
@@ -190,6 +215,14 @@ scroll-view ::-webkit-scrollbar {
   overflow: hidden;
   white-space: nowrap;
   text-overflow: ellipsis;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.menu-item .icon{
+  width: 30rpx;
+  height: 30rpx;
+  margin-right: 8rpx;
 }
 
 .menu-item.active {
@@ -207,7 +240,7 @@ scroll-view ::-webkit-scrollbar {
   width: 8rpx;
   height: 60rpx;
   top: 20rpx;
-  background: #FF941A;
+  background: #006CE8;
 }
 
 .menu-item text.tips-num {
@@ -254,6 +287,13 @@ scroll-view ::-webkit-scrollbar {
   z-index: 1;
   position: relative;
 }
+.rightcontent  .banner{
+  width: 506rpx;
+  height: 144rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx;
+  
+}
 .rightcontent .right-top-box{
   position: fixed;
   z-index: 9999;
@@ -264,18 +304,28 @@ scroll-view ::-webkit-scrollbar {
 .rightcontent .filter-box{
   display: flex;
   justify-content: flex-end;
-  width: 550rpx;
+  width: 510rpx;
+  background: #F6F6F6;
+  padding: 8rpx 20rpx;
+  box-sizing: border-box;
+  margin-left: 20rpx;
+  margin-top: 10rpx;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
 }
 .rightcontent .filter-box .filter-item{
   font-size: 24rpx;
   color: #222222;
   margin-left: 40rpx;
   display: flex;
+  align-items: center;
 }
 .rightcontent .filter-box .filter-item.active{
-  color: #FF941A;
+  color: #006CE8;
+}
+.rightcontent .filter-box .filter-item .icon{
+  width: 20rpx;
+  height: 20rpx;
 }
-
 .rightcontent .filter-box .filter-item .icon-box{
   display: flex;
   flex-direction: column;
@@ -313,7 +363,7 @@ scroll-view ::-webkit-scrollbar {
 }
 
 .rightcontent .thrid-type-box .thrid-type-item.active{
-  background: #FF941A;
+  background: #006CE8;
   color: #FFFFFF;
 }
 
@@ -321,7 +371,7 @@ scroll-view ::-webkit-scrollbar {
   /* padding-bottom: 300rpx; */
   /* padding-bottom: 500rpx; */
   padding-top: 98rpx;
-
+  position: relative;
 }
 
 .rightcontent  .product-item{
@@ -364,7 +414,7 @@ align-items: center;
 }
 .rightcontent  .product-item .info .price{
   font-weight: 800;
-  font-size: 28rpx;
+  font-size: 36rpx;
   color: #FF4D3A;
 }
 
@@ -459,7 +509,8 @@ align-items: center;
 /* 购物车 */
 
 .car-box{
-  padding: 28rpx 24rpx 123rpx;
+  /* padding: 28rpx 24rpx 123rpx; */
+  padding: 28rpx 24rpx 269rpx;
   max-height: 700rpx;
   overflow: auto;
 }
@@ -521,30 +572,29 @@ align-items: center;
 
 /* .car-box .item .info .price-box .num-box .btn{ */
  .num-box .btn{
-  color: #AAAAAA;
   font-size: 20rpx;
-  width: 40rpx;
-  height: 40rpx;
+  width: 44rpx;
+  height: 44rpx;
   text-align: center;
-  line-height: 40rpx;
-  background: #F0F0F0;
-
 }
 /* .car-box .item .info .price-box .num-box .num{ */
  .num-box .num{
   width: 80rpx;
-  height: 40rpx;
-  background: #F0F0F0;
+  height: 44rpx;
+  background: #FFFFFF;
   text-align: center;
   line-height: 40rpx;
-  margin: 0 4rpx;
   font-size: 24rpx ;
   color: #222222;
+  border-bottom: 2rpx solid #F0F0F0;
+  border-top: 2rpx solid #F0F0F0;
+  box-sizing: border-box;
 }
 
 .bottom-box{
   position: fixed;
-  bottom: 0;
+  /* bottom: 0; */
+  bottom: 166rpx;
   left: 0;
   z-index: 999999;
   box-sizing: border-box;
@@ -598,7 +648,7 @@ align-items: center;
 .bottom-box .btn{
   width: 342rpx;
   height: 80rpx;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 40rpx;
   text-align: center;
   line-height: 80rpx;
@@ -627,4 +677,20 @@ align-items: center;
   text-align: center;
   color: #999;
   line-height: 2em;
-}
+}
+
+/* 纵向滚动容器:隐藏垂直滚动条 */
+.thrid-type-box::-webkit-scrollbar {
+  width: 0; /* 滚动条宽度设为0(关键) */
+  height: 0; /* 横向滚动时设置高度为0 */
+  display: none; /* 直接隐藏 */
+}
+
+/* 可选:针对滚动轨道和滑块的进一步隐藏 */
+.thrid-type-box::-webkit-scrollbar-track {
+  display: none;
+}
+.thrid-type-box::-webkit-scrollbar-thumb {
+  display: none;
+}
+

+ 433 - 70
pages/category1/category.js

@@ -3,35 +3,160 @@
 var http = require("../../utils/http.js");
 var util = require('../../utils/util.js');
 var config = require("../../utils/config.js");
-
+import eventBus from '../../utils/eventBus';
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    showTabbar:true,
+    showLoading:false,
+    rightView:'',
+    paramsObj:{
+      sort:0,
+      orderBy:0
+    },
+    type:'bottom',
+    toViewId:'test1',
+    topHeight:300,
+    sort:0,
+    imgUrl:'',
+    testShopId:0,//109
+    totalInfo:{"totalMoney":0,"finalMoney":0,"subtractMoney":0.0,"count":0},
+    shopId:0,
+    show:false,
+    showCar:false,
     selIndex: 0,
+    selCategory:0,
+    subIndex:0,
+    thridIndex:-1,
+    subCategoryId:0,
     categoryList: [],
     categoryImg: '',
     subCategoryList: [],
+    thridCategoryList:[],
     pageTopHeight: wx.getWindowInfo().statusBarHeight,
     hotList: [],
     topCurrentIndex: 0,
+    productList:[],
+    carData:[],//购物车数据
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    
     this.getRecommended()
-    this.get_neighborShop()
+    // this.get_neighborShop()
     // this.get_categoryInfo()
   },
+  scroll(){
+  },
+  scrollTop(){
+    console.log('top',);
+    if(this.data.subIndex==0||this.data.subCategoryList.length==0) return
+    this.setData({
+      type:'top'
+    })
+    let data = {currentTarget:{
+      dataset:{
+        index:this.data.subIndex-1
+      }
+    }}
+    this.onleftMenuTab(data)
+    // this.setData({
+    //   topHeight:0
+    // })
+  },
+  scrollBottom(){
+    console.log('bottom');
+    if(this.data.subIndex==(this.data.subCategoryList.length-1)||this.data.subCategoryList.length==0) return
+    this.setData({
+      type:'bottom'
+    })
+    let data = {currentTarget:{
+      dataset:{
+        index:this.data.subIndex+1
+      }
+    }}
+    this.onleftMenuTab(data)
+    // this.setData({
+    //   topHeight:0
+    // })
+  },
+  handleSale(){
+    this.setData({
+      sort:1,
+      paramsObj:{sort:1,orderBy:0}
+    })
+    this.getData(this.data.subCategoryList[this.data.subIndex])
+  },
+  handlePrice(){
+    // 没点击价格
+    if(this.data.sort !=2&&this.data.sort!=3){
+      this.setData({
+        sort:2,
+        paramsObj:{sort:2,orderBy:0}
+      })
+    }else{
+     let sort = this.data.sort ==2?3:2
+     this.setData({
+      sort,
+      paramsObj:{sort:2,orderBy:this.data.sort ==2?0:1}
+    })
+    }
+    this.getData(this.data.subCategoryList[this.data.subIndex])
+  },
+  resetData(){
+    this.setData({
+      subIndex:0,
+      thridIndex:-1,
+      subCategoryId:0,
+    })
+  },
+  // 点击购物车内加减按钮
+  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
+    }
+    this.changeCar(data)
+  },
+  handleAll(){
+    this.setData({
+      show:true
+    })
+  },
+  onClose(){
+    this.setData({
+      show:false
+    })
+  },
+  openCar(){
+    console.log(111111);
+    this.setData({
+      showCar:true
+    })
+  },
+  onCarClose(){
+    this.setData({
+      showCar:false
+    })
+  },
   /**
    * 获取距离最近店铺id
    * @param {*} e 
    */
-  get_neighborShop: function () {
+   get_neighborShop: function () {
     var params = {
       url: "/shop/neighborShop",
       method: "GET",
@@ -42,44 +167,78 @@ Page({
       },
       callBack: (res) => {
         // this.get_categoryInfo(res)
+    console.log(99999999,res);
 
-        if(typeof res == 'number'){
-          this.get_categoryInfo(res)
-        }else{
+        this.setData({
+          shopId:res.shopId
+        })
           this.get_categoryInfo(res.shopId)
-        }
+          this.getCarData(this.data.shopId)
       }
     };
     http.request(params);
   },
   get_categoryInfo: function (shopid) {
     var ths = this;
+    let that = this
     //加载分类列表
     var params = {
-      url: "/category/categoryInfo",
+      // url: "/category/categoryInfo",
+      url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
       method: "GET",
-      data: {
-        shopId:shopid
-      },
       callBack: function (res) {
-        let categoryName = ''
-        res.forEach(e => {
-          categoryName = e.categoryName.split('>')
-          e.categoryName = categoryName[0]
-        })
         ths.setData({
           categoryList: res,
+          subCategoryList: res[ths.data.selIndex].children
         });
-        if (!getApp().globalData.categoryId) {
-          ths.getProdList(res[0].categoryId)
-          ths.setData({
-            categoryImg: res[0].pic,
+        let categoryId =wx.getStorageSync('categoryId')
+        if(categoryId){
+
+          that.data.categoryList.map((item,index)=>{
+            if(item.categoryId == categoryId){
+                that.setData({
+                  selCategory:categoryId,
+                  selIndex:index,
+                  subCategoryList:res[index].children
+                })
+              }
           })
+          wx.removeStorageSync('categoryId')
         }
+        // eventBus.on('categoryId', (data) => {
+        //   eventBus.clear()
+        //   that.data.categoryList.map((item,index)=>{
+        //     if(item.categoryId == data){
+        //         that.setData({
+        //           selCategory:data,
+        //           selIndex:index,
+        //           subCategoryList:res[index].children
+        //         })
+        //       }
+        //   })
+        // });
+        ths.getData(ths.data.subCategoryList[0])
+   
       }
     };
     http.request(params);
   },
+  getData(data){
+      this.setData({
+        thridCategoryList:[],
+        showLoading:true
+      })
+      // 二级分类有商品
+      if(data.productBeBound == 1){
+        this.getProdList(data.categoryId)
+      }else{//二级分类有三级分类
+        this.getAllProList(data.categoryId)
+        this.setData({
+          thridCategoryList:data.children,
+          subCategoryId:data.categoryId
+        })
+      }
+  },
  /**
    * 选择定位后更新列表
    */
@@ -97,18 +256,22 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    if (getApp().globalData.categoryId) {
-      let categoryId = getApp().globalData.categoryId
-      let index = getApp().globalData.index
-      let pic = getApp().globalData.pic
-      this.getProdList(categoryId);
-      this.setData({
-        categoryImg: pic,
-        selIndex: index
-      });
-    }else{
+    console.log('show');
+    this.resetData()
+    // 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.get_neighborShop()
-    }
+
   },
 
   /**
@@ -150,12 +313,19 @@ Page({
   onMenuTab: function (e) {
     var id = e.currentTarget.dataset.id;
     var index = e.currentTarget.dataset.index;
-    // this.getProdList(id);
-    this.getProdList(this.data.categoryList[index].categoryId);
     this.setData({
       categoryImg: this.data.categoryList[index].pic,
-      selIndex: index
+      subCategoryList:this.data.categoryList[index].children,
+      selIndex: index,
+      selCategory:id,
+      productList:[],
+      subIndex:0,
+      paramsObj:{sort:0,orderBy:0},
+      sort:0
+
     });
+    // this.getProdList(this.data.subCategoryList[0].categoryId)
+    this.getData(this.data.subCategoryList[0])
     getApp().globalData.categoryId = ''
     getApp().globalData.index = ''
     getApp().globalData.pic = ''
@@ -192,69 +362,262 @@ Page({
   topHotSearch: function () {
     const topname = this.data.hotList[this.data.topCurrentIndex].name
     wx.navigateTo({
-      url: '/pages/search-prod-show/search-prod-show?prodName=' + topname,
+      url: `/pages/search-prod-show/search-prod-show?prodName=${topname}&shopId=${this.data.shopId}`,
     })
   },
 
   // 跳转搜索页
   toSearchPage: function () {
     wx.navigateTo({
-      url: '/pages/search-page/search-page',
+      url: `/pages/search-page/search-page?shopId=${this.data.shopId}`,
     })
   },
-  getProdList(categoryId) {
+  /**
+   * 跳转到定位页面
+   */
+  toLocationPage: function () {
+    wx.navigateTo({
+      url: '/pages/locationAdd/locationAdd',
+    })
+  },
+  // 点击二级分类
+  onleftMenuTab(e){
+    const {
+      index,
+      id
+    } = e.currentTarget.dataset
+    if(id){
+      this.setData({
+        type:'click'
+      })
+      console.log('click');
+    }
     this.setData({
-      parentId: categoryId
+      subIndex:index,
+      paramsObj:{sort:0,orderBy:0},
+      sort:0
     })
-    //加载子分类列表
+    // this.getProdList(this.data.subCategoryList[index].categoryId)
+    this.getData(this.data.subCategoryList[index])
+
+  },
+
+  // 根据分类id获取商品数据
+  getProdList(categoryId) {
     var params = {
-      url: "/category/categoryInfo",
+      url: "/search/searchProdPage",
       method: "GET",
       data: {
-        parentId: categoryId
+        categoryId,
+        current: 1,
+        size: 999999,
+        orderBy:this.data.paramsObj.orderBy,
+        sort:this.data.paramsObj.sort,
+        isAllProdType: true,
+        platform:1
+        // lat: wx.getStorageSync('LATITUDE'),
+        // lon: wx.getStorageSync('LONGITUDE'),
+        // distance: wx.getStorageSync('DISTANCE') || 0
       },
       callBack: (res) => {
-        let str='https://zswl-shop.oss-cn-chengdu.aliyuncs.com'
-        res.forEach(item=>{
-          item.categories.forEach(e=>{
-            if(e.pic!=null){
-              if(!e.pic.includes(str)){
-                e.pic='https://zswl-shop.oss-cn-chengdu.aliyuncs.com/'+e.pic
-              }
-            }
+        setTimeout(() => {
+          this.setData({
+            showLoading:false
           })
+        }, 500);
+      console.log(res);
+      let productList = res.records
+      let img = ''
+      productList.map(e => {
+        img = e.pic.split(',')
+        e.pic = img[0]
+      })
+        this.setData({
+          productList,
+          topHeight:15
         })
+        if(productList.length == 0){
+          if(this.data.type == 'top'){
+            this.scrollTop()
+          }else{
+            this.scrollBottom()
+          }
+        }
+        this.addParmasProduct()
+      }
+    };
+    http.request(params);
+  },
+  // 根据分类id获取所有三级商品数据
+  getAllProList(categoryId) {
+    var params = {
+      url: "/prod/listProdByCategoryIdAndShopId",
+      method: "post",
+      data: {
+        orderBy:this.data.paramsObj.orderBy,
+        sort:this.data.paramsObj.sort,
+        categoryId,
+        current: 1,
+        size: 999999,
+        shopId:this.data.testShopId||this.data.shopId
+      },
+      callBack: (res) => {
+        setTimeout(() => {
+          this.setData({
+            showLoading:false
+          })
+        }, 500);
+      let productList = res.records
+      let img = ''
+      productList.map(e => {
+        img = e.pic.split(',')
+        e.pic = img[0]
+      })
         this.setData({
-          subCategoryList: res,
-        });
+          productList,
+          topHeight:15
+        })
+        if(productList.length == 0){
+          if(this.data.type == 'top'){
+            this.scrollTop()
+          }else if(this.data.type == 'bottom'){
+            this.scrollBottom()
+          }
+        }
+        this.addParmasProduct()
+
       }
     };
     http.request(params);
   },
-  /**
-   * 跳转到定位页面
-   */
-  toLocationPage: function () {
-    wx.navigateTo({
-      url: '/pages/locationAdd/locationAdd',
+  // 点击三级分类
+  handleThrid(e){
+    let {
+      index,
+      categoryid
+    } = e.currentTarget.dataset
+    console.log(33333333333,e.currentTarget.dataset);
+    this.setData({
+      thridIndex:index
     })
+    if(index == -1){
+      categoryid = this.data.subCategoryId
+    }
+    this.getAllProList(categoryid)
   },
-  // 跳转子分类商品页面
-  toCatePage: function (e) {
-    console.log(e);
-    const {
-      type,
-      parentid,
-      categoryid,
-      subcateindex
-    } = e.currentTarget.dataset
-    wx.navigateTo({
-      url: `/pages/sub-category/sub-category?parentId=${parentid}&categoryId=${type=='all'?this.data.subCategoryList[subcateindex].categoryId:categoryid}`,
+  // 除了产品列表数据 给产品列表添加显示和数量  同步购物车数据
+  addParmasProduct(){
+    if(this.data.productList.length >0){
+      let productList = JSON.parse(JSON.stringify( this.data.productList))
+      productList.map(i=>{
+        i.show = false
+        this.data.carData.map(item=>{
+          if(item.prodId == i.prodId){
+            i.prodCount = item.prodCount
+            i.show = true
+          }
+        })
+      })
+      this.setData({
+        productList
+      })
+    }
+  },
+  // 获取购物车数据
+  getCarData() {
+    var params = {
+      url: "/p/shopCart/info/1",
+      method: "post",
+      data: [{
+        "basketId": 0,
+        "discountId": 0,
+        "shopId":this.data.testShopId||this.data.shopId
+      }],
+      callBack: (res) => {
+        if(res.length){
+          let carData = res[0].shopCartItemDiscounts[0].shopCartItems
+          let img = ''
+          carData.map(e => {
+            img = e.pic.split(',')
+            e.pic = img[0]
+          })
+          this.setData({
+            carData
+          },()=>{
+           
+            this.getCarTotal()
+          })
+          
+
+
+      }else{
+        this.setData({
+          carData:[]
+        },()=>{
+          this.getCarTotal()
+        })
+      }
+      // 给产品列表添加显示和数量  同步购物车数据
+      this.addParmasProduct()
+      }
+    };
+    http.request(params);
+  },
+
+  // 获取购物车数量和总价
+  getCarTotal() {
+    let basketIds = this.data.carData.map(item=>{
+      return  item.basketId
+       
     })
+    var params = {
+      url: "/p/shopCart/totalPay?t="+new Date().getTime(),
+      method: "post",
+      data: basketIds,
+      callBack: (res) => {
+       this.setData({
+         totalInfo:res
+       })
+      }
+    };
+    http.request(params);
   },
-  toCategoryPage: function () {
+  // 添加修改购物车数量
+  changeCar(data) {
+    var params = {
+      url: "/p/shopCart/changeItem?t="+new Date().getTime(),
+      method: "post",
+      data,
+      callBack: (res) => {
+        this.getCarData()
+      }
+    };
+    http.request(params);
+  },
+   /**
+   * 跳转到商品详情页
+   */
+  toProdPage: function (e) {
+    var prodid = e.currentTarget.dataset.prodid;
+    console.log(22222222,e);
+    if (prodid) {
+      wx.navigateTo({
+        url: '/pages/prod/prod?prodid=' + prodid,
+      })
+    }
+  },
+
+  handleBuy(){
+    if(this.data.carData.length == 0){
+      return 
+    }
+    let basketIds = this.data.carData.map(item=>{
+      return item.basketId
+    })
+    wx.setStorageSync("basketIds", JSON.stringify(basketIds));
     wx.navigateTo({
-      url: `/pages/sub-category/sub-category?categoryId=${this.data.parentId}`,
+      url: '/pages/submit-order/submit-order?orderEntry=0',
     })
   }
+
 })

+ 2 - 1
pages/category1/category.json

@@ -1,5 +1,6 @@
 {
   "backgroundTextStyle": "light",
   "navigationBarTitleText": "分类商品",
-  "navigationStyle":"custom"
+  "navigationStyle":"custom",
+  "disableScroll": true
 }

+ 160 - 33
pages/category1/category.wxml

@@ -10,58 +10,185 @@
       <view class="top-search-text" bindtap="topHotSearch">搜索</view>
     </view>
   </navbar>
+
+  <!-- 全部分类弹窗 -->
+  <van-popup show="{{ show }}" position="top" close-on-click-overlay="{{false}}" z-index="{{99999}}" round bind:close="onClose">
+    <view class="popup-box" style="padding-top: {{pageTopHeight}}px;">
+      <!-- 搜索 -->
+      <navbar>
+        <view class="top-search-input">
+          <swiper vertical="true" circular="true" autoplay="true" interval="3000" class="top-search-swiper" bindtap="toSearchPage" bindchange="topSwiperChange">
+            <swiper-item wx:for="{{hotList}}" wx:key="index">{{item.name}}</swiper-item>
+          </swiper>
+          <view class="top-search-line">|</view>
+          <view class="top-search-text" bindtap="topHotSearch">搜索</view>
+        </view>
+      </navbar>
+      <!-- 分类 -->
+      <view class="top-box top-all-box">
+        <view wx:for='{{categoryList}}' class="type-item" wx:key='categoryId' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onMenuTab'>
+          <!-- <view class="icon"></view> -->
+          <image class='icon {{selIndex==index?"active":""}}' src="{{imgUrl+item.icon}}" mode="" />
+          <view class='name {{selIndex==index?"active":""}} '>
+            {{item.categoryName}}
+          </view>
+        </view>
+        <view wx:if="{{5-(categoryList.length%5) >0}}" style="width: 100rpx;height: 100rpx;"></view>
+        <view wx:if="{{5-(categoryList.length%5) >1}}" style="width: 100rpx;height: 100rpx;"></view>
+        <view wx:if="{{5-(categoryList.length%5) >2}}" style="width: 100rpx;height: 100rpx;"></view>
+        <view wx:if="{{5-(categoryList.length%5) >3}}" style="width: 100rpx;height: 100rpx;"></view>
+      </view>
+
+      <view class="close-box" bind:tap="onClose">
+        点击收起
+        <image class="icon" src="../../images/icon/more-icon.png" mode="" />
+      </view>
+    </view>
+  </van-popup>
+
+  <!-- 顶部滚动分类 -->
+  <view class="top-content">
+    <scroll-view scroll-x="true" class='top-box' 	scroll-into-view-offset="-150" 	scroll-with-animation		enable-passive scroll-into-view="{{'item'+selCategory}}">
+      <view wx:for='{{categoryList}}' id="{{'item'+item.categoryId}}" class="type-item" wx:key='{{item.categoryId}}' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onMenuTab'>
+        <image class='icon {{selIndex==index?"active":""}}' src="{{imgUrl+item.icon}}" mode="" />
+        <view class='name {{selIndex==index?"active":""}} '>
+          {{item.categoryName}}
+        </view>
+      </view>
+      <view class="type-item" style="width: 100rpx;height: 44rpx"></view>
+
+    </scroll-view>
+    <view wx:if="{{categoryList.length}}" class="all" bind:tap="handleAll">展开
+      <image class="icon" src="../../images/icon/more-icon.png" mode="" />
+    </view>
+  </view>
+
+
+
   <!-- 滚动内容区 -->
   <view class="main" wx:if="{{categoryList.length>0}}">
     <!-- 左侧菜单start -->
-    <scroll-view scroll-y="true" class='leftmenu'>
-      <block wx:for='{{categoryList}}' wx:key='categoryId'>
-        <view class='menu-item {{selIndex==index?"active":""}} ' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onMenuTab'>
+    <scroll-view scroll-y="true" class='leftmenu'  scroll-into-view="{{'item'+subIndex}}">
+      <view wx:for='{{subCategoryList}}' id="{{'item'+index}}" wx:key='categoryId'>
+        <view class='menu-item {{subIndex==index?"active":""}} ' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onleftMenuTab'>
+        <image wx:if="{{index == 0}}" class="icon" src="../../images/icon/good-icon.png" mode=""/>
+        <image wx:if="{{index == 1 || index ==4}}" class="icon" src="../../images/icon/hot-icon.png" mode=""/>
+        <image wx:if="{{index == 5}}" class="icon" src="../../images/icon/new-icon.png" mode=""/>
           {{item.categoryName}}
         </view>
-      </block>
+      </view>
+        <view style="height: 200rpx;"></view>
     </scroll-view>
     <!-- 左侧菜单end -->
 
     <!-- 右侧内容start -->
-    <scroll-view scroll-y="true" class='rightcontent' scroll-into-view="{{toViewId}}">
-      <view class='adver-map'>
-        <view class='item-a'>
-          <image src='{{categoryImg}}'></image>
+    <!-- scroll-view  -->
+    <view scroll-y="true" class='rightcontent' 	enable-passive scroll-into-view="{{rightView}}"	upper-threshold="10" 	lower-threshold="10"  scroll-top="{{topHeight}}" bindscroll="scroll"bindscrolltoupper="scrollTop" bindscrolltolower="scrollBottom">
+      <image class="banner" src="../../images/imgs/banner.png" mode="" />
+      <!-- <text wx:if="{{subCategoryList.length>0}}" class="sub-title" >{{subCategoryList[subIndex].categoryName}}</text> -->
+    <view class="loading" wx:if="{{showLoading}}">
+      <!-- <van-icon class="icon" color="#006CE8" size="50rpx" name="replay" /> -->
+      <image class="icon" src="../../images/imgs/loading-icon.png" mode=""/>
+    </view>
+      <view class="right-top-box">
+        <view class="thrid-type-box" wx:if="{{thridCategoryList.length>0}}">
+          <view class='thrid-type-item {{thridIndex==-1?"active":""}}' data-index="-1" bind:tap="handleThrid">全部</view>
+          <view class='thrid-type-item {{thridIndex==index?"active":""}}' data-index="{{index}}" data-categoryId="{{item.categoryId}}" wx:for="{{thridCategoryList}}" bind:tap="handleThrid">{{item.categoryName}}</view>
+        </view>
+        <view class="filter-box">
+          <view class="filter-item {{sort == 1 ?'active':''}}" bind:tap="handleSale">销量</view>
+          <view class="filter-item" bind:tap="handlePrice">价格 
+            <!-- <view class="icon-box"> 
+              <van-icon class="down" size="20rpx" color="{{sort ==2? '#006CE8':'#AAAAAA'}}" name="play" />
+              <van-icon class="up" size="20rpx" color="{{sort ==3? '#006CE8':'#AAAAAA'}}" name="play" />
+            </view>  -->
+            <image wx:if="{{sort == 0}}" class="icon" src="../../images/icon/sort1.png" mode=""/>
+            <image wx:else class="icon" src="{{sort ==2?'../../images/icon/sort2.png':'../../images/icon/sort3.png'}}" mode=""/>
+          </view>
         </view>
       </view>
-      <block wx:if="{{subCategoryList.length>0}}">
-        <block wx:for="{{subCategoryList}}" wx:key='categoryId' wx:for-index='subCateIndex'>
-          <view class='sub-category'>
-            <view class="sub-category-con">
-              <view class="sub-cate-title">
-                <text class="sub-cate-text">{{item.categoryName}}</text>
-                <text class="view-all" bindtap="toCatePage" data-type="all" data-subcateindex="{{subCateIndex}}" data-parentid="{{item.parentId}}" data-categoryId="{{item.categoryId}}">查看全部</text>
-                <van-icon name="arrow" color="#999999" size="14" />
-              </view>
-              <view class="th-cate-con">
-                <block wx:for="{{item.categories}}" wx:key='categoryId' wx:for-item='thCateItem'>
-                  <view class='sub-category-item' bindtap='toCatePage' data-categoryid="{{thCateItem.categoryId}}" data-parentid="{{item.categoryId}}">
-                    <image src='{{thCateItem.pic}}' mode='widthFix' class="sub-category-item-pic"></image>
-                    <text>{{thCateItem.categoryName}}</text>
-                  </view>
-                </block>
+      <scroll-view class="right-box"  scroll-y="true" 	enable-passive scroll-into-view="{{rightView}}"	upper-threshold="10" 	lower-threshold="10"  scroll-top="{{topHeight}}" bindscroll="scroll"bindscrolltoupper="scrollTop" bindscrolltolower="scrollBottom">
+        <view class="product-item" id="{{'test'+index}}" wx:for="{{productList}}">
+          <image class="pic" src="{{item.pic}}" mode="" data-prodId="{{item.prodId}}" bind:tap="toProdPage" />
+          <view class="info">
+            <view class="title" data-prodId="{{item.prodId}}" 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=""/>
+                <view class="num">{{item.prodCount}}</view>
+              <image class="btn" data-num="1" data-item="{{item}}" bind: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" />
             </view>
           </view>
-        </block>
-      </block>
-      <view class="sub-cate-title not-category-data" wx:else>
-        <view class="sub-cate-text">无二级分类</view>
-        <view class="view-all" bindtap="toCategoryPage">查看全部
-          <van-icon name="arrow" color="#999999" size="14" />
         </view>
-      </view>
-    </scroll-view>
+        <view id="empty" class="block" style="height: 90vh;"></view>
+        <view class="sub-cate-title not-category-data" wx:if="{{subCategoryList.length==0}}">
+          <view class="sub-cate-text">无二级分类</view>
+        </view>
+      </scroll-view>
+    </view>
     <!-- 右侧内容end -->
   </view>
   <view class="not-data-list" wx:else>
     <van-empty image="search" description="附近暂无可配送门店" />
-    <view class="reset-localization" bindtap="toLocationPage">定位不准确?<text style="color: rgb(40,120,255);">点击手动定位</text></view>
+    <!-- <view class="reset-localization" bindtap="toLocationPage">定位不准确?<text style="color: rgb(40,120,255);">点击手动定位</text></view> -->
   </view>
+
+  <!-- 购物车弹窗 -->
+  <van-popup show="{{ showCar }}" position="bottom" safe-area-tab-bar safe-area-inset-bottom close-on-click-overlay="{{true}}" z-index="{{99999}}" round bind:close="onCarClose">
+    <view class="car-box">
+      <view wx:if="{{carData.length}}">
+        <view class="item" wx:for="{{carData}}">
+          <image class="img" src="{{item.pic}}" mode="" />
+          <view class="info">
+            <view class="title">{{item.prodName}}</view>
+            <view class="desc">规格:{{item.weight}}{{item.weightUnit}}</view>
+            <view class="price-box">
+              <view class="price">
+                <view class="unit">¥</view>
+                <view class="num">{{item.price}}</view>
+              </view>
+              <view class="num-box">
+                <view class="btn" data-num="-1" data-item="{{item}}" bind:tap="handleNum">-</view>
+                <view class="num">{{item.prodCount}}</view>
+                <view class="btn" data-num="1" data-item="{{item}}" bind:tap="handleNum">+</view>
+              </view>
+
+            </view>
+          </view>
+        </view>
+      </view>
+      <!-- 空 -->
+      <view class="empty" wx:else="{{!carData.length}}">
+        <view class="empty-icon">
+          <image src="../../images/icon/empty-basket.png"></image>
+        </view>
+        <view class="empty-text">您还没有添加商品到购物车哦~</view>
+      </view>
+    </view>
+    
+
+  </van-popup>
+
+  <view class="bottom-box">
+    <view class="left" bindtap="openCar">
+      <view class="num" wx:if="{{totalInfo.count}}">{{totalInfo.count}}</view>
+      <image class="icon" src="../../images/icon/car-icon.png" mode="" />
+      <view class="price-box">
+        <view class="top">
+          <view class="price">¥{{totalInfo.finalMoney}}</view>
+          <view class="reduce-price">共减¥{{totalInfo.subtractMoney}}</view>
+        </view>
+        <view class="shipping-fee">配送费¥0</view>
+      </view>
+    </view>
+
+    <view class="btn" bind:tap="handleBuy">去结算</view>
+  </view>
+  <tabbar active="1"></tabbar>
+
 </view>
 <wxs module="wxs" src="../../wxs/number.wxs" />

+ 498 - 9
pages/category1/category.wxss

@@ -2,32 +2,34 @@
 
 page {
   height: 100%;
+  background: #E5F1FF;
 }
 
 .container {
-  display: flex;
+  /* display: flex; */
   flex-direction: row;
   height: 100%;
 }
 
 .main {
-  position: fixed;
+  /* position: fixed; */
   display: flex;
   overflow: hidden;
-  margin-top: 78rpx;
-  height: calc(100% - 100rpx);
+  /* margin-top: 78rpx; */
+  height: calc(100% - 270rpx);
 }
 
 /* 搜索栏 */
 .top-search-input {
   margin-left: 20rpx;
-  margin-top: -10rpx;
   display: flex;
   align-items: center;
   width: 500rpx;
-  border: 2rpx solid #FF941A;
+  border: 2rpx solid #006CE8;
   border-radius: 40rpx;
   height: 60rpx;
+  background: #fff;
+  box-sizing: border-box;
 }
 
 .top-search-swiper {
@@ -50,9 +52,142 @@ page {
   width: 100rpx;
   font-weight: bold;
   font-size: 28rpx;
-  color: #FF941A;
+  color: #006CE8;
+}
+
+
+/* 顶部分类 */
+
+.top-content{
+  position: relative;
+}
+
+.top-box{
+  white-space: nowrap;
+  align-items: center;
+  margin-top: 100rpx;
+  width: 100%;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  background: #E5F1FF;
+  padding-bottom: 18rpx;
+}
+
+.top-content .all{
+position: absolute;
+top: 0;
+right: 0;
+width: 64rpx;
+height: 100%;
+display: flex;
+justify-content: center;
+align-items: center;
+letter-spacing: 10rpx;
+background: linear-gradient( 180deg, rgba(219,230,244,0) 0%, #DDE9F7 11%, #E5F1FF 100%);
+box-shadow: -10rpx 0rpx 12rpx 2rpx rgba(0,0,0,0.07);
+writing-mode: vertical-rl;
+font-weight: bold;
+font-size: 24rpx;
+color: #222222;
+}
+
+.top-content .all .icon{
+  width: 20rpx;
+  height: 20rpx;
+  margin-left: 2rpx;
+}
+
+.top-all-box {
+  /* display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+  align-items: flex-start; */
+  display: grid;
+  /* 列规则:5列等宽(1fr 代表"剩余空间等份分配") */
+  grid-template-columns: repeat(5, 1fr);
+  /* 行列间距:10rpx(小程序常用 rpx 适配多端) */
+  gap: 16rpx;
+  padding: 0 32rpx 150rpx;
+  box-sizing: border-box;
+  max-height: 750rpx;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+.top-box.top-all-box .type-item{
+  margin-bottom: 24rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.top-box .type-item{
+  display: inline-block;
+  text-align: center;
+}
+
+.top-box .type-item .icon{
+  width: 72rpx;
+  height: 72rpx;
+  background: #F6F6F6;
+  margin-left: 8rpx;
+  border-radius: 16rpx;
+
+}
+.top-box .type-item .name{
+  font-size: 22rpx;
+  color: #222222;
+  width: 116rpx;
+  height: 36rpx;
+  line-height: 36rpx;
+  text-align: center;
+  margin-top: 12rpx;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+
+.top-box .type-item .icon.active{
+  width: 88rpx;
+  height: 88rpx;
+  border: 5rpx solid #006CE8;
+  border-radius: 32rpx;
+}
+
+.top-box .type-item .name.active{
+  font-size: 24rpx;
+  background: #006CE8;
+  border-radius: 18rpx 18rpx 18rpx 18rpx;
+  color: #FFFFFF;
+}
+
+
+.popup-box{
+  position: relative;
+  background: #E5F1FF;
+}
+ .close-box{
+   position: absolute;
+   bottom: 0;
+   left: 0;
+   z-index: 999;
+  font-size: 24rpx;
+  color: #AAAAAA;
+  width: 100%;
+  text-align: center;
+  line-height: 82rpx;
+  border-top: 1rpx solid #F0F0F0;
+  background: #E5F1FF;
+
+}
+
+ .close-box .icon{
+  width: 20rpx;
+  height: 20rpx;
+  transform: rotateZ(180deg);
 }
 
+
 /* 左侧菜单栏 */
 
 .leftmenu {
@@ -80,6 +215,14 @@ scroll-view ::-webkit-scrollbar {
   overflow: hidden;
   white-space: nowrap;
   text-overflow: ellipsis;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.menu-item .icon{
+  width: 30rpx;
+  height: 30rpx;
+  margin-right: 8rpx;
 }
 
 .menu-item.active {
@@ -97,7 +240,7 @@ scroll-view ::-webkit-scrollbar {
   width: 8rpx;
   height: 60rpx;
   top: 20rpx;
-  background: #FF941A;
+  background: #006CE8;
 }
 
 .menu-item text.tips-num {
@@ -114,6 +257,27 @@ scroll-view ::-webkit-scrollbar {
 }
 
 /* 右侧商品栏 */
+.loading{
+  width: 550rpx;
+  height: 70vh;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-shrink: 0;
+  position: fixed;
+  z-index: 99999;
+  background: #fff;
+}
+@keyframes rotato{
+  from { transform: rotate(0deg); }
+  to { transform: rotate(360deg); }
+}
+
+.loading .icon{
+  animation:  rotato .5s linear infinite;
+  width: 48rpx;
+  height: 48rpx;
+}
 
 .rightcontent {
   width: 550rpx;
@@ -121,6 +285,142 @@ scroll-view ::-webkit-scrollbar {
   box-sizing: border-box;
   background-color: #fff;
   z-index: 1;
+  position: relative;
+}
+.rightcontent  .banner{
+  width: 506rpx;
+  height: 144rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx;
+  
+}
+.rightcontent .right-top-box{
+  position: fixed;
+  z-index: 9999;
+  background-color: #fff;
+
+}
+
+.rightcontent .filter-box{
+  display: flex;
+  justify-content: flex-end;
+  width: 510rpx;
+  background: #F6F6F6;
+  padding: 8rpx 20rpx;
+  box-sizing: border-box;
+  margin-left: 20rpx;
+  margin-top: 10rpx;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+}
+.rightcontent .filter-box .filter-item{
+  font-size: 24rpx;
+  color: #222222;
+  margin-left: 40rpx;
+  display: flex;
+  align-items: center;
+}
+.rightcontent .filter-box .filter-item.active{
+  color: #006CE8;
+}
+.rightcontent .filter-box .filter-item .icon{
+  width: 20rpx;
+  height: 20rpx;
+}
+.rightcontent .filter-box .filter-item .icon-box{
+  display: flex;
+  flex-direction: column;
+}
+.rightcontent .filter-box .filter-item .icon-box .down{
+  transform: rotateZ(270deg);
+  margin-bottom: -6rpx;
+}
+
+.rightcontent .filter-box .filter-item .icon-box .up{
+  transform: rotateZ(90deg);
+  margin-left: -4rpx;
+}
+
+.rightcontent .thrid-type-box{
+  display: flex;
+  flex-wrap: nowrap;
+  
+  padding: 10rpx 20rpx 10rpx 0;
+  width: 530rpx;
+  overflow: auto;
+  margin-left: 20rpx;
+  background: #fff;
+}
+.rightcontent .thrid-type-box .thrid-type-item{
+  height: 36rpx;
+  line-height: 36rpx;
+  background: #F0F0F0;
+  padding: 2rpx 16rpx;
+  border-radius: 22rpx;
+  font-size: 24rpx;
+  color: #222222;
+  flex-shrink: 0;
+  margin-right: 20rpx;
+}
+
+.rightcontent .thrid-type-box .thrid-type-item.active{
+  background: #006CE8;
+  color: #FFFFFF;
+}
+
+.rightcontent .right-box{
+  /* padding-bottom: 300rpx; */
+  /* padding-bottom: 500rpx; */
+  padding-top: 98rpx;
+  position: relative;
+}
+
+.rightcontent  .product-item{
+  display: flex;
+  padding: 0 20rpx;
+}
+
+.rightcontent  .product-item .pic{
+  width: 200rpx;
+  height: 200rpx;
+  background: #F6F6F6;
+  border-radius: 16rpx;
+  flex-shrink: 0;
+  margin: 20rpx 0;
+}
+.rightcontent  .product-item .info{
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  border-bottom: 1rpx solid #F0F0F0;
+  padding: 20rpx 0 20rpx 20rpx;
+}
+
+.rightcontent  .product-item .info .title{
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #222222;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;  /* 限制显示的行数 */
+  -webkit-box-orient: vertical;
+}
+
+.rightcontent  .product-item .info .price-box{
+  display: flex;
+justify-content: space-between;
+align-items: center;
+}
+.rightcontent  .product-item .info .price{
+  font-weight: 800;
+  font-size: 36rpx;
+  color: #FF4D3A;
+}
+
+.rightcontent  .product-item .info  .salesVolume{
+  font-size: 22rpx;
+  color: #AAAAAA;
 }
 
 .rightcontent .adver-map {
@@ -204,4 +504,193 @@ scroll-view ::-webkit-scrollbar {
   text-align: center;
   font-size: 26rpx;
   color: #AAAAAA;
-}
+}
+
+/* 购物车 */
+
+.car-box{
+  /* padding: 28rpx 24rpx 123rpx; */
+  padding: 28rpx 24rpx 269rpx;
+  max-height: 700rpx;
+  overflow: auto;
+}
+
+.car-box .item{
+  display: flex;
+  align-items: center;
+  padding-bottom: 30rpx;
+  /* border-bottom: 2rpx solid #F0F0F0; */
+}
+
+.car-box .item .img{
+  width: 200rpx;
+  height: 200rpx;
+  border-radius: 16rpx;
+  background: chartreuse;
+}
+.car-box .item .info{
+  flex: 1;
+  padding-left: 20rpx;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 200rpx;
+}
+.car-box .item .info .title{
+  font-weight: 800;
+  font-size: 32rpx;
+  color: #222222;
+}
+.car-box .item .info .desc{
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+
+.car-box .item .info .price-box{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.car-box .item .info .price-box .price{
+  display: flex;
+  align-items: flex-end;
+  color: #FF4D3A;
+}
+.car-box .item .info .price-box .price .unit{
+  font-size: 20rpx;
+}
+
+.car-box .item .info .price-box .price .num{
+  font-size: 48rpx;
+}
+
+/* .car-box .item .info .price-box .num-box{ */
+ .num-box{
+  display: flex;
+  align-items: center;
+}
+
+/* .car-box .item .info .price-box .num-box .btn{ */
+ .num-box .btn{
+  font-size: 20rpx;
+  width: 44rpx;
+  height: 44rpx;
+  text-align: center;
+}
+/* .car-box .item .info .price-box .num-box .num{ */
+ .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;
+}
+
+.bottom-box{
+  position: fixed;
+  /* bottom: 0; */
+  bottom: 166rpx;
+  left: 0;
+  z-index: 999999;
+  box-sizing: border-box;
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+  padding: 20rpx 24rpx;
+  background: #FFFFFF;
+  box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0,0,0,0.05);
+  border-radius: 32rpx 32rpx 0rpx 0rpx;
+}
+.bottom-box .num{
+  position: absolute;
+  top: 20rpx;
+  left: 80rpx;
+  border-radius: 30rpx;
+  font-size: 24rpx;
+  color: #fff;
+  background: #FF4D3A;
+  padding: 2rpx 6rpx;
+}
+.bottom-box .left{
+  display: flex;
+  
+}
+.bottom-box .icon{
+  width: 80rpx;
+  height: 80rpx;
+  margin-right: 20rpx;
+}
+.bottom-box .price-box .top{
+  display: flex;
+  align-items: center;
+}
+
+.bottom-box .price-box .top .price{
+  font-weight: 800;
+  font-size: 32rpx;
+  color: #FF4D3A;
+}
+
+.bottom-box .price-box .top .reduce-price{
+  font-size: 24rpx;
+  color: #AAAAAA
+}
+
+.bottom-box .price-box .shipping-fee{
+  font-size: 24rpx;
+  color: #AAAAAA;
+}
+.bottom-box .btn{
+  width: 342rpx;
+  height: 80rpx;
+  background: #006CE8;
+  border-radius: 40rpx;
+  text-align: center;
+  line-height: 80rpx;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #FFFFFF;
+}
+/* 购物车为空 */
+.empty {
+  margin-top: 100rpx;
+  text-align: cneter;
+}
+.empty-icon {
+  display: block;
+  width: 100rpx;
+  height: 100rpx;
+  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;
+}
+
+/* 纵向滚动容器:隐藏垂直滚动条 */
+.thrid-type-box::-webkit-scrollbar {
+  width: 0; /* 滚动条宽度设为0(关键) */
+  height: 0; /* 横向滚动时设置高度为0 */
+  display: none; /* 直接隐藏 */
+}
+
+/* 可选:针对滚动轨道和滑块的进一步隐藏 */
+.thrid-type-box::-webkit-scrollbar-track {
+  display: none;
+}
+.thrid-type-box::-webkit-scrollbar-thumb {
+  display: none;
+}
+

+ 2 - 2
pages/confirmOrder/confirmOrder.wxss

@@ -226,10 +226,10 @@ image {
 }
 .submit-btn {
   display: inline-block;
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
   padding: 0 50rpx;
-  border: 1rpx solid #FF941A;
+  border: 1rpx solid #006CE8;
   border-radius: 60rpx;
   height: 2.8rm;
   line-height: 2.8em;

+ 1 - 1
pages/delivery-address/delivery-address.wxml

@@ -17,7 +17,7 @@
           <view class='select-btn'>
             <view class="box">
               <label  bindtap='onDefaultAddr' data-item="{{item}}" data-addrid="{{item.addrId}}">
-                <radio value="{{item.prodId}}" checked="{{item.commonAddr==1}}" color="#FF941A" />设为默认地址</label>
+                <radio value="{{item.prodId}}" checked="{{item.commonAddr==1}}" color="#006CE8" />设为默认地址</label>
             </view>
           </view>
         </view>

+ 1 - 1
pages/delivery-address/delivery-address.wxss

@@ -83,7 +83,7 @@ page {
 
 .footer text {
   font-size: 32rpx;
-  color: #FF941A;
+  color: #006CE8;
 }
 
 .empty .img {

+ 1 - 1
pages/editAddress/editAddress.js

@@ -348,7 +348,7 @@ Page({
     wx.showModal({
       title: '',
       content: '确定要删除此收货地址吗?',
-      confirmColor: "#FF941A",
+      confirmColor: "#006CE8",
       success(res) {
         if (res.confirm) {
           var addrId = ths.data.addrId;

+ 3 - 3
pages/editAddress/editAddress.wxss

@@ -92,19 +92,19 @@ page {
   line-height: 80rpx;
   margin: auto;
   text-align: center;
-  border: 1rpx solid #FF941A;
+  border: 1rpx solid #006CE8;
   border-radius: 50rpx;
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 0 rgba(255, 255, 255, 0.3);
 }
 
 .btn-box .keep {
   color: #fff;
-  background-color: #FF941A;
+  background-color: #006CE8;
 }
 
 .btn-box .clear.btn {
   margin-top: 40rpx;
-  color: #FF941A;
+  color: #006CE8;
 }
 
 /* end 功能按钮 */

+ 25 - 6
pages/index/index.js

@@ -10,6 +10,7 @@ import eventBus from '../../utils/eventBus';
 Page({
   isHand:false,
   data: {
+    isScroll:false,
     active:1,
     imgUrl:'',
     swiperCurrent:0,
@@ -86,7 +87,7 @@ Page({
   handleTab(e){
     this.setData({
       active:Number(e.currentTarget.dataset.active),
-      current:Number(e.currentTarget.dataset.active),
+      current:1||Number(e.currentTarget.dataset.active),
       hotSalesList:[],
       isHand:true
     })
@@ -228,9 +229,21 @@ Page({
     }
     if (e.scrollTop >= 40) {
       this.setData({
-        titleOpacity: 0
+        titleOpacity: 0,
       })
     }
+
+    if (e.scrollTop >= 140) {
+      this.setData({
+        isScroll:true
+      })
+    }else{
+      this.setData({
+        isScroll:false
+      })
+    }
+
+
     this.handlePageScroll(e.scrollTop);
     this.setData({
       scrollTop: e.scrollTop
@@ -394,6 +407,7 @@ Page({
         size:99999
       },
       callBack: function (res) {
+        console.log(res);
         let categoryName = ''
         res.records.forEach(e => {
           categoryName = e.categoryName.split('>')
@@ -406,6 +420,7 @@ Page({
         }else if(categoryList.length == 1){
           categoryList = categoryList[0]
         }
+        newRes = newRes.flat(Infinity)
         _this.setData({
           categoryList: categoryList,
           categoryList1: newRes,
@@ -432,14 +447,18 @@ Page({
     //   getApp().globalData.categoryId = categoryId
     //   getApp().globalData.index = index
     //   getApp().globalData.pic = pic
-    //   wx.switchTab({
+    //   wx.navigateTo({
     //     url: '/pages/category/category'
     //   })
     // }
-    eventBus.emit('categoryId', categoryId);
-    wx.switchTab({
-      url: '/pages/category/category'
+    // eventBus.emit('categoryId', categoryId);
+    wx.setStorageSync('categoryId', categoryId)
+    wx.navigateTo({
+      url: '/pages/category1/category'
     })
+    // wx.switchTab({
+    //   url: '/pages/category/category'
+    // })
   },
 
   // 领红包

+ 41 - 27
pages/index/index.wxml

@@ -1,8 +1,8 @@
 <!--index.wxml-->
-<view class="container" style="padding-top: {{pageTopHeight}}px;">
+<view class="container" style="padding-top: {{pageTopHeight}}px;padding-bottom: 400rpx;">
   <navbar>
     <view class="top-navbar-box" wx:if="{{gapTop==1}}" style="opacity: {{titleOpacity}};">
-      <!-- <view class="shop-title">市民请集合</view> -->
+      <!-- <view class="shop-title">星闪豹</view> -->
       <view class="shop-info">
         <!-- <view>百货超市</view>| -->
         <view bindtap="toLocationPage" class="shop-address-info">
@@ -32,28 +32,28 @@
       <!-- <view class="search-line">|</view> -->
       <view class="search-text" bindtap="inputSearch">搜索</view>
     </view>
-    <view class="top-share">
+    <!-- <view class="top-share">
       <van-icon name="share" color="#fff" />
       <view class="share-text">分享</view>
       <button class="share-btn" open-type="share"></button>
-    </view>
+    </view> -->
   </view>
-  <view class="recommended-box">
+  <!-- <view class="recommended-box">
     <scroll-view class="recommended-swiper" enhanced="true" show-scrollbar="false" scroll-x="true">
       <view class="recommended-text" wx:for="{{recommendedList}}" bindtap="recommendedSearch" data-name="{{item.name}}">
         {{item.name}}
       </view>
     </scroll-view>
-  </view>
+  </view> -->
   <!-- 搜索框end -->
   <view class="bg-box">
     <image class="bg" src="{{imgUrl+swiperList[swiperCurrent].advertBack}}" mode=""/>
-    <swiper indicator-dots="true" class="swiper-box" interval="3000" circular="true" indicator-active-color="#FF941A" autoplay="true" bindchange="changeIndex">
+    <swiper indicator-dots="true" class="swiper-box" interval="3000" circular="true" indicator-active-color="#006CE8" autoplay="true" bindchange="changeIndex">
       <swiper-item wx:for="{{swiperList}}"  wx:key="index" bindtap="goToLevelPage" data-name="{{item}}">
         <image class="block" src="{{imgUrl+item.advertImg}}" mode=""/>
       </swiper-item>
     </swiper>
-    <view class="white-block"></view>
+    <!-- <view class="white-block"></view> -->
   </view>
 
   <!-- 板块 -->
@@ -68,21 +68,24 @@
           </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-itemid="{{item.categoryId}}" data-index="{{index}}" data-categories="{{item.categories}}" data-categoryName="{{item.categoryName}}" badge="应季水果">
+          <view class="my-grid-item" use-slot bind:tap="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}}">
             <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>
+            <view class="label" wx:if="{{item.label}}">{{item.label}}</view>
           </view>
   </view>
     
-    <swiper class="swiper-grid" wx-if="{{categoryList1.length>0}}" indicator-dots="true" indicator-active-color="#FF941A" bindchange="menuSwiper">
-      <swiper-item wx:for="{{categoryList1}}" wx:key="index">
-        <van-grid border="{{false}}" column-num="5">
+    <swiper class="swiper-grid" wx-if="{{categoryList1.length>0}}" display-multiple-items="5" indicator-dots="true" indicator-active-color="#006CE8" bindchange="menuSwiper">
+      <swiper-item wx:for="{{categoryList1}}" wx:key="index"  class="my-grid-item" bind:tap="selectMenu" ata-pic="{{item.pic}}" data-itemid="{{item.categoryId}}" data-index="{{index}}" data-categories="{{item.categories}}" data-categoryName="{{item.categoryName}}">
+     
+            <image class="swiper-grid-image" src="{{item.icon}}" />
+            <text class="swiper-grid-text">{{item.categoryName}}</text>
+        <!-- <van-grid border="{{false}}" column-num="5">
           <van-grid-item class="my-grid-item" use-slot bind:click="selectMenu" wx:for="{{item}}" wx:key="categoryId" data-pic="{{item.pic}}" data-itemid="{{item.categoryId}}" data-index="{{index}}" data-categories="{{item.categories}}" data-categoryName="{{item.categoryName}}">
             <image class="swiper-grid-image" src="{{item.icon}}" />
             <text class="swiper-grid-text">{{item.categoryName}}</text>
           </van-grid-item>
-        </van-grid>
+        </van-grid> -->
       </swiper-item>
     </swiper>
   </view>
@@ -147,23 +150,31 @@
     </view> -->
     <!-- 推荐end -->
 
+    <!-- 通知 -->
+    <view class="notice-box">
+      <image class="icon" src="../../images/icon/notice.png" alt=""/>
+      <view class="text">因订单高峰期,配送可能延迟,请提前下单</view>
+    </view>
+
+    <image class="adv" src="../../images/imgs/adv.png" mode=""/>
+
     <!-- 分类分页 -->
-    <!-- <scroll-view class="tab-box" scroll-x="true" bounces="true" enhanced="true" show-scrollbar="false" style="width: 100%">
-      <view id="demo1" class="tab {{active==1?'active':''}}" bindtap="handleTab" data-active="1">精选热卖</view>
+    <view wx:if="{{hotSalesList.length>0}}" class="tab-box" scroll-x="true" bounces="true" enhanced="true" show-scrollbar="false" style="width: 100%">
+      <view id="demo1" class="tab {{active==1?'active':''}}" bindtap="handleTab" data-active="1">为你推荐</view>
       <view id="demo1" class="tab {{active==2?'active':''}}" bindtap="handleTab" data-active="2">疯狂折扣</view>
       <view id="demo1" class="tab {{active==3?'active':''}}" bindtap="handleTab" data-active="3">
         <image class="icon" src="../../images/imgs/chaozhi.png" alt=""/>
       </view>
       <view id="demo1" class="tab {{active==4?'active':''}}" bindtap="handleTab" data-active="4">地道特产</view>
       <view id="demo1" class="tab {{active==5?'active':''}}" bindtap="handleTab" data-active="5">预售</view>
-    </scroll-view> -->
+    </view>
 
     <!-- 商城热卖 -->
     <view class="content" wx:if="{{hotSalesList.length>0}}">
       <view class="left">
         <view class="swiper-card-box" wx:if="{{banner_img.length>0}}">
           <!-- 轮播卡片 -->
-          <swiper indicator-dots="true" class="swiper-card" circular="true" indicator-active-color="#FF941A" autoplay="true">
+          <swiper indicator-dots="true" class="swiper-card" circular="true" indicator-active-color="#006CE8" autoplay="true">
             <swiper-item wx:for="{{banner_img}}" wx:key="index" bindtap="goToLevelPage" data-name="{{item.name}}">
               <image class="swiper-card-img" src="{{item.img}}" mode="" />
             </swiper-item>
@@ -178,10 +189,10 @@
               </view>
               <view class="name">
                 <!-- <view class="name-title">{{'已售'+item.salesVolume}}</view> -->
-                <view class="tag-box">
+                <!-- <view class="tag-box">
                   <view class="tag">自营</view>
                   <view class="text">月回头客5999+人</view>
-                </view>
+                </view> -->
                 <view class="heart">
                   <view class="name-price">
                     <view style="font-size:26rpx;color: #FF4D3A;">¥</view>{{wxs.toPrice(item.price)}}
@@ -194,11 +205,11 @@
                   </view>
                   <image wx:else catchtap="addShopCar" data-shop="{{item}}" style="width: 50rpx;height: 50rpx;" src="/images/icon/shop-car.png" mode="" /> -->
                 </view>
-                <view class="rank-box">
+                <!-- <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>
           </view>
@@ -214,10 +225,10 @@
               </view>
               <view class="name">
                 <!-- <view class="name-title">{{'已售'+item.salesVolume}}</view> -->
-                <view class="tag-box">
+                <!-- <view class="tag-box">
                   <view class="tag">自营</view>
                   <view class="text">月回头客5999+人</view>
-                </view>
+                </view> -->
                 <view class="heart">
                   <view class="name-price">
                     <view style="font-size:26rpx;color: #FF4D3A;">¥</view>{{wxs.toPrice(item.price)}}
@@ -230,11 +241,11 @@
                   </view>
                   <image wx:else catchtap="addShopCar" data-shop="{{item}}" style="width: 50rpx;height: 50rpx;" src="/images/icon/shop-car.png" mode="" /> -->
                 </view>
-                <view class="rank-box">
+                <!-- <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>
           </view>
@@ -250,7 +261,7 @@
     <block wx:if="{{hotSalesList.length>0}}">
       <view class="tips" wx:if="{{isAll}}">已经到底咯~</view>
       <view class="loading-box" wx:else>
-        <van-loading size="20px" type="spinner" color="#FF941A">加载中...</van-loading>
+        <van-loading size="20px" type="spinner" color="#006CE8">加载中...</van-loading>
       </view>
     </block>
 
@@ -290,5 +301,8 @@
         <view class="bottom-button">选好了</view>
       </view>
     </van-popup>
+
+    <tabbar active="0" isScroll="{{isScroll}}"></tabbar>
+
   </view>
   <wxs module="wxs" src="../../wxs/number.wxs" />

+ 101 - 47
pages/index/index.wxss

@@ -11,7 +11,8 @@ width: 0;
 height: 0;
 color: transparent;
 }
-.bg-box{
+/* 前后衔接样式 */
+/* .bg-box{
   position: absolute;
   z-index: -1;
   top: 0;
@@ -21,13 +22,35 @@ color: transparent;
 }
 .bg{
   position: relative;
-  /* z-index: -1;
-  top: 0;
-  left: 0; */
+  
   width: 100%;
   height: 524rpx;
   vertical-align: bottom;
 }
+.bg-box .white-block{
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 70rpx;
+  background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, rgba(248,248,248,0.52) 39%, #F6F6F6 100%);
+} */
+
+.bg-box{
+  position: absolute;
+  z-index: -1;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 492rpx;
+}
+.bg{
+  position: relative;
+  
+  width: 100%;
+  height: 492rpx;
+  vertical-align: bottom;
+}
 .bg-box .white-block{
   position: absolute;
   left: 0;
@@ -37,20 +60,22 @@ color: transparent;
   background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, rgba(248,248,248,0.52) 39%, #F6F6F6 100%);
 }
 .swiper-box{
-  width: 704rpx!important;
-  height: 180rpx;
+  /* 图片衔接就是要宽2像素才行 */
+  /* width: 704rpx!important; */
+  width: 702rpx!important;
+  height: 276rpx;
   border-radius: 16rpx;
   position: absolute;
   left: 24rpx;
-  bottom: 38rpx;
+  bottom: -38rpx;
 }
 .swiper-box swiper-item{
-  width: 704rpx!important;
+  width: 702rpx!important;
 
 }
 .swiper-box swiper-item .block{
-  height: 180rpx;
-  width: 704rpx;
+  height: 276rpx;
+  width: 702rpx;
   vertical-align: bottom;
 
 }
@@ -138,14 +163,14 @@ swiper.pic-swiper .banner {
 
 .top-search-input {
   margin-left: 20rpx;
-  margin-top: -10rpx;
   display: flex;
   align-items: center;
   width: 500rpx;
-  border: 2rpx solid #FF941A;
+  border: 2rpx solid #006CE8;
   border-radius: 40rpx;
   height: 60rpx;
   background: #fff;
+  box-sizing: border-box;
 }
 
 .top-search-swiper {
@@ -165,14 +190,14 @@ swiper.pic-swiper .banner {
   width: 100rpx;
   font-weight: bold;
   font-size: 24rpx;
-  color: #FF941A;
+  color: #006CE8;
 }
 
 .search-input {
   display: flex;
   align-items: center;
-  width: 642rpx;
-  /* border: 2rpx solid #FF941A; */
+  width: 702rpx;
+  /* border: 2rpx solid #006CE8; */
   border-radius: 40rpx;
   height: 60rpx;
   background: #fff;
@@ -201,7 +226,7 @@ swiper.pic-swiper .banner {
   font-weight: bold;
   font-size: 28rpx;
   color: #FFF;
-  background: #FF941A;
+  background: #006CE8;
   margin-right: 10rpx;
 }
 
@@ -305,7 +330,7 @@ swiper.pic-swiper .banner {
   margin-bottom: 20rpx;
   border-radius: 16rpx;
   background: #fff;
-  margin-top: 213rpx;
+  margin-top: 296rpx;
   /* margin-top: 300rpx; */
 }
 
@@ -319,7 +344,7 @@ swiper.pic-swiper .banner {
   /* 行列间距:10rpx(小程序常用 rpx 适配多端) */
   gap: 16rpx;
   /* 容器内边距:避免网格贴边 */
-  padding: 20rpx;
+  padding: 20rpx 0;
 }
 
 .grid-box,.swiper-grid{
@@ -330,12 +355,12 @@ swiper.pic-swiper .banner {
   margin-top: -10rpx;
   border-radius: 16rpx;
   background-color: #fff;
-  height: 220rpx;
+  height: 175rpx;
 }
 .my-grid-item{
   position: relative;
   text-align: center;
-
+  margin-bottom: 20rpx;
 }
 .my-grid-item .van-grid-item__content {
   padding: 0rpx;
@@ -373,40 +398,38 @@ swiper.pic-swiper .banner {
   text-overflow: ellipsis;
   width: 120rpx;
   text-align: center;
-  line-height:2.4;
+  /* line-height:2.4; */
   letter-spacing: normal;
+  margin-top: 24rpx;
 }
 
 
-.notice{
+.notice-box{
   display: flex;
   align-items: center;
-  font-weight: bold;
-  font-size: 24rpx;
-  color: #E70C11;
-  background: #fff;
-  border-radius: 16rpx;
-  padding: 16rpx 24rpx;
   margin-bottom: 20rpx;
+  padding: 20rpx 24rpx;
+  background: #FFFFFF;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
 }
 
-.notice .icon{
-  width: 40rpx;
-  height: 40rpx;
+.notice-box .icon{
+  width: 30rpx;
+  height: 30rpx;
+}
+
+.notice-box .text{
+  font-weight: bold;
+  font-size: 24rpx;
+  color: #222222;
+  margin-left: 20rpx;
 }
 
 .adv{
   width: 100%;
-  vertical-align: bottom;
+  height: 236rpx;
   margin-bottom: 20rpx;
 }
-.adv1{
-  height: 392rpx;
-}
-
-.adv2{
-  height: 473rpx;
-}
 
 .bonus-box {
   display: flex;
@@ -528,6 +551,7 @@ swiper.pic-swiper .banner {
 .tab-box{
   white-space: nowrap;
   margin-bottom: 20rpx;
+  overflow-x: auto;
 }
  
 .tab-box .tab{
@@ -535,6 +559,7 @@ swiper.pic-swiper .banner {
   font-size: 32rpx;
   color: #222222;
   margin-right: 44rpx;
+  padding-bottom: 10rpx;
 }
 .tab-box .tab .icon{
   width: 105rpx;
@@ -543,6 +568,19 @@ swiper.pic-swiper .banner {
 .tab-box .tab.active{
   font-weight: 800;
   font-size: 36rpx;
+  position: relative;
+}
+
+.tab-box .tab.active::after{
+  content: '';
+  display: block;
+  width: 80rpx;
+  height: 18rpx;
+  background: linear-gradient( 90deg, #006CE8 0%, rgba(0,108,232,0.45) 43%, rgba(0,108,232,0.2) 79%, rgba(0,108,232,0) 100%);
+  border-radius: 10rpx 10rpx 10rpx 10rpx;
+  position: absolute;
+  left: calc(50% - 40rpx);
+  bottom: 0;
 }
 
 
@@ -591,11 +629,12 @@ swiper.pic-swiper .banner {
 .item {
   background-color: #fff;
   /* margin-top: 20rpx; */
-  margin-bottom: 20rpx;
+  margin-bottom: 14rpx;
   display: inline-block;
   width: 344rpx;
   border-radius: 16rpx;
   overflow: hidden;
+  padding-bottom: 16rpx;
 }
 
 .item-ava {
@@ -635,8 +674,8 @@ swiper.pic-swiper .banner {
   overflow: hidden;
   font-family: 'PingFang SC-Medium';
   color: #1e1e1e;
-  margin: 10rpx;
-  height: 40rpx;
+  padding: 0 20rpx;
+  /* height: 40rpx; */
   line-height: 40rpx;
   /* background-color: turquoise; */
 }
@@ -677,9 +716,9 @@ swiper.pic-swiper .banner {
   text-align: center;
   background: #FFF1E2;
   border-radius: 8rpx 8rpx 8rpx 8rpx;
-  border: 1rpx solid #FF941A;
+  border: 1rpx solid #006CE8;
   font-size: 22rpx;
-  color: #FF941A;
+  color: #006CE8;
 }
 .tag-box .text{
   font-size: 22rpx;
@@ -842,7 +881,7 @@ swiper.pic-swiper .banner {
 .color-btn {
   width: 136rpx;
   height: 64rpx;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 32rpx;
   font-weight: normal;
   font-size: 28rpx;
@@ -871,7 +910,7 @@ swiper.pic-swiper .banner {
 .bottom-button {
   width: 702rpx;
   height: 80rpx;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 40rpx;
   margin-top: 30rpx;
   font-family: PingFang SC, PingFang SC;
@@ -880,4 +919,19 @@ swiper.pic-swiper .banner {
   color: #FFFFFF;
   text-align: center;
   line-height: 80rpx;
-}
+}
+
+/* 纵向滚动容器:隐藏垂直滚动条 */
+.tab-box::-webkit-scrollbar {
+  width: 0; /* 滚动条宽度设为0(关键) */
+  height: 0; /* 横向滚动时设置高度为0 */
+  display: none; /* 直接隐藏 */
+}
+
+/* 可选:针对滚动轨道和滑块的进一步隐藏 */
+.tab-box::-webkit-scrollbar-track {
+  display: none;
+}
+.tab-box::-webkit-scrollbar-thumb {
+  display: none;
+}

+ 2 - 2
pages/locationAdd/locationAdd.js

@@ -105,8 +105,8 @@ Page({
   chooseShop(e){
     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.addressName)
+    // this.getTxmap()
+    wx.setStorageSync('ADDRESS', e.currentTarget.dataset.item.address)
         setTimeout(() => {
           let pages = getCurrentPages();
           let prevPage = pages[pages.length - 2]; //获取A页面

+ 1 - 1
pages/locationAdd/locationAdd.wxml

@@ -23,7 +23,7 @@
       <block wx:else>
         <view class="address-list-box" catchtap="setDefault" data-item="{{item}}" wx:for="{{addressList}}">
         <view class="address-check">
-          <van-icon wx:if="{{item.commonAddr==1}}" name="success" color="#FF941A"/>
+          <van-icon wx:if="{{item.commonAddr==1}}" name="success" color="#006CE8"/>
         </view>
         <view class="address-list">
           <view>{{item.address}}{{item.addressName}}{{item.addrDetail}}</view>

+ 3 - 3
pages/locationAdd/locationAdd.wxss

@@ -77,7 +77,7 @@ page {
   font-family: PingFang SC, PingFang SC;
   font-weight: normal;
   font-size: 24rpx;
-  color: #FF941A;
+  color: #006CE8;
 }
 
 .address-card-box {
@@ -96,7 +96,7 @@ page {
   font-family: PingFang SC, PingFang SC;
   font-weight: normal;
   font-size: 24rpx;
-  color: #FF941A;
+  color: #006CE8;
 }
 
 .address-title {
@@ -145,7 +145,7 @@ page {
   left: 24rpx;
   width: 702rpx;
   height: 80rpx;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 40rpx;
   font-weight: bold;
   font-size: 28rpx;

+ 1 - 1
pages/login/login.json

@@ -1,4 +1,4 @@
 {
   "usingComponents": {},
-  "navigationBarTitleText": "市民请集合"
+  "navigationBarTitleText": "星闪豹"
 }

+ 1 - 1
pages/login/login.wxml

@@ -2,7 +2,7 @@
 <view class="login-container" wx:if="{{!showBindTips}}">
   <view class="content">
     <image src='../../images/logo.png' class='logo'></image>
-    <!-- <view class="title">市民请集合</view>
+    <!-- <view class="title">星闪豹</view>
     <view class="msg">申请获得你的公开信息(昵称、头像等)</view> -->
   </view>
   <view class="login-phone">

+ 1 - 1
pages/login/login.wxss

@@ -57,7 +57,7 @@ button::after{
   width: 702rpx;
   height: 116rpx;
   line-height: 116rpx;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 60rpx 60rpx 60rpx 60rpx;
   color: #fff;
   font-weight: bold;

+ 1 - 1
pages/myCoupon/myCoupon.wxss

@@ -15,7 +15,7 @@
 }
 
 .h-tab.on {
-  border-bottom: 3px solid #FF941A;
+  border-bottom: 3px solid #006CE8;
   font-weight: bold;
 }
 

+ 2 - 2
pages/order-detail/order-detail.js

@@ -236,7 +236,7 @@ Page({
     wx.showModal({
       title: '',
       content: '确定要删除此订单吗?',
-      confirmColor: "#FF941A",
+      confirmColor: "#006CE8",
       success(res) {
         if (res.confirm) {
           var ordernum = e.currentTarget.dataset.ordernum;
@@ -266,7 +266,7 @@ Page({
     wx.showModal({
       title: '',
       content: '要取消此订单?',
-      confirmColor: "#FF941A",
+      confirmColor: "#006CE8",
       cancelText: '否',
       confirmText: '是',
       success(res) {

+ 1 - 1
pages/order-detail/order-detail.wxss

@@ -118,7 +118,7 @@
   height: 68rpx;
   line-height: 68rpx;
   text-align: center;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 60rpx 60rpx 60rpx 60rpx;
   font-weight: bold;
   font-size: 28rpx;

+ 2 - 2
pages/order-detail2/order-detail.js

@@ -139,7 +139,7 @@ Page({
     wx.showModal({
       title: '',
       content: '确定要删除此订单吗?',
-      confirmColor: "#FF941A",
+      confirmColor: "#006CE8",
       success(res) {
         if (res.confirm) {
           var ordernum = e.currentTarget.dataset.ordernum;
@@ -169,7 +169,7 @@ Page({
     wx.showModal({
       title: '',
       content: '要取消此订单?',
-      confirmColor: "#FF941A",
+      confirmColor: "#006CE8",
       cancelText: '否',
       confirmText: '是',
       success(res) {

+ 1 - 1
pages/order-detail2/order-detail.wxss

@@ -141,7 +141,7 @@ page {
   height: 68rpx;
   line-height: 68rpx;
   text-align: center;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 60rpx 60rpx 60rpx 60rpx;
   font-weight: bold;
   font-size: 28rpx;

+ 2 - 2
pages/orderList/orderList.js

@@ -289,7 +289,7 @@ Page({
     wx.showModal({
       title: '',
       content: '我已收到货?',
-      confirmColor: "#FF941A",
+      confirmColor: "#006CE8",
       success(res) {
         if (res.confirm) {
           wx.showLoading({
@@ -318,7 +318,7 @@ Page({
     wx.showModal({
       title: '',
       content: '确定要删除此订单吗?',
-      confirmColor: "#FF941A",
+      confirmColor: "#006CE8",
       success(res) {
         if (res.confirm) {
           var ordernum = e.currentTarget.dataset.ordernum;

+ 4 - 2
pages/orderList/orderList.wxml

@@ -106,9 +106,11 @@
             <text class='big-num' wx:if="{{item.actualTotal}}">{{wxs.parsePrice(item.actualTotal)[0]}}</text>
             <text class='small-num' wx:if="{{item.actualTotal}}">.{{wxs.parsePrice(item.actualTotal)[1]}}</text>
             <text class='small-num' wx:if="{{item.actualTotal && item.orderType==3}}" decode="true">&nbsp;+&nbsp;</text>
-            <text class='big-num' wx:if="{{item.orderType==3}}">{{item.orderItemDtos[0].useScore}} <text class='small-num'>积分</text></text>
+            <!-- <text class='big-num' wx:if="{{item.orderType==3}}">{{item.orderItemDtos[0].useScore}} <text class='small-num'>积分</text></text> -->
             <!-- 纯积分支付的普通订单(积分抵扣了所有金额) -->
-            <text class='big-num' wx:if="{{item.orderType==0 && item.actualTotal==0}}">{{item.offsetPoints}} <text class='small-num'>积分</text></text>
+            <!-- <text class='big-num' wx:if="{{item.orderType==0 && item.actualTotal==0}}"> -->
+            <text class='big-num' wx:if="{{item.orderType==3 && item.actualTotal==0}}">
+            {{item.offsetPoints}} <text class='small-num'>积分</text></text>
           </view>
         </view>
         <!-- end 商品列表 -->

+ 4 - 4
pages/orderList/orderList.wxss

@@ -27,8 +27,8 @@ page {
 }
 
 .order-tit text.on {
-  border-bottom: 4rpx solid #FF941A;
-  color: #FF941A;
+  border-bottom: 4rpx solid #006CE8;
+  color: #006CE8;
   font-weight: 600;
 }
 
@@ -365,8 +365,8 @@ padding: 0 24rpx;
 }
 
 .button.warn {
-  color: #FF941A;
-  border-color: #FF941A;
+  color: #006CE8;
+  border-color: #006CE8;
 }
 
 /* end 商品列表 */

+ 2 - 2
pages/pay-result/pay-result.wxss

@@ -42,10 +42,10 @@
 }
 
 .btns .button.checkorder {
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
   margin-bottom: 20rpx;
-  border: 2rpx solid #FF941A;
+  border: 2rpx solid #006CE8;
 }
 
 .btns .button.payagain {

+ 1 - 1
pages/prod-classify/prod-classify.json

@@ -2,7 +2,7 @@
   "usingComponents": {
     "prod": "/components/production/production"
   },
-  "navigationBarTitleText": "市民请集合",
+  "navigationBarTitleText": "星闪豹",
   "onReachBottomDistance": 0,
   "navigationBarBackgroundColor": "#fff",
   "navigationBarTextStyle": "black",

+ 3 - 3
pages/prod/prod.js

@@ -14,7 +14,7 @@ Page({
     picDomain: config.picDomain,
     indicatorDots: true,
     indicatorColor: '#f2f2f2',
-    indicatorActiveColor: '#FF941A',
+    indicatorActiveColor: '#006CE8',
     isAuthInfo: true,
     autoplay: true,
     interval: 3000,
@@ -800,7 +800,7 @@ Page({
    * 跳转到首页
    */
   toHomePage: function () {
-    wx.switchTab({
+    wx.navigateTo({
       url: '/pages/index/index',
     })
   },
@@ -809,7 +809,7 @@ Page({
    * 跳转到购物车
    */
   toCartPage: function () {
-    wx.switchTab({
+    wx.navigateTo({
       url: '/pages/basket/basket',
     })
   },

+ 7 - 7
pages/prod/prod.wxss

@@ -456,7 +456,7 @@ swiper image {
 
 .cmt-tag text.selected {
   color: #fff;
-  background: #FF941A;
+  background: #006CE8;
 }
 
 .cmt-item {
@@ -818,13 +818,13 @@ img {
   border: 2rpx solid #ddd;
   font-weight: bold;
   font-size: 28rpx;
-  color: #FF941A;
+  color: #006CE8;
   margin: 0 12rpx;
   text-align: center;
 }
 
 .cart-footer .btn.buy {
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
   margin-right: 12rpx;
   font-size: 28rpx;
@@ -1199,9 +1199,9 @@ img {
 }
 
 .sku-choose-item.active {
-  background-color: #FF941A;
+  background-color: #006CE8;
   color: #fff;
-  border: 1px solid #FF941A !important;
+  border: 1px solid #006CE8 !important;
 }
 
 .sku-choose-item.gray {
@@ -1331,11 +1331,11 @@ img {
 
 .pup-sku-footer .btn.cart {
   border: 2rpx solid #ddd;
-  color: #FF941A;
+  color: #006CE8;
 }
 
 .pup-sku-footer .btn.buy {
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
 }
 

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

@@ -106,7 +106,7 @@ page {
 }
 
 .fixed-box .tabs .tab-item.on {
-  color: #FF941A;
+  color: #006CE8;
 }
 
 /* 横向列表 */

+ 1 - 1
pages/shopInfo/shopInfo.wxml

@@ -45,7 +45,7 @@
 	<!-- <view class="shopDetails">
 		<view class="otherItem">
 			<text class="itemContent">店铺简介</text>
-			<view>市民请集合~~</view>
+			<view>星闪豹~~</view>
 
 		</view>
 		<view class="otherItem">

+ 5 - 5
pages/snapUpDetail/snapUpDetail.wxss

@@ -31,7 +31,7 @@ image {
   width: 100%;
   height: 85rpx;
   line-height: 85rpx;
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
   padding: 0 30rpx;
   box-sizing: border-box;
@@ -223,7 +223,7 @@ img {
   text-align: center;
   color: #fff;
   font-size: 30rpx;
-  background: #FF941A;
+  background: #006CE8;
   width: 100%;
   line-height: 90rpx;
   margin-top: 20rpx;
@@ -423,9 +423,9 @@ img {
   border:1px dashed #ccc;
 }
 .color-item-current {
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
-  border:1px dashed #FF941A !important;
+  border:1px dashed #006CE8 !important;
 }
 
 
@@ -501,7 +501,7 @@ img {
   height: 2.8em;
   width: 45%;
   margin: 0 15rpx;
-  background: #FF941A;
+  background: #006CE8;
   color: #fff;
 }
 .confirm-btn.gray,

+ 1 - 1
pages/snapUpList/snapUpList.wxss

@@ -98,7 +98,7 @@ page {
 
 .seckill-list .item .goods-msg .goods-name .discounts {
   margin-right: 10rpx;
-  background: #FF941A;
+  background: #006CE8;
   padding: 4rpx 10rpx;
   color: #fff;
   border-radius: 30rpx;

+ 2 - 2
pages/sub-category/sub-category.wxss

@@ -28,8 +28,8 @@ page {
 }
 
 .on {
-  border-bottom: 4rpx solid #FF941A;
-  color: #FF941A;
+  border-bottom: 4rpx solid #006CE8;
+  color: #006CE8;
 }
 /* 清除 scroll-view 滚动条 */
 ::-webkit-scrollbar {  

+ 6 - 6
pages/submit-order/submit-order.wxss

@@ -544,7 +544,7 @@ radio.item-group .wx-radio-input{
 .submit-order-footer .footer-box {
   padding: 0 10rpx;
   width: 200rpx;
-  background: #FF941A;
+  background: #006CE8;
   text-align: center;
   color: #fff;
   font-size: 28rpx;
@@ -628,7 +628,7 @@ radio.item-group .wx-radio-input{
 }
 
 .coupon-tab.on {
-  border-bottom: 2px solid #FF941A;
+  border-bottom: 2px solid #006CE8;
   font-weight: 600;
 }
 
@@ -660,10 +660,10 @@ radio.item-group .wx-radio-input{
   line-height: 20px;
   width: 450rpx;
   padding: 7px;
-  background-color: #FF941A;
-  /* background: -o-linear-gradient(right, #f45c43, #FF941A);
-  background: linear-gradient(right, #f45c43, #FF941A);
-  background: -webkit-linear-gradient(right, #f45c43, #FF941A); */
+  background-color: #006CE8;
+  /* background: -o-linear-gradient(right, #f45c43, #006CE8);
+  background: linear-gradient(right, #f45c43, #006CE8);
+  background: -webkit-linear-gradient(right, #f45c43, #006CE8); */
   color: #fff;
   box-shadow: -1px 3px 3px #aaa;
 }

+ 3 - 0
pages/user/user.wxml

@@ -158,4 +158,7 @@
     </view>
   </view>
 
+  <tabbar active="3"></tabbar>
+
+
 </view>

+ 5 - 3
pages/user/user.wxss

@@ -42,11 +42,12 @@ page {
 .userinfo-none {
   display: flex;
   padding: 100rpx 20rpx 0;
-  background: linear-gradient(270deg, #ffb78a, #fff3c4);
+  background: linear-gradient( 113deg, #B8D9FF 0%, #92C5FF 25%, #BEDDFF 51%, #8FC4FF 83%, #DFEEFF 100%);
   align-items: center;
   position: relative;
   height: 306rpx;
   box-sizing: border-box;
+  border-radius: 0 0 16rpx 16rpx;
 }
 .nick-name{
   font-size: 32rpx;
@@ -59,7 +60,8 @@ page {
   padding: 6rpx 12rpx;
   margin-top: 12rpx;
   font-size: 24rpx;
-  color: #222222;
+  background: rgba(0, 108, 232, .17);
+  color: #006CE8;
 }
 
 .level {
@@ -357,7 +359,7 @@ button.memu-btn.memu-item:after {
 	text-align: center;
   font-size: 30rpx;
 	margin: 100rpx auto 0;
-  background: #FF941A;
+  background: #006CE8;
   border-radius: 40rpx;
 	font-weight: bold;
   font-size: 28rpx;

+ 9 - 2
project.private.config.json

@@ -23,11 +23,18 @@
     "miniprogram": {
       "list": [
         {
-          "name": "pages/writeReturnLogistics/writeReturnLogistics",
-          "pathName": "pages/writeReturnLogistics/writeReturnLogistics",
+          "name": "pages/category1/category",
+          "pathName": "pages/category1/category",
           "query": "",
           "scene": null,
           "launchMode": "default"
+        },
+        {
+          "name": "pages/writeReturnLogistics/writeReturnLogistics",
+          "pathName": "pages/writeReturnLogistics/writeReturnLogistics",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }

+ 3 - 1
utils/eventBus.js

@@ -9,7 +9,7 @@ const eventBus = {
       this.events[event] = [];
     }
     this.events[event].push(callback);
-    
+    console.log('======renwu ',this.events[event]);
     // 如果有缓存事件,立即执行回调
     if (getCached && this.cachedEvents[event]) {
       callback(this.cachedEvents[event]);
@@ -27,8 +27,10 @@ const eventBus = {
   // 清除缓存事件
   clear(event) {
     if (event) {
+      this.events[event] = []
       delete this.cachedEvents[event];
     } else {
+      this.events = {}
       this.cachedEvents = {};
     }
   }