rabin 1 day ago
parent
commit
4fec13e11a
100 changed files with 5581 additions and 0 deletions
  1. 9 0
      boot.php
  2. 1383 0
      config/cate.php
  3. 51 0
      config/env/localhost.php
  4. 87 0
      config/manage.php
  5. 95 0
      config/setting.php
  6. 4 0
      package/api/index.php
  7. 4 0
      package/area/index.php
  8. 4 0
      package/email/index.php
  9. 4 0
      package/excel/index.php
  10. 4 0
      package/image/index.php
  11. 4 0
      package/invite/index.php
  12. 4 0
      package/manage/api/index.php
  13. 38 0
      package/manage/config.js
  14. 1 0
      package/manage/index.html
  15. 0 0
      package/manage/json/china.json
  16. 1 0
      package/manage/sector.html
  17. 38 0
      package/manage/sector_config.js
  18. 4 0
      package/manage/static/css/213.89045697.css
  19. 4 0
      package/manage/static/css/780.4065063c.css
  20. 6 0
      package/manage/static/css/app.d065fbce.css
  21. 96 0
      package/manage/static/css/loading.css
  22. 4 0
      package/manage/static/css/vab-chunk-c6f52c3a.949c12f9.css
  23. 4 0
      package/manage/static/css/vab-plugins.f6f5c03c.css
  24. BIN
      package/manage/static/fonts/remixicon.31d28485.f12fd1a0.eot
  25. BIN
      package/manage/static/fonts/remixicon.881fbc46.1e0fb76b.woff
  26. BIN
      package/manage/static/fonts/remixicon.888e61f0.e313410c.ttf
  27. BIN
      package/manage/static/fonts/remixicon.9915fef9.5400338c.woff2
  28. BIN
      package/manage/static/img/403.d6bd8853.png
  29. BIN
      package/manage/static/img/404.f02775f8.png
  30. BIN
      package/manage/static/img/background-1.31e3a0ac.png
  31. BIN
      package/manage/static/img/background.2f742bae.jpg
  32. BIN
      package/manage/static/img/login_form.242d2e10.png
  33. 153 0
      package/manage/static/img/remixicon.95138f36.2b2ee314.svg
  34. 5 0
      package/manage/static/js/213.803cd5f4.js
  35. 5 0
      package/manage/static/js/592.41e25131.js
  36. 5 0
      package/manage/static/js/780.f3d655d2.js
  37. 5 0
      package/manage/static/js/962.faf0c7f7.js
  38. 4 0
      package/manage/static/js/app.1c66cf3c.js
  39. 5 0
      package/manage/static/js/vab-chunk-0b9a05e8.3a2acba3.js
  40. 5 0
      package/manage/static/js/vab-chunk-54e012b3.e33f7ef1.js
  41. 5 0
      package/manage/static/js/vab-chunk-844ca20f.8fd468cb.js
  42. 5 0
      package/manage/static/js/vab-chunk-b3a4eaa1.14c91d44.js
  43. 5 0
      package/manage/static/js/vab-chunk-c6f52c3a.7a551d81.js
  44. 5 0
      package/manage/static/js/vab-plugins.b5bf78de.js
  45. 4 0
      package/msg/index.php
  46. 4 0
      package/pinyin/index.php
  47. 1 0
      package/readme
  48. 4 0
      package/upload/index.php
  49. 3 0
      server.php
  50. 42 0
      src/cate/api/Icon.php
  51. 64 0
      src/cate/api/Info.php
  52. 6 0
      src/cate/index.php
  53. 72 0
      src/cate/lib/Icon.php
  54. 29 0
      src/cate/lib/Info.php
  55. 42 0
      src/cate/manage/core.php
  56. 58 0
      src/cate/manage/level_1.php
  57. 66 0
      src/cate/manage/level_2.php
  58. 78 0
      src/cate/manage/level_3.php
  59. 29 0
      src/cate/table/icon.php
  60. 42 0
      src/cate/table/level_1.php
  61. 47 0
      src/cate/table/level_2.php
  62. 56 0
      src/cate/table/level_3.php
  63. 5 0
      src/place/act/index.php
  64. 108 0
      src/place/act/lib/Core.php
  65. 26 0
      src/place/act/table/collect.php
  66. 26 0
      src/place/act/table/like.php
  67. 40 0
      src/place/act/table/review.php
  68. 90 0
      src/place/boot.php
  69. 5 0
      src/place/channel/index.php
  70. 50 0
      src/place/channel/table/seller.php
  71. 46 0
      src/place/channel/table/supplier.php
  72. 52 0
      src/place/interface/api/Address.php
  73. 31 0
      src/place/interface/api/Collect.php
  74. 110 0
      src/place/interface/api/Main.php
  75. 33 0
      src/place/interface/api/Review.php
  76. 63 0
      src/place/interface/api/Role.php
  77. 293 0
      src/place/interface/api/Source.php
  78. 20 0
      src/place/interface/api/Tool.php
  79. 122 0
      src/place/interface/api/User.php
  80. 5 0
      src/place/interface/index.php
  81. 43 0
      src/place/interface/lib/Core.php
  82. 25 0
      src/place/order/api/Manage.php
  83. 5 0
      src/place/order/index.php
  84. 44 0
      src/place/order/lib/source/Address.php
  85. 165 0
      src/place/order/lib/source/Cart.php
  86. 118 0
      src/place/order/lib/source/Express.php
  87. 45 0
      src/place/order/lib/source/Log.php
  88. 547 0
      src/place/order/lib/source/Order.php
  89. 184 0
      src/place/order/lib/source/Refund.php
  90. 58 0
      src/place/order/manage/core.php
  91. 40 0
      src/place/order/manage/role.php
  92. 60 0
      src/place/order/manage/source.php
  93. 46 0
      src/place/order/manage/source_address.php
  94. 30 0
      src/place/order/manage/source_express.php
  95. 43 0
      src/place/order/manage/source_refund.php
  96. 32 0
      src/place/order/manage/source_refund_audit.php
  97. 22 0
      src/place/order/manage/source_refund_detail.php
  98. 68 0
      src/place/order/table/role.php
  99. 128 0
      src/place/order/table/source.php
  100. 50 0
      src/place/order/table/source_cart.php

+ 9 - 0
boot.php

@@ -0,0 +1,9 @@
+<?php
+define('DEVER_ENTRY', 'index.php');
+define('DEVER_PROJECT', 'yuandaibao_v2');
+define('DEVER_PROJECT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+if (defined('DEVER_PACKAGE')) {
+	include('dever2/package/'.DEVER_PACKAGE.'/index.php');
+} else {
+	include('dever2/boot.php');
+}

+ 1383 - 0
config/cate.php

