张增威 2 years ago
parent
commit
6d3bd70776
100 changed files with 1673 additions and 113 deletions
  1. 1 0
      .cloudbase/container/debug.json
  2. 6 0
      README.md
  3. 140 0
      api/api.js
  4. 24 7
      app.js
  5. 64 7
      app.json
  6. 4 1
      app.wxss
  7. 216 0
      compone/calendar/calendar.js
  8. 0 0
      compone/calendar/calendar.json
  9. 41 0
      compone/calendar/calendar.wxml
  10. 129 0
      compone/calendar/calendar.wxss
  11. 30 0
      compone/calendar/icon/icon.wxss
  12. 47 0
      compone/code-input/code-input.js
  13. 4 0
      compone/code-input/code-input.json
  14. 8 0
      compone/code-input/code-input.wxml
  15. 61 0
      compone/code-input/code-input.wxss
  16. 143 0
      compone/count-down/count-down.js
  17. 4 0
      compone/count-down/count-down.json
  18. 2 0
      compone/count-down/count-down.wxml
  19. 1 0
      compone/count-down/count-down.wxss
  20. 156 0
      compone/date-time-picker/date-time-picker.js
  21. 4 0
      compone/date-time-picker/date-time-picker.json
  22. 0 0
      compone/date-time-picker/date-time-picker.less
  23. 4 0
      compone/date-time-picker/date-time-picker.wxml
  24. 0 0
      compone/date-time-picker/date-time-picker.wxss
  25. 34 0
      compone/group-title/group-titlle.js
  26. 4 0
      compone/group-title/group-titlle.json
  27. 6 0
      compone/group-title/group-titlle.wxml
  28. 16 0
      compone/group-title/group-titlle.wxss
  29. 21 5
      compone/navbar/navbar.js
  30. 2 2
      compone/navbar/navbar.wxml
  31. 3 3
      compone/navbar/navbar.wxss
  32. 4 0
      compone/order-card/order-card.js
  33. 62 50
      compone/order-card/order-card.wxml
  34. 6 4
      compone/order-card/order-card.wxss
  35. 11 1
      compone/order/order.js
  36. 44 29
      compone/order/order.wxml
  37. 3 0
      compone/order/order.wxss
  38. 31 0
      compone/order2/order2.js
  39. 6 0
      compone/order2/order2.json
  40. 89 0
      compone/order2/order2.wxml
  41. 233 0
      compone/order2/order2.wxss
  42. 6 2
      compone/search/search.js
  43. 2 2
      compone/search/search.wxml
  44. 1 0
      compone/search/search.wxss
  45. BIN
      images/announce/datu.png
  46. BIN
      images/announce/play.png
  47. BIN
      images/announce/riqi.png
  48. BIN
      images/announce/shipin.png
  49. BIN
      images/announce/switch.png
  50. BIN
      images/announce/xiaotu.png
  51. BIN
      images/avatar.png
  52. BIN
      images/checked.png
  53. BIN
      images/close-small.png
  54. BIN
      images/close.png
  55. BIN
      images/countdown.png
  56. 0 0
      images/dayudengyu.png
  57. BIN
      images/decrease.png
  58. BIN
      images/del-white.png
  59. BIN
      images/edit.png
  60. BIN
      images/edit2.png
  61. BIN
      images/eye.png
  62. 0 0
      images/footprint.png
  63. BIN
      images/goods-card.png
  64. BIN
      images/goods-list.png
  65. BIN
      images/increase.png
  66. 0 0
      images/jian.png
  67. 0 0
      images/mine/administrator.png
  68. 0 0
      images/mine/bangwomai.png
  69. 0 0
      images/mine/chaxunyewu.png
  70. 0 0
      images/mine/fuwuxieyi.png
  71. 0 0
      images/mine/goodsbank.png
  72. 0 0
      images/mine/kefu.png
  73. 0 0
      images/mine/maijiajiaocheng.png
  74. 0 0
      images/mine/pintuan.png
  75. 0 0
      images/mine/setting.png
  76. 0 0
      images/mine/shangpinhexiao.png
  77. 0 0
      images/mine/shoukuanma.png
  78. 0 0
      images/mine/tihuodian.png
  79. 0 0
      images/mine/vip.png
  80. 0 0
      images/mine/wobangmai.png
  81. BIN
      images/more.png
  82. 0 0
      images/order-2.png
  83. BIN
      images/order.png
  84. 0 0
      images/orders/daochudingdan.png
  85. 0 0
      images/orders/dayinmiandan.png
  86. 0 0
      images/orders/saomaquhuo.png
  87. 0 0
      images/orders/shoukuanma.png
  88. 0 0
      images/orders/xiaoshoutongji.png
  89. 0 0
      images/qiehuan-big.png
  90. 0 0
      images/qrcode.png
  91. BIN
      images/riqi.png
  92. BIN
      images/scan.png
  93. BIN
      images/sell.png
  94. 0 0
      images/shangpinhexiao.png
  95. BIN
      images/shopping-cart-2.png
  96. BIN
      images/shopping-cart.png
  97. 0 0
      images/shoukuanma.png
  98. BIN
      images/success.png
  99. 0 0
      images/telphone.png
  100. 0 0
      images/tianjia.png

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

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

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+# 优团小栈小程序
+
+## 1.0.2022050501
+1. 新增:项目初始化
+2. 修改:修改图片文件中文名
+3. 修改:制作Mock数据

+ 140 - 0
api/api.js

