Browse Source

客户原始代码

renjianshu 5 years ago
parent
commit
fc0038fee5
100 changed files with 4452 additions and 0 deletions
  1. 80 0
      app.js
  2. 120 0
      app.json
  3. 541 0
      app.wxss
  4. 303 0
      icon.wxss
  5. 120 0
      lionfish_comshop/components/auth/index.js
  6. 7 0
      lionfish_comshop/components/auth/index.json
  7. 14 0
      lionfish_comshop/components/auth/index.wxml
  8. 61 0
      lionfish_comshop/components/auth/index.wxss
  9. 77 0
      lionfish_comshop/components/button/index.js
  10. 4 0
      lionfish_comshop/components/button/index.json
  11. 6 0
      lionfish_comshop/components/button/index.wxml
  12. 127 0
      lionfish_comshop/components/button/index.wxss
  13. 7 0
      lionfish_comshop/components/card/index.js
  14. 4 0
      lionfish_comshop/components/card/index.json
  15. 11 0
      lionfish_comshop/components/card/index.wxml
  16. 9 0
      lionfish_comshop/components/card/index.wxss
  17. 103 0
      lionfish_comshop/components/choose-image/index.js
  18. 4 0
      lionfish_comshop/components/choose-image/index.json
  19. 15 0
      lionfish_comshop/components/choose-image/index.wxml
  20. 80 0
      lionfish_comshop/components/choose-image/index.wxss
  21. 103 0
      lionfish_comshop/components/chooseImage/index.js
  22. 4 0
      lionfish_comshop/components/chooseImage/index.json
  23. 15 0
      lionfish_comshop/components/chooseImage/index.wxml
  24. 75 0
      lionfish_comshop/components/chooseImage/index.wxss
  25. 43 0
      lionfish_comshop/components/comming-spu-disabled/index.js
  26. 7 0
      lionfish_comshop/components/comming-spu-disabled/index.json
  27. 20 0
      lionfish_comshop/components/comming-spu-disabled/index.wxml
  28. 113 0
      lionfish_comshop/components/comming-spu-disabled/index.wxss
  29. 53 0
      lionfish_comshop/components/comming-spu/index.js
  30. 9 0
      lionfish_comshop/components/comming-spu/index.json
  31. 26 0
      lionfish_comshop/components/comming-spu/index.wxml
  32. 166 0
      lionfish_comshop/components/comming-spu/index.wxss
  33. 60 0
      lionfish_comshop/components/community-item/index.js
  34. 4 0
      lionfish_comshop/components/community-item/index.json
  35. 15 0
      lionfish_comshop/components/community-item/index.wxml
  36. 66 0
      lionfish_comshop/components/community-item/index.wxss
  37. 76 0
      lionfish_comshop/components/count-down/index.js
  38. 6 0
      lionfish_comshop/components/count-down/index.json
  39. 7 0
      lionfish_comshop/components/count-down/index.wxml
  40. 12 0
      lionfish_comshop/components/count-down/index.wxss
  41. 94 0
      lionfish_comshop/components/coupon/index.js
  42. 4 0
      lionfish_comshop/components/coupon/index.json
  43. 23 0
      lionfish_comshop/components/coupon/index.wxml
  44. 118 0
      lionfish_comshop/components/coupon/index.wxss
  45. 21 0
      lionfish_comshop/components/dialog/index.js
  46. 7 0
      lionfish_comshop/components/dialog/index.json
  47. 14 0
      lionfish_comshop/components/dialog/index.wxml
  48. 35 0
      lionfish_comshop/components/dialog/index.wxss
  49. 17 0
      lionfish_comshop/components/distributionItem/index.js
  50. 6 0
      lionfish_comshop/components/distributionItem/index.json
  51. 13 0
      lionfish_comshop/components/distributionItem/index.wxml
  52. 65 0
      lionfish_comshop/components/distributionItem/index.wxss
  53. 19 0
      lionfish_comshop/components/fetch-coder/index.js
  54. 6 0
      lionfish_comshop/components/fetch-coder/index.json
  55. 12 0
      lionfish_comshop/components/fetch-coder/index.wxml
  56. 61 0
      lionfish_comshop/components/fetch-coder/index.wxss
  57. 12 0
      lionfish_comshop/components/fixed-bottom/index.js
  58. 4 0
      lionfish_comshop/components/fixed-bottom/index.json
  59. 3 0
      lionfish_comshop/components/fixed-bottom/index.wxml
  60. 12 0
      lionfish_comshop/components/fixed-bottom/index.wxss
  61. 70 0
      lionfish_comshop/components/get-phone/index.js
  62. 7 0
      lionfish_comshop/components/get-phone/index.json
  63. 14 0
      lionfish_comshop/components/get-phone/index.wxml
  64. 66 0
      lionfish_comshop/components/get-phone/index.wxss
  65. 29 0
      lionfish_comshop/components/goods-bar/index.js
  66. 6 0
      lionfish_comshop/components/goods-bar/index.json
  67. 37 0
      lionfish_comshop/components/goods-bar/index.wxml
  68. 120 0
      lionfish_comshop/components/goods-bar/index.wxss
  69. 55 0
      lionfish_comshop/components/goodsCard/index.js
  70. 7 0
      lionfish_comshop/components/goodsCard/index.json
  71. 15 0
      lionfish_comshop/components/goodsCard/index.wxml
  72. 38 0
      lionfish_comshop/components/goodsCard/index.wxss
  73. 26 0
      lionfish_comshop/components/goodsInfo/index.js
  74. 6 0
      lionfish_comshop/components/goodsInfo/index.json
  75. 43 0
      lionfish_comshop/components/goodsInfo/index.wxml
  76. 62 0
      lionfish_comshop/components/goodsInfo/index.wxss
  77. 54 0
      lionfish_comshop/components/group-order/index.js
  78. 6 0
      lionfish_comshop/components/group-order/index.json
  79. 24 0
      lionfish_comshop/components/group-order/index.wxml
  80. 73 0
      lionfish_comshop/components/group-order/index.wxss
  81. 71 0
      lionfish_comshop/components/guess-like/index.js
  82. 9 0
      lionfish_comshop/components/guess-like/index.json
  83. 20 0
      lionfish_comshop/components/guess-like/index.wxml
  84. 85 0
      lionfish_comshop/components/guess-like/index.wxss
  85. 65 0
      lionfish_comshop/components/image/index.js
  86. 4 0
      lionfish_comshop/components/image/index.json
  87. 4 0
      lionfish_comshop/components/image/index.wxml
  88. 8 0
      lionfish_comshop/components/image/index.wxss
  89. 60 0
      lionfish_comshop/components/img/index.js
  90. 4 0
      lionfish_comshop/components/img/index.json
  91. 4 0
      lionfish_comshop/components/img/index.wxml
  92. 16 0
      lionfish_comshop/components/img/index.wxss
  93. 31 0
      lionfish_comshop/components/index-item/index.js
  94. 4 0
      lionfish_comshop/components/index-item/index.json
  95. 6 0
      lionfish_comshop/components/index-item/index.wxml
  96. 12 0
      lionfish_comshop/components/index-item/index.wxss
  97. 152 0
      lionfish_comshop/components/index/index.js
  98. 4 0
      lionfish_comshop/components/index/index.json
  99. 16 0
      lionfish_comshop/components/index/index.wxml
  100. 0 0
      lionfish_comshop/components/index/index.wxss

+ 80 - 0
app.js

@@ -0,0 +1,80 @@
+var util = require('we7/resource/js/util.js');
+var timeQueue = require('lionfish_comshop/utils/timeQueue');
+
+App({
+  onLaunch: function (res) {
+    wx.hideTabBar();
+    var that = this;
+    var userInfo = wx.getStorageSync("userInfo");
+    this.globalData.userInfo = userInfo;
+    var historyCommunity = wx.getStorageSync("historyCommunity") || [];
+    var currentCommunity = wx.getStorageSync("community");
+    this.globalData.hasDefaultCommunity = !!currentCommunity;
+    this.globalData.community = currentCommunity;
+    this.globalData.systemInfo = wx.getSystemInfoSync();
+    var model = this.globalData.systemInfo.model;
+    this.globalData.isIpx = model.indexOf("iPhone X") > -1 || model.indexOf("unknown<iPhone") > -1;
+    this.globalData.timer = new timeQueue.default();
+  },
+  onShow: function (res) {
+    this.getUpdate();
+  },
+  onHide: function () {
+  },
+  //加载微擎工具类
+  util: util,
+  //导航菜单,微擎将会自己实现一个导航菜单,结构与小程序导航菜单相同
+  //用户信息,sessionid是用户是否登录的凭证
+  userInfo: {
+    sessionid: null,
+  },
+  globalData: {
+    systemInfo: {},
+    isIpx: false,
+    userInfo: {},
+    canGetGPS: true,
+    city: {},
+    community: {},
+    location: {},
+    hasDefaultCommunity: true,
+    historyCommunity: [],
+    changedCommunity: false,
+    disUserInfo: {},
+    changeCity: "",
+    timer: 0,
+    formIds: [],
+    community_id: '',
+    placeholdeImg: '',
+    cartNum: 0,
+    cartNumStamp: 0,
+    common_header_backgroundimage: '',
+    appLoadStatus: 1, // 1 正常 0 未登录 2 未选择社区
+    goodsListCarCount: [],
+    typeCateId: 0
+  },
+  getUpdate: function(){
+    if (wx.canIUse("getUpdateManager")) {
+      const updateManager = wx.getUpdateManager();
+      updateManager.onCheckForUpdate(function (res) {
+        res.hasUpdate && (updateManager.onUpdateReady(function () {
+          wx.showModal({
+            title: "更新提示",
+            content: "新版本已经准备好,是否马上重启小程序?",
+            success: function (t) {
+              t.confirm && updateManager.applyUpdate();
+            }
+          });
+        }), updateManager.onUpdateFailed(function () {
+          wx.showModal({
+            title: "已经有新版本了哟~",
+            content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~"
+          });
+        }));
+      });
+    } else wx.showModal({
+      title: "提示",
+      content: "当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
+    });
+  },
+  siteInfo: require('siteinfo.js')
+});

+ 120 - 0
app.json

@@ -0,0 +1,120 @@
+{
+  "pages": [
+    "lionfish_comshop/pages/index/index",
+    "lionfish_comshop/pages/goods/goodsDetail",
+    "lionfish_comshop/pages/order/shopCart",
+    "lionfish_comshop/pages/user/me",
+    "lionfish_comshop/pages/groupCenter/pendingDeliveryOrders",
+    "lionfish_comshop/pages/auth/index",
+    "lionfish_comshop/pages/position/community",
+    "lionfish_comshop/pages/position/search",
+    "lionfish_comshop/pages/order/index",
+    "lionfish_comshop/pages/order/order",
+    "lionfish_comshop/pages/order/refunddetail",
+    "lionfish_comshop/pages/groupCenter/recruit",
+    "lionfish_comshop/pages/groupCenter/apply",
+    "lionfish_comshop/pages/user/protocol",
+    "lionfish_comshop/pages/user/articleProtocol",
+    "lionfish_comshop/pages/user/articlePolicy",
+    "lionfish_comshop/pages/order/refund",
+    "lionfish_comshop/pages/order/evaluate",
+    "lionfish_comshop/pages/groupCenter/index",
+    "lionfish_comshop/pages/groupCenter/communityMembers",
+    "lionfish_comshop/pages/groupCenter/distributionList",
+    "lionfish_comshop/pages/groupCenter/distributionInstruct",
+    "lionfish_comshop/pages/groupCenter/settlementList",
+    "lionfish_comshop/pages/groupCenter/settlementDetail",
+    "lionfish_comshop/pages/groupCenter/editInfo",
+    "lionfish_comshop/pages/refund/refundList",
+    "lionfish_comshop/pages/groupCenter/groupList",
+    "lionfish_comshop/pages/groupCenter/groupDetail",
+    "lionfish_comshop/pages/groupCenter/buyHistory",
+    "lionfish_comshop/pages/position/cities",
+    "lionfish_comshop/pages/order/placeOrder",
+    "lionfish_comshop/pages/goods/buyRecords",
+    "lionfish_comshop/pages/goods/comment",
+    "lionfish_comshop/pages/groupCenter/wallet",
+    "lionfish_comshop/pages/groupCenter/cashList",
+    "lionfish_comshop/pages/groupCenter/detailsList",
+    "lionfish_comshop/pages/supply/recruit",
+    "lionfish_comshop/pages/supply/apply",
+    "lionfish_comshop/pages/groupCenter/list",
+    "lionfish_comshop/pages/groupCenter/listDetails",
+    "lionfish_comshop/pages/groupCenter/memberList",
+    "lionfish_comshop/pages/web-view",
+    "lionfish_comshop/pages/order/goods_express",
+    "lionfish_comshop/pages/order/shareOrderInfo",
+    "lionfish_comshop/pages/user/coupon",
+    "lionfish_comshop/pages/index/share",
+    "lionfish_comshop/pages/type/index",
+    "lionfish_comshop/pages/groupCenter/setting",
+    "lionfish_comshop/pages/form/apply",
+    "lionfish_comshop/pages/user/rechargeDetails",
+    "lionfish_comshop/pages/user/charge",
+    "lionfish_comshop/pages/groupCenter/closure",
+    "lionfish_comshop/pages/groupCenter/addHexiao",
+    "lionfish_comshop/pages/groupCenter/bind_member_hexiao",
+    "lionfish_comshop/pages/type/search",
+    "lionfish_comshop/pages/type/result",
+    "lionfish_comshop/pages/groupCenter/goodsManage",
+    "lionfish_comshop/pages/user/scoreDetails",
+    "lionfish_comshop/pages/groupCenter/gruopInfo",
+    "lionfish_comshop/pages/groupCenter/headlist",
+    "lionfish_comshop/pages/groupCenter/recommend",
+    "lionfish_comshop/pages/goods/industrial",
+    "lionfish_comshop/pages/distribution/share",
+    "lionfish_comshop/pages/distribution/member",
+    "lionfish_comshop/pages/distribution/memberInfo",
+    "lionfish_comshop/pages/distribution/details",
+    "lionfish_comshop/pages/distribution/me",
+    "lionfish_comshop/pages/distribution/recruit",
+    "lionfish_comshop/pages/distribution/apply",
+    "lionfish_comshop/pages/distribution/excharge",
+    "lionfish_comshop/pages/distribution/exchargeRecord",
+    "lionfish_comshop/pages/distribution/goodsDetails",
+    "lionfish_comshop/pages/dynamic/index",
+    "lionfish_comshop/pages/distribution/fans"
+  ],
+  "window": {
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "",
+    "navigationBarBackgroundColor": "#fff",
+    "backgroundColor": "#fff"
+  },
+  "tabBar": {
+    "list": [
+      {
+        "pagePath": "lionfish_comshop/pages/index/index",
+        "text": "首页"
+      },
+      {
+        "pagePath": "lionfish_comshop/pages/type/index",
+        "text": "分类"
+      },
+      {
+        "pagePath": "lionfish_comshop/pages/order/shopCart",
+        "text": "购物车"
+      },
+      {
+        "pagePath": "lionfish_comshop/pages/user/me",
+        "text": "我的"
+      }
+    ],
+    "color": "#fff",
+    "selectedColor": "#fff",
+    "backgroundColor": "#fff",
+    "borderStyle": "white"
+  },
+  "networkTimeout": {
+    "request": 20000
+  },
+  "permission": {
+    "scope.userLocation": {
+      "desc": "为了更好的服务您,请授权允许"
+    }
+  },
+  "navigateToMiniProgramAppIdList": [
+    "wx0c95abbbc01623ba"
+  ],
+  "sitemapLocation": "sitemap.json"
+}

+ 541 - 0
app.wxss