@@ -0,0 +1,1383 @@
+<?php
+# 从微信里拿到的
+# https://developers.weixin.qq.com/miniprogram/product/mini-store/leimuzizhi/qiye.html
+# table 转 json 工具:https://www.ivtool.com/html-table-to-json-converter/
+return array
+(
+    'json' => '[
+  {
+    "一级类目": "数码",
+    "二级类目": "摄影摄像",
+    "三级类目": "数码相机/单反相机/摄像机/镜头/数码相框/微单相机/拍立得/运动相机/户外器材/影棚器材/冲印服务"
+  },
+  {
+    "一级类目": "影音娱乐",
+    "二级类目": "MP3/MP4/音箱/音响/耳机/耳麦/麦克风/专业音频/苹果配件/收音机/特殊商品/便携音箱/无线音箱"
+  },
+  {
+    "一级类目": "数码配件",
+    "二级类目": "滤镜/闪光灯/手柄/存储卡/读卡器/相机包/三脚架/云台/相机清洁/贴膜/电池/充电器/机身附件/镜头附件/数码支架"
+  },
+  {
+    "一级类目": "智能设备",
+    "二级类目": "智能手环/智能手表/VR眼镜/运动跟踪器/健康监测/智能配饰/智能家居/体感车/其他配件/智能机器人/无人机/特殊商品"
+  },
+  {
+    "一级类目": "电子教育",
+    "二级类目": "电子词典/录音笔/电纸书/复读机/点读机/点读笔/学生平板/特殊商品/翻译机"
+  },
+  {
+    "一级类目": "数码维修",
+    "二级类目": "无人机维修/相机维修/其他数码产品维修"
+  },
+  {
+    "一级类目": "电脑、办公",
+    "二级类目": "电脑整机",
+    "三级类目": "笔记本/台式机/服务器/工作站/笔记本配件/游戏本/平板电脑/平板电脑配件/一体机"
+  },
+  {
+    "一级类目": "电脑组件",
+    "二级类目": "CPU/显卡/内存/主板/散热器/硬盘/刻录机/光驱/机箱/显示器/电源/声卡/扩展卡/装机配件/SSD固态硬盘/组装电脑/主板CPU套装/显示器支架"
+  },
+  {
+    "一级类目": "外设产品",
+    "二级类目": "键盘/鼠标/摄像头/移动硬盘/U盘/硬盘盒/游戏设备/手写板/鼠标垫/插座/UPS电源/线缆/电脑工具/电脑清洁/网络仪表仪器/特殊商品"
+  },
+  {
+    "一级类目": "网络产品",
+    "二级类目": "路由器/网卡/交换机/网络存储/5G上网/4G上网/网络盒子/网络配件/特殊商品"
+  },
+  {
+    "一级类目": "办公设备",
+    "二级类目": "打印机/传真设备/复合机/扫描仪/投影机/碎纸机/考勤机/验钞机/点钞机/塑封机/白板/保险柜/保险箱/装订机/封装机/投影配件/收银机/安防监控/会议音频视频/条码扫描"
+  },
+  {
+    "一级类目": "文具",
+    "二级类目": "计算器/激光笔/学生文具/笔类/办公文具/文件管理/本册/便签/财会用品/画具画材/文房四宝"
+  },
+  {
+    "一级类目": "游戏设备",
+    "二级类目": "游戏机/游戏耳机/手柄/方向盘/游戏软件/游戏周边"
+  },
+  {
+    "一级类目": "办公耗材",
+    "二级类目": "刻录碟片/纸类/硒鼓/墨盒/色带/墨粉"
+  },
+  {
+    "一级类目": "服务产品",
+    "二级类目": "延保服务/远程服务/电脑办公设备保养/域名注册"
+  },
+  {
+    "一级类目": "家用电器",
+    "二级类目": "生活电器",
+    "三级类目": "吸尘器/取暖电器/加湿器/空气净化器/饮水机/电风扇/电话机/其它生活电器/清洁机/净水器/冷风扇/挂烫机/熨斗/除湿机/扫地机器人/干衣机/特殊商品/毛球修剪器/除螨仪/新风系统/电暖桌"
+  },
+  {
+    "一级类目": "厨房小电",
+    "二级类目": "电饭煲/多用途锅/料理机/豆浆机/电磁炉/微波炉/电烤箱/电水壶/热水瓶/咖啡机/酸奶机/其它厨房电器/电压力锅/电饼铛/面包机/果蔬解毒机/煮蛋器/电炖锅/养生壶/煎药壶/电热饭盒/厨房电器配件/榨汁机/原汁机/电烧烤炉/特殊商品/面条机/空气炸锅/电陶炉/破壁机/绞肉机/打蛋器/厨师机/和面机"
+  },
+  {
+    "一级类目": "大家电",
+    "二级类目": "平板电视/空调/冰箱/洗衣机/空调外机/冷柜/冰吧/酒柜/特殊商品/中央空调/烘干机/移动空调/洗烘套装"
+  },
+  {
+    "一级类目": "个护健康",
+    "二级类目": "足浴盆/按摩器/电子秤/其它健康电器/按摩椅/特殊商品/足疗机"
+  },
+  {
+    "一级类目": "厨卫大电",
+    "二级类目": "油烟机/消毒柜/洗碗机/燃气灶/电热水器/燃气热水器/集成灶/蒸箱/空气能热水器/太阳能热水器/嵌入式微蒸烤"
+  },
+  {
+    "一级类目": "商用电器",
+    "二级类目": "商用烤箱/醒发箱/商用磨浆机/封口机/封杯机/商用压面机/商用电饼铛/肠粉机/保温售饭台/棉花糖机/章鱼丸机/商用开水器/果糖机/香肠机/热狗机/电动餐车/商用绞肉机/商用切肉机/展示柜/保鲜工作台/蒸柜/制冰机/电炸炉/扒炉/商用和面机/商用打蛋机/商用电磁炉/商用吸尘器/关东煮机/饮料机/冰淇淋机/刨冰机/沙冰机/爆米花机/商用消毒柜/商用咖啡机/商用净水设备/自动售货机/其它商用电器/商用电器配件/食品烘干机/油烟净化器/商用电饭煲/煮面桶/工程电器/解决方案/商用冰柜/商用冰箱"
+  },
+  {
+    "一级类目": "家电配件",
+    "二级类目": "电视配件/洗衣机配件/冰箱配件/生活电器配件/空调配件/个护健康配件/厨房小电配件/烟机灶具配件"
+  },
+  {
+    "一级类目": "视听影音",
+    "二级类目": "播放器/DVD/HIFI专区/家庭影院/迷你音响/功放/回音壁/Soundbar/KTV音响"
+  },
+  {
+    "一级类目": "服饰内衣",
+    "二级类目": "男装",
+    "三级类目": "衬衫/T恤/针织衫/羽绒服/羽绒裤/棉服/仿皮皮衣/羊绒衫/风衣/毛呢大衣/夹克/西服/卫衣/POLO衫/马甲/背心/牛仔裤/休闲裤/西裤/西服套装/大码男装/中老年男装/唐装/中式服装/工装/皮衣/皮草/加绒裤/卫裤/运动裤/短裤/设计师/潮牌/羊毛衫/特殊商品/男装套装/外套/中山装"
+  },
+  {
+    "一级类目": "女装",
+    "二级类目": "衬衫/T恤/针织衫/羽绒服/棉服/毛呢大衣/真皮皮衣/风衣/卫衣/小西装/短外套/雪纺衫/马甲/牛仔裤/打底裤/休闲裤/正装裤/连衣裙/半身裙/中老年女装/大码女装/婚纱/打底衫/旗袍/汉服/加绒裤/吊带/背心/羊绒衫/短裤/皮草/礼服/仿皮皮衣/毛衣/设计师/潮牌/特殊商品/女装套装/外套/POLO衫/羽绒裤/唐装/中式服装"
+  },
+  {
+    "一级类目": "内衣",
+    "二级类目": "文胸/吊带/背心/保暖内衣/睡衣/家居服/女式内裤/男式内裤/商务男袜/塑身美体/连裤袜/丝袜/美腿袜/抹胸/泳衣/情侣睡衣/文胸套装/少女文胸/休闲棉袜/大码内衣/内衣配件/打底裤袜/打底衫/秋衣秋裤/特殊商品"
+  },
+  {
+    "一级类目": "服饰配件",
+    "二级类目": "围巾/手套/帽子套装/袖扣/光学镜架/镜片/太阳镜/棒球帽/毛线帽/遮阳帽/老花镜/装饰眼镜/防辐射眼镜/女士丝巾/围巾/披肩/男士丝巾/围巾/鸭舌帽/贝雷帽/礼帽/真皮手套/毛线手套/防晒手套/非皮质腰带/钥匙扣/口罩(非医用)/耳罩/耳包/假领/毛线/布面料/领带/领结/领带夹/特殊商品"
+  },
+  {
+    "一级类目": "其他配饰",
+    "二级类目": "发箍/发带/发圈&发绳/发簪/发饰套装/其他/发夹"
+  },
+  {
+    "一级类目": "美妆护肤",
+    "二级类目": "面部护肤",
+    "三级类目": "洁面/爽肤水/化妆水/乳液/面霜/面膜/套装/礼盒/卸妆/面部精华/精油/ 眼霜/眼部精华/防晒/眼膜/唇膜/唇部精华/唇部磨砂/T区护理/润唇膏/其它面部护肤/喷雾"
+  },
+  {
+    "一级类目": "香水彩妆",
+    "二级类目": "粉底液/粉底膏/粉底霜/腮红/胭脂/眼影/眉笔/眉粉/染眉膏/睫毛膏/增长液/口红/彩妆套装/美甲产品/香水/眼线笔/眼线膏/隔离霜/妆前乳/气垫BB/BB霜/气垫CC/CC霜/遮瑕膏/遮瑕笔/蜜粉/散粉/粉饼/唇彩唇蜜/唇釉/唇笔/唇线笔/其它彩妆/男士彩妆/高光/修容/阴影/定妆喷雾/眉毛雨衣/素颜霜"
+  },
+  {
+    "一级类目": "男士面部护肤",
+    "二级类目": "剃须啫喱/剃须膏/剃须泡/男士卸妆/男士洁面/男士眼霜/眼部精华/男士面部精华/男士爽肤水/化妆水/男士乳液/面霜/乳霜/男士防晒/男士面膜/男士T区护理/男士唇部护理/其它男士面部护肤/套装/礼盒/男士喷雾/男士眼膜/男士精油/男士颈膜/男士鼻贴/男士须后水"
+  },
+  {
+    "一级类目": "美妆工具",
+    "二级类目": "化妆棉/卸妆棉/假睫毛/双眼皮贴/胶/化妆刷/粉扑/洗脸扑/洗脸刷/睫毛夹/修眉刀/美甲工具/美妆工具套装/其他美妆工具/洁面巾/化妆包/刷包/假睫毛辅助工具/DIY面膜工具/美妆蛋/化妆海棉"
+  },
+  {
+    "一级类目": "运动户外",
+    "二级类目": "户外装备",
+    "三级类目": "背包/帐篷/垫子/睡袋/吊床/登山攀岩/户外照明/野餐用品/户外工具/望远镜/夜视仪/户外眼镜/户外配饰/户外仪表/旅行装备/军迷用品/救援装备/极限户外/冲浪潜水/特殊商品/飞机游艇/烧烤用具/军迷装备/户外电源/户外沐浴器"
+  },
+  {
+    "一级类目": "健身训练",
+    "二级类目": "动感单车/跑步机/综合训练器/椭圆机/哑铃/仰卧板/收腹机/其他器械/甩脂机/踏步机/特殊商品/划船机/倒立机/拉力器/臂力器/跳绳/健腹轮/健身车/单双杠/引体向上/健身路径/健身房器械定制/杠铃/壶铃/骑马机/律动机/冲浪机/登山机/举重床/卧推器/漫步机/器械减震垫/跳跳床/蹦蹦床/弹力棒/健身棒/俯卧撑架/呼啦圈/计步器/健身锤/健身球/保健球/健身踏板/韵律踏板/健身椅/美腿机/扭腰盘/腕力器/足底按摩垫/ems健身仪/健身吊环/体测仪"
+  },
+  {
+    "一级类目": "体育用品",
+    "二级类目": "乒乓球拍/羽毛球拍/网球拍/足球/篮球/排球/高尔夫球杆套杆/台球桌/棒球/特殊商品/其他田径用品/更多高尔夫球杆/高尔夫7号铁/高尔夫挖起杆/高尔夫一号木/高尔夫铁木杆/高尔夫球/高尔夫运动裤/高尔夫棉服/高尔夫羽绒服/高尔夫T恤/高尔夫夹克/风衣/高尔夫卫衣/套头衫/高尔夫毛/线衫/更多高尔夫服装/高尔夫球包/高尔夫球包车/推杆练习器/高尔夫手套/高尔夫球钉/其他高尔夫装备/台球杆/台球/台球皮头/杆头/台球杆盒/杆筒/台球巧克粉/防滑粉/台球三角架/台尼/台球布/台球架杆器/台球手套/台球修杆器/巧粉夹/巧粉袋/台球杆保养工具/球杆加长器/其他台球配件/接力棒/铅球/跳箱/跳马/起跑器/跨栏架/跳高架/跳高杆/铁饼/标枪/排球网/球柱/排球鞋服/其他排球装备/其他体育用品/棒球棒/棒球手套/橄榄球/橄榄球头盔/橄榄球手套/其他橄榄球装备/橄榄球鞋服/乒乓底板/乒乓球/乒乓球桌/乒乓球发球机/乒乓球拍胶皮/乒乓球挡板/乒乓球服/乒乓球拍套/包/乒乓球捡球器/乒乓球网/架/乒乓球集球网/乒乓球袜/乒乓球胶水/其他乒乓球装备/足球护腿板/足球球门/守门员手套/足球网/足球战术板/球迷用品/裁判用品/足球训练背心/其他足球装备/足球袜/羽毛球包/羽毛球线/羽毛球手胶/其他羽球装备/羽毛球服/羽毛球网架/羽毛球网/羽毛球袜/羽毛球蒸球机/网球包/网球线/网球手胶/其他网球装备/网球服/网球网架/网球网/网球避震器/网球捡球器/网球训练器/篮球架/其他篮球装备/篮球袜/篮球包/篮球框/羽毛球/网球/高尔夫模拟器/高尔夫球帽/运动地胶/穿线机/壁球拍/壁球"
+  },
+  {
+    "一级类目": "户外鞋服",
+    "二级类目": "冲锋衣裤/速干衣裤/羽绒服/棉服/休闲衣裤/抓绒衣裤/软壳衣裤/T恤/户外风衣/功能内衣/军迷服饰/登山鞋/雪地靴/徒步鞋/越野跑鞋/休闲鞋/工装鞋/溯溪鞋/沙滩/凉拖/户外袜/特殊商品/军迷鞋靴"
+  },
+  {
+    "一级类目": "运动鞋包",
+    "二级类目": "运动鞋/休闲鞋/帆布鞋/跑步鞋/篮球鞋/足球鞋/训练鞋/拖鞋/运动包/板鞋/特殊商品/乒乓球鞋/棒球鞋/网球鞋/羽毛球鞋/高尔夫鞋"
+  },
+  {
+    "一级类目": "运动服饰",
+    "二级类目": "棉服/夹克/风衣/卫衣/套头衫/T恤/运动裤/套装/运动配饰/羽绒服/毛衫/线衫/健身服/运动背心/运动内衣"
+  },
+  {
+    "一级类目": "骑行运动",
+    "二级类目": "折叠车/山地车/电动车/城市自行车/骑行服/穿戴装备/平衡车/特殊商品/电动滑板车/公路车/自行车配件/电动车零配件/电动车装备/老年代步车"
+  },
+  {
+    "一级类目": "垂钓用品",
+    "二级类目": "钓竿/浮漂/钓箱钓椅/钓鱼配件/渔具包/辅助装备/特殊商品/鱼线/鱼饵/鱼线轮/钓鱼灯/钓鱼服饰"
+  },
+  {
+    "一级类目": "游泳用品",
+    "二级类目": "泳镜/泳帽/游泳包防水包/女士泳衣/男士泳衣/比基尼/游泳配件/特殊商品/游泳圈"
+  },
+  {
+    "一级类目": "运动护具",
+    "二级类目": "运动护膝/运动护腰/运动护肘/运动护踝/护腕/运动护臀/运动护腿/运动护肩/护齿/护指/健身手套/髌骨带/助力带/紧身服/压缩衣/其他运动护具/运动肌肉贴/护臂/运动发带"
+  },
+  {
+    "一级类目": "瑜伽舞蹈",
+    "二级类目": "舞蹈扇/瑜伽服套装/瑜伽服内衣/瑜伽服上衣/瑜伽服裤/瑜伽服外套/瑜伽短裤/瑜伽袜/瑜伽发带/广场舞服/拉丁舞服/芭蕾舞服/现代舞服/肚皮舞服/其他舞蹈服/广场舞鞋/拉丁舞鞋/芭蕾舞鞋/健美操鞋/肚皮舞鞋/其他舞蹈鞋/舞蹈把杆/体操垫/体操跳板/瑜伽垫/瑜伽柱/瑜伽球/瑜伽铺巾/瑜伽鞋/瑜伽拉力带/瑜伽砖/瑜伽绳/瑜伽圈/瑜伽半圆球/瑜伽吊床/其他瑜伽用品/普拉提器械/其他舞蹈配件/瑜伽包/瑜伽披肩/瑜伽手套/藏族舞鞋服/草裙舞鞋服/朝鲜舞鞋服/傣族舞鞋服/钢管舞鞋服/街舞鞋服/啦啦队鞋服/摩登舞鞋服/踢踏舞鞋服/体操鞋服"
+  },
+  {
+    "一级类目": "马术/民俗",
+    "二级类目": "马术头盔/马术服装/马术靴/马术鞭/马术护腿/马匹装备/马房装备/马鞍/其他马术装备/舞狮/空竹/毽子/响鞭/拔河绳/门球/龙舟服/其他民俗用品"
+  },
+  {
+    "一级类目": "冰上运动",
+    "二级类目": "速滑冰刀鞋/速滑服/速滑头盔/速滑手套/速滑刀片/速滑磨刀架/花样滑冰鞋/花样滑冰服/花样滑冰袜/冰球杆/冰球鞋/冰球训练服/冰球刀片/冰球杆胶布/冰球球饼/冰球头盔/冰球手套/冰刀套/其它冰上运动"
+  },
+  {
+    "一级类目": "武术搏击",
+    "二级类目": "跆拳道/空手道/柔道/剑道/摔跤/其他武术装备/拳击/太极"
+  },
+  {
+    "一级类目": "棋牌麻将",
+    "二级类目": "围棋/国际象棋/军棋/陆战棋/将棋/扑克/麻将/川牌/字牌/UNO牌/牌九/骰子/色子/筹码/筹码架/筹码盒/抽奖转盘/其他棋牌麻将/狼人杀/摇号机/中国象棋"
+  },
+  {
+    "一级类目": "轮滑滑板",
+    "二级类目": "单排轮滑鞋/双排轮滑鞋/弹跳鞋/轮滑包/轮滑护具/长板/漂移板/双翘板/小鱼板/其它轮滑滑板"
+  },
+  {
+    "一级类目": "滑雪运动",
+    "二级类目": "滑雪服/滑雪裤/滑雪衣裤套装/单板滑雪板/双板滑雪板/滑雪鞋/滑雪头盔/面罩/头套/滑雪杖/雪板固定器/滑雪车/更多滑雪用具"
+  },
+  {
+    "一级类目": "体育服务",
+    "二级类目": "赛事报名/团体培训/私教培训"
+  },
+  {
+    "一级类目": "母婴",
+    "二级类目": "尿裤湿巾",
+    "三级类目": "拉拉裤/婴儿湿巾/婴儿尿裤/成人尿裤/婴儿纸尿片"
+  },
+  {
+    "一级类目": "喂养用品",
+    "二级类目": "吸奶器/暖奶消毒/儿童餐具/牙胶安抚/奶瓶奶嘴/水壶/水杯/辅食料理机/围兜/防溅衣/食物存储"
+  },
+  {
+    "一级类目": "洗护用品",
+    "二级类目": "洗发沐浴/宝宝护肤/洗衣液/皂/奶瓶清洗/日常护理/驱蚊防晒/座便器/婴儿理发器/洗澡用具/婴儿口腔清洁/棉柔巾"
+  },
+  {
+    "一级类目": "童车童床",
+    "二级类目": "婴儿推车/婴儿床/婴幼儿餐椅/自行车/电动车/学步车/三轮车/扭扭车/滑板车/婴儿床垫/儿童摇椅/儿童滑步车"
+  },
+  {
+    "一级类目": "妈妈专区",
+    "二级类目": "孕妇装/防辐射服/孕产妇洗护/产后塑身/出行用品/孕期营养/文胸/内裤/待产护理/孕产妇家居服/哺乳装/哺乳用品/孕产妇鞋帽袜/月子装/妈咪包/背婴带/防溢乳垫"
+  },
+  {
+    "一级类目": "婴童寝居",
+    "二级类目": "婴儿鞋帽袜/婴童床品套件/安全防护/婴童睡袋/抱被/爬行垫/婴童布尿裤/尿布/婴童隔尿垫/巾/婴童浴巾/浴衣/婴童毛巾/口水巾/吸汗巾/垫背巾/婴童凉席/蚊帐/婴童枕芯/枕套/婴童被子/被套/婴童床单/床褥/婴童床围/婴童内衣裤"
+  },
+  {
+    "一级类目": "童装",
+    "二级类目": "儿童配饰/亲子装/套装/T恤/裤子/半身裙/羽绒服/礼服/演出服/特殊商品/连体衣/爬服/棉服/校服/校服定制/毛衣/针织衫/衬衫/卫衣/外套/大衣/马甲/家居服/旗袍唐装/民族服装/袜子/婴儿礼盒/肚兜/POLO衫/背心/吊带/风衣/夹克/皮衣/皮草/仿皮草/休闲裤/休闲短裤/连衣裙/牛仔服装/浴袍"
+  },
+  {
+    "一级类目": "童装户外服饰",
+    "二级类目": "运动衣/裤/套装/冲锋裤/冲锋衣/滑雪服/防晒衣/软壳衣/软壳裤/速干材质衣服/抓绒衣"
+  },
+  {
+    "一级类目": "童装内衣裤",
+    "二级类目": "内衣裤/保暖衣/裤/发育内衣/抹胸"
+  },
+  {
+    "一级类目": "安全座椅",
+    "二级类目": "提篮式/安全座椅/增高垫"
+  },
+  {
+    "一级类目": "童鞋",
+    "二级类目": "雨鞋/学步鞋/步前鞋/拖鞋/布鞋/编织鞋/皮鞋/帆布鞋/棉鞋/凉鞋/靴子/运动鞋/板鞋/汉风/民族/传统布鞋"
+  },
+  {
+    "一级类目": "奶粉",
+    "二级类目": "婴幼儿奶粉/孕妈奶粉/高段位奶粉"
+  },
+  {
+    "一级类目": "营养辅食",
+    "二级类目": "米粉&菜粉/果泥&果汁/益生菌&初乳/钙铁锌&维生素/清火&开胃/DHA/面条&粥/宝宝零食"
+  },
+  {
+    "一级类目": "童鞋配件",
+    "二级类目": "量脚器/其他鞋配件/鞋带/鞋垫"
+  },
+  {
+    "一级类目": "食品饮料",
+    "二级类目": "地方特产",
+    "三级类目": "新疆/北京/山西/内蒙古/福建/湖南/四川/云南/东北/其他特产"
+  },
+  {
+    "一级类目": "休闲食品",
+    "二级类目": "休闲零食/坚果炒货/肉干肉脯/蜜饯果干/糖果/巧克力/饼干蛋糕/熟食腊味"
+  },
+  {
+    "一级类目": "粮油调味",
+    "二级类目": "米/食用油/调味品/南北干货/方便食品/有机食品/烘焙原料/面/杂粮"
+  },
+  {
+    "一级类目": "饮料冲调",
+    "二级类目": "冲饮谷物/饮料/咖啡/奶茶/牛奶乳品/饮用水/蜂蜜/柚子茶/成人奶粉"
+  },
+  {
+    "一级类目": "食品礼券",
+    "二级类目": "月饼/粽子/卡券"
+  },
+  {
+    "一级类目": "进口食品",
+    "二级类目": "饼干蛋糕/糖果/巧克力/休闲零食/冲调品/米面调味/牛奶乳品/水/饮料/咖啡豆/咖啡粉/油/方便食品"
+  },
+  {
+    "一级类目": "茗茶",
+    "二级类目": "铁观音/普洱/龙井/绿茶/红茶/乌龙茶/花草茶/花果茶/养生茶/黑茶/白茶/其它茶/茉莉花茶"
+  },
+  {
+    "一级类目": "保健食品",
+    "二级类目": "增强免疫/骨骼健康/肠胃养护/调节三高/缓解疲劳/养肝护肝/改善贫血/清咽利喉/美容养颜/减肥塑身/改善睡眠/明目益智"
+  },
+  {
+    "一级类目": "传统滋补",
+    "二级类目": "阿胶/人参/西洋参/燕窝/灵芝/孢子粉/蜂产品/枸杞/三七/石斛/葛根/桑葚/茯苓/藿香/薤白/芝麻丸/其他滋补品"
+  },
+  {
+    "一级类目": "家居日用",
+    "二级类目": "生活日用",
+    "三级类目": "雨伞雨具/浴室用品/缝纫机/洗晒/熨烫/净化除味/保暖防护/特殊商品/上门除醛/缝纫/针织材料"
+  },
+  {
+    "一级类目": "家装软饰",
+    "二级类目": "相框/照片墙/装饰字画/节庆饰品/手工/十字绣/装饰摆件/帘艺隔断/墙贴/装饰贴/钟饰/花瓶花艺/香薰蜡烛/创意家居/特殊商品/壁饰"
+  },
+  {
+    "一级类目": "收纳用品",
+    "二级类目": "收纳袋/收纳包/收纳柜/收纳箱/防尘罩/收纳架/收纳篮/分隔收纳"
+  },
+  {
+    "一级类目": "钟表",
+    "二级类目": "腕表",
+    "三级类目": "儿童手表/欧美表/日韩表/德表/瑞表/国表"
+  },
+  {
+    "一级类目": "时钟",
+    "二级类目": "座钟/挂钟/闹钟"
+  },
+  {
+    "一级类目": "钟表配件",
+    "二级类目": "钟表配件"
+  },
+  {
+    "一级类目": "厨具",
+    "二级类目": "烹饪锅具",
+    "三级类目": "炒锅/平底锅/煎锅/高压锅/蒸锅/汤锅/奶锅/锅具套装/砂锅/水壶/火锅/特殊商品"
+  },
+  {
+    "一级类目": "刀剪菜板",
+    "二级类目": "菜刀/剪刀/刀具套装/砧板/瓜果刀/瓜果刨/多功能刀/特殊商品"
+  },
+  {
+    "一级类目": "厨房配件",
+    "二级类目": "保鲜盒/烘焙/烧烤/调料器皿/饭盒/提锅/厨房置物架/厨房DIY/小工具/特殊商品/厨房秤/厨房储物器皿"
+  },
+  {
+    "一级类目": "水具酒具",
+    "二级类目": "塑料杯/玻璃杯/陶瓷/马克杯/保温杯/保温壶/酒杯/酒具/运动水壶/杯具套装/特殊商品/焖烧杯/水具/酒具配件"
+  },
+  {
+    "一级类目": "餐具",
+    "二级类目": "餐具套装/茶具/咖啡具/碗/筷子/一次性用品/果盘/果篮/特殊商品/盘/碟/刀/叉/勺"
+  },
+  {
+    "一级类目": "酒店用品",
+    "二级类目": "自助餐炉/酒店餐具/酒店水具/特殊商品"
+  },
+  {
+    "一级类目": "咖啡具",
+    "二级类目": "咖啡杯/咖啡壶/咖啡具套装/磨豆机/打奶器/咖啡滤纸/咖啡具配件"
+  },
+  {
+    "一级类目": "玩具乐器",
+    "二级类目": "适用年龄",
+    "三级类目": "0-6个月/6-12个月/1-3岁/3-6岁/6-14岁/14岁以上"
+  },
+  {
+    "一级类目": "遥控/电动",
+    "二级类目": "遥控车/遥控飞机/遥控船/机器人/轨道/助力"
+  },
+  {
+    "一级类目": "毛绒布艺",
+    "二级类目": "毛绒/布艺/靠垫/抱枕"
+  },
+  {
+    "一级类目": "娃娃玩具",
+    "二级类目": "换装娃娃/卡通娃娃/智能娃娃"
+  },
+  {
+    "一级类目": "模型玩具",
+    "二级类目": "仿真模型/拼插模型/收藏爱好"
+  },
+  {
+    "一级类目": "健身玩具",
+    "二级类目": "炫舞毯/爬行垫/爬行毯/户外玩具/戏水玩具"
+  },
+  {
+    "一级类目": "潮玩/动漫",
+    "二级类目": "电影周边/卡通周边/网游周边/潮流盲盒/高达模型/变形模型/扭蛋/人偶/BJD/兵人/陀螺/悠悠球/溜溜球"
+  },
+  {
+    "一级类目": "益智玩具",
+    "二级类目": "摇铃/床铃/早教启智/拖拉玩具/健身架/魔方"
+  },
+  {
+    "一级类目": "积木拼插",
+    "二级类目": "积木/拼图/磁力片/磁力棒/立体拼插"
+  },
+  {
+    "一级类目": "绘画/DIY",
+    "二级类目": "手工彩泥/绘画工具/情景玩具"
+  },
+  {
+    "一级类目": "创意减压",
+    "二级类目": "减压玩具/创意玩具"
+  },
+  {
+    "一级类目": "其他乐器",
+    "二级类目": "电脑音乐/工艺礼品乐器"
+  },
+  {
+    "一级类目": "乐器配件",
+    "二级类目": "谱架/谱台/琴弦/拾音器/调音器/节拍器/乐器箱包/变调夹/其它乐器配件"
+  },
+  {
+    "一级类目": "民族吹奏乐器",
+    "二级类目": "巴乌/笛子/葫芦丝/唢呐/埙/笙/陶笛/箫/其它民族吹奏乐器"
+  },
+  {
+    "一级类目": "民族打击乐器",
+    "二级类目": "镲/堂鼓/快板/腰鼓/秧歌鼓/锣/排鼓/其它民族打击乐器"
+  },
+  {
+    "一级类目": "民族弹拨乐器",
+    "二级类目": "古琴/古筝/柳琴/琵琶/秦琴/阮/三弦/扬琴/月琴/其它民族弹拨乐器"
+  },
+  {
+    "一级类目": "民族拉弦乐器",
+    "二级类目": "板胡/二胡/高胡/京胡/京二胡/马头琴/中胡/其它民族拉弦乐器"
+  },
+  {
+    "一级类目": "西洋打击乐器",
+    "二级类目": "电子鼓/架子鼓/爵士鼓/静音鼓/军鼓/非洲鼓/卡洪鼓/箱鼓/其它西洋打击乐器"
+  },
+  {
+    "一级类目": "西洋管乐器",
+    "二级类目": "口琴/巴松/大管/单簧管/双簧管/电吹管/萨克斯/短笛/长笛/竖笛/大号/小号/圆号/长号/其它西洋管乐器"
+  },
+  {
+    "一级类目": "西洋弦乐器",
+    "二级类目": "大提琴/低音/倍大提琴/小提琴/中提琴/贝斯/吉他/尤克里里/其它西洋弦乐器"
+  },
+  {
+    "一级类目": "键盘乐器",
+    "二级类目": "钢琴/电子琴/手卷钢琴/口风琴/电钢琴/手风琴/其它键盘乐器"
+  },
+  {
+    "一级类目": "STEAM教玩具",
+    "二级类目": "水动力玩具/空气动力玩具/太阳能玩具/热胀冷缩/感温玩具/风动船/风动转向玩具/电路开关玩具/编程玩具"
+  },
+  {
+    "一级类目": "其他玩具",
+    "二级类目": "玩具枪"
+  },
+  {
+    "一级类目": "汽车",
+    "二级类目": "车载电器",
+    "三级类目": "电源/车载吸尘器/车载冰箱/车载净化器/行车记录仪/安全预警仪/倒车雷达/车载蓝牙/导航仪/驾驶辅助/车载电台/特殊商品/车载电器配件/车机导航/汽车音响/车载生活电器/车载充电器/逆变器/后视镜导航/电动尾门/HUD抬头显示/电动车窗升降器/无钥匙进入/汽车充电装备/360全景影像/执法记录仪"
+  },
+  {
+    "一级类目": "维修保养",
+    "二级类目": "防冻液/雨刷/火花塞/卤素灯/维修配件/贴膜/其它汽修工具/轮胎/底盘装甲/护板/蓄电池/后视镜/汽机油/添加剂/机油滤清器/刹车片/轮毂/改装配件/特殊商品/减震器/正时皮带/汽车喇叭/汽车玻璃/柴机油/变速箱油/滤/刹车盘/鼓/刹车油/刹车蹄/刹车卡钳/刹车泵/刹车油管/LED车灯/大灯总成/氙气灯/空调滤清器/空气滤清器/燃油滤清器/摩托车机油/其它辅助油/三滤套装/点火线圈/高压线/氧传感器/起动机/发电机/水泵/离合器/钣金/喷漆用品/车灯辅件/钣金/喷漆工具/千斤顶/工具箱/工具车/胶带/双面胶/汽车诊断设备/汽车维修设备/检修灯"
+  },
+  {
+    "一级类目": "美容清洗",
+    "二级类目": "玻璃水/补漆笔/车蜡/清洁剂/其它洗车工具/洗车配件/特殊商品/镀晶/洗车机/洗车水枪/枪头/洗车毛巾/打蜡机/汽车贴膜/底盘装甲/隐形车衣/镀膜/防雾剂/驱水剂/喷漆/车用掸子/轮毂喷膜/洗车泥/洗车水管/洗车接头/洗车水桶/洗车海绵/洗车刷/洗车手套/车用砂纸"
+  },
+  {
+    "一级类目": "汽车装饰",
+    "二级类目": "香水/香膏/车衣/后备箱垫/座垫/座套/脚垫/车内除味剂/头枕腰靠/挂件/其它功能小件/车身装饰件/特殊商品/方向盘套/车载支架/汽车装饰灯/踏板/行李架/箱/摆件/后视镜/圆镜/雨眉/车贴/车身装饰条/保险杠/隔音隔热棉/排挡/手刹套/汽车钥匙扣/包/汽车炭包/扶手箱/车用收纳袋/盒/车载纸巾盒/车载烟灰缸/临时停车牌/汽车防滑垫/防踢垫/汽车除雪铲/遮阳挡/雪挡/汽车窗帘/司机护目镜/车载挂钩/导航/中控膜/扶手箱套/内饰贴/门碗贴/防滑贴/仪表台防晒垫/方向盘助力球/车牌架/牌照托/密封条/车门拉手装饰/车用衣服架/车载桌板/电子香薰/挡泥板/防撞胶条/尾喉/无线充支架"
+  },
+  {
+    "一级类目": "安全自驾",
+    "二级类目": "应急救援/储物箱/保温箱/其它摩托车装备/自驾野营/胎压监测/防盗设备/充气泵/特殊商品/地锁/摩托车/灭火器/车载床/胎压计/拖车绳/搭火线/中控锁/方向盘锁/GPS定位器/防滑链/安全锤/摩托车头盔/其它摩托车配件/轮胎锁/摩托车风镜/摩托车手套/摩托车骑行服/摩托车骑行裤/摩托车骑行鞋/骑士包/摩托车雨衣/摩托车蓝牙装备/摩托车喇叭/摩托车音响/摩托车后视镜/摩托车锁/摩托车尾箱/摩托车灯/摩托车护具"
+  },
+  {
+    "一级类目": "汽车服务",
+    "二级类目": "清洗美容/功能升级/陪练/保养维修/驾驶培训/钣金喷漆/更换轮胎/换刹车片/换刹车盘/空调清洗/车辆改装/保养套餐/洗车服务/换空调滤/更换变速箱油/内外饰改装/电子改装/性能改装/汽车试驾"
+  },
+  {
+    "一级类目": "预约报名/定金(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "赛事改装",
+    "二级类目": "改装周边"
+  },
+  {},
+  {
+    "一级类目": "宠物生活",
+    "二级类目": "宠物主粮",
+    "三级类目": "狗干粮/猫干粮/处方狗粮/处方猫粮/猫主食罐/狗主食罐"
+  },
+  {
+    "一级类目": "宠物零食",
+    "二级类目": "狗零食/猫零食"
+  },
+  {
+    "一级类目": "猫狗日用",
+    "二级类目": "猫狗窝/食具水具/狗厕所/猫砂/清洁除味/笼子/围栏/尿垫/猫砂盆/猫狗沙发/猫狗柜/其它日用"
+  },
+  {
+    "一级类目": "猫狗玩具",
+    "二级类目": "猫玩具/狗玩具/猫爬架/猫抓板"
+  },
+  {
+    "一级类目": "猫狗出行",
+    "二级类目": "牵引绳/胸背带/航空箱/便携包/宠物鞋服/外出用品/宠物配饰/训练器/止吠器"
+  },
+  {
+    "一级类目": "洗护美容",
+    "二级类目": "浴液/护毛素/美容用具/美容电器"
+  },
+  {
+    "一级类目": "宠物服务",
+    "二级类目": "宠物美容/宠物寄养/宠物赛事/宠物殡葬/宠物训练/宠物摄影"
+  },
+  {
+    "一级类目": "水族",
+    "二级类目": "鱼缸&水族箱/鱼粮&饲料/过滤器&水泵/增氧设备/温控器材/水族药剂/造景装饰/清洁检测/水草用品/照明设备/滤材&配件/海水用品/水族服务"
+  },
+  {
+    "一级类目": "异宠用品",
+    "二级类目": "鼠类用品/爬宠用品/鸟类用品/兔子用品/其它异宠用品"
+  },
+  {
+    "一级类目": "宠物保健",
+    "二级类目": "健骨补钙/护肤美毛/肠胃调理/奶粉/宠物驱虫/口&耳&眼清洁/强化免疫"
+  },
+  {
+    "一级类目": "宠物医疗",
+    "二级类目": "兽药/疫苗/诊治服务"
+  },
+  {
+    "一级类目": "家具",
+    "二级类目": "卧室家具",
+    "三级类目": "床/床垫/床头柜/简易衣柜/斗柜/梳妆台/梳妆凳/穿衣镜/衣柜/特殊商品/定制衣柜/榻榻米/顶箱柜"
+  },
+  {
+    "一级类目": "客厅家具",
+    "二级类目": "沙发/沙发床/边桌/茶几/电视柜/屏风/壁炉/鞋柜/凳子/特殊商品/懒人沙发/角柜/玄关隔断"
+  },
+  {
+    "一级类目": "餐厅家具",
+    "二级类目": "餐桌/餐边柜/酒柜/椅子/特殊商品"
+  },
+  {
+    "一级类目": "书房家具",
+    "二级类目": "书架/电脑椅/书桌/电脑桌/特殊商品/书柜/电竞椅/电竞桌/升降桌/连体书桌柜"
+  },
+  {
+    "一级类目": "储物家具",
+    "二级类目": "鞋架/储物/收纳用品/墙面搁架/层架/置物架/特殊商品/衣帽架/餐边手推架"
+  },
+  {
+    "一级类目": "阳台/户外",
+    "二级类目": "晾衣架/花架/装饰架/家用梯/户外家具/折叠床/特殊商品/智能晾衣机/炕几/窗几"
+  },
+  {
+    "一级类目": "商业办公",
+    "二级类目": "屏风工位/班台/班桌/桑拿/足浴/健身家具/会议台/会议桌/办公沙发/文件柜/办公柜/办公前台/收银台/货架/展示架/麻将机/特殊商品/办公椅/超市家具/服装店家具/娱乐/酒吧/KTV家具/发廊/美容家具/校园教学家具/医疗家具/阅览桌/吸烟亭/密集架/售报亭/无障碍设施/自行车停放设施/餐饮沙发/餐饮卡座/火锅桌/龙虾桌/酒店桌椅/酒店套房家具/酒店行李柜/酒店后厨家具/酒店大堂家具/学生公寓家具/租房公寓家具/员工宿舍家具/单身公寓家具/办公桌/多媒体讲台/消防柜/防爆器材柜/化学品柜/手机屏蔽柜/唱吧亭/智能图书柜/智能回收机/功夫茶桌/高隔断/隔墙/茶水柜/演讲台/更衣柜/食堂餐桌/展柜/双层铁床/智能餐桌/康复家具/法院家具/智能货架"
+  },
+  {
+    "一级类目": "儿童家具",
+    "二级类目": "儿童床/儿童床垫/儿童衣柜/儿童书桌/儿童椅凳/儿童餐椅/儿童桌椅套装/儿童沙发/儿童家具配件"
+  },
+  {
+    "一级类目": "套房家具",
+    "二级类目": "卧室套房/客厅套房/餐厅套房/儿童套房/书房套房"
+  },
+  {
+    "一级类目": "红木家具",
+    "二级类目": "红木沙发/红木茶桌/红木电视柜/红木条案/红木边桌几类/红木鞋柜架/红木屏风/红木椅凳/红木博古架/红木餐桌/红木酒柜/红木餐边柜/红木床/红木衣柜/红木斗柜/红木梳妆台/红木层架/红木书桌/红木书柜/红木书架/红木整装定制/红木佛龛"
+  },
+  {
+    "一级类目": "定制家具",
+    "二级类目": "门店特权定金/整装定制/衣帽间定制/书房定制/卧室定制/客餐厅定制/阳台空间定制"
+  },
+  {
+    "一级类目": "城市家具",
+    "二级类目": "ATM防护亭/场馆座椅/候车亭/导视立牌/志愿者服务亭/场馆定制/机场椅/朗读亭/分类垃圾站"
+  },
+  {
+    "一级类目": "家装建材",
+    "二级类目": "灯饰照明",
+    "三级类目": "台灯/荧光灯源/壁灯/落地灯/手电筒/应急灯/LED灯源/吸顶灯/氛围照明/吊灯/筒灯/射灯/室外灯/庭院灯/特殊商品/杀菌灯/卤钨灯源/其它光源/镜前灯/灯具配件/其它照明/麻将灯/吊扇灯"
+  },
+  {
+    "一级类目": "厨房卫浴",
+    "二级类目": "淋浴花洒/厨卫挂件/龙头/马桶/浴室柜/浴缸/水槽/净水软水/橱柜/陶瓷件组套/沐浴桶/厨卫配件/淋浴房/特殊商品/智能马桶盖/垃圾处理器/干手器/智能坐便器/浴霸/排气扇/换气设备/地漏/卫浴套装/厨卫拉篮"
+  },
+  {
+    "一级类目": "五金工具",
+    "二级类目": "机械锁/家用五金/手动工具/电动工具/测量工具/劳防用品/工具组套/特殊商品/仪器仪表/工具配件/气动工具/机电五金/电子锁/搬运设备/起重设备/道路护栏板"
+  },
+  {
+    "一级类目": "电工电料",
+    "二级类目": "开关插座/配电箱/断路器/电线/电缆/电料配件/特殊商品/门铃/光伏设备/电气控制"
+  },
+  {
+    "一级类目": "墙地面材料",
+    "二级类目": "壁纸/瓷砖/地板/特殊商品/背景墙"
+  },
+  {
+    "一级类目": "装饰材料",
+    "二级类目": "吊顶/散热器/门/窗/移门壁柜/壁炉/壁挂炉/地暖/特殊商品/阳光房"
+  },
+  {
+    "一级类目": "基建材料",
+    "二级类目": "沙/石/水泥/木材/板材/涂刷化工类辅料/油漆/涂料/管材管件/型材/化工产品/基建辅料"
+  },
+  {
+    "一级类目": "基建辅助设施",
+    "二级类目": "施工围挡/安全爬梯/施工喷淋系统/活动板房"
+  },
+  {
+    "一级类目": "手机通讯",
+    "二级类目": "手机",
+    "三级类目": "手机"
+  },
+  {
+    "一级类目": "手机配件",
+    "二级类目": "手机耳机/蓝牙耳机/手机壳/保护套/手机贴膜/创意配件/手机存储卡/手机饰品/拍照配件/手机支架/手机电池/移动电源/苹果周边/充电器/数据线/手机信号增强器/无线充电"
+  },
+  {
+    "一级类目": "对讲机",
+    "二级类目": "模拟对讲机/数字对讲机/公网对讲机/对讲机配件"
+  },
+  {
+    "一级类目": "鞋靴",
+    "二级类目": "流行男鞋",
+    "三级类目": "正装鞋/商务休闲鞋/休闲鞋/凉鞋/沙滩鞋/传统布鞋/拖鞋/人字拖/男靴/鞋配件/功能鞋/雨鞋/雨靴/帆布鞋/增高鞋/工装鞋/定制鞋/皮鞋/板鞋"
+  },
+  {
+    "一级类目": "时尚女鞋",
+    "二级类目": "单鞋/鱼嘴鞋/休闲鞋/凉鞋/布鞋/绣花鞋/雪地靴/踝靴/高跟鞋/帆布鞋/拖鞋/人字拖/女靴/雨鞋/雨靴/妈妈鞋/鞋配件/特色鞋/马丁靴/坡跟鞋/松糕鞋/内增高/防水台/洞洞鞋"
+  },
+  {
+    "一级类目": "生鲜",
+    "二级类目": "水果",
+    "三级类目": "苹果/橙子/奇异果/猕猴桃/车厘子/樱桃/芒果/蓝莓/火龙果/葡萄/提子/柚子/香蕉/牛油果/梨/菠萝/凤梨/桔/橘/柠檬/草莓/桃/李/杏/更多水果/水果礼盒/券/瓜/榴莲/百香果/龙眼/椰青/石榴/荔枝/枣/山竹/木瓜/"
+  },
+  {
+    "一级类目": "海鲜水产",
+    "二级类目": "海参/鱼类/虾类/蟹类/贝类/海产干货/其他水产/海产礼盒/软足类/藻类/海鲜制品/海鲜卡券"
+  },
+  {
+    "一级类目": "蔬菜",
+    "二级类目": "叶菜类/茄果瓜类/根茎类/鲜菌菇/葱姜蒜椒/半加工蔬菜"
+  },
+  {
+    "一级类目": "猪牛羊肉",
+    "二级类目": "猪肉/牛肉/羊肉/内脏类/其它肉类"
+  },
+  {
+    "一级类目": "禽肉蛋品",
+    "二级类目": "蛋类/鸡肉/鸭肉/其他禽类"
+  },
+  {
+    "一级类目": "面点烘焙",
+    "二级类目": "水饺/馄饨/汤圆/元宵/面点/低温粽子/低温月饼/新鲜蛋糕/其他西点/蛋挞/披萨"
+  },
+  {
+    "一级类目": "乳品冷饮",
+    "二级类目": "冷藏饮料/冰淇淋/低温奶/奶酪黄油"
+  },
+  {
+    "一级类目": "速食熟食",
+    "二级类目": "火锅丸料/肉制品"
+  },
+  {
+    "一级类目": "半成品菜/方便菜",
+    "二级类目": "佛跳墙/花椒鸡/羊蝎子/关东煮/酸菜鱼/煲仔饭/其他方便菜"
+  },
+  {
+    "一级类目": "酒类",
+    "二级类目": "白酒",
+    "三级类目": "白酒"
+  },
+  {
+    "一级类目": "葡萄酒",
+    "二级类目": "葡萄酒"
+  },
+  {
+    "一级类目": "洋酒",
+    "二级类目": "白兰地/干邑/威士忌/伏特加/力娇酒/朗姆酒/龙舌兰/金酒/清酒/烧酒/鸡尾酒/预调酒/其它洋酒/果酒"
+  },
+  {
+    "一级类目": "啤酒",
+    "二级类目": "啤酒"
+  },
+  {
+    "一级类目": "黄酒/养生酒",
+    "二级类目": "黄酒/养生酒"
+  },
+  {
+    "一级类目": "收藏酒/陈年老酒",
+    "二级类目": "收藏酒/陈年老酒"
+  },
+  {
+    "一级类目": "农资园艺",
+    "二级类目": "园林/农耕",
+    "三级类目": "农业机械/工具/农机整机/小型农机具/农机配件/微耕机/喷雾器/割草机/园林机械"
+  },
+  {
+    "一级类目": "花卉绿植",
+    "二级类目": "花卉/苗木/绿植盆栽/多肉植物/微景观/大型绿植"
+  },
+  {
+    "一级类目": "种子",
+    "二级类目": "瓜果类/蔬菜/菌类/花草林木类/粮油作物种子/种球"
+  },
+  {
+    "一级类目": "农药",
+    "二级类目": "除草剂/杀菌剂/杀虫剂/杀螨剂/杀螺剂/杀线虫剂/植物生长调节剂/农药助剂"
+  },
+  {
+    "一级类目": "肥料",
+    "二级类目": "氮肥/磷肥/钾肥/复合肥/有机肥/微生物肥料/水溶肥/叶面肥/土壤调理剂/钙镁/硅肥"
+  },
+  {
+    "一级类目": "饲料",
+    "二级类目": "全价料/浓缩料/饲料添加剂/预混料/饲料原料"
+  },
+  {
+    "一级类目": "兽药",
+    "二级类目": "中兽药/西兽药/疫苗"
+  },
+  {
+    "一级类目": "养殖器具",
+    "二级类目": "兽医器具/猪用器具/牛羊器具/禽类器具/水产器具/养蜂器具/其他养殖器具"
+  },
+  {
+    "一级类目": "园艺用品",
+    "二级类目": "花盆花器/园艺工具/灌溉设备/篱笆栅栏/爬藤架/基质/营养土/园艺肥料/园艺药剂/园艺辅材"
+  },
+  {
+    "一级类目": "农膜遮网/大棚",
+    "二级类目": "农用薄膜/农用篷布/铁丝网/防虫网/遮阳网/温室大棚支架"
+  },
+  {
+    "一级类目": "工业品",
+    "二级类目": "安防用品",
+    "三级类目": "消防器材/安全器具/应急处理/监控设备/安全警示标识"
+  },
+  {
+    "一级类目": "标签包装",
+    "二级类目": "包装工具/包装耗材/标签打印设备/标签打印耗材"
+  },
+  {
+    "一级类目": "搬运存储",
+    "二级类目": "搬运设备/存储设备"
+  },
+  {
+    "一级类目": "中低压配电",
+    "二级类目": "断路器/连接器/保护器/变压器/电容器/电抗器/控制器/互感器/电力仪表/供电保护系统装置/防爆电气/控制柜箱/电缆桥架"
+  },
+  {
+    "一级类目": "焊接用品",
+    "二级类目": "焊接设备/焊接耗材"
+  },
+  {
+    "一级类目": "个人防护",
+    "二级类目": "头部防护/眼脸部防护/听力防护/呼吸防护/手部防护/身体防护/足部防护/坠落防护/个人卫生/静电无尘/焊接防护"
+  },
+  {
+    "一级类目": "金属加工",
+    "二级类目": "刃具/磨具磨料/机床/钻床/铣床/小型机械/金属加工配件"
+  },
+  {
+    "一级类目": "清洁用品",
+    "二级类目": "清洁设备/工业擦拭/清洁工具/洗手间用品/地垫及矿棉板/吸附用品/垃圾处理设施"
+  },
+  {
+    "一级类目": "公共设施",
+    "二级类目": "照明/流体相关/暖通"
+  },
+  {
+    "一级类目": "紧固密封件",
+    "二级类目": "密封件/紧固件/小五金及其他"
+  },
+  {
+    "一级类目": "气动液压",
+    "二级类目": "气动元件/液压元件"
+  },
+  {
+    "一级类目": "动力传动",
+    "二级类目": "轴承及其工具/皮带/滑轨及其附件/自动化零部件"
+  },
+  {
+    "一级类目": "起重设备",
+    "二级类目": "千斤顶/起重葫芦/搬运车/脚手架/起重滑车/起重吊钳/牵引器/钢丝绳/其它起重工具"
+  },
+  {
+    "一级类目": "模块电源",
+    "二级类目": "DC/DC转换器/功率逆变器/功率调节器/AC/DC转换器/AC输入模块/电子电池/超级电容器"
+  },
+  {
+    "一级类目": "无线模块与适配器",
+    "二级类目": "射频模块/识别模块/接口模块/通信与网络模块/模块附件"
+  },
+  {
+    "一级类目": "机电器件",
+    "二级类目": "屏幕/声学器件/开发板/开发工具/Packing包装/PCB电路板/外壳组件/电子开关"
+  },
+  {
+    "一级类目": "工控自动化",
+    "二级类目": "按钮/指示灯/接触器/继电器/启动器/变频器/发电设备/电机/工控传感器/工控编码器/PLC/人机界面/工业通讯"
+  },
+  {
+    "一级类目": "电料辅件",
+    "二级类目": "电力金具/安全工器具/其他电料辅件"
+  },
+  {
+    "一级类目": "电线电缆",
+    "二级类目": "电气装备电缆/电力电缆/通信/光缆/裸线类/绕组线类"
+  },
+  {
+    "一级类目": "原材料",
+    "二级类目": "化纤原料/有机化工原料/无机化工原料/石油化工原料/印染化工原料"
+  },
+  {
+    "一级类目": "家纺",
+    "二级类目": "床上用品",
+    "三级类目": "三件套/四件套/多件套/羽绒被/羽毛被/蚕丝被/羊毛被/驼毛被/纤维被/棉花被/乳胶枕/记忆枕/花草枕/纤维枕/羽绒枕/蚕丝枕/蚊帐/牛皮席/草席/藤席/竹席/冰丝席/粗布凉席/其它凉席/床单/床笠/毛毯/床垫/床褥/被套/枕巾枕套/电热毯/水暖毯/床帘/乳胶被/颈椎枕"
+  },
+  {
+    "一级类目": "居家布艺",
+    "二级类目": "毛巾/浴巾/毛巾礼盒套装/地毯/地垫/抱枕靠垫/桌布/罩件/沙发垫套/窗帘/窗纱/特殊商品/布料/坐垫/挂毯/壁毯"
+  },
+  {
+    "一级类目": "家庭清洁/纸品",
+    "二级类目": "清洁纸品",
+    "三级类目": "抽纸/卷纸/手帕纸/湿巾/厨房纸巾/湿厕纸/其它纸品/湿巾"
+  },
+  {
+    "一级类目": "清洁用具",
+    "二级类目": "一次性清洁用品/垃圾袋/垃圾桶/拖把/扫把/脸盆/水桶/抹布/百洁布/手套/鞋套/围裙/清洁刷具/其它清洁工具/清洁用具配件"
+  },
+  {
+    "一级类目": "衣物清洁",
+    "二级类目": "洗衣液/洗衣粉/洗衣皂/护理剂/除菌剂/其它衣物清洁/洗衣凝珠"
+  },
+  {
+    "一级类目": "家庭环境清洁",
+    "二级类目": "洗洁精/油污清洁剂/除湿干燥剂/洁厕剂/家电清洁用品/消毒液/地板清洁剂/其它清洁用品"
+  },
+  {
+    "一级类目": "驱蚊驱虫",
+    "二级类目": "驱蚊/蝇/小强/蚁类药/灭鼠药"
+  },
+  {
+    "一级类目": "皮具护理",
+    "二级类目": "皮具护理品/护理工具"
+  },
+  {
+    "一级类目": "个人护理",
+    "二级类目": "洗发护发",
+    "三级类目": "洗发水/护发素/发膜/营养水/护发精华/洗护套装/其它洗护发产品"
+  },
+  {
+    "一级类目": "美发假发/造型",
+    "二级类目": "染发产品/烫发产品/啫喱膏/水/发蜡/泥/弹力素/发胶/摩丝/蓬蓬粉/造型喷雾/乳/其它美发/造型产品/马尾假发/发套假发/刘海假发/其它假发/美发工具"
+  },
+  {
+    "一级类目": "身体护理",
+    "二级类目": "身体乳/油/沐浴露/香皂/浴盐/洗手液/护手霜/手膜/足膜/护足霜/足贴/足浴粉/足浴盐/花露水/走珠/止汗露/男士私处洗液/脱毛工具/护理工具/身体护理套装/其它身体护理/纤体塑形/胸部护理/颈部护理/精油/爽身粉/按摩膏/磨砂膏/暖宝宝/喉鼻护理/手部护理/足部护理"
+  },
+  {
+    "一级类目": "女性护理",
+    "二级类目": "卫生巾/卫生棉条/卫生护垫/私密护理/女性护理套装/其它女性护理产品/裤型卫生巾"
+  },
+  {
+    "一级类目": "口腔护理",
+    "二级类目": "牙膏/牙粉/牙贴/牙刷/牙线/牙签/牙缝刷/漱口水/口腔喷剂/假牙清洁/口腔护理套装/其它口腔护理产品"
+  },
+  {
+    "一级类目": "个护仪器",
+    "二级类目": "吹风机/电动剃须刀/电动牙刷/电动牙刷头/剃毛器/脱毛器/美容器/洁面仪/卷发器/直发器/理发器/冲牙器/其它个护仪器/眼部按摩仪/喷雾补水仪/清洁仪/导入/导出仪/睫毛卷翘器/黑头仪"
+  },
+  {
+    "一级类目": "箱包皮具",
+    "二级类目": "潮流女包",
+    "三级类目": "钱包/手拿包/单肩包/双肩包/手提包/斜挎包/钥匙包/卡包/零钱包/特殊商品/化妆包"
+  },
+  {
+    "一级类目": "精品男包",
+    "二级类目": "商务公文包/男士钱包/男士手包/双肩包/单肩/斜挎包/钥匙包/特殊商品/卡包名片夹/手机包/证件包"
+  },
+  {
+    "一级类目": "功能箱包",
+    "二级类目": "登山包/旅行包/拉杆箱/电脑包/休闲运动包/旅行配件/书包/腰包/胸包/特殊商品/拉杆包"
+  },
+  {
+    "一级类目": "箱包皮具配件",
+    "二级类目": "男士皮带/箱包配件/皮带礼盒/女士皮带"
+  },
+  {
+    "一级类目": "艺术品",
+    "二级类目": "陶瓷",
+    "三级类目": "其他陶瓷"
+  },
+  {
+    "一级类目": "其他",
+    "二级类目": "会员卡券",
+    "三级类目": "预付卡"
+  },
+  {
+    "一级类目": "航空兑换卡"
+  },
+  {
+    "一级类目": "邮费",
+    "二级类目": "邮费"
+  },
+  {
+    "一级类目": "差价",
+    "二级类目": "差价"
+  },
+  {
+    "一级类目": "团购促销",
+    "二级类目": "优惠券"
+  },
+  {
+    "一级类目": "赠品",
+    "二级类目": "赠品(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "旅游休闲",
+    "二级类目": "本地玩乐",
+    "三级类目": "其他线下活动/艺术展览/体育赛事/音乐/舞蹈/戏曲演出/动漫展览/综合健身/瑜伽/健美操/羽毛球馆/游泳/滑雪场/酒吧/密室/蹦床"
+  },
+  {
+    "一级类目": "电影票"
+  },
+  {
+    "一级类目": "旅游度假",
+    "二级类目": "私人定制游/国内旅游/出境旅游/周边/当地游/亲子游玩"
+  },
+  {
+    "一级类目": "酒店预订",
+    "二级类目": "酒店套餐/国际酒店/国内酒店"
+  },
+  {
+    "一级类目": "门票",
+    "二级类目": "景区门票"
+  },
+  {
+    "一级类目": "教育培训",
+    "二级类目": "生活兴趣",
+    "三级类目": "文艺修养/其他兴趣生活/境内游学/境外游学/体育运动/健康养生/健身健美/烹饪/摄影摄像/舞蹈表演/沟通主持/书法绘画/音乐才艺/时尚穿搭/礼仪气质/美容美发/护肤美妆/收纳技巧"
+  },
+  {
+    "一级类目": "学历资格/职业技能培训",
+    "二级类目": "公职考试培训/会计考试培训/教师资格培训/其他学历/资格考试/办公技能/出国留学/考研辅导/自媒体运营/互联网产品与运营/电子商务/驾驶技能/烹饪烘焙小吃餐饮培训/设计创作/影音游戏动画/项目管理培训/经济师培训/职业发展/人力资源/管理营销/财税法培训/财务/会计培训/公务员培训/IT职业/编程/计算机/建筑地产类培训/司法考试/医学类资格认证/远程网络教育培训/自学考试培训/笔译服务/方案策划/口译服务/宣传文案"
+  },
+  {
+    "一级类目": "青少年素质教育",
+    "二级类目": "青少年素质培养/家长教育/启蒙早教"
+  },
+  {
+    "一级类目": "语言培训",
+    "二级类目": "英语/德语/法语/俄语/韩语/汉语学习/葡萄牙语/日语/西班牙语/其他语种"
+  },
+  {
+    "一级类目": "学习/读书卡",
+    "二级类目": "学习/读书卡"
+  },
+  {
+    "一级类目": "创业理财",
+    "二级类目": "创业知识"
+  },
+  {
+    "一级类目": "情感心理",
+    "二级类目": "恋爱技巧/两性关系/婚姻经营/心理成长"
+  },
+  {
+    "一级类目": "本地教育培训",
+    "二级类目": "成人语言线下培训/少儿才艺/学历/职业考试线下/早教中心/少儿体育培训/其他本地教育"
+  },
+  {
+    "一级类目": "珠宝首饰",
+    "二级类目": "黄金",
+    "三级类目": "黄金吊坠/黄金手镯/黄金戒指/黄金耳饰/黄金转运珠/黄金项链/黄金手链&脚链/金条/其他金工"
+  },
+  {
+    "一级类目": "银饰",
+    "二级类目": "银吊坠&项链/银手链&脚链/银戒指/宝宝银饰/银手镯/银耳饰/特殊商品"
+  },
+  {
+    "一级类目": "钻石",
+    "二级类目": "裸钻/钻戒/钻石项链&吊坠/钻石耳饰/钻石手镯&手链/定制定金补差/特殊商品"
+  },
+  {
+    "一级类目": "翡翠",
+    "二级类目": "翡翠吊坠/翡翠手镯/翡翠戒指/翡翠耳饰/挂件&摆件&把件/特殊商品"
+  },
+  {
+    "一级类目": "水晶玛瑙",
+    "二级类目": "项链&吊坠/耳饰/手镯&手链&脚链/戒指/头饰&胸针/摆件&挂件/特殊商品"
+  },
+  {
+    "一级类目": "彩宝",
+    "二级类目": "琥珀&蜜蜡/碧玺/红宝石&蓝宝石/坦桑石/珊瑚/祖母绿/其他天然宝石/葡萄石/定制定金补差"
+  },
+  {
+    "一级类目": "铂金",
+    "二级类目": "铂金项链/铂金手镯&手链&脚链/铂金戒指/铂金耳饰/铂金吊坠"
+  },
+  {
+    "一级类目": "珍珠",
+    "二级类目": "珍珠项链/珍珠吊坠/珍珠耳饰/珍珠手链/珍珠戒指/珍珠胸针/特殊商品/珍珠裸珠"
+  },
+  {
+    "一级类目": "K金饰品",
+    "二级类目": "K金吊坠/K金项链/K金手镯&手链&脚链/K金戒指/K金耳饰"
+  },
+  {
+    "一级类目": "和田玉",
+    "二级类目": "和田玉项链/和田玉吊坠/和田玉手镯/和田玉手链/和田玉戒指/和田玉耳饰/特殊商品"
+  },
+  {
+    "一级类目": "其他玉石",
+    "二级类目": "青金石/绿松石/蓝田玉/石英岩/岫岩玉"
+  },
+  {
+    "一级类目": "合成/人造宝石",
+    "二级类目": "合成钻石/莫桑石/合成红&蓝宝石/更多合成&人造宝石"
+  },
+  {
+    "一级类目": "珠宝服务",
+    "二级类目": "珠宝维修/珠宝清洗&保养"
+  },
+  {
+    "一级类目": "时尚饰品",
+    "二级类目": "项链/手链&脚链/戒指/耳饰/胸针/婚庆饰品/饰品配件/毛衣链"
+  },
+  {
+    "一级类目": "生活服务",
+    "二级类目": "软件服务",
+    "三级类目": "店铺运营/店铺营销/客户关系管理/数据分析"
+  },
+  {
+    "一级类目": "通信服务",
+    "二级类目": "上网卡/办号卡/流量充值/话费充值/宽带新装/宽带缴费(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "便民服务",
+    "二级类目": "配镜服务"
+  },
+  {
+    "一级类目": "家政",
+    "二级类目": "家政家电维修/家政保洁/搬家"
+  },
+  {
+    "一级类目": "丽人",
+    "二级类目": "美容/美甲/美发"
+  },
+  {
+    "一级类目": "运营服务",
+    "二级类目": "入驻服务/整体托管/客服外包/协运营服务/平面视觉设计/推广代运营/店铺诊断/内容营销/产业园运营"
+  },
+  {
+    "一级类目": "摄影/视频服务/文印",
+    "二级类目": "摄影服务/视频服务/广告制作/印刷"
+  },
+  {
+    "一级类目": "生活缴费",
+    "二级类目": "协会会费/居民用电"
+  },
+  {
+    "一级类目": "商务服务",
+    "二级类目": "代写服务"
+  },
+  {
+    "一级类目": "法律服务",
+    "二级类目": "法律咨询/律师服务"
+  },
+  {
+    "一级类目": "房地产",
+    "二级类目": "权益券"
+  },
+  {
+    "一级类目": "预约服务(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "金融服务",
+    "二级类目": "保险(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "餐饮",
+    "二级类目": "餐饮/餐饮预付卡/餐饮优惠/兑换券"
+  },
+  {
+    "一级类目": "装修服务",
+    "二级类目": "整体全包/整体半包/局部装修/安装服务/装修监理/装修设计"
+  },
+  {
+    "一级类目": "公益服务",
+    "二级类目": "公益",
+    "三级类目": "义卖商品"
+  },
+  {
+    "一级类目": "出行与交通",
+    "二级类目": "打车(网约车)",
+    "三级类目": "专车/快车(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "顺风车(拼车)",
+    "二级类目": "顺风车(拼车)(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "出租车",
+    "二级类目": "出租车(仅适用于自定义版交易组件)"
+  },
+  {
+    "一级类目": "充电服务",
+    "二级类目": "充电服务"
+  },
+  {
+    "一级类目": "票务",
+    "二级类目": "机票/代金券/优惠券"
+  },
+  {
+    "一级类目": "图书",
+    "二级类目": "小说",
+    "三级类目": "中国近现代小说"
+  },
+  {
+    "一级类目": "文学",
+    "二级类目": "文学理论"
+  },
+  {
+    "一级类目": "传记",
+    "二级类目": "经典传记"
+  },
+  {
+    "一级类目": "艺术",
+    "二级类目": "艺术理论与评论"
+  },
+  {
+    "一级类目": "经济",
+    "二级类目": "经典著作"
+  },
+  {
+    "一级类目": "金融与投资",
+    "二级类目": "国际金融"
+  },
+  {
+    "一级类目": "管理",
+    "二级类目": "经典著作"
+  },
+  {
+    "一级类目": "励志与成功",
+    "二级类目": "经典著作"
+  },
+  {
+    "一级类目": "健身与保健",
+    "二级类目": "养生"
+  },
+  {
+    "一级类目": "育儿/家教",
+    "二级类目": "育儿百科"
+  },
+  {
+    "一级类目": "旅游/地图",
+    "二级类目": "旅游指南"
+  },
+  {
+    "一级类目": "动漫/卡通",
+    "二级类目": "连环画"
+  },
+  {
+    "一级类目": "历史",
+    "二级类目": "历史著作"
+  },
+  {
+    "一级类目": "哲学/宗教",
+    "二级类目": "哲学经典著作"
+  },
+  {
+    "一级类目": "国学/古籍",
+    "二级类目": "国学普及读物"
+  },
+  {
+    "一级类目": "政治/军事",
+    "二级类目": "世界军事"
+  },
+  {
+    "一级类目": "法律",
+    "二级类目": "经典著作"
+  },
+  {
+    "一级类目": "心理学",
+    "二级类目": "社会心理学"
+  },
+  {
+    "一级类目": "文化",
+    "二级类目": "文化研究"
+  },
+  {
+    "一级类目": "社会科学",
+    "二级类目": "经典著作"
+  },
+  {
+    "一级类目": "工业技术",
+    "二级类目": "一般工业技术"
+  },
+  {
+    "一级类目": "建筑",
+    "二级类目": "城市规划、城市设计"
+  },
+  {
+    "一级类目": "医学",
+    "二级类目": "医学理论与研究"
+  },
+  {
+    "一级类目": "科学与自然",
+    "二级类目": "自然科学"
+  },
+  {
+    "一级类目": "计算机与互联网",
+    "二级类目": "IT人文/互联网"
+  },
+  {
+    "一级类目": "体育/运动",
+    "二级类目": "休闲运动"
+  },
+  {
+    "一级类目": "中小学教辅",
+    "二级类目": "学习方法/报考指南"
+  },
+  {
+    "一级类目": "考试",
+    "二级类目": "其他资格/职称考试"
+  },
+  {
+    "一级类目": "外语学习",
+    "二级类目": "外语教学/学术著作"
+  },
+  {
+    "一级类目": "字典词典/工具书",
+    "二级类目": "英汉/汉英词典"
+  },
+  {
+    "一级类目": "杂志/期刊",
+    "二级类目": "生活休闲"
+  },
+  {
+    "一级类目": "报纸",
+    "二级类目": "时政新闻/财经商业/文化休闲"
+  },
+  {
+    "一级类目": "烹饪/美食",
+    "二级类目": "家常菜谱"
+  },
+  {
+    "一级类目": "时尚/美妆",
+    "二级类目": "时尚生活"
+  },
+  {
+    "一级类目": "家居",
+    "二级类目": "家装饰品"
+  },
+  {
+    "一级类目": "娱乐/休闲",
+    "二级类目": "休闲游戏"
+  },
+  {
+    "一级类目": "科普读物",
+    "二级类目": "科普图鉴"
+  },
+  {
+    "一级类目": "电子与通信",
+    "二级类目": "基础与理论"
+  },
+  {
+    "一级类目": "农业/林业",
+    "二级类目": "农业基础科学"
+  },
+  {
+    "一级类目": "大中专教材教辅",
+    "二级类目": "职业培训教材"
+  },
+  {
+    "一级类目": "文化用品",
+    "二级类目": "教学/展示用品"
+  },
+  {
+    "一级类目": "绘画",
+    "二级类目": "其他绘画"
+  },
+  {
+    "一级类目": "摄影",
+    "二级类目": "摄影技法"
+  },
+  {
+    "一级类目": "孕产/胎教",
+    "二级类目": "孕产妇饮食/保健"
+  },
+  {
+    "一级类目": "书法",
+    "二级类目": "技法/教程"
+  },
+  {
+    "一级类目": "音乐",
+    "二级类目": "音乐赏析"
+  },
+  {
+    "一级类目": "文玩",
+    "二级类目": "文房用品",
+    "三级类目": "笔/笔筒/笔具/墨/墨盒/水盂/砚滴/砚屏/砚台/纸/纸具"
+  },
+  {
+    "一级类目": "书法/绘画",
+    "二级类目": "书法/绘画"
+  },
+  {
+    "一级类目": "沉香木",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "核桃木",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "黄花梨",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "金丝楠木",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "金刚菩提",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "檀香木",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "小叶紫檀",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "铜器",
+    "二级类目": "香炉/铜镜/铜壶"
+  },
+  {
+    "一级类目": "陶瓷",
+    "二级类目": "景德镇陶瓷"
+  },
+  {
+    "一级类目": "建盏",
+    "二级类目": "摆件"
+  },
+  {
+    "一级类目": "紫砂",
+    "二级类目": "摆件"
+  },
+  {
+    "一级类目": "文玩杂项",
+    "二级类目": "天珠/印章/鼻烟壶/打火机/竹雕/竹编/漆器/文玩葫芦/檀香/扇/乐器/风筝/灯彩/剪纸/唐卡/草编/柳编"
+  },
+  {
+    "一级类目": "橄榄核/核桃",
+    "二级类目": "手串/吊坠/把件"
+  },
+  {
+    "一级类目": "纺染织绣",
+    "二级类目": "刺绣/纺织/印染"
+  },
+  {
+    "一级类目": "膳食营养补充食品",
+    "二级类目": "海外膳食营养补充食品",
+    "三级类目": "蛋白粉/氨基酸/胶原蛋白/动物精华/提取物/运动营养食品/海洋生物类/菌/菇/酵素/其他膳食营养补充食品/膳食纤维/碳水化合物/维生素/矿物质/钙铁锌硒/脂肪酸/脂类/植物精华/提取物"
+  },
+  {
+    "一级类目": "普通膳食营养补充食品",
+    "二级类目": "蛋白粉/氨基酸/胶原蛋白/动物精华/提取物/海洋生物类/菌/菇/酵素/膳食纤维/碳水化合物/维生素/矿物质/钙铁锌硒/运动营养食品/脂肪酸/脂类/植物精华/提取物"
+  }
+]'
+);

