169 Commits 43988ac820 ... 2122b40e20

Autor SHA1 Mensagem Data
  WinG 2122b40e20 最新 2 meses atrás
  WinG c79b4e27df 20250828备份 9 meses atrás
  WinG 2dcd64ebdf ud 1 ano atrás
  wingforgh a787a57b09 20240314 2 anos atrás
  WinG 2940fb40c3 餐厅和域名修改 2 anos atrás
  WinG c4ca79cbab commit canteen 2 anos atrás
  WinG 10e49a7cde 新增员工餐厅相关 2 anos atrás
  WinG b96807cddd cu 2 anos atrás
  WinG 6c17b79c5e cus 2 anos atrás
  WinG 39e3df832c customservice 2 anos atrás
  WinG c0478e2535 待发货商品也增加取消订单 3 anos atrás
  WinG abe3eb32dd 修改提示长度显示,修改下架商品返回首页 3 anos atrás
  WinG e4a164d473 地址选择修改,登录修改 3 anos atrás
  junyuanz 8eb07a65f7 zones错误调整 3 anos atrás
  junyuanz a1206b8c91 提成页面修改 3 anos atrás
  junyuanz 73b92a77b0 新增提成页面 3 anos atrás
  junyuanz c332ac81a8 物流调整 3 anos atrás
  junyuanz 418917663e 1.搜索调整,2商品详情调整,3物流调整 3 anos atrás
  junyuanz 50930043a0 手机绑定流程优化 3 anos atrás
  junyuanz ed25b44508 update 3 anos atrás
  junyuanz 72dc237a56 日常调整 4 anos atrás
  junyuanz 1d64e2ceed pay修改 4 anos atrás
  junyuanz 55621ca18a pay修复 4 anos atrás
  junyuanz 8f44c36230 can_buy时才能进入详细页 4 anos atrás
  junyuanz ed768defcb 支付调整 4 anos atrás
  junyuanz 59a415990b cash余额调整 4 anos atrás
  junyuanz 7f5aecddef pay页面-cash的判断调整和运费调整 4 anos atrás
  junyuanz a2bab0b218 收入调整 4 anos atrás
  junyuanz b4557ea403 ud 4 anos atrás
  junyuanz d1182e4d5e 修改 4 anos atrás
  junyuanz 4c3a6d5bc2 分区调整 4 anos atrás
  junyuanz 72c836b648 更新 4 anos atrás
  junyuanz 5fa51a7542 内容更新 4 anos atrás
  junyuanz 8ffadc2de2 一些更新 4 anos atrás
  junyuanz 72ab34246b 支付时提货券显示异常bug 4 anos atrás
  junyuanz 6bdc1ff14d 双12修改 4 anos atrás
  junyuanz 469dde0866 促销调整判断 4 anos atrás
  junyuanz ba865a786a token修改4&订单修改 4 anos atrás
  junyuanz 6ddf63882d token修改4 4 anos atrás
  junyuanz 7bd266da6c token修改3 4 anos atrás
  junyuanz 12b140e91e token调整2 4 anos atrás
  junyuanz 76198d46c0 改用token1 4 anos atrás
  junyuanz ca076c4b3f 修改为使用token并不使用check检测是否登陆 4 anos atrás
  junyuanz c545132138 修改为使用token 4 anos atrás
  junyuanz 2776886d81 筛选排序调整 4 anos atrás
  junyuanz 108367e084 首页和商品列表增加筛选 4 anos atrás
  junyuanz 7568295ce2 特惠商品和购物车 4 anos atrás
  junyuanz 8f857faac2 增加搜索功能 4 anos atrás
  junyuanz 394ec635a0 秒杀加购,支付混合2 4 anos atrás
  junyuanz f19d1cbbe3 秒杀加购,支付混合 4 anos atrás
  junyuanz fcfd402573 赠券时间格式化 4 anos atrás
  junyuanz 7ec277fd94 赠券调整3 4 anos atrás
  junyuanz 2327f07b5d 赠券修改2 4 anos atrás
  junyuanz 577bc1b71a 我的赠券 4 anos atrás
  junyuanz 7024af5d83 秒杀调整 4 anos atrás
  junyuanz 26a447913d 自提相关调整3 4 anos atrás
  junyuanz 61bbc3951b 自提相关调整2 4 anos atrás
  junyuanz 4470a9ba65 增加门店自提功能 4 anos atrás
  junyuanz d543816c3e 用户详情修改 4 anos atrás
  junyuanz fe43bda2e9 轮播图跳转商品列表 4 anos atrás
  junyuanz 36a5a9525a 导航图标和其他调整 4 anos atrás
  junyuanz 0cdcfbfefc 详情页图片跳转 4 anos atrás
  junyuanz 3dcccb7a76 详情内跳转修改 4 anos atrás
  junyuanz bf617fa7ef 推广二维码图片生成修改 4 anos atrás
  junyuanz c2324fb6bf 店长专区换为养生专区 4 anos atrás
  junyuanz 943fd02c6b 调整分享生成图片缺少头像问题 5 anos atrás
  junyuanz 15a29383ac 申请店长金额调整 5 anos atrás
  junyuanz 7fdbc61638 店长专区图片判断异常 5 anos atrás
  junyuanz 4235357f95 修改首页店长专区为rank>=2时显示 5 anos atrás
  junyuanz b149a90626 显示绑定手机4 5 anos atrás
  junyuanz d9f983a9ec 绑定手机显示相关3 5 anos atrás
  junyuanz f30fc79a6f 显示手机绑定相关 5 anos atrás
  junyuanz 8b2a6bc07d 修改积分中心文字&打开手机绑定 5 anos atrás
  junyuanz 2f07ffef3e 修改代理相关去掉小数 5 anos atrás
  junyuanz 1ec1fe94d9 推荐页面数字调整2 5 anos atrás
  junyuanz 3029bd50c2 推荐页面去除小数位 5 anos atrás
  junyuanz 44eeae317e 授权修改3 5 anos atrás
  junyuanz 83ae2110ef 授权修改2 5 anos atrás
  junyuanz a12ed2a2fb 授权调整1 5 anos atrás
  junyuanz 95f6ea402c 微信授权接口调整 5 anos atrás
  junyuanz 9cf865b922 代理相关修改2 5 anos atrás
  junyuanz e9672aba18 新增代理相关 5 anos atrás
  junyuanz ac854cf76c 修复物流样式错误 5 anos atrás
  junyuanz 7dd81d9717 调整赠品金额显示 5 anos atrás
  junyuanz 6f08d0efe4 评价样式调整 5 anos atrás
  junyuanz e4399dbce3 增加订单待评价 5 anos atrás
  junyuanz 6034c34151 修改商品规格后保持选中 5 anos atrás
  junyuanz 3d87bf5b84 积分增加规格,申请店长调整图片 5 anos atrás
  junyuanz bfdd8698d8 专区选择调整,增加订单备注 5 anos atrás
  junyuanz 243486204d 秒杀图标调整,收入显示转提货券调整 5 anos atrás
  junyuanz f637ba2ca6 专区商品规格,专区和普通商品增加dliver相关,收入调整判断显示转为提货券 5 anos atrás
  junyuanz 0dcede34ef 取消专区分享 5 anos atrás
  junyuanz eace601403 专区错位问题,专区、积分后退问题 5 anos atrás
  junyuanz f839d5afb5 套装商品修复 5 anos atrás
  junyuanz af1b7d4268 套装内容调整 5 anos atrás
  junyuanz e2e4970e31 调整product_list字段修改 5 anos atrás
  junyuanz adafa5dcfb 评论后返回页面刷新 5 anos atrás
  junyuanz 81670111fc 增加评论相关内容 5 anos atrás
  junyuanz 1a99d36d09 用户提现取消银行卡判断 5 anos atrás
  junyuanz 8739e0966b 直播版本更新&积分、店长专区详情后返回刷新问题 5 anos atrás
  junyuanz adbd2df4ee 专区调整2 5 anos atrás
  junyuanz a7b58b5b3d 积分和店长专区调整 5 anos atrás
  junyuanz 6c86636321 头像获取调整 5 anos atrás
  junyuanz 0164c24763 账号登陆检测调整 5 anos atrás
  junyuanz ed5e817f04 直播列表调整 5 anos atrás
  junyuanz e55df1f924 积分温馨提示 5 anos atrás
  junyuanz aae32e8118 积分显示 5 anos atrás
  junyuanz 0b6e772458 直播列表积分提示 5 anos atrás
  junyuanz 9b72f6a262 直播列表 5 anos atrás
  junyuanz f2e8c143f0 直播列表 5 anos atrás
  junyuanz 6e7897d925 直播调整 5 anos atrás
  junyuanz ff84e00d55 积分错误显示 5 anos atrás
  junyuanz d51f9314e2 积分订单取消显示运费 5 anos atrás
  junyuanz aa49ae79ae 积分修改 5 anos atrás
  junyuanz e4dffea9ff 积分相关修改 5 anos atrás
  junyuanz f4f4a92682 积分专区修改 5 anos atrás
  junyuanz eb0640a159 代金券改提货券 5 anos atrás
  junyuanz 0bfd88cf8e 积分专区增加签到 5 anos atrás
  junyuanz ad0288c595 佣金转换修改 5 anos atrás
  junyuanz 3ead5ebe88 佣金转换 5 anos atrás
  junyuanz e511e3d7d4 分享调整2 5 anos atrás
  junyuanz 2439ee6681 分享调整 5 anos atrás
  junyuanz 5c2421e28e 分享问题调整 5 anos atrás
  junyuanz 6a858417ee 代金券页面调整 5 anos atrás
  junyuanz c14361651a 旧会员绑定显示调整 5 anos atrás
  junyuanz e790e2da02 增加旧会员绑定 5 anos atrás
  junyuanz 24ecd699ea 修复积分列表时间戳 5 anos atrás
  junyuanz d3ce74d78d 启用银行卡填写 5 anos atrás
  junyuanz 61784a824c 积分功能相关-样式调整 5 anos atrás
  junyuanz b3e47c2ffa 积分页面头部修改 5 anos atrás
  junyuanz 5d994631d6 积分功能修改 5 anos atrás
  junyuanz 62378c1e40 积分功能增加 5 anos atrás
  junyuanz cd3fdabc82 编辑地址和物流 5 anos atrás
  junyuanz 2ac9ec2caa 修改 5 anos atrás
  junyuanz 60c0cb288d 专区商品分页 5 anos atrás
  junyuanz 9fb29ec94d 访问链接并行问题 5 anos atrás
  junyuanz f0e4a44552 店长相关词汇修复 5 anos atrás
  junyuanz 3d6fee8509 店长申请描述修改 5 anos atrás
  junyuanz 41e3e6aa9d 修改店长相关问题 5 anos atrás
  junyuanz d8e9805547 购物车调整&团长申请&专区 5 anos atrás
  junyuanz 54e5cc516f 更新赠品显示 5 anos atrás
  junyuanz c4763a1d8e 客服调整 5 anos atrás
  junyuanz 21b57f7875 更新 5 anos atrás
  junyuanz 6044c5e446 更新第二次订单问题 5 anos atrás
  junyuanz 2d7aeaa2c6 物流时间问题,订单应付额问题 5 anos atrás
  junyuanz 6f65cb269e 修改金额显示 5 anos atrás
  junyuanz 9870ed8aee 代金券抵扣更新 5 anos atrás
  junyuanz d0f8804129 代金券列表显示修改 5 anos atrás
  junyuanz 850c0b8fbf 修改代金券抵扣 5 anos atrás
  junyuanz 514f3629b7 update 5 anos atrás
  junyuanz 209185777f update withdraw limit2 5 anos atrás
  junyuanz da6873382b update withdraw limit 5 anos atrás
  junyuanz 398d1482f3 时间处理 5 anos atrás
  junyuanz db13838bd4 代金券计算合计显示 5 anos atrás
  junyuanz 8c1be59230 物流css 5 anos atrás
  junyuanz 97f9fcfd76 update 物流 5 anos atrás
  junyuanz f3e5dffe0a 更新物流 5 anos atrás
  junyuanz eae24ab9ae 增加物流 5 anos atrás
  junyuanz eb954ab875 change sell over 5 anos atrás
  junyuanz 0b5d63a217 update 5 anos atrás
  junyuanz 32a0a7b312 update check size color 5 anos atrás
  junyuanz 3bec123155 change project-detail 5 anos atrás
  junyuanz a00461661c update product color and size 5 anos atrás
  junyuanz f547d2780f update rechargead 5 anos atrás
  junyuanz bfeba2e861 Revert "Revert "Revert "update rechargead""" 5 anos atrás
  = ff94a12576 Revert "Revert "update rechargead"" 5 anos atrás
  junyuanz d651f6c7cc Revert "update rechargead" 5 anos atrás
  = 5cd3819c89 update rechargead 5 anos atrás
  abiao 97796c1571 init fohow xcx 5 anos atrás
100 arquivos alterados com 4234 adições e 0 exclusões
  1. 1 0
      .cloudbase/container/debug.json
  2. 28 0
      .project
  3. 27 0
      api/project.js
  4. 49 0
      app.js
  5. 156 0
      app.json
  6. 50 0
      app.wxss
  7. 29 0
      component/currency/currency.js
  8. 3 0
      component/currency/currency.json
  9. 1 0
      component/currency/currency.wxml
  10. 0 0
      component/currency/currency.wxss
  11. 31 0
      component/filter/filter.js
  12. 3 0
      component/filter/filter.json
  13. 1 0
      component/filter/filter.wxml
  14. 0 0
      component/filter/filter.wxss
  15. 171 0
      component/formatTime/formatTime.js
  16. 3 0
      component/formatTime/formatTime.json
  17. 1 0
      component/formatTime/formatTime.wxml
  18. 0 0
      component/formatTime/formatTime.wxss
  19. 14 0
      component/project/project.js
  20. 3 0
      component/project/project.json
  21. 16 0
      component/project/project.wxml
  22. 49 0
      component/project/project.wxss
  23. 31 0
      component/toast/toast.js
  24. 9 0
      component/toast/toast.wxml
  25. 22 0
      component/toast/toast.wxss
  26. BIN
      images/footer/canteen-cz.png
  27. BIN
      images/footer/canteen-dc.png
  28. BIN
      images/footer/canteen-sm.png
  29. BIN
      images/footer/categories.png
  30. BIN
      images/footer/categoriesa.png
  31. BIN
      images/footer/categoriesc.png
  32. BIN
      images/footer/date.png
  33. BIN
      images/footer/dining.png
  34. BIN
      images/footer/down.png
  35. BIN
      images/footer/farm.png
  36. BIN
      images/footer/farma.png
  37. BIN
      images/footer/farmc.png
  38. BIN
      images/footer/home.png
  39. BIN
      images/footer/homea.png
  40. BIN
      images/footer/homec.png
  41. BIN
      images/footer/kf.png
  42. BIN
      images/footer/location.png
  43. BIN
      images/footer/logistics.png
  44. BIN
      images/footer/my.png
  45. BIN
      images/footer/mya.png
  46. BIN
      images/footer/myc.png
  47. BIN
      images/footer/play.png
  48. BIN
      images/footer/poster.png
  49. BIN
      images/footer/pyq.png
  50. BIN
      images/footer/scan.png
  51. BIN
      images/footer/search.png
  52. BIN
      images/footer/searcha.png
  53. BIN
      images/footer/selectdown.png
  54. BIN
      images/footer/share.png
  55. BIN
      images/footer/shoppingcart.png
  56. BIN
      images/footer/shoppingcarta.png
  57. BIN
      images/footer/totop.png
  58. BIN
      images/footer/up.png
  59. BIN
      images/footer/weixin.png
  60. BIN
      images/footer/weixina.png
  61. BIN
      images/footer/weixinc.png
  62. BIN
      images/footer/wx.png
  63. BIN
      images/footer/yongjin.png
  64. BIN
      images/star_a_l.png
  65. BIN
      images/star_a_r.png
  66. BIN
      images/star_d_l.png
  67. BIN
      images/star_d_r.png
  68. 101 0
      packageMerchant/pages/merchant/accounts/accounts.js
  69. 10 0
      packageMerchant/pages/merchant/accounts/accounts.json
  70. 32 0
      packageMerchant/pages/merchant/accounts/accounts.wxml
  71. 125 0
      packageMerchant/pages/merchant/accounts/accounts.wxss
  72. 281 0
      packageMerchant/pages/merchant/logistics/logistics.js
  73. 8 0
      packageMerchant/pages/merchant/logistics/logistics.json
  74. 77 0
      packageMerchant/pages/merchant/logistics/logistics.wxml
  75. 189 0
      packageMerchant/pages/merchant/logistics/logistics.wxss
  76. 138 0
      packageMerchant/pages/merchant/order/order.js
  77. 9 0
      packageMerchant/pages/merchant/order/order.json
  78. 104 0
      packageMerchant/pages/merchant/order/order.wxml
  79. 324 0
      packageMerchant/pages/merchant/order/order.wxss
  80. 316 0
      packageMerchant/pages/merchant/orders/orders.js
  81. 9 0
      packageMerchant/pages/merchant/orders/orders.json
  82. 104 0
      packageMerchant/pages/merchant/orders/orders.wxml
  83. 340 0
      packageMerchant/pages/merchant/orders/orders.wxss
  84. 99 0
      packageUser/pages/user/address/address.js
  85. 4 0
      packageUser/pages/user/address/address.json
  86. 43 0
      packageUser/pages/user/address/address.wxml
  87. 99 0
      packageUser/pages/user/address/address.wxss
  88. 219 0
      packageUser/pages/user/applyLeader/applyLeader.js
  89. 4 0
      packageUser/pages/user/applyLeader/applyLeader.json
  90. 66 0
      packageUser/pages/user/applyLeader/applyLeader.wxml
  91. 179 0
      packageUser/pages/user/applyLeader/applyLeader.wxss
  92. 83 0
      packageUser/pages/user/bankinfo/bankinfo.js
  93. 4 0
      packageUser/pages/user/bankinfo/bankinfo.json
  94. 48 0
      packageUser/pages/user/bankinfo/bankinfo.wxml
  95. 122 0
      packageUser/pages/user/bankinfo/bankinfo.wxss
  96. 200 0
      packageUser/pages/user/bind/bind.js
  97. 4 0
      packageUser/pages/user/bind/bind.json
  98. 39 0
      packageUser/pages/user/bind/bind.wxml
  99. 156 0
      packageUser/pages/user/bind/bind.wxss
  100. 0 0
      packageUser/pages/user/bindoldsys/bindoldsys.js

+ 1 - 0
.cloudbase/container/debug.json

@@ -0,0 +1 @@
+{"containers":[],"config":{}}

+ 28 - 0
.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>fohow_xcx_git</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.aptana.ide.core.unifiedBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.aptana.projects.webnature</nature>
+	</natures>
+	<filteredResources>
+		<filter>
+			<id>1597646016597</id>
+			<name></name>
+			<type>26</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-node_modules</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>

+ 27 - 0
api/project.js

@@ -0,0 +1,27 @@
+var $state = require('../utils/modules.js')
+var _request = require('../utils/request.js')
+
+// 项目列表
+function getProjects (that, state, page, per_page) {
+  // wx.showLoading({
+  //   title: '加载中',
+  // })
+  var url = 'v1/products'
+  var params = {
+    state: state,
+    page: page,
+    per_page: per_page
+  }
+  var success = function (val, res) {
+    $state.state.projectList.total = val.data.list_count
+    var result = res ? that.data.project.concat(val.data.list || []) : []
+    that.setData({ project: result })
+    $state.state.projectList.more = val.data.list_count > val.data.list
+  }
+  _request.$get(url, params, success)
+}
+
+module.exports = {
+  getProjects: getProjects
+}
+

+ 49 - 0
app.js

@@ -0,0 +1,49 @@
+//app.js
+var request = require('utils/request.js')
+var utils = require('utils/util.js')
+App({
+  onLaunch: function (res) {
+    console.log(res)
+    this.login()
+  },
+  onShow: function () {
+    // this.check()
+  },
+  login () {
+    wx.login({
+      success: res => {
+        request.login(res)
+      }
+    })
+  },
+  check: function () {
+    var that = this
+    var url = 'v1/user/check'
+    var params = {
+    }
+    var success = function (res) {
+      if (res.data.wx_user_id > 0) {
+        that.globalData.wx_id = res.data.wx_user_id
+        that.globalData.copartner_state = res.data.copartner_state
+      }
+    }
+    request.$get(url, params, success)
+  },
+  globalData: {
+    version: '2.2', // 版本号
+    vershow: true, 
+    userInfo: null,
+// 正式
+    d5c: "fhwx.hiwavo.com",
+// 测试
+    // d5c: "tm.d5ct.com",
+    order: false,  // 订单详情跳转记录
+    merchant: '',  // 物流初始化
+    redPacketId: 0, // 红包id
+    wx_id: 0, // 微信id
+    try_login: false,
+    copartner_state: '',
+    isshow: '',
+    isupdate: true
+  }
+})

+ 156 - 0
app.json

@@ -0,0 +1,156 @@
+{
+  "pages": [
+    "pages/start/start",
+    "pages/home/home",
+    "pages/user/all/all",
+    "pages/cart/cart",
+    "pages/areacart/areacart",
+    "pages/centcart/centcart",
+    "pages/projects/projects",
+    "pages/livelist/livelist",
+    "pages/search/search",
+    "pages/helpfarm/helpfarm",
+    "pages/helpfarm/helpfarm-detail/helpfarm-detail",
+    "pages/helpfarm/helpfarm-success/helpfarm-success",
+    "pages/helpfarm/success/success",
+    "pages/helpfarm/count/count",
+    "pages/helpfarm/othercustom/othercustom",
+    "pages/helpfarm/group/group",
+    "pages/projects/project-detail/project-detail",
+    "pages/projects/project-detail-noshare/project-detail-noshare",
+    "pages/projects/project-comment/project-comment",
+    "pages/projects/project-success/project-success",
+	"pages/projects/project-search/project-search",
+    "pages/pay/pay",
+    "pages/customservice/customservice",
+    "pages/web/web",
+    "pages/parse/parse",
+    "pages/activity/redpacket/redpacket",
+    "pages/activity/screen/screen",
+	"pages/canteen/canteen",
+	"pages/canteen/order/order",
+	"pages/canteen/dining/dining"
+  ],
+  "subpackages": [
+    {
+      "root": "packageUser",
+      "pages": [
+        "pages/user/bind/bind",
+        "pages/user/buy/buy",
+        "pages/user/granary/granary",
+        "pages/user/granary/use/use",
+        "pages/user/fund/fund",
+        "pages/user/farm/farm",
+        "pages/user/otherbind/otherbind",
+        "pages/user/bindsuccess/bindsuccess",
+        "pages/user/address/address",
+        "pages/user/newAddress/newAddress",
+        "pages/user/applyLeader/applyLeader",
+        "pages/user/integral/integral",
+        "pages/user/integralDetail/integralDetail",
+        "pages/user/integral/checkin/checkin",
+        "pages/user/radish/radish",
+        "pages/user/radishDetail/radishDetail",
+		"pages/user/cash/cash",
+		"pages/user/cashDetail/cashDetail",
+		"pages/user/silver/silver",
+		"pages/user/silverDetail/silverDetail",
+        "pages/user/orders/orders",
+        "pages/user/order/order",
+        "pages/user/comment/comment",
+        "pages/user/commission/commission",
+        "pages/user/logistics/logistics",
+        "pages/user/safe/safe",
+        "pages/user/exchange/exchange",
+        "pages/user/exchangeSuccess/exchangeSuccess",
+        "pages/user/invite/invite",
+        "pages/user/invite/detail/detail",
+        "pages/user/invite/month/month",
+        "pages/user/invite/total/total",
+        "pages/user/invite/rank/rank",
+        "pages/user/invite/contribution/contribution",
+        "pages/user/invite/material/material",
+        "pages/user/identity/identity",
+        "pages/user/bindoldsys/bindoldsys",
+        "pages/user/recharge/recharge",
+        "pages/user/withdraw/withdraw",
+        "pages/user/transfer/transfer",
+        "pages/user/transfer/transferList/transferList",
+		"pages/user/proxyApply/proxyApply",
+		"pages/user/proxyList/proxyList",
+		"pages/user/proxyReview/proxyReview",
+		"pages/user/userInfo/userInfo",
+		"pages/user/selfReceive/selfReceive",
+		"pages/user/selfReceive/newReceive/newReceive",
+		"pages/user/promotion/promotion"
+      ]
+    },
+    {
+      "root": "packageMerchant",
+      "pages": [
+        "pages/merchant/orders/orders",
+        "pages/merchant/order/order",
+        "pages/merchant/logistics/logistics",
+        "pages/merchant/accounts/accounts"
+      ]
+    }
+  ],
+  "preloadRule": {
+    "pages/user/all/all": {
+      "network": "all",
+      "packages": [
+        "packageMerchant"
+      ]
+    }
+  },
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#eab86a",
+    "navigationBarTitleText": "WeChat",
+    "navigationBarTextStyle": "white",
+    "enablePullDownRefresh": false
+  },
+  "tabBar": {
+    "color": "#4c4c4c",
+    "selectedColor": "#eab86a",
+    "list": [
+      {
+        "iconPath": "images/footer/home.png",
+        "selectedIconPath": "images/footer/homec.png",
+        "pagePath": "pages/home/home",
+        "text": "首页"
+      },
+      {
+        "iconPath": "images/footer/categories.png",
+        "selectedIconPath": "images/footer/categoriesc.png",
+        "pagePath": "pages/projects/projects",
+        "text": "商品"
+      },
+      {
+        "iconPath": "images/footer/shoppingcart.png",
+        "selectedIconPath": "images/footer/shoppingcarta.png",
+        "pagePath": "pages/cart/cart",
+        "text": "购物车"
+      },
+      {
+        "iconPath": "images/footer/weixin.png",
+        "selectedIconPath": "images/footer/weixinc.png",
+        "pagePath": "pages/customservice/customservice",
+        "text": "客服"
+      },
+      {
+        "iconPath": "images/footer/my.png",
+        "selectedIconPath": "images/footer/myc.png",
+        "pagePath": "pages/user/all/all",
+        "text": "我的"
+      }
+    ]
+  },
+  "sitemapLocation": "sitemap.json",
+  "plugins": {
+	    "live-player-plugin": {
+	        "version": "1.3.2",
+	        "provider": "wx2b03c6e691cd7370"
+	    }
+	}
+}

+ 50 - 0
app.wxss

@@ -0,0 +1,50 @@
+/**app.wxss**/
+@import "component/toast/toast.wxss";
+page {
+  font-family: "微软雅黑", "Microsoft Yahei";
+  height: 100%;
+}
+.app-bg {
+  width: 100%;
+  min-height: 100%;
+  background-color: #f2f4f6;
+}
+.fl {
+  float: left;
+}
+.fr {
+  float: right;
+}
+.clean {
+  clear: both;
+}
+.clear {
+  clear: both;
+}
+.container {
+  width: 100%;
+  height: 100%;
+}
+.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  word-wrap: normal;
+}
+.ellipsisLn {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  /*-webkit-line-clamp: @line;*/
+}
+button::after {
+  border: 0;
+}
+button {
+  border-radius: 0;
+  border: 0;
+  margin: 0;
+  padding: 0;
+  background: none;
+}

+ 29 - 0
component/currency/currency.js

@@ -0,0 +1,29 @@
+// component/project/project.js
+var util = require('../../utils/accounting.min.js');
+Component({
+  properties: {
+    symbol: {
+      type: String,
+      value: '',
+      observer: 'updata'
+    },
+    value: {
+      type: Number,
+      observer: 'updata'
+    }
+  },
+  data: {
+    price: ''
+  },
+  ready: function (options) {
+    this.updata()
+  },
+  methods: {
+    updata () {
+      var val = util.formatMoney(this.data.value / 100, this.data.symbol, 2)
+      this.setData({
+        price: val
+      })
+    }
+  }
+})

+ 3 - 0
component/currency/currency.json

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

+ 1 - 0
component/currency/currency.wxml

@@ -0,0 +1 @@
+<text>{{price}}</text>

+ 0 - 0
component/currency/currency.wxss


+ 31 - 0
component/filter/filter.js

@@ -0,0 +1,31 @@
+Component({
+  properties: {
+    symbol: {
+      type: String,
+      value: '',
+      observer: 'formatNumber'
+    },
+    value: {
+      type: Number,
+      observer: 'formatNumber'
+    }
+  },
+  data: {
+    filter: ''
+  },
+  ready: function (options) {
+    this.formatNumber(this.data.value)
+  },
+  methods: {
+    formatNumber (num) { 
+    if (isNaN(num)) { 
+      throw new TypeError("num is not a number"); 
+    }
+    var price = ("" + num).replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g, "$1,")
+    this.setData({
+     filter: price
+    })
+    // return ("" + num).replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g, "$1,");  
+    },
+  }
+})

+ 3 - 0
component/filter/filter.json

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

+ 1 - 0
component/filter/filter.wxml

@@ -0,0 +1 @@
+<text>¥{{filter}}</text>

+ 0 - 0
component/filter/filter.wxss


+ 171 - 0
component/formatTime/formatTime.js