@@ -0,0 +1,541 @@
+page {
+  background-color: #f6f6f6;
+  font-size: 28rpx;
+  font-weight: 400;
+  color: #333;
+}
+
+.pb20 {
+  padding-bottom: 40rpx;
+}
+
+.mb20 {
+  margin-bottom: 40rpx;
+}
+
+.pb100 {
+  padding-bottom: 100rpx;
+}
+
+.i-load-more {
+  width: 65%;
+  font-size: 24rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 60rpx auto;
+}
+
+.i-load-more-loading {
+  display: inline-block;
+  margin-right: 24rpx;
+  vertical-align: middle;
+  width: 28rpx;
+  height: 28rpx;
+  background: 0 0;
+  border-radius: 50%;
+  border: 4rpx solid #e9eaec;
+  border-color: #e9eaec #e9eaec #e9eaec #2d8cf0;
+  animation: btn-spin 0.6s linear;
+  animation-iteration-count: infinite;
+}
+
+.i-load-more-tip {
+  display: inline-block;
+  vertical-align: middle;
+  color: #999;
+}
+
+.i-load-more-line {
+  display: flex;
+  border-top: 0;
+}
+
+.i-load-more-line .i-load-more-tip {
+  position: relative;
+  top: -.1em;
+  padding: 0 0.55em;
+}
+
+.i-load-more-empty {
+  width: 8rpx;
+  height: 8rpx;
+  border-radius: 50%;
+  background-color: #e5e5e5;
+  display: inline-block;
+  position: relative;
+  vertical-align: 0;
+  top: -.16em;
+}
+
+@-webkit-keyframes btn-spin {
+  0% {
+    transform: rotate(0);
+  }
+
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+@keyframes btn-spin {
+  0% {
+    transform: rotate(0);
+  }
+
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+/**授权登录begin**/
+
+.i-as {
+  position: fixed;
+  width: 100%;
+  box-sizing: border-box;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #fff;
+  transform: translate3d(0, 100%, 0);
+  transform-origin: center;
+  transition: all 0.2s ease-in-out;
+  z-index: 900;
+  visibility: hidden;
+  border-radius: 30rpx 30rpx 0 0;
+}
+
+.i-as-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.7);
+  z-index: 900;
+  transition: all 0.2s ease-in-out;
+  opacity: 0;
+  visibility: hidden;
+}
+
+.i-as-mask-show {
+  opacity: 1;
+  visibility: visible;
+}
+
+.i-as-show {
+  transform: translate3d(0, 0, 0);
+  visibility: visible;
+}
+
+.i-modal-content {
+  position: fixed;
+  overflow: auto;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1000;
+  display: flex;
+  width: auto;
+  height: auto;
+  outline: 0;
+  -webkit-box-align: center;
+  align-items: center;
+  -webkit-box-pack: center;
+  justify-content: center;
+  transform: translateZ(2rpx);
+  opacity: 0;
+  visibility: hidden;
+}
+
+.i-modal-show {
+  visibility: visible;
+  opacity: 1;
+}
+
+.ipx {
+  padding-bottom: 40rpx;
+}
+
+.auth-content {
+  width: 520rpx;
+  height: 660rpx;
+  background: #fff;
+  border-radius: 24rpx;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: flex-end;
+  margin: 60px auto;
+}
+
+.auth-content .bg {
+  width: 520rpx;
+  height: 354rpx;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.auth-content .h1 {
+  color: #444;
+  font-size: 32rpx;
+  margin-bottom: 20rpx;
+}
+
+.auth-content .h2 {
+  font-size: 24rpx;
+  line-height: 36rpx;
+  color: #999;
+  width: 408rpx;
+  margin-bottom: 44rpx;
+}
+
+.auth-content .h2 p {
+  text-align: center;
+  display: block;
+}
+
+.auth-content .confirm {
+  width: 432rpx;
+  height: 72rpx;
+  color: #fff;
+  background: linear-gradient(to left, #ff2756, #ff2f30);
+  font-size: 32rpx;
+  line-height: 72rpx;
+  border-radius: 12rpx;
+  margin: 0 0 30rpx;
+}
+
+/**授权登录end**/
+
+/**首页规格弹窗begin ***/
+
+.sku-content {
+  position: fixed;
+  bottom: 0px;
+  z-index: 9999;
+}
+
+.sku-card {
+  width: 750rpx;
+  box-sizing: border-box;
+  border-radius: 30rpx 30rpx 0 0;
+  background: #fff;
+  overflow: hidden;
+  padding: 40rpx 40rpx 0 40rpx;
+}
+
+.sku-card .close {
+  position: absolute;
+  right: 28rpx;
+  top: 28rpx;
+  width: 40rpx;
+  height: 40rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.sku-card .close image {
+  width: 26rpx;
+  height: 26rpx;
+}
+
+.sku-card .sku-header {
+  display: flex;
+  align-items: flex-start;
+  margin-bottom: 40rpx;
+}
+
+.sku-card .sku-header .sku-img {
+  width: 160rpx;
+  height: 160rpx;
+  border: 1rpx solid #e4e4e4;
+  margin-right: 30rpx;
+}
+
+.sku-card .sku-header .sku-img image {
+  border: none;
+}
+
+.sku-card .sku-header .sku-desc {
+  display: flex;
+  flex-direction: column;
+}
+
+.sku-card .sku-header .sku-desc .sku-title {
+  width: 390rpx;
+  min-height: 60rpx;
+  margin-bottom: 16rpx;
+  color: #444;
+  font-weight: bold;
+  position: relative;
+}
+
+.sku-card .sku-header .sku-desc .sku-title span {
+  position: absolute;
+  width: 390rpx;
+  height: 60rpx;
+  left: 0;
+  top: 0;
+  font-size: 26rpx;
+  line-height: 30rpx;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+  text-overflow: initial;
+  white-space: normal;
+}
+
+.sku-card .sku-header .sku-price {
+  display: flex;
+  align-items: flex-end;
+  margin-bottom: 12rpx;
+  font-size: 24rpx;
+  line-height: 24rpx;
+}
+
+.sku-card .sku-header .sku-price .sale-price {
+  color: #ff5344;
+  margin-right: 12rpx;
+  margin-bottom: -4rpx;
+}
+
+.sku-card .sku-header .sku-price .sale-price span {
+  font-size: 56rpx;
+  line-height: 56rpx;
+  margin-left: 8rpx;
+  font-weight: bold;
+}
+
+.sku-card .sku-header .sku-price .market-price {
+  text-decoration: line-through;
+  color: #999;
+  margin-right: 30rpx;
+}
+
+.sku-card .sku-header .sku-switch-on {
+  font-size: 24rpx;
+  color: #444;
+}
+
+.sku-card .sku-msg {
+  width: 670rpx;
+  margin: 0 auto 60rpx;
+  border-radius: 16rpx;
+  background: linear-gradient(to right, #fff7f0, #fff4ec);
+  display: flex;
+  align-items: flex-start;
+  padding: 20rpx;
+  color: #ca7e57;
+  box-sizing: border-box;
+}
+
+.sku-card .sku-msg .tag {
+  border-radius: 16rpx;
+  border: 1rpx solid #ffa49c;
+  font-size: 20rpx;
+  line-height: 28rpx;
+  font-weight: 500;
+  padding: 0 8rpx;
+  margin-right: 8rpx;
+  color: #ff5344;
+  white-space: nowrap;
+  vertical-align: middle;
+}
+
+.sku-card .sku-msg .sku-activity-msg {
+  color: #ca7e57;
+  font-size: 24rpx;
+  line-height: 32rpx;
+  width: 540rpx;
+  font-weight: 500;
+}
+
+.sku-card .sku-spec {
+  width: 670rpx;
+  margin: 0 auto 40rpx;
+  display: flex;
+  align-items: flex-start;
+}
+
+.sku-card .sku-spec .title {
+  font-size: 26rpx;
+  line-height: 50rpx;
+  margin-right: 8rpx;
+}
+
+.sku-card .sku-spec .spec-list {
+  width: 600rpx;
+  display: flex;
+  flex: 1;
+  flex-wrap: wrap;
+}
+
+.sku-card .sku-spec .spec-list span {
+  position: relative;
+  height: 46rpx;
+  background: #f6f6f6;
+  border: 2rpx solid #f6f6f6;
+  text-align: center;
+  line-height: 46rpx;
+  font-size: 26rpx;
+  margin: 0 8rpx 20rpx 0;
+  color: #666;
+  border-radius: 46rpx;
+  padding: 0 30rpx;
+  display: block;
+  white-space: nowrap;
+}
+
+.sku-card .sku-spec .spec-list .on {
+  border-color: #ffa49c;
+  color: #ff5344;
+  background: #fff;
+}
+
+.sku-card .sku-spec .spec-list .disabled {
+  color: #ccc;
+}
+
+.sku-card .sku-num-content {
+  width: 670rpx;
+  margin: 0 auto 52rpx;
+  display: flex;
+  align-items: center;
+}
+
+.sku-card .sku-num-content .title {
+  width: 80rpx;
+  font-size: 26rpx;
+  line-height: 50rpx;
+}
+
+.sku-card .sku-num-content .msg {
+  width: 420rpx;
+  color: #aaa;
+  font-size: 26rpx;
+  line-height: 50rpx;
+  text-align: right;
+}
+
+.sku-card .sku-num-content .even-num {
+  width: 420rpx;
+  color: #ff5344;
+  font-size: 26rpx;
+  line-height: 50rpx;
+  white-space: nowrap;
+  text-align: right;
+}
+
+.sku-card .sku-confirm {
+  width: 750rpx;
+  height: 96rpx;
+  background: linear-gradient(to right, #ff5041, #ff695c);
+  line-height: 96rpx;
+  text-align: center;
+  color: #fff;
+  font-size: 30rpx;
+  margin: 0 0 0 -40rpx;
+  padding: 0;
+  border-radius: 0;
+  font-weight: bold;
+}
+
+.sku-card button.sku-confirm::after{
+  border: 0;
+}
+
+.sku-card button[disabled].sku-confirm{
+  background: #f6f6f6;
+}
+
+.i-input-number {
+  color: #495060;
+  display: flex;
+  align-items: center;
+  position: relative;
+}
+
+.i-input-number view {
+  width: 48rpx;
+  height: 48rpx;
+  display: inline-block;
+  vertical-align: middle;
+}
+
+.i-input-number view image {
+  width: 48rpx;
+  height: 48rpx;
+}
+
+.i-input-number-minus {
+  border-right: none;
+  border-radius: 4rpx 0 0 4rpx;
+}
+
+.i-input-number-plus {
+  border-left: none;
+  border-radius: 0 4rpx 4rpx 0;
+}
+
+.i-input-number-text {
+  text-align: center;
+  height: 48rpx;
+  width: 66rpx;
+  font-size: 24rpx;
+  line-height: 48rpx;
+  color: #495060;
+  z-index: 0;
+}
+
+/**首页规格弹出end***/
+
+.mask {
+  width: 100%;
+  height: 100%;
+  background: #000;
+  position: fixed;
+  left: 0;
+  top: 0;
+  z-index: 99;
+  line-height: 80rpx;
+  opacity: 0.5;
+}
+
+/* 订单提醒begin */
+.order-notify {
+  position: fixed;
+  left: 0;
+  top: 100rpx;
+  z-index: 200;
+}
+
+/* 订单提醒end */
+.i-flex {
+  display: flex;
+}
+
+.i-flex-col {
+  display: flex;
+  flex-direction: column;
+}
+
+.i-flex-item {
+  flex: 1;
+}
+
+.i-flex-alc {
+  justify-content: center;
+  align-items: center;
+}
+
+.i-flex-spb {
+  justify-content: space-between;
+  align-items: center;
+}

+ 303 - 0
icon.wxss

@@ -0,0 +1,303 @@
+@font-face {
+  font-family: 'iconfont';  /* project id 896768 */
+  src: url('//at.alicdn.com/t/font_896768_15nrfzj4xv.eot');
+  src: url('//at.alicdn.com/t/font_896768_15nrfzj4xv.eot?#iefix') format('embedded-opentype'),
+  url('//at.alicdn.com/t/font_896768_15nrfzj4xv.woff') format('woff'),
+  url('//at.alicdn.com/t/font_896768_15nrfzj4xv.ttf') format('truetype'),
+  url('//at.alicdn.com/t/font_896768_15nrfzj4xv.svg#iconfont') format('svg');
+}
+
+.m-icon {
+  font-family: iconfont !important;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.m-icon-qiehuanqiyou:before {
+  content: "\e600";
+}
+
+.m-icon-qiehuanqizuo:before {
+  content: "\e601";
+}
+
+.m-icon-huanyipi:before {
+  content: "\e602";
+}
+
+.m-icon-xiaojiantou:before {
+  content: "\e603";
+}
+
+.m-icon-like-selected:before {
+  content: "\e604";
+}
+
+.m-icon-like:before {
+  content: "\e605";
+}
+
+.m-icon-chucuo:before {
+  content: "\e606";
+}
+
+.m-icon-jingshi:before {
+  content: "\e607";
+}
+
+.m-icon-zhengque:before {
+  content: "\e608";
+}
+
+.m-icon-fenlei:before {
+  content: "\e609";
+}
+
+.m-icon-saoyisao:before {
+  content: "\e60a";
+}
+
+.m-icon-fenxiang:before {
+  content: "\e60d";
+}
+
+.m-icon-huiyuanqia:before {
+  content: "\e60e";
+}
+
+.m-icon-huanyipi1:before {
+  content: "\e610";
+}
+
+.m-icon-zan:before {
+  content: "\e63e";
+}
+
+.m-icon-weixin:before {
+  content: "\e63b";
+}
+
+.m-icon-fanhui8:before {
+  content: "\e611";
+}
+
+.m-icon-fanhui7:before {
+  content: "\e612";
+}
+
+.m-icon-fanhui6:before {
+  content: "\e613";
+}
+
+.m-icon-fanhui5:before {
+  content: "\e614";
+}
+
+.m-icon-shoucangxuanzhong:before {
+  content: "\e615";
+}
+
+.m-icon-shoucang:before {
+  content: "\e616";
+}
+
+.m-icon-arrow-left:before {
+  content: "\e63c";
+}
+
+.m-icon-arrow-right:before {
+  content: "\e63d";
+}
+
+.m-icon-weixuanzhongyuanquan:before {
+  content: "\e617";
+}
+
+.m-icon-close:before {
+  content: "\e618";
+}
+
+.m-icon-shanchu:before {
+  content: "\e619";
+}
+
+.m-icon-daifukuan:before {
+  content: "\e61a";
+}
+
+.m-icon-paihang:before {
+  content: "\e60b";
+}
+
+.m-icon-guanyuwo:before {
+  content: "\e635";
+}
+
+.m-icon-zanxuanzhong:before {
+  content: "\e641";
+}
+
+.m-icon-biaoqing:before {
+  content: "\e61b";
+}
+
+.m-icon-tuikuan:before {
+  content: "\e61c";
+}
+
+.m-icon-message:before {
+  content: "\e61d";
+}
+
+.m-icon-fenxiang1:before {
+  content: "\e61e";
+}
+
+.m-icon-camera:before {
+  content: "\e61f";
+}
+
+.m-icon-camera2:before {
+  content: "\e620";
+}
+
+.m-icon-quanbudingdan:before {
+  content: "\e621";
+}
+
+.m-icon-shezhi:before {
+  content: "\e622";
+}
+
+.m-icon-xuanze:before {
+  content: "\e623";
+}
+
+.m-icon-daifahuo:before {
+  content: "\e624";
+}
+
+.m-icon-daifukuan:before {
+  content: "\e625";
+}
+
+.m-icon-daishouhuo:before {
+  content: "\e626";
+}
+
+.m-icon-daipingjia:before {
+  content: "\e627";
+}
+
+.m-icon-huiyuanka:before {
+  content: "\e628";
+}
+
+.m-icon-shopping-cart-selected:before, .m-icon-car-selected:before {
+  content: "\e629";
+}
+
+.m-icon-shopping-cart:before, .m-icon-car:before {
+  content: "\e62a";
+}
+
+.m-icon-shop-selected:before, .m-icon-index-selected:before {
+  content: "\e62b";
+}
+
+.m-icon-shop:before, .m-icon-index:before {
+  content: "\e62c";
+}
+
+.m-icon-my-selected:before, .m-shop-me-selected:before {
+  content: "\e62d";
+}
+
+.m-icon-my:before, .m-shop-me:before {
+  content: "\e62e";
+}
+
+.icon-datumoshi:before {
+  content: "\e62f";
+}
+
+.icon-31shangxin:before {
+  content: "\e636";
+}
+
+.m-icon-location:before {
+  content: "\e637";
+}
+
+.m-icon-erweima:before {
+  content: "\e630";
+}
+
+.m-icon-pinglun:before {
+  content: "\e631";
+}
+
+.m-icon-quanbushangpin:before {
+  content: "\e632";
+}
+
+.m-icon-fanhui1:before {
+  content: "\e63f";
+}
+
+.m-icon-fanhui2:before {
+  content: "\e640";
+}
+
+.m-icon-shouhoufuwu:before {
+  content: "\e633";
+}
+
+.m-icon-paihangbang:before {
+  content: "\e638";
+}
+
+.m-icon-message-38:before {
+  content: "\e634";
+}
+
+.m-icon-gouwudai:before {
+  content: "\e60f";
+}
+
+.m-icon-yifentuan:before, .m-icon-yifenzhong:before {
+  content: "\e639";
+}
+
+.m-icon-faxian:before {
+  content: "\e746";
+}
+
+.m-icon-xiangce:before {
+  content: "\e60c";
+}
+
+.m-icon-add_post:before {
+  content: "\e728";
+}
+
+.m-icon-choujiang:before, .m-icon-weibiaoti210:before {
+  content: "\e63a";
+}
+
+.m-icon-category:before {
+  content: "\e747";
+}
+
+.m-icon-search:before {
+  content: "\e642";
+}
+
+.m-icon-kanjia:before {
+  content: "\e67c";
+}
+
+.m-icon-wode-kj:before {
+  content: "\e644";
+}

+ 120 - 0
lionfish_comshop/components/auth/index.js

@@ -0,0 +1,120 @@
+var util = require('../../utils/util.js');
+// var location = require('../../utils/Location.js');
+var wcache = require('../../utils/wcache.js');
+var app = getApp();
+var flag = true;
+
+Component({
+  properties: {
+    needAuth: {
+      type: Boolean,
+      value: false
+    }
+  },
+  data: {
+    btnLoading: false,
+    isIpx: false,
+    auth_bg: '',
+    loaded: false
+  },
+  attached: function() {
+    this.getBg();
+    app.globalData.isIpx && this.setData({
+      isIpx: true
+    });
+  },
+  methods: {
+    getBg: function(){
+      let that = this;
+      let auth_bg = wcache.get('auth_bg', false);
+      if (!auth_bg){
+        app.util.request({
+          'url': 'entry/wxapp/index',
+          'data': {
+            controller: 'index.get_auth_bg'
+          },
+          dataType: 'json',
+          success: function (res) {
+            that.setData({ loaded: true })
+            if (res.data.code == 0) {
+              wcache.put('auth_bg', res.data.data, 600);
+              res.data.data && that.setData({ auth_bg: res.data.data })
+            }
+          }
+        })
+      } else {
+        that.setData({ auth_bg, loaded: true })
+      }
+    },
+    bindGetUserInfo: function (t) {
+      var that = this;
+      if (!this.data.btnLoading) {
+        var n = t.detail;
+        if(this.setData({btnLoading: true}), "getUserInfo:ok" === n.errMsg){
+          util.login_prosime().then(function(){
+            console.log("授权成功")
+            that.setData({ btnLoading: false });
+            wx.showToast({
+              title: '登录成功',
+              icon: 'success',
+              duration: 2000
+            })
+            that.triggerEvent("authSuccess");
+          }).catch(function(){
+            console.log('授权失败')
+          })
+        } else {
+          wx.showToast({
+            title: "授权失败,为了完整体验,获取更多优惠活动,需要您的授权。",
+            icon: "none"
+          });
+          this.setData({btnLoading: false});
+        }
+      }
+    },
+    bindGetUserInfoTwo: function (t) {
+      var that = this;
+      wx.showLoading({ title: '授权中' });
+      if (flag) {
+        flag = false;
+        var n = t.detail;
+        if ("getUserInfo:ok" === n.errMsg) {
+          util.login_prosime().then(function () {
+            console.log("授权成功")
+            wx.hideLoading();
+            flag = true;
+            wx.showToast({
+              title: '登录成功',
+              icon: 'success',
+              duration: 2000
+            })
+            that.triggerEvent("authSuccess");
+          }).catch(function () {
+            flag = true;
+            wx.hideLoading();
+            console.log('授权失败')
+          })
+        } else {
+          wx.hideLoading();
+          wx.showToast({
+            title: "授权失败,为了完整体验,获取更多优惠活动,需要您的授权。",
+            icon: "none"
+          });
+          flag = true;
+        }
+      }
+    }
+    // openSetting: function () {
+    //   location.openSetting().then(function (t) {
+    //     app.globalData.location = {
+    //       lat: t.latitude,
+    //       lng: t.longitude
+    //     };
+    //     app.globalData.community.communityId || wx.redirectTo({
+    //       url: "/lionfish_comshop/pages/position/communities"
+    //     });
+    //     app.globalData.canGetGPS = true;
+    //   });
+    // }
+  }
+});

+ 7 - 0
lionfish_comshop/components/auth/index.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-button": "../button/index",
+    "i-router-link": "../router-link/router-link"
+  }
+}

+ 14 - 0
lionfish_comshop/components/auth/index.wxml

@@ -0,0 +1,14 @@
+<view class="wrap" wx:if="{{needAuth&&loaded}}">
+  <button bindgetuserinfo="bindGetUserInfoTwo" openType="getUserInfo" class='auth_bg' wx:if="{{auth_bg}}" style='background: url({{auth_bg}}) no-repeat top center;background-size: cover;'></button>
+  <block wx:else>
+    <image class='auth-login' mode='widthFix' src="../../images/login.png"></image>
+    <view class='line1'>我们的小程序将获取您的以下权限:</view>
+    <view class='line2'>·获取您的公开信息(昵称和头像等)</view>
+    <view class='line3'>(如未授权,可能无法正常使用该小程序)</view>
+    <i-button bindgetuserinfo="bindGetUserInfo" iClass="confirm" loading="{{btnLoading}}" openType="getUserInfo" wx:if="canIUse">确认授权</i-button>
+    <view class="updateWx" wx:else>请升级微信版本</view>
+  </block>
+</view>
+<view class="container {{isIpx?'pb20 mb20':''}}" wx:else>
+  <slot></slot>
+</view>

+ 61 - 0
lionfish_comshop/components/auth/index.wxss

@@ -0,0 +1,61 @@
+.mb20 {
+  margin-bottom: 40rpx;
+}
+
+.wrap {
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.wrap .auth-login {
+  margin: 100rpx 0 50rpx;
+  width: 550rpx;
+}
+
+.auth_bg {
+  width: 100%;
+  height: 100%;
+  border-radius: 0;
+}
+
+.auth_bg::after {
+  border: 0;
+}
+
+.wrap .line1 {
+  line-height: 50rpx;
+  color: #333;
+  font-size: 30rpx;
+}
+
+.wrap .line2 {
+  line-height: 50rpx;
+  color: #999;
+  font-size: 26rpx;
+}
+
+.wrap .line3 {
+  line-height: 50rpx;
+  color: #333;
+  font-size: 24rpx;
+}
+
+.wrap .confirm {
+  width: 500rpx;
+  height: 90rpx;
+  line-height: 90rpx;
+  margin-top: 40rpx;
+  background: #1aad19;
+  color: #fff;
+  border-radius: 10rpx;
+  font-size: 34rpx;
+  margin-bottom: 40%;
+}
+
+.button-hover {
+  opacity: 0.8;
+}

+ 77 - 0
lionfish_comshop/components/button/index.js

@@ -0,0 +1,77 @@
+Component({
+  externalClasses: ["i-class"],
+  properties: {
+    type: {
+      type: String,
+      value: ""
+    },
+    inline: {
+      type: Boolean,
+      value: false
+    },
+    size: {
+      type: String,
+      value: ""
+    },
+    shape: {
+      type: String,
+      value: "square"
+    },
+    disabled: {
+      type: Boolean,
+      value: false
+    },
+    loading: {
+      type: Boolean,
+      value: false
+    },
+    long: {
+      type: Boolean,
+      value: false
+    },
+    openType: String,
+    appParameter: String,
+    hoverStopPropagation: Boolean,
+    hoverStartTime: {
+      type: Number,
+      value: 20
+    },
+    hoverStayTime: {
+      type: Number,
+      value: 140
+    },
+    lang: {
+      type: String,
+      value: "en"
+    },
+    sessionFrom: {
+      type: String,
+      value: ""
+    },
+    sendMessageTitle: String,
+    sendMessagePath: String,
+    sendMessageImg: String,
+    showMessageCard: Boolean
+  },
+  methods: {
+    handleTap: function () {
+      return !this.data.disabled && (!this.data.loading && void this.triggerEvent("click"));
+    },
+    bindgetuserinfo: function () {
+      var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
+      this.triggerEvent("getuserinfo", t);
+    },
+    bindcontact: function () {
+      var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
+      this.triggerEvent("contact", t);
+    },
+    bindgetphonenumber: function () {
+      var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
+      this.triggerEvent("getphonenumber", t);
+    },
+    binderror: function () {
+      var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
+      this.triggerEvent("error", t);
+    }
+  }
+});

+ 4 - 0
lionfish_comshop/components/button/index.json

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

+ 6 - 0
lionfish_comshop/components/button/index.wxml

@@ -0,0 +1,6 @@
+<button appParameter="{{appParameter}}" bindcontact="bindcontact" binderror="binderror" bindgetphonenumber="bindgetphonenumber" bindgetuserinfo="bindgetuserinfo" catchtap="handleTap" class="i-class i-btn {{long?'i-btn-long':''}} {{'i-btn-'+size}} {{'i-btn-'+type}} {{'i-btn-'+shape}} {{loading?'i-btn-loading':''}} {{disabled?'i-btn-disabled':''}} {{inline?'i-btn-inline':''}}"
+  hoverClass="i-btn-hover" hoverStartTime="{{hoverStartTime}}" hoverStayTime="{{hoverStayTime}}" hoverStopPropagation="{{hoverStopPropagation}}" openType="{{openType}}" plain="true" sendMessageImg="{{sendMessageImg}}" sendMessagePath="{{sendMessagePath}}"
+  sendMessageTitle="{{sendMessageTitle}}" sessionFrom="{{sessionFrom}}" showMessageCard="{{showMessageCard}}">
+  <view class="i-btn-loading-inner" wx:if="{{loading}}"></view>
+  <slot></slot>
+</button>

+ 127 - 0
lionfish_comshop/components/button/index.wxss

@@ -0,0 +1,127 @@
+.i-btn {
+  text-align: center;
+  vertical-align: middle;
+  touch-action: manipulation;
+  cursor: pointer;
+  background-image: none;
+  white-space: nowrap;
+  user-select: none;
+  font-size: 28rpx;
+  border-radius: 4rpx;
+  border: 0 !important;
+  position: relative;
+  text-decoration: none;
+  height: 88rpx;
+  line-height: 88rpx;
+  background: #f7f7f7;
+  color: #495060;
+  margin: 20rpx;
+}
+
+.i-btn-hover {
+  opacity: 0.7;
+}
+
+.i-btn-long {
+  border-radius: 0;
+  margin: 0;
+  box-shadow: none;
+}
+
+.i-btn-large {
+  height: 96rpx;
+  line-height: 96rpx;
+}
+
+.i-btn-small {
+  height: 80rpx;
+  line-height: 80rpx;
+}
+
+.i-btn-primary {
+  color: #fff;
+  background: #2d8cf0;
+}
+
+.i-btn-ghost {
+  background: #fff;
+  color: #495060;
+}
+
+.i-btn-success {
+  color: #fff;
+  background: #19be6b;
+}
+
+.i-btn-warning {
+  color: #fff;
+  background: #f90;
+}
+
+.i-btn-error {
+  color: #fff;
+  background: #ed3f14;
+}
+
+.i-btn-info {
+  color: #fff;
+  background: #2db7f5;
+}
+
+.i-btn-circle {
+  border-radius: 88rpx;
+}
+
+.i-btn-large.i-btn-circle {
+  border-radius: 96rpx;
+}
+
+.i-btn-small.i-btn-circle {
+  border-radius: 80rpx;
+}
+
+.i-btn-loading {
+  opacity: 0.6;
+}
+
+.i-btn-loading-inner {
+  display: inline-block;
+  margin-right: 24rpx;
+  vertical-align: middle;
+  width: 28rpx;
+  height: 28rpx;
+  background: 0 0;
+  border: 4rpx solid #e9eaec;
+  border-color: #e9eaec #e9eaec #e9eaec #2d8cf0;
+  border-radius: 50%;
+  animation: btn-spin 0.6s linear;
+  animation-iteration-count: infinite;
+}
+
+.i-btn-disabled {
+  opacity: 0.9;
+}
+
+.i-btn-inline {
+  display: inline-block;
+}
+
+@-webkit-keyframes btn-spin {
+  0% {
+    transform: rotate(0);
+  }
+
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+@keyframes btn-spin {
+  0% {
+    transform: rotate(0);
+  }
+
+  100% {
+    transform: rotate(360deg);
+  }
+}

+ 7 - 0
lionfish_comshop/components/card/index.js

@@ -0,0 +1,7 @@
+// lionfish_comshop/components/cart/index.js
+Component({
+  options: {
+    multipleSlots: true
+  },
+  externalClasses: ["i-class", "i-card-header", "i-card-body", "i-card-footer"]
+})

+ 4 - 0
lionfish_comshop/components/card/index.json

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

+ 11 - 0
lionfish_comshop/components/card/index.wxml

@@ -0,0 +1,11 @@
+<view class="i-class i-card">
+  <view class="i-card-header">
+    <slot name="header"></slot>
+  </view>
+  <view class="i-card-body">
+    <slot name="content"></slot>
+  </view>
+  <view class="i-card-footer">
+    <slot name="footer"></slot>
+  </view>
+</view>

+ 9 - 0
lionfish_comshop/components/card/index.wxss

@@ -0,0 +1,9 @@
+.i-card {
+  width: 710rpx;
+  border-radius: 20rpx;
+  background: #fff;
+  box-shadow: 0 0 40rpx 0 rgba(0, 0, 0, 0.05);
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+}

+ 103 - 0
lionfish_comshop/components/choose-image/index.js

@@ -0,0 +1,103 @@
+function e(e, t, a) {
+  return t in e ? Object.defineProperty(e, t, {
+    value: a,
+    enumerable: !0,
+    configurable: !0,
+    writable: !0
+  }) : e[t] = a, e;
+}
+
+var t = [],
+  a = 0,
+  r = [];
+
+var app = getApp();
+
+Component({
+  properties: {
+    imgMax: {
+      type: Number,
+      value: 0
+    },
+    token: String,
+    key: {
+      type: String,
+      value: "wx-upload"
+    }
+  },
+  data: {
+    imgGroup: [],
+    progressList: []
+  },
+  methods: {
+    addImg: function() {
+      var s = this,
+        i = this.data.imgGroup;
+      wx.chooseImage({
+        count: this.data.imgMax - i.length,
+        success: function(n) {
+          s.triggerEvent("on-chooseImage"), (i = i.concat(n.tempFilePaths)).length > s.data.imgMax && i.splice(s.data.imgMax),
+            s.setData({
+              imgGroup: i
+            });
+          var o = n.tempFilePaths.length;
+          a = i.length;
+          for (var g = 0; g < n.tempFilePaths.length; g++) ! function(i) {
+            var g = n.tempFilePaths[i].split(".")[n.tempFilePaths[i].split(".").length - 1],
+              l = new Date().getTime(),
+              p = Math.round(1e6 * Math.random());
+            r[i + a - o] = wx.uploadFile({
+              url: app.util.url('entry/wxapp/index', {
+                'm': 'lionfish_comshop',
+                'controller': 'goods.doPageUpload'
+              }),
+              filePath: n.tempFilePaths[i],
+              name: "upfile",
+              header: {
+                "Content-Type": "multipart/form-data"
+              },
+              formData: {
+                token: s.data.token,
+                key: s.data.key + "-" + l + "-" + p + "." + g
+              },
+              success: function(r) {
+                t[i + a - o] = JSON.parse(r.data).image_o, s.setData(e({}, "progressList[" + (i + a - o) + "]", 100)),
+                  s.triggerEvent("on-changeImage", {
+                    value: t,
+                    len: a
+                  });
+              }
+            }), r[i + a - o].onProgressUpdate(function(t) {
+              var r = t.progress;
+              s.setData(e({}, "progressList[" + (i + a - o) + "]", r));
+            });
+          }(g);
+        }
+      });
+    },
+    remove: function(e) {
+      var s = e.currentTarget.dataset.idx,
+        i = this.data.imgGroup,
+        n = this.data.progressList;
+      n[s] < 100 && r[s].abort(), i.splice(s, 1), r.splice(s, 1), n.splice(s, 1), t.splice(s, 1),
+        a = i.length, this.setData({
+          imgGroup: i,
+          progressList: n
+        }), this.triggerEvent("on-changeImage", {
+          value: t,
+          len: a
+        });
+    },
+    bigImg: function(e) {
+      var t = e.currentTarget.dataset.src,
+        a = e.currentTarget.dataset.list;
+      wx.previewImage({
+        current: t,
+        urls: a
+      });
+    }
+  },
+  detached: function() {
+    console.log("detached"), t = [], a = 0, r = [];
+  }
+});

+ 4 - 0
lionfish_comshop/components/choose-image/index.json

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

+ 15 - 0
lionfish_comshop/components/choose-image/index.wxml

@@ -0,0 +1,15 @@
+<view class="img-group">
+  <view class="img-item" wx:if="{{imgGroup.length}}" wx:for="{{imgGroup}}" wx:key="{{index}}">
+    <view bindtap="remove" class="close" data-idx="{{index}}">
+      <image class='closeImg' src="../../images/img-close.png"></image>
+    </view>
+    <image bindtap="bigImg" data-list="{{imgGroup}}" data-src="{{item}}" mode="aspectFill" src="{{item}}"></image>
+    <view class="progress {{progressList[index]===100?'hide-progress':''}}">
+      <span style="width: {{progressList[index]}}%;"></span>
+    </view>
+  </view>
+  <view bindtap="addImg" class="img-item img-add" wx:if="{{imgGroup.length<imgMax}}">
+    <image class="cameraImg" src="../../images/icon-camera.png"></image>
+    <text>{{imgGroup.length?imgGroup.length+'/'+imgMax:'上传图片'}}</text>
+  </view>
+</view>

+ 80 - 0
lionfish_comshop/components/choose-image/index.wxss

@@ -0,0 +1,80 @@
+.img-group {
+  display: flex;
+  flex-wrap: wrap;
+  font-size: 24rpx;
+  margin-top: 30rpx;
+}
+
+.img-group .img-item {
+  margin: 0 6rpx;
+  width: 150rpx;
+  height: 150rpx;
+  position: relative;
+  box-sizing: border-box;
+}
+
+.img-group .img-item .progress {
+  position: absolute;
+  left: 16rpx;
+  bottom: 20rpx;
+  width: 120rpx;
+  height: 16rpx;
+  border-radius: 20rpx;
+  border: 2rpx solid #ddd;
+  display: flex;
+  align-items: center;
+}
+
+.img-group .img-item .progress span {
+  height: 8rpx;
+  width: 0;
+  max-width: 112rpx;
+  border-radius: 12rpx;
+  position: absolute;
+  left: 4rpx;
+  top: 4rpx;
+  background: #f5f5f5;
+}
+
+.img-group .img-item .hide-progress {
+  opacity: 0;
+}
+
+.img-group .img-item .close {
+  width: 32rpx;
+  height: 32rpx;
+  position: absolute;
+  right: -8rpx;
+  top: -8rpx;
+}
+
+/* .img-group .img-item image {
+  height: 100%;
+  width: 100%;
+} */
+
+.img-group .img-item .closeImg {
+  height: 100%;
+  width: 100%;
+  font-size: 40rpx;
+  color: #a0a0a0;
+}
+
+.img-group .img-add {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  border: 2rpx dashed #dedede;
+  color: #bcbcbc;
+}
+
+.img-group .img-add .cameraImg {
+  width: 44rpx;
+  height: 44rpx;
+  color: #cdcdcd;
+  margin-bottom: 8rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}

+ 103 - 0
lionfish_comshop/components/chooseImage/index.js

@@ -0,0 +1,103 @@
+function e(e, t, a) {
+  return t in e ? Object.defineProperty(e, t, {
+    value: a,
+    enumerable: !0,
+    configurable: !0,
+    writable: !0
+  }) : e[t] = a, e;
+}
+
+var t = [],
+  a = 0,
+  r = [];
+
+var app = getApp();
+
+Component({
+  properties: {
+    imgMax: {
+      type: Number,
+      value: 0
+    },
+    token: String,
+    key: {
+      type: String,
+      value: "wx-upload"
+    }
+  },
+  data: {
+    imgGroup: [],
+    progressList: []
+  },
+  methods: {
+    addImg: function() {
+      var s = this,
+        i = this.data.imgGroup;
+      wx.chooseImage({
+        count: this.data.imgMax - i.length,
+        success: function(n) {
+          s.triggerEvent("on-chooseImage"), (i = i.concat(n.tempFilePaths)).length > s.data.imgMax && i.splice(s.data.imgMax),
+            s.setData({
+              imgGroup: i
+            });
+          var o = n.tempFilePaths.length;
+          a = i.length;
+          for (var g = 0; g < n.tempFilePaths.length; g++) ! function(i) {
+            var g = n.tempFilePaths[i].split(".")[n.tempFilePaths[i].split(".").length - 1],
+              l = new Date().getTime(),
+              p = Math.round(1e6 * Math.random());
+            r[i + a - o] = wx.uploadFile({
+              url: app.util.url('entry/wxapp/index', {
+                'm': 'lionfish_comshop',
+                'controller': 'goods.doPageUpload'
+              }),
+              filePath: n.tempFilePaths[i],
+              name: "upfile",
+              header: {
+                "Content-Type": "multipart/form-data"
+              },
+              formData: {
+                token: s.data.token,
+                key: s.data.key + "-" + l + "-" + p + "." + g
+              },
+              success: function(r) {
+                t[i + a - o] = JSON.parse(r.data).image_o, s.setData(e({}, "progressList[" + (i + a - o) + "]", 100)),
+                  s.triggerEvent("on-changeImage", {
+                    value: t,
+                    len: a
+                  });
+              }
+            }), r[i + a - o].onProgressUpdate(function(t) {
+              var r = t.progress;
+              s.setData(e({}, "progressList[" + (i + a - o) + "]", r));
+            });
+          }(g);
+        }
+      });
+    },
+    remove: function(e) {
+      var s = e.currentTarget.dataset.idx,
+        i = this.data.imgGroup,
+        n = this.data.progressList;
+      n[s] < 100 && r[s].abort(), i.splice(s, 1), r.splice(s, 1), n.splice(s, 1), t.splice(s, 1),
+        a = i.length, this.setData({
+          imgGroup: i,
+          progressList: n
+        }), this.triggerEvent("on-changeImage", {
+          value: t,
+          len: a
+        });
+    },
+    bigImg: function(e) {
+      var t = e.currentTarget.dataset.src,
+        a = e.currentTarget.dataset.list;
+      wx.previewImage({
+        current: t,
+        urls: a
+      });
+    }
+  },
+  detached: function() {
+    console.log("detached"), t = [], a = 0, r = [];
+  }
+});

+ 4 - 0
lionfish_comshop/components/chooseImage/index.json

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

+ 15 - 0
lionfish_comshop/components/chooseImage/index.wxml

@@ -0,0 +1,15 @@
+<view class="img-group">
+  <view class="img-item" wx:if="{{imgGroup.length}}" wx:for="{{imgGroup}}" wx:key="{{index}}">
+    <view bindtap="remove" class="close" data-idx="{{index}}">
+      <image class='closeImg' src="../../images/img-close.png"></image>
+    </view>
+    <image bindtap="bigImg" data-list="{{imgGroup}}" data-src="{{item}}" mode="aspectFill" src="{{item}}"></image>
+    <view class="progress {{progressList[index]===100?'hide-progress':''}}">
+      <span style="width: {{progressList[index]}}%;"></span>
+    </view>
+  </view>
+  <view bindtap="addImg" class="img-item img-add" wx:if="{{imgGroup.length<imgMax}}">
+    <image class="cameraImg" src="../../images/icon-camera.png"></image>
+    <text>{{imgGroup.length?imgGroup.length+'/'+imgMax:'上传图片'}}</text>
+  </view>
+</view>

+ 75 - 0
lionfish_comshop/components/chooseImage/index.wxss

@@ -0,0 +1,75 @@
+.img-group {
+  display: flex;
+  flex-wrap: wrap;
+  font-size: 24rpx;
+  margin-top: 30rpx;
+}
+
+.img-group .img-item {
+  margin: 0 6rpx;
+  width: 150rpx;
+  height: 150rpx;
+  position: relative;
+  box-sizing: border-box;
+}
+
+.img-group .img-item .progress {
+  position: absolute;
+  left: 16rpx;
+  bottom: 20rpx;
+  width: 120rpx;
+  height: 16rpx;
+  border-radius: 20rpx;
+  border: 2rpx solid #ddd;
+  display: flex;
+  align-items: center;
+}
+
+.img-group .img-item .progress span {
+  height: 8rpx;
+  width: 0;
+  max-width: 112rpx;
+  border-radius: 12rpx;
+  position: absolute;
+  left: 4rpx;
+  top: 4rpx;
+  background: #f5f5f5;
+}
+
+.img-group .img-item .hide-progress {
+  opacity: 0;
+}
+
+.img-group .img-item .close {
+  width: 32rpx;
+  height: 32rpx;
+  position: absolute;
+  right: -8rpx;
+  top: -8rpx;
+}
+
+.img-group .img-item .closeImg {
+  height: 100%;
+  width: 100%;
+  font-size: 40rpx;
+  color: #a0a0a0;
+}
+
+.img-group .img-add {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  border: 2rpx dashed #dedede;
+  color: #bcbcbc;
+}
+
+.img-group .img-add .cameraImg {
+  width: 44rpx;
+  height: 44rpx;
+  color: #cdcdcd;
+  margin-bottom: 8rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}

+ 43 - 0
lionfish_comshop/components/comming-spu-disabled/index.js

@@ -0,0 +1,43 @@
+var e = require("../../utils/timeFormat");
+
+Component({
+  properties: {
+    spuItem: {
+      type: Object,
+      value: {
+        spuImage: "",
+        spuName: "",
+        endTime: "",
+        beginTime: "",
+        actPrice: [],
+        marketPrice: [],
+        desc: "新鲜自然 唇齿留香",
+        surplusNum: 0,
+        soldNum: 0,
+        limitOrderNum: 0,
+        limitMemberNum: 0,
+        serverTime: 0,
+        skuImage: ""
+      },
+      observer: function (m) {
+        if (m) {
+          var i = (0, e.formatTime)(new Date(1 * m.endTime)), r = (0, e.getBeginTime)(m.beginTime, m.serverTime), t = (0,
+            e.formatNumber)(i.month) + "月" + (0, e.formatNumber)(i.day) + "日 " + (0, e.formatNumber)(i.hour) + ":" + (0,
+              e.formatNumber)(i.minute);
+          this.setData({
+            formatBeginTime: r,
+            endTime: t
+          });
+        }
+      }
+    },
+    isPast: {
+      type: Boolean,
+      value: false
+    }
+  },
+  data: {
+    formatBeginTime: "",
+    endTime: ""
+  }
+});

+ 7 - 0
lionfish_comshop/components/comming-spu-disabled/index.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-img": "../img/index",
+    "i-router-link": "../router-link/router-link"
+  }
+}

+ 20 - 0
lionfish_comshop/components/comming-spu-disabled/index.wxml

@@ -0,0 +1,20 @@
+<navigator class="comming-spu-content" url="/lionfish_comshop/pages/goods/goodsDetail?id={{spuItem.actId}}">
+  <i-img class="spu-img-content" defaultImage="../../images/index-comming-goods-bitmap.png" height="120" iClass="spu-img" loadImage="{{spuItem.skuImage}}" width="120"></i-img>
+  <view class="spu-name">
+    <text class='span'>{{spuItem.spuName}}</text>
+  </view>
+  <view class="spu-desc" wx:if="{{isPast}}">结束时间 {{endTime}}</view>
+  <view class="spu-desc" wx:else>{{formatBeginTime}}{{spuItem.limitOrderNum>-1||spuItem.limitMemberNum>-1?' | 限购':''}}</view>
+  <view class="spu-price">
+    <view class="sale-price">
+      <text class='span'>¥{{spuItem.actPrice[0]}}</text>.{{spuItem.actPrice[1]}}
+    </view>
+    <view class="market-price">¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}}</view>
+  </view>
+  <view class="mask" wx:if="{{isPast}}">
+    <view class="toast">团购已结束</view>
+  </view>
+  <view class="icon-shop" wx:if="{{isPast}}">
+    <image class='img' src="../../images/icon-add-shopCart-disabled.png"></image>
+  </view>
+</navigator>

+ 113 - 0
lionfish_comshop/components/comming-spu-disabled/index.wxss

@@ -0,0 +1,113 @@
+.icon-shop {
+  position: absolute;
+  right: 20rpx;
+  bottom: 20rpx;
+  width: 54rpx;
+  height: 54rpx;
+}
+
+.icon-shop .img {
+  width: 54rpx;
+  height: 54rpx;
+}
+
+.mask {
+  width: 348rpx;
+  height: 240rpx;
+  position: absolute;
+  left: 0;
+  top: 30rpx;
+  background: rgba(255, 255, 255, 0.5);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.mask .toast {
+  width: 196rpx;
+  height: 60rpx;
+  background: rgba(0, 0, 0, 0.5);
+  border-radius: 10rpx;
+  text-align: center;
+  line-height: 60rpx;
+  color: #fff;
+  font-weight: bold;
+  font-size: 28rpx;
+}
+
+.spu-img {
+  width: 240rpx;
+  height: 240rpx;
+  border-radius: 10rpx;
+}
+
+.comming-spu-content {
+  width: 348rpx;
+  height: 452rpx;
+  border-radius: 20rpx;
+  background: #fff;
+  box-sizing: border-box;
+  padding: 30rpx 26rpx 30rpx 26rpx;
+  box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05);
+  position: relative;
+}
+
+.comming-spu-content .spu-img-content {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 296rpx;
+  height: 240rpx;
+  margin: 0 auto 34rpx;
+}
+
+.comming-spu-content .spu-name {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  height: 36rpx;
+  color: #444;
+  margin-bottom: 16rpx;
+  font-weight: 500;
+  position: relative;
+}
+
+.comming-spu-content .spu-name .span {
+  width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  position: absolute;
+  left: 0;
+  top: -4rpx;
+  line-height: 36rpx;
+}
+
+.comming-spu-content .spu-desc {
+  color: #ffab20;
+  font-size: 24rpx;
+  line-height: 24rpx;
+  margin-bottom: 14rpx;
+}
+
+.comming-spu-content .spu-price {
+  display: flex;
+  align-items: flex-end;
+  font-size: 20rpx;
+}
+
+.comming-spu-content .spu-price .sale-price {
+  color: #ff5344;
+  margin-right: 8rpx;
+}
+
+.comming-spu-content .spu-price .sale-price .span {
+  font-size: 40rpx;
+  line-height: 40rpx;
+  margin-left: 4rpx;
+  font-weight: 500;
+}
+
+.comming-spu-content .spu-price .market-price {
+  text-decoration: line-through;
+  color: #999;
+}

+ 53 - 0
lionfish_comshop/components/comming-spu/index.js

@@ -0,0 +1,53 @@
+var e = require("../../utils/timeFormat");
+
+Component({
+  properties: {
+    spuItem: {
+      type: Object,
+      value: {
+        spuId: "",
+        skuId: "",
+        spuImage: "",
+        spuName: "",
+        endTime: "",
+        beginTime: "",
+        actPrice: ["", ""],
+        marketPrice: ["", ""],
+        spuCanBuyNum: "",
+        soldNum: "",
+        actId: "",
+        limitMemberNum: "",
+        limitOrderNum: "",
+        serverTime: "",
+        isLimit: !1,
+        skuList: [],
+        spuDescribe: "",
+        promotionDTO: {}
+      },
+      observer: function (i) {
+        if (i) {
+          var t = (0, e.getBeginTime)(i.beginTime, i.serverTime);
+          this.setData({
+            formatBeginTime: t
+          });
+        }
+      }
+    },
+    isPast: {
+      type: Boolean,
+      value: false
+    }
+  },
+  data: {
+    disabled: false,
+    formatBeginTime: ""
+  },
+  methods: {
+    openSku: function () {
+      this.triggerEvent("openSku", {
+        skuList: this.data.spuItem.skuList,
+        promotionDTO: this.data.spuItem.promotionDTO
+      });
+    }
+  }
+});

+ 9 - 0
lionfish_comshop/components/comming-spu/index.json

@@ -0,0 +1,9 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-button": "../button/index",
+    "i-img": "../img/index",
+    "i-count-down": "../list-count-down/index",
+    "i-router-link": "../router-link/index"
+  }
+}