+ 51 - 0
config/env/localhost.php

@@ -0,0 +1,51 @@
+<?php
+return array
+(
+    'db' => array
+    (
+        'type' => 'Pdo',
+        'host' => 'web-mysql',
+        'port' => '3306',
+        'name' => DEVER_PROJECT,
+        'user' => 'root',
+        'pwd' => '123456',
+    ),
+
+    'log' => array
+    (
+        'type' => 'Mongo',
+        'host' => 'web-mongodb',
+        'port' => '27017',
+        'name' => DEVER_PROJECT,
+        'user' => 'dever',
+        'pwd' => 'dever20241685267915',
+
+        # 暂时用mysql
+        /*
+        'type' => 'Pdo',
+        'host' => 'web-mysql',
+        'port' => '3306',
+        'name' => DEVER_PROJECT,
+        'user' => 'root',
+        'pwd' => '123456',
+        */
+
+        /*
+        'type' => 'Influxdb',
+        'host' => 'http://web-influx:8086',
+        'token' => 'w2u7KOsNxtaYBLb0EOmMpeZ4AvrDcZtpSbqcIrrO0WkQjhpQNmMm_B4WQeJtb6GpfrohOPA-SxaI0FmBSkYHhg==',
+        'name' => DEVER_PROJECT,
+        'user' => 'shemic',
+        'precision' => 's',
+        */
+    ),
+
+    'redis' => array
+    (
+        'host' => 'server-redis', 
+        'port' => '6379', 
+        'password' => 
+        'dm_redis_123', 
+        'expire' => 2147483647
+    ),
+);