@@ -0,0 +1,171 @@
+var formatNumber = n => {
+  n = n.toString()
+  return n[1] ? n : '0' + n
+}
+Component({
+  properties: {
+    type: {
+      type: String,
+      value: 'formatTime',
+      observer: 'updata'
+    },
+    value: {
+      type: Number,
+      observer: 'updata'
+    }
+  },
+  data: {
+    time: ''
+  },
+  ready: function (options) {
+    this.updata()
+  },
+  methods: {
+    updata () {
+      switch (this.data.type) {
+        case 'formatTime':
+          var val = this.formatTime(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatTime1':
+          var val = this.formatTime1(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatDate':
+          var val = this.formatDate(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatChDate':
+          var val = this.formatChDate(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatChTime':
+          var val = this.formatChTime(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatmonth':
+          var val = this.formatmonth(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatmonth1':
+          var val = this.formatmonth1(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatmonth2':
+          var val = this.formatmonth2(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        case 'formatDay':
+          var val = this.formatDay(this.data.value)
+          this.setData({
+            time: val
+          })
+          break
+        default:
+          var val = this.formatTime(this.data.value)
+          this.setData({
+            time: val
+          })
+      }
+    },
+    formatTime (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      let hour = date.getHours()
+      let minute = date.getMinutes()
+      return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute].map(formatNumber).join(':')
+    },
+    formatTime1 (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      let hour = date.getHours()
+      let minute = date.getMinutes()
+      return [month, day].map(formatNumber).join('-') + ' ' + [hour, minute].map(formatNumber).join(':')
+    },
+    formatDate (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      return [year, month, day].map(formatNumber).join('-')
+    },
+    formatChDate (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      return year + '年' + month + '月' + day + '日'
+    },
+    formatmonth (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      // return year + '年' + month + '月' + day + '日'
+      return year + '/' + month 
+    },
+    formatmonth1 (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      // return year + '年' + month + '月' + day + '日'
+      return year + '-' + month 
+    },
+    formatmonth2 (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      // return year + '年' + month + '月' + day + '日'
+      return month + '月' + day + '日'
+    },
+    formatDay (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      // return year + '年' + month + '月' + day + '日'
+      return year + '/' + month + '/' + day
+    },
+    formatChTime (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      let hour = date.getHours()
+      let minute = date.getMinutes()
+      let second = date.getSeconds()
+      return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':')
+    },
+    formatChDate (value) {
+      let date = new Date(value * 1000)
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let day = date.getDate()
+      let hour = date.getHours()
+      let minute = date.getMinutes()
+      return year + '年' + month + '月' + day + '日' + [hour, minute].map(formatNumber).join(':')
+    }
+  }
+})

+ 3 - 0
component/formatTime/formatTime.json

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

+ 1 - 0
component/formatTime/formatTime.wxml

@@ -0,0 +1 @@
+<text class="">{{time}}</text>

+ 0 - 0
component/formatTime/formatTime.wxss


+ 14 - 0
component/project/project.js

@@ -0,0 +1,14 @@
+// component/project/project.js
+Component({
+
+  /**
+   * 页面的初始数据
+   */
+  properties: {
+    projectItem: {
+      type: Array
+    }
+  },
+  data: {
+  }
+})

+ 3 - 0
component/project/project.json

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

+ 16 - 0
component/project/project.wxml

@@ -0,0 +1,16 @@
+<!--component/project/project.wxml-->
+<view class="all">
+  <view class="project" wx:for="{{projectItem}}">
+    <image class="project-img" src="{{item.cover}}"></image>
+    <view class="project-info">
+      <text class="project-title">{{item.name}}</text>
+      <text class="project-count">已售{{item.current_investor_count}}件</text>
+      <view class="project-price">
+      <currency symbol="¥" value="200" ></currency>
+      </view>
+      <text class="project-point">(或{{item.person_min_crowd_funding / 1000}}代金券)</text>
+    </view>
+    <view class="project-out"></view>
+  </view>
+  <view class="clean"></view>
+</view>

+ 49 - 0
component/project/project.wxss

@@ -0,0 +1,49 @@
+/* component/project/project.wxss */
+.all {
+  padding-top: 20rpx;
+}
+.clean {
+  clear: both;
+}
+.project {
+  position: relative;
+  float: left;
+  margin-left: 20rpx;
+  margin-bottom: 20rpx;
+  width: 345rpx;
+  height: 554rpx;
+  background-color: #fff;
+}
+.project-img {
+  width: 100%;
+  height: 345rpx;
+}
+.project-title {
+  padding-top: 15rpx;
+  line-height: 36rpx;
+  margin-bottom:15rpx;
+  -webkit-line-clamp: 2;
+  font-size: 28rpx;
+  color: #2b2b2b;
+  overflow:hidden;
+  text-overflow:ellipsis;
+  display:-webkit-box;
+  -webkit-box-orient:vertical;
+}
+.project-info {
+  padding: 0 10rpx;
+}
+.project-count {
+  display: block;
+  color: #bbbbbb;
+  font-size: 24rpx;
+}
+.project-price {
+  color: #eab86a;
+  font-size: 28rpx;
+  font-weight: bold;
+}
+.project-point {
+  color: #bbbbbb;
+  font-size: 24rpx;
+}

+ 31 - 0
component/toast/toast.js

@@ -0,0 +1,31 @@
+
+let _compData = {
+  '_toast_.isHide': false,// 控制组件显示隐藏
+  '_toast_.content': ''// 显示的内容
+}
+let toastPannel = {
+  // toast显示的方法
+  show: function(data) {
+    let self = this;
+    this.setData({ '_toast_.isHide': true, '_toast_.content': data});
+    setTimeout(function(){
+      self.setData({ '_toast_.isHide': false})
+    },2000)
+  }
+}
+function ToastPannel() {
+  // 拿到当前页面对象
+  let pages = getCurrentPages();
+  let curPage = pages[pages.length - 1];
+  this.__page = curPage;
+  // 小程序最新版把原型链干掉了。。。换种写法
+  Object.assign(curPage, toastPannel);
+  // 附加到page上,方便访问
+  curPage.toastPannel = this;
+  // 把组件的数据合并到页面的data对象中
+  curPage.setData(_compData);
+  return this;
+}
+module.exports = {
+  ToastPannel
+}

+ 9 - 0
component/toast/toast.wxml

@@ -0,0 +1,9 @@
+ <template name="toast">
+  <view class="toast_content_box" wx:if="{{ isHide }}">
+    <view class="toast_content">
+      <view class="toast_content_text">
+        {{content}}
+      </view>
+    </view>
+  </view>
+ </template>

+ 22 - 0
component/toast/toast.wxss

@@ -0,0 +1,22 @@
+.toast_content_box {
+  display: flex;
+  width: 100%;
+  height: 100%;
+  justify-content: center;
+  align-items: center;
+  position: fixed;
+  z-index: 999;
+}
+.toast_content {
+  width: 50%;
+  padding: 20rpx;
+  background: rgba(0, 0, 0, 0.8);
+  border-radius: 20rpx;
+}
+.toast_content_text {
+  height: 100%;
+  width: 100%;
+  color: #fff;
+  font-size: 28rpx;
+  text-align: center;
+} 

BIN
images/footer/canteen-cz.png


BIN
images/footer/canteen-dc.png


BIN
images/footer/canteen-sm.png


BIN
images/footer/categories.png


BIN
images/footer/categoriesa.png


BIN
images/footer/categoriesc.png


BIN
images/footer/date.png


BIN
images/footer/dining.png


BIN
images/footer/down.png


BIN
images/footer/farm.png


BIN
images/footer/farma.png


BIN
images/footer/farmc.png


BIN
images/footer/home.png


BIN
images/footer/homea.png


BIN
images/footer/homec.png


BIN
images/footer/kf.png


BIN
images/footer/location.png


BIN
images/footer/logistics.png


BIN
images/footer/my.png


BIN
images/footer/mya.png


BIN
images/footer/myc.png


BIN
images/footer/play.png


BIN
images/footer/poster.png


BIN
images/footer/pyq.png


BIN
images/footer/scan.png


BIN
images/footer/search.png


BIN
images/footer/searcha.png


BIN
images/footer/selectdown.png


BIN
images/footer/share.png


BIN
images/footer/shoppingcart.png


BIN
images/footer/shoppingcarta.png


BIN
images/footer/totop.png


BIN
images/footer/up.png


BIN
images/footer/weixin.png


BIN
images/footer/weixina.png


BIN
images/footer/weixinc.png


BIN
images/footer/wx.png


BIN
images/footer/yongjin.png


BIN
images/star_a_l.png


BIN
images/star_a_r.png


BIN
images/star_d_l.png


BIN
images/star_d_r.png


+ 101 - 0
packageMerchant/pages/merchant/accounts/accounts.js

@@ -0,0 +1,101 @@
+var _request = require('../../../../utils/request.js')
+var id
+Page({
+  data: {
+    page: 1,
+    per_page: 10,
+    list: [],
+    already_settle:'',
+    not_settle:'',
+    total_sale:'',
+    // settle_price:[],
+    more: true,
+    num: ''
+  },
+  onLoad: function (options) {
+    id = options.id
+    // var app = getApp()
+    // new app.ToastPannel()
+    this.getSettleList()
+    this.getSettleStat()
+    this.getTime()
+  },
+  getSettleList () {
+    var that = this
+    var url = 'v1/merchant/settle/list'
+    var params = {
+      merchant_id: id,
+      page: this.data.page,
+      per_page: this.data.per_page
+    }
+    var success = function (res) {
+      // var arr = []
+      // for(var i = 0; i<data.length; i++){
+      //   // console.log(data[i].settle_price)
+      //   arr.push(that.formatNumber(data[i].settle_price))
+      //   console.log(arr.length)
+      // }
+      var result = that.data.list.concat(res.data.list || [])
+      console.log(result)
+      that.setData({
+        list: result,
+        // settle_price: arr
+      })
+      var listMore = res.data.list_count > that.data.list.length
+      that.setData({
+        more: listMore
+      })
+    }
+    _request.$get(url, params, success, that)
+  },
+  getSettleStat () {
+    var that = this
+    var url = 'v1/merchant/settle/stat'
+    var params = {
+      merchant_id: id,
+    }
+    var success = function (res) {
+      var data1 = res.data
+      console.log(data1)
+      that.setData({
+        already_settle: that.formatNumber(data1.already_settle),
+        not_settle: that.formatNumber(data1.not_settle),
+        total_sale: that.formatNumber(data1.total_sale)
+      })
+    }
+    _request.$get(url, params, success, that)
+  },
+  //千分位格式化
+  formatNumber (num) {
+    var num1 = num.toFixed(2)
+    if (isNaN(num)) { 
+      throw new TypeError("num is not a number"); 
+    } 
+    return ("" + num1).replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g, "$1,");  
+  },
+  toOther () {
+    wx.navigateTo({
+      url: '/pages/parse/parse?id=10'
+    })
+  },
+  onReachBottom: function () {
+    if (this.data.more) {
+      var page = this.data.page + 1
+      this.setData({
+        page: page
+      })
+      this.getSettleList()
+    }
+  },
+  getTime () {
+    var that = this
+    var date=new Date;
+    var year=date.getFullYear(); 
+    var month=date.getMonth()+1;
+    month =(month<10 ? "0"+month:month); 
+    var mydate = (year.toString()+'/'+month.toString());
+    that.setData({
+      num: mydate
+    })
+  }
+})

+ 10 - 0
packageMerchant/pages/merchant/accounts/accounts.json

@@ -0,0 +1,10 @@
+{
+ "navigationBarTitleText": "结算管理",
+ "navigationBarBackgroundColor": "#86a7da",
+ "usingComponents": {
+   "currency": "../../../../component/currency/currency",
+   "format-time": "../../../../component/formatTime/formatTime",
+   "filter": "../../../../component/filter/filter"
+ },
+ "backgroundColor": "#f3f3f3"
+}

+ 32 - 0
packageMerchant/pages/merchant/accounts/accounts.wxml

@@ -0,0 +1,32 @@
+<!--packageMerchant/pages/merchant/accounts/accounts.wxml-->
+ 
+<view class="bg">
+  <view class="accounts">
+    <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/icon/question_icon.png" class="accounts-icon" bindtap="toOther"/>
+    <view class="accounts-top">
+      <view class="w-text">未结算金额(元)</view>
+      <view class="w-money">{{not_settle}}</view>
+    </view>
+    <view class="accounts-bottom">
+      <view class="accounts-left">
+        <view class="y-text">已结算金额(元)</view>
+        <view class="y-money">{{already_settle}}</view>
+      </view>
+      <view class="accounts-right">
+        <view class="x-text">销售总额(元)</view>
+        <view class="x-money">{{total_sale}}</view>
+      </view>
+    </view>
+  </view>
+</view>
+<view class="accounts-record">
+   <view class="record-title">月结记录</view>
+   <view class="record-li" wx:for="{{list}}" wx:key="{{index}}" wx:if="{{list}}">
+     <text class="record-time">{{item.ym}}</text>
+     <filter class="{{num==item.ym?'first':'record-money'}}" value="{{item.settle_price}}" data-index="{{index}}"></filter>
+   </view>
+   <view wx:if="{{list.length<=0}}">
+     <image class="img" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/icon/account_null.jpg" />
+     <view class="no-record">抱歉,暂无月结记录</view>
+   </view>
+</view>

+ 125 - 0
packageMerchant/pages/merchant/accounts/accounts.wxss

@@ -0,0 +1,125 @@
+.bg{
+  background-color: #f3f3f3;
+  width: 100%;
+  height: 372rpx;
+  overflow: hidden;
+}
+.accounts{
+  background: -webkit-linear-gradient(left, #86a7da , #658ac5);
+  background: -o-linear-gradient(right, #86a7da, #658ac5);
+  background: -moz-linear-gradient(right, #86a7da, #658ac5);
+  background: linear-gradient(to right, #86a7da , #658ac5);
+  height: 332rpx;
+  width: 710rpx;
+  margin: 20rpx auto 0;
+  border-radius:10rpx;
+  position: relative;
+}
+.w-text{
+  font-size: 30rpx;
+  text-align: center;
+  color:#d2e4ff;
+  padding-top: 25rpx;
+  padding-bottom: 25rpx;
+}
+.w-money{
+  font-size: 40rpx;
+  text-align: center;
+  color: #fff;
+  font-weight: 900;
+  padding-bottom: 40rpx;
+}
+.y-text{
+  font-size: 30rpx;
+  text-align: center;
+  color:#d2e4ff;
+  padding-top: 30rpx;
+  padding-bottom: 10rpx;
+}
+.y-money{
+  font-size: 30rpx;
+  text-align: center;
+  color: #fff;
+  font-weight: 900;
+  /* padding-bottom: 30rpx; */
+}
+.x-text{
+  font-size: 30rpx;
+  text-align: center;
+  color:#d2e4ff;
+  padding-top: 30rpx;
+  padding-bottom: 10rpx;
+}
+.x-money{
+  font-size: 30rpx;
+  text-align: center;
+  color: #fff;
+  font-weight: 900;
+  /* padding-bottom: 30rpx; */
+}
+.accounts-bottom{
+  border-top: 1rpx solid #6584b4;
+}
+.accounts-left{
+  float: left;
+  padding-left: 12%;
+}
+.accounts-right{
+  float: right;
+  padding-right: 12%;
+}
+.record-title{
+  text-align: center;
+  font-size: 26rpx;
+  color: #8ba5ce;
+  background-color: #f4f7fc;
+  margin: 20rpx auto 0;
+  width: 710rpx;
+  height: 40rpx;
+  padding-top: 10rpx;
+}
+.record-li{
+  height: 120rpx;
+  width: 710rpx;
+  margin: 0 auto;
+  border-bottom: 1rpx solid #ccc;
+}
+.record-time{
+  font-size: 23rpx;
+  color: #999;
+  line-height: 120rpx;
+}
+.record-money{
+ font-size: 30rpx;
+ color: #eab86a;
+ line-height: 120rpx;
+ float: right;
+}
+.accounts-icon{
+  width: 40rpx;
+  height: 40rpx;
+  position: absolute;
+  top: 26rpx;
+  right: 26rpx;
+}
+.accounts-record{
+  position: relative;
+}
+.img{
+  width: 125rpx;
+  height: 125rpx;
+  display: block;
+  margin: 150rpx auto 0;
+}
+.no-record{
+  font-size: 30rpx;
+  text-align: center;
+  margin-top: 17rpx;
+  color: #b3becb
+}
+.first{
+  font-size: 30rpx;
+  color: #999;
+  line-height: 120rpx;
+  float: right;
+}

+ 281 - 0
packageMerchant/pages/merchant/logistics/logistics.js

@@ -0,0 +1,281 @@
+var _request = require('../../../../utils/request.js')
+var validator = require('../../../../utils/validator.js')
+var rid
+var fomlds = []
+Page({
+  data: {
+    order: {},
+    company: '',
+    express: '',
+    company1: '',
+    express1: '',
+    company2: '',
+    express2: '',
+    secondshow: false,
+    thirdshow: false,
+  },
+  bindCompany (e) {
+    this.setData({
+      company: e.detail.value
+    })
+  },
+  bindExpress (e) {
+    this.setData({
+      express: e.detail.value
+    })
+  },
+  bindCompany1 (e) {
+    this.setData({
+      company1: e.detail.value
+    })
+  },
+  bindExpress1 (e) {
+    this.setData({
+      express1: e.detail.value
+    })
+  },
+  bindCompany2 (e) {
+    this.setData({
+      company2: e.detail.value
+    })
+  },
+  bindExpress2 (e) {
+    this.setData({
+      express2: e.detail.value
+    })
+  },
+  onLoad: function (options) {
+    rid = options.id
+    this.getRadish()
+  },
+  onHide: function (val) {
+    this.sendFomlds()
+  },
+  getRadish () {
+    var that = this
+    var url = 'v1/merchant/order/detail/' + rid
+    var params = {
+    }
+    var success = function (res) {
+      var data = res.data
+      that.setData({
+        order: data
+      })
+      if (that.data.order.ex_company_array.length === 1 && that.data.order.ex_order_no_array.length === 1) {
+        that.setData({
+          company: data.ex_company_array[0],
+          express: data.ex_order_no_array[0]
+        })
+      } 
+      else if (that.data.order.ex_company_array.length === 2 && that.data.order.ex_order_no_array.length === 2) {
+        that.setData({
+          secondshow: true,
+          company: data.ex_company_array[0],
+          express: data.ex_order_no_array[0],
+          company1: data.ex_company_array[1],
+          express1: data.ex_order_no_array[1]
+        })
+      } 
+      else if (that.data.order.ex_company_array.length === 3 && that.data.order.ex_order_no_array.length === 3) {
+        that.setData({
+          secondshow: true,
+          thirdshow: true,
+          company: data.ex_company_array[0],
+          express: data.ex_order_no_array[0],
+          company1: data.ex_company_array[1],
+          express1: data.ex_order_no_array[1],
+          company2: data.ex_company_array[2],
+          express2: data.ex_order_no_array[2],
+        })
+      } 
+      else if (getApp().globalData.merchant) {
+        that.setData({
+          company: getApp().globalData.merchant
+        })
+      }
+    }
+    _request.$get(url, params, success)
+  },
+  setExpressRequest: function () {
+    var id = this.data.order.order_id
+    var that = this
+    var url = 'v1/merchant/order/' + id
+    var company = that.data.company
+    var express = that.data.express
+    if (that.data.secondshow === true) {
+      company = that.data.company + '/' + that.data.company1
+      express = that.data.express + '/' + that.data.express1
+    }
+    if (that.data.thirdshow === true) {
+      company = that.data.company + '/' + that.data.company1 + '/' + that.data.company2
+      express = that.data.express + '/' + that.data.express1 + '/' + that.data.express2
+    }
+    var params = {
+      express_company: company,
+      express_order_no: express,
+      status: 'dispatch'
+    }
+    var success = function (res) {
+      getApp().globalData.order = true
+      getApp().globalData.merchant = that.data.company
+      wx.navigateBack()
+    }
+    _request.$put(url, params, success)
+  },
+  putExpressRequest: function () {
+    var id = this.data.order.order_id
+    var that = this
+    var url = 'v1/merchant/order/' + id
+    var company = that.data.company
+    var express = that.data.express
+    if (that.data.secondshow === true) {
+      company = that.data.company + '/' + that.data.company1
+      express = that.data.express + '/' + that.data.express1
+    }
+    if (that.data.thirdshow === true) {
+      company = that.data.company + '/' + that.data.company1 + '/' + that.data.company2
+      express = that.data.express + '/' + that.data.express1 + '/' + that.data.express2
+    }
+    var params = {
+      express_company: company,
+      express_order_no: express
+    }
+    var success = function (res) {
+      getApp().globalData.order = true
+      getApp().globalData.merchant = that.data.company
+      wx.navigateBack()
+    }
+    _request.$put(url, params, success)
+  },
+  jstext (val) {
+    var strshow = val.indexOf('/')
+    if (strshow >= 0) {
+      return false
+    }
+    if (strshow < 0) {
+      return true
+    }
+  },
+  validate () {
+    var msg
+    if (!validator.required(this.data.company)) {
+      msg = '物流公司不能为空'
+    } else if (!validator.required(this.data.express)) {
+      msg = '物流号不能为空'
+    } else if (!this.jstext(this.data.company) || !this.jstext(this.data.express)) {
+      msg = '请不要输入"/"等特殊字符'
+    } else if (this.data.secondshow === true && !validator.required(this.data.company1)) {
+      msg = '物流公司不能为空'
+    } else if (this.data.secondshow === true && !validator.required(this.data.express1)) {
+      msg = '物流号不能为空'
+    } else if (this.data.secondshow === true && (!this.jstext(this.data.company1) || !this.jstext(this.data.express1))) {
+      msg = '请不要输入"/"等特殊字符'
+    } else if (this.data.thirdshow === true && !validator.required(this.data.company2)) {
+      msg = '物流公司不能为空'
+    } else if (this.data.thirdshow === true && !validator.required(this.data.express2)) {
+      msg = '物流号不能为空'
+    } else if (this.data.secondshow === true && (!this.jstext(this.data.company2) || !this.jstext(this.data.express2))) {
+      msg = '请不要输入"/"等特殊字符'
+    }
+    return { isOk: !msg, msg }
+  },
+  setExpress: function (e) {
+    this.formSubmit(e)
+    var { isOk, msg } = this.validate()
+    if (isOk) {
+      this.setExpressRequest()
+    } else {
+      wx.showToast({
+        title: msg,
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  putExpress: function (e) {
+    this.formSubmit(e)
+    var { isOk, msg } = this.validate()
+    if (isOk) {
+      this.putExpressRequest()
+    } else {
+      wx.showToast({
+        title: msg,
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  getqcode: function () {
+    var that = this
+    wx.scanCode({
+      success: (res) => {
+        that.setData({
+          express: res.result
+        })
+      }
+    })
+  },
+  getqcode1: function () {
+    var that = this
+    wx.scanCode({
+      success: (res) => {
+        that.setData({
+          express1: res.result
+        })
+      }
+    })
+  },
+  getqcode2: function () {
+    var that = this
+    wx.scanCode({
+      success: (res) => {
+        that.setData({
+          express2: res.result
+        })
+      }
+    })
+  },
+  formSubmit: function (e) {
+    fomlds = e.detail.formId
+    this.sendFomlds()
+  },
+  sendFomlds: function () {
+    var that = this
+    var url = 'v1/formid'
+    var params = {
+      formIds: fomlds
+    }
+    var success = function (res) {
+      console.log(res)
+    }
+    _request.$post(url, params, success)
+  },
+  pluslist () {
+    var that = this
+    if (that.data.secondshow === false) {
+      that.setData({
+        secondshow: true
+      })
+    } else {
+      that.setData({
+        thirdshow: true
+      })
+    }
+  },
+  miuslist () {
+    var that = this
+    if (that.data.secondshow === true && that.data.thirdshow === false) {
+      that.setData({
+        secondshow: false,
+        express1: '',
+        company1: '',
+      })
+    } else if (that.data.secondshow === true && that.data.thirdshow === true) {
+      that.setData({
+        thirdshow: false,
+        express2: '',
+        company2: '',
+      })
+    }
+  }
+})

+ 8 - 0
packageMerchant/pages/merchant/logistics/logistics.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "填写物流",
+  "navigationBarBackgroundColor": "#86a7da",
+  "usingComponents": {
+    "currency": "../../../../component/currency/currency"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 77 - 0
packageMerchant/pages/merchant/logistics/logistics.wxml

@@ -0,0 +1,77 @@
+<view class="bg">
+  <view class="logistics-top__bg">
+    <view class="logistics-top">
+      <view class="logistics-top__text">买家信息</view>
+      <image class="logistics-top__head" src="{{order.wx_user.head}}"></image>
+      <view class="logistics-top__name">{{order.wx_user.nickname}}</view>
+    </view>
+  </view>
+  <view class="orderDetail-address" wx:key="{{index}}" wx:if="{{order.status !== 'unpay' && order.status !== 'closed'}}">
+    <view class="orderDetail-address__left"></view>
+    <view class="orderDetail-address__right">
+      <view class="orderDetail-address__info">
+        <view class="orderDetail-address__name">收件人:{{order.contact}}</view>
+        <view class="orderDetail-address__tel">{{order.tel}}</view>
+        <view class="clean"></view>
+      </view>
+      <view class="orderDetail-address__more ellipsisLn">{{order.address}}</view>
+    </view>
+  </view>
+  <view class="logistics-main">
+    <view class="logistics-main__line logistics-main__border">
+      <view class="logistics-main__title">物流公司</view>
+      <input type="text" class="logistics-main__input" placeholder-class="text-placeholder" placeholder="请填写寄件物流公司名称" value="{{company}}" bindinput="bindCompany" />
+    </view>
+    <view class="logistics-main__line">
+      <view class="logistics-main__title">单号</view>
+      <view class="logistics-main__qcode" bindtap="getqcode"></view>
+      <input type="number" class="logistics-main__qcinput" placeholder-class="text-placeholder" placeholder="请填写寄件物流单号" value="{{express}}" bindinput="bindExpress" />
+    </view>
+  </view>
+
+  <view class="logistics-main" wx:if="{{secondshow}}">
+    <view class="logistics-main__line logistics-main__border">
+      <view class="logistics-main__title">物流公司</view>
+      <input type="text" class="logistics-main__input" placeholder-class="text-placeholder" placeholder="请填写寄件物流公司名称" value="{{company1}}" bindinput="bindCompany1" />
+    </view>
+    <view class="logistics-main__line">
+      <view class="logistics-main__title">单号</view>
+      <view class="logistics-main__qcode" bindtap="getqcode1"></view>
+      <input type="number" class="logistics-main__qcinput" placeholder-class="text-placeholder" placeholder="请填写寄件物流单号" value="{{express1}}" bindinput="bindExpress1" />
+    </view>
+  </view>
+  <view class="logistics-main" wx:if="{{thirdshow}}">
+    <view class="logistics-main__line logistics-main__border">
+      <view class="logistics-main__title">物流公司</view>
+      <input type="text" class="logistics-main__input" placeholder-class="text-placeholder" placeholder="请填写寄件物流公司名称" value="{{company2}}" bindinput="bindCompany2" />
+    </view>
+    <view class="logistics-main__line">
+      <view class="logistics-main__title">单号</view>
+      <view class="logistics-main__qcode" bindtap="getqcode2"></view>
+      <input type="number" class="logistics-main__qcinput" placeholder-class="text-placeholder" placeholder="请填写寄件物流单号" value="{{express2}}" bindinput="bindExpress2" />
+    </view>
+  </view>
+
+  <view class="plus-part" bindtap="pluslist" wx:if="{{!thirdshow}}">
+    <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/orderlist/lplus.png" class="plus-img" />
+    <view class="plus-text">添加物流信息</view>
+    <view class="clear"></view>
+  </view>
+  <view class="mius-part" bindtap="miuslist" wx:if="{{secondshow}}">
+    <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/orderlist/lmius.png" class="mius-img" />
+    <view class="mius-text">删减物流信息</view>
+    <view class="clear"></view>
+  </view>
+  <form bindsubmit="setExpress" report-submit="{{true}}" wx:if="{{order.status === 'processing'}}">
+    <button class="button logistics-button" formType="submit" data-id="{{item.order_id}}">
+      确认发货
+    </button>
+  </form>
+  <form bindsubmit="putExpress" report-submit="{{true}}" wx:if="{{order.status === 'dispatch'}}">
+    <button class="button logistics-button" formType="submit" data-id="{{item.order_id}}">
+      修改物流
+    </button>
+  </form>
+<!--   <view class="logistics-button" bindtap="setExpress" wx:if="{{order.status === 'processing'}}">确认发货</view>
+  <view class="logistics-button" bindtap="putExpress" wx:if="{{order.status === 'dispatch'}}">修改物流</view> -->
+</view>

+ 189 - 0
packageMerchant/pages/merchant/logistics/logistics.wxss

@@ -0,0 +1,189 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+  padding-bottom: 100rpx;
+}
+form {
+  position: relative;
+}
+button::afrer {
+  border: 0;
+}
+.button {
+  border: 0;
+  margin: 0;
+  padding: 0;
+  background: 0;
+  position: static;
+}
+.logistics-top__bg {
+  width: 100%;
+  background-color: #fff;
+}
+.logistics-top {
+  height: 260rpx;
+  border-bottom: 1rpx solid #eeeeee;
+  margin: 0 20rpx;
+}
+.logistics-top__text {
+  line-height: 28rpx;
+  padding: 25rpx 0 30rpx 0;
+  font-size: 28rpx;
+  text-align: center;
+  color: #999999;
+}
+.logistics-top__head {
+  width: 88rpx;
+  height: 88rpx;
+  margin: 0 auto;
+  display: block;
+  border: 1rpx solid #cdcdcd;
+  border-radius: 100%;
+}
+.logistics-top__name {
+  font-size: 28rpx;
+  text-align: center;
+  color: #4c4c4c;
+  padding-top: 10rpx;
+}
+.orderDetail-address {
+  position: relative;
+  padding: 0 20rpx;
+  height: 195rpx;
+  color: #4c4c4c;
+  font-size: 28rpx;
+  background-color: #fff;
+}
+.orderDetail-address__left {
+  margin: 78rpx 0 0 19rpx;
+  float: left;
+  width: 33rpx;
+  height: 38rpx;
+  background-size: 100% 100%;
+  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/merchant.png');
+}
+.orderDetail-address__right {
+  float: right;
+  width: 640rpx;
+}
+.orderDetail-address__info {
+  padding-top: 25rpx;
+}
+.orderDetail-address__name {
+  float: left;
+}
+.orderDetail-address__tel {
+  float: right;
+}
+.orderDetail-address__more {
+  padding-top: 20rpx;
+  -webkit-line-clamp: 2;
+  line-height: 50rpx;
+  height: 100rpx;
+}
+.orderDetail-address__border {
+  position: absolute;
+  left: 0;
+  bottom: 2rpx;
+  width: 100%;
+  height: 2rpx;
+}
+.text-placeholder {
+  color: #bbbbbb;
+}
+.logistics-main {
+  margin-top: 20rpx;
+  background-color: #fff;
+}
+.logistics-main__line {
+  position: relative;
+  padding: 0 20rpx;
+}
+.logistics-main__border {
+  border-bottom: 1rpx solid #eeeeee;
+}
+.logistics-main__title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  padding-top: 33rpx;
+  padding-bottom: 7rpx;
+  color: #4c4c4c;
+}
+.logistics-main__input {
+  line-height: 74rpx;
+  height: 74rpx;
+  padding-bottom: 25rpx;
+  color: #4c4c4c;
+  font-size: 28rpx;
+}
+.logistics-main__qcinput {
+  line-height: 74rpx;
+  height: 74rpx;
+  padding-bottom: 25rpx;
+  color: #4c4c4c;
+  font-size: 28rpx;
+  margin-right: 60rpx;
+}
+.logistics-main__qcode {
+  width: 40rpx;
+  height: 40rpx;
+  position: absolute;
+  top: 83rpx;
+  right: 24rpx;
+  background-size: 100% 100%;
+  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/qcode.png');
+}
+.logistics-button {
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 90rpx;
+  line-height: 90rpx;
+  font-size: 28rpx;
+  color: #fff;
+  text-align: center;
+  background: linear-gradient(to right, #74b5f3, #3171cf);
+  border-radius: 0rpx;
+  z-index: 100;
+}
+.plus-part {
+  margin-top: 48rpx;
+  margin-bottom: 148rpx;
+  display: inline-block;
+  margin-right: 15rpx;
+}
+.mius-part {
+  margin-top: 48rpx;
+  margin-left: 20rpx;
+  margin-bottom: 148rpx;
+  display: inline-block;
+}
+.plus-img {
+  display: inline-block;
+  width: 36rpx;
+  height: 36rpx;
+  float: left;
+  margin-right: 15rpx;
+  margin-left: 20rpx;
+}
+.plus-text {
+  float: left;
+  color: #3575d1;
+  font-size: 28rpx;
+}
+.mius-img {
+  display: inline-block;
+  width: 36rpx;
+  height: 36rpx;
+  float: left;
+  margin-right: 15rpx;
+  /* margin-left: 50rpx; */
+}
+.mius-text {
+  float: left;
+  color: #e45050;
+  font-size: 28rpx;
+}

+ 138 - 0
packageMerchant/pages/merchant/order/order.js

@@ -0,0 +1,138 @@
+var _request = require('../../../../utils/request.js')
+var rid
+Page({
+  data: {
+    order: {},
+    express: '',
+    refundDialog: false,
+    is_super_admin: ''
+  },
+  onLoad: function (options) {
+    rid = options.id
+    // this.setData({
+    //   is_super_admin: options.is_super_admin
+    // })
+  },
+  onShow: function () {
+    // this.check()
+    this.getRadish()
+  },
+  getRadish () {
+    var that = this
+    var url = 'v1/merchant/order/detail/' + rid
+    var params = {
+    }
+    var success = function (res) {
+      var data = res.data
+      that.setData({
+        order: data
+      })
+      that.formatOrder()
+    }
+    _request.$get(url, params, success)
+  },
+  confirmPopup () {
+    var that = this
+    wx.showModal({
+      title: '提示',
+      content: '是否确认收货?',
+      success: function(res) {
+        if (res.confirm) {
+          that.confirmOrder()
+        } else if (res.cancel) {
+        }
+      }
+    })
+  },
+  check () {
+    var that = this
+    var url = 'v1/user/check'
+    var params = {
+    }
+    var success = function (res) {
+      that.setData({
+        is_super_admin: res.data.is_super_admin
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  CancelPopup () {
+    var that = this
+    wx.showModal({
+      title: '提示',
+      content: '确定取消该订单?',
+      success: function(res) {
+        if (res.confirm) {
+          that.CancelOrder()
+        } else if (res.cancel) {
+        }
+      }
+    })
+  },
+  confirmOrder: function () {
+    var id = this.data.order.order_id
+    var that = this
+    var url = 'v1/order/' + id + '/confirm'
+    var params = {
+    }
+    var success = function (res) {
+      getApp().globalData.order = true
+      wx.navigateBack()
+    }
+    _request.$put(url, params, success)
+  },
+  CancelOrder: function () {
+    var id = this.data.order.order_id
+    var that = this
+    var url = 'v1/order/' + id + '/cancel'
+    var params = {
+    }
+    var success = function (res) {
+      getApp().globalData.order = true
+      wx.navigateBack()
+    }
+    _request.$put(url, params, success)
+  },
+  refundedOrder: function () {
+    var that = this
+    var id = that.data.order.order_id
+    var url = 'v1/merchant/order/refund/' + id
+    var params = {
+    }
+    var success = function (res) {
+      getApp().globalData.order = true
+      wx.navigateBack()
+    }
+    _request.$put(url, params, success)
+  },
+  showRefundDialog () {
+    var that = this
+    that.refundDialog = !that.refundDialog
+    that.setData({
+      refundDialog: that.refundDialog
+    })
+  },
+  formatOrder: function () {
+    var id = this.data.order.express_order_no
+    var result = ''
+    for (var i = 0; i < id.length; i++) {
+      if (i%4 === 0 && i !== 0) {
+        result = result + ' '
+      }
+      result = result + id[i]
+    }
+    this.setData({
+      express: result
+    })
+  },
+  // copeOrder: function () {
+  //   var that = this
+  //   var id = this.data.order.express_order_no
+  //   wx.setClipboardData({
+  //     data: id,
+  //     success: function(res) {
+  //       that.openToast('已成功复制到剪贴板')
+  //     }
+  //   })
+  // }
+})

+ 9 - 0
packageMerchant/pages/merchant/order/order.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarTitleText": "订单详情",
+  "navigationBarBackgroundColor": "#86a7da",
+  "usingComponents": {
+    "currency": "../../../../component/currency/currency",
+    "format-time": "../../../../component/formatTime/formatTime"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 104 - 0
packageMerchant/pages/merchant/order/order.wxml

@@ -0,0 +1,104 @@
+<view class="bg">
+  <view class="order-title__bg">
+    <view class="order-title">
+      <image class="order-title__left" src="{{order.wx_user.head}}"></image>
+      <view class="order-title__name ellipsis">{{order.wx_user.nickname}}</view>
+      <view class="order-title__right">买家信息</view>
+      <view class="clean"></view>
+    </view>
+  </view>
+
+  <view class="orderDetail-address"  wx:if="{{order.status !== 'unpay' && order.status !== 'closed'}}">
+    <view class="orderDetail-address__left"></view>
+    <view class="orderDetail-address__right">
+      <view class="orderDetail-address__info">
+        <view class="orderDetail-address__name">收件人:{{order.contact}}</view>
+        <view class="orderDetail-address__tel">{{order.tel}}</view>
+        <view class="clean"></view>
+      </view>
+      <view class="orderDetail-address__more">{{order.address}}</view>
+    </view>
+    <view class="clear"></view>
+  </view>
+
+  <view class="orderDetail-express" >
+    <view class="orderDetail-express__main {{order.status === 'refunded'?'closed':''}}">
+      <view class="orderDetail-express__title">{{order.status_cn === '已退款'? '已关闭':order.status_cn}}</view>
+      <view class="orderDetail-express__val" >
+        <text>{{express}}</text>
+        <text class="orderDetail-express__com" wx:if="{{order.express_order_no}}">({{order.express_company}})</text>
+      </view>
+    </view>
+  </view>
+
+  <view class="orderDetail-project">
+    <view class="order-main">
+      <image class="order-main__left" src="{{order.product.cover}}"></image>
+      <view class="order-main__right">
+        <view class="order-info__title ellipsisLn">{{order.product.name}}</view>
+        <view class="order-info__price"><!-- {{order.product.price}}代金券 --><currency symbol="¥" value="{{order.unit_price}}" />(<currency symbol="¥" value="{{order.buy_price / order.count}}" />)</view>
+        <view class="order-info__count">x{{order.count}}</view>
+      </view>
+      <view class="clean"></view>
+    </view>
+    <view class="orderDetail-allprice">共 <text>{{order.count}}</text> 件商品 合计:<currency symbol="¥" value="{{order.unit_price * order.count}}" />(<currency symbol="¥" value="{{order.buy_price}}" />)<!-- {{order.total_price}}代金券 --></view>
+
+    <!-- <view class="orderDetail-count">
+      <view class="orderDetail-count__title">认购数量</view>
+      <view class="orderDetail-count__count">x{{order.count}}</view>
+      <view class="clean"></view>
+    </view> -->
+    <!-- <view class="orderDetail-discount">
+      <view class="orderDetail-discount__title">抵扣</view>
+      <view class="orderDetail-discount__count">-¥1000<text class="orderDetail-discount__point">(100000代金券)</text></view>
+      <view class="clean"></view>
+    </view> -->
+    <!-- <view class="orderDetail-payPrice">
+      <view class="orderDetail-payPrice__title">实际支付</view>
+      <view class="orderDetail-payPrice__count">{{order.total_price}}代金券</view>
+      <view class="clean"></view>
+    </view> -->
+  </view>
+
+  <view class="orderDetail-info">
+    <view class="orderDetail-info__line">订单编号:{{order.order_id}}</view>
+    <view class="orderDetail-info__line">创建时间:<format-time type="formatTime" value="{{order.ctime}}" ></format-time></view>
+    <view class="orderDetail-info__line">支付时间:<format-time type="formatTime" value="{{order.paied_at}}" ></format-time></view>
+    <view class="orderDetail-info__line" wx:if="{{order.dtime !== 0}}">发货时间:<format-time type="formatTime" value="{{order.dtime}}" ></format-time></view>
+    <view class="orderDetail-info__line" wx:if="{{order.dtime === 0}}">发货时间:-</view>
+  </view>
+
+  <view class="orderDetail-btnbg" wx:if="{{order.status === 'unpay' || order.status === 'processing' || order.status === 'dispatch'}}">
+    <navigator url="/packageMerchant/pages/merchant/order/order?id={{order.order_id}}" open-type="navigate">
+      <view class="orderDetail-btn__black"  wx:if="{{order.status === 'unpay'}}">查看订单</view>
+    </navigator>
+
+    <navigator url="/packageMerchant/pages/merchant/logistics/logistics?id={{order.order_id}}" open-type="navigate">
+      <view class="orderDetail-btn__red" wx:if="{{order.status === 'processing'}}">发货</view>
+    </navigator>
+
+    <navigator url="/packageMerchant/pages/merchant/logistics/logistics?id={{order.order_id}}" open-type="navigate">
+      <view class="orderDetail-btn__black" wx:if="{{order.status === 'dispatch'}}">修改物流</view>
+    </navigator>
+
+    <view class="orderDetail-btn__black" bindtap="showRefundDialog" wx:if="{{(order.status === 'processing' || order.status === 'dispatch') && is_super_admin}}">退款</view>
+  </view>
+
+  <view class="orderDetail-dialog" wx:if="{{refundDialog}}">
+    <view class="orderDetail-dialog__bg"></view>
+    <view class="orderDetail-dialog__width">
+      <view class="orderDetail-icon">
+        <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/icon/tip_icon.jpg"></image>
+      </view>
+      <view class="orderDetail-dialog__info">
+        <view>确认退款后,</view>
+        <view>代金券将直接退还至买家账户!</view>
+      </view>
+      <view class="orderDetail-dialog__btn">
+        <text bindtap="showRefundDialog">取消</text>
+        <text bindtap="refundedOrder" style="color: #eab86a;border-left: 1rpx solid #eee;">确认</text>
+      </view>
+    </view>
+  </view>
+
+</view>

+ 324 - 0
packageMerchant/pages/merchant/order/order.wxss

@@ -0,0 +1,324 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+.order-title {
+  margin: 0 20rpx;
+  height: 90rpx;
+  line-height: 90rpx;
+  font-size: 28rpx;
+  border-bottom: 1rpx solid #eeeeee;
+}
+.order-title__bg {
+  width: 100%;
+  height: 92rpx;
+  background-color: #fff;
+}
+.order-title__left {
+  margin-top: 20rpx;
+  display: block;
+  width: 44rpx;
+  height: 44rpx;
+  float: left;
+  border-radius: 100%;
+}
+.order-title__name {
+  float: left;
+  margin-left: 20rpx;
+  width: 375rpx;
+  color: #4c4c4c;
+  font-size: 28rpx;
+}
+.order-title__right {
+  color: #999999;
+  float: right;
+}
+.orderDetail-address {
+  position: relative;
+  padding: 0 20rpx;
+  color: #4c4c4c;
+  font-size: 28rpx;
+  background-color: #fff;
+}
+.orderDetail-address__left {
+  margin: 90rpx 0 0 19rpx;
+  float: left;
+  width: 33rpx;
+  height: 38rpx;
+  background-size: 100% 100%;
+  background-image: url('https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/addressblue.png');
+}
+.orderDetail-address__right {
+  float: right;
+  width: 640rpx;
+}
+.orderDetail-address__info {
+  padding-top: 25rpx;
+}
+.orderDetail-address__name {
+  float: left;
+}
+.orderDetail-address__tel {
+  float: right;
+}
+.orderDetail-address__more {
+  padding-top: 20rpx;
+  padding-bottom: 20rpx;
+  line-height: 50rpx;
+}
+.orderDetail-address__border {
+  position: absolute;
+  left: 0;
+  bottom: 2rpx;
+  width: 100%;
+  height: 2rpx;
+}
+.order-main {
+  width: 710rpx;
+  height: 200rpx;
+  background-color: #fcfcfc;
+}
+.order-main__left {
+  width: 200rpx;
+  height: 200rpx;
+  display: block;
+  float: left;
+}
+.order-main__right {
+  position: relative;
+  width: 490rpx;
+  height: 200rpx;
+  float: right;
+}
+.order-info__title {
+  color: #4c4c4c;
+  padding-top: 5rpx;
+  font-size: 24rpx;
+  line-height: 36rpx;
+  height: 72rpx;
+  -webkit-line-clamp: 2;
+}
+.order-info__type {
+  padding-top: 12rpx;
+  font-size: 24rpx;
+  color: #bbbbbb;
+}
+.order-info__price {
+  position: absolute;
+  bottom: 16rpx;
+  left: 0;
+  font-size: 24rpx;
+  color: #bbb;
+}
+.order-info__point {
+  color: #bbbbbb;
+}
+.order-info__count {
+  position: absolute;
+  bottom: 16rpx;
+  right: 0;
+  font-size: 28rpx;
+  color: #eab86a;
+}
+.orderDetail-project {
+  padding: 20rpx;
+  background-color: #fff;
+}
+.orderDetail-count {
+  padding-top: 50rpx;
+  line-height: 48rpx;
+  font-size: 28rpx;
+}
+.orderDetail-count__title {
+  color: #4c4c4c;
+  float: left;
+}
+.orderDetail-count__count {
+  color: #4c4c4c;
+  float: right;
+}
+.orderDetail-discount {
+  line-height: 48rpx;
+  font-size: 28rpx;
+}
+.orderDetail-discount__title {
+  color: #4c4c4c;
+  float: left;
+}
+.orderDetail-discount__count {
+  color: #eab86a;
+  float: right;
+}
+.orderDetail-discount__point {
+  color: #bbbbbb;
+}
+.orderDetail-payPrice {
+  line-height: 80rpx;
+}
+.orderDetail-payPrice__title {
+  float: left;
+  font-size: 28rpx;
+  color: #eab86a;
+}
+.orderDetail-payPrice__count {
+  float: right;
+  color: #eab86a;
+  font-size: 32rpx;
+}
+.orderDetail-info {
+  padding: 30rpx 20rpx;
+  background-color: #ffffff;
+  margin-top: 16rpx;
+}
+.orderDetail-info__line {
+  line-height: 42rpx;
+  color: #bbbbbb;
+  font-size: 24rpx;
+}
+.orderDetail-btnbg {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  height: 88rpx;
+  background-color: #fff;
+  border-top: 1rpx solid #dddddd;
+}
+.orderDetail-btn__red {
+  width: 158rpx;
+  height: 58rpx;
+  border: 1rpx solid #eab86a;
+  font-size: 28rpx;
+  color: #eab86a;
+  text-align: center;
+  line-height: 58rpx;
+  border-radius: 5rpx;
+  margin-right: 20rpx;
+  margin-top: 14rpx;
+  float: right;
+}
+.orderDetail-btn__black {
+  width: 158rpx;
+  height: 58rpx;
+  border: 1rpx solid #cccccc;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  text-align: center;
+  line-height: 58rpx;
+  border-radius: 5rpx;
+  margin-right: 20rpx;
+  margin-top: 14rpx;
+  float: right;
+}
+.orderDetail-express {
+  background-color: #fff;
+  margin: 20rpx 0;
+  padding: 20rpx 0;
+}
+.orderDetail-express__main {
+  background-color: #fffae4;
+  margin: 0 20rpx;
+  padding-bottom: 27rpx;
+}
+.orderDetail-express__main.closed {
+  background-color: #eeeeee;
+  border: 1rpx solid #ccc;
+  box-sizing: border-box;
+}
+.orderDetail-express__main.closed .orderDetail-express__title {
+  color: #999999;
+}
+.orderDetail-express__title {
+  text-align: center;
+  font-size: 28rpx;
+  color: #f7ae87;
+  padding: 28rpx 0 16rpx;
+}
+.orderDetail-express__val {
+  color: #5b93c3;
+  text-align: center;
+  font-size: 28rpx;
+  font-weight: bold;
+}
+.orderDetail-express__btn {
+  width: 88rpx;
+  height: 40rpx;
+  border: 1rpx solid #f7ae87;
+  text-align: center;
+  margin: 16rpx auto 0;
+  line-height: 40rpx;
+  font-size: 24rpx;
+  color: #f7ae87;
+  border-radius: 5rpx;
+}
+.orderDetail-express__com {
+  padding-left: 5rpx;
+}
+.orderDetail-allprice {
+  padding-top: 20rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  text-align: right;
+  color: #4c4c4c;
+  font-size: 24rpx;
+}
+.orderDetail-allprice text {
+  color: #eab86a;
+  font-size: 28rpx;
+}
+.orderDetail-dialog {
+  position: relative;
+  width: 100%;
+}
+.orderDetail-dialog__bg {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  min-height: 100%;
+  background: rgba(0, 0, 0, 0.3);
+  z-index: 1;
+}
+.orderDetail-dialog__width {
+  position: fixed;
+  top: 20%;
+  left: 50%;
+  width: 560rpx;
+  margin-left: -280rpx;
+  border-radius: 16rpx;
+  background-color: #fff;
+  z-index: 100;
+}
+.orderDetail-icon {
+  width: 114rpx;
+  height: 114rpx;
+  margin: 64rpx auto 34rpx;
+}
+.orderDetail-icon image {
+  width: 100%;
+  height: 100%;
+}
+.orderDetail-dialog__info {
+  text-align: center;
+  line-height: 48rpx;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  margin-bottom: 40rpx;
+}
+.orderDetail-dialog__btn {
+  width: 100%;
+  height: 100rpx;
+  text-align: center;
+  border-top: 1rpx solid #eee;
+  font-size: 24rpx;
+  color: #4c4c4c;
+  box-sizing: border-box;
+}
+.orderDetail-dialog__btn text {
+  display: inline-block;
+  width: 49%;
+  line-height: 100rpx;
+  box-sizing: border-box;
+}

+ 316 - 0
packageMerchant/pages/merchant/orders/orders.js

@@ -0,0 +1,316 @@
+var _request = require('../../../../utils/request.js')
+var id
+var fomlds = ''
+var arr = []
+// var start = 0
+// var end = 10
+Page({
+  data: {
+    tabLeft: '0%',
+    type: 'processing',
+    page: 1,
+    per_page: 10,
+    start : 0,
+    end : 10,
+    list: [],
+    more: true,
+    tabChange: false,
+    contact: '',
+    is_super_admin: '',
+    laststart: '',
+    lastend: '',
+    atrue: false,
+    bcount: 1,
+    sum: 1,
+    loading: false
+  },
+  onLoad: function (options) {
+    id = options.id
+    this.getOrderList()
+    this.setData({
+      is_super_admin: options.is_super_admin
+    })
+    console.log(options)
+  },
+  onShow () {
+    wx.hideNavigationBarLoading()
+    if (getApp().globalData.order) {
+      this.typeList()
+      getApp().globalData.order = false
+    }
+  },
+  onHide: function (val) {
+    this.sendFomlds()
+  },
+  bindContact (e) {
+    this.setData({
+      contact: e.detail.value
+    })
+  },
+  tabProcessing: function () {
+    if (this.data.type !== 'processing') {
+      this.setData({
+        tabLeft: '0%',
+        type: 'processing',
+        more: true,
+        page: 1,
+        tabChange: true
+      })
+      this.getOrderList()
+    }
+  },
+  tabDispatch: function () {
+    if (this.data.type !== 'dispatch') {
+      this.setData({
+        tabLeft: '25%',
+        type: 'dispatch',
+        more: true,
+        page: 1,
+        tabChange: true
+      })
+      this.getOrderList()
+    }
+  },
+  tabComplete: function () {
+    if (this.data.type !== 'complete') {
+      this.setData({
+        tabLeft: '50%',
+        type: 'complete',
+        more: true,
+        page: 1,
+        tabChange: true
+      })
+      this.getOrderList()
+    }
+  },
+  tabClosed () {
+    if (this.data.type !== 'closed') {
+      this.setData({
+        tabLeft: '75%',
+        type: 'refunded',
+        more: true,
+        page: 1,
+        tabChange: true
+      })
+      this.getOrderList()
+    }
+  },
+  getContactList () {
+    this.setData({
+      list: [],
+      more: true,
+      page: 1
+    })
+    this.getOrderList()
+  },
+  getOrderList () {
+    var that = this
+    var url = 'v1/merchant/orders'
+    var params = {
+      contact: this.data.contact,
+      merchant_id: id,
+      status: this.data.type,
+      page: this.data.page,
+      per_page: this.data.per_page,
+    }
+    var success = function (res) {
+      if (that.data.tabChange) {
+        that.setData({
+          list: [],
+          tabChange: false,
+          start : 0,
+          end : 10,
+          page: 1,
+          per_page: 10,
+          bcount: 1
+        })
+        arr = []
+      }
+      // 新代码
+      arr = arr.concat(res.data.list || [])
+      if (that.data.page === 1) {
+        var sum = Math.ceil(res.data.list_count / that.data.per_page)
+        that.setData({
+          list: res.data.list,
+          sum: sum
+        })
+      } else {
+        that.setData({
+          list: res.data.list
+        })
+      }
+      // 旧代码
+      // var result = arr.concat(res.data.list || [])
+      // arr = result
+      // var sum1
+      // if (res.data.list_count % 10 >= 1) {
+      //   sum1 = parseInt(res.data.list_count / 10) + 1
+      //   if (sum1 < 10) {
+      //     sum1 = '0' + sum1
+      //   }
+      // } else {
+      //   sum1 = parseInt(res.data.list_count / 10)
+      //   if (sum1 < 10) {
+      //     sum1 = '0' + sum1
+      //   }
+      // }
+      // var arr1 = arr.slice(that.data.start,that.data.end) 
+      // that.setData({
+      //   list: arr1,
+      //   sum: sum1
+      // })
+      var listMore = res.data.list_count > arr.length
+      wx.hideLoading()
+      that.setData({
+        more: listMore,
+        loading: false
+      })
+    }
+    var fail = function () {
+      wx.hideLoading()
+      that.setData({
+        loading: false
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  typeList: function () {
+    this.setData({
+      more: true,
+      page: 1,
+      tabChange: true
+    })
+    this.getOrderList()
+  },
+  toOrder: function (e) {
+    this.formSubmit(e)
+    wx.navigateTo({
+      url: '/packageMerchant/pages/merchant/order/order?id=' + e.detail.target.dataset.id + '&is_super_admin=' + this.data.is_super_admin
+    })
+  },
+  toSend: function (e) {
+    this.formSubmit(e)
+    wx.navigateTo({
+      url: '/packageMerchant/pages/merchant/logistics/logistics?id=' + e.detail.target.dataset.id
+    })
+  },
+  toUpdate: function (e) {
+    this.formSubmit(e)
+    wx.navigateTo({
+      url: '/packageMerchant/pages/merchant/logistics/logistics?id=' + e.detail.target.dataset.id
+    })
+  },
+  formSubmit: function (e) {
+    fomlds = e.detail.formId
+    this.sendFomlds()
+  },
+  sendFomlds: function () {
+    var that = this
+    var url = 'v1/formid'
+    var params = {
+      formIds: fomlds
+    }
+    var success = function (res) {
+    }
+    _request.$post(url, params, success)
+  },
+  copeOrder: function (e) {
+    var item = e.currentTarget.dataset.item
+    var text = item.contact + ' ' + item.tel + ' ' + item.address
+    wx.setClipboardData({
+      data: text,
+      success: function(res) {
+        wx.showToast({
+          title: '已成功复制到剪贴板',
+          icon: 'none',
+          duration: 2000
+        })
+      }
+    })
+  },
+  prev () {
+    if (this.data.page > 1) {
+      var page = this.data.page - 1
+      this.setData({
+        page: page,
+        list: arr.slice((page - 1) * this.data.per_page, page * this.data.per_page)
+      })
+    } else {
+      wx.showToast({
+        title: '当前为第一页',
+        icon: 'none',
+        duration: 2000
+      })
+    }
+    // if (this.data.page > 1) {
+    //   var start1 = this.data.start - 10
+    //   var end1 = this.data.end - 10
+    //   var arr2 = arr.slice(start1,end1)
+    //   var page = this.data.page - 1
+    //   this.setData({
+    //     start: start1,
+    //     end: end1,
+    //     list: arr2,
+    //     page: page,
+    //     atrue: true
+    //   })
+    // }
+  },
+  next () {
+    if (!this.data.loading) {
+      if (this.data.page < this.data.sum) {
+        var page = this.data.page + 1
+        console.log(arr.length)
+        if (arr.length >= page * this.data.per_page || !this.data.more) {
+          this.setData({
+            page: page,
+            list: arr.slice((page - 1) * this.data.per_page, page * this.data.per_page)
+          })
+        } else {
+          this.setData({
+            page: page
+          })
+          if (!this.data.loading) {
+            this.setData({
+              loading: true
+            })
+            wx.showLoading()
+            this.getOrderList()
+          }
+        }
+      } else {
+        wx.showToast({
+          title: '已经是最后一页',
+          icon: 'none',
+          duration: 2000
+        })
+      }
+    }
+    // if (this.data.more) {
+    //   if (this.data.atrue == true && this.data.page !== this.data.bcount ) {
+    //     var start3 = this.data.start + 10
+    //     var end3 = this.data.end + 10
+    //     var page = this.data.page + 1
+    //     var arr3 = arr.slice(start3,end3)
+    //     this.setData({
+    //       start: start3,
+    //       end: end3,
+    //       list: arr3,
+    //       page: page
+    //     })
+    //     console.log(this.data.list)
+    //   } else {
+    //     var start = this.data.start + 10
+    //     var end = this.data.end + 10
+    //     var page = this.data.page + 1
+    //     this.setData({
+    //       page: page,
+    //       start: start,
+    //       end: end
+    //     })
+    //     this.data.bcount += 1
+    //     this.getOrderList()
+    //   }
+    // }
+  }
+})

+ 9 - 0
packageMerchant/pages/merchant/orders/orders.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarTitleText": "订单管理",
+  "navigationBarBackgroundColor": "#86a7da",
+  "usingComponents": {
+    "currency": "../../../../component/currency/currency",
+    "format-time": "../../../../component/formatTime/formatTime"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 104 - 0
packageMerchant/pages/merchant/orders/orders.wxml

@@ -0,0 +1,104 @@
+<view class="bg">
+  <view style="height: 1rpx;"></view>
+  <view class="orders-tabs">
+    <view class="orders-tab" bindtap="tabProcessing">待发货</view>
+    <view class="orders-tab" bindtap="tabDispatch">已发货</view>
+    <view class="orders-tab" bindtap="tabComplete">已完成</view>
+    <view class="orders-tab" bindtap="tabClosed">已退款</view>
+    <view class="clean"></view>
+    <view class="orders-tab__border" style="left: {{tabLeft}}"></view>
+  </view>
+
+  <input class="orders-input" placeholder="按用户名搜索" placeholder-style="color: #6e9dd4;" bindinput="bindContact" bindconfirm="getContactList" />
+
+  <view class="orders-main">
+    <view class="order" wx:for="{{list}}" wx:key="{{index}}">
+      <view class="order-title">
+        <view class="order-title__name ellipsis">{{item.order_id}}</view>
+        <view class="order-title__right"><format-time type="formatTime" value="{{item.paied_at}}" ></format-time></view>
+        <view class="clean"></view>
+      </view>
+
+      <navigator url="/packageMerchant/pages/merchant/order/order?id={{item.order_id}}" open-type="navigate">
+        <view class="order-main">
+          <image class="order-main__left" src="{{item.product.cover}}"></image>
+          <view class="order-main__right">
+            <view class="order-info__title ellipsisLn">{{item.product.name}}</view>
+            <!-- <view class="order-info__type ellipsis">{{item.product.detail}}</view> -->
+            <view class="order-info__price"><currency symbol="¥" value="{{item.unit_price}}" />(<currency symbol="¥" value="{{item.buy_price / item.count}}" />)<!-- <currency symbol="¥" value="{{item.product.price}}" ></currency><text class="order-info__point">(或{{item.product.price}}代金券)</text> --></view>
+            <view class="order-info__count">x{{item.count}}</view>
+          </view>
+          <view class="clean"></view>
+        </view>
+      </navigator>
+
+      <view class="order-allprice">共 <text>{{item.count}}</text> 件商品 合计:<currency symbol="¥" value="{{item.unit_price * item.count}}" />(<currency symbol="¥" value="{{item.buy_price}}" />)</view>
+
+      <view class="address">
+        <view class="address-top">
+          <!-- <image class="address-head" src="{{item.wx_user.head}}"></image> -->
+          <view class="address-userInfo">
+            <view class="address-name ellipsis">{{item.contact}}</view>
+            <view class="address-texttel ellipsis">{{item.tel}}</view>
+            <view class="clean"></view>
+          </view>
+          
+          <view class="address-cope" bindtap="copeOrder" data-item="{{item}}">复制</view>
+          <view class="clean"></view>
+        </view>
+
+        <view class="address-main">
+          <!-- <view class="address-left"></view>
+          <view class="address-right">
+            <view class="address-text">
+              <view class="address-textname esllipsis">{{item.contact}}</view>
+              <view class="address-texttel ellipsis">{{item.tel}}</view>
+              <view class="clean"></view>
+            </view>
+            <view class="address-more ellipsisLn">{{item.address}}</view>
+          </view> -->
+          <image class="address-icon" src="https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/addressblue.png"></image>
+          <text class="address-more ellipsisLn">{{item.address}}</text>
+          <view class="clean"></view>
+        </view>
+
+      </view>
+
+      <view class="order-btn">
+<!--         <navigator url="/packageMerchant/pages/merchant/order/order?id={{item.order_id}}" open-type="navigate">
+          <view class="order-btn__black" >查看订单</view>
+        </navigator> -->
+        <form bindsubmit="toOrder" report-submit="{{true}}" >
+          <button class="button order-btn__black" formType="submit" data-id="{{item.order_id}}">
+            更多详情
+          </button>
+        </form>
+<!--         <navigator url="/packageMerchant/pages/merchant/logistics/logistics?id={{item.order_id}}" open-type="navigate">
+          <view class="order-btn__red" wx:if="{{item.status === 'processing'}}">发货</view>
+        </navigator> -->
+        <form bindsubmit="toSend" report-submit="{{true}}" wx:if="{{item.status === 'processing'}}">
+          <button class="button order-btn__red" formType="submit" data-id="{{item.order_id}}">
+            发货
+          </button>
+        </form>
+<!--         <navigator url="/packageMerchant/pages/merchant/logistics/logistics?id={{item.order_id}}" open-type="navigate">
+          <view class="order-btn__black" wx:if="{{item.status !== 'dispatch'}}">修改物流</view>
+        </navigator> -->
+        <form bindsubmit="toUpdate" report-submit="{{true}}" wx:if="{{item.status === 'dispatch'}}">
+          <button class="button order-btn__black" formType="submit" data-id="{{item.order_id}}">
+            修改物流
+          </button>
+        </form>
+      </view>
+    </view>
+    <view class="orders-no" wx:if="{{list.length <= 0}}">
+      <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/unorders.png" class="orders-no__icon"></image>
+      <view class="orders-no__text">还没有订单信息</view>
+    </view>
+  </view>
+  <view class="orders-bottom">
+    <view class="orders-prev" bindtap="prev">上一页</view>
+    <view class="orders-center">{{page > 9 ? page : '0' + page }}/{{sum > 9 ? sum : '0' + sum}}</view>
+    <view class="orders-next" bindtap="next">下一页</view>
+  </view>
+</view>

+ 340 - 0
packageMerchant/pages/merchant/orders/orders.wxss

@@ -0,0 +1,340 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+form {
+  position: relative;
+}
+button::afrer {
+  border: 0;
+}
+.button {
+  border: 0;
+  margin: 0;
+  padding: 0;
+  background: 0;
+  position: static;
+}
+.orders-main {
+  padding-top: 26rpx;
+  padding-bottom: 100rpx;
+}
+.order {
+  padding: 0 20rpx;
+  background-color: #fff;
+  margin-bottom: 20rpx;
+}
+.orders-tabs {
+  position: fixed;
+  top: -1rpx;
+  left: 0rpx;
+  width: 100%;
+  height: 91rpx;
+  background-color: #fff;
+  border-bottom: 1rpx solid #dddddd;
+  z-index: 99999;
+}
+.orders-tab {
+  width: 25%;
+  height: 90rpx;
+  float: left;
+  line-height: 90rpx;
+  text-align: center;
+  font-size: 28rpx;
+  color: #4c4c4c;
+}
+.orders-tab__border {
+  position: absolute;
+  width: 25%;
+  height: 4rpx;
+  bottom: 0;
+  background-color: #86a7da;
+  transition: left 0.4s;
+  -webkit-transition: left 0.4s;
+}
+.order-title {
+  height: 90rpx;
+  line-height: 90rpx;
+  font-size: 28rpx;
+}
+.order-title__left {
+  margin-top: 20rpx;
+  display: block;
+  width: 44rpx;
+  height: 44rpx;
+  float: left;
+  border-radius: 100%;
+}
+.order-title__name {
+  float: left;
+  width: 375rpx;
+  color: #999999;
+  font-size: 28rpx;
+}
+.order-title__right {
+  color: #999999;
+  float: right;
+}
+.order-main {
+  width: 710rpx;
+  height: 200rpx;
+  background-color: #fcfcfc;
+}
+.order-main__left {
+  width: 200rpx;
+  height: 200rpx;
+  display: block;
+  float: left;
+  
+}
+.order-main__right {
+  position: relative;
+  width: 490rpx;
+  height: 200rpx;
+  float: right;
+}
+.order-info__title {
+  color: #4c4c4c;
+  font-size: 24rpx;
+  line-height: 36rpx;
+  padding-top: 5rpx;
+  height: 72rpx;
+  -webkit-line-clamp: 2;
+}
+.order-info__type {
+  padding-top: 12rpx;
+  font-size: 24rpx;
+  color: #bbbbbb;
+}
+.order-info__price {
+  position: absolute;
+  bottom: 16rpx;
+  left: 0;
+  font-size: 24rpx;
+  color: #bbb;
+}
+.order-info__point {
+  color: #bbbbbb;
+}
+.order-info__count {
+  position: absolute;
+  bottom: 16rpx;
+  right: 0;
+  font-size: 28rpx;
+  color: #eab86a;
+}
+.order-allprice {
+  padding-top: 20rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  text-align: right;
+  color: #4c4c4c;
+  font-size: 24rpx;
+  border-bottom: 1rpx solid #eeeeee;
+}
+.order-allprice text {
+  color: #eab86a;
+  font-size: 28rpx;
+}
+.order-btn {
+  height: 108rpx;
+}
+.order-btn__black {
+  float: right;
+  width: 158rpx;
+  height: 58rpx;
+  border: 1rpx solid #cccccc;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  text-align: center;
+  line-height: 58rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx;
+  border-radius: 5rpx;
+}
+.order-btn__red {
+  float: right;
+  width: 158rpx;
+  height: 58rpx;
+  border: 1rpx solid #eab86a;
+  font-size: 28rpx;
+  color: #eab86a;
+  text-align: center;
+  line-height: 58rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx;
+  border-radius: 5rpx;
+}
+.orders-no {
+  padding-top: 250rpx;
+}
+.orders-no__icon {
+  display: block;
+  width: 204rpx;
+  height: 258rpx;
+  margin: 0 auto;
+}
+.orders-no__text {
+  text-align: center;
+  font-size: 28rpx;
+  margin-top: 25rpx;
+  color: #cccccc;
+}
+.address {
+  padding-top: 30rpx;
+  padding-bottom: 30rpx;
+  border-bottom: 1rpx solid #eeeeee;
+}
+.address-top {
+  width: 100%;
+  padding-left: 56rpx;
+  box-sizing: border-box;
+}
+.address-head {
+  width: 42rpx;
+  height: 42rpx;
+  float: left;
+  border-radius: 100%;
+  margin-top: 20rpx;
+}
+.address-userInfo {
+  float: left;
+  width: 300rpx;
+  font-size: 28rpx;
+  color: #4c4c4c;
+}
+.address-name {
+  width: 300rpx;
+  line-height: 44rpx;
+  font-size: 28rpx;
+  color: #4c4c4c;
+}
+.address-cope {
+  float: right;
+  width: 160rpx;
+  height: 48rpx;
+  line-height: 48rpx;
+  text-align: center;
+  margin-top: 10rpx;
+  font-size: 24rpx;
+  color: #b9c9e2;
+  border: 1rpx solid #b9c9e2;
+}
+.address-icon {
+  float: left;
+  display: block;
+  width: 32rpx;
+  height: 38rpx;
+  margin-right: 24rpx;
+}
+.address-right {
+  float: right;
+  width: 652rpx;
+}
+.address-text {
+  width: 100%;
+  line-height: 40rpx;
+  font-size: 28rpx;
+  color: #4c4c4c;
+}
+.address-textname {
+  float: left;
+  width: 335rpx;
+}
+.address-main {
+  width: 100%;
+  margin-top: 20rpx;
+}
+.address-texttel {
+  width: 250rpx;
+}
+.address-more {
+  -webkit-line-clamp: 2;
+  font-size: 28rpx;
+  color: #4c4c4c;
+}
+.orders-input {
+  display: block;
+  margin: 110rpx 20rpx 0;
+  background-color: #fff;
+  width: 710rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  text-align: center;
+  font-size: 28rpx;
+  color: #4c4c4c;
+}
+.orders-bottom {
+  height: 100rpx;
+  background: #ffffff;
+  display: flex;
+  width: 100%;
+  justify-content: space-around;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  z-index: 999;
+  border-top: 1rpx solid #cccccc;
+}
+.orders-prev {
+  height: 62rpx;
+  width: 198rpx;
+  text-align: center;
+  line-height: 62rpx;
+  border: #cccccc solid 1rpx;
+  border-radius: 10rpx;
+  color: #5a8dd2;
+  margin-top: 18rpx;
+  font-size: 28rpx;
+  /* flex: 0.5; */
+}
+.orders-prev1 {
+  height: 62rpx;
+  width: 198rpx;
+  text-align: center;
+  line-height: 62rpx;
+  border: #cccccc solid 1rpx;
+  border-radius: 10rpx;
+  color: #999;
+  margin-top: 18rpx;
+  font-size: 28rpx;
+  /* flex: 0.5; */
+}
+.orders-center {
+  background: #eeeeee;
+  height: 62rpx;
+  width: 198rpx;
+  text-align: center;
+  line-height: 62rpx;
+  border-radius: 10rpx;
+  /* color: #5a8dd2; */
+  font-size: 28rpx;
+  margin-top: 19rpx;
+  /* flex: 0.5; */
+}
+.orders-next {
+  height: 62rpx;
+  width: 198rpx;
+  text-align: center;
+  line-height: 62rpx;
+  border: #cccccc solid 1rpx;
+  border-radius: 10rpx;
+  color: #5a8dd2;
+  margin-top: 18rpx;
+  font-size: 28rpx;
+  /* flex: 0.5; */
+}
+.orders-next1 {
+  height: 62rpx;
+  width: 198rpx;
+  text-align: center;
+  line-height: 62rpx;
+  border: #cccccc solid 1rpx;
+  border-radius: 10rpx;
+  color: #999;
+  margin-top: 18rpx;
+  font-size: 28rpx;
+  /* flex: 0.5; */
+}

+ 99 - 0
packageUser/pages/user/address/address.js

@@ -0,0 +1,99 @@
+var _request = require('../../../../utils/request.js')
+var _handle = require('../../../../utils/handle.js')
+Page({
+  data: {
+    addressList: []
+  },
+  onLoad: function (options) {
+  },
+  onShow () {
+    this.getAddressList()
+  },
+  getAddressList () {
+    var that = this
+    var url = 'v1/address'
+    var params = {
+    }
+    var success = function (res) {
+      that.setData({
+        addressList: res.data
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  delAddress (val) {
+    var that = this
+    var id = val.currentTarget.dataset.val
+    wx.showModal({
+      title: '提示',
+      content: '确定删除该地址?',
+      success: function(res) {
+        if (res.confirm) {
+          that.delAddressReques(id)
+        } else if (res.cancel) {
+        }
+      }
+    })
+  },
+  delAddressReques (val) {
+    var id = val
+    var that = this
+    var url = 'v1/address/' + id
+    var params = {
+    }
+    var success = function (res) {
+      that.getAddressList()
+      wx.showToast({
+        title: '删除地址成功',
+        icon: 'none',
+        duration: 2000
+      })
+    }
+    _request.$del(url, params, success)
+  },
+  defaultAddress (val) {
+    var id = val.currentTarget.dataset.val
+    var that = this
+    var url = 'v1/address/' + id + '/default'
+    var params = {
+    }
+    var success = function (res) {
+    	wx.setStorageSync('use_address', false) //存入地址
+      wx.navigateBack({
+        delta: 1
+      })
+      that.getAddressList()
+    }
+    _request.$put(url, params, success)
+  },
+  setAddress(val){
+  	console.log(val)
+  	var index = val.currentTarget.dataset.index;
+  	console.log('addressindex',index);
+  	wx.setStorageSync('use_address', this.data.addressList[index]) //存入地址
+  	wx.navigateBack({
+        delta: 1
+    })
+  },
+  addAddress (e) {
+    _handle.setFormId(e)
+    wx.navigateTo({
+      url: '/packageUser/pages/user/newAddress/newAddress'
+    })
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_address'
+    })
+  },
+  editAddress(e){
+  	var listid = e.currentTarget.dataset.listid;
+  	console.log('listid',listid);
+  	var address = this.data.addressList[listid];
+  	console.log('address',address);
+		wx.setStorageSync('editAddr', address);
+		wx.navigateTo({
+      url: '/packageUser/pages/user/newAddress/newAddress?type=1'
+    })
+  }
+})

+ 4 - 0
packageUser/pages/user/address/address.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "收货地址",
+  "backgroundColor": "#f3f3f3"
+}

+ 43 - 0
packageUser/pages/user/address/address.wxml

@@ -0,0 +1,43 @@
+<view class="bg">
+  <view style="height: 20rpx;"></view>
+  <view class="address" wx:key="{{index}}" wx:for="{{addressList}}" wx:for-index="index">
+    <view class="address-info" bindtap="setAddress" data-index="{{index}}">
+      <view>
+        <view class="address-name ellipsis">{{item.contact}}</view>
+        <view class="address-tel">{{item.tel}}</view>
+        <view class="clean"></view>
+      </view>
+      <view class="address-more ellipsisLn">
+        <text class="address-province">{{item.province}}</text>
+        <text class="address-province">{{item.city}}</text>
+        <text class="address-province">{{item.district}}</text>
+        {{item.address}}
+      </view>
+    </view>
+    <view class="address-handle">
+      <view class="address-default" data-val="{{item.id}}" bindtap="defaultAddress">
+        <image class="address-default__icon" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/address.png" wx:if="{{item.state === 1}}"></image>
+        <view class="address-default__no" wx:if="{{item.state !== 1}}"></view>
+        <view class="address-default__text">选用并设为默认地址</view>
+        <view class="clean"></view>
+      </view>
+      
+      <view class="address-del">
+        <image class="address-del__icon" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/addressdel.png"></image>
+        <view class="address-del__text" data-val="{{item.id}}" bindtap="delAddress">删除</view>
+        <view class="clean"></view>
+      </view>
+      <view class="address-edit" bindtap="editAddress" data-listid="{{index}}">
+      	编辑
+      </view>
+      
+      <view class="clean"></view>
+    </view>
+  </view>
+  <view style="height: 90rpx;"></view>
+  <form bindsubmit="addAddress" report-submit="{{true}}" class="address-form">
+    <button formType="submit" class="address-btn">
+      添加收货地址
+    </button>
+  </form>
+</view>

+ 99 - 0
packageUser/pages/user/address/address.wxss

@@ -0,0 +1,99 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+.address {
+  padding: 20rpx 20rpx 0;
+  background-color: #fff;
+  font-size: 28rpx;
+  margin-bottom: 20rpx;
+}
+.address-info {
+  height: 140rpx;
+  color: #4c4c4c;
+  border-bottom: 1px solid #eeeeee;
+}
+.address-name {
+  float: left;
+  width: 450rpx;
+}
+.address-tel {
+  float: right;
+}
+.address-province {
+  margin-right: 10rpx;
+}
+.address-more {
+  margin-top: 16rpx;
+  -webkit-line-clamp: 2;
+}
+.address-handle {
+  height: 80rpx;
+  line-height: 80rpx;
+}
+.address-default {
+  float: left;
+  height: 80rpx;
+}
+.address-default__icon {
+  float: left;
+  display: block;
+  width: 44rpx;
+  height: 44rpx;
+  margin-top: 18rpx;
+  margin-right: 10rpx;
+}
+.address-default__no {
+  float: left;
+  width: 43rpx;
+  height: 43rpx;
+  margin-top: 18rpx;
+  margin-right: 10rpx;
+  border: 1px solid #dddddd;
+  border-radius: 3rpx;
+  background-color: #f3f3f3;
+}
+.address-default__text {
+  float: left;
+}
+.address-del {
+  float: right;
+  height: 80rpx;
+}
+.address-del__icon {
+  float: left;
+  display: block;
+  margin-top: 26rpx;
+  margin-right: 10rpx;
+  width: 28rpx;
+  height: 28rpx;
+}
+.address-del__text {
+  float: left;
+  color: #bbbbbb;
+}
+.address-form {
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 90rpx;
+}
+.address-btn {
+  width: 100%;
+  height: 100%;
+  background-color: #eab86a;
+  color: #fff;
+  line-height: 90rpx;
+  text-align: center;
+  font-size: 28rpx;
+}
+
+.address-edit{
+display: inline-block;
+float: right;
+margin-right: 15px;
+color: #eab86a;
+}

+ 219 - 0
packageUser/pages/user/applyLeader/applyLeader.js

@@ -0,0 +1,219 @@
+var _request = require('../../../../utils/request.js')
+var validator = require('../../../../utils/validator.js')
+var _handle = require('../../../../utils/handle.js')
+Page({
+  data: {
+    address: '请选择',
+    region: ['北京市', '北京市', '东城区'],
+    name: '',
+    tel: 0,
+    more: '',
+    countdown: 0,
+    yzm:'',
+    remark:'',
+    userinfo:{},
+    showpage:0,
+	adimg:'',
+	applyTotal:0
+  },
+  onLoad: function (options) {
+  	this.getUserInfo();
+	this.getADimg();
+	this.getApplyTotal();
+  },
+  getUserInfo(){
+  	var that = this
+    var url = 'v1/user/info'
+    var params = {}
+    var success = function (res) {
+    	console.log(res);
+    	that.setData({
+        userinfo: res.data.wx_user
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  getADimg(){
+  	var that = this
+    var url = 'v1/ad/shop_apply/items'
+    var params = {}
+    var success = function (res) {
+    	console.log(res);
+		if(res.data.length > 0){
+			that.setData({
+				adimg: res.data[0].img
+			})
+		}
+    }
+    _request.$get(url, params, success)
+  },
+  getApplyTotal(){
+  	var that = this
+    var url = 'v1/sys_config/apply_total'
+    var params = {}
+    var success = function (res) {
+    	console.log(res);
+  		that.setData({
+  			applyTotal: res.data.total / 100
+  		})
+    }
+    _request.$get(url, params, success)
+  },
+  getTel (val) {
+    console.log(val)
+    if (val.detail.encryptedData) {
+      this.bindWxTel(val.detail)
+    }
+  },
+  bindWxTel (res) {
+    var str = JSON.stringify({
+      encryptedData: res.encryptedData,
+      iv: res.iv
+    })
+    var that = this
+    var url = 'v1/wxuser/one_click/binding/phonumer'
+    var params = {
+      userinfo: str
+    }
+    var success = function (res) {
+    	console.log(res);
+    }
+    _request.$post(url, params, success)
+  },
+  getYzm (e) {
+    _handle.setFormId(e)
+    if (validator.telphone(this.data.tel)) {
+      this.requireYzm()
+    } else {
+      wx.showToast({
+        title: '手机号码格式不正确',
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  startCountdown: function () {
+    var smsRequestTime = wx.getStorageSync('sms_request_time')
+    if (smsRequestTime) {
+      var count = parseInt((60000 - (new Date() - smsRequestTime)) / 1000)
+      this.setData({
+        countdown: count
+      })
+      if (this.data.countdown > 0) {
+        var timer = setInterval(() => {
+          var countdown = this.data.countdown - 1
+          this.setData({
+            countdown: countdown
+          })
+          if (this.data.countdown <= 0) {
+            clearInterval(timer)
+          }
+        }, 1000)
+        // clearInterval(this.interval)
+      }
+    } else {
+    }
+  },
+  requireYzm () {
+    var that = this
+    var url = 'v1/code/send'
+    console.log(typeof(this.data.tel))
+    var params = {
+      tel: this.data.tel,
+      valid_type: 'shop_application'
+    }
+    var success = function (res) {
+      wx.setStorageSync('sms_request_time', Date.now())
+      that.startCountdown()
+    }
+    _request.$post(url, params, success)
+  },
+  bindPhone (e) {
+    this.setData({
+      tel: e.detail.value
+    })
+  },
+  bindYzm (e) {
+    this.setData({
+      yzm: e.detail.value
+    })
+  },
+  bindName: function (e) {
+    this.setData({
+      name: e.detail.value
+    })
+  },
+  bindMore: function (e) {
+    this.setData({
+      more: e.detail.value
+    })
+  },
+  bindRemark: function (e) {
+    this.setData({
+      remark: e.detail.value
+    })
+  },
+  validate () {
+    var msg
+    if (!validator.required(this.data.name)) {
+      msg = '姓名不能为空'
+    } else if (!validator.required(this.data.tel)) {
+      msg = '联系电话不能为空'
+    } else if (!validator.telphone(this.data.tel)) {
+      msg = '手机号码格式不正确'
+    } else if (this.data.address === '请选择') {
+      msg = '请选择所在地区'
+    } else if (!validator.required(this.data.more)) {
+      msg = '详细地址不能为空'
+    }
+    return { isOk: !msg, msg }
+  },
+  save: function (e) {
+    _handle.setFormId(e)
+    var { isOk, msg } = this.validate()
+    if (isOk) {
+      this.shopApplication()
+    } else {
+      wx.showToast({
+        title: msg,
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  shopApplication () {
+    var that = this
+    var url = 'v1/user/shop_application'
+    var params = {
+      name: this.data.name,
+      mobile: this.data.tel,
+      code:this.data.yzm,
+      province: this.data.region[0],
+      city: this.data.region[1],
+      district: this.data.region[2],
+      address: this.data.more,
+      remark: this.data.remark
+    }
+    var success = function (res) {
+      wx.showToast({
+        title: '申请成功,我们将尽快处理,请您耐心等待',
+        icon: 'none',
+        duration: 2000
+      })
+      that.setData({showpage:1})
+    }
+    _request.$put(url, params, success)
+  },
+  bindRegionChange: function (e) {
+    console.log(e)
+    this.setData({
+      region: e.detail.value,
+      address: e.detail.value[0] + e.detail.value[1] + e.detail.value[2]
+    })
+  },
+//onShareAppMessage: function (val) {
+//  return _request.share({
+//    sc: 'xcx_user_newaddress'
+//  })
+//}
+})

+ 4 - 0
packageUser/pages/user/applyLeader/applyLeader.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "申请店长",
+  "backgroundColor": "#f3f3f3"
+}

+ 66 - 0
packageUser/pages/user/applyLeader/applyLeader.wxml

@@ -0,0 +1,66 @@
+<view class="bg" wx:if="{{showpage == 0}}">
+  <image src="{{adimg}}" class="item-index" mode="widthFix" style="width:100%"/>
+  <view class="newAddress-line">
+    <view class="newAddress-title">金 额</view>
+    <input maxlength="11" class="nameText" style="color:#eab86a" disabled="disabled" value="{{applyTotal}}"/>
+    <view class="clean"></view>
+  </view>
+  
+  <view class="newAddress-line">
+    <view class="newAddress-title">姓 名</view>
+    <input maxlength="11" class="nameText" placeholder="你的姓名" placeholder-class="text-placeholder" bindinput="bindName" />
+    <view class="clean"></view>
+  </view>
+  <view class="newAddress-line">
+  <view class="newAddress-title">手 机</view>
+	   <input type="number" maxlength="11" class="nameText" placeholder="你的手机号码" placeholder-class="text-placeholder" bindinput="bindPhone" />
+	 <!--<button class="bind-wx" open-type="getPhoneNumber" bindgetphonenumber="getTel">使用微信手机号</button>-->
+	</view>
+	<view class="newAddress-line">
+	  <view class="yzm-textBlock">
+	  <view class="newAddress-title">验证码</view>
+	    <input type="number" maxlength="11" class="nameText" placeholder="请输入短信验证码" placeholder-class="text-placeholder" bindinput="bindYzm" />
+	  </view>
+	  <form wx:if="{{ countdown <= 0 }}"  bindsubmit="getYzm" report-submit="{{true}}" class="getyzm">
+	    <button formType="submit" class="getyzm-btn">
+	      获取验证码
+	    </button>
+	  </form>
+	  <view class="nogetyzm" wx:if="{{ countdown > 0 }}" >重新发送({{countdown}})</view>
+	  <view class="clean"></view>
+	</view>
+    
+  <picker mode="region" bindchange="bindRegionChange" value="{{region}}" >
+    <view class="newAddress-line">
+      <view class="newAddress-title">所在地区</view>
+      <view class="newAddress-picker ">
+        <image class="newAddress-picker__icon" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/right.png"></image>
+        <view class="ellipsis newAddress-picker__text">{{address}}</view>
+      </view>
+      <view class="clean"></view>
+    </view>
+  </picker>
+  <view class="newAddress-more">
+    <view class="newAddress-more__title">详细地址</view>
+    <textarea maxlength="120" class="textarea"  auto-height placeholder="如道路、门牌号等"  placeholder-class="text-placeholder" bindinput="bindMore" />
+  </view>
+  <view class="newAddress-more">
+    <view class="newAddress-more__title">备注(选填)</view>
+    <textarea maxlength="120" class="textarea"  auto-height placeholder="可留言给客服哦"  placeholder-class="text-placeholder" bindinput="bindRemark" />
+  </view>
+  <form bindsubmit="save" report-submit="{{true}}" class="newAddress-form">
+    <button formType="submit" class="newAddress-btn">
+      保存
+    </button>
+    <p class="submittips">说明:申请后,我们会尽快与您做进一步沟通,请耐心等待。</p>
+  </form>
+</view>
+<view wx:if="{{showpage == 1}}">
+  <view style="text-align: center;padding: 100rpx 0;">
+    <image class="pro-img" style="width: 300rpx;height: 300rpx;" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/pay/projectsuccess.png" />
+  	<view class="pro-text" style="font-size: 33rpx;margin-top: 15px;">
+    申请成功,我们将尽快处理,请您耐心等待!
+  </view>
+  </view>
+  
+</view>

+ 179 - 0
packageUser/pages/user/applyLeader/applyLeader.wxss

@@ -0,0 +1,179 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+.newAddress-top {
+  height: 20rpx;
+}
+.newAddress-line {
+  height: 90rpx;
+  line-height: 90rpx;
+  background-color: #fff;
+  font-size: 28rpx;
+  border-bottom: 1px solid #eeeeee;
+  overflow:hidden;
+}
+.bind-wx{
+font-size: 20rpx;
+background: #eab86a;
+color: #FFF;
+padding: 0;
+width: inhert;
+margin: 11px 5px;
+border-radius:15px;
+}
+.getyzm-btn{
+font-size: 24rpx;
+border: 1px solid #eab86a;
+color: #eab86a;
+margin: 5px;
+
+}
+.newAddress-title {
+  float: left;
+  margin-left: 20rpx;
+  color: #4c4c4c;
+  width:80px;
+}
+.text-placeholder {
+  color: #bbbbbb;
+}
+.nameText {
+  width: 330rpx;
+  height: 90rpx;
+  line-height: 90rpx;
+  color: #4c4c4c;
+  float: left;
+  text-align: left;
+  padding-right: 20rpx;
+}
+.newAddress-picker {
+  float: right;
+  text-align: right;
+  color: #bbbbbb;
+}
+.newAddress-picker__icon {
+  float: right;
+  margin-top: 33rpx;
+  margin-right: 20rpx;
+  margin-left: 12rpx;
+  width: 13rpx;
+  height: 24rpx;
+}
+.newAddress-picker__text {
+  float: right;
+  width: 500rpx;
+}
+.newAddress-more {
+  background-color: #fff;
+}
+.newAddress-more {
+  padding: 30rpx 20rpx;
+}
+.newAddress-more__title {
+  font-size: 28rpx;
+  color: #4c4c4c;
+}
+.newAddress-form {
+
+}
+.submittips{
+font-size: 24rpx;
+text-align: center;
+width: 100%;
+display: block;
+padding: 5px 0;
+padding-bottom: 30px;
+color: #666;
+}
+.newAddress-btn {
+width: 90%;
+height: 100%;
+background-color: #eab86a;
+color: #fff;
+line-height: 90rpx;
+text-align: center;
+font-size: 28rpx;
+margin: 35px 5% 0 5%;
+border-radius: 45px;
+
+}
+.textarea {
+  padding-top: 20rpx;
+  display: block;
+  width: 710rpx;
+  min-height: 200rpx;
+  line-height: 40rpx;
+  font-size: 28rpx;
+  color: #4c4c4c
+}
+.distpicker {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    z-index: 999;
+    width: 100%;
+    height: 560rpx;
+    display: flex;
+    justify-content: center;
+    flex-wrap: wrap;
+    background-color: #fff;
+    font-size:28rpx;
+    color:#666;
+}
+.distpicker-btn {
+    display: flex;
+    justify-content: space-between;
+    box-sizing: border-box;
+    width: 100%;
+    padding: 0 40rpx;
+    height: 80rpx;
+    line-height: 80rpx;
+    background-color: #fafafa;
+    color: #eab86a;
+}
+.distpicker-content {
+    box-sizing: border-box;
+    width: 100%;
+    height: 560rpx;
+    background-color: #fff;
+    text-align: center;
+}
+.mask {
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 998;
+    width: 100%;
+    height: 100%;
+    background-color: rgba(0, 0, 0, .4);
+}
+.hidden {
+  display: none;
+}
+.area-item {
+  line-height: 80rpx;
+}
+.newAddress-tip {
+  height: 245rpx;
+  margin-top: 30rpx;
+  background: #ffffff;
+  padding-top: 40rpx;
+  padding-left: 30rpx;
+  padding-right: 20rpx;
+}
+.tip-title {
+  font-size: 33rpx;
+  color: #4e4e4e;
+  padding-bottom: 20rpx;
+}
+.tip-in {
+  font-size: 28rpx;
+  color: #4e4e4e;
+  line-height: 45rpx;
+}
+.tip-color {
+  color: #fe6565;
+}

+ 83 - 0
packageUser/pages/user/bankinfo/bankinfo.js

@@ -0,0 +1,83 @@
+var _request = require('../../../../utils/request.js')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+  	has_bank:false,
+    account_name: '',
+    bank_name: '',
+    bank_account: '',
+    bankInfo:{}
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+//  this.checkCertified()
+		this.getBankInfo();
+  },
+  accountName (e) {
+    console.log(e)
+    var that = this
+    that.setData({
+      account_name: e.detail.value
+    })
+  },
+  bankName (e) {
+    console.log(e)
+    var that = this
+    that.setData({
+      bank_name: e.detail.value
+    })
+  },
+  bankAccount (e) {
+    console.log(e)
+    var that = this
+    that.setData({
+      bank_account: e.detail.value
+    })
+  },
+	confirmClick () {
+	    var that = this
+	    var url = 'v1/user/save_card'
+	    var params = {
+	      account_name: that.data.account_name,
+		    bank_name: that.data.bank_name,
+		    bank_account: that.data.bank_account
+	    }
+	    var success = function (res) {
+	      if (res.data) {
+	        wx.showToast({
+	          title: '银行卡绑定成功~',
+	          icon: 'none',
+	          duration: 2000
+	        })
+	        that.getBankInfo()
+	      }
+	    }
+	    _request.$post(url, params, success)
+	},
+  getBankInfo(){
+  	var that = this
+    var url = 'v1/user/get_bank_info'
+    var params = {
+    }
+    var success = function (res) {
+      	that.setData({
+        	account_name: res.data.account_name,
+			    bank_name: res.data.bank_name,
+			    bank_account: res.data.bank_account,
+			    bankInfo:res.data,
+			    has_bank:res.data.has_bank
+        })
+    }
+    _request.$get(url, params, success)
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_identity'
+    })
+  }
+})

+ 4 - 0
packageUser/pages/user/bankinfo/bankinfo.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "银行信息",
+  "disableScroll": true
+}

+ 48 - 0
packageUser/pages/user/bankinfo/bankinfo.wxml

@@ -0,0 +1,48 @@
+<view class="identity__bg">
+  <view class="identity__head">
+    <image src="https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/xcx/rabbitimg/identity_bg.png"></image>
+  </view>
+
+  <view class="identity_wid">
+    <view class="identity_content">
+      <view class="title" wx:if="{{!has_bank}}">请先绑定银行卡</view>
+      <view class="title" wx:if="{{has_bank}}">已成功绑定银行卡</view>
+      <view class="identity_name">
+        <view class="fl">
+          <text>姓名</text>
+          <input type="text" bindinput="accountName" placeholder="真实姓名" value="{{account_name}}" disabled="{{has_bank}}"/>
+          <view class="clean"></view>
+        </view>
+        <view class="clean"></view>
+      </view>
+      <view class="identity_number">
+        <view class="fl">
+          <text>开户银行</text>
+          <input type="text" bindinput="bankName" placeholder="请填写银行卡开户银行" value="{{bank_name}}" disabled="{{has_bank}}"/>
+          <view class="clean"></view>
+        </view>
+        <view class="clean"></view>
+      </view>
+      <view class="identity_number">
+        <text>银行账号</text>
+        <input type="text" bindinput="bankAccount" placeholder="请输入您的银行账号" value="{{bank_account}}" disabled="{{has_bank}}"/>
+        <view class="clean"></view>
+      </view>
+
+      <view class="identity_btn" bindtap="confirmClick" wx:if="{{!has_bank}}">立即绑定</view>
+    </view>
+
+<!--
+    <view class="identity_content" wx:if="{{has_bank}}">
+      <image class="identity__img" src="https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/xcx/rabbitimg/identity.png"></image>
+      <view class="identity_headImg">
+        <image wx:if="{{certificateData.head}}" src="{{certificateData.head}}"></image>
+        <image wx:if="{{!certificateData.head}}" src="https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/labbit_default.png"></image>
+      </view>
+      <view class="info">{{certificateData.real_name}}</view>
+      <view class="info">{{certificateData.identity_card_with_star}}</view>
+    </view>
+-->  
+  </view>
+
+</view>

+ 122 - 0
packageUser/pages/user/bankinfo/bankinfo.wxss

@@ -0,0 +1,122 @@
+.identity__bg {
+  width: 100%;
+  min-height: 100%;
+  background: #f3f3f3;
+}
+.identity__head {
+  width: 100%;
+  height: 248rpx;
+  background-image: linear-gradient(180deg, 
+    #eab86a 0%, 
+    #d4932b 100%);
+}
+.identity__head image {
+  display: block;
+  width: 201rpx;
+  height: 251rpx;
+  margin: 0 auto;
+}
+.identity_wid {
+  width: 100%;
+  padding: 0 20rpx;
+  box-sizing: border-box;
+}
+.identity_content {
+  position: relative;
+  width: 100%;
+  background: #fff;
+  padding: 54rpx 30rpx 38rpx;
+  margin-top: 20rpx;
+  box-sizing: border-box;
+}
+.identity_content .title {
+  text-align: center;
+  font-size: 28rpx;
+  color: #7f93ae;
+  margin-bottom: 54rpx;
+}
+.identity_name, .identity_number {
+  width: 100%;
+  height: 100rpx;
+  background: #f6f9fd;
+  border: 1rpx solid #e5e5e5;
+  padding-left: 30rpx;
+  padding-right: 20rpx;
+  margin-bottom:30rpx;
+  box-sizing: border-box;
+}
+.identity_name fl {
+  float: left;
+}
+.identity_name text, .identity_number text{
+  /*display: inline-block;*/
+  float: left;
+  width: 140rpx;
+  line-height: 100rpx;
+  font-size: 28rpx;
+  color: #7f93ae;
+}
+.identity_name input {
+  float: left;
+  width: 160rpx;
+  height: 100rpx;
+  border: none;
+  outline: none;
+  font-size: 28rpx;
+  color: #b8c6d9;
+}
+.identity_name .btn {
+  float: right;
+  width: 260rpx;
+  height: 52rpx;
+  background: #fff;
+  border-radius: 26rpx;
+  line-height: 52rpx;
+  font-size: 24rpx;
+  color: #eab86a;
+  border: 1rpx solid #eab86a;
+  box-sizing: border-box;
+  text-align: center;
+  margin-top: 24rpx;
+}
+.identity_number input {
+  float: left;
+  width: 440rpx;
+  height: 100rpx;
+  border: none;
+  outline: none;
+  font-size: 28rpx;
+  color: #b8c6d9;
+}
+.identity_btn {
+  width: 100%;
+  height: 88rpx;
+  background: #eab86a;
+  border-radius: 8rpx;
+  line-height: 88rpx;
+  text-align: center;
+  font-size: 28rpx;
+  color: #ffffff;
+}
+.identity__img {
+  position: absolute;
+  width: 224rpx;
+  height: 162rpx;
+  right: 0;
+}
+.identity_headImg {
+  width: 172rpx;
+  height: 172rpx;
+  margin: 0 auto 46rpx;
+}
+.identity_headImg image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+}
+.identity_content .info {
+  font-size: 28rpx;
+  color: #7f93ae;
+  text-align: center;
+  margin-bottom: 24rpx;
+}

+ 200 - 0
packageUser/pages/user/bind/bind.js

@@ -0,0 +1,200 @@
+// packageUser/pages/user/bind/bind.js
+var validator = require('../../../../utils/validator.js')
+var _request = require('../../../../utils/request.js')
+var _handle = require('../../../../utils/handle.js')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tel: 0,
+    yzm: '',
+    countdown: 0
+  },
+  getTel (val) {
+    console.log(val)
+    if (val.detail.encryptedData) {
+      this.bindWxTel(val.detail)
+    }
+  },
+  bindWxTel (res) {
+    var str = JSON.stringify({
+      encryptedData: res.encryptedData,
+      iv: res.iv
+    })
+    var that = this
+    var url = 'v1/wxuser/one_click/binding/phonumer'
+    var params = {
+      userinfo: str
+    }
+    var success = function (res) {
+		var btd = wx.getStorageSync('backToDetail');
+		console.log('backtodeail',btd);
+		if(btd){
+			wx.navigateBack({});
+			wx.showToast({
+			  title: '手机号码绑定成功~',
+			  icon: 'none',
+			  duration: 2000
+			})
+			return;
+		}
+		
+		
+    	var bindbackurl = wx.getStorageSync('bindbackurl');
+    	if(bindbackurl){
+    		wx.navigateBack({})
+    		wx.navigateTo({
+	        url: bindbackurl
+	      })
+    		wx.showToast({
+	        title: '手机号码绑定成功~',
+	        icon: 'none',
+	        duration: 2000
+	      })
+    	}else{
+    		wx.navigateTo({
+	        url: '/packageUser/pages/user/bindsuccess/bindsuccess'
+	      })
+    	}
+    }
+    _request.$post(url, params, success)
+  },
+  bindPhone (e) {
+    this.setData({
+      tel: e.detail.value
+    })
+  },
+  bindYzm (e) {
+    this.setData({
+      yzm: e.detail.value
+    })
+  },
+  getYzm (e) {
+    _handle.setFormId(e)
+    if (validator.telphone(this.data.tel)) {
+      this.requireYzm()
+    } else {
+      wx.showToast({
+        title: '手机号码格式不正确',
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  startCountdown: function () {
+    var smsRequestTime = wx.getStorageSync('sms_request_time')
+    if (smsRequestTime) {
+      var count = parseInt((60000 - (new Date() - smsRequestTime)) / 1000)
+      this.setData({
+        countdown: count
+      })
+      if (this.data.countdown > 0) {
+        var timer = setInterval(() => {
+          var countdown = this.data.countdown - 1
+          this.setData({
+            countdown: countdown
+          })
+          if (this.data.countdown <= 0) {
+            clearInterval(timer)
+          }
+        }, 1000)
+        // clearInterval(this.interval)
+      }
+    } else {
+    }
+  },
+  requireYzm () {
+    var that = this
+    var url = 'v1/code/send'
+    var params = {
+      tel: this.data.tel,
+      valid_type: 'binding'
+    }
+    var success = function (res) {
+      wx.setStorageSync('sms_request_time', Date.now())
+      that.startCountdown()
+    }
+    _request.$post(url, params, success)
+  },
+  requireBindTel () {
+    var that = this
+    var url = 'v1/wxuser/binding/tel'
+    var params = {
+      tel: this.data.tel,
+      code: this.data.yzm
+    }
+    var success = function (res) {
+		var btd = wx.getStorageSync('backToDetail');
+		console.log('backtodeail',btd);
+		if(btd){
+			wx.navigateBack({});
+			wx.showToast({
+			  title: '手机号码绑定成功~',
+			  icon: 'none',
+			  duration: 2000
+			})
+		}
+		
+      var bindbackurl = wx.getStorageSync('bindbackurl');
+    	if(bindbackurl){
+    		wx.navigateBack({})
+    		wx.navigateTo({
+	        url: bindbackurl
+	      })
+    		wx.showToast({
+	        title: '手机号码绑定成功~',
+	        icon: 'none',
+	        duration: 2000
+	      })
+    	}else{
+    		wx.navigateTo({
+	        url: '/packageUser/pages/user/bindsuccess/bindsuccess'
+	      })
+    	}
+    }
+    _request.$post(url, params, success)
+  },
+  setBind (e) {
+    _handle.setFormId(e)
+    var { isOk, msg } = this.validate()
+    if (isOk) {
+      this.requireBindTel()
+    } else {
+      wx.showToast({
+        title: msg,
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  validate () {
+    var msg
+    if (!validator.required(this.data.tel)) {
+      msg = '手机不能为空'
+    } else if (!validator.telphone(this.data.tel)) {
+      msg = '手机号码格式不正确'
+    } else if (!validator.required(this.data.yzm)) {
+      msg = '验证码不能为空'
+    }
+    return { isOk: !msg, msg }
+  },
+  otherbind () {
+    var that = this
+    var url = 'v1/wxuser/one_click/binding/tel'
+    var params = {
+    }
+    var success = function (res) {
+      wx.navigateTo({
+        url: '/packageUser/pages/user/bindsuccess/bindsuccess'
+      })
+    }
+    _request.$post(url, params, success)
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_bind'
+    })
+  }
+})

+ 4 - 0
packageUser/pages/user/bind/bind.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "绑定手机",
+  "disableScroll": true
+}

+ 39 - 0
packageUser/pages/user/bind/bind.wxml

@@ -0,0 +1,39 @@
+<view class="bg">
+  <view class="bind">
+    <image class="bind-logo" src="https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/bindlogo.jpg"></image>
+    <view class="phone-block">
+       <input type="number" maxlength="11" class="phone" placeholder="请输入待绑定的手机号码" placeholder-class="text-placeholder" bindinput="bindPhone" />
+       <image class="phone-logo" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/bindphone.png"></image>
+    </view>
+    <view class="yzm-block">
+      <view class="yzm-textBlock">
+        <input type="number" maxlength="11" class="yzm" placeholder="请输入短信验证码" placeholder-class="text-placeholder" bindinput="bindYzm" />
+        <image class="yzm-logo" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/bindpsd.png"></image>
+      </view>
+      <form wx:if="{{ countdown <= 0 }}"  bindsubmit="getYzm" report-submit="{{true}}" class="getyzm">
+        <button formType="submit" class="getyzm-btn">
+          获取验证码
+        </button>
+      </form>
+      <!-- <view class="getyzm" bindtap="getYzm">获取验证码</view> -->
+      <view class="nogetyzm" wx:if="{{ countdown > 0 }}" >重新发送({{countdown}})</view>
+      <view class="clean"></view>
+    </view>
+    <form bindsubmit="setBind" report-submit="{{true}}"  class="bind-btn">
+      <button formType="submit" class="bind-button">
+        绑定
+      </button>
+    </form>
+    <!-- <view class="bind-btn" bindtap="setBind">绑定</view> -->
+    <view class="bind-border">
+      <view class="bind-huo">或</view>
+    </view>
+    <!--<view class="bind-d5c" bindtap="otherbind"><text style="color: #d29e5b">第五创账号</text>一键绑定</view>-->
+    <button class="bind-d5c" open-type="getPhoneNumber" bindgetphonenumber="getTel">使用<text style="color: #24aa39">微信</text>绑定手机号</button>
+<!--     <view bindtap="otherbind">
+      <image class="d5c-logo" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/user/rabbit_one_click_bind_d5c_phone.png" />
+      <view class="one-bind">一键绑定第五创账号</view>
+    </view> -->
+  </view>
+  <view class="success"></view>
+</view>

+ 156 - 0
packageUser/pages/user/bind/bind.wxss

@@ -0,0 +1,156 @@
+/* packageUser/pages/user/bind/bind.wxss */
+.bg {
+  width: 100%;
+  height: 100%;
+}
+.bind {
+  width: 100%;
+  height: 100%;
+}
+.bind-logo {
+  display: block;
+  width: 100%;
+  height: 365rpx;
+}
+.phone {
+  width: 633rpx;
+  padding-left: 77rpx;
+  height: 88rpx;
+  line-height: 88rpx;
+  font-size: 28rpx;
+}
+.phone-block {
+  position: relative;
+  width: 710rpx;
+  height: 88rpx;
+  border-bottom: 1px solid #cccccc;
+  margin: 56rpx auto 0;
+}
+.text-placeholder {
+  color: #bbbbbb;
+}
+.phone-logo {
+  position: absolute;
+  top: 23rpx;
+  left: 16rpx;
+  width: 30rpx;
+  height: 40rpx;
+}
+.yzm-block {
+  position: relative;
+  width: 710rpx;
+  margin: 40rpx auto 0;
+}
+.yzm-textBlock {
+  position: relative;
+  float: left;
+  border-bottom: 1px solid #cccccc;
+}
+.yzm {
+  width: 363rpx;
+  height: 88rpx;
+  padding-left: 77rpx;
+  line-height: 88rpx;
+  font-size: 28rpx;
+}
+.yzm-logo {
+  position: absolute;
+  top: 23rpx;
+  left: 16rpx;
+  width: 32rpx;
+  height: 40rpx;
+}
+.getyzm {
+  display: block;
+  float: right;
+  width: 228rpx;
+  height: 86rpx;
+  border: 1px solid #eab86a;
+  border-radius: 6rpx;
+  background-color: #fff;
+}
+.getyzm-btn {
+  width: 100%;
+  height: 100%;
+  line-height: 86rpx;
+  text-align: center;
+  color: #eab86a;
+  font-size: 28rpx;
+}
+.nogetyzm {
+  display: block;
+  float: right;
+  width: 228rpx;
+  height: 86rpx;
+  border: 1px solid #cccccc;
+  line-height: 86rpx;
+  text-align: center;
+  color: #cccccc;
+  font-size: 28rpx;
+  border-radius: 6rpx;
+}
+.bind-btn {
+  display: block;
+  width: 710rpx;
+  height: 88rpx;
+  margin: 70rpx auto 0;
+  border-radius: 4rpx;
+}
+.bind-button {
+  width: 100%;
+  height: 100%;
+  background-color: #eab86a;
+  text-align: center;
+  line-height: 88rpx;
+  color: #fff;
+  font-size: 36rpx;
+}
+.d5c-logo {
+  width: 120rpx;
+  height: 120rpx;
+  margin: 240rpx auto 0;
+  text-align: center;
+  display: block;
+}
+.one-bind {
+  margin: 0 auto;
+  color: #b6b6b6;
+  font-size: 28rpx;
+  text-align: center;
+}
+.bind-border {
+  position: relative;
+  width: 710rpx;
+  height: 60rpx;
+  margin: 0 auto 50rpx;
+  border-bottom: 1rpx solid #cccccc;
+}
+.bind-huo {
+  width: 100rpx;
+  height: 50rpx;
+  position: absolute;
+  background-color: #fff;
+  color: #cccccc;
+  font-size: 24rpx;
+  position: absolute;
+  left: 50%;
+  margin-left: -50rpx;
+  bottom: -25rpx;
+  line-height: 50rpx;
+  text-align: center;
+}
+.bind-d5c {
+  width: 708rpx;
+  height: 88rpx;
+  border: 0;
+  border: 1rpx solid #cccccc;
+  background-color: #f3f3f3;
+  border-radius: 4rpx;
+  margin: 0 auto 20rpx;
+  text-align: center;
+  line-height: 88rpx;
+  font-size: 32rpx;
+}
+button::after{
+  border:none;
+}

+ 0 - 0
packageUser/pages/user/bindoldsys/bindoldsys.js


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff