学习?学个屁 пре 3 месеци
комит
782a529bee
100 измењених фајлова са 1769 додато и 0 уклоњено
  1. 17 0
      .gitignore
  2. 22 0
      app.js
  3. 155 0
      app.json
  4. 58 0
      app.wxss
  5. 24 0
      components/IntegralGoodsList/IntegralGoodsList.js
  6. 4 0
      components/IntegralGoodsList/IntegralGoodsList.json
  7. 15 0
      components/IntegralGoodsList/IntegralGoodsList.wxml
  8. 65 0
      components/IntegralGoodsList/IntegralGoodsList.wxss
  9. 34 0
      components/commStar/commStar.js
  10. 4 0
      components/commStar/commStar.json
  11. 4 0
      components/commStar/commStar.wxml
  12. 13 0
      components/commStar/commStar.wxss
  13. 72 0
      components/coupon/coupon.js
  14. 4 0
      components/coupon/coupon.json
  15. 30 0
      components/coupon/coupon.wxml
  16. 118 0
      components/coupon/coupon.wxss
  17. 34 0
      components/loginPopup/loginPopup.js
  18. 4 0
      components/loginPopup/loginPopup.json
  19. 11 0
      components/loginPopup/loginPopup.wxml
  20. 54 0
      components/loginPopup/loginPopup.wxss
  21. 75 0
      components/platCoupon/platCoupon.js
  22. 3 0
      components/platCoupon/platCoupon.json
  23. 55 0
      components/platCoupon/platCoupon.wxml
  24. 180 0
      components/platCoupon/platCoupon.wxss
  25. 28 0
      components/prodListItem/prodListItem.js
  26. 4 0
      components/prodListItem/prodListItem.json
  27. 17 0
      components/prodListItem/prodListItem.wxml
  28. 214 0
      components/prodListItem/prodListItem.wxss
  29. 57 0
      components/production/production.js
  30. 4 0
      components/production/production.json
  31. 19 0
      components/production/production.wxml
  32. 75 0
      components/production/production.wxss
  33. 98 0
      components/shop-tabbar/shop-tabbar.js
  34. 4 0
      components/shop-tabbar/shop-tabbar.json
  35. 10 0
      components/shop-tabbar/shop-tabbar.wxml
  36. 31 0
      components/shop-tabbar/shop-tabbar.wxss
  37. 66 0
      components/topNavtar.js
  38. 2 0
      components/topNavtar.wxml
  39. 66 0
      components/topNavtar/topNavtar.js
  40. 4 0
      components/topNavtar/topNavtar.json
  41. 4 0
      components/topNavtar/topNavtar.wxml
  42. 11 0
      components/topNavtar/topNavtar.wxss
  43. BIN
      images/icon/Endpoint.png
  44. BIN
      images/icon/activity-arr.png
  45. BIN
      images/icon/activity-bg.png
  46. BIN
      images/icon/addr.png
  47. BIN
      images/icon/back-to-top.png
  48. BIN
      images/icon/chat.png
  49. BIN
      images/icon/clear-his.png
  50. BIN
      images/icon/close-white.png
  51. BIN
      images/icon/close.png
  52. BIN
      images/icon/close2.png
  53. BIN
      images/icon/coupon-banner.png
  54. BIN
      images/icon/coupon-bg.png
  55. BIN
      images/icon/coupon-ot.png
  56. BIN
      images/icon/coupon-received.png
  57. BIN
      images/icon/coupon-robbed.png
  58. BIN
      images/icon/coupon-used.png
  59. BIN
      images/icon/customer-service.png
  60. BIN
      images/icon/dotted-line.png
  61. BIN
      images/icon/down-arrow.png
  62. BIN
      images/icon/empty-basket.png
  63. BIN
      images/icon/empty-com.png
  64. BIN
      images/icon/empty-dot.png
  65. BIN
      images/icon/empty.png
  66. BIN
      images/icon/enough.png
  67. BIN
      images/icon/erweima.png
  68. BIN
      images/icon/flash-banner.png
  69. BIN
      images/icon/flash-bg.png
  70. BIN
      images/icon/getCoupon.png
  71. BIN
      images/icon/gift.png
  72. BIN
      images/icon/goumaihuiyuan@2x.png
  73. BIN
      images/icon/grade.png
  74. BIN
      images/icon/group-banner.png
  75. BIN
      images/icon/group-bg.png
  76. BIN
      images/icon/head01.png
  77. BIN
      images/icon/head04.png
  78. BIN
      images/icon/hotsell03.png
  79. BIN
      images/icon/integral-icon.png
  80. BIN
      images/icon/integral.png
  81. BIN
      images/icon/jifen@2x.png
  82. BIN
      images/icon/location.png
  83. BIN
      images/icon/logo.png
  84. BIN
      images/icon/make-integral.png
  85. BIN
      images/icon/menu-01.png
  86. BIN
      images/icon/menu-02.png
  87. BIN
      images/icon/menu-03.png
  88. BIN
      images/icon/menu-04.png
  89. BIN
      images/icon/miaosha.png
  90. BIN
      images/icon/more.png
  91. BIN
      images/icon/more2.png
  92. BIN
      images/icon/myAddr.png
  93. BIN
      images/icon/myCol.png
  94. BIN
      images/icon/myCoupon.png
  95. BIN
      images/icon/new.png
  96. BIN
      images/icon/normal-icon.png
  97. BIN
      images/icon/notice.png
  98. BIN
      images/icon/origin.png
  99. BIN
      images/icon/pay.png
  100. BIN
      images/icon/play-red.png