+ 87 - 0
config/manage.php

@@ -0,0 +1,87 @@
+<?php
+# 后台配置
+return array
+(
+    # 设置系统
+    'system' => array
+    (
+        'sector' => array
+        (
+            'name' => '领域系统',
+            'sort' => '1',
+            'partition' => 'database.database',
+            'info_table' => 'sector/info',
+            'user_table' => 'sector/user',
+            'role_table' => 'sector/role',
+        ),
+    ),
+
+    # 设置模块
+    'module' => array
+    (
+        # 领域系统下有三个模块,领域基础模块、领域账户模块、领域空间模块
+        'sector' => array
+        (
+            'system' => 'sector',
+            'name' => '领域',
+            'sort' => '1',
+            'data_table' => 'sector/info',
+        ),
+
+        'sector_user' => array
+        (
+            'system' => 'sector',
+            'name' => '账户',
+            'sort' => '2',
+            'data_table' => 'sector/user',
+            'data_where' => array('id' => '{uid}'),
+        ),
+
+        'sector_place' => array
+        (
+            'system' => 'sector',
+            'name' => '身份',
+            'sort' => '3',
+            'data_table' => 'place/info',
+            'data_where' => array('uid' => '{uid}'),
+        ),
+    ),
+
+    # 父级菜单
+    'menu' => array
+    (
+        # 领域身份模块下的菜单
+        'sector_place_order' => array
+        (
+            'name' => '订单',
+            'icon' => 'shopping-cart-2-line',
+            'sort' => '98',
+            'module' => 'sector_place',
+            'app' => 'place_order',
+        ),
+        'sector_place_source' => array
+        (
+            'name' => '资源',
+            'icon' => 'settings-line',
+            'sort' => '100',
+            'module' => 'sector_place',
+            'app' => 'place_source',
+        ),
+        'sector_place_channel' => array
+        (
+            'name' => '渠道',
+            'icon' => 'album-line',
+            'sort' => '101',
+            'module' => 'sector_place',
+            'app' => 'place_channel',
+        ),
+        'sector_place_set' => array
+        (
+            'name' => '配置',
+            'icon' => 'settings-2-line',
+            'sort' => '114',
+            'module' => 'sector_place',
+            'app' => 'place',
+        ),
+    )
+);

+ 95 - 0
config/setting.php

@@ -0,0 +1,95 @@
+<?php
+return array
+(
+    # 项目通信token
+    'token' => DEVER_PROJECT,
+    # 语言包 暂时无用
+    'lang' => 'zh-cn',
+    'lang_pack' => array('zh-cn' => '简体中文', 'en' => '英文'),
+
+    # 定义类型
+    'type' => array
+    (
+        # 资源
+        1 => 'place_source/info',
+        2 => 'place_source/content',
+        3 => 'place_act/review',
+    ),
+
+    # 路由解析设置
+    'route' => array
+    (
+        'api/notify/(.*?)' => 'notify.common?s=$1',
+    ),
+
+    # 日志设置
+    'log' => array('type' => 'file', 'host' => 'host', 'port' => 'port'),
+
+    # 调试的shell名
+    'shell' => 'debug',
+
+    # 定义session
+    //'session' => array('host' => '', 'port' => '', 'path' => '', 'cookie' => ''),
+
+    # 定义数据库
+    'database' => array
+    (
+        # 是否自动建表 默认为true
+        'create' => true,
+        # sql优化,暂时无用
+        'opt' => true,
+        //'default' => array($env['db'], $env['db1'], 'type' => 'Pdo'),//读写分离
+        'default' => $env['db'],
+        'log' => $env['log'],
+
+        # 分区设置 
+        'partition' => array
+        (
+            # 当前数据库是否支持自动建库,不支持改成false,则database不会自动建库,而是类似table按照表拆分
+            'create' => true,
+            # 类型:database 按照库拆分(分库) table 按照表拆分(分表) field 按照字段拆分(分区) where 按照条件拆分(分条件) Dever::session('database', 1)可以设置值
+            'database' => 'date("Y")',
+            'table' => 'date("Ym")',
+            # 字段类型分几种:range范围、list列表、hash哈希、key分区
+            'field' => array
+            (
+                'type' => 'range',
+                'field' => 'cdate', 
+                'value' => 'date("Y-m-d 23:60:60")'//date("Y-m-d 23:60:60", strtotime("-1 day"))'
+            ),
+            /*
+            'field' => array
+            (
+                'type' => 'list',
+                'field' => 'type', 
+                'value' => array('1', '2', '3'),//3个值3个分区,然后也可以用Dever::call("manage/admin.test")来返回数组
+            ),
+            'field' => array
+            (
+                'type' => 'hash',
+                'field' => 'id', 
+                'value' => '5'//5个分区
+            ),
+            'field' => array
+            (
+                'type' => 'key',
+                'field' => 'id', 
+                'value' => '5'
+            ),*/
+            # where类型,一般在表中设置array('id' => 1),
+            //'where' => 'Dever::call("manage/admin.test")'
+        ),
+    ),
+
+    # 定义模板
+    'template' => array
+    (
+        'name' => 'pc',//模板配置,如果有手机版,直接配置:'pc,mobile'
+        'replace' => array
+        (
+            '../' => '{$host}',
+        ),
+    ),
+    # 定义redis
+    'redis' => $env['redis'],
+);

+ 4 - 0
package/api/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'api');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 4 - 0
package/area/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'area');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 4 - 0
package/email/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'email');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 4 - 0
package/excel/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'excel');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 4 - 0
package/image/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'image');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 4 - 0
package/invite/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'invite');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 4 - 0
package/manage/api/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'manage');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../../boot.php');

+ 38 - 0
package/manage/config.js

@@ -0,0 +1,38 @@
+/**
+ * @description 通用配置
+ */
+let url = ''
+if (location.port == '15000') {
+  //url = 'http://127.0.0.1/dever2/package/manage'
+  url = 'http://127.0.0.1/api2/package/manage/api'
+} else {
+  url = location.origin + location.pathname + 'api'
+}
+deverConfig = {
+  // 一些基本配置,定义后台title
+  setting: {
+    title: '源代宝',
+    tokenTableName: 'dever-yuandaibao-v1',
+    //loginParam: { system: 'group', number: 'default' },
+  },
+  // 网络配置
+  network: {
+    requestTimeout: 1000000,
+    baseURL: url, // 配置服务器地址,
+  },
+  // 默认布局
+  theme: {
+    // 布局种类:横向布局horizontal、纵向布局vertical、分栏布局column、综合布局comprehensive、常规布局common、浮动布局float
+    layout: 'column',
+    // 主题名称:默认blue-black、blue-white、green-black、green-white、渐变ocean、red-white、red-black
+    themeName: 'blue-black',
+    // 菜单背景 none、vab-background
+    background: 'none',
+    // 菜单宽度,仅支持px,建议大小:266px、277px、288px,其余尺寸会影响美观
+    menuWidth: '266px',
+    // 分栏风格(仅针对分栏布局column时生效):横向风格horizontal、纵向风格vertical、卡片风格card、箭头风格arrow
+    columnStyle: 'card',
+    // 显示标签页时标签页样式:卡片风格card、灵动风格smart、圆滑风格smooth
+    tabsBarStyle: 'smooth',
+  },
+}

+ 1 - 0
package/manage/index.html

@@ -0,0 +1 @@
+<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"/><meta content="IE=edge" http-equiv="X-UA-Compatible"/><meta content="webkit" name="renderer"/><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/><link href="favicon.ico" rel="icon"/><title>Dever Manage</title><meta content="Dever,PHP,PHP框架,轻量,微服务,组件化,接口,低代码,后台,自定义后台,开发,快速开发,AI,人工智能,文档,轻应用,应用,时空之翼,神秘城" name="keywords"/><meta content="rabin@shemic.com" name="author"/><link href="static/css/loading.css?random=2024-09-08 10:18:41-shemic" rel="stylesheet"/><script src="config.js?random=1" defer="defer"></script><script defer="defer" src="static/js/app.1c66cf3c.js"></script><script defer="defer" src="static/js/213.803cd5f4.js"></script><link href="static/css/app.d065fbce.css" rel="stylesheet"><link href="static/css/213.89045697.css" rel="stylesheet"></head><body><noscript></noscript><div id="app"><div class="first-loading-wrp"><div class="loading-wrp"><span class="dot dot-spin"><i></i> <i></i> <i></i> <i></i></span></div><h1>Dever Manage</h1></div></div></body></html>

File diff suppressed because it is too large
+ 0 - 0
package/manage/json/china.json


+ 1 - 0
package/manage/sector.html

@@ -0,0 +1 @@
+<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"/><meta content="IE=edge" http-equiv="X-UA-Compatible"/><meta content="webkit" name="renderer"/><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/><link href="favicon.ico" rel="icon"/><title>Dever Manage</title><meta content="Dever,PHP,PHP框架,轻量,微服务,组件化,接口,低代码,后台,自定义后台,开发,快速开发,AI,人工智能,文档,轻应用,应用,时空之翼,神秘城" name="keywords"/><meta content="rabin@shemic.com" name="author"/><link href="static/css/loading.css?random=2024-09-08 10:18:41-shemic" rel="stylesheet"/><script src="sector_config.js" defer="defer"></script><script defer="defer" src="static/js/app.1c66cf3c.js"></script><script defer="defer" src="static/js/213.803cd5f4.js"></script><link href="static/css/app.d065fbce.css" rel="stylesheet"><link href="static/css/213.89045697.css" rel="stylesheet"></head><body><noscript></noscript><div id="app"><div class="first-loading-wrp"><div class="loading-wrp"><span class="dot dot-spin"><i></i> <i></i> <i></i> <i></i></span></div><h1>Dever Manage</h1></div></div></body></html>

+ 38 - 0
package/manage/sector_config.js

@@ -0,0 +1,38 @@
+/**
+ * @description 通用配置
+ */
+let url = ''
+if (location.port == '15000') {
+  //url = 'http://127.0.0.1/dever2/package/manage'
+  url = 'http://127.0.0.1/api2/package/manage/api'
+} else {
+  url = location.origin + location.pathname.replace('sector.html', '') + 'api'
+}
+deverConfig = {
+  // 一些基本配置,定义后台title
+  setting: {
+    title: '源主中台',
+    tokenTableName: 'dever-yuandaibao-v1-sector',
+    loginParam: { system: 'sector', number: 'default' },
+  },
+  // 网络配置
+  network: {
+    requestTimeout: 1000000,
+    baseURL: url, // 配置服务器地址,
+  },
+  // 默认布局
+  theme: {
+    // 布局种类:横向布局horizontal、纵向布局vertical、分栏布局column、综合布局comprehensive、常规布局common、浮动布局float
+    layout: 'column',
+    // 主题名称:默认blue-black、blue-white、green-black、green-white、渐变ocean、red-white、red-black
+    themeName: 'green-black',
+    // 菜单背景 none、vab-background
+    background: 'none',
+    // 菜单宽度,仅支持px,建议大小:266px、277px、288px,其余尺寸会影响美观
+    menuWidth: '266px',
+    // 分栏风格(仅针对分栏布局column时生效):横向风格horizontal、纵向风格vertical、卡片风格card、箭头风格arrow
+    columnStyle: 'arrow',
+    // 显示标签页时标签页样式:卡片风格card、灵动风格smart、圆滑风格smooth
+    tabsBarStyle: 'smart',
+  },
+}

File diff suppressed because it is too large
+ 4 - 0
package/manage/static/css/213.89045697.css


File diff suppressed because it is too large
+ 4 - 0
package/manage/static/css/780.4065063c.css


File diff suppressed because it is too large
+ 6 - 0
package/manage/static/css/app.d065fbce.css


+ 96 - 0
package/manage/static/css/loading.css

@@ -0,0 +1,96 @@
+.first-loading-wrp {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  height: 90vh;
+  min-height: 90vh;
+}
+
+.first-loading-wrp > h1 {
+  font-size: 28px;
+  font-weight: bolder;
+}
+
+.first-loading-wrp .loading-wrp {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: 98px;
+}
+
+.dot {
+  position: relative;
+  box-sizing: border-box;
+  display: inline-block;
+  width: 64px;
+  height: 64px;
+  font-size: 64px;
+  transform: rotate(45deg);
+  animation: antRotate 1.2s infinite linear;
+}
+
+.dot i {
+  position: absolute;
+  display: block;
+  width: 28px;
+  height: 28px;
+  background-color: #1890ff;
+  border-radius: 100%;
+  opacity: 0.3;
+  transform: scale(0.75);
+  transform-origin: 50% 50%;
+  animation: antSpinMove 1s infinite linear alternate;
+}
+
+.dot i:nth-child(1) {
+  top: 0;
+  left: 0;
+}
+
+.dot i:nth-child(2) {
+  top: 0;
+  right: 0;
+  -webkit-animation-delay: 0.4s;
+  animation-delay: 0.4s;
+}
+
+.dot i:nth-child(3) {
+  right: 0;
+  bottom: 0;
+  -webkit-animation-delay: 0.8s;
+  animation-delay: 0.8s;
+}
+
+.dot i:nth-child(4) {
+  bottom: 0;
+  left: 0;
+  -webkit-animation-delay: 1.2s;
+  animation-delay: 1.2s;
+}
+
+@keyframes antRotate {
+  to {
+    -webkit-transform: rotate(405deg);
+    transform: rotate(405deg);
+  }
+}
+
+@-webkit-keyframes antRotate {
+  to {
+    -webkit-transform: rotate(405deg);
+    transform: rotate(405deg);
+  }
+}
+
+@keyframes antSpinMove {
+  to {
+    opacity: 1;
+  }
+}
+
+@-webkit-keyframes antSpinMove {
+  to {
+    opacity: 1;
+  }
+}

File diff suppressed because it is too large
+ 4 - 0
package/manage/static/css/vab-chunk-c6f52c3a.949c12f9.css


File diff suppressed because it is too large
+ 4 - 0
package/manage/static/css/vab-plugins.f6f5c03c.css


BIN
package/manage/static/fonts/remixicon.31d28485.f12fd1a0.eot


BIN
package/manage/static/fonts/remixicon.881fbc46.1e0fb76b.woff


BIN
package/manage/static/fonts/remixicon.888e61f0.e313410c.ttf


BIN
package/manage/static/fonts/remixicon.9915fef9.5400338c.woff2


BIN
package/manage/static/img/403.d6bd8853.png


BIN
package/manage/static/img/404.f02775f8.png


BIN
package/manage/static/img/background-1.31e3a0ac.png


BIN
package/manage/static/img/background.2f742bae.jpg


BIN
package/manage/static/img/login_form.242d2e10.png


File diff suppressed because it is too large
+ 153 - 0
package/manage/static/img/remixicon.95138f36.2b2ee314.svg


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/213.803cd5f4.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/592.41e25131.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/780.f3d655d2.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/962.faf0c7f7.js


File diff suppressed because it is too large
+ 4 - 0
package/manage/static/js/app.1c66cf3c.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/vab-chunk-0b9a05e8.3a2acba3.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/vab-chunk-54e012b3.e33f7ef1.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/vab-chunk-844ca20f.8fd468cb.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/vab-chunk-b3a4eaa1.14c91d44.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/vab-chunk-c6f52c3a.7a551d81.js


File diff suppressed because it is too large
+ 5 - 0
package/manage/static/js/vab-plugins.b5bf78de.js


+ 4 - 0
package/msg/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'msg');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 4 - 0
package/pinyin/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'pinyin');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 1 - 0
package/readme

@@ -0,0 +1 @@
+dever create

+ 4 - 0
package/upload/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'upload');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../boot.php');

+ 3 - 0
server.php

@@ -0,0 +1,3 @@
+<?php
+define('DEVER_SERVER', '80');
+include('boot.php');

+ 42 - 0
src/cate/api/Icon.php

@@ -0,0 +1,42 @@
+<?php namespace Cate\Api;
+use Dever;
+class Icon
+{
+    public function getList()
+    {
+        $id = Dever::input('id');
+        $name = Dever::input('name');
+        $where = array();
+        if ($name && $name != '{name}') {
+            $where['search_name'] = array('like', $name);
+        }
+        $list = array();
+        if ($id) {
+            $info = Dever::db('icon', 'cate')->find($id);
+            if ($info) {
+                $this->getSvg($info);
+                $info['class'] = 'show-selector-active';
+                $list[] = $info;
+            }
+        }
+        $set['num'] = 12;
+        $data = Dever::db('icon', 'cate')->select($where, $set);
+        foreach ($data as $k => $v) {
+            if ($id && $v['id'] == $id) {
+                continue;
+            }
+            $this->getSvg($v);
+            $list[] = $v;
+        }
+        return array('list' => $list, 'total' => Dever::page('total'));
+    }
+
+    private function getSvg(&$v)
+    {
+        $v['type'] = 'svg';
+        $pattern = '/(width|height): [^;]+;/';
+        $replacement = 'width: 30px; height: 30px;';
+        $v['svg'] = preg_replace($pattern, $replacement, $v['svg']);
+        $v['class'] = '';
+    }
+}

+ 64 - 0
src/cate/api/Info.php

@@ -0,0 +1,64 @@
+<?php namespace Cate\Api;
+use Dever;
+class Info
+{
+    # 导入数据
+    public function import_commit(){}
+    public function import()
+    {
+        $config = Dever::config('cate')['json'];
+        $config = Dever::json_decode($config);
+        foreach ($config as $k => $v) {
+            if ($v) {
+                $v = array_values($v);
+                $t = count($v);
+                if ($t == 3) {
+                    $level_2_sort = 0;
+                    $level_3_sort = 0;
+                    $level_1 = $this->create(1, $k, $v[0]);
+                    $level_2 = $this->create(2, $level_2_sort, $v[1], $level_1);
+                    $this->create(3, $level_3_sort, $v[2], $level_2, $level_1);
+                } elseif ($t == 2) {
+                    $level_2_sort += 1;
+                    $level_2 = $this->create(2, $level_2_sort, $v[0], $level_1);
+                    $this->create(3, $level_3_sort, $v[1], $level_2, $level_1);
+                }
+            }
+        }
+        return 'ok';
+    }
+
+    private function create($level, $sort, $name, $parent_id = false, $top_id = false)
+    {
+        $sort += 1;
+        if ($level == 3 && strstr($name, '/')) {
+            $name = explode('/', $name);
+            foreach ($name as $k => $v) {
+                $this->create($level, $k, $v, $parent_id, $top_id);
+            }
+            return;
+        }
+        $data['sort'] = $sort;
+        if ($name == '其他') {
+            $data['sort'] = 10000;
+        }
+        $data['name'] = $name;
+        if ($parent_id) {
+            $data['parent_id'] = $parent_id;
+        }
+        if ($top_id) {
+            $data['top_id'] = $top_id;
+            $data['parent'] = $data['top_id'] . ',' . $data['parent_id'];
+        }
+        $icon = Dever::load('icon', 'cate')->get($data['name']);
+        if ($icon) {
+            $data['icon_id'] = $icon['id'];
+        }
+        $db = Dever::db('level_' . $level);
+        $info = $db->find($data);
+        if (!$info) {
+            return $db->insert($data);
+        }
+        return $info['id'];
+    }
+}

+ 6 - 0
src/cate/index.php

@@ -0,0 +1,6 @@
+<?php
+define('DEVER_APP_NAME', 'cate');
+define('DEVER_APP_LANG', '分类');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(DEVER_APP_PATH . '../place/boot.php');
+include(DEVER_APP_PATH . '../../boot.php');

+ 72 - 0
src/cate/lib/Icon.php

@@ -0,0 +1,72 @@
+<?php namespace Cate\Lib;
+use Dever;
+class Icon
+{
+    private $token = 'Y9rt0NCy1H4LZKhxDklRks26';
+    private $cookie = 'cna=/pxEH/gQiVwCAWUeNvDgjxzu; EGG_SESS_ICONFONT=dzIFRF6UFHpWicZx2_bPclFOIt1cQpz_PZTqMLSyvEnnoZwVqWvK7ht2RRKNNSygMgEcp7bWa98XYDNW-LoTE9nMjNLdOSTa9Y6-Rn5H_k6bjWOLDvZKzgsypKSm2zK0qd29cv9I1s8YqVK5LF4J6g==; ctoken={token}; u=14130793; u.sig=PEpkMN-VcF3I7NkWH0aAoIBpIeCaAQCeG6H89fjtkgk; xlly_s=1; isg=BKioBV44WoUIjnZyvDfQlqLHeZa60QzbxRlelGLZ9CMWvUgnCuHcaz77tVVNjcSz; tfstk=fLXxt1waVz4cpbNGhiNkIfmz3cZuttI22ZSIIFYm1aQRAMuD1s4VW1QdzCDGfr5OyG_L0h4VIaeOyw1mSOIZBhs17o8g07jV0dJ_-yvTKiSq24rxizv_fg_gSTzLKJjVcmxbxgw3b6lglQ86CIObFUTycF96cCZJPhKE1q_6CuIWzH3jlhT_FUtqTcmvSmTtB1Gqp5AuiUDsCtwwMeIqsAM1endACiTRqgXJDILHZ5_u_t_lftX2aShXQgfdW1_QrjYf9HQJtsUKHwQ2fGK1kJopPtIOeI5oljtpHEdChInndiR1wTpchPlFqgLX9LfuarAMHZCe8INzzNIJoN6vNqUkS6jlhQQQrYQw616DFta7pgJAK9h_t2YpjjZ82flwG3AHndkb-EaYy3L3qbcZ_Qxy2eq82flwG3-J-u2o_fRk4';
+    private $origin = 'https://www.iconfont.cn';
+
+    # 获取图标
+    public function get($name, $method = 'find')
+    {
+        $where['search_name'] = $name;
+        $info = Dever::db('icon', 'cate')->$method($where);
+        if (!$info) {
+            $url = 'https://www.iconfont.cn/api/icon/search.json';
+            if (strstr($name, '(')) {
+                $temp = explode('(', $name);
+                $name = $temp[0];
+            }
+            $param['q'] = $name;
+            $param['sortType'] = 'updated_at';
+            $param['page'] = '1';
+            $param['pageSize'] = '20';
+            $param['fromCollection'] = '-1';
+            $param['ctoken'] = $this->token;
+            $param['t'] = time();
+            $header['cookie'] = str_replace('{token}', $this->token, $this->cookie);
+            $header['origin'] = $this->origin;
+            $data = Dever::curl($url, $param, 'post', false, $header)->result();
+            $data = Dever::json_decode($data);
+            if (isset($data['data']['icons'])) {
+                $id = false;
+                foreach ($data['data']['icons'] as $k => $v) {
+                    if (stristr($v['name'], 'logo')) {
+                        continue;
+                    }
+                    if (stristr($v['path_attributes'], 'FFFFFF')) {
+                        continue;
+                    }
+
+                    $up = $where;
+                    $up['name'] = $v['name'];
+                    $up['svg'] = $v['show_svg'];
+                    $state = Dever::db('icon', 'cate')->insert($up);
+                    if (!$id) {
+                        $id = $state;
+                    }
+                }
+                if ($method == 'find') {
+                    $info = Dever::db('icon', 'cate')->$method($id);
+                } else {
+                    $info = Dever::db('icon', 'cate')->$method($where);
+                }
+            }
+        }
+        return $info;
+    }
+
+    # 展示图标
+    public function show($id)
+    {
+        $info = Dever::db('icon', 'cate')->find($id);
+        if ($info) {
+            $pattern = '/(width|height): [^;]+;/';
+            $replacement = 'width: 30px; height: 30px;';
+            $info['svg'] = preg_replace($pattern, $replacement, $info['svg']);
+            return $info['svg'];
+        } else {
+            return '';
+        }
+    }
+}

+ 29 - 0
src/cate/lib/Info.php

@@ -0,0 +1,29 @@
+<?php namespace Cate\Lib;
+use Dever;
+class Info
+{
+    public function getManageList()
+    {
+        $where = array('status' => 1);
+        $parent = Dever::db('level_1', 'cate')->select($where);
+        $result = array();
+        foreach ($parent as $k => $v) {
+            $where['parent_id'] = $v['id'];
+            $v['children'] = Dever::db('level_2', 'cate')->select($where);
+            $result[] = $v;
+        }
+        return $result;
+    }
+
+    public function updateManageCate($db, $data)
+    {
+        if ($data['parent']) {
+            $parent = explode(',', $data['parent']);
+            $data['top_id'] = $parent[0];
+            if (isset($parent[1])) {
+                $data['parent_id'] = $parent[1];
+            }
+        }
+        return $data;
+    }
+}

+ 42 - 0
src/cate/manage/core.php

@@ -0,0 +1,42 @@
+<?php
+return array
+(
+    'menu' => array
+    (
+        'cate_manage' => array
+        (
+            'parent' => 'setting',
+            'name' => '电商分类',
+            'icon' => 'briefcase-5-line',
+            'sort' => '2',
+            'app' => 'cate',
+        ),
+
+        'level_1' => array
+        (
+            'parent'    => 'cate_manage',
+            'name'      => '一级分类',
+            'icon'      => 'luggage-cart-line',
+            'sort'      => '1',
+            'app'       => 'cate',
+        ),
+
+        'level_2' => array
+        (
+            'parent'    => 'cate_manage',
+            'name'      => '二级分类',
+            'icon'      => 'calendar-todo-line',
+            'sort'      => '2',
+            'app'       => 'cate',
+        ),
+
+        'level_3' => array
+        (
+            'parent'    => 'cate_manage',
+            'name'      => '三级分类',
+            'icon'      => 'cast-line',
+            'sort'      => '3',
+            'app'       => 'cate',
+        ),
+    ),
+);

+ 58 - 0
src/cate/manage/level_1.php

@@ -0,0 +1,58 @@
+<?php
+return array
+(
+    'list' => array
+    (
+        'field'      => array
+        (
+            'name',
+            'icon_id' => array
+            (
+                'show' => 'Dever::call("cate/icon.show", "{icon_id}")',
+            ),
+            'sort' => array
+            (
+                'type' => 'input',
+                'tips' => '双击修改排序',
+            ),
+            'status' => array
+            (
+                'type' => 'switch',
+                'show'  => '{status}',
+                'active_value' => 1,
+                'inactive_value' => 2,
+            ),
+            'cdate',
+        ),
+        'button' => array
+        (
+            '新增' => 'fastadd',
+        ),
+        'data_button' => array
+        (
+            '编辑' => 'fastedit',
+        ),
+        'search'    => array
+        (
+            'name',
+            'status',
+        ),
+    ),
+    'update' => array
+    (
+        'field'    => array
+        (
+            'name' => array
+            (
+                'rules' => true,
+            ),
+            'icon_id' => array
+            (
+                'type' => 'selector',
+                'option'    => 'Dever::url("cate/icon.getList", array("id" => "{icon_id}", "name" => "{name}"))',
+                'search' => 'icon_name',
+            ),
+            'icon_name' => 'hidden',
+        ),
+    ),
+);

+ 66 - 0
src/cate/manage/level_2.php

@@ -0,0 +1,66 @@
+<?php
+return array
+(
+    'list' => array
+    (
+        'field'      => array
+        (
+            'name',
+            'parent_id',
+            'icon_id' => array
+            (
+                //'show' => '"{icon}" ? "<img src=\'{icon}\' width=\'50\' \/>" : ""',
+                'show' => 'Dever::call("cate/icon.show", "{icon_id}")',
+            ),
+            'sort' => array
+            (
+                'type' => 'input',
+                'tips' => '双击修改排序',
+            ),
+            'status' => array
+            (
+                'type' => 'switch',
+                'show'  => '{status}',
+                'active_value' => 1,
+                'inactive_value' => 2,
+            ),
+            'cdate',
+        ),
+        'button' => array
+        (
+            '新增' => 'fastadd',
+        ),
+        'data_button' => array
+        (
+            '编辑' => 'fastedit',
+        ),
+        'search'    => array
+        (
+            'name' => 'like',
+            'parent_id',
+            'status',
+        ),
+    ),
+    'update' => array
+    (
+        'field'    => array
+        (
+            'name' => array
+            (
+                'rules' => true,
+            ),
+            'parent_id' => array
+            (
+                'type' => 'select',
+            ),
+            'icon_id' => array
+            (
+                'type' => 'selector',
+                'option'    => 'Dever::url("cate/icon.getList", array("id" => "{icon_id}", "name" => "{name}"))',
+                'search' => 'icon_name',
+            ),
+            'icon_name' => 'hidden',
+            #'desc' => 'textarea',
+        ),
+    ),
+);

+ 78 - 0
src/cate/manage/level_3.php

@@ -0,0 +1,78 @@
+<?php
+return array
+(
+    'list' => array
+    (
+        'field'      => array
+        (
+            'name',
+            'top_id' => array
+            (
+                'show' => 'Dever::call("cate/level_1-find", "{top_id}")["name"]',
+            ),
+            'parent_id' => array
+            (
+                'show' => 'Dever::call("cate/level_2-find", "{parent_id}")["name"]',
+            ),
+            'icon_id' => array
+            (
+                //'show' => '"{icon}" ? "<img src=\'{icon}\' width=\'50\' \/>" : ""',
+                'show' => 'Dever::call("cate/icon.show", "{icon_id}")',
+            ),
+            'sort' => array
+            (
+                'type' => 'input',
+                'tips' => '双击修改排序',
+            ),
+            'status' => array
+            (
+                'type' => 'switch',
+                'show'  => '{status}',
+                'active_value' => 1,
+                'inactive_value' => 2,
+            ),
+            'cdate',
+        ),
+        'button' => array
+        (
+            '新增' => 'fastadd',
+        ),
+        'data_button' => array
+        (
+            '编辑' => 'fastedit',
+        ),
+        'search'    => array
+        (
+            'name' => 'like',
+            'parent' => array
+            (
+                'type' => 'cascader',
+                'option'    => 'Dever::call("cate/info.getManageList")',
+            ),
+            'status',
+        ),
+    ),
+    'update' => array
+    (
+        'field'    => array
+        (
+            'name' => array
+            (
+                'rules' => true,
+            ),
+            'parent' => array
+            (
+                'type' => 'cascader',
+                'option'    => 'Dever::call("cate/info.getManageList")',
+            ),
+            'icon_id' => array
+            (
+                'type' => 'selector',
+                'option'    => 'Dever::url("cate/icon.getList", array("id" => "{icon_id}", "name" => "{name}"))',
+                'search' => 'icon_name',
+            ),
+            'icon_name' => 'hidden',
+        ),
+        'start' => 'cate/info.updateManageCate',
+    ),
+);

+ 29 - 0
src/cate/table/icon.php

@@ -0,0 +1,29 @@
+<?php
+return array
+(
+    'name' => '图标',
+    'order' => 'id asc',
+    'store' => 'log',
+    'struct' => array
+    (
+        'name' => array
+        (
+            'name'      => '图标名称',
+            'type'      => 'varchar(50)',
+        ),
+        'search_name' => array
+        (
+            'name'      => '搜索名称',
+            'type'      => 'varchar(50)',
+        ),
+        'svg' => array
+        (
+            'name'      => 'svg信息',
+            'type'      => 'text(255)',
+        ),
+    ),
+    'index' => array
+    (
+        'search' => 'search_name',
+    ),
+);

+ 42 - 0
src/cate/table/level_1.php

@@ -0,0 +1,42 @@
+<?php
+# 本来要做成一个表,后来思考很久,还是分开吧
+return array
+(
+    'name' => '一级分类表',
+    'order' => 'sort asc',
+    'struct' => array
+    (
+        'name' => array
+        (
+            'name'      => '分类名称',
+            'type'      => 'varchar(32)',
+        ),
+        'icon_name' => array
+        (
+            'name'      => '分类图标名称',
+            'type'      => 'varchar(32)',
+        ),
+        'icon_id' => array
+        (
+            'name'      => '分类图标',
+            'type'      => 'varchar(32)',
+        ),
+        'status' => array
+        (
+            'name'      => '状态',
+            'type'      => 'tinyint(1)',
+            'default'   => 1,
+            'value'     => array
+            (
+                1 => '可用',
+                2 => '不可用',
+            ),
+        ),
+        'sort' => array
+        (
+            'name'      => '排序',
+            'type'      => 'int(11)',
+            'default'   => '1',
+        ),
+    ),
+);

+ 47 - 0
src/cate/table/level_2.php

@@ -0,0 +1,47 @@
+<?php
+return array
+(
+    'name' => '二级分类表',
+    'order' => 'sort asc',
+    'struct' => array
+    (
+        'name' => array
+        (
+            'name'      => '分类名称',
+            'type'      => 'varchar(32)',
+        ),
+        'icon_name' => array
+        (
+            'name'      => '分类图标名称',
+            'type'      => 'varchar(32)',
+        ),
+        'parent_id' => array
+        (
+            'name'      => '一级分类',
+            'type'      => 'int(11)',
+            'value'     => 'cate/level_1',
+        ),
+        'icon_id' => array
+        (
+            'name'      => '分类图标',
+            'type'      => 'varchar(32)',
+        ),
+        'status' => array
+        (
+            'name'      => '状态',
+            'type'      => 'tinyint(1)',
+            'default'   => 1,
+            'value'     => array
+            (
+                1 => '可用',
+                2 => '不可用',
+            ),
+        ),
+        'sort' => array
+        (
+            'name'      => '排序',
+            'type'      => 'int(11)',
+            'default'   => '1',
+        ),
+    ),
+);

+ 56 - 0
src/cate/table/level_3.php

@@ -0,0 +1,56 @@
+<?php
+return array
+(
+    'name' => '三级级分类表',
+    'order' => 'sort asc',
+    'struct' => array
+    (
+        'name' => array
+        (
+            'name'      => '分类名称',
+            'type'      => 'varchar(32)',
+        ),
+        'icon_name' => array
+        (
+            'name'      => '分类图标名称',
+            'type'      => 'varchar(32)',
+        ),
+        'parent' => array
+        (
+            'name'      => '上级分类',
+            'type'      => 'varchar(1000)',
+        ),
+        'top_id' => array
+        (
+            'name'      => '一级分类',
+            'type'      => 'int(11)',
+        ),
+        'parent_id' => array
+        (
+            'name'      => '二级分类',
+            'type'      => 'int(11)',
+        ),
+        'icon_id' => array
+        (
+            'name'      => '分类图标',
+            'type'      => 'varchar(32)',
+        ),
+        'status' => array
+        (
+            'name'      => '状态',
+            'type'      => 'tinyint(1)',
+            'default'   => 1,
+            'value'     => array
+            (
+                1 => '可用',
+                2 => '不可用',
+            ),
+        ),
+        'sort' => array
+        (
+            'name'      => '排序',
+            'type'      => 'int(11)',
+            'default'   => '1',
+        ),
+    ),
+);

+ 5 - 0
src/place/act/index.php

@@ -0,0 +1,5 @@
+<?php
+define('DEVER_APP_NAME', 'place_act');
+define('DEVER_APP_LANG', '身份互动');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(DEVER_APP_PATH . '../boot.php');

+ 108 - 0
src/place/act/lib/Core.php

@@ -0,0 +1,108 @@
+<?php namespace Place_act\Lib;
+use Dever;
+use Place;
+class Core
+{
+    private $db;
+    private $type;
+    private $type_id;
+    public function __construct($name, $type = false, $type_id = false)
+    {
+        $this->type = Dever::input('type', '', '', $type);
+        $this->type_id = Dever::input('type_id', '', '', $type_id);
+        $this->db = Dever::db($name, 'place_act');
+    }
+
+    protected function check()
+    {
+        if (!$this->type || !$this->type_id) {
+            Dever::error('传入参数错误');
+        }
+    }
+
+    # 更新互动信息
+    public function up($data = array(), $msg = '')
+    {
+        if ($this->getInfo($data)) {
+            $msg && Dever::error($msg);
+        } else {
+            $this->db->insert($this->data);
+        }
+        return 'ok';
+    }
+
+    # 删除
+    public function del($data = array())
+    {
+        if ($info = $this->getInfo($data)) {
+            $this->db->delete($info['id']);
+        }
+        return 'ok';
+    }
+
+    # 获取用户互动相关的信息
+    public function getInfo($data = array(), $get = false, $field = array())
+    {
+        $this->check();
+        $this->data = $data;
+        $this->data['type'] = $this->type;
+        $this->data['type_id'] = $this->type_id;
+        $this->data['uid'] = Place::$uid;
+        $info = $this->db->find($this->data);
+        if ($get) {
+            return $this->handleInfo($info, $field);
+        }
+        return $info;
+    }
+
+    # 获取用户的互动列表
+    public function getUserList($field = array(), $page = 10)
+    {
+        $where['uid'] = Place::$uid;
+        if ($this->type) {
+            $where['type'] = $this->type;
+        }
+        # 每页10条
+        $set['num'] = $page;
+        $data = $this->db->select($where, $set);
+        $result = array();
+        if ($data) {
+            foreach ($data as $k => $v) {
+                $info = $this->handleInfo($v, $field);
+                if ($info) {
+                    $result[] = $info;
+                }
+            }
+        }
+        return $result;
+    }
+
+    private function getTypeInfo($type, $type_id)
+    {
+        $app = Dever::config('setting')['type'][$type];
+        if ($type > 0) {
+            $info = Dever::load($app)->get($type_id);
+            return $info;
+        }
+    }
+
+    private function handleInfo($v, $field = array())
+    {
+        if (!$v) {
+            return array();
+        }
+        $info = $this->getTypeInfo($v['type'], $v['type_id']);
+        if ($info) {
+            $info['type'] = $v['type'];
+            $info['type_id'] = $v['type_id'];
+            $info['data_id'] = $v['id'];
+            $info['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
+            if ($field) {
+                foreach ($field as $v1) {
+                    $info[$v1] = $v[$v1];
+                }
+            }
+            return $info;
+        }
+    }
+}

+ 26 - 0
src/place/act/table/collect.php

@@ -0,0 +1,26 @@
+<?php
+return array
+(
+    'name' => '收藏表',
+    'partition' => 'Dever::call("manage/common.system")',
+    'struct' => array
+    (
+        'uid'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '用户',
+        ),
+
+        'type'        => array
+        (
+            'type'      => 'tinyint(1)',
+            'name'      => '类型',
+        ),
+
+        'type_id'        => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '类型ID',
+        ),
+    ),
+);

+ 26 - 0
src/place/act/table/like.php

@@ -0,0 +1,26 @@
+<?php
+return array
+(
+    'name' => '点赞表',
+    'partition' => 'Dever::call("manage/common.system")',
+    'struct' => array
+    (
+        'uid'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '用户',
+        ),
+
+        'type'        => array
+        (
+            'type'      => 'tinyint(1)',
+            'name'      => '类型',
+        ),
+
+        'type_id'        => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '类型ID',
+        ),
+    ),
+);

+ 40 - 0
src/place/act/table/review.php

@@ -0,0 +1,40 @@
+<?php
+return array
+(
+    'name' => '评价表',
+    'partition' => 'Dever::call("manage/common.system")',
+    'order' => 'sort asc',
+    'struct' => array
+    (
+        'type'        => array
+        (
+            'type'      => 'tinyint(1)',
+            'name'      => '类型',
+        ),
+
+        'type_id'        => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '类型ID',
+        ),
+
+        'uid'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '用户',
+        ),
+
+        'content'       => array
+        (
+            'name'      => '内容',
+            'type'      => 'varchar(2000)',
+        ),
+
+        'sort' => array
+        (
+            'name'      => '排序',
+            'type'      => 'int(11)',
+            'default'   => '1',
+        ),
+    ),
+);

+ 90 - 0
src/place/boot.php

@@ -0,0 +1,90 @@
+<?php
+# place 身份入口
+class Place
+{
+    public static $info;
+    public static $user;
+    public static $uid;
+    public static $code;
+    public static $channel;
+    public static $system;
+    public static $sector;
+    public static $module;
+    public static $id;
+
+    # 生成入口码
+    public static function entry($sector_id, $module_id, $user_id, $place_id)
+    {
+        $code = \Dever\Helper\Secure::encode($sector_id . '-' . $module_id . '-' . $user_id . '-' . $place_id);
+        return $code;
+    }
+
+    # 初始化
+    public static function init()
+    {
+        self::$code = Dever::input('p');
+        $code = Dever\Helper\Secure::decode(self::$code);
+        if (!$code) {
+            Dever::error('身份码错误');
+        }
+        list($sector_id, $module_id, $user_id, $place_id) = explode('-', $code);
+        self::$system = Dever::db('system', 'manage')->find(array('key' => 'sector'));
+        self::$sector = Dever::db(self::$system['info_table'])->find($sector_id);
+        if (!self::$sector) {
+            Dever::error('领域信息错误');
+        }
+        # 切换数据库
+        Dever::load('common', 'manage')->setAuth(self::$system['partition'], self::$system['id'], self::$sector['id'], $module_id, $user_id);
+
+        # 初始化身份
+        self::info($user_id, $place_id);
+
+        # 切换数据库
+        self::$module = Dever::db('system_module', 'manage')->find(array('key' => 'sector_place'));
+        Dever::load('common', 'manage')->setAuth(self::$system['partition'], self::$system['id'], self::$sector['id'], self::$module['id'], $place_id);
+
+        # 初始化频道
+        self::channel();
+
+    }
+
+    # 身份信息
+    public static function info($user_id, $place_id)
+    {
+        $user = Dever::db('user', 'sector')->find($user_id);
+        self::$info = Dever::db('info', 'place')->find($place_id, array('col' => 'name,logo,content,bg,type,money_id,uid,pay_account'));
+        if (!self::$info) {
+            Dever::error('信息有误');
+        }
+        if (self::$info['uid'] != $user['id']) {
+            Dever::error('信息有误');
+        }
+        self::$id = $place_id;
+        self::$info['channel'] = $user['channel'];
+        self::$info['content'] = htmlspecialchars_decode(self::$info['content']);
+    }
+
+    # 资源信息
+    public static function channel()
+    {
+        self::$channel = Dever::db('channel', 'place_source')->select(['status' => 1], array('col' => 'id,name,icon,icon_select'));
+    }
+
+    # 用户信息
+    public static function user($uid)
+    {
+        self::$user = Dever::db('info', 'place_user')->find($uid, array('col' => 'id,name,avatar'));
+        if (self::$user) {
+            self::$uid = $uid;
+        }
+    }
+
+    public static function result($data)
+    {
+        $data['place'] = self::$info;
+        $data['channel'] = self::$channel;
+        $data['user'] = self::$user;
+        return $data;
+    }
+}
+include(DEVER_APP_PATH . '../../../boot.php');

+ 5 - 0
src/place/channel/index.php

@@ -0,0 +1,5 @@
+<?php
+define('DEVER_APP_NAME', 'place_channel');
+define('DEVER_APP_LANG', '身份渠道');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(DEVER_APP_PATH . '../boot.php');

+ 50 - 0
src/place/channel/table/seller.php

@@ -0,0 +1,50 @@
+<?php
+return array
+(
+    'name' => '销售网店渠道',
+    'partition' => 'Dever::call("manage/common.system")',
+    'order' => 'sort asc',
+    'struct' => array
+    (
+        'name' => array
+        (
+            'name'      => '网店名称',
+            'type'      => 'varchar(50)',
+        ),
+
+        'type' => array
+        (
+            'name'      => '类型',
+            'type'      => 'tinyint(1)',
+            'default'   => 1,
+            'value'     => array
+            (
+                1 => '微信小店',
+                2 => '小红书',
+                3 => '抖店',
+                4 => '拼多多',
+                5 => '淘宝',
+                6 => '美团',
+            ),
+        ),
+
+        'status' => array
+        (
+            'name'      => '授权状态',
+            'type'      => 'tinyint(1)',
+            'default'   => 2,
+            'value'     => array
+            (
+                1 => '已授权',
+                2 => '未授权',
+            ),
+        ),
+
+        'sort' => array
+        (
+            'name'      => '排序',
+            'type'      => 'int(11)',
+            'default'   => 1,
+        ),
+    ),
+);

+ 46 - 0
src/place/channel/table/supplier.php

@@ -0,0 +1,46 @@
+<?php
+return array
+(
+    'name' => '供应商',
+    'partition' => 'Dever::call("manage/common.system")',
+    'order' => 'sort asc',
+    'struct' => array
+    (
+        'name' => array
+        (
+            'name'      => '供应商名称',
+            'type'      => 'varchar(50)',
+        ),
+
+        'mobile' => array
+        (
+            'name'      => '联系电话',
+            'type'      => 'varchar(50)',
+        ),
+
+        'type' => array
+        (
+            'name'      => '类型',
+            'type'      => 'tinyint(1)',
+            'default'   => 1,
+            'value'     => array
+            (
+                1 => '源小货',
+                2 => '1688',
+            ),
+        ),
+
+        'type_id'       => array
+        (
+            'type'      => 'varchar(50)',
+            'name'      => '供应商ID',
+        ),
+
+        'sort' => array
+        (
+            'name'      => '排序',
+            'type'      => 'int(11)',
+            'default'   => 1,
+        ),
+    ),
+);

+ 52 - 0
src/place/interface/api/Address.php

@@ -0,0 +1,52 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+class Address extends Core
+{
+    protected $login = true;
+    protected $entry = true;
+
+    # 获取地址列表
+    public function list()
+    {
+        return Dever::load('address', 'place_user')->getList();
+    }
+
+
+    # 添加或者更新地址接口
+    public function up()
+    {
+        $id = Dever::input('id');
+        $type = Dever::input('type', 'is_numeric', '类型', 1);
+        $province = Dever::input('province', 'is_numeric', '省份');
+        $city = Dever::input('city', 'is_numeric', '城市');
+        $county = Dever::input('county', 'is_numeric', '区县');
+        $address = Dever::input('address', 'is_string', '地址');
+        $name = Dever::input('name', 'is_string', '联系人');
+        $phone = Dever::input('phone', 'is_string', '联系方式');
+
+        return Dever::load('address', 'place_user')->update($id, $type, $phone, $name, $province, $city, $county, $address);
+    }
+
+    # 获取默认地址
+    public function getDefault()
+    {
+        return Dever::load('address', 'place_user')->getDefault();
+    }
+
+    # 获取某个收货地址
+    public function getInfo()
+    {
+        $id = Dever::input('id', 'is_numeric', '收货地址');
+        $uid = Place::$uid;
+        return Dever::load('address', 'place_user')->getInfo($id, $uid);
+    }
+
+    # 删除地址
+    public function delete()
+    {
+        $id = Dever::input('id', 'is_numeric', '收货地址');
+        return Dever::load('address', 'place_user')->delete($id);
+    }
+}

+ 31 - 0
src/place/interface/api/Collect.php

@@ -0,0 +1,31 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+use Place_act\Lib\Core as Act;
+class Collect extends Core
+{
+    protected $login = true;
+    protected $entry = true;
+
+    public function __construct()
+    {
+        parent::__construct();
+        $this->act = new Act('collect');
+    }
+
+    public function up()
+    {
+        return $this->act->up();
+    }
+
+    public function cancel()
+    {
+        return $this->act->del();
+    }
+
+    public function getUserList()
+    {
+        return $this->act->getUserList();
+    }
+}

+ 110 - 0
src/place/interface/api/Main.php

@@ -0,0 +1,110 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+class Main extends Core
+{
+    # 首页
+    public function home()
+    {
+        $data['entry'] = false;
+        if (Place::$info['type'] == 1) {
+            # 公开
+            $data['entry'] = true;
+        } elseif (Place::$info['type'] == 2 && Place::$user) {
+            # 注册
+            $data['entry'] = true;
+        } elseif (Place::$info['type'] > 2 && Place::$user && Place::$user['entry_type'] > 2) {
+            # 邀请码、购买、密码等等
+            $data['entry'] = true;
+        } else {
+            # 需要注册、购买、输入密码等等
+            if (Place::$info['type'] == 2) {
+                $data['button'] = array
+                (
+                    'name' => '注册',
+                    'type' => 2,
+                );
+            } elseif (Place::$info['type'] == 3) {
+                $data['button'] = array
+                (
+                    'name' => '邀请码',
+                    'type' => 3,
+                );
+            } elseif (Place::$info['type'] == 4) {
+                $data['button'] = array
+                (
+                    'name' => '密码',
+                    'type' => 4,
+                );
+            } elseif (Place::$info['type'] == 5) {
+                $data['button'] = array
+                (
+                    'name' => '购买',
+                    'type' => 5,
+                );
+            }
+        }
+        return Place::result($data);
+    }
+
+    # 验证码登录或者注册
+    public function login_commit(){}
+    public function login()
+    {
+        $account = Dever::input('account', 'is_string', '账户信息');
+        $env = Dever::input('env', 'is_numeric', '环境信息', 3);
+        $mobile = Dever::input('mobile', 'is_numeric', '手机号');
+        $pwd = Dever::input('pwd');
+        $invite = Dever::input('invite');
+        if (!$pwd) {
+            $code = Dever::input('code', 'is_numeric', '验证码');
+            #Dever::load('template', 'msg')->check('reg_code', $mobile, $code);
+        }
+        $where['mobile'] = $mobile;
+        $db = Dever::db('info', 'place_user');
+        $user = $db->find($where);
+        if ($user) {
+            if ($pwd && Dever::load('common', 'manage')->hash($pwd, $user['salt']) != $user['password']) {
+                Dever::error('登录失败,密码无效');
+            }
+            # 已注册,登录
+            $uid = $user['id'];
+        } else {
+            if ($pwd) {
+                Dever::error('登录失败,账户无效');
+            }
+            if ($invite) {
+                $parent_uid = Dever::load('code', 'invite')->getUid($invite);
+                if (!$parent_uid) {
+                    Dever::error('邀请码不存在');
+                }
+            }
+            $data = $where;
+            $data['name'] = \Dever\Helper\Str::hide($mobile);
+            $uid = $db->insert($data);
+            if ($invite) {
+                $parent = $db->find($parent_uid);
+                if ($parent) {
+                    Dever::load('relation', 'invite')->set($parent_uid, $uid);
+                    $db->update($uid, array('parent_uid' => $parent_uid));
+                }
+            }
+        }
+        $result['t'] = \Dever\Helper\Secure::login($uid);
+        # 获取openid
+        $result = Dever::load('util', 'api')->openid($account, $env, $uid, $result);
+        if (isset($result['openid'])) {
+            unset($result['openid']);
+        }
+        return $result;
+    }
+
+    # 发送短信验证码
+    public function sms()
+    {
+        $mobile = Dever::input('mobile', 'is_numeric', '手机号');
+        $data = Dever::load('template', 'msg')->send('reg_code', array('mobile' => $mobile));
+        return $data;
+    }
+}

+ 33 - 0
src/place/interface/api/Review.php

@@ -0,0 +1,33 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+use Place_act\Lib\Core as Act;
+class Review extends Core
+{
+    protected $login = true;
+    protected $entry = true;
+
+    public function __construct()
+    {
+        parent::__construct();
+        $this->act = new Act('review');
+    }
+
+    public function up()
+    {
+        $data['content'] = Dever::input('content', 'is_string', '内容');
+        return $this->act->up($data, '请不要发布相同内容');
+    }
+
+    public function cancel()
+    {
+        $data['id'] = Dever::input('review_id', 'is_numeric', '评论');
+        return $this->act->del($data);
+    }
+
+    public function getUserList()
+    {
+        return $this->act->getUserList();
+    }
+}

+ 63 - 0
src/place/interface/api/Role.php

@@ -0,0 +1,63 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+class Role extends Core
+{
+    //protected $login = true;
+    protected $entry = true;
+
+    # 我的信息
+    public function info()
+    {
+        $role_id = Dever::input('role_id', 'is_numeric', '角色ID');
+        $data['role'] = Dever::db('role', 'place_user')->find(array('id' => $role_id, 'status' => 1), array('col' => 'id,name,score_id'));
+        if (!$data['role']) {
+            Dever::error('角色信息错误');
+        }
+        $score = Dever::db('info', 'place_score')->find($data['role']['score_id']);
+        $data['role']['score_name'] = $score['name'];
+        # 获取当前等级
+        $user = array();
+        if (Place::$uid) {
+            $user = Dever::db('user_role', 'place_user')->find(array('role_id' => $role_id, 'uid' => Place::$uid));
+            if ($user) {
+                if ($user['edate']) {
+                    $user['edate_str'] = date('Y-m-d H:i:s', $user['edate']); 
+                } else {
+                    $user['edate_str'] = '永久'; 
+                }
+            }
+        }
+        
+        $data['level'] = Dever::db('role_level', 'place_user')->select(array('role_id' => $role_id, 'status' => 1), array('col' => 'id,name,level,icon,price,day_desc,day,content'));
+        if ($data['level']) {
+            foreach ($data['level'] as &$v) {
+                # 获取权益
+                $v['profit'] = Dever::load('role', 'place_user')->profit($v['id']);
+                $v['content'] = htmlspecialchars_decode($v['content']);
+                if ($user && $v['id'] == $user['level_id']) {
+                    $data['user'] = $v;
+                    $data['user']['edate_str'] = $user['edate_str'];
+                }
+            }
+        }
+        
+        return $data;
+    }
+
+    # 获取价格
+    public function price()
+    {
+        return Dever::load('role', 'place_user')->getPrice();
+    }
+
+    # 购买
+    public function buy()
+    {
+        if (!Place::$uid) {
+            $this->showLogin();
+        }
+        return Dever::load('role', 'place_user')->pay();
+    }
+}

+ 293 - 0
src/place/interface/api/Source.php

