Explorar o código

上传2.6小程序文件

liaofei %!s(int64=6) %!d(string=hai) anos
pai
achega
7ce7c17408
Modificáronse 100 ficheiros con 5597 adicións e 0 borrados
  1. 118 0
      view/crmebNewUI/app.js
  2. 111 0
      view/crmebNewUI/app.json
  3. 68 0
      view/crmebNewUI/app.wxss
  4. 55 0
      view/crmebNewUI/components/address-window/index.js
  5. 4 0
      view/crmebNewUI/components/address-window/index.json
  6. 17 0
      view/crmebNewUI/components/address-window/index.wxml
  7. 15 0
      view/crmebNewUI/components/address-window/index.wxss
  8. 241 0
      view/crmebNewUI/components/authorize/authorize.js
  9. 3 0
      view/crmebNewUI/components/authorize/authorize.json
  10. 10 0
      view/crmebNewUI/components/authorize/authorize.wxml
  11. 11 0
      view/crmebNewUI/components/authorize/authorize.wxss
  12. 49 0
      view/crmebNewUI/components/coupon-list-window/index.js
  13. 4 0
      view/crmebNewUI/components/coupon-list-window/index.json
  14. 20 0
      view/crmebNewUI/components/coupon-list-window/index.wxml
  15. 8 0
      view/crmebNewUI/components/coupon-list-window/index.wxss
  16. 24 0
      view/crmebNewUI/components/coupon-window/index.js
  17. 3 0
      view/crmebNewUI/components/coupon-window/index.json
  18. 16 0
      view/crmebNewUI/components/coupon-window/index.wxml
  19. 14 0
      view/crmebNewUI/components/coupon-window/index.wxss
  20. 16 0
      view/crmebNewUI/components/goodList/index.js
  21. 4 0
      view/crmebNewUI/components/goodList/index.json
  22. 21 0
      view/crmebNewUI/components/goodList/index.wxml
  23. 14 0
      view/crmebNewUI/components/goodList/index.wxss
  24. 77 0
      view/crmebNewUI/components/home/index.js
  25. 4 0
      view/crmebNewUI/components/home/index.json
  26. 9 0
      view/crmebNewUI/components/home/index.wxml
  27. 7 0
      view/crmebNewUI/components/home/index.wxss
  28. 57 0
      view/crmebNewUI/components/navbar/index.js
  29. 4 0
      view/crmebNewUI/components/navbar/index.json
  30. 13 0
      view/crmebNewUI/components/navbar/index.wxml
  31. 15 0
      view/crmebNewUI/components/navbar/index.wxss
  32. 21 0
      view/crmebNewUI/components/orderGoods/index.js
  33. 4 0
      view/crmebNewUI/components/orderGoods/index.json
  34. 22 0
      view/crmebNewUI/components/orderGoods/index.wxml
  35. 6 0
      view/crmebNewUI/components/orderGoods/index.wxss
  36. 68 0
      view/crmebNewUI/components/product-window/index.js
  37. 4 0
      view/crmebNewUI/components/product-window/index.json
  38. 30 0
      view/crmebNewUI/components/product-window/index.wxml
  39. 28 0
      view/crmebNewUI/components/product-window/index.wxss
  40. 26 0
      view/crmebNewUI/components/productConSwiper/index.js
  41. 4 0
      view/crmebNewUI/components/productConSwiper/index.json
  42. 11 0
      view/crmebNewUI/components/productConSwiper/index.wxml
  43. 4 0
      view/crmebNewUI/components/productConSwiper/index.wxss
  44. 21 0
      view/crmebNewUI/components/promotionGood/index.js
  45. 4 0
      view/crmebNewUI/components/promotionGood/index.json
  46. 17 0
      view/crmebNewUI/components/promotionGood/index.wxml
  47. 11 0
      view/crmebNewUI/components/promotionGood/index.wxss
  48. 15 0
      view/crmebNewUI/components/recommend/index.js
  49. 4 0
      view/crmebNewUI/components/recommend/index.json
  50. 14 0
      view/crmebNewUI/components/recommend/index.wxml
  51. 13 0
      view/crmebNewUI/components/recommend/index.wxss
  52. 27 0
      view/crmebNewUI/components/share-red-packets/index.js
  53. 4 0
      view/crmebNewUI/components/share-red-packets/index.json
  54. 13 0
      view/crmebNewUI/components/share-red-packets/index.wxml
  55. 12 0
      view/crmebNewUI/components/share-red-packets/index.wxss
  56. 27 0
      view/crmebNewUI/components/swipers/index.js
  57. 4 0
      view/crmebNewUI/components/swipers/index.json
  58. 12 0
      view/crmebNewUI/components/swipers/index.wxml
  59. 7 0
      view/crmebNewUI/components/swipers/index.wxss
  60. 24 0
      view/crmebNewUI/components/userEvaluation/index.js
  61. 3 0
      view/crmebNewUI/components/userEvaluation/index.json
  62. 24 0
      view/crmebNewUI/components/userEvaluation/index.wxml
  63. 14 0
      view/crmebNewUI/components/userEvaluation/index.wxss
  64. 3494 0
      view/crmebNewUI/css/animate.wxss
  65. 16 0
      view/crmebNewUI/css/guildford.wxss
  66. 94 0
      view/crmebNewUI/css/style.wxss
  67. 463 0
      view/crmebNewUI/font/iconfont.wxss
  68. BIN=BIN
      view/crmebNewUI/images/1-001.png
  69. BIN=BIN
      view/crmebNewUI/images/1-002.png
  70. BIN=BIN
      view/crmebNewUI/images/2-001.png
  71. BIN=BIN
      view/crmebNewUI/images/2-002.png
  72. BIN=BIN
      view/crmebNewUI/images/3-001.png
  73. BIN=BIN
      view/crmebNewUI/images/3-002.png
  74. BIN=BIN
      view/crmebNewUI/images/4-001.png
  75. BIN=BIN
      view/crmebNewUI/images/4-002.png
  76. BIN=BIN
      view/crmebNewUI/images/accountBg.png
  77. BIN=BIN
      view/crmebNewUI/images/address.png
  78. BIN=BIN
      view/crmebNewUI/images/angle.png
  79. BIN=BIN
      view/crmebNewUI/images/balance.png
  80. BIN=BIN
      view/crmebNewUI/images/bargain.png
  81. BIN=BIN
      view/crmebNewUI/images/bargainBg.jpg
  82. BIN=BIN
      view/crmebNewUI/images/close.gif
  83. BIN=BIN
      view/crmebNewUI/images/collection.png
  84. BIN=BIN
      view/crmebNewUI/images/coupon-window.png
  85. BIN=BIN
      view/crmebNewUI/images/coupon-window2.png
  86. BIN=BIN
      view/crmebNewUI/images/coupon.png
  87. BIN=BIN
      view/crmebNewUI/images/coupon2.png
  88. BIN=BIN
      view/crmebNewUI/images/customer.png
  89. BIN=BIN
      view/crmebNewUI/images/dfh.png
  90. BIN=BIN
      view/crmebNewUI/images/dfk.png
  91. BIN=BIN
      view/crmebNewUI/images/down.png
  92. BIN=BIN
      view/crmebNewUI/images/dpj.png
  93. BIN=BIN
      view/crmebNewUI/images/dsh.png
  94. BIN=BIN
      view/crmebNewUI/images/examine.png
  95. BIN=BIN
      view/crmebNewUI/images/extension.png
  96. BIN=BIN
      view/crmebNewUI/images/gift.png
  97. BIN=BIN
      view/crmebNewUI/images/horn.png
  98. BIN=BIN
      view/crmebNewUI/images/left.png
  99. BIN=BIN
      view/crmebNewUI/images/light.png
  100. 0 0
      view/crmebNewUI/images/line.jpg

+ 118 - 0
view/crmebNewUI/app.js

@@ -0,0 +1,118 @@
+//app.js
+
+//请配置请求url
+//请修改开发者工具中【详情】->【AppID】改为自己的Appid
+//请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret
+//请不要修改globalData中的其他配置,如自行开发可不用理会这句话
+//配置完以上就可以访问小程序啦
+const URL ='';
+
+const util = require('utils/util.js');
+
+App({
+  onLaunch: function (option) {
+    if (URL==''){
+      console.error("请配置请求url\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
+      return false;
+    }
+    if (option.query.hasOwnProperty('scene') && option.scene == 1047) this.globalData.code = option.query.scene;
+    if (option.query.hasOwnProperty('scene') && option.scene == 1001) this.globalData.spid = option.query.scene;
+    this.getMyMenus();
+    // 展示本地存储能力
+    var logs = wx.getStorageSync('logs') || [],that=this;
+    logs.unshift(Date.now())
+    wx.setStorageSync('logs', logs);
+    // 获取导航高度;
+    wx.getSystemInfo({
+      success: res => {
+        //导航高度
+        this.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 97;
+      }, fail(err) {
+        console.log(err);
+      }
+    })
+  },
+  globalData: {
+    navHeight: 0,
+    routineStyle: '#ffffff',
+    openPages: '',
+    spid: 0,
+    code:0,
+    urlImages: '',
+    url: URL,
+    token: '',
+    isLog:false,
+    MyMenus:[],
+    header: {
+      'content-type': 'application/json',
+      'token': '' 
+    }
+  },
+  /**
+   * 
+   * 获取个人中心图标
+  */
+  getMyMenus: function () {
+    var that = this;
+    if (that.globalData.MyMenus.legnth) return;
+    that.baseGet(that.U({ c: 'public_api', a: 'get_my_naviga'},that.globalData.url), function (res) {
+      that.globalData.MyMenus = res.data.routine_my_menus;
+    });
+  },
+  /*
+  * POST 访问快捷方法
+  * @param string | object url 访问地址
+  * @param callable successCallback 成功执行函数
+  * @param callable errorCallback 失败执行函数
+  * @param object header 访问header头
+  */
+  basePost: function (url, data, successCallback, errorCallback, header) {
+    if (header == undefined) header = this.globalData.header;
+    header['token'] = this.globalData.token;
+    util.basePost(url, data, successCallback, errorCallback,header);
+  },
+  /*
+  * GET 访问快捷方法
+  * @param string | object url 访问地址
+  * @param callable successCallback 成功执行函数
+  * @param callable errorCallback 失败执行函数
+  * @param isMsg 错误信息提醒 默认提醒
+  * @param object header 访问header头
+  */
+  baseGet: function (url, successCallback, errorCallback, isMsg, header) {
+    if (header == undefined) header = this.globalData.header;
+    header['token'] = this.globalData.token;
+    util.baseGet(url, successCallback, errorCallback, isMsg,header);
+  },
+  /*
+  * 信息提示 + 跳转
+  * @param object opt {title:'提示语',icon:''} | url
+  * @param object to_url 跳转url 有5种跳转方式 {tab:1-5,url:跳转地址}
+  */
+  Tips: function (opt, to_url) { 
+    return util.Tips(opt, to_url);
+  },
+  /*
+  * 访问Url拼接
+  * @param object opt {c:'控制器',a:'方法',q:{get参数},p:{parma参数}}
+  * @param url 接口访问地址
+  * @return string
+  */
+  U: function (opt,url){ 
+    return util.U(opt,url);
+  },
+  /**
+   * 快捷调取助手函数
+  */
+  help:function()
+  {
+    return util.$h;
+  },
+  /*
+  * 合并数组
+  * @param array list 请求返回数据
+  * @param array sp 原始数组
+  * @return array
+  */
+  SplitArray: function (list, sp) { return util.SplitArray(list, sp)},
+})

+ 111 - 0
view/crmebNewUI/app.json

@@ -0,0 +1,111 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/goods_cate/goods_cate",
+    "pages/quality-recommend/index",
+    "pages/order_details/index",
+    "pages/user_sgin/index",
+    "pages/user/user",
+    "pages/user_get_coupon/index",
+    "pages/order_confirm/index",
+    "pages/goods_list/goods_list",
+    "pages/user_coupon/index",
+    "pages/goods_comment_list/index",
+    "pages/user_goods_collection/index",
+    "pages/user_address_list/index",
+    "pages/news_list/index",
+    "pages/goods_search/index",
+    "pages/user_vip/index",
+    "pages/user_spread_money/index",
+    "pages/user_integral/index",
+    "pages/user_bill/index",
+    "pages/user_money/index",
+    "pages/user_spread_user/index",
+    "pages/user_sgin_list/index",
+    "pages/order_list/index",
+    "pages/goods_details/index",
+    "pages/news_details/index",
+    "pages/promoter-list/index",
+    "pages/promoter-order/index",
+    "pages/cash-audit/index",
+    "pages/user_cash/index",
+    "pages/user_return_list/index",
+    "pages/user_goods_return/index",
+    "pages/goods_return/index",
+    "pages/goods_comment_con/index",
+    "pages/promotional-items/index",
+    "pages/first-new-product/index",
+    "pages/user_spread_code/index",
+    "pages/cut-poster/index",
+    "pages/user_info/index",
+    "pages/order_pay_status/index",
+    "pages/goods_logistics/index",
+    "pages/user_address/index",
+    "pages/order_addcart/order_addcart",
+    "pages/logs/logs",
+    "pages/user_payment/index",
+    "components/navbar/index",
+    "components/recommend/index",
+    "components/share-red-packets/index",
+    "components/orderGoods/index",
+    "components/swipers/index",
+    "components/goodList/index",
+    "components/promotionGood/index",
+    "components/productConSwiper/index",
+    "components/userEvaluation/index",
+    "components/coupon-window/index",
+    "components/product-window/index",
+    "components/coupon-list-window/index",
+    "components/address-window/index",
+    "components/home/index"
+  ],
+  "subPackages": [
+    {
+      "root": "pages/activity",
+      "name": "activity",
+      "pages": [
+        "goods_seckill_details/index",
+        "goods_seckill/index"
+      ]
+    }
+  ],
+  "window": {
+    "backgroundTextStyle": "dark",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "WeChat",
+    "navigationBarTextStyle": "black",
+    "navigationStyle": "custom"
+  },
+  "tabBar": {
+    "backgroundColor": "#ffffff",
+    "color": "#282828",
+    "selectedColor": "#e93323",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "iconPath": "images/1-001.png",
+        "selectedIconPath": "images/1-002.png",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/goods_cate/goods_cate",
+        "iconPath": "images/2-001.png",
+        "selectedIconPath": "images/2-002.png",
+        "text": "分类"
+      },
+      {
+        "pagePath": "pages/order_addcart/order_addcart",
+        "iconPath": "images/3-001.png",
+        "selectedIconPath": "images/3-002.png",
+        "text": "购物车"
+      },
+      {
+        "pagePath": "pages/user/user",
+        "iconPath": "images/4-001.png",
+        "selectedIconPath": "images/4-002.png",
+        "text": "我的"
+      }
+    ]
+  },
+  "sitemapLocation": "sitemap.json"
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 68 - 0
view/crmebNewUI/app.wxss


+ 55 - 0
view/crmebNewUI/components/address-window/index.js

@@ -0,0 +1,55 @@
+var app = getApp();
+Component({
+  properties: {
+    //跳转url链接
+    pagesUrl:{
+      type:String,
+      value:'',
+    },
+    address:{
+      type: Object,
+      value:{
+        address:true,
+        addressId:0,
+      }
+    },
+    isLog:{
+      type:Boolean,
+      value:false,
+    },
+  },
+  data: {
+    active: 0,
+    //地址列表
+    addressList:[],
+  },
+  attached: function () {
+    
+  },
+  methods: {
+    tapAddress: function (e) {
+      this.setData({ active: e.currentTarget.dataset.id });
+      this.triggerEvent('OnChangeAddress', e.currentTarget.dataset.addressid);
+    },
+    close: function () {
+      this.setData({ 'address.address': false });
+      this.triggerEvent('changeTextareaStatus');
+    },
+    goAddressPages:function(){
+      this.setData({ 'address.address': false });
+      this.triggerEvent('changeTextareaStatus');
+      wx.navigateTo({url: this.data.pagesUrl});
+    },
+    getAddressList:function(){
+      var that=this;
+      app.baseGet(app.U({ c: "user_api", a:'user_address_list'}),function(res){
+        var addressList=res.data;
+        //处理默认选中项
+        for (var i = 0, leng = addressList.length; i < leng;i++){
+          if (addressList[i].id == that.data.address.addressId) that.setData({ active:i});
+        }
+        that.setData({ addressList: addressList});
+      });
+    }
+  }
+})

+ 4 - 0
view/crmebNewUI/components/address-window/index.json

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

+ 17 - 0
view/crmebNewUI/components/address-window/index.wxml

@@ -0,0 +1,17 @@
+<view class="address-window {{address.address==true?'on':''}}">
+   <view class='title'>选择地址<text class='iconfont icon-guanbi' bindtap='close'></text></view>
+   <view class='list'>
+      <view class='item acea-row row-between-wrapper {{active==index?"font-color":""}}' wx:for="{{addressList}}" data-id='{{index}}' bindtap='tapAddress' wx:key data-addressId="{{item.id}}">
+         <text class='iconfont icon-ditu {{active==index?"font-color":""}}'></text>
+         <view class='address'>
+            <view class='name {{active==index?"font-color":""}}'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
+            <view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
+         </view>
+         <text class='iconfont icon-complete{{active==index?" font-color":""}}'></text>
+      </view>
+   </view>
+   <!-- 无地址 -->
+   <!-- <view class='pictrue'><image src='/images/noCoupon.png'></image></view> -->
+   <view class='addressBnt bg-color' bindtap='goAddressPages'>选择其他地址</view>
+</view>
+<view class='mask' catchtouchmove="true"  hidden='{{address.address==false}}' bindtap='close'></view>

