Forráskód Böngészése

删除压缩包,上传小程序目录

等风来 7 éve
szülő
commit
0818f086a0
100 módosított fájl, 3834 hozzáadás és 0 törlés
  1. 0 0
      application/routine/view/.keep
  2. BIN
      application/routine/view/crmebN.zip
  3. 156 0
      application/routine/view/crmebN/app.js
  4. 87 0
      application/routine/view/crmebN/app.json
  5. 41 0
      application/routine/view/crmebN/app.wxss
  6. 1 0
      application/routine/view/crmebN/config.json
  7. 145 0
      application/routine/view/crmebN/font/font.wxss
  8. BIN
      application/routine/view/crmebN/icon/line.jpg
  9. BIN
      application/routine/view/crmebN/icon/star-icon.png
  10. BIN
      application/routine/view/crmebN/icon/关闭.png
  11. BIN
      application/routine/view/crmebN/icon/图层-1.png
  12. BIN
      application/routine/view/crmebN/icon/图层-22.png
  13. BIN
      application/routine/view/crmebN/icon/圆角矩形-1.png
  14. BIN
      application/routine/view/crmebN/icon/圆角矩形-2-拷贝.png
  15. BIN
      application/routine/view/crmebN/icon/形状-2-拷贝-3.png
  16. BIN
      application/routine/view/crmebN/icon/形状-2-拷贝.png
  17. BIN
      application/routine/view/crmebN/icon/拼团图标.png
  18. BIN
      application/routine/view/crmebN/icon/送货1.png
  19. BIN
      application/routine/view/crmebN/images/1-1.png
  20. BIN
      application/routine/view/crmebN/images/1-2.png
  21. BIN
      application/routine/view/crmebN/images/2-1.png
  22. BIN
      application/routine/view/crmebN/images/2-2.png
  23. BIN
      application/routine/view/crmebN/images/3-1.png
  24. BIN
      application/routine/view/crmebN/images/3-2.png
  25. BIN
      application/routine/view/crmebN/images/4-1.png
  26. BIN
      application/routine/view/crmebN/images/4-2.png
  27. BIN
      application/routine/view/crmebN/images/collect-shixiao.png
  28. BIN
      application/routine/view/crmebN/images/dfh.png
  29. BIN
      application/routine/view/crmebN/images/dfk.png
  30. BIN
      application/routine/view/crmebN/images/dpj.png
  31. BIN
      application/routine/view/crmebN/images/dsh.png
  32. BIN
      application/routine/view/crmebN/images/error-icon.png
  33. BIN
      application/routine/view/crmebN/images/home.png
  34. BIN
      application/routine/view/crmebN/images/lie.png
  35. BIN
      application/routine/view/crmebN/images/long.gif
  36. BIN
      application/routine/view/crmebN/images/nav-01.png
  37. BIN
      application/routine/view/crmebN/images/nav-02.png
  38. BIN
      application/routine/view/crmebN/images/nav-03.png
  39. BIN
      application/routine/view/crmebN/images/nav-04.png
  40. BIN
      application/routine/view/crmebN/images/nav-05.png
  41. BIN
      application/routine/view/crmebN/images/unknown.png
  42. 156 0
      application/routine/view/crmebN/pages/addaddress/addaddress.js
  43. 3 0
      application/routine/view/crmebN/pages/addaddress/addaddress.json
  44. 20 0
      application/routine/view/crmebN/pages/addaddress/addaddress.wxml
  45. 13 0
      application/routine/view/crmebN/pages/addaddress/addaddress.wxss
  46. 170 0
      application/routine/view/crmebN/pages/address/address.js
  47. 1 0
      application/routine/view/crmebN/pages/address/address.json
  48. 22 0
      application/routine/view/crmebN/pages/address/address.wxml
  49. 14 0
      application/routine/view/crmebN/pages/address/address.wxss
  50. 411 0
      application/routine/view/crmebN/pages/buycar/buycar.js
  51. 3 0
      application/routine/view/crmebN/pages/buycar/buycar.json
  52. 81 0
      application/routine/view/crmebN/pages/buycar/buycar.wxml
  53. 42 0
      application/routine/view/crmebN/pages/buycar/buycar.wxss
  54. 163 0
      application/routine/view/crmebN/pages/cash/cash.js
  55. 1 0
      application/routine/view/crmebN/pages/cash/cash.json
  56. 32 0
      application/routine/view/crmebN/pages/cash/cash.wxml
  57. 22 0
      application/routine/view/crmebN/pages/cash/cash.wxss
  58. 70 0
      application/routine/view/crmebN/pages/collect/collect.js
  59. 1 0
      application/routine/view/crmebN/pages/collect/collect.json
  60. 26 0
      application/routine/view/crmebN/pages/collect/collect.wxml
  61. 15 0
      application/routine/view/crmebN/pages/collect/collect.wxss
  62. 245 0
      application/routine/view/crmebN/pages/comment-con/comment-con.js
  63. 3 0
      application/routine/view/crmebN/pages/comment-con/comment-con.json
  64. 57 0
      application/routine/view/crmebN/pages/comment-con/comment-con.wxml
  65. 25 0
      application/routine/view/crmebN/pages/comment-con/comment-con.wxss
  66. 189 0
      application/routine/view/crmebN/pages/comment/comment.js
  67. 3 0
      application/routine/view/crmebN/pages/comment/comment.json
  68. 24 0
      application/routine/view/crmebN/pages/comment/comment.wxml
  69. 15 0
      application/routine/view/crmebN/pages/comment/comment.wxss
  70. 133 0
      application/routine/view/crmebN/pages/coupon-status/coupon-status.js
  71. 19 0
      application/routine/view/crmebN/pages/coupon-status/coupon-status.json
  72. 21 0
      application/routine/view/crmebN/pages/coupon-status/coupon-status.wxml
  73. 18 0
      application/routine/view/crmebN/pages/coupon-status/coupon-status.wxss
  74. 87 0
      application/routine/view/crmebN/pages/coupon/coupon.js
  75. 19 0
      application/routine/view/crmebN/pages/coupon/coupon.json
  76. 27 0
      application/routine/view/crmebN/pages/coupon/coupon.wxml
  77. 18 0
      application/routine/view/crmebN/pages/coupon/coupon.wxss
  78. 59 0
      application/routine/view/crmebN/pages/cut-list/cut-list.js
  79. 3 0
      application/routine/view/crmebN/pages/cut-list/cut-list.json
  80. 47 0
      application/routine/view/crmebN/pages/cut-list/cut-list.wxml
  81. 18 0
      application/routine/view/crmebN/pages/cut-list/cut-list.wxss
  82. 465 0
      application/routine/view/crmebN/pages/cut-one/cut-one.js
  83. 3 0
      application/routine/view/crmebN/pages/cut-one/cut-one.json
  84. 134 0
      application/routine/view/crmebN/pages/cut-one/cut-one.wxml
  85. 76 0
      application/routine/view/crmebN/pages/cut-one/cut-one.wxss
  86. 88 0
      application/routine/view/crmebN/pages/enter/enter.js
  87. 3 0
      application/routine/view/crmebN/pages/enter/enter.json
  88. 7 0
      application/routine/view/crmebN/pages/enter/enter.wxml
  89. 6 0
      application/routine/view/crmebN/pages/enter/enter.wxss
  90. 86 0
      application/routine/view/crmebN/pages/extension/extension.js
  91. 1 0
      application/routine/view/crmebN/pages/extension/extension.json
  92. 30 0
      application/routine/view/crmebN/pages/extension/extension.wxml
  93. 18 0
      application/routine/view/crmebN/pages/extension/extension.wxss
  94. 84 0
      application/routine/view/crmebN/pages/feree-two/feree-two.js
  95. 3 0
      application/routine/view/crmebN/pages/feree-two/feree-two.json
  96. 19 0
      application/routine/view/crmebN/pages/feree-two/feree-two.wxml
  97. 11 0
      application/routine/view/crmebN/pages/feree-two/feree-two.wxss
  98. 73 0
      application/routine/view/crmebN/pages/feree/feree.js
  99. 1 0
      application/routine/view/crmebN/pages/feree/feree.json
  100. 0 0
      application/routine/view/crmebN/pages/feree/feree.wxml

+ 0 - 0
application/routine/view/.keep


BIN
application/routine/view/crmebN.zip


+ 156 - 0
application/routine/view/crmebN/app.js

@@ -0,0 +1,156 @@
+//app.js
+var app = getApp();
+// var wxh = require('../../utils/wxh.js');
+App({
+  onLaunch: function () {
+    // 展示本地存储能力
+    var that = this;
+    var logs = wx.getStorageSync('logs') || []
+    logs.unshift(Date.now())
+    wx.setStorageSync('logs', logs)
+    that.getRoutineStyle();
+  },
+  globalData: {
+    routineStyle:'#ffffff',
+    uid: null,
+    openPages:'',
+    spid:0,
+    urlImages: '',
+    url: 'https://shop.crmeb.net/'
+  },
+  getRoutineStyle:function(){
+    var that = this;
+    wx.request({
+      url: that.globalData.url + '/routine/login/get_routine_style',
+      method: 'post',
+      dataType  : 'json',
+      success: function (res) {
+        that.globalData.routineStyle = res.data.data.routine_style;
+        that.setBarColor();
+      }
+    })
+  },
+  setBarColor:function(){
+    var that = this;
+    wx.setNavigationBarColor({
+      frontColor: '#000000',
+      backgroundColor: that.globalData.routineStyle,
+    })
+  },
+  setUserInfo : function(){
+    var that = this;
+    if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
+      wx.showToast({
+        title: '用户信息获取失败',
+        icon: 'none',
+        duration: 1500,
+      })
+      setTimeout(function () {
+        wx.navigateTo({
+          url: '/pages/enter/enter',
+        })
+      }, 2000)
+    }
+  },
+  getUserInfo: function () {
+    var that = this;
+    wx.getUserInfo({
+      lang: 'zh_CN',
+      success: function (res) {
+        var userInfo = res.userInfo
+        wx.login({
+          success: function (res) {
+            if (res.code) {
+              userInfo.code = res.code;
+              userInfo.spid = that.globalData.spid;
+              wx.request({
+                url: that.globalData.url + '/routine/login/index',
+                method: 'post',
+                dataType  : 'json',
+                data: {
+                  info: userInfo
+                },
+                success: function (res) {
+                  that.globalData.uid = res.data.data.uid;
+                  if (!res.data.data.status){
+                    wx.redirectTo({
+                      url: '/pages/login-status/login-status',
+                    })
+                  }
+                  if (that.globalData.openPages != '') {
+                    wx.reLaunch({
+                      url: that.globalData.openPages
+                    })
+                  } else {
+                    wx.switchTab({
+                      url: '/pages/index/index'
+                    })
+                  }
+                },
+                fail: function () {
+                  console.log('获取用户信息失败');
+                  wx.navigateTo({
+                    url: '/pages/enter/enter',
+                  })
+                },
+              })
+            } else {
+              console.log('登录失败!' + res.errMsg)
+            }
+          },
+          fail: function () {
+            console.log('获取用户信息失败');
+            wx.navigateTo({
+              url: '/pages/enter/enter',
+            })
+          },
+        })
+      },
+      fail:function(){
+        console.log('获取用户信息失败');
+        wx.navigateTo({
+          url: '/pages/enter/enter',
+        })
+      },
+    })
+  },
+  getUserInfoEnter: function () {
+    var that = this;
+    wx.getUserInfo({
+      lang: 'zh_CN',
+      success: function (res) {
+        var userInfo = res.userInfo
+        wx.login({
+          success: function (res) {
+            if (res.code) {
+              userInfo.code = res.code;
+              userInfo.spid = that.globalData.spid;
+              wx.request({
+                url: that.globalData.url + '/routine/login/index',
+                method: 'post',
+                dataType  : 'json',
+                data: {
+                  info: userInfo
+                },
+                success: function (res) {
+                  that.globalData.uid = res.data.data.uid;
+                  if (that.globalData.openPages != '') {
+                    wx.reLaunch({
+                      url: that.globalData.openPages
+                    })
+                  } else {
+                    wx.reLaunch({
+                      url: '/pages/index/index'
+                    })
+                  }
+                }
+              })
+            } else {
+              console.log('登录失败!' + res.errMsg)
+            }
+          }
+        })
+      }
+    })
+  },
+})

+ 87 - 0
application/routine/view/crmebN/app.json

@@ -0,0 +1,87 @@
+{
+  "pages": [
+    "pages/load/load",
+    "pages/login-status/login-status",
+    "pages/payment/payment",
+    "pages/new-con/new-con",
+    "pages/new-list/new-list",
+    "pages/enter/enter",
+    "pages/index/index",
+    "pages/refunding/refunding",
+    "pages/miao-list/miao-list",
+    "pages/coupon-status/coupon-status",
+    "pages/addaddress/addaddress",
+    "pages/product-countdown/index",
+    "pages/refund-page/refund-page",
+    "pages/refund-order/refund-order",
+    "pages/cut-one/cut-one",
+    "pages/spread/spread",
+    "pages/promotion-order/promotion-order",
+    "pages/coupon/coupon",
+    "pages/cut-list/cut-list",
+    "pages/news-list/news-list",
+    "pages/product-con/index",
+    "pages/product-pinke/index",
+    "pages/comment-con/comment-con",
+    "pages/orderForm/orderForm",
+    "pages/orders-list/orders-list",
+    "pages/comment/comment",
+    "pages/foo-tan/foo-tan",
+    "pages/buycar/buycar",
+    "pages/mycut/mycut",
+    "pages/join-pink/index",
+    "pages/user/user",
+    "pages/integral-con/integral-con",
+    "pages/orders-con/orders-con",
+    "pages/order-confirm/order-confirm",
+    "pages/pink-list/index",
+    "pages/productSort/productSort",
+    "pages/address/address",
+    "pages/feree/feree",
+    "pages/feree-two/feree-two",
+    "pages/cash/cash",
+    "pages/logistics/logistics",
+    "pages/extension/extension",
+    "pages/unshop/unshop",
+    "pages/main/main",
+    "pages/collect/collect",
+    "pages/promotion-card/promotion-card"
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "WeChat",
+    "navigationBarTextStyle": "black"
+  },
+  "tabBar": {
+    "backgroundColor": "#FFFFFF",
+    "color": "#999",
+    "selectedColor": "#ff3d3d",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "iconPath": "images/1-1.png",
+        "selectedIconPath": "images/1-2.png",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/productSort/productSort",
+        "iconPath": "images/2-1.png",
+        "selectedIconPath": "images/2-2.png",
+        "text": "分类"
+      },
+      {
+        "pagePath": "pages/buycar/buycar",
+        "iconPath": "images/3-1.png",
+        "selectedIconPath": "images/3-2.png",
+        "text": "购物车"
+      },
+      {
+        "pagePath": "pages/user/user",
+        "iconPath": "images/4-1.png",
+        "selectedIconPath": "images/4-2.png",
+        "text": "我的"
+      }
+    ]
+  }
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 41 - 0
application/routine/view/crmebN/app.wxss


