Browse Source

节前备份

master
dong 4 months ago
parent
commit
a1efd392c5
88 changed files with 8316 additions and 890 deletions
  1. 3
    4
      api/index.js
  2. 13
    14
      app.js
  3. 12
    6
      app.json
  4. 2
    2
      miniprogram_npm/call-bind/index.js
  5. 2
    2
      miniprogram_npm/define-data-property/index.js
  6. 2
    2
      miniprogram_npm/es-define-property/index.js
  7. 2
    2
      miniprogram_npm/es-errors/index.js
  8. 4
    4
      miniprogram_npm/function-bind/index.js
  9. 2
    2
      miniprogram_npm/get-intrinsic/index.js
  10. 2
    2
      miniprogram_npm/gopd/index.js
  11. 2
    2
      miniprogram_npm/has-property-descriptors/index.js
  12. 2
    2
      miniprogram_npm/has-proto/index.js
  13. 4
    4
      miniprogram_npm/has-symbols/index.js
  14. 2
    2
      miniprogram_npm/hasown/index.js
  15. 2
    2
      miniprogram_npm/moment/index.js
  16. 4
    4
      miniprogram_npm/object-inspect/index.js
  17. 10
    10
      miniprogram_npm/qs/index.js
  18. 2
    2
      miniprogram_npm/set-function-length/index.js
  19. 2
    2
      miniprogram_npm/side-channel/index.js
  20. 1
    1
      miniprogram_npm/tdesign-miniprogram/calendar/calendar.wxss
  21. 207
    1
      miniprogram_npm/tdesign-miniprogram/swipe-cell/swipe-cell.js
  22. 2
    2
      miniprogram_npm/tdesign-miniprogram/textarea/textarea.wxss
  23. 259
    116
      package-map/pages/map/index.js
  24. 1
    1
      package-map/pages/map/index.json
  25. 94
    42
      package-map/pages/map/index.wxml
  26. 51
    8
      package-map/pages/map/index.wxss
  27. 13
    11
      package-map/pages/map/indexcopy.js
  28. 11
    11
      package-map/pages/map/indexcopy.wxml
  29. 45
    19
      package-order/pages/address/index.js
  30. 2
    0
      package-order/pages/address/index.json
  31. 13
    8
      package-order/pages/address/index.wxml
  32. 19
    1
      package-order/pages/address/index.wxss
  33. 26
    7
      package-order/pages/createorder/index.js
  34. 8
    6
      package-order/pages/createorder/index.wxml
  35. 1
    1
      package-order/pages/createorder/index.wxss
  36. 1
    1
      package-order/pages/driver/index.wxml
  37. 2
    2
      package-order/pages/mapSelect/index.js
  38. 13
    7
      package-order/pages/newaddress/index.js
  39. 100
    0
      package-order/pages/order/index.js
  40. 7
    0
      package-order/pages/order/index.json
  41. 33
    0
      package-order/pages/order/index.wxml
  42. 106
    0
      package-order/pages/order/index.wxss
  43. 70
    0
      package-order/pages/payment/index.js
  44. 6
    0
      package-order/pages/payment/index.json
  45. 55
    0
      package-order/pages/payment/index.wxml
  46. 127
    0
      package-order/pages/payment/index.wxss
  47. 353
    0
      package-setup/pages/electricity/index.js
  48. 9
    0
      package-setup/pages/electricity/index.json
  49. 56
    0
      package-setup/pages/electricity/index.wxml
  50. 216
    0
      package-setup/pages/electricity/index.wxss
  51. 1
    1
      package-setup/pages/setuplevel/index.js
  52. 2044
    0
      package-setup/utils/wxcharts.js
  53. 97
    147
      package-user/components/captcha/index.js
  54. 3
    1
      package-user/components/captcha/index.json
  55. 26
    49
      package-user/components/captcha/index.wxml
  56. 61
    140
      package-user/components/captcha/index.wxss
  57. 6
    1
      package-user/pages/login/index.js
  58. 11
    6
      package-user/pages/login/index.wxml
  59. 22
    1
      package-user/pages/login/index.wxss
  60. 180
    0
      package-user/pages/order/index.js
  61. 7
    3
      package-user/pages/privacy/index.js
  62. 272
    0
      package-user/pages/register/index.js
  63. 6
    0
      package-user/pages/register/index.json
  64. 68
    0
      package-user/pages/register/index.wxml
  65. 106
    0
      package-user/pages/register/index.wxss
  66. 4
    2
      package-user/pages/userlist/index.js
  67. 7
    4
      package-user/pages/userlist/index.wxml
  68. 149
    0
      pages/balance/index.js
  69. 11
    0
      pages/balance/index.json
  70. 91
    0
      pages/balance/index.wxml
  71. 147
    0
      pages/balance/index.wxss
  72. 96
    0
      pages/details/index.js
  73. 3
    0
      pages/details/index.json
  74. 17
    0
      pages/details/index.wxml
  75. 94
    0
      pages/details/index.wxss
  76. 3
    3
      pages/equipment/index.wxml
  77. 172
    114
      pages/index/index.js
  78. 59
    29
      pages/index/index.wxml
  79. 66
    22
      pages/index/index.wxss
  80. 43
    4
      pages/setup/index.js
  81. 170
    13
      pages/setup/index.wxml
  82. 83
    2
      pages/setup/index.wxss
  83. 112
    10
      pages/tool/index.js
  84. 2
    1
      pages/tool/index.json
  85. 35
    16
      pages/tool/index.wxml
  86. 15
    4
      pages/tool/index.wxss
  87. 2
    2
      project.private.config.json
  88. 2044
    0
      utils/wxcharts.js

+ 3
- 4
api/index.js View File

@@ -1,8 +1,7 @@
1 1
 // api.jshttp://zlink.bjdexn.cn
2 2
 // const baseUrl = 'http://192.168.8.102:8088';  // 替换为您的接口基础 URL
3
-const esosUrl = 'https://esos-iot.bjdexn.cn';  // 线上
4
-const baseUrl = 'https://esos-iot.bjdexn.cn:9443';  // 线上
5
-
3
+const esosUrl = 'https://esos-iot.com';  // 线上
4
+const baseUrl = 'https://esos-iot.com:9443';  // 线上
6 5
 // const baseUrl = 'http://192.168.8.105:8888';  // 替换为您的接口基础 URL
7 6
 //  
8 7
 // 封装网络请求方法 