@@ -0,0 +1,140 @@
+// api接口配置文件
+const baseURL = 'https://sqtg.hdlkeji.com' //社区团购
+module.exports = {
+  /* 版本号 */
+  Version: '3.0.10',
+  /* 用户登录 */
+  weChatLogin: baseURL + '/api/Login/weChatLogin', //微信登录(小程序)
+  get_token: baseURL + '/api/Login/get_token', //根据用户ID获取token
+  send_sms: baseURL + '/api/Login/send_sms', //发送短信验证码
+  OrderCallback: baseURL + '/api/Login/OrderCallback', //微信支付回调
+  /* 订单 */
+  Order_add: baseURL + '/api/Order/Order_add', //用户下单
+  Order_info: baseURL + '/api/Order/Order_info', //订单详情
+  Order_edit_info: baseURL + '/api/Order/Order_edit_info', //用户修改订单信息
+  Order_cancel: baseURL + '/api/Order/Order_cancel', //用户取消订单
+  Order_receiving: baseURL + '/api/Order/Order_receiving', //用户确认收货
+  Order_refund: baseURL + '/api/Order/Order_refund', //用户订单申请退款
+  Order_refund_revoke: baseURL + '/api/Order/Order_refund_revoke', //用户订单撤销申请退款
+  Order_edit_refund: baseURL + '/api/Order/Order_edit_refund', //用户订单修改申请退款
+  Order_address: baseURL + '/api/Order/Order_address', //用户修改收货地址
+  Order_payment_method: baseURL + '/api/Order/Order_payment_method', //用户支付方式
+  Order_payment: baseURL + '/api/Order/Order_payment', //用户支付
+  Print: baseURL + '/api/Order/Print', //打印面单
+  /* OSS对象存储 */
+  upload: baseURL + '/api/Upload/upload', //文件上传
+  getSignedUrl: baseURL + '/api/Upload/getSignedUrl', //获取配置
+  /* 商品管理 */
+  Commodity_add: baseURL + '/api/Commodity/Commodity_add', //添加商品
+  Commodity_info: baseURL + '/api/Commodity/Commodity_info', //商品详情
+  Commodity_list: baseURL + '/api/Commodity/Commodity_list', //商品列表
+  /* 会员管理 */
+  user_info: baseURL + '/api/Member/user_info', //个人信息
+  edit_info: baseURL + '/api/Member/edit_info', //编辑个人信息
+  subscribe: baseURL + '/api/Member/subscribe', //用户订阅团长
+  unsubscribe: baseURL + '/api/Member/unsubscribe', //用户取消订阅团长
+  footprints: baseURL + '/api/Member/footprints', //用户足迹
+  Member_order: baseURL + '/api/Member/Member_order', //首页我的订单
+  sms: baseURL + '/api/Member/sms', //发送短信
+  authentication: baseURL + '/api/Member/authentication', //个人认证
+  Member_point: baseURL + '/api/Member/Member_point', //添加自取点
+  email: baseURL + '/api/Member/email', //发送邮箱
+  /* 拼团管理 */
+  Gang_add: baseURL + '/api/Gang/Gang_add', //添加拼团
+  Gang_info: baseURL + '/api/Gang/Gang_info', //拼团详情
+  commodity: baseURL + '/api/Gang/commodity', //编辑拼团商品列表
+  Gang_point: baseURL + '/api/Gang/Gang_point', //自取点列表
+  Gang_point_edit: baseURL + '/api/Gang/Gang_point_edit', //自取点修改
+  Gang_invite: baseURL + '/api/Gang/Gang_invite', //拼团自取信息
+  Gang_order: baseURL + '/api/Gang/Gang_order', //拼团订单列表
+  Gang_commodity: baseURL + '/api/Gang/Gang_commodity', //拼团商品列表
+  Gang_by: baseURL + '/api/Gang/Gang_by', //截至拼团
+  Gang_open: baseURL + '/api/Gang/Gang_open', //开启拼团
+  Gang_edit: baseURL + '/api/Gang/Gang_edit', //编辑拼团
+  /* 评论管理 */
+  Comment_list: baseURL + '/api/Comment/Comment_list', //评论列表
+  Comment_add: baseURL + '/api/Comment/Comment_add', //添加评论
+  /* 用户收货地址列表 */
+  Address_list: baseURL + '/api/Address/Address_list', //用户收货地址列表
+  Address_add: baseURL + '/api/Address/Address_add', //用户添加收货地址
+  Address_edit: baseURL + '/api/Address/Address_edit', //用户编辑收货地址
+  /* 团长管理 */
+  Head_list: baseURL + '/api/Head/Head_list', //用户订阅团长列表
+  list_info: baseURL + '/api/Head/list_info', //团长拼团列表
+  Head_info: baseURL + '/api/Head/Head_info', //团长详情
+  /* 历史搜索管理 */
+  Search_list: baseURL + '/api/Search/Search_list', //用户历史搜索
+  Search_delete: baseURL + '/api/Search/Search_delete', //用户历史搜索删除
+  /* 团长订单管理 */
+  OrderManagement_list: baseURL + '/api/Ordermanagement/OrderManagement_list', //团长订单首页订单列表
+  Ordermanagement_info: baseURL + '/api/Ordermanagement/Ordermanagement_info', //订单详情
+  OrderManagement_selection: baseURL + '/api/Ordermanagement/OrderManagement_selection', //拼团选择
+  OrderManagement_paid: baseURL + '/api/Ordermanagement/OrderManagement_paid', //团员已支付
+  OrderManagement_picked_up: baseURL + '/api/Ordermanagement/OrderManagement_picked_up', //团员已取货
+  OrderManagement_pick_notice: baseURL + '/api/Ordermanagement/OrderManagement_pick_notice', //团长发送取货通知
+  OrderManagement_payment_order: baseURL + '/api/Ordermanagement/OrderManagement_payment_order', //团长发送付款通知
+  OrderManagement_notice: baseURL + '/api/Ordermanagement/OrderManagement_notice', //团长单通知
+  OrderManagement_statistics: baseURL + '/api/Ordermanagement/OrderManagement_statistics', //销售统计
+  OrderManagement_export: baseURL + '/api/Ordermanagement/OrderManagement_export', //导出订单
+  /* 团长退货管理 */
+  ReturnGoods_list: baseURL + '/api/Returngoods/ReturnGoods_list', //团长退货管理列表
+  ReturnGoods_info: baseURL + '/api/Returngoods/ReturnGoods_info', //团长退货处理详情
+  ReturnGoods_refund: baseURL + '/api/Returngoods/ReturnGoods_refund', //团长同意退款申请
+  ReturnGoods_no_refund: baseURL + '/api/Returngoods/ReturnGoods_no_refund', //团长不同意款申请
+  /* 团长提现管理 */
+  Withdrawalmanagement_balance: baseURL + '/api/Withdrawalmanagement/Withdrawalmanagement_balance', //团长账户余额
+  Withdrawalmanagement_apply: baseURL + '/api/Withdrawalmanagement/Withdrawalmanagement_apply', //团长申请提现
+  Withdrawalmanagement_list: baseURL + '/api/Withdrawalmanagement/Withdrawalmanagement_list', //团长提现记录
+  Withdrawalmanagement_info: baseURL + '/api/Withdrawalmanagement/Withdrawalmanagement_info', //团长申请提现详情
+  Withdrawalmanagement_industry: baseURL + '/api/Withdrawalmanagement/Withdrawalmanagement_industry', //行业列表
+  /* 团长收支明细 */
+  Detailed_list: baseURL + '/api/Detailed/Detailed_list', //团长收支明细记录
+  Detailed_gang_list: baseURL + '/api/Detailed/Detailed_gang_list', //团长收支明细拼团列表
+  Detailed_info: baseURL + '/api/Detailed/Detailed_info', //团长收支明细详情
+  /* 帮卖 */
+  Helpsell_add: baseURL + '/api/Helpsell/Helpsell_add', //团长添加帮卖商品
+  Helpsell_list: baseURL + '/api/Helpsell/Helpsell_list', //团长帮卖商品列表
+  Helpsell_delete: baseURL + '/api/Helpsell/Helpsell_delete', //团长删除帮卖商品
+  /* 供应大厅 */
+  Supplyhall_list: baseURL + '/api/Supplyhall/Supplyhall_list', //供应大厅列表
+  Supplyhall_head_info: baseURL + '/api/Supplyhall/Supplyhall_head_info', //团长详情
+  Supplyhall_apply: baseURL + '/api/Supplyhall/Supplyhall_apply', //申请帮卖
+  Supplyhall_help_sell: baseURL + '/api/Supplyhall/Supplyhall_help_sell', //我的申请
+  Supplyhall_supplier_list: baseURL + '/api/Supplyhall/Supplyhall_supplier_list', //关联供货商
+  Supplyhall_apply_info: baseURL + '/api/Supplyhall/Supplyhall_apply_info', //申请详情
+  Cancel_help_sale: baseURL + '/api/Supplyhall/Cancel_help_sale', //取消帮卖
+  Supplyhall_apply_cancel: baseURL + '/api/Supplyhall/Supplyhall_apply_cancel', //撤销申请
+  /* 卖货团长 */
+  Sellgoods_list: baseURL + '/api/Sellgoods/Sellgoods_list', //正在帮卖列表
+  Sellgoods_status: baseURL + '/api/Sellgoods/Sellgoods_status', //正在帮卖同意申请和不同意
+  Sellgoods_time: baseURL + '/api/Sellgoods/Sellgoods_time', //卖货申请时间
+  /* 商品分类 */
+  Classification_list: baseURL + '/api/Classification/Classification_list', //商品分类
+  /* 商品库 */
+  Commoditywarehouse_list: baseURL + '/api/Commoditywarehouse/Commoditywarehouse_list', //商品库列表
+  Commoditywarehouse_head: baseURL + '/api/Commoditywarehouse/Commoditywarehouse_head', //商品库团长列表
+  Commoditywarehouse_edit: baseURL + '/api/Commoditywarehouse/Commoditywarehouse_edit', //商品库设置分类
+  Commoditywarehouse_delete: baseURL + '/api/Commoditywarehouse/Commoditywarehouse_delete', //商品库删除商品
+  /* 二维码管理 */
+  Code_gang: baseURL + '/api/Code/Code_gang', //拼团详情分享二维码
+  Code_user: baseURL + '/api/Code/Code_user', //卖家首页
+  /* 订单核销管理 */
+  Orderwrite_list: baseURL + '/api/Orderwrite/Orderwrite_list', //订单核销列表
+  Orderwrite: baseURL + '/api/Orderwrite/Orderwrite', //订单核销
+  /* 管理员管理 */
+  Administrators_list: baseURL + '/api/Administrators/Administrators_list', //管理员列表
+  Administrators_delete: baseURL + '/api/Administrators/Administrators_delete', //删除管理员
+  Administrators_add: baseURL + '/api/Administrators/Administrators_add', //添加管理员
+  /* 统计分析 */
+  Income_list: baseURL + '/api/Statistics/Income_list', //统计分析收入
+  Expenditure_list: baseURL + '/api/Statistics/Expenditure_list', //统计分析支出
+  order_list: baseURL + '/api/Statistics/order_list', //订单收入
+  Buyer_ranking: baseURL + '/api/Statistics/Buyer_ranking', //买家排名
+  Commodity_ranking: baseURL + '/api/Statistics/Commodity_ranking', //商品排名
+  Help_sell_ranking: baseURL + '/api/Statistics/Help_sell_ranking', //帮卖排名
+  Supplier_ranking: baseURL + '/api/Statistics/Supplier_ranking', //供货商排名
+  /* 链接地址 */
+  service: baseURL + '/api/Config/service', //平台客服链接
+  course: baseURL + '/api/Config/course', //卖家教程链接
+  agreement: baseURL + '/api/Config/agreement', //服务协议链接
+}

+ 24 - 7
app.js

@@ -1,18 +1,35 @@
 // app.js
 // app.js
+const storageManager = require('/utils/storage-manager.js');
+const api = require('./api/api.js');
 App({
 App({
   onLaunch() {
   onLaunch() {
-    // 展示本地存储能力
-    const logs = wx.getStorageSync('logs') || []
-    logs.unshift(Date.now())
-    wx.setStorageSync('logs', logs)
     wx.getSystemInfo({
     wx.getSystemInfo({
       success: (res) => {
       success: (res) => {
         this.globalData.height = res.statusBarHeight
         this.globalData.height = res.statusBarHeight
-      },
+      },                                    
     })
     })
   },
   },
   globalData: {
   globalData: {
     userInfo: null,
     userInfo: null,
-    height:0
+    height: 0
+  },
+  // 清空subPageResult缓存数据
+  async clearSubPageResult() {
+    await storageManager.set("subPageResult", null)
+  },
+  // 获取用户信息
+  getUserDetailInfo() {
+    wx.request({
+      url: api.user_info,
+      header: {
+        'Authorization': wx.getStorageSync('token')
+      },
+      success(res) {
+        console.log(res);
+        if (res.data.code === 1) {
+          wx.setStorageSync('userinfo', res.data.data);
+        }
+      }
+    })
   }
   }
-})
+})

+ 64 - 7
app.json

@@ -1,6 +1,6 @@
 {
 {
   "pages":[
   "pages":[
-
+    "pages/index/index",
     "pages/announce/announce",
     "pages/announce/announce",
     "pages/publish/publish",
     "pages/publish/publish",
     "pages/search/search",
     "pages/search/search",
@@ -10,8 +10,6 @@
     "pages/company/company",
     "pages/company/company",
     "pages/wxqrcode/wxqrcode",
     "pages/wxqrcode/wxqrcode",
     "pages/treadsel/treadsel",
     "pages/treadsel/treadsel",
-    "pages/analysisdetail/analysisdetail",
-    "pages/analysis/analysis",
     "pages/receipt/receipt",
     "pages/receipt/receipt",
     "pages/ordermanage/ordermanage",
     "pages/ordermanage/ordermanage",
     "pages/withdraw/withdraw",
     "pages/withdraw/withdraw",
@@ -30,14 +28,51 @@
     "pages/bankcard/bankcard",
     "pages/bankcard/bankcard",
     "pages/footprint/footprint",
     "pages/footprint/footprint",
     "pages/myorders/myorders",
     "pages/myorders/myorders",
-    
     "pages/mine/mine",
     "pages/mine/mine",
     "pages/myhomepage/myhomepage",
     "pages/myhomepage/myhomepage",
     "pages/userinfo/userinfo",
     "pages/userinfo/userinfo",
     "pages/setting/setting",
     "pages/setting/setting",
-    "pages/index/index",
-    "pages/logs/logs"
+    "pages/logs/logs",
+    "pages/copypastgroup/copypastgroup",
+    "pages/sharetofirend/sharetofirend",
+    "pages/adminmanage/adminmanage",
+    "pages/pintuanmanage/pintuanmanage",
+    "pages/orderdetail/orderdetail",
+    "pages/requestrefund/requestrefund",
+    "pages/confirmrefund/confirmrefund",
+    "pages/addtogood/addtogood",
+    "pages/adddeliveryaddress/adddeliveryaddress",
+    "pages/goodverify/goodverify",
+    "pages/companydetailgroup/companydetailgroup",
+    "pages/companydetailinfo/companydetailinfo",
+    "pages/corporatebanktransfer/corporatebanktransfer",
+    "pages/addaddress/addaddress",
+    "pages/pintuanchoose/pintuanchoose",
+    "pages/salestatistics/salestatistics",
+    "pages/orderstatus/orderstatus",
+    "pages/exportorder/exportorder",
+    "pages/exportorderdetail/exportorderdetail",
+    "pages/tuanzdetail2status/tuanzdetail2status",
+    "pages/goodsbankchoose/goodsbankchoose",
+    "pages/phonenumber/phonenumber",
+    "pages/countryPhoneCode/countryPhoneCode",
+    "pages/verifycode/verifycode",
+    "pages/authorizesuccessful/authorizesuccessful",
+    "pages/goodsbankselect/goodsbankselect",
+    "pages/pintuandetail/pintuandetail",
+    "pages/confirmorder/confirmorder",
+    "pages/tuanzdetail2status2/tuanzdetail2status2",
+    "pages/bindadmin/bindadmin",
+    "pages/adminlist/adminlist",
+    "pages/webview/webview"
   ],
   ],
+  "subpackages": [{
+    "root": "packageA",
+    "pages": [
+      "pages/analysis/analysis",
+      "pages/rank/rank"
+    ]
+  }],
   "window":{
   "window":{
     "backgroundTextStyle":"light",
     "backgroundTextStyle":"light",
     "navigationBarBackgroundColor": "#fff",
     "navigationBarBackgroundColor": "#fff",
@@ -72,6 +107,28 @@
     "search":"/compone/search/search",
     "search":"/compone/search/search",
     "nav-bar":"/compone/navbar/navbar",
     "nav-bar":"/compone/navbar/navbar",
     "order-card":"/compone/order-card/order-card",
     "order-card":"/compone/order-card/order-card",
-    "order":"/compone/order/order"
+    "order":"/compone/order/order",
+    "group-title":"/compone/group-title/group-titlle",
+    "calendar":"/compone/calendar/calendar",
+    "date-time-picker": "/compone/date-time-picker/date-time-picker",
+    "order2":"/compone/order2/order2",
+    "code-input":"/compone/code-input/code-input",
+    "count-down":"/compone/count-down/count-down",
+    "van-image": "@vant/weapp/image/index",
+    "van-popup": "@vant/weapp/popup/index",
+    "van-uploader": "@vant/weapp/uploader/index",
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-switch": "@vant/weapp/switch/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-sticky": "@vant/weapp/sticky/index",
+    "van-checkbox": "@vant/weapp/checkbox/index",
+    "van-checkbox-group": "@vant/weapp/checkbox-group/index",
+    "van-action-sheet": "@vant/weapp/action-sheet/index",
+    "van-progress": "@vant/weapp/progress/index",
+    "van-empty": "@vant/weapp/empty/index",
+    "van-picker": "@vant/weapp/picker/index",
+    "van-field": "@vant/weapp/field/index",
+    "van-search": "@vant/weapp/search/index"
   }
   }
 }
 }