+ 1 - 0
application/routine/view/crmebN/config.json

@@ -0,0 +1 @@
+{"dir":"dist"}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 145 - 0
application/routine/view/crmebN/font/font.wxss


BIN
application/routine/view/crmebN/icon/line.jpg


BIN
application/routine/view/crmebN/icon/star-icon.png


BIN
application/routine/view/crmebN/icon/关闭.png


BIN
application/routine/view/crmebN/icon/图层-1.png


BIN
application/routine/view/crmebN/icon/图层-22.png


BIN
application/routine/view/crmebN/icon/圆角矩形-1.png


BIN
application/routine/view/crmebN/icon/圆角矩形-2-拷贝.png


BIN
application/routine/view/crmebN/icon/形状-2-拷贝-3.png


BIN
application/routine/view/crmebN/icon/形状-2-拷贝.png


BIN
application/routine/view/crmebN/icon/拼团图标.png


BIN
application/routine/view/crmebN/icon/送货1.png


BIN
application/routine/view/crmebN/images/1-1.png


BIN
application/routine/view/crmebN/images/1-2.png


BIN
application/routine/view/crmebN/images/2-1.png


BIN
application/routine/view/crmebN/images/2-2.png


BIN
application/routine/view/crmebN/images/3-1.png


BIN
application/routine/view/crmebN/images/3-2.png


BIN
application/routine/view/crmebN/images/4-1.png


BIN
application/routine/view/crmebN/images/4-2.png


BIN
application/routine/view/crmebN/images/collect-shixiao.png


BIN
application/routine/view/crmebN/images/dfh.png


BIN
application/routine/view/crmebN/images/dfk.png


BIN
application/routine/view/crmebN/images/dpj.png


BIN
application/routine/view/crmebN/images/dsh.png


BIN
application/routine/view/crmebN/images/error-icon.png


BIN
application/routine/view/crmebN/images/home.png


BIN
application/routine/view/crmebN/images/lie.png


BIN
application/routine/view/crmebN/images/long.gif


BIN
application/routine/view/crmebN/images/nav-01.png


BIN
application/routine/view/crmebN/images/nav-02.png


BIN
application/routine/view/crmebN/images/nav-03.png


BIN
application/routine/view/crmebN/images/nav-04.png


BIN
application/routine/view/crmebN/images/nav-05.png


BIN
application/routine/view/crmebN/images/unknown.png


+ 156 - 0
application/routine/view/crmebN/pages/addaddress/addaddress.js

@@ -0,0 +1,156 @@
+var app = getApp();
+Page({
+  data: {
+    _num:1,
+    region: ['省','市','区'],
+    cartId : '',
+    pinkId : '',
+    couponId : '',
+    id:0,
+    userAddress:[]
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    if (options.cartId){
+      this.setData({
+        cartId: options.cartId,
+        pinkId: options.pinkId,
+        couponId: options.couponId,
+      })
+    }
+    if (options.id){
+      this.setData({
+        id: options.id
+      })
+      this.getUserAddress();
+    }
+  },
+  getUserAddress: function () {//get_user_address
+    var that = this;
+    
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_user_address?uid=' + app.globalData.uid,
+      method: 'GET',
+      data: {
+        addressId : that.data.id
+      },
+      success: function (res) {
+        console.log(res);
+        var regionOne = "region.0";
+        var regionTwo = "region.1";
+        var regionTherr = "region.2";
+        that.setData({
+          userAddress: res.data.data,
+          [regionOne]: res.data.data.province,
+          [regionTwo]: res.data.data.city,
+          [regionTherr]: res.data.data.district,
+          _num: res.data.data.is_default == 1 ? 0 : 1
+        })
+      }
+    })
+  },
+  bindRegionChange: function (e) {
+    this.setData({
+      region: e.detail.value
+    })
+  },
+  defaulttap:function(e){
+    var num = this.data._num;
+    if(num==1){
+      this.setData({
+        _num: 0
+      })
+    }else{
+      this.setData({
+        _num: 1
+      })
+    }
+  },
+  
+   formSubmit: function (e) {
+    var warn = "";
+    var that = this;
+    var flag = true;
+    var cartId = '';
+    var name = e.detail.value.name;
+    var phone = e.detail.value.phone;
+    var area = JSON.stringify(this.data.region);
+    var fulladdress = e.detail.value.fulladdress;
+    var addressP = {};
+    if (name == "") {
+      warn = '请输入姓名';
+    } else if (!/^1(3|4|5|7|8)\d{9}$/i.test(phone)) {
+      warn = '您输入的手机号有误'
+    } else if (area == '["省","市","区"]'){
+      warn = '请选择地区';
+    } else if (fulladdress == "") {
+      warn = "请填写具体地址";
+    } else{
+      flag = false;
+    }
+    if(flag==true){
+      wx.showModal({
+        title: '提示',
+        content: warn
+      })
+    }else{
+      addressP.province = this.data.region[0];
+      addressP.city = this.data.region[1];
+      addressP.district = this.data.region[2];
+     
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/edit_user_address?uid=' + app.globalData.uid,
+        method: 'POST',
+        data: {
+          address: addressP,
+          is_default : that.data._num == 0 ? 1 : 0,
+          real_name : name,
+          post_code : '',
+          phone : phone,
+          detail : fulladdress,
+          id:that.data.id
+        },
+        success: function (res) {
+          if (res.data.code == 200) {
+            if (that.data.id) {
+              wx.showToast({
+                title: '修改成功',
+                icon: 'success',
+                duration: 1000
+              })
+            }else{
+              wx.showToast({
+                title: '添加成功',
+                icon: 'success',
+                duration: 1000
+              })
+            }
+            setTimeout(function () {
+              if (that.data.cartId) {
+
+                var cartId = that.data.cartId;
+                var pinkId = that.data.pinkId;
+                var couponId = that.data.couponId;
+                that.setData({
+                  cartId: '',
+                  pinkId: '',
+                  couponId:'',
+                })
+                wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+                  url: '/pages/order-confirm/order-confirm?id=' + cartId + '&addressId=' + that.data.id + '&pinkId=' + pinkId + '&couponId=' + couponId
+                })
+              } else {
+                wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+                  url: '/pages/address/address'
+                })
+              }
+            },1200)
+          }
+        }
+      })
+    }
+  }
+
+
+})

+ 3 - 0
application/routine/view/crmebN/pages/addaddress/addaddress.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "添加收获地址"
+}

+ 20 - 0
application/routine/view/crmebN/pages/addaddress/addaddress.wxml

@@ -0,0 +1,20 @@
+<form bindsubmit="formSubmit">
+        <view class='information'>
+            <view class='information-li flex'><label>姓名</label><input type='text' placeholder='请输入姓名' placeholder-class='placeholder' name="name" value='{{userAddress.real_name}}'/></view>
+            <view class='information-li flex'><label>联系电话</label><input type='number' placeholder-class='placeholder' placeholder='请输入联系电话' name="phone" value='{{userAddress.phone}}'></input></view>
+            <view class='information-li flex'>
+                <label class='area'>所在地区</label>
+                <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
+                    <text class='areas' data-text="C">{{region[0]}},{{region[1]}},{{region[2]}}</text>
+                    <text class='iconfont icon-dizhi map'></text>
+                </picker>
+            </view>
+            <view class='information-li flex'><label>详细地址</label><input type='text' placeholder-class='placeholder' placeholder='请填写具体地址' name="fulladdress" value='{{userAddress.detail}}'></input></view>
+        </view>
+        <view class='default' bindtap='defaulttap'>
+            <text class='iconfont icon-duihao1 duihao {{_num==0?"active":""}}'></text>
+            设置为默认地址
+        </view>
+      <button class='but' formType="submit">立即保存</button>
+</form>
+    

+ 13 - 0
application/routine/view/crmebN/pages/addaddress/addaddress.wxss

@@ -0,0 +1,13 @@
+.information{width:100%;height:364rpx;background-color:#ffffff;display:block;}
+.information-li{height:90rpx;padding:0 20rpx;line-height:90rpx;border-bottom:1rpx solid #F7F7F7;}
+.information-li label,.cashNum label{width:170rpx;display:inline-block;}
+.information-li input,.cashNum input{width:100%;height:100%;}
+.placeholder{color:#cccccc;}
+.but{width:710rpx;height:90rpx;line-height:90rpx;text-align:center;background-color:#F84426;color:#ffffff;font-size:32rpx;margin-top:70rpx;}
+.areas{color:#808080;display:inline-block;width:510rpx; overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
+.map{float:right;font-size:45rpx;color:#F14233;}
+.area{width:137rpx !important;}
+.default{height:90rpx;line-height:90rpx;padding:0 20rpx;background-color:#ffffff;margin-top:20rpx;color:#333333;}
+.duihao{height:45rpx;line-height:45rpx;text-align:center;border-radius:50%;border:1rpx solid #DEDEDE;display:inline-block;width:45rpx;font-size:30rpx;color:#ffffff;margin-right:21rpx;}
+.active{background-color:#F84426;}
+

+ 170 - 0
application/routine/view/crmebN/pages/address/address.js

@@ -0,0 +1,170 @@
+// pages/address/address.js
+var app = getApp();
+Page({
+  data: {
+    _num:'',
+    cartId: '',
+    pinkId: '',
+    couponId: '',
+    addressArray:[]
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    console.log(options);
+    if (options.cartId) {
+      this.setData({
+        cartId: options.cartId,
+        pinkId: options.pinkId,
+        couponId: options.couponId,
+      })
+    }
+    this.getAddress();
+  },
+  getAddress: function () {
+    var that = this;
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/user_address_list?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        if (res.data.code == 200) {
+          if (res.data.data.length < 1) {
+            wx.showToast({
+              title: '暂无收货地址,请先添加收货地址',
+              icon: 'none',
+              duration: 1000,
+            })
+            setTimeout(function () {
+              that.addAddress();
+            }, 1100)
+          } else {
+            that.setData({
+              addressArray: res.data.data
+            })
+            for (var i in res.data.data){
+              if (res.data.data[i].is_default){
+                that.setData({
+                  _num: res.data.data[i].id
+                })
+              }
+            }
+          }
+        }
+      }
+    })
+  },
+  addAddress:function(){
+
+    var cartId = this.data.cartId;
+    var pinkId = this.data.pinkId;
+    var couponId = this.data.couponId;
+    this.setData({
+      cartId: '',
+      pinkId:'',
+      couponId:'',
+    })
+    wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+      url: '/pages/addaddress/addaddress?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId
+    })
+  },
+  goOrder:function(e){
+    var id = e.currentTarget.dataset.id;
+    var cartId = '';
+    var pinkId = '';
+    var couponId = '';
+    if (this.data.cartId && id){
+      cartId = this.data.cartId; 
+      pinkId = this.data.pinkId;
+      couponId = this.data.couponId;
+      this.setData({
+        cartId : '',
+        pinkId : '',
+        couponId : '',
+      })
+      wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+        url: '/pages/order-confirm/order-confirm?id=' + cartId + '&addressId=' + id + '&pinkId=' + pinkId + '&couponId=' + couponId
+      })
+    }
+  },
+  delAddress:function(e){
+    var id = e.currentTarget.dataset.id;
+    var that = this;
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/remove_user_address?uid=' + app.globalData.uid,
+      method: 'GET',
+      header: header,
+      data:{
+        addressId:id
+      },
+      success: function (res) {
+        if (res.data.code == 200) {
+          wx.showToast({
+            title: '删除成功',
+            icon: 'success',
+            duration: 1000,
+          })
+          that.getAddress();
+        } else {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 1000,
+          })
+        }
+      }
+    })
+  },
+  editAddress: function (e) {
+    var cartId = this.data.cartId;
+    var pinkId = this.data.pinkId;
+    var couponId = this.data.couponId;
+    this.setData({
+      cartId: '',
+      pinkId: '',
+      couponId: '',
+    })
+    wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+      url: '/pages/addaddress/addaddress?id=' + e.currentTarget.dataset.id + '&cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId
+    })
+  },
+  activetap:function(e){
+    var id = e.target.dataset.idx;
+    var that = this;
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/set_user_default_address?uid=' + app.globalData.uid,
+      method: 'GET',
+      header: header,
+      data:{
+        addressId:id
+      },
+      success: function (res) {
+        if (res.data.code == 200) {
+          wx.showToast({
+            title: '设置成功',
+            icon: 'success',
+            duration: 1000,
+          })
+          that.setData({
+            _num: id
+          })
+        } else {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 1000,
+          })
+        }
+      }
+    })
+  }
+})

+ 1 - 0
application/routine/view/crmebN/pages/address/address.json

@@ -0,0 +1 @@
+{"navigationBarTitleText": "收获地址管理"}

+ 22 - 0
application/routine/view/crmebN/pages/address/address.wxml

@@ -0,0 +1,22 @@
+<view class="header"></view>
+<view class='address_ul'>
+    <block wx:for="{{addressArray}}">
+        <view class='address_li'>
+             <view class='addressx' data-id="{{item.id}}" bindtap='goOrder'>
+                  <view class='addressName'>收货人:{{item.real_name}}<text class='addressphone'>{{item.phone}}</text></view>
+                 <view class='addressLock'>收货地址:{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
+            </view>
+            <view class='addressc flex'>
+               <view data-idx='{{item.id}}' class='Maddress' bindtap='activetap' >
+                     <text class='iconfont icon-duihao1 Choice {{_num==item.id?"active":""}}' data-idx='{{item.id}}'></text>
+                     设为默认地址
+              </view>
+               <view>
+               <text class='edit' data-id="{{item.id}}" bindtap='editAddress'>编辑</text>
+                <text class='del' data-id="{{item.id}}" bindtap='delAddress'>删除</text>
+               </view> 
+            </view> 
+        </view>
+    </block>
+</view>
+<view class='footer' bindtap='addAddress'>新增地址</view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 14 - 0
application/routine/view/crmebN/pages/address/address.wxss


+ 411 - 0
application/routine/view/crmebN/pages/buycar/buycar.js

@@ -0,0 +1,411 @@
+// import bm from '../../utils/baseMath.js'
+// // pages/buycar/buycar.js
+var app = getApp();
+// // var wx = require('../../utils/wx.js');
+
+Page({
+  data: {
+    isAttrInfo:'attrInfo',
+    itemAttrInfo : '',
+    foothidden:false,
+    url: app.globalData.urlImages,
+    countmoney:"",
+    cartNum:"",
+    isAllSelect:false,
+    minusStatus: 'disabled',
+    cartList:[],
+    cartInvalid:[],
+    cartIdsStr:''
+  },
+
+  setNumber: function (e) {
+    var that = this;
+    var index = e.currentTarget.dataset.item;
+    var cartList = that.data.cartList;
+    var num = parseInt(e.detail.value);
+    var cart_num = num ? num : 1;
+    if (cartList[index].productInfo.attrInfo.stock){
+      if (cart_num > cartList[index].productInfo.stock) cart_num = cartList[index].productInfo.attrInfo.stock
+    }else{
+      if (cart_num > cartList[index].productInfo.attrInfo.stock) cart_num = cartList[index].productInfo.stock
+    }
+    cartList[index].cart_num = cart_num;
+    that.setData({
+      cartList: cartList
+    })
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/set_buy_cart_num?uid=' + app.globalData.uid,
+      method: 'GET',
+      data:{
+        cartId: cartList[index].id,
+        cartNum: cart_num
+      },
+      success: function (res) {
+        if (res.data.code == 400) {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 1000,
+          })
+        }
+      }
+    })
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    this.carnum();
+    this.countmoney();
+    this.getList();
+  },
+  btntap: function (e) {
+    this.data.foothidden = !this.data.foothidden;
+    this.setData({
+      foothidden: this.data.foothidden
+    })
+  },
+  getList:function(){
+    var that = this;
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_cart_list?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        if(res.data.code == 200){
+           that.setData({
+             cartList: res.data.data.valid,
+             cartInvalid: res.data.data.invalid
+           })
+        }
+      }
+    })
+  },
+  //加
+  numAddClick: function (event) {
+    var index = event.currentTarget.dataset.index;
+    this.data.cartList[index].cart_num = +this.data.cartList[index].cart_num + 1;
+    var minusStatus = this.data.cartList[index].cart_num <= 1 ? 'disabled' : 'normal';
+    this.setData({ cartList: this.data.cartList, minusStatus: minusStatus});
+    this.carnum();
+    this.countmoney();
+    this.addCartNum(this.data.cartList[index].cart_num, this.data.cartList[index].id);
+  },
+  //减
+  numDescClick: function (event) {
+    var index = event.currentTarget.dataset.index;
+    this.data.cartList[index].cart_num = this.data.cartList[index].cart_num <= 1 ? 1 : +this.data.cartList[index].cart_num - 1;
+    var minusStatus = this.data.cartList[index].cart_num <= 1 ? 'disabled' : 'normal';
+    this.setData({ cartList: this.data.cartList, minusStatus: minusStatus});
+    this.carnum();
+    this.countmoney();
+    this.addCartNum(this.data.cartList[index].cart_num, this.data.cartList[index].id);
+  },
+//单选;
+  switchSelect:function(e){
+    var index = e.currentTarget.dataset.index;
+    this.data.cartList[index].checked = !this.data.cartList[index].checked;
+    var len = this.data.cartList.length;
+    var selectnum = [];
+    for(var i = 0; i < len ;i++){
+      if (this.data.cartList[i].checked==true){
+        selectnum.push(true);
+      }
+    }
+    if (selectnum.length==len){
+       this.data.isAllSelect = true;
+    }else{
+      this.data.isAllSelect = false;
+    }
+    this.setData({
+      cartList: this.data.cartList,
+      isAllSelect: this.data.isAllSelect
+        });
+    this.carnum();
+    this.countmoney();
+    this.confirmOrder();
+  },
+  //全选
+  allChecked:function(e){
+    var selectAllStatus = this.data.isAllSelect;
+    selectAllStatus = !selectAllStatus;
+    var array = this.data.cartList;
+    for (var i = 0; i < array.length;i++){
+      array[i].checked = selectAllStatus;
+    };
+    this.setData({
+      cartList:this.data.cartList,
+      isAllSelect: selectAllStatus
+    })
+    this.carnum();
+    this.countmoney();
+    this.confirmOrder();
+  },
+  //数量
+  carnum(){
+     var carnum = 0;
+     var array = this.data.cartList;
+     for(var i = 0;i<array.length;i++){
+       if (array[i].checked==true){
+         carnum += parseInt(array[i].cart_num);
+       } 
+     }
+     this.setData({
+       cartNum: carnum
+     })
+  },
+  //总共价钱;
+  countmoney(){
+     var carmoney = 0;
+     var array = this.data.cartList;
+     for (var i = 0; i < array.length; i++) {
+       if (array[i].checked == true) {
+         if (array[i].productInfo.attrInfo){
+           carmoney += parseFloat(array[i].cart_num * array[i].productInfo.attrInfo.price);
+         }else{
+           carmoney += parseFloat(array[i].cart_num * array[i].productInfo.price);
+         }
+       }
+     }
+     this.setData({
+       countmoney: carmoney.toFixed(2)
+     })
+  },
+  confirmOrder:function(){
+    var array = this.data.cartList;
+    var cartIds = [];
+    for (var i = 0; i < array.length; i++) {
+      if (array[i].checked == true) {
+        cartIds.push(array[i].id);
+      }
+    }
+    if (cartIds.length > 0) {
+      this.goConfirm(cartIds);
+    }else{
+      this.setData({
+        cartIdsStr: ''
+      })
+    }
+  },
+  goConfirm : function(cartIds){
+    if (cartIds.length > 0) {
+      this.setData({
+        cartIdsStr: cartIds.join(',')
+      })
+    }
+    // console.log(this);
+  },
+  addCartNum: function (cartNum, cartId){
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/change_cart_num?uid=' + app.globalData.uid,
+      method: 'GET',
+      data: {
+        cartNum: cartNum,
+        cartId: cartId
+      },
+      header: header,
+      success: function (res) {
+        if (res.data.code == 200) {
+          wx.showToast({
+            title: '成功',
+            icon: 'success',
+            duration: 2000
+          })
+        } else {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 2000
+          })
+        }
+      }
+    })
+  },
+  collectAll: function () {
+    var array = this.data.cartList;
+    var productIds = [];
+    var that = this;
+    for (var i = 0; i < array.length; i++) {
+      if (array[i].checked == true) {
+        productIds.push(array[i].product_id);
+      }
+    }
+    if (productIds.length > 0) {
+      var header = {
+        'content-type': 'application/x-www-form-urlencoded',
+      };
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/collect_product_all?uid=' + app.globalData.uid,
+        method: 'GET',
+        data: {
+          productId: productIds.join(',')
+        },
+        header: header,
+        success: function (res) {
+          if (res.data.code == 200) {
+            wx.showToast({
+              title: '收藏成功',
+              icon: 'success',
+              duration: 2000
+            })
+          } else {
+            wx.showToast({
+              title: res.data.msg,
+              icon: 'none',
+              duration: 2000
+            })
+          }
+        }
+      })
+    }
+    console.log(productIds);
+  },
+  cartDelAll:function(){
+    var array = this.data.cartList;
+    var ids = [];
+    var that = this;
+    for (var i = 0; i < array.length; i++) {
+      if (array[i].checked == true) {
+        ids.push(array[i].id);
+      }
+    }
+    if (ids.length > 0){
+      var header = {
+        'content-type': 'application/x-www-form-urlencoded',
+      };
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/remove_cart?uid=' + app.globalData.uid,
+        method: 'GET',
+        data: {
+          ids: ids.join(',')
+        },
+        header: header,
+        success: function (res) {
+          if (res.data.code == 200) {
+            wx.showToast({
+              title: '删除成功',
+              icon: 'success',
+              duration: 2000
+            })
+            for (var i = 0; i < ids.length; i++) {
+              for (var j = 0; j < array.length; j++) {
+                if (ids[i] == array[j].id) {
+                  array.splice(j, 1);
+                }
+              }
+            }
+            that.setData({
+              cartList: array
+            })
+          } else {
+            wx.showToast({
+              title: res.data.msg,
+              icon: 'none',
+              duration: 2000
+            })
+          }
+        }
+      })
+    }
+  },
+  cartDel:function(e){
+    var that = this;
+    if (e.currentTarget.dataset.id){
+      var header = {
+        'content-type': 'application/x-www-form-urlencoded',
+      };
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/remove_cart?uid=' + app.globalData.uid,
+        method: 'GET',
+        data: {
+          ids: e.currentTarget.dataset.id
+        },
+        header: header,
+        success: function (res) {
+           if(res.data.code == 200){
+             wx.showToast({
+               title: '删除成功',
+               icon: 'success',
+               duration: 2000
+             })
+             var cartInvalid = that.data.cartInvalid;
+             for (var i = 0; i < cartInvalid.length ; i++){
+               if (e.currentTarget.dataset.id == cartInvalid[i].id){
+                 cartInvalid.splice(i,1);
+                 that.setData({
+                   cartInvalid: cartInvalid
+                 })
+               }
+             }
+           }else{
+             wx.showToast({
+               title: res.data.msg,
+               icon: 'none',
+               duration: 2000
+             })
+           }
+        }
+      })
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+ 
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    this.carnum();
+    this.countmoney();
+    this.getList();
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
+})

+ 3 - 0
application/routine/view/crmebN/pages/buycar/buycar.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "购物车"
+}

+ 81 - 0
application/routine/view/crmebN/pages/buycar/buycar.wxml

@@ -0,0 +1,81 @@
+<form>
+  <view class='head flex'>
+    <view class='txt'>购物数量({{cartNum}})</view>
+    <view class='btn' bindtap='btntap'>管理</view>
+  </view>
+  <view class='car-list'>
+    <block wx:for="{{cartList}}" wx:key>
+        <view class='list-item flex'>
+          <view class='select-btn flex' data-index='{{index}}' bindtap='switchSelect'>
+          <label class="checkbox">
+            <checkbox value="{{index}}" checked="{{item.checked}}" />
+          </label>
+        </view>
+        <view class='picture'><image src='{{url}}{{item.productInfo.image}}'></image></view>
+        <view class='pro-info flex'>
+          <view class='pro-title'>{{item.productInfo.store_name}}</view>
+          <view class='pro-des' wx:if="{{item.productInfo.attrInfo}}">{{item.productInfo.attrInfo.suk}}</view>
+           <view class='pro-price' wx:if="{{item.productInfo.attrInfo}}"><text>¥</text>{{item.productInfo.attrInfo.price}}</view>
+          <view class='pro-price' wx:else><text>¥</text>{{item.productInfo.price}}</view> 
+          <!-- <view class='pro-price'><text>¥</text>{{item.productInfo.attrInfo.price}}</view> -->
+        </view>
+        <view class='count-wrapper flex'>
+          <text data-index="{{index}}" bindtap="numDescClick" class='{{minusStatus}}'>-</text>
+          <!-- <text class='num'>{{item.cart_num}}</text> -->
+           <input class='num' data-item='{{index}}' type="number" value='{{item.cart_num}}' bindblur='setNumber'/>
+          <text class='add' data-index="{{index}}" bindtap="numAddClick">+</text>
+        </view>
+      </view>
+    </block>
+  </view>
+  <!-- 失效页面 -->
+  <view class='fail-list' wx:if="{{cartInvalid.length > 0}}">
+    <view class='title-bar flex'>
+      <text class='line'></text>
+      <text class='txt'>失效商品</text>
+      <text class='line'></text>
+    </view>
+    <view class='fail-item flex' wx:for="{{cartInvalid}}">
+      <view class='pro-img'><image src='{{url}}{{item.productInfo.image}}'></image></view>
+      <view class='pro-infos flex'>
+        <view class='title'>{{item.productInfo.store_name}}</view>
+      <view class='pro-price' wx:if="{{item.productInfo.attrInfo}}"><text>¥</text>{{item.productInfo.attrInfo.price}}</view>
+          <view class='pro-price' wx:else><text>¥</text>{{item.productInfo.price}}</view> 
+          </view>
+      <view class='del-btn' data-id="{{item.id}}" bindtap="cartDel">删除</view>
+    </view>
+  </view>
+  <view style='height:120rpx;'></view>
+  <view class='foot'>
+    <view class='pay-wrapper flex' hidden='{{foothidden}}'>
+      <view class='left-wrapper flex'>
+        <view class='all-select' bindtap="allChecked">
+          <label class="checkbox">
+            <checkbox value="Boolean"  checked="{{isAllSelect}}"/>
+          </label>
+        </view>
+        <view class='txt'>全选</view>
+        <view class='count-num'>
+          <text>合计:</text>¥{{countmoney}}
+        </view>
+      </view>
+      <navigator class='flex' hover-class="none" url="/pages/order-confirm/order-confirm?id={{cartIdsStr}}">
+        <view class='pay-btn'>立即结算</view>
+      </navigator>
+    </view>
+    <view class='delete-wrapper flex'>
+      <view class='left-wrapper flex'>
+        <view class='all-select' bindtap="allChecked">
+          <label class="checkbox">
+            <checkbox value="Boolean"  checked="{{isAllSelect}}"/>
+          </label>
+        </view>
+        <view class='txt'>全选</view>
+      </view>
+      <view class='right-wrapper flex'>
+        <view class='collection-btn' bindtap='collectAll'>移入收藏</view>
+        <view class='delete-btn' bindtap='cartDelAll'>删除</view>
+      </view>
+    </view>
+  </view>
+</form>

+ 42 - 0
application/routine/view/crmebN/pages/buycar/buycar.wxss