+ 17 - 0
.gitignore

@@ -0,0 +1,17 @@
+.DS_Store
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+/test/unit/coverage/
+/test/e2e/reports/
+selenium-debug.log
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln

+ 22 - 0
app.js

@@ -0,0 +1,22 @@
+//app.js
+var http = require("utils/http.js");
+App({
+  onLaunch: function () {
+    http.getToken();
+    //自定义导航栏 获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度)
+    const windowInfo = wx.getWindowInfo()
+        let custom = wx.getMenuButtonBoundingClientRect()
+        this.globalData.statusBarHeight = windowInfo.statusBarHeight
+        this.globalData.navBarHeight = custom.height + (custom.top - windowInfo.statusBarHeight) * 2
+  },
+  globalData: {
+    // 定义全局请求队列
+    requestQueue: [],
+    // 是否正在进行登陆
+    isLanding: true,
+    // 购物车商品数量
+    totalCartCount: 0,
+    statusBarHeight: 0,
+    navBarHeight: 0,
+  }
+})

+ 155 - 0
app.json

@@ -0,0 +1,155 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/logs/logs",
+    "pages/user/user",
+    "pages/basket/basket",
+    "pages/myCoupon/myCoupon",
+    "pages/category/category",
+    "pages/search-page/search-page",
+    "pages/delivery-address/delivery-address",
+    "pages/editAddress/editAddress",
+    "pages/orderList/orderList",
+    "pages/order-detail/order-detail",
+    "pages/submit-order/submit-order",
+    "pages/binding-phone/binding-phone",
+    "pages/pay-result/pay-result",
+    "pages/search-prod-show/search-prod-show",
+    "pages/prod/prod",
+    "pages/login/login",
+    "pages/couponCenter/couponCenter",
+    "pages/prod-classify/prod-classify",
+    "pages/recent-news/recent-news",
+    "pages/news-detail/news-detail",
+    "pages/dis-center/dis-center",
+    "pages/my-users/my-users",
+    "pages/income-details/income-details",
+    "pages/take-notes/take-notes",
+    "pages/draw-rule/draw-rule",
+    "pages/promotion-order/promotion-order",
+    "pages/promotionProd/promotionProd",
+    "pages/applyDist/applyDist",
+    "pages/applyDistCon/applyDistCon",
+    "pages/InvitationCards/InvitationCards",
+    "pages/withdrawal/withdrawal",
+    "pages/claimer/claimer",
+    "pages/spellGroupDetails/spellGroupDetails",
+    "pages/confirmOrder/confirmOrder",
+    "pages/snapUpList/snapUpList",
+    "pages/snapUpDetail/snapUpDetail",
+    "pages/prodComm/prodComm",
+    "pages/spellGoodsDetails/spellGoodsDetails",
+    "pages/applyRefund/applyRefund",
+    "pages/afterSales/afterSales",
+    "pages/DetailsOfRefund/DetailsOfRefund",
+    "pages/chooseRefundWay/chooseRefundWay",
+    "pages/writeReturnLogistics/writeReturnLogistics",
+    "pages/spellMembersDetails/spellMembersDetails",
+    "pages/groupConfirmOrder/groupConfirmOrder",
+    "pages/shopCollect/shopCollect",
+    "pages/openAShop/openAShop",
+    "pages/accountSettings/accountSettings",
+    "pages/shopPage/shopPage",
+    "pages/shopProds/shopProds",
+    "pages/shopInfo/shopInfo",
+    "pages/shopSearch/shopSearch",
+    "pages/shopSearchResult/shopSearchResult",
+    "pages/specialDiscount/specialDiscount",
+    "pages/shopCategory/shopCategory",
+    "pages/sub-category/sub-category",
+    "pages/aBulkList/aBulkList",
+    "pages/alterShopPassword/alterShopPassword",
+    "pages/salesmanLevel/salesmanLevel",
+    "pages/accountLogin/accountLogin",
+    "components/IntegralGoodsList/IntegralGoodsList",
+    "pages/register/register",
+    "pages/logisticsInfo/logisticsInfo",
+    "components/topNavtar",
+    "pages/locationAdd/locationAdd",
+    "pages/MaterialFlow/MaterialFlow",
+    "pages/MaterialFlowInfo/MaterialFlowInfo",
+    "pages/ledRedPackage/ledRedPackage"
+  ],
+  "subpackages": [
+    {
+      "root": "packageMemberIntegral",
+      "pages": [
+        "pages/exchangeDetails/exchangeDetails",
+        "pages/memberCenter/memberCenter",
+        "pages/convertProdDet/convertProdDet",
+        "pages/integralSubmitOrder/integralSubmitOrder",
+        "pages/memberIndex/memberIndex",
+        "pages/buyVip/buyVip",
+        "pages/integralDetail/integralDetail",
+        "pages/integralIndex/integralIndex",
+        "pages/luckyDraw/luckyDraw",
+        "components/raffleWheel/raffleWheel"
+      ]
+    }
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#04358D",
+    "navigationBarTitleText": "海马购多店铺商城",
+    "navigationBarTextStyle": "white"
+  },
+  "tabBar": {
+    "selectedColor": "#04358D",
+    "color": "#AAAAAA",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "text": "首页",
+        "iconPath": "images/tabbar/home.png",
+        "selectedIconPath": "images/tabbar/select_home.png"
+      },
+      {
+        "pagePath": "pages/category/category",
+        "text": "分类",
+        "iconPath": "images/tabbar/sort.png",
+        "selectedIconPath": "images/tabbar/select_sort.png"
+      },
+      {
+        "pagePath": "pages/basket/basket",
+        "text": "购物车",
+        "iconPath": "images/tabbar/shop_car.png",
+        "selectedIconPath": "images/tabbar/select_shop_car.png"
+      },
+      {
+        "pagePath": "pages/user/user",
+        "text": "我的",
+        "iconPath": "images/tabbar/mine.png",
+        "selectedIconPath": "images/tabbar/select_mine.png"
+      }
+    ]
+  },
+  "requiredPrivateInfos": [
+    "getFuzzyLocation",
+    "chooseLocation",
+    "chooseAddress",
+    "choosePoi"
+  ],
+  "permission": {
+    "scope.userLocation": {
+      "desc": "你的位置信息将用于小程序位置接口的效果展示"
+    },
+    "scope.userFuzzyLocation":{
+      "desc": "你的位置信息将用于小程序位置接口的效果展示"
+    }
+  },
+  "sitemapLocation": "sitemap.json",
+  "usingComponents": {
+    "van-button": "@vant/weapp/button/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-nav-bar": "@vant/weapp/nav-bar/index",
+    "van-grid": "@vant/weapp/grid/index",
+    "van-grid-item": "@vant/weapp/grid-item/index",
+    "van-popup": "@vant/weapp/popup/index",
+    "van-picker": "@vant/weapp/picker/index",
+    "van-steps": "@vant/weapp/steps/index",
+    "van-empty": "@vant/weapp/empty/index",
+    "van-toast": "@vant/weapp/toast/index",
+    "navbar": "/components/topNavtar/topNavtar",
+    "van-loading": "@vant/weapp/loading/index"
+  }
+}