+ 4 - 1
app.wxss

@@ -1,4 +1,7 @@
 /**app.wxss**/
 /**app.wxss**/
+/* 引入icofont */
+@import "./styles/icofont.wxss";
+
 .container {
 .container {
   height: 100%;
   height: 100%;
   display: flex;
   display: flex;
@@ -7,4 +10,4 @@
   justify-content: space-between;
   justify-content: space-between;
   padding: 200rpx 0;
   padding: 200rpx 0;
   box-sizing: border-box;
   box-sizing: border-box;
-} 
+}

+ 216 - 0
compone/calendar/calendar.js

@@ -0,0 +1,216 @@
+// components/calendar/calendar.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    ySelData: {
+      type: String,
+      value: ""
+    },
+    yDateTimes:{
+      type:Array,
+      value:[]
+    },
+    // 设置哪一天为什么颜色
+    yDayColor:{
+      type:Array,
+      value:[]
+    },
+    // 颜色映射表
+    yEmotions:{
+      type:Object,
+      value:{}
+    },
+    before_show:{   //是否作为日期组件由按钮触发弹出(为true时是)
+      type:Boolean,
+      value:false
+    },
+    // task_show:{   //只有这个为1时,“和遮罩层有关的事件才会响应”
+    //   type:Boolean,
+    //   value:true
+    // }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    now_selectedDate:'',   //当前是几月几号
+    selectedDate:'',   //选中的几月几号
+    selectedWeek:'',   //选中的是星期几
+    curYear:2022,   //当前年份
+    curMonth:0,   //当前月份
+    daysCountArr:[31,28,31,30,31,30,31,31,30,31,30,31],
+    weekArr:['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+    dateList:[],
+    now_event:"",
+  },
+
+  observers:{
+    "yDayColor"(val){
+      if(val.length){
+        this.getDateList(this.data.curYear,this.data.curMonth-1,this.data.now_date);
+      }
+    }
+  },
+
+  lifetimes:{
+    // 在这个生命周期中只能拿到传参的初始值(就是页面data中的值)
+    attached(){
+      var today=new Date();
+      var curYear=today.getFullYear();
+      var curMonth=today.getMonth()+1;
+      var d=today.getDate();
+      var i=today.getDay();
+      var selData = curYear+'-'+curMonth+'-'+d;
+      var selectedDate=this.properties.ySelData?this.properties.ySelData:selData;
+      var now_date=curMonth+'-'+d;
+      var selectedWeek=this.data.weekArr[i];
+      this.setData({
+        curYear,
+        curMonth,
+        selectedDate,
+        selectedWeek,
+        now_date,
+        now_selectedDate:selData,
+        closed:true
+      })
+      // // 初始化事件、传来的节日标注、style
+      this.getDateList(curYear,curMonth-1,now_date);
+      this.triggerEvent('timeload',{selectedDate,selectedWeek,event:this.data.now_event})
+    },
+    ready(){
+      // 初始化事件、传来的节日标注、style
+      // this.getDateList(this.data.curYear,this.data.curMonth-1,this.data.now_date);
+    }
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    getDateList(y,mon,now_date){
+      var vm=this;
+      let _year=new Date();
+      let _dayColor=this.data.yDayColor;
+      let _emotion=this.data.yEmotions;
+      let daysCountArr=this.data.daysCountArr;
+      let _ydateTimes=this.data.yDateTimes;
+      let _new_days=`${_year.getFullYear()}-(${_year.getMonth()}+1)-${_year.getDate()}`;
+      // 判断闰年
+      daysCountArr[1]=(y%4==0 && y%100!=0 || y%400==0)?29:28
+      let dateList=[]
+      dateList[0]=[]
+      let weekIndex=0;
+      for(var i=0;i<daysCountArr[mon];i++){
+        var week=new Date(Date.UTC(y,mon,i+1)).getDay();
+        dateList[weekIndex].push({
+          value:y+'-'+(mon+1)+'-'+(i+1),
+          dateTime:(mon+1)+'-'+(i+1),
+          date:i+1,
+          week:week
+        });
+        for(let j in dateList[weekIndex]){
+          for(let k in _ydateTimes){
+            if(dateList[weekIndex][j].dateTime==_ydateTimes[k].day){
+              dateList[weekIndex][j].event=_ydateTimes[k].target
+            }
+            if(dateList[weekIndex][j].value==_ydateTimes[k].day){
+              dateList[weekIndex][j].event=_ydateTimes[k].target
+            }
+            if(now_date==_ydateTimes[k].day){
+              vm.setData({
+                now_event:_ydateTimes[k].target
+              })
+            }
+          }
+          // 心情签到独立于特殊日期标记设计
+          // 判断当前日期是不是设置了心情的日期
+          for(let m of _dayColor){
+            (dateList[weekIndex][j].value==m.day || dateList[weekIndex][j].value==_new_days) && !dateList[weekIndex][j].colors && (dateList[weekIndex][j].colors=_emotion[m.serene])
+          }
+        }
+        if(week==6){
+          weekIndex++;
+          dateList[weekIndex]=[]
+        }
+      }
+      vm.setData({
+        dateList
+      })
+
+    },
+    // 选中日期
+    selectDate(e){
+      var vm=this;
+      vm.setData({
+        selectedDate:e.currentTarget.dataset.date.value,
+        selectedWeek:vm.data.weekArr[e.currentTarget.dataset.date.week]
+      })
+      this.triggerEvent('timechanged',{
+        selectedDate:e.currentTarget.dataset.date.value,
+        selectedWeek:vm.data.weekArr[e.currentTarget.dataset.date.week],
+        event:(e.currentTarget.dataset.date.event?e.currentTarget.dataset.date.event:"")
+      })
+    },
+    // 上个月
+    preMonth(){
+      var vm=this;
+      var curYear=vm.data.curYear;
+      var curMonth=vm.data.curMonth;
+      curYear=curMonth-1?curYear:curYear-1;
+      curMonth=curMonth-1?curMonth-1:12;
+      vm.setData({
+        curYear,
+        curMonth
+      });
+      vm.getDateList(curYear,curMonth-1,this.data.now_date);
+    },
+    // 上年
+    preYear(){
+      var vm=this;
+      var curYear=vm.data.curYear;
+      var curMonth=vm.data.curMonth;
+      curYear-=1;
+      vm.setData({
+        curYear,
+        curMonth
+      });
+      vm.getDateList(curYear,curMonth-1,this.data.now_date);
+    },
+    // 下个月
+    nextMonth(){
+      var vm=this;
+      var curYear=vm.data.curYear;
+      var curMonth=vm.data.curMonth;
+      curYear=curMonth+1==13?curYear+1:curYear;
+      curMonth=curMonth+1==13?1:curMonth+1;
+      vm.setData({
+        curYear,
+        curMonth
+      });
+      vm.getDateList(curYear,curMonth-1,this.data.now_date);
+    },
+    // 下年
+    nextYear(){
+      var vm=this;
+      var curYear=vm.data.curYear;
+      var curMonth=vm.data.curMonth;
+      curYear+=1;
+      vm.setData({
+        curYear,
+        curMonth
+      });
+      vm.getDateList(curYear,curMonth-1,this.data.now_date);
+    },
+    // 在弹出式场景下关闭日历
+    closed(){
+      if(this.properties.before_show){
+        this.setData({
+          closed:false
+        })
+      }
+    }
+  }
+})

+ 0 - 0
ec-canvas/ec-canvas.json → compone/calendar/calendar.json


+ 41 - 0
compone/calendar/calendar.wxml

@@ -0,0 +1,41 @@
+<view class="calendar_date {{before_show?'calendar_select_date':''}} {{(closed)?'':'calendar_unselect_date'}}">
+  <view class="selected_date">
+    <view class="date_change">
+      <view bindtap="preYear">
+        <i class="iconfont icon-shuangjiantou2"></i>
+      </view>
+      <view bindtap="preMonth">
+        <i class="iconfont icon-shangyiyedanjiantou"></i>
+      </view>
+    </view>
+    <view class="text_center" style="text-align:center;">{{curYear+'年'+curMonth+'月'}}</view>
+    <view style="text-align:right;">
+      <view bindtap="nextMonth">
+        <i class="iconfont icon-xiayiyedanjiantou"></i>
+      </view>
+      <view bindtap="nextYear">
+        <i class="iconfont icon-shuangjiantou1"></i>
+      </view>
+    </view>
+  </view>
+  <view class="calendar_panel calendar_panel_two">
+    <view class="calendar_box">
+      <view class="weekday_label">日</view>
+      <view class="weekday_label">一</view>
+      <view class="weekday_label">二</view>
+      <view class="weekday_label">三</view>
+      <view class="weekday_label">四</view>
+      <view class="weekday_label">五</view>
+      <view class="weekday_label">六</view>
+    </view>
+    <view class="calendar_box" wx:for="{{dateList}}" wx:key="*this" wx:for-item="week"
+      style="{{index==0?'justify-content:flex-end':''}}">
+      <!-- 此处view的data-不是为了向js传值,而只是自定义属性向css伪元素传attr() -->
+      <view class="weekday_label {{(item.value==selectedDate)?'active_date':''}} {{(item.value==now_selectedDate)?'active_dates':''}} {{(item.event)?'actived_date':''}}" wx:for="{{week}}" wx:key="*this" data-event="{{item.event}}">
+        <view class="" style="width:70%;border-radius:27%;text-align:center;background-color:{{item.colors?item.colors:'none'}}" bindtap="selectDate" data-date="{{item}}">
+          {{item.date}}</view>
+      </view>
+    </view>
+  </view>
+</view>
+<view class="calendar_task" wx:if="{{before_show && closed}}" bindtap="closed"></view>

+ 129 - 0
compone/calendar/calendar.wxss

@@ -0,0 +1,129 @@
+@import "./icon/icon.wxss";
+
+.calendar_date{
+  width: 100%;
+  background-color: white;
+  padding-bottom: 3rpx;
+  margin-top: 40rpx;
+}
+.calendar_select_date{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  z-index: 100000 !important;
+  animation: transfer .4s linear;
+}
+@keyframes transfer{
+  0%{
+    transform: translateY(100%);
+  }
+  100%{
+    transform: translateY(0);
+  }
+}
+.calendar_unselect_date{
+  transition: all .4s ease;
+  transform: translateY(100%);
+}
+
+.selected_date{
+  width: 100%;
+  height: 56rpx;
+  padding-bottom: 16rpx;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  overflow: hidden;
+}
+.selected_date>view{
+  width: 29.5%;
+  display: flex;
+  justify-content: space-around;
+}
+.calendar_panel{
+  width: 100%;
+  height: calc(100% - 56rpx);
+}
+.calendar_panel_two{
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+}
+.calendar_box{
+  width: 100%;
+  background: #fff;
+  overflow: hidden;
+  display: flex;
+  height: calc(100% / 6);
+  align-items: center;
+}
+.weekday_label{
+  width: calc(100% / 7);
+  font-size: 27rpx;
+  padding: 12rpx 0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.weekday_label > view{
+  box-sizing: border-box;
+  padding: 20%;
+}
+
+.select_icon{
+  width: 30rpx;
+  height: 30rpx;
+}
+.active_date{
+  background: #FF874E;
+  border-radius: 8rpx;
+  /* 选中后的日期数字本身颜色 */
+  color: white;
+  font-weight: bold;
+  overflow: hidden;
+  position: relative;
+}
+/* .active_dates{
+  background: rgba(0,0,0,.1);
+  color: rgba(0,0,0,.5);
+  position: relative;
+} */
+/* .active_dates::before{
+  content: "今天";
+  position: absolute;
+  top: 3rpx;
+  left: 50%;
+  transform: translateX(-50%);
+  color: blue;
+  font-size: 18rpx;
+} */
+.actived_date{
+  overflow: hidden;
+  position: relative;
+}
+.actived_date::after{
+  content: attr(data-event);
+  position: absolute;
+  bottom: 7%;
+  left: 50%;
+  transform: translateX(-50%);
+  color: blue;
+  font-size: 16rpx;
+}
+.show_box{
+  padding: 20rpx;
+  font-size: 26rpx;
+}
+
+.calendar_task{
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 99999 !important;
+  background-color: rgba(0,0,0,.1);
+}

+ 30 - 0
compone/calendar/icon/icon.wxss

@@ -0,0 +1,30 @@
+@font-face {
+  font-family: "iconfont"; /* Project id 2680842 */
+  src: url('//at.alicdn.com/t/font_2680842_7rnppv91o07.woff2?t=1626450958908') format('woff2'),
+       url('//at.alicdn.com/t/font_2680842_7rnppv91o07.woff?t=1626450958908') format('woff'),
+       url('//at.alicdn.com/t/font_2680842_7rnppv91o07.ttf?t=1626450958908') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-shuangjiantou1:before {
+  content: "\e63c";
+}
+
+.icon-shuangjiantou2:before {
+  content: "\e63d";
+}
+
+.icon-shangyiyedanjiantou:before {
+  content: "\e712";
+}
+
+.icon-xiayiyedanjiantou:before {
+  content: "\e718";
+}

+ 47 - 0
compone/code-input/code-input.js

@@ -0,0 +1,47 @@
+Component({
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    focusIndex: 0, // 光标所在位置
+    value: '', // 实际输入的值
+    focus: true, // 是否获得焦点
+    password: '', //替换显示的值*
+  },
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    setValue(e) {
+      console.log(e);
+      // 设置光标
+      var value = e.detail.value
+      this.setData({
+        value: value,
+        focusIndex: value.length,
+        focus: value.length < 4,
+        password: '*'.repeat(value.length)
+      })
+    },
+    inputBlur(e) {
+      if (e.detail.value.length === 4) {
+        this.triggerEvent('complated', {
+          value: e.detail.value
+        })
+        console.log(this.data.value);
+        console.log('哈哈哈');
+        this.setData({
+          value: ''
+        })
+        let e = {
+          detail: {
+            value: ''
+          }
+        }
+        this.setValue(e)
+        console.log('呵呵呵');
+        console.log(this.data.value);
+      }
+    }
+  }
+})

+ 4 - 0
compone/code-input/code-input.json

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

+ 8 - 0
compone/code-input/code-input.wxml

@@ -0,0 +1,8 @@
+<!--compone/code-input/code-input.wxml-->
+<view class="input">
+  <view class="input-item" wx:for="{{4}}" wx:key="index" data-index="{{index}}">
+    <view class="input-value">{{password[index]}}</view>
+    <view class="focus {{index === focusIndex ? 'show': 'hide'}}"></view>
+  </view>
+  <input class="input-password" maxlength="4" bindinput="setValue" bindblur="inputBlur" type="number" focus="{{focus}}"></input>
+</view>

+ 61 - 0
compone/code-input/code-input.wxss

@@ -0,0 +1,61 @@
+/* compone/code-input/code-input.wxss */
+.input {
+  margin-top: 240rpx;
+  padding: 0 60rpx;
+  position: relative;
+  display: flex;
+  justify-content: space-between;
+}
+.input-item {
+  position: relative;
+  display: inline-block;
+  width: 90rpx;
+  height: 106rpx;
+  background-color: #FFFFFF;
+  border-radius: 12rpx;
+}
+/* .input-item:not(:first-child) {
+  margin-left: 26.67rpx;
+} */
+.input-value {
+  display: inline-block;
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%);
+  font-size: 28rpx;
+}
+.input-password {
+  position: absolute;
+  left: -360rpx;
+  top: 0;
+  height: 90rpx;
+  width: 880rpx;
+  opacity: 0;
+}
+.focus {
+  width: 2rpx;
+  height: 50rpx;
+  background-color: #333;
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%);
+}
+.show {
+  display: block;
+  animation: blink 1s linear infinite;
+}
+.hide {
+  display: none;
+}
+
+@keyframes blink {
+  0%, 50% {
+    opacity: 1;
+  }
+
+  50.01%, to {
+    opacity: 0;
+  }
+}

+ 143 - 0
compone/count-down/count-down.js

@@ -0,0 +1,143 @@
+/**
+ * 自定义倒计时
+ * endTime 结束的时间 默认单位为ms
+ * format dd-hh-mm-ss 时间格式
+ * endText  结束提示语
+ * countEnd 倒计时结束函数
+ */
+
+let timer = null,
+	intval = 1000;
+
+Component({
+	properties: {
+		// 是否为时间戳模式
+		isTimeStamp: {
+			type: Boolean,
+			defalute: false
+		},
+		// 倒计时结束时间
+		endTime: {
+			type: Number,
+			value: 60 * 1000
+		},
+		// 倒计时格式
+		format: {
+			type: String,
+			value: "{DD}:{HH}:{mm}:{ss}"
+		},
+		// 结束提示
+		endText: {
+			type: String,
+			value: "已结束"
+		},
+		//当前时间
+		currentTime: {
+			type: Number,
+			value: new Date().getTime()
+		}
+	},
+	// 样式
+	options:{
+		addGlobalClass:true,
+	},
+
+	data: {
+		result: "", //显示结果
+	},
+
+	lifetimes: {
+		ready(){
+			this.init();
+		},
+		detached() {
+			//组件销毁时清除定时器 防止爆栈
+			clearTimeout(timer);
+		},
+	},
+
+	methods: {
+		start(){
+			this.init();
+		},
+		// 时间格式处理
+		format(formatStr, time) {
+			// 使用正则体换格式
+			formatStr = formatStr.replace(/{DD}/, this.formatNumber(time.d)).
+			replace(/{HH}/, this.formatNumber(time.h)).
+			replace(/{mm}/, this.formatNumber(time.m)).
+			replace(/{ss}/, this.formatNumber(time.s)).
+			replace(/{D}/, time.d).
+			replace(/{H}/, time.h).
+			replace(/{m}/, time.m).
+			replace(/{s}/, time.s).
+			replace(/{S}/, time.S)
+			return formatStr;
+		},
+		defaultFormat(time) {
+			let daydiff = 24 * 60 * 60 * 1000;
+			let hoursdiff = 60 * 60 * 1000;
+			let minutesdiff = 60 * 1000;
+
+			let d = Math.floor(time / daydiff); //天数
+			let h = Math.floor((time - d * daydiff) / hoursdiff);
+			let m = Math.floor((time - d * daydiff - h * hoursdiff) / minutesdiff);
+			let s = Math.floor((time - d * daydiff - h * hoursdiff - m * minutesdiff) / 1000);
+
+			let S = time / 1000;
+
+			return {
+				d,
+				h,
+				m,
+				s,
+				S
+			}
+		},
+		//定时启动
+		init() {
+			timer = setTimeout(() => {
+				if (this.data.endTime < intval) {
+					console.log(123)
+					this.setData({
+						result: this.data.endText
+					})
+					clearTimeout(timer);
+					this.countEnd && this.countEnd()
+					return false;
+				}
+				let time = this.timeStamp();
+				let formTime = this.defaultFormat(time)
+				let res = this.format(this.data.format, formTime);
+				this.setData({
+					result: res
+				})
+				this.currentFn && this.currentFn(this.data.endTime)
+				this.data.endTime -= intval;
+				this.init();
+			}, intval)
+		},
+		// 时间戳处理
+		timeStamp() {
+			if (this.data.isTimeStamp) {
+				let endTime = this.data.endTime - this.data.currentTime;
+				return endTime;
+			}
+			return this.data.endTime;
+		},
+		// 倒计时结束处理函数
+		countEnd() {
+			this.triggerEvent("countEnd")
+		},
+		// 倒计时进行时函数
+		currentFn(time){
+			this.triggerEvent("currentFn",time)
+		},
+		// 补零操作
+		formatNumber(n) {
+			n = n.toString()
+			return n[1] ? n : `0${n}`
+		}
+	}
+
+})

+ 4 - 0
compone/count-down/count-down.json

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

+ 2 - 0
compone/count-down/count-down.wxml

@@ -0,0 +1,2 @@
+<!--compone/count-down/count-down.wxml-->
+<text>{{result}}</text>

+ 1 - 0
compone/count-down/count-down.wxss

@@ -0,0 +1 @@
+/* compone/count-down/count-down.wxss */

+ 156 - 0
compone/date-time-picker/date-time-picker.js

@@ -0,0 +1,156 @@
+// components/date-time-picker/date-time-picker.js
+const leftPad0 = function(v, n) {
+  if (!v) {
+    v = "";
+  }
+  let prefix = "";
+  for (let i = 0; i < n; i++) {
+    prefix += "0";
+  }
+  return (prefix + v).substr(-n);
+};
+const stringToDate = function(str) {
+  str = str.replace(/-/g, "/");
+  return new Date(str);
+};
+const isLeapYear = function(year) {
+  if (((year % 4) == 0) && ((year % 100) != 0) || ((year % 400) == 0)) {
+    return true;
+  }
+  return false;
+};
+const now = new Date();
+const years = [];
+const beginYear = 2020;
+for (var i = beginYear; i <= (now.getFullYear() + 10); i++) {
+  years.push(i + "年");
+}
+const months = [];
+for (var i = 0; i < 12; i++) {
+  months.push(leftPad0(i + 1, 2) + "月");
+}
+const days = [];
+for (var i = 0; i < 31; i++) {
+  days.push(leftPad0(i + 1, 2) + "日");
+}
+const hours = [];
+for (var i = 0; i < 24; i++) {
+  hours.push(leftPad0(i, 2) + "时");
+}
+const minutes = [];
+for (var i = 0; i < 60; i++) {
+  minutes.push(leftPad0(i, 2) + "分");
+}
+// const seconds = [];
+// for (var i = 0; i < 60; i++) {
+//   seconds.push(leftPad0(i, 2) + "秒");
+// }
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    value: String,
+    dateValue: {
+      type: Date
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    // valueArray: [0, 0, 0, 0, 0, 0],
+    valueArray: [0, 0, 0, 0, 0],
+    rangeValues: [
+      years,
+      months,
+      days,
+      hours,
+      minutes,
+      // seconds
+    ],
+    pickerYear: beginYear,
+    pickerMonth: 1
+  },
+  observers: {
+    value: function(v) {
+      this.setData({
+        valueArray: this._dateToValueArray(stringToDate(v))
+      })
+    },
+    dateValue: function(date) {
+      this.setData({
+        valueArray: this._dateToValueArray(date)
+      })
+    },
+    valueArray: function(v) {
+      this._settMonthDays(v[0] + beginYear, v[1] + 1);
+    }
+  },
+/**
+   * 组件的方法列表
+   */
+  methods: {
+    _dateToValueArray(date) {
+      // return [date.getFullYear() - beginYear, date.getMonth(), date.getDate() - 1, date.getHours(), date.getMinutes(), date.getSeconds()];
+      return [date.getFullYear() - beginYear, date.getMonth(), date.getDate() - 1, date.getHours(), date.getMinutes()];
+    },
+    _settMonthDays(year, month) {
+      let monthDays = 31;
+      switch (month) {
+        case 2:
+          monthDays = 28;
+          if (isLeapYear(year)) {
+            monthDays = 29;
+          }
+          break;
+        case 4:
+        case 6:
+        case 9:
+        case 11:
+          monthDays = 30;
+          break;
+      }
+      let days = [];
+      for (let i = 0; i < monthDays; i++) {
+        days.push(leftPad0(i + 1, 2) + "日");
+      }
+      this.setData({
+        pickerYear: year,
+        pickerMonth: month,
+        "rangeValues[2]": days
+      });
+    },
+    handleCancel(e) {
+      this.setData({
+        valueArray: this.data.valueArray
+      })
+    },
+    handleColumnChange(e) {
+      if (e.detail.column > 1) return false;
+      let year = this.data.pickerYear;
+      let month = this.data.pickerMonth;
+      if (e.detail.column == 0) {
+        year = e.detail.value + beginYear;
+      } else if (e.detail.column == 1) {
+        month = e.detail.value + 1;
+      }
+      this._settMonthDays(year, month);
+    },
+    handleValueChange(e) {
+      let dateArr = [];
+      for (let i in e.detail.value) {
+        let v = this.data.rangeValues[i][e.detail.value[i]];
+        dateArr.push(v.toString().substr(0, v.length - 1))
+      }
+      // let dateString = dateArr[0] + "-" + dateArr[1] + "-" + dateArr[2] + " " + dateArr[3] + ":" + dateArr[4] + ":" + dateArr[5];
+      let dateString = dateArr[0] + "-" + dateArr[1] + "-" + dateArr[2] + " " + dateArr[3] + ":" + dateArr[4];
+      this.triggerEvent('change', {
+        date: stringToDate(dateString),
+        dateString
+      })
+    }
+  }
+})

+ 4 - 0
compone/date-time-picker/date-time-picker.json

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

+ 0 - 0
compone/date-time-picker/date-time-picker.less


+ 4 - 0
compone/date-time-picker/date-time-picker.wxml

@@ -0,0 +1,4 @@
+<!--components/date-time-picker/date-time-picker.wxml-->
+<picker mode="multiSelector" value="{{valueArray}}" range="{{rangeValues}}" bindcolumnchange="handleColumnChange" bindchange="handleValueChange" bindcancel="handleCancel">
+  <slot></slot>
+</picker>

+ 0 - 0
compone/date-time-picker/date-time-picker.wxss


+ 34 - 0
compone/group-title/group-titlle.js

@@ -0,0 +1,34 @@
+// compone/group-titlle.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    title: {
+      type: String,
+      value: '分组名称'
+    }, //分组标题
+    backgroundColor: {
+      type: String,
+      value: ''
+    }, //分组背景色
+    height: {
+      type: String,
+      value: '44rpx'
+    }, //分组高度
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
compone/group-title/group-titlle.json

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

+ 6 - 0
compone/group-title/group-titlle.wxml

@@ -0,0 +1,6 @@
+<!--compone/group-titlle.wxml-->
+<view class="group-title" style="background-color: {{backgroundColor}};height: {{height}};">
+  <image src="/images/line.png"></image>
+  <p>{{title}}</p>
+  <!-- <text>C$ 18 ~ C$ 21</text> -->
+</view>

+ 16 - 0
compone/group-title/group-titlle.wxss

@@ -0,0 +1,16 @@
+/* compone/group-titlle.wxss */
+.group-title{
+  width: 100%;
+  display: flex;
+  align-items: center;
+  color: #464646;
+  font-size: 32rpx;
+  font-weight: 600;
+}
+.group-title>p{
+  margin-left: 20rpx;
+}
+.group-title>image{
+  width: 6rpx;
+  height: 20rpx;
+}

+ 21 - 5
compone/navbar/navbar.js

@@ -1,10 +1,18 @@
 const app = getApp()
 const app = getApp()
 Component({
 Component({
   properties: {
   properties: {
-    navbarData: {   //navbarData   由父页面传递的数据,变量名字自命名
+    navbarData: { //navbarData   由父页面传递的数据,变量名字自命名
       type: Object,
       type: Object,
       value: {},
       value: {},
       observer: function (newVal, oldVal) {}
       observer: function (newVal, oldVal) {}
+    },
+    backgroundColor: {
+      type: String,
+      value: '#F7F7F7'
+    },
+    fontColor: {
+      type: String,
+      value: '#2c2b2b'
     }
     }
   },
   },
   data: {
   data: {
@@ -25,11 +33,19 @@ Component({
     })
     })
   },
   },
   methods: {
   methods: {
-  // 返回上一页面
+    // 返回上一页面
     _navback() {
     _navback() {
-      wx.navigateBack()
+      wx.navigateBack({
+        delta: 1,
+        fail(err) {
+          console.log(err);
+          wx.switchTab({
+            url: '/pages/index/index',
+          })
+        }
+      })
     },
     },
-  //返回到首页
+    //返回到首页
     _backhome() {
     _backhome() {
       wx.switchTab({
       wx.switchTab({
         url: '/pages/index/index',
         url: '/pages/index/index',
@@ -37,4 +53,4 @@ Component({
     }
     }
   }
   }
 
 
-}) 
+})

+ 2 - 2
compone/navbar/navbar.wxml

@@ -1,5 +1,5 @@
 <!--compone/navbar/navbar.wxml-->
 <!--compone/navbar/navbar.wxml-->
-<view class='nav-wrap' style='height: {{height*2 + 20}}px;'>
+<view class='nav-wrap' style='height: {{height*2 + 20}}px;background-color: {{backgroundColor}};color: {{fontColor}};'>
   <view class='nav-title' style='line-height: {{height*2 + 44}}px;'>{{navbarData.title}}</view>
   <view class='nav-title' style='line-height: {{height*2 + 44}}px;'>{{navbarData.title}}</view>
   <view style='display: flex; justify-content: space-around;flex-direction: column'>
   <view style='display: flex; justify-content: space-around;flex-direction: column'>
     <view class='nav-capsule' style='height: {{height*2 + 22}}px;' wx:if='{{navbarData.showCapsule}}'>
     <view class='nav-capsule' style='height: {{height*2 + 22}}px;' wx:if='{{navbarData.showCapsule}}'>
@@ -9,4 +9,4 @@
     </view>
     </view>
   </view>
   </view>
 </view>
 </view>
-<view style="height: {{height*2 + 21}}px;width: 100%;"></view>
+<view style="height: {{height*2 + 21}}px;width: 100%;"></view>

+ 3 - 3
compone/navbar/navbar.wxss

@@ -3,8 +3,8 @@
   position: fixed;
   position: fixed;
   width: 100%;
   width: 100%;
   top: 0;
   top: 0;
-  background: #F7F7F7;
-  color: #000;
+  /* background: #F7F7F7;
+  color: #000; */
   z-index: 999;
   z-index: 999;
 }
 }
 /* 标题要居中 */
 /* 标题要居中 */
@@ -21,7 +21,7 @@
   bottom: 0;
   bottom: 0;
   margin: auto;
   margin: auto;
   font-size: 32rpx;
   font-size: 32rpx;
-  color: #2c2b2b;
+  /* color: #2c2b2b; */
   font-weight: 600;
   font-weight: 600;
 }
 }
 
 

+ 4 - 0
compone/order-card/order-card.js

@@ -8,6 +8,10 @@ Component({
       type: Object,
       type: Object,
       value: {},
       value: {},
       observer: function (newVal, oldVal) {}
       observer: function (newVal, oldVal) {}
+    },
+    width:{
+      type: Number,
+      value: 710
     }
     }
   },
   },
 
 

+ 62 - 50
compone/order-card/order-card.wxml

@@ -1,53 +1,65 @@
 <!--compone/order-card/order-card.wxml-->
 <!--compone/order-card/order-card.wxml-->