@@ -0,0 +1,42 @@
+.head{z-index: 99; position: fixed;left: 0; top: 0; width: 100%; height: 70rpx; padding: 0 28rpx; background-color: #ff3d3d; color: #fff; justify-content: space-between; align-items: center; box-sizing: border-box;}
+.car-list{position: relative; margin-top: 80rpx; background-color: #fff;}
+.car-list .list-item{position: relative; padding: 20rpx 0; border-bottom: 1px solid #eee; }
+.select-btn{width: 83rpx; text-align: center; align-items: center; justify-content: center;}
+.select-btn checkbox .wx-checkbox-input{border-radius: 50%}
+.select-btn checkbox .wx-checkbox-input.wx-checkbox-input-checked{color: #fff!important; border:1px solid #ff3d3d;background-color: #ff3d3d; border-radius: 50%;}
+.picture{width: 200rpx; height: 200rpx;}
+.picture image{width: 100%; height: 100%;}
+.pro-info{width: 425rpx; margin: 0 20rpx; flex-direction: column; justify-content: space-around;}
+.pro-info .pro-title{display: -webkit-box; display:-moz-box; display:box;-webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-line-clamp: 2;-moz-line-clamp: 2;overflow: hidden; color: #262626;}
+.pro-info .pro-des{font-size: 24rpx; color: #ababab; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
+.pro-info .pro-price{font-size: 38rpx; color: #ff3d3d;}
+.pro-info .pro-price text{font-size: 25rpx;}
+.count-wrapper{position: absolute; right:20rpx; bottom:20rpx;width: 160rpx; height: 47rpx; box-sizing: border-box; border: 1px solid #ddd; border-radius: 3px; align-items: center;}
+.count-wrapper text{flex: 1;text-align: center; height: 100%; font-size: 36rpx; color:#454545; line-height: 37rpx;}
+.count-wrapper .num{flex: initial;width: 66rpx; color: #333; font-size: 28rpx;border-left: 1px solid #ddd;border-right: 1px solid #ddd; line-height: 47rpx;text-align: center}
+ .disabled{color:#ccc !important;} 
+.fail-list .title-bar{width: 100%; height: 118rpx; align-items: center; color: #aaa;justify-content: center;}
+.fail-list .title-bar .line{width: 70rpx; height: 1px; background-color: #ddd; }
+.fail-list .title-bar .txt{margin: 0 35rpx;}
+.fail-item{position: relative; padding: 20rpx; background-color: #fff; justify-content: space-between; border-bottom: 1px solid #eee;}
+.fail-item .pro-img,.fail-item .pro-img image{width: 185rpx; height: 185rpx;}
+.fail-item .pro-infos{width: 495rpx; flex-direction: column; justify-content: space-around;}
+.fail-item .pro-infos .title{color: #777;display: -webkit-box; display:-moz-box; display:box;-webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-line-clamp: 2;-moz-line-clamp: 2;overflow: hidden;}
+.fail-item .pro-infos .price{font-size: 38rpx; color: #999;}
+.fail-item .pro-infos .price text{font-size: 25rpx;}
+.fail-item .del-btn{position: absolute; right: 20rpx; bottom: 30rpx; width: 130rpx; height: 50rpx; box-sizing: border-box; text-align: center; line-height: 50rpx; border:1px solid #ff3d3d; font-size: 24rpx; color: #ff3d3d; border-radius: 3px;}
+.foot{position: fixed;left: 0; bottom: 0; width: 100%; height: 99rpx; background-color: #fff; border-top: 1px solid #eee; }
+.foot .all-select{width: 87rpx; text-align: center; align-items: center; justify-content: center;}
+.foot .all-select  checkbox .wx-checkbox-input{border-radius: 50%}
+.foot .all-select checkbox .wx-checkbox-input.wx-checkbox-input-checked{color: #fff!important; border:1px solid #ff3d3d;background-color: #ff3d3d; border-radius: 50%;}
+.foot .count-num{margin-left: 75rpx;color:#FF3D3D;}
+.foot .count-num>text{color:#000000;}
+.foot .pay-btn{width: 275rpx; height: 99rpx; background-color: #ff3d3d; text-align: center; line-height: 99rpx; color: #fff;}
+.foot .left-wrapper{flex: 1; align-items: center;}
+.delete-wrapper{align-items: center; height: 100%;}
+.delete-wrapper .right-wrapper{width: 370rpx;padding-right: 20rpx; justify-content: space-between;}
+.delete-wrapper .right-wrapper .collection-btn{width: 175rpx; height: 65rpx; text-align: center; line-height: 65rpx;color: #ff3d3d; border:1px solid #ff3d3d; border-radius: 3px;}
+.delete-wrapper .right-wrapper  .delete-btn{width: 175rpx; height: 65rpx; text-align: center; line-height: 65rpx;color: #999; border:1px solid #999; border-radius: 3px;}
+
+
+

+ 163 - 0
application/routine/view/crmebN/pages/cash/cash.js

@@ -0,0 +1,163 @@
+var app = getApp();
+// pages/cash/cash.js
+Page({
+  data: {
+    ooo:'',
+    _num:0,
+    url: app.globalData.urlImages,
+    hiddentap: true,
+    hidde: true,
+    minmoney:'',
+    money:'',
+    index:0,
+    array:["请选择银行","招商银行","建设银行","农业银行"]
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad:function (opends) {
+    app.setBarColor();
+    var money = opends.money;
+    var that = this;
+    that.setData({
+      money: money
+    })
+    this.getUserExtractBank();
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/minmoney?uid=' + app.globalData.uid,
+      method: 'POST',
+      success: function (res) {
+        that.setData({
+          minmoney: res.data.msg
+        })
+      }
+    })
+  },
+  getUserExtractBank:function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_user_extract_bank?uid=' + app.globalData.uid,
+      method: 'get',
+      success: function (res) {
+        that.setData({
+          array: res.data.data
+        });
+      }
+    });
+  },
+  cardtap:function(e){
+    var flag = this.data.hiddentap;
+    if (flag){
+      this.setData({
+        hiddentap: false
+      })
+    }else{
+      this.setData({
+        hiddentap: true
+      })
+    }  
+  },
+  idnumtap: function (e) {
+    this.setData({
+      _num: e.target.dataset.idnum,
+      hiddentap: true
+    })
+    if (e.target.dataset.idnum==1){
+      this.setData({
+        hidde: false
+      })
+    }else{
+      this.setData({
+        hidde: true
+      })
+    }
+  },
+  maskhide:function(e){
+      this.setData({
+        hiddentap: true
+      })
+  },
+  bindPickerChange:function(e){
+      this.setData({
+        index: e.detail.value
+      })
+  },
+  formSubmit:function(e){
+    var header = {
+      // 'content-type': 'application/x-www-form-urlencoded',
+      'cookie': app.globalData.sessionId//读取cookie
+    };
+    var that = this;
+    var flag = true;
+    var warn = "";
+    var minmon = that.data.minmoney;
+    var mymoney = that.data.money;
+    var list={};
+    if (that.data.hidde==true){
+      list.$name = e.detail.value.name;
+      list.cardnum = e.detail.value.cardnum;
+      list.bankname = that.data.array[that.data.index];
+      list.money = e.detail.value.money;
+      list.money = Number(list.money);
+      list.extract_type = 'bank';
+      if (list.$name == "") {
+        warn = "请填写持卡人姓名";
+      } else if (list.cardnum == "") {
+        warn = "请输入银行卡号";
+      } else if (list.bankname == "请选择银行") {
+        warn = "请选择银行";
+      } else if (list.money < minmon) {
+        warn = "请输入正确的金额"
+      } else if (list.money > mymoney) {
+        warn = "您的余额不足"
+      }else {
+        flag = false;
+      }
+      if (flag == true) {
+        wx.showModal({
+          title: '提示',
+          content: warn
+        })
+      }
+    } else {
+      list.weixin = e.detail.value.weixin;
+      list.money = e.detail.value.wmoney;
+      list.money = Number(list.money);
+      list.extract_type = 'weixin';
+      if (list.weixin == "") {
+        warn = "请填写微信号";
+      } else if (list.money < minmon) {
+        warn = "请输入正确的金额"
+      } else if (list.money > mymoney) {
+        warn = "您的余额不足"
+      } else {
+        flag = false;
+      }
+      if (flag == true) {
+        wx.showModal({
+          title: '提示',
+          content: warn
+        })
+      }
+    }
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/user_extract?uid=' + app.globalData.uid,
+      data: { lists: list},
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        // console.log(res);
+        wx.showToast({
+          title: res.data.msg,
+          icon: 'success',
+          duration: 1500
+        })
+        // that.setData({
+        //   mainArray: res.data.data
+        // })
+      }
+    })
+  }
+
+
+})

+ 1 - 0
application/routine/view/crmebN/pages/cash/cash.json

@@ -0,0 +1 @@
+{"navigationBarTitleText": "提现"}

+ 32 - 0
application/routine/view/crmebN/pages/cash/cash.wxml

@@ -0,0 +1,32 @@
+<view class='header'>
+   <view class="money flex" bindtap='cardtap'>{{_num==0?"银行卡":"微信钱包"}}<text class='iconfont icon-xialajiantou cashxia'></text></view>
+    <view class='cashdown' hidden='{{hiddentap}}'>
+        <view class='cashdown-li' data-idnum='0' bindtap='idnumtap'><text class='iconfont icon-msnui-card card'></text><text class='cash-text'>银行卡</text><text class='cashdui iconfont {{_num==0?"icon-duihao":""}}'></text></view>
+        <view class='cashdown-li' data-idnum='1' bindtap='idnumtap'><text class='iconfont icon-weixin weixin'></text><text class='cash-text' >微信钱包</text><text class='cashdui iconfont {{_num==1?"icon-duihao":""}}'></text></view>
+    </view>
+</view>
+    <form bindsubmit="formSubmit">
+        <view class='information' hidden='{{_num==0?false:true}}'>
+            <view class='information-li flex'><label>持卡人</label><input type='text' placeholder-class='placeholder' placeholder='某某人' name="name"/></view>
+            <view class='information-li flex'><label>卡号</label><input type='number' placeholder-class='placeholder' placeholder='请输入银行卡号' name="cardnum"></input></view>
+             <view class='information-li flex'><label>提现金额</label><input type='number' placeholder-class='placeholder' placeholder='最低提现金额为{{minmoney}}' name="money"></input></view>
+            <view class='information-li flex'>
+                <label class='bankname'>银行</label>
+                <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
+                    <text class='Bank'>{{array[index]}}</text>
+                    <text class='iconfont icon-xiala bankxia'></text>
+                </picker>
+            </view>
+           
+         
+        </view>
+        <view class='cash' hidden='{{hidde}}' >
+         <view class='cashNum flex'><label>微信号</label><input type='text' placeholder-class='placeholder' placeholder='微信号' name="weixin"></input></view>
+          <view class='cashNum flex'><label>提现金额</label><input type='number' placeholder-class='placeholder' placeholder='最低提现金额为{{minmoney}}' name="wmoney"></input></view>
+         
+        </view>
+         <view class='balance'>当前用户余额为{{money}}</view>
+      <button class='but' formType="submit">提现</button>
+    </form>
+    <view class='mask' hidden='{{hiddentap}}' bindtap='maskhide'></view>
+    

+ 22 - 0
application/routine/view/crmebN/pages/cash/cash.wxss

@@ -0,0 +1,22 @@
+.money{height:100rpx;line-height:100rpx;font-size:30rpx;color:#333333;background-color:#FFFFFF;border-bottom:1rpx solid #F4F4F4;justify-content:space-between;padding:0 30rpx;}
+.cashxia{font-size:50rpx !important;color:#B6B6B6;}
+.information{width:100%;height:415rpx;background-color:#ffffff;display:block;margin-top:20rpx;}
+.information-li{height:100rpx;padding:0 30rpx;line-height:100rpx;border-bottom:1rpx solid #F7F7F7;}
+.information-li label,.cashNum label{width:170rpx;display:inline-block;}
+.information-li input,.cashNum input{width:100%;height:100%;}
+.placeholder{color:#B0B0B0;}
+.cash{width:100%;height:210rpx;background-color:#ffffff;margin-top:20rpx;}
+.cashNum{padding:0 30rpx;border-bottom:1px solid #EAEAEA;color:#333333;height:100rpx;line-height:100rpx;}
+.balance{padding:0 30rpx;font-size:24rpx;color:#999999;height:60rpx;line-height:59rpx;}
+.but{width:690rpx;height:90rpx;line-height:90rpx;text-align:center;background-color:#FF3D3D;color:#ffffff;font-size:32rpx;margin-top:70rpx;}
+.header{position:relative;z-index:99;}
+.cashdown{background-color:#ffffff;width:100%;position:absolute;top:100rpx;}
+.cashdown .cashdown-li{height:83rpx;line-height:83rpx;border-top:1rpx solid #F4F4F4;padding:0 30rpx;color:#666666;position:relative;}
+.mask{position: fixed;top:0;left:0;bottom:0;right:0;background-color:#000000;opacity:0.6;}
+.card,.weixin{color:#00A8FF;font-size:40rpx;position:absolute;top:1rpx;}
+.cashdui{color:#FF3D3D;font-size:36rpx;float:right;}
+.weixin{color:#3BAF34;}
+.cash-text{margin-left:58rpx;}
+.Bank{color:#808080;display:inline-block;width:510rpx;}
+.bankxia{float:right;font-size:45rpx;color:#999999;}
+.bankname{width:137rpx !important;}

+ 70 - 0
application/routine/view/crmebN/pages/collect/collect.js

@@ -0,0 +1,70 @@
+var app = getApp();
+// pages/collect/collect.js
+Page({
+  data: {
+    url: app.globalData.urlImages,
+    sum:'',
+    Arraylist:[]
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();   
+    this.getcollect();
+  },
+  getcollect:function(){
+    var that = this;
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    }
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_user_collect_product?uid=' + app.globalData.uid,
+      method: 'GET',
+      header: header,
+      success: function (res) {
+        if (res.data.code==200){
+          that.setData({
+            sum: res.data.data.length,
+            Arraylist: res.data.data
+          })
+        }else{
+        // console.log(res);
+        that.setData({
+          sum: 0,
+          Arraylist: []
+        })
+        }
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+  del:function(e){
+    var that=this;
+    var id = e.target.dataset.id;
+    console.log(id);
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_user_collect_product_del?uid=' + app.globalData.uid,
+      data:{pid:id},
+      method: 'GET',
+      header: header,
+      success: function (res) {
+        if (res.data.code == 200){
+          that.getcollect();
+        }  
+      }
+    })
+  },
+
+ 
+})

+ 1 - 0
application/routine/view/crmebN/pages/collect/collect.json

@@ -0,0 +1 @@
+{"navigationBarTitleText": "我的收藏"}

+ 26 - 0
application/routine/view/crmebN/pages/collect/collect.wxml

@@ -0,0 +1,26 @@
+<view class="collect">
+  <view class='collect-title'>您收藏了<text class='title-num'>{{sum}}</text>件商品</view>
+  <view class='collect-ul'>
+     <block wx:for="{{Arraylist}}">
+         <view class='collect-li flex'>
+           <navigator  url="/pages/product-con/index?id={{item.pid}}" hover-class="none">
+            <view  class='images'>
+               <image src='{{url}}{{item.image}}'></image>
+               <!-- <text class='imagebg'></text> -->
+            </view>
+             </navigator>
+            <view class='li-right'>
+               <view class='text'>{{item.store_name}}</view>
+               <view class='conter'>销量:{{item.sales}}</view>
+               <view class='money flex'>
+                  <view class='money-view on'>¥<text class='moneyNum'>{{item.price}}</text></view>
+                  <view data-id="{{item.pid}}" class='iconfont icon-shanchu del' bindtap='del'></view>
+               </view>
+            </view>   
+            
+         </view>
+        
+     </block>
+  </view>
+</view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 15 - 0
application/routine/view/crmebN/pages/collect/collect.wxss


+ 245 - 0
application/routine/view/crmebN/pages/comment-con/comment-con.js

@@ -0,0 +1,245 @@
+// pages/comment-con/comment-con.js
+var app = getApp();
+var wxh = require('../../utils/wxh.js');
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    xinghidden:true,
+    xinghidden2:true,
+    xinghidden3: true,
+    url: app.globalData.urlImages,
+    hidden:false,
+    unique:'',
+    uni:'',
+    dataimg:[]
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (e) {
+    app.setBarColor();
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var that = this;
+    console.log(e);
+    if (e.unique) {
+      var unique = e.unique;
+      that.setData({
+        unique: unique,
+      });
+    }
+    if (e.uni){
+      that.setData({
+        uni: e.uni
+      });
+    }
+    wx.showLoading({ title: "正在加载中……" });
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_order_product?uid=' + app.globalData.uid,
+      data: { unique: unique},
+      method: 'get',
+      header: header,
+      success: function (res) {
+        wx.hideLoading();
+        that.setData({
+          ordercon: res.data.data
+        });
+      },
+      fail: function (res) {
+        console.log('submit fail');
+      },
+      complete: function (res) {
+        console.log('submit complete');
+      }
+    });
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+  tapxing:function(e){
+    var index = e.target.dataset.index;
+    this.setData({
+      xinghidden: false,
+      xing: index
+    })
+  },
+  tapxing2: function (e) {
+    var index = e.target.dataset.index;
+    this.setData({
+      xinghidden2: false,
+      xing2: index
+    })
+  },
+  tapxing3: function (e) {
+    var index = e.target.dataset.index;
+    this.setData({
+      xinghidden3: false,
+      xing3: index
+    })
+  },
+  uploadpic:function(e){
+    var that = this;
+    wx.chooseImage({
+      count: 1,  //最多可以选择的图片总数  
+      sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有  
+      sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有  
+      success: function (res) {
+        // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片  
+        var tempFilePaths = res.tempFilePaths;
+        //启动上传等待中...  
+        wx.showLoading({
+          title: '图片上传中',
+        })
+        console.log(tempFilePaths);
+        var len = tempFilePaths.length;
+        for (var i = 0; i < len; i++) {
+          wx.uploadFile({
+            url: app.globalData.url + '/routine/auth_api/upload?uid=' + app.globalData.uid,
+            filePath: tempFilePaths[i],
+            name: 'pics',
+            formData: {
+              'filename': 'pics'
+            },
+            header: {
+              "Content-Type": "multipart/form-data"
+            },
+            success: function (res) {
+              wx.hideLoading();
+              console.log(res);
+              if(res.statusCode == 403){
+                   wx.showToast({
+                     title: res.data,
+                     icon: 'none',
+                     duration: 1500,
+                   })
+              } else {
+                var data = JSON.parse(res.data);
+                that.data.dataimg.push(data);
+                that.setData({
+                  dataimg: that.data.dataimg
+                });
+                var len2 = that.data.dataimg.length;
+                if (len2 >= 8) {
+                  that.setData({
+                    hidden: true
+                  });
+                }
+              }
+            },
+            fail: function (res) {
+              wx.showToast({
+                title: '上传图片失败',
+                icon: 'none',
+                duration: 2000
+              })
+            }
+          });
+        }
+      }
+    });  
+  },
+  formSubmit:function(e){
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var that = this;
+    var unique = that.data.unique;
+    var comment = e.detail.value.comment;
+    var product_score = that.data.xing;
+    var service_score = that.data.xing2;
+    var pics = []; 
+    var dataimg = that.data.dataimg;
+    for (var i = 0; i < dataimg.length;i++){
+      pics.push(that.data.url+dataimg[i].data.url)
+    };
+    if (comment==""){
+      wx.showToast({
+        title: '请填写你对宝贝的心得!',
+        icon: 'none',
+        duration: 2000
+      })
+      return false;
+    }
+    wx.showLoading({ title: "正在发布评论……" });
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/user_comment_product?uid=' + app.globalData.uid+'&unique=' + unique,
+      data: {comment: comment, product_score: product_score, service_score: service_score, pics: pics},
+      method: 'post',
+      header: header,
+      success: function (res) {
+        wx.hideLoading();
+        if (res.data.code==200){
+          wx.showToast({
+            title: '评价成功',
+            icon: 'success',
+            duration: 1000
+          })
+          setTimeout(function(){
+             wx.navigateTo({
+               url: '/pages/orders-con/orders-con?order_id='+that.data.uni,
+             })
+          },1200)
+        }else{
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 2000
+          })
+        }
+      },
+      fail: function (res) {
+        console.log('submit fail');
+      },
+      complete: function (res) {
+        console.log('submit complete');
+      }
+    });
+  },
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
+})

+ 3 - 0
application/routine/view/crmebN/pages/comment-con/comment-con.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "评论页面"
+}

+ 57 - 0
application/routine/view/crmebN/pages/comment-con/comment-con.wxml

@@ -0,0 +1,57 @@
+<view class="commcon">
+    <view class='commcon-header flex'>
+       <view class='commcon-pic'><image src='{{url}}{{ordercon.cart_info.productInfo.image}}'></image></view>
+       <view class='commcon-con flex'>
+          <view class='commcon-name'>{{ordercon.cart_info.productInfo.store_name}}</view>
+          <view class='commcon-text'>{{ordercon.cart_info.productInfo.store_name}}</view>
+          <view class='commcon-money'><text>¥</text>{{ordercon.cart_info.productInfo.price}}<text></text><text class='commcon-num'>x{{ordercon.cart_info.cart_num}}</text></view>
+       </view>
+    </view>
+  <form bindsubmit="formSubmit">
+    <view class='commcon-ping'>
+        <textarea placeholder='宝贝满足你的期待么?说说你的想法,分享给想买的他们吧~' placeholder-class='placeholder' name = 'comment'></textarea>
+        <view class='imgul'>
+            <block wx:for="{{dataimg}}">
+               <view class='imgpic'><image src='{{url}}{{item.data.url}}' class='dataimg'></image><icon class='iconfont icon-guanbi guanbi'></icon></view>
+            </block>
+            <view class='upimg' bindtap='uploadpic' hidden='{{hidden}}'></view>
+        </view>
+    </view>
+    <view class='commcon-ul flex'>
+       <view class='commcon-li flex'>
+           <text class='li-lien'>商品质量</text>
+           <view class='commconxing li-lien'>
+              <icon bindtap='tapxing' data-index='1' class='iconfont icon-pingjia {{xing>=1?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing' data-index='2' class='iconfont icon-pingjia {{xing>=2?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing' data-index='3' class='iconfont icon-pingjia {{xing>=3?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing' data-index='4' class='iconfont icon-pingjia {{xing>=4?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing' data-index='5' class='iconfont icon-pingjia {{xing>=5?"icon-xingxing1":""}}'></icon>
+           </view>
+           <text class='li-lien li-lien3' hidden='{{xinghidden}}'>{{xing}}分</text>
+       </view>
+        <view class='commcon-li flex'>
+           <text class='li-lien'>服务态度</text>
+           <view class='commconxing li-lien'>
+              <icon bindtap='tapxing2' data-index='1' class='iconfont icon-pingjia {{xing2>=1?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing2' data-index='2' class='iconfont icon-pingjia {{xing2>=2?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing2' data-index='3' class='iconfont icon-pingjia {{xing2>=3?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing2' data-index='4' class='iconfont icon-pingjia {{xing2>=4?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing2' data-index='5' class='iconfont icon-pingjia {{xing2>=5?"icon-xingxing1":""}}'></icon>
+           </view>
+           <text class='li-lien li-lien3' hidden='{{xinghidden2}}'>{{xing2}}分</text>
+       </view>
+       <!-- <view class='commcon-li flex'>
+           <text class='li-lien'>物流服务</text>
+          <view class='commconxing li-lien'>
+              <icon bindtap='tapxing3' data-index='1' class='iconfont icon-pingjia {{xing3>=1?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing3' data-index='2' class='iconfont icon-pingjia {{xing3>=2?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing3' data-index='3' class='iconfont icon-pingjia {{xing3>=3?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing3' data-index='4' class='iconfont icon-pingjia {{xing3>=4?"icon-xingxing1":""}}'></icon>
+              <icon bindtap='tapxing3' data-index='5' class='iconfont icon-pingjia {{xing3>=5?"icon-xingxing1":""}}'></icon>
+           </view>
+           <text class='li-lien li-lien3' hidden='{{xinghidden3}}'>{{xing3}}分</text>
+       </view>  -->
+    </view>
+    <button class='commcon-btn' formType="submit">发布评论</button>
+  </form>
+</view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 25 - 0
application/routine/view/crmebN/pages/comment-con/comment-con.wxss


+ 189 - 0
application/routine/view/crmebN/pages/comment/comment.js

@@ -0,0 +1,189 @@
+
+var app = getApp();
+// pages/comment/comment.js
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    url: app.globalData.urlImages,
+    comm:1,
+    productId:'',
+    uinfo:[],
+    alllength:'',
+    newlength:'',
+    piclength:''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    app.setBarColor();
+    var productId = options.productId;
+    this.setData({
+      productId: productId
+    })
+    this.comment();
+    this.alllen();
+    this.newlen();
+    this.piclen();
+  },
+  alllen:function(){
+    var that = this;
+    var productId = that.data.productId;
+    var filter='all';
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
+      data: { productId: productId, filter: filter },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            alllength: res.data.data.length
+          })
+        } else {
+          that.setData({
+            alllength: ''
+          })
+        }
+      }
+    })
+  },
+  newlen: function () {
+    var that = this;
+    var productId = that.data.productId;
+    var filter = 'new';
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
+      data: { productId: productId, filter: filter },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            newlength: res.data.data.length
+          })
+        } else {
+          that.setData({
+            newlength: ''
+          })
+        }
+      }
+    })
+  },
+  piclen: function () {
+    var that = this;
+    var productId = that.data.productId;
+    var filter = 'pic';
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
+      data: { productId: productId, filter: filter },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            piclength: res.data.data.length
+          })
+        } else {
+          that.setData({
+            piclength: ''
+          })
+        }
+      }
+    })
+  },
+  comment: function (){
+    var that=this;
+    var comm = that.data.comm;
+    var filter='';
+    if (comm==1){
+      filter = 'all';
+    } else if (comm == 2){
+      filter = 'new';
+    } else if (comm == 3) {
+      filter = 'pic';
+    } else{
+      return false;
+    }
+    var productId = that.data.productId;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
+      data: { productId: productId, filter: filter},
+      method: 'GET',
+      success: function (res) {
+       if(res.data.code==200){
+         that.setData({
+           uinfo: res.data.data,
+           replyCount: res.data.data.length
+         })
+       }else{
+         that.setData({
+           uinfo: [],
+           replyCount:''
+         })
+       }
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+  commentap:function(e){
+    var index = e.target.dataset.index;
+    this.setData({
+      comm: index
+    })
+    this.comment();
+  },
+  getImagePreview:function(e){//图片预览
+    wx.previewImage({
+      current: e.currentTarget.dataset.image, // 当前显示图片的http链接
+      urls: e.currentTarget.dataset.images // 需要预览的图片http链接列表
+    })
+  },
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
+})

+ 3 - 0
application/routine/view/crmebN/pages/comment/comment.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "评论列表"
+}

+ 24 - 0
application/routine/view/crmebN/pages/comment/comment.wxml

@@ -0,0 +1,24 @@
+<view class="comment">
+   <view class='comment-header'>
+      <text data-index='1' class='{{comm == 1?"comment-on":""}}' bindtap='commentap'>全部({{alllength}})</text>
+      <text data-index='2' class='{{comm == 2?"comment-on":""}}' bindtap='commentap'>最新({{newlength}})</text>
+      <text data-index='3' class='{{comm == 3?"comment-on":""}}' bindtap='commentap'>有图({{piclength}})</text>
+      <!-- <text data-index='4' class='header-cha {{comm == 4?"comment-on":""}}' bindtap='commentap'>差评(2)</text> -->
+   </view>
+   <view class='comment-ul'>
+
+      <view class='comment-li' wx:for="{{uinfo}}">
+          <view class='li-view1'><image src='{{item.avatar}}' class='li-pic li-title'></image><text class='li-title'>{{item.nickname}}</text><view class='start star{{item.star}} li-title'></view></view>
+          <view class='li-text'>{{item.comment}}</view>
+             <view class='flex flex-pic'> 
+          <block wx:for="{{item.pics}}" wx:for-item="items">
+                <image src='{{items}}' class='li-pic2' bindtap='getImagePreview' data-image="{{items}}" data-images="{{item.pics}}"></image>
+          </block>
+             </view> 
+          <view class='li-time'><text>{{item.add_time}}</text>
+           <text>{{item.suk}}</text> 
+          </view>
+      </view>
+     
+   </view>
+</view>

+ 15 - 0
application/routine/view/crmebN/pages/comment/comment.wxss

@@ -0,0 +1,15 @@
+.comment .comment-header{height:100rpx;line-height:100rpx;background-color:#fff;padding:0 20rpx;}
+.comment .comment-header text{height:56rpx;padding:0 18rpx;font-size:24rpx;color:#666666;background-color:#FFE7E7;margin-right:15rpx;display:inline-block;border-radius:50rpx;line-height:56rpx;}
+.comment .header-cha{background-color:#F5F5F5!important;}
+.comment .comment-ul{margin-top:2rpx;}
+.comment .comment-li{background-color:#fff;margin-bottom:10rpx;}
+.comment .li-view1{padding:20rpx 20rpx 29rpx 20rpx;}
+.comment .li-view1 .li-title{display:inline-block;vertical-align:middle;margin-right:12rpx;font-size:28rpx;color:#000000;}
+.comment .li-pic{width:57rpx;height:57rpx;border-radius:50%;}
+.comment .li-text{font-size:26rpx;color:#000000;padding:0 20rpx;}
+.comment .li-time{margin-top:23rpx;font-size:24rpx;color:#888888;padding:0 20rpx 30rpx 20rpx;}
+.comment .li-time text{margin-right:15rpx;}
+.comment .flex-pic{flex-wrap:wrap;justify-content:flex-start;padding:0!important;}
+.comment .li-pic2{width:163rpx;height:163rpx;margin-top:23rpx;margin-left:20rpx;
+}
+.comment-on{background-color:#FF3D3D!important;color:#fff!important;}

+ 133 - 0
application/routine/view/crmebN/pages/coupon-status/coupon-status.js

@@ -0,0 +1,133 @@
+// pages/coupon/coupon.js
+// var fileData = require('../../utils/util.js'); //暴露的接口;
+var app = getApp();
+Page({
+  data: {
+    _active:0,
+    headerArray: ['可领取'],
+    couponArray:"",
+    userstatus:"",
+    title: '加载中...',
+    cartId:'',
+    pinkId:'',
+    addressId:'',
+    totalPrice:''
+  },
+  headertap:function(e){
+      this.setData({
+        _active: e.target.dataset.idx
+      });
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    if (options.cartId){
+      this.setData({
+        cartId: options.cartId,
+        totalPrice: options.totalPrice,
+        pinkId: options.pinkId,
+        addressId: options.addressId,
+      })
+      this.getCouponOrderList();
+    }else {
+      this.getCouponList();
+    }
+  },
+  getCouponUser:function(e){
+    // e.currentTarget.dataset.id;
+    var that = this;
+    var id = e.currentTarget.dataset.id;
+    if (that.data.cartId) {
+      var cartId = that.data.cartId;
+      var totalPrice = that.data.totalPrice;
+      var addressId = that.data.addressId;
+      var pinkId = that.data.pinkId;
+      that.setData({
+        cartId:'',
+        totalPrice:'',
+        addressId:'',
+        pinkId:'',
+      })
+      wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+        url: '/pages/order-confirm/order-confirm?id=' + cartId + '&couponId=' + id + '&addressId=' + addressId + '&pinkId=' + pinkId
+      })
+    } else {
+      var header = {
+        'content-type': 'application/x-www-form-urlencoded'
+      };
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/user_get_coupon?uid=' + app.globalData.uid,
+        method: 'POST',
+        header: header,
+        data: {
+          couponId: id
+        },
+        success: function (res) {
+          var array = that.data.couponArray;
+          if (res.data.code == 200) {
+            for (var i in array) {
+              if (array[i].id == id) {
+                array[i].is_use = true;
+              }
+            }
+            that.setData({
+              couponArray: array
+            })
+            wx.showToast({
+              title: '领取成功',
+              icon: 'success',
+              duration: 1500
+            })
+          } else {
+            wx.showToast({
+              title: res.data.msg,
+              icon: 'none',
+              duration: 1500
+            })
+          }
+        }
+      })
+    }
+  },
+  getCouponOrderList:function(){
+    var that = this;
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_use_coupon_order?uid=' + app.globalData.uid,
+      method: 'GET',
+      data: {
+        totalPrice: that.data.totalPrice
+      },
+      success: function (res) {
+        that.setData({
+          userstatus: '立即使用',
+          couponArray: res.data.data,
+          title: "没有数据了",
+          loadinghidden: true
+        })
+      }
+    })
+  },
+  getCouponList:function(){
+    var that = this;
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_issue_coupon_list?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      data: {
+        limit: 10
+      },
+      success: function (res) {
+        that.setData({
+          userstatus: '立即领取',
+          couponArray: res.data.data,
+          title: "没有数据了",
+          loadinghidden: true
+        })
+      }
+    })
+  }
+})

+ 19 - 0
application/routine/view/crmebN/pages/coupon-status/coupon-status.json

@@ -0,0 +1,19 @@
+{"navigationBarTitleText": "优惠券",
+ "list": [
+  {
+    "term": "满1000元使用",
+    "time": "2017/09/26至2017/10/26使用",
+    "money": "500"
+  },
+  {
+    "term": "满1000元使用",
+    "time": "2017/09/26至2017/10/26使用",
+    "money": "500"
+  },
+  {
+    "term": "满1000元使用",
+    "time": "2017/09/26至2017/10/26使用",
+    "money": "500"
+  }
+]
+}

+ 21 - 0
application/routine/view/crmebN/pages/coupon-status/coupon-status.wxml

@@ -0,0 +1,21 @@
+<!-- <view class="header-ul flex"> -->
+    <!-- <block wx:for="{{headerArray}}">
+        <view data-idx='{{index}}' class='header-li {{_active==index?"active":""}}' bindtap='headertap'>{{item}}</view>
+    </block> -->
+<!-- </view> -->
+<view class='coupon-ul'>
+    <block wx:for="{{couponArray}}">
+        <view class='coupon-li flex {{item.is_use?"coupon-use":""}}' bindtap='getCouponUser' data-id="{{item.id}}">
+            <view class='coupon-text {{item.is_use?"use-text":""}}'>
+               <view class='coupon-term'>满{{item.use_min_price}}元使用</view>
+               <!-- <view class='coupon-time'>{{item.add_time}}至{{item.end_time}}使用</view> -->
+            </view>
+            <view class='coupon-text2'>
+                <view class='coupon-money'>¥<text class='coupon-num'>{{item.coupon_price}}</text></view>
+                <view class='coupon-but use-but' wx:if="{{item.is_use}}">已领取</view>
+                <view class='coupon-but ' wx:else>{{userstatus}}</view>
+            </view>
+        </view>
+    </block>
+</view>
+<view class='loading flex'><text class='loadingpic iconfont icon-jiazaizhong' hidden='{{loadinghidden}}'></text><text>{{title}}</text></view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 18 - 0
application/routine/view/crmebN/pages/coupon-status/coupon-status.wxss


+ 87 - 0
application/routine/view/crmebN/pages/coupon/coupon.js

@@ -0,0 +1,87 @@
+var app = getApp();
+// pages/coupon/coupon.js
+// var fileData = require('../../utils/util.js'); //暴露的接口;
+Page({
+  data: {
+    url: app.globalData.urlImages,
+    _active:0,
+    headerArray: ['全部', '未使用', '已使用','已过期'],
+    couponArray:"",
+    userstatus:"",
+    title:"正在加载中..."
+   
+  },
+  headertaps:function(e){
+    // console.log(e);
+      this.setData({
+        _active: e.target.dataset.idx
+      });
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    var that = this;
+    //flag = 1{0表示正常,1未使用,2已使用,3已过期,4新增券}
+    var flag = this.data._active;
+    setTimeout(function(){
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/get_use_coupons?uid=' + app.globalData.uid,
+        data:{types:0},
+        method: 'GET',
+        header: header,
+        success: function (res) {  
+          if (res.data.code==200){
+            that.setData({
+              couponArray: res.data.data,
+              title: "没有数据了",
+              loadinghidden: true
+            })
+          } else{  
+          that.setData({
+            couponArray: [],
+            title: "没有数据了",
+            loadinghidden: false
+          })
+          }
+        }
+      })
+    },1000)
+  },
+  headertap:function(e){
+    var that = this;
+    // console.log(e);
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+     var $type=e.target.dataset.idx
+     wx.request({
+       url: app.globalData.url + '/routine/auth_api/get_use_coupons?uid=' + app.globalData.uid,
+       data: {types:$type},
+       method: 'GET',
+       header: header,
+       success: function (res) {
+         if (res.data.code==200){
+           that.setData({
+             couponArray: res.data.data,
+             title: "没有数据了",
+             loadinghidden: true,
+             _active: $type
+           })
+         }else{
+         that.setData({
+           couponArray: [],
+           title: "没有数据了",
+           loadinghidden: false,
+           _active: ''
+         })
+         }
+       }
+     })
+  }
+
+
+
+})

+ 19 - 0
application/routine/view/crmebN/pages/coupon/coupon.json

@@ -0,0 +1,19 @@
+{"navigationBarTitleText": "优惠券",
+ "list": [
+  {
+    "term": "满1000元使用",
+    "time": "2017/09/26至2017/10/26使用",
+    "money": "500"
+  },
+  {
+    "term": "满1000元使用",
+    "time": "2017/09/26至2017/10/26使用",
+    "money": "500"
+  },
+  {
+    "term": "满1000元使用",
+    "time": "2017/09/26至2017/10/26使用",
+    "money": "500"
+  }
+]
+}

+ 27 - 0
application/routine/view/crmebN/pages/coupon/coupon.wxml

@@ -0,0 +1,27 @@
+<view class="header-ul flex">
+    <block wx:for="{{headerArray}}">
+        <view data-idx='{{index}}' class='header-li {{_active==index?"active":""}}' bindtap='headertap'>{{item}}</view>
+    </block>
+    <!-- <view class='header-li active'>全部</view> -->
+    <!-- <view class='header-li'>未使用</view>
+    <view class='header-li'>已使用</view>
+    <view class='header-li'>已过期</view> -->
+</view>
+<view class='coupon-ul'>
+    <block wx:for="{{couponArray}}">
+        <view class='coupon-li flex {{(item.status==1||item.status==2)?"coupon-use":""}}'>
+            <view class='coupon-text {{(!item.status)?"use-text":""}}'>
+               <view class='coupon-term'>满{{item.use_min_price}}元使用</view>
+               <view class='coupon-time'>{{item.add_time}}至{{item.end_time}}使用</view>
+            </view>
+            <view class='coupon-text2'>
+                <view class='coupon-money'>¥<text class='coupon-num'>{{item.coupon_price}}</text></view>
+                <view class='coupon-but {{(item.status==1||item.status==-1)?"use-but":""}}' wx:if="{{item.status==0}}" >未使用</view>
+                <view class='coupon-but {{(item.status==1||item.status==-1)?"coupon-use":""}}' wx:if="{{item.status==1}}" >已使用</view>
+                <view class='coupon-but {{(item.status==1||item.status==-1)?"use-text":""}}' wx:if="{{item.status==2}}" >已过期</view>
+            </view>
+            <view class='{{item.status==0?"coupon-new":""}}'></view>
+        </view>
+    </block>
+</view>
+<view class='loading flex'><text class='loadingpic iconfont icon-jiazaizhong' hidden='{{loadinghidden}}'></text><text>{{title}}</text></view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 18 - 0
application/routine/view/crmebN/pages/coupon/coupon.wxss


+ 59 - 0
application/routine/view/crmebN/pages/cut-list/cut-list.js

@@ -0,0 +1,59 @@
+var app = getApp();
+// pages/cut-list/cut-list.js
+Page({
+
+  data: {
+    url: app.globalData.urlImages,
+    cutList:[],
+    titleImage:'',
+    title: [],
+    lovely:'',
+    indicatorDots: true,//是否显示面板指示点;
+    autoplay: true,//是否自动播放;
+    interval: 3000,//动画间隔的时间;
+    duration: 500,//动画播放的时长;
+    vertical: true,
+    circular: true
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    this.cut_list();
+    
+  },
+cut_list:function(){
+  var that = this;
+  wx.request({
+    url: app.globalData.url + '/routine/auth_api/get_bargain_list?uid=' + app.globalData.uid,
+    method: 'POST',
+    success: function (res) {
+      if (res.data.code == 200) {
+      that.setData({
+        cutList: res.data.data.bargain,
+        titleImage: res.data.data.banner,
+        lovely: res.data.data.lovely,
+        title: res.data.data.bargainUser
+      })
+      }else{
+        that.setData({
+          cutList: []
+        })
+      }
+    }
+  })
+},
+  cut:function(e){
+    var id = e.currentTarget.dataset.id;
+    wx.navigateTo({
+      url: '../../pages/cut-one/cut-one?id='+id,
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) { },
+    })
+  }
+  
+})

+ 3 - 0
application/routine/view/crmebN/pages/cut-list/cut-list.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "砍价列表"
+}

+ 47 - 0
application/routine/view/crmebN/pages/cut-list/cut-list.wxml

@@ -0,0 +1,47 @@
+<view class="catlist">
+<block wx:for="{{lovely}}">
+  <image src='{{url}}{{item.img}}' wx:if="{{index == 2}}"></image>
+</block>
+</view>
+<view class="catlist-nav flex">
+   <image src='{{url}}{{titleImage.banner}}'></image>
+    <view class="catlist-list">
+       <swiper  autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"  indicator-active-color="{{indicatorActivecolor}}"  vertical="{{ vertical}}" circular="{{circular}}">
+          <block wx:for="{{title}}">
+            <swiper-item>
+                <view>{{item.info}}</view> 
+            </swiper-item>
+          </block>
+        </swiper>
+   </view> 
+</view>
+<view class='catlist-ul flex'>
+   <view class='catlist-li' wx:for="{{cutList}}" wx:for-item="item" data-id="{{item.id}}" bindtap='cut'>
+       <image src='{{url}}{{item.image}}' class='li-pic'></image>
+       <view class='catlist-text line' >{{item.title}}</view>
+       <view class='text-color'>
+           <view>最低
+              <text class='color-num'>¥{{item.min_price}}</text>
+              <view class='none-num'>原价¥{{item.price}}</view>
+           </view>
+       </view>
+       <view class='pic-list flex'>
+            <!-- <view class='pic-con'>
+                <block wx:for="{{item.userInfo}}" wx:for-item="items" wx:if="{{index < 2}}">
+                    <image src='{{items}}'></image>
+                </block>
+                <view class='pic-dai'>...</view>
+            </view>  -->
+            <text>{{item.userInfoCount}}人正在参加</text>
+            <view class='color-but'>去砍价</view>
+       </view>
+   </view>
+  
+</view>
+<movable-area class='index-con' >
+  <movable-view class='index-area' direction="all">
+      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
+      <image src='/images/home.png'></image>
+      </navigator>
+  </movable-view>
+</movable-area>

+ 18 - 0
application/routine/view/crmebN/pages/cut-list/cut-list.wxss

@@ -0,0 +1,18 @@
+.catlist image{width:100%;height:300rpx;}
+.catlist-nav{height:72rpx;padding:0 20rpx;justify-content:space-between;align-items:center;background-color:#fff;}
+.catlist-nav image{width:52rpx;height:52rpx;border-radius:50%;border:4rpx solid #fff;}
+.catlist-list{width:633rpx;font-size:26rpx;color:#545454;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:72rpx;
+line-height:72rpx;}
+.catlist-li{height:576rpx;border-radius:12rpx;background-color:#fff;width:345rpx;margin-top:20rpx;}
+.li-pic{width:100%;height:345rpx;margin:0 auto;border-radius:12rpx 12rpx 0 0;}
+.catlist-text{color:#262626;font-size:28rpx;padding:0 20rpx;margin:15rpx 0 10rpx 0;line-height:1.5;}
+.pic-list{padding:10rpx 20rpx;align-items:center;justify-content:space-between;}
+.pic-list .pic-con{margin-left:12rpx;position:relative;}
+.pic-list text{font-size:26rpx;color:#666666;}
+.pic-list image{width:52rpx;height:52rpx;border-radius:50%;border:4rpx solid #fff;margin-left:-12rpx;}
+.catlist-li .text-color{font-size:24rpx;color:#FF3D3D;padding:0 20rpx;justify-content:space-between;}
+.catlist-li .color-num{font-size:32rpx;}
+.none-num{color:#AAAAAA;text-decoration-line:line-through;}
+.color-but{width:105rpx;height:55rpx;line-height:55rpx;text-align:center;background-color:#FF3D3D;border-radius:50rpx;color:#fff;font-size:24rpx;box-shadow:2rpx 3rpx 10rpx #FF3D3D;box-shadow:-1rpx 0rpx 5rpx #FF3D3D;}
+.pic-con .pic-dai{width:52rpx;height:52rpx;color:#fff;border-radius:50%;background-color:#DDDDDD;text-align:center;line-height:22rpx;font-size:50rpx;display:inline-block;position:absolute;top:0;border:4rpx solid #fff;right:-47rpx;}
+.catlist-ul{margin-bottom:20rpx;padding:0 20rpx;justify-content:space-between;flex-wrap:wrap;}

+ 465 - 0
application/routine/view/crmebN/pages/cut-one/cut-one.js

@@ -0,0 +1,465 @@
+// pages/cut-one/cut-one.js
+var app = getApp();
+var wxh = require('../../utils/wxh.js');
+var WxParse = require('../../wxParse/wxParse.js');
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    uid: app.globalData.uid,//登录人uid
+    bargainUid:0,//参与砍价uid
+    bargainUserInfo:[],//参与人信息
+    bargainId:0,//砍价产品ID
+    status:0,// 0未参与砍价  1参与砍价 2 帮别人砍价 3 已帮别人砍价  4 砍价结束
+    count:[],//顶部人数
+    bargainUserHelp:[],//砍价帮人
+    HelpCount:0,//砍价帮总人数
+    HelpPrice:0,//剩余多少金额
+    pricePercent:0,//进度条
+    bargainUserHelpUserInfo:[],
+    url: app.globalData.urlImages,
+    hiddens: true,
+    hiddens2:true,
+    product:[],
+    countDownDay:'00',
+    countDownHour:'00',
+    countDownMinute:'00',
+    countDownSecond:'00',
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    app.globalData.openPages = '/pages/cut-one/cut-one?bargainUid=' + options.bargainUid + '&id=' + options.id;
+    app.setUserInfo();
+    if (options.id && options.bargainUid) {
+      this.setData({
+        bargainId: options.id,
+        bargainUid: options.bargainUid
+      })
+      this.getbargain();
+      this.getBargainCount();
+      this.addLookBargain();
+    } else if (options.id){
+      this.setData({
+        bargainId: options.id,
+        bargainUid: app.globalData.uid
+      })
+      this.getbargain();
+      this.getBargainCount();
+      this.addLookBargain();
+    }else {
+      wx.showToast({
+        title: '参数错误',
+        icon: 'none',
+        duration: 1000
+      })
+      setTimeout(function () {
+        wx.navigateTo({
+          url: '/pages/cut-list/cut-list'
+        })
+      }, 1200)
+    }
+  },//获取砍价产品
+  getbargain: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_bargain?uid=' + app.globalData.uid,
+      data: { bargainId: that.data.bargainId },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            product: res.data.data
+          })
+          that.dtime();
+          if (that.data.bargainUid == app.globalData.uid) {
+            that.setData({
+              status: 1
+            })
+            that.setBargain();
+          } else {
+            that.setData({
+              status: 2
+            })
+            that.getBargainUser();
+            that.getUserInfo();
+            that.getBargainHelpCount();
+          }
+          if (that.data.product.description) WxParse.wxParse('description', 'html', that.data.product.description, that, 0); 
+          if (that.data.product.rule) WxParse.wxParse('rule', 'html', that.data.product.rule, that, 0);
+        } else {
+          that.setData({
+            product: []
+          })
+        }
+      }
+    })
+  },//倒计时
+  dtime: function () {
+    var that = this;
+    var timeStamp = that.data.product.stop_time;
+    wxh.time2(timeStamp, that);
+  },//获取顶部人数
+  getBargainCount: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_bargain_count?uid=' + app.globalData.uid,
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            count: res.data.data
+          })
+        } else {
+          that.setData({
+            count: []
+          })
+        }
+      }
+    })
+  },//参与砍价
+  setBargain: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/set_bargain?uid=' + app.globalData.uid,
+      data: { bargainId: that.data.bargainId },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'success',
+            duration: 2000
+          })
+          that.setData({
+            status:1,
+            bargainUid: app.globalData.uid
+          })
+        } else {
+          // wx.showToast({
+          //   title: res.data.msg,
+          //   icon: 'none',
+          //   duration: 2000
+          // })
+        }
+        that.setBargainHelp();
+        that.isBargainUser();
+      }
+    })
+  },//参与砍价帮砍
+  setBargainHelp: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/set_bargain_help?uid=' + app.globalData.uid,
+      data: { 
+        bargainId: that.data.bargainId,
+        bargainUserId: that.data.bargainUid
+      },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200){
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'success',
+            duration: 2000
+          })
+          if (that.data.bargainUid != app.globalData.uid) {
+            that.setData({
+              status: 3,
+              bargainUserHelpUserInfo: res.data.data,
+              hiddens2: false
+            })
+          }else{
+            that.setData({
+              status: 1,
+              bargainUserHelpUserInfo: res.data.data,
+              hiddens2: false
+            })
+          }
+          that.getBargainUser();
+          that.getUserInfo();
+          that.getBargainHelpCount();
+        } else {
+          that.isBargainUserHelp();
+        }
+      }
+    })
+  },//判断当前用户是否可以砍价
+  isBargainUserHelp:function(){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/is_bargain_user_help?uid=' + app.globalData.uid,
+      data: { 
+        bargainId: that.data.bargainId,
+        bargainUserId: that.data.bargainUid
+        },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 2000
+          })
+        } else {
+          if (that.data.bargainUid != app.globalData.uid) {
+            wx.showToast({
+              title: '您不能在帮' + that.data.bargainUserInfo.nickname + '砍价了',
+              icon: 'none',
+              duration: 2000
+            })
+            that.setData({
+              status: 3
+            })
+          } else {
+            that.setData({
+              status: 1,
+            })
+          }
+        }
+      }
+    })
+  },
+  //判断当前登录人是否参与砍价
+  isBargainUser: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/is_bargain_user?uid=' + app.globalData.uid,
+      data: { bargainId: that.data.bargainId },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            bargainUid: app.globalData.uid,
+            status: 1
+          })
+          that.getBargainUser();
+          that.getUserInfo();
+          that.getBargainHelpCount();
+        } else {
+          that.setData({
+            bargainUid: 0,
+            status:0
+          })
+        }
+      }
+    })
+  },//获取砍价帮
+  getBargainUser: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_bargain_user?uid=' + app.globalData.uid,
+      data: { 
+        bargainId: that.data.bargainId,
+        bargainUid: that.data.bargainUid
+      },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            bargainUserHelp: res.data.data
+          })
+        } else {
+          that.setData({
+            bargainUserHelp: []
+          })
+        }
+      }
+    })
+  },//获取当前参与砍价人的信息
+  getUserInfo:function(){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_user_info_uid?uid=' + app.globalData.uid,
+      data: {
+        userId: that.data.bargainUid
+      },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            bargainUserInfo: res.data.data
+          })
+        } else {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 2000
+          })
+          that.setData({
+            bargainUserInfo: []
+          })
+        }
+      }
+    })
+  },//获取砍价帮总人数
+  getBargainHelpCount:function(){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_bargain_help_count?uid=' + app.globalData.uid,
+      data: {
+        bargainId: that.data.bargainId,
+        bargainUserId: that.data.bargainUid
+      },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          if (res.data.data.price <= 0 && app.globalData.uid == that.data.bargainUid){
+            that.setData({
+               status:4
+            })
+          }
+          that.setData({
+            HelpCount: res.data.data.count,
+            HelpPrice: res.data.data.price,
+            pricePercent: res.data.data.pricePercent
+          })
+        } else {
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 2000
+          })
+          that.setData({
+            HelpCount: 0,
+            HelpPrice:0,
+            pricePercent:0
+          })
+        }
+      }
+    })
+  },
+  getCutList:function(){
+    wx.navigateTo({
+      url: '/pages/cut-list/cut-list'
+    })
+  },//砍价成功后支付订单
+  goOrderPay:function(){
+    var that = this;
+    if (that.data.bargainUid != app.globalData.uid){
+      wx.showToast({
+        title: '参数错误',
+        icon: 'none',
+        duration: 2000
+      })
+    }else{
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/now_buy?uid=' + app.globalData.uid,
+        method: 'GET',
+        data: {
+          productId: that.data.product.product_id,
+          cartNum: that.data.product.num,
+          bargainId: that.data.product.id,
+        },
+        success: function (res) {
+          if (res.data.code == 200) {
+            wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+              url: '/pages/order-confirm/order-confirm?id=' + res.data.data.cartId
+            })
+          } else {
+            wx.showToast({
+              title: res.data.msg,
+              icon: 'none',
+              duration: 2000
+            })
+          }
+        }
+      })
+    }
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+  rules:function(e){
+      this.setData({
+        hiddens:false
+      })
+  },
+  butguan:function(e){
+    this.setData({
+      hiddens: true
+    })
+  },
+  butguan2:function(e){
+    this.setData({
+      hiddens2: true
+    })
+  },
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  addLookBargain: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/add_look_bargain?uid=' + app.globalData.uid,
+      method: 'GET',
+      data: {
+        bargainId: that.data.bargainId,
+      },
+      success: function (res) {
+        that.getBargainCount();
+      }
+    })
+  },
+  addShareBargain:function(){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/add_share_bargain?uid=' + app.globalData.uid,
+      method: 'GET',
+      data: {
+        bargainId: that.data.bargainId,
+      },
+      success: function (res) {
+        that.getBargainCount();
+      }
+    })
+  },
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+    var that = this;
+    return {
+      title: that.data.bargainUserInfo.nickname+'邀请您帮砍价',
+      path: '/pages/cut-one/cut-one?bargainUid=' + that.data.bargainUid + '&id=' + that.data.bargainId,
+      imageUrl: that.data.url + that.data.product.image,
+      success:function(){
+        that.addShareBargain();
+        wx.showToast({
+          title: '分享成功',
+          icon: 'success',
+          duration: 2000
+        })
+      }
+    }
+  }
+})