+ 58 - 0
app.wxss

@@ -0,0 +1,58 @@
+/**app.wxss**/
+.container {
+  height: 100%;
+  box-sizing: border-box;
+  color: #333;
+  font-family: helvetica,'Heiti SC',PingFangSC-Light;
+} 
+.price{
+  font-family: Arial;
+  display: inline-block;
+  color: #e43130;
+
+}
+
+[contenteditable="true"], input, textarea {
+  -webkit-user-select: auto!important;
+  -khtml-user-select: auto!important;
+  -moz-user-select: auto!important;
+  -ms-user-select: auto!important;
+  -o-user-select: auto!important;
+  user-select: auto!important;
+}
+
+
+/* 清除浮动 */
+.clearfix::after {
+  content: '';
+  display: block;
+  clear: both;
+  height:0;
+  visibility: hidden;
+}
+/* /清除浮动 */
+
+
+/* 价格数字显示不同大小 */
+
+.symbol {
+  font-size: 24rpx;
+}
+
+.big-num {
+  font-size: 32rpx;
+}
+
+.small-num {
+  font-size: 24rpx;
+}
+
+/* 底部弹出层的上、右圆角 */
+.border-radius-t-r{
+  border-radius: 26rpx 26rpx 0 0;
+}
+
+/* 页面各栏目圆角 */
+.border-radius-box{
+  border-radius: 20rpx;
+}

+ 24 - 0
components/IntegralGoodsList/IntegralGoodsList.js

@@ -0,0 +1,24 @@
+// components/IntegralGoodsList/IntegralGoodsList.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    prod: Object,
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
components/IntegralGoodsList/IntegralGoodsList.json

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

+ 15 - 0
components/IntegralGoodsList/IntegralGoodsList.wxml

@@ -0,0 +1,15 @@
+<!-- 积分商品列表组件 -->
+<!--components/IntegralGoodsList/IntegralGoodsList.wxml-->
+<!-- <view class="con-box"> -->
+  <view class="item">
+    <view class="img">
+      <image src="{{prod.pic}}" />
+    </view>
+    <view class="name">{{prod.prodName}}</view>
+    <view class="price">
+      <image src="../../images/icon/integral-icon.png" class="icon" />
+      <text class="red-word">{{prod.scorePrice}}积分<text wx:if="{{prod.price > 0}}">+{{prod.price}}元</text></text>
+    </view>
+    <view class="old-price">市场价¥{{prod.oriPrice}}</view>
+  </view>
+<!-- </view> -->

+ 65 - 0
components/IntegralGoodsList/IntegralGoodsList.wxss

@@ -0,0 +1,65 @@
+/* components/IntegralGoodsList/IntegralGoodsList.wxss */
+
+.item {
+  margin-top: 30rpx;
+  width: 330rpx;
+  background: #fff;
+  padding: 20rpx;
+  box-sizing: border-box;
+  border-radius: 10rpx;
+}
+
+.item:nth-child(2n) {
+  margin-right: 0;
+}
+
+.item .img {
+  width: 290rpx;
+  height: 290rpx;
+  font-size: 0;
+}
+
+.item .img image {
+  width: 100%;
+  height: 100%;
+}
+
+.item .name {
+  font-size: 28rpx;
+  margin: 16rpx 0 10rpx;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  height: 56rpx;
+  line-height: 56rpx;
+}
+
+.item .price {
+  position: relative;
+  padding-left: 34rpx;
+  height: 28rpx;
+  line-height: 28rpx;
+  font-size: 24rpx;
+}
+
+.item .price .icon {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 28rpx;
+  height: 28rpx;
+}
+
+.item .red-word {
+  color: #e43130;
+}
+
+.item .old-price {
+  font-size: 24rpx;
+  color: #999;
+  text-decoration: line-through;
+  font-family: arial;
+  padding-top: 14rpx;
+}

+ 34 - 0
components/commStar/commStar.js

@@ -0,0 +1,34 @@
+// components/commStar/commStar.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    value: Number,
+    type:String,
+    index:Number
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    changeVal(e){
+      if(this.data.type){
+        var value = e.currentTarget.dataset.val;
+        this.setData({
+          value: value + 1
+        });
+        this.triggerEvent("onStarChange", { val: this.data.value, idx: this.data.index });
+      }
+      
+    }
+  }
+})

+ 4 - 0
components/commStar/commStar.json

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

+ 4 - 0
components/commStar/commStar.wxml

@@ -0,0 +1,4 @@
+<view class="stars {{type}}">
+  <image src="../../images/icon/star-red.png" wx:for="{{value}}" wx:key='index' data-val="{{item}}" bindtap="changeVal"></image>
+  <image src="../../images/icon/star-empty.png" wx:for="{{5-value}}" wx:key='index' data-val="{{value + item}}" bindtap="changeVal"></image>
+</view>

+ 13 - 0
components/commStar/commStar.wxss

@@ -0,0 +1,13 @@
+.stars {
+  display: flex;
+  margin-left: 3px;
+}
+.stars image {
+  width: 35rpx;
+  height: 35rpx;
+}
+.stars.write image{
+  width: 40rpx;
+  height: 40rpx;
+  margin-right:20rpx;
+}

+ 72 - 0
components/coupon/coupon.js

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

+ 4 - 0
components/coupon/coupon.json

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

+ 30 - 0
components/coupon/coupon.wxml

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

+ 118 - 0
components/coupon/coupon.wxss

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

+ 34 - 0
components/loginPopup/loginPopup.js

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

+ 4 - 0
components/loginPopup/loginPopup.json

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

+ 11 - 0
components/loginPopup/loginPopup.wxml

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

+ 54 - 0
components/loginPopup/loginPopup.wxss

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

+ 75 - 0
components/platCoupon/platCoupon.js

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

+ 3 - 0
components/platCoupon/platCoupon.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 55 - 0
components/platCoupon/platCoupon.wxml

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

+ 180 - 0
components/platCoupon/platCoupon.wxss

@@ -0,0 +1,180 @@
+/* components/platCoupon/platCoupon.wxss */
+.coupon-item{
+    margin: 15px 0;
+    position: relative;
+    box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
+    height: 95px;
+    background: #fff;
+}
+.coupon-item .left{
+    float: left;
+    color: #fff;
+    text-align: center;
+    border-left: 1px dashed #fff;
+    padding: 20px 0;
+    background: -webkit-gradient(linear,left top,right top,from(#F45C43),to(#eb2444));
+    background: -o-linear-gradient(left,#F45C43,#eb2444);
+    background: linear-gradient(left,#F45C43,#eb2444);
+    background: -webkit-linear-gradient(left,#F45C43,#eb2444);
+    width: 260rpx;
+    height: 55px;
+}
+.coupon-item .left .num{
+  font-weight:600;
+  font-size:36rpx;
+  height:70rpx;
+  line-height:70rpx;
+  font-family:arial;
+}
+.coupon-item .left .num .coupon-price{
+  font-size: 72rpx;
+  line-height: 72rpx;
+  display: inline-block;
+  font-family: arial;
+}
+.coupon-item .left .condition{
+  font-size: 28rpx;
+  line-height: 28rpx;
+  display: block;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  padding: 0 2px;
+  font-family: arial;
+  margin-top: 10rpx;
+}
+.coupon-item .right{
+  margin-left: 280rpx;
+    padding: 5px;
+    position: relative;
+}
+.coupon-item .right .c-des{
+  height: 30px;
+    font-size: 26rpx;
+    line-height: 30px;
+    overflow: hidden;
+    font-weight: 600;
+}
+.coupon-item .right .c-des .c-type{
+  font-size: 24rpx;
+    background: #fdf0f0;
+    color: #e43130;
+    border-radius: 8px;
+    padding:3px 10px;
+}
+.coupon-item .right .c-date{
+  font-size: 24rpx;
+  margin-top:25px;
+}
+.coupon-item .right .c-date .c-data-info{
+  font-family: arial;
+}
+.coupon-item .right .c-date .c-btn{
+    position: absolute;
+    bottom:0;
+    right:10px;
+    color: #fff;
+    font-size: 24rpx;
+    font-family: arial;
+    border-radius: 14px;
+    padding:3px 7px;
+    background: #e43130;
+    border: 1px solid #e43130;
+}
+
+.coupon-item .right .c-date .c-btn.get-btn{
+  background: #fff;
+  border: 1px solid #e43130;
+  color:#e43130;
+}
+
+.coupon-item.gray .left{
+  background: #bbb;
+}
+
+.coupon-item.gray .right .c-des .c-type{
+  background: #bbb;
+    color: #fff;
+}
+
+.coupon-item.gray .right .c-date .c-btn{
+  display: none;
+}
+
+
+.coupon-item .tag-img{
+  position: absolute;
+  top:0;
+  right:0;
+  width:120rpx;
+  height:120rpx;
+}
+
+.coupon-item .sel-btn{
+  position:absolute;
+  right:10px;
+  top:35px;
+} 
+
+
+
+
+
+/* 券面 */
+.coupon-surface {
+  padding: 30rpx 0; 
+}
+.coupon-content {
+  border: 1rpx solid #f8f8f8;
+  box-shadow: 2rpx 2rpx 10rpx rgba(221,221,221, .5);
+}
+.coupon-left,
+.coupon-right {
+  display: inline-block;
+  position: relative;
+  padding: 20rpx;
+}
+.coupon-left {
+  width: 22%;
+  text-align: center;
+  vertical-align: middle;
+  border-right: 3rpx dashed #fff;
+  background-image: linear-gradient(60deg, #ff5d4c 10%, #fe9585 90%);
+}
+.coupon-right {
+  vertical-align: top;
+  padding-left: 25rpx;
+}
+.cou-money-amount {
+  text-align: center;
+  color: #e43130;
+  vertical-align: top;
+  height: 100rpx;
+}
+.cou-amount {
+  display: inline-block;
+  font-size: 1.8em;
+  padding: 0 10rpx;
+}
+.cou-text {
+  display: inline-block;
+  font-size: 26rpx;
+}
+.use-condition {
+  font-size: 25rpx;
+  color: #fff;
+  vertical-align: bottom;
+}
+.cou-name {
+  font-size: 32rpx;
+  font-weight: bold;
+  height: 95rpx;
+  padding-top: 10rpx;
+  box-sizing: border-box;
+}
+.cou-term {
+  font-size: 28rpx;
+  color: #777;
+}
+
+/* /券面 */

+ 28 - 0
components/prodListItem/prodListItem.js

@@ -0,0 +1,28 @@
+// components/prodListItem/prodListItem.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    prod:Object
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    toProdPage: function (e) {
+      var prodid = e.currentTarget.dataset.prodid;
+      wx.navigateTo({
+        url: '/pages/prod/prod?prodid=' + prodid,
+      })
+    },
+  }
+})

+ 4 - 0
components/prodListItem/prodListItem.json

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

+ 17 - 0
components/prodListItem/prodListItem.wxml

@@ -0,0 +1,17 @@
+<!--components/prodListItem/prodListItem.wxml-->
+<view class='prod-items' bindtap='toProdPage' data-prodid="{{prod.prodId}}">
+  <view class='hot-imagecont'>
+    <image src='{{prod.pic}}' class='hotsaleimg'></image>
+  </view>
+  <view class='hot-text'>
+    <view class='hotprod-text'>{{prod.prodName}}</view>
+    <view class='prod-info'>{{prod.brief}}</view>
+    <view class='prod-text-info'>
+      <view class='price'>
+        <text class='symbol'>¥</text>
+        <text class='big-num'>{{prod.price}}</text>
+      </view>
+      <image src='../../images/tabbar/basket-sel.png' class='basket-img'></image>
+    </view>
+  </view>
+</view>

+ 214 - 0
components/prodListItem/prodListItem.wxss

@@ -0,0 +1,214 @@
+/* components/prodListItem/prodListItem.wxss */
+
+.prod-items {
+  width: 345rpx;
+  display: inline-block;
+  background: #fff;
+  padding-bottom: 20rpx;
+  box-sizing: border-box;
+  /* box-shadow: 0rpx 6rpx 8rpx rgba(58, 134, 185, 0.2); */
+  box-shadow: 0rpx 5rpx 15rpx rgba(58,134,185,0.2);
+}
+
+.prod-items:nth-child(2n-1) {
+  margin: 20rpx 10rpx 0 20rpx;
+}
+
+.prod-items:nth-child(2n) {
+  margin: 20rpx 20rpx 0 10rpx;
+}
+
+/* .prod-items:last-child {
+  margin-bottom: 30rpx;
+} */
+.prodlist-item-cont {
+  margin-bottom: 40rpx
+}
+
+.prod-items .hot-imagecont .hotsaleimg {
+  width: 341rpx;
+  height: 341rpx;
+}
+
+.prod-items .hot-text .hotprod-text {
+  font-size: 28rpx;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.prod-items .hot-imagecont {
+  font-size: 0;
+  text-align: center;
+}
+
+.prod-items .hot-text {
+  margin-top: 20rpx;
+  padding: 0 10rpx;
+}
+
+.prod-items .hot-text .prod-info, .more-prod .prod-text-right .prod-info {
+  font-size: 22rpx;
+  color: #999;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.prod-items .hot-text .prod-text-info {
+  position: relative;
+  height: 70rpx;
+  line-height: 70rpx;
+  font-family: Arial;
+}
+
+.prod-items .hot-text .prod-text-info .price {
+  font-family: Arial;
+  display: inline-block;
+  color: #e43130;
+  padding-bottom: 10rpx;
+  padding-left: 10rpx;
+}
+
+.prod-items .hot-text .prod-text-info .price .symbol {
+  font-size: 24rpx;
+}
+
+.prod-items .hot-text .prod-text-info .price .big-num {
+  font-size: 32rpx;
+}
+
+.prod-items .hot-text .prod-text-info .basket-img {
+  width: 50rpx;
+  height: 50rpx;
+  position: absolute;
+  right: 0;
+  bottom: 7rpx;
+  padding: 8rpx;
+}
+
+
+
+/* .prod-list{
+  width: 100%;
+} */
+
+.prodlist-item-cont {
+  background: #fafafa;
+  padding-top: 20rpx;
+}
+
+.prod-list .title {
+  position: relative;
+  height: 64rpx;
+  line-height: 64rpx;
+  font-size: 32rpx;
+  padding: 30rpx 0 10rpx 30rpx;
+  color: #333;
+  background: #fff;
+}
+
+.title .more-prod-cont {
+  color: #999;
+  display: inline-block;
+  text-align: right;
+}
+
+.title .more-prod-cont .more {
+  position: absolute;
+  right: 30rpx;
+  top: 48rpx;
+  color: #666;
+  font-size: 24rpx;
+  padding: 0 20rpx;
+  height: 44rpx;
+  line-height: 44rpx;
+}
+
+.title .more-prod-cont .arrow {
+  width: 15rpx;
+  height: 15rpx;
+  transform: rotate(45deg);
+  position: absolute;
+  top: 58rpx;
+  right: 30rpx;
+  border-top: 2rpx solid #666;
+  border-right: 2rpx solid #666;
+}
+
+.prod-list .prod-items {
+  width: 345rpx;
+  display: inline-block;
+  background: #fff;
+  padding-bottom: 20rpx;
+  box-sizing: border-box;
+  box-shadow: 4rpx 4rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.prod-list .prod-items:nth-child(2n-1) {
+  margin: 0 12rpx 20rpx 0rpx;
+}
+
+.prod-list .prod-items:nth-child(2n) {
+  margin: 0 0rpx 20rpx 11.5rpx;
+}
+
+.prod-items .hot-imagecont .hotsaleimg {
+  width: 341rpx;
+  height: 341rpx;
+}
+
+.prod-items .hot-text .prod-name {
+  font-size: 28rpx;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.prod-items .hot-imagecont {
+  font-size: 0;
+  text-align: center;
+}
+
+.prod-items .hot-text {
+  margin-top: 20rpx;
+  padding: 0 10rpx;
+}
+
+.prod-items .hot-text .prod-info, .more-prod .prod-text-right .prod-info {
+  font-size: 22rpx;
+  color: #999;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.prod-items .hot-text .prod-text-info {
+  position: relative;
+  height: 70rpx;
+  line-height: 70rpx;
+  font-family: Arial;
+}
+
+.prod-items .hot-text .prod-text-info .hotprod-price {
+  display: inline;
+  font-size: 26rpx;
+  color: #eb2444;
+}
+
+.prod-items .hot-text .prod-text-info .basket-img {
+  width: 50rpx;
+  height: 50rpx;
+  position: absolute;
+  right: 0;
+  bottom: 7rpx;
+  padding: 8rpx;
+}
+
+.singal-price {
+  display: inline;
+  font-size: 20rpx;
+  text-decoration: line-through;
+  color: #777;
+  margin-left: 15rpx;
+}

+ 57 - 0
components/production/production.js

@@ -0,0 +1,57 @@
+// components/production/production.js
+
+var http = require('../../utils/http.js');
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    item:Object,
+    sts:Number,
+    showCancelCollect: Boolean, // 是否展示取消收藏按钮
+  },
+
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    toProdPage: function (e) {
+      var prodid = e.currentTarget.dataset.prodid;
+      wx.navigateTo({
+        url: '/pages/prod/prod?prodid=' + prodid,
+      })
+    },
+    handleCancelCollection(e) {
+      var prodid = e.currentTarget.dataset.prodid;
+      wx.showLoading()
+      var params = {
+        url: "/p/user/collection/addOrCancel",
+        method: "POST",
+        data: prodid,
+        callBack: (res) => {
+          wx.hideLoading()
+          wx.showToast({
+            title: res? '已添加收藏' : '已取消收藏',
+            duration: 1200,
+            icon: 'none',
+            complete: com =>{
+              setTimeout(()=>{
+                this.triggerEvent('getCollectionProd')
+              },500)
+            }
+          })
+        }
+      };
+      http.request(params);
+    }
+  }
+})

+ 4 - 0
components/production/production.json

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

+ 19 - 0
components/production/production.wxml

@@ -0,0 +1,19 @@
+  <view class='prod-items' bindtap='toProdPage' data-prodid="{{item.prodId}}">
+    <view class='hot-imagecont'>
+      <image src='{{item.pic}}' class='hotsaleimg' ></image>
+    </view>
+    <view class='hot-text'>
+      <view class='hotprod-text'>{{item.prodName}}</view>
+      <view class='prod-info' wx:if='{{sts==6}}'>{{item.prodCommNumber}}评价 {{item.positiveRating}}%好评</view>
+      <view class='prod-text-info {{showCancelCollect?"collection-row":""}}'>
+        <view class='price'>
+          <text wx:if='{{sts==2}}' class='deadline-price'>限时价</text>
+          <text class='symbol'>¥</text>
+          <text class='big-num'>{{wxs.parsePrice(item.price)[0]}}</text>
+          <text class='small-num'>.{{wxs.parsePrice(item.price)[1]}}</text>
+        </view>
+        <view class="collection-btn price small-num" wx:if="{{showCancelCollect}}" data-prodid="{{item.prodId}}" catchtap="handleCancelCollection"> 取消收藏 </view>
+      </view>
+    </view>
+  </view>
+<wxs module="wxs" src="../../wxs/number.wxs" />

+ 75 - 0
components/production/production.wxss

@@ -0,0 +1,75 @@
+@import "../../app.wxss";
+page {
+  background: #f4f4f4;
+}
+.prod-items {
+  width: 345rpx;
+  display: inline-block;
+  background: #fff;
+  padding: 20rpx;
+  box-sizing: border-box;
+  margin-left: 20rpx;
+  margin-bottom: 20rpx;
+  border-radius: 10rpx;
+}
+
+.hot-imagecont .hotsaleimg {
+  width: 100%;
+  height: 100%;
+  border-radius: 10rpx;
+}
+
+.hot-text .hotprod-text {
+  height: 76rpx;
+  line-height: 38rpx;
+  font-size: 28rpx;
+  display: -webkit-box;
+  word-break: break-all;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+  color: #000;
+}
+
+.prod-items .hot-imagecont {
+  text-align: center;
+  font-size: 0;
+  width: 305rpx;
+  height: 305rpx;
+}
+
+.prod-items .hot-text {
+  margin-top: 20rpx;
+}
+
+.prod-items .hot-text .prod-info {
+  font-size: 20rpx;
+  color: #777;
+  margin-top: 8rpx;
+  margin-left: 15rpx;
+}
+
+.prod-items .hot-text .prod-text-info {
+  position: relative;
+  height: 40rpx;
+  line-height: 40rpx;
+  font-family: Arial;
+  margin-top: 20rpx;
+}
+.collection-row {
+  display: flex;
+  justify-content: space-between;
+}
+
+.prod-items .hot-text .prod-text-info .price {
+  color: #e43130;
+}
+.prod-items .hot-text .prod-text-info .collection-btn{
+  color: #04358D;
+}
+.deadline-price{
+  font-size: 22rpx;
+  margin-right: 5rpx;
+}

+ 98 - 0
components/shop-tabbar/shop-tabbar.js

@@ -0,0 +1,98 @@
+// pages/shop-tabbar/shop-tabbar.js
+
+
+// components/production/production.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    currentTab:{
+      type:Number
+    }
+  },
+
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+    list: [{
+        text: "店铺首页",
+        iconPath: "../../images/tabbar/shop-home.png",
+        selectedIconPath: "../../images/tabbar/shop-home-sel.png"
+      },
+
+      {
+
+        text: "全部商品",
+        iconPath: "../../images/tabbar/shop-prods.png",
+        selectedIconPath: "../../images/tabbar/shop-prods-sel.png"
+      },
+      {
+        text: "商品分类",
+        iconPath: "../../images/tabbar/shop-category.png",
+        selectedIconPath: "../../images/tabbar/shop-category-sel.png"
+      },
+      {
+
+        text: "店内搜索",
+        iconPath: "../../images/tabbar/shop-search.png",
+        selectedIconPath: "../../images/tabbar/shop-search-sel.png"
+      }
+    ],
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    toProdPage: function(e) {
+      var prodid = e.currentTarget.dataset.prodid;
+      wx.navigateTo({
+        url: '/pages/prod/prod?prodid=' + prodid,
+      })
+    },
+    // tabbar切换
+    tabChange(e) {
+      const {
+        index
+      } = e.currentTarget.dataset
+      this.setData({
+        currentTab: index
+      })
+      if (this.data.currentTab == 0) {
+        wx.redirectTo({
+          url: '/pages/shopPage/shopPage',
+        })
+
+      } else if (this.data.currentTab == 1) {
+        wx.redirectTo({
+          url: '/pages/shopProds/shopProds',
+        })
+      } else if (this.data.currentTab == 2) {
+        wx.redirectTo({
+          url: '/pages/shopCategory/shopCategory',
+        })
+      } else if (this.data.currentTab == 3) {
+        wx.redirectTo({
+          url: '/pages/shopSearch/shopSearch',
+        })
+      }
+    },
+  },
+
+  /**
+   * 组件生命周期
+   */
+    lifetimes: {
+    attached: function () {
+      // 在组件实例进入页面节点树时执行
+      console.log(this.properties.currentTab)
+    },
+    detached: function () {
+      // 在组件实例被从页面节点树移除时执行
+    },
+  },
+})

+ 4 - 0
components/shop-tabbar/shop-tabbar.json

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

+ 10 - 0
components/shop-tabbar/shop-tabbar.wxml

@@ -0,0 +1,10 @@
+<!--pages/shop-tabbar/shop-tabbar.wxml-->
+<view class="shop-tabbar-container">
+  <block wx:for="{{list}}" wx:key="*this">
+    <view class="tabBar" bindtap="tabChange" data-index="{{index}}">
+      <image class="tabIcon" src="{{item.selectedIconPath}}" wx:if="{{currentTab==index}}"></image>
+      <image class="tabIcon" src="{{item.iconPath}}" wx:else></image>
+      <text class="tabTitle {{currentTab==index?'on':''}}">{{item.text}}</text>
+    </view>
+  </block>
+</view>

+ 31 - 0
components/shop-tabbar/shop-tabbar.wxss

@@ -0,0 +1,31 @@
+/* pages/shop-tabbar/shop-tabbar.wxss */
+
+.shop-tabbar-container {
+  background: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  border-top: 1rpx solid #d5d5d5;
+  padding: 3rpx 0;
+}
+
+.tabBar {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 8rpx 20rpx;
+}
+
+.tabBar .tabIcon {
+  width: 54rpx;
+  height: 54rpx;
+}
+
+.tabBar .tabTitle {
+  font-size: 20rpx;
+  color: #333333;
+}
+
+  .on {
+  color: #e43130 !important;
+}

+ 66 - 0
components/topNavtar.js

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

+ 2 - 0
components/topNavtar.wxml

@@ -0,0 +1,2 @@
+<!--components/topNavtar.wxml-->
+<text>components/topNavtar.wxml</text>

+ 66 - 0
components/topNavtar/topNavtar.js

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

+ 4 - 0
components/topNavtar/topNavtar.json

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

+ 4 - 0
components/topNavtar/topNavtar.wxml

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

+ 11 - 0
components/topNavtar/topNavtar.wxss

@@ -0,0 +1,11 @@
+/* components/topNavtar.wxss */
+.head{
+  position: fixed;
+  z-index:999;
+	width: 100%;
+	height: 30px;
+	line-height: 30px;
+  background: linear-gradient(to bottom, #D9E7FF, #e0eafa,#F6F6F6 );
+	top: 0;
+	left: 0;
+}

BIN
images/icon/Endpoint.png


BIN
images/icon/activity-arr.png


BIN
images/icon/activity-bg.png


BIN
images/icon/addr.png


BIN
images/icon/back-to-top.png


BIN
images/icon/chat.png


BIN
images/icon/clear-his.png


BIN
images/icon/close-white.png


BIN
images/icon/close.png


BIN
images/icon/close2.png


BIN
images/icon/coupon-banner.png


BIN
images/icon/coupon-bg.png


BIN
images/icon/coupon-ot.png


BIN
images/icon/coupon-received.png


BIN
images/icon/coupon-robbed.png


BIN
images/icon/coupon-used.png


BIN
images/icon/customer-service.png


BIN
images/icon/dotted-line.png


BIN
images/icon/down-arrow.png


BIN
images/icon/empty-basket.png


BIN
images/icon/empty-com.png


BIN
images/icon/empty-dot.png


BIN
images/icon/empty.png


BIN
images/icon/enough.png


BIN
images/icon/erweima.png


BIN
images/icon/flash-banner.png


BIN
images/icon/flash-bg.png


BIN
images/icon/getCoupon.png


BIN
images/icon/gift.png


BIN
images/icon/goumaihuiyuan@2x.png


BIN
images/icon/grade.png


BIN
images/icon/group-banner.png


BIN
images/icon/group-bg.png


BIN
images/icon/head01.png


BIN
images/icon/head04.png


BIN
images/icon/hotsell03.png


BIN
images/icon/integral-icon.png


BIN
images/icon/integral.png


BIN
images/icon/jifen@2x.png


BIN
images/icon/location.png


BIN
images/icon/logo.png


BIN
images/icon/make-integral.png


BIN
images/icon/menu-01.png


BIN
images/icon/menu-02.png


BIN
images/icon/menu-03.png


BIN
images/icon/menu-04.png


BIN
images/icon/miaosha.png


BIN
images/icon/more.png


BIN
images/icon/more2.png


BIN
images/icon/myAddr.png


BIN
images/icon/myCol.png


BIN
images/icon/myCoupon.png


BIN
images/icon/new.png


BIN
images/icon/normal-icon.png


BIN
images/icon/notice.png


BIN
images/icon/origin.png


BIN
images/icon/pay.png


BIN
images/icon/play-red.png


Неке датотеке нису приказане због велике количине промена