-<view class="lately" wx:if="{{cardData.goods.length != 1}}">
-  <view class="late-body">
-    <view class="late-title">{{cardData.title}}</view>
-    <view class="late-progress">
-      <van-progress percentage="{{cardData.plan}}" inactive="{{cardData.statu == 0}}" stroke-width="8" show-pivot="{{false}}" color="#FF874E" track-color="#FF874E70" />
-    </view>
-    <view class="late-time" style="color: {{cardData.statu == 0?'#989898':''}};">
-      {{cardData.time}}
-    </view>
-    <view class="late-content">
-      <view class="late-c-b">
-        <van-image round width="50rpx" style="margin-top: 8rpx;" fit="cover" height="50rpx" src="https://img.yzcdn.cn/vant/cat.jpeg" />
-        <p>阿萍子</p>
-      </view>
-      <p class="late-c-p" wx:if="{{cardData.statu == 1}}">拼团中</p>
-      <p class="late-c-p" wx:else style="color: #989898;">已截团</p>
-    </view>
-    <view class="late-items">
-      <scroll-view class="late-scroll" scroll-x="true">
-        <van-image width="70" height="70" src="{{items}}" wx:for="{{cardData.goods}}" wx:key="{{index}}" wx:for-item="items" class="late-img" wx:key="indexs" />
-      </scroll-view>
-      <view class="late-num">
-        <p>共{{cardData.goods.length}}件</p>
-        <image src="/images/go.png"></image>
-      </view>
-    </view>
-  </view>
+<!-- 商品数量不为1 -->
+<view class="lately" style="width: {{width + 'rpx'}};" wx:if="{{cardData.commodity_list.length != 1}}">
+	<view class="late-body">
+		<!-- 拼团名称 -->
+		<view class="late-title">{{cardData.gang_name}}</view>
+		<!-- 进度条 -->
+		<view class="late-progress">
+			<van-progress percentage="{{cardData.speed_progress}}" inactive="{{cardData.gang_status == 0}}" stroke-width="8" show-pivot="{{false}}" color="#FF874E" track-color="#FF874E70" />
+		</view>
+		<!-- 倒计时 -->
+		<view class="late-time" style="color: {{cardData.gang_status == 0?'#989898':''}};">
+			倒计时 {{cardData.count_down}}
+		</view>
+		<!-- 用户信息 -->
+		<view class="late-content">
+			<view class="late-c-b">
+				<van-image round width="50rpx" style="margin-top: 8rpx;" fit="cover" height="50rpx" src="{{cardData.headimg}}" />
+				<p>{{cardData.name}}</p>
+			</view>
+			<p class="late-c-p" wx:if="{{cardData.gang_status == 1}}">拼团中</p>
+			<p class="late-c-p" wx:else style="color: #989898;">已截团</p>
+		</view>
+		<!-- 商品图片 -->
+		<view class="late-items">
+			<scroll-view class="late-scroll" scroll-x="true">
+				<van-image radius="10" width="70" height="70" src="{{items.commodity_img}}" wx:for="{{cardData.commodity_list}}" wx:key="{{index}}" wx:for-item="items" class="late-img" wx:key="indexs" />
+			</scroll-view>
+			<view class="late-num">
+				<p>共{{cardData.commodity_number}}件</p>
+				<image src="/images/go.png"></image>
+			</view>
+		</view>
+	</view>
 </view>
 </view>
-<view class="lately-1" wx:if="{{cardData.goods.length == 1}}">
-  <view class="late1-body">
-    <van-image width="115" height="115" src="https://img.alicdn.com/imgextra/i3/103680052/O1CN01DyoqTe1CFrKNUj4Gj_!!0-saturn_solar.jpg_270x270.jpg" />
-    <view class="late1-cont">
-      <view class="late1-title">
-        {{cardData.title}}
-      </view>
-      <view class="late1-progress">
-        <van-progress percentage="{{cardData.plan}}" stroke-width="8" show-pivot="{{false}}" color="#FF874E" track-color="#FF874E70" />
-      </view>
-      <view class="late1-time" style="color: {{cardData.statu == 0?'#989898':''}};">
-        {{cardData.time}}
-      </view>
-      <view class="late1-content">
-        <view class="late1-c-b">
-          <van-image round width="50rpx" style="margin-top: 8rpx;" fit="cover" height="50rpx" src="https://img.yzcdn.cn/vant/cat.jpeg" />
-          <p>阿萍子</p>
-        </view>
-        <p class="late1-c-p" wx:if="{{cardData.statu == 1}}">拼团中</p>
-        <p class="late1-c-p" wx:else style="color: #989898;">已截团</p>
-      </view>
-    </view>
-  </view>
+<!-- 商品数量为1 -->
+<view class="lately-1" style="width: {{width + 'rpx'}};" wx:if="{{cardData.commodity_list.length == 1}}">
+	<view class="late1-body">
+		<!-- 商品图片 -->
+		<van-image radius="10" width="115" height="115" src="{{cardData.commodity_list[0].commodity_img}}" />
+		<view class="late1-cont">
+    <!-- 拼团名称 -->
+			<view class="late1-title">
+				{{cardData.gang_name}}
+			</view>
+      <!-- 进度条 -->
+			<view class="late1-progress">
+				<van-progress percentage="{{cardData.speed_progress}}" inactive="{{cardData.gang_status == 0}}" stroke-width="8" show-pivot="{{false}}" color="#FF874E" track-color="#FF874E70" />
+			</view>
+      <!-- 倒计时 -->
+			<view class="late1-time" style="color: {{cardData.gang_status == 0?'#989898':''}};">
+				{{cardData.count_down}}
+			</view>
+      <!-- 用户信息 -->
+			<view class="late1-content">
+				<view class="late1-c-b">
+					<van-image round width="50rpx" style="margin-top: 8rpx;" fit="cover" height="50rpx" src="{{cardData.headimg}}" />
+					<p>{{cardData.name}}</p>
+				</view>
+				<p class="late1-c-p" wx:if="{{cardData.gang_status == 1}}">拼团中</p>
+				<p class="late1-c-p" wx:else style="color: #989898;">已截团</p>
+			</view>
+		</view>
+	</view>
 </view>
 </view>

+ 6 - 4
compone/order-card/order-card.wxss