+ 3 - 0
application/routine/view/crmebN/pages/cut-one/cut-one.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "砍价详情"
+}

+ 134 - 0
application/routine/view/crmebN/pages/cut-one/cut-one.wxml

@@ -0,0 +1,134 @@
+<view class='bg'></view> 
+<view class="cut-one">
+    <view class='cutone-bg'>
+         <view class='cutone-header'>{{count.lookCount}}<text>人查看</text>{{count.shareCount}}<text>人分享</text>{{count.userCount}}<text>人参与</text></view>
+         <view class='cutone-guize' bindtap='rules'>
+            <view class='guize-huo'>活动</view>
+            <view>规则</view>
+         </view>
+          <view class='cutone-time'>活动结束倒计时<!--<text>{{countDownDay}}</text>天 --><text>{{countDownHour}}</text>时<text>{{countDownMinute}}</text>分<text>{{countDownSecond}}</text>秒</view>
+    </view>
+    <view class='cutone-padding'>
+       <view class='cutone-k'>
+            <view  class='cutone-write'>
+                <image src='{{url}}{{product.image}}'></image>
+                <view class='write-text line2'>{{product.title}}</view>
+                <view class='flex write-money'>
+                   <view class='write-num'>最低¥<text>{{product.min_price}}</text></view>
+                   <view class='write-yuan'>原价¥{{product.price}}</view>
+                </view>
+           </view>
+        </view>
+        <!-- 参与砍价   -->
+        <!-- <view class='cutone-but' bindtap='setBargain' wx:if="{{!status}}">立即参与</view>  -->
+        <!--砍价进行中  -->
+        <view class='cutone-cut' wx:if="{{status == 1}}">已有<text>{{HelpCount}}</text>位好友成功帮您砍价</view>
+        <view class='cutone-pro' wx:if="{{status == 1}}">距离目标还有{{HelpPrice}}元</view>  
+        <!-- 进度条 -->
+         <view class="progress compressing"  wx:if="{{status == 1}}"><view class="bar" style="width: {{pricePercent}}%;"></view></view>
+         <view class='flex pro-money'  wx:if="{{status == 1}}">
+           <view class='price-y'>
+               <view>原价</view>
+               <view>¥{{product.price}}</view>
+           </view>
+           <view class='price-m'>
+               <view>目标</view>
+               <view>¥{{product.min_price}}</view>
+           </view>
+         </view>
+        <button class='cutone-but'  wx:if="{{status == 1}}" open-type='share'>喊好友帮砍一刀</button>
+         <!--帮好友砍价进行中  -->
+        <view class='cutfried flex' wx:if="{{status == 2}}"><image src='/images/banner1.jpg'></image><text>{{bargainUserInfo.nickname}} 邀请您帮忙砍价</text></view>
+        <view class='cutone-pro' wx:if="{{status == 2}}">距离目标还有{{HelpPrice}}元</view> 
+        <!-- 进度条 -->
+         <view class="progress compressing"  wx:if="{{status == 2}}"><view class="bar" style="width: {{pricePercent}}%;"></view></view>
+        <view class='flex pro-money' wx:if="{{status == 2}}">
+           <view class='price-y'>
+               <view>原价</view>
+               <view>¥{{product.price}}</view>
+           </view>
+           <view class='price-m'>
+               <view>目标</view>
+               <view>¥{{product.min_price}}</view>
+           </view>
+        </view>
+         <view class='cutone-but' bindtap='setBargainHelp' wx:if="{{status == 2}}">帮好友砍一刀</view> 
+         <!--已帮好友砍价  -->
+         <!-- 进度条 -->
+         <view class='cutone-pro' wx:if="{{status == 3}}">距离目标还有{{HelpPrice}}元</view> 
+         <view class="progress compressing"  wx:if="{{status == 3}}"><view class="bar" style="width: {{pricePercent}}%;"></view></view>
+        <view class='flex pro-money' wx:if="{{status == 3}}">
+           <view class='price-y'>
+               <view>原价</view>
+               <view>¥{{product.price}}</view>
+           </view>
+           <view class='price-m'>
+               <view>目标</view>
+               <view>¥{{product.min_price}}</view>
+           </view>
+        </view>
+         <view class='cut-over' wx:if="{{status == 3}}">已帮助好友砍价</view>
+         <view class='cutone-but' wx:if="{{status == 3}}" bindtap='setBargain'>我也要参与</view> 
+         <!--砍价结束   -->
+         <view class='cut-over' wx:if="{{status == 4}}">恭喜您成功砍到最低价,快去支付订单吧!</view>
+         <view class='cutone-but'  wx:if="{{status == 4}}" bindtap='goOrderPay'>立即支付订单</view> 
+         <view class='rebut' bindtap='getCutList' wx:if="{{status == 4}}">低价拿更多商品</view> 
+         <view class='cutone-but cutone-but2'  wx:if="{{status == 5}}">活动已结束</view> 
+         <view class='rebut' bindtap='getCutList' wx:if="{{status == 5}}">低价拿更多商品</view>    
+
+
+
+
+        <view class='cutone-list'>
+            <view class='list-title'>
+                 <text>砍价帮</text>
+            </view>
+             <view class='cutone-ul'>
+              <block wx:for="{{bargainUserHelp}}">
+                  <view class='cutone-li flex'>
+                    <view class='li-pic flex'>
+                        <image src='{{item.avatar}}'></image>
+                        <view>
+                            <view class='pic-title line'>{{item.nickname}}</view>
+                        </view>
+                    </view>
+                    <view>砍掉{{item.price}}元</view>
+                  </view>
+              </block>
+            </view> 
+            <view class='cutone-tiao'>· 只显示最近15个好友砍价纪录 ·</view>
+        </view>
+        <view class='cutone-list cutone-list2'>
+            <view class='list-title'>
+                 <text>商品详情</text>
+            </view>
+             <view class='shop-con'>
+                <template is="wxParse" data="{{wxParseData:description.nodes}}"/>
+            </view> 
+        </view>
+    </view>
+</view>
+ <view class='cut-tan' hidden='{{hiddens}}'>
+      <view class='tan-title'>活动规则<icon class='iconfont icon-guanbi1 tanguan' bindtap='butguan'></icon></view>
+       <view class='tan-con'>
+          <template is="wxParse" data="{{wxParseData:rule.nodes}}"/>
+       </view>
+</view>
+<view class='zhao' hidden='{{hiddens}}' bindtap='butguan'></view>
+<view class='cut-tan2' hidden='{{hiddens2}}'>
+   <view class='tan2-bg'><icon class='iconfont icon-guanbi1 tanguan tanguan2' bindtap='butguan2'></icon></view>
+   <view class='tan2-con'>您已砍掉<text>{{bargainUserHelpUserInfo.price}}</text>元,听说分享次数越多砍价成功的机会越大哦!</view>
+   <button class='tan2-bnt' wx:if="{{status == 1}}" open-type='share'>立即分享</button>
+   <button class='tan2-bnt' wx:if="{{status == 4}}" bindtap='butguan'>立即下订单</button>
+   <button class='tan2-bnt' wx:if="{{status == 2}}" bindtap='setBargain'>我要参与</button>
+</view>
+ <view class='zhao' hidden='{{hiddens2}}' bindtap='butguan2'></view> 
+ <movable-area class='index-con' >
+  <movable-view class='index-area' direction="all">
+      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
+      <image src='/images/home.png'></image>
+      </navigator>
+  </movable-view>
+</movable-area>
+ <import src="/wxParse/wxParse.wxml"/>
+

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 76 - 0
application/routine/view/crmebN/pages/cut-one/cut-one.wxss


+ 88 - 0
application/routine/view/crmebN/pages/enter/enter.js

@@ -0,0 +1,88 @@
+var app = getApp();
+var wxh = require('../../utils/wxh.js');
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    logo:'',
+    name:'',
+    url: app.globalData.urlImages,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    app.setBarColor();
+    this.getEnterLogo();
+    if (options.scene){
+      app.globalData.spid = options.scene;
+    }
+  },
+  getEnterLogo:function(){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/login/get_enter_logo',
+      method: 'post',
+      dataType  : 'json',
+      success: function (res) {
+        that.setData({
+          logo: res.data.data.site_logo,
+          name: res.data.data.site_name
+        })
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+  getUserInfo: function () {
+    app.getUserInfoEnter();
+  },
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
+})

+ 3 - 0
application/routine/view/crmebN/pages/enter/enter.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "授权页面"
+}

+ 7 - 0
application/routine/view/crmebN/pages/enter/enter.wxml

@@ -0,0 +1,7 @@
+<view class='enter'>
+    <image src="{{url}}{{logo}}"></image>
+    <view class='enter-title'>{{name}}</view>
+    <view class='enter-con'>你的信息和数据将受到保护</view>
+    <button class='enter-but flex' open-type="getUserInfo" type="primary" bindtap='getUserInfo' ><icon class='iconfont icon-weixing'></icon>微信授权登录</button> 
+</view>
+

+ 6 - 0
application/routine/view/crmebN/pages/enter/enter.wxss

@@ -0,0 +1,6 @@
+.enter{width:425rpx;text-align:center;margin:168rpx auto 0 auto;display:block;}
+.enter image{width:136rpx;height:136rpx;border-radius:8rpx;}
+.enter-title{color:#333333;font-size:32rpx;margin:45rpx 0 32rpx 0;}
+.enter-con{font-size:26rpx;color:#999999;line-height:1.7;}
+.enter-but{width:360rpx;height:70rpx;border-radius:8rpx;background-color:#319FF5;font-size:26rpx;color:#fff;margin-top:70rpx;align-items:center;justify-content:center;}
+.enter-but icon{font-size:35rpx;margin-right:15rpx;}

+ 86 - 0
application/routine/view/crmebN/pages/extension/extension.js

@@ -0,0 +1,86 @@
+var app = getApp();
+Page({
+  data: {
+    url: app.globalData.urlImages,
+    userinfo: [],
+    yearsum:'',
+    extractsum:''
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    this.money(header);
+    this.Yesterday_commission(header);
+    this.extract(header);
+  },
+  money: function (header) {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            userinfo: res.data.data
+          })
+        }else{
+          that.setData({
+            userinfo: []
+          })
+        }
+      }
+    })
+  },
+  cash: function () {
+    var that = this;
+    wx.navigateTo({
+      url: '/pages/cash/cash?uid='+ app.globalData.uid,
+    })
+  },
+  Yesterday_commission: function (header) {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/yesterdayCommission?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        if (res.data.code == 200) {
+        that.setData({
+          yearsum: res.data.data
+        })
+        }else{
+          that.setData({
+            yearsum: ''
+          })
+        }
+      }
+    })
+  },
+  extract: function (header) {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/extractsum?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        if (res.data.code == 200) {
+        that.setData({
+          extractsum: res.data.data
+        })
+        }else{
+          that.setData({
+            extractsum: ''
+          })
+        }
+      }
+    })
+  },
+  spread: function () {
+    wx.navigateTo({
+      url: "/pages/spread/spread",
+    })
+  }
+})