@@ -17,7 +16,7 @@ function request(url, method, data, options = {}) {
17 16
     const header = {
18 17
       'Content-Type': 'application/x-www-form-urlencoded'
19 18
     };
20
-
19
+// -- // 
21 20
     // 非公共接口需携带 Token
22 21
     if (!isPublic) {
23 22
       const token = wx.getStorageSync('token');

+ 13
- 14
app.js View File

@@ -114,7 +114,7 @@ App({
114 114
         console.error('用户operationId不存在,无法连接WebSocket');
115 115
         return;
116 116
       }
117
-      const wsUrl = `wss://esos-iot.bjdexn.cn:9443/communication/update/${operationId}`;
117
+      const wsUrl = `wss://esos-iot.com:9443/communication/update/${operationId}`;
118 118
       that.wsService.connect(wsUrl);
119 119
     }
120 120
   },
@@ -150,7 +150,7 @@ App({
150 150
         console.log(`尝试重连 in ${delay}ms...`);
151 151
         const { operationId, operationRole } = that.globalData.userInfo; // 修复:用 operationId 而非 userId
152 152
         if (operationId) {
153
-          const wsUrl = `wss://esos-iot.bjdexn.cn:9443/communication/update/${operationId}`;
153
+          const wsUrl = `wss://esos-iot.com:9443/communication/update/${operationId}`;
154 154
           that.wsService.connect(wsUrl);
155 155
         }
156 156
         delay = Math.min(delay * 2, 8000);
@@ -181,15 +181,15 @@ App({
181 181
       return;
182 182
     }
183 183
 
184
-    // 如果已经在为当前单上传,则忽略
184
+    // 如果已经在为当前单上传,则忽略
185 185
     if (service.isTracking && service.currentWorkorderId === workorderId) {
186
-      console.log(`已经在为单 ${workorderId} 上传位置`);
186
+      console.log(`已经在为单 ${workorderId} 上传位置`);
187 187
       return;
188 188
     }
189 189
 
190
-    // 如果已经在为其他单上传,先停止
190
+    // 如果已经在为其他单上传,先停止
191 191
     if (service.isTracking && service.currentWorkorderId !== workorderId) {
192
-      console.log(`当前正在为单 ${service.currentWorkorderId} 上传,切换到 ${workorderId},先停止旧定位`);
192
+      console.log(`当前正在为单 ${service.currentWorkorderId} 上传,切换到 ${workorderId},先停止旧定位`);
193 193
       this.stopDriverLocationUpload();
194 194
     }
195 195
 
@@ -231,9 +231,9 @@ App({
231 231
   /**
232 232
    * 私有方法:执行真正的定位启动逻辑(核心修复:兼容低版本,改用 wx.onLocationChange)
233 233
    */
234
-  // 
234
+ 
235 235
   _doStartLocationUpload(workorderId, service) {
236
-    console.log(`开始为单 ${workorderId} 启动后台定位上传...`);
236
+    console.log(`开始为单 ${workorderId} 启动后台定位上传...`);
237 237
     service.currentWorkorderId = workorderId;
238 238
 
239 239
     // 修复1:先移除旧的定位监听(防止重复监听)
@@ -314,7 +314,7 @@ console.log(distance);
314 314
       return;
315 315
     }
316 316
 
317
-    console.log(`停止为单 ${service.currentWorkorderId} 上传位置`);
317
+    console.log(`停止为单 ${service.currentWorkorderId} 上传位置`);
318 318
 
319 319
     // 1. 移除位置监听(wx.onLocationChange 对应 wx.offLocationChange)
320 320
     this._removeLocationListener();
@@ -366,7 +366,7 @@ console.log(distance);
366 366
     const isLngValid = location.longitude >= 73.66 && location.longitude <= 135.05;
367 367
 
368 368
     if (!isLatValid || !isLngValid) {
369
-      console.warn(`无效位置信息(单: ${workorderId}),跳过上传`, location);
369
+      console.warn(`无效位置信息(单: ${workorderId}),跳过上传`, location);
370 370
       return;
371 371
     }
372 372
 
@@ -383,10 +383,10 @@ console.log(distance);
383 383
         if (response.code !== 200) {
384 384
           throw new Error(`响应码异常: ${response.code}`);
385 385
         }
386
-        console.log(`位置上传成功 (单: ${workorderId})`, data);
386
+        console.log(`位置上传成功 (单: ${workorderId})`, data);
387 387
       })
388 388
       .catch((err) => {
389
-        console.error(`位置上传失败(第${retryCount+1}次)(单: ${workorderId})`, err);
389
+        console.error(`位置上传失败(第${retryCount+1}次)(单: ${workorderId})`, err);
390 390
         if (retryCount < maxRetry) {
391 391
           setTimeout(() => {
392 392
             this._uploadLocation(location, workorderId, retryCount + 1);
@@ -418,5 +418,4 @@ wx.$off = function (eventName, callback) {
418 418
     this.$events[eventName] = [];
419 419
   }
420 420
 };
421
-// 司机端增加人脸识别与指纹识别,
422
-// 云平台12月份电价整理
421
+

+ 12
- 6
app.json View File

@@ -3,7 +3,9 @@
3 3
     "pages/index/index",
4 4
     "pages/setup/index",
5 5
     "pages/tool/index",
6
-    "pages/equipment/index"
6
+    "pages/equipment/index",
7
+    "pages/balance/index",
8
+    "pages/details/index"
7 9
   ],
8 10
   "requiredBackgroundModes": ["location"],
9 11
  
@@ -43,7 +45,7 @@
43 45
   "componentFramework": "glass-easel",
44 46
   "sitemapLocation": "sitemap.json",
45 47
   "lazyCodeLoading": "requiredComponents",
46
-  "__usePrivacyCheck__": true,
48
+  "functionalPages": true,
47 49
   "tabBar": {
48 50
     "selectedColor": "#00C775",
49 51
     "list": [
@@ -55,7 +57,7 @@
55 57
       },
56 58
       {
57 59
         "pagePath": "pages/tool/index",
58
-        "text": "单",
60
+        "text": "单",
59 61
         "iconPath": "static/55.png",
60 62
         "selectedIconPath": "static/66.png"
61 63
       },
@@ -74,10 +76,12 @@
74 76
       "name": "user",
75 77
       "pages": [
76 78
         "pages/login/index",
79
+        "pages/register/index",
77 80
         "pages/privacy/index",
78 81
         "pages/userlist/index",
79 82
         "pages/captcha/index",
80 83
         "pages/slide-confirm/index"
84
+        
81 85
       ]
82 86
     },
83 87
     {
@@ -88,15 +92,17 @@
88 92
         "pages/driver/index",
89 93
         "pages/address/index",
90 94
         "pages/newaddress/index",
91
-        "pages/mapSelect/index"
92
-        
95
+        "pages/mapSelect/index",
96
+        "pages/order/index",
97
+        "pages/payment/index"
93 98
       ]
94 99
     },
95 100
     {
96 101
       "root": "package-setup",
97 102
       "name": "setup",
98 103
       "pages": [
99
-        "pages/setuplevel/index"
104
+        "pages/setuplevel/index",
105
+        "pages/electricity/index"
100 106
       ]
101 107
     },
102 108
     {

+ 2
- 2
miniprogram_npm/call-bind/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038316, function(require, module, exports) {
7
+__DEFINE__(1765242269449, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var bind = require('function-bind');
@@ -42,7 +42,7 @@ if ($defineProperty) {
42 42
 }
43 43
 
44 44
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
45
-return __REQUIRE__(1755660038316);
45
+return __REQUIRE__(1765242269449);
46 46
 })()
47 47
 //miniprogram-npm-outsideDeps=["function-bind","get-intrinsic","set-function-length","es-errors/type","es-define-property"]
48 48
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/define-data-property/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038317, function(require, module, exports) {
7
+__DEFINE__(1765242269450, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var $defineProperty = require('es-define-property');
@@ -63,7 +63,7 @@ module.exports = function defineDataProperty(
63 63
 };
64 64
 
65 65
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
66
-return __REQUIRE__(1755660038317);
66
+return __REQUIRE__(1765242269450);
67 67
 })()
68 68
 //miniprogram-npm-outsideDeps=["es-define-property","es-errors/syntax","es-errors/type","gopd"]
69 69
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/es-define-property/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038318, function(require, module, exports) {
7
+__DEFINE__(1765242269451, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var GetIntrinsic = require('get-intrinsic');
@@ -23,7 +23,7 @@ if ($defineProperty) {
23 23
 module.exports = $defineProperty;
24 24
 
25 25
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
26
-return __REQUIRE__(1755660038318);
26
+return __REQUIRE__(1765242269451);
27 27
 })()
28 28
 //miniprogram-npm-outsideDeps=["get-intrinsic"]
29 29
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/es-errors/index.js View File

@@ -4,14 +4,14 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038319, function(require, module, exports) {
7
+__DEFINE__(1765242269452, function(require, module, exports) {
8 8
 
9 9
 
10 10
 /** @type {import('.')} */
11 11
 module.exports = Error;
12 12
 
13 13
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
14
-return __REQUIRE__(1755660038319);
14
+return __REQUIRE__(1765242269452);
15 15
 })()
16 16
 //miniprogram-npm-outsideDeps=[]
17 17
 //# sourceMappingURL=index.js.map

+ 4
- 4
miniprogram_npm/function-bind/index.js View File

@@ -4,15 +4,15 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038320, function(require, module, exports) {
7
+__DEFINE__(1765242269453, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var implementation = require('./implementation');
11 11
 
12 12
 module.exports = Function.prototype.bind || implementation;
13 13
 
14
-}, function(modId) {var map = {"./implementation":1755660038321}; return __REQUIRE__(map[modId], modId); })
15
-__DEFINE__(1755660038321, function(require, module, exports) {
14
+}, function(modId) {var map = {"./implementation":1765242269454}; return __REQUIRE__(map[modId], modId); })
15
+__DEFINE__(1765242269454, function(require, module, exports) {
16 16
 
17 17
 
18 18
 /* eslint no-invalid-this: 1 */
@@ -99,7 +99,7 @@ module.exports = function bind(that) {
99 99
 };
100 100
 
101 101
 }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
102
-return __REQUIRE__(1755660038320);
102
+return __REQUIRE__(1765242269453);
103 103
 })()
104 104
 //miniprogram-npm-outsideDeps=[]
105 105
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/get-intrinsic/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038322, function(require, module, exports) {
7
+__DEFINE__(1765242269455, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var undefined;
@@ -366,7 +366,7 @@ module.exports = function GetIntrinsic(name, allowMissing) {
366 366
 };
367 367
 
368 368
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
369
-return __REQUIRE__(1755660038322);
369
+return __REQUIRE__(1765242269455);
370 370
 })()
371 371
 //miniprogram-npm-outsideDeps=["es-errors","es-errors/eval","es-errors/range","es-errors/ref","es-errors/syntax","es-errors/type","es-errors/uri","has-symbols","has-proto","function-bind","hasown"]
372 372
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/gopd/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038323, function(require, module, exports) {
7
+__DEFINE__(1765242269456, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var GetIntrinsic = require('get-intrinsic');
@@ -23,7 +23,7 @@ if ($gOPD) {
23 23
 module.exports = $gOPD;
24 24
 
25 25
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
26
-return __REQUIRE__(1755660038323);
26
+return __REQUIRE__(1765242269456);
27 27
 })()
28 28
 //miniprogram-npm-outsideDeps=["get-intrinsic"]
29 29
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/has-property-descriptors/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038324, function(require, module, exports) {
7
+__DEFINE__(1765242269457, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var $defineProperty = require('es-define-property');
@@ -29,7 +29,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
29 29
 module.exports = hasPropertyDescriptors;
30 30
 
31 31
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
32
-return __REQUIRE__(1755660038324);
32
+return __REQUIRE__(1765242269457);
33 33
 })()
34 34
 //miniprogram-npm-outsideDeps=["es-define-property"]
35 35
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/has-proto/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038325, function(require, module, exports) {
7
+__DEFINE__(1765242269458, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var test = {
@@ -22,7 +22,7 @@ module.exports = function hasProto() {
22 22
 };
23 23
 
24 24
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
25
-return __REQUIRE__(1755660038325);
25
+return __REQUIRE__(1765242269458);
26 26
 })()
27 27
 //miniprogram-npm-outsideDeps=[]
28 28
 //# sourceMappingURL=index.js.map

+ 4
- 4
miniprogram_npm/has-symbols/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038326, function(require, module, exports) {
7
+__DEFINE__(1765242269459, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var origSymbol = typeof Symbol !== 'undefined' && Symbol;
@@ -19,8 +19,8 @@ module.exports = function hasNativeSymbols() {
19 19
 	return hasSymbolSham();
20 20
 };
21 21
 
22
-}, function(modId) {var map = {"./shams":1755660038327}; return __REQUIRE__(map[modId], modId); })
23
-__DEFINE__(1755660038327, function(require, module, exports) {
22
+}, function(modId) {var map = {"./shams":1765242269460}; return __REQUIRE__(map[modId], modId); })
23
+__DEFINE__(1765242269460, function(require, module, exports) {
24 24
 
25 25
 
26 26
 /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -65,7 +65,7 @@ module.exports = function hasSymbols() {
65 65
 };
66 66
 
67 67
 }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
68
-return __REQUIRE__(1755660038326);
68
+return __REQUIRE__(1765242269459);
69 69
 })()
70 70
 //miniprogram-npm-outsideDeps=[]
71 71
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/hasown/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038328, function(require, module, exports) {
7
+__DEFINE__(1765242269461, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var call = Function.prototype.call;
@@ -15,7 +15,7 @@ var bind = require('function-bind');
15 15
 module.exports = bind.call(call, $hasOwn);
16 16
 
17 17
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
18
-return __REQUIRE__(1755660038328);
18
+return __REQUIRE__(1765242269461);
19 19
 })()
20 20
 //miniprogram-npm-outsideDeps=["function-bind"]
21 21
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/moment/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038329, function(require, module, exports) {
7
+__DEFINE__(1765242269462, function(require, module, exports) {
8 8
 //! moment.js
9 9
 //! version : 2.30.1
10 10
 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
@@ -5695,7 +5695,7 @@ __DEFINE__(1755660038329, function(require, module, exports) {
5695 5695
 })));
5696 5696
 
5697 5697
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
5698
-return __REQUIRE__(1755660038329);
5698
+return __REQUIRE__(1765242269462);
5699 5699
 })()
5700 5700
 //miniprogram-npm-outsideDeps=[]
5701 5701
 //# sourceMappingURL=index.js.map

+ 4
- 4
miniprogram_npm/object-inspect/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038330, function(require, module, exports) {
7
+__DEFINE__(1765242269463, function(require, module, exports) {
8 8
 var hasMap = typeof Map === 'function' && Map.prototype;
9 9
 var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
10 10
 var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
@@ -533,12 +533,12 @@ function arrObjKeys(obj, inspect) {
533 533
     return xs;
534 534
 }
535 535
 
536
-}, function(modId) {var map = {"./util.inspect":1755660038331}; return __REQUIRE__(map[modId], modId); })
537
-__DEFINE__(1755660038331, function(require, module, exports) {
536
+}, function(modId) {var map = {"./util.inspect":1765242269464}; return __REQUIRE__(map[modId], modId); })
537
+__DEFINE__(1765242269464, function(require, module, exports) {
538 538
 module.exports = require('util').inspect;
539 539
 
540 540
 }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
541
-return __REQUIRE__(1755660038330);
541
+return __REQUIRE__(1765242269463);
542 542
 })()
543 543
 //miniprogram-npm-outsideDeps=["util"]
544 544
 //# sourceMappingURL=index.js.map

+ 10
- 10
miniprogram_npm/qs/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038332, function(require, module, exports) {
7
+__DEFINE__(1765242269465, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var stringify = require('./stringify');
@@ -17,8 +17,8 @@ module.exports = {
17 17
     stringify: stringify
18 18
 };
19 19
 
20
-}, function(modId) {var map = {"./stringify":1755660038333,"./parse":1755660038336,"./formats":1755660038335}; return __REQUIRE__(map[modId], modId); })
21
-__DEFINE__(1755660038333, function(require, module, exports) {
20
+}, function(modId) {var map = {"./stringify":1765242269466,"./parse":1765242269469,"./formats":1765242269468}; return __REQUIRE__(map[modId], modId); })
21
+__DEFINE__(1765242269466, function(require, module, exports) {
22 22
 
23 23
 
24 24
 var getSideChannel = require('side-channel');
@@ -371,8 +371,8 @@ module.exports = function (object, opts) {
371 371
     return joined.length > 0 ? prefix + joined : '';
372 372
 };
373 373
 
374
-}, function(modId) { var map = {"./utils":1755660038334,"./formats":1755660038335}; return __REQUIRE__(map[modId], modId); })
375
-__DEFINE__(1755660038334, function(require, module, exports) {
374
+}, function(modId) { var map = {"./utils":1765242269467,"./formats":1765242269468}; return __REQUIRE__(map[modId], modId); })
375
+__DEFINE__(1765242269467, function(require, module, exports) {
376 376
 
377 377
 
378 378
 var formats = require('./formats');
@@ -639,8 +639,8 @@ module.exports = {
639 639
     merge: merge
640 640
 };
641 641
 
642
-}, function(modId) { var map = {"./formats":1755660038335}; return __REQUIRE__(map[modId], modId); })
643
-__DEFINE__(1755660038335, function(require, module, exports) {
642
+}, function(modId) { var map = {"./formats":1765242269468}; return __REQUIRE__(map[modId], modId); })
643
+__DEFINE__(1765242269468, function(require, module, exports) {
644 644
 
645 645
 
646 646
 var replace = String.prototype.replace;
@@ -666,7 +666,7 @@ module.exports = {
666 666
 };
667 667
 
668 668
 }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
669
-__DEFINE__(1755660038336, function(require, module, exports) {
669
+__DEFINE__(1765242269469, function(require, module, exports) {
670 670
 
671 671
 
672 672
 var utils = require('./utils');
@@ -957,8 +957,8 @@ module.exports = function (str, opts) {
957 957
     return utils.compact(obj);
958 958
 };
959 959
 
960
-}, function(modId) { var map = {"./utils":1755660038334}; return __REQUIRE__(map[modId], modId); })
961
-return __REQUIRE__(1755660038332);
960
+}, function(modId) { var map = {"./utils":1765242269467}; return __REQUIRE__(map[modId], modId); })
961
+return __REQUIRE__(1765242269465);
962 962
 })()
963 963
 //miniprogram-npm-outsideDeps=["side-channel"]
964 964
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/set-function-length/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038337, function(require, module, exports) {
7
+__DEFINE__(1765242269470, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var GetIntrinsic = require('get-intrinsic');
@@ -49,7 +49,7 @@ module.exports = function setFunctionLength(fn, length) {
49 49
 };
50 50
 
51 51
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
52
-return __REQUIRE__(1755660038337);
52
+return __REQUIRE__(1765242269470);
53 53
 })()
54 54
 //miniprogram-npm-outsideDeps=["get-intrinsic","define-data-property","has-property-descriptors","gopd","es-errors/type"]
55 55
 //# sourceMappingURL=index.js.map

+ 2
- 2
miniprogram_npm/side-channel/index.js View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
4 4
 var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
5 5
 var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
6 6
 var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
7
-__DEFINE__(1755660038338, function(require, module, exports) {
7
+__DEFINE__(1765242269471, function(require, module, exports) {
8 8
 
9 9
 
10 10
 var GetIntrinsic = require('get-intrinsic');
@@ -136,7 +136,7 @@ module.exports = function getSideChannel() {
136 136
 };
137 137
 
138 138
 }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
139
-return __REQUIRE__(1755660038338);
139
+return __REQUIRE__(1765242269471);
140 140
 })()
141 141
 //miniprogram-npm-outsideDeps=["get-intrinsic","call-bind/callBound","object-inspect","es-errors/type"]
142 142
 //# sourceMappingURL=index.js.map

+ 1
- 1
miniprogram_npm/tdesign-miniprogram/calendar/calendar.wxss View File

@@ -1,6 +1,6 @@
1 1
 @import '../common/style/index.wxss';.t-calendar{width:inherit;position:relative;z-index:9999;background:var(--td-calendar-bg-color,var(--td-bg-color-container,var(--td-font-white-1,#fff)));overflow-x:hidden;}
2 2
 .t-calendar--popup{border-top-left-radius:var(--td-calendar-radius,24rpx);border-top-right-radius:var(--td-calendar-radius,24rpx);}
3
-.t-calendar__title{display:flex;align-items:center;justify-content:center;font-size:var(--td-calendar-title-font-size,18px);display: none !important;font-weight:600;color:var(--td-calendar-title-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));height:52rpx;padding:32rpx;}
3
+.t-calendar__title{display:flex;align-items:center;justify-content:center;font-size:var(--td-calendar-title-font-size,18px);font-weight:600;color:var(--td-calendar-title-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));height:52rpx;padding:32rpx;}
4 4
 .t-calendar__title:focus{outline:0;}
5 5
 .t-calendar__close-btn{position:absolute;top:32rpx;right:32rpx;margin:-24rpx;padding:24rpx;color:var(--td-calendar-title-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));}
6 6
 .t-calendar__days{display:grid;grid-template-columns:repeat(7,1fr);grid-column-gap:8rpx;padding:0 32rpx;text-align:center;line-height:92rpx;}

+ 207
- 1
miniprogram_npm/tdesign-miniprogram/swipe-cell/swipe-cell.js View File

@@ -1 +1,207 @@
1
-import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import{getRect}from"../common/utils";import{getObserver}from"../common/wechat";let ARRAY=[];const{prefix:prefix}=config,name=`${prefix}-swipe-cell`,ContainerClass=`.${name}`;let SwiperCell=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.options={multipleSlots:!0},this.properties=props,this.data={prefix:prefix,wrapperStyle:"",closed:!0,classPrefix:name,skipMove:!1},this.observers={"left, right"(){this.setSwipeWidth()}},this.lifetimes={attached(){ARRAY.push(this)},ready(){this.setSwipeWidth()},detached(){ARRAY=ARRAY.filter(e=>e!==this)}}}setSwipeWidth(){Promise.all([getRect(this,`${ContainerClass}__left`),getRect(this,`${ContainerClass}__right`)]).then(([e,t])=>{0!==e.width||0!==t.width||this._hasObserved||(this._hasObserved=!0,getObserver(this,`.${name}`).then(()=>{this.setSwipeWidth()})),this.setData({leftWidth:e.width,rightWidth:t.width})})}skipMove(){this.data.skipMove||this.setData({skipMove:!0})}catchMove(){this.data.skipMove&&this.setData({skipMove:!1})}open(){this.setData({opened:!0})}close(){this.setData({opened:!1})}closeOther(){ARRAY.filter(e=>e!==this).forEach(e=>e.close())}onTap(){this.close()}onActionTap(e){const{currentTarget:{dataset:{action:t}}}=e;this.triggerEvent("click",t)}};SwiperCell=__decorate([wxComponent()],SwiperCell);export default SwiperCell;
1
+import { __decorate } from "tslib";
2
+import { SuperComponent, wxComponent } from "../common/src/index";
3
+import config from "../common/config";
4
+import props from "./props";
5
+import { getRect } from "../common/utils";
6
+import { getObserver } from "../common/wechat";
7
+
8
+let ARRAY = [];
9
+const { prefix } = config;
10
+const name = `${prefix}-swipe-cell`;
11
+const ContainerClass = `.${name}`;
12
+// 补充滑动阈值常量
13
+const THRESHOLD = 0.5;
14
+
15
+let SwiperCell = class extends SuperComponent {
16
+  constructor() {
17
+    super(...arguments);
18
+    this.externalClasses = [`${prefix}-class`];
19
+    this.options = { multipleSlots: true };
20
+    this.properties = props;
21
+    this.data = {
22
+      prefix: prefix,
23
+      wrapperStyle: "",
24
+      closed: true,
25
+      classPrefix: name,
26
+      skipMove: false,
27
+      leftWidth: 0,
28
+      rightWidth: 0,
29
+      // 补充滑动状态管理
30
+      nv_state: {
31
+        nv_direction: "", // vertical/horizontal
32
+        nv_dragging: false,
33
+        nv_startOffset: 0,
34
+        nv_deltaX: 0,
35
+        nv_offset: 0,
36
+        nv_leftWidth: 0,
37
+        nv_rightWidth: 0,
38
+        nv_THRESHOLD: THRESHOLD,
39
+      },
40
+    };
41
+    this.observers = {
42
+      "left, right"() {
43
+        this.setSwipeWidth();
44
+      },
45
+    };
46
+    this.lifetimes = {
47
+      attached() {
48
+        ARRAY.push(this);
49
+      },
50
+      ready() {
51
+        this.setSwipeWidth();
52
+      },
53
+      detached() {
54
+        ARRAY = ARRAY.filter((e) => e !== this);
55
+      },
56
+    };
57
+    // 声明事件处理方法(关键:暴露给模板调用)
58
+    this.methods = {
59
+      // 触摸开始:初始化滑动状态
60
+      nv_touchStart(nv_event) {
61
+        const touch = nv_event.touches[0];
62
+        const { leftWidth, rightWidth } = this.data;
63
+        const nv_state = {
64
+          ...this.data.nv_state,
65
+          nv_direction: "",
66
+          nv_dragging: false,
67
+          nv_startOffset: this.data.nv_state.nv_offset || 0,
68
+          nv_deltaX: 0,
69
+          nv_offset: this.data.nv_state.nv_offset || 0,
70
+          nv_leftWidth: leftWidth,
71
+          nv_rightWidth: rightWidth,
72
+          nv_THRESHOLD: THRESHOLD,
73
+        };
74
+        this.setData({ nv_state });
75
+        this.nv_state = nv_state; // 同步到实例属性
76
+      },
77
+      // 触摸移动:核心滑动逻辑(解决 touchmove 报错)
78
+      nv_touchMove(nv_event) {
79
+        const nv_ownerInstance = this;
80
+        const nv_state = this.nv_state || this.data.nv_state;
81
+        
82
+        // 获取滑动偏移量
83
+        const touch = nv_event.touches[0];
84
+        nv_state.nv_deltaX = touch.clientX - (this.startX || touch.clientX);
85
+        this.startX = touch.clientX;
86
+
87
+        // 判断滑动方向
88
+        if (Math.abs(nv_state.nv_deltaX) > Math.abs(touch.clientY - (this.startY || touch.clientY))) {
89
+          nv_state.nv_direction = "horizontal";
90
+        } else {
91
+          nv_state.nv_direction = "vertical";
92
+          nv_ownerInstance.skipMove(); // 垂直滑动跳过
93
+          return;
94
+        }
95
+
96
+        // 水平滑动逻辑
97
+        if (nv_state.nv_direction !== "horizontal") return;
98
+        if (!nv_state.nv_dragging) {
99
+          nv_ownerInstance.triggerEvent("dragstart"); // 触发开始拖拽事件
100
+        }
101
+        nv_state.nv_dragging = true;
102
+        // 计算滑动偏移
103
+        const newOffset = nv_state.nv_startOffset + nv_state.nv_deltaX;
104
+        nv_state.nv_offset = newOffset;
105
+        // 限制滑动范围
106
+        this.nv_swipeMove(newOffset);
107
+        this.setData({ nv_state });
108
+        return false;
109
+      },
110
+      // 触摸结束:处理滑动收尾(解决 touchend 报错)
111
+      nv_touchEnd() {
112
+        const nv_ownerInstance = this;
113
+        const nv_state = this.nv_state || this.data.nv_state;
114
+        nv_state.nv_dragging = false;
115
+
116
+        // 判断是否打开/关闭
117
+        if (nv_state.nv_rightWidth > 0 && -nv_state.nv_startOffset < nv_state.nv_rightWidth && -nv_state.nv_offset > nv_state.nv_rightWidth * nv_state.nv_THRESHOLD) {
118
+          this.nv_open("right");
119
+        } else if (nv_state.nv_leftWidth > 0 && nv_state.nv_startOffset < nv_state.nv_leftWidth && nv_state.nv_offset > nv_state.nv_leftWidth * nv_state.nv_THRESHOLD) {
120
+          this.nv_open("left");
121
+        } else {
122
+          if (nv_state.nv_startOffset !== nv_state.nv_offset) {
123
+            this.nv_close();
124
+          }
125
+        }
126
+        nv_ownerInstance.triggerEvent("dragend"); // 触发结束拖拽事件
127
+        this.setData({ nv_state });
128
+      },
129
+      // 滑动偏移处理
130
+      nv_swipeMove(offset) {
131
+        const { leftWidth, rightWidth } = this.data;
132
+        // 限制偏移范围:-rightWidth ≤ offset ≤ leftWidth
133
+        const clampedOffset = Math.max(-rightWidth, Math.min(offset, leftWidth));
134
+        this.setData({
135
+          wrapperStyle: `transform: translateX(${clampedOffset}px); transition: none;`,
136
+        });
137
+      },
138
+      // 打开侧滑
139
+      nv_open(direction) {
140
+        const offset = direction === "left" ? this.data.leftWidth : -this.data.rightWidth;
141
+        this.setData({
142
+          wrapperStyle: `transform: translateX(${offset}px); transition: transform 0.3s ease;`,
143
+          nv_state: { ...this.data.nv_state, nv_offset: offset },
144
+          closed: false,
145
+        });
146
+        this.triggerEvent("open", { direction });
147
+      },
148
+      // 关闭侧滑
149
+      nv_close() {
150
+        this.setData({
151
+          wrapperStyle: `transform: translateX(0px); transition: transform 0.3s ease;`,
152
+          nv_state: { ...this.data.nv_state, nv_offset: 0 },
153
+          closed: true,
154
+        });
155
+        this.triggerEvent("close");
156
+      },
157
+      // 原有方法保留
158
+      setSwipeWidth() {
159
+        Promise.all([
160
+          getRect(this, `${ContainerClass}__left`),
161
+          getRect(this, `${ContainerClass}__right`),
162
+        ]).then(([e, t]) => {
163
+          if (e.width === 0 && t.width === 0 && !this._hasObserved) {
164
+            this._hasObserved = true;
165
+            getObserver(this, `.${name}`).then(() => {
166
+              this.setSwipeWidth();
167
+            });
168
+          }
169
+          this.setData({ leftWidth: e.width, rightWidth: t.width });
170
+        });
171
+      },
172
+      skipMove() {
173
+        if (!this.data.skipMove) {
174
+          this.setData({ skipMove: true });
175
+        }
176
+      },
177
+      catchMove() {
178
+        if (this.data.skipMove) {
179
+          this.setData({ skipMove: false });
180
+        }
181
+      },
182
+      open() {
183
+        this.setData({ opened: true });
184
+      },
185
+      close() {
186
+        this.setData({ opened: false });
187
+      },
188
+      closeOther() {
189
+        ARRAY.filter((e) => e !== this).forEach((e) => e.close());
190
+      },
191
+      onTap() {
192
+        this.close();
193
+      },
194
+      onActionTap(e) {
195
+        const {
196
+          currentTarget: {
197
+            dataset: { action: t },
198
+          },
199
+        } = e;
200
+        this.triggerEvent("click", t);
201
+      },
202
+    };
203
+  }
204
+};
205
+
206
+SwiperCell = __decorate([wxComponent()], SwiperCell);
207
+export default SwiperCell;

+ 2
- 2
miniprogram_npm/tdesign-miniprogram/textarea/textarea.wxss View File

@@ -1,7 +1,7 @@
1
-@import '../common/style/index.wxss';.t-textarea{display:flex;flex-direction:column;box-sizing:border-box;padding:16rpx 16rpx;background-color:var(--td-textarea-background-color,var(--td-bg-color-container,var(--td-font-white-1,#fff)));}
1
+@import '../common/style/index.wxss';.t-textarea{display:flex;flex-direction:column;box-sizing:border-box;padding:32rpx 32rpx;background-color:var(--td-textarea-background-color,var(--td-bg-color-container,var(--td-font-white-1,#fff)));}
2 2
 .t-textarea__label:not(:empty){font-size:var(--td-font-size-base,28rpx);color:var(--td-textarea-label-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));flex-shrink:0;line-height:44rpx;padding-bottom:var(--td-spacer,16rpx);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
3 3
 .t-textarea__wrapper{display:flex;flex-direction:column;width:100%;flex:1 1 auto;overflow:hidden;}
4
-.t-textarea__wrapper-inner{flex:1 1 auto;box-sizing:border-box;width:inherit;min-width:0;min-height:20px;margin:0;padding:0;text-align:left;background-color:transparent;border:0;resize:none;font-size:var(--td-font-size-m,26rpx);color:var(--td-textarea-text-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));line-height:48rpx;}
4
+.t-textarea__wrapper-inner{flex:1 1 auto;box-sizing:border-box;width:inherit;min-width:0;min-height:20px;margin:0;padding:0;text-align:left;background-color:transparent;border:0;resize:none;font-size:var(--td-font-size-m,32rpx);color:var(--td-textarea-text-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));line-height:48rpx;}
5 5
 .t-textarea__placeholder{color:var(--td-textarea-placeholder-color,var(--td-text-color-placeholder,var(--td-font-gray-3,rgba(0,0,0,.4))));font-size:var(--td-font-size-m,32rpx);}
6 6
 .t-textarea__indicator:not(:empty){flex-shrink:0;color:var(--td-textarea-indicator-text-color,var(--td-text-color-placeholder,var(--td-font-gray-3,rgba(0,0,0,.4))));font-size:var(--td-spacer-1,24rpx);text-align:right;line-height:40rpx;padding-top:var(--td-spacer,16rpx);}
7 7
 .t-textarea--border{border-radius:var(--td-textarea-border-radius,var(--td-radius-default,12rpx));border:2rpx solid var(--td-textarea-border-color,var(--td-component-border,var(--td-gray-color-4,#dcdcdc)));}

+ 259
- 116
package-map/pages/map/index.js View File

@@ -54,8 +54,10 @@ Page({
54 54
     replanThreshold: 3,      // 连续偏离多少次后重新规划
55 55
     orderdata: [],
56 56
     optionsid: '',
57
-    showVerification: false,
58
-    phoneNumber: "138****6789",
57
+    showpayment: false, // 结算弹窗显示状态
58
+    showCodePopup: false, // 验证码弹窗显示状态
59
+    countdown: 60, // 验证码倒计时
60
+    canResend: false, // 是否可重新发送
59 61
     userdata: [],
60 62
     moretype: false,
61 63
     // 拖动
@@ -66,7 +68,7 @@ Page({
66 68
     windowHeight: 0, // 屏幕可用高度(px)
67 69
     // 三个固定高度(max改为屏幕高度)
68 70
     heightConfig: {
69
-      min: 320,    // 最低高度(仅显示价格和路线简要)
71
+      min: 400,    // 最低高度(仅显示价格和路线简要)
70 72
       mid: 520,    // 中间高度(显示行程详情)
71 73
       max: 0       // 占位,将在onLoad中设置为屏幕高度
72 74
     },
@@ -119,7 +121,7 @@ Page({
119 121
     
120 122
     // 初始化地图,获取当前位置和工单信息
121 123
     this.getoneworkorderdetailss();
122
-    this.getoneworkorderdetails();
124
+    // this.getoneworkorderdetails();
123 125
 
124 126
   },
125 127
   
@@ -144,6 +146,7 @@ Page({
144 146
    * 处理接收到的 WebSocket 消息
145 147
    * @param {Object} message 从 app.js 广播过来的消息对象
146 148
    */
149
+  //  可用,位置,容量-
147 150
   detailsWsMessage(message) {
148 151
     console.log('收到 WebSocket 消息:', message);
149 152
 
@@ -195,6 +198,9 @@ Page({
195 198
       .then((data) => {
196 199
         console.log('工单数据:', data.data);
197 200
         if (data.code == 200) {
201
+          this.setData({
202
+            orderdata: data.data
203
+          });
198 204
           // 保存旧的工单类型,用于比较状态变化
199 205
           const oldWorkorderType = this.data.orderdata.workorderType;
200 206
             // **核心修改点:调用 app.js 的方法来控制定位上传**
@@ -204,8 +210,8 @@ Page({
204 210
                 app.startDriverLocationUpload(this.data.optionsid);
205 211
                 this.showInfo('已开启实时位置上传');
206 212
               } 
207
-              this.initMap(); 
208 213
             }
214
+            this.initMap(); 
209 215
           }
210 216
       })
211 217
       .catch((err) => {
@@ -284,12 +290,12 @@ Page({
284 290
     });
285 291
   },
286 292
   
287
-  // 设置终点位置(核心修改:未分配工单时隐藏司机标记和轨迹)
293
+  // 设置终点位置(核心修改:未分配工单时隐藏司机标记和轨迹)- 
288 294
   setDestination() {
289 295
     const ICON_PATH = {
290
-      start: "https://esos-iot.bjdexn.cn/myminio/project/0b0593293af54ea097b168cea479c25c.png",
291
-      end: "https://esos-iot.bjdexn.cn/myminio/project/6dc37b15321b462f9ab59c47263dd224.png",
292
-      driver: "https://esos-iot.bjdexn.cn/myminio/project/f6fba6c83b2d4864a73f5f1d83cda416.png"
296
+      start: "https://esos-iot.com/myminio/project/0b0593293af54ea097b168cea479c25c.png",
297
+      end: "https://esos-iot.com/myminio/project/6dc37b15321b462f9ab59c47263dd224.png",
298
+      driver: "https://esos-iot.com/myminio/project/f6fba6c83b2d4864a73f5f1d83cda416.png"
293 299
     };
294 300
     const MARKER_SIZE = { width: 30, height: 30 };
295 301
     const MAP_PADDING = [100, 100, 100, 100];
@@ -302,21 +308,22 @@ Page({
302 308
 
303 309
     api.request(`/sysworkorder/selectworkorderredis`, 'post', requestData, { isPublic: false })
304 310
       .then((response) => {
305
-        console.log('Redis轨迹数据:', response.data);
311
+
306 312
         
307
-        if (response.code !== 200) {
308
-          this.showInfo("获取轨迹数据失败,请重试");
313
+        if (response.code !== 200 || response.code==[]) {
314
+          this.showInfo("暂无轨迹数据");
309 315
           return;
310 316
         }
311 317
         
312 318
         if (!this.data.orderdata) {
313
-          this.showInfo("单信息加载中...");
319
+          this.showInfo("单信息加载中...");
314 320
           return;
315 321
         }
322
+        response.data = [...response.data].reverse();
323
+        console.log('Redis轨迹数据:', response.data);
316 324
      
317 325
       // 关键判断:工单是否处于进行中状态(1-4)
318
-const isWorkorderAssigned = this.data.orderdata.workorderType >= 1 && this.data.orderdata.workorderType <= 4;
319
-
326
+const isWorkorderAssigned = this.data.orderdata.workorderType >= 1 && this.data.orderdata.workorderType <= 2;
320 327
 // 初始化司机位置为 null
321 328
 let driverPoint = null;
322 329
 
@@ -325,7 +332,7 @@ if (isWorkorderAssigned) {
325 332
   // 优先从最新的响应数据中获取司机位置
326 333
   // 只有当 response.data 是一个非空数组时,才取第一个元素
327 334
   if (response.data && Array.isArray(response.data) && response.data.length > 0) {
328
-    driverPoint = response.data[0];
335
+    driverPoint = response.data[response.data.length-1];
329 336
   } else {
330 337
     // 如果响应数据为空或格式不正确,则使用页面上已缓存的司机位置
331 338
     driverPoint = null;
@@ -333,16 +340,18 @@ if (isWorkorderAssigned) {
333 340
 }else{
334 341
   const markers = [];
335 342
         const endPoint = this.data.orderdata;
336
-
337
-  // 已分配工单时才显示起点
343
+if (response.data.length>0) {
344
+    // 已分配工单时才显示起点
338 345
     markers.push({
339 346
       id: 0,
340
-      longitude: response.data[response.data.length - 1].longitude,
341
-      latitude: response.data[response.data.length - 1].latitude,
347
+      longitude: response.data[0].longitude,
348
+      latitude: response.data[0].latitude,
342 349
       iconPath: ICON_PATH.start,
343 350
       ...MARKER_SIZE,
344 351
       title: "起点"
345 352
     });
353
+}
354
+
346 355
   
347 356
   // 始终添加终点标记
348 357
   markers.push({
@@ -368,12 +377,11 @@ if (isWorkorderAssigned) {
368 377
     points: response.data,
369 378
     padding: MAP_PADDING
370 379
   });
371
-  
372 380
   return
373 381
 }
374 382
 
375 383
 // 对于工单状态为 5 (已完成) 或其他状态,driverPoint 保持为 null
376
-        const startPoint = isWorkorderAssigned ? (response.data && response.data.length > 0 ? response.data[response.data.length - 1] : null) : null;
384
+        const startPoint = isWorkorderAssigned ? (response.data && response.data.length > 0 ? response.data[0] : null) : null;
377 385
         const endPoint = this.data.orderdata;
378 386
         console.log(driverPoint);
379 387
         // 构建标记点(未分配时不添加司机标记)
@@ -496,62 +504,7 @@ if (isWorkorderAssigned) {
496 504
       })
497 505
       .catch((err) => {
498 506
         console.error('请求轨迹数据失败:', err);
499
-        if (this.data.orderdata) {
500
-          const endPoint = this.data.orderdata;
501
-          const isWorkorderAssigned = this.data.orderdata.workorderType >= 1;
502
-          const markers = [
503
-            {
504
-              id: 1,
505
-              longitude: endPoint.longitude,
506
-              latitude: endPoint.latitude,
507
-              iconPath: ICON_PATH.end,
508
-              ...MARKER_SIZE,
509
-              title: "终点",
510
-              name: endPoint.poiName
511
-            }
512
-          ];
513
-          
514
-          // 已分配工单时才显示司机位置
515
-          if (isWorkorderAssigned && this.data.driverLocation.longitude) {
516
-            markers.push({
517
-              id: 2,
518
-              longitude: this.data.driverLocation.longitude,
519
-              latitude: this.data.driverLocation.latitude,
520
-              iconPath: ICON_PATH.driver,
521
-              width: 35, 
522
-              height: 35,
523
-              title: "我的位置"
524
-            });
525
-          }
526
-          
527
-          this.setData({
528
-            markers,
529
-            startPoint: isWorkorderAssigned ? null : null,
530
-            destination: { longitude: endPoint.longitude, latitude: endPoint.latitude },
531
-            polyline: [] // 异常时不显示轨迹线
532
-          });
533
-          
534
-          if (this.mapCtx && !this.data.mapInitialized) {
535
-            const includePoints = [{ longitude: endPoint.longitude, latitude: endPoint.latitude }];
536
-            if (isWorkorderAssigned && this.data.driverLocation.longitude) {
537
-              includePoints.push({ 
538
-                longitude: this.data.driverLocation.longitude, 
539
-                latitude: this.data.driverLocation.latitude 
540
-              });
541
-            }
542
-            this.mapCtx.includePoints({ points: includePoints, padding: MAP_PADDING });
543
-            this.setData({ mapInitialized: true });
544
-          }
545
-          
546
-          // 异常提示区分工单状态
547
-          if (isWorkorderAssigned) {
548
-            this.showInfo(this.data.isDriver ? "已加载终点和我的位置(轨迹数据加载失败)" : "已加载终点位置(等待起点更新)");
549
-          } else {
550
-            this.showInfo("工单未分配,暂未显示司机信息");
551
-          }
552
-        } else {
553
-          this.showInfo("网络请求失败,请检查网络");
554
-        }
507
+        this.showInfo("网络请求失败,请检查网络");
555 508
       });
556 509
   },
557 510
   
@@ -660,8 +613,7 @@ historytrajectory() {
660 613
 
661 614
   api.request(`/sysworkorder/selectworkorderredis`, 'post', data, { isPublic: false })
662 615
     .then((response) => {
663
-      console.log('历史轨迹:', response.data);
664
-
616
+     
665 617
       // 兼容处理:检查返回数据是否有效
666 618
       if (!response.data || response.data.length === 0) {
667 619
         console.log('未获取到轨迹数据或轨迹数据为空');
@@ -670,11 +622,13 @@ historytrajectory() {
670 622
       }
671 623
 
672 624
       if (response.code == 200 && response.data.length > 0) {
625
+        response.data = [...response.data].reverse();
626
+        console.log('历史轨迹:', response.data);
673 627
         // 司机端和用户端统一从[0]获取最新位置
674
-        this.updateDriverLocation(response.data[0]);
628
+        this.updateDriverLocation(response.data[response.data.length-1]);
675 629
 
676 630
         // 如果有多个轨迹点,更新轨迹线
677
-        if (response.data.length > 1) {
631
+        if (response.data.length > 0) {
678 632
           const trackPoints = response.data.map(point => ({
679 633
             longitude: point.longitude*1,
680 634
             latitude: point.latitude*1
@@ -689,15 +643,15 @@ historytrajectory() {
689 643
             }]
690 644
           });
691 645
           console.log(trackPoints);
692
-          if (trackPoints.length<3) {
646
+          if (trackPoints.length<2) {
693 647
              this.mapCtx.includePoints({
694 648
             points:[this.data.destination,...trackPoints],
695 649
             padding: [100, 100, 100, 100] // 适配屏幕边距
696 650
           });
697 651
           }
698
-         
652
+        
699 653
         } else {
700
-          // 如果只有一个轨迹点(通常是司机的当前位置),则只更新司机位置,不绘制轨迹线
654
+          // 如果只有一个轨迹点(通常是司机的当前位置),则只更新司机位置,不绘制轨迹线-
701 655
           console.log('只有一个轨迹点,不绘制轨迹线');
702 656
           this.setData({
703 657
             polyline: [{ points: [] }] // 清空轨迹线
@@ -719,7 +673,7 @@ historytrajectory() {
719 673
 },
720 674
 
721 675
 /**
722
- * 处理空轨迹数据的情况
676
+ * 处理空轨迹数据的情况 
723 677
  */
724 678
 handleEmptyTrajectory() {
725 679
   // 清空轨迹线,避免显示旧的轨迹
@@ -774,7 +728,7 @@ updateDriverLocation(newDriverLocation) {
774 728
     }
775 729
   }
776 730
 },
777
- 
731
+
778 732
   // 显示信息提示(区分司机/用户端)
779 733
   showInfo(text) {
780 734
     this.setData({ infoText: text });
@@ -797,7 +751,7 @@ updateDriverLocation(newDriverLocation) {
797 751
       this.showInfo("目的地尚未设置");
798 752
       return;
799 753
     }
800
-    
754
+  
801 755
     // 使用在腾讯位置服务申请的key
802 756
     const key = this.data.qqMapKey;
803 757
     const referer = '电速宝';
@@ -809,16 +763,94 @@ updateDriverLocation(newDriverLocation) {
809 763
       longitude: this.data.orderdata.longitude,
810 764
     });
811 765
     const layerStyle = 1;
812
-    
766
+  
813 767
     wx.navigateTo({
814 768
       url: `plugin://route-plan/index?key=${key}&referer=${referer}&endPoint=${endPoint}&enableAI=${enableAI}&navigation=${navigation}&layerStyle=${layerStyle}`,
815 769
       fail: (err) => {
816 770
         console.error('导航启动失败', err);
817
-        this.showInfo(this.data.isDriver ? "导航启动失败,请手动开启" : "导航启动失败");
771
+        // 1. 判断失败原因:插件未安装/不存在(核心逻辑)
772
+        const isPluginNotExist = err.errMsg.includes('plugin not found') || err.errMsg.includes('找不到插件') || err.errMsg.includes('navigateTo:fail');
773
+        
774
+        if (isPluginNotExist) {
775
+          // 2. 提示用户下载腾讯地图
776
+          wx.showModal({
777
+            title: '提示',
778
+            content: '未检测到腾讯地图应用,是否前往应用商店下载?',
779
+            confirmText: '去下载',
780
+            cancelText: '取消',
781
+            success: (res) => {
782
+              if (res.confirm) {
783
+                // 3. 跳转到腾讯地图下载页(区分iOS/Android)
784
+                // iOS下载链接(App Store)
785
+                const iosUrl = 'https://apps.apple.com/cn/app/%E8%85%BE%E8%AE%AF%E5%9C%B0%E5%9B%BE/id414478124';
786
+                // Android下载链接(腾讯应用宝,也可换应用宝/华为应用市场等)
787
+                const androidUrl = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.tencent.map';
788
+                
789
+                wx.navigateToMiniProgram({
790
+                  // 备选方案:直接打开外部下载链接(需小程序配置业务域名)
791
+                  // 优先用openURL,兼容更多场景
792
+                  url: '',
793
+                  fail: () => {
794
+                    wx.openURL({
795
+                      url: wx.getSystemInfoSync().system.includes('iOS') ? iosUrl : androidUrl,
796
+                      fail: () => {
797
+                        this.showInfo('下载链接打开失败,请手动前往应用商店搜索“腾讯地图”下载');
798
+                      }
799
+                    });
800
+                  }
801
+                });
802
+              } else {
803
+                // 用户取消下载,提示手动导航
804
+                this.showInfo(this.data.isDriver ? "导航启动失败,请手动开启腾讯地图导航" : "导航启动失败");
805
+              }
806
+            }
807
+          });
808
+        } else {
809
+          // 非插件未安装的其他失败原因(如参数错误、网络问题)
810
+          this.showInfo(this.data.isDriver ? "导航启动失败,请手动开启" : "导航启动失败");
811
+        }
818 812
       }
819 813
     });
820 814
   },
821 815
   
816
+  // 封装的提示方法(保持原有逻辑)
817
+  showInfo(msg) {
818
+    wx.showToast({
819
+      title: msg,
820
+      icon: 'none',
821
+      duration: 2000
822
+    });
823
+  },
824
+
825
+
826
+  // 重新发送验证码
827
+  onResendCode() {
828
+    // 调用发送验证码接口
829
+    this.showVerificationPopup();
830
+    this.startCountdown(); // 重启倒计时
831
+    wx.showToast({ title: '验证码已发送', icon: 'none' });
832
+    // wx.request({
833
+    //   url: 'https://your-api.com/sendCode',
834
+    //   success: () => {
835
+    //     this.startCountdown(); // 重启倒计时
836
+    //     wx.showToast({ title: '验证码已发送', icon: 'none' });
837
+    //   }
838
+    // });
839
+  },
840
+
841
+  // 验证码倒计时
842
+  startCountdown() {
843
+    let countdown = 60;
844
+    this.setData({ canResend: false, countdown });
845
+    const timer = setInterval(() => {
846
+      countdown--;
847
+      this.setData({ countdown });
848
+      if (countdown <= 0) {
849
+        clearInterval(timer);
850
+        this.setData({ canResend: true, countdown: 60 });
851
+      }
852
+    }, 1000);
853
+  },
822 854
   // 显示验证码弹窗(司机端无需验证码,直接执行操作)
823 855
   showVerificationPopup() {
824 856
       // 用户端正常显示验证码
@@ -828,7 +860,12 @@ updateDriverLocation(newDriverLocation) {
828 860
         .then((data) => {
829 861
           if (data.code == 200) {
830 862
             wx.showToast({ title: data.msg || '验证码已发送', icon: 'none' });
831
-            this.setData({ showVerification: true });
863
+            this.setData({ 
864
+              showCodePopup: true,
865
+              canResend: false
866
+            });
867
+               // 启动倒计时
868
+    this.startCountdown();
832 869
           } else {
833 870
             this.showInfo(data.msg || '获取验证码失败');
834 871
           }
@@ -840,9 +877,8 @@ updateDriverLocation(newDriverLocation) {
840 877
   },
841 878
   
842 879
   // 关闭弹窗
843
-  onPopupClose() {
844
-    this.setData({ showVerification: false });
845
-    
880
+  onCodePopupClose() {
881
+    this.setData({ showCodePopup: false });
846 882
     setTimeout(() => {
847 883
       const slideComponent = this.selectComponent("#mySlideConfirm");
848 884
       if (slideComponent) {
@@ -860,21 +896,20 @@ updateDriverLocation(newDriverLocation) {
860 896
   },
861 897
   
862 898
   // 重新发送验证码(仅用户端有效)
863
-  onResendCode() {
864
-    if (!this.data.isDriver) {
865
-      console.log("重新发送验证码");
866
-      this.showVerificationPopup();
867
-    }
868
-  },
899
+  // onResendCode() {
900
+  //   if (!this.data.isDriver) {
901
+  //     console.log("重新发送验证码");
902
+  //     this.showVerificationPopup();
903
+  //   }
904
+  // },
869 905
   
870 906
   // 验证码输入完成
871
-  onCodeComplete(e) {
907
+  onCodeInputComplete(e) {
872 908
     
873
-    const code = e.detail.code;
874
-    if (!code || code.length < 4) {
875
-      this.showInfo('请输入有效的验证码');
876
-      return;
877
-    }
909
+    console.log(e);
910
+    const code = e.detail.value;
911
+    console.log(code);
912
+ 
878 913
     
879 914
     const data = {
880 915
       carId: this.data.carId,
@@ -885,10 +920,12 @@ updateDriverLocation(newDriverLocation) {
885 920
     api.request(`/sysworkorder/submitworkorder`, 'post', data, { isPublic: false })
886 921
       .then((data) => {
887 922
         if (data.code == 200) {
888
-          wx.showToast({ title: data.msg || '验证成功', icon: 'none' });
889
-          this.setData({ showVerification: false });
923
+          wx.showToast({ title: '验证码正确', icon: 'success' });
924
+          this.setData({ showCodePopup: false });
890 925
         } else {
891
-          this.showInfo(data.msg || '验证失败');
926
+          const codePopup = this.selectComponent('.code-popup');
927
+          codePopup.triggerErrorShake();
928
+          wx.showToast({ title: res.data.msg || '验证码错误', icon: 'none' });
892 929
         }
893 930
       })
894 931
       .catch((err) => {
@@ -965,13 +1002,14 @@ success(res) {
965 1002
     api.request(`/sysworkorder/submitworkorder`, 'post', data, { isPublic: false })
966 1003
       .then((data) => {
967 1004
         if (data.code == 200) {
968
-          app.stopDriverLocationUpload(this.data.optionsid);
969 1005
           setTimeout(() => {
970 1006
             const slideComponent = this.selectComponent("#mySlideConfirm");
971 1007
             if (slideComponent) {
972 1008
               slideComponent.reset();
973 1009
             }
974 1010
           }, 5000);
1011
+          app.stopDriverLocationUpload(this.data.optionsid);
1012
+
975 1013
         } else {
976 1014
           this.showInfo(data.msg || '操作失败');
977 1015
         }
@@ -1148,7 +1186,7 @@ success(res) {
1148 1186
     });
1149 1187
   },
1150 1188
  
1151
-  // 编辑
1189
+  // 编辑
1152 1190
   editorder(){
1153 1191
 wx.navigateTo({
1154 1192
   url: `/package-order/pages/createorder/index?order=${this.data.optionsid}`,
@@ -1159,14 +1197,14 @@ wx.navigateTo({
1159 1197
   // 在页面的 js 文件中
1160 1198
 wx.showModal({
1161 1199
   title: '提示',
1162
-  content: '确定要取消单吗?',
1200
+  content: '确定要取消单吗?',
1163 1201
   success (res) {
1164 1202
     if (res.confirm) {
1165 1203
       console.log('用户点击了确定')
1166
-      // 在这里执行确认后的操作
1204
+      // 在这里执行确认后的操作selectcarall   selectcarall
1167 1205
         let data ={
1168 1206
           workorderId:_this.data.optionsid,
1169
-          workorderDeletetype:1
1207
+          workorderType:6
1170 1208
         }
1171 1209
       api.request(`/sysworkorder/updateworkorder`, 'post', data, { isPublic: false })       
1172 1210
         .then((data) => {
@@ -1185,6 +1223,111 @@ wx.showModal({
1185 1223
     }
1186 1224
   }
1187 1225
 })
1188
-  }
1226
+  },
1227
+   /**
1228
+   * 复制目的地地址
1229
+   */
1230
+  copyDestination() {
1231
+    // 1. 获取目的地名称,做空值校验
1232
+    const poiName = this.data.orderdata?.poiName || '';
1233
+    if (!poiName.trim()) {
1234
+      wx.showToast({
1235
+        title: '暂无目的地地址可复制',
1236
+        icon: 'none',
1237
+        duration: 2000
1238
+      });
1239
+      return;
1240
+    }
1241
+
1242
+    // 2. 调用微信API复制到剪贴板
1243
+    wx.setClipboardData({
1244
+      data: poiName, // 要复制的地址内容
1245
+      success: () => {
1246
+        // 复制成功提示
1247
+        wx.showToast({
1248
+          title: '地址已复制',
1249
+          icon: 'success',
1250
+          duration: 2000
1251
+        });
1252
+      },
1253
+      fail: (err) => {
1254
+        // 复制失败兜底提示
1255
+        console.error('复制地址失败', err);
1256
+        wx.showToast({
1257
+          title: '复制失败,请手动复制',
1258
+          icon: 'none',
1259
+          duration: 2000
1260
+        });
1261
+      }
1262
+    });
1263
+  },
1264
+  // 微信结算
1265
+  onpay(){
1266
+    this.setData({
1267
+      showpayment:true
1268
+    })
1269
+  
1270
+  
1271
+ 
1272
+  },
1273
+  // 关闭结算弹窗
1274
+  onpaymentPopupClose() {
1275
+    this.setData({ showpayment: false });
1276
+  },
1277
+
1278
+  // 接收结算弹窗输入完成的密码
1279
+  onpaymentInputComplete(e) {
1280
+    const paymentPwd = e.detail.value; // 获取弹窗输入的6位结算密码
1281
+    // 执行父组件的检验逻辑(替换为你的真实接口/校验)
1282
+    this.checkPaymentPwd(paymentPwd);
1283
+  },
1284
+
1285
+  // 检验结算密码(父组件核心检验逻辑)
1286
+  checkPaymentPwd(pwd) {
1287
+    console.log(pwd);
1288
+    let password = {
1289
+      password:pwd
1290
+    }
1291
+    api.request(`/SysBalance/verifypassword`, 'post', password, { isPublic: false })       
1292
+    .then((data) => {
1293
+      if (data.data) {
1294
+      
1295
+      }else{
1296
+          // 检验失败:触发弹窗晃动+清空
1297
+      const paymentPopup = this.selectComponent('.payment-popup');
1298
+      paymentPopup.triggerErrorShake(); // 调用弹窗的失败动效方法
1299
+      // 提示错误信息
1300
+      wx.showToast({ title:'' || '结算密码错误', icon: 'none' });
1301
+        return
1302
+
1303
+      }
1304
+    })
1305
+    .catch((err) => {
1306
+      this.showInfo('操作失败');
1307
+    });
1308
+   
1309
+      let data ={
1310
+        workorderId:this.data.optionsid,
1311
+        price:this.data.orderdata.price
1312
+      }
1313
+      api.request(`/sysworkorder/updatesettlementtype`, 'post', data, { isPublic: false })       
1314
+      .then((data) => {
1315
+        if (data.code == 200) {
1316
+          wx.showToast({ title: '结算密码正确', icon: 'success' });
1317
+          this.setData({ showpayment: false }); // 关闭弹窗
1318
+          this.getoneworkorderdetails();
1319
+          // wx.navigateTo({
1320
+          //   url: `/package-user/pages/privacy/index?name=微信结算`,
1321
+          // })
1322
+          
1323
+         
1324
+        } 
1325
+      })
1326
+      .catch((err) => {
1327
+        this.showInfo('操作失败');
1328
+      });
1329
+  
1330
+  },
1331
+
1332
+  
1189 1333
 });
1190
-// 

+ 1
- 1
package-map/pages/map/index.json View File

@@ -1,5 +1,5 @@
1 1
 {
2
-  "navigationBarTitleText": "电速宝",
2
+  "navigationBarTitleText": "工单详情",
3 3
   "permission": {
4 4
     "scope.userLocation": {
5 5
       "desc": "你的位置信息将用于展示行驶轨迹"

+ 94
- 42
package-map/pages/map/index.wxml View File

@@ -21,14 +21,14 @@
21 21
     {{infoText}}
22 22
   </view>
23 23
   
24
-  <!-- 加载提示 -->
24
+  <!-- 加载--提示 -->
25 25
   <view wx:if="{{loading}}" class="loading-mask">
26 26
     <view class="loading-view">
27 27
       <loading size="large" color="#007aff">获取路线中...</loading>
28 28
     </view>
29 29
   </view>
30
-
31
-  <!-- 错误提示 -->
30
+  
31
+  <!-- 错误--提示 -->
32 32
   <view wx:if="{{error && !loading}}" class="error-message toast">
33 33
     {{error}}
34 34
   </view>
@@ -37,7 +37,7 @@
37 37
 </view>
38 38
 
39 39
 <!-- 验证码弹窗组件 -->
40
-<verification-popup 
40
+<!-- <verification-popup 
41 41
   isShow="{{showVerification}}"
42 42
   phoneNumber="{{phoneNumber}}"
43 43
   countdownSeconds="60"
@@ -45,8 +45,16 @@
45 45
   bind:confirm="onCodeConfirm"
46 46
   bind:resend="onResendCode"
47 47
   bind:complete="onCodeComplete"
48
+/> -->
49
+<!-- 验证码弹窗(如果有) -->
50
+<verification-popup 
51
+  class="code-popup"
52
+  isShow="{{showCodePopup}}"
53
+  type="code"
54
+  bind:close="onCodePopupClose"
55
+  bind:inputComplete="onCodeInputComplete"
56
+  bind:resend="onResendCode"
48 57
 />
49
-
50 58
 <!-- 底部可拖动卡片 -->
51 59
 <view class="taxi-card-container">
52 60
   <!-- 背景遮罩 -->
@@ -69,18 +77,22 @@
69 77
     
70 78
     <!-- 卡片内容 -->
71 79
     <view class="card-content" style="padding-top: {{cardHeight === 'max' ? '40rpx' : '20rpx'}};">
72
-      <!-- 单状态和基本信息 -->
80
+      <!-- 单状态和基本信息 -->
73 81
       <view class="storagecartext_box">
74 82
       <view class="storagecartext">
75 83
 
76 84
         <view class="destination-title1" style="margin-top: 10rpx;">
77
-          目的地:{{orderdata.poiName}}
85
+          目的地:{{orderdata.poiName}}  <t-icon 
86
+            name="file-copy" 
87
+            size="28rpx" 
88
+            class="icon-call"
89
+            bindtap="copyDestination"
90
+          />
78 91
           <!-- 显示预计到达时间 -->
79
-        
80 92
         </view>
81 93
         
82 94
         <!-- 客户/司机信息 -->
83
-        <view class="contact-info" wx:if="{{userdata.operationRole==5}}">
95
+        <view class="contact-info" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
84 96
           <view class="driver-info" wx:if="{{orderdata.driverphone==''}}">
85 97
             司机:<text class="text-warning">分配中</text>
86 98
           </view>
@@ -110,24 +122,29 @@
110 122
           <text wx:if="{{orderdata.workorderType==2}}" class="section-title">行驶中</text>
111 123
           <text wx:if="{{orderdata.workorderType==3}}" class="section-title">到达地点</text>
112 124
           <text wx:if="{{orderdata.workorderType==4}}" class="section-title">工作中</text>
113
-          <text wx:if="{{orderdata.workorderType==5}}" class="section-title">订单完成</text>
125
+          <!-- <text wx:if="{{orderdata.workorderType==5}}" class="section-title">工单完成</text> -->
126
+          <text wx:if="{{orderdata.workorderType==6}}" class="section-title">取消工单</text>
114 127
           <text wx:if="{{estimatedArrivalTime && orderdata.workorderType==2}}" class="estimated-time">预计{{estimatedArrivalTime}}到达</text>
128
+          <text wx:if="{{orderdata.workorderType==5&&orderdata.settlementType==0}}" class="section-title">待结算</text>
129
+          <text wx:if="{{orderdata.workorderType==5&&orderdata.settlementType==1}}" class="section-title">结算完成</text>
130
+          <text wx:if="{{orderdata.workorderType==5&&orderdata.settlementType==2}}" class="section-title">结算失败</text>
115 131
         </view>
116 132
         
117 133
       </view>
118 134
       
119 135
       <!-- 操作图片 -->
136
+      <!--  -->
120 137
       <view class="action-images">
121 138
         <image 
122
-          wx:if="{{userdata.operationRole==5}}" 
139
+          wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}" 
123 140
           class="storagecar" 
124
-          src="https://esos-iot.bjdexn.cn/myminio/project/c152026b9bc2485f83b39a6132df3ce7.png" 
141
+          src="https://esos-iot.com/myminio/project/c152026b9bc2485f83b39a6132df3ce7.png" 
125 142
           mode="heightFix"
126 143
         />
127 144
         <image 
128 145
           wx:if="{{userdata.operationRole==4}}" 
129 146
           class="storagecar1" 
130
-          src="https://esos-iot.bjdexn.cn/myminio/project/d98e4fde125f40819f8bd8fe872e409c.png" 
147
+          src="https://esos-iot.com/myminio/project/d98e4fde125f40819f8bd8fe872e409c.png" 
131 148
           bind:tap="navigation" 
132 149
           mode="heightFix"
133 150
         />
@@ -135,21 +152,24 @@
135 152
     </view>
136 153
       
137 154
       <!-- 更多操作按钮 -->
138
-      <view class="card_more" wx:if="{{userdata.operationRole==5&&orderdata.workorderType!=0}}">
139
-        <view class="card_morebox">联系客服</view>
140
-        <view class="card_morebox" data-phone="{{orderdata.driverphone}}" bind:tap="ontelephone">联系司机</view>
141
-        <view class="card_morebox" bind:tap="cancel">取消订单</view>
142
-        <view wx:if="{{orderdata.workorderType==5}}" class="card_morebox">开发票</view>
143
-        <view wx:if="{{orderdata.workorderType!=5}}" class="card_morebox" bind:tap="editorder">编辑订单</view>
144
-
155
+      <view class="card_more" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
156
+        <!-- <view class="card_morebox">联系客服</view> -->
157
+        <button class="card_morebox" open-type="contact" plain>
158
+          联系客服
159
+</button>
160
+        <view class="card_morebox card_moreboxleft" data-phone="{{orderdata.driverphone}}" bind:tap="ontelephone" wx:if="{{orderdata.workorderType!=0&&orderdata.workorderType!=5}}">联系司机</view>
161
+        <view class="card_morebox card_moreboxleft" bind:tap="cancel" wx:if="{{orderdata.workorderType<3}}">取消工单</view>
162
+        <!-- <view wx:if="{{orderdata.workorderType==5}}" class="card_morebox card_moreboxleft">开发票</view> -->
163
+        <!-- <view wx:if="{{orderdata.workorderType!=5}}" class="card_morebox card_moreboxleft" bind:tap="editorder">编辑工单</view> -->
164
+           
145 165
       </view>
146 166
       
147 167
       <!-- 客户视角内容 -->
148
-      <view class="card_box" wx:if="{{userdata.operationRole==5}}">
149
-        <!-- 单详情 -->
168
+      <view class="card_box" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
169
+        <!-- 单详情 -->
150 170
         <view class="detail-section" style="border-bottom: 1rpx solid #f5f5f5;">
151 171
           <view class="section-header" bind:tap="onmore">
152
-            <view class="section-title">单详情</view>
172
+            <view class="section-title">单详情</view>
153 173
             <view class="section-action">
154 174
               <text>{{moretype ? '收起' : '展开详情'}}</text>
155 175
               <t-icon name="{{moretype ? 'chevron-up' : 'chevron-down'}}" size="22px"/>
@@ -158,7 +178,7 @@
158 178
           
159 179
           <view class="detail-list" wx:if="{{moretype}}">
160 180
             <view class="detail-item">
161
-              <view class="item-label">单号</view>
181
+              <view class="item-label">单号</view>
162 182
               <view class="item-value">{{orderdata.workorderId}}</view>
163 183
             </view>
164 184
             <view class="detail-item">
@@ -166,8 +186,8 @@
166 186
               <view class="item-value">{{orderdata.workorderCreatetime}}</view>
167 187
             </view>
168 188
             <view class="detail-item">
169
-              <view class="item-label">单类型</view>
170
-              <view class="item-value">{{orderdata.chargedischargeType==1 ? '充电' : '放电'}}</view>
189
+              <view class="item-label">单类型</view>
190
+              <view class="item-value" style="color:#40a9ff;">{{orderdata.chargedischargeType==1 ? '充电' : '放电'}}</view>
171 191
             </view>
172 192
             <view class="detail-item">
173 193
               <view class="item-label">需求电量</view>
@@ -177,6 +197,8 @@
177 197
               <view class="item-label">SOC</view>
178 198
               <view class="item-value">{{orderdata.soc}}</view>
179 199
             </view>
200
+          
201
+          
180 202
             <view class="detail-item">
181 203
               <view class="item-label">车型</view>
182 204
               <view class="item-value">{{orderdata.carMondel}}</view>
@@ -213,26 +235,32 @@
213 235
           
214 236
           <view style="height: 20rpx;" wx:if="{{moretype}}"></view>
215 237
         </view>
216
-        
238
+        <!---->
217 239
         <!-- 费用明细 -->
218 240
         <view class="detail-section">
219 241
           <view class="section-header" bind:tap="oncostdetails">
220
-            <view class="section-title">预估金额</view>
242
+            <view class="section-title" wx:if="{{orderdata.workorderType>4&&orderdata.settlementType==0}}">实付金额</view>
243
+            <view class="section-title" wx:if="{{orderdata.workorderType>4&&orderdata.settlementType==1}}">实付金额</view>
244
+            <view class="section-title" wx:if="{{orderdata.workorderType<4&&orderdata.settlementType==0}}">预估金额</view>
221 245
             <view class="section-action">
222
-              <view class="section-title1">100.1 <text class="section_yuan">元</text>
246
+              <view class="section-title1">{{orderdata.price}} <text class="section_yuan">元</text>
223 247
               </view>
224 248
               <t-icon name="{{costdetails ? 'chevron-up' : 'chevron-down'}}" size="22px"/>
225 249
             </view>
226 250
           </view>
227
-          
251
+          <!---->
228 252
           <view class="fee-list" wx:if="{{costdetails}}">
229 253
             <view class="fee-item">
230 254
               <view class="fee-label">电费</view>
231 255
               <view class="fee-value">¥5.00</view>
232 256
             </view>
233
-            <view class="fee-item">
234
-              <view class="fee-label">服务费</view>
235
-              <view class="fee-value">¥5.00</view>
257
+            <view class="detail-item" wx:if="{{orderdata.chargedischargeType==1}}">
258
+              <view class="item-label">充电量</view>
259
+              <view class="item-value">{{orderdata.chargingcapacity}}</view>
260
+            </view>
261
+            <view class="detail-item" wx:if="{{orderdata.chargedischargeType==2}}">
262
+              <view class="item-label">放电量</view>
263
+              <view class="item-value">{{orderdata.dischargecapacity}}</view>
236 264
             </view>
237 265
             <!-- <view class="fee-item">
238 266
               <view class="fee-label">起步价</view>
@@ -256,10 +284,10 @@
256 284
       <!---->
257 285
       <!-- 司机视角内容 -->
258 286
       <view class="card_box" wx:if="{{userdata.operationRole==4}}">
259
-        <!-- 单详情 -->
287
+        <!-- 单详情 -->
260 288
         <view class="detail-section" style="border-bottom: 1rpx solid #f5f5f5;">
261 289
           <view class="section-header" bind:tap="onmore">
262
-            <view class="section-title">单详情</view>
290
+            <view class="section-title">单详情</view>
263 291
             <view class="section-action">
264 292
               <text>{{moretype ? '收起' : '展开详情'}}</text>
265 293
               <t-icon name="{{moretype ? 'chevron-up' : 'chevron-down'}}" size="22px"/>
@@ -268,7 +296,7 @@
268 296
           
269 297
           <view class="detail-list" wx:if="{{moretype}}">
270 298
             <view class="detail-item">
271
-              <view class="item-label">单号</view>
299
+              <view class="item-label">单号</view>
272 300
               <view class="item-value">{{orderdata.workorderId}}</view>
273 301
             </view>
274 302
             <view class="detail-item">
@@ -276,7 +304,7 @@
276 304
               <view class="item-value">{{orderdata.workorderCreatetime}}</view>
277 305
             </view>
278 306
             <view class="detail-item">
279
-              <view class="item-label">单类型</view>
307
+              <view class="item-label">单类型</view>
280 308
               <view class="item-value">{{orderdata.chargedischargeType==1 ? '充电' : '放电'}}</view>
281 309
             </view>
282 310
             <view class="detail-item">
@@ -325,9 +353,9 @@
325 353
         </view>
326 354
       </view>
327 355
       
328
-      <view style="height: 140rpx;" wx:if="{{moretype}}"></view>
356
+      <view style="height: 140rpx;"></view>
329 357
       
330
-      <!-- 控制按钮区域 -->
358
+      <!-- 开始时间 -->
331 359
       <view class="control-panel" wx:if="{{userdata.operationRole==4}}">
332 360
         <slide-confirm 
333 361
           wx:if="{{orderdata.workorderType==1}}"
@@ -339,7 +367,7 @@
339 367
           defaultText="开始出发"
340 368
           successText="验证中"
341 369
         />
342
-        
370
+        <!--  -->
343 371
         <slide-confirm 
344 372
           wx:if="{{orderdata.workorderType==2}}"
345 373
           id="mySlideConfirm"
@@ -372,8 +400,32 @@
372 400
           defaultText="完成工作"
373 401
           successText="验证中"
374 402
         />
375
-        
403
+        <view class="payment" wx:if="{{orderdata.workorderType==5&&orderdata.settlementType==0}}">
404
+    <view class="payccc">
405
+    用户待结算
406
+    </view>
407
+    </view>
376 408
       </view>
377 409
     </view>
410
+    <view class="payment" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&orderdata.workorderType==5&&orderdata.settlementType==0}}">
411
+    <view class="pay" bind:tap="onpay">
412
+    工单结算
413
+    </view>
414
+    </view>
415
+    <view class="payment" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&orderdata.workorderType<5&&orderdata.settlementType==0}}">
416
+      <view class="payccc">
417
+        工单服务中...
418
+    </view>
419
+    </view>
420
+    <!-- 结算弹窗组件 -->
421
+<!-- 结算弹窗 -->
422
+<verification-popup 
423
+  class="payment-popup" 
424
+  isShow="{{showpayment}}"
425
+  type="结算"
426
+  bind:close="onpaymentPopupClose"
427
+  bind:inputComplete="onpaymentInputComplete"
428
+/>
378 429
   </view>
379
-</view>
430
+</view>  
431
+<!---->

+ 51
- 8
package-map/pages/map/index.wxss View File

@@ -8,7 +8,7 @@
8 8
   flex-direction: column;
9 9
   background-color: #f9f9f9;
10 10
 }
11
-
11
+/*  */
12 12
 .map {
13 13
   width: 100%;
14 14
   height: 60%;
@@ -99,6 +99,8 @@
99 99
 }
100 100
 /* 目的地标题 */
101 101
 .destination-title1 {
102
+  display: flex;
103
+  align-items: center;
102 104
   color: #333;
103 105
 }
104 106
 .destination-font {
@@ -272,7 +274,7 @@ height: 100rpx;
272 274
   left: 0;
273 275
   right: 0;
274 276
   bottom: 0;
275
-  z-index: 999;
277
+  z-index: 99;
276 278
   display: flex;
277 279
   flex-direction: column;
278 280
   align-items: center;
@@ -465,27 +467,35 @@ height: 100rpx;
465 467
 .confirm-btn::after {
466 468
   border: none;
467 469
 }
468
-/* 详情区块通用样式 */
469
-.detail-section {
470
-  /* margin-bottom: 30rpx; */
471
-}
470
+/* 详情区块--通用样式 */
471
+/* .detail-section {
472
+  margin-bottom: 30rpx;
473
+} */
472 474
 .card_more{
473 475
   display: flex;
474
-  justify-content: space-between;
476
+  /* justify-content: space-between; */
475 477
   border-top: 1rpx solid #f5f5f5;
476 478
   padding-top: 20rpx;
477 479
 }
478 480
 .card_morebox{
479 481
   width: 140rpx;
480 482
   height: 60rpx;
483
+  margin: 0rpx;
484
+  padding: 0rpx;
485
+  font-size: 28rpx;
481 486
   display: flex;
482 487
   align-items: center;
483 488
   justify-content: center;
484 489
   border-radius: 50rpx;
490
+  border: 1rpx solid #f9f9f9 !important; 
485 491
   background-color: #fff;
486 492
   box-shadow: 0 -2rpx 12px rgba(0, 0, 0, 0.1);
487 493
 
488 494
 }
495
+
496
+.card_moreboxleft{
497
+  margin-left: 20rpx;
498
+}
489 499
 .card_box{
490 500
   width: 100%;
491 501
 border-radius: 10rpx;
@@ -561,7 +571,7 @@ padding: 0rpx 20rpx;
561 571
 }
562 572
 
563 573
 .contact-btn {
564
-  background-color: #40a9ff;
574
+  background-color: #00C775;
565 575
   color: #fff;
566 576
   font-size: 22rpx;
567 577
   padding: 5rpx 15rpx;
@@ -652,4 +662,37 @@ margin-left: 20rpx;
652 662
   display: flex;
653 663
   align-items: center;
654 664
   justify-content: space-between;
665
+}
666
+.payment{
667
+width: 100%;
668
+position: fixed;
669
+right: 0rpx;
670
+bottom: 60rpx;
671
+display: flex;
672
+align-items: center;
673
+justify-content: center;
674
+}
675
+.pay{
676
+  width: 500rpx;
677
+height: 88rpx;
678
+display: flex;
679
+align-items: center;
680
+justify-content: center;
681
+background-color: #00C775;
682
+color: #fff;
683
+border-radius: 10rpx;
684
+}
685
+.payccc{
686
+  width: 500rpx;
687
+  height: 88rpx;
688
+  display: flex;
689
+  align-items: center;
690
+  justify-content: center;
691
+  border: #00C775 1rpx solid;
692
+  color: #fff;
693
+  background-color: #00C775;
694
+  border-radius: 10rpx;
695
+}
696
+.code-popup{
697
+  z-index: 99;
655 698
 }

+ 13
- 11
package-map/pages/map/indexcopy.js View File

@@ -136,6 +136,7 @@ Page({
136 136
       console.error('请求失败:', err);
137 137
     });
138 138
   },
139
+  // 
139 140
   getworkorder(){
140 141
     let data = {
141 142
       workorderId:this.data.optionsid
@@ -155,9 +156,9 @@ Page({
155 156
   },
156 157
  
157 158
   
158
-  // 初始化地图
159
-  initMap() {
160
-    const that = this;
159
+  // 初始化地图  
160
+   initMap() { 
161
+    const that = this; 
161 162
     
162 163
     // 获取用户当前位置
163 164
     wx.getLocation({
@@ -200,9 +201,9 @@ Page({
200 201
   setDestination() {
201 202
     // 1. 定义常量,提高可维护性
202 203
     const ICON_PATH = {
203
-      start: "https://esos-iot.bjdexn.cn/myminio/project/0b0593293af54ea097b168cea479c25c.png",
204
-      end: "https://esos-iot.bjdexn.cn/myminio/project/6dc37b15321b462f9ab59c47263dd224.png",
205
-      driver: "https://esos-iot.bjdexn.cn/myminio/project/driver_marker.png" // 司机图标路径
204
+      start: "https://esos-iot.com/myminio/project/0b0593293af54ea097b168cea479c25c.png",
205
+      end: "https://esos-iot.com/myminio/project/6dc37b15321b462f9ab59c47263dd224.png",
206
+      driver: "https://esos-iot.com/myminio/project/driver_marker.png" // 司机图标路径
206 207
     };
207 208
     const MARKER_SIZE = { width: 30, height: 30 };
208 209
     const MAP_PADDING = [100, 100, 100, 100];
@@ -520,8 +521,7 @@ Page({
520 521
     onResendCode() {
521 522
       console.log("重新发送验证码");
522 523
       // 重新发送逻辑...
523
-    },
524
-    
524
+    }, 
525 525
     // 验证码输入完成
526 526
     onCodeComplete(e) {
527 527
       console.log("验证码输入完成:", e.detail.code);
@@ -626,7 +626,7 @@ this.startBackgroundLocation();
626 626
       })
627 627
     },
628 628
 // 拖动功能
629
-     // 触摸开始
629
+       // 触摸开始
630 630
   handleTouchStart(e) {
631 631
     this.setData({
632 632
       startY: e.changedTouches[0].clientY
@@ -664,7 +664,7 @@ this.startBackgroundLocation();
664 664
       startY: currentY
665 665
     });
666 666
   },
667
-
667
+// 
668 668
   // 触摸结束:优化全屏吸附逻辑
669 669
   handleTouchEnd() {
670 670
     const { currentHeight } = this.data;
@@ -803,7 +803,7 @@ this.startBackgroundLocation();
803 803
   onUnload() {
804 804
  
805 805
   },
806
-  // 检查并申请后台定位权限
806
+  // 检查并申请后台定位权限-=-=-=-=-=-=-=-=-=
807 807
 checkBackgroundLocationPermission() {
808 808
   return new Promise((resolve, reject) => {
809 809
     // 1. 检查后台定位权限
@@ -851,6 +851,7 @@ checkBackgroundLocationPermission() {
851 851
               scope: 'scope.userLocation',
852 852
               success: () => {
853 853
                 // 前台定位授权成功后,再申请后台定位权限
854
+                // 
854 855
                 wx.authorize({
855 856
                   scope: 'scope.userLocationBackground',
856 857
                   success: () => {
@@ -915,3 +916,4 @@ checkBackgroundLocationPermission() {
915 916
   });
916 917
 }
917 918
 });
919
+// 

+ 11
- 11
package-map/pages/map/indexcopy.wxml View File

@@ -90,7 +90,7 @@
90 90
   <view class="destination-title1" style="margin-top: 20rpx;">
91 91
       目的地:{{orderdata.poiName}}
92 92
     </view>
93
-    <view class="destination-font" wx:if="{{userdata.operationRole==5}}">
93
+    <view class="destination-font" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
94 94
     <view class="driver" wx:if="{{orderdata.driverphone==''}}">司机:<text style="color: #ff6b00;">待接单</text> </view>
95 95
     <view class="driver" wx:else>司机:{{orderdata.driverName}}·{{orderdata.carName}} 
96 96
     
@@ -99,22 +99,22 @@
99 99
     <view class="destination-font" wx:if="{{userdata.operationRole==4}}">客户:{{orderdata.receiver}} <t-icon name="call-1-filled" size="28rpx" data-name="call-1-filled" data-phone="{{orderdata.phone}}" bind:tap="ontelephone" style="margin-left:20rpx"/> </view>
100 100
 
101 101
 </view>
102
-  <image wx:if="{{userdata.operationRole==5}}" class="storagecar" src="https://esos-iot.bjdexn.cn/myminio/project/c152026b9bc2485f83b39a6132df3ce7.png" mode="heightFix"/>
102
+  <image wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}" class="storagecar" src="https://esos-iot.com/myminio/project/c152026b9bc2485f83b39a6132df3ce7.png" mode="heightFix"/>
103 103
  
104
-<image wx:if="{{userdata.operationRole==4}}" class="storagecar1" src="https://esos-iot.bjdexn.cn/myminio/project/d98e4fde125f40819f8bd8fe872e409c.png" bind:tap="navigation" mode="heightFix"/>
104
+<image wx:if="{{userdata.operationRole==4}}" class="storagecar1" src="https://esos-iot.com/myminio/project/d98e4fde125f40819f8bd8fe872e409c.png" bind:tap="navigation" mode="heightFix"/>
105 105
 </view> 
106
-<view class="card_more" wx:if="{{userdata.operationRole==5&&orderdata.workorderType!=0}}">
106
+<view class="card_more" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&orderdata.workorderType!=0}}">
107 107
 <view class="card_morebox">开发票</view>
108 108
 <view class="card_morebox">联系客服</view>
109 109
 <view class="card_morebox" data-phone="{{orderdata.driverphone}}" bind:tap="ontelephone">打电话</view>
110 110
 <view class="card_morebox">再来一单</view>
111 111
 </view>
112
-<view class="card_box" wx:if="{{userdata.operationRole==5}}">
112
+<view class="card_box" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
113 113
  
114 114
    <!-- 行程详情 -->
115 115
    <view class="detail-section" style="border-bottom: 1rpx solid #f5f5f5;">
116 116
     <view class="viewmore_box" bind:tap="onmore">
117
-  <view class="section-title">单详情</view>
117
+  <view class="section-title">单详情</view>
118 118
 <view class="viewmore_right">
119 119
  <text wx:if="{{!moretype}}">展开详情</text> 
120 120
  <text wx:if="{{moretype}}">收起</text> 
@@ -124,7 +124,7 @@
124 124
 </view>
125 125
       <view class="detail-list" wx:if="{{moretype}}">
126 126
         <view class="detail-item">
127
-          <view class="item-label">单号</view>
127
+          <view class="item-label">单号</view>
128 128
           <view class="item-value">{{orderdata.workorderId}}</view>
129 129
         </view>
130 130
         <view class="detail-item">
@@ -132,7 +132,7 @@
132 132
           <view class="item-value">{{orderdata.workorderCreatetime}}</view>
133 133
         </view>
134 134
         <view class="detail-item">
135
-          <view class="item-label">单类型</view>
135
+          <view class="item-label">单类型</view>
136 136
           <view class="item-value" wx:if="{{orderdata.chargedischargeType==1}}">充电</view>
137 137
           <view class="item-value" wx:if="{{orderdata.chargedischargeType==2}}">放电</view>
138 138
         </view>
@@ -207,7 +207,7 @@
207 207
  <!-- 行程详情 -->
208 208
  <view class="detail-section" style="border-bottom: 1rpx solid #f5f5f5;">
209 209
   <view class="viewmore_box" bind:tap="onmore">
210
-<view class="section-title">单详情</view>
210
+<view class="section-title">单详情</view>
211 211
 <view class="viewmore_right">
212 212
 <text wx:if="{{!moretype}}">展开详情</text> 
213 213
 <text wx:if="{{moretype}}">收起</text> 
@@ -217,7 +217,7 @@
217 217
 </view>
218 218
     <view class="detail-list" wx:if="{{moretype}}">
219 219
       <view class="detail-item">
220
-        <view class="item-label">单号</view>
220
+        <view class="item-label">单号</view>
221 221
         <view class="item-value">{{orderdata.workorderId}}</view>
222 222
       </view>
223 223
       <view class="detail-item">
@@ -225,7 +225,7 @@
225 225
         <view class="item-value">{{orderdata.workorderCreatetime}}</view>
226 226
       </view>
227 227
       <view class="detail-item">
228
-        <view class="item-label">单类型</view>
228
+        <view class="item-label">单类型</view>
229 229
         <view class="item-value" wx:if="{{orderdata.chargedischargeType==1}}">充电</view>
230 230
         <view class="item-value" wx:if="{{orderdata.chargedischargeType==2}}">放电</view>
231 231
       </view>

+ 45
- 19
package-order/pages/address/index.js View File

@@ -2,7 +2,6 @@
2 2
 const api = require('../../../api/index.js');
3 3
 
4 4
 Page({
5
-
6 5
   /**
7 6
    * 页面的初始数据
8 7
    */
@@ -28,10 +27,8 @@ Page({
28 27
       address:data.data
29 28
     })
30 29
   }
31
- 
32 30
     })
33 31
     .catch((err) => {
34
-   
35 32
       console.error('请求失败:', err);
36 33
     });
37 34
   },
@@ -53,27 +50,55 @@ Page({
53 50
   
54 51
   },
55 52
   onDelete(id){
56
-    console.log(id.currentTarget.dataset.id);
57
-    let data ={
58
-      addressId:id.currentTarget.dataset.id
53
+    let _this = this
54
+    // 在页面的 js 文件中
55
+  wx.showModal({
56
+    title: '提示',
57
+    content: '确定要取消工单吗?',
58
+    success (res) {
59
+      if (res.confirm) {
60
+        console.log(id.currentTarget.dataset.id);
61
+        let data ={
62
+          addressId:id.currentTarget.dataset.id
63
+        }
64
+        api.request(`/sysaddress/deleteaddress`, 'post',data,{ isPublic: false })
65
+        .then((data) => {
66
+      console.log(data.data);
67
+      if (data.code==200) {
68
+        wx.showToast({ title: '取消成功', icon: 'none' });
69
+        _this.getaddress()
70
+      }
71
+        })
72
+        .catch((err) => {
73
+          console.error('请求失败:', err);
74
+        });
75
+      } else if (res.cancel) {
76
+        // _this.showInfo('取消操作');
77
+        wx.showToast({ title: '取消操作', icon: 'none' });
78
+      }
59 79
     }
60
-    api.request(`/sysaddress/deleteaddress`, 'post',data,{ isPublic: false })
61
-    .then((data) => {
62
-  console.log(data.data);
63
-  if (data.code==200) {
64
- this.getaddress()
65
-  }
66
- 
67
-    })
68
-    .catch((err) => {
69
-   
70
-      console.error('请求失败:', err);
71
-    });
80
+  })
72 81
   },
73 82
   radioChange(e){
74 83
    console.log(e.detail.value);
75
-
84
+   let data ={
85
+    addressId:e.detail.value,
86
+    isDefault:true
87
+   }
88
+   api.request(`/sysaddress/updateaddress`, 'post',data,{ isPublic: false })
89
+   .then((data) => {
90
+ console.log(data.data);
91
+ if (data.code==200) {
92
+this.getaddress()
93
+ }
94
+
95
+   })
96
+   .catch((err) => {
97
+  
98
+     console.error('请求失败:', err);
99
+   });
76 100
   },
101
+ 
77 102
     /**
78 103
    * 生命周期函数--监听页面初次渲染完成
79 104
    */
@@ -85,6 +110,7 @@ Page({
85 110
    * 生命周期函数--监听页面显示
86 111
    */
87 112
   onShow() {
113
+    this.getaddress()
88 114
 
89 115
   },
90 116
 

+ 2
- 0
package-order/pages/address/index.json View File

@@ -1,4 +1,6 @@
1 1
 {
2
+  "navigationBarTitleText": "我的地址",
3
+
2 4
   "usingComponents": {
3 5
     "t-icon": "tdesign-miniprogram/icon/icon",
4 6
     "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell"

+ 13
- 8
package-order/pages/address/index.wxml View File

@@ -1,18 +1,23 @@
1 1
 <!--pages/userlist/index.wxml-->
2 2
 <view class="setup">
3 3
   <radio-group bindchange="radioChange">
4
-    <t-swipe-cell wx:for="{{address}}" wx:key="addressId">
5
-  <view class="driver-info">
4
+    <!-- <t-swipe-cell wx:for="{{address}}" wx:key="addressId" bind:dragstart="handleDragStart" bind:dragend="handleDragEnd"> -->
5
+  <view class="driver-info" wx:for="{{address}}" wx:key="addressId">
6 6
       <view class="driver-details">
7
-        <view class="driver-car">{{item.addressDetails}}</view>
7
+      <view class="driver-name">项目地址:中原油田</view>
8 8
         <view class="driver-name">{{item.poiName||item.addressDetails}}</view>
9
-        <view class="driver-arrive"><radio value="{{item.addressId}}" checked="true"/>{{item.receiver}} {{item.phone}}</view>
9
+        <view class="driver-car">{{item.addressDetails}}</view>
10
+        <view class="driver-arrive"><radio value="{{item.addressId}}" checked="{{item.isDefault}}"/>{{item.receiver}} {{item.phone}}</view>
11
+        <view class="driver-operation">
12
+          <button class="cancel-btn1" data-item="{{item}}" bind:tap="onIconTap">编辑</button>
13
+          <button class="cancel-btn1"  data-id="{{item.addressId}}" bind:tap="onDelete">删除</button>
14
+        </view>
15
+      
10 16
       </view>
11
-      <!-- <button class="cancel-btn" bindtap="cancelOrder">去查看</button> -->
12
-      <t-icon name="edit-2" size="40rpx" data-name="edit-2" data-item="{{item}}" bind:tap="onIconTap" />
17
+      <!-- <t-icon name="edit-2" size="40rpx" data-name="edit-2" data-item="{{item}}" bind:tap="onIconTap" /> -->
13 18
     </view>
14
-      <view slot="right" class="btn delete-btn" data-id="{{item.addressId}}" bind:tap="onDelete">删除</view>
15
-    </t-swipe-cell>
19
+      <!-- <view slot="right" class="btn delete-btn" data-id="{{item.addressId}}" bind:tap="onDelete">删除</view> -->
20
+    <!-- </t-swipe-cell> -->
16 21
   </radio-group>
17 22
 </view>
18 23
 <view class="address">

+ 19
- 1
package-order/pages/address/index.wxss View File

@@ -13,6 +13,7 @@ page{
13 13
   box-sizing: border-box;
14 14
 }
15 15
 .driver-info {
16
+  width: 100%;
16 17
   background-color: white;
17 18
   border-radius: 16rpx;
18 19
   padding:20rpx 30rpx 20rpx 0rpx;
@@ -51,7 +52,7 @@ page{
51 52
   /* color: #666; */
52 53
   color: #999999;
53 54
 
54
-  margin-top: 8rpx;
55
+  margin-top: 28rpx;
55 56
 }
56 57
 
57 58
 .cancel-btn {
@@ -64,6 +65,7 @@ page{
64 65
   background-color: white;
65 66
   border-radius: 32rpx;
66 67
 }
68
+
67 69
 .address{
68 70
   width: 100%;
69 71
   height: 140rpx;
@@ -112,4 +114,20 @@ color: #ffffff;
112 114
 
113 115
 .favor-btn {
114 116
   background-color: var(--td-brand-color, #0052d9);
117
+}
118
+.driver-operation{
119
+  display: flex;
120
+  /* justify-content: space-between; */
121
+  justify-content: space-around;
122
+  margin-top: 30rpx;
123
+}
124
+.cancel-btn1 {
125
+  width: 160rpx;
126
+  height: 64rpx;
127
+  line-height: 64rpx;
128
+  font-size: 28rpx;
129
+  color: #0F80DC;
130
+  border: 1rpx solid #0F80DC;
131
+  background-color: white;
132
+  border-radius: 32rpx;
115 133
 }

+ 26
- 7
package-order/pages/createorder/index.js View File

@@ -27,6 +27,7 @@ Page({
27 27
     workorderpower:'',
28 28
     orderdata:[],
29 29
     orderid:'',
30
+    createtype:false
30 31
   },
31 32
 
32 33
   /**
@@ -34,6 +35,9 @@ Page({
34 35
    */
35 36
   onLoad(options) {
36 37
     console.log(options);
38
+    this.setData({
39
+      userdata: wx.getStorageSync('user') || {},
40
+    });
37 41
 this.getaddress()
38 42
 
39 43
     if (options.order!='') {
@@ -46,7 +50,7 @@ this.getaddress()
46 50
 //  this.getdriver()
47 51
 // this.getvehicle()
48 52
   },
49
-  // 单详情
53
+  // 单详情
50 54
   getoneworkorder() {
51 55
     const data = {
52 56
       workorderId: this.data.orderid
@@ -57,7 +61,6 @@ this.getaddress()
57 61
         if (data.code == 200) {
58 62
        
59 63
           this.setData({
60
-            cartype:data.data.chargedischargeType,
61 64
             workorderElectricity:data.data.workorderElectricity,
62 65
             workorderpower:data.data.workorderPower,
63 66
             greenelectricity:data.data.greenelectricity,
@@ -154,12 +157,18 @@ this.getaddress()
154 157
     api.request(`/sysaddress/selectaddress`, 'post',data,{ isPublic: false })
155 158
     .then((data) => {
156 159
      console.log(data.data);
160
+     for (let index = 0; index < data.data.length; index++) {
161
+          if (data.data[index].isDefault) {
162
+              this.setData({
163
+                addressindex:index
164
+              }) 
165
+          }       
166
+     }
157 167
      this.setData({
158 168
       address:data.data
159 169
      })
160 170
     })
161 171
     .catch((err) => {
162
-   
163 172
       console.error('请求失败:', err);
164 173
     });
165 174
   },
@@ -191,6 +200,13 @@ this.setData({
191 200
     })
192 201
   },
193 202
   details(){
203
+  
204
+    if (this.data.createtype) {
205
+      return
206
+    }
207
+    this.setData({
208
+      createtype:true
209
+    })
194 210
    if (this.data.workorderElectricity==''||this.data.date==''||this.data.time==''||this.data.workorderpower=='') {
195 211
     wx.showToast({
196 212
       title: '请填写完整消息',
@@ -201,7 +217,6 @@ this.setData({
201 217
     let data ={
202 218
       addressId:this.data.address[this.data.addressindex].addressId,
203 219
       workorderElectricity:this.data.workorderElectricity,
204
-      chargedischargeType:this.data.cartype,
205 220
       greenelectricity:this.data.greenelectricity,
206 221
       workorderStarttime:this.data.date+' '+this.data.time,
207 222
       workorderpower:this.data.workorderpower
@@ -209,13 +224,18 @@ this.setData({
209 224
     api.request(`/sysworkorder/addworkorder`, 'post',data,{ isPublic: false })
210 225
     .then((data) => {
211 226
  console.log(data);
227
+
212 228
  wx.switchTab({
213 229
   url: '/pages/tool/index',
214 230
 })
215
-
231
+this.setData({
232
+  createtype:false
233
+})
216 234
     })
217 235
     .catch((err) => {
218
-   
236
+      this.setData({
237
+        createtype:false
238
+      })
219 239
       console.error('请求失败:', err);
220 240
     });
221 241
  
@@ -233,7 +253,6 @@ this.setData({
233 253
       workorderId:this.data.orderid,
234 254
        addressId:this.data.address[this.data.addressindex].addressId,
235 255
        workorderElectricity:this.data.workorderElectricity,
236
-       chargedischargeType:this.data.cartype,
237 256
        greenelectricity:this.data.greenelectricity,
238 257
        workorderStarttime:this.data.date+' '+this.data.time,
239 258
        workorderpower:this.data.workorderpower

+ 8
- 6
package-order/pages/createorder/index.wxml View File

@@ -5,8 +5,8 @@
5 5
 <text style="color: red;">*</text> 用车类型
6 6
 </view>
7 7
 <view class="car_right">
8
-  <view class="{{cartype== 2 ?'cartbuy':'carsell'}}" data-index="1" bind:tap="oncar">买电</view>
9
-  <view class="{{cartype== 1 ?'cartbuy':'carsell'}}" data-index="2" bind:tap="oncar">卖电</view>
8
+  <view wx:if="{{userdata.operationRole==5}}" class="carsell">买电</view>
9
+  <view wx:if="{{userdata.operationRole==6}}" class="carsell">卖电</view>
10 10
 </view>
11 11
 </view>
12 12
 <view class="car">
@@ -14,7 +14,7 @@
14 14
 <text style="color: red;">*</text> <text wx:if="{{cartype==2}}"> 出售电量</text> <text wx:if="{{cartype==1}}"> 需求电量</text> 
15 15
 </view>
16 16
 <view class="model_right">
17
-<input class="powerlevel" type="text" value="{{workorderElectricity}}" bindinput="bindKeyInput" placeholder="请输入电"/>kWh
17
+<input class="powerlevel" type="text" value="{{workorderElectricity}}" bindinput="bindKeyInput" placeholder="请输入需求用电"/>kWh
18 18
 </view>
19 19
 </view>
20 20
 <!-- <view class="car" wx:if="{{cartype==1}}">
@@ -32,7 +32,7 @@
32 32
  变压器容量
33 33
 </view>
34 34
 <view class="model_right">
35
-<input class="powerlevel" value="{{workorderpower}}" bindinput="bindintentionInput" type="text" placeholder="请输入需求用电"/>kVA
35
+<input class="powerlevel" value="{{workorderpower}}" bindinput="bindintentionInput" type="text" placeholder="请输入变压器容量"/>kVA
36 36
 </view>
37 37
 </view>
38 38
 <view class="car">
@@ -110,6 +110,7 @@
110 110
     </view>
111 111
   </picker>
112 112
   <view class="picker" wx:else bind:tap="toconfigure">
113
+  <view style="width: 200rpx;"></view>
113 114
     新增地址
114 115
 <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" color="#cccccc" bind:tap="onIconTap" />
115 116
     </view>
@@ -151,9 +152,10 @@
151 152
 </view>
152 153
 </view>
153 154
 </view>
154
-<!-- 
155
+<!--
156
+  
157
+ -->
155 158
 
156
---->
157 159
 <button class="call-btn" bindtap="details" wx:if="{{orderid==''}}"> 
158 160
       <text class="call-btn_left_electricity">预约</text>
159 161
 </button> 

+ 1
- 1
package-order/pages/createorder/index.wxss View File

@@ -28,7 +28,7 @@ box-sizing: border-box;
28 28
 }
29 29
  
30 30
 .car_right{
31
-  width: 240rpx;
31
+  /* width: 240rpx; */
32 32
   display: flex;
33 33
   justify-content: space-between;
34 34
 }

+ 1
- 1
package-order/pages/driver/index.wxml View File

@@ -1,7 +1,7 @@
1 1
 <!--pages/userlist/index.wxml-->
2 2
 <view class="setup">
3 3
   <view class="driver-info" wx:for="{{driver}}" wx:key="operationId">
4
-      <image src="https://esos-iot.bjdexn.cn/myminio/project/2a1b32553c3d4ef992bc797d26cf1614.png" class="driver-avatar"></image>
4
+      <image src="https://esos-iot.com/myminio/project/2a1b32553c3d4ef992bc797d26cf1614.png" class="driver-avatar"></image>
5 5
       <view class="driver-details">
6 6
         <view class="driver-name">司机:{{item.operationName}}</view>
7 7
         <view class="driver-arrive">状态:{{item.operationType}}</view>

+ 2
- 2
package-order/pages/mapSelect/index.js View File

@@ -51,7 +51,7 @@ onLoad(options) {
51 51
             id: 0,
52 52
             latitude,
53 53
             longitude,
54
-            iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/0b0593293af54ea097b168cea479c25c.png', // 可自行添加定位图标
54
+            iconPath: 'https://esos-iot.com/myminio/project/0b0593293af54ea097b168cea479c25c.png', // 可自行添加定位图标
55 55
             width: 30,
56 56
             height: 30,
57 57
             anchor: { x: 0.5, y: 0.5 }
@@ -90,7 +90,7 @@ onLoad(options) {
90 90
               id: 0,
91 91
               latitude: lat,
92 92
               longitude: lng,
93
-              iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/0b0593293af54ea097b168cea479c25c.png',
93
+              iconPath: 'https://esos-iot.com/myminio/project/0b0593293af54ea097b168cea479c25c.png',
94 94
               width: 30,
95 95
               height: 30,
96 96
               anchor: { x: 0.5, y: 0.5 }

+ 13
- 7
package-order/pages/newaddress/index.js View File

@@ -1,9 +1,9 @@
1 1
 const app = getApp();
2 2
 const api = require('../../../api/index.js');
3 3
  
4
-// 全局常量定义
5
-const PHONE_REG = /^1[3-9]\d{9}$/; // 手机号正则
6
-const EMPTY_REGION_TIP = '请选择省/市/区'; // 地区空提示
4
+// 全局常量定义 -()-()-()-
5
+const PHONE_REG = /^1[3-9]\d{9}$/; // 手机号正则        
6
+const EMPTY_REGION_TIP = '请选择省/市/区'; // 地区空提示 
7 7
 
8 8
 Page({
9 9
   data: {
@@ -230,8 +230,11 @@ Page({
230 230
       .then((data) => {
231 231
     console.log(data.data);
232 232
     if (data.code==200) {
233
-    wx.navigateTo({
234
-      url: '/package-order/pages/address/index',
233
+    // wx.navigateTo({
234
+    //   url: '/package-order/pages/address/index',
235
+    // })
236
+    wx.navigateBack({
237
+      delta: 1,
235 238
     })
236 239
     this.setData({ isSubmitting: false });
237 240
   
@@ -247,8 +250,11 @@ Page({
247 250
       .then((data) => {
248 251
     console.log(data.data);
249 252
     if (data.code==200) {
250
-    wx.navigateTo({
251
-      url: '/package-order/pages/address/index',
253
+    // wx.navigateTo({
254
+    //   url: '/package-order/pages/address/index',
255
+    // })
256
+    wx.navigateBack({
257
+      delta: 1,
252 258
     })
253 259
     this.setData({ isSubmitting: false });
254 260
   

+ 100
- 0
package-order/pages/order/index.js View File

@@ -0,0 +1,100 @@
1
+// pages/userlist/index.js
2
+const api = require('../../../api/index.js');
3
+
4
+Page({
5
+
6
+  /**
7
+   * 页面的初始数据
8
+   */
9
+  data: {
10
+  userdata:[],
11
+  tabsindex:0
12
+  },
13
+
14
+  /**
15
+   * 生命周期函数--监听页面加载
16
+   */
17
+  onLoad(options) {
18
+ this.getuser()
19
+  },  
20
+getuser(){
21
+  let data ={
22
+    workorderType:3,
23
+    settlementType:this.data.tabsindex,
24
+    pageNum:1,
25
+    pageSize:99
26
+  }
27
+  api.request(`/sysworkorder/selectworkorderlist`, 'post',data,{ isPublic: false })
28
+  .then((data) => {
29
+console.log(data.data);
30
+if (data.code==200) {
31
+  this.setData({
32
+    userdata:data.data.list
33
+  })
34
+}
35
+  })
36
+  .catch((err) => {
37
+    console.error('请求失败:', err);
38
+  });
39
+},
40
+onTabsChange(e){
41
+ console.log(e.detail.value);
42
+ this.setData({
43
+  tabsindex:e.detail.value
44
+ })
45
+ this.getuser()
46
+},
47
+details(e){
48
+  wx.navigateTo({
49
+  url: `/package-map/pages/map/index?id=${e.currentTarget.dataset.id}`,
50
+})
51
+},
52
+  /**
53
+   *
54
+   */
55
+  onReady() {
56
+
57
+  },
58
+
59
+  /**
60
+   * 生命周期函数--监听页面显示
61
+   */
62
+  onShow() {
63
+
64
+  },
65
+
66
+  /**
67
+   * 生命周期函数--监听页面隐藏
68
+   */
69
+  onHide() {
70
+
71
+  }, 
72
+
73
+  /**
74
+   * 生命周期函数--监听页面卸载
75
+   */
76
+  onUnload() {
77
+
78
+  },
79
+
80
+  /**
81
+   * 页面相关事件处理函数--监听用户下拉动作
82
+   */
83
+  onPullDownRefresh() {
84
+
85
+  },
86
+
87
+  /**
88
+   * 页面上拉触底事件的处理函数
89
+   */
90
+  onReachBottom() {
91
+
92
+  },
93
+
94
+  /**
95
+   * 用户点击右上角分享
96
+   */
97
+  onShareAppMessage() {
98
+
99
+  }
100
+})

+ 7
- 0
package-order/pages/order/index.json View File

@@ -0,0 +1,7 @@
1
+{
2
+  "navigationBarTitleText": "我的工单",
3
+  "usingComponents": {
4
+    "t-tabs": "tdesign-miniprogram/tabs/tabs",
5
+    "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel"
6
+  }
7
+}

+ 33
- 0
package-order/pages/order/index.wxml View File

@@ -0,0 +1,33 @@
1
+<!--pages/userlist/index.wxml-->
2
+<t-tabs value="{{tabsindex}}" sticky="true" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
3
+    <t-tab-panel label="待结算" value="0" />
4
+  <t-tab-panel label="结算完成" value="1" />
5
+  <t-tab-panel label="结算失败" value="2" />
6
+</t-tabs>
7
+<view class="setup">
8
+  <view class="driver-info" wx:for="{{userdata}}" wx:key="customerId" data-id="{{item.workorderId}}" bind:tap="details">
9
+      <view class="driver-details">
10
+        <view class="driver-name">目的地: {{item.poiName}}</view>
11
+        <view class="driver-arrive" style="margin-top:20rpx;">工单类型:
12
+          <text wx:if="{{item.chargedischargeType==1}}">充电</text>
13
+        <text wx:if="{{item.chargedischargeType==2}}">放电</text>
14
+        </view>
15
+        <view class="driver-arrive">电量:{{item.workorderActual}}</view>
16
+        <view class="driver-arrive">工单状态:
17
+        <text wx:if="{{item.workorderType==5&&item.settlementType==0}}">工作完成</text>
18
+        <text  wx:if="{{item.workorderType==5&&item.settlementType==1}}">工单完成</text>
19
+        <text  wx:if="{{item.workorderType==5&&item.settlementType==2}}">工单完成</text>
20
+        </view>
21
+        <view class="driver-car">完成时间: {{item.endworktime}}</view>
22
+      </view>
23
+      <view wx:if="{{item.settlementType==0}}" class="cancel-btn">待结算</view>
24
+      <view wx:if="{{item.settlementType==1}}" class="cancel-btn">结算完成</view>
25
+      <view wx:if="{{item.settlementType==2}}" class="cancel-btn">结算失败</view>
26
+    </view>
27
+     <view class="available" wx:if="{{userdata.length<1}}">
28
+<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
29
+</view> 
30
+</view>
31
+<!--
32
+  
33
+ -->

+ 106
- 0
package-order/pages/order/index.wxss View File

@@ -0,0 +1,106 @@
1
+/* pages/userlist/index.wxss */
2
+page{
3
+  width: 100%;
4
+  height: 100vh;
5
+  background: linear-gradient(to bottom, #F0F5F5 -40%, #F0F5F5 40%,#F0F5F5 100%);
6
+  box-sizing: border-box;
7
+
8
+}
9
+.setup{
10
+  padding: 0rpx 22rpx;
11
+  padding-bottom:60rpx;
12
+}
13
+.driver-info {
14
+  background-color: white;
15
+  border-radius: 16rpx;
16
+  padding: 20rpx;
17
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
18
+  display: flex;
19
+  /* align-items: center; */
20
+  margin-top: 26rpx;
21
+}
22
+
23
+.driver-avatar {
24
+  width: 100rpx;
25
+  height: 100rpx;
26
+  border-radius: 50%;
27
+}
28
+
29
+.driver-details {
30
+  margin-left: 24rpx;
31
+  flex: 1;
32
+}
33
+
34
+.driver-name {
35
+  font-size: 32rpx;
36
+  font-weight: bold;
37
+}
38
+.driver-car {
39
+  font-size: 28rpx;
40
+  color: #999999;
41
+  margin-top: 8rpx;
42
+}
43
+
44
+.driver-arrive {
45
+  font-size: 28rpx;
46
+  /* color: #2C85FF; */
47
+  /* color: #666; */
48
+  color: #999999;
49
+
50
+  margin-top: 8rpx;
51
+}
52
+
53
+.cancel-btn {
54
+  width: 120rpx;
55
+  height: 64rpx;
56
+  line-height: 64rpx;
57
+  font-size: 28rpx;
58
+  display: flex;
59
+  align-items: center;
60
+  justify-content: center;
61
+  /* color: #FF5252; */
62
+  /* border: 1rpx solid #FF5252; */
63
+  background-color: white;
64
+  border-radius: 32rpx;
65
+}
66
+.driverpopup{
67
+  width: 100%;
68
+  height: 600rpx;
69
+  padding: 20rpx;
70
+  padding-top:100rpx;
71
+  box-sizing: border-box;
72
+}
73
+.driverpopup_box{
74
+  width: 100%;
75
+  height: 100rpx;
76
+  align-items: center;
77
+}
78
+.picker{
79
+  width: 100%;
80
+  height: 100rpx;
81
+  align-items: center;
82
+}
83
+.botton{
84
+width: 100%;
85
+display: flex;
86
+align-items: center;
87
+justify-content: center;
88
+}
89
+.botton_box{
90
+  width: 400rpx;
91
+  height: 70rpx;
92
+  margin-top: 100rpx;
93
+  font-size: 28rpx;
94
+  border-radius: 10rpx;
95
+  display: flex;
96
+  align-items: center;
97
+  justify-content: center;
98
+  color: #ffffff;
99
+  background-color: #2C85FF;
100
+}
101
+.available{
102
+  display: flex;
103
+   justify-content: center;
104
+   align-items: center;
105
+   margin-top: 100rpx;
106
+  }

+ 70
- 0
package-order/pages/payment/index.js View File

@@ -0,0 +1,70 @@
1
+Page({
2
+  /**
3
+   * 页面的初始数据
4
+   */
5
+  data: {
6
+    // 工单信息(实际开发中从结算回调/缓存/接口获取)
7
+    orderInfo: {
8
+      orderNo: '20260120123456789', // 工单编号
9
+      amount: '99.00', // 结算金额
10
+      payTime: '2026-01-20 15:30:25' // 结算时间
11
+    }
12
+  },
13
+
14
+  /**
15
+   * 生命周期函数--监听页面加载
16
+   */
17
+  onLoad(options) {
18
+    // 实际开发中:从结算回调的参数/缓存中获取工单信息
19
+    // 示例:如果结算页跳转时传了工单号,这里接收并请求接口
20
+    // if (options.orderNo) {
21
+    //   this.getOrderDetail(options.orderNo);
22
+    // }
23
+  },
24
+
25
+  /**
26
+   * 模拟获取工单详情(实际开发替换为真实接口)
27
+   */
28
+  getOrderDetail(orderNo) {
29
+    // 调用接口获取工单信息,示例:
30
+    // wx.request({
31
+    //   url: '你的接口地址',
32
+    //   data: { orderNo },
33
+    //   success: (res) => {
34
+    //     this.setData({ orderInfo: res.data.data });
35
+    //   }
36
+    // });
37
+  },
38
+
39
+  /**
40
+   * 跳转到工单详情页
41
+   */
42
+  gotoOrderDetail() {
43
+    // 跳转到工单详情页,传工单编号
44
+    wx.navigateTo({
45
+      url: `/package-map/pages/map/index`
46
+    });
47
+  },
48
+
49
+  /**
50
+   * 返回首页
51
+   */
52
+  backToHome() {
53
+    // 返回到首页(如果首页在tabBar,用switchTab;否则用navigateBack/redirectTo)
54
+    wx.switchTab({
55
+      url: '/pages/index/index'
56
+    });
57
+    // 如果首页不在tabBar,用这个:
58
+    // wx.redirectTo({
59
+    //   url: '/pages/index/index'
60
+    // });
61
+  },
62
+
63
+  /**
64
+   * 生命周期函数--监听页面显示
65
+   */
66
+  onShow() {
67
+    // 隐藏小程序返回按钮(可选,结算成功页建议隐藏)
68
+    wx.hideHomeButton();
69
+  }
70
+});

+ 6
- 0
package-order/pages/payment/index.json View File

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "结算成功",
3
+  "navigationBarBackgroundColor": "#f8f8f8",
4
+  "navigationBarTextStyle": "black",
5
+  "backgroundColor": "#f8f8f8"
6
+}

+ 55
- 0
package-order/pages/payment/index.wxml View File

@@ -0,0 +1,55 @@
1
+<view class="pay-success-container">
2
+  <!-- 成功状态区 -->
3
+  <view class="success-top">
4
+    <view class="success-icon">
5
+      <text class="iconfont">✓</text>
6
+    </view>
7
+    <view class="success-title">交易成功</view>
8
+    <view class="success-desc">您的工单已交易完成,感谢您的支持!</view>
9
+  </view>
10
+
11
+  <!-- 工单信息区 -->
12
+  <view class="order-info" wx:if="{{orderInfo}}">
13
+    <view class="info-title">工单信息</view>
14
+    
15
+    <view class="info-item">
16
+      <text class="label">工单编号:</text>
17
+      <text class="value">{{orderInfo.orderNo}}</text>
18
+    </view>
19
+   
20
+    <view class="info-item">
21
+      <text class="label">司机:</text>
22
+      <text class="value">{{orderInfo.orderNo}}</text>
23
+    </view>
24
+    <view class="info-item">
25
+      <text class="label">本次行程:</text>
26
+      <text class="value">{{orderInfo.orderNo}}</text>
27
+    </view>
28
+    <view class="info-item">
29
+      <text class="label">本次充电:</text>
30
+      <text class="value">{{orderInfo.orderNo}}</text>
31
+    </view>
32
+    <view class="info-item">
33
+      <text class="label">本次放电:</text>
34
+      <text class="value">{{orderInfo.orderNo}}</text>
35
+    </view>
36
+    <view class="info-item">
37
+      <text class="label">结算金额:</text>
38
+      <text class="value amount">¥{{orderInfo.amount}}</text>
39
+    </view>
40
+    <view class="info-item">
41
+      <text class="label">结算时间:</text>
42
+      <text class="value">{{orderInfo.payTime}}</text>
43
+    </view>
44
+    <view class="info-item">
45
+      <text class="label">目的地:</text>
46
+      <text class="value">{{orderInfo.orderNo}}</text>
47
+    </view>
48
+  </view>
49
+
50
+  <!-- 操作按钮区 -->
51
+  <view class="btn-group">
52
+    <button class="btn btn-primary" bindtap="gotoOrderDetail">查看工单详情</button>
53
+    <button class="btn btn-default" bindtap="backToHome">返回首页</button>
54
+  </view>
55
+</view>

+ 127
- 0
package-order/pages/payment/index.wxss View File

@@ -0,0 +1,127 @@
1
+/* 页面容器 */
2
+.pay-success-container {
3
+  padding: 40rpx 30rpx;
4
+  min-height: 100vh;
5
+  background-color: #f8f8f8;
6
+  box-sizing: border-box;
7
+  display: flex;
8
+  flex-direction: column;
9
+  align-items: center;
10
+}
11
+
12
+/* 成功状态区 */
13
+.success-top {
14
+  text-align: center;
15
+  margin-bottom: 60rpx;
16
+  margin-top: 80rpx;
17
+}
18
+
19
+.success-icon {
20
+  width: 120rpx;
21
+  height: 120rpx;
22
+  line-height: 120rpx;
23
+  background-color: #07c160;
24
+  border-radius: 50%;
25
+  margin: 0 auto 30rpx;
26
+}
27
+
28
+.success-icon text {
29
+  font-size: 60rpx;
30
+  color: #ffffff;
31
+}
32
+
33
+.success-title {
34
+  font-size: 36rpx;
35
+  color: #333;
36
+  font-weight: 600;
37
+  margin-bottom: 16rpx;
38
+}
39
+
40
+.success-desc {
41
+  font-size: 28rpx;
42
+  color: #666;
43
+}
44
+
45
+/* 工单信息区 */
46
+.order-info {
47
+  width: 100%;
48
+  background-color: #ffffff;
49
+  border-radius: 16rpx;
50
+  padding: 30rpx;
51
+  box-sizing: border-box;
52
+  margin-bottom: 80rpx;
53
+  box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.05);
54
+}
55
+
56
+.info-title {
57
+  font-size: 32rpx;
58
+  color: #333;
59
+  font-weight: 600;
60
+  margin-bottom: 24rpx;
61
+  padding-bottom: 16rpx;
62
+  border-bottom: 1rpx solid #f0f0f0;
63
+}
64
+
65
+.info-item {
66
+  display: flex;
67
+  justify-content: space-between;
68
+  align-items: center;
69
+  font-size: 28rpx;
70
+  margin-bottom: 20rpx;
71
+}
72
+
73
+.info-item:last-child {
74
+  margin-bottom: 0;
75
+}
76
+
77
+.label {
78
+  color: #666;
79
+}
80
+
81
+.value {
82
+  color: #333;
83
+  text-align: right;
84
+  flex: 1;
85
+  margin-left: 20rpx;
86
+}
87
+
88
+.amount {
89
+  color: #ff4757;
90
+  font-weight: 600;
91
+  font-size: 30rpx;
92
+}
93
+
94
+/* 按钮区 */
95
+.btn-group {
96
+  width: 100%;
97
+  display: flex;
98
+  flex-direction: column;
99
+  gap: 20rpx;
100
+}
101
+
102
+.btn {
103
+  height: 88rpx;
104
+  line-height: 88rpx;
105
+  border-radius: 16rpx;
106
+  font-size: 32rpx;
107
+  border: none;
108
+}
109
+
110
+.btn-primary {
111
+  width: 400rpx;
112
+  background-color: #07c160;
113
+  color: #ffffff;
114
+}
115
+
116
+.btn-default {
117
+  width: 400rpx;
118
+margin-top: 10rpx;
119
+  background-color: #ffffff;
120
+  color: #333;
121
+  border: 1rpx solid #e0e0e0;
122
+}
123
+
124
+/* 去除小程序默认按钮样式 */
125
+button::after {
126
+  border: none;
127
+}

+ 353
- 0
package-setup/pages/electricity/index.js View File

@@ -0,0 +1,353 @@
1
+// 引入 wx-charts(根据实际路径调整)
2
+const wxCharts = require('../../utils/wxcharts.js');
3
+const api = require('../../../api/index.js');
4
+
5
+Page({
6
+  /**
7
+   * 页面的初始数据
8
+   */
9
+  data: {
10
+    currentType: 'day', // 默认按日筛选
11
+    selectedDate: '',   // 选中的日期
12
+    showDate: '',       // 展示的日期文本
13
+    showPicker: false,  // 是否显示日期选择器
14
+    today: '',          // 今日日期
15
+    statData: {         // 统计数据
16
+      chargeTotal: 0,
17
+      dischargeTotal: 0,
18
+      netTotal: 0
19
+    },
20
+    dataList: [],       // 明细数据列表
21
+    listHeader: '时段', // 列表头部文本
22
+    chart: null,         // 图表实例,用于更新图表
23
+    operationRole:wx.getStorageSync('user').operationRole
24
+  },
25
+
26
+  /**
27
+   * 生命周期函数--监听页面加载
28
+   */
29
+  onLoad(options) {
30
+    // 获取今日日期
31
+    const now = new Date();
32
+    const today = `${now.getFullYear()}-${this.formatNum(now.getMonth() + 1)}-${this.formatNum(now.getDate())}`;
33
+    this.setData({
34
+      today,
35
+      selectedDate: today,
36
+      showDate: this.formatShowDate(today, 'day')
37
+    });
38
+    // 加载初始数据
39
+    this.loadData();
40
+  },
41
+
42
+  /**
43
+   * 修复:适配屏幕旋转/尺寸变化,重新渲染图表即可
44
+   */
45
+  onResize() {
46
+    // 直接重新渲染,wxCharts无updateCanvasSize方法
47
+    if (this.data.dataList.length > 0) {
48
+      this.renderChart();
49
+    }
50
+  },
51
+
52
+  /**
53
+   * 切换筛选类型(日/月/年)
54
+   */
55
+  changeType(e) {
56
+    const type = e.currentTarget.dataset.type;
57
+    if (type === this.data.currentType) return;
58
+    
59
+    this.setData({
60
+      currentType: type,
61
+      showDate: this.formatShowDate(this.data.selectedDate, type),
62
+      listHeader: type === 'day' ? '时段' : (type === 'month' ? '日期' : '月份')
63
+    });
64
+    this.loadData();
65
+  },
66
+
67
+  /**
68
+   * 打开日期选择器
69
+   */
70
+  openDatePicker() {
71
+    this.setData({ showPicker: true });
72
+    setTimeout(() => {
73
+      this.setData({ showPicker: false });
74
+    }, 100);
75
+  },
76
+
77
+  /**
78
+   * 日期选择器值改变
79
+   */
80
+  onDateChange(e) {
81
+    const selectedDate = e.detail.value;
82
+    this.setData({
83
+      selectedDate,
84
+      showDate: this.formatShowDate(selectedDate, this.data.currentType)
85
+    });
86
+    this.loadData();
87
+  },
88
+
89
+  /**
90
+   * 格式化数字(补零)
91
+   */
92
+  formatNum(num) {
93
+    return num < 10 ? `0${num}` : num;
94
+  },
95
+
96
+  /**
97
+   * 格式化展示的日期文本
98
+   */
99
+  formatShowDate(date, type) {
100
+    const [year, month, day] = date.split('-');
101
+    switch (type) {
102
+      case 'day':
103
+        return `${year}-${month}-${day}`;
104
+      case 'month':
105
+        return `${year}-${month}`;
106
+      case 'year':
107
+        return `${year}`;
108
+      default:
109
+        return date;
110
+    }
111
+  },
112
+
113
+  /**
114
+   * 加载充放电数据
115
+   */
116
+  loadData() {
117
+    let data = {
118
+      date:this.data.showDate
119
+    }
120
+    api.request(`/sysworkorder/workorderstatistics`, 'post', data, { isPublic: false })       
121
+    .then((data) => {
122
+      if (data.code == 200) {
123
+     console.log(data);
124
+     const { currentType, selectedDate } = this.data;
125
+     const [year, month, day] = selectedDate.split('-');
126
+     
127
+     // 模拟接口请求数据(实际开发中替换为真实接口调用)
128
+    //  let statData = { chargeTotal: 0, dischargeTotal: 0, netTotal: 0 };
129
+     let dataList = [];
130
+ 
131
+     // 模拟不同维度的测试数据
132
+     if (currentType === 'day') {
133
+      // 日维度:按小时统计
134
+      // 基础校验:避免数据源不存在或非数组导致报错
135
+      if (this.data.operationRole==5) {
136
+        if (data.data.chargeList && Array.isArray(data.data.chargeList)) {
137
+          for (let index = 0; index < data.data.chargeList.length; index++) {
138
+            // 获取当前行数据
139
+            const item = data.data.chargeList[index];
140
+            
141
+            // 关键修复:先初始化数组元素,再赋值(解决空数组直接赋值报错)
142
+            dataList[index] = { ...item }; // 保留原始数据字段
143
+            console.log(dataList);
144
+            // 保留你的核心逻辑:仅截取小时位相减
145
+            // 增加防错处理:避免时间字段为空/格式错误导致NaN
146
+            const startHour = data.data.chargeList[index].startworkordertime?.slice(11, 16) || 0;
147
+            const endHour = data.data.chargeList[index].endworkordertime?.slice(11, 16) || 0;
148
+            dataList[index].time = `${endHour +'-'+ startHour}`;
149
+          }
150
+        }
151
+      }else{
152
+        if (data?.data?.dischargeList && Array.isArray(data.data.dischargeList)) {
153
+          for (let index = 0; index < data.data.dischargeList.length; index++) {
154
+            // 获取当前行数据
155
+            const item = data.data.dischargeList[index];
156
+            
157
+            // 关键修复:先初始化数组元素,再赋值(解决空数组直接赋值报错)
158
+            dataList[index] = { ...item }; // 保留原始数据字段
159
+            console.log(dataList);
160
+            // 保留你的核心逻辑:仅截取小时位相减
161
+            // 增加防错处理:避免时间字段为空/格式错误导致NaN
162
+            const startHour = data.data.dischargeList[index].startworkordertime?.slice(11, 16) || 0;
163
+            const endHour = data.data.dischargeList[index].endworkordertime?.slice(11, 16) || 0;
164
+            dataList[index].time = `${endHour +'-'+ startHour}`;
165
+          }
166
+        }
167
+      }
168
+    
169
+     } else if (currentType === 'month') {
170
+       // 月维度:按日期统计
171
+      if (this.data.operationRole==5) {
172
+
173
+       if (data?.data?.chargeList && Array.isArray(data.data.chargeList)) {
174
+        for (let index = 0; index < data.data.chargeList.length; index++) {
175
+          // 获取当前行数据
176
+          const item = data.data.chargeList[index];
177
+          
178
+          // 关键修复:先初始化数组元素,再赋值(解决空数组直接赋值报错)
179
+          dataList[index] = { ...item }; // 保留原始数据字段
180
+          console.log(dataList);
181
+          // 保留你的核心逻辑:仅截取小时位相减
182
+          // 增加防错处理:避免时间字段为空/格式错误导致NaN
183
+          const startHour = data.data.chargeList[index].startworkordertime?.slice(8, 10) || 0;
184
+          dataList[index].time = startHour;
185
+        }
186
+      }
187
+    }else{
188
+      if (data?.data?.dischargeList && Array.isArray(data.data.dischargeList)) {
189
+        for (let index = 0; index < data.data.dischargeList.length; index++) {
190
+          // 获取当前行数据
191
+          const item = data.data.dischargeList[index];
192
+          
193
+          // 关键修复:先初始化数组元素,再赋值(解决空数组直接赋值报错)
194
+          dataList[index] = { ...item }; // 保留原始数据字段
195
+          console.log(dataList);
196
+          // 保留你的核心逻辑:仅截取小时位相减
197
+          // 增加防错处理:避免时间字段为空/格式错误导致NaN
198
+          const startHour = data.data.dischargeList[index].startworkordertime?.slice(8, 10) || 0;
199
+          dataList[index].time = startHour;
200
+        }
201
+      }
202
+    }
203
+     } else if (currentType === 'year') {
204
+       // 年维度:按月份统计
205
+      if (this.data.operationRole==5) {
206
+
207
+        if (data?.data?.chargeList && Array.isArray(data.data.chargeList)) {
208
+         for (let index = 0; index < data.data.chargeList.length; index++) {
209
+           // 获取当前行数据
210
+           const item = data.data.chargeList[index];
211
+           
212
+           // 关键修复:先初始化数组元素,再赋值(解决空数组直接赋值报错)
213
+           dataList[index] = { ...item }; // 保留原始数据字段
214
+           console.log(dataList);
215
+           // 保留你的核心逻辑:仅截取小时位相减
216
+           // 增加防错处理:避免时间字段为空/格式错误导致NaN
217
+           const startHour = data.data.chargeList[index].startworkordertime?.slice(5, 7) || 0;
218
+           dataList[index].time = startHour;
219
+         }
220
+       }
221
+     }else{
222
+       if (data?.data?.dischargeList && Array.isArray(data.data.dischargeList)) {
223
+         for (let index = 0; index < data.data.dischargeList.length; index++) {
224
+           // 获取当前行数据
225
+           const item = data.data.dischargeList[index];
226
+           
227
+           // 关键修复:先初始化数组元素,再赋值(解决空数组直接赋值报错)
228
+           dataList[index] = { ...item }; // 保留原始数据字段
229
+           console.log(dataList);
230
+           // 保留你的核心逻辑:仅截取小时位相减
231
+           // 增加防错处理:避免时间字段为空/格式错误导致NaN
232
+           const startHour = data.data.dischargeList[index].startworkordertime?.slice(5, 7) || 0;
233
+           dataList[index].time = startHour;
234
+         }
235
+       }
236
+     }
237
+     }
238
+ 
239
+     // 计算总计数据
240
+    //  dataList.forEach(item => {
241
+    //    statData.chargeTotal += item.charge;
242
+    //    statData.dischargeTotal += item.discharge;
243
+    //  });
244
+    //  statData.netTotal = (statData.chargeTotal - statData.dischargeTotal).toFixed(1);
245
+    //  statData.chargeTotal = statData.chargeTotal.toFixed(1);
246
+    //  statData.dischargeTotal = statData.dischargeTotal.toFixed(1);
247
+ 
248
+     this.setData({
249
+       statData:data.data,
250
+       dataList
251
+     });
252
+ 
253
+     // 渲染折线图
254
+     this.renderChart();
255
+     this.setData({
256
+      statData: data.data
257
+
258
+     })
259
+      }
260
+    })
261
+    .catch((err) => {
262
+      console.error('获取工单信息失败:', err);
263
+      this.showInfo('获取工单信息失败');
264
+    });
265
+    
266
+   
267
+  },
268
+
269
+  /**
270
+   * ✅ 修复完成:渲染充放电折线图 (所有错误已修正)
271
+   */
272
+  renderChart() {
273
+    const { dataList } = this.data;
274
+    if (dataList.length === 0) return;
275
+
276
+    // 提取X轴标签和Y轴数据
277
+    const categories = dataList.map(item => item.time);
278
+    let chargeData = ''
279
+    if(this.data.operationRole==5){
280
+       chargeData = dataList.map(item => parseFloat(item.chargeActual));
281
+
282
+    }else{
283
+       chargeData = dataList.map(item => parseFloat(item.dischargeActual));
284
+
285
+    }
286
+    // const dischargeData = dataList.map(item => parseFloat(item.dischargeActual));
287
+
288
+    // ✅ 修复:获取屏幕宽度 - 正确的PX适配,不乘以pixelRatio
289
+    const systemInfo = wx.getSystemInfoSync();
290
+    const windowWidth = systemInfo.windowWidth;
291
+    // 图表宽度:屏幕宽度 - 左右各16px边距,完美适配所有机型
292
+    const chartWidth = windowWidth - 32;
293
+    // 图表高度:固定280px,适配性最佳
294
+    const chartHeight = 200;
295
+
296
+    // ✅ 修复:wxCharts 标准正确配置项(删除所有无效配置,修正错误配置)
297
+    const chartConfig = {
298
+      canvasId: 'chargeDischargeChart', // 必须和wxml的canvas-id一致 ✔️
299
+      type: 'line', // 折线图类型 ✔️
300
+      categories: categories, // X轴分类 ✔️
301
+      // ['1','2','3','4','5','6']
302
+      // ========== 新增:图表顶部标题配置【核心代码】 ==========
303
+      series: [
304
+        {
305
+          name: '充电量(kWh)',
306
+          data: chargeData,
307
+          color: '#07c160' // 绿色充电
308
+        }
309
+        // {
310
+        //   name: '放电量(kWh)',
311
+        //   data: dischargeData,
312
+        //   color: '#ff4757' // 红色放电
313
+        // }
314
+      ],
315
+      // ✅ 正确的Y轴配置项
316
+      yAxis: {
317
+         
318
+        min: 0, // Y轴最小值为0 ✔️
319
+        format: (val) => val.toFixed(1), // Y轴数值保留1位小数 ✔️
320
+        titleFontSize: 12, // Y轴标题字号
321
+        labelFontSize: 10, // Y轴刻度字号 ✔️
322
+        fontColor: '#666', // Y轴文字颜色
323
+        gridColor: '#eee' // Y轴网格线颜色
324
+      },
325
+      // ✅ 正确的X轴配置项
326
+      xAxis: {
327
+        disableGrid: false, // 显示X轴网格线 ✔️
328
+        labelFontSize: 10, // X轴刻度字号 ✔️
329
+        fontColor: '#666',
330
+        gridColor: '#eee'
331
+      },
332
+      legend: false, // 是否显示图例 (wxCharts中是布尔值,不是对象) ✔️
333
+      width: chartWidth, // ✅ 核心修复:正确的宽度PX值
334
+      height: 240, // ✅ 微调高度:从280改为300,给顶部标题留出空间,不挤压图表内容
335
+      dataLabel: false, // 是否在折线上显示数值 ✔️
336
+      dataPointShape: true, // 是否显示数据点 ✔️
337
+      fontColor: '#666',
338
+      // ✅ 修复:wxCharts 正确的折线样式配置
339
+      extra: {
340
+        line: {
341
+          type: 'curve', // curve=曲线,straight=直线 ✔️
342
+          width: 1 // 折线粗细
343
+        },
344
+        legendTextColor: '#666' // 图例文字颜色
345
+      }
346
+    };
347
+
348
+    // ✅ 修复:wxCharts无updateData,更新图表的正确方式 = 重新实例化
349
+    // ✅ 修复:用setData赋值图表实例,不是直接修改this.data
350
+    const chart = new wxCharts(chartConfig);
351
+    this.setData({ chart });
352
+  }
353
+});

+ 9
- 0
package-setup/pages/electricity/index.json View File

@@ -0,0 +1,9 @@
1
+{
2
+  "navigationBarTitleText": "充放电统计",
3
+  "usingComponents": {},
4
+  "window": {
5
+    "devicePixelRatio": "auto"
6
+  },
7
+  "lazyCodeLoading": "requiredComponents"
8
+
9
+}

+ 56
- 0
package-setup/pages/electricity/index.wxml View File

@@ -0,0 +1,56 @@
1
+<view class="container">
2
+  <!-- 筛选栏 -->
3
+  <view class="filter-bar">
4
+    <view class="filter_left">
5
+      <view class="filter-item {{currentType === 'day' ? 'active' : ''}}" bindtap="changeType" data-type="day">日</view>
6
+      <view class="filter-item {{currentType === 'month' ? 'active' : ''}}" bindtap="changeType" data-type="month">月</view>
7
+      <view class="filter-item {{currentType === 'year' ? 'active' : ''}}" bindtap="changeType" data-type="year">年</view>
8
+    </view>
9
+
10
+    <!-- 日期选择器触发按钮 -->
11
+    <view>
12
+      <picker mode="date" fields="{{currentType}}" value="{{selectedDate}}" start="2020-01-01" end="{{today}}" bindchange="onDateChange">
13
+        <button class="date-btn" bindtap="openDatePicker">{{showDate}}</button>
14
+      </picker>
15
+    </view>
16
+  </view>
17
+
18
+  <!-- 统计卡片 -->
19
+  <view class="stat-card">
20
+    <view class="stat-item" wx:if="{{operationRole==5}}">
21
+      <text class="stat-label">总充电量</text>
22
+      <text class="stat-value">{{statData.chargeActual}} <text style="font-size: 24rpx;">kWh</text> </text>
23
+    </view>
24
+    <view class="stat-item" wx:if="{{operationRole==6}}">
25
+      <text class="stat-label">总放电量</text>
26
+      <text class="stat-value">{{statData.dischargeActual}} <text style="font-size: 24rpx;">kWh</text> </text>
27
+    </view>
28
+  </view>
29
+
30
+  <!-- 新增:折线图容器 -->
31
+  <view class="chart-container">
32
+    <view class="chart-title">{{currentType === 'day' ? '今日' : (currentType === 'month' ? '本月' : '本年')}}充电趋势图</view>
33
+    <canvas canvas-id="chargeDischargeChart" disable-scroll="true" class="chart"></canvas>
34
+  </view>
35
+  <view class="empty-tip" wx:if="{{dataList.length === 0}}">
36
+    暂无{{currentType === 'day' ? '今日' : (currentType === 'month' ? '本月' : '本年')}}{{operationRole === 5?'充':'放'}}电数据
37
+  </view>
38
+
39
+  <!-- 数据列表 -->
40
+  <view class="data-list">
41
+    <view class="list-content">
42
+      <view class="list-header">
43
+        <view class="list_title1">{{listHeader}}</view>
44
+        <view class="list_title1" wx:if="{{operationRole==5}}">充电量<text style="font-size: 18rpx;margin-top: 10rpx;">/kWh</text></view>
45
+        <view class="list_title2" wx:if="{{operationRole==6}}">放电量<text style="font-size: 18rpx;margin-top: 10rpx;">/kWh</text></view>
46
+      </view>
47
+      <block wx:for="{{dataList}}" wx:key="index">
48
+        <view class="list-item">
49
+          <view class="list_title3">{{item.time}}</view>
50
+          <view class="list_title3" wx:if="{{operationRole==5}}">{{item.chargeActual}}</view>
51
+          <view class="list_title4" wx:if="{{operationRole==6}}">{{item.dischargeActual}}</view>
52
+        </view>
53
+      </block>
54
+    </view>
55
+  </view>
56
+</view>

+ 216
- 0
package-setup/pages/electricity/index.wxss View File

@@ -0,0 +1,216 @@
1
+.container {
2
+  width: 100%;
3
+  height: 100%;
4
+  padding: 16rpx;
5
+  background-color: #f5f5f5;
6
+  box-sizing: border-box;
7
+}
8
+
9
+/* 筛选栏样式 */
10
+.filter-bar {
11
+  width: 100%;
12
+  display: flex;
13
+  justify-content: space-between;
14
+  align-items: center;
15
+  background: white;
16
+  border-radius: 8rpx;
17
+  padding: 0 16rpx;
18
+  margin-bottom: 16rpx;
19
+  box-sizing: border-box;
20
+}
21
+.filter_left{
22
+  display: flex;
23
+}
24
+.filter-item {
25
+  padding: 20rpx 32rpx;
26
+  font-size: 32rpx;
27
+  color: #333;
28
+  position: relative;
29
+}
30
+
31
+.filter-item.active {
32
+  color: #07c160;
33
+  font-weight: bold;
34
+}
35
+
36
+.filter-item.active::after {
37
+  content: '';
38
+  position: absolute;
39
+  bottom: 0;
40
+  left: 50%;
41
+  transform: translateX(-50%);
42
+  width: 40rpx;
43
+  height: 6rpx;
44
+  background-color: #07c160;
45
+  border-radius: 3rpx;
46
+}
47
+
48
+.date-btn {
49
+  margin-left: auto;
50
+  background: #f5f5f5;
51
+  color: #666;
52
+  font-size: 28rpx;
53
+  padding: 8rpx 16rpx;
54
+  border-radius: 4rpx;
55
+  line-height: 1;
56
+}
57
+
58
+/* 统计卡片样式 */
59
+.stat-card {
60
+  width: 100%;
61
+  display: flex;
62
+  justify-content: space-around;
63
+  background: white;
64
+  border-radius: 8rpx;
65
+  padding: 24rpx 0;
66
+  margin-bottom: 16rpx;
67
+}
68
+
69
+.stat-item {
70
+  width: 100%;
71
+  display: flex;
72
+  align-items: center;
73
+  /* justify-content: space-between; */
74
+  justify-content: space-around;
75
+  text-align: center;
76
+}
77
+
78
+.stat-label {
79
+  display: block;
80
+  font-size: 28rpx;
81
+  color: #222222;
82
+  font-weight: bold;
83
+}
84
+
85
+.stat-value {
86
+  font-size: 38rpx;
87
+  color: #333;
88
+  font-weight: bold;
89
+}
90
+
91
+.positive {
92
+  color: #07c160;
93
+}
94
+
95
+.negative {
96
+  color: #ff4757;
97
+}
98
+
99
+/* 新增:折线图样式(适配现有设计风格) */
100
+.chart-container {
101
+  width: 100%;
102
+  background: white;
103
+  border-radius: 8rpx;
104
+  padding: 16rpx;
105
+  margin-bottom: 16rpx;
106
+  box-sizing: border-box;
107
+}
108
+
109
+.chart {
110
+  width: 100%;
111
+  height: 420rpx; 
112
+}
113
+.chart-title {
114
+  font-size: 14px;
115
+  color: #333;
116
+  /* text-align: center; 居中/left靠左/right靠右 */
117
+  margin-bottom: 10px;
118
+  font-weight: 500;
119
+}
120
+/* 数据列表样式 */
121
+.data-list {
122
+  width: 100%;
123
+  background: white;
124
+  border-radius: 18rpx;
125
+  padding: 20rpx;
126
+  box-sizing: border-box;
127
+}
128
+
129
+.list-header {
130
+  display: flex;
131
+  justify-content: space-between;
132
+  font-size: 26rpx;
133
+  color: #666;
134
+  font-weight: bold;
135
+  border-right: 1rpx solid #f0f0f0;
136
+}
137
+.list-content{
138
+  margin: 1rpx;
139
+  border: 1rpx solid #f0f0f0;
140
+  border-right: 0rpx solid #f0f0f0;
141
+  box-sizing: border-box;
142
+}
143
+.list_title1{
144
+  display: flex;
145
+  align-items: center;
146
+  justify-content: center;
147
+  font-size: 26rpx;
148
+  flex: 1;
149
+
150
+  height: 100rpx;
151
+  border-right: 1rpx solid #f0f0f0;
152
+}
153
+.list_title2{
154
+  display: flex;
155
+  align-items: center;
156
+  justify-content: center;
157
+  font-size: 26rpx;
158
+  flex: 1;
159
+  height: 100rpx;
160
+  /* border-bottom: 1rpx solid #f0f0f0; */
161
+
162
+}
163
+.list_title3{
164
+  display: flex;
165
+  align-items: center;
166
+  justify-content: center;
167
+  font-size: 26rpx;
168
+  flex: 1;
169
+  height: 100rpx;
170
+  border-right: 1rpx solid #f0f0f0;
171
+  border-top: 1rpx solid #f0f0f0;
172
+}
173
+.list_title4{
174
+  display: flex;
175
+  align-items: center;
176
+  justify-content: center;
177
+  font-size: 26rpx;
178
+  flex: 1;
179
+
180
+  height: 100rpx;
181
+  border-top: 1rpx solid #f0f0f0;
182
+
183
+  border-right: 1rpx solid #f0f0f0;
184
+}
185
+.list-item {
186
+  display: flex;
187
+  justify-content: space-between;
188
+  font-size: 28rpx;
189
+}
190
+
191
+.list-item:last-child {
192
+  border-bottom: none;
193
+}
194
+
195
+.empty-tip {
196
+  width: 100%;
197
+  text-align: center;
198
+  padding: 60rpx 0;
199
+  font-size: 28rpx;
200
+  color: #999;
201
+  background: white;
202
+  border-radius: 8rpx;
203
+  margin-bottom: 16rpx;
204
+  box-sizing: border-box;
205
+}
206
+
207
+/* 日期选择器遮罩 */
208
+.picker-mask {
209
+  position: fixed;
210
+  top: 0;
211
+  left: 0;
212
+  right: 0;
213
+  bottom: 0;
214
+  background: transparent;
215
+  z-index: 999;
216
+}

+ 1
- 1
package-setup/pages/setuplevel/index.js View File

@@ -73,7 +73,7 @@ Page({
73 73
   onprivacy(e){
74 74
     console.log(e);
75 75
       wx.navigateTo({
76
-      url: `/pages/privacy/index?name=${e.currentTarget.dataset.name}`,
76
+      url: `/package-user/pages/privacy/index?name=${e.currentTarget.dataset.name}`,
77 77
     })
78 78
     
79 79
   },

+ 2044
- 0
package-setup/utils/wxcharts.js
File diff suppressed because it is too large
View File


+ 97
- 147
package-user/components/captcha/index.js View File

@@ -1,186 +1,136 @@
1 1
 Component({
2 2
   properties: {
3
-    // 是否显示弹窗
4 3
     isShow: {
5 4
       type: Boolean,
6 5
       value: false
7 6
     },
8
-    // 手机号(用于显示)
9
-    phoneNumber: {
7
+    type: {
10 8
       type: String,
11
-      value: ''
9
+      value: 'code' // 'code' 验证码 / '结算' 结算密码
12 10
     },
13
-    // 倒计时秒数
14
-    countdownSeconds: {
11
+    // 新增:外部可配置倒计时总时长(默认60秒)
12
+    countdownTotal: {
15 13
       type: Number,
16
-      value: 120
14
+      value: 60
17 15
     }
18 16
   },
19
-
20 17
   data: {
21
-    // 验证码数组(6位)
22
-    codes: ['', '', '', ''],
23
-    // 实际输入的验证码值
24
-    codeValue: '',
25
-    // 当前激活的输入框索引
26
-    currentIndex: 0,
27
-    // 是否聚焦
28
-    isFocus: false,
29
-    // 倒计时
30
-    countdown: 120,
31
-    // 是否可以重新发送
32
-    canResend: false,
33
-    // 验证码是否输入完成
34
-    isComplete: false,
35
-    // 倒计时计时器
36
-    timer: null
18
+    codes: [], // 输入框显示的数组
19
+    currentIndex: 0, // 当前激活索引
20
+    isFocus: false, // 输入框聚焦状态
21
+    codeValue: '', // 4位验证码真实值
22
+    oncodeValue: '', // 6位结算密码真实值
23
+    isShakeError: false, // 晃动动画开关
24
+    // 新增:倒计时相关数据
25
+    countdown: 0, // 当前剩余倒计时秒数
26
+    timer: null // 倒计时定时器(用于清除定时器,防止内存泄漏)
37 27
   },
38
-
39
-  observers: {
40
-    // 监听isShow变化,控制弹窗显示隐藏
41
-    isShow: function (isShow) {
42
-      if (isShow) {
43
-        this.startCountdown();
44
-        this.focusInput();
45
-      } else {
46
-        this.clearCountdown();
47
-        this.resetCodeInput();
48
-      }
49
-    },
50
-    
51
-    // 监听countdownSeconds变化
52
-    countdownSeconds: function (seconds) {
53
-      this.setData({
54
-        countdown: seconds
55
-      });
56
-    },
57
-    
58
-    // 监听验证码变化,更新输入状态
59
-    codeValue: function (value) {
60
-      const codes = [];
61
-      for (let i = 0; i < 4; i++) {
62
-        codes[i] = value[i] || '';
63
-      }
64
-      
65
-      // 更新当前激活的输入框索引
66
-      let currentIndex = value.length < 4 ? value.length : 3;
67
-      
68
-      // 判断是否输入完成
69
-      const isComplete = value.length === 4;
70
-      
71
-      this.setData({
72
-        codes,
73
-        currentIndex,
74
-        isComplete
75
-      });
76
-      
77
-      // 如果输入完成,自动触发确认事件
78
-      if (isComplete) {
79
-        this.triggerEvent('complete', { code: value });
80
-      }
81
-    }
28
+  // 新增:组件卸载时清除定时器,防止内存泄漏
29
+  detached() {
30
+    clearInterval(this.data.timer);
82 31
   },
83
-
84 32
   methods: {
33
+    // 关闭弹窗
34
+    onClose() {
35
+      this.triggerEvent('close');
36
+      this.resetInput(); // 关闭时重置输入
37
+      this.resetCountdown(); // 关闭时重置倒计时
38
+    },
39
+
85 40
     // 聚焦输入框
86 41
     focusInput() {
42
+      this.setData({ isFocus: true });
43
+    },
44
+
45
+    // 输入内容处理
46
+    onCodeInput(e) {
47
+      console.log(e);
48
+      const value = e.detail.value;
49
+      const len = this.data.type === '结算' ? 6 : 4;
50
+      const codes = value.split('').slice(0, len);
51
+
87 52
       this.setData({
88
-        isFocus: true
53
+        codes: codes,
54
+        currentIndex: codes.length,
55
+        codeValue: this.data.type !== '结算' ? value : this.data.codeValue,
56
+        oncodeValue: this.data.type === '结算' ? value : this.data.oncodeValue
89 57
       });
58
+
59
+      // 输入完成:仅传递值给父组件,不做检验
60
+      if (codes.length === len) {
61
+        const finalValue = this.data.type === '结算' ? this.data.oncodeValue : this.data.codeValue;
62
+        // 向父组件发送输入完成的事件,携带输入值
63
+        this.triggerEvent('inputComplete', { value: finalValue });
64
+        this.setData({ isFocus: false });
65
+      }
90 66
     },
91
-    
67
+
92 68
     // 输入框失焦
93 69
     onInputBlur() {
94
-      this.setData({
95
-        isFocus: false
96
-      });
70
+      this.setData({ isFocus: false });
97 71
     },
98
-    
99
-    // 验证码输入
100
-    onCodeInput(e) {
101
-      const value = e.detail.value.replace(/\D/g, ''); // 只保留数字
72
+
73
+    // 重新发送验证码(仅传递事件给父组件,并启动倒计时)
74
+    onResend() {
75
+      // 启动倒计时(防止重复点击重复启动定时器)
76
+      this.startCountdown();
77
+      // 向父组件发送重新发送事件
78
+      this.triggerEvent('resend');
79
+    },
80
+
81
+    // 重置输入内容(供父组件/自身调用)
82
+    resetInput() {
102 83
       this.setData({
103
-        codeValue: value
84
+        codes: [],
85
+        currentIndex: 0,
86
+        codeValue: '',
87
+        oncodeValue: ''
104 88
       });
105 89
     },
106
-    
107
-    // 关闭弹窗
108
-    onClose() {
109
-         // 1. 强制让输入框失焦,关闭手机键盘
110
-         this.setData({ isFocus: false });
111
-         // 2. 触发关闭事件(可加微延时确保失焦生效,可选)
112
-         setTimeout(() => {
113
-           this.triggerEvent('close');
114
-         }, 100);
115
-      // this.triggerEvent('close');
116
-    },
117
-    
118
-    // 确认
119
-    onConfirm() {
120
-      if (this.data.isComplete) {
121
-        this.triggerEvent('confirm', { code: this.data.codeValue });
122
-      }
123
-    },
124
-    
125
-    // 重新发送验证码
126
-    onResend() {
127
-      this.triggerEvent('resend');
128
-      this.startCountdown();
90
+
91
+    // 触发失败动效(供父组件调用)
92
+    triggerErrorShake() {
93
+      this.setData({ isShakeError: true });
94
+      // 动画结束后重置状态
95
+      setTimeout(() => {
96
+        this.setData({ isShakeError: false });
97
+      }, 500);
98
+      // 同时清空输入
99
+      this.resetInput();
129 100
     },
130
-    
131
-    // 开始倒计时
101
+
102
+    // 新增:启动倒计时
132 103
     startCountdown() {
133
-      // 清除之前的计时器
134
-      this.clearCountdown();
135
-      
136
-      const countdownSeconds = this.data.countdownSeconds;
104
+      // 1. 先清除已有定时器,防止重复创建
105
+      clearInterval(this.data.timer);
106
+      // 2. 初始化倒计时为总时长
107
+      const total = this.data.countdownTotal;
137 108
       this.setData({
138
-        countdown: countdownSeconds,
139
-        canResend: false
109
+        countdown: total
140 110
       });
141
-      
142
-      // 设置新的计时器
111
+      // 3. 创建定时器,每秒更新倒计时
143 112
       const timer = setInterval(() => {
144
-        let countdown = this.data.countdown - 1;
145
-        if (countdown <= 0) {
146
-          this.setData({
147
-            countdown: 0,
148
-            canResend: true
149
-          });
150
-          this.clearCountdown();
151
-        } else {
152
-          this.setData({
153
-            countdown
154
-          });
155
-        }
113
+        this.setData({
114
+          countdown: this.data.countdown - 1
115
+        }, () => {
116
+          // 4. 倒计时结束后清除定时器,重置倒计时状态
117
+          if (this.data.countdown <= 0) {
118
+            clearInterval(this.data.timer);
119
+            this.resetCountdown();
120
+          }
121
+        });
156 122
       }, 1000);
157
-      
123
+      // 5. 保存定时器实例,用于后续清除
158 124
       this.setData({ timer });
159 125
     },
160
-    
161
-    // 清除倒计时
162
-    clearCountdown() {
163
-      this.setData({ isFocus: false });
164 126
 
165
-      if (this.data.timer) {
166
-        clearInterval(this.data.timer);
167
-        this.setData({ timer: null });
168
-      }
169
-    },
170
-    
171
-    // 重置验证码输入
172
-    resetCodeInput() {
127
+    // 新增:重置倒计时(恢复初始状态)
128
+    resetCountdown() {
129
+      clearInterval(this.data.timer);
173 130
       this.setData({
174
-        codes: ['', '', '', '', '', ''],
175
-        codeValue: '',
176
-        currentIndex: 0,
177
-        isComplete: false
131
+        countdown: 0,
132
+        timer: null
178 133
       });
179 134
     }
180
-  },
181
-  
182
-  // 组件销毁时清除计时器
183
-  detached() {
184
-    this.clearCountdown();
185 135
   }
186
-});
136
+});

+ 3
- 1
package-user/components/captcha/index.json View File

@@ -1,4 +1,6 @@
1 1
 {
2 2
   "component": true,
3
-  "usingComponents": {}
3
+  "usingComponents": {
4
+    "t-input": "tdesign-miniprogram/input/input"
5
+  }
4 6
 }

+ 26
- 49
package-user/components/captcha/index.wxml View File

@@ -1,63 +1,40 @@
1 1
 <view class="verification-popup {{isShow ? 'show' : ''}}">
2
-  <!-- 遮罩层 -->
3 2
   <view class="overlay" bindtap="onClose"></view>
4
-  
5
-  <!-- 弹窗内容 -->
6
-  <view class="popup-content">
7
-    <!-- 标题区域 -->
3
+  <!-- 绑定晃动动画类 -->
4
+  <view class="popup-content {{isShakeError ? 'shake-error' : ''}}">
8 5
     <view class="popup-header">
9
-      <text class="title">输入验证码</text>
6
+      <text class="title" wx:if="{{type=='结算'}}">请输入账户密码</text>
7
+      <text class="title" wx:else>输入验证码</text>
10 8
       <view class="close-btn" bindtap="onClose">
11 9
         <icon type="clear" size="20" color="#999" />
12 10
       </view>
13 11
     </view>
14
-    
15
-    <!-- 提示信息 -->
16
-    <!-- <view class="message">
17
-      验证码已发送至手机 {{phoneNumber}}
18
-    </view> -->
19
-    
20
-    <!-- 验证码输入框 -->
21
-    <view class="code-input-container">
22
-      <view 
23
-        wx:for="{{4}}" 
24
-        wx:key="index" 
25
-        class="code-input {{currentIndex === index ? 'active' : ''}} {{codes[index] ? 'filled' : ''}}"
26
-        bindtap="focusInput"
27
-      >
12
+    <!-- 结算密码输入框:展示●,真实值保留数字 -->
13
+    <view class="code-input-container" wx:if="{{type=='结算'}}">
14
+      <view wx:for="{{6}}" wx:key="index" class="code-input {{currentIndex === index ? 'active' : ''}} {{codes[index] ? 'filled' : ''}}" bindtap="focusInput">
15
+        <!-- 核心修改:有值时显示●,无值时为空 -->
16
+        <text>{{codes[index] ? '●' : ''}}</text>
17
+      </view>
18
+      <input class="real-input" type="number" maxlength="6" focus="{{isFocus}}" value="{{oncodeValue}}" bindinput="onCodeInput" bindblur="onInputBlur" />
19
+    </view>
20
+    <!-- 验证码输入框:仍显示明文,不变 -->
21
+    <view class="code-input-container" wx:else>
22
+      <view wx:for="{{4}}" wx:key="index" class="code-input {{currentIndex === index ? 'active' : ''}} {{codes[index] ? 'filled' : ''}}" bindtap="focusInput">
28 23
         <text>{{codes[index] || ''}}</text>
29 24
       </view>
30
-      <!-- 实际输入框(隐藏) -->
31
-      <input 
32
-        class="real-input" 
33
-        type="number" 
34
-        maxlength="4" 
35
-        focus="{{isFocus}}" 
36
-        value="{{codeValue}}"
37
-        bindinput="onCodeInput"
38
-        bindblur="onInputBlur"
39
-      />
25
+      <input class="real-input" type="number" maxlength="4" focus="{{isFocus}}" value="{{codeValue}}" bindinput="onCodeInput" bindblur="onInputBlur" />
40 26
     </view>
41
-    
42
-    <!-- 操作区域 -->
27
+
43 28
     <view class="operation-area">
44
-      <!-- <button 
45
-        class="confirm-btn" 
46
-        bindtap="onConfirm"
47
-        disabled="{{!isComplete}}"
48
-      >
49
-        确认
50
-      </button> -->
51
-      
52
-      <view class="resend-container">
53
-        <!-- <text>未收到验证码?</text> -->
54
-        <text 
55
-          class="resend-btn {{canResend ? 'active' : ''}}" 
56
-          bindtap="{{canResend ? 'onResend' : ''}}"
57
-        >
58
-          {{canResend ? '重新发送' : '重新发送(' + countdown + ')'}}
59
-        </text>
29
+      <view class="resend-container" wx:if="{{type!='结算'}}">
30
+        <view 
31
+  class="resend-btn {{countdown > 0 ? 'disabled' : ''}}"
32
+  bindtap="onResend"
33
+  wx:if="{{type === 'code'}}"
34
+>
35
+  {{countdown > 0 ? countdown + 's后重新发送' : '重新发送验证码'}}
36
+</view>
60 37
       </view>
61 38
     </view>
62 39
   </view>
63
-</view>
40
+</view>

+ 61
- 140
package-user/components/captcha/index.wxss View File

@@ -1,185 +1,106 @@
1
+/* 弹窗基础样式(如果已有可忽略,重点加动画相关) */
1 2
 .verification-popup {
2
-  display: none;
3 3
   position: fixed;
4 4
   top: 0;
5 5
   left: 0;
6
-  right: 0;
7
-  bottom: 0;
8
-  z-index: 9999;
6
+  width: 100%;
7
+  height: 100%;
8
+  z-index: 999;
9
+  display: none;
9 10
 }
10
-
11
-/* 显示弹窗 */
12 11
 .verification-popup.show {
13 12
   display: block;
14 13
 }
15
-
16
-/* 遮罩层 */
17 14
 .overlay {
18
-  position: absolute;
19
-  top: 0;
20
-  left: 0;
21
-  right: 0;
22
-  bottom: 0;
23
-  background-color: rgba(0, 0, 0, 0.5);
24
-  backdrop-filter: blur(2px);
25
-  animation: fadeIn 0.3s ease;
15
+  width: 100%;
16
+  height: 100%;
17
+  background: rgba(0, 0, 0, 0.5);
26 18
 }
27
-
28
-/* 弹窗内容 */
29 19
 .popup-content {
30 20
   position: absolute;
31
-  top: 40%;
21
+  top: 50%;
32 22
   left: 50%;
33 23
   transform: translate(-50%, -50%);
34
-  width: 90%;
35
-  max-width: 400px;
36
-  background-color: #fff;
37
-  border-radius: 16px;
38
-  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
39
-  overflow: hidden;
40
-  animation: scaleIn 0.3s ease;
24
+  width: 80%;
25
+  max-width: 320px;
26
+  background: #fff;
27
+  border-radius: 12px;
28
+  padding: 20px;
29
+  /* 初始边框样式 */
30
+  border: 2px solid #e5e5e5;
31
+  /* 动画结束后恢复默认状态,避免位移 */
32
+  transform-origin: center center;
41 33
 }
42 34
 
43
-/* 标题区域 */
44
-.popup-header {
45
-  display: flex;
46
-  justify-content: center;
47
-  align-items: center;
48
-  padding: 20px 24px 16px;
49
-  position: relative;
35
+/* 1. 定义晃动关键帧动画(小程序兼容写法) */
36
+@keyframes shake {
37
+  0%, 100% { transform: translate(-50%, -50%); }
38
+  20% { transform: translate(-50%, -50%) translateX(-5px); }
39
+  40% { transform: translate(-50%, -50%) translateX(5px); }
40
+  60% { transform: translate(-50%, -50%) translateX(-5px); }
41
+  80% { transform: translate(-50%, -50%) translateX(5px); }
50 42
 }
51 43
 
52
-.title {
53
-  font-size: 18px;
54
-  font-weight: 600;
55
-  color: #1a1a1a;
44
+/* 2. 检验失败的动画类(边框变红+晃动) */
45
+.popup-content.shake-error {
46
+  border-color: #ff4444 !important; /* 红色边框 */
47
+  animation: shake 0.5s ease-in-out; /* 绑定晃动动画 */
56 48
 }
57 49
 
58
-.close-btn {
59
-  position: absolute;
60
-  right: 24px;
61
-  top: 50%;
62
-  transform: translateY(-50%);
63
-  width: 32px;
64
-  height: 32px;
50
+/* 其他原有样式(如输入框、按钮)保持不变 */
51
+.popup-header {
65 52
   display: flex;
53
+  justify-content: space-between;
66 54
   align-items: center;
67
-  justify-content: center;
68
-  border-radius: 50%;
69
-  background-color: #f5f5f5;
70
-}
71
-
72
-/* 提示信息 */
73
-.message {
74
-  text-align: center;
75
-  font-size: 14px;
76
-  color: #666;
77
-  padding: 0 24px 20px;
55
+  margin-bottom: 20px;
78 56
 }
79
-
80
-/* 验证码输入框容器 */
81 57
 .code-input-container {
82 58
   display: flex;
83
-  justify-content: center;
84
-  gap: 10px;
85
-  padding: 0 24px 24px;
86
-  position: relative;
59
+  justify-content: space-between;
60
+  margin: 20px 0;
87 61
 }
88
-
89
-/* 单个验证码输入框 */
90 62
 .code-input {
91
-  width: 50px;
92
-  height: 50px;
63
+  width: 40px;
64
+  height: 40px;
65
+  border: 1px solid #ccc;
93 66
   border-radius: 8px;
94
-  border: 1px solid #ddd;
95 67
   display: flex;
96 68
   align-items: center;
97 69
   justify-content: center;
98
-  font-size: 24px;
99
-  font-weight: 600;
100
-  color: #1a1a1a;
101
-  transition: all 0.2s ease;
70
+  font-size: 18px;
102 71
 }
103
-
104
-/* 激活状态 */
105 72
 .code-input.active {
106
-  border-color: #07c160;
107
-  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
108
-}
109
-
110
-/* 已填充状态 */
111
-.code-input.filled {
112
-  border-color: #eee;
113
-  background-color: #fafafa;
73
+  border-color: #007aff;
114 74
 }
115
-
116
-/* 实际输入框(隐藏) */
117 75
 .real-input {
118
-  position: absolute;
119
-  width: 1px;
120
-  height: 1px;
76
+  position: fixed;
77
+  top: -100px;
78
+  left: -100px;
121 79
   opacity: 0;
122
-  pointer-events: none;
123
-}
124
-
125
-/* 操作区域 */
126
-.operation-area {
127
-  padding: 0 24px 24px;
128
-}
129
-
130
-/* 确认按钮 */
131
-.confirm-btn {
132
-  width: 100%;
133
-  height: 48px;
134
-  line-height: 48px;
135
-  background-color: #07c160;
136
-  color: #fff;
137
-  font-size: 16px;
138
-  font-weight: 500;
139
-  border-radius: 24px;
140
-  margin-bottom: 16px;
141
-  display: flex;
142
-  align-items: center;
143
-  justify-content: center;
144
-}
145
-
146
-.confirm-btn::after {
147
-  border: none;
148 80
 }
149
-
150
-.confirm-btn:disabled {
151
-  background-color: #e5e5e5;
152
-  color: #999;
153
-}
154
-
155
-/* 重新发送区域 */
156 81
 .resend-container {
157
-  display: flex;
158
-  justify-content: center;
159
-  align-items: center;
160
-  gap: 6px;
161
-  font-size: 14px;
162
-  color: #666;
82
+  text-align: right;
83
+  margin-top: 10px;
84
+}
85
+.resend-btn.active {
86
+  color: #007aff;
163 87
 }
164
-
165
-/* 重新发送按钮 */
166 88
 .resend-btn {
167 89
   color: #07c160;
168
-  font-weight: 500;
90
+  font-size: 24rpx;
169 91
 }
170
-
171
-.resend-btn:not(.active) {
92
+.resend-btn.disabled {
172 93
   color: #999;
173
-  pointer-events: none;
94
+  pointer-events: none; /* 倒计时期间禁止点击 */
174 95
 }
175
-
176
-/* 动画效果 */
177
-@keyframes fadeIn {
178
-  from { opacity: 0; }
179
-  to { opacity: 1; }
180
-}
181
-
182
-@keyframes scaleIn {
183
-  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
184
-  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
96
+/* 结算密码加密符号样式优化 */
97
+.code-input text {
98
+  font-size: 20px; /* 放大●的字号,更醒目 */
99
+  color: #333;
100
+  letter-spacing: 2px; /* 增加间距,避免●挤在一起 */
185 101
 }
102
+/* 验证码仍用原有字号,不影响 */
103
+.code-input-container:not([wx-if]) .code-input text {
104
+  font-size: 18px;
105
+  letter-spacing: 0;
106
+}

+ 6
- 1
package-user/pages/login/index.js View File

@@ -271,7 +271,7 @@ promptcheck(){
271 271
     onprivacy(e){
272 272
       console.log(e.target.dataset.name);
273 273
         wx.navigateTo({
274
-        url: `/pages/privacy/index?name=${e.target.dataset.name}`,
274
+        url: `/package-user/pages/privacy/index?name=${e.target.dataset.name}`,
275 275
       })
276 276
       
277 277
     },
@@ -289,6 +289,11 @@ promptcheck(){
289 289
     Loginswitch:e.target.dataset.value
290 290
   })
291 291
     },
292
+    onregister(){
293
+      wx.navigateTo({
294
+        url: `/package-user/pages/register/index`,
295
+      })
296
+    },
292 297
   /**
293 298
    * 生命周期函数--监听页面初次渲染完成
294 299
    */

+ 11
- 6
package-user/pages/login/index.wxml View File

@@ -8,22 +8,27 @@
8 8
 </view>
9 9
 <!-- <view style="width: 100%; {{'height: ' + navStatusBarHeight +'px'}}"></view> -->
10 10
 
11
- <view><image class="log_image" src="https://esos-iot.bjdexn.cn/myminio/project/fd2b0ab2aadb44bbafd940156bf0cdd7.png" mode="widthFix"/></view>
11
+ <view><image class="log_image" src="https://esos-iot.com/myminio/project/fd2b0ab2aadb44bbafd940156bf0cdd7.png" mode="widthFix"/></view>
12
+
12 13
  <view class="account_number">
13 14
  <view>
14
-  <view class="account">手机号</view>
15
+  <view class="account">登录账户</view>
15 16
   <view class="password">
16
-  <image class="login_imgae1" src="https://esos-iot.bjdexn.cn/myminio/project/0458af22ef764cc386d77a76ee665917.png" mode=""/>
17
-  <input class="weui-input"	value="{{account}}" placeholder="请输入手机号"  bindinput="bindKeyInput1"/></view>
17
+  <image class="login_imgae1" src="https://esos-iot.com/myminio/project/0458af22ef764cc386d77a76ee665917.png" mode=""/>
18
+  <input class="weui-input"	value="{{account}}" placeholder="请输入登录账户"  bindinput="bindKeyInput1"/></view>
18 19
  </view>
19 20
 
20 21
  </view>
22
+
21 23
  <view class="loginbotton">
22 24
   <!-- <button wx:if="{{!Loginswitch}}" class="button_button" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">手机号一键登录</button> -->
23 25
  
24 26
  <!-- <button wx:if="{{!Loginswitch}}" bindphoneoneclicklogin="onHandleLogin" open-type="phoneOneClickLogin">一键登录按钮</button> -->
25
- <button wx:if="{{checked}}" class="button_button" color="#00BA6E" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">手机号一键登录</button>
26
- <button wx:if="{{!checked}}" class="button_button" color="#00BA6E" bind:tap="promptcheck">手机号一键登录</button>
27
+ <button wx:if="{{checked}}" class="button_button" color="#00BA6E" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">登录</button>
28
+ <button wx:if="{{!checked}}" class="button_button" color="#00BA6E" bind:tap="promptcheck">登录</button>
29
+ <view class="register">
30
+<view class="register_box" bind:tap="onregister">注册</view> 
31
+</view>
27 32
  <view class="agreement">
28 33
   <t-radio t-class="t_box" value="{{checked}}" icon="dot" data-value="{{checked}}" bind:tap="checkboxChange"/>
29 34
  我已阅读并同意晟运<text class="agreement_color" data-name="服务协议" bind:tap="onprivacy">《服务协议》</text>和<text class="agreement_color" data-name="隐私政策" bind:tap="onprivacy">《隐私政策》</text> 

+ 22
- 1
package-user/pages/login/index.wxss View File

@@ -227,4 +227,25 @@ font-size: 28rpx;
227 227
 margin-top: 10rpx;
228 228
 padding-bottom: 0rpx;
229 229
 border-bottom:1rpx #cccccc solid;
230
-}
230
+}
231
+.register{
232
+  width: 100%;
233
+  margin-top: 40rpx;
234
+   padding:0rpx 40rpx;
235
+   display: flex;
236
+   align-items: center;
237
+   justify-content: center;
238
+   box-sizing: border-box;
239
+  }
240
+  .register_box{
241
+    width: 100%;
242
+    height: 80rpx;
243
+    font-size: 32rpx;
244
+    display: flex;
245
+    align-items: center;
246
+    justify-content: center;
247
+    box-sizing: border-box;
248
+    border-radius:10rpx;
249
+    color: #fff;
250
+    background-color:#00C775;
251
+  }

+ 180
- 0
package-user/pages/order/index.js View File

@@ -0,0 +1,180 @@
1
+// pages/userlist/index.js
2
+const api = require('../../../../api/index.js');
3
+
4
+Page({
5
+
6
+  /**
7
+   * 页面的初始数据
8
+   */
9
+  data: {
10
+  userdata:[],
11
+  visible:false,
12
+  selectdriveralldata:[],
13
+  selectcaralldata:[],
14
+  workorderId:'',
15
+  driverindex:0,
16
+  carindex:0
17
+  },
18
+
19
+  /**
20
+   * 生命周期函数--监听页面加载
21
+   */
22
+  onLoad(options) {
23
+ this.getuser()
24
+ this.onselectdriverall()
25
+ this.onselectcarall()
26
+  },  
27
+getuser(){
28
+  let data ={
29
+    workorderType:1,
30
+    pageNum:1,
31
+    pageSize:99
32
+  }
33
+  api.request(`/sysworkorder/selectworkorderlist`, 'post',data,{ isPublic: false })
34
+  .then((data) => {
35
+console.log(data.data);
36
+if (data.code==200) {
37
+  this.setData({
38
+    userdata:data.data.list
39
+  })
40
+}
41
+  })
42
+  .catch((err) => {
43
+    console.error('请求失败:', err);
44
+  });
45
+},
46
+cancelOrder(e){
47
+  console.log(e.currentTarget.dataset.id);
48
+ this.setData({
49
+  workorderId:e.currentTarget.dataset.id,
50
+  visible:true
51
+ })
52
+},
53
+// 查询全部司机
54
+onselectdriverall(){
55
+  let data = {
56
+    operationId:'',
57
+    driverType:'',
58
+    driverName:''
59
+  }
60
+  api.request(`/sysdriver/selectdriverall`, 'post',data,{ isPublic: false })
61
+  .then((data) => {
62
+console.log(data.data);
63
+if (data.code==200) {
64
+  this.setData({
65
+    selectdriveralldata:data.data
66
+  })
67
+}
68
+  })
69
+  .catch((err) => {
70
+    console.error('请求失败:', err);
71
+  });
72
+},
73
+// 查询全部车辆
74
+onselectcarall(){
75
+  let data = {
76
+    
77
+  }
78
+  api.request(`/syscar/selectcarall`, 'post',data,{ isPublic: false })
79
+  .then((data) => {
80
+if (data.code==200) {
81
+  this.setData({
82
+    selectcaralldata:data.data
83
+  })
84
+}
85
+  })
86
+  .catch((err) => {
87
+    console.error('请求失败:', err);
88
+  });
89
+},
90
+ondriverChange(){
91
+ this.setData({
92
+  visible:false
93
+ })
94
+},
95
+onVisibleChange1() {
96
+  this.setData({
97
+    visible:false
98
+  })
99
+},
100
+onVisibleChange(e) {
101
+  this.setData({
102
+    driverindex: e.detail.value,
103
+  });
104
+},
105
+oncarChange(e) {
106
+  console.log(e);
107
+  this.setData({
108
+    carindex: e.detail.value,
109
+  });
110
+},
111
+submit(){
112
+  let data = {
113
+    driverId:this.data.selectdriveralldata[this.data.driverindex].operationId,
114
+    carId:this.data.selectcaralldata[this.data.carindex].carId,
115
+    workorderId:this.data.workorderId
116
+  }
117
+  api.request(`/sysoperationsstaff/allocatedriver`, 'post',data,{ isPublic: false })
118
+  .then((data) => {
119
+if (data.code==200) {
120
+ console.log(data);
121
+ this.setData({
122
+  visible:false
123
+ })
124
+ this.getuser()
125
+
126
+}
127
+  })
128
+  .catch((err) => {
129
+    console.error('请求失败:', err);
130
+  });
131
+},
132
+  /**
133
+   *
134
+   */
135
+  onReady() {
136
+
137
+  },
138
+
139
+  /**
140
+   * 生命周期函数--监听页面显示
141
+   */
142
+  onShow() {
143
+
144
+  },
145
+
146
+  /**
147
+   * 生命周期函数--监听页面隐藏
148
+   */
149
+  onHide() {
150
+
151
+  }, 
152
+
153
+  /**
154
+   * 生命周期函数--监听页面卸载
155
+   */
156
+  onUnload() {
157
+
158
+  },
159
+
160
+  /**
161
+   * 页面相关事件处理函数--监听用户下拉动作
162
+   */
163
+  onPullDownRefresh() {
164
+
165
+  },
166
+
167
+  /**
168
+   * 页面上拉触底事件的处理函数
169
+   */
170
+  onReachBottom() {
171
+
172
+  },
173
+
174
+  /**
175
+   * 用户点击右上角分享
176
+   */
177
+  onShareAppMessage() {
178
+
179
+  }
180
+})

+ 7
- 3
package-user/pages/privacy/index.js View File

@@ -15,11 +15,15 @@ URL:''
15 15
  console.log(options.name);
16 16
  if (options.name=='服务协议') {
17 17
    this.setData({
18
-    URL:'https://esos-iot.bjdexn.cn/wx_images/service.png'
18
+    URL:'https://esos-iot.com/wx_images/service.png'
19 19
    })
20
- }else{
20
+ }else if(options.name=='隐私协议'){
21 21
   this.setData({
22
-    URL:'https://esos-iot.bjdexn.cn/wx_images/privacy.png'
22
+    URL:'https://esos-iot.com/wx_images/privacy.png'
23
+   })
24
+ }else if(options.name=='微信结算'){
25
+  this.setData({
26
+    URL:'https://esos-iot.com/myminio/project/3a0322d7133e4cbaae16f9169e32335e.jpg'
23 27
    })
24 28
  }
25 29
   },

+ 272
- 0
package-user/pages/register/index.js View File

@@ -0,0 +1,272 @@
1
+// package-user/pages/register/index.js
2
+const api = require('../../../api/index.js');
3
+
4
+Page({
5
+
6
+  /**
7
+   * 页面的初始数据
8
+   */
9
+  data: {
10
+    items: [
11
+      {value: 5, name: '买电'},
12
+      {value: 6, name: '卖电'},
13
+    ],
14
+    fileurl:'',
15
+    back:'',
16
+    identitycard:'',
17
+    greenelectricity:'',
18
+    nickname:'',
19
+    telephone:'',
20
+    powerstationname:''
21
+  },
22
+
23
+  /**
24
+   * 生命周期函数--监听页面加载
25
+   */
26
+  onLoad(options) {
27
+
28
+  },
29
+// 上传
30
+onchooseImage(e) {
31
+  this.setData({
32
+    identitycard:e.target.dataset.name
33
+  })
34
+  let _this = this
35
+  // 先检查隐私授权状态
36
+  wx.getPrivacySetting({
37
+    success: (res) => {
38
+      if (res.needAuthorization) {
39
+        // 弹出隐私协议弹窗
40
+        wx.requirePrivacyAuthorize({
41
+          success: () => {
42
+            console.log('用户已同意隐私协议');
43
+            _this.doUploadImage(); // 继续执行上传
44
+          },
45
+          fail: () => {
46
+            console.log('用户拒绝了隐私协议');
47
+            wx.showToast({
48
+              title: '需同意隐私协议才能使用',
49
+              icon: 'none'
50
+            });
51
+          }
52
+        });
53
+      } else {
54
+          _this.chooseImage(); // 已授权,直接上传
55
+      }
56
+    }
57
+  });
58
+},
59
+// 上传图片
60
+chooseImage() {
61
+  let _this = this
62
+  wx.chooseMedia({    
63
+    count: 1,
64
+    mediaType: ['image'],
65
+    sourceType: ['album', 'camera'],
66
+    success(res) {
67
+      console.log(res);
68
+      const tempFiles = res.tempFiles;
69
+      _this.setData({
70
+        imageList: tempFiles.map(file => file.tempFilePath),
71
+      });
72
+      _this.uploadImages(tempFiles);
73
+    },
74
+    fail(err) {
75
+      console.error("选择失败:", err);
76
+    }
77
+  })
78
+  },
79
+  radioChange(e) {
80
+    console.log('radio发生change事件,携带value值为:', e.detail.value)
81
+
82
+    // const items = this.data.items
83
+    // for (let i = 0, len = items.length; i < len; ++i) {
84
+    //   items[i].checked = items[i].value === e.detail.value
85
+    // }
86
+
87
+    this.setData({
88
+      greenelectricity:e.detail.value
89
+    })
90
+    console.log(this.data.greenelectricity);
91
+  },
92
+  bindKeyInput(e){
93
+  console.log(e.detail.value);
94
+  this.setData({
95
+    nickname:e.detail.value
96
+  })
97
+  },
98
+  bindtelephone(e){
99
+   
100
+    console.log(e.detail.value);
101
+
102
+    this.setData({
103
+      telephone:e.detail.value
104
+    })
105
+  },
106
+  bindpowerstationname(e){
107
+    console.log(e.detail.value);
108
+    this.setData({
109
+      powerstationname:e.detail.value
110
+    })
111
+  },
112
+  // 上传到服务器
113
+uploadImages(files) {
114
+  let _this =this
115
+  const token = wx.getStorageSync('token');
116
+  files.forEach((file) => {
117
+  wx.uploadFile({
118
+  url: 'https://esos-iot.com:9443/system/config/upload/webPost',
119
+  filePath: file.tempFilePath,
120
+  name: 'file',
121
+  formData: {
122
+    type:_this.data.identitycard,
123
+    front:file.tempFilePath
124
+  },
125
+  header: {
126
+    // 'Authorization': 'Bearer ' + token // Also add to header if needed
127
+  },
128
+  success: (res) => {
129
+    const obj = JSON.parse(res.data);
130
+  console.log(obj.data.companyLicense);
131
+  _this.setData({
132
+    fileurl:obj.data.companyLicense
133
+  })
134
+  console.log(this.data.fileurl);
135
+  
136
+  },
137
+  fail: (err) => {
138
+    console.error('上传失败', err);
139
+  },
140
+  });
141
+  });
142
+  },
143
+
144
+  register(){
145
+    const phone = this.data.telephone.trim();
146
+    const phoneReg = /^1[3-9]\d{9}$/;
147
+console.log(phone);
148
+    // 1. 校验是否为空
149
+    if (!phone) {
150
+    
151
+      wx.showToast({
152
+        title:'请输入手机号',
153
+        icon: 'none',
154
+      });
155
+      return false;
156
+    }
157
+
158
+    // 2. 校验格式是否正确
159
+    if (!phoneReg.test(phone)) {
160
+    
161
+      wx.showToast({
162
+        title:'请输入正确的手机号',
163
+        icon: 'none',
164
+      });
165
+      return false;
166
+    }
167
+    if (this.data.nickname==''||this.data.greenelectricity==''||this.data.powerstationname=='') {
168
+      wx.showToast({
169
+        title:'请填写完整信息',
170
+        icon: 'success',
171
+      });
172
+      return
173
+    }
174
+    let obj = {
175
+      phonecode:this.data.telephone,
176
+      operationName:this.data.nickname,
177
+      operationRole:this.data.greenelectricity,
178
+      companyName:this.data.powerstationname,
179
+      companyLicense:this.data.fileurl,
180
+    }
181
+    api.request(`/sysoperation/registeredusers`, 'post',obj,{ isPublic: true })
182
+    .then((data) => {
183
+ console.log(data);
184
+ if (data.code == 200) {
185
+   if (data.msg=='当前用户已注册') {
186
+    wx.showToast({
187
+      title:data.msg,
188
+      icon: 'success',
189
+    });
190
+    return
191
+   }
192
+   wx.showToast({
193
+    title:data.msg,
194
+    icon: 'success',
195
+  });
196
+  wx.navigateTo({
197
+    url: '/package-user/pages/login/index', // 登录页面的路径,注意路径前面加上 '/' 表示从根目录开始
198
+  });
199
+ }else{
200
+  wx.showToast({
201
+    title: data.msg,
202
+    icon: 'success',
203
+  });
204
+ }
205
+
206
+    })
207
+    .catch((err) => {
208
+      wx.showToast({
209
+        title:'注册失败',
210
+        icon: 'none',
211
+      });
212
+      console.error('请求失败:', err);
213
+    });
214
+  },
215
+  previewSingleImage(e) {
216
+    // 获取大图路径
217
+    const largePicUrl = e.currentTarget.dataset.url;
218
+    // 调用API预览大图
219
+    wx.previewImage({
220
+      current: largePicUrl, // 当前展示的大图路径
221
+      urls: [largePicUrl] // 需预览的图片数组,单图时数组中仅存该图路径
222
+    });
223
+  },
224
+  /**
225
+   * 生命周期函数--监听页面初次渲染完成
226
+   */
227
+  onReady() {
228
+
229
+  },
230
+
231
+  /**
232
+   * 生命周期函数--监听页面显示
233
+   */
234
+  onShow() {
235
+
236
+  },
237
+
238
+  /**
239
+   * 生命周期函数--监听页面隐藏
240
+   */
241
+  onHide() {
242
+
243
+  },
244
+
245
+  /**
246
+   * 生命周期函数--监听页面卸载
247
+   */
248
+  onUnload() {
249
+
250
+  },
251
+
252
+  /**
253
+   * 页面相关事件处理函数--监听用户下拉动作
254
+   */
255
+  onPullDownRefresh() {
256
+
257
+  },
258
+
259
+  /**
260
+   * 页面上拉触底事件的处理函数
261
+   */
262
+  onReachBottom() {
263
+
264
+  },
265
+
266
+  /**
267
+   * 用户点击右上角分享
268
+   */
269
+  onShareAppMessage() {
270
+
271
+  }
272
+})

+ 6
- 0
package-user/pages/register/index.json View File

@@ -0,0 +1,6 @@
1
+{
2
+  "usingComponents": {
3
+    "t-icon": "tdesign-miniprogram/icon/icon"
4
+
5
+  }
6
+}

+ 68
- 0
package-user/pages/register/index.wxml View File

@@ -0,0 +1,68 @@
1
+<view class="body">
2
+  <view class="car">
3
+<view>
4
+ <text style="color: red;">*</text> 手机登录账户
5
+ <view style="font-size: 20rpx;margin-top: 10rpx;margin-left: 20rpx;">
6
+ 请输入与本机微信绑定的手机号
7
+</view>
8
+</view>
9
+<view class="model_right">
10
+  <input class="powerlevel" type="text" value="{{telephone}}" bindinput="bindtelephone" placeholder="请输入联系方式"/>
11
+</view>
12
+</view>
13
+  <view class="car">
14
+<view>
15
+  <text style="color: red;">*</text> 用户角色
16
+</view>
17
+<view class="model_right">
18
+  <radio-group bindchange="radioChange">
19
+        <label class="weui-cell weui-check__label" wx:for="{{items}}" wx:key="value">
20
+
21
+          <view class="weui-cell__hd">
22
+            <radio value="{{item.value}}" checked="{{item.value == greenelectricity}}"/>
23
+          </view>
24
+          <view class="weui-cell__bd">{{item.name}}</view>
25
+        </label>
26
+      </radio-group>
27
+</view>
28
+</view>
29
+  <view class="car">
30
+<view>
31
+  <text style="color: red;">*</text> 联系人
32
+</view>
33
+<view class="model_right">
34
+  <input class="powerlevel" type="text" value="{{nickname}}" bindinput="bindKeyInput" placeholder="请输入昵称"/>
35
+</view>
36
+</view>
37
+
38
+
39
+<view class="car">
40
+<view>
41
+  <text style="color: red;">*</text> 公司名称
42
+</view>
43
+<view class="model_right">
44
+  <input class="powerlevel" type="text" value="{{powerstationname}}" bindinput="bindpowerstationname" placeholder="请输入公司名称"/>
45
+</view>
46
+</view>
47
+<view class="car">
48
+<view class="license">
49
+	<view class="toptabbar_box">
50
+					<view class="toptabbar_left">
51
+						公司营业执照
52
+					</view>
53
+					
54
+				</view>
55
+        <view class="account_to" data-name="营业执照" bind:tap="onchooseImage" wx:if="{{fileurl == ''}}">
56
+          <t-icon name="add" size="48rpx" data-name="add" bind:click="onIconTap" />
57
+        </view>
58
+        <image class="user_to" wx:else src="{{fileurl}}" mode="aspectFill"  data-url="{{fileurl}}" bindtap="previewSingleImage"/>
59
+</view>
60
+
61
+     
62
+</view>
63
+<view style="height: 80rpx;"></view>
64
+
65
+<button class="button_button" color="#0F80DC" bind:tap="register">注册</button>
66
+<view style="height: 40rpx;"></view>
67
+
68
+</view>

+ 106
- 0
package-user/pages/register/index.wxss View File

@@ -0,0 +1,106 @@
1
+/* package-user/pages/register/index.wxss */
2
+page {
3
+  background-color: var(--td-bg-color-container);
4
+  /* background-color: #f9f9f9; */
5
+  background: linear-gradient(to bottom, #F0F5F5 -40%, #F0F5F5 40%,#F0F5F5 100%);
6
+  padding: 10rpx 20rpx 20rpx 20rpx;
7
+box-sizing: border-box;
8
+}
9
+.body{
10
+  height: 100%;
11
+background-color: #ffffff;
12
+border-radius: 10rpx;
13
+padding: 0rpx 0rpx;
14
+box-sizing: border-box;
15
+}
16
+.car{
17
+  margin-top: 20rpx;
18
+  padding: 20rpx 30rpx;
19
+  box-sizing: border-box;
20
+  display: flex;
21
+  justify-content: space-between;
22
+}
23
+.car1{
24
+  margin-top: 20rpx;
25
+  padding: 0rpx 30rpx;
26
+  box-sizing: border-box;
27
+  display: flex;
28
+  align-items: center;
29
+  justify-content: space-between;
30
+}
31
+ 
32
+.car_right{
33
+  width: 240rpx;
34
+  display: flex;
35
+  justify-content: space-between;
36
+}
37
+.cartbuy{
38
+  padding: 8rpx 26rpx;
39
+  border-radius: 10rpx;
40
+  border: 1rpx solid #cccccc;
41
+}
42
+.carsell{
43
+  padding: 8rpx 26rpx;
44
+  border-radius: 10rpx;
45
+  border: 1rpx solid red;
46
+}
47
+.model_right{
48
+  display: flex;
49
+  justify-content: space-between;
50
+}
51
+radio-group{
52
+  display: flex;
53
+  align-items: center;
54
+}
55
+.weui-cell{
56
+  display: flex;
57
+  align-items: center;
58
+
59
+}
60
+.weui-cell__hd{
61
+  margin-left: 20rpx;
62
+}
63
+.powerlevel{
64
+  border-radius: 6rpx;
65
+  text-align: right;
66
+ }
67
+ .license{
68
+   width: 100%;
69
+  display: flex;
70
+  flex-direction: column;
71
+}
72
+ .toptabbar_box{
73
+  width: 100%;
74
+  height: 120rpx;
75
+  display: flex;
76
+  align-items: center;
77
+  justify-content: space-between;
78
+  border-bottom: 1rpx #f5f5f5 solid;
79
+}   .toptabbar_left{
80
+  font-size: 28rpx;
81
+ }
82
+ .account_to{
83
+  width: 100%;
84
+  height: 300rpx;
85
+  border-radius: 10rpx;
86
+  display: flex;
87
+  align-items: center;
88
+  justify-content: center;
89
+  border-radius: 10rpx;
90
+  border: #f5f5f5 1rpx solid;
91
+  box-sizing: border-box;
92
+  }
93
+  .user_to{
94
+    width: 100%;
95
+  height: 360rpx;
96
+  border-radius: 10rpx;
97
+  }
98
+  .button_button{
99
+    width: 70%;
100
+    color: #fff;
101
+  background-color: #0F80DC;
102
+  /* background-color: rgba(0,117,68, 0.3); 红色,50%透明度 */
103
+   }
104
+   
105
+
106
+   

+ 4
- 2
package-user/pages/userlist/index.js View File

@@ -26,14 +26,16 @@ Page({
26 26
   },  
27 27
 getuser(){
28 28
   let data ={
29
-    workorderType:0
29
+    workorderType:1,
30
+    pageNum:1,
31
+    pageSize:99
30 32
   }
31 33
   api.request(`/sysworkorder/selectworkorderlist`, 'post',data,{ isPublic: false })
32 34
   .then((data) => {
33 35
 console.log(data.data);
34 36
 if (data.code==200) {
35 37
   this.setData({
36
-    userdata:data.data
38
+    userdata:data.data.list
37 39
   })
38 40
 }
39 41
   })

+ 7
- 4
package-user/pages/userlist/index.wxml View File

@@ -1,13 +1,14 @@
1
-<!--pages/userlist/index.wxml-->
1
+<!-- pages/userlist/index.wxml -->
2
+<!--  -->
2 3
 <view class="setup">
3 4
   <view class="driver-info" wx:for="{{userdata}}" wx:key="operationId">
4
-      <image src="https://esos-iot.bjdexn.cn/myminio/project/2a1b32553c3d4ef992bc797d26cf1614.png" class="driver-avatar"></image>
5
+      <image src="https://esos-iot.com/myminio/project/2a1b32553c3d4ef992bc797d26cf1614.png" class="driver-avatar"></image>
5 6
       <view class="driver-details">
6 7
         <view class="driver-name">目的地: {{item.poiName}}</view>
7 8
         <view class="driver-arrive">电话:{{item.phone}}</view>
8 9
         <view class="driver-car">预约时间: {{item.workorderStarttime}}</view>
9 10
       </view>
10
-      <button class="cancel-btn" data-id="{{item.workorderId}}" bindtap="cancelOrder">分配单</button>
11
+      <button class="cancel-btn" data-id="{{item.workorderId}}" bindtap="cancelOrder">分配单</button>
11 12
     </view>
12 13
 </view>
13 14
 <t-popup
@@ -36,4 +37,6 @@
36 37
 
37 38
 </view>
38 39
 </view>
39
-</t-popup>
40
+</t-popup>
41
+ <!--  -->
42
+ <view></view>

+ 149
- 0
pages/balance/index.js View File

@@ -0,0 +1,149 @@
1
+// pages/balance/index.js
2
+const api = require('../../api/index.js');
3
+
4
+Page({
5
+
6
+  /**
7
+   * 页面的初始数据
8
+   */
9
+  data: {
10
+    visible:false,
11
+    selectedtype:1,
12
+    accountdata:[]
13
+  },
14
+
15
+  /**
16
+   * 生命周期函数--监听页面加载
17
+   */
18
+  onLoad(options) {
19
+this.account()
20
+  },
21
+  account(){
22
+    let data ={
23
+
24
+    }
25
+    api.request(`/SysBalance/selectbalance`, 'post',data,{ isPublic: false })
26
+    .then((data) => {
27
+      
28
+      this.setData({
29
+        accountdata:data.data
30
+      })
31
+ console.log(data);
32
+    })
33
+    .catch((err) => {
34
+   
35
+      console.error('请求失败:', err);
36
+    });
37
+  },
38
+  onVisibleChange1(){
39
+  this.setData({
40
+    visible:false
41
+
42
+  })
43
+
44
+  },
45
+  ondetails(e){
46
+    console.log(e.currentTarget.dataset.name);
47
+    if (e.currentTarget.dataset.name=='bill') {
48
+      wx.navigateTo({
49
+        url: `/pages/details/index?name=账单明细`,
50
+      })
51
+    }else if(e.currentTarget.dataset.name=='withdraw'){
52
+      wx.navigateTo({
53
+        url: `/pages/details/index?name=提现明细`,
54
+      })
55
+    }else if(e.currentTarget.dataset.name=='topup'){
56
+      wx.navigateTo({
57
+        url: `/pages/details/index?name=充值明细`,
58
+      })
59
+    }else if(e.currentTarget.dataset.name=='invoice'){
60
+      wx.navigateTo({
61
+        url: `/pages/details/index?name=发票管理`,
62
+      })
63
+    }else if(e.currentTarget.dataset.name=='bankcard'){
64
+      wx.navigateTo({
65
+        url: `/pages/details/index?name=银行卡管理`,
66
+      })
67
+    }else if(e.currentTarget.dataset.name=='balance'){
68
+      wx.navigateTo({
69
+        url: `/pages/details/index?name=温馨提示`,
70
+      })
71
+    }
72
+   
73
+  },
74
+  onwithdraw(){
75
+    this.setData({
76
+      visible:true
77
+  
78
+    })
79
+  },
80
+  selected_wx(e){
81
+    console.log(e.currentTarget.dataset.index);
82
+    this.setData({
83
+      selectedtype:e.currentTarget.dataset.index
84
+  
85
+    })
86
+  },
87
+    ontopup(){
88
+      wx.showModal({
89
+        title: '充值',
90
+        content: '拨打客服电话,联系客服充值!',
91
+        confirmText:'拨打',
92
+        success (res) {
93
+          if (res.confirm) {
94
+           
95
+          } else if (res.cancel) {
96
+            console.log('用户点击取消')
97
+          }
98
+        }
99
+      })
100
+  },
101
+  /**
102
+   * 生命周期函数--监听页面初次渲染完成
103
+   */
104
+  onReady() {
105
+
106
+  },
107
+
108
+  /**
109
+   * 生命周期函数--监听页面显示
110
+   */
111
+  onShow() {
112
+
113
+  },
114
+
115
+  /**
116
+   * 生命周期函数--监听页面隐藏
117
+   */
118
+  onHide() {
119
+
120
+  },
121
+
122
+  /**
123
+   * 生命周期函数--监听页面卸载
124
+   */
125
+  onUnload() {
126
+
127
+  },
128
+
129
+  /**
130
+   * 页面相关事件处理函数--监听用户下拉动作
131
+   */
132
+  onPullDownRefresh() {
133
+
134
+  },
135
+
136
+  /**
137
+   * 页面上拉触底事件的处理函数
138
+   */
139
+  onReachBottom() {
140
+
141
+  },
142
+
143
+  /**
144
+   * 用户点击右上角分享
145
+   */
146
+  onShareAppMessage() {
147
+
148
+  }
149
+})

+ 11
- 0
pages/balance/index.json View File

@@ -0,0 +1,11 @@
1
+{
2
+  "navigationBarTitleText": "我的账户",
3
+  "usingComponents": {
4
+    "t-icon": "tdesign-miniprogram/icon/icon",
5
+    "t-button": "tdesign-miniprogram/button/button",
6
+    "t-dialog": "tdesign-miniprogram/dialog/dialog",
7
+    "t-input": "tdesign-miniprogram/input/input",
8
+    "t-popup": "tdesign-miniprogram/popup/popup"
9
+
10
+  }
11
+}

+ 91
- 0
pages/balance/index.wxml View File

@@ -0,0 +1,91 @@
1
+<!--pages/balance/index.wxml-->
2
+<view class="setup">
3
+<view class="balance">
4
+ <view>总余额</view>
5
+ <view class="money"><text class="money1">¥</text> <text class="moneys">{{accountdata.balance}}</text></view>
6
+ <view class="top_up" bind:tap="ontopup">充值</view>
7
+ <view class="withdraw" bind:tap="onwithdraw">提现</view>
8
+</view>
9
+<view class="balance_list">
10
+  
11
+  <view class="allocation" data-name="bill" bind:tap="ondetails">
12
+<view class="allocation_3">账单明细</view>
13
+<view class="allocation_1">
14
+<view class="allocation_2"></view>
15
+<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
16
+</view>
17
+</view>
18
+<view class="allocation" data-name="withdraw" bind:tap="ondetails">
19
+<view class="allocation_3">提现明细</view>
20
+<view class="allocation_1">
21
+<view class="allocation_2"></view>
22
+<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
23
+</view>
24
+</view>
25
+<view class="allocation" data-name="topup" bind:tap="ondetails">
26
+<view class="allocation_3">充值明细</view>
27
+<view class="allocation_1">
28
+<view class="allocation_2"></view>
29
+<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
30
+</view>
31
+</view>
32
+
33
+<view class="allocation" data-name="bankcard" bind:tap="ondetails">
34
+<view class="allocation_3">银行卡管理</view>
35
+<view class="allocation_1">
36
+<view class="allocation_2"></view>
37
+<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
38
+</view>
39
+</view>
40
+<view class="allocation" data-name="invoice" bind:tap="ondetails">
41
+<view class="allocation_3">重置结算密码</view>
42
+<view class="allocation_1">
43
+<view class="allocation_2"></view>
44
+<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
45
+</view>
46
+</view>
47
+</view>
48
+<view class="balance_list">
49
+  <view class="allocation" data-name="balance" bind:tap="ondetails">
50
+<view class="allocation_3">温馨提示</view>
51
+ 
52
+</view>
53
+</view>
54
+</view>
55
+
56
+<t-popup
57
+  visible="{{visible}}"
58
+  bind:visible-change="onVisibleChange1"
59
+  placement="bottom"
60
+>
61
+<view class="driverpopup">
62
+   <view class="driverpopup_title">提现到银行卡</view>
63
+
64
+<!-- <view class="driverpopup_box" data-index="1" bind:tap="selected_wx">
65
+    <view class="picker">
66
+    <view>提现到微信</view>  
67
+      <view class="selected" wx:if="{{selectedtype==1}}">✔</view>
68
+    </view>
69
+</view> -->
70
+<view class="driverpopup_box" data-index="1" bind:tap="selected_wx">
71
+    <view class="picker">
72
+      <view>***9908 工商银行</view>  
73
+      <view class="selected" wx:if="{{selectedtype==1}}">✔</view>
74
+    </view>
75
+</view>
76
+<view class="driverpopup_box" data-index="2" bind:tap="selected_wx">
77
+    <view class="picker">
78
+      <view>***2207 农业银行</view>  
79
+      <view class="selected" wx:if="{{selectedtype==2}}">✔</view>
80
+    </view>
81
+</view>
82
+<view style="height: 80rpx;"></view>
83
+<view class="botton">
84
+<view class="botton_box" bind:tap="submit">添加银行卡</view>
85
+</view>
86
+</view>
87
+</t-popup>
88
+<!--
89
+  
90
+ --> 
91
+ 

+ 147
- 0
pages/balance/index.wxss View File

@@ -0,0 +1,147 @@
1
+/* pages/balance/index.wxss */
2
+page{
3
+  width: 100%;
4
+  height: 100vh;
5
+  background: linear-gradient(to bottom, #F0F5F5 -40%, #F0F5F5 40%,#F0F5F5 100%);
6
+  box-sizing: border-box;
7
+}
8
+.balance{
9
+  width: 100%;
10
+  background-color: #ffffff;
11
+  margin-top: 40rpx;
12
+  padding: 60rpx 0rpx;
13
+  box-sizing: border-box;
14
+  display: flex;
15
+  flex-direction: column;
16
+  align-items: center;
17
+}
18
+.money{
19
+  margin-top: 40rpx;
20
+}
21
+.money1{
22
+  font-size: 32rpx;
23
+}
24
+.moneys{
25
+  font-size: 42rpx;
26
+}
27
+.top_up{
28
+  margin-top: 140rpx;
29
+  width: 300rpx;
30
+  height: 80rpx;
31
+  color: #ffffff;
32
+  display: flex;
33
+  align-items: center;
34
+  justify-content: center;
35
+  border-radius: 10rpx;
36
+  background-color: #07C160;
37
+}
38
+.withdraw{
39
+  margin-top: 30rpx;
40
+  width: 300rpx;
41
+  height: 80rpx;
42
+  color: #222222;
43
+  display: flex;
44
+  align-items: center;
45
+  justify-content: center;
46
+  border-radius: 10rpx;
47
+  /* background-color: #07C160;  */
48
+ border: #222222 1rpx solid;
49
+}
50
+.balance_list{
51
+  width: 100%;
52
+  background-color: #ffffff;
53
+  margin-top: 30rpx;
54
+  padding: 20rpx 30rpx;
55
+  box-sizing: border-box;
56
+  display: flex;
57
+  flex-direction: column;
58
+  align-items: center;
59
+}
60
+.allocation{
61
+  width: 100%;
62
+  height: 80rpx;
63
+display: flex;
64
+align-items: center;
65
+justify-content:space-between;
66
+padding: 0rpx 0rpx;
67
+overflow: hidden;
68
+box-sizing: border-box;
69
+border-bottom: #f8f8f8 1rpx solid;
70
+}
71
+.allocation_1{
72
+  display: flex;
73
+  font-size:13px;
74
+  align-items: center;
75
+}
76
+.allocation_box{
77
+ border-radius: 16rpx;
78
+ background-color: #ffffff;
79
+  padding: 10rpx 0rpx;
80
+  box-sizing: border-box;
81
+  margin-top: 30rpx;
82
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
83
+}
84
+.allocation_2{
85
+  color: #999999;
86
+}
87
+.allocation_3{
88
+  font-size: 14px;
89
+}
90
+.driverpopup{
91
+  padding: 40rpx;
92
+  /* display: flex; */
93
+  /* align-items: center; */
94
+  /* justify-content: center; */
95
+}
96
+.driverpopup_box{
97
+  width: 100%;
98
+  height: 100rpx;
99
+  display: flex;
100
+  justify-content: center;
101
+  align-items: center;
102
+border-bottom: #cccccc 1rpx solid;
103
+
104
+}
105
+.picker{
106
+  width: 100%;
107
+  height: 100rpx;
108
+  display: flex;
109
+  justify-content:space-between;
110
+  align-items: center;
111
+}
112
+.botton{
113
+width: 100%;
114
+display: flex;
115
+align-items: center;
116
+justify-content: center;
117
+}
118
+.botton_box{
119
+  width: 400rpx;
120
+  height: 70rpx;
121
+  margin-top: 100rpx;
122
+  font-size: 28rpx;
123
+  border-radius: 10rpx;
124
+  display: flex;
125
+  align-items: center;
126
+  justify-content: center;
127
+  color: #2C85FF;
128
+  /* background-color: #2C85FF; */
129
+  border: 1rpx solid #2C85FF;
130
+}
131
+/* */
132
+.selected{
133
+  width: 40rpx;
134
+  height: 40rpx;
135
+  color: #ffffff;
136
+  display: flex;
137
+  align-items: center;
138
+  justify-content: center;
139
+  background-color: #07C160;
140
+  border-radius: 100%;
141
+}
142
+.driverpopup_title{
143
+  width: 100%;
144
+  display: flex;
145
+  align-items: center;
146
+  justify-content: center;
147
+}

+ 96
- 0
pages/details/index.js View File

@@ -0,0 +1,96 @@
1
+// pages/details/index.js
2
+const api = require('../../api/index.js');
3
+
4
+Page({
5
+
6
+  /**
7
+   * 页面的初始数据
8
+   */
9
+  data: {
10
+    optionsname:'',
11
+    selectbalance:[]
12
+  },
13
+
14
+  /**
15
+   * 生命周期函数--监听页面加载
16
+   */
17
+  onLoad(options) {
18
+console.log(options);
19
+this.setData({
20
+  optionsname:options.name
21
+})
22
+wx.setNavigationBarTitle({
23
+  title: options.name,
24
+  // 失败回调,避免设置失败无提示
25
+  fail: (err) => {
26
+    console.error("设置导航标题失败:", err);
27
+  }
28
+});
29
+this.getSysBalance()
30
+  },
31
+getSysBalance(){
32
+  let data = {
33
+  }
34
+  api.request(`/SysBalance/selecthistorybalance`, 'post', data, { isPublic: false })       
35
+  .then((data) => {
36
+    console.log(data);
37
+    if (data.code == 200) {
38
+      this.setData({
39
+        selectbalance:data.data
40
+      })
41
+      
42
+    }
43
+  })
44
+  .catch((err) => {
45
+    this.showInfo('操作失败');
46
+  });
47
+},
48
+  /**
49
+   * 生命周期函数--监听页面初次渲染完成
50
+   */
51
+  onReady() {
52
+
53
+  },
54
+
55
+  /**
56
+   * 生命周期函数--监听页面显示
57
+   */
58
+  onShow() {
59
+
60
+  },
61
+
62
+  /**
63
+   * 生命周期函数--监听页面隐藏
64
+   */
65
+  onHide() {
66
+
67
+  },
68
+
69
+  /**
70
+   * 生命周期函数--监听页面卸载
71
+   */
72
+  onUnload() {
73
+
74
+  },
75
+
76
+  /**
77
+   * 页面相关事件处理函数--监听用户下拉动作
78
+   */
79
+  onPullDownRefresh() {
80
+
81
+  },
82
+
83
+  /**
84
+   * 页面上拉触底事件的处理函数
85
+   */
86
+  onReachBottom() {
87
+
88
+  },
89
+
90
+  /**
91
+   * 用户点击右上角分享
92
+   */
93
+  onShareAppMessage() {
94
+
95
+  }
96
+})

+ 3
- 0
pages/details/index.json View File

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

+ 17
- 0
pages/details/index.wxml View File

@@ -0,0 +1,17 @@
1
+<!-- pages/userlist/index.wxml -->
2
+<!--  -->
3
+<view class="setup">
4
+  <view class="driver-info" wx:for="{{selectbalance}}" wx:key="operationId">
5
+      <view class="driver-details">
6
+        <view class="driver-name">金额: {{item.balance}}</view>
7
+        <view class="driver-arrive">工单号:{{item.workorderId}}</view>
8
+        <view class="driver-car">结算人: {{item.operationPhone}}</view>
9
+        <view class="driver-car">结算时间: {{item.balanceTime}}</view>
10
+        <view class="driver-car">剩余总余额: {{item.originalbalance}}</view>
11
+        
12
+      </view>
13
+    </view>
14
+</view>
15
+
16
+ <!--  -->
17
+ <view></view>

+ 94
- 0
pages/details/index.wxss View File

@@ -0,0 +1,94 @@
1
+/* pages/userlist/index.wxss */
2
+page{
3
+  width: 100%;
4
+  height: 100vh;
5
+  background: linear-gradient(to bottom, #F0F5F5 -40%, #F0F5F5 40%,#F0F5F5 100%);
6
+  padding: 0rpx 22rpx;
7
+  box-sizing: border-box;
8
+
9
+}
10
+.driver-info {
11
+  background-color: white;
12
+  border-radius: 16rpx;
13
+  padding: 20rpx;
14
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
15
+  display: flex;
16
+  align-items: center;
17
+  margin-top: 26rpx;
18
+}
19
+
20
+.driver-avatar {
21
+  width: 100rpx;
22
+  height: 100rpx;
23
+  border-radius: 50%;
24
+}
25
+
26
+.driver-details {
27
+  margin-left: 24rpx;
28
+  flex: 1;
29
+}
30
+
31
+.driver-name {
32
+  font-size: 32rpx;
33
+  font-weight: bold;
34
+}
35
+.driver-car {
36
+  font-size: 28rpx;
37
+  color: #999999;
38
+  margin-top: 8rpx;
39
+}
40
+
41
+.driver-arrive {
42
+  font-size: 28rpx;
43
+  /* color: #2C85FF; */
44
+  /* color: #666; */
45
+  color: #999999;
46
+
47
+  margin-top: 8rpx;
48
+}
49
+
50
+.cancel-btn {
51
+  width: 180rpx;
52
+  height: 64rpx;
53
+  line-height: 64rpx;
54
+  font-size: 28rpx;
55
+  color: #FF5252;
56
+  border: 1rpx solid #FF5252;
57
+  background-color: white;
58
+  border-radius: 32rpx;
59
+}
60
+.driverpopup{
61
+  width: 100%;
62
+  height: 600rpx;
63
+  padding: 20rpx;
64
+  padding-top:100rpx;
65
+  box-sizing: border-box;
66
+}
67
+.driverpopup_box{
68
+  width: 100%;
69
+  height: 100rpx;
70
+  align-items: center;
71
+}
72
+.picker{
73
+  width: 100%;
74
+  height: 100rpx;
75
+  align-items: center;
76
+}
77
+.botton{
78
+width: 100%;
79
+display: flex;
80
+align-items: center;
81
+justify-content: center;
82
+}
83
+.botton_box{
84
+  width: 400rpx;
85
+  height: 70rpx;
86
+  margin-top: 100rpx;
87
+  font-size: 28rpx;
88
+  border-radius: 10rpx;
89
+  display: flex;
90
+  align-items: center;
91
+  justify-content: center;
92
+  color: #ffffff;
93
+  background-color: #2C85FF;
94
+}

+ 3
- 3
pages/equipment/index.wxml View File

@@ -13,8 +13,8 @@
13 13
 <view class="order">
14 14
 <view class="order_box">
15 15
 <view class="order_title">
16
-<view class="order_title1"> <image class="order_image" src="https://esos-iot.bjdexn.cn/myminio/project/cf5ff29715de46b88803cf802e81e1a9.png" mode="aspectFit"/> 浙C.78Z71</view>
17
-<!-- <view class="order_title1"> <image class="order_image" src="https://esos-iot.bjdexn.cn/myminio/proje  ct/94f976d5afce444a8861b59681069218.png" mode="aspectFit"/> 浙C.78Z71</view> -->
16
+<view class="order_title1"> <image class="order_image" src="https://esos-iot.com/myminio/project/cf5ff29715de46b88803cf802e81e1a9.png" mode="aspectFit"/> 浙C.78Z71</view>
17
+<!-- <view class="order_title1"> <image class="order_image" src="https://esos-iot.com/myminio/proje  ct/94f976d5afce444a8861b59681069218.png" mode="aspectFit"/> 浙C.78Z71</view> -->
18 18
 <view>在线</view>
19 19
 </view>
20 20
 <!-- <view class="order_direction"><text class="order_text">方向:</text>
@@ -59,7 +59,7 @@
59 59
 </view>
60 60
 </view>
61 61
 <view class="available" wx:if="{{true}}">
62
-<image src="https://esos-iot.bjdexn.cn/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
62
+<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
63 63
 </view> 
64 64
 </view>
65 65
 <view style="height: 30rpx;"></view>

+ 172
- 114
pages/index/index.js View File

@@ -15,16 +15,23 @@ Page({
15 15
     showDriverInfo: true,
16 16
     carsNearby: 0,
17 17
     // 司机信息
18
-    driverAvatar: 'https://esos-iot.bjdexn.cn/myminio/project/2a1b32553c3d4ef992bc797d26cf1614.png',
18
+    driverAvatar: 'https://esos-iot.com/myminio/project/2a1b32553c3d4ef992bc797d26cf1614.png',
19 19
     driverName: '王师傅',
20
-    carNumber: '京A88888',
20
+    carNumber: '京·A88888',
21 21
     estimatedArrival: 5,
22 22
     locationTimer: null,
23 23
     isTracking: false,
24 24
     userdata:[],
25
-    workorderdata:[]
25
+    workorderdata:[],
26
+    background: ['https://esos-iot.com/myminio/project/8e68e25a4e6042b09e233d496c0aad3b.png', 'https://esos-iot.com/myminio/project/8e68e25a4e6042b09e233d496c0aad3b.png', 'https://esos-iot.com/myminio/project/8e68e25a4e6042b09e233d496c0aad3b.png'],
27
+    indicatorDots: true,
28
+    vertical: false,
29
+    autoplay: true,
30
+    interval: 3000,
31
+    duration: 500
26 32
   },  
27 33
 // 收益统计
34
+
28 35
   onLoad() {
29 36
     // 初始化地图
30 37
 this.getuser()
@@ -77,13 +84,15 @@ wx.$on('wsMessage', this.handleWsMessage);
77 84
       customerId:'',
78 85
       workorderType:4,
79 86
       chargedischargeType:'',
80
-    }
87
+      pageNum:1,
88
+      pageSize:99
89
+    } 
81 90
     api.request(`/sysworkorder/selectworkorderlist`, 'post',data ,{ isPublic: false })
82 91
     .then((data) => {
83 92
       console.log(data.data);
84 93
       if (data.code==200) {
85 94
        this.setData({
86
-        workorderdata:data.data
95
+        workorderdata:data.data.list
87 96
        })
88 97
      
89 98
       }
@@ -93,7 +102,7 @@ wx.$on('wsMessage', this.handleWsMessage);
93 102
     });
94 103
   },
95 104
 getuser(){
96
- 
105
+
97 106
   api.request(`/sysoperation/selectoperationid`, 'post',{ isPublic: false })
98 107
   .then((data) => {
99 108
     console.log(data.data);
@@ -106,7 +115,6 @@ wx.setStorage({
106 115
   key: 'user',  // 存储的key值
107 116
   data:data.data
108 117
 });
109
-   
110 118
     }
111 119
   })
112 120
   .catch((err) => {
@@ -138,15 +146,19 @@ wx.setStorage({
138 146
             id: 0,
139 147
             longitude,
140 148
             latitude,
141
-            iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
149
+            iconPath: 'https://esos-iot.com/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
142 150
             width: 40,
143 151
             height: 40,
144 152
             anchor: {x: 0.5, y: 1}
145
-          }]
153
+          }],
154
+          carsNearby: 0, // 附近车辆数
155
+          stationsNearby: 0, // 附近电站数
156
+          powerUseNearby: 0, // 附近用电位置数
146 157
         });
147 158
          // 加载附近车辆数据
148
-         that.getloadNearbyCars();
149
-
159
+         //  
160
+        //  that.getloadNearbyCars();
161
+        that.refreshAllNearbyData()
150 162
       },
151 163
       fail() {
152 164
         wx.showToast({
@@ -156,16 +168,14 @@ wx.setStorage({
156 168
       }
157 169
     });
158 170
   },
159
-
160
-
161
-  // 预约叫车
171
+  
162 172
   onelectricity(){
163
-
173
+  
164 174
 wx.navigateTo({
165 175
   url: `/package-order/pages/createorder/index?order=`,
166 176
 })
167 177
   },
168
-
178
+  
169 179
   onHide() {
170 180
     // 页面卸载时停止追踪
171 181
     this.stopTracking();
@@ -185,123 +195,171 @@ wx.navigateTo({
185 195
   // 加载附近车辆
186 196
   getloadNearbyCars() {
187 197
     const that = this;
188
-   
189
-        let data ={
190
-          carId:'',
191
-          carType:'',
192
-          carMondel:'',
198
+    let data = {};
199
+    api.request(`/syscar/selectoperationcar`, 'post', data, { isPublic: false })
200
+      .then((data) => {
201
+        if (data.code == 200) {
202
+          const cars = [];
203
+          for (let index = 0; index < data.data.syscarList.length; index++) {
204
+            let carPosition = data.data.syscarList[index].carPosition.split(",");
205
+            cars.push({
206
+              id: 100 + index, // 车辆标记 ID 段:100+
207
+              longitude: carPosition[1],
208
+              latitude: carPosition[0],
209
+              iconPath: 'https://esos-iot.com/myminio/project/e9c0fba9b61448e59458054d335b162b.png',
210
+              width: 26,
211
+              height: 32,
212
+              anchor: { x: 0.5, y: 0.5 },
213
+              type: 'car' // 标记类型,用于过滤
214
+            });
215
+          }
216
+          // 更新车辆标记:先移除旧车辆标记,再添加新的
217
+          const updatedMarkers = that.updateMarkers('car', cars);
218
+          that.setData({
219
+            markers: updatedMarkers,
220
+            carsNearby: data.data.carcount
221
+          });
193 222
         }
194
-        api.request(`/syscar/selectcarall`, 'post',data,{ isPublic: false })
195
-        .then((data) => {
196
-      if (data.code==200) {
197
-        const cars = [];
198
-         for (let index = 0; index < data.data.length; index++) {
199
-         let carPosition = data.data[index].carPosition.split(",");
200
-                   cars.push({
201
-            id: 100+index,
202
-            longitude: carPosition[1],
203
-            latitude: carPosition[0],
204
-            iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/f6fba6c83b2d4864a73f5f1d83cda416.png',
205
-            width: 30,
206
-            height: 40,
207
-            anchor: {x: 0.5, y: 0.5}
208
-          });   
209
-         }
210
-         // 将车辆标记添加到现有标记中
211
-         const updatedMarkers = [...that.data.markers];
212
-         // 先移除之前的车辆标记
213
-         const filteredMarkers = updatedMarkers.filter(marker => marker.id);
214
-         // 添加新的车辆标记
215
-         filteredMarkers.push(...cars);
216
-         
217
-         that.setData({
218
-           markers: filteredMarkers,
219
-           carsNearby: data.data.length
220
-         });
221
-        //  this.loadNearbyCars()
222
-      }
223
-      
224
-        })
225
-        .catch((err) => {
226
-       
227
-          console.error('请求失败:', err);
228
-        });
229
-    
230
- 
223
+      })
224
+      .catch((err) => {
225
+        console.error('加载附近车辆失败:', err);
226
+      });
231 227
   },
232
-  // 加载附近车辆
233
-  loadNearbyCars() {
234
-    const { longitude, latitude } = this.data;
235
- 
236
-    if (this.data.isTracking) return;
237
-    
228
+
229
+  // ========== 新增:加载附近电站 ==========
230
+  getloadNearbyStations() {
238 231
     const that = this;
239
-    this.setData({ isTracking: true });
240
-    this.setData({
241
-      locationTimer:setInterval(() => {
242
-        let data ={
243
-          carId:'',
244
-          carType:'',
245
-          carMondel:'',
232
+    let data = {}; // 根据接口要求传参,如当前定位、范围等
233
+    // 替换为你的电站列表接口
234
+    api.request(`/sysaddress/selectpower`, 'post', data, { isPublic: false })
235
+      .then((data) => {
236
+        if (data.code == 200) {
237
+          console.log(data);
238
+          const stations = [];
239
+       
240
+          // 假设接口返回的电站列表字段为 syscarList,坐标字段为 carPosition(格式:纬度,经度)
241
+          // data.data.syscarList = [{carPosition: "40.155721,116.652896"},{carPosition: "40.105315,116.763173"},{carPosition: "40.108386,116.595002"}]
242
+          for (let index = 0; index < data.data.length; index++) {
243
+            // let carPosition = data.data[index].carPosition.split(",");
244
+            if (data.data[index].addressType==2) {
245
+              // console.log('');
246
+              // 网点 绿电
247
+              stations.push({
248
+                id: 200 + index, // 电站标记 ID 段:200+(避免和车辆冲突)
249
+                longitude: data.data[index].longitude,
250
+                latitude: data.data[index].latitude,
251
+                // 替换为你的电站图标地址
252
+                iconPath: 'https://esos-iot.com/myminio/project/62a7a9c509f948558436bc56ee9bfe2e.png',
253
+                width: 28, // 电站图标尺寸,和车辆区分
254
+                height: 32,
255
+                anchor: { x: 0.5, y: 0.5 },
256
+                type: 'station' // 标记类型
257
+              });
258
+            }
259
+         
260
+          }
261
+          // 更新电站标记
262
+          const updatedMarkers = that.updateMarkers('station', stations);
263
+          that.setData({
264
+            markers: updatedMarkers,
265
+            stationsNearby: data.data.length // 电站数量
266
+          });
246 267
         }
247
-        api.request(`/syscar/selectcarall`, 'post',data,{ isPublic: false })
248
-        .then((data) => {
249
-      if (data.code==200) {
250
-        const cars = [];
251
-         for (let index = 0; index < data.data.length; index++) {
252
-         let carPosition = data.data[index].carPosition.split(",");
253
-                   cars.push({
254
-            id: 100+index,
255
-            longitude: carPosition[1],
256
-            latitude: carPosition[0],
257
-            iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/f6fba6c83b2d4864a73f5f1d83cda416.png',
258
-            width: 30,
259
-            height: 40,
260
-            anchor: {x: 0.5, y: 0.5}
261
-          });   
262
-         }
263
-         // 将车辆标记添加到现有标记中
264
-         const updatedMarkers = [...that.data.markers];
265
-         // 先移除之前的车辆标记
266
-         const filteredMarkers = updatedMarkers.filter(marker => marker.id);
267
-         // 添加新的车辆标记
268
-         filteredMarkers.push(...cars);
268
+      })
269
+      .catch((err) => {
270
+        console.error('加载附近电站失败:', err);
271
+      });
272
+  },
273
+
274
+  // ========== 新增:加载附近用电位置 ==========
275
+  getloadNearbyPowerUse() {
276
+    const that = this;
277
+    let data = {}; // 根据接口要求传参
278
+    // 替换为你的用电位置列表接口
279
+    api.request(`/sysaddress/selectpower`, 'post', data, { isPublic: false })
280
+      .then((data) => {
281
+        if (data.code == 200) {
282
+          const powerUses = [];
283
+          // 假设接口返回的用电位置列表字段为 syscarList,坐标字段为 carPosition(格式:纬度,经度)
284
+          // data.data.syscarList = [{carPosition: "40.086206,116.850604"},{carPosition: "40.017232,116.61686"},{carPosition: "40.230298,116.739424"}]
285
+          for (let index = 0; index < data.data.length; index++) {
286
+            // let carPosition = data.data.syscarList[index].carPosition.split(",");
287
+            if (data.data[index].addressType==0||data.data[index].addressType==1) {
288
+              powerUses.push({
289
+                id: 300 + index, // 用电位置 ID 段:300+
290
+                longitude: data.data[index].longitude,
291
+                latitude: data.data[index].latitude,
292
+                // 替换为你的用电位置图标地址
293
+                iconPath: 'https://esos-iot.com/myminio/project/42dd004817dd4f268d97dcd1145ca113.png',
294
+                width: 26, // 用电位置图标尺寸
295
+                height: 30,
296
+                anchor: { x: 0.5, y: 0.5 },
297
+                type: 'powerUse' // 标记类型
298
+              }); 
299
+            }
269 300
          
270
-         that.setData({
271
-           markers: filteredMarkers,
272
-           carsNearby: data.data.length
273
-         });
274
-      }
275
-      
276
-        })
277
-        .catch((err) => {
278
-       
279
-          console.error('请求失败:', err);
280
-        });
281
-      }, 10000)  // 每10秒更新一次位置
282
-    })
283
-    
284
- 
301
+          }
302
+          // 更新用电位置标记
303
+          const updatedMarkers = that.updateMarkers('powerUse', powerUses);
304
+          that.setData({
305
+            markers: updatedMarkers,
306
+            powerUseNearby: data.data.length // 用电位置数量
307
+          });
308
+        }
309
+      })
310
+      .catch((err) => {
311
+        console.error('加载附近用电位置失败:', err);
312
+      });
285 313
   },
286 314
 
287
-  // 取消订单
315
+  // ========== 通用方法:更新地图标记(核心复用逻辑) ==========
316
+  /**
317
+   * 更新地图标记
318
+   * @param {String} type 标记类型(car/station/powerUse)
319
+   * @param {Array} newMarkers 新的标记列表
320
+   * @returns {Array} 更新后的所有标记
321
+   */
322
+  updateMarkers(type, newMarkers) {
323
+    // 1. 过滤掉原有同类型的标记
324
+    const filteredMarkers = this.data.markers.filter(marker => marker.type !== type);
325
+    // 2. 添加新的同类型标记
326
+    filteredMarkers.push(...newMarkers);
327
+    // 3. 返回更新后的标记列表
328
+    return filteredMarkers;
329
+  },
330
+
331
+  // 可选:刷新所有附近数据
332
+  refreshAllNearbyData() {
333
+    this.getloadNearbyCars();
334
+     if (this.data.userdata.operationRole==6) {
335
+       this.getloadNearbyPowerUse();  // 用电
336
+
337
+      }else if (this.data.userdata.operationRole==5) {
338
+       this.getloadNearbyStations();  // 绿电
339
+
340
+     }else if (this.data.userdata.operationRole==4){
341
+    this.getloadNearbyStations();
342
+      this.getloadNearbyPowerUse();
343
+     }
344
+  },
345
+ 
346
+  // 取消工单
288 347
   positioning(){
289 348
     this.initMap()
290
-
349
+  
291 350
   },
292 351
   
293 352
   details(e){
294
-
353
+  
295 354
     wx.navigateTo({
296 355
     url: `/package-map/pages/map/index?id=${e.currentTarget.dataset.id}`,
297 356
   })
298 357
   },
299 358
   
300
- 
301 359
   onShow() {
302 360
     //  this.loadNearbyCars()
303 361
 this.getworkordertype()
304
-
362
+   
305 363
   },
306 364
 }); 
307
-//
365
+// 

+ 59
- 29
pages/index/index.wxml View File

@@ -3,21 +3,53 @@
3 3
   <map 
4 4
     id="map"
5 5
     class="map"
6
-    style="{{workorderdata.length < 1 ? 'height: 100%':'height: 70%'}}"
7 6
     longitude="{{longitude}}"
8 7
     latitude="{{latitude}}"
9 8
     scale="{{scale}}"
10 9
     markers="{{markers}}"
11 10
     polyline="{{polyline}}"
12 11
     show-location
13
-    bindregionchange="onRegionChange"
14 12
   ></map>
15
-   
16
-  <!-- 底部操--作面板 -->
13
+   <!-- 附近车辆--数量提示 -->
14
+   <view class="cars-nearby" wx:if="{{carsNearby > 0}}">
15
+  <view style="display: flex;align-items: center;">
16
+    <!-- <view class="cars-icon">
17
+      <text class="iconfont icon-car"></text>
18
+    </view> -->
19
+      <image class="nearby_icon" src="https://esos-iot.com/myminio/project/e9c0fba9b61448e59458054d335b162b.png" mode="heightFix"/>
20
+    <view class="cars-count"> 车辆{{carsNearby}} </view>
21
+  </view>
22
+ 
23
+  <view style="display: flex;align-items: center;margin-left: 20rpx;" wx:if="{{userdata.operationRole==5}}">
24
+  
25
+    <image class="nearby_icon" src="https://esos-iot.com/myminio/project/62a7a9c509f948558436bc56ee9bfe2e.png" mode="heightFix"/>
26
+    <view class="cars-count">电站 {{stationsNearby}} </view>
27
+  </view>
28
+  <view style="display: flex;align-items: center;margin-left: 20rpx;" wx:if="{{userdata.operationRole==6}}">
29
+    <image class="nearby_icon" src="https://esos-iot.com/myminio/project/42dd004817dd4f268d97dcd1145ca113.png" mode="heightFix"/>
30
+    <view class="cars-count">用电 {{powerUseNearby}} </view>
31
+  </view>
32
+  </view>
33
+  <view class="positioning" bind:tap="positioning">
34
+  <t-icon name="focus" size="40rpx" data-name="focus" bind:tap="onIconTap" />
35
+
36
+</view>
37
+   <view class="carousel">
38
+    <swiper indicator-dots="{{indicatorDots}}"
39
+        autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{true}}">
40
+        <block wx:for="{{background}}" wx:key="*this">
41
+          <swiper-item>
42
+            <!-- <view class="swiper-item">{{item}}</view> -->
43
+            <image class="swiper_img" src="{{item}}" mode="widthFix"/>
44
+          </swiper-item>
45
+        </block>
46
+      </swiper>
47
+   </view>
48
+   <!-- 底部面板 -->
17 49
   <view class="bottom-panel" wx:if="{{workorderdata.length > 0 }}">
18
-    
50
+    <!--  -->
19 51
   <!-- 客户信息--(叫车后显示) -->
20
-    <view  wx:if="{{userdata.operationRole==5}}">
52
+    <view  wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
21 53
     <view class="driver-info" wx:for="{{workorderdata}}" wx:key="index" data-id="{{item.workorderId}}" bindtap="details">
22 54
       <image src="{{driverAvatar}}" class="driver-avatar"></image>
23 55
    <view style="width: 100%;">
@@ -25,8 +57,8 @@
25 57
       <view class="driver-details">
26 58
         <!-- <view class="driver-name"><text style="color: #222;">司机:</text>  {{item.driverName||'匹配中'}}</view> -->
27 59
         <view class="driver-name">车牌号:{{item.carName||'匹配中'}}</view>
28
-        <view class="driver-car" wx:if="{{item.chargedischargeType==1}}">订单类型:充电</view>
29
-        <view class="driver-car" wx:if="{{item.chargedischargeType==2}}">订单类型:放电</view>
60
+        <view class="driver-car1" wx:if="{{item.chargedischargeType==1}}">工单类型:充电</view>
61
+        <view class="driver-car2" wx:if="{{item.chargedischargeType==2}}">工单类型:放电</view>
30 62
         <view class="driver-car">目的地:{{item.poiName}}</view>
31 63
       </view>
32 64
       <view class="cancel-btn">
@@ -55,50 +87,48 @@
55 87
       <view class="driver-details">
56 88
         <view class="driver-name">{{item.poiName}}</view>
57 89
         <view class="driver-car">客户: {{item.receiver}}</view>
58
-        <view class="driver-car" wx:if="{{item.chargedischargeType==1}}">订单类型:充电</view>
59
-        <view class="driver-car" wx:if="{{item.chargedischargeType==2}}">订单类型:放电</view>
90
+        <view class="driver-car1" wx:if="{{item.chargedischargeType==1}}">工单类型:充电</view>
91
+        <view class="driver-car2" wx:if="{{item.chargedischargeType==2}}">工单类型:放电</view>
60 92
       </view>
61 93
       <!-- <button class="cancel-btn" data-id="{{item.workorderId}}" bind:tap="details">去查看</button> -->
62 94
       <view class="cancel-btn">
63
-        <view wx:if="{{item.workorderType==0}}">待处理</view>
95
+<view wx:if="{{item.workorderType==0}}">待处理</view>
64 96
 <view wx:if="{{item.workorderType==1}}">待出发</view>
65 97
 <view wx:if="{{item.workorderType==2}}">行驶中</view>
66 98
 <view wx:if="{{item.workorderType==3}}">到达地点</view>
67 99
 <view wx:if="{{item.workorderType==4}}">工作中</view>
68
-<view wx:if="{{item.workorderType==5}}">完成工作</view>
69
-<view wx:if="{{item.workorderType==6}}">待审核</view>
70
-<view wx:if="{{item.workorderType==7}}">审核失败</view>
71
-      
100
+<view wx:if="{{item.workorderType==6}}">取消工单</view>
101
+
102
+<view wx:if="{{item.workorderType==5&&item.settlementType==0}}">待结算</view>
103
+<view wx:if="{{item.workorderType==5&&item.settlementType==1}}">结算成功</view>
104
+<view wx:if="{{item.workorderType==5&&item.settlementType==2}}">结算失败</view>
72 105
       </view>
73 106
       </view>
74 107
       <view class="driver-arrive1">约定到达时间:{{item.workorderCreatetime}}</view>
75 108
     </view>
76
-
109
+    
77 110
     </view>
78 111
     
79 112
     </view>
80 113
     <!-- <view class="available" wx:if="{{workorderdata.length<1}}">
81
-<image src="https://esos-iot.bjdexn.cn/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
114
+<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
82 115
 </view>  -->
83 116
    
84
-    <view style="height: 140rpx;" wx:if="{{userdata.operationRole==5}}"></view>
117
+    <view style="height: 140rpx;" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}"></view>
85 118
      <!-- <button class="call-btn" bindtap="onelectricity">
86 119
       <text class="call-btn_left_electricity">预约</text>
87 120
     </button> -->
88 121
   </view>
89 122
    
90
-  <!-- 附近车辆--数量提示 -->
91
-  <view class="cars-nearby" wx:if="{{carsNearby > 0}}">
92
-    <view class="cars-icon">
93
-      <text class="iconfont icon-car"></text>
94
-    </view>
95
-    <view class="cars-count">附近有 {{carsNearby}} 辆车</view>
96
-  </view>
123
+ 
124
+  
97 125
 </view>
98
-<button class="call-btn" bindtap="onelectricity" wx:if="{{userdata.operationRole==5}}">
126
+
127
+<button class="call-btn" bindtap="onelectricity" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
99 128
       <text class="call-btn_left_electricity">预约</text>
129
+      
100 130
     </button>
101
-<view class="positioning" bind:tap="positioning" style="{{workorderdata.length < 1 ? 'top: 85%':'top: 55%'}}">
102
-  <t-icon name="focus" size="40rpx" data-name="focus" bind:tap="onIconTap" />
103 131
 
104
-</view>
132
+<!--   
133
+       
134
+ -->   

+ 66
- 22
pages/index/index.wxss View File

@@ -1,17 +1,17 @@
1 1
 .container {
2
-  position: absolute;
3
-  top: 0;
4
-  left: 0;
5
-  right: 0;
6
-  bottom: 0;
7 2
   display: flex;
3
+  height: 100%;
8 4
   flex-direction: column;
5
+  overflow: hidden;
6
+box-sizing: border-box;
9 7
 }
10 8
 
11 9
 .map {
12 10
   width: 100%;
11
+  min-height: 700rpx;
12
+  box-sizing: border-box;
13 13
   
14
-}
14
+} 
15 15
 
16 16
 .bottom-panel {
17 17
   /* position: absolute;
@@ -19,10 +19,11 @@
19 19
   left: 0;
20 20
   right: 0; */
21 21
   width: 100%;
22
-  height: 660rpx;
22
+  /* height: 660rpx; */
23 23
   overflow: hidden;
24 24
   overflow: auto;
25 25
   padding: 16rpx;
26
+  padding-top: 0rpx;
26 27
   box-sizing: border-box;
27 28
   
28 29
 }
@@ -132,13 +133,22 @@ width: 50%;
132 133
   font-size: 32rpx;
133 134
   font-weight: bold;
134 135
 }
135
-
136 136
 .driver-car {
137 137
   font-size: 28rpx;
138
-  color: #666;
138
+  color: #ccc;
139
+  margin-top: 8rpx;
140
+}
141
+.driver-car1 {
142
+  font-size: 28rpx;
143
+  color: #00C775;
139 144
   margin-top: 8rpx;
140 145
 }
146
+.driver-car2 {
147
+  font-size: 28rpx;
148
+  color: #EA6E38;
141 149
 
150
+  margin-top: 8rpx;
151
+}
142 152
 .driver-arrive {
143 153
   font-size: 28rpx;
144 154
   color: #2C85FF;
@@ -161,17 +171,25 @@ width: 50%;
161 171
 }
162 172
 
163 173
 .cars-nearby {
164
-  position: absolute;
165
-  top: 104rpx;
166
-  left: 24rpx;
167
-  background-color: rgba(255, 255, 255, 0.9);
168
-  border-radius: 32rpx;
174
+  position: fixed;
175
+  top: 620rpx;
176
+  left: 10rpx;
177
+  background-color: rgba(255, 255, 255, 1);
178
+  border-radius: 16rpx;
169 179
   padding: 12rpx 20rpx;
170 180
   display: flex;
181
+  /* flex-direction: column; */
171 182
   align-items: center;
172 183
   box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
173
-}
184
+  box-sizing: border-box;
174 185
 
186
+}
187
+.positioning{
188
+  position: fixed;
189
+  top: 630rpx;
190
+  right: 40rpx;
191
+  
192
+}
175 193
 .cars-icon {
176 194
   color: #2C85FF;
177 195
   margin-right: 12rpx;
@@ -192,15 +210,41 @@ width: 50%;
192 210
   align-items: center;
193 211
   justify-content: center;
194 212
 }
195
-.positioning{
196
-  position: fixed;
197
-  /* top: 740rpx; */
198
-  right: 40rpx;
199
-  
200
-}
213
+
201 214
 .available{
202 215
   display: flex;
203 216
    justify-content: center;
204 217
    align-items: center;
205 218
    margin-top: 100rpx;
206
-  }
219
+  }
220
+  .carousel{
221
+    width: 100%;
222
+    height: 300rpx;
223
+    /* background-color: #222222; */
224
+padding: 20rpx;
225
+padding-bottom: 0rpx;
226
+border-radius:16rpx;
227
+box-sizing: border-box;
228
+  }
229
+  .swiper_img{
230
+    width: 100%;
231
+    height: 380rpx;
232
+    border-radius:16rpx;
233
+    overflow: hidden;
234
+  }
235
+  .swiper-item{
236
+    width: 100%;
237
+    height: 100%;
238
+    display: flex;
239
+    align-items: center;
240
+    justify-content: center;
241
+    color: #222222;
242
+border-radius:16rpx;
243
+
244
+    background-color: #00C775;
245
+  } 
246
+/*   */
247
+.nearby_icon{
248
+width: 44rpx;
249
+height: 44rpx;
250
+}

+ 43
- 4
pages/setup/index.js View File

@@ -20,7 +20,9 @@ accountInfo:'',
20 20
 user:'',
21 21
 station:wx.getStorageSync('station'),
22 22
 showMultiTextAndTitle:false,
23
-inputValue: '' // 初始值
23
+inputValue: '', // 初始值
24
+passwordtype:true,
25
+accountdata:''
24 26
   },
25 27
   onstation(){
26 28
     wx.navigateTo({
@@ -60,12 +62,17 @@ inputValue: '' // 初始值
60 62
   toconfigure(e){
61 63
     console.log(e.currentTarget.dataset.name);
62 64
     if (e.currentTarget.dataset.name=="userlist") {
63
-      // 历史订
65
+      // 分配工
64 66
       wx.navigateTo({
65 67
         url: '/package-user/pages/userlist/index',
66 68
       });
69
+    }else if (e.currentTarget.dataset.name=="balance"){
70
+      // 我的钱包
71
+      wx.navigateTo({
72
+        url: '/pages/balance/index',
73
+      });
67 74
     }else if (e.currentTarget.dataset.name=="driver"){
68
-      // 订单发票
75
+      // 单发票
69 76
       wx.navigateTo({
70 77
         url: '/package-user/pages/driver/index',
71 78
       });
@@ -73,6 +80,11 @@ inputValue: '' // 初始值
73 80
       wx.navigateTo({
74 81
         url: '/package-order/pages/address/index',
75 82
       });
83
+    }else if (e.currentTarget.dataset.name=="order"){
84
+      // 我的工单
85
+      wx.navigateTo({
86
+        url: '/package-order/pages/order/index',
87
+      });
76 88
     }else{
77 89
       wx.showToast({
78 90
         title: '暂未开放',
@@ -81,6 +93,12 @@ inputValue: '' // 初始值
81 93
     }
82 94
   
83 95
   },
96
+  // 充放电统计
97
+  onelectricity(){
98
+    wx.navigateTo({
99
+      url: '/package-setup/pages/electricity/index',
100
+    });
101
+  },
84 102
   /**
85 103
    * 生命周期函数--监听页面加载
86 104
    */
@@ -94,9 +112,30 @@ inputValue: '' // 初始值
94 112
   } catch (e) {
95 113
     console.error("获取小程序版本号失败:", e);
96 114
   }
97
-     
115
+     this.account()
98 116
   },
117
+  account(){
118
+    let data ={
99 119
 
120
+    }
121
+    api.request(`/SysBalance/selectbalance`, 'post',data,{ isPublic: false })
122
+    .then((data) => {
123
+      
124
+      this.setData({
125
+        accountdata:data.data
126
+      })
127
+ console.log(data);
128
+    })
129
+    .catch((err) => {
130
+   
131
+      console.error('请求失败:', err);
132
+    });
133
+  },
134
+  onpassword(){
135
+     this.setData({
136
+      passwordtype:!this.data.passwordtype
137
+     })
138
+  },
100 139
  
101 140
    onuser(){
102 141
     wx.showToast({

+ 170
- 13
pages/setup/index.wxml View File

@@ -6,50 +6,207 @@
6 6
 <view class="user_name">
7 7
 <view class="user_name1">{{user.operationName||'微信用户'}}
8 8
 <view class="user_role" wx:if="{{user.operationRole==4}}">司机</view>
9
-<view class="user_role" wx:if="{{user.operationRole==5}}">客户</view>
9
+<view class="user_role" wx:if="{{user.operationRole==5}}">绿电业主</view>
10
+<view class="user_role" wx:if="{{user.operationRole==6}}">用电业主</view>
10 11
 </view>
11 12
 <view class="user_name2">{{user.operationPhone}}</view>
12 13
 </view>
13 14
 </view>
14 15
 <view style="width: 100%;height:40rpx"></view>
15
-<!--  
16
-  
16
+<!--
17
+    
17 18
  -->
18 19
 <view class="allocation_box">
20
+  <view class="allocation">
21
+<view class="allocation_3_password">我的账户<image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_1.png" wx:if="{{passwordtype}}" bind:tap="onpassword" mode=""/>
22
+    <image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_2.png" wx:else bind:tap="onpassword" mode=""/></view>
23
+<view class="allocation_1" data-name="balance" bind:tap="toconfigure">
24
+<view class="allocation_2"></view>
25
+<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
26
+</view>
27
+</view>
28
+<view class="allocation" data-name="balance" bind:tap="toconfigure">
29
+<view>
30
+<text wx:if="{{!passwordtype}}">¥</text>
31
+<text style="font-size: 26px;" wx:if="{{passwordtype}}">∗∗∗∗</text>
32
+<text style="font-size: 26px;" wx:else>{{accountdata.balance}}</text>
33
+</view>
34
+</view>
35
+<view class="allocation_money">
36
+<view class="allocation_3_money">日/<text wx:if="{{user.operationRole==5}}">收入</text><text wx:if="{{user.operationRole==6}}">支出</text></view>
37
+<view class="allocation_3_money">月/<text wx:if="{{user.operationRole==5}}">收入</text><text wx:if="{{user.operationRole==6}}">支出</text></view>
38
+ 
39
+<view class="allocation_3_money" style="color: #222;">年/<text wx:if="{{user.operationRole==5}}">收入</text><text wx:if="{{user.operationRole==6}}">支出</text></view>
40
+ 
41
+</view>
42
+<view class="allocation_money" style="margin-bottom: 10rpx;">
43
+<view class="allocation_3_money">
44
+ <text wx:if="{{passwordtype}}">∗∗∗∗</text> 
45
+ <text wx:else>¥{{accountdata.zhouspent}}</text> 
46
+</view>
47
+<view class="allocation_3_money">
48
+<text wx:if="{{passwordtype}}">∗∗∗∗</text> 
49
+ <text wx:else>¥{{accountdata.weeklyconsumption}}</text> 
50
+</view>
51
+<view class="allocation_1">
52
+<view class="allocation_3_money" style="color: #222;">
53
+<text wx:if="{{passwordtype}}">∗∗∗∗</text> 
54
+ <text wx:else>¥{{accountdata.annualconsumption}}</text> 
55
+</view>
56
+</view>
57
+</view>
58
+</view>
59
+<view class="allocation_box_more">
60
+<view class="allocation_box_allocate" wx:if="{{user.operationRole==5||user.operationRole==6}}">
61
+<view class="allocation_allocate" data-name="userlist" bind:tap="toconfigure">
62
+ <view class="allocation_allocateimg">
63
+<t-icon name="assignment" size="50rpx" data-name="assignment" color="#07c160"/>
64
+  
65
+ </view>
66
+ <view class="allocation_name">分配工单</view>
67
+</view>
68
+<!-- <view class="allocation_allocate" data-name="order" bind:tap="toconfigure">
69
+ <view class="allocation_allocateimg">
70
+<t-icon name="file-code-1" size="50rpx" data-name="file-code-1" color="#07c160"/>
71
+  
72
+ </view>
73
+ <view class="allocation_name">历史工单</view>
74
+</view> -->
75
+<view class="allocation_allocate" data-name="driver" bind:tap="toconfigure">
76
+ <view class="allocation_allocateimg">
77
+<t-icon name="bill" size="50rpx" data-name="bill" color="#07c160"/>
78
+  
79
+ </view>
80
+ <view class="allocation_name">工单发票</view>
81
+</view>
82
+<view class="allocation_allocate" data-name="address" bind:tap="toconfigure">
83
+ <view class="allocation_allocateimg">
84
+<t-icon name="task-location" size="50rpx" data-name="task-location" color="#07c160"/>
85
+  
86
+ </view>
87
+ <view class="allocation_name">地址</view>
88
+</view>
89
+<view class="allocation_allocate">
90
+ <view class="allocation_allocateimg">
91
+<t-icon name="file-setting" size="50rpx" data-name="file-setting" color="#07c160"/>
92
+  
93
+ </view>
94
+ <view class="allocation_name">版本</view>
95
+</view>
96
+
97
+</view>
98
+<view class="allocation_box_allocate" wx:if="{{user.operationRole==5||user.operationRole==6}}">
99
+  <view class="allocation_allocate" bind:tap="onelectricity">
100
+ <view class="allocation_allocateimg">
101
+<t-icon name="file-setting" size="50rpx" data-name="file-setting" color="#07c160"/>
102
+  
103
+ </view>
104
+ <view class="allocation_name" wx:if="{{user.operationRole==5}}">充电统计</view>
105
+ <view class="allocation_name" wx:if="{{user.operationRole==6}}">放电统计</view>
106
+</view>
107
+<view class="allocation_allocate">
108
+ <view class="allocation_allocateimg">
109
+<t-icon name="service" size="50rpx" data-name="service" color="#07c160"/>
110
+  
111
+ </view>
112
+ <!-- <view class="allocation_name">联系客服</view> -->
113
+ <button class="contact-button" open-type="contact" plain>
114
+<view style="font-size: 26rpx;">联系客服</view>
115
+</button>
116
+</view>
117
+<view class="allocation_allocate" bind:tap="onsetup">
118
+ <view class="allocation_allocateimg">
119
+<t-icon name="setting-1" size="50rpx" data-name="setting-1" color="#07c160"/>
120
+  
121
+ </view>
122
+ <view class="allocation_name">设置</view>
123
+</view>
124
+<!-- <view class="allocation_allocate"> -->
125
+ <!-- <view class="allocation_allocateimg">
126
+<t-icon name="task-location" size="50rpx" data-name="task-location" color="#07c160"/>
127
+  
128
+ </view>
129
+ <view class="allocation_name"></view> -->
130
+<!-- </view> -->
131
+<view class="allocation_allocate">
132
+
133
+</view>
134
+</view>
135
+<view class="allocation_box_allocate" wx:if="{{user.operationRole==4}}">
136
+<view class="allocation_allocate" data-name="address" bind:tap="toconfigure">
137
+ <view class="allocation_allocateimg">
138
+<t-icon name="task-location" size="50rpx" data-name="task-location" color="#07c160"/>
139
+  
140
+ </view>
141
+ <view class="allocation_name">地址</view>
142
+</view>
143
+<view class="allocation_allocate">
144
+ <view class="allocation_allocateimg">
145
+<t-icon name="file-setting" size="50rpx" data-name="file-setting" color="#07c160"/>
146
+  
147
+ </view>
148
+ <view class="allocation_name">版本</view>
149
+</view>
150
+<view class="allocation_allocate">
151
+ <view class="allocation_allocateimg">
152
+<t-icon name="service" size="50rpx" data-name="service" color="#07c160"/>
153
+  
154
+ </view>
155
+ <!-- <view class="allocation_name">联系客服</view> -->
156
+ <button class="contact-button" open-type="contact" plain>
157
+<view style="font-size: 26rpx;">联系客服</view>
158
+</button>
159
+</view>
160
+<view class="allocation_allocate" bind:tap="onsetup">
161
+ <view class="allocation_allocateimg">
162
+<t-icon name="setting-1" size="50rpx" data-name="setting-1" color="#07c160"/>
163
+  
164
+ </view>
165
+ <view class="allocation_name">设置</view>
166
+</view>
167
+</view>
168
+</view>
169
+
170
+<!-- <view class="allocation_box">
19 171
 
20 172
 <view class="allocation" data-name="userlist" bind:tap="toconfigure">
21
-<view class="allocation_3">分配订单</view>
173
+<view class="allocation_3">分配工单</view>
174
+<view class="allocation_1">
175
+<view class="allocation_2"></view>
176
+<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
177
+</view>
178
+</view>
179
+<view class="allocation" data-name="order" bind:tap="toconfigure">
180
+<view class="allocation_3">我的工单</view>
22 181
 <view class="allocation_1">
23 182
 <view class="allocation_2"></view>
24 183
 <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
25 184
 </view>
26 185
 </view>
27 186
 <view class="allocation" data-name="driver" bind:tap="toconfigure">
28
-<view class="allocation_3">订单发票</view>
187
+<view class="allocation_3">单发票</view>
29 188
 <view class="allocation_1">
30 189
 <view class="allocation_2"></view>
31 190
 <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
32 191
 </view>
33 192
 </view>
34
-<view wx:if="{{user.operationRole==5}}" class="allocation" data-name="address" bind:tap="toconfigure">
193
+<view wx:if="{{user.operationRole==5||user.operationRole==6}}" class="allocation" data-name="address" bind:tap="toconfigure">
35 194
 <view class="allocation_3">地址</view>
36 195
 <view class="allocation_1">
37 196
 <view class="allocation_2"></view>
38 197
 <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
39 198
 </view>
40 199
 </view>
41
-</view>
200
+</view> -->
42 201
 
43
-<view class="allocation_box">
202
+<!-- <view class="allocation_box">
44 203
  
45 204
 <view class="allocation">
46 205
 <view class="allocation_3">小程序版本</view>
47 206
 <view class="allocation_1">
48 207
 <view class="allocation_2" wx:if="{{accountInfo!=''}}">V {{accountInfo}}</view>
49 208
 <view class="allocation_2" wx:else>V 1.0.0</view>
50
-<!--
51
-  <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
52
--->
209
+ 
53 210
 </view>
54 211
 </view>
55 212
 <view class="allocation">
@@ -70,8 +227,8 @@
70 227
 <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
71 228
 </view>
72 229
 </view>
230
+</view> -->
73 231
 </view>
74
-</view>
75
-<!---->
232
+ 
76 233
 
77 234
  

+ 83
- 2
pages/setup/index.wxss View File

@@ -42,7 +42,7 @@ align-items: center;
42 42
   align-items: center;
43 43
   justify-content: center;
44 44
   color: #ffffff;
45
-  background-color: #84b9e8;
45
+  background-color: #07c160;
46 46
   margin-left: 10rpx;
47 47
 }
48 48
 .user_name2{
@@ -132,6 +132,17 @@ width: 100%;
132 132
   padding: 0rpx 20rpx;
133 133
   box-sizing: border-box;
134 134
  }
135
+ .allocation_money{
136
+  width: 100%;
137
+display: flex;
138
+align-items: center;
139
+justify-content:space-between;
140
+padding: 0rpx 40rpx;
141
+margin-top: 20rpx;
142
+overflow: hidden;
143
+box-sizing: border-box;
144
+
145
+}
135 146
  .allocation{
136 147
    width: 100%;
137 148
    height: 80rpx;
@@ -149,11 +160,13 @@ box-sizing: border-box;
149 160
    align-items: center;
150 161
  }
151 162
  .allocation_box{
163
+   width: 100%;
164
+   height: 300rpx;
152 165
   border-radius: 16rpx;
153 166
   background-color: #ffffff;
154 167
    padding: 10rpx 0rpx;
155 168
    box-sizing: border-box;
156
-   margin-top: 30rpx;
169
+   margin-top: 20rpx;
157 170
   box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
158 171
 
159 172
 
@@ -162,9 +175,21 @@ box-sizing: border-box;
162 175
    color: #999999;
163 176
    
164 177
  }
178
+ .allocation_3_money{
179
+   width: 160rpx;
180
+   display: flex;
181
+   justify-content: center;
182
+ }
183
+ .allocation_2_money{
184
+  width: 100rpx;
185
+ }
165 186
  .allocation_3{
166 187
    font-size: 14px;
167 188
  }
189
+ .allocation_3_password{
190
+  display: flex;
191
+  align-items: center;
192
+ }
168 193
  .content-container{
169 194
 margin-top: 40rpx;
170 195
 display: flex;
@@ -235,4 +260,60 @@ button{
235 260
   width: 100%;
236 261
   border: none !important;
237 262
   display: flex;
263
+}
264
+.login_imgae{
265
+  width: 40rpx;
266
+  height: 30rpx;
267
+  margin-left: 20rpx;
268
+}
269
+
270
+.allocation_allocate{
271
+  width: 140rpx;
272
+  height: 180rpx;
273
+  padding: 12rpx;
274
+  color: #222222;
275
+  display: flex;
276
+  flex-direction: column;
277
+  align-items: center;
278
+  border-radius: 10rpx;
279
+  /* background-color: #cccccc; */
280
+  box-sizing: border-box;
281
+
282
+}
283
+.allocation_allocateimg{
284
+  width: 100rpx;
285
+  height: 100rpx;
286
+  border-radius: 10rpx;
287
+  background-color: #07c160;
288
+  box-sizing: border-box;
289
+background: rgba(7, 193, 96, 0.1);
290
+display: flex;
291
+align-items: center;
292
+justify-content: center;
293
+}
294
+.allocation_box_more{
295
+  display: flex;
296
+  flex-direction: column;
297
+  padding:10rpx;
298
+  margin-top: 30rpx;
299
+  border-radius: 16rpx;
300
+  background-color: #ffffff;
301
+   box-sizing: border-box;
302
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
303
+}
304
+.allocation_box_allocate{
305
+  width: 100%;
306
+
307
+  display: flex;
308
+  align-items: center;
309
+  justify-content: space-between;
310
+ 
311
+}
312
+.allocation_name{
313
+   width: 100%;
314
+   height: 60rpx;
315
+   font-size: 26rpx;
316
+   display: flex;
317
+   align-items: center;
318
+   justify-content: center;
238 319
 }

+ 112
- 10
pages/tool/index.js View File

@@ -5,7 +5,11 @@ Page({
5 5
     tabsindex:"",
6 6
     driverlist:[],
7 7
     selected:1,
8
-    userdata:[]
8
+    userdata:[],
9
+    pageNum: 1, // 当前页码
10
+    pageSize: 10, // 每页条数
11
+    loading: false, // 加载中状态(防止重复请求)
12
+    noMoreData: false, // 是否无更多数据
9 13
   },
10 14
   onLoad() {
11 15
     // this.getdriver()
@@ -28,7 +32,7 @@ wx.$on('wsMessage', this.toolWsMessage);
28 32
     console.log('Other Page 收到 WebSocket 消息:', message);
29 33
  
30 34
     // 根据消息类型进行不同的处
31
-    switch (message.api) {
35
+     switch (message.api) {
32 36
       case '/sysworkorder/selectworkorderlist':
33 37
         // 在这里可以更新地图、刷新UI等
34 38
         if (message.type==1) {
@@ -58,31 +62,109 @@ this.setData({
58 62
 this.getdriver()
59 63
   },
60 64
   getdriver(){
61
-    let data ={
65
+      // 设置加载中状态
66
+      this.setData({ loading: true });
67
+      let data ={
68
+     
69
+      }
70
+    if (this.data.userdata.operationRole==4) {
71
+      data ={
72
+        workorderId:'',
73
+        workorderName:'',
74
+        addressId:'',
75
+        driverId:'',
76
+        carId:'',
77
+        customerId:'',
78
+        settlementType:'',
79
+        workorderType:this.data.tabsindex,
80
+        chargedischargeType:this.data.selected,
81
+        pageNum: this.data.pageNum,
82
+        pageSize: this.data.pageSize,
83
+      }
84
+    }else if(this.data.userdata.operationRole==5){
85
+    data ={
62 86
       workorderId:'',
63 87
       workorderName:'',
64 88
       addressId:'',
65 89
       driverId:'',
66 90
       carId:'',
67 91
       customerId:'',
92
+      settlementType:'',
68 93
       workorderType:this.data.tabsindex,
69
-      chargedischargeType:this.data.selected,
94
+      chargedischargeType:1,
95
+      pageNum: this.data.pageNum,
96
+      pageSize: this.data.pageSize,
70 97
     }
98
+    }else if(this.data.userdata.operationRole==6){
99
+      data ={
100
+        workorderId:'',
101
+        workorderName:'',
102
+        addressId:'',
103
+        driverId:'',
104
+        carId:'',
105
+        customerId:'',
106
+        settlementType:'',
107
+        workorderType:this.data.tabsindex,
108
+        chargedischargeType:2,
109
+        pageNum: this.data.pageNum,
110
+        pageSize: this.data.pageSize,
111
+      }
112
+    }
113
+    if((this.data.userdata.operationRole==6||this.data.userdata.operationRole==5)&&this.data.selected==2){
114
+      data ={
115
+        workorderId:'',
116
+        workorderName:'',
117
+        addressId:'',
118
+        driverId:'',
119
+        carId:'',
120
+        customerId:'',
121
+        settlementType:this.data.tabsindex,
122
+        workorderType:3,
123
+        chargedischargeType:this.data.userdata.operationRole==5?1:2,
124
+        pageNum: this.data.pageNum,
125
+        pageSize: this.data.pageSize,
126
+      }
127
+    
128
+    }
129
+   
71 130
 
72 131
     api.request(`/sysworkorder/selectworkorderlist`, 'post',data,{ isPublic: false })
73
-    .then((data) => {
74
-  console.log(data.data);
75
-  if (data.code==200) {
132
+    .then((res) => {
133
+  console.log(res.data);
134
+  if (res.code==200) {
135
+    const data = res.data.list; //data(当前页数据)
136
+    const total = res.data.total; // total(总条数)
137
+        console.log(data);
138
+    // 拼接新数据
139
+    const newList = this.data.pageNum === 1 ? data : [...this.data.driverlist, ...data];
140
+    console.log(newList);
141
+    // 判断是否有更多数据
142
+    const noMoreData = newList.length >= total;
143
+    // const noMoreData = false;
144
+
76 145
     this.setData({
77
-      driverlist:data.data
78
-    })
146
+      driverlist: newList,
147
+      noMoreData:noMoreData,
148
+    });
149
+        // 无论成功失败,结束加载状态
150
+        this.setData({ loading: false });
151
+    // this.setData({
152
+    //   driverlist:data.data
153
+    // })
79 154
   }
80 155
   //  wx.navigateTo({
81 156
   //   url: '/pages/map/index',
82 157
   // })
83 158
     })
84 159
     .catch((err) => {
85
-
160
+      wx.showToast({
161
+        title: '加载失败',
162
+        icon: 'none',
163
+      });
164
+      // 失败时页码回退(避免下次触底页码错误)
165
+      this.setData({ pageNum: this.data.pageNum - 1 });
166
+          // 无论成功失败,结束加载状态
167
+          this.setData({ loading: false });
86 168
       console.error('请求失败:', err);
87 169
     });
88 170
   },
@@ -106,9 +188,29 @@ this.getdriver()
106 188
   onShow() {
107 189
     this.getdriver()
108 190
   },
191
+  
109 192
    /**
110 193
    * 页面相关事件处理函数--监听用户下拉动作
111 194
    */
112 195
    onPullDownRefresh() {
196
+    this.getdriver()
197
+
198
+    console.log('监听用户下拉动作');
199
+  },
200
+    /**
201
+   * 监听页面触底事件
202
+   */
203
+  onReachBottom() {
204
+ 
205
+    console.log(this.data.loading);
206
+    console.log(this.data.noMoreData);
207
+    // 防止重复加载(加载中/无更多数据时不触发)
208
+    if (this.data.loading || this.data.noMoreData) return;
209
+    // 页码+1
210
+    this.setData({ pageNum: this.data.pageNum + 1 });
211
+    // 加载下一页数据
212
+this.getdriver()
213
+
113 214
   }
114 215
 });
216
+// 

+ 2
- 1
pages/tool/index.json View File

@@ -1,8 +1,9 @@
1 1
 {
2 2
   "navigationBarBackgroundColor": "#fff",
3 3
   "enablePullDownRefresh": true,
4
-  "navigationBarTitleText": "单",
4
+  "navigationBarTitleText": "单",
5 5
   "navigationStyle": "custom",
6
+  "onReachBottomDistance": 50,
6 7
   "usingComponents": {
7 8
     "t-side-bar": "tdesign-miniprogram/side-bar/side-bar",
8 9
     "t-side-bar-item": "tdesign-miniprogram/side-bar-item/side-bar-item",

+ 35
- 16
pages/tool/index.wxml View File

@@ -1,29 +1,46 @@
1
-<!-- <image class="calculation" src="https://esos-iot.bjdexn.cn/myminio/project/a6546181416e4ca5a266b3b5ce31c335.jpg" mode="widthFix"/> -->
1
+<!-- <image class="calculation" src="https://esos-iot.com/myminio/project/a6546181416e4ca5a266b3b5ce31c335.jpg" mode="widthFix"/> -->
2 2
 
3 3
 <!-- <view class="side-bar-wrapper" style="height: calc(100vh - {{navbarHeight}}px)">
4 4
 </view> -->
5 5
 
6 6
 <view class="workorder">
7
-  <view class="discharge">
8
-<view class="discharge_cheng {{selected==1?'selected':''}}" data-index="1" bind:tap="onselected">充电</view>
9
-<view class="discharge_fang {{selected==2?'selected':''}}" data-index="2" bind:tap="onselected">放电</view>
7
+  <view class="discharge" wx:if="{{userdata.operationRole==5}}">
8
+    <view class="discharge_cheng {{selected==1?'selected':''}}" data-index="1" bind:tap="onselected">工单</view>
9
+<view class="discharge_fang {{selected==2?'selected':''}}" data-index="2" bind:tap="onselected">结算</view>
10
+</view>
11
+<view class="discharge" wx:if="{{userdata.operationRole==6}}">
12
+    <view class="discharge_cheng {{selected==1?'selected':''}}" data-index="1" bind:tap="onselected">工单</view>
13
+<view class="discharge_fang {{selected==2?'selected':''}}" data-index="2" bind:tap="onselected">结算</view>
14
+</view>
15
+<view class="discharge" wx:if="{{userdata.operationRole==4}}">
16
+<view class="discharge_cheng {{selected==1?'selected':''}}" data-index="1" bind:tap="onselected">充电工单</view>
17
+<view class="discharge_fang {{selected==2?'selected':''}}" data-index="2" bind:tap="onselected">放电工单</view>
10 18
 </view>
11 19
 <view class="discharge_tabs" wx:if="{{userdata.operationRole==4}}">
12 20
   <t-tabs value="{{tabsindex}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
13 21
     <t-tab-panel label="全部" value="" />
14 22
   <t-tab-panel label="服务中" value="2" />
15 23
   <t-tab-panel label="已完成" value="3" />
16
-  <t-tab-panel label="取消" value="4" />
24
+  <t-tab-panel label="取消工单" value="5" />
17 25
     <!-- <t-tab-panel label="审核" value="1" /> -->
18 26
 </t-tabs>
19 27
 </view>
20
-<view class="discharge_tabs" wx:if="{{userdata.operationRole==5}}">
28
+<view class="discharge_tabs" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&selected==1}}">
21 29
   <t-tabs value="{{tabsindex}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
22 30
     <t-tab-panel label="全部" value="" />
23 31
     <t-tab-panel label="工作中" value="2" />
24 32
   <t-tab-panel label="已完成" value="3" />
25
-  <t-tab-panel label="取消" value="4" />
26
-<!--  -->
33
+  <t-tab-panel label="取消工单" value="5" />
34
+ 
35
+</t-tabs>
36
+</view>
37
+<view class="discharge_tabs" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&selected==2}}">
38
+  <t-tabs value="{{tabsindex}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
39
+    <t-tab-panel label="全部" value="" />
40
+    <t-tab-panel label="待结算" value="0" />
41
+  <t-tab-panel label="已结算" value="1" />
42
+  <t-tab-panel label="取消结算" value="2" />
43
+ 
27 44
 </t-tabs>
28 45
 </view>
29 46
 <!-- <view bind:tap="onfilter">
@@ -34,22 +51,24 @@
34 51
 <view class="order">
35 52
 <view class="order_box" wx:for="{{driverlist}}" wx:key="workorderId" data-id="{{item.workorderId}}" bind:tap="details">
36 53
 <view class="order_title">
37
-<view class="order_title1"> <image class="order_image" src="https://esos-iot.bjdexn.cn/myminio/project/458bb7eea14f42cc958eebf0a8b89da3.png" mode="aspectFit"/>
54
+<view class="order_title1"> <image class="order_image" src="https://esos-iot.com/myminio/project/458bb7eea14f42cc958eebf0a8b89da3.png" mode="aspectFit"/>
38 55
 <!-- <text>{{item.carName}}</text> -->
39 56
 <text wx:if="{{item.chargedischargeType==1}}">光伏</text>
40 57
 <text wx:if="{{item.chargedischargeType==2}}">风电</text>
41 58
 <text wx:if="{{item.chargedischargeType==3}}">网电</text>
42 59
 </view> 
43
-<!-- <view class="order_title1"> <image class="order_image" src="https://esos-iot.bjdexn.cn/myminio/proje  ct/94f976d5afce444a8861b59681069218.png" mode="aspectFit"/> 浙C.78Z71</view> -->
60
+<!-- <view class="order_title1"> <image class="order_image" src="https://esos-iot.com/myminio/proje  ct/94f976d5afce444a8861b59681069218.png" mode="aspectFit"/> 浙C.78Z71</view> -->
44 61
 <view wx:if="{{item.workorderType==0}}">待处理</view>
45 62
 <view wx:if="{{item.workorderType==1}}">待出发</view>
46 63
 <view wx:if="{{item.workorderType==2}}">行驶中</view>
47 64
 <view wx:if="{{item.workorderType==3}}">到达地点</view>
48 65
 <view wx:if="{{item.workorderType==4}}">工作中</view>
49 66
 <!-- <view wx:if="{{item.workorderType==5}}">完成工作</view> -->
50
-<view wx:if="{{item.workorderType==5&&item.workorderExaminetye==0}}">待审核</view>
51
-<view wx:if="{{item.workorderType==5&&item.workorderExaminetye==1}}">审核成功</view>
52
-<view wx:if="{{item.workorderType==5&&item.workorderExaminetye==2}}">审核失败</view>
67
+<view wx:if="{{item.workorderType==6}}">取消工单</view>
68
+
69
+<view wx:if="{{item.workorderType==5&&item.settlementType==0}}">待结算</view>
70
+<view wx:if="{{item.workorderType==5&&item.settlementType==1}}">结算成功</view>
71
+<view wx:if="{{item.workorderType==5&&item.settlementType==2}}">结算失败</view>
53 72
 </view>
54 73
 <view class="order_direction"><text class="order_text">方向:</text>
55 74
 <text style="color: #FDBA67;" wx:if="{{item.chargedischargeType==2}}">放电</text>
@@ -65,9 +84,9 @@
65 84
 </view>
66 85
 </view>
67 86
 <view class="available" wx:if="{{driverlist.length<1}}">
68
-<image src="https://esos-iot.bjdexn.cn/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
87
+<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
69 88
 </view> 
70 89
 <view style="height: 30rpx;"></view>
71 90
 <!--
72
-    
73
---> 
91
+  
92
+ --> 

+ 15
- 4
pages/tool/index.wxss View File

@@ -176,7 +176,17 @@ display: flex;
176 176
  border: 1rpx solid #EA6E38;
177 177
  border-right: 0rpx solid #EA6E38;
178 178
 }
179
-
179
+.discharge_chengselected{
180
+  padding: 10rpx 40rpx;
181
+  background-color: #ffffff;
182
+  color: #EA6E38;
183
+  background-color: #EA6E38;
184
+  color: #ffffff;
185
+  border-radius: 10rpx;
186
+  border: 1rpx solid #EA6E38;
187
+  border-right: 0rpx solid #EA6E38;
188
+ }
189
+ 
180 190
 .discharge_fang{
181 191
   padding: 10rpx 40rpx;
182 192
  background-color: #ffffff;
@@ -192,6 +202,7 @@ color: #EA6E38;
192 202
   background-color: #EA6E38;
193 203
  color: #ffffff;
194 204
  }
195
-.discharge_tabs{
196
-  width: 100%;
197
-}
205
+.discharge_tabs{ 
206
+  width: 100%;   
207
+}                
208
+/*  */

+ 2
- 2
project.private.config.json View File

@@ -23,8 +23,8 @@
23 23
     "miniprogram": {
24 24
       "list": [
25 25
         {
26
-          "name": "package-map/pages/map/index",
27
-          "pathName": "package-map/pages/map/index",
26
+          "name": "package-order/pages/payment/index",
27
+          "pathName": "package-order/pages/payment/index",
28 28
           "query": "",
29 29
           "scene": null,
30 30
           "launchMode": "default"

+ 2044
- 0
utils/wxcharts.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save