+ 15 - 0
view/crmebNewUI/components/address-window/index.wxss

@@ -0,0 +1,15 @@
+@import '/app.wxss';
+.address-window{background-color:#fff;position:fixed;bottom:0;left:0;width:100%;z-index:101;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
+.address-window.on{transform:translate3d(0,0,0);}
+.address-window .title{font-size:32rpx;font-weight:bold;text-align:center;height:123rpx;line-height:123rpx;position:relative;}
+.address-window .title .iconfont{position:absolute;right:30rpx;color:#8a8a8a;font-size:35rpx;}
+.address-window .list .item{margin-left:30rpx;padding-right:30rpx;border-bottom:1px solid #eee;height:129rpx;font-size:25rpx;color:#333;}
+.address-window .list .item .iconfont{font-size:37rpx;color:#2c2c2c;}
+.address-window .list .item .iconfont.icon-complete{font-size:30rpx;color:#fff;}
+.address-window .list .item .address{width:560rpx;}
+.address-window .list .item .address .name{font-size:28rpx;font-weight:bold;color:#282828;margin-bottom:4rpx;}
+.address-window .list .item .address .name .phone{margin-left:18rpx;}
+.address-window .addressBnt{font-size:30rpx;font-weight:bold;color:#fff;width:690rpx;height:86rpx;border-radius:43rpx;text-align:center;line-height:86rpx;margin:85rpx auto;}
+.address-window .pictrue{width:414rpx;height:336rpx;margin:0 auto;}
+.address-window .pictrue image{width:100%;height:100%;}
+

+ 241 - 0
view/crmebNewUI/components/authorize/authorize.js

@@ -0,0 +1,241 @@
+var app = getApp();
+Component({
+  properties: {
+    iShidden: {
+      type: Boolean,
+      value: true,
+    },
+    //是否自动登录
+    isAuto: {
+      type: Boolean,
+      value: true,
+    },
+  },
+  data: {
+    cloneIner: null,
+    url: app.globalData.url,
+    loading:false,
+  },
+  pageLifetimes: {
+    hide: function () {
+      //关闭页面时销毁定时器
+      if (this.data.cloneIner) clearInterval(this.data.cloneIner);
+    },
+    show: function () {
+      //打开页面销毁定时器
+      if (this.data.cloneIner) clearInterval(this.data.cloneIner);
+    },
+  },
+  detached() {
+    if (this.data.cloneIner) clearInterval(this.data.cloneIner);
+  },
+  attached() {
+    this.get_logo_url();
+    this.setAuthStatus();
+  },
+  methods: {
+    get_logo_url: function () {
+      if (wx.getStorageSync('logo_url')) return this.setData({ logo_url: wx.getStorageSync('logo_url') });
+      app.baseGet(app.U({ c: 'public_api', a: 'get_logo_url' }), function (res) {
+        wx.setStorageSync('logo_url', res.data.logo_url);
+        this.setData({ logo_url: res.data.logo_url });
+      }.bind(this));
+    },
+    //监听登录状态
+    WatchIsLogin: function () {
+      this.data.cloneIner = setInterval(function () {
+        //防止死循环,超过错误次数终止监听
+        if (this.getErrorCount()) return clearInterval(this.data.cloneIner);
+        if (app.globalData.token == '' && this.data.loading===false) this.setAuthStatus();
+      }.bind(this),800);
+      this.setData({ cloneIner: this.data.cloneIner });
+    },
+    //检测登录状态并执行自动登录
+    setAuthStatus() {
+      var that = this;
+      that.setErrorCount();
+      wx.getSetting({
+        success(res) {
+          if (!res.authSetting['scope.userInfo']) {
+            //没有授权不会自动弹出登录框
+            if (that.data.isAuto === false) return;
+            //自动弹出授权
+            that.setData({ iShidden: false });
+          } else {
+            //自动登录
+            that.setData({ iShidden: true });
+            if (app.globalData.token) {
+              that.triggerEvent('onLoadFun', app.globalData.token);
+              that.WatchIsLogin();
+            } else {
+              wx.showLoading({ title: '正在登录中' });
+              that.getUserInfoBydecryptCode();
+            }
+          }
+        }
+      })
+    },
+    //访问服务器获得cache_key
+    setCode(code, successFn, errotFn) {
+      var that = this;
+      that.setData({ loading: true });
+      app.basePost(app.U({ c: 'Login', a: 'setCode' }), { code: code }, function (res) {
+        that.setData({ loading: false });
+        wx.setStorage({ key: 'cache_key', data: res.data.cache_key});
+        successFn && successFn(res);
+      }, function (res) {
+        that.setData({ loading: false });
+        if (errotFn) errotFn(res);
+        else return app.Tips({ title: '获取cache_key失败' });
+      });
+    },
+    //获取code
+    getSessionKey(code, successFn, errotFn) {
+      var that = this;
+      wx.checkSession({
+        success: function (res) {
+          wx.getStorage({
+            key:'cache_key',
+            success:function(res){
+              if (res.data){
+                successFn && successFn();
+              }else{
+                that.setCode(code, successFn, errotFn);
+              }
+            },
+            fail(res){
+              that.setCode(code, successFn, errotFn);
+            },
+          });
+        },
+        fail: function () {
+          that.setCode(code, successFn, errotFn);
+        }
+      });
+    },
+    login:function(){
+      var that=this;
+      wx.login({
+        success: function (res) {
+          if (!res.code) return app.Tips({ title: '登录失败!' + res.errMsg });
+          //获取cache_key并缓存
+          that.getSessionKey(res.code, function () {
+            that.getUserInfoBydecryptCode();
+          });
+        },
+        fail() {
+          wx.hideLoading();
+        }
+      })
+    },
+    //授权
+    setUserInfo(e) {
+      wx.showLoading({ title: '正在登录中' });
+      this.login();
+    },
+    close: function () {
+      if (this.data.isAuto) return;
+      this.setData({ iShidden: true });
+    },
+    //登录获取访问权限
+    getUserInfoBydecryptCode: function () {
+      var that = this;
+      if (this.getErrorCount()){
+        this.setData({ iShidden: false, ErrorCount: 0 });
+        return app.Tips({ title: '获取code失败,请重新授权尝试获取!' });
+      } 
+      wx.getStorage({
+        key:'cache_key',
+        success:function(res){
+          if(res.data){
+            var cache_key = res.data;
+            wx.getUserInfo({
+              lang: 'zh_CN',
+              success: function (res) {
+                var pdata = {};
+                pdata.spid = app.globalData.spid;//获取推广人ID
+                pdata.code = app.globalData.code;//获取推广人分享二维码ID
+                if (res.iv) {
+                  pdata.iv = encodeURI(res.iv);
+                  pdata.encryptedData = res.encryptedData;
+                  pdata.cache_key = cache_key;
+                  //获取用户信息生成访问token
+                  that.setData({ loading: true });
+                  app.basePost(app.U({ c: 'login', a: 'index' }), pdata, function (res) {
+                    that.setData({ loading: false });
+                    if (res.data.status == 0) return app.Tips({ title: '抱歉,您已被禁止登录!' });
+                    else if (res.data.status == 410) {
+                      wx.clearStorage();
+                      wx.hideLoading();
+                      that.setErrorCount();
+                      that.login();
+                      return false;
+                    }
+                    //取消登录提示
+                    wx.hideLoading();
+                    //关闭登录弹出窗口
+                    that.setData({ iShidden: true, ErrorCount: 0 });
+                    //保存token和记录登录状态
+                    app.globalData.token = res.data.token;
+                    app.globalData.isLog = true;
+                    //执行登录完成回调
+                    that.triggerEvent('onLoadFun', app.globalData.uid);
+                    //清除定时器
+                    if (that.data.cloneIner) clearInterval(that.data.cloneIner);
+                    //监听登录状态
+                    that.WatchIsLogin();
+                  }, function (res) {
+                    that.setData({ loading: false });
+                    wx.hideLoading();
+                    that.setErrorCount();
+                    wx.clearStorage();
+                    return app.Tips({ title: res.msg });
+                  });
+                } else {
+                  wx.hideLoading();
+                  wx.clearStorage();
+                  that.setErrorCount();
+                  return app.Tips({ title: '用户信息获取失败!' });
+                }
+              },
+              fail: function () {
+                wx.hideLoading();
+                wx.clearStorage();
+                that.setErrorCount();
+                if (that.data.isAuto) that.login();
+              },
+            })
+          }else{
+            wx.hideLoading();
+            wx.clearStorage();
+            that.setErrorCount();
+            if (that.data.isAuto) that.login();
+            return false;
+          }
+        },
+        fail:function(){
+          wx.hideLoading();
+          wx.clearStorage();
+          that.setErrorCount();
+          if (that.data.isAuto) that.login();
+        }
+      })
+    },
+    /**
+     * 处理错误次数,防止死循环
+     * 
+    */
+    setErrorCount: function () {
+      if (!this.data.ErrorCount) this.data.ErrorCount = 1;
+      else this.data.ErrorCount++;
+      this.setData({ ErrorCount: this.data.ErrorCount });
+    },
+    /**
+     * 获取错误次数,是否终止监听
+     * 
+    */
+    getErrorCount: function () {
+      return this.data.ErrorCount >= 10 ? true : false;
+    }
+  },
+})

+ 3 - 0
view/crmebNewUI/components/authorize/authorize.json

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

+ 10 - 0
view/crmebNewUI/components/authorize/authorize.wxml

@@ -0,0 +1,10 @@
+<!--pages/authorize/authorize.wxml-->
+<view class='Popup' hidden='{{iShidden}}'>
+   <image src='{{url}}{{logo_url}}'></image>
+   <view class='title'>授权提醒</view>
+   <view class='tip'>请授权头像等信息,以便为您提供更好的服务</view>
+   <view class='bottom flex'>
+      <button class='item grant on'  type="primary" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="setUserInfo">去授权</button>
+   </view>
+</view>
+<view class='mask' hidden='{{iShidden}}' catchtouchmove="true" bindtap='close'></view>

+ 11 - 0
view/crmebNewUI/components/authorize/authorize.wxss

@@ -0,0 +1,11 @@
+/* pages/authorize/authorize.wxss */
+@import "../../app.wxss"; 
+
+.Popup{width:500rpx;background-color:#fff;position:fixed;top:50%;left:50%;margin-left:-250rpx;transform:translateY(-50%);z-index:320;}
+.Popup image{width:150rpx;height:150rpx;margin:-67rpx auto 0 auto;display:block;border: 8rpx solid #fff;border-radius: 50%}
+.Popup .title{font-size:28rpx;color:#000;text-align:center;margin-top: 30rpx}
+.Popup .tip{font-size:22rpx;color:#555;padding:0 24rpx;margin-top:25rpx;}
+.Popup .bottom .item{width:50%;height:80rpx;background-color:#eeeeee;text-align:center;line-height:80rpx;font-size:24rpx;color:#666;margin-top:54rpx;}
+.Popup .bottom .item.on{width: 100%}
+.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:#e93323;border-radius:0;padding:0;}
+.mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,0.65);z-index:310;}

+ 49 - 0
view/crmebNewUI/components/coupon-list-window/index.js

@@ -0,0 +1,49 @@
+var app = getApp();
+Component({
+  properties: {
+    coupon: {
+      type: Object,
+      value:{
+        list:[],
+        statusTile:''
+      },
+    },
+    //打开状态 0=领取优惠券,1=使用优惠券
+    openType:{
+      type:Number,
+      value:0,
+    }
+  },
+  data: {
+  },
+  attached: function () {
+  },
+  methods: {
+    close: function () {
+      this.triggerEvent('ChangCouponsClone');
+    },
+    getCouponUser:function(e){
+      var that = this;
+      var id = e.currentTarget.dataset.id;
+      var index = e.currentTarget.dataset.index;
+      var list = that.data.coupon.list;
+      if (list[index].is_use == true && this.data.openType==0) return true;
+      switch (this.data.openType){
+        case 0:
+          //领取优惠券
+          app.basePost(app.U({ c: 'coupons_api', a: 'user_get_coupon' }), { couponId:id},function(res){
+            list[index].is_use=true;
+            that.setData({
+              ['coupon.list']: list
+            });
+            app.Tips({ title: '领取成功' });
+            that.triggerEvent('ChangCoupons',list[index]);
+          });
+        break;
+        case 1:
+          that.triggerEvent('ChangCoupons',index);
+        break;
+      }
+    },
+  }
+})

+ 4 - 0
view/crmebNewUI/components/coupon-list-window/index.json

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

+ 20 - 0
view/crmebNewUI/components/coupon-list-window/index.wxml

@@ -0,0 +1,20 @@
+<view class='coupon-list-window {{coupon.coupon==true?"on":""}}'>
+   <view class='title'>优惠券<text class='iconfont icon-guanbi' bindtap='close'></text></view>
+   <view class='coupon-list' wx:if="{{coupon.list.length}}">
+      <view class='item acea-row row-center-wrapper' wx:for="{{coupon.list}}" bindtap='getCouponUser' data-index='{{index}}' data-id="{{item.id}}" wx:key>
+        <view class='money'>¥<text class='num'>{{item.coupon_price}}</text></view>
+        <view class='text'>
+            <view class='condition line1'>购物满{{item.use_min_price}}元可用</view>
+            <view class='data acea-row row-between-wrapper'>
+              <view>{{item.add_time}}-{{item.end_time}}</view>
+              <view class='bnt gray' wx:if="{{item.is_use}}">{{item.use_title || '已领取'}}</view>
+              <view class='bnt bg-color' wx:else>{{coupon.statusTile || '立即领取'}}</view>
+            </view>
+        </view>
+      </view>
+   </view>
+   <!-- 无优惠券 -->
+   <view class='pictrue' wx:else><image src='/images/noCoupon.png'></image></view>
+</view>
+<view class='mask' catchtouchmove="true" hidden='{{coupon.coupon==false}}' bindtap='close'></view>
+

+ 8 - 0
view/crmebNewUI/components/coupon-list-window/index.wxss

@@ -0,0 +1,8 @@
+@import '/app.wxss';
+.coupon-list-window{position:fixed;bottom:0;left:0;width:100%;background-color:#f5f5f5;border-radius:16rpx 16rpx 0 0;z-index:111;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);z-index: 1000}
+.coupon-list-window.on{transform:translate3d(0,0,0);}
+.coupon-list-window .title{height:124rpx;width:100%;text-align:center;line-height:124rpx;font-size:32rpx;font-weight:bold;position:relative;}
+.coupon-list-window .title .iconfont{position:absolute;right:30rpx;top:50%;transform:translateY(-50%);font-size:35rpx;color:#8a8a8a;font-weight:normal;}
+.coupon-list-window .coupon-list{margin:0 0 50rpx 0;height:550rpx;overflow:auto;}
+.coupon-list-window .pictrue{width:414rpx;height:336rpx;margin:0 auto 50rpx auto;}
+.coupon-list-window .pictrue image{width:100%;height:100%;}

+ 24 - 0
view/crmebNewUI/components/coupon-window/index.js

@@ -0,0 +1,24 @@
+var app = getApp();
+Component({
+  properties: {
+    window:{
+      type: Boolean,
+      value: true,
+    },
+    couponList:{
+      type:Array,
+      value:[],
+    }
+  },
+  data: {
+  
+  },
+  attached: function () {
+  
+  },
+  methods: {
+    close:function(){
+      this.triggerEvent('onColse');
+    }
+  }
+})

+ 3 - 0
view/crmebNewUI/components/coupon-window/index.json

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

+ 16 - 0
view/crmebNewUI/components/coupon-window/index.wxml

@@ -0,0 +1,16 @@
+<view class='coupon-window {{window==true?"on":""}}'>
+   <view class='couponWinList'>
+      <view class='item acea-row row-between-wrapper' wx:for="{{couponList}}" wx:key>
+         <view class='money font-color'>¥<text class='num'>{{item.coupon_price}}</text></view>
+         <view class='text'>
+            <view class='name'>购物买{{item.use_min_price}}减{{item.coupon_price}}</view>
+            <view>{{item.add_time}}-{{item.end_time}}</view>
+         </view>
+      </view>
+   </view>
+   <view class='lid'>
+      <navigator hover-class='none' url='/pages/user_get_coupon/index' class='bnt font-color'>立即领取</navigator>
+      <view class='iconfont icon-guanbi3' bindtap='close'></view>
+   </view>
+</view>
+<view class='mask' catchtouchmove="true" hidden='{{window==false}}'></view>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 14 - 0
view/crmebNewUI/components/coupon-window/index.wxss


+ 16 - 0
view/crmebNewUI/components/goodList/index.js

@@ -0,0 +1,16 @@
+// components/goodList/index.js
+Component({
+  properties: {
+    status: {
+      type: String,
+      value: 0,
+    },
+    bastList: {
+      type: Object,
+      value: [],
+    }
+  },
+  data: {
+    
+  }
+})

+ 4 - 0
view/crmebNewUI/components/goodList/index.json

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

+ 21 - 0
view/crmebNewUI/components/goodList/index.wxml

@@ -0,0 +1,21 @@
+       <view class='goodList'>
+          <block wx:for="{{bastList}}" wx:key>
+            <navigator url='/pages/goods_details/index?id={{item.id}}' class='item acea-row row-between-wrapper'>
+              <view class='pictrue'>
+                <image src='{{item.image}}'></image>
+                <image wx:if="{{index == 0 && status == 1}}" src='/images/one.png' class='numPic'></image>
+                <image wx:if="{{index == 1 && status == 1}}" src='/images/two.png' class='numPic'></image>
+                <image wx:if="{{index == 2 && status == 1}}" src='/images/three.png' class='numPic'></image>
+              </view>
+              <view class='underline'>
+                  <view class='text'>
+                      <view class='line1'>{{item.store_name}}</view>
+                      <view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
+                      <view class='vip-money acea-row row-middle'>¥{{item.vip_price || 0}}<image wx:if='{{item.vip_price && item.vip_price > 0}}' src='/images/vip.png'></image><text class='num'>已售{{item.sales}}{{item.unit_name}}</text></view>
+                    
+                  </view>
+              </view>
+              <view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view>
+            </navigator>
+          </block>   
+       </view>

+ 14 - 0
view/crmebNewUI/components/goodList/index.wxss

@@ -0,0 +1,14 @@
+@import '/app.wxss';
+.goodList .item{position:relative;padding-left:30rpx;}
+.goodList .item .pictrue{width:180rpx;height:180rpx;position:relative;}
+.goodList .item .pictrue image{width:100%;height:100%;border-radius:6rpx;}
+.goodList .item .pictrue .numPic{position:absolute;left:7rpx;top:7rpx;width:50rpx;height:50rpx;border-radius:50%;}
+.goodList .item .underline{padding:30rpx 30rpx 30rpx 0;border-bottom:1px solid #f5f5f5;}
+.goodList .item:nth-last-child(1) .underline{border-bottom:0; }
+.goodList .item .text{font-size:30rpx;color:#222;width:489rpx;}
+.goodList .item .text .money{font-size:26rpx;font-weight:bold;margin-top:50rpx;}
+.goodList .item .text .money .num{font-size:34rpx;}
+.goodList .item .text .vip-money{font-size:24rpx;color:#282828;font-weight:bold;margin-top:15rpx;}
+.goodList .item .text .vip-money image{width:46rpx;height:21rpx;margin-left:5rpx;}
+.goodList .item .text .vip-money .num{font-size:22rpx;color:#aaa;font-weight:normal;margin:-2rpx 0 0 22rpx;}
+.goodList .item .iconfont{position:absolute;right:30rpx;width:50rpx;height:50rpx;border-radius:50%;font-size:30rpx;bottom:38rpx;}

+ 77 - 0
view/crmebNewUI/components/home/index.js

@@ -0,0 +1,77 @@
+// components/home/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    homeActive:false
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+  setTouchMove: function (e) {
+    var that = this;
+    if (e.touches[0].clientY < 400 && e.touches[0].clientY > 66) {
+      that.setData({
+        top: e.touches[0].clientY
+      })
+    }
+  },
+  open:function(){
+     this.setData({
+       homeActive: !this.data.homeActive
+     })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
view/crmebNewUI/components/home/index.json

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

+ 9 - 0
view/crmebNewUI/components/home/index.wxml

@@ -0,0 +1,9 @@
+<view class='home' style=" top:{{top*2}}rpx;" catchtouchmove="setTouchMove">
+   
+        <view class='homeCon bg-color acea-row row-column-between {{homeActive==true?"on":""}}'>
+          <navigator hover-class='none' url='/pages/index/index'  open-type='switchTab' class='iconfont icon-shouye-xianxing'></navigator>
+          <navigator hover-class='none' url='/pages/order_addcart/order_addcart'  open-type='switchTab' class='iconfont icon-caigou-xianxing'></navigator>
+          <navigator hover-class='none' url='/pages/user/user'  open-type='switchTab' class='iconfont icon-yonghu1'></navigator>
+      </view>
+   <view class='pictrue' bindtap='open'><image src='{{homeActive==false?"/images/close.gif":"/images/open.gif"}}'></image></view>
+</view>

+ 7 - 0
view/crmebNewUI/components/home/index.wxss

@@ -0,0 +1,7 @@
+@import '/app.wxss';
+.home{position: fixed ;top:780rpx;color: white;text-align: center;z-index:99;right:10rpx;}
+.home .homeCon{width:86rpx;border-radius:50rpx;padding:34rpx 0;box-sizing:border-box;transition:all 0.3s ease-in-out 0s;opacity:0;transform: scale(0);height:0rpx;color:#e93323;}
+.home .homeCon.on{opacity:1;transform: scale(1);height:300rpx;color:#fff;}
+.home .homeCon .iconfont{font-size:48rpx;}
+.home .pictrue{width:86rpx;height:86rpx;border-radius:50%;margin-top:20rpx;}
+.home .pictrue image{width:100%;height:100%;border-radius:50%;}

+ 57 - 0
view/crmebNewUI/components/navbar/index.js

@@ -0,0 +1,57 @@
+var app = getApp();
+Component({
+  properties: {
+    parameter:{
+      type: Object,
+      value:{
+        class:'0'
+      },
+    },
+    logoUrl:{
+      type:String,
+      value:'',
+    }
+  },
+  data: {
+    navH: ""
+  },
+  ready: function(){
+    this.setClass();
+    var pages = getCurrentPages();
+    if (pages.length <= 1) this.setData({'parameter.return':0});
+  },
+  attached: function () {
+    this.setData({
+      navH: app.globalData.navHeight
+    });
+  },
+  methods: {
+    return:function(){
+      wx.navigateBack();
+    },
+    setGoodsSearch:function(){
+       wx.navigateTo({
+         url: '/pages/goods_search/index',
+       })
+    },
+    setClass:function(){
+      var color = '';
+      switch (this.data.parameter.class) {
+        case "0": case 'on':
+          color = 'on'
+          break;
+        case '1': case 'black':
+          color = 'black'
+          break;
+        case '2': case 'gray':
+          color = 'gray'
+          break;
+        default:
+          break;
+      }
+      this.setData({
+        'parameter.class': color
+      })
+    }
+  }
+})

+ 4 - 0
view/crmebNewUI/components/navbar/index.json

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

+ 13 - 0
view/crmebNewUI/components/navbar/index.wxml

@@ -0,0 +1,13 @@
+<view class='navbar {{parameter.class}}' style='height:{{navH}}rpx'>
+   <view class='navbarH' style='height:{{navH}}rpx;'>
+      <view class='navbarCon acea-row row-center-wrapper' wx:if='{{parameter.navbar==0}}'>
+         <view class='search acea-row row-middle' bindtap='setGoodsSearch'><text class='iconfont icon-xiazai5'></text>搜索商品</view>
+         <view class='logo'><image src='{{logoUrl}}'></image></view>
+      </view>
+      <view class='navbarCon acea-row row-center-wrapper' wx:if='{{parameter.navbar==1}}'>
+         <view class='name {{parameter.color==true?"on":""}} line1'>{{parameter.title}}</view>
+         <view class='iconfont icon-xiangzuo {{parameter.color==true?"on":""}}' wx:if='{{parameter.return==1}}' bindtap='return'></view>
+      </view>
+   </view>
+</view>
+<view style='height:{{navH}}rpx'></view>

+ 15 - 0
view/crmebNewUI/components/navbar/index.wxss

@@ -0,0 +1,15 @@
+@import '/app.wxss';
+.navbar{position:fixed;background-color:#fff;top:0;left:0;z-index:999;width:100%;}
+.navbar.on{background-color:#e93323;}
+.navbar.black{background-color:#232323;}
+.navbar.gray{background-color:#666;}
+.navbar .navbarH{position:relative;}
+.navbar .navbarH .navbarCon{position:absolute;bottom:0;height:100rpx;width:100%;}
+.navbar .navbarH .navbarCon .name{color:#000;font-size:36rpx;font-weight:bold;width: 300rpx;text-align: center;}
+.navbar .navbarH .navbarCon .name.on{color:#fff;}
+.navbar .navbarH .navbarCon .icon-xiangzuo{color:#000;font-weight:bold;position:absolute;font-size:40rpx;left:16rpx;width:100rpx;height:56rpx;line-height:54rpx;top:50%;transform:translateY(-50%);}
+.navbar .navbarH .navbarCon .icon-xiangzuo.on{color:#fff;}
+.navbar .navbarH .navbarCon .logo{width:127rpx;height:45rpx;position:absolute;left:30rpx;top:50%;transform:translateY(-50%);}
+.navbar .navbarH .navbarCon .logo image{width:100%;height:100%;display:block;}
+.navbar .navbarH .navbarCon .search{width:360rpx;height:64rpx;background-color:#f7f7f7;border-radius:50rpx;padding:0 28rpx;box-sizing:border-box;font-size:28rpx;color:#bbb;margin-right:26rpx;}
+.navbar .navbarH .navbarCon .search .icon-xiazai5{font-size:34rpx;margin-right:16rpx;}

+ 21 - 0
view/crmebNewUI/components/orderGoods/index.js

@@ -0,0 +1,21 @@
+var app = getApp();
+Component({
+  properties: {
+    evaluate: {
+      type: Number,
+      value:0,
+    },
+    cartInfo:{
+      type:Object,
+      value:[],
+    },
+    orderId:{
+      type:String,
+      value:'',
+    },
+  },
+  data: {
+  },
+  methods: {
+  }
+})

+ 4 - 0
view/crmebNewUI/components/orderGoods/index.json

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

+ 22 - 0
view/crmebNewUI/components/orderGoods/index.wxml

@@ -0,0 +1,22 @@
+<view class="orderGoods">
+  <view class='total'>共{{cartInfo.length}}件商品</view>
+  <view class='goodWrapper'>
+     <view class='item acea-row row-between-wrapper' wx:for="{{cartInfo}}" wx:key>
+        <view class='pictrue'>
+          <image src='{{item.productInfo.attrInfo.image}}' wx:if="{{item.productInfo.attrInfo}}"></image>
+          <image src='{{item.productInfo.image}}' wx:else></image>
+        </view>
+        <view class='text'>
+           <view class='acea-row row-between-wrapper'>
+             <view class='name line1'>{{item.productInfo.store_name}}</view>
+             <view class='num'>x {{item.cart_num}}</view>
+           </view>
+           <view class='attr line1' wx:if="{{item.productInfo.attrInfo}}">{{item.productInfo.attrInfo.suk}}</view>
+           <view class='money font-color' wx:if="{{item.productInfo.attrInfo}}">¥{{item.productInfo.attrInfo.price}}</view>
+           <view class='money font-color' wx:else>¥{{item.productInfo.price}}</view>
+           <navigator class='evaluate' wx:if='{{item.is_reply==0 && evaluate==3}}' hover-class="none" url='/pages/goods_comment_con/index?unique={{item.unique}}&uni={{orderId}}'>评价</navigator>
+           <view class='evaluate' wx:elif='{{item.is_reply==1 && evaluate==3}}'>已评价</view>
+        </view>
+     </view>
+  </view>
+</view>

+ 6 - 0
view/crmebNewUI/components/orderGoods/index.wxss

@@ -0,0 +1,6 @@
+@import '/app.wxss';
+.orderGoods{background-color:#fff;margin-top:12rpx;}
+.orderGoods .total{width:100%;height:86rpx;padding:0 30rpx;border-bottom:2rpx solid #f0f0f0;font-size:30rpx;color:#282828;line-height:86rpx;}
+
+
+

+ 68 - 0
view/crmebNewUI/components/product-window/index.js

@@ -0,0 +1,68 @@
+var app = getApp();
+Component({
+  properties: {
+    attribute: {
+      type: Object,
+      value:{}
+    },
+    attrList:{
+      type: Object,
+      value:[],
+    },
+    productAttr:{
+      type: Object,
+      value: [],
+    },
+    productSelect:{
+      type: Object,
+      value: {
+        image: '',
+        store_name: '',
+        price: 0,
+        unique: '',
+        stock:0,
+      }
+    },
+  },
+  data: {
+    attrValue:[],
+    attrIndex:0,
+  },
+  attached: function () {
+  },
+  methods: {
+    close: function () {
+      this.triggerEvent('myevent', {'window': false});
+    },
+    CartNumDes:function(){
+      this.triggerEvent('ChangeCartNum', false);
+    },
+    CartNumInt:function(){
+      this.triggerEvent('ChangeCartNum', true);
+    },
+    tapAttr:function(e){
+      //父级index
+      var indexw = e.currentTarget.dataset.indexw;
+      //子集index
+      var indexn = e.currentTarget.dataset.indexn;
+      //每次点击获得的属性
+      var attr = this.data.productAttr[indexw].attr_value[indexn];
+      //设置当前点击属性
+      this.data.productAttr[indexw].checked = attr['attr'];
+      this.setData({
+        productAttr: this.data.productAttr,
+      });
+      var value = this.getCheckedValue().sort().join(',');
+      this.triggerEvent('ChangeAttr',value);
+    },
+    getCheckedValue: function () {
+      return this.data.productAttr.map(function (attr) {
+        return attr.checked;
+      });
+    },
+    ResetAttr:function(){
+      for (var k in this.data.productAttr) this.data.productAttr[k].checked='';
+      this.setData({ productAttr: this.data.productAttr});
+    },
+  }
+})

+ 4 - 0
view/crmebNewUI/components/product-window/index.json

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

+ 30 - 0
view/crmebNewUI/components/product-window/index.wxml

@@ -0,0 +1,30 @@
+<view class='product-window {{attribute.cartAttr==true?"on":""}}'>
+   <view class='textpic acea-row row-between-wrapper'>
+      <view class='pictrue'><image src='{{productSelect.image}}'></image></view>
+      <view class='text'>
+         <view class='line1'>{{productSelect.store_name}}</view>
+         <view class='money font-color'>
+          ¥<text class='num'>{{productSelect.price}}</text>
+          <text class='stock'>库存: {{productSelect.stock}}</text>
+         </view>
+      </view>
+      <view class='iconfont icon-guanbi' bindtap='close'></view>
+   </view>
+   <view class='productWinList'>
+      <view class='item' wx:for='{{productAttr}}' wx:key>
+         <view class='title'>{{item.attr_name}}</view>
+         <view class='listn acea-row row-middle'>
+            <view class='itemn {{item.checked==itemn.attr ?"on":""}}' wx:for='{{item.attr_value}}' wx:for-item='itemn' wx:for-index='indexn' data-indexw='{{index}}' data-indexn='{{indexn}}' bindtap='tapAttr' wx:key>{{itemn.attr}}</view>
+         </view>
+      </view>
+   </view>
+   <view class='cart'>
+       <view class='title'>数量</view>
+       <view class='carnum acea-row row-left'>
+          <view class='reduce {{productSelect.cart_num <= 1 ? "on":""}}' bindtap='CartNumDes'>-</view>
+          <view class='num'>{{productSelect.cart_num}}</view>
+          <view class='plus {{productSelect.cart_num >= productSelect.stock || productSelect.is_on ? "on":""}}' bindtap='CartNumInt'>+</view>
+       </view>
+   </view>
+</view>
+<view class='mask' catchtouchmove="true" hidden='{{attribute.cartAttr==false}}' bindtap='close'></view>

+ 28 - 0
view/crmebNewUI/components/product-window/index.wxss

@@ -0,0 +1,28 @@
+@import '/app.wxss';
+.product-window{position:fixed;bottom:0;width:100%;left:0;background-color:#fff;z-index:88;border-radius:16rpx 16rpx 0 0;padding-bottom:140rpx;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
+.product-window.on{transform:translate3d(0,0,0);}
+.product-window .textpic{padding:0 130rpx 0 30rpx;margin-top:29rpx;position:relative;}
+.product-window .textpic .pictrue{width:150rpx;height:150rpx;}
+.product-window .textpic .pictrue image{width:100%;height:100%;border-radius:10rpx;}
+.product-window .textpic .text{width:410rpx;font-size:32rpx;color:#202020;}
+.product-window .textpic .text .money{font-size:24rpx;margin-top:40rpx;}
+.product-window .textpic .text .money .num{font-size:36rpx;}
+.product-window .textpic .text .money .stock{color:#999;margin-left:18rpx;}
+.product-window .textpic .iconfont{position:absolute;right:30rpx;top:-5rpx;font-size:35rpx;color:#8a8a8a;}
+.product-window .productWinList{max-height:395rpx;overflow:auto;margin-top:36rpx;}
+.product-window .productWinList .item~.item{margin-top:36rpx;}
+.product-window .productWinList .item .title{font-size:30rpx;color:#999;padding:0 30rpx;}
+.product-window .productWinList .item .listn{padding:0 30rpx 0 16rpx;}
+.product-window .productWinList .item .listn .itemn{border:1px solid #bbb;font-size:26rpx;color:#282828;padding:7rpx 33rpx;border-radius:6rpx;margin:14rpx 0 0 14rpx;}
+.product-window .productWinList .item .listn .itemn.on{color:#fff;background-color:#ff3700;border-color:#ff3700;}
+.product-window .cart{margin-top:36rpx;padding:0 30rpx;}
+.product-window .cart .title{font-size:30rpx;color:#999;}
+.product-window .cart .carnum{height:54rpx;margin-top:24rpx;}
+.product-window .cart .carnum view{border:1px solid #a4a4a4;width:84rpx;text-align:center;height:100%;line-height:54rpx;color:#a4a4a4;font-size:45rpx;}
+.product-window .cart .carnum .reduce{border-right:0;border-radius:6rpx 0 0 6rpx;line-height:48rpx;}
+.product-window .cart .carnum .reduce.on{border-color:#e3e3e3;color:#dedede;}
+.product-window .cart .carnum .plus{border-left:0;border-radius:0 6rpx 6rpx 0;line-height:46rpx;}
+.product-window .cart .carnum .plus.on{border-color:#e3e3e3;color:#dedede;}
+.product-window .cart .carnum .num{color:#282828;font-size:28rpx;}
+
+

+ 26 - 0
view/crmebNewUI/components/productConSwiper/index.js

@@ -0,0 +1,26 @@
+var app = getApp();
+Component({
+  properties: {
+    imgUrls:{
+      type:Object,
+      value:[]
+    }
+  },
+  data: {
+    indicatorDots: false,
+    circular: true,
+    autoplay: false,
+    interval: 3000,
+    duration: 500,
+    currents: "1"
+  },
+  attached:function(){
+  },
+  methods: {
+    change: function (e) {
+      this.setData({
+        currents: e.detail.current + 1
+      })
+    }
+  }
+})

+ 4 - 0
view/crmebNewUI/components/productConSwiper/index.json

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

+ 11 - 0
view/crmebNewUI/components/productConSwiper/index.wxml

@@ -0,0 +1,11 @@
+    <view class='product-bg'>
+        <swiper  indicator-dots="{{indicatorDots}}"
+            autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="change">
+            <block wx:for="{{imgUrls}}" wx:key> 
+                   <swiper-item>
+                <image src="{{item}}" class="slide-image"/>
+              </swiper-item>
+            </block>
+        </swiper>
+        <view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view>
+    </view>

+ 4 - 0
view/crmebNewUI/components/productConSwiper/index.wxss

@@ -0,0 +1,4 @@
+.product-bg{width:100%;height:750rpx;position:relative;}
+.product-bg swiper{width:100%;height:100%;position:relative;}
+.product-bg .slide-image{width:100%;height:100%;}
+.product-bg .pages{position:absolute;background-color:#fff;height:34rpx;padding:0 10rpx;border-radius:3rpx;right:30rpx;bottom:30rpx;line-height:34rpx;font-size:24rpx;color:#050505;}

+ 21 - 0
view/crmebNewUI/components/promotionGood/index.js

@@ -0,0 +1,21 @@
+var app = getApp();
+Component({
+  properties: {
+    benefit: {
+      type: Object,
+      value: [],
+    }
+  },
+  data: {
+
+  },
+  ready: function () {
+
+  },
+  attached: function () {
+
+  },
+  methods: {
+
+  }
+})

+ 4 - 0
view/crmebNewUI/components/promotionGood/index.json

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

+ 17 - 0
view/crmebNewUI/components/promotionGood/index.wxml

@@ -0,0 +1,17 @@
+       <view class='promotionGood'>
+          <block wx:for="{{benefit}}" wx:key>
+           <navigator class='item acea-row row-between-wrapper' url='/pages/goods_details/index?id={{item.id}}'>
+              <view class='pictrue'><image src='{{item.image}}'></image></view>
+              <view class='text'>
+                 <view class='name line1'>{{item.store_name}}</view>
+                 <view class='sp-money acea-row'>
+                   <view class='moneyCon'>促销价: ¥<text class='num'>{{item.price}}</text></view>
+                 </view>
+                 <view class='acea-row row-between-wrapper'>
+                   <view class='money'>日常价:¥{{item.ot_price}}</view>
+                   <view>仅剩:{{item.stock}}{{item.unit_name}}</view>
+                 </view>
+              </view>
+           </navigator>
+          </block> 
+       </view>

+ 11 - 0
view/crmebNewUI/components/promotionGood/index.wxss

@@ -0,0 +1,11 @@
+@import '/app.wxss';
+.promotionGood{padding:0 30rpx;}
+.promotionGood .item{border-bottom:1rpx solid #eee;height:250rpx;}
+.promotionGood .item .pictrue{width:188rpx;height:188rpx;}
+.promotionGood .item .pictrue image{width:100%;height:100%;border-radius:8rpx;}
+.promotionGood .item .text{font-size:24rpx;color:#999;width:472rpx;}
+.promotionGood .item .text .name{font-size:30rpx;color:#333;}
+.promotionGood .item .text .sp-money{margin:34rpx 0 20rpx 0;}
+.promotionGood .item .text .sp-money .moneyCon{padding:0 18rpx;background-color:red;height:46rpx;line-height:46rpx;background-image:linear-gradient(to right,#ff6248 0%,#ff3e1e 100%);font-size:20rpx;color:#fff;border-radius:24rpx 3rpx 24rpx 3rpx;}
+.promotionGood .item .text .sp-money .moneyCon .num{font-size:24rpx;}
+.promotionGood .item .text .money{text-decoration:line-through;}

+ 15 - 0
view/crmebNewUI/components/recommend/index.js

@@ -0,0 +1,15 @@
+var app = getApp();
+Component({
+  properties: {
+    host_product:{
+      type: Object,
+      value:[],
+    }
+  },
+  data: {
+  },
+  attached: function () {
+  },
+  methods: {
+  }
+})

+ 4 - 0
view/crmebNewUI/components/recommend/index.json

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

+ 14 - 0
view/crmebNewUI/components/recommend/index.wxml

@@ -0,0 +1,14 @@
+<view class='recommend'>
+   <view class='title acea-row row-center-wrapper'>
+      <text class='iconfont icon-zhuangshixian'></text>
+      <text class='name'>为你推荐</text>
+      <text class='iconfont icon-zhuangshixian lefticon'></text>
+   </view>
+   <view class='recommendList acea-row row-between-wrapper'>
+      <navigator class='item' wx:for="{{host_product}}" wx:key url='/pages/goods_details/index?id={{item.id}}' hover-class='none'>
+         <view class='pictrue'><image src='{{item.image}}'></image></view>
+         <view class='name line1'>{{item.store_name}}</view>
+         <view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
+      </navigator>
+   </view>
+</view>

+ 13 - 0
view/crmebNewUI/components/recommend/index.wxss

@@ -0,0 +1,13 @@
+@import '/app.wxss';
+.recommend{background-color:#fff;}
+.recommend .title{height:135rpx;font-size:28rpx;color:#282828;}
+.recommend .title .name{margin:0 28rpx;}
+.recommend .title .iconfont{font-size:170rpx;color:#454545;}
+.recommend .title .iconfont.lefticon{transform:rotate(180deg);}
+.recommend .recommendList{padding:0 30rpx;}
+.recommend .recommendList .item{width:335rpx;margin-bottom:30rpx;}
+.recommend .recommendList .item .pictrue{width:100%;height:335rpx;}
+.recommend .recommendList .item .pictrue image{width:100%;height:100%;border-radius:6rpx;}
+.recommend .recommendList .item .name{font-size:28rpx;color:#282828;margin-top:20rpx;}
+.recommend .recommendList .item .money{font-size:20rpx;margin-top:8rpx;}
+.recommend .recommendList .item .money .num{font-size:28rpx;}

+ 27 - 0
view/crmebNewUI/components/share-red-packets/index.js

@@ -0,0 +1,27 @@
+var app = getApp();
+Component({
+  properties: {
+    sharePacket:{
+      type:Object,
+      value:{
+        isState: true,
+        priceName:'',
+      }
+    }
+  },
+  data: {
+
+  },
+  attached: function () {
+  },
+  methods: {
+    closeShare:function(){
+      this.setData({
+        "sharePacket.isState": true
+      })
+    },
+    goShare:function(){
+      this.triggerEvent('listenerActionSheet');
+    },
+  }
+})

+ 4 - 0
view/crmebNewUI/components/share-red-packets/index.json

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

+ 13 - 0
view/crmebNewUI/components/share-red-packets/index.wxml

@@ -0,0 +1,13 @@
+<view class='sharing-packets {{sharePacket.isState==true?"on":""}}'>
+   <view class='iconfont icon-guanbi' bindtap='closeShare'></view>
+   <view class='line'></view>
+   <view class='sharing-con' bindtap='goShare'>
+      <image src='/images/red-packets.png'></image>
+      <view class='text font-color'>
+        <view>会员分享返</view>
+        <view class='money'><text class='label'>¥</text>{{sharePacket.priceName}}</view>
+        <view class='tip'>下单即返佣金</view>
+        <view class='shareBut'>立即分享</view>
+      </view>
+   </view>  
+</view>

+ 12 - 0
view/crmebNewUI/components/share-red-packets/index.wxss

@@ -0,0 +1,12 @@
+@import '/app.wxss';
+.sharing-packets{position:fixed;right:30rpx;top:900rpx;z-index:5;transition:all 0.3s ease-in-out 0s;opacity:1;transform: scale(1);}
+.sharing-packets.on{transform: scale(0);opacity:0;}
+.sharing-packets .iconfont{width:44rpx;height:44rpx;border-radius:50%;text-align:center;line-height:44rpx;background-color:#999;font-size:20rpx;color:#fff;margin:0 auto;box-sizing:border-box;padding-left:1px;}
+.sharing-packets .line{width:2rpx;height:40rpx;background-color:#999;margin:0 auto;}
+.sharing-packets .sharing-con{width:187rpx;height:210rpx;position:relative;}
+.sharing-packets .sharing-con image{width:100%;height:100%;}
+.sharing-packets .sharing-con .text{position:absolute;top:30rpx;font-size:20rpx;width:100%;text-align:center;}
+.sharing-packets .sharing-con .text .money{font-size:32rpx;font-weight:bold;margin-top:5rpx;}
+.sharing-packets .sharing-con .text .money .label{font-size:20rpx;}
+.sharing-packets .sharing-con .text .tip{font-size:18rpx;color:#999;margin-top:5rpx;}
+.sharing-packets .sharing-con .text .shareBut{font-size:22rpx;color:#fff;margin-top:18rpx;height:50rpx;line-height:50rpx;}

+ 27 - 0
view/crmebNewUI/components/swipers/index.js

@@ -0,0 +1,27 @@
+// components/swiper/index.js
+var app = getApp();
+Component({
+  properties: {
+    imgUrls: {
+      type: Object,
+      value: []
+    }
+  },
+  data: {
+    circular: true,
+    autoplay: true,
+    interval: 3000,
+    duration: 500,
+    currentSwiper: 0
+  },
+  attached: function () {
+    console.log(this.data.imgUrls);
+  },
+  methods: {
+    swiperChange: function (e) {
+      this.setData({
+        currentSwiper: e.detail.current
+      })
+    },
+  }
+})

+ 4 - 0
view/crmebNewUI/components/swipers/index.json

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

+ 12 - 0
view/crmebNewUI/components/swipers/index.wxml

@@ -0,0 +1,12 @@
+    <view class='swiper'>
+        <swiper autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange">
+            <block wx:for="{{imgUrls}}" wx:key>
+              <swiper-item>
+                <navigator url="{{item.link}}" style='width:100%;height:100%;' hover-class='none'><image src="{{item.img}}" class="slide-image"/></navigator>
+              </swiper-item>
+            </block>
+        </swiper>
+        <view class="dots acea-row">
+          <view class="dot {{index == currentSwiper ? 'active' : ''}}" wx:for="{{imgUrls}}" wx:key></view>
+        </view>
+    </view>

+ 7 - 0
view/crmebNewUI/components/swipers/index.wxss

@@ -0,0 +1,7 @@
+@import '/app.wxss';
+.swiper{width:100%;height:282rpx;position:relative;}
+.swiper swiper{width:100%;height:100%;position:relative;}
+.swiper swiper .slide-image{width:100%;height:100%;}
+.swiper .dots{position:absolute;right:40rpx;bottom:20rpx;}
+.swiper .dots .dot{width:12rpx;height:12rpx;border:2rpx solid #fff;border-radius:50%;margin-right:15rpx;}
+.swiper .dots .dot.active{border-color:#e93323;background-color:#e93323;}

+ 24 - 0
view/crmebNewUI/components/userEvaluation/index.js

@@ -0,0 +1,24 @@
+var app = getApp();
+Component({
+  properties: {
+    reply:{
+      type:Object,
+      value:[],
+    }
+  },
+  data: {
+    
+  },
+  attached: function () {
+
+  },
+  methods: {
+    getpreviewImage:function(e){
+      var dataset=e.currentTarget.dataset;
+      wx.previewImage({ 
+        urls: this.data.reply[dataset.index].pics, 
+        current: this.data.reply[dataset.index].pics[dataset.pic_index],
+      });
+    },
+  }
+})

+ 3 - 0
view/crmebNewUI/components/userEvaluation/index.json

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

+ 24 - 0
view/crmebNewUI/components/userEvaluation/index.wxml

@@ -0,0 +1,24 @@
+<view class='evaluateWtapper'>
+   <view class='evaluateItem' wx:for="{{reply}}" wx:key>
+      <view class='pic-text acea-row row-middle'>
+         <view class='pictrue'><image src='{{item.avatar}}'></image></view>
+         <view class='acea-row row-middle'>
+            <view class='name line1'>{{item.nickname}}</view>
+            <view class='start star{{item.star}}'></view>
+         </view>
+      </view>
+      <view class='time'>{{item.add_time}} {{item.suk}}</view>
+      <view class='evaluate-infor'>{{item.comment}}</view>
+      <view class='imgList acea-row'>
+          <view class='pictrue' wx:for="{{item.pics}}" wx:for-item="items" wx:for-index='pic_index' wx:key>
+            <image  wx:if="{{items}}" src='{{items}}' data-index="{{index}}" data-pic_index='{{pic_index}}' bindtap='getpreviewImage'></image>
+          </view>
+      </view>
+      <view class='reply' wx:if='{{item.merchant_reply_content}}'><text class='font-color'>店小二</text>:{{item.merchant_reply_content}}</view>
+   </view> 
+</view>
+         
+           
+           
+           
+    

+ 14 - 0
view/crmebNewUI/components/userEvaluation/index.wxss

@@ -0,0 +1,14 @@
+@import '/app.wxss';
+.evaluateWtapper .evaluateItem{background-color:#fff;padding-bottom:25rpx;}
+.evaluateWtapper .evaluateItem~.evaluateItem{border-top:1rpx solid #f5f5f5;}
+.evaluateWtapper .evaluateItem .pic-text{font-size:26rpx;color:#282828;height:95rpx;padding:0 30rpx;}
+.evaluateWtapper .evaluateItem .pic-text .pictrue{width:56rpx;height:56rpx;margin-right:20rpx;}
+.evaluateWtapper .evaluateItem .pic-text .pictrue image{width:100%;height:100%;border-radius:50%;}
+.evaluateWtapper .evaluateItem .pic-text .name{max-width:450rpx;margin-right:15rpx;}
+.evaluateWtapper .evaluateItem .time{font-size:24rpx;color:#82848f;padding:0 30rpx;}
+.evaluateWtapper .evaluateItem .evaluate-infor{font-size:28rpx;color:#282828;margin-top:19rpx;padding:0 30rpx;}
+.evaluateWtapper .evaluateItem .imgList{padding:0 30rpx 0 15rpx;margin-top:25rpx;}
+.evaluateWtapper .evaluateItem .imgList .pictrue{width:156rpx;height:156rpx;margin:0 0 15rpx 15rpx;}
+.evaluateWtapper .evaluateItem .imgList .pictrue image{width:100%;height:100%;}
+.evaluateWtapper .evaluateItem .reply{font-size:26rpx;color:#454545;background-color:#f7f7f7;border-radius:5rpx;margin:20rpx 30rpx 0 30rpx;padding:30rpx;position:relative;}
+.evaluateWtapper .evaluateItem .reply::before{content: "";width: 0;height: 0;border-left:0.3rem solid transparent;border-right:0.3rem solid transparent;border-bottom:0.4rem solid #f7f7f7;position:absolute;top:-0.4rem;left:2rem;}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 3494 - 0
view/crmebNewUI/css/animate.wxss


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 16 - 0
view/crmebNewUI/css/guildford.wxss


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 94 - 0
view/crmebNewUI/css/style.wxss


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 463 - 0
view/crmebNewUI/font/iconfont.wxss


BIN=BIN
view/crmebNewUI/images/1-001.png


BIN=BIN
view/crmebNewUI/images/1-002.png


BIN=BIN
view/crmebNewUI/images/2-001.png


BIN=BIN
view/crmebNewUI/images/2-002.png


BIN=BIN
view/crmebNewUI/images/3-001.png


BIN=BIN
view/crmebNewUI/images/3-002.png


BIN=BIN
view/crmebNewUI/images/4-001.png


BIN=BIN
view/crmebNewUI/images/4-002.png


BIN=BIN
view/crmebNewUI/images/accountBg.png


BIN=BIN
view/crmebNewUI/images/address.png


BIN=BIN
view/crmebNewUI/images/angle.png


BIN=BIN
view/crmebNewUI/images/balance.png


BIN=BIN
view/crmebNewUI/images/bargain.png


BIN=BIN
view/crmebNewUI/images/bargainBg.jpg


BIN=BIN
view/crmebNewUI/images/close.gif


BIN=BIN
view/crmebNewUI/images/collection.png


BIN=BIN
view/crmebNewUI/images/coupon-window.png


BIN=BIN
view/crmebNewUI/images/coupon-window2.png


BIN=BIN
view/crmebNewUI/images/coupon.png


BIN=BIN
view/crmebNewUI/images/coupon2.png


BIN=BIN
view/crmebNewUI/images/customer.png


BIN=BIN
view/crmebNewUI/images/dfh.png


BIN=BIN
view/crmebNewUI/images/dfk.png


BIN=BIN
view/crmebNewUI/images/down.png


BIN=BIN
view/crmebNewUI/images/dpj.png


BIN=BIN
view/crmebNewUI/images/dsh.png


BIN=BIN
view/crmebNewUI/images/examine.png


BIN=BIN
view/crmebNewUI/images/extension.png


BIN=BIN
view/crmebNewUI/images/gift.png


BIN=BIN
view/crmebNewUI/images/horn.png


BIN=BIN
view/crmebNewUI/images/left.png


BIN=BIN
view/crmebNewUI/images/light.png


+ 0 - 0
view/crmebNewUI/images/line.jpg


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio