chore(release): 4.0.0
12
.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
5
.env
Normal file
@@ -0,0 +1,5 @@
|
||||
APP_BASE_URL=
|
||||
APP_WEBSOCKET=
|
||||
APP_AUTH_PAGE=
|
||||
APP_PLATFORM=
|
||||
APP_DEBUG=
|
||||
7
.eslintrc
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": ["taro/react"],
|
||||
"rules": {
|
||||
"react/jsx-uses-react": "off",
|
||||
"react/react-in-jsx-scope": "off"
|
||||
}
|
||||
}
|
||||
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
dist/
|
||||
deploy_versions/
|
||||
.temp/
|
||||
.rn_temp/
|
||||
node_modules/
|
||||
.DS_Store
|
||||
.env.local
|
||||
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
_
|
||||
4
.husky/pre-commit
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npm run precommit
|
||||
9
.prettierrc
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"trailingComma": "none",
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": true,
|
||||
"arrowParens": "always",
|
||||
"printWidth": 100,
|
||||
"quoteProps": "preserve"
|
||||
}
|
||||
346
CHANGELOG.md
Normal file
@@ -0,0 +1,346 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [4.0.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.21.0...v4.0.0) (2025-11-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **scope:** update package ([434f186](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/434f18609dfd9f2941a274ff61523fdcf96deeb2))
|
||||
* **scope:** update readme ([cf620cf](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/cf620cfc8dffb233d9f77f4e0c1e2be6e957f37b))
|
||||
* 更新版权信息 ([63ad805](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/63ad805c7fb50103554a39ab41f3a960c51c305d))
|
||||
* 移除jssdk ([48fdca1](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/48fdca11ea944b9d33ec512ce58d512f25a92fc4))
|
||||
|
||||
## [3.21.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.20.0...v3.21.0) (2025-05-29)
|
||||
|
||||
## [3.20.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.19.3...v3.20.0) (2025-04-27)
|
||||
|
||||
### [3.19.3](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.19.2...v3.19.3) (2025-04-23)
|
||||
|
||||
### [3.19.2](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.19.1...v3.19.2) (2025-04-15)
|
||||
|
||||
### [3.19.1](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.19.0...v3.19.1) (2025-04-09)
|
||||
|
||||
## [3.19.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.18.0...v3.19.0) (2025-03-27)
|
||||
|
||||
## [3.18.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.17.0...v3.18.0) (2025-03-18)
|
||||
|
||||
## [3.17.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.16.0...v3.17.0) (2025-02-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 分类选择样式问题、sdk签名报错 ([27d87d3](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/27d87d3b0b61e1fa336c0f216ebd31a7829e3c0a))
|
||||
|
||||
## [3.16.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.15.3...v3.16.0) (2024-10-28)
|
||||
|
||||
### [3.15.3](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.15.2...v3.15.3) (2024-08-28)
|
||||
|
||||
### [3.15.2](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.15.1...v3.15.2) (2024-08-16)
|
||||
|
||||
### [3.15.1](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.15.0...v3.15.1) (2024-08-16)
|
||||
|
||||
## [3.15.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.14.0...v3.15.0) (2024-07-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 依赖版本问题 ([2dece7f](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2dece7f8a9f93740106f9aebd3166488ee17742d))
|
||||
|
||||
## [3.14.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.13.4...v3.14.0) (2024-03-11)
|
||||
|
||||
### [3.13.4](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.13.3...v3.13.4) (2023-10-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 商品编辑用item_id ([acdb808](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/acdb80841ae5a90045161b3c0f97c572dd64815f))
|
||||
|
||||
### [3.13.3](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.13.2...v3.13.3) (2023-09-27)
|
||||
|
||||
### [3.13.1](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.13.0...v3.13.1) (2023-09-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复编辑商品 ([01bf880](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/01bf8800a5eb5173f73e0ea4ab0f1821c6ba5469))
|
||||
|
||||
## [3.13.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.12.0...v3.13.0) (2023-06-01)
|
||||
|
||||
## [3.12.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.11.1...v3.12.0) (2023-05-18)
|
||||
|
||||
## [3.11.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.10.0...v3.11.0) (2023-04-24)
|
||||
|
||||
## [3.10.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.9.0...v3.10.0) (2023-02-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 开发票跳转 ([da59cd2](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/da59cd265579ceb29139dce82b93319d6becdf68))
|
||||
* 开发票跳转参数 ([6e491f7](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/6e491f71a1fa3fee781c9bfb8343cda7d1160e2e))
|
||||
|
||||
## [3.9.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.8.0...v3.9.0) (2023-01-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 微信JSSDK签名 ([42292f4](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/42292f4a526ab9a54d6a093bf062ac87890a7b8d))
|
||||
|
||||
## [3.8.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.7.0...v3.8.0) (2022-12-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* merge ([96a66f9](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/96a66f94eeb4b67addecdff08a4a0a4009d33425))
|
||||
* 店务 ([0eb621b](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/0eb621b369b1dcbf65bb99fc82206a80ed7a3194))
|
||||
|
||||
## [3.7.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.6.0...v3.7.0) (2022-11-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* tabbar样式 ([99438a6](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/99438a60ea382adf3c3ce3bbc9cd9899bc87c9e0))
|
||||
|
||||
## [3.6.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.5.0...v3.6.0) (2022-10-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 售后入口 ([2ead008](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2ead0081b1baf17df1454e137905cb722947e8e8))
|
||||
|
||||
## [3.5.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.4.0...v3.5.0) (2022-09-29)
|
||||
|
||||
## [3.4.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.3.0...v3.4.0) (2022-09-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* env ([ae211a4](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/ae211a46561a502acc20a579c60cbd980d21e173))
|
||||
* 修改改价入口 ([56efe5b](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/56efe5b006782ade9788fa7aae162c89b87d53ee))
|
||||
|
||||
## [3.3.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.2.1...v3.3.0) (2022-08-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* ECX-3104 ([2c2c6a0](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2c2c6a0d6eec295cdad38ee9db2a7100325fa0ff))
|
||||
* 订单刷新bug ([aa36a2d](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/aa36a2dadc43525fe0551cad7146e7eec97e42f6))
|
||||
* 首页入口 ([eb5b43d](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/eb5b43db55b8ba699ae3bdcb325451a8b4113b0a))
|
||||
|
||||
### [3.2.1](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.2.0...v3.2.1) (2022-08-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 移动收银 ([6605382](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/6605382f7c812b6ac42ea6ff19b6c177c35fd364))
|
||||
* 移动收银入口 ([3fa3797](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/3fa3797e35deb77c597dbdf55693ab3610e27eed))
|
||||
|
||||
## [3.2.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.1.0...v3.2.0) (2022-08-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bug修复 ([d8fe862](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/d8fe862953d8742d42bbdc19217a63284caddd1b))
|
||||
|
||||
## [3.1.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v3.0.0...v3.1.0) (2022-07-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 3.1.0 ([28bf461](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/28bf461877256f20bffe50ca2e7fe432869446a7))
|
||||
|
||||
## [2.10.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.9.0...v2.10.0) (2022-06-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 2.10.0 ([decb642](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/decb6422f55705f414282a99bbee2742106dbfbb))
|
||||
|
||||
## [2.9.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.8.0...v2.9.0) (2022-06-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 2.9.0 ([cecb13c](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/cecb13c977cdeaa6a7c7be0f8f4d0821f622ee46))
|
||||
|
||||
## [2.8.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.7.0...v2.8.0) (2022-05-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 2.8.0 ([e09b5a9](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/e09b5a9a5660b809351265e207469d5714cb225c))
|
||||
|
||||
## [2.7.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.6.3...v2.7.0) (2022-05-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 2.7.0 ([d51e4a3](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/d51e4a34319d6ce9677425cf5070b66463130a17))
|
||||
|
||||
### [2.6.3](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.6.2...v2.6.3) (2022-05-09)
|
||||
|
||||
### [2.6.2](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.6.1...v2.6.2) (2022-05-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* H5阿里云上传 ([7939114](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/79391144e2b7843f7865f23163ffb6843dcdbc67))
|
||||
|
||||
### [2.6.1](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.6.0...v2.6.1) (2022-04-21)
|
||||
|
||||
## [2.6.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v2.5.2...v2.6.0) (2022-04-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* test ([33ca3b6](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/33ca3b6e43d88732c11f7c8e8e5ca0284acc50ef))
|
||||
|
||||
### [2.5.2](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.4.0...v2.5.2) (2022-04-09)
|
||||
|
||||
### [2.5.1](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.4.0...v2.5.1) (2022-04-09)
|
||||
|
||||
## [1.4.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.3.3...v1.4.0) (2022-03-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 修改baseUrl ([351b659](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/351b65990988b9ccf66031587179bda8f5c9c5d7))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 域名验证 ([1c8812d](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/1c8812d75b91deae1a447eebf90b3111cd24ab72))
|
||||
|
||||
### [1.3.3](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.3.2...v1.3.3) (2022-01-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* req ([3069cde](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/3069cde4cab417a7f9905b6728107d8412aa4b14))
|
||||
* 修复company_id首次访问缓存问题; ([30313be](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/30313be96ac80ecae8812ef8f0c323e7e8d5afc8))
|
||||
* 修复req ([c69f737](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/c69f7377e1ceaa49172d27be5a2eb0857df1c3c8))
|
||||
* 排查测试环境sdk失效问题 ([e1eca37](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/e1eca372aa9be56ab390936e8c7b3bf92c56c099))
|
||||
|
||||
### [1.3.2](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.3.1...v1.3.2) (2021-12-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复店务端req ([8d86aed](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/8d86aedcb73e4aa825827ace28e0de9f2591d964))
|
||||
* 关闭qwsdk_log ([e32b588](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/e32b588005e9c34aaf296b6352a7f9eae6c2f6e4))
|
||||
* 同步req ([2a79001](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2a790012056215b82ede8b36704dcf2fa035143f))
|
||||
* 屏蔽sdk中log ([e391ae5](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/e391ae5ea6a0eaaf54800dd2bf9579e5517350ed))
|
||||
|
||||
### [1.3.1](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.3.0...v1.3.1) (2021-11-04)
|
||||
|
||||
## [1.3.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.2.0...v1.3.0) (2021-10-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 安卓端webView兼容jssdk ([9dfaa81](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/9dfaa818b81c5eccb8bf72df4a71c78ffcecebaf))
|
||||
* 安卓端webView兼容jssdk ([8f38c2b](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/8f38c2b8668d4c1ee8e9b53a5f663a6b1e12623b))
|
||||
* 安卓端webView兼容jssdk ([b5f112f](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/b5f112f4328a6cac3044579fd17a4a1134067ce5))
|
||||
* 安卓端webView兼容jssdk ([7a1e18e](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/7a1e18e0982b78bbb75a0970890952d869d674d2))
|
||||
|
||||
### [1.1.4](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.13...v1.1.4) (2021-08-05)
|
||||
|
||||
### [1.0.7](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.6...v1.0.7) (2021-06-30)
|
||||
|
||||
## [1.2.0](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.1.8...v1.2.0) (2021-10-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 增加导购小程序业务域名配置文件; ([3bb0870](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/3bb0870f0d5da856512d7f3a123f4a6e92f31f2b))
|
||||
* 增加导购小程序生产环境业务域名配置文件; ([7154493](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/7154493ad439c23306f320fb0b3c08a767a720c3))
|
||||
* 店务端接收导购助手参数 ([c719072](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/c71907292cc7cafcf4c5fc47ee54eb5ef11145ef))
|
||||
* 店务端接收导购助手参数 ([24eb241](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/24eb241129a619a947b92f591e1e365b189f9891))
|
||||
* 店务端接收导购助手参数 ([19a9fe7](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/19a9fe7856c74d7e91ff9fffc2e57111ee6b638c))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* jssdk debug ([cbc39ae](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/cbc39ae620f26af8967441d73f2096a6334a48be))
|
||||
* 开启jssdk 企微小程序webView嵌套环境debug ([8cc4551](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/8cc45518d367e1f0ef8aeb41e1a280fafe6deeef))
|
||||
* 开启测试环境首页扫码debug; ([f774e60](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/f774e60491050dd8930003dfeb5b1149e9048f94))
|
||||
* 开启测试环境首页扫码debug; ([2ed567e](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2ed567eb0f74b71cfdf37c8660cf788d11ca98d6))
|
||||
|
||||
### [1.1.8](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.1.7...v1.1.8) (2021-09-17)
|
||||
|
||||
### [1.1.7](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.1.6...v1.1.7) (2021-09-02)
|
||||
|
||||
### [1.1.6](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.1.5...v1.1.6) (2021-09-02)
|
||||
|
||||
### [1.1.5](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.1.3...v1.1.5) (2021-09-02)
|
||||
|
||||
### [1.1.4](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.1.3...v1.1.4) (2021-09-02)
|
||||
|
||||
### [1.1.3](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.13...v1.1.3) (2021-09-02)
|
||||
|
||||
### [1.0.13](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.9...v1.0.13) (2021-07-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add cmd ([7cbceb2](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/7cbceb2264864be8f92e3cd6db0be475dd19853c))
|
||||
|
||||
### [1.0.9](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.8...v1.0.9) (2021-07-08)
|
||||
|
||||
### [1.0.8](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.6...v1.0.8) (2021-07-08)
|
||||
|
||||
### [1.0.7](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.6...v1.0.7) (2021-07-08)
|
||||
|
||||
### [1.0.6](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.5...v1.0.6) (2021-06-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 发版 ([2ed9071](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2ed90711e048312caab27431b92bf216c4c22ac3))
|
||||
|
||||
### [1.0.5](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.4...v1.0.5) (2021-06-30)
|
||||
|
||||
### [1.0.4](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.3...v1.0.4) (2021-06-30)
|
||||
|
||||
### [1.0.3](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.2...v1.0.3) (2021-06-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修改app name ([1b31c3d](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/1b31c3d07a0810e9733982170c9b62190dd55040))
|
||||
|
||||
### [1.0.2](https://git.ishopex.cn/onex/ecshopx-dianwu/compare/v1.0.1...v1.0.2) (2021-06-29)
|
||||
|
||||
### 1.0.1 (2021-06-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* code prettier ([3842c30](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/3842c3001bd7d84a0c44685d81d1a5a136ba1d6e))
|
||||
* css hash ([912a2f4](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/912a2f4f21735c82945a9847645387ca8fb51f88))
|
||||
* dockerfile ([5eb29c1](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/5eb29c142bb6e38fb7acefb026e03f11f15ddc24))
|
||||
* format ([598c421](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/598c421a3a9ef14dd00ef01c2d6319d0df9e49a1))
|
||||
* format ([98c0593](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/98c0593cdedbaeb117db59da5c379ee4b25b3199))
|
||||
* js hash ([6789d22](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/6789d22e3918d9f5991a2a8d3f197c0a61d3991e))
|
||||
* remove APP_COMPANY_ID ([fdba549](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/fdba549392f594fb85154eebf36e6b31f2fa3c91))
|
||||
* remove shopexcomps ([0836487](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/0836487bd10c81af0c2a4410116abb30aec57df1))
|
||||
* sandbox ([5cf2325](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/5cf2325f83b5c8a15cae6864bb999ad8315fe5fe))
|
||||
* tabbar ([4e2ca03](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/4e2ca0396077d49ab7d2a5ca3ada1a5d7463995e))
|
||||
* taro-ui版本更新 ([2fb9e97](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2fb9e974c242bf39382f91d1029946877dfdf30d))
|
||||
* 企微授权登录 ([bf5e16f](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/bf5e16f02219f404f7d5041cbdf3b8e2b2e80c9a))
|
||||
* 优化 ([e196391](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/e1963913697b437dfb2d3b6eff06f077c74aabbe))
|
||||
* 修改昵称 ([5a4bc8a](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/5a4bc8af3c1f32bafb5977a0b38afec3301abf2d))
|
||||
* 修改环境变量 ([50419ec](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/50419ec847caf52fb89e96d60ae01a58e2e23302))
|
||||
* 引入全局样式变量 ([186ef18](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/186ef18c641c3779a2cf9b0134805d201125e8b5))
|
||||
* 授权 ([9313417](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/93134170463bc4266c7c2791f74e2f69c0f1d4f4))
|
||||
* 昵称显示问题 ([8a8dbe2](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/8a8dbe2fa266954e9ca4c3bbb0fd48d726b063da))
|
||||
* 更改授权文件 ([2aca57a](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/2aca57a37b04be97a88917759cd438c97db43e34))
|
||||
* 添加扫一扫 ([20a7c7e](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/20a7c7eb7a615149e983e640f41c65b44447b415))
|
||||
* 添加验证 ([0cf522b](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/0cf522b34dbcf514d54f8b3c7eab4cbdf0969060))
|
||||
* 添加验证文件 ([71c7278](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/71c72784fcbc52c815f79fc57fbf463aa21a6747))
|
||||
* 状态持久化 ([996ef49](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/996ef49bbe07bb320b5fda379b780be44ea11f9f))
|
||||
* 环境变量更改 ([7b60604](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/7b6060417be2f65c58c0656caa002a0393f3a846))
|
||||
* 绑定手机号 ([79f2bf5](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/79f2bf56417d51b828d85672f9e0036f1dfdaac1))
|
||||
* 绑定手机号回退显示配置授权地址 ([a590412](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/a5904126a6a50628c35f878f205e05cf10e546d7))
|
||||
* 绑定跳转问题 ([a6e5e5a](https://git.ishopex.cn/onex/ecshopx-dianwu/commit/a6e5e5a753565be7408e9d9e3ca785cad88f22e6))
|
||||
32
Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
FROM node:12.19.1-alpine3.12 AS builder
|
||||
|
||||
ARG CMD
|
||||
ARG APP_BASE_URL
|
||||
ARG APP_WEBSOCKET
|
||||
ARG APP_AUTH_PAGE
|
||||
ARG APP_PLATFORM
|
||||
ARG APP_DEBUG
|
||||
|
||||
ENV APP_BASE_URL ${APP_BASE_URL}
|
||||
ENV APP_WEBSOCKET ${APP_WEBSOCKET}
|
||||
ENV APP_AUTH_PAGE ${APP_AUTH_PAGE}
|
||||
ENV APP_PLATFORM ${APP_PLATFORM}
|
||||
ENV APP_DEBUG ${APP_DEBUG}
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
COPY .env ./
|
||||
COPY .env.* ./
|
||||
RUN npm config set registry https://registry.npmmirror.com && npm config set @shopex:registry http://registry.npm.ishopex.cn
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
RUN ls -la
|
||||
RUN ${CMD}
|
||||
RUN ls -l /app/dist
|
||||
|
||||
FROM steebchen/nginx-spa:stable
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/dist .
|
||||
EXPOSE 80
|
||||
CMD ["nginx"]
|
||||
24
LICENSE
Normal file
@@ -0,0 +1,24 @@
|
||||
EcshopX Open Source License
|
||||
EcshopX is licensed under the Apache License 2.0, with the following additional conditions:
|
||||
--------------------------------------------------------------------------------
|
||||
ADDITIONAL TERMS PURSUANT TO SECTION 7 OF APACHE LICENSE 2.0:
|
||||
1. Branding Retention Requirement
|
||||
You must retain all Shopex brand identifiers visible in: User interfaces (e.g., Front-end Interface, admin consoles, login pages); This includes logos, copyright notices, and "Powered by Shopex" labels.
|
||||
2. Commercial License for Branding Removal
|
||||
If you remove or alter Shopex brand identifiers, you must obtain a branding removal license from Shopex. Contact us at: http://www.shopex.cn to purchase a branding removal license.
|
||||
3.You shall not in any manner violate any applicable national or international laws or regulations or infringe upon the lawful rights and interests of any third party;
|
||||
4. Enforcement
|
||||
Failure to comply with these additional terms terminates your rights under this license.
|
||||
|
||||
Copyright (c) 2025 Shopex
|
||||
--------------------------------------------------------------------------------
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this software except in compliance with the License.
|
||||
You may obtain a copy of the License at:
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
33
README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
<p align="center"><img width="500" height="auto" alt="logo1" src="https://github.com/user-attachments/assets/097cbde6-cedd-42d0-a2d8-a0a0430289b5" /></p>
|
||||
|
||||
### <p align="center">Desktop Frontend</p>
|
||||
|
||||
# Getting started
|
||||
Node.js (current LTS) and npm are required to run the project. To be sure about the version compatibility you can enable Node's corepack.
|
||||
|
||||
### Node
|
||||
```
|
||||
Node v12.20.1
|
||||
```
|
||||
|
||||
### Installation
|
||||
```
|
||||
cd ecshopx-dianwu
|
||||
npm i
|
||||
```
|
||||
|
||||
### Configure the .env file
|
||||
```shell
|
||||
# Backend API Base URL
|
||||
APP_BASE_URL=
|
||||
```
|
||||
|
||||
### Run project
|
||||
```
|
||||
npm run dev:h5
|
||||
```
|
||||
|
||||
### Build packages
|
||||
```
|
||||
npm run build:h5
|
||||
```
|
||||
13
babel.config.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// babel-preset-taro 更多选项和默认值:
|
||||
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'taro',
|
||||
{
|
||||
framework: 'react',
|
||||
ts: false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
8
config/dev.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"development"'
|
||||
},
|
||||
defineConstants: {},
|
||||
mini: {},
|
||||
h5: {}
|
||||
}
|
||||
110
config/index.js
Normal file
@@ -0,0 +1,110 @@
|
||||
const path = require('path')
|
||||
const chalk = require('chalk')
|
||||
const dotenvFlow = require('dotenv-flow')
|
||||
const pkg = require('../package.json')
|
||||
const { getEnvs, getDefineConstants, getCacheIdentifier } = require('./utils')
|
||||
|
||||
const BUILD_ENV = process.env.BUILD_ENV
|
||||
const TARO_ENV = process.env.TARO_ENV
|
||||
const BUILD_TARGET = process.env.npm_config_target
|
||||
|
||||
dotenvFlow.config({
|
||||
node_env: BUILD_ENV
|
||||
})
|
||||
|
||||
const APP_ENVS = getEnvs()
|
||||
const CONST_ENVS = {
|
||||
APP_NAME: pkg.app_name,
|
||||
APP_VERSION: pkg.version,
|
||||
APP_AUTH_PAGE: '/pages/auth/login',
|
||||
...APP_ENVS
|
||||
}
|
||||
|
||||
Object.keys(CONST_ENVS).forEach((key) => {
|
||||
console.log(chalk.green(`${key}=${CONST_ENVS[key]}`))
|
||||
})
|
||||
|
||||
const config = {
|
||||
projectName: CONST_ENVS.APP_NAME,
|
||||
date: '2021-5-24',
|
||||
designWidth: 750,
|
||||
deviceRatio: {
|
||||
640: 2.34 / 2,
|
||||
750: 1,
|
||||
828: 1.81 / 2
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
outputRoot: 'dist',
|
||||
plugins: [],
|
||||
defineConstants: getDefineConstants(CONST_ENVS),
|
||||
alias: {
|
||||
'@': path.join(__dirname, '../src')
|
||||
},
|
||||
sass: {
|
||||
resource: path.resolve(__dirname, '..', 'src/style/imports.scss')
|
||||
},
|
||||
copy: {
|
||||
patterns: [{ from: 'src/files/', to: `dist/` }],
|
||||
options: {}
|
||||
},
|
||||
framework: 'react',
|
||||
mini: {
|
||||
postcss: {
|
||||
pxtransform: {
|
||||
enable: true,
|
||||
config: {}
|
||||
},
|
||||
url: {
|
||||
enable: true,
|
||||
config: {
|
||||
limit: 1024 // 设定转换尺寸上限
|
||||
}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
h5: {
|
||||
publicPath: '/',
|
||||
staticDirectory: 'static',
|
||||
output: {
|
||||
filename: 'js/[name].[hash:8].js',
|
||||
chunkFilename: 'js/[name].[chunkhash:8].js'
|
||||
},
|
||||
miniCssExtractPluginOption: {
|
||||
filename: 'css/[name].[hash:8].css',
|
||||
chunkFilename: 'css/[id].[chunkhash:8].css'
|
||||
},
|
||||
router: {
|
||||
mode: 'browser'
|
||||
},
|
||||
devServer: {
|
||||
overlay: false
|
||||
},
|
||||
postcss: {
|
||||
autoprefixer: {
|
||||
enable: true,
|
||||
config: {}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function (merge) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return merge({}, config, require('./dev'))
|
||||
}
|
||||
return merge({}, config, require('./prod'))
|
||||
}
|
||||
17
config/prod.js
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"production"'
|
||||
},
|
||||
defineConstants: {},
|
||||
mini: {},
|
||||
h5: {
|
||||
/**
|
||||
* 如果h5端编译后体积过大,可以使用webpack-bundle-analyzer插件对打包体积进行分析。
|
||||
* 参考代码如下:
|
||||
* webpackChain (chain) {
|
||||
* chain.plugin('analyzer')
|
||||
* .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
|
||||
* }
|
||||
*/
|
||||
}
|
||||
}
|
||||
36
config/utils.js
Normal file
@@ -0,0 +1,36 @@
|
||||
const crypto = require('crypto')
|
||||
const chalk = require('chalk')
|
||||
const pkg = require('../package.json')
|
||||
|
||||
function digest(str) {
|
||||
return crypto.createHash('md5').update(str).digest('hex')
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getEnvs() {
|
||||
const envs = Object.keys(process.env).reduce((ret, key) => {
|
||||
const val = process.env[key]
|
||||
if (key.indexOf('APP_') >= 0) {
|
||||
// console.log(chalk.green(`${key}=${val}`));
|
||||
ret[key] = val
|
||||
}
|
||||
return ret
|
||||
}, {})
|
||||
return envs
|
||||
},
|
||||
|
||||
getDefineConstants(consts) {
|
||||
consts = Object.keys(consts).reduce((val, k) => {
|
||||
val[`process.env.${k}`] = process.env.TARO_ENV == 'h5' ? `'${consts[k]}'` : consts[k]
|
||||
return val
|
||||
}, {})
|
||||
return consts
|
||||
},
|
||||
|
||||
getCacheIdentifier(consts = {}) {
|
||||
const env = process.env.NODE_ENV || 'development'
|
||||
const envHash = digest(JSON.stringify(consts))
|
||||
|
||||
return `cache-loader:${pkg.version} ${env} ${envHash}`
|
||||
}
|
||||
}
|
||||
29696
package-lock.json
generated
Normal file
103
package.json
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"name": "ecshopx-dianwu",
|
||||
"app_name": "店务助手",
|
||||
"version": "4.0.0",
|
||||
"private": true,
|
||||
"repository": "https://git.ishopex.cn/onex/ecshopx-dianwu.git",
|
||||
"description": "",
|
||||
"templateInfo": {
|
||||
"name": "default",
|
||||
"typescript": false,
|
||||
"css": "sass"
|
||||
},
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
"build:swan": "taro build --type swan",
|
||||
"build:alipay": "taro build --type alipay",
|
||||
"build:tt": "taro build --type tt",
|
||||
"build:h5": "taro build --type h5",
|
||||
"build:h5:stage": "BUILD_ENV=stage taro build --type h5",
|
||||
"build:h5:sandbox": "BUILD_ENV=sandbox taro build --type h5",
|
||||
"build:rn": "taro build --type rn",
|
||||
"build:qq": "taro build --type qq",
|
||||
"build:jd": "taro build --type jd",
|
||||
"build:quickapp": "taro build --type quickapp",
|
||||
"dev:weapp": "npm run build:weapp -- --watch",
|
||||
"dev:swan": "npm run build:swan -- --watch",
|
||||
"dev:alipay": "npm run build:alipay -- --watch",
|
||||
"dev:tt": "npm run build:tt -- --watch",
|
||||
"dev:h5": "npm run build:h5 -- --watch",
|
||||
"dev:h5:stage": "BUILD_ENV=stage npm run build:h5 -- --watch",
|
||||
"dev:h5:sandbox": "BUILD_ENV=sandbox npm run build:h5 -- --watch",
|
||||
"dev:rn": "npm run build:rn -- --watch",
|
||||
"dev:qq": "npm run build:qq -- --watch",
|
||||
"dev:jd": "npm run build:jd -- --watch",
|
||||
"dev:quickapp": "npm run build:quickapp -- --watch",
|
||||
"precommit": "lint-staged",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*.{js,jsx}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"browserslist": [
|
||||
"last 3 versions",
|
||||
"Android >= 4.1",
|
||||
"ios >= 8"
|
||||
],
|
||||
"author": "",
|
||||
"engines": {
|
||||
"node": "12.20.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.936.0",
|
||||
"axios": "^0.21.1",
|
||||
"default-passive-events": "^2.0.0",
|
||||
"immer": "^9.0.12",
|
||||
"lodash": "^4.17.21",
|
||||
"qiniu-js": "^3.3.1",
|
||||
"qrcode": "^1.4.4",
|
||||
"qs": "^6.10.1",
|
||||
"react": "^17.0.0",
|
||||
"react-dom": "^17.0.0",
|
||||
"react-redux": "^7.2.4",
|
||||
"react-wx-images-viewer": "^1.0.6",
|
||||
"redux": "^4.1.0",
|
||||
"redux-create-reducer": "^2.0.1",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-persist": "^5.10.0",
|
||||
"redux-thunk": "^2.3.0",
|
||||
"stylenames": "^1.1.6",
|
||||
"taro-ui": "3.0.0-alpha.3",
|
||||
"use-immer": "^0.6.0",
|
||||
"vconsole": "^3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.0",
|
||||
"@babel/runtime": "7.7.7",
|
||||
"@tarojs/components": "3.2.9",
|
||||
"@tarojs/react": "3.2.9",
|
||||
"@tarojs/runtime": "3.2.9",
|
||||
"@tarojs/taro": "3.2.9",
|
||||
"@tarojs/cli": "3.2.9",
|
||||
"@tarojs/mini-runner": "3.2.9",
|
||||
"@tarojs/webpack-runner": "3.2.9",
|
||||
"@types/react": "^17.0.2",
|
||||
"@types/webpack-env": "^1.13.6",
|
||||
"babel-preset-taro": "3.2.9",
|
||||
"chalk": "^4.1.1",
|
||||
"dotenv-flow": "^3.2.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-taro": "3.2.9",
|
||||
"eslint-plugin-import": "^2.12.0",
|
||||
"eslint-plugin-react": "^7.8.2",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"husky": "^6.0.0",
|
||||
"lint-staged": "^10.2.11",
|
||||
"prettier": "^2.3.0",
|
||||
"prettier-eslint-cli": "^5.0.1",
|
||||
"standard-version": "^9.3.0",
|
||||
"stylelint": "9.3.0"
|
||||
}
|
||||
}
|
||||
13
project.config.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"miniprogramRoot": "./dist",
|
||||
"projectname": "ecshopx-dianwu",
|
||||
"description": "",
|
||||
"appid": "touristappid",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": false,
|
||||
"postcss": false,
|
||||
"minified": false
|
||||
},
|
||||
"compileType": "miniprogram"
|
||||
}
|
||||
9
project.tt.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"miniprogramRoot": "./",
|
||||
"projectname": "ecshopx-dianwu",
|
||||
"appid": "touristappid",
|
||||
"setting": {
|
||||
"es6": false,
|
||||
"minified": false
|
||||
}
|
||||
}
|
||||
25
src/api/address.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
export function getAddressList(params) {
|
||||
return req.get('/distributors/aftersalesaddress', params)
|
||||
}
|
||||
|
||||
export function postAddressList(params) {
|
||||
return req.post('/distributors/aftersalesaddress', params)
|
||||
}
|
||||
export function updateAddressActive(params) {
|
||||
return req.put('/distributors/aftersalesaddress', params)
|
||||
}
|
||||
|
||||
export function areaList() {
|
||||
return req.get('/espier/address')
|
||||
}
|
||||
|
||||
export function detail(params) {
|
||||
return req.get(`/distributors/aftersalesaddress/${params.address_id}`)
|
||||
}
|
||||
36
src/api/afterSales.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
//订单列表
|
||||
export function list(params) {
|
||||
return req.get('/aftersales', params)
|
||||
}
|
||||
|
||||
//售后详情
|
||||
export function detail(params) {
|
||||
return req.get(`/aftersales/${params.no}`)
|
||||
}
|
||||
|
||||
//售后审核
|
||||
export function review(params) {
|
||||
return req.post(`/aftersales/review`, params)
|
||||
}
|
||||
|
||||
//确认收货
|
||||
export function confirm(params) {
|
||||
return req.post(`/aftersales/refundCheck`, params)
|
||||
}
|
||||
|
||||
//售后地址
|
||||
export function address(params) {
|
||||
return req.get(`/distributors/aftersalesaddress`, params)
|
||||
}
|
||||
|
||||
//售后列表添加备注功能
|
||||
export function remark(params) {
|
||||
return req.put(`/aftersales/remark`, params)
|
||||
}
|
||||
35
src/api/auth.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
import { isFromWebapp } from '@/utils'
|
||||
|
||||
export function getAuthorizeUrl(params) {
|
||||
return req.get('/operator/workwechat/authorizeurl', params)
|
||||
}
|
||||
|
||||
export function workwechatOauthLogin(params) {
|
||||
return req.post('/operator/workwechat/oauth/login', params)
|
||||
}
|
||||
|
||||
export function bindMobile(params) {
|
||||
return req.post('/operator/workwechat/bind_mobile', params)
|
||||
}
|
||||
|
||||
export function getQwJsSdkConfig(params) {
|
||||
if (isFromWebapp()) {
|
||||
return req.post('/operator/wechat/distributor/js/config', params)
|
||||
} else {
|
||||
return req.post('/workwechat/distributor/js/config', params)
|
||||
}
|
||||
}
|
||||
//获取图片验证码
|
||||
export function getImageVerificationCode(params) {
|
||||
return req.get('/operator/app/image/code', params)
|
||||
}
|
||||
//获取手机验证码
|
||||
export function getPhoneCode(params) {
|
||||
return req.post('/operator/app/sms/code', params)
|
||||
}
|
||||
21
src/api/consts.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
export const HTTP_STATUS = {
|
||||
SUCCESS: 200,
|
||||
CREATED: 201,
|
||||
ACCEPTED: 202,
|
||||
CLIENT_ERROR: 400,
|
||||
UNAUTHORIZED: 401,
|
||||
FORBIDDEN: 403,
|
||||
NOT_FOUND: 404,
|
||||
SERVER_ERROR: 500,
|
||||
BAD_GATEWAY: 502,
|
||||
SERVICE_UNAVAILABLE: 503,
|
||||
GATEWAY_TIMEOUT: 504,
|
||||
BUSINESS_ERROR: 422,
|
||||
TOKEN_NEEDS_REFRESH: 401001,
|
||||
USER_FORBIDDEN: 401002
|
||||
}
|
||||
15
src/api/home.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
export function getStatistics(params) {
|
||||
return req.get('/getStatistics', params)
|
||||
}
|
||||
|
||||
export function checkCode(params) {
|
||||
return req.post('/discountcard/consume', params)
|
||||
// return req.post('http://ecshopx.s.ex-sandbox.com/api/discountcard/consume', params)
|
||||
}
|
||||
34
src/api/index.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import * as auth from './auth'
|
||||
import * as operator from './operator'
|
||||
import * as message from './message'
|
||||
import * as order from './order'
|
||||
import * as home from './home'
|
||||
import * as planSelection from './planSelection'
|
||||
import * as my from './my'
|
||||
import * as logistics from './logistics'
|
||||
import * as address from './address'
|
||||
import * as afterSales from './afterSales'
|
||||
import * as qiniu from './qiniu'
|
||||
import * as weapp from './weapp'
|
||||
import * as salesman from './salesman'
|
||||
|
||||
export default {
|
||||
auth,
|
||||
operator,
|
||||
message,
|
||||
order,
|
||||
planSelection,
|
||||
my,
|
||||
home,
|
||||
logistics,
|
||||
address,
|
||||
afterSales,
|
||||
qiniu,
|
||||
weapp,
|
||||
salesman
|
||||
}
|
||||
27
src/api/logistics.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
//获取物流信息
|
||||
export function getLogistics(params) {
|
||||
console.log(params)
|
||||
return req.get('/delivery/process/list', params)
|
||||
}
|
||||
|
||||
// 获取快递公司
|
||||
export function getCourierCompanyList() {
|
||||
return req.get('/trade/logistics/list')
|
||||
}
|
||||
|
||||
// 修改物流信息
|
||||
export function updateLogistics(orders_delivery_id, data) {
|
||||
return req.put(`/delivery/${orders_delivery_id}`, data)
|
||||
}
|
||||
|
||||
//获取物流详情
|
||||
export function getDeliveryList(params) {
|
||||
return req.get(`/delivery/lists`, params)
|
||||
}
|
||||
22
src/api/message.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
// 获取消息
|
||||
export function getMessageList(params) {
|
||||
// console.log(123);
|
||||
return req.get('/order/message/new', params)
|
||||
}
|
||||
|
||||
// 消息详情
|
||||
export function getMessageDetail(params) {
|
||||
return req.get('/order/message/list', params)
|
||||
}
|
||||
|
||||
// 清除已读消息
|
||||
export function clearUnread(params) {
|
||||
return req.post('/order/message/update', params)
|
||||
}
|
||||
16
src/api/my.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
//获取我的信息
|
||||
export function getMyinfo(params) {
|
||||
return req.get('/operator/getinfo', params)
|
||||
}
|
||||
|
||||
// 更改用户名
|
||||
export function updateInfo(params) {
|
||||
return req.put('/operator/updatedata', params)
|
||||
}
|
||||
33
src/api/operator.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
export function getProtocol(params) {
|
||||
return req.get('/api/protocol', params)
|
||||
}
|
||||
|
||||
//发送验证码
|
||||
export function sendCode(params) {
|
||||
return req.post('/operator/app/sms/code', params)
|
||||
}
|
||||
|
||||
export function smsLogin(params) {
|
||||
return req.get('/api/sms/login', params)
|
||||
}
|
||||
|
||||
export function getUserInfo(params) {
|
||||
return req.get('/operator/getinfo', params)
|
||||
}
|
||||
|
||||
//绑定手机号
|
||||
export function bindPhone(params) {
|
||||
return req.post('/operator/workwechat/bind_mobile', params)
|
||||
}
|
||||
|
||||
//绑定店铺
|
||||
export function selectDistributor(params) {
|
||||
return req.post('/operator/select/distributor', params)
|
||||
}
|
||||
103
src/api/order.js
Normal file
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
//订单列表
|
||||
export function list(params) {
|
||||
return req.get('/orders', params)
|
||||
}
|
||||
|
||||
//订单备注
|
||||
export function remarks({ orderId, ...params }) {
|
||||
return req.put(`/remarks/${orderId}`, params)
|
||||
}
|
||||
|
||||
//售后订单备注
|
||||
export function afterremarks(params) {
|
||||
return req.put(`/remark`, params)
|
||||
}
|
||||
|
||||
//扫一扫
|
||||
export function code(params) {
|
||||
return req.post(`/ziticode`, params)
|
||||
}
|
||||
|
||||
//订单取消
|
||||
export function cancel(params) {
|
||||
return req.post(`/order/${params.order_id}/cancel`, params)
|
||||
}
|
||||
|
||||
//订单接单
|
||||
export function businessreceipt({ orderId }) {
|
||||
return req.post(`/businessreceipt/${orderId}`)
|
||||
}
|
||||
|
||||
//订单详情
|
||||
export function detail({ orderId }) {
|
||||
return req.get(`/order/${orderId}`)
|
||||
}
|
||||
|
||||
//订单会员信息
|
||||
export function member({ userId }) {
|
||||
return req.get(`/member`, { user_id: userId })
|
||||
}
|
||||
|
||||
//订单发货
|
||||
export function delivery(params) {
|
||||
return req.post(`/delivery`, params)
|
||||
}
|
||||
|
||||
//订单核销
|
||||
export function writeoff({ orderId, ...params }) {
|
||||
return req.post(`/writeoff/${orderId}`, params)
|
||||
}
|
||||
|
||||
//订单核销
|
||||
export function qrwriteoff(params) {
|
||||
return req.post(`/qr_writeoff`, params)
|
||||
}
|
||||
//获取取消订单信息
|
||||
export function getcancelinfo(params) {
|
||||
return req.get(`/order/${params.order_id}/cancelinfo`, params)
|
||||
}
|
||||
|
||||
//确认订单取消审核
|
||||
export function confirmcancel(params) {
|
||||
return req.post(`/order/${params.order_id}/confirmcancel`, params)
|
||||
}
|
||||
|
||||
// 配送员列表
|
||||
export function getDeliveryList(params) {
|
||||
return req.get(`/account/management`, {
|
||||
pageSize: 999,
|
||||
page: 1,
|
||||
finderId: 100,
|
||||
operator_type: 'self_delivery_staff',
|
||||
is_disable: 0,
|
||||
staff_type: 'distributor',
|
||||
...params
|
||||
})
|
||||
}
|
||||
|
||||
//确认配送员
|
||||
export function confirmDelivery(params) {
|
||||
return req.post(`/order/deliverystaff/confirm`, params)
|
||||
}
|
||||
|
||||
//取消配送
|
||||
export function canceldeliverystaff(params) {
|
||||
return req.post(`/order/cancel/deliverystaff `, params)
|
||||
}
|
||||
|
||||
//确认打包
|
||||
export function confirmpackag(params) {
|
||||
return req.post(`/order/deliverypackag/confirm `, params)
|
||||
}
|
||||
|
||||
// 支付
|
||||
export function orderPayment(params) {
|
||||
return req.post('/order/payment', params)
|
||||
}
|
||||
66
src/api/ossStorage.js
Normal file
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import Taro from '@tarojs/taro'
|
||||
import req from './req'
|
||||
import axios from 'axios'
|
||||
import S from '@/spx'
|
||||
|
||||
/**
|
||||
* @description: 获取上传Token
|
||||
* @param {params: 'image' or 'video' }
|
||||
*/
|
||||
// export const getOssToken = (params = {
|
||||
// filetype: 'image'
|
||||
// }) => {
|
||||
// debugger
|
||||
// return fetch({
|
||||
// url: '/espier/oss_upload_token',
|
||||
// method: 'post',
|
||||
// data: params
|
||||
// })
|
||||
// }
|
||||
|
||||
export function getOssToken(params) {
|
||||
return req.post('/espier/oss_upload_token', params)
|
||||
}
|
||||
export function LocalUpload(tokenRes, file, filetype = 'image') {
|
||||
// console.log(tokenRes)
|
||||
// console.log(file)
|
||||
const token = S.getAuthToken()
|
||||
return Taro.uploadFile({
|
||||
url: `${req.baseURL}espier/upload_localimage`,
|
||||
filePath: file.path,
|
||||
name: 'images',
|
||||
header: {
|
||||
'Authorization': `Bearer ${token}`
|
||||
},
|
||||
formData: {
|
||||
...tokenRes,
|
||||
filetype
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const AliUpload = (tokenRes, file) => {
|
||||
console.log('tokenRes', tokenRes, file)
|
||||
const token = S.getAuthToken()
|
||||
return Taro.uploadFile({
|
||||
url: tokenRes.host,
|
||||
header: {
|
||||
'Authorization': `Bearer ${token}`
|
||||
},
|
||||
withCredentials: false,
|
||||
formData: {
|
||||
key: tokenRes.dir,
|
||||
policy: tokenRes.policy,
|
||||
OSSAccessKeyId: tokenRes.accessid,
|
||||
signature: tokenRes.signature,
|
||||
name: file.name,
|
||||
success_action_status: 200,
|
||||
file: file
|
||||
}
|
||||
})
|
||||
}
|
||||
12
src/api/planSelection.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
//获取店铺列表
|
||||
export function getShopList(params) {
|
||||
console.log(params)
|
||||
return req.get('/distributors', params)
|
||||
}
|
||||
10
src/api/qiniu.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
export function uploadQiniuPic(query) {
|
||||
return req.post('espier/image', query)
|
||||
}
|
||||
398
src/api/req.js
Normal file
@@ -0,0 +1,398 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import Taro from '@tarojs/taro'
|
||||
import qs from 'qs'
|
||||
import S from '@/spx'
|
||||
import { isAlipay, isWeixin, isFromWebapp } from '@/utils'
|
||||
import log from '@/utils/log'
|
||||
import { HTTP_STATUS } from './consts'
|
||||
|
||||
const isWeb = true
|
||||
|
||||
function addQuery(url, query) {
|
||||
return url + (url.indexOf('?') >= 0 ? '&' : '?') + query
|
||||
}
|
||||
|
||||
const request = (() => {
|
||||
if (isWeb) {
|
||||
// h5环境,请求失败时,需要额外处理
|
||||
return async (...args) => {
|
||||
let res
|
||||
try {
|
||||
res = await Taro.request(...args)
|
||||
} catch (e) {
|
||||
res = e
|
||||
if (e instanceof global.Response) {
|
||||
const data = await e.json()
|
||||
res = {
|
||||
data,
|
||||
statusCode: e.status,
|
||||
header: e.headers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
return Taro.request
|
||||
})()
|
||||
class RequestQueue {
|
||||
constructor() {
|
||||
this.requestList = []
|
||||
this.isRunning = false
|
||||
}
|
||||
|
||||
push(req) {
|
||||
this.requestList.push(req)
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.isRunning = false
|
||||
this.requestList = []
|
||||
}
|
||||
|
||||
run() {
|
||||
this.isRunning = true
|
||||
const next = async () => {
|
||||
const req = this.requestList.shift()
|
||||
log.debug(`requestQueue length is ${this.requestList.length}`)
|
||||
if (!req) return
|
||||
|
||||
await req()
|
||||
if (this.requestList.length > 0 && this.isRunning) {
|
||||
await next()
|
||||
}
|
||||
}
|
||||
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
||||
class API {
|
||||
constructor(options = {}) {
|
||||
this.setOptions(options)
|
||||
this.isRefreshingToken = false
|
||||
this.requestQueue = new RequestQueue()
|
||||
this.applet = options
|
||||
}
|
||||
|
||||
setOptions(opts) {
|
||||
let { baseURL = '/' } = opts
|
||||
if (!/\/$/.test(baseURL)) {
|
||||
baseURL = baseURL + '/'
|
||||
}
|
||||
this.baseURL = baseURL
|
||||
|
||||
const options = {
|
||||
company_id: Taro.getStorageSync('company_id')
|
||||
}
|
||||
if (isWeixin || isAlipay) {
|
||||
const extConfig = Taro.getExtConfigSync ? Taro.getExtConfigSync() : {}
|
||||
options.appid = extConfig.appid
|
||||
if (extConfig.company_id) {
|
||||
options.company_id = extConfig.company_id
|
||||
}
|
||||
}
|
||||
this.options = options
|
||||
}
|
||||
|
||||
errorToast(data) {
|
||||
let errMsg = data.message || (data.data && data.data.message) || '操作失败,请稍后重试'
|
||||
|
||||
if (errMsg.length > 11) {
|
||||
errMsg = errMsg.substring(0, 11) + '\n' + errMsg.substring(11)
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
Taro.showToast({
|
||||
icon: 'none',
|
||||
title: errMsg
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
|
||||
getReqUrl(url) {
|
||||
if (this.applet?.isWeapp) {
|
||||
return /^http/.test(url) ? url : `${this.applet.baseURL}${url.replace(/^\//, '')}`
|
||||
} else {
|
||||
return /^http/.test(url) ? url : `${this.baseURL}${url.replace(/^\//, '')}`
|
||||
}
|
||||
}
|
||||
|
||||
handleLogout() {
|
||||
this.requestQueue.destroy()
|
||||
this.isRefreshingToken = false
|
||||
S.logout()
|
||||
setTimeout(() => {
|
||||
if (isFromWebapp()) {
|
||||
Taro.removeStorageSync('persist:app')
|
||||
Taro.reLaunch({
|
||||
url: '/pages/index'
|
||||
})
|
||||
} else {
|
||||
S.login()
|
||||
}
|
||||
// Taro.redirectTo({ url: '/pages/auth/login' })
|
||||
}, 300)
|
||||
}
|
||||
|
||||
intereptorReq(params) {
|
||||
const { url, data, header = {}, method = 'GET' } = params
|
||||
const { company_id, appid } = this.options
|
||||
const methodIsGet = method.toLowerCase() === 'get'
|
||||
|
||||
const reqUrl = this.getReqUrl(url)
|
||||
let query = !data || typeof data === 'string' ? qs.parse(data) : data
|
||||
if (company_id) {
|
||||
query.company_id = company_id
|
||||
}
|
||||
|
||||
if (!methodIsGet) {
|
||||
header['content-type'] = header['content-type'] || 'application/x-www-form-urlencoded'
|
||||
}
|
||||
|
||||
const token = S.getAuthToken()
|
||||
|
||||
if (token) {
|
||||
header['Authorization'] = `Bearer ${token}`
|
||||
}
|
||||
|
||||
// 处理版本区分
|
||||
if (isWeb) {
|
||||
if (process.env.APP_VUE_SAAS) {
|
||||
header['origin'] = global.location.host
|
||||
}
|
||||
}
|
||||
|
||||
if ((isWeixin || isAlipay) && appid) {
|
||||
header['authorizer-appid'] = appid
|
||||
}
|
||||
|
||||
if (isFromWebapp()) {
|
||||
// if (!query.company_id) {
|
||||
query.company_id = S.get('WEBAPP', true).company_id
|
||||
//}
|
||||
} else {
|
||||
query.company_id = Taro.getStorageSync('company_id')
|
||||
}
|
||||
|
||||
const config = {
|
||||
...params,
|
||||
url: reqUrl,
|
||||
data: query,
|
||||
method: method.toUpperCase(),
|
||||
header: header
|
||||
}
|
||||
|
||||
// 清理请求参数
|
||||
if (methodIsGet) {
|
||||
config.url = addQuery(config.url, qs.stringify(config.data))
|
||||
delete config.data
|
||||
} else {
|
||||
config.data = qs.stringify(config.data)
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
intereptorRes(res) {
|
||||
const { data, statusCode, config } = res
|
||||
const { showError = true } = config
|
||||
if (statusCode == HTTP_STATUS.SUCCESS) {
|
||||
const { status_code } = data.data
|
||||
if (!status_code) {
|
||||
return data.data
|
||||
} else {
|
||||
// status_code 不为0,表示有错误
|
||||
if (showError) {
|
||||
this.errorToast(data)
|
||||
}
|
||||
return Promise.reject(this.reqError(res))
|
||||
}
|
||||
}
|
||||
|
||||
if (statusCode === HTTP_STATUS.UNAUTHORIZED) {
|
||||
if ((data.data && data.data.status_code) === HTTP_STATUS.USER_FORBIDDEN) {
|
||||
if (showError) {
|
||||
this.errorToast(data)
|
||||
}
|
||||
return Promise.reject(this.reqError(res, '帐号已被禁用'))
|
||||
}
|
||||
|
||||
this.handleLogout()
|
||||
return Promise.reject(this.reqError(res))
|
||||
}
|
||||
|
||||
if (statusCode === HTTP_STATUS.NOT_FOUND) {
|
||||
return Promise.reject(this.reqError(res, '请求资源不存在'))
|
||||
}
|
||||
|
||||
if (statusCode === HTTP_STATUS.BAD_GATEWAY) {
|
||||
return Promise.reject(this.reqError(res, '服务端出现了问题'))
|
||||
}
|
||||
|
||||
return Promise.reject(this.reqError(res, `API error: ${statusCode}`))
|
||||
}
|
||||
|
||||
async refreshToken() {
|
||||
this.isRefreshingToken = true
|
||||
const token = S.getAuthToken()
|
||||
try {
|
||||
await this.makeReq(
|
||||
{
|
||||
header: {
|
||||
Authorization: `Bearer ${token}`
|
||||
},
|
||||
method: 'get',
|
||||
url: this.getReqUrl('/token/refresh'),
|
||||
noPending: true
|
||||
},
|
||||
(res) => {
|
||||
console.log('refreshing token: ', res)
|
||||
const { statusCode } = res
|
||||
if (statusCode === HTTP_STATUS.UNAUTHORIZED) {
|
||||
return this.handleLogout()
|
||||
}
|
||||
|
||||
const newToken = res.header.Authorization.split(' ')[1]
|
||||
S.setAuthToken(newToken)
|
||||
}
|
||||
)
|
||||
} catch (e) {
|
||||
console.log('refreshToken', e)
|
||||
}
|
||||
|
||||
this.isRefreshingToken = false
|
||||
}
|
||||
|
||||
request = request
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {Object} config 请求参数
|
||||
* @param {function(Object)} [intereptorRes] 处理请求回调数据的方法
|
||||
* @param {function(Object)} [intereptorReq] 处理请求参数的方法
|
||||
* @return {Object} 请求返回的数据
|
||||
* @memberof API
|
||||
*/
|
||||
async makeReq(config = {}, intereptorRes, intereptorReq) {
|
||||
const { showLoading } = config
|
||||
const options = intereptorReq ? intereptorReq(config) : this.intereptorReq(config)
|
||||
|
||||
if (showLoading) {
|
||||
Taro.showLoading({
|
||||
mask: true
|
||||
})
|
||||
}
|
||||
|
||||
let ret
|
||||
try {
|
||||
const res = await this.request(options)
|
||||
res.config = options
|
||||
if (
|
||||
res.statusCode === HTTP_STATUS.UNAUTHORIZED &&
|
||||
(res.data.data && res.data.data.code) === HTTP_STATUS.TOKEN_NEEDS_REFRESH &&
|
||||
S.getAuthToken()
|
||||
) {
|
||||
// token失效时重造请求,并刷新token
|
||||
if (!this.isRefreshingToken) {
|
||||
await this.refreshToken()
|
||||
}
|
||||
ret = await this.pendingReq(config, intereptorRes, intereptorReq, true)
|
||||
} else {
|
||||
if (!this.isRefreshingToken || config.noPending) {
|
||||
ret = intereptorRes ? intereptorRes(res) : this.intereptorRes(res)
|
||||
} else {
|
||||
// 正在刷新token,将请求放入队列
|
||||
ret = await this.pendingReq(config, intereptorRes, intereptorReq)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('makeReq', e)
|
||||
}
|
||||
|
||||
if (showLoading) {
|
||||
Taro.hideLoading()
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
pendingReq(config, intereptorRes, intereptorReq, isSend) {
|
||||
return new Promise((resolve) => {
|
||||
const pendingReq = async () => {
|
||||
// 仅加入队列一次
|
||||
const reqConfig = {
|
||||
...config,
|
||||
noPending: true
|
||||
}
|
||||
const data = await this.makeReq(reqConfig, intereptorRes, intereptorReq)
|
||||
resolve(data)
|
||||
}
|
||||
this.requestQueue.push(pendingReq)
|
||||
if (isSend) this.requestQueue.run()
|
||||
})
|
||||
}
|
||||
|
||||
get(url, data, config) {
|
||||
return this.makeReq({
|
||||
...config,
|
||||
url,
|
||||
data,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
reqError(res, msg = '') {
|
||||
// console.log('reqError.res', res)
|
||||
// console.log('reqError.msg', msg)
|
||||
// if (res && res.statusCode) Taro.navigateTo('pages/auth/login')
|
||||
const errMsg = (res.data && res.data.message) || msg
|
||||
const err = new Error(errMsg)
|
||||
err.res = res
|
||||
return err
|
||||
}
|
||||
|
||||
post(url, data, config) {
|
||||
return this.makeReq({
|
||||
...config,
|
||||
url,
|
||||
data,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
put(url, data, config) {
|
||||
return this.makeReq({
|
||||
...config,
|
||||
url,
|
||||
data,
|
||||
method: 'PUT'
|
||||
})
|
||||
}
|
||||
|
||||
delete(url, data, config) {
|
||||
return this.makeReq({
|
||||
...config,
|
||||
url,
|
||||
data,
|
||||
method: 'DELETE'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production' && !isWeb) {
|
||||
Taro.addInterceptor(Taro.interceptors.logInterceptor)
|
||||
}
|
||||
|
||||
export default new API({
|
||||
baseURL: process.env.APP_BASE_URL
|
||||
})
|
||||
|
||||
export { API }
|
||||
15
src/api/salesman.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import { API } from './req'
|
||||
|
||||
const req = new API({
|
||||
baseURL: process.env.APP_BASE_URL + '/h5app/wxapp/',
|
||||
isWeapp: true
|
||||
})
|
||||
|
||||
export function storemanagerinfo(params) {
|
||||
return req.get('/salespersonadmin/storemanagerinfo', params)
|
||||
}
|
||||
83
src/api/weapp.js
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import req from './req'
|
||||
|
||||
//查询是否绑定
|
||||
export function is_bind(query) {
|
||||
return req.post('/operator/wechat/lite/login', query)
|
||||
}
|
||||
|
||||
//查询主类目
|
||||
export function main_category(query) {
|
||||
return req.get('/goods/category', {
|
||||
is_main_category: true
|
||||
})
|
||||
}
|
||||
|
||||
//查询分类
|
||||
export function category(query) {
|
||||
return req.get('/goods/category', {
|
||||
is_show: false,
|
||||
...query
|
||||
})
|
||||
}
|
||||
|
||||
//查询品牌
|
||||
export function brand() {
|
||||
return req.get('/goods/attributes', {
|
||||
page: 1,
|
||||
pageSize: 1000,
|
||||
attribute_type: 'brand'
|
||||
})
|
||||
}
|
||||
|
||||
//运费模版
|
||||
export function template() {
|
||||
return req.get('/shipping/templates/list', {
|
||||
page: 1,
|
||||
pageSize: 1000
|
||||
})
|
||||
}
|
||||
|
||||
//或者主类目详情
|
||||
export function main_category_detail(id) {
|
||||
return req.get(`/goods/category/${id}`)
|
||||
}
|
||||
|
||||
//商品列表
|
||||
export function good_list(params) {
|
||||
return req.get(`/goods/items`, params)
|
||||
}
|
||||
|
||||
//添加商品
|
||||
export function good(params) {
|
||||
return req.post(`/goods/items`, params)
|
||||
}
|
||||
|
||||
//上下架
|
||||
// export function update_status(params){
|
||||
// return req.post(`/goods/items`,params)
|
||||
// }
|
||||
|
||||
//查看商品详情
|
||||
export function good_detail(id) {
|
||||
return req.get(`/goods/items/${id}`)
|
||||
}
|
||||
|
||||
//编辑商品
|
||||
export function edit_good({ id, ...params }) {
|
||||
return req.put(`/goods/items/${id}`, params)
|
||||
}
|
||||
|
||||
//上下架
|
||||
export function update_status(params) {
|
||||
return req.put(`/goods/itemstatusupdate`, params)
|
||||
}
|
||||
|
||||
//删除接口
|
||||
export function delete_good(id) {
|
||||
return req.delete(`/goods/items/${id}/response`)
|
||||
}
|
||||
63
src/app.config.js
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
export default {
|
||||
pages: [
|
||||
'pages/index',
|
||||
'pages/message/index',
|
||||
'pages/messageDetail/index',
|
||||
'pages/my/index',
|
||||
'pages/auth/login',
|
||||
'pages/auth/index',
|
||||
'pages/order/list', //订单列表
|
||||
'pages/order/detail', //订单详情
|
||||
'pages/order/delivery', //订单发货
|
||||
'pages/afterSales/list', //售后订单
|
||||
'pages/afterSales/detail', //售后详情
|
||||
'pages/afterSales/deal', //处理售后
|
||||
'pages/auth/agreement',
|
||||
'pages/auth/bindPhone',
|
||||
'pages/auth/bindPhoneStepTwo',
|
||||
'pages/planSelection/index',
|
||||
'pages/logisticsInfo/index',
|
||||
'pages/address/index',
|
||||
'pages/address/addAddress/index',
|
||||
'pages/landing/index',
|
||||
'pages/weapp/login', //微信登陆页
|
||||
'pages/good/list', //商品列表
|
||||
'pages/good/form', //商品编辑
|
||||
'pages/order/ziti-list' //自提列表
|
||||
],
|
||||
tabBar: {
|
||||
list: [
|
||||
{
|
||||
pagePath: 'pages/index',
|
||||
iconPath: './assets/imgs/index/index.svg',
|
||||
selectedIconPath: './assets/imgs/index/indexHover.svg',
|
||||
text: '店铺'
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/message/index',
|
||||
iconPath: './assets/imgs/index/message.svg',
|
||||
selectedIconPath: './assets/imgs/index/messageHover.svg',
|
||||
text: '消息'
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/my/index',
|
||||
iconPath: './assets/imgs/index/myinfo.svg',
|
||||
selectedIconPath: './assets/imgs/index/myinfoHover.svg',
|
||||
text: '我的信息'
|
||||
}
|
||||
],
|
||||
selectedColor: '#4980FF',
|
||||
backgroundColor: '#FFF'
|
||||
},
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#f5f5f5',
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
}
|
||||
}
|
||||
108
src/app.js
Normal file
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import Taro, { getCurrentInstance } from '@tarojs/taro'
|
||||
import { Component } from 'react'
|
||||
import { Provider } from 'react-redux'
|
||||
import { SAPP, SAPPPay, SAPPShare } from './muiApp'
|
||||
import configStore from './store'
|
||||
import { cleanWeapp, isFromWebapp, isIos } from '@/utils'
|
||||
import '@/muiApp/index.scss'
|
||||
import 'default-passive-events'
|
||||
import S from '@/spx'
|
||||
// import VConsole from 'vconsole'
|
||||
|
||||
import './app.scss'
|
||||
|
||||
// new VConsole()
|
||||
|
||||
const { store } = configStore()
|
||||
|
||||
SAPP.init(Taro, store)
|
||||
if (process.env.APP_DEBUG == 'true') {
|
||||
import('vconsole').then((VConsole) => {
|
||||
new VConsole.default()
|
||||
})
|
||||
}
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
bottomLift: ''
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
SAPP.onReady(() => {
|
||||
console.log('INIT_START', SAPP.Plus.storage.getItem('INIT_START'))
|
||||
if (!SAPP.Plus.storage.getItem('INIT_START')) {
|
||||
SAPP.Plus.storage.setItem('INIT_START', 'true')
|
||||
// Taro.redirectTo({
|
||||
// url: '/pages/auth/agreement'
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
onLaunch() {
|
||||
// console.log('onLaunch:options',options)
|
||||
// this.getDeviceSize().then(res => {
|
||||
// const {bottomLift} = res
|
||||
// console.log('bottomLift:'+ bottomLift);
|
||||
// this.setState({
|
||||
// bottomLift
|
||||
// })
|
||||
// // this.globalData.bottomLift = bottomLift
|
||||
// })
|
||||
}
|
||||
// 获取设备信息
|
||||
getDeviceSize() {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.getSystemInfo({
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
const { screenHeight, safeArea } = res
|
||||
const { bottom } = safeArea
|
||||
const bottomLift = screenHeight - bottom
|
||||
resolve({ bottomLift })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
componentDidShow(options) {
|
||||
const { company_id } = options
|
||||
const { userAgent } = window.navigator
|
||||
console.log('userAgent', userAgent)
|
||||
if (userAgent.search(/iPhone X|iPhone 11|iPhone 12|iPhone 13/g) > -1) {
|
||||
document
|
||||
.getElementsByClassName('taro-tabbar__container')[0]
|
||||
.setAttribute('class', 'taro-tabbar__container ipx')
|
||||
}
|
||||
|
||||
if (company_id && !isFromWebapp()) {
|
||||
Taro.setStorageSync('company_id', company_id)
|
||||
}
|
||||
|
||||
const { href, origin, search } = window.location
|
||||
const sdkAuthUrlIos = isIos() ? `${origin}/${search}` : href
|
||||
Taro.setStorageSync('sdk_auth_url_ios', sdkAuthUrlIos)
|
||||
}
|
||||
|
||||
componentDidHide() {
|
||||
console.log('app componentDidHide')
|
||||
if (isFromWebapp()) {
|
||||
S.logout()
|
||||
}
|
||||
cleanWeapp()
|
||||
}
|
||||
|
||||
componentDidCatchError() {}
|
||||
|
||||
// this.props.children 是将要会渲染的页面
|
||||
render() {
|
||||
return <Provider store={store}>{this.props.children}</Provider>
|
||||
}
|
||||
}
|
||||
|
||||
export default App
|
||||
182
src/app.scss
Normal file
@@ -0,0 +1,182 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
@import "./style/theme.scss";
|
||||
@import "./style/variables.scss";
|
||||
@import "./style/yyk-icon.scss";
|
||||
@import "./style/zyk-icon.scss";
|
||||
|
||||
|
||||
$font-size-base: $font-size;
|
||||
$hd: 2 !default; // 基本单位
|
||||
$color-brand: $color-brand-primary;
|
||||
$color-brand-light: $color-brand-accent;
|
||||
$color-brand-dark: $color-brand-accent-light;
|
||||
$color-text-base: $color-primary-text;
|
||||
$at-button-border-color-secondary: $color-border-gray;
|
||||
|
||||
|
||||
@import "~taro-ui/dist/style/index.scss";
|
||||
@import "./style/taro-ui-mod.scss";
|
||||
|
||||
body, view {
|
||||
// font-family: $font-family;
|
||||
font-size: $font-size;
|
||||
}
|
||||
|
||||
page, body {
|
||||
background: $color-bg-gray-new;
|
||||
color: $color-primary-text;
|
||||
}
|
||||
|
||||
.lnk {
|
||||
color: $color-link;
|
||||
}
|
||||
|
||||
.lock-screen {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.sec {
|
||||
background: #fff;
|
||||
margin: 0 0 $edge-margin;
|
||||
&-hd {
|
||||
display: flex;
|
||||
line-height: 1;
|
||||
align-items: center;
|
||||
padding: $edge-size;
|
||||
.more {
|
||||
color: $color-link;
|
||||
font-size: $font-size-small;
|
||||
margin-right: floor(-$edge-size / 4);
|
||||
}
|
||||
.at-icon {
|
||||
font-size: $font-size-large;
|
||||
}
|
||||
}
|
||||
&-title {
|
||||
flex: 1;
|
||||
}
|
||||
&-ft {
|
||||
color: $color-gray-light;
|
||||
margin-right: floor(-$edge-size / 4);
|
||||
.at-font {
|
||||
font-size: $font-size-large;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
button, .at-button {
|
||||
margin: 0 0 $edge-margin;
|
||||
}
|
||||
padding: $edge-margin $edge-size;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
&.toolbar-inline {
|
||||
.at-button, at-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
background: #fff;
|
||||
font-size: $font-size;
|
||||
display: flex;
|
||||
height: $toolbar-height;
|
||||
box-shadow: $toolbar-shadow;
|
||||
box-sizing: border-box;
|
||||
padding: $edge-margin $edge-size;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
z-index: $z-index-toolbar;
|
||||
.at-button {
|
||||
font-size: $font-size;
|
||||
}
|
||||
&-hd {}
|
||||
&-ft {
|
||||
max-width: 120px;
|
||||
}
|
||||
}
|
||||
|
||||
switch, .weui-switch {
|
||||
transform: scale(0.6);
|
||||
transform-origin: center right;
|
||||
}
|
||||
|
||||
.at-tabs__item {
|
||||
color: $at-tab-bar-color;
|
||||
font-size: 26px;
|
||||
}
|
||||
.at-tabs__item--active {
|
||||
color: $color-brand-primary;
|
||||
}
|
||||
|
||||
/*
|
||||
.search-input__bar {
|
||||
.at-search-bar {
|
||||
&__input {
|
||||
line-height: 30PX - 10PX;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
.at-curtain__container {
|
||||
.userinfo-btn {
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.marginTop24{
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.marginTop20{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.marginTop16{
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
// .taro-tabbar__tabbar{
|
||||
// background: pink;
|
||||
// }
|
||||
// .taro-tabbar__container {
|
||||
// background: #FFF;
|
||||
// }
|
||||
|
||||
.weui-bar__item_on{
|
||||
font-weight: 700;
|
||||
}
|
||||
.weui-tabbar__item{
|
||||
|
||||
}
|
||||
|
||||
.taro-tabbar__container {
|
||||
// &.ipx {
|
||||
.taro-tabbar__tabbar {
|
||||
height: 136px;
|
||||
}
|
||||
.weui-tabbar {
|
||||
height: 100%;
|
||||
}
|
||||
// }
|
||||
}
|
||||
BIN
src/assets/imgs/1.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
src/assets/imgs/arrow.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/assets/imgs/defaultshop.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/imgs/defaultshop2.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/imgs/delivery.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
src/assets/imgs/empty.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/imgs/icon_cashier.png
Executable file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
src/assets/imgs/icon_fetch_order.png
Executable file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/assets/imgs/icon_goods_search.png
Executable file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
src/assets/imgs/index/bg.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/imgs/index/book.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/imgs/index/dingdan.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/imgs/index/fail.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
src/assets/imgs/index/good.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
1
src/assets/imgs/index/index.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622019175006" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4416" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M877.87 926.79H678.44c-37.04 0-67.43-31.2-67.43-69.83v-52c0-18.32-14.25-33.18-31.81-33.18H447.18c-17.57 0-31.81 14.86-31.81 33.18v52c0 38.63-30.39 69.83-67.43 69.83H148.5c-28.02 0-50.81-23.77-50.81-52.99V433c0-34.17 16.14-66.37 42.74-86.18l313.88-230.79c17.09-12.88 37.51-19.32 58.41-19.32 20.89 0 41.31 6.44 58.41 19.32L885 346.83c26.59 19.81 42.74 52 42.74 86.18V873.8c0.94 29.21-21.85 52.99-49.87 52.99z m-197.06-72.81h178.07V433c0-10.4-4.75-20.31-13.3-26.25L531.71 175.96c-5.22-3.96-11.87-5.94-18.04-5.94-6.65 0-12.82 1.98-18.04 5.94l-314.84 230.8c-8.07 5.94-13.3 15.85-13.3 26.25v420.98h178.07v-49.03c0-58.44 45.59-105.99 101.62-105.99h132.01c56.03 0 101.62 47.55 101.62 105.99v49.02z" fill="#666666" p-id="4417"></path><path d="M392.51 615.51c-13.83 0-25.04-13.94-25.04-31.13 0-17.19 11.21-31.13 25.04-31.13h240.43c13.83 0 25.04 13.93 25.04 31.13 0 17.19-11.22 31.13-25.04 31.13H392.51z" fill="#4980FF" p-id="4418"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
src/assets/imgs/index/indexHover.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622019178841" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4544" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M511.32 98.23c20.89 0 41.31 6.44 58.4 19.31l313.85 230.77c26.59 19.81 42.73 52 42.73 86.17v440.75c0.95 29.22-21.84 52.99-49.85 52.99H677.03c-37.03 0-67.42-31.2-67.42-69.83v-52c0-18.32-14.24-33.18-31.81-33.18h-132c-17.57 0-31.81 14.86-31.81 33.18v52c0 38.63-30.39 69.83-67.42 69.83H147.14c-28.01 0-50.8-23.77-50.8-52.99V434.48c0-34.17 16.14-66.36 42.73-86.17l313.85-230.77c17.09-12.87 37.51-19.31 58.4-19.31z m120.22 456.49H391.13c-13.83 0-25.04 13.93-25.04 31.12s11.21 31.13 25.04 31.13h240.41c13.83 0 25.04-13.94 25.04-31.13 0-17.18-11.21-31.12-25.04-31.12z" fill="#4980FF" p-id="4545"></path></svg>
|
||||
|
After Width: | Height: | Size: 977 B |
1
src/assets/imgs/index/message.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622019132317" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3903" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M513 98.15c230.15 0 415.03 184.89 415.03 415.03 0 101.88-37.72 199.95-105.64 279.2l-7.57 7.57 30.2 64.13c7.57 11.3 11.33 26.42 3.78 41.5-3.78 11.3-15.11 18.85-30.2 22.63H513c-230.15 0-415.03-184.89-415.03-415.03S282.85 98.15 513 98.15z m0 75.44a338.17 338.17 0 0 0-339.6 339.6c0 184.89 147.17 332.03 328.27 339.59h252.8l-33.96-67.97 37.72-37.72c60.38-64.13 94.33-147.14 94.33-233.93 0-184.89-147.14-332.03-328.24-339.59H513v0.02z" fill="#666666" p-id="3904"></path><path d="M404.24 439.94c22.66 0 37.74 15.09 37.74 37.72v75.46c0 22.66-15.09 37.74-37.74 37.74-22.63 0-37.72-15.09-37.72-37.74v-75.44c0-22.65 15.09-37.74 37.72-37.74z m226.39 0c22.63 0 37.74 15.09 37.74 37.72v75.46c0 22.66-15.11 37.74-37.74 37.74s-37.72-15.09-37.72-37.74v-75.44c0-22.65 15.08-37.74 37.72-37.74z" fill="#4980FF" p-id="3905"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
src/assets/imgs/index/messageHover.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622019124427" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M513 98.23c230.13 0 415 184.87 415 415 0 101.87-37.72 199.93-105.63 279.17l-7.57 7.57L845 864.1c7.57 11.3 11.33 26.41 3.78 41.5-3.78 11.3-15.11 18.85-30.2 22.63H513c-230.13 0-415-184.87-415-415s184.87-415 415-415z" fill="#4980FF" p-id="3776"></path><path d="M404.25 439.99c22.65 0 37.74 15.09 37.74 37.72v75.46c0 22.65-15.09 37.74-37.74 37.74-22.63 0-37.72-15.09-37.72-37.74v-75.43c0-22.67 15.09-37.75 37.72-37.75z m226.36 0c22.63 0 37.74 15.09 37.74 37.72v75.46c0 22.65-15.11 37.74-37.74 37.74s-37.72-15.09-37.72-37.74v-75.43c0.01-22.67 15.1-37.75 37.72-37.75z" fill="#FFFFFF" p-id="3777"></path></svg>
|
||||
|
After Width: | Height: | Size: 980 B |
1
src/assets/imgs/index/myinfo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622019140374" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4031" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M511.47 604.9a269.76 269.76 0 0 1-191.01-78.86 269.729 269.729 0 0 1-79.15-190.89v-19.24C253.88 172.74 374.66 63.45 518.37 65.2H781v262.63c1.72 143.66-107.77 264.28-250.92 276.43-6.06 0.43-12.13 0.64-18.61 0.64z m6.9-476.97c-110.63-1.75-203.86 82.17-213.7 192.37-8.15 114.01 77.55 213.08 191.54 221.44 9.89 0.63 19.81 0.63 29.69 0 110.19-10.05 194.03-103.28 192.37-213.91v-199.9h-199.9z" fill="#666666" p-id="4032"></path><path d="M839.13 960.79H183.18a73.16 73.16 0 0 1-51.75-21.44 73.177 73.177 0 0 1-21.44-51.75c-0.11-4.7 0.31-9.4 1.25-14.01 36.63-191.96 204.48-330.82 399.91-330.82s363.28 138.86 399.91 330.82a73.183 73.183 0 0 1-57.92 85.94c-4.62 0.85-9.31 1.27-14.01 1.26zM511.26 605.31c-165.58 0.42-307.54 118.34-338.33 281.03-0.58 3.09 0.18 6.28 2.09 8.78 2.07 2.35 5.03 3.72 8.16 3.76h655.96c5.89 0 10.66-4.77 10.66-10.66 0.1-0.62 0.1-1.26 0-1.88-30.98-162.6-173.01-280.33-338.54-280.62v-0.41z" fill="#666666" p-id="4033"></path><path d="M442.26 343.52c0 38.11 30.89 69 69 69s69-30.89 69-69-30.89-69-69-69c-38.11-0.01-69 30.89-69 69z" fill="#4980FF" p-id="4034"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
src/assets/imgs/index/myinfoHover.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622019145578" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4160" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M780 66.22v261.82c1.2 100.24-51.91 189.23-132.84 237.77 132.5 47.19 234.89 161.62 262.49 306.3a72.985 72.985 0 0 1-11.09 54.82 72.975 72.975 0 0 1-46.65 30.86c-4.61 0.84-9.28 1.26-13.97 1.25H184.03c-19.35 0-37.91-7.69-51.59-21.37s-21.37-32.24-21.37-51.59c-0.11-4.69 0.31-9.37 1.25-13.97 27.5-144.12 129.2-258.22 260.96-305.77a266.835 266.835 0 0 1-52.39-40.71 268.9 268.9 0 0 1-78.91-190.29v-19.18C254.31 175.7 371.12 67.94 511.38 66.22H780z" fill="#4980FF" p-id="4161"></path><path d="M442.3 343.68c0 37.99 30.8 68.79 68.79 68.79 37.99 0 68.79-30.8 68.79-68.79s-30.8-68.79-68.79-68.79c-37.99 0-68.79 30.8-68.79 68.79z" fill="#FFFFFF" p-id="4162"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/imgs/index/shaoyishao.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
src/assets/imgs/index/shouhou.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/imgs/index/success.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
src/assets/imgs/index/vip.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/assets/imgs/index/ziti.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/assets/imgs/leftarrow.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/imgs/login-bk.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/imgs/login-btn.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/assets/imgs/login-icon.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
src/assets/imgs/logo1.png
Normal file
|
After Width: | Height: | Size: 605 KiB |
BIN
src/assets/imgs/logotitle.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/imgs/message/zyk_dfh.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/imgs/message/zyk_sh.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
src/assets/imgs/message/zyk_wtt.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/imgs/my/head.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/imgs/my/photo.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
src/assets/imgs/my/zyk_bg.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
src/assets/imgs/no_order.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/imgs/rightarrow.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/imgs/salesman.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/assets/imgs/selected.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/imgs/shopex-logo.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/imgs/system-logo.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/imgs/tips.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
src/assets/imgs/trades_empty.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/imgs/ziti-order.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/assets/imgs/zyk-duigou.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
5721
src/common/district.json
Executable file
42
src/components/index.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
export { default as SpXXX } from './sp-xxx'
|
||||
export { default as SpTimer } from './sp-timer'
|
||||
export { default as SpBackToTop } from './sp-back-to-top'
|
||||
export { default as SpGoodItem } from './sp-good-item'
|
||||
export { default as SptitleBar } from './sp-title-bar'
|
||||
export { default as SpMessage } from './sp-message'
|
||||
export { default as SpMessageDetail } from './sp-message-detail'
|
||||
export { default as SpClickAwayListener } from './sp-click-away-listener'
|
||||
export { default as SpLoading } from './sp-loading'
|
||||
export { default as SpNote } from './sp-note'
|
||||
export { default as SpToast } from './sp-toast'
|
||||
export { default as SpFilterButton } from './sp-filter-button'
|
||||
export { default as SpFilterDrawer } from './sp-filter-drawer'
|
||||
export { default as SpOrderItem } from './sp-order-item'
|
||||
export { default as SpGoodPrice } from './sp-good-price'
|
||||
export { default as SpCheckoutSquare } from './sp-checkbox-square'
|
||||
export { default as SpRadio } from './sp-radio'
|
||||
export { default as SpPicker } from './sp-picker'
|
||||
export { default as SpPickerZ } from './sp-pickerZ'
|
||||
export { default as SpafterSaleMessage } from './sp-afterSaleMessage'
|
||||
export { default as SpDrawer } from './sp-drawer/index2'
|
||||
export { default as SpFormItem } from './sp-form-item'
|
||||
export { default as SpInputNumber } from './sp-inputnumber'
|
||||
export { default as SpAddress } from './sp-address'
|
||||
export { default as SpEditForm } from './sp-editForm'
|
||||
export { default as SpTips } from './sp-tips'
|
||||
export { default as SpRemarkItem } from './sp-remark-item'
|
||||
export { default as SpIconFooter } from './sp-icon-footer'
|
||||
export { default as SpRemarkDrawer } from './sp-remark-drawer'
|
||||
export { default as SpAutoFocusDrawer } from './sp-autofocus-drawer'
|
||||
export { default as SpLogisticsDrawer } from './sp-logistics-drawer'
|
||||
export { default as SpModal } from './sp-modal'
|
||||
export { default as SpTab } from './sp-tab'
|
||||
export { default as SpMultilevelPicker } from './sp-multilevel-picker'
|
||||
export { default as SpSpecSelector } from './sp-spec-selector'
|
||||
|
||||
export default {}
|
||||
53
src/components/sp-address/index.js
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import { Component, createElement } from 'react'
|
||||
import { View, ScrollView, Image, Form, Input, Button } from '@tarojs/components'
|
||||
import { showToast } from '@/utils'
|
||||
import api from '@/api'
|
||||
import './index.scss'
|
||||
import Taro from '@tarojs/taro'
|
||||
import classNames from 'classnames'
|
||||
// import { connect } from 'react-redux'
|
||||
|
||||
// @connect(({ planSelection }) => ({
|
||||
// planSelection
|
||||
// }))
|
||||
export default class SpAddress extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
console.log(props)
|
||||
this.state = {
|
||||
isActive: 0
|
||||
}
|
||||
}
|
||||
|
||||
notUpdate(message) {
|
||||
showToast(`${message}暂不支持修改!`)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { addressList, switchAddressHandle, index } = this.props
|
||||
return (
|
||||
<View className='sp-address'>
|
||||
<View
|
||||
className='item'
|
||||
key={addressList.address_id}
|
||||
onClick={(e) => switchAddressHandle(index)}
|
||||
>
|
||||
<View className={'btn ' + (addressList.is_default === '1' && 'active')}>
|
||||
<View className='right iconfont icon-gouxuan-01'></View>
|
||||
</View>
|
||||
<View className='address'>
|
||||
<View className='title'>
|
||||
{addressList.province + addressList.city + addressList.area + addressList.address}
|
||||
</View>
|
||||
<View className='name_tel'>{addressList.contact + ' ' + addressList.mobile}</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
57
src/components/sp-address/index.scss
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
.sp-address {
|
||||
background: #fff;
|
||||
box-shadow: 0px 3px 5px 0px #e2e4ea;
|
||||
overflow: hidden;
|
||||
.item {
|
||||
padding: 30px 0 20px 0px;
|
||||
display: flex;
|
||||
margin: 0 30px;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e2e4ea;
|
||||
&:last-child {
|
||||
border: none;
|
||||
}
|
||||
.btn {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #c5cad5;
|
||||
color: #fff;
|
||||
|
||||
&.active {
|
||||
background: #2f86f6;
|
||||
border: none;
|
||||
}
|
||||
.right {
|
||||
font-size: 21px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
.address {
|
||||
margin-bottom: 10px;
|
||||
padding-left: 40px;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
width: 600px;
|
||||
@include text-overflow;
|
||||
font-weight: 500;
|
||||
color: #111a34;
|
||||
}
|
||||
.name_tel {
|
||||
color: #858b9c;
|
||||
padding-top: 10px;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
src/components/sp-afterSaleMessage/index.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import React, { PureComponent } from 'react'
|
||||
import { View } from '@tarojs/components'
|
||||
|
||||
import './index.scss'
|
||||
|
||||
export default class AfterSaleTreatment extends PureComponent {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
componentDidMount() {}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View className='cpn-AfterSaleMessage'>
|
||||
<View className='box'>
|
||||
<View className='status'>
|
||||
<View className='message'>待处理</View>
|
||||
<View className='tips'>等待商家处理</View>
|
||||
</View>
|
||||
<View className='icon iconfont icon-keai'></View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
27
src/components/sp-afterSaleMessage/index.scss
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
.cpn-AfterSaleMessage{
|
||||
padding: 40px 80px 40px 30px;
|
||||
.box{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.status{
|
||||
color: #fff;
|
||||
.message{
|
||||
font-size: 52px;
|
||||
font-weight: 400;
|
||||
|
||||
}
|
||||
.tips{
|
||||
font-size:28px ;
|
||||
font-weight: 300;
|
||||
}
|
||||
}
|
||||
.icon{
|
||||
font-size: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
38
src/components/sp-autofocus-drawer/Textarea.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import { AtFloatLayout } from 'taro-ui'
|
||||
import { classNames } from '@/utils'
|
||||
import React, { useRef, useEffect } from 'react'
|
||||
import { Textarea as TaroTextarea } from '@tarojs/components'
|
||||
import './index.scss'
|
||||
|
||||
const Textarea = (props) => {
|
||||
const { placeholder, value, onChange = () => {} } = props
|
||||
|
||||
const textareaRef = useRef(null)
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
// let pos = textareaRef.current.textContent.indexOf(`\n`);
|
||||
// textareaRef.current.setSelectionRange(pos+1, pos+1);
|
||||
textareaRef.current.focus()
|
||||
textareaRef.current.click()
|
||||
}, 200)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<textarea
|
||||
className='h5-textarea'
|
||||
autoFocus
|
||||
ref={textareaRef}
|
||||
placeholder={placeholder}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default Textarea
|
||||
72
src/components/sp-autofocus-drawer/index.js
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import { AtFloatLayout } from 'taro-ui'
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { classNames } from '@/utils'
|
||||
import { View } from '@tarojs/components'
|
||||
import Textarea from './Textarea'
|
||||
import './index.scss'
|
||||
|
||||
const SpAutoFocusDrawer = (props) => {
|
||||
const {
|
||||
visible,
|
||||
onClose = () => {},
|
||||
onCancel = () => {},
|
||||
onConfirm = () => {},
|
||||
title = '',
|
||||
onCancelText = '取消',
|
||||
onConfirmText = '确定',
|
||||
className,
|
||||
placeholder,
|
||||
defaultValue
|
||||
} = props
|
||||
|
||||
const [textareaValue, setTextareaValue] = useState('')
|
||||
|
||||
const handleChangeTextValue = React.useCallback((e) => {
|
||||
let value = e.target.value
|
||||
setTextareaValue(value)
|
||||
}, [])
|
||||
|
||||
const handleConfirm = React.useCallback(
|
||||
(e) => {
|
||||
onConfirm(textareaValue)
|
||||
},
|
||||
[textareaValue]
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
setTextareaValue(defaultValue)
|
||||
}, [defaultValue])
|
||||
|
||||
return (
|
||||
<AtFloatLayout
|
||||
isOpened={visible}
|
||||
onClose={onClose}
|
||||
className={classNames('sp-component-autofocus-drawer', className)}
|
||||
>
|
||||
<View className='header'>
|
||||
<View className='left' onClick={onCancel}>
|
||||
{onCancelText}
|
||||
</View>
|
||||
<View className='center'>{title}</View>
|
||||
<View className='right' onClick={handleConfirm}>
|
||||
{onConfirmText}
|
||||
</View>
|
||||
</View>
|
||||
<View className='content'>
|
||||
{visible && (
|
||||
<Textarea
|
||||
value={textareaValue}
|
||||
placeholder={placeholder}
|
||||
onChange={handleChangeTextValue}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
</AtFloatLayout>
|
||||
)
|
||||
}
|
||||
export default React.memo(SpAutoFocusDrawer)
|
||||
83
src/components/sp-autofocus-drawer/index.scss
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
.sp-component-autofocus-drawer {
|
||||
|
||||
|
||||
|
||||
.at-float-layout__container {
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
overflow: hidden;
|
||||
|
||||
.layout-body {
|
||||
padding: 0;
|
||||
min-height: inherit;
|
||||
|
||||
&__content{
|
||||
min-height: inherit;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
height: 120px;
|
||||
background: #F9FAFB;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 40px;
|
||||
|
||||
.left,
|
||||
.right {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.left {
|
||||
color: #666F83;
|
||||
}
|
||||
|
||||
.right {
|
||||
color: #4980FF;
|
||||
}
|
||||
|
||||
.center {
|
||||
font-size: 40px;
|
||||
font-weight: 400;
|
||||
color: #111A34;
|
||||
}
|
||||
}
|
||||
|
||||
.content{
|
||||
flex:1;
|
||||
padding: 20px 40px;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
|
||||
.h5-textarea{
|
||||
border:none;
|
||||
outline: none;
|
||||
resize:none;
|
||||
font-size: $textarea-font-size;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
|
||||
&::-webkit-input-placeholder{
|
||||
font-size: $textarea-placeholder-font-size;
|
||||
color: #C5CAD5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
26
src/components/sp-back-to-top/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
import { View } from '@tarojs/components'
|
||||
import classNames from '@/utils/classNames'
|
||||
|
||||
import './index.scss'
|
||||
|
||||
const SpBackToTop = (props) => {
|
||||
const { show, onClick, bottom } = props
|
||||
|
||||
return (
|
||||
<View
|
||||
className={classNames('sp-back-to-top', { 'is-show': show })}
|
||||
style={`${bottom ? `bottom: ${Taro.pxTransform(bottom)}` : ''}`}
|
||||
onClick={onClick}
|
||||
>
|
||||
<View className='icon-arrow-up'></View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default React.memo(SpBackToTop)
|
||||
33
src/components/sp-back-to-top/index.scss
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
.sp-back-to-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(#fff, 0.8);
|
||||
color: $color-gray;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 100%;
|
||||
position: fixed;
|
||||
bottom: $tabbar-height + floor($edge-size / 2);
|
||||
right: $edge-size;
|
||||
z-index: $z-index-tooltip;
|
||||
border: 1px solid rgba($color-brand-primary, 0.1);
|
||||
box-shadow: 0 0 5px rgba(#000, 0.15);
|
||||
box-sizing: border-box;
|
||||
transition: all .2s;
|
||||
opacity: 0;
|
||||
&.is-show {
|
||||
opacity: 0.8;
|
||||
}
|
||||
[class^="icon-"] {
|
||||
font-size: 42px;
|
||||
}
|
||||
&__text {
|
||||
font-size: floor(0.7 * $font-size);
|
||||
}
|
||||
}
|
||||
34
src/components/sp-checkbox-square/index.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
import React, { PureComponent } from 'react'
|
||||
import { classNames } from '@/utils'
|
||||
|
||||
/**
|
||||
* items:[{value:'',label:''}]
|
||||
*/
|
||||
|
||||
class SpCheckboxSquare extends PureComponent {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
active: ''
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { items } = props
|
||||
|
||||
return (
|
||||
<View className={classNames('sp-checkbox-square')}>
|
||||
{items.map((item) => (
|
||||
<View className='item'>{item.label}</View>
|
||||
))}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default SpCheckboxSquare
|
||||
15
src/components/sp-checkbox-square/index.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
.sp-checkbox-square{
|
||||
|
||||
display: flex;
|
||||
|
||||
.item{
|
||||
width:136px;
|
||||
height:56px;
|
||||
@include flexbox;
|
||||
}
|
||||
}
|
||||