+ 26 - 0
lionfish_comshop/components/comming-spu/index.wxml

@@ -0,0 +1,26 @@
+<i-router-link routerClass="spu-content {{disabled?'disabled':''}}" url="/lionfish_comshop/pages/goods/goodsDetail?skuId={{spuItem.skuId}}&spuId={{spuItem.spuId}}&actId={{spuItem.actId}}">
+  <view class="item-top">
+    <i-img defaultImage="../../images/index-goods-bitmap.png" height="176" iClass="img-class" loadImage="{{spuItem.spuImage}}" width="355"></i-img>
+    <view class="act-end" wx:if="{{isPast}}">团购已结束</view>
+    <view class="act-end" wx:if="{{spuItem.spuCanBuyNum===0}}">已售罄</view>
+  </view>
+  <view class="item-bottom">
+    <view class="spu-title">{{spuItem.spuName}}</view>
+    <view class="spu-desc">
+      <em wx:if="{{spuItem.spuDescribe}}">{{spuItem.spuDescribe}}</em>
+      <view class="tag" hidden="{{spuItem.isLimit&&index>1}}" wx:if="{{spuItem.promotionDTO}}" wx:for="{{spuItem.promotionDTO.rules}}" wx:key="{{index}}">{{spuItem.promotionDTO.promotionType===2?'每':''}}满{{item.targetAmount/100}}减{{item.discountAmount/100}}</view>
+      <view class="tag tag-green" wx:if="{{spuItem.isLimit}}">限购</view>
+    </view>
+    <view class="spu-price">
+      <view class="sale-price">
+        ¥
+        <span>{{spuItem.actPrice[0]}}</span>.{{spuItem.actPrice[1]}}
+      </view>
+      <view class="market-price">¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}}</view>
+      <view class="spu-count" wx:if="{{!isPast}}">还剩{{spuItem.spuCanBuyNum}}件 / 已售{{spuItem.soldNum}}件</view>
+      <view class="spu-count" wx:else>已售{{spuItem.soldNum}}件</view>
+    </view>
+    <image class="add-cart" src="../../images/icon-spu-add-disabled.png"></image>
+  </view>
+  <view class="count-down-content">{{formatBeginTime}}</view>
+</i-router-link>

+ 166 - 0
lionfish_comshop/components/comming-spu/index.wxss

@@ -0,0 +1,166 @@
+.img-class {
+  width: 710rpx;
+  height: 352rpx;
+}
+
+.spu-content {
+  background: #fff;
+  width: 710rpx;
+  border-radius: 20rpx;
+  overflow: hidden;
+  position: relative;
+  box-shadow: 0 10rpx 60rpx rgba(0, 0, 0, 0.1);
+  margin: 0 auto 40rpx;
+}
+
+.spu-content .count-down-content {
+  width: 290rpx;
+  height: 60rpx;
+  border-radius: 0 0 40rpx 40rpx;
+  background: linear-gradient(to right, #ff5041, #ff994b);
+  position: absolute;
+  left: 210rpx;
+  top: 0;
+  font-size: 26rpx;
+  color: #fff;
+  text-align: center;
+  line-height: 60rpx;
+  font-weight: bold;
+}
+
+.spu-content .count-down-content .count-down {
+  display: inline-block;
+  font-size: 26rpx;
+  font-weight: bold;
+}
+
+.spu-content .count-down-content .count-down em {
+  margin: 0;
+}
+
+.spu-content.disabled {
+  opacity: 0.6;
+}
+
+.spu-content .item-top {
+  width: 710rpx;
+  height: 352rpx;
+  position: relative;
+}
+
+.spu-content .item-top .act-end {
+  position: absolute;
+  width: 216rpx;
+  height: 88rpx;
+  border-radius: 10rpx;
+  background: rgba(0, 0, 0, 0.5);
+  color: #fff;
+  font-size: 32rpx;
+  text-align: center;
+  line-height: 88rpx;
+  left: 248rpx;
+  top: 136rpx;
+}
+
+.spu-content .item-bottom {
+  box-sizing: border-box;
+  padding: 24rpx 30rpx;
+  position: relative;
+}
+
+.spu-content .item-bottom .spu-title {
+  color: #444;
+  font-size: 32rpx;
+  line-height: 36rpx;
+  margin-bottom: 16rpx;
+  font-weight: 500;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.spu-content .item-bottom .spu-desc {
+  font-size: 24rpx;
+  line-height: 24rpx;
+  color: #444;
+  display: flex;
+  align-items: center;
+}
+
+.spu-content .item-bottom .spu-desc em {
+  margin-right: 20rpx;
+  white-space: nowrap;
+}
+
+.spu-content .item-bottom .spu-desc .tag {
+  border: 1rpx solid #ff5344;
+  color: #ff5344;
+  margin-right: 8rpx;
+  font-size: 18rpx;
+  line-height: 24rpx;
+  padding: 0 8rpx;
+  border-radius: 20rpx;
+  white-space: nowrap;
+  display: flex;
+  align-items: center;
+  vertical-align: middle;
+}
+
+.spu-content .item-bottom .spu-desc .tag.hidden {
+  display: none;
+}
+
+.spu-content .item-bottom .spu-desc .tag-green {
+  color: #4ab089;
+  border-color: #4ab089;
+}
+
+.spu-content .item-bottom .spu-price {
+  display: flex;
+  align-items: flex-end;
+  font-size: 22rpx;
+  line-height: 22rpx;
+  overflow: hidden;
+  margin-top: 10rpx;
+}
+
+.spu-content .item-bottom .spu-price .sale-price {
+  color: #ff5344;
+  margin-right: 8rpx;
+  margin-bottom: -4rpx;
+}
+
+.spu-content .item-bottom .spu-price .sale-price span {
+  font-size: 56rpx;
+  line-height: 56rpx;
+  margin-left: 8rpx;
+  font-weight: bold;
+}
+
+.spu-content .item-bottom .spu-price .market-price {
+  text-decoration: line-through;
+  color: #999;
+  margin-right: 30rpx;
+}
+
+.spu-content .item-bottom .spu-count {
+  font-size: 22rpx;
+  line-height: 22rpx;
+  color: #999;
+}
+
+.spu-content .item-bottom .add-cart {
+  width: 68rpx;
+  height: 68rpx;
+  padding: 0;
+  margin: 0;
+  position: absolute;
+  right: 24rpx;
+  bottom: 16rpx;
+}
+
+.spu-content .item-bottom .add-cart image {
+  width: 68rpx;
+  height: 68rpx;
+  display: block;
+}

+ 60 - 0
lionfish_comshop/components/community-item/index.js

@@ -0,0 +1,60 @@
+var utils = require("../../utils/index");
+var location = require("../../utils/Location");
+var app = getApp();
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    item: {
+      type: Object,
+      value: {}
+    },
+    city: Object,
+    isOld: {
+      type: Boolean,
+      value: false
+    },
+    groupInfo: {
+      type: Object,
+      value: {
+        group_name: '社区',
+        owner_name: '团长'
+      }
+    },
+    hiddenDetails: {
+      type: Number,
+      value: 0
+    }
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    chooseCommunity: function (event) {
+      var community = event.currentTarget.dataset.val;
+      if ("火星社区" !== community.communityName || community.communityId) {
+        var disUserHeadImg = community.disUserHeadImg || community.headImg || "", 
+          disUserName = community.disUserName || community.realName || "", 
+          data = {
+            communityId: community.communityId,
+            communityName: community.communityName,
+            disUserName: disUserName,
+            disUserHeadImg: disUserHeadImg,
+            communityAddress: community.communityAddress,
+            distance: community.distance,
+            fullAddress: community.fullAddress || community.communityAddress
+          }, 
+          city = this.data.city;
+
+        (0, utils.changeCommunity)(data, city);
+      } else {
+        location.openSetting(app).then(function () {
+          location.checkGPS(app, function () { });
+        });
+      }
+    }
+  }
+})

+ 4 - 0
lionfish_comshop/components/community-item/index.json

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

+ 15 - 0
lionfish_comshop/components/community-item/index.wxml

@@ -0,0 +1,15 @@
+<view bindtap="chooseCommunity" class="community-item i-class" data-val="{{item}}">
+ <image class="group-head" src="{{item.headImg||item.disUserHeadImg}}" wx:if="{{item.headImg||item.disUserHeadImg}}"></image>
+  <image class="group-head" src="../../images/head-bitmap.png" wx:else></image>
+  <view class="item-center">
+    <view class="community-title">
+      <text class='span'>{{item.communityName}}</text>
+      <text class='em' wx:if="{{!isOld&&item.distance}}">距离{{item.distance}}</text>
+    </view>
+    <view class="group-master">
+      {{groupInfo.owner_name}}:{{item.realName||item.disUserName}}
+      <image class="right-arrow" src="../../images/community-right-arrow.png"></image>
+    </view>
+    <view class="community-address" wx:if="{{hiddenDetails==0}}">{{item.fullAddress||item.communityAddress}}</view>
+  </view>
+</view>

+ 66 - 0
lionfish_comshop/components/community-item/index.wxss

@@ -0,0 +1,66 @@
+.community-item {
+  box-sizing: border-box;
+  display: flex;
+  padding: 60rpx 30rpx;
+}
+
+.community-item .group-head {
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 80rpx;
+  margin-right: 20rpx;
+}
+
+.community-item .community-title {
+  font-size: 32rpx;
+  line-height: 32rpx;
+  height: 32rpx;
+  width: 520rpx;
+  margin-bottom: 20rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: flex-end;
+}
+
+.community-item .community-title .span {
+  color: #444;
+  font-weight: 500;
+}
+
+.community-item .community-title .em {
+  color: #ff5344;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  white-space: nowrap;
+}
+
+.community-item .community-address {
+  font-size: 26rpx;
+  line-height: 34rpx;
+  color: #666;
+  width: 520rpx;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+  text-overflow: initial;
+  white-space: normal;
+  /* margin-bottom: 6rpx; */
+}
+
+.community-item .group-master {
+  width: 560rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  color: #aaa;
+  position: relative;
+  margin-bottom: 6rpx;
+}
+
+.community-item .group-master .right-arrow {
+  position: absolute;
+  right: 0;
+  top: 0;
+  width: 14rpx;
+  height: 28rpx;
+}

+ 76 - 0
lionfish_comshop/components/count-down/index.js

@@ -0,0 +1,76 @@
+var t = require("../../utils/timeFormat");
+
+Component({
+  properties: {
+    target: {
+      type: String,
+      observer: function(t) {
+        this.init(t);
+      }
+    },
+    showDay: Boolean,
+    beginTime: String,
+    callback: String,
+    format: Array,
+    clearTimer: Boolean
+  },
+  externalClasses: ["countdown-class", "item-class"],
+  data: {
+    time: {
+      day: "0",
+      second: "00",
+      minute: "00",
+      hour: "00"
+    },
+    resultFormat: [],
+    changeFormat: false,
+    timeStamp: 0,
+    timer: null
+  },
+  methods: {
+    init: function(t) {
+      var e = {
+        day: "0",
+        second: "00",
+        minute: "00",
+        hour: "00"
+      };
+      if (t - new Date().getTime() <= 0) return this.setData({
+        time: e
+      }), void this.triggerEvent("callback");
+      this.interval(t);
+    },
+    interval: function(e) {
+      var a = this,
+        i = e - new Date().getTime();
+      if (i <= 0) return clearTimeout(this.data.timer), this.triggerEvent("callback"),
+        void this.setData({
+          time: {
+            day: "0",
+            second: "00",
+            minute: "00",
+            hour: "00"
+          }
+        });
+      var r = Math.ceil(i / 1000),
+        n = parseInt(r / 86400),
+        o = r % 86400,
+        s = (0, t.formatNumber)(parseInt(o / 3600));
+      o %= 3600;
+      var m = {
+        day: n,
+        hour: s,
+        minute: (0, t.formatNumber)(parseInt(o / 60)),
+        second: (0, t.formatNumber)(o % 60)
+      };
+      this.setData({
+        time: m
+      }), this.data.timer = setTimeout(function() {
+        a.interval(e);
+      }, 1000);
+    }
+  },
+  detached: function() {
+    clearTimeout(this.data.timer);
+  }
+});

+ 6 - 0
lionfish_comshop/components/count-down/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "routerLink": "../router-link/router-link"
+  }
+}

+ 7 - 0
lionfish_comshop/components/count-down/index.wxml

@@ -0,0 +1,7 @@
+<view class="countdown-class i-count-down">
+  <slot></slot>
+  <em wx:if="{{showDay&&time.day>0}}">{{time.day}}天</em>
+  <text class="item-class">{{time.hour}}</text>:
+  <text class="item-class">{{time.minute}}</text>:
+  <text class="item-class">{{time.second}}</text>
+</view>

+ 12 - 0
lionfish_comshop/components/count-down/index.wxss

@@ -0,0 +1,12 @@
+.i-count-down {
+  white-space: nowrap;
+}
+
+em {
+  margin-right: 12rpx;
+}
+
+.item-class {
+  display: inline-block;
+  margin: 0 4rpx;
+}

+ 94 - 0
lionfish_comshop/components/coupon/index.js

@@ -0,0 +1,94 @@
+var app = getApp();
+
+Component({
+  properties: {
+    couponRefresh: {
+      type: Boolean,
+      value: false,
+      observer: function (t) {
+        if(t) this.getCoupon();
+      }
+    }
+  },
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    quan: []
+  },
+
+  attached() {
+    // this.getCoupon();
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    getCoupon: function(){
+      let that = this;
+      let token = wx.getStorageSync('token');
+      app.util.request({
+        url: 'entry/wxapp/index',
+        data: { controller: 'goods.get_seller_quan', token },
+        dataType: 'json',
+        success: function (res) {
+          let list = res.data.quan_list;
+          let hasCoupon = false;
+          if (Object.prototype.toString.call(list) == '[object Object]' && Object.keys(list).length>0) hasCoupon = true;
+          if (Object.prototype.toString.call(list) == '[object Array]' && list.length > 0) hasCoupon = true;
+          that.setData({
+            quan: res.data.quan_list || [],
+            hasCoupon
+          })
+        }
+      });
+    },
+    receiveCoupon: function (event) {
+      let quan_id = event.currentTarget.dataset.quan_id;
+      var token = wx.getStorageSync('token');
+      var quan_list = this.data.quan;
+      var that = this;
+
+      app.util.request({
+        url: 'entry/wxapp/index',
+        data: { controller: 'goods.getQuan', token, quan_id },
+        dataType: 'json',
+        success: function (msg) {
+          //1 被抢光了 2 已领过  3  领取成功
+          if (msg.data.code == 1) {
+            wx.showToast({
+              title: '被抢光了',
+              icon: 'none'
+            })
+          } else if (msg.data.code == 2) {
+            wx.showToast({
+              title: '已领取',
+              icon: 'none'
+            })
+            var new_quan = [];
+            for (var i in quan_list) {
+              if (quan_list[i].id == quan_id) quan_list[i].is_get = 1;
+              new_quan.push(quan_list[i]);
+            }
+            that.setData({ quan: new_quan })
+          }
+          else if (msg.data.code == 3) {
+            var new_quan = [];
+            for (var i in quan_list) {
+              if (quan_list[i].id == quan_id) quan_list[i].is_get = 1;
+              new_quan.push(quan_list[i]);
+            }
+            that.setData({ quan: new_quan })
+            wx.showToast({
+              title: '领取成功',
+            })
+          }
+          else if (msg.data.code == 4) {
+            // 未登录
+          }
+        }
+      })
+    }
+  }
+})

+ 4 - 0
lionfish_comshop/components/coupon/index.json

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

+ 23 - 0
lionfish_comshop/components/coupon/index.wxml

@@ -0,0 +1,23 @@
+<view wx:if="{{hasCoupon}}" class="promotion">
+  <view class="slider">
+    <view class="slider-wraper">
+      <view class="list">
+        <view bindtap='receiveCoupon' wx:for="{{quan}}" wx:key="{{item.id}}" data-quan_id="{{item.id}}" class="card-content list-item {{item.is_get == 1? 'get':''}}"> 
+          <view class="card">
+            <view class="card-price span">
+              <view class="card-price--unit span">¥</view>
+              <view class="card-price--num span">{{item.credit}}</view>
+            </view>
+            <view class="card-desc span" wx:if="{{item.limit_money >0}}">
+              满{{item.limit_money}}元可用</view>
+            <view class="card-desc span" wx:else>
+              全场通用</view>
+            <view class="card-tag span {{item.is_get == 1? 'card-tag--get':''}}">
+              <view class="card-tag--text span">已领取</view>
+            </view>
+          </view>
+        </view> 
+      </view>
+    </view>
+  </view>
+</view>

+ 118 - 0
lionfish_comshop/components/coupon/index.wxss

@@ -0,0 +1,118 @@
+.promotion {
+  box-sizing: border-box;
+  height: 126rpx;
+  padding: 0 20rpx 20rpx;
+  background-color: #fff;
+}
+
+.promotion .head {
+  font-size: 24rpx;
+  color: #999;
+  margin-bottom: 16rpx;
+}
+
+.promotion .slider {
+  position: relative;
+  overflow: hidden;
+}
+
+.promotion .slider-wraper {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  overflow-y: auto;
+}
+
+.promotion .list {
+  display: flex;
+  flex-flow: row nowrap;
+}
+
+.promotion .list-item {
+  margin-right: 10rpx;
+}
+
+.promotion .list-item:last-child {
+  margin-right: 0px;
+}
+
+.promotion .card-content {
+  height: 106rpx;
+  border-radius: 3rpx;
+  position: relative;
+  overflow: hidden;
+  background-size: cover;
+  background-repeat: no-repeat;
+  background-image: url(https://mall.shiziyu888.com/Common/image/117603130_6i5767h706g683dj35febbc2c37a4_176x116.png);
+}
+
+.promotion .card {
+  position: relative;
+  overflow: hidden;
+  display: flex;
+  flex-flow: column nowrap;
+  align-items: center;
+  justify-content: center;
+  color: #fff;
+  border-radius: 4rpx;
+  height: 88rpx;
+  width: 180rpx;
+  padding: 8rpx;
+}
+
+.promotion .card-price {
+  flex-flow: row nowrap;
+  align-items: flex-start;
+}
+
+.promotion .card-price--unit, .card-price {
+  display: flex;
+}
+
+.promotion .card-price--unit {
+  font-size: 18rpx;
+}
+
+.promotion .card-price--num {
+  font-size: 48rpx;
+  line-height: 48rpx;
+}
+
+.promotion .card-desc, .card-price--num {
+  display: flex;
+}
+
+.promotion .card-desc {
+  font-size: 20rpx;
+}
+
+.promotion .card-tag {
+  display: none;
+  justify-content: center;
+  align-items: center;
+  width: 64rpx;
+  height: 64rpx;
+  position: absolute;
+  bottom: -16rpx;
+  right: -10rpx;
+  transform: rotate(-20deg);
+  border: 1px solid #666;
+  border-radius: 50%;
+}
+
+.promotion .card-tag--text {
+  font-size: 20rpx;
+  color: #666;
+  margin-bottom: 10rpx;
+  text-align: center;
+}
+
+.promotion .card-tag--get {
+  display: flex;
+}
+
+.promotion .card-content.get {
+  background-image: none;
+  background-color: #c7c7c7;
+}

+ 21 - 0
lionfish_comshop/components/dialog/index.js

@@ -0,0 +1,21 @@
+Component({
+  properties: {
+    visible: {
+      type: Boolean,
+      value: false
+    },
+    text: String,
+    confirmText: {
+      type: String,
+      value: "确定"
+    }
+  },
+  methods: {
+    confirm: function () {
+      this.triggerEvent("confirm");
+    },
+    cancel: function () {
+      this.triggerEvent("cancel");
+    }
+  }
+});

+ 7 - 0
lionfish_comshop/components/dialog/index.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-modal": "../modal/index",
+    "i-button": "../button/index"
+  }
+}

+ 14 - 0
lionfish_comshop/components/dialog/index.wxml

@@ -0,0 +1,14 @@
+<i-modal bind:cancel="close" iClass="dialog" scrollUp="{{false}}" visible="{{visible}}">
+  <view class="dialog-content">
+    <view class="text">{{text}}</view>
+    <view class="button-group">
+      <i-button bind:click="cancel" iClass="left-btn">
+        <view>取消</view>
+      </i-button>
+      <view class="split-line"></view>
+      <i-button bind:click="confirm" iClass="right-btn">
+        <view>{{confirmText}}</view>
+      </i-button>
+    </view>
+  </view>
+</i-modal>

+ 35 - 0
lionfish_comshop/components/dialog/index.wxss

@@ -0,0 +1,35 @@
+.dialog-content {
+  width: 540rpx;
+  height: 208rpx;
+  border-radius: 30rpx;
+  background: #fff;
+}
+
+.dialog-content .text {
+  height: 120rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-bottom: 2rpx solid #d2d2d2;
+}
+
+.dialog-content .button-group {
+  display: flex;
+}
+
+.dialog-content .left-btn, .dialog-content .right-btn {
+  width: 270rpx;
+  height: 88rpx;
+  text-align: center;
+  line-height: 88rpx;
+  font-size: 36rpx;
+  color: #0076ff;
+  margin: 0;
+  padding: 0;
+}
+
+.dialog-content .split-line {
+  width: 0;
+  height: 88rpx;
+  border-right: 2rpx solid #d2d2d2;
+}

+ 17 - 0
lionfish_comshop/components/distributionItem/index.js

@@ -0,0 +1,17 @@
+var timeFormat = require("../../utils/timeFormat");
+
+Component({
+  properties: {
+    item: {
+      type: Object,
+      observer: function (val) {
+        var obj = val;
+        var cTime = obj.createTime;
+        null === cTime ? cTime = (0, timeFormat.formatYMD)(new Date()) : cTime = (0,
+          timeFormat.formatYMD)(new Date(parseInt(cTime))), this.setData({
+            item: obj
+          });
+      }
+    }
+  }
+});

+ 6 - 0
lionfish_comshop/components/distributionItem/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "component-img": "../image/index"
+  }
+}

+ 13 - 0
lionfish_comshop/components/distributionItem/index.wxml

@@ -0,0 +1,13 @@
+<view class="item">
+    <view class="distributionNum">
+        <text class="distributionTime">{{item.createTime}}</text>
+        <text class="statusName">{{item.disStatusName}}</text>
+    </view>
+    <view class="spu">
+        <component-img class="goodsImg" defaultImage="../../images/placeholder-refund.png" height="60" loadImage="{{item.goodsImage}}" width="60"></component-img>
+        <view class="detail">
+            <view class="goodsName">{{item.spuName}}</view>
+            <view class="commission">团单金额 ¥{{item.totalAmount/100}} | 佣金 ¥{{item.orderCommission/100}}</view>
+        </view>
+    </view>
+</view>

+ 65 - 0
lionfish_comshop/components/distributionItem/index.wxss

@@ -0,0 +1,65 @@
+.item {
+  background: #fff;
+  overflow: hidden;
+  border-top-left-radius: 20rpx;
+  border-top-right-radius: 20rpx;
+}
+
+.distributionNum {
+  height: 80rpx;
+  font-size: 26rpx;
+  color: #333;
+  padding: 0 30rpx;
+  border-top-left-radius: 20rpx;
+  border-top-right-radius: 20rpx;
+  border-bottom: 2rpx solid #e4e4e4;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.distributionNum .distributionTime {
+  font-size: 24rpx;
+  color: #666;
+}
+
+.distributionNum .statusName {
+  font-size: 26rpx;
+  color: #fe8464;
+}
+
+.spu {
+  padding: 20rpx 30rpx;
+  display: flex;
+  justify-content: flex-start;
+}
+
+.spu .goodsImg {
+  height: 120rpx;
+  margin-right: 30rpx;
+}
+
+.spu .detail {
+  font-size: 28rpx;
+  color: #333;
+}
+
+.spu .detail .goodsName {
+  color: #333;
+  font-size: 28rpx;
+  line-height: 40rpx;
+  height: 80rpx;
+  width: 540rpx;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+  text-overflow: initial;
+  white-space: normal;
+}
+
+.spu .detail .commission {
+  font-size: 24rpx;
+  color: #999;
+  line-height: 40rpx;
+}

+ 19 - 0
lionfish_comshop/components/fetch-coder/index.js

@@ -0,0 +1,19 @@
+Component({
+  properties: {
+    visible: {
+      type: Boolean,
+      value: false
+    },
+    coderList: {
+      type: Array
+    }
+  },
+  data: {
+    selected: null
+  },
+  methods: {
+    close: function () {
+      this.triggerEvent("cancel");
+    }
+  }
+});

+ 6 - 0
lionfish_comshop/components/fetch-coder/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-modal": "../modal/index"
+  }
+}

+ 12 - 0
lionfish_comshop/components/fetch-coder/index.wxml

@@ -0,0 +1,12 @@
+<i-modal bind:cancel="close" scrollUp="{{false}}" visible="{{visible}}">
+  <view class="coder-content">
+    <view bindtap="close" class="icon-wrap">
+      <image class="icon-close" src="../../images/icon-sku-close.png"></image>
+    </view>
+    <view class="t1">您的提货码为</view>
+    <view>
+      <text class="item" wx:for="{{coderList}}" wx:key="index">{{item}}</text>
+    </view>
+    <view class="t2">5分钟有效时长</view>
+  </view>
+</i-modal>

+ 61 - 0
lionfish_comshop/components/fetch-coder/index.wxss

@@ -0,0 +1,61 @@
+.coder-content {
+  position: relative;
+  height: 448rpx;
+  width: 630rpx;
+  background: #fff;
+  border-radius: 20rpx;
+  text-align: center;
+  font-family: PingFangSC-Medium;
+}
+
+.coder-content .t1 {
+  font-size: 36rpx;
+  font-weight: 500;
+  color: #444;
+  line-height: 36rpx;
+  margin-bottom: 80rpx;
+  margin-top: 80rpx;
+}
+
+.coder-content .t2 {
+  font-size: 24rpx;
+  font-weight: 400;
+  color: #bababa;
+  line-height: 24rpx;
+  margin-top: 80rpx;
+}
+
+.coder-content .item {
+  display: inline-block;
+  margin-left: 20rpx;
+  width: 68rpx;
+  height: 68rpx;
+  line-height: 68rpx;
+  text-align: center;
+  border-radius: 10rpx;
+  border: 2rpx solid #444;
+  font-size: 40rpx;
+  font-family: PingFangSC-Regular;
+  font-weight: 400;
+  color: #444;
+}
+
+.coder-content .item:first-of-type {
+  margin-left: 0;
+}
+
+.coder-content .icon-wrap {
+  height: 60rpx;
+  width: 60rpx;
+  position: absolute;
+  right: 10rpx;
+  top: 10rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.coder-content .icon-close {
+  height: 24rpx;
+  width: 24rpx;
+}

+ 12 - 0
lionfish_comshop/components/fixed-bottom/index.js

@@ -0,0 +1,12 @@
+var t = getApp();
+
+Component({
+  data: {
+    isIpx: false
+  },
+  attached: function () {
+    t.globalData.isIpx && this.setData({
+      isIpx: true
+    });
+  }
+});

+ 4 - 0
lionfish_comshop/components/fixed-bottom/index.json

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

+ 3 - 0
lionfish_comshop/components/fixed-bottom/index.wxml

@@ -0,0 +1,3 @@
+<view class="fixed-bar {{isIpx?'pb20':''}}">
+  <slot></slot>
+</view>

+ 12 - 0
lionfish_comshop/components/fixed-bottom/index.wxss

@@ -0,0 +1,12 @@
+.fixed-bar {
+  left: 0;
+  bottom: 0;
+  position: fixed;
+  background: #fff;
+  width: 100%;
+  z-index: 2;
+}
+
+.pb20 {
+  padding-bottom: 40rpx;
+}

+ 70 - 0
lionfish_comshop/components/get-phone/index.js

@@ -0,0 +1,70 @@
+var app = getApp();
+
+Component({
+  properties: {
+    visible: {
+      type: Boolean,
+      value: false
+    }
+  },
+  methods: {
+    close: function () {
+      this.triggerEvent("cancel");
+    },
+    getPhoneNumber: function (res) {
+      var that = this;
+      wx.checkSession({
+        success: function () {
+          console.log("session:", 1), that.getMobile(res);
+        },
+        fail: function () {
+          console.log("session:", 2), wx.removeStorageSync("token");
+          wx.removeStorageSync("token");
+          that.triggerEvent("needAuth");
+        }
+      });
+    },
+    getMobile: function (e) {
+      var that = this;
+      if ("getPhoneNumber:ok" === e.detail.errMsg){
+        var token = wx.getStorageSync('token');
+        this.setData({
+          loading: true
+        });
+        app.util.request({
+          'url': 'entry/wxapp/user',
+          'data': {
+            controller: 'user.getPhoneNumber',
+            token: token,
+            encryptedData: e.detail.encryptedData,
+            iv: e.detail.iv
+          },
+          method: 'post',
+          dataType: 'json',
+          success: function (res) {
+            if (res.data.code == 0) {
+              let phoneNumber = res.data.phoneNumber;
+              wx.setStorage({
+                key: "mobile",
+                data: phoneNumber
+              });
+              that.triggerEvent("confirm", phoneNumber);
+            } else {
+              that.setData({
+                visible: false
+              });
+              wx.showToast({
+                title: "授权失败",
+                icon: "none"
+              });
+            }
+          }
+        })
+      } else {
+        this.setData({
+          visible: true
+        })
+      }
+    }
+  }
+});

+ 7 - 0
lionfish_comshop/components/get-phone/index.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-modal": "../modal/index",
+    "i-button": "../button/index"
+  }
+}

+ 14 - 0
lionfish_comshop/components/get-phone/index.wxml

@@ -0,0 +1,14 @@
+<i-modal bind:cancel="close" scrollUp="{{false}}" visible="{{visible}}">
+  <view class="auth-content">
+    <view bindtap="close" class="close">
+      <image class='close-img' src="../../images/icon-close-white.png"></image>
+    </view>
+    <image class="bg" src="../../images/get-phone-bg.png"></image>
+    <view class="h1">需要您的同意</view>
+    <view class="h2">
+      <p>需要您的手机授权</p>
+      <p>授权后可享受更多优质服务</p>
+    </view>
+    <i-button bindgetphonenumber="getPhoneNumber" iClass="confirm" openType="getPhoneNumber">确认授权</i-button>
+  </view>
+</i-modal>

+ 66 - 0
lionfish_comshop/components/get-phone/index.wxss

@@ -0,0 +1,66 @@
+.auth-content {
+  width: 520rpx;
+  height: 660rpx;
+  background: #fff;
+  border-radius: 24rpx;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.auth-content .bg {
+  width: 520rpx;
+  height: 354rpx;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.auth-content .h1 {
+  color: #444;
+  font-size: 32rpx;
+  margin-bottom: 20rpx;
+}
+
+.auth-content .h2 {
+  font-size: 24rpx;
+  line-height: 36rpx;
+  color: #999;
+  width: 408rpx;
+  margin-bottom: 44rpx;
+}
+
+.auth-content .h2 p {
+  text-align: center;
+  display: block;
+}
+
+.auth-content .confirm {
+  width: 432rpx;
+  height: 72rpx;
+  color: #fff;
+  background: linear-gradient(to left, #ff2756, #ff2f30);
+  font-size: 32rpx;
+  line-height: 72rpx;
+  border-radius: 12rpx;
+  margin: 0 0 30rpx;
+}
+
+.auth-content .close {
+  position: absolute;
+  right: 28rpx;
+  top: 28rpx;
+  width: 40rpx;
+  height: 40rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 9;
+}
+
+.auth-content .close .close-img {
+  width: 26rpx;
+  height: 26rpx;
+}

+ 29 - 0
lionfish_comshop/components/goods-bar/index.js

@@ -0,0 +1,29 @@
+var t = require("../../utils/public");
+
+Component({
+  properties: {
+    goodsDetail: Object,
+    goodsStatus: {
+      type: Number,
+      value: null
+    },
+    cartNum: {
+      type: Number,
+      value: 0,
+      observer: function(t) {
+        console.log(t);
+      }
+    }
+  },
+  methods: {
+    addToCart: function(e) {
+      (0, t.collectFormIds)(e.detail.formId), this.triggerEvent("on-addToCart");
+    },
+    balance: function() {
+      this.triggerEvent("on-balance");
+    },
+    submit: function(e) {
+      (0, t.collectFormIds)(e.detail.formId);
+    }
+  }
+});

+ 6 - 0
lionfish_comshop/components/goods-bar/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-fixed-bottom": "../fixed-bottom/index"
+  }
+}

+ 37 - 0
lionfish_comshop/components/goods-bar/index.wxml

@@ -0,0 +1,37 @@
+<i-fixed-bottom>
+  <view class="goods-bottom-bar">
+    <view class="leftBtn">
+      <navigator hoverClass="none" openType="switchTab" url="/lionfish_comshop/pages/index/index">
+        <view class="bar-item back-to-index">
+          <image class="icon" src="../../images/icon-tab-index.png"></image>
+          回首页
+        </view>
+      </navigator>
+      <navigator hoverClass="none" openType="switchTab" url="/lionfish_comshop/pages/order/shopCart">
+        <view class="bar-item shop-cart">
+          <view class="icon">
+            <image class='img' src="../../images/icon-tab-shop.png"></image>
+            <view class="cart-num" wx:if="{{cartNum}}">{{cartNum}}</view>
+          </view>
+          购物车
+        </view>
+      </navigator>
+    </view>
+    <view class="goodsStatus" wx:if="{{goodsStatus==1}}">已抢光</view>
+    <view class="goodsStatus" wx:elif="{{goodsStatus==2}}">团购已结束</view>
+    <view class="goodsStatus" wx:elif="{{goodsStatus==3}}">已下架</view>
+    <view class="goodsStatus" wx:elif="{{goodsStatus==4}}">即将开抢</view>
+    <view class="gobuy" wx:else>
+      <form bindsubmit="addToCart" reportSubmit="true">
+        <view class="bar-item add-to-cart">加入购物车</view>
+        <button class="btn" formType="submit"></button>
+      </form>
+      <form bindsubmit="submit" reportSubmit="true">
+        <button hidden formType="submit" id="formId"></button>
+      </form>
+      <label class="balanceBtn" for="formId">
+        <view bindtap="balance" class="bar-item balance">立即购买</view>
+      </label>
+    </view>
+  </view>
+</i-fixed-bottom>

+ 120 - 0
lionfish_comshop/components/goods-bar/index.wxss

@@ -0,0 +1,120 @@
+.goods-bottom-bar {
+  height: 96rpx;
+  display: flex;
+}
+
+.goods-bottom-bar .leftBtn {
+  height: 94rpx;
+  display: flex;
+  border-top: 2rpx solid #efefef;
+}
+
+.goods-bottom-bar .leftBtn .bar-item {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+}
+
+.goods-bottom-bar .leftBtn .back-to-index {
+  width: 132rpx;
+  height: 94rpx;
+  font-size: 20rpx;
+  color: #707070;
+}
+
+.goods-bottom-bar .leftBtn .back-to-index .icon { 
+  width: 54rpx;
+  height: 54rpx;
+}
+
+.goods-bottom-bar .leftBtn .shop-cart {
+  width: 132rpx;
+  height: 96rpx;
+  font-size: 20rpx;
+  color: #707070;
+  position: relative;
+}
+
+.goods-bottom-bar .leftBtn .shop-cart .icon {
+  width: 54rpx;
+  height: 54rpx;
+  position: relative;
+}
+
+.goods-bottom-bar .leftBtn .shop-cart .icon .img {
+  width: 100%;
+  height: 100%;
+}
+
+.goods-bottom-bar .leftBtn .shop-cart .icon .cart-num {
+  position: absolute;
+  right: -16rpx;
+  top: -4rpx;
+  width: 36rpx;
+  height: 36rpx;
+  background: #ff384a;
+  border-radius: 36rpx;
+  color: #fff;
+  font-size: 22rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.goods-bottom-bar .goodsStatus {
+  width: 100%;
+  height: 96rpx;
+  background: #dcdcdc;
+  font-size: 30rpx;
+  color: #fff;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.goods-bottom-bar .gobuy {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  font-weight: bold;
+}
+
+.goods-bottom-bar .gobuy .add-to-cart {
+  width: 240rpx;
+  height: 96rpx;
+  background: linear-gradient(270deg, #f9c706 0%, #feb600 100%);
+  color: #fff;
+  font-size: 30rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.goods-bottom-bar .gobuy .btn {
+  width: 208rpx;
+  height: 96rpx;
+  position: absolute;
+  opacity: 0;
+  z-index: 9;
+  top: 0;
+  padding: 0;
+  margin: 0;
+}
+
+.goods-bottom-bar .gobuy .balanceBtn {
+  display: flex;
+  flex: 1;
+}
+
+.goods-bottom-bar .gobuy .balanceBtn .balance {
+  height: 96rpx;
+  flex: 1;
+  background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%);
+  color: #fff;
+  font-size: 30rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}

+ 55 - 0
lionfish_comshop/components/goodsCard/index.js

@@ -0,0 +1,55 @@
+// lionfish_comshop/components/goodsCard/index.js
+var e = require("../../utils/timeFormat");
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    status: {
+      type: Number
+    },
+    orderNo: {
+      type: String
+    },
+    orderArray: {
+      type: Array,
+      observer: function (itemArr) {
+        var orderSkuStatus = itemArr[0].orderSkuStatus, 
+          itemObj = itemArr[0], 
+          a = itemObj.pickUpTime, 
+          i = itemObj.realPickUpTime, 
+          s = {}, 
+          m = {}, 
+          len = 0;
+        a && (s = (0, e.formatWeekday)(new Date(a - 0))), 
+        i && (m = (0, e.formatWeekday)(new Date(i - 0)));
+        for (var n = 0; n < itemArr.length; n++) len += itemArr[n].skuNum;
+        this.setData({
+          showPickUpTime: s.month + "月" + s.day + "日(" + s.weekday + ")",
+          showRealPickUpTime: m.month + "月" + m.day + "日(" + m.weekday + ")",
+          len: len,
+          orderSkuStatus: orderSkuStatus
+        });
+      }
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    showPickUpTime: "",
+    showRealPickUpTime: "",
+    len: 0,
+    orderSkuStatus: 0
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    goodsConfirmed: function () {
+      this.triggerEvent("goodsConfirmed");
+    }
+  }
+})

+ 7 - 0
lionfish_comshop/components/goodsCard/index.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-card": "../card/index",
+    "i-singleSkuItem": "../singleSkuItem/index"
+  }
+}

+ 15 - 0
lionfish_comshop/components/goodsCard/index.wxml

@@ -0,0 +1,15 @@
+<i-card showModal="true">
+  <view class="header" slot="header">
+    <view class="goods-cancel bold-text" wx:if="{{orderSkuStatus===3}}">已取消</view>
+    <view class="goods-ready bold-text" wx:elif="{{status!==2}}">预计{{showPickUpTime}}可提货</view>
+    <view class="goods-done bold-text" wx:else>{{showRealPickUpTime}}提货完成</view>
+    <view class="goods-num">{{len}}件商品</view>
+  </view>
+  <view class="middle" slot="content">
+    <block wx:for="{{orderArray}}" wx:for-item="goodsCardInfo" wx:key="{{ index }}">
+      <view class="middle-line"></view>
+      <i-singleSkuItem bind:goodsConfirmed="goodsConfirmed" goodsInfo="{{goodsCardInfo}}" iClass="each-item" orderNo="{{orderNo}}" status="{{status}}"></i-singleSkuItem>
+    </block>
+  </view>
+  <view slot="footer"></view>
+</i-card>

+ 38 - 0
lionfish_comshop/components/goodsCard/index.wxss

@@ -0,0 +1,38 @@
+.bold-text {
+  font-weight: 500;
+}
+
+.header {
+  display: flex;
+  justify-content: space-between;
+  padding: 30rpx;
+  font-size: 24rpx;
+}
+
+.header .goods-num {
+  color: #aaa;
+}
+
+.header .goods-done {
+  color: #aaa;
+}
+
+.header .goods-ready {
+  color: #ff5344;
+}
+
+.header .goods-cancel {
+  color: #aaa;
+}
+
+.middle .middle-line {
+  height: 0.1rpx;
+  background: #efefef;
+}
+
+.middle .each-item {
+  box-sizing: border-box;
+  display: flex;
+  width: 100%;
+  padding: 32rpx 30rpx;
+}

+ 26 - 0
lionfish_comshop/components/goodsInfo/index.js

@@ -0,0 +1,26 @@
+// lionfish_comshop/components/goodsInfo/index.js
+Component({
+  properties: {
+    order: {
+      type: Object
+    },
+    showNickname: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data: {
+    isCalling: false
+  },
+  methods: {
+    callTelphone: function(t) {
+      var e = this;
+      this.data.isCalling || (this.data.isCalling = true, wx.makePhoneCall({
+        phoneNumber: t.currentTarget.dataset.phone,
+        complete: function() {
+          e.data.isCalling = false;
+        }
+      }));
+    }
+  }
+})

+ 6 - 0
lionfish_comshop/components/goodsInfo/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-card": "../card/index"
+  }
+}

+ 43 - 0
lionfish_comshop/components/goodsInfo/index.wxml

@@ -0,0 +1,43 @@
+<i-card showModal="true">
+  <view slot="header">
+    <view class="header">提货信息</view>
+  </view>
+  <view slot="content">
+    <view class="content-wrap">
+      <view class="item">
+        <view class="title">提货人</view>
+        <view class="detail">{{order.order_info.shipping_name}} {{order.order_info.shipping_tel}}</view>
+      </view>
+      <view class="item" wx:if="{{order.order_info.name&&showNickname}}">
+        <view class="title">昵称</view>
+        <view class="detail">{{order.order_info.name}}</view>
+      </view>
+      <view class="item">
+        <view class="title">提货地点</view>
+        <view class="detail">{{order.order_info.shipping_address}}</view>
+      </view>
+      <view class="item">
+        <view class="title">配送方式</view>
+        <view class="detail">{{order.order_info.delivery_name}}</view>
+      </view>
+      <view class="item">
+        <view class="title">团长信息</view>
+        <view class="detail">
+          <text>{{order.order_info.ziti_name}}</text>
+          <view bindtap="callTelphone" class="phone" data-phone="{{order.order_info.ziti_mobile}}">
+            <image class="icon-phone" src="../../images/phone2.png"></image>
+            <text>联系团长</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+  <view slot="footer">
+    <view class="footer">
+      共{{order.goods_count}}件商品 小计:
+      <view class="money">
+        ¥{{order.order_info.total}}
+      </view>
+    </view>
+  </view>
+</i-card>

+ 62 - 0
lionfish_comshop/components/goodsInfo/index.wxss

@@ -0,0 +1,62 @@
+.header {
+  padding: 20rpx 30rpx;
+  color: #444;
+  font-size: 28rpx;
+  font-weight: 500;
+}
+
+.content-wrap {
+  border-top: 0.1rpx solid #efefef;
+  padding-bottom: 20rpx;
+}
+
+.content-wrap .item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 24rpx;
+  padding: 16rpx 30rpx 0;
+}
+
+.content-wrap .item .title {
+  word-break: keep-all;
+  color: #aaa;
+}
+
+.content-wrap .item .detail {
+  color: #444;
+  text-align: right;
+  display: flex;
+  align-items: center;
+}
+
+.content-wrap .item .detail .phone {
+  margin-left: 20rpx;
+  padding: 0 20rpx;
+  height: 44rpx;
+  display: flex;
+  align-items: center;
+  border: 0.1rpx solid #efefef;
+  border-radius: 26rpx;
+}
+
+.content-wrap .item .detail .phone .icon-phone {
+  width: 20rpx;
+  height: 20rpx;
+  margin-right: 10rpx;
+}
+
+.footer {
+  border-top: 0.1rpx solid #efefef;
+  padding: 42rpx 30rpx 32rpx 0;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+  font-size: 30rpx;
+  font-weight: 500;
+}
+
+.footer .money {
+  color: #ff5344;
+  font-size: 40rpx;
+}

+ 54 - 0
lionfish_comshop/components/group-order/index.js

@@ -0,0 +1,54 @@
+var e = require("../../utils/timeFormat");
+
+Component({
+  properties: {
+    item: {
+      type: Object,
+      observer: function (t) {
+        var a = t;
+        null === a.createTime ? a.createTime = (0, e.formatYMD)(new Date()) : a.createTime = (0,
+          e.formatYMD)(new Date(parseInt(a.createTime))), a.orderStatusName = this.switchState(a.groupOrderStatus),
+          this.setData({
+            item: a
+          });
+      }
+    }
+  },
+  methods: {
+    switchState: function (e) {
+      var t = "";
+      switch (String(e)) {
+        case "-1":
+          break;
+
+        case "0":
+          t = "待成团";
+          break;
+
+        case "1":
+          t = "待配送";
+          break;
+
+        case "2":
+          t = "待收货";
+          break;
+
+        case "3":
+          t = "待提货";
+          break;
+
+        case "4":
+          t = "已完成";
+          break;
+
+        case "5":
+          t = "交易关闭";
+          break;
+
+        case "6":
+          t = "待采购";
+      }
+      return t;
+    }
+  }
+});

+ 6 - 0
lionfish_comshop/components/group-order/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "i-img": "../img/index"
+  }
+}

+ 24 - 0
lionfish_comshop/components/group-order/index.wxml

@@ -0,0 +1,24 @@
+<view class="item">
+  <view class="orderNum">
+    <text>团单日期:{{item.createTime}}</text>
+    <text class="{{item.orderStatusName=='已完成'?'black':''}} statusName">{{item.orderStatusName}}</text>
+  </view>
+  <view class="spu">
+    <i-img class="goodsImg" defaultImage="../../images/placeholder-refund.png" height="60" iClass="img-class" loadImage="{{item.spuImage}}" width="60"></i-img>
+    <view class="detail">
+      <view class="spuName">
+        <text>{{item.spuName}}</text>
+      </view>
+      <view class="tips">
+        <span>参团人数:{{item.joinMemberNum}}</span>
+        <span class="last">商品数量:{{item.groupOrderNum}}</span>
+      </view>
+      <view class="tips">
+        <span>商品金额:¥{{item.totalAmount?item.totalAmount/100:0}}</span>
+        <span class="last">佣金:
+          <text class="price">¥{{item.commision?item.commision/100:0}}</text>
+        </span>
+      </view>
+    </view>
+  </view>
+</view>

+ 73 - 0
lionfish_comshop/components/group-order/index.wxss

@@ -0,0 +1,73 @@
+.item {
+  background: #fff;
+  overflow: hidden;
+  box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05);
+  border-radius: 20rpx;
+  margin: 0rpx 20rpx;
+}
+
+.orderNum {
+  height: 80rpx;
+  font-size: 26rpx;
+  color: #333;
+  padding: 0 30rpx;
+  border-bottom: 1rpx solid #efefef;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.orderNum .statusName {
+  color: #be965a;
+  font-weight: 500;
+}
+
+.orderNum .black {
+  color: #aaa;
+}
+
+.spu {
+  padding: 30rpx;
+  display: flex;
+  justify-content: flex-start;
+}
+
+.spu .goodsImg {
+  width: 120rpx;
+  margin-right: 20rpx;
+}
+
+.spu .goodsImg .img-class {
+  width: 120rpx;
+  height: 120rpx;
+}
+
+.spu .detail {
+  margin-left: 20rpx;
+  font-size: 24rpx;
+  color: #aaa;
+}
+
+.spu .detail .spuName {
+  color: #444;
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 500;
+}
+
+.spu .detail .tips {
+  line-height: 32rpx;
+  width: 530rpx;
+  margin-top: 16rpx;
+  position: relative;
+}
+
+.spu .detail .tips .last {
+  position: absolute;
+  left: 240rpx;
+}
+
+.spu .detail .tips .price {
+  color: #ff5344;
+  font-size: 32rpx;
+}

+ 71 - 0
lionfish_comshop/components/guess-like/index.js

@@ -0,0 +1,71 @@
+var app = getApp();
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    disabled: false,
+    list: []
+  },
+
+  attached() {
+    this.getData();
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    getData: function () {
+      var token = wx.getStorageSync('token');
+      var that = this;
+      var cur_community = wx.getStorageSync('community');
+      app.util.request({
+        'url': 'entry/wxapp/index',
+        'data': {
+          controller: 'index.load_gps_goodslist',
+          token: token,
+          pageNum: 1,
+          is_random: 1,
+          head_id: cur_community.communityId
+        },
+        dataType: 'json',
+        success: function (res) {
+          if (res.data.code == 0) {
+            let oldList = that.data.list;
+            let list = oldList.concat(res.data.list);
+            that.setData({ list })
+          } else {
+            that.setData({ noMore: true })
+          }
+        }
+      })
+    },
+    openSku: function (e) {
+      let idx = e.currentTarget.dataset.idx;
+      this.setData({ disabled: false })
+      let spuItem = this.data.list[idx];
+      this.triggerEvent("openSku", {
+        actId: spuItem.actId,
+        skuList: spuItem.skuList,
+        promotionDTO: spuItem.promotionDTO || '',
+        allData: {
+          spuName: spuItem.spuName,
+          skuImage: spuItem.skuImage,
+          actPrice: spuItem.actPrice,
+          canBuyNum: spuItem.spuCanBuyNum,
+          stock: spuItem.spuCanBuyNum,
+          marketPrice: spuItem.marketPrice
+        }
+      })
+    }
+  }
+})

+ 9 - 0
lionfish_comshop/components/guess-like/index.json

@@ -0,0 +1,9 @@
+{
+  "component": true,
+  "usingComponents": {
+    "comming-spu": "../comming-spu-disabled/index",
+    "i-img": "../img/index",
+    "i-button": "../button/index",
+    "i-router-link": "../router-link/router-link"
+  }
+}

+ 20 - 0
lionfish_comshop/components/guess-like/index.wxml

@@ -0,0 +1,20 @@
+<view class='like' wx:if="{{list.length}}">
+  <view class='like-title'>——大家常买——</view>
+  <view class='like-list'>
+    <!-- <comming-spu wx:for="{{list}}" wx:key="{{index}}" spuItem="{{item}}"></comming-spu> -->
+    <i-router-link routerClass="new-comers-item" url="/lionfish_comshop/pages/goods/goodsDetail?id={{item.actId}}" wx:for="{{list}}" wx:key="{{index}}">
+      <i-img defaultImage="../../images/placeholder-refund.png" height="200" width="180" iClass="new-img" loadImage="{{item.skuImage}}"></i-img>
+      <view class="act-end" wx:if="{{item.spuCanBuyNum==0}}">已抢光</view>
+      <view class='title'>{{item.spuName}}</view>
+      <view class='new-bot'>
+        <view class='price'>¥{{item.actPrice[0]}}.{{item.actPrice[1]}}</view>
+        <i-button iClass="add-cart" wx:if="{{disabled||item.spuCanBuyNum==0}}">
+          <image class='img' src="../../images/icon-add-shopCart-disabled.png"></image>
+        </i-button>
+        <i-button bind:click="openSku" data-idx="{{index}}" iClass="add-cart" wx:else>
+          <image class='img' src="../../images/icon-add-shopCart.png"></image>
+        </i-button>
+      </view>
+    </i-router-link>
+  </view>
+</view>

+ 85 - 0
lionfish_comshop/components/guess-like/index.wxss

@@ -0,0 +1,85 @@
+.like {
+  margin-bottom: 100rpx;
+}
+
+.like-title {
+  font-size: 30rpx;
+  text-align: center;
+  font-weight: bold;
+  color: #666;
+  margin-bottom: 20rpx;
+}
+
+.like-list {
+  position: relative;
+  padding: 20rpx;
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  z-index: 0;
+}
+
+.new-comers-item {
+  background-color: #fff;
+  width: 345rpx;
+  box-sizing: border-box;
+  padding: 30rpx;
+  border-radius: 10px;
+  font-size: 28rpx;
+  margin-bottom: 20rpx;
+}
+
+.new-comers-item .new-img {
+  width: 285rpx;
+  height: 240rpx;
+  margin-bottom: 20rpx;
+}
+
+.new-comers-item .title {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.new-comers-item .new-bot {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 10rpx;
+}
+
+.new-comers-item .add-cart {
+  width: 44rpx;
+  height: 44rpx;
+  padding: 0;
+  margin: 0;
+}
+
+.new-comers-item .add-cart .img {
+  width: 44rpx;
+  height: 44rpx;
+  display: block;
+}
+
+.new-comers-item .price {
+  color: #ff5041;
+}
+
+.new-comers-item {
+  position: relative;
+}
+
+.new-comers-item .act-end {
+  position: absolute;
+  height: 60rpx;
+  border-radius: 10rpx;
+  background: rgba(0, 0, 0, 0.5);
+  color: #fff;
+  font-size: 28rpx;
+  text-align: center;
+  line-height: 60rpx;
+  left: 50%;
+  top: 120rpx;
+  padding: 0 12rpx;
+  transform: translateX(-50%);
+}

+ 65 - 0
lionfish_comshop/components/image/index.js

@@ -0,0 +1,65 @@
+Component({
+  properties: {
+    defaultImage: String,
+    imgType: {
+      type: Number,
+      value: 2
+    },
+    loadImage: {
+      type: String,
+      observer: function (t) {
+        if (t) {
+          var e = Math.ceil(wx.getSystemInfoSync().pixelRatio), i = t + "?imageView2/" + this.data.imgType + "/w/" + this.getPx(this.data.width) * e + "/h/" + this.getPx(this.data.height) * e + "/ignore-error/1";
+          this.setData({
+            img: i,
+            w: this.getPx(this.data.width),
+            h: this.getPx(this.data.height)
+          });
+        }
+      }
+    },
+    width: String,
+    height: String,
+    canPreview: {
+      type: Boolean,
+      value: false
+    },
+    isLazy: {
+      type: Boolean,
+      value: false
+    },
+    isCircle: {
+      type: Boolean,
+      value: false
+    }
+  },
+  data: {
+    isLoad: false,
+    img: "",
+    systemInfo: {},
+    w: 0,
+    h: 0
+  },
+  methods: {
+    imageLoad: function () {
+      this.setData({
+        isLoad: true
+      });
+    },
+    getPx: function (t) {
+      var e = wx.getSystemInfoSync();
+      return Math.round(e.windowWidth / 375 * t);
+    },
+    preview: function () {
+      this.data.canPreview && wx.previewImage({
+        urls: [this.data.loadImage],
+        fail: function (t) {
+          wx.showToast({
+            title: "预览图片失败,请重试",
+            icon: "none"
+          }), console.log(t);
+        }
+      });
+    }
+  }
+});

+ 4 - 0
lionfish_comshop/components/image/index.json

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

+ 4 - 0
lionfish_comshop/components/image/index.wxml

@@ -0,0 +1,4 @@
+<view class="img-view" style="width:{{w}}px;height:{{h}}px;">
+  <image class='img-image' bindload="imageLoad" bindtap="preview" lazyLoad="{{isLazy}}" mode="aspectFill" src="{{img}}" style="width:{{w}}px;height:{{h}}px;border-radius:{{isCircle?'50%':''}};"></image>
+  <image class='img-image' hidden="{{isLoad}}" src="{{defaultImage}}" style="width:{{w}}px;height:{{h}}px;"></image>
+</view>

+ 8 - 0
lionfish_comshop/components/image/index.wxss

@@ -0,0 +1,8 @@
+.img-view {
+  display: inline-block;
+  position: relative;
+}
+
+.img-view .img-image {
+  position: absolute;
+}

+ 60 - 0
lionfish_comshop/components/img/index.js

@@ -0,0 +1,60 @@
+var app = getApp();
+
+Component({
+  externalClasses: ["i-class"],
+  properties: {
+    defaultImage: String,
+    imgType: {
+      type: Number,
+      value: 2
+    },
+    loadImage: {
+      type: String,
+      observer: function (val) {
+        if (val) {
+          var pixelRatio = Math.ceil(app.globalData.systemInfo.pixelRatio),
+            img = val + "?imageView2/" + this.data.imgType + "/w/" + this.getPx(this.data.width) * pixelRatio + "/h/" + this.getPx(this.data.height) * pixelRatio + "/ignore-error/1";
+          this.setData({
+            img: img
+          });
+        }
+      }
+    },
+    width: String,
+    height: String,
+    canPreview: {
+      type: Boolean,
+      value: false
+    },
+    isLazy: {
+      type: Boolean,
+      value: false
+    }
+  },
+  methods: {
+    imageLoad: function () {
+      this.setData({
+        isLoad: true
+      });
+    },
+    bindError: function (error) {
+      console.log(error);
+    },
+    getPx: function (e) {
+      var sysInfo = wx.getSystemInfoSync();
+      console.log()
+      return Math.round(sysInfo.windowWidth / 375 * e);
+    },
+    preview: function () {
+      this.data.canPreview && wx.previewImage({
+        urls: [this.data.loadImage],
+        fail: function (error) {
+          wx.showToast({
+            title: "预览图片失败,请重试",
+            icon: "none"
+          }), console.log(error);
+        }
+      });
+    }
+  }
+});

+ 4 - 0
lionfish_comshop/components/img/index.json

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

+ 4 - 0
lionfish_comshop/components/img/index.wxml

@@ -0,0 +1,4 @@
+<view class="i-class img-content">
+  <image class="i-class img-def" src="{{defaultImage}}"></image>
+  <image binderror="bindError" bindload="imageLoad" bindtap="preview" class="i-class img-def opacity {{isLoad?'show-img':''}}" lazyLoad="{{isLazy}}" mode="aspectFill" src="{{img}}"></image>
+</view>

+ 16 - 0
lionfish_comshop/components/img/index.wxss

@@ -0,0 +1,16 @@
+.img-content {
+  position: relative;
+}
+
+.img-def {
+  position: absolute !important;
+  transition: opacity 0.1s;
+}
+
+.opacity {
+  opacity: 0;
+}
+
+.show-img {
+  opacity: 1;
+}

+ 31 - 0
lionfish_comshop/components/index-item/index.js

@@ -0,0 +1,31 @@
+Component({
+  externalClasses: ["i-class"],
+  properties: {
+    name: {
+      type: String,
+      value: ""
+    }
+  },
+  relations: {
+    "../index/index": {
+      type: "parent"
+    }
+  },
+  data: {
+    top: 0,
+    height: 0,
+    currentName: ""
+  },
+  methods: {
+    updateDataChange: function () {
+      var that = this;
+      wx.createSelectorQuery().in(this).select(".i-index-item").boundingClientRect(function (t) {
+        that.setData({
+          top: t.top,
+          height: t.height,
+          currentName: that.data.name
+        });
+      }).exec();
+    }
+  }
+});

+ 4 - 0
lionfish_comshop/components/index-item/index.json

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

+ 6 - 0
lionfish_comshop/components/index-item/index.wxml

@@ -0,0 +1,6 @@
+<view class="i-index-item i-class">
+  <view class="i-index-item-header">{{name}}</view>
+  <view class="i-index-item-content">
+    <slot></slot>
+  </view>
+</view>

+ 12 - 0
lionfish_comshop/components/index-item/index.wxss

@@ -0,0 +1,12 @@
+.i-index-item-header {
+  height: 70rpx;
+  line-height: 70rpx;
+  font-size: 26rpx;
+  padding-left: 40rpx;
+  color: #999;
+  background: #f6f6f6;
+}
+
+.i-index-item-content {
+  background: #fff;
+}

+ 152 - 0
lionfish_comshop/components/index/index.js

@@ -0,0 +1,152 @@
+var t = getApp();
+
+Component({
+  externalClasses: ["i-class"],
+  properties: {
+    height: {
+      type: String,
+      value: "300",
+      observer: function (val) {
+        if (val) {
+          var sHeight = this.setScrollStyle(val);
+          this.setData({
+            scrollHeight: sHeight
+          });
+        }
+      }
+    },
+    itemHeight: {
+      type: Number,
+      value: 18
+    },
+    localCity: {
+      type: Object,
+    }
+  },
+  relations: {
+    "../index-item/index": {
+      type: "child",
+      linked: function () {
+        this._updateDataChange();
+      },
+      linkChanged: function () {
+        this._updateDataChange();
+      },
+      unlinked: function () {
+        this._updateDataChange();
+      }
+    }
+  },
+  data: {
+    scrollTop: 0,
+    fixedData: [],
+    current: 0,
+    timer: null,
+    startTop: 0,
+    itemLength: 0,
+    currentName: "",
+    isTouches: false,
+    localCity: {},
+    scrollHeight: ""
+  },
+  attached: function () {
+    // let city = wx.getStorageSync('city');
+    // this.setData({
+    //   localCity: city
+    // });
+  },
+  methods: {
+    changeGPSCommunity: function () {
+      wx.setStorage({
+        key: "city_id",
+        data: 0
+      })
+      var e = getCurrentPages(), a = 1;
+      e[e.length - 2].route.indexOf("/position/search") > -1 && (a = 2), t.globalData.changeCity = this.data.localCity,
+        wx.navigateBack({
+          delta: a
+        });
+    },
+    setScrollStyle: function (t) {
+      for (var e = ["%", "px", "rem", "rpx", "em", "rem"], a = !1, i = 0; i < e.length; i++) {
+        var n = e[i];
+        if (t.indexOf(n) > -1) {
+          a = !0;
+          break;
+        }
+      }
+      return "height:" + (a ? t : t + "px");
+    },
+    loop: function () { },
+    _updateDataChange: function () {
+      var t = this, e = this.getRelationNodes("../index-item/index"), a = e.length, i = this.data.fixedData;
+      a > 0 && (this.data.timer && (clearTimeout(this.data.timer), this.setData({
+        timer: null
+      })), this.data.timer = setTimeout(function () {
+        var a = [];
+        e.forEach(function (t) {
+          t.data.name && -1 === i.indexOf(t.data.name) && (a.push(t.data.name), t.updateDataChange());
+        }), t.setData({
+          fixedData: a,
+          itemLength: e.length
+        }), t.setTouchStartVal();
+      }, 0), this.setData({
+        timer: this.data.timer
+      }));
+    },
+    handlerScroll: function (t) {
+      var e = this, a = t.detail.scrollTop;
+      this.getRelationNodes("../index-item/index").forEach(function (t, i) {
+        var n = t.data, r = n.top + n.height;
+        a < r && a >= n.top && e.setData({
+          current: i,
+          currentName: n.currentName
+        });
+      });
+    },
+    getCurrentItem: function (t) {
+      var e = this.getRelationNodes("../index-item/index"), a = {};
+      return t < 0 && (t = 0), a = e[t].data, a.total = e.length, a;
+    },
+    triggerCallback: function (t) {
+      this.triggerEvent("change", t);
+    },
+    handlerFixedTap: function (t) {
+      var e = t.currentTarget.dataset.index, a = this.getCurrentItem(e);
+      this.setData({
+        scrollTop: a.top,
+        currentName: a.currentName,
+        isTouches: !0
+      }), this.triggerCallback({
+        index: e,
+        current: a.currentName
+      });
+    },
+    handlerTouchMove: function (t) {
+      var e = this.data, a = (t.touches[0] || {}).pageY - e.startTop, i = Math.ceil(a / e.itemHeight);
+      i = i >= e.itemLength ? e.itemLength - 1 : i;
+      var n = this.getCurrentItem(i);
+      n.name !== this.data.currentName && wx.vibrateShort(), this.setData({
+        scrollTop: n.top,
+        currentName: n.name,
+        isTouches: !0
+      }), this.triggerCallback({
+        index: i,
+        current: n.name
+      });
+    },
+    handlerTouchEnd: function () {
+      this.setData({
+        isTouches: !1
+      });
+    },
+    setTouchStartVal: function () {
+      var t = this;
+      wx.createSelectorQuery().in(this).select(".i-index-fixed").boundingClientRect(function (e) {
+        t.setData({
+          startTop: e.top
+        });
+      }).exec();
+    }
+  }
+});

+ 4 - 0
lionfish_comshop/components/index/index.json

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

+ 16 - 0
lionfish_comshop/components/index/index.wxml

@@ -0,0 +1,16 @@
+<view class="i-index i-class">
+  <scroll-view scrollY bindscroll="handlerScroll" scrollTop="{{scrollTop}}" style="{{scrollHeight}}">
+    <view class="index-title">当前定位</view>
+    <view bindtap="changeGPSCommunity" class="local-position-content">
+      <span>{{localCity.districtName}}</span>
+      GPS定位
+    </view>
+    <slot></slot>
+    <view catchtouchend="handlerTouchEnd" catchtouchmove="handlerTouchMove" catchtouchstart="handlerTouchMove" class="i-index-fixed">
+      <view catchtap="handlerFixedTap" class="i-index-fixed-item" data-index="{{index}}" wx:for="{{fixedData}}" wx:key="{{index}}">
+        {{item}}
+      </view>
+    </view>
+    <view class="i-index-tooltip" style="{{isTouches?'display:block':'display:none'}}">{{currentName}}</view>
+  </scroll-view>
+</view>

+ 0 - 0
lionfish_comshop/components/index/index.wxss


Some files were not shown because too many files changed in this diff