@@ -0,0 +1,293 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+class Source extends Core
+{
+    private $channel_id = 0;
+    private $field = array
+    (
+        'info' => 'id,name,info,pic,type,spec_type',
+        'cate' => 'id,parent_id,score_id,buy,name,status,`desc`',
+    );
+
+    # 首页
+    public function home()
+    {
+        $this->channel_id = Dever::input('channel_id', 'is_numeric', '频道ID');
+        # 获取频道信息
+        $data['channel'] = Dever::db('channel', 'place_source')->find(array('id' => $this->channel_id, 'status' => 1), array('col' => 'id,type,name,`desc`'));
+        if (!$data['channel']) {
+            Dever::error('频道不存在');
+        }
+
+        # 分类信息
+        $data['top'] = array();
+        if ($data['channel']['type'] == 1) {
+            # 显示子分类
+            # 根据频道获取主分类
+            $top = Dever::input('top_id');
+            $data['top'] = $this->getCate(0);
+            if ($top) {
+                $data['cate'] = $this->getData($top);
+            } elseif ($data['top']) {
+                $data['cate'] = $this->getData($data['top'][0]['id']);
+            }
+        } else {
+            # 不显示子分类
+            $data['cate'] = $this->getData(0);
+        }
+
+        # 广告和推荐位信息
+        $data['ad'] = array();
+
+        return $data;
+    }
+
+    # 获取分类及其资源
+    private function getData($parent_id)
+    {
+        $data = $this->getCate($parent_id);
+        if (!$data && $parent_id > 0) {
+            $data = $this->getCate(0, $parent_id);
+        }
+        if ($data) {
+            foreach ($data as &$v) {
+                $v['list'] = $this->getSource($v, 5);
+            }
+        }
+        return $data;
+    }
+
+    # 获取分类信息
+    private function getCate($parent_id = 0, $id = false)
+    {
+        if ($id) {
+            $where['id'] = $id;
+        }
+        $where['channel_id'] = $this->channel_id;
+        $where['parent_id'] = $parent_id;
+        return Dever::db('cate', 'place_source')->select($where, array('col' => $this->field['cate']));
+    }
+
+    # 获取资源信息
+    private function getSource($cate, $limit, $page = false)
+    {
+        $key = 'cate_parent_id';
+        if ($cate['parent_id'] > 0) {
+            $key = 'cate_child_id';
+        }
+        $where = array($key => $cate['id'], 'status' => 1);
+        $search = Dever::input('search');
+        if ($search) {
+            $where['name'] = array('like', $search);
+        }
+        $set = array('col' => $this->field['info']);
+        if ($limit) {
+            $set['limit'] = $limit;
+        }
+        if ($page) {
+            $set['num'] = $page;
+        }
+        $data = Dever::db('info', 'place_source')->select($where, $set);
+
+        # 获取详情
+        if ($data) {
+            $cate['score'] = Dever::db('info', 'place_score')->find($cate['score_id']);
+            foreach ($data as &$v) {
+                $v = Dever::load('info', 'place_source')->get($v, $cate);
+            }
+        }
+        return $data;
+    }
+
+
+    # 某个分类的列表页
+    public function cate()
+    {
+        $cate_id = Dever::input('cate_id', 'is_numeric', '分类ID');
+        $data['cate'] = Dever::db('cate', 'place_source')->find($cate_id, array('col' => $this->field['cate']));
+        if (!$data['cate']) {
+            Dever::error('分类不存在');
+        }
+        if ($data['cate']['status'] != 1) {
+            Dever::error('分类不存在');
+        }
+        $data['list'] = $this->getSource($data['cate'], false, 10);
+        return $data;
+    }
+
+    # 详情页
+    public function view()
+    {
+        $source_id = Dever::input('source_id', 'is_numeric', '资源ID');
+        $data['info'] = Dever::load('info', 'place_source')->get($source_id, false, true);
+        $content = Dever::db('content', 'place_source')->find(array('info_id' => $source_id));
+        # 是否展示内容
+        $data['content'] = 2;
+        if ($content) {
+            $data['content'] = 1;
+        }
+        # 展示说明
+        $data['desc'] = Dever::db('help', 'place_source')->select(array('type' => 1), array('col' => 'name,info,pic'));
+        $data['help'] = Dever::db('help', 'place_source')->select(array('type' => 2), array('col' => 'name,info,pic'));
+
+        # 获取评价
+        $data['review'] = Dever::db('review', 'place_act')->select(array('type' => 1, 'type_id' => $source_id), array('limit' => 3));
+        if ($data['review']) {
+            foreach ($data['review'] as &$v) {
+                $v['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
+                $v['oper'] = 2;
+                if (Place::$uid == $v['uid']) {
+                    $v['oper'] = 1;
+                }
+                $v['user'] = Dever::db('info', 'place_user')->find($v['uid'], array('col' => 'mobile,name,avatar'));
+            }
+        }
+
+        return $data;
+    }
+
+    # 详情页查看价格
+    public function view_price()
+    {
+        $source_id = Dever::input('source_id', 'is_numeric', '资源ID');
+        $sku_id = Dever::input('sku_id', 'is_numeric', '规格ID');
+        $buy_num = Dever::input('buy_num', 'is_numeric', '数量', 1);
+        $data = Dever::load('info', 'place_source')->getSkuList($source_id, $sku_id, $buy_num);
+        return $data;
+    }
+
+    # 详情页查看内容
+    public function view_content()
+    {
+        $source_id = Dever::input('source_id', 'is_numeric', '资源ID');
+        $data['cate'] = Dever::db('content_cate', 'place_source')->select(array('info_id' => $source_id, 'status' => 1));
+        $set = array('num' => 10);
+        if ($data['cate']) {
+            $cate_id = Dever::input('cate_id');
+            if (!$cate_id) {
+                $cate_id = $data['cate'][0]['id'];
+            }
+            $data['content'] = Dever::db('content', 'place_source')->select(array('info_id' => $source_id, 'cate_id' => $cate_id), $set);
+        } else {
+            $data['content'] = Dever::db('content', 'place_source')->select(array('info_id' => $source_id), $set);
+        }
+        if (Place::$uid && $data['content']) {
+            # 检测是否购买过
+            foreach ($data['content'] as $k => $v) {
+
+            }
+        }
+        return $data;
+    }
+
+    # 详情页查看内容
+    public function view_content_info()
+    {
+        $content_id = Dever::input('content_id', 'is_numeric', '内容ID');
+        $data['info'] = Dever::db('content', 'place_source')->find($content_id);
+        # 检测是否购买过
+        return $data;
+    }
+
+    # 拉起支付
+    public function pay()
+    {
+        if (!Place::$uid) {
+            $this->showLogin();
+        }
+        $info = $this->view_price();
+        if ($info['sku']['buy'] == 1) {
+            return Dever::load('info', 'place_source')->pay($info);
+        } else {
+            Dever::error('您当前的身份角色无法购买');
+        }
+    }
+
+    # 重新支付
+    public function repay()
+    {
+
+    }
+
+    # 资源评论列表
+    public function getReviewList()
+    {
+        $where['type'] = 1;
+        $where['type_id'] = Dever::input('source_id', 'is_numeric', '资源ID');
+        # 每页10条
+        $set['num'] = Dever::input('num', 'is_numeric', '分页条数', 10);
+        $data = Dever::db('review', 'place_act')->select($where, $set);
+        if ($data) {
+            foreach ($data as &$v) {
+                $v['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
+                $v['oper'] = 2;
+                if (Place::$uid == $v['uid']) {
+                    $v['oper'] = 1;
+                }
+                $v['user'] = Dever::db('info', 'place_user')->find($v['uid'], array('col' => 'mobile,name,avatar'));
+            }
+        }
+        $result['list'] = $data;
+        $result['total'] = Dever::page('total');
+        return $result;
+    }
+
+    # 资源订单列表
+    public function getOrderList()
+    {
+        $where['uid'] = Place::$uid;
+        $set['num'] = 10;
+        $set['col'] = 'id,order_num,source_id,name,cash,num,cdate,status';
+        $status = Dever::input('status');
+        if ($status) {
+            if ($status == 10) {
+                $where['or'] = array
+                (
+                    'refund_status' => '1',
+                    'status' => '8',
+                );
+                $where = ' uid = ' . $where['uid'] . ' and (refund_status = 1 or status = 8)';
+            } else {
+                $where['status'] = array('in', $status);
+            }
+        }
+        $data = Dever::db('source', 'place_order')->select($where, $set);
+        $result = array();
+        if ($data) {
+            foreach ($data as $k => $v) {
+                $order = $this->getOrderInfo($v);
+                if ($order) {
+                    $result[] = $order;
+                }
+            }
+        }
+        return $result;
+    }
+
+    private function getOrderInfo($order, $view = false)
+    {
+        if ($order) {
+            $info = Dever::db('info', 'place_source')->find($order['source_id'], array('col' => 'id,name,pic,info'));
+            $info['pic'] = explode(',', $info['pic']);
+            $order['pic'] = $info['pic'][0] ?? '';
+            $order['status_name'] = Dever::db('source', 'place_order')->value('status', $order['status']);
+            $order['cdate_str'] = date('Y-m-d H:i:s', $order['cdate']);
+            if (isset($order['pdate']) && $order['pdate']) {
+                $order['pdate_str'] = date('Y-m-d H:i:s', $order['pdate']);
+            }
+            if (isset($order['ddate']) && $order['ddate']) {
+                $order['ddate_str'] = date('Y-m-d H:i:s', $order['ddate']);
+            }
+            if (isset($order['qdate']) && $order['qdate']) {
+                $order['qdate_str'] = date('Y-m-d H:i:s', $order['qdate']);
+            }
+            if (isset($order['fdate']) && $order['fdate']) {
+                $order['fdate_str'] = date('Y-m-d H:i:s', $order['fdate']);
+            }
+            $order = Dever::load('source/order', 'place_order')->getInfo($order, $view);
+        }
+        return $order;
+    }
+}

+ 20 - 0
src/place/interface/api/Tool.php

@@ -0,0 +1,20 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+class Tool extends Core
+{
+    # 根据身份码获取入口
+    public function code()
+    {
+        $code = Dever::input('code');
+        if (!$code) {
+            Dever::error('请输入身份码');
+        }
+        $code = Dever::db('code', 'place')->find(array('code' => $code));
+        if (!$code) {
+            Dever::error('身份码错误');
+        }
+        return array('p' => Place::entry($code['sector_id'], $code['module_id'], $code['user_id'], $code['place_id']));
+    }
+}

+ 122 - 0
src/place/interface/api/User.php

@@ -0,0 +1,122 @@
+<?php namespace Place_interface\Api;
+use Dever;
+use Place;
+use Place_interface\Lib\Core;
+class User extends Core
+{
+    protected $login = true;
+    protected $entry = true;
+
+    # 我的信息
+    public function info()
+    {
+        $data = array();
+        # 获取角色
+        $data['role'] = Dever::db('role', 'place_user')->select(array('status' => 1), array('col' => 'id,name,icon'));
+
+        if ($data['role']) {
+            foreach ($data['role'] as &$role) {
+                $user_role = Dever::db('user_role', 'place_user')->find(array('role_id' => $role['id']));
+                if ($user_role) {
+                    $role['level'] = Dever::db('role_level', 'place_user')->find($user_role['level_id'], array('col' => 'id,name,icon'));
+                }
+            }
+        }
+        # 获取积分
+        $score = Dever::db('user', 'place_score')->select(array('uid' => Place::$uid), array('col' => 'info_id,total,used,balance'));
+        if ($score) {
+            foreach ($score as $k => $v) {
+                $data['score'][$k] = Dever::db('info', 'place_score')->find($v['info_id'], array('col' => 'id,name,symbol,symbol_location'));
+                $data['score'][$k] += $v;
+            }
+        }
+        return Place::result($data);
+    }
+
+    # 更新我的信息
+    public function update()
+    {
+        $update = array();
+        $name = Dever::input('name');
+        if ($name) {
+            Place::$user['name'] = $update['name'] = $name;
+        }
+        $avatar = Dever::input('avatar');
+        if ($avatar) {
+            Place::$user['avatar'] = $update['avatar'] = $avatar;
+        }
+        if ($update) {
+            Dever::db('info', 'place_user')->update(Place::$uid, $update);
+        }
+        return Place::$user;
+    }
+
+    # 修改密码
+    public function pwd()
+    {
+        # 大于8位字符,至少包含:小写字母、大写字母、数字、特殊字符
+        $pwd = Dever::input('pwd', '/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}$/', '密码');
+        $code = Dever::input('code', 'is_string', '验证码');
+        Dever::load('template', 'msg')->check('user_code', Place::$user['mobile'], $code);
+        $update = Dever::load('manage/common')->createPwd($pwd);
+        Dever::db('info', 'place_user')->update(Place::$uid, $update);
+    }
+
+    # 发送短信验证码
+    public function sms()
+    {
+        $data = Dever::load('template', 'msg')->send('user_code', array('mobile' => Place::$user['mobile']));
+        return $data;
+    }
+
+    # 我的分享
+    public function invite()
+    {
+        # 代理邀请码
+        $data['code'] = Dever::load('code', 'invite')->get(Place::$uid);
+
+        $data['parent'] = 2;
+        # 获取我的上级
+        $relation = Dever::load('relation', 'invite')->getParent(Place::$uid);
+        if ($relation) {
+            $data['parent'] = 1;
+            $data['parent_info'] = Dever::db('info', 'place_user')->find($relation['uid'], array('col' => 'id,name,avatar'));
+        }
+        return $data;
+    }
+
+    # 我的下级列表
+    public function getGroup()
+    {
+        $relation = Dever::load('relation', 'invite')->getChild(Place::$uid);
+        $result = array();
+        if ($relation) {
+            foreach ($relation as $k => $v) {
+                $result[$k] = Dever::db('info', 'place_user')->find($v['to_uid'], array('col' => 'id,name,avatar'));
+                $result[$k]['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
+            }
+        }
+        return $result;
+    }
+
+    # 填写邀请码,添加上级
+    public function addParent()
+    {
+        $relation = Dever::load('relation', 'invite')->getParent(Place::$uid);
+        if ($relation) {
+            Dever::error('您已经有上级了');
+        }
+        $invite = Dever::input('invite', 'is_numeric', '请填写邀请码');
+        $parent_uid = Dever::load('code', 'invite')->getUid($invite);
+        if (!$parent_uid) {
+            Dever::error('邀请码不存在');
+        }
+        $parent = Dever::db('info', 'place_user')->find($parent_uid);
+        if (!$parent) {
+            Dever::error('邀请码不存在');
+        }
+        Dever::load('relation', 'invite')->set($parent_uid, Place::$uid);
+        Dever::db('info', 'place_user')->update(Place::$uid, array('parent_uid' => $parent_uid));
+        return 'ok';
+    }
+}

+ 5 - 0
src/place/interface/index.php

@@ -0,0 +1,5 @@
+<?php
+define('DEVER_APP_NAME', 'place_interface');
+define('DEVER_APP_LANG', '身份对外接口');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(DEVER_APP_PATH . '../boot.php');

+ 43 - 0
src/place/interface/lib/Core.php

@@ -0,0 +1,43 @@
+<?php namespace Place_interface\Lib;
+use Dever;
+use Place;
+use Dever\Helper\Secure;
+class Core
+{
+    protected $login = false;
+    protected $entry = false;
+    public function __construct()
+    {
+        Place::init();
+        $t = Dever::input('t');
+        if ($this->login && !$t) {
+            $this->showLogin();
+        }
+        if ($t) {
+            if ($t = Secure::checkLogin($t)) {
+                if ($t['uid'] && $t['uid'] > 0) {
+                    Place::user($t['uid']);
+                }
+                if ($this->login && !Place::$uid) {
+                    $this->showLogin();
+                }
+            } elseif ($this->login) {
+                $this->showLogin();
+            }
+        }
+        if ($this->entry) {
+            if (Place::$info['type'] >= 2 && !Place::$uid) {
+                Dever::error('您没有权限');
+            }
+            /*
+            if (Place::$member && Place::$user['entry_type'] <= 2) {
+                Dever::error('您没有权限');
+            }*/
+        }
+    }
+
+    protected function showLogin()
+    {
+        Dever::error('请先登录', 300);
+    }
+}

+ 25 - 0
src/place/order/api/Manage.php

@@ -0,0 +1,25 @@
+<?php namespace Place_source\Api;
+use Dever;
+use Manage\Lib\Auth;
+class Manage extends Auth
+{
+    public function getInfo()
+    {
+        return Dever::load('common', 'manage')->cascader(2, function($level, $parent) {
+            if ($level == 1) {
+                $data = Dever::db('info', 'place_source')->select([]);
+            } elseif ($level == 2) {
+                $data = Dever::db('sku', 'place_source')->select(array('info_id' => $parent));
+                if ($data) {
+                    foreach ($data as &$v) {
+                        $v['name'] = Dever::load('sku', 'api')->getName($v['key'], 'place_source');
+                        if (!$v['name']) {
+                            $v['name'] = '无规格';
+                        }
+                    }
+                }
+            }
+            return $data;
+        });
+    }
+}

+ 5 - 0
src/place/order/index.php

@@ -0,0 +1,5 @@
+<?php
+define('DEVER_APP_NAME', 'place_order');
+define('DEVER_APP_LANG', '身份订单');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(DEVER_APP_PATH . '../boot.php');

+ 44 - 0
src/place/order/lib/source/Address.php

@@ -0,0 +1,44 @@
+<?php namespace Place_order\Lib\Source;
+use Dever;
+use Place;
+class Address
+{
+    public function update($db, $data)
+    {
+        $order = Dever::db('source', 'place_order')->find($data['id']);
+        if ($order) {
+            $auth = new \Manage\Lib\Auth();
+            $uid = $auth->uid;
+            $log['type'] = 2;
+            $log['uid'] = $uid;
+            $this->up($order['id'], $order['uid'], $order['address_id'], $data['address_name'], $data['address_phone'], $data['address_area'], $data['address_address'], $log);
+        }
+        return 'end';
+    }
+
+    public function up($order_id, $uid, $address_id, $name, $phone, $area, $address, $log = false)
+    {
+        $update['uid'] = $uid;
+        $update['name'] = $name;
+        $update['phone'] = $phone;
+        $update['type'] = 3;
+        $update['area'] = $area;
+        list($update['province_id'], $update['city_id'], $update['county_id']) = explode(',', $update['area']);
+        $update['address'] = $address;
+        $address = Dever::db('address', 'place_user')->find($address_id);
+        if ($address && $address['type'] == 3) {
+            # 更新
+            Dever::db('address', 'place')->update($address['id'], $update);
+        } else {
+            $id = Dever::db('address', 'place_user')->insert($update);
+            Dever::db('source', 'place_order')->update($order_id, array('address_id' => $id));
+        }
+        $type = 1;
+        if ($log) {
+            $type = $log['type'];
+            $uid = $log['uid'];
+        }
+        $address = Dever::load('address', 'place_user')->handleInfo($update);
+        Dever::load('source/log', 'place_order')->up($type, $uid, $order_id, '更改收货地址:' . $address['full']);
+    }
+}

+ 165 - 0
src/place/order/lib/source/Cart.php

@@ -0,0 +1,165 @@
+<?php namespace Place_order\Lib\Source;
+use Dever;
+use Place;
+class Cart
+{
+    # 购物车列表
+    public function getList()
+    {
+        $where['uid'] = Place::$uid;
+        $set = array();
+        //$set['num'] = 100;
+        $data = Dever::db('source_cart', 'place_order')->select($where, $set);
+        if ($data) {
+            foreach($data as &$v) {
+                Dever::input('num', 'set', $v['num']);
+                Dever::input('sku_id', 'set', $v['sku_id']);
+                $info = Dever::load('info', 'place_source')->getInfo($v['source_id']);
+                if (!$info) {
+                    $v['del'] = 1;
+                } else {
+                    $v['del'] = 2;
+                    unset($info['price']['list']);
+                }
+                $v['name'] = $info['name'];
+                $v['sku_name'] = $info['sku_name'];
+                $v['pic'] = $info['pic'][0] ?? '';
+                $v['price'] = $info['price'];
+                $v['cdate_str'] = date('Y-m-d H:i:s', $v['cdate']);
+                $v['is_stock'] = 2;
+                if (isset($info['stock'])) {
+                    $v['is_stock'] = 1;
+                    $v['stock'] = $info['stock'];
+                }
+            }
+        }
+        return $data;
+    }
+
+    # 购物车增减
+    public function up($source_id, $sku_id, $num)
+    {
+        $data['uid'] = Place::$uid;
+        $data['source_id'] = $source_id;
+        $data['sku_id'] = $sku_id;
+
+        $info = Dever::db('info', 'place_source')->find($source_id);
+        if (!$info) {
+            Dever::error('商品不存在');
+        }
+
+        $stock = Dever::load('stock', 'place_source')->yue($data['source_id'], $data['sku_id']);
+        if ($stock !== false && $num > $stock) {
+            Dever::error('库存不足');
+        }
+        $info = Dever::db('source_cart', 'place_order')->find($data);
+        if ($info) {
+            if ($num <= 0) {
+                Dever::db('source_cart', 'place_order')->delete($info['id']);
+            } else {
+                $data['num'] = $num;
+                Dever::db('source_cart', 'place_order')->update($info['id'], $data);
+            }
+        } else {
+            $data['num'] = $num;
+            $data['status'] = 1;
+            Dever::db('source_cart', 'place_order')->insert($data);
+        }
+        return $this->getList();
+    }
+
+    # 购物车选中状态
+    public function edit($source_id, $sku_id, $status)
+    {
+        $data['uid'] = Place::$uid;
+        $data['source_id'] = $source_id;
+        $data['sku_id'] = $sku_id;
+        $info = Dever::db('source_cart', 'place_order')->find($data);
+        if ($info) {
+            Dever::db('source_cart', 'place_order')->update($info['id'], array('status' => $status));
+        }
+        return $this->getList();
+    }
+
+    # 删除商品
+    public function delete($source_id, $sku_id)
+    {
+        $data['uid'] = Place::$uid;
+        $data['source_id'] = $source_id;
+        $data['sku_id'] = $sku_id;
+        Dever::db('source_cart', 'place_order')->delete($data);
+        return $this->getList();
+    }
+
+    public function drop()
+    {
+        $data['uid'] = Place::$uid;
+        Dever::db('source_cart', 'place_order')->delete($data);
+        return $this->getList();
+    }
+
+    public function confirm()
+    {
+        //$id = Dever::input('ids', 'is_string', '请选择商品');
+        $where['uid'] = Place::$uid;
+        $where['status'] = 1;
+        $data = Dever::db('source_cart', 'place_order')->select($where);
+        if ($data) {
+            $result = array();
+            $result['value'] = 0;
+            $result['original'] = 0;
+            $result['text'] = '';
+            $result['id'] = '';
+            $result['name'] = '';
+            $result['num'] = 0;
+            foreach($data as &$v) {
+                $id = $v['id'];
+                $num = $v['num'];
+                $sku_id = $v['sku_id'];
+                Dever::input('num', 'set', $num);
+                Dever::input('sku_id', 'set', $sku_id);
+                $info = Dever::load('info', 'place_source')->getInfo($v['source_id']);
+                if ($info) {
+                    $v = $info;
+                    $v['cart_id'] = $id;
+                    $v['sku_id'] = $sku_id;
+                    $v['num'] = $num;
+                    $v['cash'] = $v['price']['value'];
+                    if (isset($info['stock'])) {
+                        if (!isset($result['stock'])) {
+                            $result['stock'] = 0;
+                        }
+                        $result['stock'] += $info['stock'];
+                    }
+                    $result['num'] += $v['price']['num'];
+                    $result['value'] += $v['cash'];
+                    $result['original'] += $v['price']['original'];
+                    $v['name'] = $v['name'];
+                    if (isset($v['sku']['info']['name'])) {
+                        $v['sku_name'] = $v['sku']['info']['name'];
+                    }
+                    if (isset($v['sku']['info']['pic']) && $v['sku']['info']['pic']) {
+                        $v['pic'] = $v['sku']['info']['pic'];
+                    } else {
+                        $v['pic'] = $v['pic'][0];
+                    }
+                    if (!$result['id']) {
+                        $result['id'] = $v['id'];
+                    }
+                    if (!$result['name']) {
+                        $result['name'] = $v['name'];
+                    }
+                }
+            }
+
+            $result['original'] = Dever::number($result['original']);
+            $result['value'] = Dever::number($result['value']);
+            $result['original_text'] = Dever::load('price', 'place')->getText($result['value'], 3);
+            $result['text'] = Dever::load('price', 'place')->getText($result['value'], 3);
+            $result['detail'] = $data;
+            return $result;
+        } else {
+            Dever::error('请选择商品');
+        }
+    }
+}

+ 118 - 0
src/place/order/lib/source/Express.php

@@ -0,0 +1,118 @@
+<?php namespace Place_order\Lib\Source;
+use Dever;
+use Place;
+class Express
+{
+    public function update($db, $data)
+    {
+        $order = Dever::db('source', 'place_order')->find($data['order_id']);
+        if ($order && $order['status'] <= 3) {
+            $auth = new \Manage\Lib\Auth();
+            $uid = $auth->uid;
+            $log['type'] = 2;
+            $log['uid'] = $uid;
+            $this->up($data['id'], $order['id'], $data['express_id'], $data['number'], $log);
+        }
+        return 'end';
+    }
+
+    public function up($id, $order_id, $express_id, $number, $log = false)
+    {
+        $update['order_id'] = $order_id;
+        $update['express_id'] = $express_id;
+        $update['number'] = $number;
+        if ($id) {
+            $express = Dever::db('source_express', 'place_order')->find($id);
+            if ($express) {
+                Dever::db('order_express', 'place_order')->update($express['id'], $update);
+            }
+        } else {
+            Dever::db('order_express', 'place_order')->insert($update);
+            Dever::db('source', 'place_order')->update($order_id, array('status' => 3, 'ddate' => time()));
+        }
+        if ($log) {
+            $type = $log['type'];
+            $uid = $log['uid'];
+            $express_info = Dever::db('express', 'sector')->find($update['express_id']);
+            $msg = '已发货:' . $express_info['name'] . ',' . $update['number'];
+            Dever::load('source/log', 'place_order')->up($type, $uid, $order_id, $msg);
+        }
+    }
+
+    # 获取快递物流信息
+    public function getInfo($order, $address_id, $type = 1)
+    {
+        if ($type == 1) {
+            $info = Dever::db('source_express', 'place_order')->find(array('order_id' => $order['id']));
+        } else {
+            $info = Dever::db('source_refund_express', 'place_order')->find(array('order_refund_id' => $order['id']));
+        }
+
+        if ($info) {
+            $express_info = Dever::db('express', 'sector')->find($info['express_id']);
+            $info['cdate_str'] = date('Y-m-d H:i:s', $info['cdate']);
+            $info['name'] = $express_info['name'];
+            $log = Dever::db('express_log', 'sector')->find(array('number' => $info['number']));
+            if ($log) {
+                if ($log['status'] == 1) {
+                    $info['log'] = Dever::json_decode($log['content']);
+                } else {
+                    if (time() - $log['udate'] > 3600) {
+                        list($info['log'], $order['status']) = $this->get($order, $info['express_id'], $info['number'], $log['mobile'], $log['id'], $type);
+                    } else {
+                        $info['log'] = Dever::json_decode($log['content']);
+                    }
+                }
+            } else {
+                $address = Dever::db('address', 'place')->find($address_id);
+                list($info['log'], $order['status']) = $this->get($order, $info['express_id'], $info['number'], $address['phone'], false, $type);
+            }
+            $order['express'] = $info;
+        }
+        return $order;
+    }
+
+    public function get($order, $express_id, $number, $mobile, $id = false, $type = 1)
+    {
+        $param['number'] = $number;
+        $param['mobile'] = substr($mobile, -4);
+        #$data = Dever::load('account', 'api')->run('aliyun_market', 'express', $param);
+        $data['data']['list'] = array();
+        $data['data']['state'] = 3;
+        if ($data && isset($data['data']['list'])) {
+            if ($data['data']['state'] == 3) {
+                $param['status'] = 1;
+                if ($type == 1) {
+                    if ($order['status'] <= 3) {
+                        if ($data['data']['list']) {
+                            $info = $data['data']['list'][0];
+                            Dever::load('source/log', 'place_order')->up(1, $order['uid'], $order['id'], $info['status']);
+                        } else {
+                            $info['time'] = date('Y-m-d H:i:s', time());
+                        }
+                        $order['status'] = 4;
+                        Dever::db('source', 'place_order')->update($order['id'], array('status' => $order['status'], 'qdate' => strtotime($info['time'])));
+                    }
+                } else {
+                    if ($order['status'] <= 3) {
+                        $order_info = Dever::db('source', 'place_order')->find($order['order_id']);
+                        Dever::load('source/refund', 'place_order')->finish($order_info, $order);
+                    }
+                }
+                
+            } else {
+                $param['status'] = 2;
+            }
+            $param['content'] = Dever::json_encode($data['data']['list']);
+            $param['express_id'] = $express_id;
+            $param['udate'] = time();
+            if ($id) {
+                Dever::db('express_log', 'sector')->update($id, $param);
+            } else {
+                Dever::db('express_log', 'sector')->insert($param);
+            }
+            return array($data['data']['list'], $order['status']);
+        }
+        return array(array(), $order['status']);
+    }
+}

+ 45 - 0
src/place/order/lib/source/Log.php

@@ -0,0 +1,45 @@
+<?php namespace Place_order\Lib\Source;
+use Dever;
+use Place;
+class Log
+{
+    public function up($type, $type_id, $order_id, $desc)
+    {
+        $update['type'] = $type;
+        $update['type_id'] = $type_id;
+        $update['order_id'] = $order_id;
+        $update['desc'] = $desc;
+        Dever::db('source_log', 'place_order')->insert($update);
+    }
+
+    # 获取日志信息
+    public function getList($order_id)
+    {
+        $log = Dever::db('source_log', 'place_order')->select(array('order_id' => $order_id));
+        if ($log) {
+            foreach ($log as &$v) {
+                $v = $this->getInfo($v);
+            }
+        }
+        return $log;
+    }
+
+    # 获取日志信息
+    public function getInfo($info)
+    {
+        if ($info['type'] == 1) {
+            $user = Dever::db('info', 'place_user')->find($info['type_id']);
+        } elseif ($info['type'] == 2) {
+            $user = Dever::db('user', 'sector')->find($info['type_id']);
+        } elseif ($info['type'] == 3) {
+            $user = Dever::db('supplier', 'place')->find($info['type_id']);
+        } else {
+            $user['name'] = $user['mobile'] = '-';
+        }
+        $info['type'] = Dever::db('source_log', 'place_order')->value('type', $info);
+        $info['name'] = $user['name'];
+        $info['mobile'] = $user['mobile'];
+        $info['cdate_str'] = date('Y-m-d H:i:s', $info['cdate']);
+        return $info;
+    }
+}

+ 547 - 0
src/place/order/lib/source/Order.php

@@ -0,0 +1,547 @@
+<?php namespace Place_order\Lib\Source;
+use Dever;
+use Place;
+class Order
+{
+    # 获取订单信息
+    public function getInfo($info, $view = false)
+    {
+        if ($info['status'] == 1) {
+            $m = 3600;
+            # 支付倒计时
+            $info['time'] = time() - $info['cdate'];
+            if ($info['time'] >= $m) {
+                # 已过期,自动取消
+                $info['time'] = -1;
+                $this->cancel($info);
+                $info['status'] = 9;
+            } else {
+                $info['time'] = $m - $info['time'];
+            }
+        }
+        $info['scash'] = $info['cash'];
+        $info['cash'] = $info['cash'];
+        $info['detail'] = $this->getDetail($info['id']);
+        $info['info'] = '共' . intval($info['num']) . '件商品';
+        if ($view) {
+            $this->getView($info);
+        }
+        return $info;
+    }
+
+    # 获取订单里每个商品
+    public function getDetail($id)
+    {
+        $result = Dever::db('source_detail', 'place_order')->select(array('order_id' => $id), array('col' => 'id,name,pic,sku_name,sku_id,cash,num'));
+        if ($result) {
+            foreach ($result as &$v) {
+                $v['cash'] = Dever::load('price', 'place')->getText($v['cash'], 3);
+            }
+        }
+        return $result;
+    }
+
+    # 获取订单详情
+    public function getView(&$info)
+    {
+        # 收货地址
+        $info['address'] = Dever::load('address', 'place')->getInfo($info['address_id'], $info['uid']);
+        # 运费
+        $info['yun'] = Dever::load('price', 'place')->getText(0, 3);
+        if (in_array($info['status'], array(3,4,5))) {
+            $info = Dever::load('express', 'goods')->getInfo($info, $info['address_id']);
+            $info['status_name'] = Dever::db('order', 'goods')->value('status', $info['status']);
+        }
+        $info['status_list'] = array
+        (
+            1 => array
+            (
+                'selected' => false,
+                'name' => '待付款',
+                'time' => $info['cdate_str'],
+            ),
+            2 => array
+            (
+                'selected' => false,
+                'name' => '待发货',
+                'time' => $info['pdate_str'] ?? '',
+            ),
+            3 => array
+            (
+                'selected' => false,
+                'name' => '待签收',
+                'time' => $info['ddate_str'] ?? '',
+            ),
+            4 => array
+            (
+                'selected' => false,
+                'name' => '待收货',
+                'time' => $info['qdate_str'] ?? '',
+            ),
+            5 => array
+            (
+                'selected' => false,
+                'name' => '已完成',
+                'time' => $info['fdate_str'] ?? '',
+            ),
+        );
+        foreach ($info['status_list'] as $k => &$status_list) {
+            if ($info['status'] >= $k) {
+                $status_list['selected'] = true;
+            }
+        }
+        if ($info['status'] == 1) {
+            $info['status_msg'] = '下单成功,待支付';
+        } elseif ($info['status'] == 2) {
+            $info['status_msg'] = '支付成功,待发货';
+        } elseif ($info['status'] == 3) {
+            $info['status_msg'] = '配送中,等待签收';
+        } elseif ($info['status'] == 4) {
+            $info['status_msg'] = '已签收,等待确认';
+        } elseif ($info['status'] == 5 || $info['status'] == 6) {
+            $info['status_msg'] = '订单已完成';
+        } elseif ($info['status'] > 6) {
+            $info['status_msg'] = '订单已取消';
+        }
+        
+        $info['refund'] = false;
+        $info['refund_list'] = Dever::db('order_refund', 'goods')->select(array('order_id' => $info['id']));
+        if ($info['refund_list']) {
+            foreach ($info['refund_list'] as $k => $v) {
+                if ($v['status'] < 4) {
+                    $info['refund'] = $v;
+                }
+            }
+        }
+        if ($info['refund']) {
+            if ($info['refund']['status'] > 2) {
+                $info['refund'] = Dever::load('express', 'goods')->getInfo($info['refund'], $info['address_id'], 2);
+            }
+            $info['refund']['cdate_str'] = date('Y-m-d H:i:s', $info['refund']['cdate']);
+            if (isset($info['refund']['sdate']) && $info['refund']['sdate']) {
+                $info['refund']['sdate_str'] = date('Y-m-d H:i:s', $info['refund']['sdate']);
+            }
+            if (isset($info['refund']['ddate']) && $info['refund']['ddate']) {
+                $info['refund']['ddate_str'] = date('Y-m-d H:i:s', $info['refund']['ddate']);
+            }
+            if (isset($info['refund']['fdate']) && $info['refund']['fdate']) {
+                $info['refund']['fdate_str'] = date('Y-m-d H:i:s', $info['refund']['fdate']);
+            }
+            if ($info['refund']['type'] == 1) {
+                $info['refund_status_list'] = array
+                (
+                    1 => array
+                    (
+                        'selected' => false,
+                        'name' => '退货退款',
+                        'time' => $info['refund']['cdate_str'],
+                    ),
+                    2 => array
+                    (
+                        'selected' => false,
+                        'name' => '已审核',
+                        'time' => $info['refund']['sdate_str'] ?? '',
+                    ),
+                    3 => array
+                    (
+                        'selected' => false,
+                        'name' => '买家已发货',
+                        'time' => $info['refund']['ddate_str'] ?? '',
+                    ),
+                    4 => array
+                    (
+                        'selected' => false,
+                        'name' => '已完成',
+                        'time' => $info['refund']['fdate_str'] ?? '',
+                    ),
+                );
+            }
+            if ($info['refund']['type'] == 2) {
+                $info['refund_status_list'] = array
+                (
+                    1 => array
+                    (
+                        'selected' => false,
+                        'name' => '仅退款',
+                        'time' => $info['cdate_str'],
+                    ),
+                    2 => array
+                    (
+                        'selected' => false,
+                        'name' => '已审核',
+                        'time' => $info['sdate_str'] ?? '',
+                    ),
+                    4 => array
+                    (
+                        'selected' => false,
+                        'name' => '已完成',
+                        'time' => $info['fdate_str'] ?? '',
+                    ),
+                );
+            }
+            foreach ($info['refund_status_list'] as $k => $v) {
+                if ($info['refund']['status'] >= $k) {
+                    $info['refund_status_list'][$k]['selected'] = true;
+                }
+            }
+        }
+    }
+
+    # 取消订单
+    public function cancel($order, $status = 9)
+    {
+        if ($order['status'] == 1) {
+            $state = Dever::db('order', 'goods')->update($order['id'], array('status' => $status, 'fdate' => time()));
+            if ($state) {
+                # 恢复库存
+                $this->resell($order['id']);
+            }
+            return 'ok';
+        }
+    }
+
+    # 支付成功
+    public function success($order, $status)
+    {
+        if ($status == 1) {
+            $update['status'] = 2;
+            $msg = '支付成功';
+            
+        } else {
+            $update['status'] = 7;
+            $msg = '支付失败';
+        }
+        $update['pdate'] = time();
+        $state = Dever::db('order', 'goods')->update($order['id'], $update);
+        Dever::load('log', 'goods')->up(1, $order['uid'], $data['order_id'], $msg);
+        if ($state && $update['status'] == 7) {
+            # 恢复库存
+            $this->resell($order['id']);
+        }
+        return $state;
+    }
+
+    # 确认收货
+    public function finish_commit(){}
+    public function finish($type = 1, $order)
+    {
+        if ($order['status'] >= 3 && $order['status'] <= 6) {
+            if ($type == 1) {
+                $uid = $order['uid'];
+            } else {
+                $uid = '';
+            }
+            # 检查有没有退款
+            $refund = Dever::db('order_refund', 'goods')->find(array('order_id' => $order['id'], 'refund_status' => 1));
+            $status = 5;
+            if ($refund) {
+                $status = 6;
+            }
+            Dever::db('order', 'goods')->update($order['id'], array('status' => $status, 'fdate' => time()));
+            Dever::load('log', 'goods')->up($type, $uid, $order['id'], '确认收货,订单完成');
+        }
+    }
+
+    # 恢复库存
+    public function resell($id)
+    {
+        $result = Dever::db('order_detail', 'goods')->select(array('order_id' => $id));
+        if ($result) {
+            foreach ($result as $v) {
+                $state = Dever::load('stock', 'goods')->sell($v['info_id'], $v['sku_id'], $v['num']*-1);
+            }
+        }  
+    }
+
+    # 后台详情页
+    public function showManageView($page)
+    {
+        # 这里获取基本信息
+        $db = Dever::db('order', 'goods');
+        $address = Dever::load('address', 'place')->getInfo($page->info['address_id'], $page->info['uid']);
+        $user = Dever::db('member', 'place')->find($page->info['uid']);
+        $desc = '';
+        $status = $db->value('status', $page->info);
+        if ($page->info['info']) {
+            $desc = '备注:' . $page->info['info'];
+        }
+        $timeline = array();
+        $page->info['cdate_str'] = date('Y-m-d H:i:s', $page->info['cdate']);
+        if (isset($page->info['pdate']) && $page->info['pdate']) {
+            $page->info['pdate_str'] = date('Y-m-d H:i:s', $page->info['pdate']);
+        }
+        if (isset($page->info['ddate']) && $page->info['ddate']) {
+            $page->info['ddate_str'] = date('Y-m-d H:i:s', $page->info['ddate']);
+        }
+        if (isset($page->info['qdate']) && $page->info['qdate']) {
+            $page->info['qdate_str'] = date('Y-m-d H:i:s', $page->info['qdate']);
+        }
+        if (isset($page->info['fdate']) && $page->info['fdate']) {
+            $page->info['fdate_str'] = date('Y-m-d H:i:s', $page->info['fdate']);
+        }
+        $this->getView($page->info);
+
+        foreach ($page->info['status_list'] as $k => $v) {
+            $v['name'] = '['.$v['name'].']';
+            if ($k == 1) {
+                $v['name'] .= ' 下单人:' . $user['name'] . '('.$user['mobile'].')' . ' 付款:' . $page->info['cash'] . '元 '. $desc;
+            } elseif ($k == 2) {
+                $v['name'] .= ' 收货地址:' . $address['full'];
+            } elseif ($k == 3) {
+                if (isset($page->info['express'])) {
+                    $v['name'] .= ' 已发货:' . $page->info['express']['name'] . ',' . $page->info['express']['number'];
+                }
+            } elseif ($k == 4) {
+                if (isset($page->info['express']['log'][0])) {
+                    $v['name'] .= ' ' . $page->info['express']['log'][0]['status'];
+                }
+            } elseif ($k == 5 && $page->info['status'] > 6) {
+                $v['name'] .= ' 订单'.$status.'';
+            }
+            if ($v['selected']) {
+                $v['hollow'] = true;
+                $v['color'] = '#0bbd87';
+                $v['type'] = 'primary';
+                $v['size'] = 'large';
+            }
+            $timeline[] = $v;
+        }
+
+        $button = array();
+
+        if ($page->info['status'] == 2) {
+            $button[] = array
+            (
+                'name' => '修改收货信息',
+                'type' => 'fastedit',
+                'path' => 'sector_place_order/goods_order_address',
+                'row' => array
+                (
+                    'id' => $page->info['id'],
+                ),
+            );
+            $button[] = array
+            (
+                'name' => '发货',
+                # fastedit、fastadd、oper、api、link、route
+                'type' => 'fastadd',
+                'path' => 'sector_place_order/goods_order_express',
+                'row' => array
+                (
+                    'id' => $page->info['id'],
+                ),
+                'param' => array
+                (
+                    'order_id' => $page->info['id'],
+                ),
+            );
+        } elseif ($page->info['status'] == 3 && isset($express)) {
+            $button[] = array
+            (
+                'name' => '修改快递单号',
+                # fastedit、fastadd、oper、api、link、route
+                'type' => 'fastedit',
+                'path' => 'sector_place_order/goods_order_express',
+                'row' => array
+                (
+                    'id' => $express['id'],
+                ),
+                'param' => array
+                (
+                    'order_id' => $page->info['id'],
+                ),
+            );
+        }
+        if (!$page->info['refund'] && $page->info['status'] >= 2 && $page->info['status'] < 7) {
+            $button[] = array
+            (
+                'name' => '退款',
+                'type' => 'fastadd',
+                'path' => 'sector_place_order/goods_order_refund',
+                'row' => array
+                (
+                    'id' => $page->info['id'],
+                ),
+                'param' => array
+                (
+                    'order_id' => $page->info['id'],
+                ),
+            );
+        }
+        $desc = '';
+        if ($page->info['refund']) {
+            $desc = '[退款中]';
+            $refund = array();
+            foreach ($page->info['refund_status_list'] as $k => $v) {
+                $v['name'] = '['.$v['name'].']';
+                if ($k == 1) {
+                    $v['name'] .= ' 申请原因:' . Dever::db('order_refund', 'goods')->value('desc_type', $page->info['refund']['desc_type']) . ' 申请说明:' . $page->info['refund']['desc'];
+                } elseif ($k == 2) {
+                    $v['name'] .= ' 审核备注:' . $page->info['refund']['audit_desc'];
+                } elseif ($k == 3) {
+                    if (isset($page->info['refund']['express'])) {
+                        $v['name'] .= ' 已发货:' . $page->info['refund']['express']['name'] . ',' . $page->info['refund']['express']['number'];
+                    }
+                }
+                if ($v['selected']) {
+                    $v['hollow'] = true;
+                    $v['color'] = 'red';
+                    $v['type'] = 'primary';
+                    $v['size'] = 'large';
+                }
+                $refund[] = $v;
+            }
+            $content[] = array
+            (
+                'name' => '退款进度',
+                'type' => 'timeline',
+                'content' => $refund,
+            );
+            $button = array();
+            if ($page->info['refund']['status'] == 1) {
+                $button[] = array
+                (
+                    'name' => '退款审核',
+                    'type' => 'fastedit',
+                    'path' => 'sector_place_order/goods_order_refund_audit',
+                    'row' => array
+                    (
+                        'id' => $page->info['refund']['id'],
+                    ),
+                    'param' => array
+                    (
+                        'order_id' => $page->info['id'],
+                    ),
+                );
+            }
+        }
+
+        $content[] = array
+        (
+            'name' => '订单进度' . $desc,
+            'type' => 'timeline',
+            'content' => $timeline,
+        );
+
+        $info[] = array
+        (
+            # 类型,desc描述 table表格,表格有head和body即可
+            'type' => 'desc',
+            'name' => $page->info['order_num'],
+            # 每行展示数量
+            'column' => 1,
+            # 是否有边框
+            'border' => true,
+            # 排列方向:horizontal横向 vertical纵向
+            'direction' => 'horizontal',
+            # 右侧按钮
+            'button' => $button,
+            # 具体内容
+            'content' => $content,
+        );
+
+        $detail = Dever::db('order_detail', 'goods')->select(array('order_id' => $page->info['id']));
+        if ($detail) {
+            foreach ($detail as &$v) {
+                $v['status'] = '正常';
+            }
+        }
+
+        $log = Dever::load('log', 'goods')->getList($page->info['id']);
+        
+        $tab = array
+        (
+            'active' => 't1',
+            'content' => array
+            (
+                't1' => array
+                (
+                    'name' => '商品清单',
+                    'type' => 'table',
+                    'border' => true,
+                    #'height' => '200',
+                    'head' => array
+                    (
+                        array
+                        (
+                            'key' => 'name',
+                            'name' => '名称',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'sku_name',
+                            'name' => '规格',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'cash',
+                            'name' => '金额',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'num',
+                            'name' => '数量',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'status',
+                            'name' => '状态',
+                            'fixed' => 'fixed',
+                        ),
+                    ),
+                    'button' => array(),
+                    'body' => $detail,
+                ),
+
+                't2' => array
+                (
+                    'name' => '操作记录',
+                    'type' => 'table',
+                    'border' => true,
+                    #'height' => '200',
+                    'head' => array
+                    (
+                        array
+                        (
+                            'key' => 'type',
+                            'name' => '身份',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'name',
+                            'name' => '名称',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'mobile',
+                            'name' => '联系电话',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'desc',
+                            'name' => '详情',
+                            'fixed' => 'fixed',
+                        ),
+                        array
+                        (
+                            'key' => 'cdate_str',
+                            'name' => '时间',
+                            'fixed' => 'fixed',
+                        ),
+                    ),
+                    'button' => array(),
+                    'body' => $log,
+                ),
+            )
+        );
+        
+        return array('info' => $info, 'tab' => $tab);
+    }
+}

+ 184 - 0
src/place/order/lib/source/Refund.php

@@ -0,0 +1,184 @@
+<?php namespace Place_order\Lib\Source;
+use Dever;
+use Place;
+class Refund
+{
+    # 后台提交
+    public function update($db, $data)
+    {
+        $detail = Dever::input('place_source/order_refund_detail');
+        $order = Dever::db('order', 'place_source')->find($data['order_id']);
+        if ($order && $order['type'] == 1 && $order['status'] <= 4) {
+            $auth = new \Manage\Lib\Auth();
+            $uid = $auth->uid;
+            $log['type'] = 2;
+            $log['uid'] = $uid;
+            $this->up($detail, $order, $data['type'], $data['desc_type'], $data['cash'], $data['desc'], $log);
+        }
+        return 'end';
+    }
+
+    # 后台审核
+    public function audit($db, $data)
+    {
+        $refund = Dever::db('order_refund', 'place_source')->find($data['id']);
+        if ($refund['status'] == 1) {
+            if ($data['audit'] == 1) {
+                $refund['status'] = $update['status'] = 2;
+                $update['sdate'] = time();
+            } else {
+                $update['status'] = 5;
+                $update['sdate'] = time();
+                $update['fdate'] = time();
+            }
+            $update['audit_desc'] = $data['audit_desc'];
+            Dever::db('order_refund', 'place_source')->update($data['id'], $update);
+            $auth = new \Manage\Lib\Auth();
+            $msg = '退款:' . $update['audit_desc'];
+            Dever::load('log', 'place_source')->up(2, $auth->uid, $refund['order_id'], $msg);
+            if ($refund['type'] == 2 && $refund['status'] == 2) {
+                # 仅退款
+                $order = Dever::db('order', 'place_source')->find($refund['order_id']);
+                $this->finish($order, $refund);
+            }
+        }
+        return 'end';
+    }
+
+    # 买家发货
+    public function express($order, $refund, $express_id, $number)
+    {
+        $refund = Dever::db('order_refund', 'place_source')->find($refund['id']);
+        if ($refund['status'] == 2) {
+            $update['status'] = 3;
+            $update['ddate'] = time();
+            $where = array('order_refund_id' => $refund['id']);
+            $info = Dever::db('order_refund_express', 'place_source')->find($where);
+            if (!$info) {
+                $where['order_id'] = $order['id'];
+                $where['express_id'] = $express_id;
+                $where['number'] = $number;
+                Dever::db('order_refund_express', 'place_source')->insert($where);
+                Dever::load('log', 'place_source')->up(1, $order['uid'], $order['id'], '退款:买家已发货');
+            }
+            Dever::db('order_refund', 'place_source')->update($refund['id'], $update);
+        }
+    }
+
+    # 完成退款 如果是支付订单,原路退回
+    public function finish($order, $refund)
+    {
+        $refund = Dever::db('order_refund', 'place_source')->find($refund['id']);
+        if ($refund['status'] == 2 || $refund['status'] == 3) {
+            $update['status'] = 4;
+            $update['fdate'] = time();
+            $update['refund_status'] = 1;
+            Dever::db('order_refund', 'place_source')->update($refund['id'], $update);
+            Dever::load('log', 'place_source')->up(1, $order['uid'], $order['id'], '退款:已完成退款');
+
+            # 检测订单是否全都退了
+            $refund = Dever::db('order_refund', 'place_source')->select(array('order_id' => $order['id']));
+            $cash = 0;
+            foreach ($refund as $k => $v) {
+                $cash += $v['cash'];
+            }
+
+            if ($cash >= $order['cash']) {
+                $refund = Dever::db('order', 'place_source')->update($order['id'], array('status' => 8, 'fdate' => time(), 'refund_status' => 2));
+
+                Dever::load('log', 'place_source')->up(1, $order['uid'], $order['id'], '订单已退款');
+                # 恢复库存
+                Dever::load('order', 'place_source')->resell($order['id']);
+            }
+
+            # 判断是否支付订单,如果是,走退款流程
+            if ($order['type'] == 1) {
+
+            }
+        }
+    }
+
+    public function up($detail, $order, $type, $desc_type, $cash, $desc, $log = false)
+    {
+        if ($detail) {
+            foreach ($detail as $k => $v) {
+                $info = Dever::db('order_detail', 'place_source')->find($v['detail_id']);
+                $refund = Dever::db('order_refund_detail', 'place_source')->find(array('detail_id' => $v['detail_id'], 'refund_status' => 1), array('col' => 'sum(num) as num'));
+                if ($refund && $refund['num']) {
+                    $info['num'] -= $refund['num'];
+                }
+                if ($v['num'] > $info['num']) {
+                    Dever::error('退款数量不能大于下单商品数量');
+                }
+            }
+        }
+        $where = array('order_id' => $order['id'], 'refund_status' => 1);
+        $refund = Dever::db('order_refund', 'place_source')->find($where, array('col' => 'sum(cash) as cash'));
+        if ($refund && $refund['cash']) {
+            $order['cash'] -= $refund['cash'];
+        }
+        if ($cash > $order['cash']) {
+            Dever::error('退款金额不能大于订单金额');
+        }
+        $update = $where;
+        $update['refund_status'] = 2;
+        $update['status'] = array('<', '5');
+        $refund = Dever::db('order_refund', 'place_source')->find($update);
+        $update['type'] = $type;
+        $update['desc_type'] = $desc_type;
+        $update['cash'] = $cash;
+        $update['desc'] = $desc;
+        $update['status'] = 1;
+        if ($refund) {
+            Dever::error('您有退款进行中,请先处理');
+        } else {
+            $id = Dever::db('order_refund', 'place_source')->insert($update);
+            if ($id) {
+                Dever::db('order', 'place_source')->update($order['id'], array('refund_status' => 1));
+                if ($detail) {
+                    foreach ($detail as $k => $v) {
+                        $v['order_refund_id'] = $id;
+                        Dever::db('order_refund_detail', 'place_source')->insert($v);
+                    }
+                }
+                if ($log) {
+                    $type = $log['type'];
+                    $uid = $log['uid'];
+                    $msg = '退款:提交退款申请单';
+                    Dever::load('log', 'place_source')->up($type, $uid, $order['id'], $msg);
+                }
+            }
+        }
+    }
+
+    # 获取信息
+    public function getList($order_id)
+    {
+        $log = Dever::db('order_log', 'place_source')->select(array('order_id' => $order_id));
+        if ($log) {
+            foreach ($log as &$v) {
+                $v = $this->getInfo($v);
+            }
+        }
+        return $log;
+    }
+
+    # 获取信息
+    public function getInfo($info)
+    {
+        if ($info['type'] == 1) {
+            $user = Dever::db('member', 'place')->find($info['type_id']);
+        } elseif ($info['type'] == 2) {
+            $user = Dever::db('user', 'sector')->find($info['type_id']);
+        } elseif ($info['type'] == 3) {
+            $user = Dever::db('supplier', 'place')->find($info['type_id']);
+        } else {
+            $user['name'] = $user['mobile'] = '-';
+        }
+        $info['type'] = Dever::db('order_log', 'place_source')->value('type', $info);
+        $info['name'] = $user['name'];
+        $info['mobile'] = $user['mobile'];
+        $info['cdate_str'] = date('Y-m-d H:i:s', $info['cdate']);
+        return $info;
+    }
+}

+ 58 - 0
src/place/order/manage/core.php

@@ -0,0 +1,58 @@
+<?php
+return array
+(
+    'menu' => array
+    (
+        'source' => array
+        (
+            'parent'    => 'sector_place_order',
+            'name'      => '商品订单',
+            'icon'      => 'product-hunt-line',
+            'sort'      => '1',
+        ),
+
+        'source_address' => array
+        (
+            'parent'    => 'sector_place_order',
+            'name'      => '订单地址',
+            'icon'      => 'product-hunt-line',
+            'sort'      => '10',
+            'show'      => 3,
+        ),
+
+        'source_express' => array
+        (
+            'parent'    => 'sector_place_order',
+            'name'      => '订单发货',
+            'icon'      => 'product-hunt-line',
+            'sort'      => '10',
+            'show'      => 3,
+        ),
+
+        'source_refund' => array
+        (
+            'parent'    => 'sector_place_order',
+            'name'      => '订单退款',
+            'icon'      => 'product-hunt-line',
+            'sort'      => '10',
+            'show'      => 3,
+        ),
+
+        'source_refund_audit' => array
+        (
+            'parent'    => 'sector_place_order',
+            'name'      => '订单退款审核',
+            'icon'      => 'product-hunt-line',
+            'sort'      => '10',
+            'show'      => 3,
+        ),
+
+        'role' => array
+        (
+            'parent'    => 'sector_place_order',
+            'name'      => '角色订单',
+            'icon'      => 'shield-user-line',
+            'sort'      => '2',
+        ),
+    ),
+);

+ 40 - 0
src/place/order/manage/role.php

@@ -0,0 +1,40 @@
+<?php
+$config = array
+(
+    'list' => array
+    (
+        'field'      => array
+        (
+            'order_num',
+            'name',
+            'cash',
+            'status',
+            'cdate',
+        ),
+        'button' => array
+        (
+            
+        ),
+        'data_button' => array
+        (
+            
+        ),
+        'search'    => array
+        (
+            'order_num',
+            'name' => 'like',
+            'cdate' => array
+            (
+                'name' => '创建时间',
+                'type' => 'date',
+                'date_type' => 'datetimerange',
+                'value_format' => 'YYYY-MM-DD HH:mm:ss',
+                'start_placeholder' => '开始日期',
+                'end_placeholder' => '结束日期',
+                'range_separator' => '至',
+            ),
+            'status',
+        ),
+    ),
+);
+return $config;

+ 60 - 0
src/place/order/manage/source.php

@@ -0,0 +1,60 @@
+<?php
+$config = array
+(
+    'list' => array
+    (
+        'field'      => array
+        (
+            'order_num',
+            'name',
+            /*
+            'uid' => array
+            (
+                'show' => 'Dever::call("place/member-find", array({uid}))["name"]',
+            ),*/
+            'cash',
+            'num',
+            'status',
+            'refund_status',
+            'cdate',
+        ),
+        'button' => array
+        (
+            //'新增' => array('add'),
+        ),
+        'data_button' => array
+        (
+            //'编辑' => 'edit',
+            '详情' => array('view', array
+            (
+                'path' => 'sector_place_order/source',
+                'param' => array
+                (
+                    'type' => 'view',
+                    'id' => 'id',
+                    'set' => array('menu' => 'sector_place_order/source', 'parent' => 'sector_place_order/source'),
+                ),
+            )),
+        ),
+        'search'    => array
+        (
+            'order_num',
+            'name' => 'like',
+            'cdate' => array
+            (
+                'name' => '创建时间',
+                'type' => 'date',
+                'date_type' => 'datetimerange',
+                'value_format' => 'YYYY-MM-DD HH:mm:ss',
+                'start_placeholder' => '开始日期',
+                'end_placeholder' => '结束日期',
+                'range_separator' => '至',
+            ),
+            'status',
+            'refund_status',
+        ),
+    ),
+    # 详情页配置
+    'view' => 'place_order/source/order.showManageView',
+);
+return $config;

+ 46 - 0
src/place/order/manage/source_address.php

@@ -0,0 +1,46 @@
+<?php
+$id = Dever::input('id');
+$info = Dever::db('source', 'place_order')->find($id);
+$address = Dever::db('address', 'place_user')->find($info['address_id']);
+$config = array
+(
+    'source' => 'place_order/source',
+    'update' => array
+    (
+        'start' => 'place_order/source/address.update',
+        'field'    => array
+        (
+            'address_id' => array
+            (
+                'value' => $address['id'],
+                'type' => 'hidden',
+            ),
+            'address_name' => array
+            (
+                'name' => '联系人',
+                'value' => $address['name'],
+            ),
+            'address_phone' => array
+            (
+                'name' => '联系电话',
+                'value' => $address['phone'],
+            ),
+            'address_area' => array
+            (
+                'name' => '城市地区',
+                'type' => 'cascader',
+                'remote'    => Dever::url('area/data.get&total=3'),
+                'value'     => $address['area'],
+            ),
+            'address_address' => array
+            (
+                'name' => '详细地址',
+                'type' => 'textarea',
+                'autosize' => array('minRows' => 2),
+                'value' => $address['address'],
+            ),
+        ),
+    ),
+);
+
+return $config;

+ 30 - 0
src/place/order/manage/source_express.php

@@ -0,0 +1,30 @@
+<?php
+$id = Dever::input('field')['order_id'];
+$config = array
+(
+    'update' => array
+    (
+        'start' => 'place_order/source/express.update',
+        'field'    => array
+        (
+            'order_id' => array
+            (
+                'value' => $id,
+                'type' => 'hidden',
+            ),
+            'express_id' => array
+            (
+                'rules' => true,
+                'type' => 'select',
+            ),
+            'number' => array
+            (
+                'rules' => true,
+                'type' => 'textarea',
+                'autosize' => array('minRows' => 2),
+            ),
+        ),
+    ),
+);
+
+return $config;

+ 43 - 0
src/place/order/manage/source_refund.php

@@ -0,0 +1,43 @@
+<?php
+$id = Dever::input('field')['order_id'];
+$config = array
+(
+    'update' => array
+    (
+        'start' => 'place_order/source/refund.update',
+        'field'    => array
+        (
+            'order_id' => array
+            (
+                'value' => $id,
+                'type' => 'hidden',
+            ),
+            'type' => array
+            (
+                'rules' => true,
+                'type' => 'radio',
+            ),
+            'cash' => array
+            (
+                'rules' => true,
+            ),
+            'place_order/source_refund_detail' => array
+            (
+                'name' => '退款明细',
+                'where'  => array('order_refund_id' => 'id'),
+            ),
+            'desc_type' => array
+            (
+                'rules' => true,
+            ),
+            'desc' => array
+            (
+                'rules' => true,
+                'type' => 'textarea',
+                'autosize' => array('minRows' => 2),
+            ),
+        ),
+    ),
+);
+
+return $config;

+ 32 - 0
src/place/order/manage/source_refund_audit.php

@@ -0,0 +1,32 @@
+<?php
+$config = array
+(
+    'update' => array
+    (
+        'start' => 'place_order/source/refund.audit',
+        'field'    => array
+        (
+            'audit' => array
+            (
+                'name' => '退款审核',
+                'rules' => true,
+                'type' => 'radio',
+                'option' => array
+                (
+                    1 => '审核通过',
+                    2 => '审核驳回',
+                ),
+                'default' => 1,
+            ),
+            'audit_desc' => array
+            (
+                'name' => '审核备注',
+                //'rules' => true,
+                'type' => 'textarea',
+                'autosize' => array('minRows' => 2),
+            ),
+        ),
+    ),
+);
+
+return $config;

+ 22 - 0
src/place/order/manage/source_refund_detail.php

@@ -0,0 +1,22 @@
+<?php
+$id = Dever::input('field')['order_id'];
+$detail = Dever::db('source_detail', 'place_order')->select(array('order_id' => $id, 'status' => 1), array('col' => 'concat(name,"-",sku_name) as name, id'));
+return array
+(
+    'update' => array
+    (
+        'field'    => array
+        (
+            'detail_id' => array
+            (
+                'type' => 'select',
+                'clearable' => true,
+                'option' => $detail,
+            ),
+            'num' => array
+            (
+                
+            ),
+        ),
+    ),
+);

+ 68 - 0
src/place/order/table/role.php

@@ -0,0 +1,68 @@
+<?php
+return array
+(
+    'name' => '角色等级支付订单表',
+    'partition' => 'Dever::call("manage/common.system")',
+    'struct' => array
+    (
+        'role_id' => array
+        (
+            'name'      => '角色ID',
+            'type'      => 'int(11)',
+        ),
+
+        'level_id' => array
+        (
+            'name'      => '角色等级ID',
+            'type'      => 'int(11)',
+        ),
+
+        'uid'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '用户',
+        ),
+
+        'name'      => array
+        (
+            'type'      => 'varchar(80)',
+            'name'      => '订单名称',
+        ),
+
+        'order_num'        => array
+        (
+            'type'      => 'varchar(60)',
+            'name'      => '订单号',
+        ),
+
+        'cash'      => array
+        (
+            'type'      => 'decimal(11,2)',
+            'name'      => '订单金额',
+        ),
+
+        'status'        => array
+        (
+            'type'      => 'tinyint(1)',
+            'name'      => '订单状态',
+            'default'   => '1',
+            'value'         => array
+            (
+                1 => '待支付',
+                2 => '已完成',
+                3 => '已取消',
+            ),
+        ),
+
+        'pdate'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '付款时间',
+        ),
+    ),
+
+    'index' => array
+    (
+        'search' => 'uid',
+    ),
+);

+ 128 - 0
src/place/order/table/source.php

@@ -0,0 +1,128 @@
+<?php
+return array
+(
+    'name' => '资源支付订单表',
+    'partition' => 'Dever::call("manage/common.system")',
+    'struct' => array
+    (
+        'source_id' => array
+        (
+            'name'      => '资源ID',
+            'type'      => 'int(11)',
+        ),
+
+        'address_id' => array
+        (
+            'name'      => '地址ID',
+            'type'      => 'int(11)',
+        ),
+
+        'uid'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '用户',
+        ),
+
+        'name'      => array
+        (
+            'type'      => 'varchar(80)',
+            'name'      => '订单名称',
+        ),
+
+        'order_num'        => array
+        (
+            'type'      => 'varchar(60)',
+            'name'      => '订单号',
+        ),
+
+        'cash'      => array
+        (
+            'type'      => 'decimal(11,2)',
+            'name'      => '订单金额',
+        ),
+
+        'num'      => array
+        (
+            'type'      => 'decimal(11,2)',
+            'name'      => '订单数量',
+        ),
+
+        'info'      => array
+        (
+            'type'      => 'varchar(80)',
+            'name'      => '订单备注',
+        ),
+
+        'type'        => array
+        (
+            'type'      => 'tinyint(1)',
+            'name'      => '订单类型',
+            'default'   => '1',
+            'value'         => array
+            (
+                1 => '源代宝订单',
+                2 => '第三方订单',
+            ),
+        ),
+
+        'refund_status'        => array
+        (
+            'type'      => 'tinyint(1)',
+            'name'      => '退款申请状态',
+            'default'   => '2',
+            'value'         => array
+            (
+                1 => '退款申请中',
+                2 => '无退款申请',
+            ),
+        ),
+
+        'status'        => array
+        (
+            'type'      => 'tinyint(1)',
+            'name'      => '订单状态',
+            'default'   => '1',
+            'value'         => array
+            (
+                1 => '待支付',
+                2 => '待发货',
+                3 => '已发货',
+                4 => '待收货',
+                5 => '已完成',
+                6 => '已完成(有退款)',
+                7 => '已取消',
+                8 => '已退款',
+                9 => '已过期',
+            ),
+        ),
+
+        'pdate'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '付款时间',
+        ),
+
+        'ddate'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '发货时间',
+        ),
+
+        'qdate'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '签收时间',
+        ),
+
+        'fdate'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '完成时间',
+        ),
+    ),
+
+    'index' => array
+    (
+        'search' => 'uid',
+    ),
+);

+ 50 - 0
src/place/order/table/source_cart.php

@@ -0,0 +1,50 @@
+<?php
+return array
+(
+    'name' => '资源购物车',
+    'partition' => 'Dever::call("manage/common.system")',
+    'struct' => array
+    (
+        'source_id' => array
+        (
+            'name'      => '资源ID',
+            'type'      => 'int(11)',
+        ),
+
+        'sku_id'        => array
+        (
+            'type'      => 'int(11)',
+            'name'      => 'skuID',
+        ),
+
+        'uid'       => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '用户',
+        ),
+
+        'price' => array
+        (
+            'name'      => '价格',
+            'type'      => 'decimal(11,2)',
+        ),
+
+        'num'      => array
+        (
+            'type'      => 'int(11)',
+            'name'      => '数量',
+        ),
+
+        'status' => array
+        (
+            'name'      => '状态',
+            'type'      => 'tinyint(1)',
+            'default'   => 1,
+            'value'     => array
+            (
+                1 => '选中',
+                2 => '未选中',
+            ),
+        ),
+    ),
+);

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