@@ -1,6 +1,6 @@
 /* compone/order-card/order-card.wxss */
 /* compone/order-card/order-card.wxss */
 .lately{
 .lately{
-  width: 710rpx;
+  /* width: 710rpx; */
   margin-top: 20rpx;
   margin-top: 20rpx;
   height: 414rpx;
   height: 414rpx;
   background-color: white;
   background-color: white;
@@ -62,7 +62,7 @@
   justify-content: space-between;
   justify-content: space-between;
 }
 }
 .late-items{
 .late-items{
-  height: 130rpx;
+  /* height: 130rpx; */
   width: 100%;
   width: 100%;
   margin-top: -20rpx;
   margin-top: -20rpx;
   display: flex;
   display: flex;
@@ -72,7 +72,7 @@
 .late-scroll{
 .late-scroll{
   display: flex;
   display: flex;
   width: 82%;
   width: 82%;
-  height: 100%;
+  /* height: 100%; */
   white-space: nowrap;
   white-space: nowrap;
 }
 }
 .late-scroll .van-image image{
 .late-scroll .van-image image{
@@ -86,7 +86,8 @@
   width: 100rpx;
   width: 100rpx;
   height: 100%;
   height: 100%;
   align-items: center;
   align-items: center;
-  font-size: 30rpx;
+  /* font-size: 30rpx; */
+  font-size: 24rpx;
   color: #656565;
   color: #656565;
 }
 }
 .late-num image{
 .late-num image{
@@ -125,6 +126,7 @@
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   justify-content: space-between;
   justify-content: space-between;
+  margin-left: 26rpx;
 }
 }
 .late1-title{
 .late1-title{
   font-size: 28rpx;
   font-size: 28rpx;

+ 11 - 1
compone/order/order.js

@@ -22,6 +22,16 @@ Component({
    * 组件的方法列表
    * 组件的方法列表
    */
    */
   methods: {
   methods: {
-
+    callHead() {
+      let that = this;
+      wx.makePhoneCall({
+        phoneNumber: that.properties.orderData.user_info.phone
+      })
+    },
+    shareOrder() {
+      this.triggerEvent('share', {
+        value: this.properties.orderData.id
+      })
+    }
   }
   }
 })
 })

+ 44 - 29
compone/order/order.wxml

@@ -1,89 +1,104 @@
-<view class="orders-one" wx:if="{{orderData.goods.length>1}}">
+<!-- 商品数量不为1 -->
+<view class="orders-one" wx:if="{{orderData.commodity.length>1}}">
   <view class="o-one">
   <view class="o-one">
     <view class="orders-top">
     <view class="orders-top">
       <view class="o-top-left">
       <view class="o-top-left">
-        <van-image round width="60rpx" style="margin-top: 8rpx;" fit="cover" height="60rpx" src="https://img.yzcdn.cn/vant/cat.jpeg" />
+        <van-image round width="60rpx" style="margin-top: 8rpx;" fit="cover" height="60rpx" src="{{orderData.user_info.headimg}}" />
         <view class="o-top-left-name">
         <view class="o-top-left-name">
-          <p style="color: #3F3F3F; font-size: 24rpx;font-weight: 600;">阿萍子</p>
-          <p style="color:#878787; font-size:20rpx;">2021-09-21 19:30</p>
+          <p style="color: #3F3F3F; font-size: 24rpx;font-weight: 600;">{{orderData.user_info.name}}</p>
+          <p style="color:#878787; font-size:20rpx;">{{orderData.create_time}}</p>
         </view>
         </view>
       </view>
       </view>
       <view class="o-top-right">
       <view class="o-top-right">
-        <image wx:if="{{orderData.statu == 1}}" src="/images/erweima.png"></image>
-        <p style="font-size: 28rpx;color: #FF874E;">{{orderData.statu==1?'待收货':'待付款'}}</p>
+        <image wx:if="{{orderData.order_status == 1}}" src="/images/erweima.png"></image>
+        <p wx:if="{{orderData.order_status === 0}}" style="font-size: 28rpx;color: #FF874E;">待支付</p>
+        <p wx:if="{{orderData.order_status === 1}}" style="font-size: 28rpx;color: #FF874E;">待取货</p>
+        <p wx:if="{{orderData.order_status === 2}}" style="font-size: 28rpx;color: #FF874E;">交易完成</p>
+        <p wx:if="{{orderData.order_status === 3}}" style="font-size: 28rpx;color: #FF874E;">已取消</p>
+        <p wx:if="{{orderData.order_status === 4}}" style="font-size: 28rpx;color: #FF874E;">申请退款</p>
+        <p wx:if="{{orderData.order_status === 5}}" style="font-size: 28rpx;color: #FF874E;">退款成功</p>
       </view>
       </view>
     </view>
     </view>
     <view class="orders-body">
     <view class="orders-body">
       <view class="o-body-scroll">
       <view class="o-body-scroll">
         <scroll-view scroll-x="true" class="o-body-scrolls">
         <scroll-view scroll-x="true" class="o-body-scrolls">
-          <van-image width="77" class="o-b-s-img" height="77" wx:for="{{orderData.goods}}" wx:key="index" src="{{item.img}}" />
+          <van-image width="77" class="o-b-s-img" height="77" wx:for="{{orderData.commodity}}" wx:key="index" src="{{item.commodity_img}}" />
         </scroll-view>
         </scroll-view>
         <view class="o-body-go">
         <view class="o-body-go">
-          共{{orderData.goods.length}}件<image src="/images/go.png"></image>
+          共{{orderData.commodity.length}}件<image src="/images/go.png"></image>
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>
     <view class="orders-price">
     <view class="orders-price">
       <p class="o-p-he">合计: </p>
       <p class="o-p-he">合计: </p>
       <p class="o-p-bi">C$ </p>
       <p class="o-p-bi">C$ </p>
-      <p class="o-p-ge">24.4</p>
+      <p class="o-p-ge">{{orderData.payment_amount}}</p>
     </view>
     </view>
     <view class="orders-foot">
     <view class="orders-foot">
-      <button class="orders-share">
+      <button class="orders-share" open-type="share" catchtap="shareOrder">
         <image src="/images/share.png"></image>
         <image src="/images/share.png"></image>
         分享
         分享
       </button>
       </button>
       <view class="orders-right">
       <view class="orders-right">
-        <button class="orders-rel">联系团长</button>
-        <button class="orders-pay" wx:if="{{orderData.statu!=1}}">立即支付</button>
+        <button class="orders-pay" wx:if="{{orderData.order_status === 0}}">立即支付</button>
+        <button class="orders-rel" catchtap="callHead">联系团长</button>
       </view>
       </view>
     </view>
     </view>
   </view>
   </view>
 </view>
 </view>
+<!-- 商品数量为1 -->
 <view class="order" wx:else>
 <view class="order" wx:else>
   <view class="o-one">
   <view class="o-one">
     <view class="orders-top">
     <view class="orders-top">
       <view class="o-top-left">
       <view class="o-top-left">
-        <van-image round width="60rpx" style="margin-top: 8rpx;" fit="cover" height="60rpx" src="https://img.yzcdn.cn/vant/cat.jpeg" />
+        <van-image round width="60rpx" style="margin-top: 8rpx;" fit="cover" height="60rpx" src="{{orderData.user_info.headimg}}" />
         <view class="o-top-left-name">
         <view class="o-top-left-name">
-          <p style="color: #3F3F3F; font-size: 24rpx;font-weight: 600;">阿萍子</p>
-          <p style="color:#878787; font-size:20rpx;">2021-09-21 19:30</p>
+          <p style="color: #3F3F3F; font-size: 24rpx;font-weight: 600;">{{orderData.user_info.name}}</p>
+          <p style="color:#878787; font-size:20rpx;">{{orderData.create_time}}</p>
         </view>
         </view>
       </view>
       </view>
       <view class="o-top-right">
       <view class="o-top-right">
-        <image src="/images/erweima.png" wx:if="{{orderData.statu==1}}"></image>
-        <p style="font-size: 28rpx;color: #FF874E;">{{orderData.statu==1?'待收货':'待付款'}}</p>
+        <image wx:if="{{orderData.order_status == 1}}" src="/images/erweima.png"></image>
+        <p wx:if="{{orderData.order_status === 0}}" style="font-size: 28rpx;color: #FF874E;">待支付</p>
+        <p wx:if="{{orderData.order_status === 1}}" style="font-size: 28rpx;color: #FF874E;">待取货</p>
+        <p wx:if="{{orderData.order_status === 2}}" style="font-size: 28rpx;color: #FF874E;">交易完成</p>
+        <p wx:if="{{orderData.order_status === 3}}" style="font-size: 28rpx;color: #FF874E;">已取消</p>
+        <p wx:if="{{orderData.order_status === 4}}" style="font-size: 28rpx;color: #FF874E;">申请退款</p>
+        <p wx:if="{{orderData.order_status === 5}}" style="font-size: 28rpx;color: #FF874E;">退款成功</p>
       </view>
       </view>
     </view>
     </view>
     <view class="order-body">
     <view class="order-body">
-      <van-image width="76" class="o-b-s-img" height="76" src="{{orderData.goods[0].img}}" />
+      <van-image radius="10" width="76" class="o-b-s-img" height="76" src="{{orderData.commodity[0].commodity_img}}" />
       <view class="order-title">
       <view class="order-title">
         <view class="titinfo">
         <view class="titinfo">
-          <p>{{orderData.goods[0].name}}</p>
-          <p>C$ 12.2</p>
+          <p>{{orderData.commodity[0].commodity_name}}</p>
+          <p>C${{orderData.commodity[0].price}}</p>
         </view>
         </view>
         <view class="guiinfo">
         <view class="guiinfo">
-          <view>
-            <p class="guige">规格:500 </p>
-            <p>g/份</p>
+          <view wx:if="{{orderData.commodity[0].specifications}}">
+            <p class="guige">规格:{{orderData.commodity[0].specifications[0].title}}</p>
+            <p>/份</p>
           </view>
           </view>
-          <p>共2份</p>
+          <view wx:else>
+            <p>暂无规格</p>
+          </view>
+          <p>共{{orderData.commodity.length}}份</p>
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>
     <view class="orders-price">
     <view class="orders-price">
       <p class="o-p-he">合计: </p>
       <p class="o-p-he">合计: </p>
       <p class="o-p-bi">C$ </p>
       <p class="o-p-bi">C$ </p>
-      <p class="o-p-ge">24.4</p>
+      <p class="o-p-ge">{{orderData.payment_amount}}</p>
     </view>
     </view>
     <view class="orders-foot">
     <view class="orders-foot">
-      <button class="orders-share">
+      <view class="orders-share" catchtap="shareOrder">
         <image src="/images/share.png"></image>
         <image src="/images/share.png"></image>
         分享
         分享
-      </button>
+      </view>
       <view class="orders-right">
       <view class="orders-right">
-        <button class="orders-rel">联系团长</button>
-        <button class="orders-pay" wx:if="{{orderData.statu!=1}}">立即支付</button>
+        <button class="orders-pay" wx:if="{{orderData.order_status === 0}}">立即支付</button>
+        <button class="orders-rel" catchtap="callHead">联系团长</button>
       </view>
       </view>
     </view>
     </view>
   </view>
   </view>

+ 3 - 0
compone/order/order.wxss

@@ -2,6 +2,7 @@
 .orders-one{
 .orders-one{
   width: 710rpx;
   width: 710rpx;
   height: 412rpx;
   height: 412rpx;
+  padding: 15rpx 0;
   margin-bottom: 30rpx;
   margin-bottom: 30rpx;
   background-color: white;
   background-color: white;
   box-shadow: 0px 0px 4px #d1d1d1;
   box-shadow: 0px 0px 4px #d1d1d1;
@@ -101,6 +102,7 @@
   border: 1px solid #D6D6D6;
   border: 1px solid #D6D6D6;
   align-items: center;
   align-items: center;
   margin-left: 1rpx;
   margin-left: 1rpx;
+  justify-content: center;
 }
 }
 .orders-share image{
 .orders-share image{
   width: 24rpx;
   width: 24rpx;
@@ -123,6 +125,7 @@
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
   align-items: center;
   align-items: center;
+  justify-content: space-between;
 }
 }
 .orders-right{
 .orders-right{
   width: 55%;
   width: 55%;

+ 31 - 0
compone/order2/order2.js

@@ -0,0 +1,31 @@
+// compone/order/order.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    orderData:{
+      type: Object,
+      value: {},
+      observer: function (newVal, oldVal) {}
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    OrderData:{}
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    // 更新状态
+    updateStatus() {
+      let id = this.properties.orderData.id;
+      this.triggerEvent('update', {id: id})
+    }
+  }
+})

+ 6 - 0
compone/order2/order2.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-image": "@vant/weapp/image/index"
+  }
+}

+ 89 - 0
compone/order2/order2.wxml

@@ -0,0 +1,89 @@
+<!-- 商品数量不为1 -->
+<view class="orders-one" wx:if="{{orderData.commodity_list.length>1}}">
+  <view class="o-one">
+    <view class="orders-top">
+      <view class="o-top-left">
+        <van-image round width="60rpx" style="margin-top: 8rpx;" fit="cover" height="60rpx" src="{{orderData.user_info.headimg}}" />
+        <view class="o-top-left-name">
+          <p style="color: #3F3F3F; font-size: 24rpx;font-weight: 600;">{{orderData.user_info.name}}</p>
+          <p style="color:#878787; font-size:20rpx;">{{orderData.create_time}}</p>
+        </view>
+      </view>
+      <view class="o-top-right">
+        <p wx:if="{{orderData.order_status === 0}}" style="font-size: 28rpx;color: #FF874E;">待支付</p>
+        <p wx:if="{{orderData.order_status === 1}}" style="font-size: 28rpx;color: #FF874E;">待取货</p>
+        <p wx:if="{{orderData.order_status === 2}}" style="font-size: 28rpx;color: #FF874E;">交易完成</p>
+        <p wx:if="{{orderData.order_status === 3}}" style="font-size: 28rpx;color: #FF874E;">已取消</p>
+        <p wx:if="{{orderData.order_status === 4}}" style="font-size: 28rpx;color: #FF874E;">申请退款</p>
+        <p wx:if="{{orderData.order_status === 5}}" style="font-size: 28rpx;color: #FF874E;">退款失败</p>
+        <p wx:if="{{orderData.order_status === 6}}" style="font-size: 28rpx;color: #FF874E;">退款成功</p>
+      </view>
+    </view>
+    <view class="orders-body">
+      <view class="o-body-scroll">
+        <scroll-view scroll-x="true" class="o-body-scrolls">
+          <van-image width="77" class="o-b-s-img" height="77" wx:for="{{orderData.commodity_list}}" wx:key="index" src="{{item.commodity_img}}" />
+        </scroll-view>
+        <view class="o-body-go">
+          共{{orderData.commodity_number}}件<image src="/images/go.png"></image>
+        </view>
+      </view>
+    </view>
+    <view class="orders-price">
+      <p class="o-p-he">合计: </p>
+      <p class="o-p-bi">C$ </p>
+      <p class="o-p-ge">{{orderData.payment_amount}}</p>
+      <view style="flex: 1;"></view>
+      <view class="bottom_btn" catchtap="updateStatus" wx:if="{{orderData.order_status === 0 || orderData.order_status === 1}}">更新状态</view>
+    </view>
+  </view>
+</view>
+<!-- 商品数量为1 -->
+<view class="order" wx:else>
+  <view class="o-one">
+    <view class="orders-top">
+      <view class="o-top-left">
+        <van-image round width="60rpx" style="margin-top: 8rpx;" fit="cover" height="60rpx" src="{{orderData.user_info.headimg}}" />
+        <view class="o-top-left-name">
+          <p style="color: #3F3F3F; font-size: 24rpx;font-weight: 600;">{{orderData.user_info.name}}</p>
+          <p style="color:#878787; font-size:20rpx;">{{orderData.create_time}}</p>
+        </view>
+      </view>
+      <view class="o-top-right">
+        <p wx:if="{{orderData.order_status === 0}}" style="font-size: 28rpx;color: #FF874E;">待支付</p>
+        <p wx:if="{{orderData.order_status === 1}}" style="font-size: 28rpx;color: #FF874E;">待取货</p>
+        <p wx:if="{{orderData.order_status === 2}}" style="font-size: 28rpx;color: #FF874E;">交易完成</p>
+        <p wx:if="{{orderData.order_status === 3}}" style="font-size: 28rpx;color: #FF874E;">已取消</p>
+        <p wx:if="{{orderData.order_status === 4}}" style="font-size: 28rpx;color: #FF874E;">申请退款</p>
+        <p wx:if="{{orderData.order_status === 5}}" style="font-size: 28rpx;color: #FF874E;">退款失败</p>
+        <p wx:if="{{orderData.order_status === 6}}" style="font-size: 28rpx;color: #FF874E;">退款成功</p>
+      </view>
+    </view>
+    <view class="order-body">
+      <van-image radius="10" width="76" class="o-b-s-img" height="76" src="{{orderData.commodity_list[0].commodity_img}}" />
+      <view class="order-title">
+        <view class="titinfo">
+          <p>{{orderData.commodity_list[0].commodity_name}}</p>
+          <p>C${{orderData.commodity_list[0].price}}</p>
+        </view>
+        <view class="guiinfo">
+          <view wx:if="{{orderData.commodity_list[0].specifications}}">
+            <p class="guige">规格:{{orderData.commodity_list[0].specifications[0].title}}</p>
+            <p>/份</p>
+          </view>
+          <view wx:else>
+            <p>暂无规格</p>
+          </view>
+          <p>共{{orderData.commodity_number}}份</p>
+        </view>
+      </view>
+    </view>
+    <view class="orders-price">
+      <p class="o-p-he">合计: </p>
+      <p class="o-p-bi">C$ </p>
+      <p class="o-p-ge">{{orderData.payment_amount}}</p>
+      <view style="flex: 1;"></view>
+      <view class="bottom_btn" catchtap="updateStatus" wx:if="{{orderData.order_status === 0 || orderData.order_status === 1}}">更新状态</view>
+    </view>
+  </view>
+</view>

+ 233 - 0
compone/order2/order2.wxss

@@ -0,0 +1,233 @@
+/* compone/order/order.wxss */
+.orders-one{
+  width: 710rpx;
+  height: 412rpx;
+  padding: 15rpx 0;
+  margin-bottom: 30rpx;
+  background-color: white;
+  box-shadow: 0px 0px 4px #d1d1d1;
+  border-radius: 20rpx;
+  display: flex;
+  justify-content: center;
+}
+.o-one{
+  width: 94%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+}
+.orders-top{
+  height: 60rpx;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.o-top-right{
+  display: flex;
+  height: 100%;
+  flex-direction: row;
+  align-items: center;
+}
+.o-top-right image{
+  width: 36rpx;
+  margin-right: 20rpx;
+  height: 36rpx;
+}
+.o-one .o-body-scroll image{
+  border-radius: 10rpx;
+}
+.o-one .o-body-scroll{
+  display: flex;
+  height: 100%;
+}
+.o-top-left{
+  display: flex;
+}
+.o-one .o-body-scrolls{
+  display: flex;
+  width: 82%;
+  height: 100%;
+  white-space: nowrap;
+}
+.o-top-left-name{
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  margin-left: 20rpx;
+}
+.o-one .o-body-go{
+  font-size: 24rpx;
+  color: #656565;
+  height: 100%;
+  display: flex;
+  width: 150rpx;
+  justify-content: center;
+  align-items: center;
+}
+.o-one .o-body-go image{
+  width: 18rpx;
+  height: 24rpx;
+  margin-left: 5rpx;
+}
+.o-one .orders-price{
+  display: flex;
+  align-items: flex-end;
+}
+.o-one .o-p-he{
+  font-size: 24rpx;
+  color: #3F3F3F;
+}
+.o-one .o-p-bi{
+  color: #3F3F3F;
+  font-size: 28rpx;
+  font-weight: 600;
+}
+.o-one .o-p-ge{
+  font-size: 40rpx;
+  color: #3F3F3F;
+  margin-bottom: -7rpx;
+  margin-left: 10rpx;
+  font-weight: 600;
+}
+.orders-share{
+  background-color: white;
+  width: 138rpx;
+  height: 56rpx;
+  font-size: 24rpx;
+  display: flex;
+  color: #989898;
+  border-radius: 40rpx;
+  border: 1px solid #D6D6D6;
+  align-items: center;
+  margin-left: 1rpx;
+  justify-content: center;
+}
+.orders-share image{
+  width: 24rpx;
+  height: 24rpx;
+}
+.o-b-s-img:not(:first-child) {
+  margin-left: 18rpx;
+}
+.o-one .orders-body{
+  height: 140rpx;
+  width: 100%;
+}
+.o-one .orders-price{
+  height: 60rpx;
+  width: 100%;
+}
+.o-one .orders-foot{
+  height: 60rpx;
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
+.orders-right{
+  width: 55%;
+  height: 100%;
+  display: flex; 
+  align-items: center;
+  flex-direction: row-reverse;
+  margin-right: 1rpx;
+}
+.orders-rel{
+  width: 156rpx;
+  height: 56rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #FF874E;
+  font-size: 24rpx;
+  background-color: white;
+  border: 1px solid #FF874E;
+  border-radius: 30rpx;
+  margin-right: 10rpx;
+}
+.orders-pay{
+  width: 156rpx;
+  height: 56rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #ffffff;
+  font-size: 24rpx;
+  background-color: #FF874E;
+  border-radius: 30rpx;
+  margin-right: 10rpx;
+}
+.order{
+  width: 710rpx;
+  margin-bottom: 30rpx;
+  height: 440rpx;
+  background-color: white;
+  border-radius: 20rpx;
+  box-shadow: 0px 0px 4px #d1d1d1;
+  display: flex;
+  flex-direction: column;
+  align-items: center ;
+}
+.order-body{
+  width: 99%;
+  height: 136rpx;
+  display: flex;
+}
+.order-title{
+  display: flex;
+  width: 600rpx;
+  flex-direction: column;
+  margin-left: 24rpx;
+  justify-content: space-between;
+}
+.order-title>view{
+  display: flex;
+  align-items: center;
+}
+.titinfo{
+  display: flex;
+  justify-content: space-between;
+}
+.titinfo>p:first-child{
+  width: 380rpx;
+  font-size: 28rpx;
+  color: #464646;
+  font-weight: 600;
+}
+.titinfo>p:last-child{
+  font-size: 28rpx;
+  font-weight: 600;
+}
+.guiinfo{
+  display: flex;
+  justify-content: space-between;
+}
+.guiinfo>view>p:first-child{
+  font-size: 24rpx;
+  color: #3F3F3F;
+}
+.guiinfo>view>p:last-child{
+  color:#919191;
+  font-size: 24rpx;
+}
+.guiinfo>p{
+  font-size: 24rpx;
+  color: #3F3F3F;
+}
+
+.bottom_btn {
+  width: 156rpx;
+  height: 56rpx;
+  box-sizing: border-box;
+  border: 2rpx solid #FF874E;
+  border-radius: 36rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #FF874E;
+  font-size: 24rpx;
+  /* float: right; */
+}

+ 6 - 2
compone/search/search.js

@@ -4,7 +4,7 @@ Component({
    * 组件的属性列表
    * 组件的属性列表
    */
    */
   properties: {
   properties: {
-
+    
   },
   },
 
 
   /**
   /**
@@ -18,6 +18,10 @@ Component({
    * 组件的方法列表
    * 组件的方法列表
    */
    */
   methods: {
   methods: {
-
+    navToSearch(){
+      wx.navigateTo({
+        url: '/pages/search/search',
+      })
+    }
   }
   }
 })
 })

+ 2 - 2
compone/search/search.wxml

@@ -1,5 +1,5 @@
 <!--compone/search/search.wxml-->
 <!--compone/search/search.wxml-->
-<view class="sousuo">
+<view class="sousuo" bindtap="navToSearch">
   <van-icon name="search" style="font-size: 40rpx;color: #A4A4A4;margin-left: 30rpx;" />
   <van-icon name="search" style="font-size: 40rpx;color: #A4A4A4;margin-left: 30rpx;" />
-  <input class="ssinput" type="text" placeholder="搜索" placeholder-style="color:#989898;"></input>
+  <input disabled class="ssinput" type="text" placeholder="搜索" placeholder-style="color:#989898;"></input>
 </view>
 </view>

+ 1 - 0
compone/search/search.wxss

@@ -7,6 +7,7 @@
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: space-around;
   justify-content: space-around;
+  margin: 0 auto;
 }
 }
 .sousuo .ssinput{
 .sousuo .ssinput{
   height: 100%;
   height: 100%;

BIN
images/announce/datu.png


BIN
images/announce/play.png


BIN
images/announce/riqi.png


BIN
images/announce/shipin.png


BIN
images/announce/switch.png


BIN
images/announce/xiaotu.png


BIN
images/avatar.png


BIN
images/checked.png


BIN
images/close-small.png


BIN
images/close.png


BIN
images/countdown.png


+ 0 - 0
images/大于等于.png → images/dayudengyu.png


BIN
images/decrease.png


BIN
images/del-white.png


BIN
images/edit.png


BIN
images/edit2.png


BIN
images/eye.png


+ 0 - 0
images/足迹.png → images/footprint.png


BIN
images/goods-card.png


BIN
images/goods-list.png


BIN
images/increase.png


+ 0 - 0
images/减.png → images/jian.png


+ 0 - 0
images/mine/管理员.png → images/mine/administrator.png


+ 0 - 0
images/mine/请帮我卖.png → images/mine/bangwomai.png


+ 0 - 0
images/mine/查询业务.png → images/mine/chaxunyewu.png


+ 0 - 0
images/mine/服务协议.png → images/mine/fuwuxieyi.png


+ 0 - 0
images/mine/商品库.png → images/mine/goodsbank.png


+ 0 - 0
images/mine/平台客服.png → images/mine/kefu.png


+ 0 - 0
images/mine/卖家教程.png → images/mine/maijiajiaocheng.png


+ 0 - 0
images/mine/拼团管理.png → images/mine/pintuan.png


+ 0 - 0
images/mine/设置.png → images/mine/setting.png


+ 0 - 0
images/mine/商品核销.png → images/mine/shangpinhexiao.png


+ 0 - 0
images/mine/收款码.png → images/mine/shoukuanma.png


+ 0 - 0
images/mine/提货点.png → images/mine/tihuodian.png


+ 0 - 0
images/mine/会员管理.png → images/mine/vip.png


+ 0 - 0
images/mine/我要帮卖.png → images/mine/wobangmai.png


BIN
images/more.png


+ 0 - 0
images/订单.png → images/order-2.png


BIN
images/order.png


+ 0 - 0
images/orders/导出订单.png → images/orders/daochudingdan.png


+ 0 - 0
images/orders/打印面单.png → images/orders/dayinmiandan.png


+ 0 - 0
images/orders/扫码取货.png → images/orders/saomaquhuo.png


+ 0 - 0
images/orders/收款码.png → images/orders/shoukuanma.png


+ 0 - 0
images/orders/销售统计.png → images/orders/xiaoshoutongji.png


+ 0 - 0
images/切换.png → images/qiehuan-big.png


+ 0 - 0
images/二维码.png → images/qrcode.png


BIN
images/riqi.png


BIN
images/scan.png


BIN
images/sell.png


+ 0 - 0
images/商品核销.png → images/shangpinhexiao.png


BIN
images/shopping-cart-2.png


BIN
images/shopping-cart.png


+ 0 - 0
images/收款码.png → images/shoukuanma.png


BIN
images/success.png


+ 0 - 0
images/电话.png → images/telphone.png


+ 0 - 0
images/添加.png → images/tianjia.png


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