From 728ddb9a7e90c2a79667ec0af199c5639f6620fe Mon Sep 17 00:00:00 2001 From: zhuoda Date: Sun, 10 Mar 2024 22:26:32 +0800 Subject: [PATCH 1/8] =?UTF-8?q?smart-app=20alpha=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- smart-app/.env.development | 3 + smart-app/.env.localhost | 3 + smart-app/.env.pre | 3 + smart-app/.env.production | 3 + smart-app/.env.test | 3 + smart-app/.eslintignore | 18 + smart-app/.eslintrc.cjs | 66 ++ smart-app/.gitignore | 21 + smart-app/.prettierrc.cjs | 30 + smart-app/index.html | 20 + smart-app/package.json | 81 ++ smart-app/shims-uni.d.ts | 10 + smart-app/src/App.vue | 19 + smart-app/src/api/business/goods/goods-api.js | 31 + .../src/api/business/oa/enterprise-api.js | 37 + smart-app/src/api/business/oa/notice-api.js | 33 + smart-app/src/api/support/change-log-api.js | 17 + smart-app/src/api/support/dict-api.js | 59 ++ smart-app/src/api/system/login-api.js | 40 + .../src/components/dict-select/index.vue | 55 ++ smart-app/src/components/smart-card/index.vue | 70 ++ .../src/components/smart-enum-radio/index.vue | 42 + .../components/smart-enum-select/index.vue | 49 ++ smart-app/src/components/smart-tabs/index.vue | 73 ++ .../src/constants/business/erp/goods-const.js | 26 + .../constants/business/oa/enterprise-const.js | 24 + smart-app/src/constants/common-const.js | 70 ++ smart-app/src/constants/index.js | 24 + .../src/constants/local-storage-key-const.js | 19 + smart-app/src/constants/regular-const.js | 28 + .../src/constants/support/change-log-const.js | 32 + .../constants/system/login-device-const.js | 31 + smart-app/src/lib/encrypt.js | 87 ++ smart-app/src/lib/smart-request.js | 96 +++ smart-app/src/lib/smart-sentry.js | 22 + smart-app/src/lib/smart-support.js | 30 + smart-app/src/main.js | 18 + smart-app/src/manifest.json | 72 ++ smart-app/src/pages.json | 186 ++++ .../pages/enterprise/enterprise-detail.vue | 293 +++++++ .../src/pages/enterprise/enterprise-form.vue | 184 ++++ .../src/pages/enterprise/enterprise-list.vue | 217 +++++ .../form/components/font-size-select.vue | 49 ++ .../src/pages/form/components/interest.vue | 59 ++ .../src/pages/form/components/radio-sex.vue | 60 ++ smart-app/src/pages/form/form.vue | 199 +++++ .../src/pages/goods/components/goods-list.vue | 68 ++ .../components/goods-query-form-popup.vue | 100 +++ smart-app/src/pages/goods/goods-index.vue | 222 +++++ .../src/pages/home/components/banner.vue | 44 + smart-app/src/pages/home/components/goods.vue | 135 +++ smart-app/src/pages/home/components/menu.vue | 119 +++ .../src/pages/home/components/notice.vue | 90 ++ .../src/pages/home/components/statistics.vue | 87 ++ smart-app/src/pages/home/index.vue | 72 ++ .../pages/list/components/list-model-four.vue | 187 ++++ .../pages/list/components/list-model-one.vue | 86 ++ .../list/components/list-model-three.vue | 242 ++++++ .../pages/list/components/list-model-two.vue | 109 +++ smart-app/src/pages/list/components/tabs.vue | 58 ++ smart-app/src/pages/list/list.vue | 70 ++ .../login/components/login-check-box.vue | 57 ++ .../pages/login/components/other-way-box.vue | 139 +++ smart-app/src/pages/login/login.vue | 300 +++++++ smart-app/src/pages/message/message.vue | 81 ++ .../src/pages/mine/components/mine-menu.vue | 68 ++ .../pages/mine/components/mine-user-blue.vue | 112 +++ .../pages/mine/components/mine-user-white.vue | 178 ++++ smart-app/src/pages/mine/mine.vue | 43 + .../pages/notice/components/notice-list.vue | 72 ++ .../components/notice-query-form-popup.vue | 115 +++ smart-app/src/pages/notice/notice-detail.vue | 76 ++ smart-app/src/pages/notice/notice-index.vue | 224 +++++ .../order-detail/components/address-card.vue | 107 +++ .../components/detail-model-base-info.vue | 172 ++++ .../components/detail-model-due-pay.vue | 165 ++++ .../components/detail-model-final.vue | 12 + .../components/detail-model-path.vue | 13 + .../components/detail-model-receivable.vue | 165 ++++ .../components/detail-model-voucher.vue | 12 + .../components/info-card-model-one.vue | 131 +++ .../components/info-card-model-three.vue | 117 +++ .../components/info-card-model-two.vue | 105 +++ .../order-detail/components/scroll-tabs.vue | 80 ++ .../src/pages/order-detail/order-detail.vue | 52 ++ .../pure-list/components/list-model-five.vue | 80 ++ .../pure-list/components/list-model-four.vue | 96 +++ .../pure-list/components/list-model-one.vue | 126 +++ .../pure-list/components/list-model-three.vue | 109 +++ .../pure-list/components/list-model-two.vue | 159 ++++ smart-app/src/pages/pure-list/pure-list.vue | 21 + .../src/pages/select-people/select-people.vue | 143 ++++ .../support/change-log/change-log-list.vue | 199 +++++ smart-app/src/plugins/smart-enums-plugin.js | 97 +++ smart-app/src/shime-uni.d.ts | 6 + smart-app/src/static/common/back-icon.png | Bin 0 -> 925 bytes smart-app/src/static/common/update-app.png | Bin 0 -> 17946 bytes .../src/static/images/form/add-image.png | Bin 0 -> 2674 bytes smart-app/src/static/images/form/add.png | Bin 0 -> 948 bytes smart-app/src/static/images/form/back.png | Bin 0 -> 649 bytes .../src/static/images/form/close-image.png | Bin 0 -> 653 bytes smart-app/src/static/images/form/submit.png | Bin 0 -> 8892 bytes smart-app/src/static/images/form/title-bg.png | Bin 0 -> 7986 bytes .../src/static/images/home/admin-icon.png | Bin 0 -> 3655 bytes .../src/static/images/home/copy-icon.png | Bin 0 -> 387 bytes .../src/static/images/home/detail-icon.png | Bin 0 -> 989 bytes .../src/static/images/home/download-icon.png | Bin 0 -> 11724 bytes .../src/static/images/home/link-icon.png | Bin 0 -> 3569 bytes smart-app/src/static/images/home/qq-icon.png | Bin 0 -> 3695 bytes .../src/static/images/home/refresh-icon.png | Bin 0 -> 3648 bytes .../src/static/images/home/round-icon.png | Bin 0 -> 400 bytes .../src/static/images/home/search-clear.png | Bin 0 -> 2748 bytes .../src/static/images/home/search-icon.png | Bin 0 -> 410 bytes smart-app/src/static/images/home/search.png | Bin 0 -> 1800 bytes .../src/static/images/home/share-icon.png | Bin 0 -> 580 bytes .../images/home/vip-module-background.png | Bin 0 -> 23729 bytes .../static/images/home/vip-module-icon.png | Bin 0 -> 1592 bytes .../src/static/images/home/wechat-icon.png | Bin 0 -> 3714 bytes .../static/images/home/wechat-share-icon.png | Bin 0 -> 5402 bytes .../src/static/images/home/weibo-icon.png | Bin 0 -> 4272 bytes smart-app/src/static/images/index/banner.png | Bin 0 -> 217234 bytes .../src/static/images/index/ic_home_menu1.png | Bin 0 -> 1845 bytes .../static/images/index/ic_home_menu10.png | Bin 0 -> 2049 bytes .../src/static/images/index/ic_home_menu2.png | Bin 0 -> 1952 bytes .../src/static/images/index/ic_home_menu3.png | Bin 0 -> 1772 bytes .../src/static/images/index/ic_home_menu4.png | Bin 0 -> 2254 bytes .../src/static/images/index/ic_home_menu5.png | Bin 0 -> 1879 bytes .../src/static/images/index/ic_home_menu6.png | Bin 0 -> 1787 bytes .../src/static/images/index/ic_home_menu7.png | Bin 0 -> 1475 bytes .../src/static/images/index/ic_home_menu8.png | Bin 0 -> 2002 bytes .../src/static/images/index/ic_home_menu9.png | Bin 0 -> 1790 bytes smart-app/src/static/images/index/ic_scan.png | Bin 0 -> 484 bytes .../src/static/images/index/ic_search.png | Bin 0 -> 650 bytes smart-app/src/static/images/list/add.png | Bin 0 -> 337 bytes smart-app/src/static/images/list/blue.png | Bin 0 -> 424 bytes smart-app/src/static/images/list/camera.png | Bin 0 -> 3458 bytes .../src/static/images/list/form-list.png | Bin 0 -> 2468 bytes smart-app/src/static/images/list/phone.png | Bin 0 -> 874 bytes smart-app/src/static/images/list/red.png | Bin 0 -> 908 bytes .../src/static/images/list/repair-report.png | Bin 0 -> 1026 bytes smart-app/src/static/images/list/success.png | Bin 0 -> 3850 bytes smart-app/src/static/images/list/use.png | Bin 0 -> 5675 bytes .../src/static/images/list3/complete-icon.png | Bin 0 -> 712 bytes smart-app/src/static/images/list3/phone.png | Bin 0 -> 355 bytes .../static/images/list3/photograph-icon.png | Bin 0 -> 723 bytes .../src/static/images/login/bind-error.png | Bin 0 -> 24335 bytes .../src/static/images/login/bind-success.png | Bin 0 -> 26725 bytes .../src/static/images/login/check-in.png | Bin 0 -> 234 bytes .../src/static/images/login/check-out.png | Bin 0 -> 154 bytes .../static/images/login/ios-login-icon.png | Bin 0 -> 3191 bytes .../src/static/images/login/login-logo.png | Bin 0 -> 38962 bytes .../static/images/login/login-password.png | Bin 0 -> 829 bytes .../static/images/login/login-top-back.png | Bin 0 -> 256403 bytes .../static/images/login/login-username.png | Bin 0 -> 1008 bytes .../static/images/login/phone-login-icon.png | Bin 0 -> 2619 bytes smart-app/src/static/images/login/wx-icon.png | Bin 0 -> 449 bytes .../src/static/images/login/wx-login-icon.png | Bin 0 -> 3671 bytes .../src/static/images/message/approve.png | Bin 0 -> 2891 bytes .../src/static/images/message/message.png | Bin 0 -> 2566 bytes smart-app/src/static/images/mine/app-logo.png | Bin 0 -> 4409 bytes smart-app/src/static/images/mine/arrow.png | Bin 0 -> 771 bytes .../static/images/mine/common-select-icon.png | Bin 0 -> 234 bytes .../images/mine/common-unselect-icon.png | Bin 0 -> 154 bytes .../src/static/images/mine/customer-icon.png | Bin 0 -> 895 bytes .../src/static/images/mine/default-header.png | Bin 0 -> 11366 bytes .../src/static/images/mine/logout-icon.png | Bin 0 -> 1008 bytes .../src/static/images/mine/mine-about-us.png | Bin 0 -> 1986 bytes .../src/static/images/mine/mine-account.png | Bin 0 -> 1825 bytes .../src/static/images/mine/mine-feedback.png | Bin 0 -> 1028 bytes .../static/images/mine/mine-menu-address.png | Bin 0 -> 9068 bytes .../static/images/mine/mine-menu-balance.png | Bin 0 -> 6616 bytes .../static/images/mine/mine-menu-collect.png | Bin 0 -> 7155 bytes .../static/images/mine/mine-menu-coupon.png | Bin 0 -> 6826 bytes .../src/static/images/mine/mine-message.png | Bin 0 -> 695 bytes .../src/static/images/mine/mine-protocol.png | Bin 0 -> 932 bytes .../src/static/images/mine/mine-service.png | Bin 0 -> 1360 bytes .../static/images/mine/mine-version-info.png | Bin 0 -> 1444 bytes .../src/static/images/mine/no-vip-flag.png | Bin 0 -> 10986 bytes smart-app/src/static/images/mine/open-vip.png | Bin 0 -> 6284 bytes .../src/static/images/mine/phone-icon.png | Bin 0 -> 1241 bytes .../src/static/images/mine/top-background.png | Bin 0 -> 140817 bytes .../images/mine/user-agreement-icon.png | Bin 0 -> 1545 bytes .../src/static/images/mine/vip-background.png | Bin 0 -> 6524 bytes smart-app/src/static/images/mine/vip-bg.png | Bin 0 -> 6109 bytes smart-app/src/static/images/mine/vip-icon.png | Bin 0 -> 3989 bytes smart-app/src/static/images/notice/01.png | Bin 0 -> 912 bytes smart-app/src/static/images/notice/02.png | Bin 0 -> 1004 bytes .../src/static/images/pure-list/blue.png | Bin 0 -> 1115 bytes .../src/static/images/pure-list/employ.png | Bin 0 -> 16521 bytes .../src/static/images/pure-list/maintain.png | Bin 0 -> 2939 bytes .../src/static/images/pure-list/obsolete.png | Bin 0 -> 16598 bytes .../src/static/images/pure-list/orange.png | Bin 0 -> 3110 bytes .../src/static/images/pure-list/overdue.png | Bin 0 -> 16683 bytes .../static/images/select-people/select.png | Bin 0 -> 1337 bytes .../src/static/images/tabbar/home-icon-h.png | Bin 0 -> 1101 bytes .../src/static/images/tabbar/home-icon.png | Bin 0 -> 1178 bytes .../src/static/images/tabbar/list-icon-h.png | Bin 0 -> 813 bytes .../src/static/images/tabbar/list-icon.png | Bin 0 -> 864 bytes .../static/images/tabbar/message-icon-h.png | Bin 0 -> 1117 bytes .../src/static/images/tabbar/message-icon.png | Bin 0 -> 1183 bytes .../src/static/images/tabbar/mine-icon-h.png | Bin 0 -> 1063 bytes .../src/static/images/tabbar/mine-icon.png | Bin 0 -> 1106 bytes .../uni-mescroll/mescroll-empty.png | Bin 0 -> 7118 bytes .../uni-mescroll/mescroll-totop.png | Bin 0 -> 288 bytes smart-app/src/static/logo.png | Bin 0 -> 4023 bytes smart-app/src/store/index.js | 12 + .../src/store/modules/system/app-config.js | 55 ++ smart-app/src/store/modules/system/user.js | 83 ++ smart-app/src/theme/index.scss | 194 +++++ smart-app/src/uni.scss | 130 +++ .../uni_modules/uni-data-picker/changelog.md | 77 ++ .../components/uni-data-picker/keypress.js | 45 + .../uni-data-picker/uni-data-picker.uvue | 380 +++++++++ .../uni-data-picker/uni-data-picker.vue | 551 ++++++++++++ .../uni-data-pickerview/loading.uts | 1 + .../uni-data-pickerview/uni-data-picker.js | 622 ++++++++++++++ .../uni-data-pickerview/uni-data-picker.uts | 693 +++++++++++++++ .../uni-data-pickerview.css | 76 ++ .../uni-data-pickerview.uvue | 69 ++ .../uni-data-pickerview.vue | 323 +++++++ .../uni_modules/uni-data-picker/package.json | 91 ++ .../src/uni_modules/uni-data-picker/readme.md | 22 + .../src/uni_modules/uni-icons/changelog.md | 40 + .../components/uni-icons/uni-icons.uvue | 91 ++ .../components/uni-icons/uni-icons.vue | 110 +++ .../components/uni-icons/uniicons.css | 664 +++++++++++++++ .../components/uni-icons/uniicons.ttf | Bin 0 -> 35824 bytes .../components/uni-icons/uniicons_file.ts | 664 +++++++++++++++ .../components/uni-icons/uniicons_file_vue.js | 649 ++++++++++++++ .../src/uni_modules/uni-icons/package.json | 88 ++ smart-app/src/uni_modules/uni-icons/readme.md | 8 + .../uni_modules/uni-load-more/changelog.md | 19 + .../components/uni-load-more/i18n/en.json | 5 + .../components/uni-load-more/i18n/index.js | 8 + .../uni-load-more/i18n/zh-Hans.json | 5 + .../uni-load-more/i18n/zh-Hant.json | 5 + .../uni-load-more/uni-load-more.vue | 399 +++++++++ .../uni_modules/uni-load-more/package.json | 86 ++ .../src/uni_modules/uni-load-more/readme.md | 14 + .../src/uni_modules/uni-mescroll/changelog.md | 8 + .../mescroll-body/mescroll-body.css | 19 + .../mescroll-body/mescroll-body.vue | 400 +++++++++ .../beibei/components/mescroll-down.css | 47 ++ .../beibei/components/mescroll-down.vue | 39 + .../mescroll-diy/beibei/mescroll-body.vue | 360 ++++++++ .../beibei/mescroll-uni-option.js | 49 ++ .../mescroll-diy/beibei/mescroll-uni.vue | 434 ++++++++++ .../xinlang/components/mescroll-down.css | 44 + .../xinlang/components/mescroll-down.vue | 53 ++ .../xinlang/components/mescroll-up.css | 32 + .../xinlang/components/mescroll-up.vue | 40 + .../mescroll-diy/xinlang/mescroll-body.vue | 380 +++++++++ .../xinlang/mescroll-uni-option.js | 64 ++ .../mescroll-diy/xinlang/mescroll-uni.vue | 459 ++++++++++ .../mescroll-empty/mescroll-empty.vue | 116 +++ .../mescroll-uni/components/mescroll-down.css | 55 ++ .../mescroll-uni/components/mescroll-down.vue | 47 ++ .../mescroll-uni/components/mescroll-top.vue | 99 +++ .../mescroll-uni/components/mescroll-up.css | 47 ++ .../mescroll-uni/components/mescroll-up.vue | 39 + .../components/mescroll-uni/mescroll-i18n.js | 15 + .../mescroll-uni/mescroll-mixins.js | 46 + .../mescroll-uni/mescroll-uni-option.js | 64 ++ .../components/mescroll-uni/mescroll-uni.css | 36 + .../components/mescroll-uni/mescroll-uni.js | 799 ++++++++++++++++++ .../components/mescroll-uni/mescroll-uni.vue | 480 +++++++++++ .../mescroll-uni/mixins/mescroll-comp.js | 47 ++ .../mescroll-uni/mixins/mescroll-more-item.js | 57 ++ .../mescroll-uni/mixins/mescroll-more.js | 77 ++ .../components/mescroll-uni/wxs/mixins.js | 109 +++ .../components/mescroll-uni/wxs/renderjs.js | 92 ++ .../components/mescroll-uni/wxs/wxs.wxs | 269 ++++++ .../uni-mescroll/hooks/useMescroll.js | 66 ++ .../uni-mescroll/hooks/useMescrollComp.js | 56 ++ .../uni-mescroll/hooks/useMescrollMore.js | 69 ++ .../src/uni_modules/uni-mescroll/package.json | 76 ++ .../src/uni_modules/uni-mescroll/readme.md | 45 + .../src/uni_modules/uni-scss/changelog.md | 8 + smart-app/src/uni_modules/uni-scss/index.scss | 1 + .../src/uni_modules/uni-scss/package.json | 82 ++ smart-app/src/uni_modules/uni-scss/readme.md | 4 + .../uni_modules/uni-scss/styles/index.scss | 7 + .../uni-scss/styles/setting/_border.scss | 3 + .../uni-scss/styles/setting/_color.scss | 66 ++ .../uni-scss/styles/setting/_radius.scss | 55 ++ .../uni-scss/styles/setting/_space.scss | 56 ++ .../uni-scss/styles/setting/_styles.scss | 167 ++++ .../uni-scss/styles/setting/_text.scss | 24 + .../uni-scss/styles/setting/_variables.scss | 146 ++++ .../uni-scss/styles/tools/functions.scss | 19 + smart-app/src/uni_modules/uni-scss/theme.scss | 31 + .../src/uni_modules/uni-scss/variables.scss | 62 ++ smart-app/src/utils/str-util.js | 46 + smart-app/vite.config.js | 37 + 295 files changed, 20261 insertions(+), 1 deletion(-) create mode 100644 smart-app/.env.development create mode 100644 smart-app/.env.localhost create mode 100644 smart-app/.env.pre create mode 100644 smart-app/.env.production create mode 100644 smart-app/.env.test create mode 100644 smart-app/.eslintignore create mode 100644 smart-app/.eslintrc.cjs create mode 100644 smart-app/.gitignore create mode 100644 smart-app/.prettierrc.cjs create mode 100644 smart-app/index.html create mode 100644 smart-app/package.json create mode 100644 smart-app/shims-uni.d.ts create mode 100644 smart-app/src/App.vue create mode 100644 smart-app/src/api/business/goods/goods-api.js create mode 100644 smart-app/src/api/business/oa/enterprise-api.js create mode 100644 smart-app/src/api/business/oa/notice-api.js create mode 100644 smart-app/src/api/support/change-log-api.js create mode 100644 smart-app/src/api/support/dict-api.js create mode 100644 smart-app/src/api/system/login-api.js create mode 100644 smart-app/src/components/dict-select/index.vue create mode 100644 smart-app/src/components/smart-card/index.vue create mode 100644 smart-app/src/components/smart-enum-radio/index.vue create mode 100644 smart-app/src/components/smart-enum-select/index.vue create mode 100644 smart-app/src/components/smart-tabs/index.vue create mode 100644 smart-app/src/constants/business/erp/goods-const.js create mode 100644 smart-app/src/constants/business/oa/enterprise-const.js create mode 100644 smart-app/src/constants/common-const.js create mode 100644 smart-app/src/constants/index.js create mode 100644 smart-app/src/constants/local-storage-key-const.js create mode 100644 smart-app/src/constants/regular-const.js create mode 100644 smart-app/src/constants/support/change-log-const.js create mode 100644 smart-app/src/constants/system/login-device-const.js create mode 100644 smart-app/src/lib/encrypt.js create mode 100644 smart-app/src/lib/smart-request.js create mode 100644 smart-app/src/lib/smart-sentry.js create mode 100644 smart-app/src/lib/smart-support.js create mode 100644 smart-app/src/main.js create mode 100644 smart-app/src/manifest.json create mode 100644 smart-app/src/pages.json create mode 100644 smart-app/src/pages/enterprise/enterprise-detail.vue create mode 100644 smart-app/src/pages/enterprise/enterprise-form.vue create mode 100644 smart-app/src/pages/enterprise/enterprise-list.vue create mode 100644 smart-app/src/pages/form/components/font-size-select.vue create mode 100644 smart-app/src/pages/form/components/interest.vue create mode 100644 smart-app/src/pages/form/components/radio-sex.vue create mode 100644 smart-app/src/pages/form/form.vue create mode 100644 smart-app/src/pages/goods/components/goods-list.vue create mode 100644 smart-app/src/pages/goods/components/goods-query-form-popup.vue create mode 100644 smart-app/src/pages/goods/goods-index.vue create mode 100644 smart-app/src/pages/home/components/banner.vue create mode 100644 smart-app/src/pages/home/components/goods.vue create mode 100644 smart-app/src/pages/home/components/menu.vue create mode 100644 smart-app/src/pages/home/components/notice.vue create mode 100644 smart-app/src/pages/home/components/statistics.vue create mode 100644 smart-app/src/pages/home/index.vue create mode 100644 smart-app/src/pages/list/components/list-model-four.vue create mode 100644 smart-app/src/pages/list/components/list-model-one.vue create mode 100644 smart-app/src/pages/list/components/list-model-three.vue create mode 100644 smart-app/src/pages/list/components/list-model-two.vue create mode 100644 smart-app/src/pages/list/components/tabs.vue create mode 100644 smart-app/src/pages/list/list.vue create mode 100644 smart-app/src/pages/login/components/login-check-box.vue create mode 100644 smart-app/src/pages/login/components/other-way-box.vue create mode 100644 smart-app/src/pages/login/login.vue create mode 100644 smart-app/src/pages/message/message.vue create mode 100644 smart-app/src/pages/mine/components/mine-menu.vue create mode 100644 smart-app/src/pages/mine/components/mine-user-blue.vue create mode 100644 smart-app/src/pages/mine/components/mine-user-white.vue create mode 100644 smart-app/src/pages/mine/mine.vue create mode 100644 smart-app/src/pages/notice/components/notice-list.vue create mode 100644 smart-app/src/pages/notice/components/notice-query-form-popup.vue create mode 100644 smart-app/src/pages/notice/notice-detail.vue create mode 100644 smart-app/src/pages/notice/notice-index.vue create mode 100644 smart-app/src/pages/order-detail/components/address-card.vue create mode 100644 smart-app/src/pages/order-detail/components/detail-model-base-info.vue create mode 100644 smart-app/src/pages/order-detail/components/detail-model-due-pay.vue create mode 100644 smart-app/src/pages/order-detail/components/detail-model-final.vue create mode 100644 smart-app/src/pages/order-detail/components/detail-model-path.vue create mode 100644 smart-app/src/pages/order-detail/components/detail-model-receivable.vue create mode 100644 smart-app/src/pages/order-detail/components/detail-model-voucher.vue create mode 100644 smart-app/src/pages/order-detail/components/info-card-model-one.vue create mode 100644 smart-app/src/pages/order-detail/components/info-card-model-three.vue create mode 100644 smart-app/src/pages/order-detail/components/info-card-model-two.vue create mode 100644 smart-app/src/pages/order-detail/components/scroll-tabs.vue create mode 100644 smart-app/src/pages/order-detail/order-detail.vue create mode 100644 smart-app/src/pages/pure-list/components/list-model-five.vue create mode 100644 smart-app/src/pages/pure-list/components/list-model-four.vue create mode 100644 smart-app/src/pages/pure-list/components/list-model-one.vue create mode 100644 smart-app/src/pages/pure-list/components/list-model-three.vue create mode 100644 smart-app/src/pages/pure-list/components/list-model-two.vue create mode 100644 smart-app/src/pages/pure-list/pure-list.vue create mode 100644 smart-app/src/pages/select-people/select-people.vue create mode 100644 smart-app/src/pages/support/change-log/change-log-list.vue create mode 100644 smart-app/src/plugins/smart-enums-plugin.js create mode 100644 smart-app/src/shime-uni.d.ts create mode 100644 smart-app/src/static/common/back-icon.png create mode 100644 smart-app/src/static/common/update-app.png create mode 100644 smart-app/src/static/images/form/add-image.png create mode 100644 smart-app/src/static/images/form/add.png create mode 100644 smart-app/src/static/images/form/back.png create mode 100644 smart-app/src/static/images/form/close-image.png create mode 100644 smart-app/src/static/images/form/submit.png create mode 100644 smart-app/src/static/images/form/title-bg.png create mode 100644 smart-app/src/static/images/home/admin-icon.png create mode 100644 smart-app/src/static/images/home/copy-icon.png create mode 100644 smart-app/src/static/images/home/detail-icon.png create mode 100644 smart-app/src/static/images/home/download-icon.png create mode 100644 smart-app/src/static/images/home/link-icon.png create mode 100644 smart-app/src/static/images/home/qq-icon.png create mode 100644 smart-app/src/static/images/home/refresh-icon.png create mode 100644 smart-app/src/static/images/home/round-icon.png create mode 100644 smart-app/src/static/images/home/search-clear.png create mode 100644 smart-app/src/static/images/home/search-icon.png create mode 100644 smart-app/src/static/images/home/search.png create mode 100644 smart-app/src/static/images/home/share-icon.png create mode 100644 smart-app/src/static/images/home/vip-module-background.png create mode 100644 smart-app/src/static/images/home/vip-module-icon.png create mode 100644 smart-app/src/static/images/home/wechat-icon.png create mode 100644 smart-app/src/static/images/home/wechat-share-icon.png create mode 100644 smart-app/src/static/images/home/weibo-icon.png create mode 100644 smart-app/src/static/images/index/banner.png create mode 100644 smart-app/src/static/images/index/ic_home_menu1.png create mode 100644 smart-app/src/static/images/index/ic_home_menu10.png create mode 100644 smart-app/src/static/images/index/ic_home_menu2.png create mode 100644 smart-app/src/static/images/index/ic_home_menu3.png create mode 100644 smart-app/src/static/images/index/ic_home_menu4.png create mode 100644 smart-app/src/static/images/index/ic_home_menu5.png create mode 100644 smart-app/src/static/images/index/ic_home_menu6.png create mode 100644 smart-app/src/static/images/index/ic_home_menu7.png create mode 100644 smart-app/src/static/images/index/ic_home_menu8.png create mode 100644 smart-app/src/static/images/index/ic_home_menu9.png create mode 100644 smart-app/src/static/images/index/ic_scan.png create mode 100644 smart-app/src/static/images/index/ic_search.png create mode 100644 smart-app/src/static/images/list/add.png create mode 100644 smart-app/src/static/images/list/blue.png create mode 100644 smart-app/src/static/images/list/camera.png create mode 100644 smart-app/src/static/images/list/form-list.png create mode 100644 smart-app/src/static/images/list/phone.png create mode 100644 smart-app/src/static/images/list/red.png create mode 100644 smart-app/src/static/images/list/repair-report.png create mode 100644 smart-app/src/static/images/list/success.png create mode 100644 smart-app/src/static/images/list/use.png create mode 100644 smart-app/src/static/images/list3/complete-icon.png create mode 100644 smart-app/src/static/images/list3/phone.png create mode 100644 smart-app/src/static/images/list3/photograph-icon.png create mode 100644 smart-app/src/static/images/login/bind-error.png create mode 100644 smart-app/src/static/images/login/bind-success.png create mode 100644 smart-app/src/static/images/login/check-in.png create mode 100644 smart-app/src/static/images/login/check-out.png create mode 100644 smart-app/src/static/images/login/ios-login-icon.png create mode 100644 smart-app/src/static/images/login/login-logo.png create mode 100644 smart-app/src/static/images/login/login-password.png create mode 100644 smart-app/src/static/images/login/login-top-back.png create mode 100644 smart-app/src/static/images/login/login-username.png create mode 100644 smart-app/src/static/images/login/phone-login-icon.png create mode 100644 smart-app/src/static/images/login/wx-icon.png create mode 100644 smart-app/src/static/images/login/wx-login-icon.png create mode 100644 smart-app/src/static/images/message/approve.png create mode 100644 smart-app/src/static/images/message/message.png create mode 100644 smart-app/src/static/images/mine/app-logo.png create mode 100644 smart-app/src/static/images/mine/arrow.png create mode 100644 smart-app/src/static/images/mine/common-select-icon.png create mode 100644 smart-app/src/static/images/mine/common-unselect-icon.png create mode 100644 smart-app/src/static/images/mine/customer-icon.png create mode 100644 smart-app/src/static/images/mine/default-header.png create mode 100644 smart-app/src/static/images/mine/logout-icon.png create mode 100644 smart-app/src/static/images/mine/mine-about-us.png create mode 100644 smart-app/src/static/images/mine/mine-account.png create mode 100644 smart-app/src/static/images/mine/mine-feedback.png create mode 100644 smart-app/src/static/images/mine/mine-menu-address.png create mode 100644 smart-app/src/static/images/mine/mine-menu-balance.png create mode 100644 smart-app/src/static/images/mine/mine-menu-collect.png create mode 100644 smart-app/src/static/images/mine/mine-menu-coupon.png create mode 100644 smart-app/src/static/images/mine/mine-message.png create mode 100644 smart-app/src/static/images/mine/mine-protocol.png create mode 100644 smart-app/src/static/images/mine/mine-service.png create mode 100644 smart-app/src/static/images/mine/mine-version-info.png create mode 100644 smart-app/src/static/images/mine/no-vip-flag.png create mode 100644 smart-app/src/static/images/mine/open-vip.png create mode 100644 smart-app/src/static/images/mine/phone-icon.png create mode 100644 smart-app/src/static/images/mine/top-background.png create mode 100644 smart-app/src/static/images/mine/user-agreement-icon.png create mode 100644 smart-app/src/static/images/mine/vip-background.png create mode 100644 smart-app/src/static/images/mine/vip-bg.png create mode 100644 smart-app/src/static/images/mine/vip-icon.png create mode 100644 smart-app/src/static/images/notice/01.png create mode 100644 smart-app/src/static/images/notice/02.png create mode 100644 smart-app/src/static/images/pure-list/blue.png create mode 100644 smart-app/src/static/images/pure-list/employ.png create mode 100644 smart-app/src/static/images/pure-list/maintain.png create mode 100644 smart-app/src/static/images/pure-list/obsolete.png create mode 100644 smart-app/src/static/images/pure-list/orange.png create mode 100644 smart-app/src/static/images/pure-list/overdue.png create mode 100644 smart-app/src/static/images/select-people/select.png create mode 100644 smart-app/src/static/images/tabbar/home-icon-h.png create mode 100644 smart-app/src/static/images/tabbar/home-icon.png create mode 100644 smart-app/src/static/images/tabbar/list-icon-h.png create mode 100644 smart-app/src/static/images/tabbar/list-icon.png create mode 100644 smart-app/src/static/images/tabbar/message-icon-h.png create mode 100644 smart-app/src/static/images/tabbar/message-icon.png create mode 100644 smart-app/src/static/images/tabbar/mine-icon-h.png create mode 100644 smart-app/src/static/images/tabbar/mine-icon.png create mode 100644 smart-app/src/static/images/uni-modules/uni-mescroll/mescroll-empty.png create mode 100644 smart-app/src/static/images/uni-modules/uni-mescroll/mescroll-totop.png create mode 100644 smart-app/src/static/logo.png create mode 100644 smart-app/src/store/index.js create mode 100644 smart-app/src/store/modules/system/app-config.js create mode 100644 smart-app/src/store/modules/system/user.js create mode 100644 smart-app/src/theme/index.scss create mode 100644 smart-app/src/uni.scss create mode 100644 smart-app/src/uni_modules/uni-data-picker/changelog.md create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-picker/keypress.js create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.uvue create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-pickerview/loading.uts create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.uts create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.css create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.uvue create mode 100644 smart-app/src/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue create mode 100644 smart-app/src/uni_modules/uni-data-picker/package.json create mode 100644 smart-app/src/uni_modules/uni-data-picker/readme.md create mode 100644 smart-app/src/uni_modules/uni-icons/changelog.md create mode 100644 smart-app/src/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue create mode 100644 smart-app/src/uni_modules/uni-icons/components/uni-icons/uni-icons.vue create mode 100644 smart-app/src/uni_modules/uni-icons/components/uni-icons/uniicons.css create mode 100644 smart-app/src/uni_modules/uni-icons/components/uni-icons/uniicons.ttf create mode 100644 smart-app/src/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts create mode 100644 smart-app/src/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js create mode 100644 smart-app/src/uni_modules/uni-icons/package.json create mode 100644 smart-app/src/uni_modules/uni-icons/readme.md create mode 100644 smart-app/src/uni_modules/uni-load-more/changelog.md create mode 100644 smart-app/src/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json create mode 100644 smart-app/src/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js create mode 100644 smart-app/src/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json create mode 100644 smart-app/src/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json create mode 100644 smart-app/src/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue create mode 100644 smart-app/src/uni_modules/uni-load-more/package.json create mode 100644 smart-app/src/uni_modules/uni-load-more/readme.md create mode 100644 smart-app/src/uni_modules/uni-mescroll/changelog.md create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-body/mescroll-body.css create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-body/mescroll-body.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/beibei/components/mescroll-down.css create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/beibei/components/mescroll-down.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/beibei/mescroll-body.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/beibei/mescroll-uni-option.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/beibei/mescroll-uni.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/xinlang/components/mescroll-down.css create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/xinlang/components/mescroll-down.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/xinlang/components/mescroll-up.css create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/xinlang/components/mescroll-up.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/xinlang/mescroll-body.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/xinlang/mescroll-uni-option.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-diy/xinlang/mescroll-uni.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-empty/mescroll-empty.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/components/mescroll-down.css create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/components/mescroll-down.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/components/mescroll-top.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/components/mescroll-up.css create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/components/mescroll-up.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mescroll-i18n.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mescroll-mixins.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mescroll-uni-option.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mescroll-uni.css create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mescroll-uni.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mescroll-uni.vue create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mixins/mescroll-comp.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mixins/mescroll-more-item.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/mixins/mescroll-more.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/wxs/mixins.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/wxs/renderjs.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/components/mescroll-uni/wxs/wxs.wxs create mode 100644 smart-app/src/uni_modules/uni-mescroll/hooks/useMescroll.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/hooks/useMescrollComp.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/hooks/useMescrollMore.js create mode 100644 smart-app/src/uni_modules/uni-mescroll/package.json create mode 100644 smart-app/src/uni_modules/uni-mescroll/readme.md create mode 100644 smart-app/src/uni_modules/uni-scss/changelog.md create mode 100644 smart-app/src/uni_modules/uni-scss/index.scss create mode 100644 smart-app/src/uni_modules/uni-scss/package.json create mode 100644 smart-app/src/uni_modules/uni-scss/readme.md create mode 100644 smart-app/src/uni_modules/uni-scss/styles/index.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/setting/_border.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/setting/_color.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/setting/_radius.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/setting/_space.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/setting/_styles.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/setting/_text.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/setting/_variables.scss create mode 100644 smart-app/src/uni_modules/uni-scss/styles/tools/functions.scss create mode 100644 smart-app/src/uni_modules/uni-scss/theme.scss create mode 100644 smart-app/src/uni_modules/uni-scss/variables.scss create mode 100644 smart-app/src/utils/str-util.js create mode 100644 smart-app/vite.config.js diff --git a/README.md b/README.md index 02061536..d385f53a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ### **技术体系** - 前端:Vue3 + Vite5 + Vue-Router + Pinia + Ant Design Vue 4.X -- 移动端:uniapp + uview2.x +- 移动端:uniapp (vue3版本) + uni-ui + (同时支持APP、小程序、H5) - 后端:SpringBoot + Sa Token + Mybatis-plus + 多种数据库 - 在线预览:[https://preview.smartadmin.vip](https://preview.smartadmin.vip) - 官方文档:[https://smartadmin.vip](https://smartadmin.vip) diff --git a/smart-app/.env.development b/smart-app/.env.development new file mode 100644 index 00000000..7ae8066c --- /dev/null +++ b/smart-app/.env.development @@ -0,0 +1,3 @@ +NODE_ENV=development +VITE_APP_TITLE='SmartAdmin 开发环境(Dev)' +VITE_APP_API_URL='http://127.0.0.1:1024' \ No newline at end of file diff --git a/smart-app/.env.localhost b/smart-app/.env.localhost new file mode 100644 index 00000000..697befa3 --- /dev/null +++ b/smart-app/.env.localhost @@ -0,0 +1,3 @@ +NODE_ENV=development +VITE_APP_TITLE='SmartH5 本地环境(Local)' +VITE_APP_API_URL='http://127.0.0.1:1024' diff --git a/smart-app/.env.pre b/smart-app/.env.pre new file mode 100644 index 00000000..687cc0fa --- /dev/null +++ b/smart-app/.env.pre @@ -0,0 +1,3 @@ +NODE_ENV=production +VITE_APP_TITLE='SmartH5 预发布环境(Pre)' +VITE_APP_API_URL='https://preview.smartadmin.vip/smart-admin-api' \ No newline at end of file diff --git a/smart-app/.env.production b/smart-app/.env.production new file mode 100644 index 00000000..78defb1b --- /dev/null +++ b/smart-app/.env.production @@ -0,0 +1,3 @@ +NODE_ENV=production +VITE_APP_TITLE='SmartH5 V3.X' +VITE_APP_API_URL='https://preview.smartadmin.vip/smart-admin-api' \ No newline at end of file diff --git a/smart-app/.env.test b/smart-app/.env.test new file mode 100644 index 00000000..b7f34bae --- /dev/null +++ b/smart-app/.env.test @@ -0,0 +1,3 @@ +NODE_ENV=production +VITE_APP_TITLE='SmartH5 测试环境(Test)' +VITE_APP_API_URL='http://127.0.0.1:1024' \ No newline at end of file diff --git a/smart-app/.eslintignore b/smart-app/.eslintignore new file mode 100644 index 00000000..78e1638b --- /dev/null +++ b/smart-app/.eslintignore @@ -0,0 +1,18 @@ + +*.sh +node_modules +lib +*.md +*.woff +*.ttf +.vscode +.idea +dist +public +/docs +.husky +.local +.localhost +/bin +Dockerfile +src/assets diff --git a/smart-app/.eslintrc.cjs b/smart-app/.eslintrc.cjs new file mode 100644 index 00000000..81e7acc0 --- /dev/null +++ b/smart-app/.eslintrc.cjs @@ -0,0 +1,66 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-11-05 + * @LastEditTime: 2022-07-05 + * @LastEditors: zhuoda + */ +module.exports = { + root: true, //此项是用来告诉eslint找当前配置文件不能往父级查找 + env: { + browser: true, + es2021: true, + node: true, + }, + parser: 'vue-eslint-parser', //使用vue-eslint-parser 来解析vue文件中的 template和script + parserOptions: { + ecmaVersion: 12, // 默认情况下,ESLint使用的是ECMAScript5语法,此处我们设置的选项是 es12 + sourceType: 'module', // 指定js导入的方式 + }, + extends: ['plugin:vue/vue3-essential', 'eslint:recommended', 'plugin:vue/base'], + globals: { + defineProps: 'readonly', + defineEmits: 'readonly', + defineExpose: 'readonly', + withDefaults: 'readonly', + }, + plugins: ['vue'], + rules: { + 'no-unused-vars': [ + 'error', + // we are only using this rule to check for unused arguments since TS + // catches unused variables but not args. + { varsIgnorePattern: '.*', args: 'none' }, + ], + 'space-before-function-paren': 'off', + + 'vue/attributes-order': 'off', + 'vue/one-component-per-file': 'off', + 'vue/html-closing-bracket-newline': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/multiline-html-element-content-newline': 'off', + 'vue/singleline-html-element-content-newline': 'off', + 'vue/attribute-hyphenation': 'off', + 'vue/require-default-prop': 'off', + 'vue/multi-word-component-names': [ + 'error', + { + ignores: ['index'], //需要忽略的组件名 + }, + ], + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'always', + normal: 'never', + component: 'always', + }, + svg: 'always', + math: 'always', + }, + ], + // Enable vue/script-setup-uses-vars rule + 'vue/script-setup-uses-vars': 'error', + }, +}; diff --git a/smart-app/.gitignore b/smart-app/.gitignore new file mode 100644 index 00000000..7ce6e504 --- /dev/null +++ b/smart-app/.gitignore @@ -0,0 +1,21 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +*.local + +# Editor directories and files +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? \ No newline at end of file diff --git a/smart-app/.prettierrc.cjs b/smart-app/.prettierrc.cjs new file mode 100644 index 00000000..d1c4ba82 --- /dev/null +++ b/smart-app/.prettierrc.cjs @@ -0,0 +1,30 @@ +/* + * 代码格式化配置 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-12 14:44:18 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +module.exports = { + printWidth: 150, // 每行代码长度(默认80) + tabWidth: 2, // 缩进空格数 + useTabs: false, //不用tab缩进 + semi: true, //// 在语句末尾打印分号 + singleQuote: true, // 使用单引号而不是双引号 + vueIndentScriptAndStyle: true, //Vue文件脚本和样式标签缩进 + quoteProps: 'as-needed', // 更改引用对象属性的时间 可选值"" + jsxSingleQuote: true, // 在JSX中使用单引号而不是双引号 + trailingComma: 'es5', //多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"",默认none + bracketSpacing: true, // 在对象文字中的括号之间打印空格 + jsxBracketSameLine: false, //jsx 标签的反尖括号需要换行 + arrowParens: 'always', // 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x + rangeStart: 0, // 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 + rangeEnd: Infinity, + requirePragma: false, // 指定要使用的解析器,不需要写文件开头的 @prettier + insertPragma: false, // 不需要自动在文件开头插入 @prettier + proseWrap: 'preserve', // 使用默认的折行标准 always\never\preserve + htmlWhitespaceSensitivity: 'css', // 指定HTML文件的全局空格敏感度 css\strict\ignore + endOfLine: 'auto', // 因为prettier的规范和eslint的换行规则不同,所以这个必须配置。要不然每次打开文件都会有一堆的警告;换行符使用 lf 结尾是 可选值" + + + + + + + + + +
+ + + diff --git a/smart-app/package.json b/smart-app/package.json new file mode 100644 index 00000000..0570a21d --- /dev/null +++ b/smart-app/package.json @@ -0,0 +1,81 @@ +{ + "name": "uni-preset-vue", + "version": "0.0.0", + "scripts": { + "dev:app": "uni -p app", + "dev:app-android": "uni -p app-android", + "dev:app-ios": "uni -p app-ios", + "dev:custom": "uni -p", + "dev:h5": "uni", + "dev:h5:ssr": "uni --ssr", + "dev:mp-alipay": "uni -p mp-alipay", + "dev:mp-baidu": "uni -p mp-baidu", + "dev:mp-jd": "uni -p mp-jd", + "dev:mp-kuaishou": "uni -p mp-kuaishou", + "dev:mp-lark": "uni -p mp-lark", + "dev:mp-qq": "uni -p mp-qq", + "dev:mp-toutiao": "uni -p mp-toutiao", + "dev:mp-weixin": "uni -p mp-weixin", + "dev:mp-xhs": "uni -p mp-xhs", + "dev:quickapp-webview": "uni -p quickapp-webview", + "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei", + "dev:quickapp-webview-union": "uni -p quickapp-webview-union", + "build:app": "uni build -p app", + "build:app-android": "uni build -p app-android", + "build:app-ios": "uni build -p app-ios", + "build:custom": "uni build -p", + "build:h5": "uni build", + "build:h5:ssr": "uni build --ssr", + "build:mp-alipay": "uni build -p mp-alipay", + "build:mp-baidu": "uni build -p mp-baidu", + "build:mp-jd": "uni build -p mp-jd", + "build:mp-kuaishou": "uni build -p mp-kuaishou", + "build:mp-lark": "uni build -p mp-lark", + "build:mp-qq": "uni build -p mp-qq", + "build:mp-toutiao": "uni build -p mp-toutiao", + "build:mp-weixin": "uni build -p mp-weixin", + "build:mp-xhs": "uni build -p mp-xhs", + "build:quickapp-webview": "uni build -p quickapp-webview", + "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei", + "build:quickapp-webview-union": "uni build -p quickapp-webview-union" + }, + "dependencies": { + "@dcloudio/uni-app": "3.0.0-3090920231225001", + "@dcloudio/uni-app-plus": "3.0.0-3090920231225001", + "@dcloudio/uni-components": "3.0.0-3090920231225001", + "@dcloudio/uni-h5": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-alipay": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-baidu": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-jd": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-kuaishou": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-lark": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-qq": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-toutiao": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-weixin": "3.0.0-3090920231225001", + "@dcloudio/uni-mp-xhs": "3.0.0-3090920231225001", + "@dcloudio/uni-quickapp-webview": "3.0.0-3090920231225001", + "@dcloudio/uni-ui": "1.5.0", + "lodash": "^4.17.21", + "pinia": "^2.0.36", + "vue": "3.2.47", + "vue-i18n": "9.1.9", + "sm-crypto": "0.3.13", + "crypto-js": "4.1.1" + }, + "devDependencies": { + "@dcloudio/types": "3.3.2", + "@dcloudio/uni-automator": "3.0.0-3090920231225001", + "@dcloudio/uni-cli-shared": "3.0.0-3090920231225001", + "@dcloudio/uni-stacktracey": "3.0.0-3090920231225001", + "@dcloudio/vite-plugin-uni": "3.0.0-3090920231225001", + "@vue/runtime-core": "3.2.45", + "sass": "1.69.7", + "sass-loader": "10.1.1", + "vite": "4.0.3", + "prettier": "3.0.2", + "eslint": "8.16.0", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-prettier": "5.0.0", + "eslint-plugin-vue": "9.17.0" + } +} diff --git a/smart-app/shims-uni.d.ts b/smart-app/shims-uni.d.ts new file mode 100644 index 00000000..ed4adcfc --- /dev/null +++ b/smart-app/shims-uni.d.ts @@ -0,0 +1,10 @@ +/// +import 'vue' + +declare module '@vue/runtime-core' { + type Hooks = App.AppInstance & Page.PageInstance; + + interface ComponentCustomOptions extends Hooks { + + } +} diff --git a/smart-app/src/App.vue b/smart-app/src/App.vue new file mode 100644 index 00000000..f4385584 --- /dev/null +++ b/smart-app/src/App.vue @@ -0,0 +1,19 @@ + + + diff --git a/smart-app/src/api/business/goods/goods-api.js b/smart-app/src/api/business/goods/goods-api.js new file mode 100644 index 00000000..02d132b1 --- /dev/null +++ b/smart-app/src/api/business/goods/goods-api.js @@ -0,0 +1,31 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-11-05 + * @LastEditTime: 2022-06-23 + * @LastEditors: zhuoda + */ +import { postRequest, getRequest } from '/@/lib/smart-request'; + +export const goodsApi = { + // 添加商品 @author zhuoda + addGoods: (param) => { + return postRequest('/goods/add', param); + }, + // 删除 @author zhuoda + deleteGoods: (goodsId) => { + return getRequest(`/goods/delete/${goodsId}`); + }, + // 批量 @author zhuoda + batchDelete: (goodsIdList) => { + return postRequest('/goods/batchDelete', goodsIdList); + }, + // 分页查询 @author zhuoda + queryGoodsList: (param) => { + return postRequest('/goods/query', param); + }, + // 更新商品 @author zhuoda + updateGoods: (param) => { + return postRequest('/goods/update', param); + }, +}; diff --git a/smart-app/src/api/business/oa/enterprise-api.js b/smart-app/src/api/business/oa/enterprise-api.js new file mode 100644 index 00000000..87cb85af --- /dev/null +++ b/smart-app/src/api/business/oa/enterprise-api.js @@ -0,0 +1,37 @@ +/* + * 企业信息 + * + * @Author: 开云 + * @Date: 2023-09-03 21:47:28 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +import { postRequest, getRequest } from '/@/lib/smart-request'; + +export const enterpriseApi = { + // 新建企业 @author 开云 + create: (param) => { + return postRequest('/oa/enterprise/create', param); + }, + + // 查询企业详情 @author 开云 + detail: (enterpriseId) => { + return getRequest(`/oa/enterprise/get/${enterpriseId}`); + }, + + // 分页查询企业模块 @author 开云 + pageQuery: (param) => { + return postRequest('/oa/enterprise/page/query', param); + }, + + // 编辑企业 @author 开云 + update: (param) => { + return postRequest('/oa/enterprise/update', param); + }, + + // 删除企业 @author 开云 + delete: (enterpriseId) => { + return getRequest(`/oa/enterprise/delete/${enterpriseId}`); + }, +}; diff --git a/smart-app/src/api/business/oa/notice-api.js b/smart-app/src/api/business/oa/notice-api.js new file mode 100644 index 00000000..8fcd87b9 --- /dev/null +++ b/smart-app/src/api/business/oa/notice-api.js @@ -0,0 +1,33 @@ +/* + * @Description: 公告信息、企业动态 + * @version: + * @Author: zhuoda + * @Date: 2022-08-16 20:34:36 + */ +import { postRequest, getRequest } from '/@/lib/smart-request'; + +export const noticeApi = { + // ---------------- 通知公告类型 ----------------------- + + // 通知公告类型-获取全部 @author zhuoda + getAllNoticeTypeList() { + return getRequest('/oa/noticeType/getAll'); + }, + + // --------------------- 【员工】查看 通知公告 ------------------------- + + // 通知公告-员工-查看详情 @author zhuoda + view(noticeId) { + return getRequest(`/oa/notice/employee/view/${noticeId}`); + }, + + // 通知公告-员工-查询 @author zhuoda + queryEmployeeNotice(param) { + return postRequest('/oa/notice/employee/query', param); + }, + + // 【员工】通知公告-查询 查看记录 @author zhuoda + queryViewRecord(param) { + return postRequest('/oa/notice/employee/queryViewRecord', param); + }, +}; diff --git a/smart-app/src/api/support/change-log-api.js b/smart-app/src/api/support/change-log-api.js new file mode 100644 index 00000000..67727d95 --- /dev/null +++ b/smart-app/src/api/support/change-log-api.js @@ -0,0 +1,17 @@ +/** + * 系统更新日志 api 封装 + * + * @Author: 卓大 + * @Date: 2022-09-26 14:53:50 + * @Copyright 1024创新实验室 + */ +import { postRequest, getRequest } from '/@/lib/smart-request'; + +export const changeLogApi = { + /** + * 分页查询 @author 卓大 + */ + queryPage: (param) => { + return postRequest('/support/changeLog/queryPage', param); + }, +}; diff --git a/smart-app/src/api/support/dict-api.js b/smart-app/src/api/support/dict-api.js new file mode 100644 index 00000000..70fc7ec2 --- /dev/null +++ b/smart-app/src/api/support/dict-api.js @@ -0,0 +1,59 @@ +/* + * 字典 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-03 21:55:25 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +import { postRequest, getRequest } from '/@/lib/smart-request'; + +export const dictApi = { + // 分页查询数据字典KEY - @author 卓大 + keyQuery: (param) => { + return postRequest('/support/dict/key/query', param); + }, + // 查询全部字典key - @author 卓大 + queryAllKey: () => { + return getRequest('/support/dict/key/queryAll'); + }, + /** + * 分页查询数据字典value - @author 卓大 + */ + valueQuery: (param) => { + return postRequest('/support/dict/value/query', param); + }, + // 数据字典KEY-添加- @author 卓大 + keyAdd: (param) => { + return postRequest('/support/dict/key/add', param); + }, + // 分页查询数据字典value - @author 卓大 + valueAdd: (param) => { + return postRequest('/support/dict/value/add', param); + }, + // 数据字典key-更新- @author 卓大 + keyEdit: (param) => { + return postRequest('/support/dict/key/edit', param); + }, + // 数据字典Value-更新- @author 卓大 + valueEdit: (param) => { + return postRequest('/support/dict/value/edit', param); + }, + // 数据字典key-删除- @author 卓大 + keyDelete: (keyIdList) => { + return postRequest('/support/dict/key/delete', keyIdList); + }, + // 数据字典Value-删除- @author 卓大 + valueDelete: (valueIdList) => { + return postRequest('/support/dict/value/delete', valueIdList); + }, + // 缓存刷新- @author 卓大 + cacheRefresh: () => { + return getRequest('/support/dict/cache/refresh'); + }, + // 数据字典-值列表- @author 卓大 + valueList: (keyCode) => { + return getRequest(`/support/dict/value/list/${keyCode}`); + }, +}; diff --git a/smart-app/src/api/system/login-api.js b/smart-app/src/api/system/login-api.js new file mode 100644 index 00000000..bbc2ba40 --- /dev/null +++ b/smart-app/src/api/system/login-api.js @@ -0,0 +1,40 @@ +/* + * 登录 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-03 21:59:58 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +import { getRequest, postRequest } from '/@/lib/smart-request'; + +export const loginApi = { + /** + * 登录 @author 卓大 + */ + login: (param) => { + return postRequest('/login', param); + }, + + /** + * 退出登录 @author 卓大 + */ + logout: () => { + return getRequest('/login/logout'); + }, + + /** + * 获取验证码 @author 卓大 + */ + getCaptcha: () => { + return getRequest('/login/getCaptcha'); + }, + + /** + * 获取登录信息 @author 卓大 + */ + getLoginInfo: () => { + return getRequest('/login/getLoginInfo'); + }, +}; diff --git a/smart-app/src/components/dict-select/index.vue b/smart-app/src/components/dict-select/index.vue new file mode 100644 index 00000000..6e5b66f0 --- /dev/null +++ b/smart-app/src/components/dict-select/index.vue @@ -0,0 +1,55 @@ + + + + diff --git a/smart-app/src/components/smart-card/index.vue b/smart-app/src/components/smart-card/index.vue new file mode 100644 index 00000000..2596546f --- /dev/null +++ b/smart-app/src/components/smart-card/index.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/smart-app/src/components/smart-enum-radio/index.vue b/smart-app/src/components/smart-enum-radio/index.vue new file mode 100644 index 00000000..934f82e2 --- /dev/null +++ b/smart-app/src/components/smart-enum-radio/index.vue @@ -0,0 +1,42 @@ + + + + diff --git a/smart-app/src/components/smart-enum-select/index.vue b/smart-app/src/components/smart-enum-select/index.vue new file mode 100644 index 00000000..a0b5a988 --- /dev/null +++ b/smart-app/src/components/smart-enum-select/index.vue @@ -0,0 +1,49 @@ + + + + diff --git a/smart-app/src/components/smart-tabs/index.vue b/smart-app/src/components/smart-tabs/index.vue new file mode 100644 index 00000000..9bdfc12e --- /dev/null +++ b/smart-app/src/components/smart-tabs/index.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/smart-app/src/constants/business/erp/goods-const.js b/smart-app/src/constants/business/erp/goods-const.js new file mode 100644 index 00000000..599a62d4 --- /dev/null +++ b/smart-app/src/constants/business/erp/goods-const.js @@ -0,0 +1,26 @@ +/* + * 商品 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-03 22:08:10 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +export const GOODS_STATUS_ENUM = { + APPOINTMENT: { + value: 1, + desc: '预约中', + }, + SELL: { + value: 2, + desc: '售卖中', + }, + SELL_OUT: { + value: 3, + desc: '售罄', + }, +}; +export default { + GOODS_STATUS_ENUM, +}; diff --git a/smart-app/src/constants/business/oa/enterprise-const.js b/smart-app/src/constants/business/oa/enterprise-const.js new file mode 100644 index 00000000..7b8f04fa --- /dev/null +++ b/smart-app/src/constants/business/oa/enterprise-const.js @@ -0,0 +1,24 @@ +/* + * 企业 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2023-09-03 22:07:27 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ + +export const ENTERPRISE_TYPE_ENUM = { + NORMAL: { + value: 1, + desc: '有限企业', + }, + FOREIGN: { + value: 2, + desc: '外资企业', + }, +}; + +export default { + ENTERPRISE_TYPE_ENUM, +}; diff --git a/smart-app/src/constants/common-const.js b/smart-app/src/constants/common-const.js new file mode 100644 index 00000000..8db06ca2 --- /dev/null +++ b/smart-app/src/constants/common-const.js @@ -0,0 +1,70 @@ +/* + * 通用常量 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-06 19:57:29 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ + +export const PAGE_SIZE = 10; + +export const PAGE_SIZE_OPTIONS = ['5', '10', '15', '20', '30', '40', '50', '75', '100', '150', '200', '300', '500']; + +//登录页面名字 +export const PAGE_PATH_LOGIN = '/login'; + +//404页面名字 +export const PAGE_PATH_404 = '/404'; + +export const showTableTotal = function (total) { + return `共${total}条`; +}; + +export const FLAG_NUMBER_ENUM = { + TRUE: { + value: 1, + desc: '是', + }, + FALSE: { + value: 0, + desc: '否', + }, +}; + +export const GENDER_ENUM = { + UNKNOWN: { + value: 0, + desc: '未知', + }, + MAN: { + value: 1, + desc: '男', + }, + WOMAN: { + value: 2, + desc: '女', + }, +}; + +export const USER_TYPE_ENUM = { + ADMIN_EMPLOYEE: { + value: 1, + desc: '员工', + }, + +}; + +export const DATA_TYPE_ENUM = { + NORMAL: { + value: 1, + desc: '普通', + }, + ENCRYPT: { + value: 10, + desc: '加密', + }, + +}; + diff --git a/smart-app/src/constants/index.js b/smart-app/src/constants/index.js new file mode 100644 index 00000000..e502ff46 --- /dev/null +++ b/smart-app/src/constants/index.js @@ -0,0 +1,24 @@ +/* + * 所有常量入口 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-06 19:58:28 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +import { FLAG_NUMBER_ENUM, GENDER_ENUM, USER_TYPE_ENUM } from './common-const'; +import loginDevice from './system/login-device-const'; +import enterpriseConst from './business/oa/enterprise-const'; +import goodsConst from './business/erp/goods-const'; +import changeLogConst from './support/change-log-const'; + +export default { + FLAG_NUMBER_ENUM, + GENDER_ENUM, + USER_TYPE_ENUM, + ...loginDevice, + ...enterpriseConst, + ...goodsConst, + ...changeLogConst, +}; diff --git a/smart-app/src/constants/local-storage-key-const.js b/smart-app/src/constants/local-storage-key-const.js new file mode 100644 index 00000000..8e13a29b --- /dev/null +++ b/smart-app/src/constants/local-storage-key-const.js @@ -0,0 +1,19 @@ +/* + * key 常量 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-06 19:58:50 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ + +/** + * key前缀 + */ +const KEY_PREFIX = 'smart_h5_'; +/** + * localStorageKey集合 + */ +// token +export const USER_TOKEN = `${KEY_PREFIX}token`; diff --git a/smart-app/src/constants/regular-const.js b/smart-app/src/constants/regular-const.js new file mode 100644 index 00000000..0633dc87 --- /dev/null +++ b/smart-app/src/constants/regular-const.js @@ -0,0 +1,28 @@ +/* + * 正则常量 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-06 19:59:05 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +export const regular = { + phone: /^(13|14|15|16|17|18|19)\d{9}$/, + qq: /^[1-9]\d{3,}$/, + linkUrl: + /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/, + // eslint-disable-next-line no-useless-escape + isNumber: /(^[\-1-9][1-9]*(.[1-9]+)?)$/, // 判断是否为数字,除了0 外 + isLandlineOrPhone: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/, // 验证 座机 或者手机 + account: /^[a-z0-9]{3,16}$/, // 请输入3-16位(小写字母|数字)的账号 + mobileAccount: /^[a-z0-9]{6,16}$/, // 请输入6-16位(小写字母|数字)的账号(和移动端保持一致) + accountDesc: '请输入3-16位(小写字母|数字)的账号', + pwd: /^[A-Za-z0-9._]{6,16}$/, // 请输入6-16位(大小写字母|数字|小数点|下划线)的密码 + pwdDesc: '请输入6-16位(大小写字母|数字|小数点|下划线)的密码', + delBlankSpace: /\s+/g, // 删除空格 + isPdfReg: new RegExp(/\.(pdf|PDF)/), + isElseFileReg: new RegExp(/\.(doc|docx|xls|xlsx|txt|ppt|pptx|pps|ppxs)/), + isIdentityCard: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/, // 验证身份证号 + isChinese: /^[\u4e00-\u9fa5]+$/gi, // 验证是否汉字 +}; diff --git a/smart-app/src/constants/support/change-log-const.js b/smart-app/src/constants/support/change-log-const.js new file mode 100644 index 00000000..dc10d436 --- /dev/null +++ b/smart-app/src/constants/support/change-log-const.js @@ -0,0 +1,32 @@ +/** + * 系统更新日志 枚举 + * + * @Author: 卓大 + * @Date: 2022-09-26 14:53:50 + * @Copyright 1024创新实验室 + */ + +/** + * 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] + */ +export const CHANGE_LOG_TYPE_ENUM = { + MAJOR_UPDATE: { + value: 1, + desc: '重大更新', + type: 'error', + }, + FUNCTION_UPDATE: { + value: 2, + desc: '功能更新', + type: 'primary', + }, + BUG_FIX: { + value: 3, + desc: 'Bug修复', + type: 'warning', + }, +}; + +export default { + CHANGE_LOG_TYPE_ENUM, +}; diff --git a/smart-app/src/constants/system/login-device-const.js b/smart-app/src/constants/system/login-device-const.js new file mode 100644 index 00000000..f2031212 --- /dev/null +++ b/smart-app/src/constants/system/login-device-const.js @@ -0,0 +1,31 @@ +/* + * 登录设备 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-06 19:56:56 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +export const LOGIN_DEVICE_ENUM = { + PC: { + value: 1, + desc: '电脑端', + }, + ANDROID: { + value: 2, + desc: '安卓', + }, + APPLE: { + value: 3, + desc: '苹果', + }, + H5: { + value: 3, + desc: 'H5', + }, +}; + +export default { + LOGIN_DEVICE_ENUM, +}; diff --git a/smart-app/src/lib/encrypt.js b/smart-app/src/lib/encrypt.js new file mode 100644 index 00000000..8f2fbeed --- /dev/null +++ b/smart-app/src/lib/encrypt.js @@ -0,0 +1,87 @@ +import CryptoJS from 'crypto-js'; +import CryptoSM from 'sm-crypto'; + +function object2string(data) { + if (typeof data === 'Object') { + return JSON.stringify(data); + } + + let str = JSON.stringify(data); + if (str.startsWith("'") || str.startsWith('"')) { + str = str.substring(1); + } + if (str.endsWith("'") || str.endsWith('"')) { + str = str.substring(0, str.length - 1); + } + return str; +} + +// ----------------------- AES 加密、解密 ----------------------- +const AES_KEY = '1024abcd1024abcd1024abcd1024abcd'; + +const AES = { + encryptData: function (data) { + // AES 加密 并转为 base64 + let utf8Data = CryptoJS.enc.Utf8.parse(object2string(data)); + const key = CryptoJS.enc.Utf8.parse(AES_KEY); + const encrypted = CryptoJS.AES.encrypt(utf8Data, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7, + }); + + return encrypted.toString(); + }, + + decryptData: function (data) { + // 第一步:Base64 解码 + let words = CryptoJS.enc.Base64.parse(data); + + // 第二步:AES 解密 + const key = CryptoJS.enc.Utf8.parse(AES_KEY); + return CryptoJS.AES.decrypt({ ciphertext: words }, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7, + }).toString(CryptoJS.enc.Utf8); + }, +}; + +// ----------------------- 国密SM4算法 加密、解密 ----------------------- +const SM4_KEY = '1024abcd1024abcd1024abcd1024abcd'; + +const SM4 = { + encryptData: function (data) { + // 第一步:SM4 加密 + let encryptData = CryptoSM.sm4.encrypt(object2string(data), SM4_KEY); + // 第二步: Base64 编码 + return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(encryptData)); + }, + + decryptData: function (data) { + // 第一步:Base64 解码 + let words = CryptoJS.enc.Base64.parse(data); + let decode64Str = CryptoJS.enc.Utf8.stringify(words); + + // 第二步:SM4 解密 + return CryptoSM.sm4.decrypt(decode64Str, SM4_KEY); + }, +}; + +// ----------------------- 对外暴露: 加密、解密 ----------------------- + +// 默认使用SM4算法 +const EncryptObject = SM4; +// const EncryptObject = AES; + +/** + * 加密 + */ +export const encryptData = function (data) { + return !data ? null : EncryptObject.encryptData(data); +}; + +/** + * 解密 + */ +export const decryptData = function (data) { + return !data ? null : EncryptObject.decryptData(data); +}; diff --git a/smart-app/src/lib/smart-request.js b/smart-app/src/lib/smart-request.js new file mode 100644 index 00000000..9945b26e --- /dev/null +++ b/smart-app/src/lib/smart-request.js @@ -0,0 +1,96 @@ +/* + * ajax请求 + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2022-09-06 20:46:03 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ +import { USER_TOKEN } from '/@/constants/local-storage-key-const'; +import { DATA_TYPE_ENUM } from '/@/constants/common-const'; +import { decryptData, encryptData } from './encrypt'; +import { useUserStore } from '/@/store/modules/system/user'; + +const baseUrl = import.meta.env.VITE_APP_API_URL; + +function getUserToken() { + let token = uni.getStorageSync(USER_TOKEN); + if (token) { + return token; + } + return ''; +} + +/** + * 通用请求封装 + */ +export const request = function (url, method, data) { + return new Promise((resolve, reject) => { + uni.request({ + url: baseUrl + url, //拼接请求路径 + data: data, + method: method, + header: { + 'x-access-token': getUserToken(), + }, + success: (response) => { + // 如果是加密数据 + if (response.data.dataType === DATA_TYPE_ENUM.ENCRYPT.value) { + response.data.encryptData = response.data.data; + let decryptStr = decryptData(response.data.data); + if (decryptStr) { + response.data.data = JSON.parse(decryptStr); + } + } + + const res = response.data; + if (res.code && res.code !== 1) { + // `token` 过期或者账号已在别处登录 + if (res.code === 30007 || res.code === 30008 || res.code === 30012) { + uni.showToast({ + title: res.msg, + icon: 'none', + }); + useUserStore().clearUserLoginInfo(); + uni.navigateTo({ url: '/pages/login/login' }); + } + + uni.showToast({ + title: res.msg, + icon: 'none', + }); + reject(response); + } else { + resolve(res); + } + }, + fail: (error) => { + reject(error); + }, + }); + }); +}; + +/** + * get请求 + */ +export const getRequest = (url) => { + return request(url, 'GET'); +}; + +/** + * post请求 + */ +export const postRequest = (url, data) => { + return request(url, 'POST', data); +}; + +// ================================= 加密 ================================= + +/** + * 加密请求参数的post请求 + */ +export const postEncryptRequest = (url, data) => { + return request(url, 'POST', { encryptData: encryptData(data) }); +}; diff --git a/smart-app/src/lib/smart-sentry.js b/smart-app/src/lib/smart-sentry.js new file mode 100644 index 00000000..25427c1c --- /dev/null +++ b/smart-app/src/lib/smart-sentry.js @@ -0,0 +1,22 @@ +/* + * 错误上报sentry + * + * @Author: 1024创新实验室-主任:卓大 + * @Date: 2024-01-02 20:49:28 + * @Wechat: zhuda1024 + * @Email: lab1024@163.com + * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 + */ + +export const smartSentry = { + /** + * sentry 主动上报 + */ + captureError: (error) => { + if (error.config && error.data && error && error.headers && error.request && error.status) { + return; + } + // Sentry.captureException(error); + console.error(error); + }, +}; diff --git a/smart-app/src/lib/smart-support.js b/smart-app/src/lib/smart-support.js new file mode 100644 index 00000000..32cb0855 --- /dev/null +++ b/smart-app/src/lib/smart-support.js @@ -0,0 +1,30 @@ +export const SmartLoading = { + show: function (msg) { + uni.showLoading({ title: msg ? msg : '加载中' }); + }, + + hide: function () { + uni.hideLoading(); + }, +}; + +export const SmartToast = { + success: (message) => { + uni.showToast({ + title: message, + icon: 'success', + }); + }, + error: (message) => { + uni.showToast({ + title: message, + icon: 'error', + }); + }, + toast: (message) => { + uni.showToast({ + title: message, + icon: 'none', + }); + }, +}; diff --git a/smart-app/src/main.js b/smart-app/src/main.js new file mode 100644 index 00000000..4247b318 --- /dev/null +++ b/smart-app/src/main.js @@ -0,0 +1,18 @@ +import { createSSRApp } from 'vue'; +import App from './App.vue'; +import { store } from './store/index'; +// 枚举管理 +import smartEnumPlugin from '/@/plugins/smart-enums-plugin'; +import constantsInfo from '/@/constants/index'; +import lodash from 'lodash'; + +export function createApp() { + const app = createSSRApp(App); + app.use(store); + app.use(smartEnumPlugin, constantsInfo); + app.config.globalProperties.$lodash = lodash; + return { + app, + store, + }; +} diff --git a/smart-app/src/manifest.json b/smart-app/src/manifest.json new file mode 100644 index 00000000..309b9ec3 --- /dev/null +++ b/smart-app/src/manifest.json @@ -0,0 +1,72 @@ +{ + "name" : "", + "appid" : "", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics": { + "enable": false + }, + "vueVersion" : "3" +} diff --git a/smart-app/src/pages.json b/smart-app/src/pages.json new file mode 100644 index 00000000..44d5ed04 --- /dev/null +++ b/smart-app/src/pages.json @@ -0,0 +1,186 @@ +{ + "easycom": { + "autoscan": true, + "custom": { + "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" + } + }, + "pages": [ + { + "path": "pages/home/index", + "style": { + "navigationStyle":"custom" + } + }, + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "登录", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } + }, + { + "path" : "pages/mine/mine", + "style" : + { + "navigationBarTitleText" : "我的", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/enterprise/enterprise-list", + "style" : + { + "navigationBarTitleText" : "客户线索", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/enterprise/enterprise-form", + "style" : + { + "navigationBarTitleText" : "添加客户", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/enterprise/enterprise-detail", + "style" : + { + "navigationBarTitleText" : "客户详情", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/notice/notice-index", + "style" : + { + "navigationBarTitleText" : "通知公告", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/notice/notice-detail", + "style" : + { + "navigationBarTitleText" : "通知公告", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/goods/goods-index", + "style" : + { + "navigationBarTitleText" : "商品", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/support/change-log/change-log-list", + "style" : + { + "navigationBarTitleText" : "版本更新", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/list/list", + "style" : + { + "navigationBarTitleText" : "常见列表", + "enablePullDownRefresh" : true, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/message/message", + "style" : + { + "navigationBarTitleText" : "消息", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/form/form", + "style" : + { + "navigationBarTitleText" : "提交表单", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/select-people/select-people", + "style" : + { + "navigationBarTitleText" : "选择人员", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/pure-list/pure-list", + "style" : + { + "navigationBarTitleText" : "列表", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + }, + { + "path" : "pages/order-detail/order-detail", + "style" : + { + "navigationBarTitleText" : "运单详情", + "enablePullDownRefresh" : false, + "navigationBarBackgroundColor": "#fff" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "tabBar": { + "color": "#858585", + "selectedColor": "#1A9AFF", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [{ + "pagePath": "pages/home/index", + "iconPath": "static/images/tabbar/home-icon.png", + "selectedIconPath": "static/images/tabbar/home-icon-h.png", + "text": "首页" + }, + { + "pagePath": "pages/list/list", + "iconPath": "static/images/tabbar/list-icon.png", + "selectedIconPath": "static/images/tabbar/list-icon-h.png", + "text": "常见列表" + }, + { + "pagePath": "pages/message/message", + "iconPath": "static/images/tabbar/message-icon.png", + "selectedIconPath": "static/images/tabbar/message-icon-h.png", + "text": "消息" + }, + { + "pagePath": "pages/mine/mine", + "iconPath": "static/images/tabbar/mine-icon.png", + "selectedIconPath": "static/images/tabbar/mine-icon-h.png", + "text": "我的" + }] + } +} diff --git a/smart-app/src/pages/enterprise/enterprise-detail.vue b/smart-app/src/pages/enterprise/enterprise-detail.vue new file mode 100644 index 00000000..f05af913 --- /dev/null +++ b/smart-app/src/pages/enterprise/enterprise-detail.vue @@ -0,0 +1,293 @@ + + + + + diff --git a/smart-app/src/pages/enterprise/enterprise-form.vue b/smart-app/src/pages/enterprise/enterprise-form.vue new file mode 100644 index 00000000..32d719af --- /dev/null +++ b/smart-app/src/pages/enterprise/enterprise-form.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/smart-app/src/pages/enterprise/enterprise-list.vue b/smart-app/src/pages/enterprise/enterprise-list.vue new file mode 100644 index 00000000..440ac1ae --- /dev/null +++ b/smart-app/src/pages/enterprise/enterprise-list.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/smart-app/src/pages/form/components/font-size-select.vue b/smart-app/src/pages/form/components/font-size-select.vue new file mode 100644 index 00000000..f1cb8c01 --- /dev/null +++ b/smart-app/src/pages/form/components/font-size-select.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/smart-app/src/pages/form/components/interest.vue b/smart-app/src/pages/form/components/interest.vue new file mode 100644 index 00000000..32b2e70c --- /dev/null +++ b/smart-app/src/pages/form/components/interest.vue @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/smart-app/src/pages/form/components/radio-sex.vue b/smart-app/src/pages/form/components/radio-sex.vue new file mode 100644 index 00000000..913a950f --- /dev/null +++ b/smart-app/src/pages/form/components/radio-sex.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/smart-app/src/pages/form/form.vue b/smart-app/src/pages/form/form.vue new file mode 100644 index 00000000..f22d9f0e --- /dev/null +++ b/smart-app/src/pages/form/form.vue @@ -0,0 +1,199 @@ +