+ 1 - 0
application/routine/view/crmebN/pages/extension/extension.json

@@ -0,0 +1 @@
+{"navigationBarTitleText": "推广统计"}

+ 30 - 0
application/routine/view/crmebN/pages/extension/extension.wxml

@@ -0,0 +1,30 @@
+<view class="header">
+    <view class='header-bg'>
+       <view class='money'>{{userinfo.now_money}}</view>
+       <view class='text'>累计推广金</view>
+    </view>
+    <view class='tip' bindtap='cash'>立即提现</view>
+</view>
+<view class='exten-item'>
+    <view class='exten-list flex'>
+       <view><text class='exten-bg1 exten-bg'></text>昨日推广佣金</view>
+       <view class='exten-money'>{{yearsum}}元</view>
+    </view>
+    <view class='exten-list flex'>
+       <view><text class='exten-bg2 exten-bg'></text>累计可提佣金</view>
+       <view class='exten-money'>{{userinfo.now_money}}元</view>
+    </view>
+    <view class='exten-list flex'>
+       <view><text class='exten-bg3 exten-bg'></text>累计已提佣金</view>
+       <view class='exten-money'>{{extractsum}}元</view>
+    </view>
+    <view class='exten-list flex' bindtap='spread'>
+       <view><text class='exten-bg4 exten-bg'></text>推广详情</view>
+       <view class='exten-money iconfont icon-xiala iconxia'></view>
+    </view>
+</view>
+<!-- <view class='flex extentui'>
+       <view><text class='exten-bg5 exten-bg'></text>推广活动说明</view>
+       <view class='exten-money iconfont icon-xiala iconxia'></view>
+</view> -->
+

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 18 - 0
application/routine/view/crmebN/pages/extension/extension.wxss


+ 84 - 0
application/routine/view/crmebN/pages/feree-two/feree-two.js

@@ -0,0 +1,84 @@
+
+var app = getApp();
+Page({
+  data: {
+    url: app.globalData.urlImages,
+    fereeArray: [],
+    page: 1,
+    count: '',
+    first:0,
+    limit:20,
+    title: "",
+    loadinghidden: false
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    if (options.uid){
+      this.setData({
+        uid: options.uid
+      })
+      this.getSpreadListTwo();
+    }else{
+      wx.showToast({
+        title: '参数错误',
+        icon: 'none',
+        duration: 1000,
+      })
+      setTimeout(function(){
+         wx.navigateTo({
+           url: '/pages/feree/feree'
+         })
+      },1200);
+    }
+  },
+  getSpreadListTwo:function(){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_spread_list_two?uid=' + app.globalData.uid,
+      data: {
+        two_uid: that.data.uid,
+        first: that.data.first,
+        limit: that.data.limit
+      },
+      method: 'GET',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            count: res.data.data.count ? res.data.data.count : 0,
+            fereeArray: res.data.data.list,
+            loadinghidden: true,
+            title: '加载完成'
+          })
+        }
+      }
+    });
+  },
+  onReachBottom: function () {
+    var that = this;
+    var limit = 20;
+    var first = that.data.first;
+    var startpage = limit * first;
+    var array = that.data.fereeArray;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_spread_list_two?uid=' + app.globalData.uid,
+      data: {
+        two_uid: that.data.uid,
+        limit: limit, 
+        first: startpage 
+      },
+      method: 'GET',
+      success: function (res) {
+        var len = res.data.data.list.length;
+        for (var i = 0; i < len; i++) {
+          array.push(res.data.data.list[i])
+        }
+        that.setData({
+          fereeArray: array,
+          loadinghidden: true,
+          title: '加载完成'
+        })      
+      }
+    })
+  }
+})

+ 3 - 0
application/routine/view/crmebN/pages/feree-two/feree-two.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "我的二级粉丝列表"
+}

+ 19 - 0
application/routine/view/crmebN/pages/feree-two/feree-two.wxml

@@ -0,0 +1,19 @@
+<view class="header">
+    <text class='tuipic'></text>
+    二级粉丝统计:{{count}}
+</view>
+<view class='feree-ul'>
+   <block wx:for="{{fereeArray}}">
+       <view class='feree-li flex'>
+           <image src='{{item.avatar}}' class='feree-pic'></image>
+           <view class='feree-conter'>
+               <view class='feree-name'>{{item.nickname}}</view>
+               <view class='feree-text'>
+                <text>关注时间: {{item.add_time}}</text>\r\n\r\n\r\n\r\n
+                <text>消费金额: {{item.price}}</text>
+               </view>
+           </view>
+       </view>
+   </block>
+</view>
+<view class='loading flex'><text class='loadingpic iconfont icon-jiazaizhong' hidden='{{loadinghidden}}'></text><text>{{title}}</text></view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 11 - 0
application/routine/view/crmebN/pages/feree-two/feree-two.wxss


+ 73 - 0
application/routine/view/crmebN/pages/feree/feree.js

@@ -0,0 +1,73 @@
+
+var app = getApp();
+Page({
+  data: {
+    url: app.globalData.urlImages,
+    fereeArray:[],
+    page:1,
+    count: '',
+    first: 0,
+    limit: 20,
+    title:"",
+    loadinghidden:false
+  },
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+       var that = this;
+       var header = {
+         'content-type': 'application/x-www-form-urlencoded',
+       };
+       wx.request({
+         url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
+         method: 'GET',
+         data: {
+           first: that.data.first,
+           limit: that.data.limit
+         },
+         success: function (res) {
+           if (res.data.code == 200) {             
+             that.setData({
+               count: res.data.data.count ? res.data.data.count : 0,
+               fereeArray: res.data.data.list,
+               loadinghidden: true,
+               title: '加载完成'
+             })
+           }
+         }
+       });
+  },
+  toTwo:function(e){
+    if (e.currentTarget.dataset.id) {
+      wx.navigateTo({
+        url: '/pages/feree-two/feree-two?uid=' + e.currentTarget.dataset.id,
+      })
+    }
+  },
+  onReachBottom: function () {
+    var that = this;
+    var limit = 20;
+    var first = that.data.first;
+    var startpage = limit * first;
+    var array = that.data.fereeArray;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
+      data: {
+        limit: limit,
+        first: startpage
+      },
+      method: 'GET',
+      success: function (res) {
+        var len = res.data.data.list.length;
+        for (var i = 0; i < len; i++) {
+          array.push(res.data.data.list[i])
+        }
+        that.setData({
+          fereeArray: array,
+          loadinghidden: true,
+          title: '加载完成'
+        })
+      }
+    }) 
+  }
+})

+ 1 - 0
application/routine/view/crmebN/pages/feree/feree.json

@@ -0,0 +1 @@
+{"navigationBarTitleText": "我的粉丝列表"}

+ 0 - 0
application/routine/view/crmebN/pages/feree/feree.wxml


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott