Compare commits

..

162 Commits

Author SHA1 Message Date
5c0036acfd fix(other): bug修复
Some checks failed
CI Build & Upload (WeApp) / build-upload-dev (push) Failing after 2m31s
CI Build & Upload (WeApp) / build-upload-prod (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-reserve (push) Has been skipped
2026-01-10 21:30:50 +08:00
2c38893c43 fix(components): 修复搜索页样式错乱
Some checks failed
CI Build & Upload (WeApp) / build-upload-dev (push) Failing after 3m58s
CI Build & Upload (WeApp) / build-upload-prod (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-reserve (push) Has been skipped
2025-12-03 01:17:06 +08:00
a30d3572a5 feat(projects): 首页主备优化
All checks were successful
CI Build & Upload (WeApp) / build-upload-dev (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-prod (push) Successful in 6m43s
CI Build & Upload (WeApp) / build-upload-reserve (push) Successful in 2m25s
2025-12-02 23:57:04 +08:00
b6b6649a9b ci(other): ci脚本换源
All checks were successful
CI Build & Upload (WeApp) / build-upload-dev (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-prod (push) Successful in 4m55s
CI Build & Upload (WeApp) / build-upload-reserve (push) Successful in 2m34s
2025-11-05 11:56:16 +08:00
985c8fa766 release(other): 4.0.15
Some checks failed
CI Build & Upload (WeApp) / build-upload-prod (push) Has been cancelled
CI Build & Upload (WeApp) / build-upload-reserve (push) Has been cancelled
CI Build & Upload (WeApp) / build-upload-dev (push) Has been cancelled
2025-11-05 11:32:38 +08:00
ef380ff569 release(other): 4.0.14
Some checks failed
CI Build & Upload (WeApp) / build-upload-dev (push) Has been skipped
CI Build & Upload (WeApp) / build-upload-prod (push) Failing after 4m44s
CI Build & Upload (WeApp) / build-upload-reserve (push) Successful in 19m24s
2025-10-31 19:15:29 +08:00
63b61bbc98 ci(other): ci update 2025-10-31 19:13:49 +08:00
d831ee932b release: 临时紧急版本
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-29 12:39:01 +08:00
8b55419643 fix(依赖升级,bug 修复):
All checks were successful
continuous-integration/drone/push Build is passing
2025-09-13 16:26:39 +08:00
f567cf7c94 build(deps): 依赖升级 2025-09-13 03:26:33 +08:00
e1c00d6bb1 style(custom): ok
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-20 07:52:00 +08:00
9edcf67620 style(custom): add eslint rules
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-18 21:46:34 +08:00
8ca7001e3f feat(custom): 商家详情整改增加未登录引导弹窗
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-18 21:43:16 +08:00
6f5d722e6e refactor(custom): 登录页面增加显式返回键
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-16 23:17:57 +08:00
6ca3669950 refactor(custom): 地图服务商更换
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-16 17:51:31 +08:00
54b1d4b07c refactor(custom): 地图Key变更
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-29 16:00:15 +08:00
896acaef9e feat(custom): 地图apiKey更换,订单核销详情新增支付方式
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-29 15:45:16 +08:00
92d7bf1933 feat(custom): 订单核销新增最近核销
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-30 08:26:26 +08:00
9af020af37 ci(custom): update
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-18 16:17:30 +08:00
e7fc232ba7 ci(custom): update
Some checks failed
continuous-integration/drone/push Build is failing
2025-03-18 15:53:37 +08:00
2b2e8ae481 ci(custom): update
Some checks failed
continuous-integration/drone/push Build is failing
2025-03-18 15:52:08 +08:00
8ece6b24e8 refactor(custom): 核销弹窗更改
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2025-03-18 15:44:57 +08:00
b475228705 ci(custom): update
Some checks failed
continuous-integration/drone/push Build is failing
2025-02-13 16:42:06 +08:00
05caf08c47 build(deps): taro升级至4.0.9
Some checks reported errors
continuous-integration/drone/push Build was killed
2025-02-12 11:15:51 +08:00
7096e38967 release(custom): 4.0.7
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-06 17:07:17 +08:00
3926922925 mod(custom): 增加公告弹窗
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-30 19:59:00 +08:00
90f1764e7b refactor(custom): 暂时取消游戏进入限制
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-19 04:32:05 +08:00
52e49cca6c fix(projects): env
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-19 02:51:53 +08:00
72705cb101 feat(custom): 增加没有豆子不可进入游戏
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-18 22:56:23 +08:00
7eed620962 feat(custom): 游戏大厅合并
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-18 22:49:00 +08:00
a0e7966ee4 feat(custom): 新增商家订单管理筛选
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-21 17:32:26 +08:00
3489cabed1 Merge branch 'master' into dev
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-14 22:13:04 +08:00
b9a5993e27 feat(custom): 现金部分
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-14 22:12:14 +08:00
b2ac7f33f3 mod(custom): change
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-05 04:20:23 +08:00
4651318619 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-24 16:12:45 +08:00
8e119162f1 build(deps): update deps
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-24 16:02:44 +08:00
097029128c fix(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-23 20:43:11 +08:00
b5361277ca fix(custom): fix
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-14 01:34:36 +08:00
af34993f69 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-06 21:39:16 +08:00
94822f693a release(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-06 21:35:17 +08:00
2f31aa7b70 feat(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-05 20:17:16 +08:00
94b6a9da10 feat(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-05 16:41:26 +08:00
962d7a2b19 feat(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-03 22:17:38 +08:00
20d112246e Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-30 18:35:05 +08:00
d57f9cc53e refactor(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-30 18:34:18 +08:00
230cd88f4d style(styles): lf
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-30 13:24:21 +08:00
b95fb364df feat(components): \!
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-30 13:22:42 +08:00
1e7f5c3d71 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-27 18:29:33 +08:00
1d8532eccf feat(custom): 新增消息订阅
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-27 17:06:59 +08:00
e5041c3382 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-21 18:11:41 +08:00
f199320de0 refactor(custom): 后结收款增加加载动画
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-12 19:14:01 +08:00
9a57e2cc25 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-05 10:29:47 +08:00
f5dd812787 build(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-05 10:29:24 +08:00
6318b525a9 Merge branch 'dev'
Some checks failed
continuous-integration/drone/push Build is failing
2024-08-05 06:34:55 +08:00
749cd1a17e build(deps):
Some checks failed
continuous-integration/drone/push Build is failing
2024-08-05 06:34:29 +08:00
5db8a03723 Merge branch 'test'
Some checks failed
continuous-integration/drone/push Build is failing
2024-08-05 05:43:20 +08:00
a5703e5494 fix(custom): 修复登录成功不跳转的问题
Some checks failed
continuous-integration/drone/push Build is failing
2024-08-05 05:42:33 +08:00
6acb85d242 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-03 23:32:56 +08:00
d52bf0d1a5 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-03 23:32:39 +08:00
004a6e188a Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-03 23:20:08 +08:00
1e1af4e7da fix(custom): 修复二维码失效
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-03 23:19:37 +08:00
621dc85f1f Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-28 18:51:57 +08:00
ffa1c94bf7 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-28 18:51:32 +08:00
c1d1b949e4 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-28 10:48:03 +08:00
9ea8f419f4 feat(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-27 11:05:25 +08:00
18c6446e5e Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-20 18:47:35 +08:00
e55cc6c9e0 refactor(custom): 完善活动页细节
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-20 18:31:34 +08:00
b20930f516 fix(custom): 修正账户明细时间显示不完整
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-20 17:38:36 +08:00
5f8ed08d45 fix(custom): 修复带有切换项页面分页数据错乱的bug
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-19 17:59:29 +08:00
f443caa511 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-19 17:15:08 +08:00
728719f949 release(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-19 17:05:33 +08:00
c4645fdc17 feat(custom): 新增支付方式动态获取
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-18 19:18:21 +08:00
d1e5e92955 feat(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-18 17:05:51 +08:00
d3bb76a858 feat(custom): 新增若干营销功能
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-17 22:32:56 +08:00
243b414675 mod(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-15 16:15:14 +08:00
fbc5e694e2 build(deps): 依赖升级
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-14 03:12:09 +08:00
8bc22dcc97 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-29 11:25:13 +08:00
1566eae251 fix(custom): 修复若干bug
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-29 11:24:40 +08:00
45ad285ae9 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-06 21:13:13 +08:00
5c45854e2c fix(custom): 修复若干bug
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-06 21:12:44 +08:00
cf805f24ce Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-29 15:15:37 +08:00
f2af8198a9 release(custom): 4.0.0
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-29 15:14:47 +08:00
8f310cad8f Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-29 15:10:19 +08:00
a4451110dd release(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-29 15:09:45 +08:00
d163995765 release(custom): 4.0.0
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-29 12:31:44 +08:00
1bbaeb821d fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-28 19:26:23 +08:00
e6173319d9 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-27 17:48:20 +08:00
0816707bdd fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-25 10:28:32 +08:00
f67dc80a49 feat(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-23 18:12:19 +08:00
e796bdbc8a Merge remote-tracking branch 'origin/dev' into dev
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-20 20:01:39 +08:00
09840d72ed feat(custom): 2024-05-20 20:00:08 +08:00
4a186717d4 feat(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-20 19:59:36 +08:00
4245ae6c80 Merge branch 'dev' into test
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-20 18:18:58 +08:00
94a4b5e1df feat(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-20 18:18:16 +08:00
43ca8bd41a fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-17 18:10:02 +08:00
2db33b1889 Merge branch 'dev' into test
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-17 15:34:24 +08:00
1b1b724110 wip:
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-17 15:34:07 +08:00
2392a34d9a Merge branch 'dev' into test
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-16 16:37:17 +08:00
eb4dfc0887 wip:
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-16 16:36:46 +08:00
cd6078156e wip:
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-16 14:43:06 +08:00
4c33c1c648 Merge branch 'dev' into test
Some checks failed
continuous-integration/drone/push Build is failing
2024-05-16 14:41:08 +08:00
55de33461b wip:
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-16 14:40:55 +08:00
6bd7e2f62c Merge branch 'dev' into test
Some checks failed
continuous-integration/drone/push Build is failing
2024-05-16 14:38:44 +08:00
4f745c42f0 wip:
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-16 14:38:32 +08:00
bf64d6f9ef wip: 2024-05-16 14:38:07 +08:00
ff84bde907 Merge branch 'dev' into test
Some checks failed
continuous-integration/drone/push Build is failing
2024-05-16 14:35:27 +08:00
036819a0a7 wip:
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-16 14:32:53 +08:00
8f3b158032 wip: 4.0
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-16 14:27:57 +08:00
e6f68c5ee8 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-11 18:29:41 +08:00
33eccf0a24 fix(custom):
Some checks reported errors
continuous-integration/drone/push Build was killed
2024-05-11 18:29:04 +08:00
97c758e598 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-11 17:59:10 +08:00
c13705d96a fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-11 17:49:23 +08:00
b09c1d9537 release(custom): 3.1.0
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-10 11:16:50 +08:00
cee33dddd1 Merge branch 'master' into dev
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-04 17:13:29 +08:00
434ce9e4b5 build(custom): 优化若干细节,升级项目依赖
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-04 17:12:38 +08:00
4ed38eeca7 mod(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-01 19:12:23 +08:00
e30a3ca698 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-29 16:34:00 +08:00
c5dbcba1b1 release(custom): 3.0.17
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-29 15:35:17 +08:00
2819372cb9 feat(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-29 15:22:17 +08:00
dcbd0eaae5 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-25 19:20:24 +08:00
a02257408d feat(custom): 优化后结功能
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-25 18:41:33 +08:00
ab9aff44da Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-12 17:48:25 +08:00
7ed844cd86 release(custom): 3.0.15
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-12 17:48:01 +08:00
f3c359e4eb refactor(custom): 登录流程修改
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-12 17:43:19 +08:00
b85e360a17 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-11 16:17:37 +08:00
863660c8f4 fix(custom): 修复无法核销的bug
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-11 16:17:14 +08:00
edf1e49cce refactor(custom): 我的账户细微修改
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-01 14:31:30 +08:00
74ca20ca01 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-28 16:29:55 +08:00
65d6737902 fix(custom): 修复订单列表第三方支付商家bid重复的问题
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-22 17:16:20 +08:00
294a889199 refactor(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-21 20:44:29 +08:00
0ad2cf3505 fix(custom): 修复支付组件若干bug
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-21 17:02:06 +08:00
63733d0109 feat(custom): 新增聚合积分支付
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-20 15:53:52 +08:00
d9735b60f0 Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-15 17:12:37 +08:00
2646d025f4 refactor(utils): 增加全局提示忽略白名单
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-15 17:12:07 +08:00
aed8e6f73f Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-15 16:07:06 +08:00
aef52631e7 feat(custom): 新增用户协议
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-15 16:06:24 +08:00
5844762b25 refactor(custom): 调整后结点单首页背景图
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-09 20:28:02 +08:00
c84f2e63f5 fix(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-09 20:19:34 +08:00
1f969e59c7 fix(custom): 修复个人信息获取卡住的bug
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-09 18:04:07 +08:00
2174c91c4b fix(custom): 修复商家订单详情数据不显示的bug
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-08 22:21:59 +08:00
6b0c7d9887 ci(custom):
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-08 20:55:29 +08:00
5dcb7a5259 ci(custom):
Some checks failed
continuous-integration/drone/push Build is failing
2024-03-08 19:13:24 +08:00
46de69b98b fix(custom): 修复若干样式污染的问题 2024-03-07 20:16:08 +08:00
714b980b28 fix(custom): 修复若干问题 2024-03-07 18:55:38 +08:00
fbbdecf2e0 Merge branch 'dev' into test 2024-03-02 19:28:58 +08:00
72b5f91102 feat(custom): 新增后结订单 2024-03-02 19:27:20 +08:00
74ca4123eb Merge branch 'test' 2024-01-30 16:11:12 +08:00
45648d78ba Merge branch 'test' 2024-01-13 16:55:20 +08:00
7e86c01913 Merge branch 'test' 2023-12-21 21:11:38 +08:00
52ad54f6a9 Merge branch 'test' 2023-12-20 23:46:46 +08:00
52c0bb70e7 Merge branch 'test' 2023-12-20 18:56:57 +08:00
eb696252f2 Merge branch 'test' 2023-12-20 00:10:25 +08:00
b8b7f1faa8 Merge branch 'test' 2023-12-19 22:58:13 +08:00
7fdad4ed26 Merge branch 'test' 2023-12-15 20:52:45 +08:00
d3caef5172 Merge branch 'test' 2023-12-13 12:58:05 +08:00
b94c4110ea Merge branch 'test' 2023-12-04 22:29:20 +08:00
659d2fd972 Merge branch 'test' 2023-12-04 21:32:03 +08:00
b8ab7699e1 Merge branch 'test' 2023-12-03 21:15:30 +08:00
62f1f3454c Merge branch 'test' 2023-12-03 21:10:48 +08:00
878cc05673 Merge branch 'test' 2023-11-29 23:08:48 +08:00
6c25beff1d Merge branch 'test' 2023-11-29 15:38:59 +08:00
b01f4ff3a9 Merge branch 'test' into 'master'
增加库存显示

See merge request xinling/jdt-user!2
2023-10-29 16:05:02 +08:00
232 changed files with 10989 additions and 29503 deletions

8
.cursorignore Normal file
View File

@@ -0,0 +1,8 @@
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
/dist
/node_modules
/pnpm-store
/dist.tar
/dist.tar.gz
/dist.tar.gz.part

View File

@@ -1,40 +1,40 @@
module.exports = { module.exports = {
types: [ types: [
{ value: "feat", name: "feat: 新增功能" }, { value: 'feat', name: 'feat: 新增功能' },
{ value: "fix", name: "fix: 修复bug" }, { value: 'fix', name: 'fix: 修复bug' },
{ value: "docs", name: "docs: 文档变更" }, { value: 'docs', name: 'docs: 文档变更' },
{ {
value: "style", value: 'style',
name: "style: 代码格式(不影响功能,例如空格、分号等格式修正)", name: 'style: 代码格式(不影响功能,例如空格、分号等格式修正)',
}, },
{ {
value: "refactor", value: 'refactor',
name: "refactor: 代码重构(不包括 bug 修复、功能新增)", name: 'refactor: 代码重构(不包括 bug 修复、功能新增)',
}, },
{ value: "perf", name: "perf: 性能优化" }, { value: 'perf', name: 'perf: 性能优化' },
{ value: "test", name: "test: 添加、修改测试用例" }, { value: 'test', name: 'test: 添加、修改测试用例' },
{ {
value: "build", value: 'build',
name: "build: 构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)", name: 'build: 构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)',
}, },
{ value: "ci", name: "ci: 修改 CI 配置、脚本" }, { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
{ {
value: "chore", value: 'chore',
name: "chore: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)", name: 'chore: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)',
}, },
{ value: "revert", name: "revert: 回滚 commit" }, { value: 'revert', name: 'revert: 回滚 commit' },
{ value: "wip", name: "wip: 开发中" }, { value: 'wip', name: 'wip: 开发中' },
{ value: "mod", name: "mod: 不确定分类的修改" }, { value: 'mod', name: 'mod: 不确定分类的修改' },
{ value: "release", name: "release: 发布" }, { value: 'release', name: 'release: 发布' },
], ],
scopes: [ scopes: [
["custom", "自定义"], ['custom', '自定义'],
["projects", "项目搭建"], ['projects', '项目搭建'],
["components", "组件相关"], ['components', '组件相关'],
["utils", "utils 相关"], ['utils', 'utils 相关'],
["styles", "样式相关"], ['styles', '样式相关'],
["deps", "项目依赖"], ['deps', '项目依赖'],
["other", "其他修改"], ['other', '其他修改'],
].map(([value, description]) => { ].map(([value, description]) => {
return { return {
value, value,
@@ -42,16 +42,16 @@ module.exports = {
}; };
}), }),
messages: { messages: {
type: "确保本次提交遵循 Angular 规范!选择你要提交的类型:\n", type: '确保本次提交遵循 Angular 规范!选择你要提交的类型:\n',
scope: "选择一个 scope可选", scope: '选择一个 scope可选',
customScope: "请输入自定义的 scope", customScope: '请输入自定义的 scope',
subject: "填写简短精炼的变更描述:", subject: '填写简短精炼的变更描述:',
body: '填写更加详细的变更描述(可选)。使用 "|" 换行:', body: '填写更加详细的变更描述(可选)。使用 "|" 换行:',
breaking: "列举非兼容性重大的变更(可选):", breaking: '列举非兼容性重大的变更(可选):',
footer: "列举出所有变更的 Issues Closed可选。 例如: #31, #34", footer: '列举出所有变更的 Issues Closed可选。 例如: #31, #34',
confirmCommit: "确认提交?", confirmCommit: '确认提交?',
}, },
allowBreakingChanges: ["feat", "fix"], allowBreakingChanges: ['feat', 'fix'],
subjectLimit: 100, subjectLimit: 100,
breaklineChar: "|", breaklineChar: '|',
}; };

View File

@@ -2,10 +2,17 @@
TARO_APP_ID='wx7b3322daa2cf9c88' TARO_APP_ID='wx7b3322daa2cf9c88'
# 开发版appkey # 开发版appkey
TARO_APP_KEY='1234567890' TARO_APP_KEY=''
# API接口 # API接口
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app' TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
# 游戏链接
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' # 版权文字
TARO_APP_NAME='捷兑通'
TARO_APP_COP='玩赚商城版权所有'
TARO_APP_TITLE_IMG='../../../static/index/1.png'
TARO_APP_LOGO_IMG='../../../static/logo.jpg'
TARO_APP_SHOW_NEW_HOME='no'

View File

@@ -1,10 +1,19 @@
# 正式版appid # 正式版appid
TARO_APP_ID='wxdd00d46fa6f07974' TARO_APP_ID='wxdd00d46fa6f07974'
# 开发版appkey # 正式版appkey
TARO_APP_KEY='private.wxdd00d46fa6f07974.key' TARO_APP_KEY='private.wxdd00d46fa6f07974.key'
# API接口 # API接口
TARO_APP_API='https://www.wanzhuanyongcheng.cn/app' TARO_APP_API='https://www.wanzhuanyongcheng.cn/app'
TARO_APP_GAME='https://jdt-prod-tz.wanzhuanyongcheng.cn/pages/index/index?uid='
# 版权文字
TARO_APP_NAME='捷兑通'
TARO_APP_COP='鑫瓴科技版权所有'
TARO_APP_TITLE_IMG='../../../static/index/1.png'
TARO_APP_LOGO_IMG='../../../static/logo.jpg'
TARO_APP_SHOW_NEW_HOME='no'

18
.env.reserve Normal file
View File

@@ -0,0 +1,18 @@
# 备用版appid
TARO_APP_ID='wx4a9380d8bb16d9de'
# 备用版appkey
TARO_APP_KEY='private.wx4a9380d8bb16d9de.key'
# API接口
TARO_APP_API='https://api.gxwzwh.com/app'
# 版权文字
TARO_APP_NAME='玩赚商城'
TARO_APP_COP='玩赚商城版权所有'
TARO_APP_TITLE_IMG='../../../static/index/title.png'
TARO_APP_LOGO_IMG='../../../static/logo-1.jpg'
TARO_APP_SHOW_NEW_HOME='yes'

View File

@@ -7,5 +7,12 @@ TARO_APP_KEY='private.wx7b3322daa2cf9c88.key'
# API接口 # API接口
TARO_APP_API='https://test.wanzhuanyongcheng.cn/app' TARO_APP_API='https://test.wanzhuanyongcheng.cn/app'
# 游戏链接
TARO_APP_GAME='https://jdt-test-tz.wanzhuanyongcheng.cn/pages/index/index?uid=' # 版权文字
TARO_APP_NAME='捷兑通'
TARO_APP_COP='鑫瓴科技版权所有'
TARO_APP_TITLE_IMG='../../static/index/1.png'
TARO_APP_LOGO_IMG='../../../static/logo.jpg'
TARO_APP_SHOW_NEW_HOME='no'

4
.eslintignore Normal file
View File

@@ -0,0 +1,4 @@
/node_modules/**
/dist/*
/public/*
/src/static/*

126
.gitea/workflows/ci.yaml Normal file
View File

@@ -0,0 +1,126 @@
name: CI Build & Upload (WeApp)
on:
push:
branches:
- test
- master
jobs:
build-upload-dev:
if: ${{ gitea.ref == 'refs/heads/test' }}
runs-on: gitea_act_runner
container:
image: node:24-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
run: |
npm install -g pnpm
pnpm config set registry https://registry.npmmirror.com/
pnpm install
- name: Build & Upload (test)
run: |
pnpm build:weapp:test:upload
rm -rf dist.tar || true
- name: Notify WeCom (Dev)
if: always()
env:
WEBHOOK_KEY: ${{ secrets.QYWX_WEBHOOK_KEY }}
STATUS: ${{ job.status }}
REPO: ${{ gitea.repository }}
RUN_URL: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}
BRANCH: ${{ gitea.ref_name }}
COMMIT: ${{ gitea.sha }}
ACTOR: ${{ gitea.actor }}
COMMIT_MSG: ${{ gitea.event.head_commit.message }}
run: |
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk add --no-cache curl jq
EMOJI=$( [ "$STATUS" = "success" ] && echo "✅ 构建成功" || echo "❌ 构建失败" )
MSG="$(printf "%s\n**项目**: %s (构建 #%s)\n**分支**: %s\n**提交**: %s\n**作者**: %s\n**信息**: %s\n**详情**: [查看构建详情](%s)" \
"$EMOJI" "$REPO" "${{ gitea.run_number }}" "$BRANCH" "$COMMIT" "$ACTOR" "$(echo "$COMMIT_MSG" | tr '\n' ' ' | tr -s ' ')" "$RUN_URL")"
JSON=$(jq -n --arg content "$MSG" '{msgtype:"markdown", markdown:{content:$content}}')
curl -sS -H 'Content-Type: application/json' -d "$JSON" "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${WEBHOOK_KEY}"
build-upload-prod:
if: ${{ gitea.ref == 'refs/heads/master' }}
runs-on: gitea_act_runner
container:
image: node:24-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
run: |
npm install -g pnpm
pnpm config set registry https://registry.npmmirror.com/
pnpm install
- name: Build & Upload (prod)
run: |
pnpm build:weapp:prod:upload
rm -rf dist.tar || true
- name: Notify WeCom (Prod)
if: always()
env:
WEBHOOK_KEY: ${{ secrets.QYWX_WEBHOOK_KEY }}
STATUS: ${{ job.status }}
REPO: ${{ gitea.repository }}
RUN_URL: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}
BRANCH: ${{ gitea.ref_name }}
COMMIT: ${{ gitea.sha }}
ACTOR: ${{ gitea.actor }}
COMMIT_MSG: ${{ gitea.event.head_commit.message }}
run: |
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk add --no-cache curl jq
EMOJI=$( [ "$STATUS" = "success" ] && echo "✅ 构建成功" || echo "❌ 构建失败" )
MSG="$(printf "%s\n**项目**: %s (构建 #%s)\n**分支**: %s\n**提交**: %s\n**作者**: %s\n**信息**: %s\n**详情**: [查看构建详情](%s)" \
"$EMOJI" "$REPO" "${{ gitea.run_number }}" "$BRANCH" "$COMMIT" "$ACTOR" "$(echo "$COMMIT_MSG" | tr '\n' ' ' | tr -s ' ')" "$RUN_URL")"
JSON=$(jq -n --arg content "$MSG" '{msgtype:"markdown", markdown:{content:$content}}')
curl -sS -H 'Content-Type: application/json' -d "$JSON" "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${WEBHOOK_KEY}"
build-upload-reserve:
if: ${{ gitea.ref == 'refs/heads/master' }}
runs-on: gitea_act_runner
container:
image: node:24-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install deps
run: |
npm install -g pnpm
pnpm config set registry https://registry.npmmirror.com/
pnpm install
- name: Build & Upload (reserve)
run: |
pnpm build:weapp:reserve:upload
rm -rf dist.tar || true
- name: Notify WeCom (Reserve)
if: always()
env:
WEBHOOK_KEY: ${{ secrets.QYWX_WEBHOOK_KEY }}
STATUS: ${{ job.status }}
REPO: ${{ gitea.repository }}
RUN_URL: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}
BRANCH: ${{ gitea.ref_name }}
COMMIT: ${{ gitea.sha }}
ACTOR: ${{ gitea.actor }}
COMMIT_MSG: ${{ gitea.event.head_commit.message }}
run: |
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories || true
apk add --no-cache curl jq
EMOJI=$( [ "$STATUS" = "success" ] && echo "✅ 构建成功" || echo "❌ 构建失败" )
MSG="$(printf "%s\n**项目**: %s (构建 #%s)\n**分支**: %s\n**提交**: %s\n**作者**: %s\n**信息**: %s\n**详情**: [查看构建详情](%s)" \
"$EMOJI" "$REPO" "${{ gitea.run_number }}" "$BRANCH" "$COMMIT" "$ACTOR" "$(echo "$COMMIT_MSG" | tr '\n' ' ' | tr -s ' ')" "$RUN_URL")"
JSON=$(jq -n --arg content "$MSG" '{msgtype:"markdown", markdown:{content:$content}}')
curl -sS -H 'Content-Type: application/json' -d "$JSON" "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${WEBHOOK_KEY}"

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ deploy_versions/
node_modules/ node_modules/
.DS_Store .DS_Store
.swc .swc
pnpm-lock.yaml

5
.idea/.gitignore generated vendored
View File

@@ -1,5 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/

View File

@@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EslintConfiguration">
<custom-configuration-file used="true" path="$PROJECT_DIR$/.eslintrc.js" />
</component>
</project>

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/taroApp.iml" filepath="$PROJECT_DIR$/.idea/taroApp.iml" />
</modules>
</component>
</project>

12
.idea/taroApp.iml generated
View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions" suppressed-tasks="SCSS" />
</project>

View File

@@ -1,3 +1,4 @@
/node_modules/** /node_modules/**
/dist/* /dist/*
/public/* /public/*
/src/static/*

8
.prettierrc.json Normal file
View File

@@ -0,0 +1,8 @@
{
"arrowParens": "avoid",
"bracketSameLine": true,
"bracketSpacing": true,
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf"
}

View File

@@ -1,11 +1,9 @@
// babel-preset-taro 更多选项和默认值:
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
module.exports = { module.exports = {
presets: [ presets: [
[ [
"taro", 'taro',
{ {
framework: "vue3", framework: 'vue3',
ts: true, ts: true,
}, },
], ],

View File

@@ -1,25 +1,25 @@
module.exports = { module.exports = {
ignores: [(commit) => commit.includes("init")], ignores: [commit => commit.includes('init')],
extends: ["@commitlint/config-conventional"], extends: ['@commitlint/config-conventional'],
rules: { rules: {
"type-enum": [ 'type-enum': [
2, 2,
"always", 'always',
[ [
"feat", 'feat',
"fix", 'fix',
"docs", 'docs',
"style", 'style',
"refactor", 'refactor',
"perf", 'perf',
"test", 'test',
"build", 'build',
"ci", 'ci',
"chore", 'chore',
"revert", 'revert',
"wip", 'wip',
"mod", 'mod',
"release", 'release',
], ],
], ],
}, },

18
components.d.ts vendored
View File

@@ -1,13 +1,15 @@
// generated by unplugin-vue-components /* eslint-disable */
// We suggest you to commit this file into source control // @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core' // biome-ignore lint: disable
export {} export {}
declare module '@vue/runtime-core' { /* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
Auth: typeof import('./src/components/Auth.vue')['default'] Auth: typeof import('./src/components/Auth.vue')['default']
Back: typeof import('./src/components/Back.vue')['default']
Cart: typeof import('./src/components/Cart.vue')['default'] Cart: typeof import('./src/components/Cart.vue')['default']
MerList: typeof import('./src/components/MerList.vue')['default'] MerList: typeof import('./src/components/MerList.vue')['default']
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']
@@ -31,9 +33,12 @@ declare module '@vue/runtime-core' {
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay'] NutOverlay: typeof import('@nutui/nutui-taro')['Overlay']
NutPagination: typeof import('@nutui/nutui-taro')['Pagination'] NutPagination: typeof import('@nutui/nutui-taro')['Pagination']
NutPicker: typeof import('@nutui/nutui-taro')['Picker'] NutPicker: typeof import('@nutui/nutui-taro')['Picker']
NutPopover: typeof import('@nutui/nutui-taro')['Popover']
NutPopup: typeof import('@nutui/nutui-taro')['Popup'] NutPopup: typeof import('@nutui/nutui-taro')['Popup']
NutPrice: typeof import('@nutui/nutui-taro')['Price'] NutPrice: typeof import('@nutui/nutui-taro')['Price']
NutSearchbar: typeof import('@nutui/nutui-taro')['Searchbar'] NutRadio: typeof import('@nutui/nutui-taro')['Radio']
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup']
NutRate: typeof import('@nutui/nutui-taro')['Rate']
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper'] NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem'] NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']
NutSwitch: typeof import('@nutui/nutui-taro')['Switch'] NutSwitch: typeof import('@nutui/nutui-taro')['Switch']
@@ -45,6 +50,7 @@ declare module '@vue/runtime-core' {
Pay: typeof import('./src/components/Pay.vue')['default'] Pay: typeof import('./src/components/Pay.vue')['default']
Popup: typeof import('./src/components/Popup.vue')['default'] Popup: typeof import('./src/components/Popup.vue')['default']
RichEditor: typeof import('./src/components/RichEditor.vue')['default'] RichEditor: typeof import('./src/components/RichEditor.vue')['default']
StoreList: typeof import('./src/components/StoreList.vue')['default']
Ucharts: typeof import('./src/components/Ucharts.vue')['default'] Ucharts: typeof import('./src/components/Ucharts.vue')['default']
Upload: typeof import('./src/components/Upload.vue')['default'] Upload: typeof import('./src/components/Upload.vue')['default']
UserModal: typeof import('./src/components/UserModal.vue')['default'] UserModal: typeof import('./src/components/UserModal.vue')['default']

View File

@@ -4,7 +4,6 @@ module.exports = {
env: { env: {
NODE_ENV: '"development"', NODE_ENV: '"development"',
}, },
defineConstants: {},
mini: {}, mini: {},
h5: {}, h5: {},
}; };

View File

@@ -1,31 +1,32 @@
// @ts-nocheck import Components from 'unplugin-vue-components/webpack';
import Components from "unplugin-vue-components/webpack"; import NutUIResolver from '@nutui/nutui-taro/dist/resolver';
import NutUIResolver from "@nutui/nutui-taro/dist/resolver"; import { UnifiedWebpackPluginV5 } from 'weapp-tailwindcss/webpack';
import { join } from "node:path"; import { join } from 'node:path';
import { argv } from "yargs"; import { argv } from 'yargs';
const { robot = 1, desc } = argv;
const CIPluginOptFn = async () => { const CIPluginOptFn = async () => {
/** /**
* @typedef { import("@tarojs/plugin-mini-ci").CIOptions } CIOptions * @typedef { import('@tarojs/plugin-mini-ci').CIOptions } CIOptions
* @type {CIOptions} * @type {CIOptions}
*/ */
const parsedArgs = await argv;
return { return {
weapp: { weapp: {
appid: process.env.TARO_APP_ID, appid: process.env.TARO_APP_ID,
privateKeyPath: process.env.TARO_APP_KEY, privateKeyPath: process.env.TARO_APP_KEY,
robot, robot: parsedArgs.robot || 1,
}, },
desc, desc: parsedArgs.desc,
}; };
}; };
const config = { const config = {
projectName: "taroApp", projectName: 'taroApp',
date: "2023-8-13", date: '2023-8-13',
designWidth(input: { file: string }) { designWidth(input: { file: string }) {
if (input?.file?.replace(/\\+/g, "/").indexOf("@nutui") > -1) { if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) {
return 375; return 375;
} }
return 750; return 750;
@@ -36,34 +37,47 @@ const config = {
828: 1.81 / 2, 828: 1.81 / 2,
375: 2, 375: 2,
}, },
sourceRoot: "src", sourceRoot: 'src',
outputRoot: "dist", outputRoot: `dist/${process.env.TARO_ENV}`,
plugins: ["@tarojs/plugin-html", ["@tarojs/plugin-mini-ci", CIPluginOptFn]], plugins: ['@tarojs/plugin-html', ['@tarojs/plugin-mini-ci', CIPluginOptFn]],
defineConstants: {}, defineConstants: {},
copy: { copy: {
patterns: [], patterns: [],
options: {}, options: {},
}, },
framework: "vue3", framework: 'vue3',
compiler: { compiler: {
type: "webpack5", type: 'webpack5',
prebundle: { enable: false }, prebundle: { enable: process.env.TARO_ENV === 'h5' },
}, },
cache: { cache: {
enable: false, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache enable: false, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache
}, },
sass: { sass: {
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`, data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
silenceDeprecations: ['import'],
}, },
alias: { alias: {
"@": join(__dirname, "..", "src"), '@': join(__dirname, '..', 'src'),
}, },
mini: { mini: {
webpackChain(chain) { webpackChain(chain) {
chain.plugin("unplugin-vue-components").use( chain.merge({
plugin: {
install: {
plugin: UnifiedWebpackPluginV5,
args: [
{
appType: 'taro',
},
],
},
},
});
chain.plugin('unplugin-vue-components').use(
Components({ Components({
resolvers: [NutUIResolver({ taro: true })], resolvers: [NutUIResolver({ taro: true })],
}) }),
); );
}, },
miniCssExtractPluginOption: { miniCssExtractPluginOption: {
@@ -75,6 +89,7 @@ const config = {
enable: true, enable: true,
config: { config: {
// selectorBlackList: ['nut-'] // selectorBlackList: ['nut-']
removeCursorStyle: false,
}, },
}, },
url: { url: {
@@ -86,23 +101,23 @@ const config = {
cssModules: { cssModules: {
enable: true, // 默认为 false如需使用 css modules 功能,则设为 true enable: true, // 默认为 false如需使用 css modules 功能,则设为 true
config: { config: {
namingPattern: "module", // 转换模式,取值为 global/module namingPattern: 'module', // 转换模式,取值为 global/module
generateScopedName: "[name]__[local]___[hash:base64:5]", generateScopedName: '[name]__[local]___[hash:base64:5]',
}, },
}, },
}, },
}, },
h5: { h5: {
webpackChain(chain) { webpackChain(chain) {
chain.plugin("unplugin-vue-components").use( chain.plugin('unplugin-vue-components').use(
Components({ Components({
resolvers: [NutUIResolver({ taro: true })], resolvers: [NutUIResolver({ taro: true })],
}) }),
); );
}, },
publicPath: "/", publicPath: '/',
staticDirectory: "static", staticDirectory: 'static',
esnextModules: ["nutui-taro", "icons-vue-taro"], esnextModules: ['nutui-taro', 'icons-vue-taro'],
postcss: { postcss: {
autoprefixer: { autoprefixer: {
enable: true, enable: true,
@@ -111,8 +126,8 @@ const config = {
cssModules: { cssModules: {
enable: false, // 默认为 false如需使用 css modules 功能,则设为 true enable: false, // 默认为 false如需使用 css modules 功能,则设为 true
config: { config: {
namingPattern: "module", // 转换模式,取值为 global/module namingPattern: 'module', // 转换模式,取值为 global/module
generateScopedName: "[name]__[local]___[hash:base64:5]", generateScopedName: '[name]__[local]___[hash:base64:5]',
}, },
}, },
}, },
@@ -120,8 +135,8 @@ const config = {
}; };
module.exports = function (merge) { module.exports = function (merge) {
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === 'development') {
return merge({}, config, require("./dev")); return merge({}, config, require('./dev'));
} }
return merge({}, config, require("./prod")); return merge({}, config, require('./prod'));
}; };

View File

@@ -4,7 +4,6 @@ module.exports = {
env: { env: {
NODE_ENV: '"production"', NODE_ENV: '"production"',
}, },
defineConstants: {},
mini: {}, mini: {},
h5: { h5: {
/** /**

View File

@@ -1,19 +1,12 @@
{ {
"name": "jdt-user", "name": "jdt-user",
"version": "3.0.11", "version": "4.0.18",
"private": true,
"description": "",
"templateInfo": {
"name": "jdt-user",
"typescript": true,
"css": "sass"
},
"taroConfig": { "taroConfig": {
"version": "3.0.11" "version": "4.0.18"
}, },
"scripts": { "scripts": {
"build:weapp": "taro build --type weapp", "build:weapp": "taro build --type weapp",
"build:test": "taro build --type weapp --mode test", "build:test": "taro build --type weapp --mode reserve",
"build:swan": "taro build --type swan", "build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay", "build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt", "build:tt": "taro build --type tt",
@@ -23,6 +16,7 @@
"build:jd": "taro build --type jd", "build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp", "build:quickapp": "taro build --type quickapp",
"dev:weapp": "taro build --type weapp --watch", "dev:weapp": "taro build --type weapp --watch",
"dev:weapp:prview": "taro build --type weapp --watch --mode reserve",
"dev:swan": "npm run build:swan -- --watch", "dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch", "dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch", "dev:tt": "npm run build:tt -- --watch",
@@ -35,10 +29,10 @@
"lint:fix": "eslint --fix --ext .ts,.vue .", "lint:fix": "eslint --fix --ext .ts,.vue .",
"lint:staged": "lint-staged", "lint:staged": "lint-staged",
"prepare": "husky install", "prepare": "husky install",
"preview": "vite preview",
"cz": "cz", "cz": "cz",
"lf": "npx prettier --write --end-of-line lf .", "postinstall": "weapp-tw patch",
"build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'", "build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'",
"build:weapp:reserve:upload": "taro build --type weapp --upload --robot=3 --desc='备用环境' --mode reserve",
"build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test" "build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test"
}, },
"browserslist": [ "browserslist": [
@@ -46,11 +40,10 @@
"Android >= 4.1", "Android >= 4.1",
"ios >= 8" "ios >= 8"
], ],
"author": "", "author": "JDT",
"lint-staged": { "lint-staged": {
"*.{ts,vue}": [ "*.{ts,vue}": [
"eslint --ext .ts,.vue .", "eslint --ext .ts,.vue ."
"npx prettier --write --end-of-line lf ."
] ]
}, },
"config": { "config": {
@@ -59,57 +52,68 @@
} }
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.23.5", "@babel/runtime": "^7.28.4",
"@nutui/icons-vue-taro": "^0.0.9", "@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.2.4", "@nutui/nutui-taro": "^4.3.14",
"@qiun/vue-ucharts": "2.5.0-20230101", "@qiun/vue-ucharts": "2.5.0-20230101",
"@tarojs/components": "3.6.20", "@tarojs/components": "4.1.6",
"@tarojs/helper": "3.6.20", "@tarojs/helper": "4.1.6",
"@tarojs/plugin-framework-vue3": "3.6.20", "@tarojs/plugin-framework-vue3": "4.1.6",
"@tarojs/plugin-html": "3.6.20", "@tarojs/plugin-html": "4.1.6",
"@tarojs/plugin-platform-alipay": "3.6.20", "@tarojs/plugin-platform-alipay": "4.1.6",
"@tarojs/plugin-platform-h5": "3.6.20", "@tarojs/plugin-platform-h5": "4.1.6",
"@tarojs/plugin-platform-jd": "3.6.20", "@tarojs/plugin-platform-jd": "4.1.6",
"@tarojs/plugin-platform-qq": "3.6.20", "@tarojs/plugin-platform-qq": "4.1.6",
"@tarojs/plugin-platform-swan": "3.6.20", "@tarojs/plugin-platform-swan": "4.1.6",
"@tarojs/plugin-platform-tt": "3.6.20", "@tarojs/plugin-platform-tt": "4.1.6",
"@tarojs/plugin-platform-weapp": "3.6.20", "@tarojs/plugin-platform-weapp": "4.1.6",
"@tarojs/runtime": "3.6.20", "@tarojs/runtime": "4.1.6",
"@tarojs/shared": "3.6.20", "@tarojs/shared": "4.1.6",
"@tarojs/taro": "3.6.20", "@tarojs/taro": "4.1.6",
"dayjs": "^1.11.10", "dayjs": "^1.11.18",
"pinia": "^2.1.7", "pinia": "^2.3.1",
"vue": "^3.3.9" "uqrcodejs": "^4.0.7",
"vue": "^3.5.21"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.23.5", "@babel/core": "^7.28.4",
"@commitlint/cli": "^18.4.3", "@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.4.3", "@commitlint/config-conventional": "^18.6.3",
"@tarojs/cli": "3.6.20", "@tarojs/cli": "4.1.6",
"@tarojs/plugin-mini-ci": "3.6.20", "@tarojs/plugin-mini-ci": "4.1.6",
"@tarojs/taro-loader": "3.6.20", "@tarojs/taro-loader": "4.1.6",
"@tarojs/webpack5-runner": "3.6.20", "@tarojs/webpack5-runner": "4.1.6",
"@types/node": "^18.19.1", "@types/node": "^18.19.124",
"@types/webpack-env": "^1.18.4", "@types/webpack-env": "^1.18.8",
"@typescript-eslint/eslint-plugin": "^6.13.1", "@types/yargs": "^17.0.33",
"@typescript-eslint/parser": "^6.13.1", "@typescript-eslint/eslint-plugin": "^6.21.0",
"@vue/babel-plugin-jsx": "^1.1.5", "@typescript-eslint/parser": "^6.21.0",
"@vue/compiler-sfc": "^3.3.9", "@unocss/webpack": "^0.60.4",
"babel-preset-taro": "3.6.20", "@vue/babel-plugin-jsx": "^1.5.0",
"commitizen": "^4.3.0", "@vue/compiler-sfc": "^3.5.21",
"autoprefixer": "^10.4.21",
"babel-preset-taro": "4.1.6",
"commitizen": "^4.3.1",
"css-loader": "3.4.2", "css-loader": "3.4.2",
"cz-customizable": "^7.0.0", "cz-customizable": "^7.5.1",
"eslint": "^8.55.0", "eslint": "^8.57.1",
"eslint-config-taro": "3.6.20", "eslint-config-taro": "4.1.6",
"eslint-plugin-vue": "^9.19.2", "eslint-plugin-vue": "^9.33.0",
"husky": "^8.0.3", "husky": "^8.0.3",
"lint-staged": "^15.1.0", "lint-staged": "^15.5.2",
"miniprogram-ci": "^2.1.26",
"postcss": "8.4.29",
"postcss-rem-to-responsive-pixel": "^6.1.0",
"prettier": "^3.6.2",
"style-loader": "1.3.0", "style-loader": "1.3.0",
"stylelint": "9.3.0", "stylelint": "9.3.0",
"ts-node": "^10.9.1", "tailwindcss": "^3.4.17",
"typescript": "^4.9.5", "ts-node": "^10.9.2",
"unplugin-vue-components": "^0.23.0", "typescript": "^5.9.2",
"vue-loader": "^17.3.1", "unplugin-vue-components": "^28.8.0",
"webpack": "^5.89.0" "vue-loader": "^17.4.2",
"weapp-tailwindcss": "^3.7.0",
"webpack": "^5.101.3",
"yargs": "^17.7.2"
} }
} }

24769
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

13
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,13 @@
onlyBuiltDependencies:
- '@parcel/watcher'
- '@swc/core'
- '@tarojs/binding'
- '@tarojs/cli'
- core-js
- core-js-pure
- esbuild
- less
- protobufjs
- swiper
- vue-demi
- weapp-tailwindcss

14
postcss.config.js Normal file
View File

@@ -0,0 +1,14 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
'postcss-rem-to-responsive-pixel': {
// 32 意味着 1rem = 32rpx
rootValue: 32,
// 默认所有属性都转化
propList: ['*'],
// 转化的单位,可以变成 px / rpx
transformUnit: 'rpx',
},
},
};

View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAmHk5BywZ6y2rji/dL2HooKGiTuHrcSeGFODvDK6PPUjnieWB
ev7C6N9kBWNbtYiwyLVpW5iKCxCb/GaBa5EIE0nXnKiOhThP3a8OYDW0oA9Xyp03
1W56U3tnHA/GziyABIIMxqA45WYh3e9ar/sdhDvDyre0yl+8cWcPdNOVOW7as88W
yXDsCQbQedPIAy3sRANZ6K2QTNe5Aht3Y7F1uMKRlJwLodutUopPd32rxJz7WNhB
j9CrjzgnfLJa7siURM2r6om2osNFqHP4bmy5yO68TPI8JQgJTUqoNswgFDa2ng9Y
lOhks6kMR8ldL89+fYqILGDVG7124LKIo1awTQIDAQABAoIBACS+Kaj5zrEmy02z
aRjO/lEfQk7CEIuvG5eScOjcc/YvyGQpo18xX2Tg2GiX/fSsIPXtCZuiEboC4aQc
S5nRVGHZjJTa5aVi4ZQpaEx1BLcBm4VfB6JuQho2Ba30e1MZ1CvB7zQ6Thux1f12
faMk34MLJ+6FAJM4KOAnFslvZ2l0VxIlBq5pbF71dO/MsIrpBWVFNGqu6jtXRUJw
J92PbaFMi/smsgdXixsokzPmE5em3zLdp5cfHQCRBjNBclMjlnHhwQVK8wU7D609
CPcvPS8J3PMceMeGXC1QXFANllVecmn7jECVBU5H4Ed0pb89T9Q7yWVnVBo31ZB7
r4GuL+ECgYEAyLcE4cuPsp31oaKATSZrBmypQuGFsarddyereN8ATZ9DjbFL9Y2/
NazLmG1KjeD1yN1q9/ek+nctKTNzuY14cVeahDoiv0ALNUOuS7IFzoHWf5SnNKEx
oEgGJV9D6olk9YnPF5iwn/lRL84af3dxSnKr75hh8Yv5hWrPnJ95xJkCgYEAwniQ
z6yFg2SmnzwwYV72/aoukmsI3KKBHMEDkAFOummy7iv8eT+9DLumQ9BC+mT3eFmq
GVNVM+199NTQ5b5CzXYalSsw93rewhRkk0RVV31AJUwaRbYy6F6O502SpFYb4n8f
S7KfDv70utGOnycMBNjeaFGWxAZbUCLjfUv8JdUCgYBb1fGz5lHPZhrXY+TUZ/mc
LOedJFbpncZLGKmKWm5nFbHxCOg6aCrOwks9aPQtynpq93RUFMk1mIXfTh1rDuHG
6lBWo8r2OrVmH5uGIuQpQpsEMN34ZLCyJ4I4Y0hN7aN1/SH2J/TYnViaSPEy1VHO
wH0O2Wgm/uaiNubbQNSUMQKBgCXT5fc/i8j/LxoSTybhnhHBpMV+ZH7mbU72jIba
ekHwhYmmrLm5GED9z12piR3Dvg9/AYNjnlM3gyS4sNm/pKbqrkkN2byJ/gKqjNXI
mQEnr+6RWxrsUgK5QfrkL/4fcdUg/SlwWVhFZ71fPerfYYsf1ENee4Et610vLCkX
OrjxAoGATIlZgaPuDA/Sh/YTxxSEjNZGCWx4YvWZfL+PW2ItuadMeD2lLai6lOOi
9ew2xXZkvaeA9PGOA5YK2121M5brwkB0Kc3zNvEmrkpQDJYqeoRvLEuFGDmZ/MX1
p0bzKs1vvh5dyFjWQ5IN9FckZ3Fpk6A1zMEuyQdk35TwX+w5EdE=
-----END RSA PRIVATE KEY-----

View File

@@ -1,14 +1,31 @@
{ {
"miniprogramRoot": "./dist", "miniprogramRoot": "dist/",
"projectname": "taroApp", "projectname": "捷兑通",
"description": "", "description": "",
"setting": { "setting": {
"urlCheck": true, "urlCheck": true,
"es6": false, "es6": true,
"enhance": false, "enhance": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"postcss": false, "postcss": true,
"minified": false "minified": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
}, },
"compileType": "miniprogram" "compileType": "miniprogram",
"appid": "wx7b3322daa2cf9c88",
"libVersion": "3.7.11",
"srcMiniprogramRoot": "dist/",
"packOptions": {
"ignore": [],
"include": []
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
} }

View File

@@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "%E6%8D%B7%E5%85%91%E9%80%9A",
"setting": {
"compileHotReLoad": false
}
}

View File

@@ -1,41 +1,81 @@
import request from "../utils/request"; import request from '../utils/request';
// 订单核销 // 订单核销
export const orderVerify = (data: object) => export const orderVerify = (data: object) =>
request("/user/cancelPointOrder", data, "POST"); request('/user/cancelPointOrder', data, 'POST');
// 活动订单核销 // 活动订单核销
export const activeOrderVerify = (data: object) => export const activeOrderVerify = (data: object) =>
request("/user/cancelOrder", data, "POST"); request('/user/cancelOrder', data, 'POST');
// 获取订单统计 // 获取订单统计
export const orderStatistics = (data: object) => export const orderStatistics = (data: object) =>
request("/store/order/count", data, "POST"); request('/store/order/count', data, 'POST');
// 获取商家积分订单列表 // 获取商家积分订单列表
export const getJfOrderList = (data: object) => export const getJfOrderList = (data: object) =>
request("/store/point/order", data, "POST"); request('/store/point/order', data, 'POST');
// 获取商家活动订单列表 // 获取商家活动订单列表
export const getActiveOrderList = (data: object) => export const getActiveOrderList = (data: object) =>
request("/store/order", data, "POST"); request('/store/order', data, 'POST');
// 获取积分核销列表 // 获取积分核销列表
export const getJfVerifyList = (data: object) => export const getJfVerifyList = (data: object) =>
request("/point/order/details", data, "POST"); request('/point/order/details', data, 'POST');
// 获取活动核销列表 // 获取活动核销列表
export const getActiveVerifyList = (data: object) => export const getActiveVerifyList = (data: object) =>
request("/order/details", data, "POST"); request('/order/details', data, 'POST');
// 增长率统计 // 增长率统计
export const growthRate = (data: object) => export const growthRate = (data: object) =>
request("/store/date/count", data, "POST"); request('/store/date/count', data, 'POST');
// 获取提现列表 // 获取提现列表
export const getWithdrawList = (data: object) => export const getWithdrawList = (data: object) =>
request("/store/withdraw", data, "POST"); request('/store/withdraw', data, 'POST');
// 获取提现列表 // 获取提现列表
export const addWithdraw = (data: object) => export const addWithdraw = (data: object) =>
request("/store/withdraw/set", data, "POST"); request('/store/withdraw/set', data, 'POST');
/**
* 后结api
*/
// 创建后结订单
export const createAfterOrder = (data: object) =>
request('/later/order/place', data, 'POST');
// 获取商家后结订单列表
export const getAfterOrderList = (data: object) =>
request('/later/store/user/order', data, 'POST');
// 获取单个后结订单
export const getAfterOrder = (data: object) =>
request('/later/order/details', data, 'POST');
// 确定挂帐
export const confirmAfterOrder = (data: object) =>
request('/later/order/onAccount', data, 'POST');
// 修改台号/备注
export const editAfterOrder = (data: object) =>
request('/later/order/edit', data, 'POST');
// 生成付款二维码
export const createPayQr = (data: object) =>
request('/later/order/pay', data, 'POST');
// 检查手机号码是否存在
export const checkPhone = (data: object) =>
request('/user/find/phone', data, 'POST');
// 获取商家特定用户会员积分2024-3-19
export const getUserPoint = (data: object) =>
request('/store/get/user/integral', data, 'POST');
// 取消后结订单
export const cancelAfterOrder = (data: object) =>
request('/user/later/order/remove', data, 'POST');

View File

@@ -1,15 +1,15 @@
import request from "../utils/request"; import request from '../utils/request';
// 添加购物车 // 添加购物车
export const addCart = (data: object) => export const addCart = (data: object) =>
request("/goods/cart/add", data, "POST"); request('/goods/cart/add', data, 'POST');
// 获取购物车 // 获取购物车
export const getCart = (data: object) => request("/goods/cart", data, "POST"); export const getCart = (data: object) => request('/goods/cart', data, 'POST');
// 清空购物车 // 清空购物车
export const clearCart = (data: object) => export const clearCart = (data: object) =>
request("/goods/cart/removeAll", data, "POST"); request('/goods/cart/removeAll', data, 'POST');
// 获取全部购物车 // 获取全部购物车
export const getAllCart = () => request("/goods/all/cart", {}, "POST"); export const getAllCart = () => request('/goods/all/cart', {}, 'POST');

8
src/api/code.ts Normal file
View File

@@ -0,0 +1,8 @@
import request from '../utils/request';
// 获取二维码信息
export const getQrCode = (data: object) => request('/qrcode/get', data, 'POST');
// 绑定二维码
export const bindQrCode = (data: object) =>
request('/qrcode/bind', data, 'POST');

4
src/api/game.ts Normal file
View File

@@ -0,0 +1,4 @@
import request from '../utils/request';
// 获取游戏列表
export const getGameList = () => request('/game', {}, 'POST');

View File

@@ -1,67 +1,67 @@
import request from "@/utils/request"; import request from '@/utils/request';
// 获取商品列表 // 获取商品列表
export const getGoodsList = () => request("/point/goods", {}, "POST"); export const getGoodsList = () => request('/point/goods', {}, 'POST');
// 添加购物车 // 添加购物车
export const addCart = (data: object) => request("/user/addCart", data, "POST"); export const addCart = (data: object) => request('/user/addCart', data, 'POST');
// 获取购物车列表 // 获取购物车列表
export const getCartList = () => request("/user/cart", {}, "POST"); export const getCartList = () => request('/user/cart', {}, 'POST');
// 获取积分商品详情 // 获取积分商品详情
export const getGoodsDetail = (data: object) => export const getGoodsDetail = (data: object) =>
request("/point/details", data, "POST"); request('/point/details', data, 'POST');
// 积分商品下单 // 积分商品下单
export const createOrder = (data: object) => export const createOrder = (data: object) =>
request("/point/place", data, "POST"); request('/point/place', data, 'POST');
// 确认付款 // 确认付款
export const payJfOrder = (data: object) => export const payJfOrder = (data: object) =>
request("/point/confirmOrder", data, "POST"); request('/point/confirmOrder', data, 'POST');
// 获取活动商品 // 获取活动商品
export const getActiveGoods = () => request("/goods", {}, "POST"); export const getActiveGoods = () => request('/goods', {}, 'POST');
// 获取活动商品详情 // 获取活动商品详情
export const getActiveGoodsDetail = (data: object) => export const getActiveGoodsDetail = (data: object) =>
request("/goods/details", data, "POST"); request('/goods/details', data, 'POST');
// 创建订单 // 创建订单
export const createActiveOrder = (data: object) => export const createActiveOrder = (data: object) =>
request("/order/place", data, "POST"); request('/order/place', data, 'POST');
// 活动订单列表 // 活动订单列表
export const getActiveOrderList = (data: object) => export const getActiveOrderList = (data: object) =>
request("/user/order", data, "POST"); request('/user/order', data, 'POST');
// 获取分类列表 // 获取分类列表
export const getCategoryList = () => request("/goods/class", {}, "POST"); export const getCategoryList = () => request('/goods/class', {}, 'POST');
// 活动订单删除 // 活动订单删除
export const deleteActiveOrder = (data: object) => export const deleteActiveOrder = (data: object) =>
request("/user/order/remove", data, "POST"); request('/user/order/remove', data, 'POST');
// 积分订单删除 // 积分订单删除
export const deleteJfOrder = (data: object) => export const deleteJfOrder = (data: object) =>
request("/user/point/remove", data, "POST"); request('/user/point/remove', data, 'POST');
// 获取分类商品 // 获取分类商品
export const getCategoryGoods = (data: object) => export const getCategoryGoods = (data: object) =>
request("/class/goods/list", data, "POST"); request('/class/goods/list', data, 'POST');
// 获取商家列表 // 获取商家列表
export const getMerList = (data: object) => export const getMerList = (data: object) =>
request("/store/list", data, "POST"); request('/store/list', data, 'POST');
// 获取商家商品分类 // 获取商家商品分类
export const getMerCategory = (data: object) => export const getMerCategory = (data: object) =>
request("/store/classify", data, "POST"); request('/store/classify', data, 'POST');
// 获取商家商品 // 获取商家商品
export const getGoodList = (data: object) => export const getGoodList = (data: object) =>
request("/store/goods", data, "POST"); request('/store/goods', data, 'POST');
// // 获取活动商家列表 // // 获取活动商家列表
// export const getHotMerList = (data: object) => // export const getHotMerList = (data: object) =>
@@ -77,4 +77,23 @@ export const getGoodList = (data: object) =>
// 获取全部商家类目 // 获取全部商家类目
export const getAllMerCategory = () => export const getAllMerCategory = () =>
request("/home/all/classify", {}, "POST"); request('/home/all/classify', {}, 'POST');
// 获取活动订单详情
export const getActiveOrderDetail = (data: object) =>
request('/user/order/details', data, 'POST');
// 校验交易密码
export const checkTradePwd = (data: object) =>
request('/user/check/payPassword', data, 'POST');
// 获取活动商品或者活动积分商品
export const getHdOrJfGoods = (data: object) =>
request('/activity/goods', data, 'POST');
// 获取支付列表
export const getPayList = (data: object) => request('/payType', data, 'POST');
// 获取商家详情
export const getMerDetail = (data: object) =>
request('/store/details', data, 'POST');

View File

@@ -1,7 +1,10 @@
import request from "../utils/request"; import request from '../utils/request';
// 获取商户分类 // 获取商户分类
export const getHomeList = () => request("/home/classify", {}, "POST"); export const getHomeList = () => request('/home/classify', {}, 'POST');
// 获取商户子列表 // 获取商户子列表
export const getHomeSubList = () => request("/home/all/classify", {}, "POST"); export const getHomeSubList = () => request('/home/all/classify', {}, 'POST');
// 查找商家
export const getStoreList = data => request('/find/store', data, 'POST');

View File

@@ -1,9 +1,9 @@
import request from "@/utils/request"; import request from '@/utils/request';
// 订单支付 // 订单支付
export const payOrder = (data: object) => export const payOrder = (data: object) =>
request("/order/confirmOrder", data, "POST"); request('/order/confirmOrder', data, 'POST');
// 获取订单统计 // 获取订单统计
export const getOrderStatistics = (data: object) => export const getOrderStatistics = (data: object) =>
request("/user/order/count", data, "POST"); request('/user/order/count', data, 'POST');

View File

@@ -1,9 +1,9 @@
import request from "@/utils/request"; import request from '@/utils/request';
// 商品列表 // 商品列表
export const productList = (data: object) => export const productList = (data: object) =>
request("/store/goods", data, "POST"); request('/store/goods', data, 'POST');
// 商品添加 // 商品添加
export const addGood = (data: object) => export const addGood = (data: object) =>
request("/store/goods/edit", data, "POST"); request('/store/goods/edit', data, 'POST');

View File

@@ -1,75 +1,98 @@
import request from "@/utils/request"; import request from '@/utils/request';
// 获取用户协议
export const getAgreement = () => request('/user/agreement', {}, 'POST');
// 登录 // 登录
export const login = (data: object) => request("/login", data, "POST"); export const login = (data: object) => request('/login', data, 'POST');
export const phoneLogin = (data: object) => export const phoneLogin = (data: object) =>
request("/phone/login", data, "POST"); request('/phone/login', data, 'POST');
// 获取用户信息 // 获取用户信息
// export const getUserInfo = () => request("/user/detail", {}, "GET"); // export const getUserInfo = () => request("/user/detail", {}, "GET");
// 获取短信验证码 // 获取短信验证码
export const getVerifyCode = (data: object) => export const getVerifyCode = (data: object) =>
request("/getSmsCode", data, "POST"); request('/getSmsCode', data, 'POST');
// 商家入驻申请 // 商家入驻申请
export const applyMer = (data: object) => export const applyMer = (data: object) =>
request("/store/settle", data, "POST"); request('/store/settle', data, 'POST');
// 获取商家类型列表 // 获取商家类型列表
export const getMerTypeList = () => request("/store/getOther", {}, "POST"); export const getMerTypeList = () => request('/store/getOther', {}, 'POST');
// 获取个人信息 // 获取个人信息
export const getPersonalInfo = () => request("/user/info", {}, "POST"); export const getPersonalInfo = () => request('/user/info', {}, 'POST');
// 获取轮播图 // 获取轮播图
export const getBanner = () => request("/rotation", {}, "POST"); export const getBanner = () => request('/rotation', {}, 'POST');
// 获取积分订单列表 // 获取积分订单列表
export const getIntegralOrderList = (data: object) => export const getIntegralOrderList = (data: object) =>
request("/user/pointOrder", data, "POST"); request('/user/pointOrder', data, 'POST');
// 修改个人信息 // 修改个人信息
export const editPersonalInfo = (data: object) => export const editPersonalInfo = (data: object) =>
request("/user/editInfo", data, "POST"); request('/user/editInfo', data, 'POST');
// 积分明细 // 积分明细
export const getIntegralDetail = (data: object) => export const getIntegralDetail = (data: object) =>
request("/user/pulseRecord", data, "POST"); request('/user/pulseRecord', data, 'POST');
// 豆子明细 // 豆子明细
export const getBeanDetail = (data: object) => export const getBeanDetail = (data: object) =>
request("/user/pointRecord", data, "POST"); request('/user/pointRecord', data, 'POST');
// 授权手机号 // 授权手机号
export const getPhone = (data: object) => export const getPhone = (data: object) =>
request("/user/getPhone", data, "POST"); request('/user/getPhone', data, 'POST');
// 获取推广积分明细 // 获取推广积分明细
export const getTGIntegralDetail = (data: object) => export const getTGIntegralDetail = (data: object) =>
request("/user/referee/point", data, "POST"); request('/user/referee/point', data, 'POST');
// 获取推广用户列表 // 获取推广用户列表
export const getTGUserList = (data: object) => export const getTGUserList = (data: object) =>
request("/user/referee/list", data, "POST"); request('/user/referee/list', data, 'POST');
// 绑定上级 // 绑定上级
export const bindParent = (data: object) => export const bindParent = (data: object) =>
request("/user/bindCode", data, "POST"); request('/user/bindCode', data, 'POST');
// 获取推广码 // 获取推广码
export const getRefereeCode = () => request("/user/promotion", {}, "POST"); export const getRefereeCode = () => request('/user/promotion', {}, 'POST');
// 取消订单返回积分 // 取消订单返回积分
export const qxOrder = (data: object) => export const qxOrder = (data: object) =>
request("/user/point/off", data, "POST"); request('/user/point/off', data, 'POST');
// 用户签到 // 用户签到
export const userSign = () => request("/sign/user", {}, "POST"); export const userSign = () => request('/sign/user', {}, 'POST');
// 获取签到记录 // 获取签到记录
export const getSignRecord = () => request("/sign/pulse/count", {}, "POST"); export const getSignRecord = () => request('/sign/pulse/count', {}, 'POST');
// 获取赠送总记录 // 获取赠送总记录
export const getGiftRecord = (data: object) => export const getGiftRecord = (data: object) =>
request("/user/giftPulseRecord", data, "POST"); request('/user/giftPulseRecord', data, 'POST');
// 修改交易密码
export const editTradePwd = (data: object) =>
request('/user/edit/payPassword', data, 'POST');
// 检查是否有交易密码
export const isCheckTradePwd = () =>
request('/user/find/payPassword', {}, 'POST');
/**
* 用户后结订单
*/
// 获取用户后结订单列表
export const getUserAfterOrderList = (data: object) =>
request('/later/user/order', data, 'POST');
// 获取用户后结订单详情
export const getUserAfterOrderDetail = (data: object) =>
request('/later/order/details', data, 'POST');

View File

@@ -1,114 +1,129 @@
export default defineAppConfig({ export default defineAppConfig({
pages: [ pages: [
"pages/index/index", 'pages/index/index',
"pages/category/index", 'pages/game/gamehome/index',
"pages/cart/index", 'pages/cart/index',
"pages/user/index", 'pages/user/index',
"pages/allClassList/index", 'pages/allClassList/index',
'pages/game/gamedetail/index',
'pages/game/view/index',
'pages/fastBuy/index',
], ],
subPackages: [ subPackages: [
{ {
root: "pages/users", root: 'pages/users',
pages: [ pages: [
"order_list/index", 'user_agreement/index',
"setting/index", 'order_list/index',
"user_setting/index", 'setting/index',
"settled_mer/index", 'user_setting/index',
"order_list_detail/index", 'settled_mer/index',
"account/index", 'order_list_detail/index',
"distribution/index", 'account/index',
"distribution/integral/index", 'distribution/index',
"distribution/userlist/index", 'distribution/integral/index',
"login/index", 'distribution/userlist/index',
"bindPhone/index", 'login/index',
'bindPhone/index',
'pending_order/index',
'pending_order/pending_order_detail/index',
'pwd/index',
], ],
}, },
{ {
root: "pages/goods", root: 'pages/goods',
pages: ["goods_detail/index", "order_create/index", "order_status/index"],
},
{
root: "pages/admin",
pages: [ pages: [
"verify/index", 'goods_detail/index',
"order_manage/index", 'order_create/index',
"order_manage/list/index", 'order_status/index',
"order_manage/detail/index", 'pay/index',
"verify/verify_list/index",
"statistics/index",
"withdrawal/index",
], ],
}, },
{ {
root: "pages/product", root: 'pages/admin',
pages: ["list/index", "addGoods/index"], pages: [
'verify/index',
'order_manage/index',
'order_manage/list/index',
'order_manage/detail/index',
'verify/verify_list/index',
'statistics/index',
'withdrawal/index',
'add_order/index',
'add_order/add_table/index',
'add_order/add_menu/index',
'add_order/pending_order/index',
'add_order/pending_order/pending_order_detail/index',
'add_order/pending_order/pay/index',
'add_order/pending_order/wx_pay_code/index',
],
}, },
{ {
root: "pages/game", root: 'pages/product',
pages: ["gamehome/index", "gamedetail/index", "gameview/index"], pages: ['list/index', 'addGoods/index'],
}, },
{ {
root: "pages/hotGoods", root: 'pages/hotGoods',
pages: ["index/index", "hot_list/index"], pages: ['index/index', 'hot_list/index'],
}, },
{ {
root: "pages/mer", root: 'pages/mer',
pages: ["mer_detail/index"], pages: ['mer_detail/index'],
}, },
{ {
root: "pages/marketing", root: 'pages/marketing',
pages: ["sign/index"], pages: ['sign/index', 'yq/index', 'scratch/index'],
}, },
{ {
root: "pages/search", root: 'pages/search',
pages: ["index"], pages: ['index'],
}, },
], ],
window: { window: {
backgroundTextStyle: "light", backgroundTextStyle: 'light',
navigationBarBackgroundColor: "#fff", navigationBarBackgroundColor: '#fff',
navigationBarTitleText: "WeChat", navigationBarTitleText: 'WeChat',
navigationBarTextStyle: "black", navigationBarTextStyle: 'black',
}, },
tabBar: { tabBar: {
color: "#666666", color: '#666666',
selectedColor: "#ff0000", selectedColor: '#ff0000',
backgroundColor: "#ffffff", backgroundColor: '#ffffff',
borderStyle: "white", borderStyle: 'white',
list: [ list: [
{ {
pagePath: "pages/index/index", pagePath: 'pages/index/index',
iconPath: "static/tabbar/1-001.png", iconPath: 'static/tabbar/1-0.png',
selectedIconPath: "static/tabbar/1-002.png", selectedIconPath: 'static/tabbar/1-1.png',
text: "首页", text: '首页',
}, },
// { // {
// pagePath: "pages/category/index", // pagePath: 'pages/game/gamehome/index',
// iconPath: "static/tabbar/2-001.png", // iconPath: 'static/tabbar/2-0.png',
// selectedIconPath: "static/tabbar/2-002.png", // selectedIconPath: 'static/tabbar/2-1.png',
// text: "分类", // text: '游戏',
// }, // },
{ {
pagePath: "pages/cart/index", pagePath: 'pages/cart/index',
iconPath: "static/tabbar/3-001.png", iconPath: 'static/tabbar/3-0.png',
selectedIconPath: "static/tabbar/3-002.png", selectedIconPath: 'static/tabbar/3-1.png',
text: "购物车", text: '购物车',
}, },
{ {
pagePath: "pages/user/index", pagePath: 'pages/user/index',
iconPath: "static/tabbar/4-001.png", iconPath: 'static/tabbar/4-0.png',
selectedIconPath: "static/tabbar/4-002.png", selectedIconPath: 'static/tabbar/4-1.png',
text: "我的", text: '我的',
}, },
], ],
}, },
permission: { permission: {
"scope.userLocation": { 'scope.userLocation': {
desc: "你的位置信息将用于小程序位置接口的效果展示", desc: '你的位置信息将用于小程序位置接口的效果展示',
}, },
}, },
requiredBackgroundModes: ["audio", "location"], requiredBackgroundModes: ['audio', 'location'],
// @ts-ignore // @ts-ignore
requiredPrivateInfos: ["getLocation"], requiredPrivateInfos: ['getLocation'],
lazyCodeLoading: "requiredComponents", lazyCodeLoading: 'requiredComponents',
}); });

View File

@@ -1,8 +1,12 @@
@import "static/iconfont/iconfont.css"; @import './static/iconfont/iconfont.css';
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
page { page {
background-color: #f5f5f5; background-color: #f5f5f5;
font-size: 30rpx; padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
} }
view { view {

View File

@@ -1,15 +1,10 @@
import { createApp } from "vue"; import { createApp } from 'vue';
import "./app.scss"; import Taro from '@tarojs/taro';
import Taro from "@tarojs/taro"; import './app.scss';
// import * as Sentry from "sentry-miniapp";
// 小程序场景值 // 小程序场景值
const scenes = [1007, 1008, 1011, 1012, 1013, 1047, 1048, 1049]; const scenes = [1007, 1008, 1011, 1012, 1013, 1047, 1048, 1049];
// Sentry.init({
// dsn: "https://47703e01ba4344b8b252c15e8fd980fd@sentry.io/1528228",
// });
const App = createApp({ const App = createApp({
onLaunch(options: { onLaunch(options: {
path: string; path: string;
@@ -19,20 +14,20 @@ const App = createApp({
referrerInfo: object | any; referrerInfo: object | any;
}) { }) {
// 检测更新 // 检测更新
if (Taro.canIUse("getUpdateManager") && options.scene !== 1154) { if (Taro.canIUse('getUpdateManager') && options.scene !== 1154) {
const updateManager = Taro.getUpdateManager(); const updateManager = Taro.getUpdateManager();
updateManager.onCheckForUpdate(function (res) { updateManager.onCheckForUpdate(function (res) {
if (res.hasUpdate) { if (res.hasUpdate) {
updateManager.onUpdateFailed(function () { updateManager.onUpdateFailed(function () {
return Taro.showToast({ return Taro.showToast({
title: "新版本下载失败", title: '新版本下载失败',
icon: "none", icon: 'none',
}); });
}); });
updateManager.onUpdateReady(function () { updateManager.onUpdateReady(function () {
Taro.showModal({ Taro.showModal({
title: "更新提示", title: '更新提示',
content: "新版本已经下载好,是否重启当前应用?", content: '新版本已经下载好,是否重启当前应用?',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
updateManager.applyUpdate(); updateManager.applyUpdate();
@@ -42,8 +37,8 @@ const App = createApp({
}); });
updateManager.onUpdateFailed(function () { updateManager.onUpdateFailed(function () {
Taro.showModal({ Taro.showModal({
title: "发现新版本", title: '发现新版本',
content: "请删除当前小程序,重启搜索打开...", content: '请删除当前小程序,重启搜索打开...',
}); });
}); });
} }
@@ -55,10 +50,10 @@ const App = createApp({
if (scenes.includes(options.scene)) { if (scenes.includes(options.scene)) {
if (options.query.scene) { if (options.query.scene) {
Taro.showToast({ Taro.showToast({
title: "已检测到推荐人", title: '已检测到推荐人',
icon: "none", icon: 'none',
}); });
Taro.setStorageSync("bind_id", options.query.scene); Taro.setStorageSync('bind_id', options.query.scene);
} }
} }
}, },

View File

@@ -15,8 +15,8 @@
<script setup lang="ts"> <script setup lang="ts">
// import { computed, ref } from "vue"; // import { computed, ref } from "vue";
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { login } from "@/api/user"; import { login } from '@/api/user';
defineProps({ defineProps({
visible: { visible: {
@@ -25,20 +25,20 @@ defineProps({
}, },
}); });
const emit = defineEmits(["update:visible", "ok"]); const emit = defineEmits(['update:visible', 'ok']);
const onCancel = () => { const onCancel = () => {
emit("update:visible", false); emit('update:visible', false);
}; };
const onOk = () => { const onOk = () => {
Taro.showLoading({ Taro.showLoading({
title: "正在授权中", title: '正在授权中',
mask: true, mask: true,
}); });
Taro.getUserProfile({ Taro.getUserProfile({
desc: "完善用户资料", desc: '完善用户资料',
success: async (user) => { success: async user => {
Taro.login({ Taro.login({
success: async ({ code }) => { success: async ({ code }) => {
try { try {
@@ -47,16 +47,16 @@ const onOk = () => {
nickName: user.userInfo.nickName, nickName: user.userInfo.nickName,
avatarUrl: user.userInfo.avatarUrl, avatarUrl: user.userInfo.avatarUrl,
}); });
Taro.setStorageSync("token", data.token); Taro.setStorageSync('token', data.token);
emit("ok", false); emit('ok', false);
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({
title: error.message, title: error.message,
icon: "none", icon: 'none',
}); });
} }
}, },
fail: (err) => { fail: err => {
console.log(err); console.log(err);
}, },
complete: () => { complete: () => {
@@ -64,7 +64,7 @@ const onOk = () => {
}, },
}); });
}, },
fail: (err) => { fail: err => {
console.log(err); console.log(err);
}, },
complete: () => { complete: () => {

69
src/components/Back.vue Normal file
View File

@@ -0,0 +1,69 @@
<template>
<view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
<view class="head-menu">
<Left class="iconfont" @click="returns" />
<view class="line"></view>
<Home class="iconfont" @click="goHome" />
</view>
<text style="width: 2000px; text-align: center">{{ props.title }}</text>
</view>
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
import { computed } from 'vue';
import { Home, Left } from '@nutui/icons-vue-taro';
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight as number;
const BarHeight = computed(() => statusBarHeight - 7);
const props = defineProps({
title: {
type: String,
default: '',
},
});
const returns = () => {
Taro.navigateBack({
delta: 1,
});
};
const goHome = () => {
Taro.switchTab({
url: '/pages/index/index',
});
};
</script>
<style lang="scss">
.head-wrapper {
z-index: 999;
display: flex;
align-items: center;
position: fixed;
left: 30px;
height: 114px;
}
.head-menu {
display: flex;
align-items: center;
height: 54px;
width: 140px;
background: rgba(0, 0, 0, 0.25);
border-radius: 27px;
.line {
width: 1px;
height: 25px;
background: #fff;
}
.iconfont {
flex: 1;
text-align: center;
color: #fff;
box-sizing: border-box;
}
}
</style>

View File

@@ -1,10 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { addCart, getCart, clearCart } from "@/api/cart"; import { addCart, getCart, clearCart } from '@/api/cart';
import { Del2 } from "@nutui/icons-vue-taro"; import { Plus, Minus } from '@nutui/icons-vue-taro';
import { createActiveOrder } from "@/api/goods"; import { createActiveOrder } from '@/api/goods';
import Pay from "@/components/Pay.vue"; import { createAfterOrder, getUserPoint } from '@/api/admin';
import Pay from '@/components/Pay.vue';
interface CardList { interface CardList {
name: string; name: string;
@@ -12,8 +13,10 @@ interface CardList {
bid: string; bid: string;
gid: string; gid: string;
number: string; number: string;
discount_price: string;
price: number; price: number;
exchange: number; exchange: number;
discount_integral: number;
} }
const show = ref(false); const show = ref(false);
@@ -23,9 +26,13 @@ const props = defineProps({
required: true, required: true,
type: Object, type: Object,
}, },
IsPendingOrder: {
type: Boolean,
default: false,
},
}); });
const emit = defineEmits(["updateCart"]); const emit = defineEmits(['updateCart']);
const openModal = async () => { const openModal = async () => {
await get_cart_list(); await get_cart_list();
@@ -33,7 +40,11 @@ const openModal = async () => {
show.value = !show.value; show.value = !show.value;
}; };
const add_cart = async (item: CardList, num: number = 1) => { const add_cart = async (
item: CardList,
num: number = 1,
bid: string = props.merInfo.bid,
) => {
try { try {
const res = await addCart({ const res = await addCart({
Bid: item.bid, Bid: item.bid,
@@ -42,13 +53,13 @@ const add_cart = async (item: CardList, num: number = 1) => {
}); });
Taro.showToast({ Taro.showToast({
title: res.msg, title: res.msg,
icon: "none", icon: 'none',
}); });
await get_cart_list(); await get_cart_list(bid);
} catch (e) { } catch (e) {
Taro.showToast({ Taro.showToast({
title: e.msg, title: e.msg,
icon: "none", icon: 'none',
}); });
} }
}; };
@@ -67,30 +78,35 @@ const card_list = ref<CardList[]>([]);
const cartInfo = ref({ const cartInfo = ref({
count: 0, count: 0,
price: 0, price: 0,
discount_price: 0,
exchange: 0, exchange: 0,
discount_integral: 0,
}); });
const get_cart_list = async () => { const get_cart_list = async (bid: string = props.merInfo.bid) => {
try { try {
const res = await getCart({ const res = await getCart({
Bid: props.merInfo.bid, Bid: bid,
}); });
card_list.value = res.data.data || []; card_list.value = res.data.data || [];
cartInfo.value = { cartInfo.value = {
count: 0, count: 0,
price: 0, price: 0,
discount_price: 0,
exchange: 0, exchange: 0,
discount_integral: 0,
}; };
card_list.value.forEach((item: CardList) => { card_list.value.forEach((item: CardList) => {
cartInfo.value.count += Number(item.number); cartInfo.value.count += Number(item.number);
cartInfo.value.price += Number(item.price); cartInfo.value.discount_price += Number(item.price);
cartInfo.value.exchange += Number(item.exchange); cartInfo.value.exchange += Number(item.exchange);
cartInfo.value.discount_integral += Number(item.discount_integral);
}); });
emit("updateCart", res.data.data || []); emit('updateCart', res.data.data || []);
} catch (e) { } catch (e) {
Taro.showToast({ Taro.showToast({
title: e.msg, title: e.msg,
icon: "none", icon: 'none',
}); });
} }
}; };
@@ -104,7 +120,7 @@ const clear_cart = async () => {
} catch (e) { } catch (e) {
Taro.showToast({ Taro.showToast({
title: e.msg, title: e.msg,
icon: "none", icon: 'none',
}); });
} }
show.value = false; show.value = false;
@@ -118,26 +134,59 @@ const closePay = (val: boolean) => {
isShowPay.value = val; isShowPay.value = val;
orderData.value = []; orderData.value = [];
Taro.redirectTo({ Taro.redirectTo({
url: "/pages/users/order_list/index?type=0", url: '/pages/users/order_list/index?type=0',
}); });
}; };
const create_order = async () => { const create_order = async () => {
try { try {
const { data: res } = await createActiveOrder({ show.value = false;
Bid: [props.merInfo.bid], let res;
}); if (props.IsPendingOrder) {
if (res.oid) { const data = props.merInfo;
orderData.value = res.oid; delete data.$taroTimestamp;
isShowPay.value = true; delete data.type;
res = await createAfterOrder(data);
await get_cart_list();
Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${res.data.oid}&bid=${props.merInfo.bid}`,
});
} else {
const user_info = Taro.getStorageSync('userInfo');
const data = await getUserPoint({
phone: user_info.data.phone,
bid: props.merInfo.bid,
});
res = await createActiveOrder({
Bid: [props.merInfo.bid],
custID: data.data.store_user_id,
});
if (res.data.oid) {
orderData.value = {
jh_info: data.data,
oid: res.data.oid,
};
// isShowPay.value = true;
Taro.navigateTo({
url: `/pages/goods/pay/index?oid=${res.data.oid}&bid=${props.merInfo.bid}&OrderType=1`,
});
}
} }
Taro.showToast({
title: res.msg,
icon: 'none',
});
} catch (e) { } catch (e) {
if (e.msg === '请先设置交易密码') {
Taro.navigateTo({
url: '/pages/users/pwd/index',
});
}
Taro.showToast({ Taro.showToast({
title: e.msg, title: e.msg,
icon: "none", icon: 'none',
}); });
} }
// await get_cart_list();
}; };
defineExpose({ defineExpose({
@@ -149,32 +198,43 @@ defineExpose({
<template> <template>
<view> <view>
<view class="cart" @click.stop="openModal"> <view class="cart" @click.stop="openModal">
<view class="container"> <view class="container flex items-center">
<view>购物车数量: {{ cartInfo.count }}</view> <!-- <view>购物车数量: {{ cartInfo.count }}</view> -->
<view v-if="cartInfo.count > 0"> <view class="cardImg">
<text>总金额: {{ cartInfo.price.toFixed(2) }}</text <image
>, src="https://p1.meituan.net/csc/929f447a96a44b09a09b2e0055433222717.png">
<text>总积分: {{ cartInfo.exchange.toFixed(2) }}</text> </image>
<view class="count-text" v-if="cartInfo.count > 0">
<text>{{ cartInfo.count }}</text>
</view>
</view>
<view class="ml-1 text-[28px]">
<text>总金额: {{ cartInfo.discount_price.toFixed(2) }}</text>
<text v-if="!IsPendingOrder"
>积分抵扣: {{ cartInfo.discount_integral.toFixed(2) }}
</text>
</view> </view>
</view> </view>
<view v-if="cartInfo.count > 0" class="payBtn" @click.stop="create_order" <view v-if="cartInfo.count > 0" class="payBtn" @click.stop="create_order"
>立即结算</view >结算
> </view>
</view> </view>
<!-- 购物车弹窗 --> <!-- 购物车弹窗 -->
<nut-popup <nut-popup
:style="{ padding: '20rpx' }" :style="{ padding: '15px' }"
round round
position="bottom" position="bottom"
z-index="1" z-index="1"
:catch-move="true" :catch-move="true"
:safe-area-inset-bottom="true" :safe-area-inset-bottom="true"
v-model:visible="show" v-model:visible="show">
>
<view class="list-header"> <view class="list-header">
<view class="left" @click.stop="clear_cart"> <view class="left" @click.stop="clear_cart">
<Del2 color="#666666" /> <!-- <Del2 color="#666666" /> -->
<text style="color: #666666">清空购物车</text> <image
class="w-[20px] h-[20px]"
src="https://p0.meituan.net/csc/db4d11fd744b69435c6ffdc6bfc868c5684.png" />
<text class="text-[20px]" style="color: #666666">清空购物车</text>
</view> </view>
</view> </view>
<scroll-view :scroll-y="true" class="cart-list"> <scroll-view :scroll-y="true" class="cart-list">
@@ -183,9 +243,12 @@ defineExpose({
<image :src="item.cover" /> <image :src="item.cover" />
<view class="center"> <view class="center">
<view class="name">{{ item.name }}</view> <view class="name">{{ item.name }}</view>
<view class="price">
<view class="price flex">
<view>现金:{{ item.price }}</view> <view>现金:{{ item.price }}</view>
<view>积分:{{ item.exchange }}</view> <view v-if="item.discount_integral > 0" class="ml-2"
>积分:{{ item.discount_integral }}</view
>
</view> </view>
</view> </view>
</view> </view>
@@ -194,57 +257,93 @@ defineExpose({
readonly readonly
:min="-1" :min="-1"
@add="() => onAdd(item)" @add="() => onAdd(item)"
@reduce="() => onReduce(item)" @reduce="() => onReduce(item)">
/> <template #left-icon>
<view class="btn" @click.stop="onReduce(item)">
<Minus />
</view>
</template>
<template #right-icon>
<view class="btn" @click.stop="onAdd(item)">
<Plus />
</view>
</template>
</nut-input-number>
</view> </view>
</scroll-view> </scroll-view>
<view style="height: 140rpx"></view> <view style="height: 140px"></view>
</nut-popup> </nut-popup>
<!-- 支付 --> <!-- 支付 -->
<Pay <Pay
:is-show-pay="isShowPay" :is-show-pay="isShowPay"
v-model:jfInfo="orderData" v-model:jfInfo="orderData"
@closePay="closePay" @closePay="closePay"
@successPay="closePay" @successPay="closePay" />
/>
</view> </view>
</template> </template>
<style lang="scss"> <style lang="scss">
$h-border-radius: 50rpx; $h-border-radius: 50px;
.cart { .cart {
position: fixed; position: fixed;
bottom: 50rpx; bottom: 50px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
z-index: 9999; z-index: 9999;
width: 95%; width: 95%;
background-color: red; background-color: #262323;
border-radius: $h-border-radius; border-radius: $h-border-radius;
color: #fff; color: #fff;
height: 100rpx; height: 100px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.container { .container {
margin-left: 30rpx; margin-left: 30px;
.cardImg {
position: relative;
image {
width: 60px;
height: 60px;
}
.count-text {
position: absolute;
top: -10px;
right: -10px;
background-image: url('https://p0.meituan.net/csc/80b0e11d4270d09324df0b802d4c479b986.png');
background-size: 100% 100%;
// padding: 0 8px;
width: 35px;
height: 35px;
text-align: center;
line-height: 35px;
text {
margin: auto;
font-size: 25px;
}
}
}
} }
.payBtn { .payBtn {
width: 180rpx; width: 200px;
height: 100rpx; height: 100px;
line-height: 100rpx; line-height: 100px;
text-align: center; text-align: center;
background-color: #000; background-color: #f83d3d;
border-radius: 0 $h-border-radius $h-border-radius 0; border-radius: 0 $h-border-radius $h-border-radius 0;
} }
} }
.list-header { .list-header {
margin: 15rpx 0; margin: 15px 0;
.left { .left {
display: flex; display: flex;
@@ -253,37 +352,47 @@ $h-border-radius: 50rpx;
} }
.cart-list { .cart-list {
height: 290rpx; height: 290px;
.item { .item {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
margin-bottom: 10rpx; margin-bottom: 10px;
justify-content: space-between; justify-content: space-between;
.left { .left {
display: flex; display: flex;
justify-content: space-between;
image { image {
width: 130rpx; width: 130px;
height: 130rpx; height: 130px;
border-radius: 10rpx; border-radius: 15px;
margin-right: 10rpx; margin-right: 10px;
} }
.center { .center {
height: 100%; height: 130px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.price { .price {
color: red; color: red;
margin-top: 20rpx; // margin-bottom: 0px;
} }
} }
} }
} }
} }
.btn {
background-color: #ff0000;
color: #fff;
border-radius: 50%;
text-align: center;
line-height: 65px;
width: 45px;
height: 45px;
}
</style> </style>

View File

@@ -1,60 +1,125 @@
<template> <template>
<view class="goodBox"> <view class="list-box">
<view <view class="list">
class="good" <swiper
v-for="item in merdata" v-if="bannerList.length !== 0"
:key="item.ID" class="item"
@click.stop="toMerDetails(item)" :style="{
> height: '250px',
<image :src="item.head_photo" /> }"
<view class="good-text-box"> indicator-color="#EDEDED"
<text class="good-text">{{ item.name }}</text> indicator-active-color="#F83D3D"
<text style="color: #999" :circular="true"
>距离我{{ :indicator-dots="true"
calculateDistance( :autoplay="true">
userLocalNum.t, <swiper-item v-for="(item, index) in bannerList" :key="index">
userLocalNum.l, <image
Number(item.lat), :style="{
Number(item.lon) width: '100%',
) height: '100%',
}} }"
</text> :src="item.url"
@tap="toPage(item.jump)" />
</swiper-item>
</swiper>
<view
class="item"
v-for="(item, index) in list1"
:key="index"
@click="toMerDetails(item)">
<image
:style="{
height: '200px',
}"
:src="item.head_photo" />
<view class="text">
<view class="title">{{ item.name }}</view>
<view class="list_local">
<view class="icon iconfont icon-dizhi"></view>
<view class="desc"
>距离我{{
calculateDistance(
userLocalNum.t,
userLocalNum.l,
Number(item.lat),
Number(item.lon),
)
}}
</view>
</view>
</view>
</view>
</view>
<view class="list">
<view
class="item"
v-for="(item, index) in list2"
:key="index"
@click.stop="toMerDetails(item)">
<image
:style="{
height: '200px',
}"
:src="item.head_photo" />
<view class="text">
<view class="title">{{ item.name }}</view>
<view class="list_local">
<view class="icon iconfont icon-dizhi"></view>
<view class="desc"
>距离我{{
calculateDistance(
userLocalNum.t,
userLocalNum.l,
Number(item.lat),
Number(item.lon),
)
}}
</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { calculateDistance } from "@/utils"; import { calculateDistance, parseQueryString } from '@/utils';
import { bindParent } from "@/api/user"; import { bindParent, getBanner } from '@/api/user';
import { getMerList } from "@/api/goods"; import { getMerList } from '@/api/goods';
const props = defineProps({ const classId = defineModel({ default: 0 });
classId: {
type: Number, const list1 = ref<Array<MerData>>([]);
default: 0, const list2 = ref<Array<MerData>>([]);
},
Taro.useLoad(() => {
init();
}); });
Taro.useDidShow(async () => { const init = async () => {
Taro.showLoading({
title: '加载中',
});
await get_mer_list(); await get_mer_list();
if (Taro.getStorageSync("token") && Taro.getStorageSync("bind_id")) { await get_banner_list();
if (Taro.getStorageSync('token') && Taro.getStorageSync('bind_id')) {
try { try {
const res = await bindParent({ const res = await bindParent({
uid: Taro.getStorageSync("bind_id"), uid: Taro.getStorageSync('bind_id'),
}); });
Taro.showToast({ Taro.showToast({
title: res.msg, title: res.msg,
}); });
Taro.removeStorageSync("bind_id"); Taro.removeStorageSync('bind_id');
} catch (error) { } catch (error) {
Taro.removeStorageSync("bind_id"); Taro.removeStorageSync('bind_id');
throw error; throw error;
} }
} }
}); Taro.hideLoading();
};
interface MerData { interface MerData {
ID: number; ID: number;
@@ -71,79 +136,132 @@ const userLocalNum = ref({
t: 0, t: 0,
}); });
const pageVal = ref({
page: 1,
total: 0,
});
const get_mer_list = async () => { const get_mer_list = async () => {
Taro.getLocation({ Taro.getLocation({
type: "wgs84", type: 'wgs84',
success: (res) => { success: res => {
userLocalNum.value.l = res.longitude; userLocalNum.value.l = res.longitude;
userLocalNum.value.t = res.latitude; userLocalNum.value.t = res.latitude;
}, },
}); });
const res = await getMerList({ const res = await getMerList({
PageNum: 1, PageNum: pageVal.value.page,
PageSize: 10, PageSize: 10,
class_id: props.classId, class_id: classId.value,
}); });
pageVal.value.total = res.data.total;
merdata.value = res.data.data; merdata.value = res.data.data;
const middleIndex = Math.floor(merdata.value.length / 2);
const arr1 = merdata.value.slice(0, middleIndex);
const arr2 = merdata.value.slice(middleIndex);
list1.value.push(...arr1);
list2.value.push(...arr2);
merdata.value = [];
};
const bannerList = ref<any[]>([]);
const get_banner_list = async () => {
const { data }: any = await getBanner();
bannerList.value = data.data || [];
}; };
const toMerDetails = (item: any) => { const toPage = async (url: string) => {
Taro.setStorageSync("mer_info", item); console.log(url);
// url转对象
const obj = parseQueryString(url);
if (obj.type === '1') {
const { data: res } = await getMerList({});
const mer = res.data.filter(item => item.bid === obj.bid)[0];
Taro.setStorageSync('mer_info', mer);
}
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/mer/mer_detail/index`, url,
}); });
}; };
const toMerDetails = item => {
Taro.requestSubscribeMessage({
tmplIds: ['ewjjRxDJAQ_RbKU8CIjMNwfJXazyGQ95XbpKW16vMZs'],
entityIds: [],
complete: () => {
Taro.navigateTo({
url: `/pages/mer/mer_detail/index?bid=${item.bid}`,
});
},
});
};
Taro.useReachBottom(() => {
const currTotal = list1.value.length + list2.value.length;
if (currTotal === pageVal.value.total) {
Taro.showToast({
title: '没有更多了',
icon: 'none',
});
} else {
pageVal.value.page += 1;
get_mer_list();
}
});
</script> </script>
<style lang="scss"> <style lang="scss">
.goodBox { .list-box {
margin: 20px;
padding: 10px;
display: flex; display: flex;
padding: 20px;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
.good { .list {
width: 340px; overflow: scroll;
background-color: #fff;
margin-bottom: 20px;
border-radius: 10px;
image { .item {
width: 100%; width: 340px;
height: 250px; margin-bottom: 18px;
border-top-right-radius: 10px; border-radius: 20px;
border-top-left-radius: 10px; background-color: #fff;
}
.good-text-box { image {
padding: 10px; width: 100%;
border-radius: 15px;
.good-text {
flex-shrink: 0;
font-size: 28px;
color: #333;
font-weight: 400;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
word-break: break-word;
} }
.good-price-box { .text {
display: flex; padding: 15px;
justify-content: space-between;
align-items: center;
margin-top: 10px;
.good-text-price { .title {
font-size: 28px; color: #333333;
font-weight: bold; font-size: 30px;
color: #ff0000;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
// white-space: nowrap;
}
.list_local {
display: flex;
align-items: center;
justify-content: flex-start;
color: #808080;
margin-top: 8px;
.icon {
display: inline-block;
font-size: 30px;
width: 25px;
height: 25px;
margin-right: 10px;
}
.desc {
font-size: 28px;
}
} }
} }
} }

View File

@@ -7,37 +7,36 @@
:close-on-click-overlay="false" :close-on-click-overlay="false"
:style="{ height: 'auto' }" :style="{ height: 'auto' }"
:visible="isShowPay" :visible="isShowPay"
@click-close-icon="closePay" @click-close-icon="closePay">
>
<view class="div"> <view class="div">
<view style="text-align: center">支付方式</view> <view style="text-align: center">支付方式</view>
<nut-cell-group <nut-cell-group
:style="{ margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0' }" :style="{ margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0' }">
>
<nut-cell <nut-cell
title="微信支付" title="微信支付"
desc="使用微信快捷支付" desc="使用微信快捷支付"
is-link is-link
@click="goPay(1)" @click="goPay(1)">
>
<template v-slot:icon> <template v-slot:icon>
<IconFont <IconFont size="30" :name="require('../static/wx.png')" />
size="30"
name="https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png"
/>
</template> </template>
</nut-cell> </nut-cell>
<nut-cell <nut-cell
title="积分支付" title="平台积分支付"
:desc="`剩余积分:${info.integral || 0}`" :desc="`剩余积分:${info.integral || 0}`"
is-link is-link
@click="goPay(2)" @click="goPay(2)">
>
<template v-slot:icon> <template v-slot:icon>
<IconFont <IconFont size="30" :name="require('../static/pt.png')" />
size="30" </template>
name="https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png" </nut-cell>
/> <nut-cell
title="智多鑫积分支付"
:desc="`剩余积分:${jfInfo.jh_info?.integral || 0}`"
is-link
@click="goPay(3)">
<template v-slot:icon>
<IconFont size="30" :name="require('../static/jh.png')" />
</template> </template>
</nut-cell> </nut-cell>
</nut-cell-group> </nut-cell-group>
@@ -46,11 +45,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch } from "vue"; import { ref, watch } from 'vue';
import { IconFont } from "@nutui/icons-vue-taro"; import { IconFont } from '@nutui/icons-vue-taro';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { payOrder } from "@/api/order"; import { payOrder } from '@/api/order';
import { getPersonalInfo } from "@/api/user"; import { getPersonalInfo } from '@/api/user';
const prop = defineProps({ const prop = defineProps({
interval: { interval: {
@@ -74,7 +73,7 @@ const prop = defineProps({
}, },
}); });
const emit = defineEmits(["closePay", "successPay"]); const emit = defineEmits(['closePay', 'successPay']);
const info = ref<{ integral?: any }>({}); const info = ref<{ integral?: any }>({});
@@ -82,7 +81,7 @@ watch(
() => prop.isShowPay, () => prop.isShowPay,
() => { () => {
getInfo(); getInfo();
} },
); );
const getInfo = async () => { const getInfo = async () => {
@@ -92,82 +91,85 @@ const getInfo = async () => {
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({
title: error.msg, title: error.msg,
icon: "none", icon: 'none',
}); });
throw error; throw error;
} }
}; };
const goPay = async (type: number) => { const goPay = async (type: number) => {
console.log(prop);
if (!prop.jfInfo) if (!prop.jfInfo)
return Taro.showToast({ return Taro.showToast({
title: "未获取到订单信息", title: '未获取到订单信息~',
icon: "none", icon: 'none',
}); });
try { try {
console.log(prop.jfInfo);
// 1微信支付 2积分支付 3专属积分兑换
const { data } = await payOrder({ const { data } = await payOrder({
oid: prop.jfInfo, oid: prop.jfInfo.oid,
OrderType: prop.OrderType, OrderType: prop.OrderType,
PayType: type, PayType: type,
}); });
// 1微信支付 2积分支付
if (type === 1) { switch (type) {
if (data.data) { case 1:
Taro.requestPayment({ if (data.data) {
timeStamp: data.data.timeStamp, Taro.requestPayment({
nonceStr: data.data.nonceStr, timeStamp: data.data.timeStamp,
package: data.data.package, nonceStr: data.data.nonceStr,
signType: data.data.signType, package: data.data.package,
paySign: data.data.paySign, signType: data.data.signType,
success: function () { paySign: data.data.paySign,
Taro.showToast({ success: function () {
title: "支付成功", Taro.showToast({
icon: "success", title: '支付成功',
duration: 2000, icon: 'success',
}); duration: 2000,
emit("successPay", false); });
}, emit('successPay', false);
fail: function () { },
Taro.showToast({ fail: function () {
title: "支付失败", Taro.showToast({
icon: "none", title: '支付失败',
duration: 2000, icon: 'none',
}); duration: 2000,
emit("closePay", false); });
}, emit('closePay', false);
}); },
} else { });
} else {
Taro.showToast({
title: '支付失败,请稍后再试~',
icon: 'none',
});
emit('closePay', false);
}
break;
default:
Taro.showToast({ Taro.showToast({
title: "未知异常", title: '支付成功',
icon: "none", icon: 'none',
}); });
emit("closePay", false); emit('successPay', false);
} break;
} else {
Taro.showToast({
title: "支付成功",
icon: "success",
duration: 2000,
});
emit("successPay", false);
} }
} catch (e) { } catch (e) {
Taro.showToast({ Taro.showToast({
title: e.msg, title: e.msg,
icon: "none", icon: 'none',
}); });
emit("closePay", false); emit('closePay', false);
throw e; throw e;
} }
}; };
const closePay = () => { const closePay = () => {
Taro.showToast({ Taro.showToast({
title: "取消支付", title: '取消支付',
icon: "none", icon: 'none',
}); });
emit("closePay", false); emit('closePay', false);
}; };
</script> </script>

View File

@@ -1,41 +1,60 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { userSign } from "@/api/user";
const show = ref(false); const isShow = ref(false);
Taro.useLoad(async () => { defineExpose({
if (Taro.getStorageSync("token")) show.value = true; isShow,
// const res = await getSignRecord()
// console.log(res)
}); });
const toSign = async () => { const props = defineProps({
try { imgArr: {
await userSign(); required: true,
Taro.showToast({ type: Array,
title: "签到成功", default: () => [],
icon: "none", },
}); type: Number,
} catch (e) { cb: {
console.log(e); type: Function || null,
} default: null,
show.value = false; },
});
const imgs = ref(props.imgArr);
const clickFn = type => {
if (props.cb) props.cb(type);
else isShow.value = false;
}; };
const closeFn = () => {
isShow.value = false;
imgs.value.shift(0);
if (imgs.value.length !== 0) isShow.value = true;
};
Taro.useLoad(() => {
isShow.value = true;
});
</script> </script>
<template> <template>
<nut-overlay <nut-overlay
v-model:visible="show" v-model:visible="isShow"
:lock-scroll="true" :lock-scroll="true"
:close-on-click-overlay="false" :close-on-click-overlay="false">
>
<view class="wrapper"> <view class="wrapper">
<view @click.stop="toSign"> <view @click.stop="clickFn(type)">
<image class="image" src="../static/index/poppBg.png" /> <image
:style="{
width: imgs[0]?.naturalWidth,
height:
imgs[0]?.naturalHeight < 600 ? imgs[0]?.naturalHeight : '480px',
}"
:src="imgs[0]" />
</view> </view>
<view @click.stop="show = false"> <view @click.stop="closeFn">
<image class="icon" src="../static/index/close.png" /> <image class="icon" src="../static/index/close.png" />
</view> </view>
</view> </view>

View File

@@ -5,80 +5,68 @@
<view <view
class="toolbar" class="toolbar"
@click="format" @click="format"
style="max-height: 240px; overflow-y: auto" style="max-height: 240px; overflow-y: auto">
>
<!-- 加粗 --> <!-- 加粗 -->
<view <view
:class="data.formats.bold ? 'ql-active' : ''" :class="data.formats.bold ? 'ql-active' : ''"
class="iconfont icon-zitijiacu" class="iconfont icon-zitijiacu"
data-name="bold" data-name="bold"></view>
></view>
<!-- 斜体 --> <!-- 斜体 -->
<view <view
:class="data.formats.italic ? 'ql-active' : ''" :class="data.formats.italic ? 'ql-active' : ''"
class="iconfont icon-zitixieti" class="iconfont icon-zitixieti"
data-name="italic" data-name="italic"></view>
></view>
<!-- 下划线 --> <!-- 下划线 -->
<view <view
:class="data.formats.underline ? 'ql-active' : ''" :class="data.formats.underline ? 'ql-active' : ''"
class="iconfont icon-zitixiahuaxian" class="iconfont icon-zitixiahuaxian"
data-name="underline" data-name="underline"></view>
></view>
<!-- 对齐方式 --> <!-- 对齐方式 -->
<view <view
:class="data.formats.align === 'left' ? 'ql-active' : ''" :class="data.formats.align === 'left' ? 'ql-active' : ''"
class="iconfont icon-zuoduiqi" class="iconfont icon-zuoduiqi"
data-name="align" data-name="align"
data-value="left" data-value="left"></view>
></view>
<!-- 对齐方式居中 --> <!-- 对齐方式居中 -->
<view <view
:class="data.formats.align === 'center' ? 'ql-active' : ''" :class="data.formats.align === 'center' ? 'ql-active' : ''"
class="iconfont icon-juzhongduiqi" class="iconfont icon-juzhongduiqi"
data-name="align" data-name="align"
data-value="center" data-value="center"></view>
></view>
<!-- 对齐方式 --> <!-- 对齐方式 -->
<view <view
:class="data.formats.align === 'right' ? 'ql-active' : ''" :class="data.formats.align === 'right' ? 'ql-active' : ''"
class="iconfont icon-youduiqi" class="iconfont icon-youduiqi"
data-name="align" data-name="align"
data-value="right" data-value="right"></view>
></view>
<!-- 对齐方式两侧 --> <!-- 对齐方式两侧 -->
<view <view
:class="data.formats.align === 'justify' ? 'ql-active' : ''" :class="data.formats.align === 'justify' ? 'ql-active' : ''"
class="iconfont icon-zuoyouduiqi" class="iconfont icon-zuoyouduiqi"
data-name="align" data-name="align"
data-value="justify" data-value="justify"></view>
></view>
<!-- 有序排列 --> <!-- 有序排列 -->
<view <view
:class="data.formats.list === 'ordered' ? 'ql-active' : ''" :class="data.formats.list === 'ordered' ? 'ql-active' : ''"
class="iconfont icon-youxupailie" class="iconfont icon-youxupailie"
data-name="list" data-name="list"
data-value="ordered" data-value="ordered"></view>
></view>
<!-- 无序排列 --> <!-- 无序排列 -->
<view <view
:class="data.formats.list === 'bullet' ? 'ql-active' : ''" :class="data.formats.list === 'bullet' ? 'ql-active' : ''"
class="iconfont icon-wuxupailie" class="iconfont icon-wuxupailie"
data-name="list" data-name="list"
data-value="bullet" data-value="bullet"></view>
></view>
<!-- 取消缩进 --> <!-- 取消缩进 -->
<view <view
class="iconfont icon-outdent" class="iconfont icon-outdent"
data-name="indent" data-name="indent"
data-value="-1" data-value="-1"></view>
></view>
<!-- 缩进 --> <!-- 缩进 -->
<view <view
class="iconfont icon-indent" class="iconfont icon-indent"
data-name="indent" data-name="indent"
data-value="+1" data-value="+1"></view>
></view>
<!-- 添加分割线 --> <!-- 添加分割线 -->
<view class="iconfont icon-fengexian" @click="insertDivider"></view> <view class="iconfont icon-fengexian" @click="insertDivider"></view>
<!-- 插入图片 --> <!-- 插入图片 -->
@@ -88,22 +76,19 @@
:class="data.formats.header === 3 ? 'ql-active' : ''" :class="data.formats.header === 3 ? 'ql-active' : ''"
class="iconfont icon-H" class="iconfont icon-H"
data-name="header" data-name="header"
:data-value="3" :data-value="3"></view>
></view>
<!-- 下标 --> <!-- 下标 -->
<view <view
:class="data.formats.script === 'sub' ? 'ql-active' : ''" :class="data.formats.script === 'sub' ? 'ql-active' : ''"
class="iconfont icon-zitixiabiao" class="iconfont icon-zitixiabiao"
data-name="script" data-name="script"
data-value="sub" data-value="sub"></view>
></view>
<!-- 上标 --> <!-- 上标 -->
<view <view
:class="data.formats.script === 'super' ? 'ql-active' : ''" :class="data.formats.script === 'super' ? 'ql-active' : ''"
class="iconfont icon-zitishangbiao" class="iconfont icon-zitishangbiao"
data-name="script" data-name="script"
data-value="super" data-value="super"></view>
></view>
<view class="iconfont icon-undo" @click="undo"></view> <view class="iconfont icon-undo" @click="undo"></view>
<view class="iconfont icon-redo" @click="redo"></view> <view class="iconfont icon-redo" @click="redo"></view>
</view> </view>
@@ -115,8 +100,7 @@
@statuschange="onStatusChange" @statuschange="onStatusChange"
:show-img-resize="true" :show-img-resize="true"
@ready="onEditorReady" @ready="onEditorReady"
@input="getCtx" @input="getCtx" />
/>
</view> </view>
</view> </view>
</view> </view>
@@ -124,29 +108,29 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive } from "vue"; import { reactive } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { BASE_URL } from "@/utils/request"; import { BASE_URL } from '@/utils/request';
const { content } = defineProps<{ const { content } = defineProps<{
content: string; content: string;
}>(); }>();
let emits = defineEmits(["input"]); let emits = defineEmits(['input']);
const data = reactive<any>({ const data = reactive<any>({
editorCtx: "", editorCtx: '',
readOnly: false, readOnly: false,
placeholder: "请输入商品详情...", placeholder: '请输入商品详情...',
richText: "", richText: '',
formats: {}, formats: {},
}); });
function onEditorReady() { function onEditorReady() {
// 富文本节点渲染完成 // 富文本节点渲染完成
Taro.createSelectorQuery() Taro.createSelectorQuery()
.select("#editor") .select('#editor')
.context((res) => { .context(res => {
data.editorCtx = res.context; data.editorCtx = res.context;
// 初始化数据 // 初始化数据
if (content) { if (content) {
@@ -161,7 +145,7 @@ function onEditorReady() {
// 失去焦点时,获取富文本的内容 // 失去焦点时,获取富文本的内容
function getCtx(e: { detail: { html: any } }) { function getCtx(e: { detail: { html: any } }) {
data.richText = e.detail.html; data.richText = e.detail.html;
emits("input", e.detail.html); emits('input', e.detail.html);
} }
// 撤销操作 // 撤销操作
@@ -196,16 +180,16 @@ function insertDivider() {
function insertImage() { function insertImage() {
Taro.chooseImage({ Taro.chooseImage({
count: 1, count: 1,
sizeType: ["original", "compressed"], sizeType: ['original', 'compressed'],
sourceType: ["album", "camera"], sourceType: ['album', 'camera'],
success: (res) => { success: res => {
// 上传图片的逻辑各有不同,自行调整即可 // 上传图片的逻辑各有不同,自行调整即可
Taro.uploadFile({ Taro.uploadFile({
url: `${BASE_URL}/upload`, url: `${BASE_URL}/upload`,
name: "file", name: 'file',
header: { token: Taro.getStorageSync("token") }, header: { token: Taro.getStorageSync('token') },
filePath: res.tempFilePaths[0], filePath: res.tempFilePaths[0],
success: (res) => { success: res => {
console.log(res); console.log(res);
const imgData = JSON.parse(res.data) as { const imgData = JSON.parse(res.data) as {
code: number; code: number;
@@ -215,19 +199,19 @@ function insertImage() {
if (imgData.code === 200) { if (imgData.code === 200) {
// 将图片展示在编辑器中 // 将图片展示在编辑器中
data.editorCtx.insertImage({ data.editorCtx.insertImage({
width: "100%", width: '100%',
height: "auto", height: 'auto',
src: imgData.data.data, src: imgData.data.data,
alt: "图像", alt: '图像',
success: function () { success: function () {
console.log("insert image success"); console.log('insert image success');
}, },
}); });
} else { } else {
console.log("上传失败"); console.log('上传失败');
} }
}, },
fail: (err) => { fail: err => {
console.log(err); console.log(err);
}, },
}); });
@@ -237,7 +221,7 @@ function insertImage() {
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../static/font_4211210_2x20brbrv94.css"; @import '../static/font_4211210_2x20brbrv94.css';
.wrapper { .wrapper {
height: 100%; height: 100%;
@@ -266,7 +250,7 @@ function insertImage() {
.toolbar { .toolbar {
box-sizing: border-box; box-sizing: border-box;
border-bottom: 0; border-bottom: 0;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
} }
.ql-container { .ql-container {

View File

@@ -0,0 +1,63 @@
<template>
<view>
<view v-if="storeList.length > 0">
<view
class="bg-white rounded-[15px] mt-3 p-2 w-[95%] flex items-center"
v-for="(item, index) in storeList"
:key="index"
@click="goDetail(item)">
<image
class="w-[200px] h-[200px] rounded-[15px] mr-2"
:src="item.head_photo" />
<view class="flex-1">
<view class="text-[#333333] text-[30px] font-bold">{{
item.name
}}</view>
<nut-rate
spacing="1"
disabled
active-color="rgba(252, 207, 10, 1)"
v-model="item.rate" />
<view class="text-[#9E9E9E] text-[25px]">销量10000</view>
<view class="text-[#9E9E9E] text-[25px]"
>营业时间{{ item.week_start }}-{{ item.week_end }}</view
>
<view class="text-[#999999] text-[23px]">{{ item.address }}</view>
</view>
</view>
</view>
<nut-empty v-else description="暂无数据"></nut-empty>
</view>
</template>
<script setup lang="ts">
import { getStoreList } from '@/api/home';
import Taro from '@tarojs/taro';
import { ref } from 'vue';
const name = defineModel({
default: '',
});
const storeList = ref<any>([]);
Taro.useLoad(() => {
getList();
});
const getList = async () => {
const res = await getStoreList({
name: name.value,
});
storeList.value = res.data.data;
};
const goDetail = item => {
console.log(item);
Taro.setStorageSync('mer_info', item);
Taro.navigateTo({
url: `/pages/mer/mer_detail/index?bid=${item.bid}`,
});
};
</script>
<style lang="scss"></style>

View File

@@ -14,14 +14,13 @@
@touchstart="touchStart" @touchstart="touchStart"
@touchmove="touchMove" @touchmove="touchMove"
@touchend="touchEnd" @touchend="touchEnd"
@error="error" @error="error">
>
</canvas> </canvas>
</template> </template>
<script setup lang="ts" name="ucharts"> <script setup lang="ts" name="ucharts">
import uCharts from "../utils/js_sdk/u-charts.min.js"; import uCharts from '../utils/js_sdk/u-charts.min.js';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
const canvases = {}; const canvases = {};
@@ -29,7 +28,7 @@ const props = defineProps({
chartType: { chartType: {
required: true, required: true,
type: String, type: String,
default: "column", default: 'column',
}, },
opts: { opts: {
required: true, required: true,
@@ -40,7 +39,7 @@ const props = defineProps({
}, },
canvasId: { canvasId: {
type: String, type: String,
default: "u-canvas", default: 'u-canvas',
}, },
cWidth: { cWidth: {
default: 350, default: 350,
@@ -60,10 +59,10 @@ Taro.useLoad(() => {
const init = () => { const init = () => {
switch (props.chartType) { switch (props.chartType) {
case "column": case 'column':
initColumnChart(); initColumnChart();
break; break;
case "line": case 'line':
initLineChart(); initLineChart();
break; break;
default: default:
@@ -75,9 +74,9 @@ const initColumnChart = () => {
const ctx = Taro.createCanvasContext(props.canvasId); const ctx = Taro.createCanvasContext(props.canvasId);
canvases[props.canvasId] = new uCharts({ canvases[props.canvasId] = new uCharts({
context: ctx, context: ctx,
type: "column", type: 'column',
fontSize: 11, fontSize: 11,
background: "#FFFFFF", background: '#FFFFFF',
pixelRatio: props.pixelRatio, pixelRatio: props.pixelRatio,
animation: true, animation: true,
categories: props.opts.categories, categories: props.opts.categories,
@@ -99,9 +98,9 @@ const initColumnChart = () => {
}, },
extra: { extra: {
column: { column: {
type: "group", type: 'group',
width: 30, width: 30,
activeBgColor: "#000000", activeBgColor: '#000000',
activeBgOpacity: 0.08, activeBgOpacity: 0.08,
}, },
}, },
@@ -112,12 +111,12 @@ const initLineChart = () => {
const ctx = Taro.createCanvasContext(props.canvasId); const ctx = Taro.createCanvasContext(props.canvasId);
canvases[props.canvasId] = new uCharts({ canvases[props.canvasId] = new uCharts({
context: ctx, context: ctx,
type: "line", type: 'line',
fontSize: 11, fontSize: 11,
legend: true, legend: true,
dataLabel: false, dataLabel: false,
dataPointShape: true, dataPointShape: true,
background: "#FFFFFF", background: '#FFFFFF',
pixelRatio: props.pixelRatio, pixelRatio: props.pixelRatio,
categories: props.opts.categories, categories: props.opts.categories,
series: props.opts.series, series: props.opts.series,
@@ -133,21 +132,21 @@ const initLineChart = () => {
disableGrid: true, disableGrid: true,
}, },
yAxis: { yAxis: {
gridType: "dash", gridType: 'dash',
gridColor: "#CCCCCC", gridColor: '#CCCCCC',
dashLength: 8, dashLength: 8,
splitNumber: 5, splitNumber: 5,
min: 10, min: 10,
max: 180, max: 180,
format: (val) => { format: val => {
return val.toFixed(0) + "元"; return val.toFixed(0) + '元';
}, },
}, },
width: props.cWidth * props.pixelRatio, width: props.cWidth * props.pixelRatio,
height: props.cHeight * props.pixelRatio, height: props.cHeight * props.pixelRatio,
extra: { extra: {
line: { line: {
type: "straight", type: 'straight',
}, },
}, },
}); });
@@ -156,7 +155,7 @@ const initLineChart = () => {
const touchStart = (e: any) => { const touchStart = (e: any) => {
canvases[props.canvasId].showToolTip(e, { canvases[props.canvasId].showToolTip(e, {
format: function (item: any, category: any) { format: function (item: any, category: any) {
return category + " " + item.name + ":" + item.data; return category + ' ' + item.name + ':' + item.data;
}, },
}); });
canvases[props.canvasId].scrollStart(e); canvases[props.canvasId].scrollStart(e);

View File

@@ -6,15 +6,14 @@
:headers="config.headers" :headers="config.headers"
@success="success" @success="success"
@failure="failure" @failure="failure"
:multiple="multiple" :multiple="multiple">
>
</nut-uploader> </nut-uploader>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { BASE_URL } from "@/utils/request"; import { BASE_URL } from '@/utils/request';
import { computed, ref } from "vue"; import { computed, ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
const props = defineProps({ const props = defineProps({
list: { list: {
@@ -31,17 +30,17 @@ const props = defineProps({
}, },
}); });
const emits = defineEmits(["update:list"]); const emits = defineEmits(['update:list']);
const fileList = computed({ const fileList = computed({
get: () => props.list, get: () => props.list,
set: (val) => emits("update:list", val), set: val => emits('update:list', val),
}); });
const config = ref({ const config = ref({
url: `${BASE_URL}/upload`, url: `${BASE_URL}/upload`,
headers: { headers: {
token: Taro.getStorageSync("token"), token: Taro.getStorageSync('token'),
}, },
}); });
@@ -49,15 +48,15 @@ const success = (res: any) => {
const data = JSON.parse(res.responseText.data); const data = JSON.parse(res.responseText.data);
res.fileItem.url = data.data.data; res.fileItem.url = data.data.data;
Taro.showToast({ Taro.showToast({
title: "上传成功", title: '上传成功',
icon: "success", icon: 'success',
}); });
}; };
const failure = () => { const failure = () => {
Taro.showToast({ Taro.showToast({
title: "上传失败", title: '上传失败',
icon: "error", icon: 'error',
}); });
}; };
</script> </script>

View File

@@ -1,10 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, ref } from "vue"; import { computed, ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import headImg from "../static/def_avatar.png"; import headImg from '../static/def_avatar.png';
import logoImg from "../static/logo.jpg"; import logoImg from '../static/logo.jpg';
import { BASE_URL } from "@/utils/request"; import { BASE_URL } from '@/utils/request';
import { getPhone, login } from "@/api/user"; import { getPhone, login } from '@/api/user';
const props = defineProps({ const props = defineProps({
isShow: { isShow: {
@@ -12,18 +12,18 @@ const props = defineProps({
default: false, default: false,
}, },
}); });
const emits = defineEmits(["closeEdit", "update:isShow"]); const emits = defineEmits(['closeEdit', 'update:isShow']);
const userInfo = ref({ const userInfo = ref({
nickname: "", nickname: '',
avatar: "", avatar: '',
phone: "", phone: '',
}); });
const show = computed({ const show = computed({
get: (): boolean => props.isShow, get: (): boolean => props.isShow,
set: (val) => { set: val => {
emits("update:isShow", val); emits('update:isShow', val);
}, },
}); });
@@ -32,15 +32,15 @@ const mp_is_new = ref(true);
const canvasStatus = ref(false); const canvasStatus = ref(false);
const closeAttr = () => { const closeAttr = () => {
emits("closeEdit"); emits('closeEdit');
}; };
const onChooseAvatar = (e) => { const onChooseAvatar = e => {
const { avatarUrl } = e.detail; const { avatarUrl } = e.detail;
Taro.uploadFile({ Taro.uploadFile({
url: `${BASE_URL}/upload`, url: `${BASE_URL}/upload`,
filePath: avatarUrl, filePath: avatarUrl,
name: "file", name: 'file',
success: function (res) { success: function (res) {
const data = JSON.parse(res.data); const data = JSON.parse(res.data);
userInfo.value.avatar = data.data.data; userInfo.value.avatar = data.data.data;
@@ -54,7 +54,7 @@ const uploadPic = () => {
const getPhoneNumber = async (e: any) => { const getPhoneNumber = async (e: any) => {
Taro.showLoading({ Taro.showLoading({
title: "授权手机号中", title: '授权手机号中',
mask: true, mask: true,
}); });
const { code } = e.detail; const { code } = e.detail;
@@ -68,39 +68,39 @@ const getPhoneNumber = async (e: any) => {
const formSubmit = async (e: any) => { const formSubmit = async (e: any) => {
if (!userInfo.value.avatar) if (!userInfo.value.avatar)
return Taro.showToast({ return Taro.showToast({
title: "请上传头像", title: '请上传头像',
icon: "none", icon: 'none',
}); });
userInfo.value.nickname = e.detail.value.nickname; userInfo.value.nickname = e.detail.value.nickname;
if (!userInfo.value.nickname) if (!userInfo.value.nickname)
return Taro.showToast({ return Taro.showToast({
title: "请输入昵称", title: '请输入昵称',
icon: "none", icon: 'none',
}); });
if (!userInfo.value.phone) if (!userInfo.value.phone)
return Taro.showToast({ return Taro.showToast({
title: "请授权手机号码", title: '请授权手机号码',
icon: "none", icon: 'none',
}); });
const res = await login({ const res = await login({
Code: Taro.getStorageSync("wx_code"), Code: Taro.getStorageSync('wx_code'),
NickName: userInfo.value.nickname, NickName: userInfo.value.nickname,
AvatarUrl: userInfo.value.avatar, AvatarUrl: userInfo.value.avatar,
Phone: userInfo.value.phone, Phone: userInfo.value.phone,
Referee: Taro.getStorageSync("bind_id") || "", Referee: Taro.getStorageSync('bind_id') || '',
}); });
emits("closeEdit"); emits('closeEdit');
Taro.showToast({ Taro.showToast({
title: res.msg, title: res.msg,
icon: "success", icon: 'success',
duration: 2000, duration: 2000,
}); });
Taro.setStorageSync("token", res.data.token); Taro.setStorageSync('token', res.data.token);
setTimeout(() => { setTimeout(() => {
Taro.removeStorageSync("wx_code"); Taro.removeStorageSync('wx_code');
Taro.removeStorageSync("bind_id"); Taro.removeStorageSync('bind_id');
Taro.switchTab({ Taro.switchTab({
url: "/pages/user/index", url: '/pages/user/index',
}); });
}, 2000); }, 2000);
}; };
@@ -115,16 +115,15 @@ const formSubmit = async (e: any) => {
:style="{ padding: '20px 10px' }" :style="{ padding: '20px 10px' }"
v-model:visible="show" v-model:visible="show"
@close="closeAttr" @close="closeAttr"
:close-on-click-overlay="false" :close-on-click-overlay="false">
>
<view class="mp-data"> <view class="mp-data">
<image class="image" :src="logoImg"></image> <image class="image" :src="logoImg"></image>
<text class="mp-name">捷兑通 申请</text> <text class="mp-name">捷兑通 申请</text>
</view> </view>
<view class="trip-msg"> <!-- <view class="trip-msg">
<view class="title"> 获取您的昵称头像 </view> <view class="title"> 获取您的昵称头像 </view>
<view class="trip"> 提供具有辨识度的用户中心界面 </view> <view class="trip"> 提供具有辨识度的用户中心界面 </view>
</view> </view> -->
<form @submit="formSubmit"> <form @submit="formSubmit">
<view class="edit"> <view class="edit">
<view class="avatar edit-box"> <view class="avatar edit-box">
@@ -133,23 +132,19 @@ const formSubmit = async (e: any) => {
<view <view
class="avatar-box" class="avatar-box"
v-if="!mp_is_new" v-if="!mp_is_new"
@click.stop="uploadPic" @click.stop="uploadPic">
>
<image <image
:src="userInfo.avatar || headImg" :src="userInfo.avatar || headImg"
mode="aspectFill" mode="aspectFill"></image>
></image>
</view> </view>
<button <button
v-else v-else
class="avatar-box" class="avatar-box"
open-type="chooseAvatar" open-type="chooseAvatar"
@chooseavatar="onChooseAvatar" @chooseavatar="onChooseAvatar">
>
<image <image
:src="userInfo.avatar || headImg" :src="userInfo.avatar || headImg"
mode="aspectFill" mode="aspectFill"></image>
></image>
</button> </button>
</view> </view>
</view> </view>
@@ -163,8 +158,7 @@ const formSubmit = async (e: any) => {
placeholder="请输入昵称" placeholder="请输入昵称"
name="nickname" name="nickname"
:maxlength="16" :maxlength="16"
:value="userInfo.nickname" :value="userInfo.nickname" />
/>
</view> </view>
</view> </view>
</view> </view>
@@ -174,9 +168,8 @@ const formSubmit = async (e: any) => {
<view class="input"> <view class="input">
<button <button
open-type="getPhoneNumber" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" @getphonenumber="getPhoneNumber">
> {{ !userInfo.phone ? '请授权手机号' : '授权成功' }}
{{ !userInfo.phone ? "请授权手机号" : "授权成功" }}
</button> </button>
</view> </view>
</view> </view>

View File

@@ -1,11 +1,10 @@
<!DOCTYPE html> <!doctype html>
<html> <html>
<head> <head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta <meta
content="width=device-width,initial-scale=1,user-scalable=no" content="width=device-width,initial-scale=1,user-scalable=no"
name="viewport" name="viewport" />
/>
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" /> <meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no,address=no" /> <meta name="format-detection" content="telephone=no,address=no" />

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "GameView", navigationBarTitleText: '菜单',
}); });

View File

@@ -0,0 +1,67 @@
page {
// IOS安全区域
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.good-class {
margin-top: 10px;
.nut-tabs {
height: 100vh;
border-top: #fff 10px solid;
}
}
.list {
.item {
display: flex;
margin-bottom: 10px;
image {
width: 180px;
height: 180px;
border-radius: 10px;
}
.right {
flex: 1;
margin-left: 5px;
display: flex;
flex-direction: column;
justify-content: center;
// text-align: right;
.stock {
margin-top: 10px;
color: #8f8f8f;
}
.name {
// height: 20px;
font-size: 28px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-word;
}
.bom {
display: flex;
justify-content: space-between;
align-items: flex-end;
//margin-top: 10px;
.price {
font-size: 20px;
font-weight: bold;
color: #ff0000;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
}
}
}
}

View File

@@ -0,0 +1,174 @@
<template>
<view>
<!-- 商品列表 -->
<view class="good-class" v-if="class_list.length > 0">
<nut-tabs
v-model="value"
title-scroll
size="large"
direction="vertical"
title-gutter="5"
animated-time="0"
name="tabName">
<nut-tab-pane
v-for="(itm, index) in good_list"
:key="index"
:title="itm.name"
:pane-key="index">
<view v-if="itm.Goods.length > 0">
<view class="list" v-for="(item, index) in itm.Goods" :key="index">
<view class="item" @click.stop="toGoodDetails(item.gid, 1)">
<image :src="item.cover" lazy-load />
<view class="right">
<view class="name">{{ item.name }}</view>
<view class="stock">剩余:{{ item.stock }}</view>
<view class="bom">
<view>
<view class="price">
<text style="font-size: 15px">{{ item.number }}</text>
</view>
<!-- <view class="price">
<text style="font-size: 15px"
>{{ item.exchange }}积分</text
>
</view> -->
</view>
<nut-button
size="mini"
type="primary"
@click.stop="add_cart(item)">
<template #icon>
<Cart2 />
</template>
</nut-button>
</view>
</view>
</view>
</view>
</view>
<nut-empty v-else description="该分类暂无商品"></nut-empty>
<view style="height: 180rpx"></view>
</nut-tab-pane>
</nut-tabs>
</view>
<nut-empty v-else description="该商家暂无商品"></nut-empty>
<!-- 购物车 -->
<cart
ref="cartRef"
:mer-info="mer_info"
@update-cart="updateCartNum"
:IsPendingOrder="true" />
</view>
</template>
<script setup lang="ts">
import { Ref, ref } from 'vue';
import Taro from '@tarojs/taro';
import Cart from '../../../../components/Cart.vue';
import { Cart2 } from '@nutui/icons-vue-taro';
import { getGoodList, getMerCategory } from '../../../../api/goods';
interface goodList {
ID: number;
name: string;
bid: string;
Goods: GoodsType[];
}
interface GoodsType {
gid: string;
cover: string;
name: string;
number: number;
stock: number;
cartNum: number;
exchange: number;
}
interface CartItems {
bid: string;
gid: string;
number: number;
price: number;
cover: string;
name: string;
exchange: number;
}
const value = ref('0');
const good_list = ref<goodList[]>([]);
const class_list = ref<
Array<{
ID?: number;
name?: string;
}>
>([]);
Taro.useLoad(async e => {
mer_info.value = e;
await get_class_list(e.bid);
await cartRef.value.get_cart_list();
});
const get_class_list = async (bid: string) => {
const res = await getMerCategory({
Bid: bid,
});
class_list.value = res.data.data || [];
await get_good_list(class_list.value[0].ID as number, bid);
};
const get_good_list = async (id: number, bid: string) => {
Taro.showLoading({
title: '加载中',
mask: true,
});
const res = await getGoodList({
bid: bid,
goods_class_id: id,
status: 1,
state: 1,
});
good_list.value = res.data.data || [];
Taro.hideLoading();
};
const toGoodDetails = (id: string, type: number) => {
Taro.navigateTo({
url: `/pages/goods/goods_detail/index?gid=${id}&type=${type}`,
});
};
const cartRef = ref(null) as Ref;
const mer_info = ref<any>({});
const add_cart = (item: GoodsType) => {
const num = item.cartNum ? Number(item.cartNum) + 1 : 1;
cartRef.value.add_cart(item, num);
};
const updateCartNum = (cartItems: CartItems[]) => {
if (cartItems.length > 0) {
good_list.value.forEach((category: goodList) => {
category.Goods.forEach((good: GoodsType) => {
cartItems.forEach((cartItem: CartItems) => {
if (good.gid === cartItem.gid) {
good.cartNum = cartItem.number;
}
});
});
});
} else {
good_list.value.forEach((category: goodList) => {
category.Goods.forEach((good: GoodsType) => {
Reflect.deleteProperty(good, 'cartNum');
});
});
}
};
</script>
<style lang="scss">
@import './index.scss';
</style>

View File

@@ -0,0 +1,4 @@
export default definePageConfig({
navigationBarTitleText: '填写信息',
navigationStyle: 'custom',
});

View File

@@ -0,0 +1,46 @@
.container {
display: flex;
justify-content: center;
box-sizing: border-box;
height: 100vh;
background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png');
background-size: auto 40%;
background-repeat: no-repeat;
.form {
margin-top: 250px;
.form-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
.label {
width: 150px;
height: 91px;
line-height: 91px;
text-align: left;
}
input {
width: 482px;
height: 80px;
background: #f5f5f5;
border-radius: 10px;
border: 1px solid #ef5923;
padding: 0 10px;
}
}
}
}
.nut-dialog__header {
text-align: left;
font-weight: bold;
font-size: 36px;
height: auto;
}
.nut-dialog__content {
text-align: left !important;
font-size: 28px;
}

View File

@@ -0,0 +1,104 @@
<template>
<view>
<back-component title="填写信息" />
<view class="container">
<form class="form" @submit="formSubmit">
<view class="form-item">
<text class="label">台号</text>
<input
type="text"
placeholder="请输入台号比如包厢A01"
name="seat"
v-model="formVal.seat"
required />
</view>
<view class="form-item">
<text class="label">手机号</text>
<input
type="text"
placeholder="请输入客人手机号码"
name="phone"
v-model="formVal.phone"
required />
</view>
<view class="form-item">
<text class="label">备注</text>
<input
type="textarea"
placeholder="备注"
name="notes"
v-model="formVal.notes" />
</view>
<nut-button
style="border-radius: 7px"
type="primary"
block
shape="square"
form-type="submit"
>下一步</nut-button
>
</form>
</view>
<nut-dialog v-model:visible="visible" no-cancel-btn>
<template #header>提示</template>
<template #default
>客户手机号:
<text style="color: #fd0100">{{ formVal.phone }}</text>
没有注册捷兑 请通知他登录捷兑通小程序注册</template
>
</nut-dialog>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import BackComponent from '../../../../components/Back.vue';
import { checkPhone } from '../../../../api/admin';
const formVal = ref({
seat: '',
phone: '',
notes: '',
});
const visible = ref(false);
const formSubmit = async ({ detail }: any) => {
if (!detail.value.seat)
return Taro.showToast({
title: '请填写台号',
icon: 'none',
});
if (
!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(
detail.value.phone,
)
)
return Taro.showToast({
title: '请输入正确的手机号码',
icon: 'none',
});
try {
await checkPhone({ phone: detail.value.phone });
const user_info = await Taro.getStorageSync('userInfo');
Taro.navigateTo({
url: `/pages/admin/add_order/add_menu/index?type=1&bid=${user_info.data.bid}&seat=${formVal.value.seat}&phone=${formVal.value.phone}&notes=${formVal.value.notes}`,
success: () => {
formVal.value = {
seat: '',
phone: '',
notes: '',
};
},
});
} catch (error) {
console.log(error);
visible.value = true;
}
};
</script>
<style lang="scss">
@import './index.scss';
</style>

View File

@@ -0,0 +1,4 @@
export default definePageConfig({
navigationBarTitleText: '点单',
navigationStyle: 'custom',
});

View File

@@ -0,0 +1,46 @@
.container {
display: flex;
justify-content: center;
box-sizing: border-box;
height: 100vh;
// background-image: url('./static/WechatIMG10.jpg');
background-image: url('https://m.360buyimg.com/i/jfs/t1/288333/5/8622/43050/682e2e18Ff3a6e2af/bbc66c081c18a467.png');
background-size: 100% 35%;
background-repeat: no-repeat;
.card {
margin-top: 450px;
width: 703px;
height: 301px;
background: #ffffff;
border-radius: 20px;
display: flex;
justify-content: space-evenly;
align-items: center;
view image {
width: 75px;
height: 87px;
margin: 20px auto;
}
.comm {
display: flex;
flex-direction: column;
align-items: center;
.title {
font-size: 40px;
}
.sub {
color: #626262;
font-size: 25px;
}
}
.line {
width: 1px;
height: 188px;
background: #c8c8c8;
}
}
}

View File

@@ -0,0 +1,39 @@
<template>
<view>
<back-component />
<view class="container">
<view class="card">
<view
class="comm"
@click="navTo('/pages/admin/add_order/add_table/index')">
<text class="title">开始点单</text>
<image src="./static/dc.png"></image>
<text class="sub">线上点单后结系统</text>
</view>
<view class="line"></view>
<view
class="comm"
@click="navTo('/pages/admin/add_order/pending_order/index')">
<text class="title">我的订单</text>
<image src="./static/ddan.png"></image>
<text class="sub">查看我点餐的订单</text>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
import BackComponent from '../../../components/Back.vue';
const navTo = (path: string) => {
Taro.navigateTo({
url: path,
});
};
</script>
<style lang="scss">
@import './index.scss';
</style>

View File

@@ -0,0 +1,245 @@
<template>
<view>
<view class="footer" v-if="info.status !== 1">
<nut-popover
v-if="info.status !== 2"
v-model:visible="popoverShow"
:list="popoverList"
:duration="0"
location="bottom-start"
@choose="popoverChoose">
<template #reference>
<view class="text-[#9C9C9C] text-[30px]">更多</view>
</template>
</nut-popover>
<view v-else></view>
<view class="flex">
<!-- <view
v-if="info.status !== 2"
class="btn"
style="border: 1px #7f7f7f solid; color: #666666"
@click="visible = true"
>挂帐</view
> -->
<view
v-if="info.status !== 2"
class="btn"
style="background-color: #009ee0"
@click="to_menu_page"
>继续点单</view
>
<view
v-if="info.status !== 2"
class="btn"
style="background-color: none; color: black; border: 1px solid #000"
@click="cancelOrder"
>取消订单</view
>
<!-- <view
v-if="info.status !== 2"
class="btn"
style="background-color: #ffa938"
@click="visible1 = true"
>修改</view
> -->
<view class="btn" style="background-color: #fd0100" @click="to_pay_page"
>收款码</view
>
</view>
</view>
<nut-dialog v-model:visible="visible" @ok="onOk">
<template #header>挂帐</template>
<template #default
>确定要把
<text style="color: #fd0100">{{ info.seat }}</text>
进行挂帐吗</template
>
</nut-dialog>
<nut-dialog v-model:visible="visible1" @cancel="onCancel" @ok="onOk1">
<template #header>修改台号/备注</template>
<template #default>
<view class="mb">
<view>当前台号{{ info.seat }}</view>
<view class="flex">
<text>新台号:</text>
<nut-input v-model="formVal.seat" placeholder="请输入新台号" />
</view>
</view>
<view class="mb">
<view>当前备注{{ info.notes }}</view>
<view class="flex">
<text>新备注:</text>
<nut-input v-model="formVal.notes" placeholder="请输入新备注" />
</view>
</view>
</template>
</nut-dialog>
</view>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import {
cancelAfterOrder,
confirmAfterOrder,
editAfterOrder,
} from '@/api/admin';
import Taro from '@tarojs/taro';
const props = defineProps({
info: {
required: true,
type: Object,
},
});
onMounted(() => {
// console.log(props.info);
popoverList.value = [
{
name: '修改',
value: 1,
disabled: props.info.status === 2,
className: 'text-[35px] p-[10px]',
},
{
name: '挂帐',
value: 2,
disabled: props.info.status === 2,
className: 'text-[35px] p-[10px]',
},
];
console.log(popoverList.value);
});
const emits = defineEmits(['ok', 'cancelOrderOk']);
const visible = ref(false);
const visible1 = ref(false);
const formVal = ref({
seat: '',
notes: '',
});
const onCancel = () => {
visible.value = false;
};
const onOk = async () => {
visible.value = false;
const res = await confirmAfterOrder({
bid: props.info.bid,
oid: props.info.oid,
});
Taro.showToast({
title: res.msg,
icon: 'none',
});
emits('ok');
};
const onOk1 = async () => {
visible.value = false;
const res = await editAfterOrder({
bid: props.info.bid,
oid: props.info.oid,
seat: formVal.value.seat,
notes: formVal.value.notes,
});
Taro.showToast({
title: res.msg,
icon: 'none',
});
formVal.value = {
seat: '',
notes: '',
};
emits('ok');
};
const to_pay_page = () => {
Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/pay/index?oid=${props.info.oid}&bid=${props.info.bid}`,
});
};
const to_menu_page = () => {
Taro.navigateTo({
url: `/pages/admin/add_order/add_menu/index?type=1&bid=${props.info.bid}&oid=${props.info.oid}&seat=${props.info.seat}&phone=${props.info.phone}&notes=${props.info.notes}`,
});
};
const popoverShow = ref(false);
const popoverList = ref<any>([]);
const popoverChoose = e => {
console.log(e);
switch (e.value) {
case 1:
visible1.value = true;
break;
case 2:
visible.value = true;
break;
}
};
const cancelOrder = async () => {
const res = await cancelAfterOrder({
oid: props.info.oid,
});
Taro.showToast({
title: res.msg,
icon: 'none',
});
emits('cancelOrderOk');
};
</script>
<style lang="scss">
.footer {
display: flex;
justify-content: space-between;
padding: 20px;
align-items: center;
.btn {
width: 143px;
height: 56px;
border-radius: 28px;
text-align: center;
line-height: 56px;
color: #fff;
font-size: 26px;
margin-left: 30px;
}
}
.nut-dialog__header {
text-align: left;
font-weight: bold;
font-size: 36px;
height: auto;
}
.nut-dialog__content {
text-align: left !important;
font-size: 28px;
}
.mb {
margin-bottom: 20px;
}
.flex {
display: flex;
align-items: center;
text {
width: 150px;
}
}
</style>

View File

@@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '后结订单',
});

View File

@@ -0,0 +1,91 @@
page {
// IOS安全区域
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.tabs {
display: flex;
justify-content: space-between;
padding: 20px 30px;
background-color: #ffffff;
.item {
display: flex;
flex-direction: column;
text-align: center;
align-items: center;
font-size: 32px;
.active {
margin-top: 5px;
width: 62px;
height: 10px;
background: #fa2d1c;
border-radius: 5px;
}
}
}
.card {
width: 710px;
background: #ffffff;
border-radius: 12px;
margin: 20px auto;
box-sizing: border-box;
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
text {
margin-right: 10px;
color: #333333;
font-size: 28px;
}
}
.line {
width: inherit;
height: 1px;
background-color: #e9e9e9;
}
.goods-list {
display: flex;
margin: 20px;
image {
width: 195px;
min-width: 195px;
height: 195px;
border-radius: 12px;
margin-right: 20px;
}
.center {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-weight: bold;
text-align: left;
font-size: 30px;
}
}
.num {
flex: 1;
text-align: right;
color: #666666;
font-size: 26px;
}
}
.desc {
padding: 10px 20px;
color: #666666;
}
}

View File

@@ -0,0 +1,150 @@
<template>
<view>
<view class="tabs">
<view
class="item"
v-for="item in tabs"
:key="item.value"
@click="changeTabs(item.value)">
<text>{{ item.text }}</text>
<view
class="line"
:class="tabsIndex == item.value ? 'active' : ''"></view>
</view>
</view>
<view v-if="listData.length > 0">
<view
class="card"
v-for="(item, index) in listData as any[]"
:key="index">
<view class="header">
<view>
<text class="text-[#9C9C9C] text-[28px]"
>台号: {{ item.seat }}</text
>
<!-- <text>点单人: {{ item.PlaceUser?.nickName }}</text> -->
</view>
<view
:style="{
color: get_color(item.status),
fontWeight: 'bold',
}"
>{{ get_status_text(item.status) }}</view
>
</view>
<view class="line"></view>
<view @click="to_page(item)">
<view
class="goods-list"
v-for="(itm, idx) in item.OrderGoods"
:key="idx">
<image :src="itm.Goods.cover"></image>
<view class="center">
<nut-ellipsis
direction="end"
:content="itm.Goods.name"
rows="3"
expand-text="展开"
collapse-text="收起"></nut-ellipsis>
<view class="text-[#9C9C9C]">
<view>订单时间: {{ item.add_time.slice(0, 10) }}</view>
<view>备注: {{ item.notes }}</view>
</view>
</view>
<view class="num">
<view>{{ itm.pay_price }}</view>
<view>x{{ itm.number }}</view>
</view>
</view>
</view>
<!-- <view class="line"></view> -->
<Footer :info="item" @ok="get_list" @cancelOrderOk="get_list" />
</view>
</view>
<nut-empty v-else description="暂无订单"></nut-empty>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import Footer from './components/Footer.vue';
import { getAfterOrderList } from '@/api/admin';
const tabsIndex = ref(0);
const listData = ref([]);
const tabs = ref([
{
text: '全部',
value: 0,
},
{
text: '未收款',
value: 1,
},
{
text: '挂帐中',
value: 3,
},
{
text: '已收款',
value: 2,
},
]);
Taro.useDidShow(() => {
get_list();
});
const changeTabs = (index: number) => {
tabsIndex.value = index;
get_list();
};
const get_list = async () => {
Taro.showLoading({
title: '加载中',
});
const user_info = await Taro.getStorageSync('userInfo');
const { data: res } = await getAfterOrderList({
bid: user_info.data.bid,
status: tabsIndex.value,
});
listData.value = res.data || [];
Taro.hideLoading();
};
const get_color = (status: number) => {
switch (status) {
case 0:
return '#FD0100';
case 1:
return '#03A113';
case 2:
return '#FFA938';
}
};
const get_status_text = (status: number) => {
switch (status) {
case 0:
return '未付款';
case 1:
return '已付款';
case 2:
return '挂帐中';
}
};
const to_page = item => {
Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/pending_order_detail/index?bid=${item.bid}&oid=${item.oid}`,
});
};
</script>
<style lang="scss">
@import './index.scss';
</style>

View File

@@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '收款',
});

View File

@@ -0,0 +1,111 @@
.container {
padding: 20px;
.name {
font-size: 55px;
font-weight: bold;
margin: 45px 0;
}
.input {
display: flex;
align-items: center;
font-size: 50px;
position: relative;
input {
height: 100px;
margin-left: 15px;
}
&::before {
content: '¥';
color: #666666;
}
&::after {
content: '';
position: absolute;
bottom: -1px;
width: 700px;
height: 1px;
background-color: #000;
}
}
.card {
width: 710px;
background: #ffffff;
border-radius: 12px;
margin: 20px auto;
box-sizing: border-box;
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
text {
margin-right: 10px;
color: #333333;
font-size: 28px;
}
}
.line {
width: inherit;
height: 1px;
background-color: #e9e9e9;
}
.goods-list {
display: flex;
margin: 20px;
image {
width: 195px;
height: 195px;
border-radius: 12px;
}
.center {
margin-left: 20px;
.title {
font-weight: bold;
text-align: left;
font-size: 30px;
}
}
.num {
flex: 1;
text-align: right;
color: #666666;
font-size: 26px;
}
}
.desc {
padding: 10px 20px;
color: #666666;
display: flex;
font-size: 38px;
view {
margin-right: 50px;
}
}
}
.btn {
width: 709px;
height: 92px;
background: #fd0100;
color: #ffffff;
font-size: 32px;
text-align: center;
line-height: 92px;
border-radius: 10px;
}
}

View File

@@ -0,0 +1,129 @@
<template>
<view class="container">
<view class="name">立即收款</view>
<view class="input">
<input v-model="val" type="digit" placeholder="请输入收款金额" />
<view class="line"></view>
</view>
<view class="card">
<view class="header">
<view>
<text>台号: {{ data.seat }}</text>
<text>点单人: {{ data.PlaceUser?.nickName }}</text>
</view>
<view
:style="{
color: get_color(data.status),
fontWeight: 'bold',
}"
>{{ get_status_text(data.status) }}</view
>
</view>
<view class="line"></view>
<view class="goods-list" v-for="(itm, idx) in data.OrderGoods" :key="idx">
<image :src="itm.Goods.cover"></image>
<view class="center">
<nut-ellipsis
direction="end"
:content="itm.Goods.name"></nut-ellipsis>
<!-- <view class="title">{{ itm.Goods.name }}</view> -->
</view>
<view class="num">
<view>x{{ itm.pay_price }}</view>
<view>x{{ itm.number }}</view>
</view>
</view>
<view class="line"></view>
<view>
<view class="desc">
<view>总计: {{ data.count }}</view>
<view
>应付款: <text style="color: red">¥{{ data.payments }}</text></view
>
</view>
</view>
</view>
<nut-button
style="border-radius: 10px"
shape="square"
block
:loading="isLoading"
type="primary"
@click="ok"
>立即收款</nut-button
>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import { getAfterOrder, createPayQr } from '@/api/admin';
const data = ref<any>({});
const val = ref('');
const isLoading = ref(false);
Taro.useLoad((e: any) => {
get_data(e);
});
const get_data = async ({ bid, oid }) => {
Taro.showLoading({
title: '加载中',
});
const res = await getAfterOrder({ bid, oid });
data.value = res.data.data;
Taro.hideLoading();
};
const get_color = (status: number) => {
switch (status) {
case 0:
return '#FD0100';
case 1:
return '#03A113';
case 2:
return '#FFA938';
}
};
const get_status_text = (status: number) => {
switch (status) {
case 0:
return '未付款';
case 1:
return '已付款';
case 2:
return '挂帐中';
}
};
const ok = async () => {
if (!val.value)
return Taro.showToast({
title: '请输入收款金额',
icon: 'none',
});
isLoading.value = true;
const res = await createPayQr({
oid: data.value.oid,
bid: data.value.bid,
price: Number(val.value),
});
Taro.setStorageSync('pay_code', res.data.data.code_url);
Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/wx_pay_code/index?oid=${data.value.oid}&bid=${data.value.bid}`,
success: () => {
isLoading.value = false;
},
});
};
</script>
<style lang="scss">
@import './index.scss';
</style>

View File

@@ -0,0 +1,4 @@
export default definePageConfig({
navigationBarTitleText: '订单详情',
// navigationStyle: "custom",
});

View File

@@ -0,0 +1,80 @@
.card {
width: 710px;
background: #ffffff;
border-radius: 12px;
margin: auto;
box-sizing: border-box;
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
text {
margin-right: 10px;
color: #333333;
font-size: 28px;
}
}
.line {
width: inherit;
height: 1px;
background-color: #e9e9e9;
}
.goods-list {
display: flex;
margin: 20px;
image {
width: 195px;
height: 195px;
border-radius: 12px;
min-width: 195px;
margin-right: 20px;
}
.center {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-weight: bold;
text-align: left;
font-size: 30px;
}
}
.num {
flex: 1;
text-align: right;
color: #666666;
font-size: 26px;
}
}
.desc {
// padding: 10px 0px;
color: #666666;
}
}
.nut-cell-group {
margin: 20px;
font-size: 26px;
.nut-cell__title {
color: #181818;
}
.nut-cell__value {
color: #666666;
}
.nut-cell__title:nth-last-child(1) {
color: #333333;
font-size: 32px;
}
}

View File

@@ -0,0 +1,140 @@
<template>
<view>
<!-- <back-component title="订单详情" /> -->
<view class="card" style="margin-top: 15px">
<view class="header">
<view>
<text class="text-[#9C9C9C]">台号: {{ data.seat }}</text>
<!-- <text>点单人: {{ data.PlaceUser?.nickName }}</text> -->
</view>
<view
:style="{
color: get_color(data.status),
fontWeight: 'bold',
}"
>{{ get_status_text(data.status) }}</view
>
</view>
<view class="line"></view>
<view class="goods-list" v-for="(itm, idx) in data.OrderGoods" :key="idx">
<image :src="itm.Goods.cover"></image>
<view class="center">
<nut-ellipsis
direction="end"
:content="itm.Goods.name"
rows="3"
expand-text="展开"
collapse-text="收起"></nut-ellipsis>
<!-- <view class="title">{{ itm.Goods.name }}</view> -->
</view>
<view class="num">
<view>{{ itm.pay_price }}</view>
<view>x{{ itm.number }}</view>
</view>
</view>
<!-- <view class="line"></view> -->
<Footer :info="data" @ok="get_data" @cancelOrderOk="back" />
</view>
<nut-cell-group>
<nut-cell>
<template #title>
<text>订单信息</text>
</template>
</nut-cell>
<nut-cell title="台号" :desc="data.seat"></nut-cell>
<nut-cell title="客人手机号" :desc="data.phone"></nut-cell>
<nut-cell title="订单号" :desc="data.oid"></nut-cell>
<nut-cell title="点单人" :desc="data.PlaceUser?.nickName"></nut-cell>
<nut-cell title="下单时间" :desc="data.add_time"></nut-cell>
<nut-cell
v-if="data.status !== 0"
title="收款时间"
:desc="data.payment_time"></nut-cell>
<nut-cell
v-if="data.status !== 0 && data.status !== 1"
title="挂帐时间"
:desc="data.payment_time"></nut-cell>
<nut-cell
title="订单状态"
:desc="get_status_text(data.status)"></nut-cell>
<nut-cell title="下单数量" :desc="String(data.count)"></nut-cell>
<nut-cell title="订单金额" :desc="String(data.payments)"></nut-cell>
<nut-cell title="应收金额" :desc="String(data.payments)"></nut-cell>
<nut-cell title="赠送游戏豆" :desc="String(data.gift_pulse)"></nut-cell>
<nut-cell
v-if="data.status !== 0"
title="实收金额"
:desc="String(data.pay_amount)"></nut-cell>
<nut-cell
v-if="data.status !== 0"
title="抹零"
:desc="String(data.zero)"></nut-cell>
<nut-cell
v-if="data.status !== 0"
title="收款方式"
desc="微信"></nut-cell>
<nut-cell title="备注" :desc="data.notes"></nut-cell>
</nut-cell-group>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import Footer from '../components/Footer.vue';
import { getAfterOrder } from '@/api/admin';
// import BackComponent from "../../../../../components/Back.vue";
const data = ref<any>({});
const params = ref<any>({});
Taro.useLoad((e: any) => {
params.value = e;
get_data();
});
const get_data = async () => {
Taro.showLoading({
title: '加载中',
});
const res = await getAfterOrder({
bid: params.value.bid,
oid: params.value.oid,
});
data.value = res.data.data;
Taro.hideLoading();
};
const get_color = (status: number) => {
switch (status) {
case 0:
return '#FD0100';
case 1:
return '#03A113';
case 2:
return '#FFA938';
}
};
const get_status_text = (status: number) => {
switch (status) {
case 0:
return '未付款';
case 1:
return '已付款';
case 2:
return '挂帐中';
}
};
const back = () => {
Taro.navigateBack({
delta: 1,
});
};
</script>
<style lang="scss">
@import './index.scss';
</style>

View File

@@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '收款码',
});

View File

@@ -0,0 +1,38 @@
page {
background-color: #85b1ee;
}
.container {
.tips {
position: relative;
color: #fff;
font-family: MF JianHei (Noncommercial);
font-weight: 400;
text-align: center;
margin: 100px 0;
.name {
font-size: 115px;
}
.desc {
font-size: 52px;
}
}
.box {
margin: auto;
background-image: url('../../static/ewm.png');
background-size: 100% 100%;
width: 608px;
height: 457px;
position: relative;
.img {
position: absolute;
width: 280px;
height: 280px;
top: 66px;
right: 55px;
}
}
}

View File

@@ -0,0 +1,60 @@
<template>
<view class="container">
<view class="tips">
<view class="name">谢谢老板</view>
<view class="desc">请在这里扫码</view>
</view>
<view class="box">
<image class="img" :src="dataUrl" />
</view>
</view>
</template>
<script setup lang="ts">
import { onUnmounted, ref } from 'vue';
import Taro from '@tarojs/taro';
import { getAfterOrder } from '@/api/admin';
const time_id = ref();
const dataUrl = ref('');
const info = ref<any>({});
Taro.useLoad(e => {
info.value = e;
dataUrl.value = Taro.getStorageSync('pay_code');
time_id.value = setInterval(async () => {
const { data } = await getAfterOrder({
bid: info.value.bid,
oid: info.value.oid,
});
if (data.data.status !== 0 && data.data.status !== 2) {
Taro.showToast({
title: '支付成功',
icon: 'success',
});
setTimeout(() => {
Taro.removeStorageSync('pay_code');
Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${info.value.oid}&bid=${info.value.bid}`,
});
}, 3000);
}
}, 1000);
});
Taro.useDidHide(() => {
clearInterval(time_id.value);
Taro.removeStorageSync('pay_code');
});
onUnmounted(() => {
clearInterval(time_id.value);
Taro.removeStorageSync('pay_code');
});
</script>
<style lang="scss">
@import './index.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "订单详情", navigationBarTitleText: '订单详情',
}); });

View File

@@ -1,58 +1,87 @@
<template> <template>
<view> <view>
<view class="header"> <!-- 订单信息 -->
<view>订单号:{{ info.oid }}</view>
<view>{{ info.add_time }}</view>
</view>
<view class="good-info">
<view class="top">
<image :src="info.BindGoods?.cover" />
<view class="title">{{ info.BindGoods?.name }}</view>
</view>
<view class="public-total">
{{ info.count }}件商品已支付
<text class="money">{{ info.number }}</text>
</view>
</view>
<nut-cell-group> <nut-cell-group>
<nut-cell title="订单状态:" :desc="orderStatus"></nut-cell> <nut-cell>
<nut-cell title="下单用户:" :desc="info.BindUser?.nickName"></nut-cell> <template #default>
<nut-cell title="用户手机号:" :desc="info.BindUser?.phone"></nut-cell> <view class="center-box">
<view
class="top"
v-for="(item, index) in info.OrderGoods"
:key="index">
<image class="mr-10" :src="item.Goods?.cover" />
<view class="flex-1">
<view class="title">{{ item.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5">
<view
>{{ item.pay_price }}
<text v-if="item.pay_integral > 0"
>+{{ item.pay_integral }}积分</text
>
</view>
</view>
</view>
<view class="right">
<view>x{{ item.number }}</view>
</view>
</view>
<view
class="flex justify-between items-center mt-2 mb-2 text-[25px]">
<view class="text-[#9C9C9C]">{{ `${info.count}件商品` }}</view>
<text class="text-[26px] flex-1 text-right"
>{{ info.status !== 0 ? '实' : '应' }}付款:
{{ info.discount_price }} ()
<text v-if="info.exchange > 0"
>积分抵扣: {{ info.exchange }}</text
>
</text>
</view>
</view>
</template>
</nut-cell>
</nut-cell-group>
<nut-cell-group>
<nut-cell title="订单号:" :desc="info.oid"></nut-cell>
<nut-cell
title="订单状态:"
:desc="
info.status === 0
? '待付款'
: info.status === 1
? '待使用'
: info.status === 2
? '已使用'
: '已失效'
">
</nut-cell>
<nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell>
<nut-cell title="用户手机号:" :desc="info.User?.phone"></nut-cell>
<nut-cell title="下单时间:" :desc="info.add_time"></nut-cell>
<nut-cell
v-if="info.status === 2"
title="核销时间:"
:desc="info.cancel_time"></nut-cell>
<nut-cell <nut-cell
v-if="info.status === 2" v-if="info.status === 2"
title="核销人员:" title="核销人员:"
:desc="info.BindCancelUser?.nickName" :desc="info.CancelUser?.nickName"></nut-cell>
></nut-cell>
<nut-cell <nut-cell
v-if="info.status === 2" v-if="info.status === 2"
title="核销人手机号:" title="核销人手机号:"
:desc="info.BindCancelUser?.phone" :desc="info.CancelUser?.phone"></nut-cell>
></nut-cell>
</nut-cell-group> </nut-cell-group>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { ref } from "vue"; import { ref } from 'vue';
const info = ref<any>({}); const info = ref<any>({});
Taro.useLoad(() => { Taro.useLoad(() => {
info.value = Taro.getStorageSync("ver_order_info"); info.value = Taro.getStorageSync('ver_order_info');
}); });
const orderStatus = () => {
switch (info.value.status) {
case 1:
return "待核销";
case 2:
return "已核销";
case 3:
return "已失效";
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
@@ -60,6 +89,13 @@ page {
--nut-cell-desc-color: #000; --nut-cell-desc-color: #000;
} }
.line {
width: 100%;
height: 1px;
background-color: #f5f5f5;
margin: 10px;
}
.header { .header {
background: linear-gradient(90deg, #2291f8 0, #1cd1dc); background: linear-gradient(90deg, #2291f8 0, #1cd1dc);
padding: 30px; padding: 30px;
@@ -86,6 +122,7 @@ page {
image { image {
width: 200px; width: 200px;
height: 200px; height: 200px;
border-radius: 10px;
} }
.title { .title {
@@ -113,4 +150,79 @@ page {
color: #ff4c3c; color: #ff4c3c;
} }
} }
.card {
box-sizing: border-box;
margin: 15px auto;
background-color: #fff;
padding: 20px;
}
.center {
.top {
display: flex;
justify-content: space-between;
// align-items: flex-start;
margin-bottom: 10px;
image {
width: 150px;
height: 150px;
border-radius: 10px;
}
.title {
margin-left: 10px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
width: 350px;
}
.right {
margin-left: 10px;
font-size: 28px;
text-align: right;
}
}
}
.center-box {
display: flex;
flex-direction: column;
width: 100%;
.top {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10rpx;
image {
width: 150px;
height: 150px;
border-radius: 10rpx;
margin-right: 10px;
}
.title {
margin-left: 10px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
width: 350px;
}
.right {
margin-left: 10px;
font-size: 28px;
text-align: right;
}
}
}
</style> </style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "订单管理", navigationBarTitleText: '订单管理',
}); });

View File

@@ -0,0 +1,106 @@
.Card {
width: 90%;
background-color: #fff;
border-radius: 10px;
margin: 10px auto;
padding: 25px;
.top {
display: flex;
align-items: center;
text {
margin-right: 5px;
}
}
}
.icon {
color: red;
}
.gridBox {
width: 100%;
height: 100%;
display: grid;
grid-template-columns: repeat(3, 33.33%);
grid-template-rows: repeat(3, 33.33%);
grid-gap: 10px;
justify-content: center;
text-align: center;
.item {
margin-top: 50px;
.title {
font-size: 50px;
}
.sub {
font-size: 25px;
color: #999;
}
}
}
.table {
margin-top: 10px;
}
.orderinfo {
display: flex;
justify-content: space-between;
margin-top: 20px;
align-items: center;
.info {
text-align: center;
.num {
font-size: 40px;
color: red;
}
.sub {
font-size: 25px;
color: #999;
}
}
}
.pull-down {
margin: 20px auto;
.TriangleDownBox {
transform: rotate(180deg);
transition: all 0.5s;
}
.TriangleUpBox {
transform: rotate(0deg);
transition: all 0.5s;
}
.menu {
.active {
border-radius: 10px;
background-color: #de1414;
padding: 10px 20px;
color: #fff;
}
.noActive {
border-radius: 10px;
padding: 10px 20px;
color: #000;
background-color: #fff;
}
}
.MenuDownBox {
margin-top: 5px;
height: 0px;
transition: height 0.5s ease;
overflow: hidden;
}
.MenuUpBox {
margin-top: 5px;
height: 80px;
transition: height 0.5s ease;
overflow: hidden;
}
}

View File

@@ -25,6 +25,27 @@
</view> </view>
</view> </view>
</view> </view>
<view class="pull-down Card" style="background: none; padding: 0">
<view
class="mr-[5px] flex items-center justify-left"
@click="IsTriangleDown = !IsTriangleDown"
><text>数据筛选</text>
<TriangleDown
style="width: auto"
:class="[!IsTriangleDown ? 'TriangleDownBox' : 'TriangleUpBox']" />
</view>
<view
class="flex menu justify-between text-[28px]"
:class="[!IsTriangleDown ? 'MenuDownBox' : 'MenuUpBox']">
<view
v-for="(item, index) in menus"
:key="index"
:class="[menuIndex === index ? 'active' : 'noActive']"
@click="tabChange(index)"
>{{ item.text }}</view
>
</view>
</view>
<view class="Card"> <view class="Card">
<view class="top" <view class="top"
><text class="iconfont icon-shujutongji icon"></text ><text class="iconfont icon-shujutongji icon"></text
@@ -34,16 +55,14 @@
<navigator <navigator
class="item" class="item"
hover-class="none" hover-class="none"
:url="`/pages/admin/statistics/index?type=price&time=today`" :url="`/pages/admin/statistics/index?type=price&time=today`">
>
<view class="title">{{ orderInfo?.total?.TodayNumber || 0 }}</view> <view class="title">{{ orderInfo?.total?.TodayNumber || 0 }}</view>
<view class="sub">今日成交额</view> <view class="sub">今日成交额</view>
</navigator> </navigator>
<navigator <navigator
class="item" class="item"
hover-class="none" hover-class="none"
:url="`/pages/admin/statistics/index?type=price&time=yesterday`" :url="`/pages/admin/statistics/index?type=price&time=yesterday`">
>
<view class="title">{{ <view class="title">{{
orderInfo?.total?.YesterdayNumber || 0 orderInfo?.total?.YesterdayNumber || 0
}}</view> }}</view>
@@ -52,32 +71,28 @@
<navigator <navigator
class="item" class="item"
hover-class="none" hover-class="none"
:url="`/pages/admin/statistics/index?type=price&time=month`" :url="`/pages/admin/statistics/index?type=price&time=month`">
>
<view class="title">{{ orderInfo?.total?.MonthNumber || 0 }}</view> <view class="title">{{ orderInfo?.total?.MonthNumber || 0 }}</view>
<view class="sub">本月成交额</view> <view class="sub">本月成交额</view>
</navigator> </navigator>
<navigator <navigator
class="item" class="item"
hover-class="none" hover-class="none"
:url="`/pages/admin/statistics/index?type=order&time=today`" :url="`/pages/admin/statistics/index?type=order&time=today`">
>
<view class="title">{{ orderInfo?.total?.TodayOrder || 0 }}</view> <view class="title">{{ orderInfo?.total?.TodayOrder || 0 }}</view>
<view class="sub">今日订单数</view> <view class="sub">今日订单数</view>
</navigator> </navigator>
<navigator <navigator
class="item" class="item"
hover-class="none" hover-class="none"
:url="`/pages/admin/statistics/index?type=order&time=yesterday`" :url="`/pages/admin/statistics/index?type=order&time=yesterday`">
>
<view class="title">{{ orderInfo?.total?.YesterdayOrder || 0 }}</view> <view class="title">{{ orderInfo?.total?.YesterdayOrder || 0 }}</view>
<view class="sub">昨日订单数</view> <view class="sub">昨日订单数</view>
</navigator> </navigator>
<navigator <navigator
class="item" class="item"
hover-class="none" hover-class="none"
:url="`/pages/admin/statistics/index?type=order&time=month`" :url="`/pages/admin/statistics/index?type=order&time=month`">
>
<view class="title">{{ orderInfo?.total?.MonthOrder || 0 }}</view> <view class="title">{{ orderInfo?.total?.MonthOrder || 0 }}</view>
<view class="sub">本月订单数</view> <view class="sub">本月订单数</view>
</navigator> </navigator>
@@ -93,8 +108,7 @@
:bordered="true" :bordered="true"
class="table" class="table"
:columns="columns" :columns="columns"
:data="orderInfo?.list" :data="orderInfo?.list"></nut-table>
></nut-table>
</view> </view>
<nut-empty v-else description="暂无订单数据"></nut-empty> <nut-empty v-else description="暂无订单数据"></nut-empty>
</view> </view>
@@ -102,9 +116,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { h, ref } from "vue"; import { h, ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { orderStatistics } from "../../../api/admin"; import { TriangleDown } from '@nutui/icons-vue-taro';
import { orderStatistics } from '../../../api/admin';
Taro.useLoad(() => { Taro.useLoad(() => {
getData(); getData();
@@ -112,39 +127,64 @@ Taro.useLoad(() => {
const orderInfo = ref<any>({}); const orderInfo = ref<any>({});
const IsTriangleDown = ref(false);
const menuIndex = ref(0);
const menus = ref([
{
text: '微信支付',
value: 1,
},
{
text: '平台积分',
value: 2,
},
{
text: '小猪积分',
value: 3,
},
]);
const tabChange = (value: number) => {
menuIndex.value = value;
getData();
};
const columns = ref([ const columns = ref([
{ {
title: "日期", title: '日期',
key: "Date", key: 'Date',
align: "center", align: 'center',
}, },
{ {
title: "订单数", title: '订单数',
key: "TotalCount", key: 'TotalCount',
align: "center", align: 'center',
}, },
{ {
title: "交易额", title: '交易额',
key: "NumberSum", key: 'NumberSum',
align: "center", align: 'center',
render: (row) => { render: row => {
return h( return h(
"view", 'view',
{ {
style: { style: {
color: "red", color: 'red',
}, },
}, },
row.NumberSum row.NumberSum,
); );
}, },
}, },
]); ]);
const getData = async () => { const getData = async () => {
const user_info = Taro.getStorageSync("userInfo"); const user_info = Taro.getStorageSync('userInfo');
const res = await orderStatistics({ const res = await orderStatistics({
bid: user_info.data.bid, bid: user_info.data.bid,
pay_type: menus.value[menuIndex.value].value,
}); });
orderInfo.value = res.data; orderInfo.value = res.data;
}; };
@@ -157,69 +197,5 @@ const toListPage = (index: number) => {
</script> </script>
<style lang="scss"> <style lang="scss">
.Card { @import './index.scss';
width: 90%;
background-color: #fff;
border-radius: 10px;
margin: 10px auto;
padding: 25px;
.top {
display: flex;
align-items: center;
text {
margin-right: 5px;
}
}
}
.icon {
color: red;
}
.gridBox {
width: 100%;
height: 100%;
display: grid;
grid-template-columns: repeat(3, 33.33%);
grid-template-rows: repeat(3, 33.33%);
grid-gap: 10px;
justify-content: center;
text-align: center;
.item {
margin-top: 50px;
.title {
font-size: 50px;
}
.sub {
font-size: 25px;
color: #999;
}
}
}
.table {
margin-top: 10px;
}
.orderinfo {
display: flex;
justify-content: space-between;
margin-top: 20px;
align-items: center;
.info {
text-align: center;
.num {
font-size: 40px;
color: red;
}
.sub {
font-size: 25px;
color: #999;
}
}
}
</style> </style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "订单列表", navigationBarTitleText: '订单列表',
}); });

View File

@@ -0,0 +1,144 @@
.tabs-1 {
display: flex;
box-sizing: border-box;
justify-content: space-evenly;
align-items: center;
background-color: #fff;
// padding: 10px;
.item {
display: flex;
flex-direction: column;
align-items: center;
.line {
margin: 10px auto;
width: 50px;
height: 8px;
border-radius: 15px;
}
}
}
// .order-card {
// width: 95%;
// box-sizing: border-box;
// margin: 15px auto;
// background-color: #fff;
// border-radius: 10px;
// padding: 20px;
// .line {
// width: 100%;
// height: 1px;
// background-color: #f5f5f5;
// margin: 10px;
// }
// .top {
// // display: flex;
// // justify-content: space-between;
// // align-items: center;
// .name {
// font-weight: bold;
// }
// .sub {
// color: #999;
// font-size: 30px;
// }
// }
// .btn {
// display: flex;
// justify-content: flex-end;
// align-items: center;
// }
// .center {
// .top {
// display: flex;
// justify-content: space-between;
// // align-items: flex-start;
// image {
// width: 150px;
// height: 150px;
// border-radius: 10px;
// }
// .title {
// margin-left: 10px;
// display: -webkit-box;
// overflow: hidden;
// -webkit-line-clamp: 2;
// -webkit-box-orient: vertical;
// text-overflow: ellipsis;
// width: 350px;
// }
// .right {
// margin-left: 10px;
// font-size: 28px;
// text-align: right;
// }
// }
// }
// }
.order-card {
box-sizing: border-box;
margin: 15px auto;
background-color: #fff;
padding: 20px;
.line {
width: 100%;
height: 1px;
background-color: #f5f5f5;
margin: 10px;
}
.top {
display: flex;
justify-content: space-between;
align-items: center;
}
.btn {
display: flex;
justify-content: flex-end;
align-items: center;
}
.center {
// margin-bottom: 10px;
.top {
display: flex;
// justify-content: space-between;
align-items: flex-start;
image {
width: 150px;
height: 150px;
border-radius: 15px;
margin-right: 10px;
}
.title {
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
width: 350px;
}
.right {
margin-left: 10px;
font-size: 28px;
text-align: right;
color: #9c9c9c;
}
}
}
}

View File

@@ -1,19 +1,22 @@
<template> <template>
<view> <view>
<view class="tabs"> <view class="tabs-1">
<view <view
class="item" class="item"
v-for="item in opt" v-for="(item, index) in opt"
:key="item.value" :key="index"
@click="tabChange(item.value)" @click="tabChange(item.value)">
> <view
<view class="title">{{ item.text }}</view> :style="{
color: item.value === tabVal ? '#333333' : '#9C9C9C',
}"
>{{ item.text }}</view
>
<view <view
class="line" class="line"
:style="{ :style="{
backgroundColor: item.value === tabVal ? 'red' : '', backgroundColor: item.value === tabVal ? '#FFD940' : '',
}" }"></view>
></view>
</view> </view>
</view> </view>
<view v-if="dataList.length > 0"> <view v-if="dataList.length > 0">
@@ -21,73 +24,91 @@
class="order-card" class="order-card"
v-for="(item, index) in dataList" v-for="(item, index) in dataList"
:key="index" :key="index"
@click="toDetailPage(item)" @click="toDetailPage(item)">
>
<view class="top"> <view class="top">
<view class="name">订单号:{{ item.oid }}</view> <view class="text-[#9C9C9C] text-[25px]">订单号{{ item.oid }}</view>
<!-- <view class="sub">下单时间{{ item.add_time }}</view> --> <view
<view class="sub">核销时间{{ item.cancel_time || "待核销" }}</view> :style="{
<!-- <view style="color: red">{{ color:
item.status === 0 item.status === 0
? "待付款" ? '#FF850A'
: item.status === 1 : item.status === 1
? "待使用" ? '#F83D3D'
: item.status === 2 : item.status === 2
? "已使用" ? '#333333'
: "已失效" : '#9C9C9C',
}}</view> --> }"
>{{
item.status === 0
? '待付款'
: item.status === 1
? '待使用'
: item.status === 2
? '已使用'
: '已失效'
}}
</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="center" v-for="(itm, idx) in item.OrderGoods" :key="idx"> <view class="center" v-for="(itm, idx) in item.OrderGoods" :key="idx">
<view class="top"> <view class="top">
<image :src="itm.Goods.cover" /> <image class="mr-10" :src="itm.Goods.cover" />
<view class="title">{{ itm.Goods.name }} </view> <view class="flex-1">
<view class="title">{{ itm.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5">
<view
>{{ itm.pay_price }}
<text v-if="itm.pay_integral > 0"
>+{{ itm.pay_integral }}积分</text
>
</view>
</view>
</view>
<view class="right"> <view class="right">
<view>{{ itm.pay_price }}</view>
<view>{{ itm.pay_integral }}积分</view>
<view>x{{ itm.number }}</view> <view>x{{ itm.number }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="line"></view> <view
<view class="bom" style="text-align: right"> class="flex justify-between items-center mt-2 mb-2 text-[25px]"
{{ item.count }}件商品,支付方式:{{ v-if="item.status !== 0">
item.pay_type === 1 ? "微信" : "积分" <text class="text-[#9C9C9C]">{{ item.count }}件商品</text>
}},实付: <text class="text-[26px] flex-1 text-right"
<text style="color: red">{{ >{{ item.status !== 0 ? '实' : '应' }}付款:
item.pay_type === 1 ? item.price : item.exchange {{ item.discount_price }} ()
}}</text> <text v-if="item.exchange > 0">积分抵扣: {{ item.exchange }}</text>
</text>
</view> </view>
</view> </view>
</view> </view>
<nut-empty v-else description="暂无订单数据"></nut-empty> <nut-empty v-else description="暂无订单"></nut-empty>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { getActiveOrderList } from "../../../../api/admin"; import { getActiveOrderList } from '../../../../api/admin';
const opt = ref([ const opt = ref([
{ {
text: "全部", text: '全部',
value: 0, value: 0,
}, },
{ {
text: "待付款", text: '待付款',
value: 1, value: 1,
}, },
{ {
text: "待核销", text: '待核销',
value: 2, value: 2,
}, },
{ {
text: "已核销", text: '已核销',
value: 3, value: 3,
}, },
{ {
text: "已失效", text: '已失效',
value: 4, value: 4,
}, },
]); ]);
@@ -96,124 +117,64 @@ const tabVal = ref(0);
const dataList = ref<any>([]); const dataList = ref<any>([]);
Taro.useLoad((options) => { const pageOpt = ref({
page: 1,
total: 0,
});
Taro.useLoad(options => {
tabVal.value = Number(options.type); tabVal.value = Number(options.type);
getData(); getData();
}); });
const getData = async () => { const getData = async () => {
Taro.showLoading({
title: '加载中',
});
try { try {
const user_info = Taro.getStorageSync("userInfo"); const user_info = Taro.getStorageSync('userInfo');
const data = { const data = {
bid: user_info.data.bid, bid: user_info.data.bid,
status: tabVal.value, status: tabVal.value,
PageNum: pageOpt.value.page,
PageSize: 10,
}; };
const res = await getActiveOrderList(data); const res = await getActiveOrderList(data);
dataList.value = res.data.data; dataList.value.push(...res.data.data);
pageOpt.value.total = res.data.total || 0;
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({
title: error.msg, title: error.msg,
icon: "none", icon: 'none',
}); });
} }
Taro.hideLoading();
}; };
const tabChange = (e: number) => { const tabChange = (e: number) => {
tabVal.value = e; tabVal.value = e;
dataList.value = [];
getData(); getData();
}; };
const toDetailPage = (item: any) => { const toDetailPage = (item: any) => {
Taro.setStorageSync("ver_order_info", item); Taro.setStorageSync('ver_order_info', item);
Taro.navigateTo({ Taro.navigateTo({
url: "/pages/admin/order_manage/detail/index", url: '/pages/admin/order_manage/detail/index',
}); });
}; };
Taro.useReachBottom(() => {
if (pageOpt.value.total >= dataList.value.length)
return Taro.showToast({
title: '没有更多数据了',
icon: 'none',
});
pageOpt.value.page++;
getData();
});
</script> </script>
<style lang="scss"> <style lang="scss">
.tabs { @import './index.scss';
display: flex;
justify-content: space-evenly;
align-items: center;
background-color: #fff;
padding: 10px;
.item {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
.line {
margin-top: 10px;
width: 50px;
height: 5px;
}
}
}
.order-card {
width: 95%;
box-sizing: border-box;
margin: 15px auto;
background-color: #fff;
border-radius: 10px;
padding: 20px;
.line {
width: 100%;
height: 1px;
background-color: #f5f5f5;
margin: 10px;
}
.top {
// display: flex;
// justify-content: space-between;
// align-items: center;
.name {
font-weight: bold;
}
.sub {
color: #999;
font-size: 30px;
}
}
.btn {
display: flex;
justify-content: flex-end;
align-items: center;
}
.center {
.top {
display: flex;
justify-content: space-between;
// align-items: flex-start;
image {
width: 150px;
height: 150px;
}
.title {
margin-left: 10px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
width: 350px;
}
.right {
margin-left: 10px;
font-size: 28px;
text-align: right;
}
}
}
}
</style> </style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "订单数据统计", navigationBarTitleText: '订单数据统计',
}); });

View File

@@ -5,62 +5,66 @@
<view <view
class="item" class="item"
:class="time == 'today' ? 'on' : ''" :class="time == 'today' ? 'on' : ''"
@click="setTime('today')" @click="setTime('today')">
>
今天 今天
</view> </view>
<view <view
class="item" class="item"
:class="time == 'yesterday' ? 'on' : ''" :class="time == 'yesterday' ? 'on' : ''"
@click="setTime('yesterday')" @click="setTime('yesterday')">
>
昨天 昨天
</view> </view>
<view <view
class="item" class="item"
:class="time == 'seven' ? 'on' : ''" :class="time == 'seven' ? 'on' : ''"
@click="setTime('seven')" @click="setTime('seven')">
>
最近7天 最近7天
</view> </view>
<view <view
class="item" class="item"
:class="time == 'month' ? 'on' : ''" :class="time == 'month' ? 'on' : ''"
@click="setTime('month')" @click="setTime('month')">
>
本月 本月
</view> </view>
<view <view
class="item" class="item"
:class="time == 'date' ? 'on' : ''" :class="time == 'date' ? 'on' : ''"
@click="dateTitle" @click="dateTitle">
>
自定义 自定义
</view> </view>
</view> </view>
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="title"> <view class="flex justify-between">
{{ title }}{{ where.type == 1 ? "营业额" : "订单量" }} <view>
<view class="title">
{{ title }}{{ where.type == 1 ? '营业额' : '订单量' }}
</view>
<view v-if="where.type == 1" class="money">{{
dataObj.all || 0
}}</view>
<view v-else class="money">{{ dataObj.all || 0 }}</view>
</view>
<view>
<view class="title"> {{ title }}现金部分 </view>
<view class="money">{{ dataObj.all_discount }}</view>
</view>
</view> </view>
<view v-if="where.type == 1" class="money">{{ dataObj.all || 0 }}</view>
<view v-else class="money">{{ dataObj.all || 0 }}</view>
<view class="increase"> <view class="increase">
<view> <view>
{{ time === "date" ? "" : title }}增长率<text {{ time === 'date' ? '' : title }}增长率<text
:class="dataObj.growthRate >= 0 ? 'red' : 'green'" :class="dataObj.growthRate >= 0 ? 'red' : 'green'">
>
{{ dataObj.growthRate }}% {{ dataObj.growthRate }}%
<text <text
class="iconfont" class="iconfont"
:class=" :class="
dataObj.growthRate >= 0 ? 'icon-xiangshang1' : 'icon-xiangxia2' dataObj.growthRate >= 0 ? 'icon-xiangshang1' : 'icon-xiangxia2'
" "></text
></text
></text> ></text>
</view> </view>
<view> <view>
{{ time === "date" ? "" : title }}增长<text {{ time === 'date' ? '' : title }}增长<text
:class="dataObj.growthNumber >= 0 ? 'red' : 'green'" :class="dataObj.growthNumber >= 0 ? 'red' : 'green'"
>{{ dataObj.growthNumber }} >{{ dataObj.growthNumber }}
<text <text
@@ -69,8 +73,7 @@
dataObj.growthNumber >= 0 dataObj.growthNumber >= 0
? 'icon-xiangshang1' ? 'icon-xiangshang1'
: 'icon-xiangxia2' : 'icon-xiangxia2'
" "></text
></text
></text> ></text>
</view> </view>
</view> </view>
@@ -82,8 +85,7 @@
:ontouch="true" :ontouch="true"
@touchstart="touchStart" @touchstart="touchStart"
@touchmove="touchMove" @touchmove="touchMove"
@touchend="touchEnd" @touchend="touchEnd" />
/>
</view> </view>
<view class="Card"> <view class="Card">
@@ -96,8 +98,7 @@
:bordered="true" :bordered="true"
class="table" class="table"
:columns="columns" :columns="columns"
:data="dataObj?.list" :data="dataObj?.list"></nut-table>
></nut-table>
</view> </view>
<nut-empty v-else description="暂无订单数据"></nut-empty> <nut-empty v-else description="暂无订单数据"></nut-empty>
</view> </view>
@@ -106,22 +107,22 @@
<nut-calendar <nut-calendar
v-model:visible="isVisible" v-model:visible="isVisible"
type="range" type="range"
:default-value="pickerVal"
:start-date="date_start" :start-date="date_start"
@close="isVisible = false" @close="isVisible = false"
@choose="setChooseValue" @choose="setChooseValue">
>
</nut-calendar> </nut-calendar>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, h } from "vue"; import { ref, computed, h } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { growthRate } from "../../../api/admin"; import { growthRate } from '../../../api/admin';
import dayjs from "dayjs"; import dayjs from 'dayjs';
import uCharts from "../../../utils/js_sdk/u-charts.min.js"; import uCharts from '../../../utils/js_sdk/u-charts.min.js';
const time = ref(""); const time = ref('');
const isVisible = ref(false); const isVisible = ref(false);
@@ -137,44 +138,44 @@ const chartWH = ref({
const columns = ref([ const columns = ref([
{ {
title: "日期", title: '日期',
key: "Date", key: 'Date',
align: "center", align: 'center',
}, },
{ {
title: "订单数", title: '订单数',
key: "TotalCount", key: 'TotalCount',
align: "center", align: 'center',
}, },
{ {
title: "交易额", title: '交易额',
key: "NumberSum", key: 'NumberSum',
align: "center", align: 'center',
render: (row) => { render: row => {
return h( return h(
"view", 'view',
{ {
style: { style: {
color: "red", color: 'red',
}, },
}, },
row.NumberSum row.NumberSum,
); );
}, },
}, },
]); ]);
const date_start = computed(() => { const date_start = computed(() => {
return dayjs().startOf("year").format("YYYY-MM-DD"); return dayjs().startOf('year').format('YYYY-MM-DD');
}); });
const title = ref(""); const title = ref('');
const where = ref({ const where = ref({
type: 1, type: 1,
status: 2, status: 2,
start: "", start: '',
end: "", end: '',
}); });
const dataObj = ref<any>({}); const dataObj = ref<any>({});
@@ -183,49 +184,55 @@ const opts = ref<any>({
categories: [], categories: [],
series: [ series: [
{ {
name: "营业额", name: '营业额',
data: [], data: [],
}, },
{ {
name: "订单量", name: '订单量',
data: [], data: [],
}, },
], ],
}); });
Taro.useLoad((options) => { const pickerVal = ref<any>([]);
where.value.type = options.type === "price" ? 1 : 2;
Taro.useLoad(options => {
where.value.type = options.type === 'price' ? 1 : 2;
time.value = options.time; time.value = options.time;
setTime(options.time); setTime(options.time);
// getData(); // getData();
pickerVal.value = [
dayjs().format('YYYY-MM-DD'),
dayjs().format('YYYY-MM-DD'),
];
}); });
const setTime = (type: string) => { const setTime = (type: string) => {
time.value = type; time.value = type;
switch (type) { switch (type) {
case "today": case 'today':
title.value = "今日"; title.value = '今日';
where.value.status = 2; where.value.status = 2;
where.value.start = dayjs().format("YYYY-MM-DD"); where.value.start = dayjs().format('YYYY-MM-DD');
where.value.end = dayjs().format("YYYY-MM-DD"); where.value.end = dayjs().format('YYYY-MM-DD');
break; break;
case "yesterday": case 'yesterday':
title.value = "昨日"; title.value = '昨日';
where.value.status = 2; where.value.status = 2;
where.value.start = dayjs().add(-1, "day").format("YYYY-MM-DD"); where.value.start = dayjs().add(-1, 'day').format('YYYY-MM-DD');
where.value.end = dayjs().add(-1, "day").format("YYYY-MM-DD"); where.value.end = dayjs().add(-1, 'day').format('YYYY-MM-DD');
break; break;
case "seven": case 'seven':
title.value = "7天"; title.value = '7天';
where.value.status = 2; where.value.status = 2;
where.value.start = dayjs().add(-6, "day").format("YYYY-MM-DD"); where.value.start = dayjs().add(-6, 'day').format('YYYY-MM-DD');
where.value.end = dayjs().format("YYYY-MM-DD"); where.value.end = dayjs().format('YYYY-MM-DD');
break; break;
case "month": case 'month':
title.value = "本月"; title.value = '本月';
where.value.status = 1; where.value.status = 1;
where.value.start = dayjs().startOf("month").format("YYYY-MM-DD"); where.value.start = dayjs().startOf('month').format('YYYY-MM-DD');
where.value.end = dayjs().format("YYYY-MM-DD"); where.value.end = dayjs().format('YYYY-MM-DD');
break; break;
} }
getData(); getData();
@@ -233,7 +240,7 @@ const setTime = (type: string) => {
const dateTitle = () => { const dateTitle = () => {
where.value.status = 1; where.value.status = 1;
time.value = "date"; time.value = 'date';
isVisible.value = true; isVisible.value = true;
}; };
@@ -246,7 +253,7 @@ const setChooseValue = (ref: any) => {
const getData = async () => { const getData = async () => {
try { try {
const user_info = Taro.getStorageSync("userInfo"); const user_info = Taro.getStorageSync('userInfo');
const res = await growthRate({ const res = await growthRate({
bid: user_info.data.bid, bid: user_info.data.bid,
status: where.value.status, status: where.value.status,
@@ -266,16 +273,16 @@ const getData = async () => {
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({
title: error.msg, title: error.msg,
icon: "none", icon: 'none',
}); });
throw error; throw error;
} }
}; };
const create_canvas = () => { const create_canvas = () => {
const ctx = Taro.createCanvasContext("myChart"); const ctx = Taro.createCanvasContext('myChart');
canvas_obj = new uCharts({ canvas_obj = new uCharts({
type: "column", type: 'column',
context: ctx, context: ctx,
width: chartWH.value.width, width: chartWH.value.width,
height: chartWH.value.height, height: chartWH.value.height,
@@ -283,17 +290,17 @@ const create_canvas = () => {
series: opts.value.series, series: opts.value.series,
pixelRatio: chartWH.value.pixelRatio, pixelRatio: chartWH.value.pixelRatio,
animation: true, animation: true,
background: "#FFFFFF", background: '#FFFFFF',
color: [ color: [
"#1890FF", '#1890FF',
"#91CB74", '#91CB74',
"#FAC858", '#FAC858',
"#EE6666", '#EE6666',
"#73C0DE", '#73C0DE',
"#3CA272", '#3CA272',
"#FC8452", '#FC8452',
"#9A60B4", '#9A60B4',
"#ea7ccc", '#ea7ccc',
], ],
padding: [15, 15, 0, 15], padding: [15, 15, 0, 15],
enableScroll: true, enableScroll: true,
@@ -312,9 +319,9 @@ const create_canvas = () => {
}, },
extra: { extra: {
column: { column: {
type: "group", type: 'group',
width: 20, width: 20,
activeBgColor: "#000000", activeBgColor: '#000000',
activeBgOpacity: 0.08, activeBgOpacity: 0.08,
}, },
}, },
@@ -324,7 +331,7 @@ const create_canvas = () => {
const touchStart = (e: any) => { const touchStart = (e: any) => {
canvas_obj.showToolTip(e, { canvas_obj.showToolTip(e, {
format: function (item: any, category: any) { format: function (item: any, category: any) {
return category + " " + item.name + ":" + item.data; return category + ' ' + item.name + ':' + item.data;
}, },
}); });
canvas_obj.scrollStart(e); canvas_obj.scrollStart(e);
@@ -399,6 +406,7 @@ const touchEnd = (e: any) => {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.red { .red {
color: #ff6969; color: #ff6969;
} }
@@ -406,6 +414,7 @@ const touchEnd = (e: any) => {
.green { .green {
color: #1abb1d; color: #1abb1d;
} }
.iconfont { .iconfont {
font-size: 23px; font-size: 23px;
margin-left: 15px; margin-left: 15px;
@@ -432,6 +441,7 @@ const touchEnd = (e: any) => {
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
text { text {
margin-right: 5px; margin-right: 5px;
} }
@@ -440,6 +450,7 @@ const touchEnd = (e: any) => {
color: #fa2c19; color: #fa2c19;
} }
} }
.table { .table {
margin-top: 10px; margin-top: 10px;
} }

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "订单核销", navigationBarTitleText: '订单核销',
}); });

View File

@@ -1,13 +1,89 @@
<template> <template>
<view> <view>
<view class="card"> <view class="card">
<nut-button block type="primary" @click="scanCode">扫码核销</nut-button> <image
class="image"
@tap="scanCode"
src="https://p1.meituan.net/csc/696924dda634f05689dabdfbb18e88cc13551.png" />
<view class="mt-2 text-[#7A7A7A]">扫描二维码核销</view>
</view>
<view class="bg-white p-2">
<view class="mt-2 text-center text-[#7A7A7A]">最近核销记录</view>
<view v-if="list.length > 0">
<view
class="order-card"
v-for="(item, index) in list"
:key="index"
@click="toDetailPage(item)">
<view class="top">
<view class="text-[#9C9C9C] text-[25px]"
>订单号{{ item.oid }}</view
>
<view
:style="{
color:
item.status === 0
? '#FF850A'
: item.status === 1
? '#F83D3D'
: item.status === 2
? '#333333'
: '#9C9C9C',
}"
>{{
item.status === 0
? '待付款'
: item.status === 1
? '待使用'
: item.status === 2
? '已使用'
: '已失效'
}}
</view>
</view>
<view class="line"></view>
<view class="center" v-for="(itm, idx) in item.OrderGoods" :key="idx">
<view class="top">
<image class="mr-10" :src="itm.Goods.cover" />
<view class="flex-1">
<view class="title">{{ itm.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5">
<view
>{{ itm.pay_price }}
<text v-if="itm.pay_integral > 0"
>+{{ itm.pay_integral }}积分</text
>
</view>
</view>
</view>
<view class="right">
<view>x{{ itm.number }}</view>
</view>
</view>
</view>
<view
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
v-if="item.status !== 0">
<text class="text-[#9C9C9C]">{{ item.count }}件商品</text>
<text class="text-[26px] flex-1 text-right"
>{{ item.status !== 0 ? '实' : '应' }}付款:
{{ item.discount_price }} ()
<text v-if="item.exchange > 0"
>积分抵扣: {{ item.exchange }}</text
>
</text>
</view>
</view>
</view>
<nut-empty v-else description="暂无数据"></nut-empty>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { getActiveOrderList } from '@/api/admin';
import { ref } from 'vue';
// url参数转对象 // url参数转对象
// const urlParse = (url: string) => { // const urlParse = (url: string) => {
@@ -28,8 +104,8 @@ import Taro from "@tarojs/taro";
const scanCode = () => { const scanCode = () => {
Taro.scanCode({ Taro.scanCode({
onlyFromCamera: true, onlyFromCamera: true,
scanType: ["qrCode"], scanType: ['qrCode'],
success: async (res) => { success: async res => {
try { try {
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/admin/verify/verify_list/index?oid=${res.result}`, url: `/pages/admin/verify/verify_list/index?oid=${res.result}`,
@@ -37,32 +113,126 @@ const scanCode = () => {
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({
title: error.msg, title: error.msg,
icon: "none", icon: 'none',
}); });
} }
}, },
}); });
}; };
Taro.useLoad(() => {
getListOne();
});
const list = ref<any[]>([]);
const getListOne = async () => {
try {
const { data } = Taro.getStorageSync('userInfo');
const res = await getActiveOrderList({
PageNum: 1,
PageSize: 1,
bid: data.bid,
status: 0,
});
list.value = [res.data.data[0]];
console.log(list.value);
} catch (error) {
console.log(error);
}
};
const toDetailPage = (item: any) => {
Taro.setStorageSync('ver_order_info', item);
Taro.navigateTo({
url: '/pages/admin/order_manage/detail/index',
});
};
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #f5f5f5; background-color: #f5f5f5;
background-image: url("~@/static/admin/cancellation-header.png"); background-image: url('https://p0.meituan.net/csc/e6ff5582788af2023f49241afe22fc89391851.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 30%; background-size: 100% 25%;
} }
.card { .card {
width: 80%; width: 690px;
height: 300px; height: 300px;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
margin: 300px auto; margin: 300px auto 50px auto;
border-radius: 10px; border-radius: 33px;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 100px; padding: 0 100px;
.image {
width: 150px;
height: 150px;
}
}
.order-card {
box-sizing: border-box;
margin: 15px auto;
background-color: #fff;
padding: 20px;
.line {
width: 100%;
height: 1px;
background-color: #f5f5f5;
margin: 10px;
}
.top {
display: flex;
justify-content: space-between;
align-items: center;
}
.btn {
display: flex;
justify-content: flex-end;
align-items: center;
}
.center {
// margin-bottom: 10px;
.top {
display: flex;
// justify-content: space-between;
align-items: flex-start;
image {
width: 150px;
height: 150px;
border-radius: 15px;
margin-right: 10px;
}
.title {
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
width: 350px;
}
.right {
margin-left: 10px;
font-size: 28px;
text-align: right;
color: #9c9c9c;
}
}
}
} }
</style> </style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "核销列表", navigationBarTitleText: '核销列表',
}); });

View File

@@ -0,0 +1,38 @@
.card {
padding: 20rpx;
background-color: #fff;
margin: 20px auto;
.container {
display: flex;
justify-content: space-between;
.image {
width: 150px;
height: 150px;
border-radius: 15px;
margin-right: 20px;
}
.info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.title {
margin-bottom: 10px;
}
}
.line {
width: 100%;
height: 1px;
background-color: #f5f5f5;
margin: 10px 0;
}
}
.nut-button {
border-radius: 20px;
}

View File

@@ -1,49 +1,70 @@
<template> <template>
<view> <view>
<view class="card"> <view class="card">
<view>订单号{{ goodInfo.oid }}</view> <view class="text-[#7A7A7A]">订单号{{ goodInfo.oid }}</view>
<view class="line"></view> <view class="line"></view>
<view <view
class="container" class="container"
v-for="(item, index) in goodInfo.OrderGoods" v-for="(item, index) in goodInfo.OrderGoods"
:key="index" :key="index">
> <image class="image" :src="item.Goods.cover"></image>
<image class="image" :src="item.Goods.cover" mode="widthFix"></image>
<view class="info"> <view class="info">
<view class="title">商品名称{{ item.Goods.name }}</view> <view class="title">{{ item.Goods.name }}</view>
<view class="title">描述{{ item.Goods.profile }}</view> <view class="text-[#7A7A7A] text-[22px]">{{
<view class="num" item.Goods.profile || '此商品暂无描述'
>数量: <text style="color: red">{{ item.number }}</text></view }}</view>
>
</view> </view>
<view></view> <view class="text-[#9C9C9C]">x{{ item.number }}</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<text>支付方式{{ goodInfo.pay_type === 1 ? "微信" : "积分" }}</text <view
> class="flex justify-between items-center mt-3 mb-2 text-[25px]"
<text style="text-align: right">
>总计{{ <text class="text-[#9C9C9C] text-left"
goodInfo.pay_type === 1 ? goodInfo.price : goodInfo.exchange >{{ goodInfo.count }}件商品</text
}}</text >
> <text class="text-[26px] flex-1"
<view class="line"></view> >实付款: {{ goodInfo.discount_price }} ()
<view class="cz"> <text v-if="goodInfo.exchange > 0"
>积分抵扣: {{ goodInfo.exchange }}</text
>
</text>
</view>
<!-- <view class="line"></view> -->
<!-- <view class="cz">
<nut-button size="small" type="primary" @click="subVerify" <nut-button size="small" type="primary" @click="subVerify"
>确定核销</nut-button >确定核销</nut-button
> >
</view> </view> -->
</view>
<nut-cell-group>
<nut-cell title="订单信息"></nut-cell>
<nut-cell
title="下单时间:"
:desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
<nut-cell title="下单号码:" :desc="goodInfo.User?.phone"></nut-cell>
<nut-cell title="下单用户:" :desc="goodInfo.User?.nickName"></nut-cell>
<nut-cell
title="付款方式:"
:desc="getPayType(goodInfo.pay_type)"></nut-cell>
</nut-cell-group>
<view class="w-[90%] mt-[40px] m-auto">
<nut-button type="primary" shape="square" block @click="subVerify"
>确定核销</nut-button
>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { getActiveVerifyList, activeOrderVerify } from "@/api/admin"; import { getActiveVerifyList, activeOrderVerify } from '@/api/admin';
import { ref } from "vue"; import { ref } from 'vue';
const opt = ref<any>({}); const opt = ref<any>({});
Taro.useLoad((options) => { Taro.useLoad(options => {
opt.value = options; opt.value = options;
getData(options); getData(options);
}); });
@@ -51,15 +72,15 @@ Taro.useLoad((options) => {
const goodInfo = ref<any>({}); const goodInfo = ref<any>({});
const getData = async (options: any) => { const getData = async (options: any) => {
const merInfo = Taro.getStorageSync("mer_info"); const merInfo = Taro.getStorageSync('userInfo');
const res = await getActiveVerifyList({ const res = await getActiveVerifyList({
oid: options.oid, oid: options.oid,
bid: merInfo.bid, bid: merInfo.data.bid,
}); });
if (!res.data.data.oid) { if (!res.data.data.oid) {
Taro.showToast({ Taro.showToast({
title: "没有此订单", title: '没有此订单',
icon: "none", icon: 'none',
}); });
setTimeout(() => { setTimeout(() => {
Taro.navigateBack({ Taro.navigateBack({
@@ -74,62 +95,48 @@ const subVerify = async () => {
try { try {
const res = await activeOrderVerify({ const res = await activeOrderVerify({
oid: goodInfo.value.oid, oid: goodInfo.value.oid,
bid: goodInfo.value.bid,
}); });
Taro.showToast({ //Taro.showToast({
title: res.msg, // title: res.msg,
icon: "none", // icon: 'none',
//});
Taro.showModal({
title: '核销成功',
content: res.msg,
success: () => {
setTimeout(() => {
Taro.navigateBack({
delta: 1,
});
}, 3000);
},
}); });
setTimeout(() => {
Taro.navigateBack({
delta: 1,
});
}, 3000);
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({
title: error.msg, title: error.msg,
icon: "none", icon: 'none',
}); });
throw error; throw error;
} }
}; };
const getPayType = (type: number) => {
switch (type) {
case 1:
return '微信线上支付';
case 2:
return '平台积分支付';
case 3:
return '智多鑫积分支付';
case 3:
return '渔乐潮玩支付';
default:
return '未知';
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
.card { @import './index.scss';
padding: 20rpx;
background-color: #fff;
margin: 10px auto;
width: 90%;
border-radius: 7px;
.container {
display: flex;
image {
width: 150rpx;
height: 150rpx;
border-radius: 7px;
display: block;
}
.info {
margin-left: 20px;
}
.title {
margin-bottom: 10px;
}
}
.line {
width: 100%;
height: 1px;
background-color: #f5f5f5;
margin: 10px 0;
}
.cz {
text-align: right;
}
}
</style> </style>

View File

@@ -1,3 +1,4 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "收益提现", navigationBarTitleText: '余额提现',
enablePullDownRefresh: true,
}); });

View File

@@ -0,0 +1,125 @@
.text-red {
color: red;
}
.data {
display: flex;
flex-direction: column;
justify-content: center;
background-color: #fff;
padding: 10px;
.pagination {
margin: 10px auto;
}
}
.tag {
width: 100%;
padding: 5px 8px;
color: white;
border-radius: 8px;
margin: 0 auto;
}
.success {
color: #4fc08d;
}
.danger {
color: #df3526;
}
.warning {
color: #f3812e;
}
.image {
width: 50px;
height: 50px;
}
.card {
margin: 20px auto;
background-image: url('https://p0.meituan.net/csc/902ecf4ba9765a8200817d58a3a5a655172781.png');
background-size: 100% 100%;
width: 95%;
height: 250px;
border-radius: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
.container {
color: #fff;
padding: 45px 100px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
.line {
width: 1px;
height: 50px;
background-color: #ff9c9c;
}
}
.footer {
display: flex;
justify-content: space-between;
align-items: center;
color: #8a1717;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
background-color: rgba(255, 255, 255, 0.2);
padding: 10px 30px;
height: 150px;
}
}
.formCard {
width: 95%;
margin: auto;
border-radius: 20px;
background-color: #fff;
padding: 20px;
--nut-cell-box-shadow: none;
--nut-cell-padding: 10px 5px;
}
.nut-button {
border-radius: 20px;
border: none;
}
.title {
margin: 20px;
display: flex;
align-items: center;
.title-line {
width: 8px;
height: 35px;
background-color: #df3526;
border-radius: 20px;
margin-right: 10px;
}
}
.list {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #333333;
.item {
width: 95%;
background-color: #fff;
margin-bottom: 10px;
border-radius: 15px;
padding: 25px;
}
}

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