Compare commits

102 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
198 changed files with 6771 additions and 24902 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

@@ -1,64 +0,0 @@
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: amd64
steps:
- name: 测试服-依赖安装&&编译打包&&上传微信小程序平台
pull: if-not-exists
image: node:20-alpine
when:
branch:
- test
commands:
- npm config set registry https://registry.npmmirror.com/
- npm install -g pnpm
- pnpm install
- pnpm build:weapp:test:upload
- rm -rf dist.tar
- rm -rf node_modules
- name: 正式服-依赖安装&&编译打包&&上传微信小程序平台
pull: if-not-exists
image: node:20-alpine
when:
branch:
- master
commands:
- npm config set registry https://registry.npmmirror.com/
- npm install -g pnpm
- pnpm install
- pnpm build:weapp:prod:upload
- rm -rf dist.tar
- rm -rf node_modules
- name: 企业微信通知
pull: if-not-exists
image: plugins/webhook
when:
branch:
- test
- master
status:
- success
- failure
settings:
urls: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a2065e21-4f92-4f5b-a432-2c0cd1d965b5
content_type: application/json
template: |
{
"msgtype": "markdown",
"markdown": {
"content": "{{#success build.status}}✅{{else}}❌{{/success}}**{{ repo.owner }}/{{ repo.name }}** (Build #{{build.number}})\n
>**构建结果**: {{ build.status }}
>**构建详情**: [点击查看]({{ build.link }})
>**代码分支**: {{ build.branch }}
>**提交标识**: {{ build.commit }}
>**提交发起**: {{ build.author }}
>**提交信息**: {{ build.message }}
"
}
}

View File

@@ -2,13 +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_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?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,13 +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_FISH_GAME='https://jdt-prod-fish.wanzhuanyongcheng.cn/?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,8 +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_FISH_GAME='https://jdt-test-fish.wanzhuanyongcheng.cn/?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

View File

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

View File

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

View File

@@ -1,5 +1,3 @@
// babel-preset-taro 更多选项和默认值:
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
module.exports = { module.exports = {
presets: [ presets: [
[ [

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',
], ],
], ],
}, },

15
components.d.ts vendored
View File

@@ -1,11 +1,12 @@
// 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'] Back: typeof import('./src/components/Back.vue')['default']
@@ -29,16 +30,15 @@ declare module '@vue/runtime-core' {
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview'] NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview']
NutInput: typeof import('@nutui/nutui-taro')['Input'] NutInput: typeof import('@nutui/nutui-taro')['Input']
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'] NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']
NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard']
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']
NutRadio: typeof import('@nutui/nutui-taro')['Radio'] NutRadio: typeof import('@nutui/nutui-taro')['Radio']
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup'] NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup']
NutRate: typeof import('@nutui/nutui-taro')['Rate'] NutRate: typeof import('@nutui/nutui-taro')['Rate']
NutShortPassword: typeof import('@nutui/nutui-taro')['ShortPassword']
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']
@@ -50,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,31 @@
// @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 { 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;
} }
@@ -38,7 +38,7 @@ const config = {
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: {
@@ -48,13 +48,14 @@ const config = {
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'),
@@ -75,7 +76,7 @@ const config = {
}); });
chain.plugin('unplugin-vue-components').use( chain.plugin('unplugin-vue-components').use(
Components({ Components({
resolvers: [NutUIResolver({taro: true})], resolvers: [NutUIResolver({ taro: true })],
}), }),
); );
}, },
@@ -110,7 +111,7 @@ const config = {
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 })],
}), }),
); );
}, },

View File

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

View File

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

20727
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

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,44 +1,44 @@
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 * 后结api
@@ -46,32 +46,36 @@ export const addWithdraw = (data: object) =>
// 创建后结订单 // 创建后结订单
export const createAfterOrder = (data: object) => export const createAfterOrder = (data: object) =>
request("/later/order/place", data, "POST"); request('/later/order/place', data, 'POST');
// 获取商家后结订单列表 // 获取商家后结订单列表
export const getAfterOrderList = (data: object) => export const getAfterOrderList = (data: object) =>
request("/later/store/user/order", data, "POST"); request('/later/store/user/order', data, 'POST');
// 获取单个后结订单 // 获取单个后结订单
export const getAfterOrder = (data: object) => export const getAfterOrder = (data: object) =>
request("/later/order/details", data, "POST"); request('/later/order/details', data, 'POST');
// 确定挂帐 // 确定挂帐
export const confirmAfterOrder = (data: object) => export const confirmAfterOrder = (data: object) =>
request("/later/order/onAccount", data, "POST"); request('/later/order/onAccount', data, 'POST');
// 修改台号/备注 // 修改台号/备注
export const editAfterOrder = (data: object) => export const editAfterOrder = (data: object) =>
request("/later/order/edit", data, "POST"); request('/later/order/edit', data, 'POST');
// 生成付款二维码 // 生成付款二维码
export const createPayQr = (data: object) => export const createPayQr = (data: object) =>
request("/later/order/pay", data, "POST"); request('/later/order/pay', data, 'POST');
// 检查手机号码是否存在 // 检查手机号码是否存在
export const checkPhone = (data: object) => export const checkPhone = (data: object) =>
request("/user/find/phone", data, "POST"); request('/user/find/phone', data, 'POST');
// 获取商家特定用户会员积分2024-3-19 // 获取商家特定用户会员积分2024-3-19
export const getUserPoint = (data: object) => export const getUserPoint = (data: object) =>
request("/store/get/user/integral", data, "POST"); 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

@@ -86,3 +86,14 @@ export const getActiveOrderDetail = (data: object) =>
// 校验交易密码 // 校验交易密码
export const checkTradePwd = (data: object) => export const checkTradePwd = (data: object) =>
request('/user/check/payPassword', data, 'POST'); 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,10 +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"); 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,81 +1,89 @@
import request from "@/utils/request"; import request from '@/utils/request';
// 获取用户协议 // 获取用户协议
export const getAgreement = () => request("/user/agreement", {}, "POST"); 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');
/** /**
* 用户后结订单 * 用户后结订单
@@ -83,8 +91,8 @@ export const getGiftRecord = (data: object) =>
// 获取用户后结订单列表 // 获取用户后结订单列表
export const getUserAfterOrderList = (data: object) => export const getUserAfterOrderList = (data: object) =>
request("/later/user/order", data, "POST"); request('/later/user/order', data, 'POST');
// 获取用户后结订单详情 // 获取用户后结订单详情
export const getUserAfterOrderDetail = (data: object) => export const getUserAfterOrderDetail = (data: object) =>
request("/later/order/details", data, "POST"); request('/later/order/details', data, 'POST');

View File

@@ -6,8 +6,8 @@ export default defineAppConfig({
'pages/user/index', 'pages/user/index',
'pages/allClassList/index', 'pages/allClassList/index',
'pages/game/gamedetail/index', 'pages/game/gamedetail/index',
'pages/game/gameview/index',
'pages/game/view/index', 'pages/game/view/index',
'pages/fastBuy/index',
], ],
subPackages: [ subPackages: [
{ {
@@ -27,6 +27,7 @@ export default defineAppConfig({
'bindPhone/index', 'bindPhone/index',
'pending_order/index', 'pending_order/index',
'pending_order/pending_order_detail/index', 'pending_order/pending_order_detail/index',
'pwd/index',
], ],
}, },
{ {
@@ -71,7 +72,7 @@ export default defineAppConfig({
}, },
{ {
root: 'pages/marketing', root: 'pages/marketing',
pages: ['sign/index'], pages: ['sign/index', 'yq/index', 'scratch/index'],
}, },
{ {
root: 'pages/search', root: 'pages/search',
@@ -92,26 +93,26 @@ export default defineAppConfig({
list: [ list: [
{ {
pagePath: 'pages/index/index', pagePath: 'pages/index/index',
iconPath: 'static/tabbar/1-01.png', iconPath: 'static/tabbar/1-0.png',
selectedIconPath: 'static/tabbar/1-02.png', selectedIconPath: 'static/tabbar/1-1.png',
text: '首页', text: '首页',
}, },
{ // {
pagePath: 'pages/game/gamehome/index', // pagePath: 'pages/game/gamehome/index',
iconPath: 'static/tabbar/2-01.png', // iconPath: 'static/tabbar/2-0.png',
selectedIconPath: 'static/tabbar/2-02.png', // selectedIconPath: 'static/tabbar/2-1.png',
text: '游戏', // text: '游戏',
}, // },
{ {
pagePath: 'pages/cart/index', pagePath: 'pages/cart/index',
iconPath: 'static/tabbar/3-01.png', iconPath: 'static/tabbar/3-0.png',
selectedIconPath: 'static/tabbar/3-02.png', selectedIconPath: 'static/tabbar/3-1.png',
text: '购物车', text: '购物车',
}, },
{ {
pagePath: 'pages/user/index', pagePath: 'pages/user/index',
iconPath: 'static/tabbar/4-01.png', iconPath: 'static/tabbar/4-0.png',
selectedIconPath: 'static/tabbar/4-02.png', selectedIconPath: 'static/tabbar/4-1.png',
text: '我的', text: '我的',
}, },
], ],

View File

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

View File

@@ -1,4 +1,4 @@
import {createApp} from 'vue'; import { createApp } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import './app.scss'; import './app.scss';

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: () => {

View File

@@ -5,14 +5,14 @@
<view class="line"></view> <view class="line"></view>
<Home class="iconfont" @click="goHome" /> <Home class="iconfont" @click="goHome" />
</view> </view>
<text style="width: 2000px;text-align: center;">{{ props.title }}</text> <text style="width: 2000px; text-align: center">{{ props.title }}</text>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { computed } from "vue"; import { computed } from 'vue';
import { Home, Left } from "@nutui/icons-vue-taro"; import { Home, Left } from '@nutui/icons-vue-taro';
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight as number; const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight as number;
const BarHeight = computed(() => statusBarHeight - 7); const BarHeight = computed(() => statusBarHeight - 7);
@@ -20,7 +20,7 @@ const BarHeight = computed(() => statusBarHeight - 7);
const props = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
default: "", default: '',
}, },
}); });
@@ -32,7 +32,7 @@ const returns = () => {
const goHome = () => { const goHome = () => {
Taro.switchTab({ Taro.switchTab({
url: "/pages/index/index", url: '/pages/index/index',
}); });
}; };
</script> </script>

View File

@@ -1,10 +1,10 @@
<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 {Plus, Minus} from '@nutui/icons-vue-taro'; import { Plus, Minus } from '@nutui/icons-vue-taro';
import {createActiveOrder} from '@/api/goods'; import { createActiveOrder } from '@/api/goods';
import {createAfterOrder, getUserPoint} from '@/api/admin'; import { createAfterOrder, getUserPoint } from '@/api/admin';
import Pay from '@/components/Pay.vue'; import Pay from '@/components/Pay.vue';
interface CardList { interface CardList {
@@ -13,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);
@@ -38,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,
@@ -49,7 +55,7 @@ const add_cart = async (item: CardList, num: number = 1) => {
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,
@@ -72,25 +78,29 @@ 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) {
@@ -142,11 +152,10 @@ const create_order = async () => {
url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${res.data.oid}&bid=${props.merInfo.bid}`, url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${res.data.oid}&bid=${props.merInfo.bid}`,
}); });
} else { } else {
const mer_info = Taro.getStorageSync('mer_info');
const user_info = Taro.getStorageSync('userInfo'); const user_info = Taro.getStorageSync('userInfo');
const data = await getUserPoint({ const data = await getUserPoint({
phone: user_info.data.phone, phone: user_info.data.phone,
bid: mer_info.bid, bid: props.merInfo.bid,
}); });
res = await createActiveOrder({ res = await createActiveOrder({
Bid: [props.merInfo.bid], Bid: [props.merInfo.bid],
@@ -159,7 +168,7 @@ const create_order = async () => {
}; };
// isShowPay.value = true; // isShowPay.value = true;
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/goods/pay/index?oid=${res.data.oid}&bid=${mer_info.bid}`, url: `/pages/goods/pay/index?oid=${res.data.oid}&bid=${props.merInfo.bid}&OrderType=1`,
}); });
} }
} }
@@ -168,6 +177,11 @@ const create_order = async () => {
icon: 'none', 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',
@@ -188,26 +202,26 @@ defineExpose({
<!-- <view>购物车数量: {{ cartInfo.count }}</view> --> <!-- <view>购物车数量: {{ cartInfo.count }}</view> -->
<view class="cardImg"> <view class="cardImg">
<image <image
src="http://p1.meituan.net/csc/929f447a96a44b09a09b2e0055433222717.png"> src="https://p1.meituan.net/csc/929f447a96a44b09a09b2e0055433222717.png">
</image> </image>
<view class="count-text" v-if="cartInfo.count > 0"> <view class="count-text" v-if="cartInfo.count > 0">
<text>{{ cartInfo.count }}</text> <text>{{ cartInfo.count }}</text>
</view> </view>
</view> </view>
<view class="ml-1"> <view class="ml-1 text-[28px]">
<text>总金额: {{ cartInfo.price.toFixed(2) }}</text> <text>总金额: {{ cartInfo.discount_price.toFixed(2) }}</text>
<text v-if="!IsPendingOrder" <text v-if="!IsPendingOrder"
>积分: {{ cartInfo.exchange.toFixed(2) }}</text >积分抵扣: {{ 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: '15px'}" :style="{ padding: '15px' }"
round round
position="bottom" position="bottom"
z-index="1" z-index="1"
@@ -219,7 +233,7 @@ defineExpose({
<!-- <Del2 color="#666666" /> --> <!-- <Del2 color="#666666" /> -->
<image <image
class="w-[20px] h-[20px]" class="w-[20px] h-[20px]"
src="http://p0.meituan.net/csc/db4d11fd744b69435c6ffdc6bfc868c5684.png" /> src="https://p0.meituan.net/csc/db4d11fd744b69435c6ffdc6bfc868c5684.png" />
<text class="text-[20px]" style="color: #666666">清空购物车</text> <text class="text-[20px]" style="color: #666666">清空购物车</text>
</view> </view>
</view> </view>
@@ -232,7 +246,9 @@ defineExpose({
<view class="price flex"> <view class="price flex">
<view>现金:{{ item.price }}</view> <view>现金:{{ item.price }}</view>
<view class="ml-2">积分:{{ item.exchange }}</view> <view v-if="item.discount_integral > 0" class="ml-2"
>积分:{{ item.discount_integral }}</view
>
</view> </view>
</view> </view>
</view> </view>
@@ -290,21 +306,24 @@ $h-border-radius: 50px;
.cardImg { .cardImg {
position: relative; position: relative;
image { image {
width: 60px; width: 60px;
height: 60px; height: 60px;
} }
.count-text { .count-text {
position: absolute; position: absolute;
top: -10px; top: -10px;
right: -10px; right: -10px;
background-image: url('http://p0.meituan.net/csc/80b0e11d4270d09324df0b802d4c479b986.png'); background-image: url('https://p0.meituan.net/csc/80b0e11d4270d09324df0b802d4c479b986.png');
background-size: 100% 100%; background-size: 100% 100%;
// padding: 0 8px; // padding: 0 8px;
width: 35px; width: 35px;
height: 35px; height: 35px;
text-align: center; text-align: center;
line-height: 35px; line-height: 35px;
text { text {
margin: auto; margin: auto;
font-size: 25px; font-size: 25px;

View File

@@ -2,6 +2,7 @@
<view class="list-box"> <view class="list-box">
<view class="list"> <view class="list">
<swiper <swiper
v-if="bannerList.length !== 0"
class="item" class="item"
:style="{ :style="{
height: '250px', height: '250px',
@@ -82,23 +83,22 @@
</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, parseQueryString} from '@/utils'; import { calculateDistance, parseQueryString } from '@/utils';
import {bindParent, getBanner} 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,
default: 0,
},
});
const list1 = ref<Array<MerData>>([]); const list1 = ref<Array<MerData>>([]);
const list2 = ref<Array<MerData>>([]); const list2 = ref<Array<MerData>>([]);
Taro.useLoad(async () => { Taro.useLoad(() => {
init();
});
const init = async () => {
Taro.showLoading({ Taro.showLoading({
title: '加载中', title: '加载中',
}); });
@@ -119,7 +119,7 @@ Taro.useLoad(async () => {
} }
} }
Taro.hideLoading(); Taro.hideLoading();
}); };
interface MerData { interface MerData {
ID: number; ID: number;
@@ -149,11 +149,10 @@ const get_mer_list = async () => {
userLocalNum.value.t = res.latitude; userLocalNum.value.t = res.latitude;
}, },
}); });
const res = await getMerList({ const res = await getMerList({
PageNum: pageVal.value.page, PageNum: pageVal.value.page,
PageSize: 10, PageSize: 10,
class_id: props.classId, class_id: classId.value,
}); });
pageVal.value.total = res.data.total; pageVal.value.total = res.data.total;
@@ -168,8 +167,8 @@ const get_mer_list = async () => {
const bannerList = ref<any[]>([]); const bannerList = ref<any[]>([]);
const get_banner_list = async () => { const get_banner_list = async () => {
const {data}: any = await getBanner(); const { data }: any = await getBanner();
bannerList.value = data.data; bannerList.value = data.data || [];
}; };
const toPage = async (url: string) => { const toPage = async (url: string) => {
@@ -177,7 +176,7 @@ const toPage = async (url: string) => {
// url转对象 // url转对象
const obj = parseQueryString(url); const obj = parseQueryString(url);
if (obj.type === '1') { if (obj.type === '1') {
const {data: res} = await getMerList({}); const { data: res } = await getMerList({});
const mer = res.data.filter(item => item.bid === obj.bid)[0]; const mer = res.data.filter(item => item.bid === obj.bid)[0];
Taro.setStorageSync('mer_info', mer); Taro.setStorageSync('mer_info', mer);
} }
@@ -187,9 +186,14 @@ const toPage = async (url: string) => {
}; };
const toMerDetails = item => { const toMerDetails = item => {
Taro.setStorageSync('mer_info', item); Taro.requestSubscribeMessage({
Taro.navigateTo({ tmplIds: ['ewjjRxDJAQ_RbKU8CIjMNwfJXazyGQ95XbpKW16vMZs'],
url: `/pages/mer/mer_detail/index`, entityIds: [],
complete: () => {
Taro.navigateTo({
url: `/pages/mer/mer_detail/index?bid=${item.bid}`,
});
},
}); });
}; };
@@ -209,6 +213,7 @@ Taro.useReachBottom(() => {
<style lang="scss"> <style lang="scss">
.list-box { .list-box {
margin: 20px;
padding: 10px; padding: 10px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@@ -218,8 +223,8 @@ Taro.useReachBottom(() => {
overflow: scroll; overflow: scroll;
.item { .item {
width: 350px; width: 340px;
margin-bottom: 10px; margin-bottom: 18px;
border-radius: 20px; border-radius: 20px;
background-color: #fff; background-color: #fff;
@@ -233,7 +238,7 @@ Taro.useReachBottom(() => {
.title { .title {
color: #333333; color: #333333;
font-size: 28px; font-size: 30px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
// white-space: nowrap; // white-space: nowrap;
@@ -249,10 +254,13 @@ Taro.useReachBottom(() => {
.icon { .icon {
display: inline-block; display: inline-block;
font-size: 30px; font-size: 30px;
width: 25px;
height: 25px;
margin-right: 10px;
} }
.desc { .desc {
font-size: 25px; font-size: 28px;
} }
} }
} }

View File

@@ -7,19 +7,16 @@
: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 size="30" :name="require('../static/wx.png')" /> <IconFont size="30" :name="require('../static/wx.png')" />
</template> </template>
@@ -28,18 +25,16 @@
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 size="30" :name="require('../static/pt.png')" /> <IconFont size="30" :name="require('../static/pt.png')" />
</template> </template>
</nut-cell> </nut-cell>
<nut-cell <nut-cell
title="天才小猪积分支付" title="智多鑫积分支付"
:desc="`剩余积分:${jfInfo.jh_info?.integral || 0}`" :desc="`剩余积分:${jfInfo.jh_info?.integral || 0}`"
is-link is-link
@click="goPay(3)" @click="goPay(3)">
>
<template v-slot:icon> <template v-slot:icon>
<IconFont size="30" :name="require('../static/jh.png')" /> <IconFont size="30" :name="require('../static/jh.png')" />
</template> </template>
@@ -50,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: {
@@ -78,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 }>({});
@@ -86,7 +81,7 @@ watch(
() => prop.isShowPay, () => prop.isShowPay,
() => { () => {
getInfo(); getInfo();
} },
); );
const getInfo = async () => { const getInfo = async () => {
@@ -96,7 +91,7 @@ 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;
} }
@@ -105,8 +100,8 @@ const getInfo = async () => {
const goPay = async (type: number) => { const goPay = async (type: number) => {
if (!prop.jfInfo) if (!prop.jfInfo)
return Taro.showToast({ return Taro.showToast({
title: "未获取到订单信息~", title: '未获取到订单信息~',
icon: "none", icon: 'none',
}); });
try { try {
console.log(prop.jfInfo); console.log(prop.jfInfo);
@@ -128,53 +123,53 @@ const goPay = async (type: number) => {
paySign: data.data.paySign, paySign: data.data.paySign,
success: function () { success: function () {
Taro.showToast({ Taro.showToast({
title: "支付成功", title: '支付成功',
icon: "success", icon: 'success',
duration: 2000, duration: 2000,
}); });
emit("successPay", false); emit('successPay', false);
}, },
fail: function () { fail: function () {
Taro.showToast({ Taro.showToast({
title: "支付失败", title: '支付失败',
icon: "none", icon: 'none',
duration: 2000, duration: 2000,
}); });
emit("closePay", false); emit('closePay', false);
}, },
}); });
} else { } else {
Taro.showToast({ Taro.showToast({
title: "支付失败,请稍后再试~", title: '支付失败,请稍后再试~',
icon: "none", icon: 'none',
}); });
emit("closePay", false); emit('closePay', false);
} }
break; break;
default: default:
Taro.showToast({ Taro.showToast({
title: "支付成功", title: '支付成功',
icon: "none", icon: 'none',
}); });
emit("successPay", false); emit('successPay', false);
break; break;
} }
} 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,47 +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';
const show = ref(false); const isShow = ref(false);
const overlay = ref();
defineExpose({ defineExpose({
show, isShow,
}); });
defineProps({ const props = defineProps({
src: { imgArr: {
required: true, required: true,
type: String, type: Array,
default: "", default: () => [],
}, },
type: Number, type: Number,
cb: { cb: {
required: true, type: Function || null,
type: Function, default: null,
default: () => {},
}, },
}); });
Taro.useLoad(async () => { const imgs = ref(props.imgArr);
if (Taro.getStorageSync("token")) show.value = true;
// const res = await getSignRecord() const clickFn = type => {
// console.log(res) 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="cb(type)"> <view @click.stop="clickFn(type)">
<image class="image" :src="src" /> <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,8 +115,7 @@ 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>
@@ -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: "菜单", navigationBarTitleText: '菜单',
}); });

View File

@@ -64,4 +64,4 @@ page {
} }
} }
} }
} }

View File

@@ -9,14 +9,12 @@
direction="vertical" direction="vertical"
title-gutter="5" title-gutter="5"
animated-time="0" animated-time="0"
name="tabName" name="tabName">
>
<nut-tab-pane <nut-tab-pane
v-for="(itm, index) in good_list" v-for="(itm, index) in good_list"
:key="index" :key="index"
:title="itm.name" :title="itm.name"
:pane-key="index" :pane-key="index">
>
<view v-if="itm.Goods.length > 0"> <view v-if="itm.Goods.length > 0">
<view class="list" v-for="(item, index) in itm.Goods" :key="index"> <view class="list" v-for="(item, index) in itm.Goods" :key="index">
<view class="item" @click.stop="toGoodDetails(item.gid, 1)"> <view class="item" @click.stop="toGoodDetails(item.gid, 1)">
@@ -29,17 +27,16 @@
<view class="price"> <view class="price">
<text style="font-size: 15px">{{ item.number }}</text> <text style="font-size: 15px">{{ item.number }}</text>
</view> </view>
<view class="price"> <!-- <view class="price">
<text style="font-size: 15px" <text style="font-size: 15px"
>{{ item.exchange }}积分</text >{{ item.exchange }}积分</text
> >
</view> </view> -->
</view> </view>
<nut-button <nut-button
size="mini" size="mini"
type="primary" type="primary"
@click.stop="add_cart(item)" @click.stop="add_cart(item)">
>
<template #icon> <template #icon>
<Cart2 /> <Cart2 />
</template> </template>
@@ -56,16 +53,20 @@
</view> </view>
<nut-empty v-else description="该商家暂无商品"></nut-empty> <nut-empty v-else description="该商家暂无商品"></nut-empty>
<!-- 购物车 --> <!-- 购物车 -->
<cart ref="cartRef" :mer-info="mer_info" @update-cart="updateCartNum" :IsPendingOrder="true" /> <cart
ref="cartRef"
:mer-info="mer_info"
@update-cart="updateCartNum"
:IsPendingOrder="true" />
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { Ref, ref } from "vue"; import { Ref, ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import Cart from "../../../../components/Cart.vue"; import Cart from '../../../../components/Cart.vue';
import { Cart2 } from "@nutui/icons-vue-taro"; import { Cart2 } from '@nutui/icons-vue-taro';
import { getGoodList, getMerCategory } from "../../../../api/goods"; import { getGoodList, getMerCategory } from '../../../../api/goods';
interface goodList { interface goodList {
ID: number; ID: number;
@@ -94,7 +95,7 @@ interface CartItems {
exchange: number; exchange: number;
} }
const value = ref("0"); const value = ref('0');
const good_list = ref<goodList[]>([]); const good_list = ref<goodList[]>([]);
const class_list = ref< const class_list = ref<
Array<{ Array<{
@@ -103,8 +104,8 @@ const class_list = ref<
}> }>
>([]); >([]);
Taro.useLoad(async (e) => { Taro.useLoad(async e => {
mer_info.value = e mer_info.value = e;
await get_class_list(e.bid); await get_class_list(e.bid);
await cartRef.value.get_cart_list(); await cartRef.value.get_cart_list();
}); });
@@ -119,7 +120,7 @@ const get_class_list = async (bid: string) => {
const get_good_list = async (id: number, bid: string) => { const get_good_list = async (id: number, bid: string) => {
Taro.showLoading({ Taro.showLoading({
title: "加载中", title: '加载中',
mask: true, mask: true,
}); });
const res = await getGoodList({ const res = await getGoodList({
@@ -161,7 +162,7 @@ const updateCartNum = (cartItems: CartItems[]) => {
} else { } else {
good_list.value.forEach((category: goodList) => { good_list.value.forEach((category: goodList) => {
category.Goods.forEach((good: GoodsType) => { category.Goods.forEach((good: GoodsType) => {
Reflect.deleteProperty(good, "cartNum"); Reflect.deleteProperty(good, 'cartNum');
}); });
}); });
} }
@@ -169,5 +170,5 @@ const updateCartNum = (cartItems: CartItems[]) => {
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./index.scss"; @import './index.scss';
</style> </style>

View File

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

View File

@@ -3,7 +3,7 @@
justify-content: center; justify-content: center;
box-sizing: border-box; box-sizing: border-box;
height: 100vh; height: 100vh;
background-image: url("https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png"); background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png');
background-size: auto 40%; background-size: auto 40%;
background-repeat: no-repeat; background-repeat: no-repeat;
@@ -43,4 +43,4 @@
.nut-dialog__content { .nut-dialog__content {
text-align: left !important; text-align: left !important;
font-size: 28px; font-size: 28px;
} }

View File

@@ -10,8 +10,7 @@
placeholder="请输入台号比如包厢A01" placeholder="请输入台号比如包厢A01"
name="seat" name="seat"
v-model="formVal.seat" v-model="formVal.seat"
required required />
/>
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="label">手机号</text> <text class="label">手机号</text>
@@ -20,8 +19,7 @@
placeholder="请输入客人手机号码" placeholder="请输入客人手机号码"
name="phone" name="phone"
v-model="formVal.phone" v-model="formVal.phone"
required required />
/>
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="label">备注</text> <text class="label">备注</text>
@@ -29,8 +27,7 @@
type="textarea" type="textarea"
placeholder="备注" placeholder="备注"
name="notes" name="notes"
v-model="formVal.notes" v-model="formVal.notes" />
/>
</view> </view>
<nut-button <nut-button
style="border-radius: 7px" style="border-radius: 7px"
@@ -47,23 +44,22 @@
<template #default <template #default
>客户手机号: >客户手机号:
<text style="color: #fd0100">{{ formVal.phone }}</text> <text style="color: #fd0100">{{ formVal.phone }}</text>
没有注册捷兑 没有注册捷兑 请通知他登录捷兑通小程序注册</template
请通知他登录捷兑通小程序注册</template
> >
</nut-dialog> </nut-dialog>
</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 BackComponent from "../../../../components/Back.vue"; import BackComponent from '../../../../components/Back.vue';
import { checkPhone } from "../../../../api/admin"; import { checkPhone } from '../../../../api/admin';
const formVal = ref({ const formVal = ref({
seat: "", seat: '',
phone: "", phone: '',
notes: "", notes: '',
}); });
const visible = ref(false); const visible = ref(false);
@@ -71,28 +67,28 @@ const visible = ref(false);
const formSubmit = async ({ detail }: any) => { const formSubmit = async ({ detail }: any) => {
if (!detail.value.seat) if (!detail.value.seat)
return Taro.showToast({ return Taro.showToast({
title: "请填写台号", title: '请填写台号',
icon: "none", icon: 'none',
}); });
if ( 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( !/^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 detail.value.phone,
) )
) )
return Taro.showToast({ return Taro.showToast({
title: "请输入正确的手机号码", title: '请输入正确的手机号码',
icon: "none", icon: 'none',
}); });
try { try {
await checkPhone({ phone: detail.value.phone }); await checkPhone({ phone: detail.value.phone });
const user_info = await Taro.getStorageSync("userInfo"); const user_info = await Taro.getStorageSync('userInfo');
Taro.navigateTo({ 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}`, 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: () => { success: () => {
formVal.value = { formVal.value = {
seat: "", seat: '',
phone: "", phone: '',
notes: "", notes: '',
}; };
}, },
}); });
@@ -104,5 +100,5 @@ const formSubmit = async ({ detail }: any) => {
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./index.scss"; @import './index.scss';
</style> </style>

View File

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

View File

@@ -3,7 +3,8 @@
justify-content: center; justify-content: center;
box-sizing: border-box; box-sizing: border-box;
height: 100vh; height: 100vh;
background-image: url("./static/WechatIMG10.jpg"); // 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-size: 100% 35%;
background-repeat: no-repeat; background-repeat: no-repeat;
@@ -39,7 +40,7 @@
.line { .line {
width: 1px; width: 1px;
height: 188px; height: 188px;
background: #C8C8C8; background: #c8c8c8;
} }
} }
} }

View File

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

View File

@@ -1,30 +1,51 @@
<template> <template>
<view> <view>
<view class="footer" v-if="info.status !== 1"> <view class="footer" v-if="info.status !== 1">
<view <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" v-if="info.status !== 2"
class="btn" class="btn"
style="border: 1px #7f7f7f solid; color: #666666" style="border: 1px #7f7f7f solid; color: #666666"
@click="visible = true" @click="visible = true"
>挂帐</view >挂帐</view
> > -->
<view <view
v-if="info.status !== 2" v-if="info.status !== 2"
class="btn" class="btn"
style="background-color: #009ee0" style="background-color: #009ee0"
@click="to_menu_page" @click="to_menu_page"
>继续点单</view >继续点单</view
> >
<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" v-if="info.status !== 2"
class="btn" class="btn"
style="background-color: #ffa938" style="background-color: #ffa938"
@click="visible1 = true" @click="visible1 = true"
>修改</view >修改</view
> > -->
<view class="btn" style="background-color: #fd0100" @click="to_pay_page" <view class="btn" style="background-color: #fd0100" @click="to_pay_page"
>收款码</view >收款码</view
> >
</view>
</view> </view>
<nut-dialog v-model:visible="visible" @ok="onOk"> <nut-dialog v-model:visible="visible" @ok="onOk">
<template #header>挂帐</template> <template #header>挂帐</template>
@@ -57,9 +78,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref } from "vue"; import { onMounted, ref } from 'vue';
import { confirmAfterOrder, editAfterOrder } from "@/api/admin"; import {
import Taro from "@tarojs/taro"; cancelAfterOrder,
confirmAfterOrder,
editAfterOrder,
} from '@/api/admin';
import Taro from '@tarojs/taro';
const props = defineProps({ const props = defineProps({
info: { info: {
@@ -69,17 +94,33 @@ const props = defineProps({
}); });
onMounted(() => { onMounted(() => {
console.log(props.info); // 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]',
},
];
const emits = defineEmits(["ok"]); console.log(popoverList.value);
});
const emits = defineEmits(['ok', 'cancelOrderOk']);
const visible = ref(false); const visible = ref(false);
const visible1 = ref(false); const visible1 = ref(false);
const formVal = ref({ const formVal = ref({
seat: "", seat: '',
notes: "", notes: '',
}); });
const onCancel = () => { const onCancel = () => {
@@ -94,9 +135,9 @@ const onOk = async () => {
}); });
Taro.showToast({ Taro.showToast({
title: res.msg, title: res.msg,
icon: "none", icon: 'none',
}); });
emits("ok"); emits('ok');
}; };
const onOk1 = async () => { const onOk1 = async () => {
@@ -111,15 +152,15 @@ const onOk1 = async () => {
Taro.showToast({ Taro.showToast({
title: res.msg, title: res.msg,
icon: "none", icon: 'none',
}); });
formVal.value = { formVal.value = {
seat: "", seat: '',
notes: "", notes: '',
}; };
emits("ok"); emits('ok');
}; };
const to_pay_page = () => { const to_pay_page = () => {
@@ -133,13 +174,39 @@ const to_menu_page = () => {
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}`, 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> </script>
<style lang="scss"> <style lang="scss">
.footer { .footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: space-between;
padding: 20px; padding: 20px;
align-items: center;
.btn { .btn {
width: 143px; width: 143px;
height: 56px; height: 56px;

View File

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

View File

@@ -7,7 +7,8 @@ page {
.tabs { .tabs {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 20px 30px; padding: 20px 30px;
background-color: #ffffff;
.item { .item {
display: flex; display: flex;
@@ -61,11 +62,13 @@ page {
min-width: 195px; min-width: 195px;
height: 195px; height: 195px;
border-radius: 12px; border-radius: 12px;
margin-right: 20px;
} }
.center { .center {
margin-left: 20px; display: flex;
flex-direction: column;
justify-content: space-between;
.title { .title {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;

View File

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

View File

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

View File

@@ -18,12 +18,12 @@
} }
&::before { &::before {
content: "¥"; content: '¥';
color: #666666; color: #666666;
} }
&::after { &::after {
content: ""; content: '';
position: absolute; position: absolute;
bottom: -1px; bottom: -1px;
width: 700px; width: 700px;
@@ -38,46 +38,46 @@
border-radius: 12px; border-radius: 12px;
margin: 20px auto; margin: 20px auto;
box-sizing: border-box; box-sizing: border-box;
.header { .header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 20px; padding: 20px;
text { text {
margin-right: 10px; margin-right: 10px;
color: #333333; color: #333333;
font-size: 28px; font-size: 28px;
} }
} }
.line { .line {
width: inherit; width: inherit;
height: 1px; height: 1px;
background-color: #e9e9e9; background-color: #e9e9e9;
} }
.goods-list { .goods-list {
display: flex; display: flex;
margin: 20px; margin: 20px;
image { image {
width: 195px; width: 195px;
height: 195px; height: 195px;
border-radius: 12px; border-radius: 12px;
} }
.center { .center {
margin-left: 20px; margin-left: 20px;
.title { .title {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
font-size: 30px; font-size: 30px;
} }
} }
.num { .num {
flex: 1; flex: 1;
text-align: right; text-align: right;
@@ -85,7 +85,7 @@
font-size: 26px; font-size: 26px;
} }
} }
.desc { .desc {
padding: 10px 20px; padding: 10px 20px;
color: #666666; color: #666666;
@@ -101,7 +101,7 @@
.btn { .btn {
width: 709px; width: 709px;
height: 92px; height: 92px;
background: #FD0100; background: #fd0100;
color: #ffffff; color: #ffffff;
font-size: 32px; font-size: 32px;
text-align: center; text-align: center;

View File

@@ -26,8 +26,7 @@
<view class="center"> <view class="center">
<nut-ellipsis <nut-ellipsis
direction="end" direction="end"
:content="itm.Goods.name" :content="itm.Goods.name"></nut-ellipsis>
></nut-ellipsis>
<!-- <view class="title">{{ itm.Goods.name }}</view> --> <!-- <view class="title">{{ itm.Goods.name }}</view> -->
</view> </view>
<view class="num"> <view class="num">
@@ -45,18 +44,28 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btn" @click="ok">立即收款</view> <nut-button
style="border-radius: 10px"
shape="square"
block
:loading="isLoading"
type="primary"
@click="ok"
>立即收款</nut-button
>
</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 { getAfterOrder, createPayQr } from "../../../../../api/admin"; import { getAfterOrder, createPayQr } from '@/api/admin';
const data = ref<any>({}); const data = ref<any>({});
const val = ref(""); const val = ref('');
const isLoading = ref(false);
Taro.useLoad((e: any) => { Taro.useLoad((e: any) => {
get_data(e); get_data(e);
@@ -64,7 +73,7 @@ Taro.useLoad((e: any) => {
const get_data = async ({ bid, oid }) => { const get_data = async ({ bid, oid }) => {
Taro.showLoading({ Taro.showLoading({
title: "加载中", title: '加载中',
}); });
const res = await getAfterOrder({ bid, oid }); const res = await getAfterOrder({ bid, oid });
data.value = res.data.data; data.value = res.data.data;
@@ -74,43 +83,47 @@ const get_data = async ({ bid, oid }) => {
const get_color = (status: number) => { const get_color = (status: number) => {
switch (status) { switch (status) {
case 0: case 0:
return "#FD0100"; return '#FD0100';
case 1: case 1:
return "#03A113"; return '#03A113';
case 2: case 2:
return "#FFA938"; return '#FFA938';
} }
}; };
const get_status_text = (status: number) => { const get_status_text = (status: number) => {
switch (status) { switch (status) {
case 0: case 0:
return "未付款"; return '未付款';
case 1: case 1:
return "已付款"; return '已付款';
case 2: case 2:
return "挂帐中"; return '挂帐中';
} }
}; };
const ok = async () => { const ok = async () => {
if (!val.value) if (!val.value)
return Taro.showToast({ return Taro.showToast({
title: "请输入收款金额", title: '请输入收款金额',
icon: "none", icon: 'none',
}); });
isLoading.value = true;
const res = await createPayQr({ const res = await createPayQr({
oid: data.value.oid, oid: data.value.oid,
bid: data.value.bid, bid: data.value.bid,
price: Number(val.value), price: Number(val.value),
}); });
Taro.setStorageSync("pay_code", res.data.data.code_url); Taro.setStorageSync('pay_code', res.data.data.code_url);
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/wx_pay_code/index?oid=${data.value.oid}&bid=${data.value.bid}`, url: `/pages/admin/add_order/pending_order/wx_pay_code/index?oid=${data.value.oid}&bid=${data.value.bid}`,
success: () => {
isLoading.value = false;
},
}); });
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./index.scss"; @import './index.scss';
</style> </style>

View File

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

View File

@@ -33,11 +33,13 @@
height: 195px; height: 195px;
border-radius: 12px; border-radius: 12px;
min-width: 195px; min-width: 195px;
margin-right: 20px;
} }
.center { .center {
margin-left: 20px; display: flex;
flex-direction: column;
justify-content: space-between;
.title { .title {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
@@ -54,7 +56,7 @@
} }
.desc { .desc {
padding: 10px 20px; // padding: 10px 0px;
color: #666666; color: #666666;
} }
} }
@@ -75,4 +77,4 @@
color: #333333; color: #333333;
font-size: 32px; font-size: 32px;
} }
} }

View File

@@ -4,8 +4,8 @@
<view class="card" style="margin-top: 15px"> <view class="card" style="margin-top: 15px">
<view class="header"> <view class="header">
<view> <view>
<text>台号: {{ data.seat }}</text> <text class="text-[#9C9C9C]">台号: {{ data.seat }}</text>
<text>点单人: {{ data.PlaceUser?.nickName }}</text> <!-- <text>点单人: {{ data.PlaceUser?.nickName }}</text> -->
</view> </view>
<view <view
:style="{ :style="{
@@ -24,17 +24,16 @@
:content="itm.Goods.name" :content="itm.Goods.name"
rows="3" rows="3"
expand-text="展开" expand-text="展开"
collapse-text="收起" collapse-text="收起"></nut-ellipsis>
></nut-ellipsis>
<!-- <view class="title">{{ itm.Goods.name }}</view> --> <!-- <view class="title">{{ itm.Goods.name }}</view> -->
</view> </view>
<view class="num"> <view class="num">
<view>x{{ itm.pay_price }}</view> <view>{{ itm.pay_price }}</view>
<view>x{{ itm.number }}</view> <view>x{{ itm.number }}</view>
</view> </view>
</view> </view>
<view class="line"></view> <!-- <view class="line"></view> -->
<Footer :info="data" @ok="get_data" /> <Footer :info="data" @ok="get_data" @cancelOrderOk="back" />
</view> </view>
<nut-cell-group> <nut-cell-group>
<nut-cell> <nut-cell>
@@ -50,17 +49,14 @@
<nut-cell <nut-cell
v-if="data.status !== 0" v-if="data.status !== 0"
title="收款时间" title="收款时间"
:desc="data.payment_time" :desc="data.payment_time"></nut-cell>
></nut-cell>
<nut-cell <nut-cell
v-if="data.status !== 0 && data.status !== 1" v-if="data.status !== 0 && data.status !== 1"
title="挂帐时间" title="挂帐时间"
:desc="data.payment_time" :desc="data.payment_time"></nut-cell>
></nut-cell>
<nut-cell <nut-cell
title="订单状态" title="订单状态"
:desc="get_status_text(data.status)" :desc="get_status_text(data.status)"></nut-cell>
></nut-cell>
<nut-cell title="下单数量" :desc="String(data.count)"></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.payments)"></nut-cell> <nut-cell title="应收金额" :desc="String(data.payments)"></nut-cell>
@@ -68,28 +64,25 @@
<nut-cell <nut-cell
v-if="data.status !== 0" v-if="data.status !== 0"
title="实收金额" title="实收金额"
:desc="String(data.pay_amount)" :desc="String(data.pay_amount)"></nut-cell>
></nut-cell>
<nut-cell <nut-cell
v-if="data.status !== 0" v-if="data.status !== 0"
title="抹零" title="抹零"
:desc="String(data.zero)" :desc="String(data.zero)"></nut-cell>
></nut-cell>
<nut-cell <nut-cell
v-if="data.status !== 0" v-if="data.status !== 0"
title="收款方式" title="收款方式"
desc="微信" desc="微信"></nut-cell>
></nut-cell>
<nut-cell title="备注" :desc="data.notes"></nut-cell> <nut-cell title="备注" :desc="data.notes"></nut-cell>
</nut-cell-group> </nut-cell-group>
</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 Footer from "../components/Footer.vue"; import Footer from '../components/Footer.vue';
import { getAfterOrder } from "@/api/admin"; import { getAfterOrder } from '@/api/admin';
// import BackComponent from "../../../../../components/Back.vue"; // import BackComponent from "../../../../../components/Back.vue";
const data = ref<any>({}); const data = ref<any>({});
@@ -103,7 +96,7 @@ Taro.useLoad((e: any) => {
const get_data = async () => { const get_data = async () => {
Taro.showLoading({ Taro.showLoading({
title: "加载中", title: '加载中',
}); });
const res = await getAfterOrder({ const res = await getAfterOrder({
bid: params.value.bid, bid: params.value.bid,
@@ -116,26 +109,32 @@ const get_data = async () => {
const get_color = (status: number) => { const get_color = (status: number) => {
switch (status) { switch (status) {
case 0: case 0:
return "#FD0100"; return '#FD0100';
case 1: case 1:
return "#03A113"; return '#03A113';
case 2: case 2:
return "#FFA938"; return '#FFA938';
} }
}; };
const get_status_text = (status: number) => { const get_status_text = (status: number) => {
switch (status) { switch (status) {
case 0: case 0:
return "未付款"; return '未付款';
case 1: case 1:
return "已付款"; return '已付款';
case 2: case 2:
return "挂帐中"; return '挂帐中';
} }
}; };
const back = () => {
Taro.navigateBack({
delta: 1,
});
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./index.scss"; @import './index.scss';
</style> </style>

View File

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

View File

@@ -35,4 +35,4 @@ page {
right: 55px; right: 55px;
} }
} }
} }

View File

@@ -11,19 +11,19 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onUnmounted, ref } from "vue"; import { onUnmounted, ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { getAfterOrder } from "@/api/admin"; import { getAfterOrder } from '@/api/admin';
const time_id = ref(); const time_id = ref();
const dataUrl = ref(""); const dataUrl = ref('');
const info = ref<any>({}); const info = ref<any>({});
Taro.useLoad((e) => { Taro.useLoad(e => {
info.value = e; info.value = e;
dataUrl.value = Taro.getStorageSync("pay_code"); dataUrl.value = Taro.getStorageSync('pay_code');
time_id.value = setInterval(async () => { time_id.value = setInterval(async () => {
const { data } = await getAfterOrder({ const { data } = await getAfterOrder({
bid: info.value.bid, bid: info.value.bid,
@@ -31,11 +31,11 @@ Taro.useLoad((e) => {
}); });
if (data.data.status !== 0 && data.data.status !== 2) { if (data.data.status !== 0 && data.data.status !== 2) {
Taro.showToast({ Taro.showToast({
title: "支付成功", title: '支付成功',
icon: "success", icon: 'success',
}); });
setTimeout(() => { setTimeout(() => {
Taro.removeStorageSync("pay_code"); Taro.removeStorageSync('pay_code');
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${info.value.oid}&bid=${info.value.bid}`, url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${info.value.oid}&bid=${info.value.bid}`,
}); });
@@ -46,15 +46,15 @@ Taro.useLoad((e) => {
Taro.useDidHide(() => { Taro.useDidHide(() => {
clearInterval(time_id.value); clearInterval(time_id.value);
Taro.removeStorageSync("pay_code"); Taro.removeStorageSync('pay_code');
}); });
onUnmounted(() => { onUnmounted(() => {
clearInterval(time_id.value); clearInterval(time_id.value);
Taro.removeStorageSync("pay_code"); Taro.removeStorageSync('pay_code');
}); });
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./index.scss"; @import './index.scss';
</style> </style>

View File

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

View File

@@ -13,8 +13,12 @@
<view class="flex-1"> <view class="flex-1">
<view class="title">{{ item.Goods?.name }}</view> <view class="title">{{ item.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5"> <view class="text-[#F83D3D] mt-5">
<view>{{ item.pay_price }}</view> <view
<view>{{ item.pay_integral }}积分</view> >{{ item.pay_price }}
<text v-if="item.pay_integral > 0"
>+{{ item.pay_integral }}积分</text
>
</view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@@ -24,11 +28,13 @@
<view <view
class="flex justify-between items-center mt-2 mb-2 text-[25px]"> class="flex justify-between items-center mt-2 mb-2 text-[25px]">
<view class="text-[#9C9C9C]">{{ `${info.count}件商品` }}</view> <view class="text-[#9C9C9C]">{{ `${info.count}件商品` }}</view>
<view <text class="text-[26px] flex-1 text-right"
>{{ info.status !== 0 ? '实' : '应' }}付款{{ >{{ info.status !== 0 ? '实' : '应' }}付款:
info.pay_type === 1 ? '(元): ' : '(积分): ' {{ info.discount_price }} ()
}}{{ info.pay_type === 1 ? info.price : info.exchange }}</view <text v-if="info.exchange > 0"
> >积分抵扣: {{ info.exchange }}</text
>
</text>
</view> </view>
</view> </view>
</template> </template>
@@ -42,16 +48,19 @@
info.status === 0 info.status === 0
? '待付款' ? '待付款'
: info.status === 1 : info.status === 1
? '待使用' ? '待使用'
: info.status === 2 : info.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
"> ">
</nut-cell> </nut-cell>
<nut-cell title="下单用户:" :desc="info.User?.nickName"></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.User?.phone"></nut-cell>
<nut-cell title="下单时间:" :desc="info.add_time"></nut-cell> <nut-cell title="下单时间:" :desc="info.add_time"></nut-cell>
<nut-cell title="核销时间:" :desc="info.User?.phone"></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="核销人员:"
@@ -66,7 +75,7 @@
<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>({});

View File

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

View File

@@ -62,4 +62,45 @@
color: #999; 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;
}; };

View File

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

View File

@@ -141,4 +141,4 @@
} }
} }
} }
} }

View File

@@ -33,19 +33,19 @@
item.status === 0 item.status === 0
? '#FF850A' ? '#FF850A'
: item.status === 1 : item.status === 1
? '#F83D3D' ? '#F83D3D'
: item.status === 2 : item.status === 2
? '#333333' ? '#333333'
: '#9C9C9C', : '#9C9C9C',
}" }"
>{{ >{{
item.status === 0 item.status === 0
? '待付款' ? '待付款'
: item.status === 1 : item.status === 1
? '待使用' ? '待使用'
: item.status === 2 : item.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
}} }}
</view> </view>
</view> </view>
@@ -56,8 +56,12 @@
<view class="flex-1"> <view class="flex-1">
<view class="title">{{ itm.Goods?.name }}</view> <view class="title">{{ itm.Goods?.name }}</view>
<view class="text-[#F83D3D] mt-5"> <view class="text-[#F83D3D] mt-5">
<view>{{ itm.pay_price }}</view> <view
<view>{{ itm.pay_integral }}积分</view> >{{ itm.pay_price }}
<text v-if="itm.pay_integral > 0"
>+{{ itm.pay_integral }}积分</text
>
</view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@@ -69,11 +73,11 @@
class="flex justify-between items-center mt-2 mb-2 text-[25px]" class="flex justify-between items-center mt-2 mb-2 text-[25px]"
v-if="item.status !== 0"> v-if="item.status !== 0">
<text class="text-[#9C9C9C]">{{ item.count }}件商品</text> <text class="text-[#9C9C9C]">{{ item.count }}件商品</text>
<view <text class="text-[26px] flex-1 text-right"
>{{ item.status !== 0 ? '实' : '应' }}付款{{ >{{ item.status !== 0 ? '实' : '应' }}付款:
item.pay_type === 1 ? '(元): ' : '(积分): ' {{ item.discount_price }} ()
}}{{ item.pay_type === 1 ? item.price : item.exchange }}</view <text v-if="item.exchange > 0">积分抵扣: {{ item.exchange }}</text>
> </text>
</view> </view>
</view> </view>
</view> </view>
@@ -82,9 +86,9 @@
</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([
{ {
@@ -149,6 +153,7 @@ const getData = async () => {
const tabChange = (e: number) => { const tabChange = (e: number) => {
tabVal.value = e; tabVal.value = e;
dataList.value = [];
getData(); getData();
}; };
@@ -160,7 +165,7 @@ const toDetailPage = (item: any) => {
}; };
Taro.useReachBottom(() => { Taro.useReachBottom(() => {
if (pageOpt.value.total === dataList.value.length) if (pageOpt.value.total >= dataList.value.length)
return Taro.showToast({ return Taro.showToast({
title: '没有更多数据了', title: '没有更多数据了',
icon: 'none', icon: 'none',

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>
@@ -109,20 +110,19 @@
:default-value="pickerVal" :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);
@@ -138,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>({});
@@ -184,20 +184,20 @@ const opts = ref<any>({
categories: [], categories: [],
series: [ series: [
{ {
name: "营业额", name: '营业额',
data: [], data: [],
}, },
{ {
name: "订单量", name: '订单量',
data: [], data: [],
}, },
], ],
}); });
const pickerVal = ref<any>([]) const pickerVal = ref<any>([]);
Taro.useLoad((options) => { Taro.useLoad(options => {
where.value.type = options.type === "price" ? 1 : 2; where.value.type = options.type === 'price' ? 1 : 2;
time.value = options.time; time.value = options.time;
setTime(options.time); setTime(options.time);
// getData(); // getData();
@@ -210,29 +210,29 @@ Taro.useLoad((options) => {
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();
@@ -240,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;
}; };
@@ -253,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,
@@ -273,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,
@@ -290,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,
@@ -319,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,
}, },
}, },
@@ -331,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);
@@ -406,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;
} }
@@ -413,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;
@@ -439,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;
} }
@@ -447,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

@@ -4,14 +4,86 @@
<image <image
class="image" class="image"
@tap="scanCode" @tap="scanCode"
src="http://p1.meituan.net/csc/696924dda634f05689dabdfbb18e88cc13551.png" /> src="https://p1.meituan.net/csc/696924dda634f05689dabdfbb18e88cc13551.png" />
<view class="mt-2 text-[#7A7A7A]">扫描二维码核销</view> <view class="mt-2 text-[#7A7A7A]">扫描二维码核销</view>
</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>
</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) => {
@@ -47,22 +119,52 @@ const scanCode = () => {
}, },
}); });
}; };
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('http://p0.meituan.net/csc/e6ff5582788af2023f49241afe22fc89391851.png'); background-image: url('https://p0.meituan.net/csc/e6ff5582788af2023f49241afe22fc89391851.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 25%; 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: 33px; border-radius: 33px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -75,4 +177,62 @@ page {
height: 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

@@ -23,13 +23,12 @@
<text class="text-[#9C9C9C] text-left" <text class="text-[#9C9C9C] text-left"
>{{ goodInfo.count }}件商品</text >{{ goodInfo.count }}件商品</text
> >
<text class="flex-1" <text class="text-[26px] flex-1"
>{{ goodInfo.status !== 0 ? '实' : '应' }}付款{{ >实付款: {{ goodInfo.discount_price }} ()
goodInfo.pay_type === 1 ? '(元): ' : '(积分): ' <text v-if="goodInfo.exchange > 0"
}}{{ >积分抵扣: {{ goodInfo.exchange }}</text
goodInfo.pay_type === 1 ? goodInfo.price : goodInfo.exchange >
}}</text </text>
>
</view> </view>
<!-- <view class="line"></view> --> <!-- <view class="line"></view> -->
<!-- <view class="cz"> <!-- <view class="cz">
@@ -60,8 +59,8 @@
<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>({});
@@ -73,10 +72,10 @@ 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({
@@ -98,15 +97,21 @@ const subVerify = async () => {
oid: goodInfo.value.oid, oid: goodInfo.value.oid,
bid: goodInfo.value.bid, 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,
@@ -123,7 +128,9 @@ const getPayType = (type: number) => {
case 2: case 2:
return '平台积分支付'; return '平台积分支付';
case 3: case 3:
return '天才小猪支付'; return '智多鑫积分支付';
case 3:
return '渔乐潮玩支付';
default: default:
return '未知'; return '未知';
} }

View File

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

View File

@@ -41,7 +41,7 @@
.card { .card {
margin: 20px auto; margin: 20px auto;
background-image: url('http://p0.meituan.net/csc/902ecf4ba9765a8200817d58a3a5a655172781.png'); background-image: url('https://p0.meituan.net/csc/902ecf4ba9765a8200817d58a3a5a655172781.png');
background-size: 100% 100%; background-size: 100% 100%;
width: 95%; width: 95%;
height: 250px; height: 250px;
@@ -54,7 +54,7 @@
color: #fff; color: #fff;
padding: 45px 100px; padding: 45px 100px;
display: flex; display: flex;
justify-content: space-between; justify-content: center;
align-items: center; align-items: center;
text-align: center; text-align: center;

View File

@@ -1,13 +1,14 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref, h} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getWithdrawList, addWithdraw} from '@/api/admin'; import { getWithdrawList, addWithdraw } from '@/api/admin';
const user_info = ref<any>({}); const user_info = ref<any>({});
const mer_info = ref<any>({}); const mer_info = ref<any>({});
const row = ref(0); const row = ref(0);
const str = ref(0);
const formRef = ref(); const formRef = ref();
@@ -48,6 +49,7 @@ const getData = async () => {
data.value.push(...res.data.data); data.value.push(...res.data.data);
pagination.value.total = res.data.total; pagination.value.total = res.data.total;
row.value = res.data.integral || 0; row.value = res.data.integral || 0;
str.value = res.data.number || 0;
} catch (e) { } catch (e) {
throw e; throw e;
} }
@@ -55,7 +57,7 @@ const getData = async () => {
const add = async () => { const add = async () => {
try { try {
formRef.value?.validate().then(async ({valid}) => { formRef.value?.validate().then(async ({ valid }) => {
if (valid) { if (valid) {
const res = await addWithdraw({ const res = await addWithdraw({
Bid: user_info.value.data.bid, Bid: user_info.value.data.bid,
@@ -77,34 +79,21 @@ const add = async () => {
const rules = ref({ const rules = ref({
num: [ num: [
{ {
message: '请填写提现积分', message: '请填写提现余额',
validator: (value, _) => { validator: (value, _) => {
console.log(value); return value;
if (!value) {
return false;
} else {
return true;
}
}, },
}, },
{ {
message: '提现积分最低为100', message: '提现余额最低为1',
validator: (value, _) => { validator: (value, _) => {
if (Number(value) < 100) { return Number(value) >= 1;
return false;
} else {
return true;
}
}, },
}, },
{ {
message: '提现积分不能大于可提现积分', message: '提现余额不能大于可提现余额',
validator: (value, _) => { validator: (value, _) => {
if (Number(value) > row.value) { return Number(value) <= row.value;
return false;
} else {
return true;
}
}, },
}, },
], ],
@@ -141,17 +130,15 @@ Taro.useReachBottom(() => {
<view> <view>
<view class="card"> <view class="card">
<view class="container"> <view class="container">
<view class=""> <view>
<view class="font-bold text-[35px]">{{ row }}</view> <view class="font-bold text-[35px]">{{ row }}</view>
<view class="text-[25px] mt-2">可提现积分</view> <view class="text-[25px] mt-2">可提现余额</view>
</view> </view>
<view class="line"></view> <!-- <view class="line"></view>
<view class=""> <view class="">
<view class="font-bold text-[35px]">{{ <view class="font-bold text-[35px]">{{ str }}</view>
(row / 100 - (row / 100) * 0.138).toFixed(2)
}}</view>
<view class="text-[25px] mt-2">实际到账</view> <view class="text-[25px] mt-2">实际到账</view>
</view> </view> -->
</view> </view>
<view class="footer"> <view class="footer">
<text>到账方式</text> <text>到账方式</text>
@@ -164,25 +151,25 @@ Taro.useReachBottom(() => {
</view> </view>
</view> </view>
<view class="formCard"> <view class="formCard">
<view class="flex justify-between"> <view class="flex justify-between mb-[25px]">
<text>积分提现</text> <text>余额提现</text>
<view class="flex items-center" @click="visible1 = true"> <!-- <view class="flex items-center" @click="visible1 = true">
<image <image
class="w-[25px] h-[25px]" class="w-[26px] h-[26px]"
src="http://p1.meituan.net/csc/5437a800f4ed4a49f14984494c1c3077994.png"></image> src="https://p1.meituan.net/csc/5437a800f4ed4a49f14984494c1c3077994.png"></image>
<view class="text-[#EC4443] text-[20px] ml-1">提现疑问</view> <view class="text-[#EC4443] text-[26px] ml-1">提现疑问</view>
</view> </view> -->
</view> </view>
<nut-form ref="formRef" :model-value="basicData" :rules="rules"> <nut-form ref="formRef" :model-value="basicData" :rules="rules">
<nut-form-item prop="num"> <nut-form-item prop="num">
<nut-input <nut-input
v-model="basicData.num" v-model="basicData.num"
class="nut-input-text" class="nut-input-text"
placeholder="请输入提现积分" placeholder="请输入提现余额"
type="text"> type="text">
<template #right> <template #right>
<text <text
class="text-[#EC4443] text-[25px]" class="text-[#EC4443] text-[26px]"
@tap="basicData.num = row.toString()" @tap="basicData.num = row.toString()"
>全部</text >全部</text
> >
@@ -208,21 +195,21 @@ Taro.useReachBottom(() => {
item.status === 1 item.status === 1
? 'success' ? 'success'
: item.status === 1 : item.status === 1
? 'danger' ? 'danger'
: 'warning' : 'warning'
" "
>{{ >{{
item.status === 1 item.status === 1
? '已打款' ? '已打款'
: item.status === 2 : item.status === 2
? '已拒绝' ? '已拒绝'
: '待审核' : '待审核'
}}</view }}</view
> >
</view> </view>
<view> <view>
<view class="mt-3 mb-3 text-[35px]">{{ item.number }}</view> <view class="mt-3 mb-3 text-[35px]">{{ item.number }}</view>
<view class="text-[25px] mb-1">提现积分{{ item.integral }}</view> <view class="text-[25px] mb-1">提现金额{{ item.integral }}</view>
<view class="text-[25px] mb-1" <view class="text-[25px] mb-1"
>信息服务费{{ item.commission }}</view >信息服务费{{ item.commission }}</view
> >
@@ -237,8 +224,8 @@ Taro.useReachBottom(() => {
v-if="item.status === 1" v-if="item.status === 1"
class="text-[23px] mt-2 text-[#df3526]" class="text-[23px] mt-2 text-[#df3526]"
@click="openPreview(item)" @click="openPreview(item)"
>点我查看回执单</view >点我查看回执单
> </view>
</view> </view>
</view> </view>
</view> </view>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "全部服务", navigationBarTitleText: '全部服务',
}); });

View File

@@ -8,8 +8,7 @@
v-for="itm in item.Classify" v-for="itm in item.Classify"
:key="itm.ID" :key="itm.ID"
:text="itm.name" :text="itm.name"
@click="toDetails(itm)" @click="toDetails(itm)">
>
<image :src="itm.icon" /> <image :src="itm.icon" />
</nut-grid-item> </nut-grid-item>
</nut-grid> </nut-grid>
@@ -20,9 +19,9 @@
</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 { getAllMerCategory } from "@/api/goods"; import { getAllMerCategory } from '@/api/goods';
const list = ref< const list = ref<
{ {

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "购物车", navigationBarTitleText: '购物车',
}); });

View File

@@ -6,25 +6,28 @@
<nut-checkbox <nut-checkbox
v-model="itm.state.checkbox" v-model="itm.state.checkbox"
:indeterminate="itm.state.indeterminate" :indeterminate="itm.state.indeterminate"
@change="(val: boolean) => changeBoxAll(val,idx)" @change="(val: boolean) => changeBoxAll(val, idx)"
>{{ itm.StoreName }} >{{ itm.StoreName }}
</nut-checkbox> </nut-checkbox>
</nut-cell> </nut-cell>
<nut-checkbox-group <nut-checkbox-group
v-model="itm.state.checkboxgroup" v-model="itm.state.checkboxgroup"
:ref="(el) => getGroup(el, idx)" :ref="el => getGroup(el, idx)"
@change="(label) => changeBox(label, itm)" @change="label => changeBox(label, itm)">
>
<nut-cell v-for="(item, idx1) in itm.Goods" :key="idx1"> <nut-cell v-for="(item, idx1) in itm.Goods" :key="idx1">
<nut-checkbox :label="item.gid" style="width: 10%"></nut-checkbox> <nut-checkbox :label="item.gid" style="width: 10%"></nut-checkbox>
<view class="box"> <view class="box">
<view class="box-left"> <view class="box-left">
<img class="cover" :src="item.cover" alt="" /> <img class="cover" :src="item.cover" alt="" />
<view class="center"> <view class="center">
<view>{{ item.name }}</view> <view class="line-clamp-2 text-[25px]">{{ item.name }}</view>
<view class="price"> <view class="price">
<view>{{ item.price }} </view> <view
<view>{{ item.exchange }} 积分</view> >{{ item.price }}
<text v-if="item.discount_integral > 0"
>+{{ item.discount_integral }}积分</text
>
</view>
</view> </view>
</view> </view>
</view> </view>
@@ -33,8 +36,7 @@
readonly readonly
:min="-1" :min="-1"
@add.stop="() => onAdd(item)" @add.stop="() => onAdd(item)"
@reduce.stop="() => onReduce(item)" @reduce.stop="() => onReduce(item)" />
/>
</view> </view>
</nut-cell> </nut-cell>
</nut-checkbox-group> </nut-checkbox-group>
@@ -42,9 +44,9 @@
</view> </view>
<nut-empty v-else description="购物车暂无数据"></nut-empty> <nut-empty v-else description="购物车暂无数据"></nut-empty>
<view> <view>
<view style="height: 100rpx"></view> <view style="height: 100px"></view>
</view> </view>
<view class="bottom-box"> <view class="bottom-box" v-if="list.length > 0">
<view class="left"> <view class="left">
<!-- <nut-checkbox v-model="selectAllVal" @change="selectAll" <!-- <nut-checkbox v-model="selectAllVal" @change="selectAll"
>全选 >全选
@@ -55,16 +57,14 @@
<nut-price <nut-price
v-model:price="localCount.price" v-model:price="localCount.price"
size="normal" size="normal"
:need-symbol="false" :need-symbol="false" />
/>
</view> </view>
<view class="text-box"> <view class="text-box">
总积分 总积分
<nut-price <nut-price
v-model:price="localCount.exchange" v-model:price="localCount.exchange"
size="normal" size="normal"
:need-symbol="false" :need-symbol="false" />
/>
</view> </view>
</view> </view>
</view> </view>
@@ -75,17 +75,16 @@
:is-show-pay="isShowPay" :is-show-pay="isShowPay"
:interval="true" :interval="true"
v-model:jfInfo="orderData" v-model:jfInfo="orderData"
@closePay="closePay" @closePay="closePay" />
/>
</view> </view>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { nextTick, ref } from "vue"; import { nextTick, ref } from 'vue';
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { addCart, getAllCart } from "@/api/cart"; import { addCart, getAllCart } from '@/api/cart';
import { createActiveOrder } from "@/api/goods"; import { createActiveOrder } from '@/api/goods';
import Pay from "@/components/Pay.vue"; import Pay from '@/components/Pay.vue';
interface CardList { interface CardList {
name: string; name: string;
@@ -95,6 +94,8 @@ interface CardList {
number: string; number: string;
price: number; price: number;
exchange: number; exchange: number;
pay_price: number;
discount_integral: number;
} }
// const selectAllVal = ref(false); // const selectAllVal = ref(false);
@@ -134,7 +135,7 @@ const changeBox = (label: string[], item: any) => {
exchange: 0, exchange: 0,
}; };
item["Count"] = { item['Count'] = {
priceCount: 0, priceCount: 0,
exchangeCount: 0, exchangeCount: 0,
}; };
@@ -143,8 +144,8 @@ const changeBox = (label: string[], item: any) => {
label.forEach((id: string) => { label.forEach((id: string) => {
item.Goods.forEach((itm: any) => { item.Goods.forEach((itm: any) => {
if (itm.gid === id) { if (itm.gid === id) {
item["Count"].priceCount += itm.price; item['Count'].priceCount += itm.price;
item["Count"].exchangeCount += itm.exchange; item['Count'].exchangeCount += itm.discount_integral;
} }
}); });
}); });
@@ -192,29 +193,34 @@ const isShowPay = ref(false);
const orderData = ref<any>([]); const orderData = ref<any>([]);
const sub = async () => { const sub = async () => {
const arr: any = list.value.filter(
(item: any) => item.state.checkboxgroup.length > 0
);
if (arr.length === 0) {
Taro.showToast({
title: "请选择商品",
icon: "none",
});
return;
}
try { try {
console.log('sub');
const arr: any = list.value.filter(
(item: any) => item.state.checkboxgroup.length > 0,
);
console.log(arr);
if (arr.length === 0) {
Taro.showToast({
title: '请选择商品',
icon: 'none',
});
return;
}
const { data: res } = await createActiveOrder({ const { data: res } = await createActiveOrder({
Bid: arr.map((item: any) => item.StoreBid), Bid: arr.map((item: any) => item.StoreBid),
}); });
if (res.oid) { if (res.oid) {
orderData.value = res?.oid; // orderData.value = res?.oid;
isShowPay.value = true; // isShowPay.value = true;
// console.log(arr)
Taro.navigateTo({
url: `/pages/goods/pay/index?oid=${res.oid}&bid=${arr[0].StoreBid}&OrderType=1`,
});
} }
} catch (e) { } catch (e) {
Taro.showToast({ Taro.showToast({
title: e.msg, title: e.msg || '订单创建失败',
icon: "none", icon: 'none',
}); });
} }
}; };
@@ -224,7 +230,7 @@ const closePay = async (val: boolean) => {
orderData.value = []; orderData.value = [];
await getList(); await getList();
Taro.navigateTo({ Taro.navigateTo({
url: "/pages/users/order_list/index?type=0", url: '/pages/users/order_list/index?type=0',
}); });
}; };
@@ -239,7 +245,7 @@ const getList = async () => {
list.value = list.value.map((item: any) => ({ list.value = list.value.map((item: any) => ({
...item, ...item,
Goods: item.Goods.sort( Goods: item.Goods.sort(
(a: CardList, b: CardList) => Number(a.gid) - Number(b.gid) (a: CardList, b: CardList) => Number(a.gid) - Number(b.gid),
), ),
state: { state: {
indeterminate: false, indeterminate: false,
@@ -277,13 +283,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 getList(); await getList();
} catch (e) { } catch (e) {
Taro.showToast({ Taro.showToast({
title: e.msg, title: e.msg,
icon: "none", icon: 'none',
}); });
} }
}; };
@@ -291,7 +297,7 @@ const add_cart = async (item: CardList, num: number = 1) => {
<style lang="scss"> <style lang="scss">
.index { .index {
font-family: "Avenir", Helvetica, Arial, sans-serif; font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
text-align: center; text-align: center;
@@ -309,16 +315,18 @@ const add_cart = async (item: CardList, num: number = 1) => {
align-items: center; align-items: center;
.cover { .cover {
width: 130rpx; width: 130px;
height: 130rpx; height: 130px;
margin-right: 15rpx; min-width: 130px;
border-radius: 20rpx; min-height: 130px;
margin-right: 15px;
border-radius: 20px;
} }
.center { .center {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-between;
.price { .price {
display: flex; display: flex;
@@ -336,21 +344,21 @@ const add_cart = async (item: CardList, num: number = 1) => {
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100rpx; height: 100px;
z-index: 9999; z-index: 9999;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 20rpx; padding: 0 20px;
box-shadow: 100rpx 104rpx 288rpx rgba(0, 0, 0, 0.01); box-shadow: 100px 104px 288px rgba(0, 0, 0, 0.01);
border-top: 1rpx solid #f5f5f5; border-top: 1px solid #f5f5f5;
.left { .left {
display: flex; display: flex;
align-items: center; align-items: center;
.text-box { .text-box {
margin-left: 10rpx; margin-left: 10px;
} }
} }
} }

View File

@@ -1,3 +1,3 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: "分类", navigationBarTitleText: '分类',
}); });

View File

@@ -7,19 +7,16 @@
:animated-time="10" :animated-time="10"
name="tabs" name="tabs"
direction="vertical" direction="vertical"
@change="tabChange" @change="tabChange">
>
<nut-tab-pane <nut-tab-pane
v-for="item in list" v-for="item in list"
:title="(item.name as string)" :title="item.name as string"
:key="item.ID" :key="item.ID">
>
<view v-if="goodList.length > 0"> <view v-if="goodList.length > 0">
<view <view
class="list" class="list"
v-for="(item, index) in (goodList as any)" v-for="(item, index) in goodList as any"
:key="index" :key="index">
>
<view class="item"> <view class="item">
<img :src="item.cover" /> <img :src="item.cover" />
<view class="right"> <view class="right">
@@ -46,9 +43,9 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro';
import { ref } from "vue"; import { ref } from 'vue';
import { getCategoryList, getCategoryGoods } from "@/api/goods"; import { getCategoryList, getCategoryGoods } from '@/api/goods';
const val = ref(0); const val = ref(0);

View File

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

View File

@@ -0,0 +1,6 @@
page {
background-image: url('https://p1.meituan.net/csc/75a139bcec06745d385ec211aa313a98196174.png');
background-size: 100% 40%;
background-repeat: no-repeat;
background-color: #f9f8f6;
}

141
src/pages/fastBuy/index.vue Normal file
View File

@@ -0,0 +1,141 @@
<template>
<view class="flex flex-col items-center pt-[208px]">
<back />
<image class="h-[152px]" :src="par.header" />
<view class="list mt-[30px]" v-if="data.length > 0">
<view
class="bg-white p-[20px] w-[700px] rounded-[20px] mb-[20px] flex"
v-for="(item, index) in data"
:key="index">
<image
class="w-[200px] h-[200px] rounded-[10px] mr-[10px]"
:src="item.cover"></image>
<view class="flex-1 flex flex-col justify-between">
<nut-ellipsis
style="font-size: 20px"
direction="end"
:rows="2"
:content="item.name"></nut-ellipsis>
<view>
<view class="text-[#9E9E9E] text-[26px]"
>剩余: {{ item.stock }}</view
>
<view class="flex justify-between items-end">
<view>
<view class="text-[#F83D3D] text-[30px] font-bold"
>{{ item.number }}</view
>
<view class="text-[#F83D3D] text-[30px] font-bold"
>{{ item.exchange }}积分</view
>
</view>
<nut-button type="primary" size="mini" @click="toPay(item)"
>购买</nut-button
>
</view>
</view>
</view>
</view>
</view>
<nut-empty
class="mt-[130px]"
v-else
image="empty"
description="暂时没有商品"></nut-empty>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import { getHdOrJfGoods, createActiveOrder } from '@/api/goods';
import { getUserPoint } from '@/api/admin';
import { addCart } from '@/api/cart';
import Back from '@/components/Back.vue';
const par = ref<any>({});
Taro.useLoad(e => {
switch (e.type) {
case '1':
par.value = {
header:
'https://p0.meituan.net/csc/6229068017d3b199aafd9eed47bfd50513859.png',
};
break;
case '2':
par.value = {
header:
'https://p0.meituan.net/csc/ccfb8d3119200f81e2d6a5241081eb4b13797.png',
};
break;
}
par.value = {
...par.value,
type: e.type,
};
getList();
});
const data = ref<any[]>([]);
const page = ref({
page: 1,
pageSize: 10,
itemCount: 0,
});
const getList = async () => {
Taro.showLoading({
title: '加载中',
});
const res = await getHdOrJfGoods({
PageNum: page.value.page,
PageSize: page.value.pageSize,
type: Number(par.value.type),
});
data.value.push(...res.data.data);
page.value.itemCount = res.data.total;
Taro.hideLoading();
};
Taro.useReachBottom(() => {
if (page.value.page < Math.ceil(page.value.itemCount / page.value.pageSize)) {
page.value.page++;
getList();
}
});
const toPay = async item => {
const tk = Taro.getStorageSync('token');
if (!tk) {
Taro.navigateTo({
url: '/pages/users/login/index',
});
return;
}
await addCart({
Bid: item.Store.bid,
Gid: item.gid,
Number: 1,
});
const user_info = Taro.getStorageSync('userInfo');
const data = await getUserPoint({
phone: user_info.data.phone,
bid: item.Store.bid,
});
const res = await createActiveOrder({
Bid: [item.Store.bid],
custID: data.data.store_user_id,
});
Taro.navigateTo({
url: `/pages/goods/pay/index?oid=${res.data.oid}&bid=${item.Store.bid}&OrderType=1`,
});
};
</script>
<style lang="scss">
@import './index.scss';
</style>

View File

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

View File

@@ -0,0 +1,43 @@
// page {
// font-size: 10px;
// }
.index {
position: relative;
width: 100%;
height: 100vh;
.swiper {
background-color: white;
width: 100%;
}
.container {
z-index: 1;
position: absolute;
top: 260px;
background-color: white;
box-sizing: border-box;
width: 100%;
padding: 10px;
text-align: center;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
.btn {
margin: 20px auto;
padding: 10px;
border-radius: 50px;
background-color: #7950f2;
color: #fff;
width: 300px;
text-align: center;
border: 1px solid #f5f5f5;
}
}
}
.text {
padding: 10px;
font-size: 30px;
text-align: left;
}

View File

@@ -1,159 +1,52 @@
<template> <template>
<view> <view class="index">
<view <swiper class="swiper" :circular="true" :autoplay="true">
class="head-wrapper" <swiper-item v-for="(item, index) in list" :key="index">
:style="{ <image style="width: 100%" :src="item" />
top: statusHeight + 'px', </swiper-item>
}" </swiper>
> <view class="container">
<view class="head-menu"> <rich-text :nodes="info.introduction"></rich-text>
<Left class="iconfont" @click="returns" /> <view class="btn" @click="startGame()">开始游戏</view>
<Home class="iconfont" @click="goHome" />
</view>
</view>
<nut-swiper
class="swiper"
:pagination-visible="true"
pagination-color="#426543"
auto-play="3000"
>
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg"
alt=""
/>
</nut-swiper-item>
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg"
alt=""
/>
</nut-swiper-item>
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/welcomenutui.jpg"
alt=""
/>
</nut-swiper-item>
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/fristfabu.jpg"
alt=""
/>
</nut-swiper-item>
</nut-swiper>
<view class="box">
<view class="line"></view>
<view class="game-title"></view>
<view class="game-title"></view>
<view class="game-title"></view>
<view class="game-btn" @click="toGame()">开始游戏</view>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script lang="ts" setup>
import { ref } from "vue"; import { ref } from 'vue';
import { import Taro from '@tarojs/taro';
useLoad, import './index.scss';
getSystemInfoSync,
navigateBack,
switchTab,
navigateTo,
} from "@tarojs/taro";
import { Left, Home } from "@nutui/icons-vue-taro";
var statusBarHeight = getSystemInfoSync().statusBarHeight as number;
console.log(statusBarHeight); const info = ref<any>({});
const list = ref<string[]>([]);
const statusHeight = ref<number>(statusBarHeight); Taro.useLoad(() => {
info.value = Taro.getStorageSync('gameItem');
// const swiperList = ref([]); list.value.push(info.value.cover);
useLoad((options) => {
console.log(options);
}); });
const returns = () => { const startGame = () => {
navigateBack(); // 判断url中是否含有http
}; if (info.value.url.indexOf('http') === -1) {
Taro.navigateTo({
const goHome = () => { url: info.value.url,
switchTab({ });
url: "/pages/index/index", } else {
}); const user = Taro.getStorageSync('userInfo');
}; // if (user.data.pulse <= 0)
// return Taro.showToast({
const toGame = () => { // title: '您的豆子不足,无法进入游戏',
navigateTo({ // icon: 'none',
url: "/pages/game/gameview/index", // });
}); Taro.setStorageSync(
'game_url',
`${info.value.url}?uid=${Taro.getStorageSync('token')}&id=${
info.value.ID
}`,
);
Taro.navigateTo({
url: `/pages/game/view/index`,
});
}
}; };
</script> </script>
<style lang="scss">
.head-wrapper {
z-index: 999;
display: flex;
align-items: center;
position: fixed;
left: 30px;
top: 0;
height: 100px;
}
.head-menu {
display: flex;
align-items: center;
height: 54px;
width: 140px;
background: rgba(0, 0, 0, 0.25);
border-radius: 27px;
.iconfont {
flex: 1;
text-align: center;
color: #fff;
box-sizing: border-box;
&.icon-xiangzuo {
border-right: 1px solid #fff;
}
}
}
.swiper {
height: 450rpx;
width: 100vw;
image {
width: 100%;
}
}
.box {
width: 100%;
height: 90vh;
background-color: #fff;
z-index: 1;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
box-sizing: border-box;
position: absolute;
padding: 20px;
top: 400px;
.line {
width: 90px;
height: 10px;
border-radius: 4px;
background-color: rgba(202, 202, 202, 1);
margin: auto;
}
.game-btn {
width: 300px;
height: 75px;
margin: 50px auto;
color: #fff;
background-color: rgba(85, 77, 132, 1);
border-radius: 50px;
text-align: center;
line-height: 75px;
}
}
</style>

View File

@@ -1,3 +1,4 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: '', navigationBarTitleText: '游戏大厅',
// navigationStyle: 'custom',
}); });

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