diff --git a/.env b/.env new file mode 100644 index 0000000..4919d0e --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +VITE_API_URL=http://127.0.0.1:4523 +VITE_AES_KEY=4e2c3d4e5f6a7b8c9d0e1f2g3h4i5j6k7l8m9n0o1p2q3r4s5t6u7v8w9x0y1z2 diff --git a/package.json b/package.json index c23c1a3..16644da 100644 --- a/package.json +++ b/package.json @@ -56,9 +56,11 @@ "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4050420250306001", "@tailwindcss/vite": "^4.0.15", "@uni-helper/vite-plugin-uni-tailwind": "^0.15.2", + "crypto-js": "^4.2.0", "postcss": "^8.5.3", "sass-embedded": "^1.86.0", "tailwindcss": "^4.0.15", + "thorui-uni": "^3.0.0", "vue": "^3.4.21", "vue-i18n": "^9.1.9" }, @@ -68,6 +70,7 @@ "@dcloudio/uni-cli-shared": "3.0.0-alpha-4050420250306001", "@dcloudio/uni-stacktracey": "3.0.0-alpha-4050420250306001", "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4050420250306001", + "@types/crypto-js": "^4.2.2", "@vue/runtime-core": "^3.4.21", "vite": "6.2.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83072d2..4579524 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -62,6 +62,9 @@ importers: '@uni-helper/vite-plugin-uni-tailwind': specifier: ^0.15.2 version: 0.15.2(rollup@4.37.0)(tailwindcss@4.0.15)(vite@6.2.2(@types/node@22.13.11)(jiti@2.4.2)(lightningcss@1.29.2)(sass-embedded@1.86.0)(terser@5.39.0)) + crypto-js: + specifier: ^4.2.0 + version: 4.2.0 postcss: specifier: ^8.5.3 version: 8.5.3 @@ -71,6 +74,9 @@ importers: tailwindcss: specifier: ^4.0.15 version: 4.0.15 + thorui-uni: + specifier: ^3.0.0 + version: 3.0.0 vue: specifier: ^3.4.21 version: 3.5.13 @@ -93,6 +99,9 @@ importers: '@dcloudio/vite-plugin-uni': specifier: 3.0.0-alpha-4050420250306001 version: 3.0.0-alpha-4050420250306001(postcss@8.5.3)(rollup@4.37.0)(vite@6.2.2(@types/node@22.13.11)(jiti@2.4.2)(lightningcss@1.29.2)(sass-embedded@1.86.0)(terser@5.39.0))(vue@3.5.13) + '@types/crypto-js': + specifier: ^4.2.2 + version: 4.2.2 '@vue/runtime-core': specifier: ^3.4.21 version: 3.5.13 @@ -1621,6 +1630,9 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/crypto-js@4.2.2': + resolution: {integrity: sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -2067,6 +2079,9 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} + crypto-js@4.2.0: + resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + css-font-size-keywords@1.0.0: resolution: {integrity: sha512-Q+svMDbMlelgCfH/RVDKtTDaf5021O486ZThQPIpahnIjUkMUslC+WuOQSWTgGSrNCH08Y7tYNEmmy0hkfMI8Q==} @@ -3650,6 +3665,9 @@ packages: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} + thorui-uni@3.0.0: + resolution: {integrity: sha512-ltxXobSu0RmgD4CdWFdsq6siSah0gbpvCVfH1DwhEO4KSgsG9nDpQWX1X4HAy5Upr8qw3mJfpLR42teZmc9XRQ==} + throat@6.0.2: resolution: {integrity: sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==} @@ -6160,6 +6178,8 @@ snapshots: dependencies: '@babel/types': 7.26.10 + '@types/crypto-js@4.2.2': {} + '@types/estree@1.0.6': {} '@types/graceful-fs@4.1.9': @@ -6691,6 +6711,8 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + crypto-js@4.2.0: {} + css-font-size-keywords@1.0.0: {} css-font-stretch-keywords@1.0.1: {} @@ -8442,6 +8464,8 @@ snapshots: glob: 7.2.3 minimatch: 3.1.2 + thorui-uni@3.0.0: {} + throat@6.0.2: {} timm@1.7.1: {} diff --git a/src/api/index.js b/src/api/index.js index e69de29..f6dd23c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -0,0 +1,7 @@ +import system from "./system/index.js"; + +const Api = { + system: {...system}, +} + +export default Api; diff --git a/src/api/system/index.js b/src/api/system/index.js new file mode 100644 index 0000000..fce3f4d --- /dev/null +++ b/src/api/system/index.js @@ -0,0 +1,13 @@ +import request from "../../utils/request.js"; +import MethodsENUM from "../../enum/MethodsENUM.js"; + +const system = { + getData: async () => { + return request({ + method: MethodsENUM.POST, + url: "/m1/5995958-5684445-default/getList", + }); + } +} + +export default system; diff --git a/src/components/XInput.vue b/src/components/XInput.vue new file mode 100644 index 0000000..90320c9 --- /dev/null +++ b/src/components/XInput.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/components/XLink.vue b/src/components/XLink.vue new file mode 100644 index 0000000..a392a69 --- /dev/null +++ b/src/components/XLink.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/components/XNav.vue b/src/components/XNav.vue new file mode 100644 index 0000000..7bfcced --- /dev/null +++ b/src/components/XNav.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/src/enum/MethodsENUM.js b/src/enum/MethodsENUM.js new file mode 100644 index 0000000..0905472 --- /dev/null +++ b/src/enum/MethodsENUM.js @@ -0,0 +1,8 @@ +const MethodsENUM = { + GET: "GET", + POST: "POST", + PUT: "PUT", + DELETE: "DELETE", +} + +export default MethodsENUM; diff --git a/src/main.js b/src/main.js index 843d89c..c3c87c3 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,12 @@ import { } from "vue"; import App from "./App.vue"; import './scss/index.css'; +import './scss/index.scss'; +import './scss/global.scss'; +import './scss/uni.scss'; +import propsConfig from "./scss/thorui.config.js"; + +uni.$tui = propsConfig; export function createApp() { const app = createSSRApp(App); diff --git a/src/manifest.json b/src/manifest.json index 309b9ec..8f82d0f 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,28 +1,28 @@ { - "name" : "", - "appid" : "", - "description" : "", - "versionName" : "1.0.0", - "versionCode" : "100", - "transformPx" : false, + "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 + "app-plus": { + "usingComponents": true, + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 }, /* 模块配置 */ - "modules" : {}, + "modules": {}, /* 应用发布信息 */ - "distribute" : { + "distribute": { /* android打包配置 */ - "android" : { - "permissions" : [ + "android": { + "permissions": [ "", "", "", @@ -41,32 +41,34 @@ ] }, /* ios打包配置 */ - "ios" : {}, + "ios": {}, /* SDK配置 */ - "sdkConfigs" : {} + "sdkConfigs": {} } }, /* 快应用特有相关 */ - "quickapp" : {}, + "quickapp": {}, /* 小程序特有相关 */ - "mp-weixin" : { - "appid" : "", - "setting" : { - "urlCheck" : false + "mp-weixin": { + "appid": "", + "setting": { + "urlCheck": false }, - "usingComponents" : true + "usingComponents": true }, - "mp-alipay" : { - "usingComponents" : true + "h5": { }, - "mp-baidu" : { - "usingComponents" : true + "mp-alipay": { + "usingComponents": true }, - "mp-toutiao" : { - "usingComponents" : true + "mp-baidu": { + "usingComponents": true }, - "uniStatistics": { + "mp-toutiao": { + "usingComponents": true + }, + "uniStatistics": { "enable": false }, - "vueVersion" : "3" + "vueVersion": "3" } diff --git a/src/pages.json b/src/pages.json index bf32f65..cb6dc5c 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,16 +1,86 @@ { - "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "uni-app" - } - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" - } -} + "pages": [ + // 其他页面 + { + "path": "pages/login/index", + "style": { + "navigationBarTitleText": "登陆", + "navigationStyle": "custom" + } + }, + //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/home/index", + "style": { + "navigationBarTitleText": "首页", + "navigationStyle": "custom" + } + }, + { + "path": "pages/myTask/index", + "style": { + "navigationBarTitleText": "我的任务", + "navigationStyle": "custom" + } + }, + { + "path": "pages/messageCenter/index", + "style": { + "navigationBarTitleText": "消息", + "navigationStyle": "custom" + } + }, + { + "path": "pages/user/index", + "style": { + "navigationBarTitleText": "我的", + "navigationStyle": "custom" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "dynamicRpx": true + }, + "easycom": { + "autoscan": true, + "custom": { + "tui-(.*)": "thorui-uni/lib/thorui/tui-$1/tui-$1.vue" + } + }, + "tabBar": { + "color": "#C9CDD4", + "selectedColor": "#2D5CF6", + "backgroundColor": "#FFFFFF", + "borderStyle": "black", + "list": [ + { + "pagePath": "pages/home/index", + "text": "首页", + "iconPath": "./static/icons/home.png", + "selectedIconPath": "./static/icons/homes.png" + }, + { + "pagePath": "pages/myTask/index", + "text": "我的任务", + "iconPath": "./static/icons/task.png", + "selectedIconPath": "./static/icons/tasks.png" + }, + { + "pagePath": "pages/messageCenter/index", + "text": "消息", + "iconPath": "./static/icons/message.png", + "selectedIconPath": "./static/icons/messages.png" + }, + { + "pagePath": "pages/user/index", + "text": "我的", + "iconPath": "./static/icons/user.png", + "selectedIconPath": "./static/icons/users.png" + } + ] + } +} diff --git a/src/pages/InviteFriends/index.vue b/src/pages/InviteFriends/index.vue new file mode 100644 index 0000000..de97206 --- /dev/null +++ b/src/pages/InviteFriends/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/accountManagement/index.vue b/src/pages/accountManagement/index.vue new file mode 100644 index 0000000..4eed695 --- /dev/null +++ b/src/pages/accountManagement/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/addAccount/index.vue b/src/pages/addAccount/index.vue new file mode 100644 index 0000000..3af4618 --- /dev/null +++ b/src/pages/addAccount/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/addWallet/index.vue b/src/pages/addWallet/index.vue new file mode 100644 index 0000000..f0687b4 --- /dev/null +++ b/src/pages/addWallet/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/beginnerTutorial/index.vue b/src/pages/beginnerTutorial/index.vue new file mode 100644 index 0000000..05e94e5 --- /dev/null +++ b/src/pages/beginnerTutorial/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/changeLog/index.vue b/src/pages/changeLog/index.vue new file mode 100644 index 0000000..e1885ea --- /dev/null +++ b/src/pages/changeLog/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/forgotPassword/index.vue b/src/pages/forgotPassword/index.vue new file mode 100644 index 0000000..c8a229e --- /dev/null +++ b/src/pages/forgotPassword/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue new file mode 100644 index 0000000..d4acb84 --- /dev/null +++ b/src/pages/home/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/incomeLog/index.vue b/src/pages/incomeLog/index.vue new file mode 100644 index 0000000..321c417 --- /dev/null +++ b/src/pages/incomeLog/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue deleted file mode 100644 index 93926cc..0000000 --- a/src/pages/index/index.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/src/pages/login/AccountLogin.vue b/src/pages/login/AccountLogin.vue new file mode 100644 index 0000000..0495e66 --- /dev/null +++ b/src/pages/login/AccountLogin.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/pages/login/BulletChat.vue b/src/pages/login/BulletChat.vue new file mode 100644 index 0000000..02acf48 --- /dev/null +++ b/src/pages/login/BulletChat.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/pages/login/PhoneLogin.vue b/src/pages/login/PhoneLogin.vue new file mode 100644 index 0000000..817c906 --- /dev/null +++ b/src/pages/login/PhoneLogin.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue new file mode 100644 index 0000000..a59487d --- /dev/null +++ b/src/pages/login/index.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/pages/messageCenter/index.vue b/src/pages/messageCenter/index.vue new file mode 100644 index 0000000..d9ff771 --- /dev/null +++ b/src/pages/messageCenter/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/messagePush/index.vue b/src/pages/messagePush/index.vue new file mode 100644 index 0000000..7bb84c4 --- /dev/null +++ b/src/pages/messagePush/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/myTask/index.vue b/src/pages/myTask/index.vue new file mode 100644 index 0000000..c6804e5 --- /dev/null +++ b/src/pages/myTask/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/register/index.vue b/src/pages/register/index.vue new file mode 100644 index 0000000..5f6d26a --- /dev/null +++ b/src/pages/register/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/single/index.vue b/src/pages/single/index.vue new file mode 100644 index 0000000..ce9cef3 --- /dev/null +++ b/src/pages/single/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/taskDetails/index.vue b/src/pages/taskDetails/index.vue new file mode 100644 index 0000000..de97206 --- /dev/null +++ b/src/pages/taskDetails/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue new file mode 100644 index 0000000..1046a50 --- /dev/null +++ b/src/pages/user/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/userInfo/index.vue b/src/pages/userInfo/index.vue new file mode 100644 index 0000000..f2157ff --- /dev/null +++ b/src/pages/userInfo/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/wallet/index.vue b/src/pages/wallet/index.vue new file mode 100644 index 0000000..0ad2bc1 --- /dev/null +++ b/src/pages/wallet/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/walletLog/index.vue b/src/pages/walletLog/index.vue new file mode 100644 index 0000000..e1885ea --- /dev/null +++ b/src/pages/walletLog/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/pages/withdrawalLog/index.vue b/src/pages/withdrawalLog/index.vue new file mode 100644 index 0000000..375cb4c --- /dev/null +++ b/src/pages/withdrawalLog/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/scss/global.scss b/src/scss/global.scss new file mode 100644 index 0000000..40cfff6 --- /dev/null +++ b/src/scss/global.scss @@ -0,0 +1,4 @@ +.test { + border: 1px solid red; + @apply box-border; +} diff --git a/src/scss/index.scss b/src/scss/index.scss new file mode 100644 index 0000000..d7d925c --- /dev/null +++ b/src/scss/index.scss @@ -0,0 +1,3 @@ +Page { + --primary-color: #2D5CF6; +} diff --git a/src/scss/thorui.config.js b/src/scss/thorui.config.js new file mode 100644 index 0000000..c480db3 --- /dev/null +++ b/src/scss/thorui.config.js @@ -0,0 +1,131 @@ +/* + 基础组件props属性全局配置文件。优先级:全局配置文件props < 单独设置组件props + 温馨提示:未设置则使用组件内默认值,避免出错,请勿删减以下配置,切勿修改key,仅可修改key对应值。 + 组件属性介绍请查看文档 +*/ + +//组件内主色配置 +const color = { + primary: '#2D5CF6', + success: '#07c160', + warning: '#ff7900', + danger: '#EB0909', + pink: '#f74d54', + blue: '#2D5CF6', + link: '#586c94' +} + +const propsConfig = { + //组件内主色配置 + color, + //组件名称,字体图标组件 tui-icon + tuiIcon: { + //组件属性值 + size: 32, + unit: 'px', + color: '#999' + }, + //按钮组件 tui-button + tuiButton: { + height: '96rpx', + size: 32, + }, + //列表项组件 tui-list-cell + tuiListCell: { + arrowColor: '#c0c0c0', + lineColor: '#eaeef1', + lineLeft: 30, + padding: '26rpx 30rpx', + color: '#333', + size: 28, + }, + //按钮组件 tui-form-button + tuiFormButton: { + background: color.primary, + color: '#fff', + height: '96rpx', + size: 32, + radius: '6rpx', + }, + //文本组件 tui-text + tuiText: { + size: 32, + unit: 'rpx', + color: '' + }, + //输入框组件 tui-input + tuiInput: { + requiredColor: color.danger, + labelSize: 32, + labelColor: '#333', + size: 32, + color: '#333', + padding: '26rpx 30rpx', + backgroundColor: '#FFFFFF', + radius: 0 + }, + //表单项组件 tui-form-item + tuiFormItem: { + padding: '28rpx 30rpx', + labelSize: 32, + labelColor: '#333', + labelFontWeight: 400, + asteriskColor: color.danger, + background: '#fff', + arrowColor: '#c0c0c0', + borderColor: '#eaeef1', + radius: '0rpx', + position: 2 + }, + //表单校验组件 tui-form + tuiForm: { + tipBackgroundColor: color.pink, + duration: 2000 + }, + //全局方法,调用 uni.$tui.toast + toast(text, duration, success) { + uni.showToast({ + // #ifndef MP-ALIPAY + duration: duration || 2000, + // #endif + title: text || "出错啦~", + icon: success ? 'success' : 'none' + }) + }, + //全局方法,调用 uni.$tui.modal + modal(title, content, showCancel, callback, confirmColor, confirmText) { + uni.showModal({ + title: title || '提示', + content: content, + showCancel: showCancel, + cancelColor: "#555", + confirmColor: confirmColor || color.primary, + confirmText: confirmText || "确定", + success(res) { + if (res.confirm) { + callback && callback(true) + } else { + callback && callback(false) + } + } + }) + }, + //跳转页面,调用:uni.$tui.href + href(url, isMain) { + if (isMain) { + uni.switchTab({ + url: url + }) + } else { + uni.navigateTo({ + url: url + }); + } + }, + //全局方法,rpx转px:调用 uni.$tui.rpx2px + rpx2px(value) { + return uni.upx2px(value) + } +} + +export default propsConfig diff --git a/src/scss/uni.scss b/src/scss/uni.scss new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/scss/uni.scss @@ -0,0 +1 @@ + diff --git a/src/static/icons/back.png b/src/static/icons/back.png new file mode 100644 index 0000000..6aeab16 Binary files /dev/null and b/src/static/icons/back.png differ diff --git a/src/static/icons/bg.png b/src/static/icons/bg.png new file mode 100644 index 0000000..feacdb0 Binary files /dev/null and b/src/static/icons/bg.png differ diff --git a/src/static/icons/hi.png b/src/static/icons/hi.png new file mode 100644 index 0000000..37c5d8f Binary files /dev/null and b/src/static/icons/hi.png differ diff --git a/src/static/icons/home.png b/src/static/icons/home.png new file mode 100644 index 0000000..0b076d5 Binary files /dev/null and b/src/static/icons/home.png differ diff --git a/src/static/icons/homes.png b/src/static/icons/homes.png new file mode 100644 index 0000000..56ce17b Binary files /dev/null and b/src/static/icons/homes.png differ diff --git a/src/static/icons/message.png b/src/static/icons/message.png new file mode 100644 index 0000000..90aa97d Binary files /dev/null and b/src/static/icons/message.png differ diff --git a/src/static/icons/messages.png b/src/static/icons/messages.png new file mode 100644 index 0000000..5285a50 Binary files /dev/null and b/src/static/icons/messages.png differ diff --git a/src/static/icons/task.png b/src/static/icons/task.png new file mode 100644 index 0000000..c3f86b2 Binary files /dev/null and b/src/static/icons/task.png differ diff --git a/src/static/icons/tasks.png b/src/static/icons/tasks.png new file mode 100644 index 0000000..39e7304 Binary files /dev/null and b/src/static/icons/tasks.png differ diff --git a/src/static/icons/user.png b/src/static/icons/user.png new file mode 100644 index 0000000..810041d Binary files /dev/null and b/src/static/icons/user.png differ diff --git a/src/static/icons/users.png b/src/static/icons/users.png new file mode 100644 index 0000000..5615d4b Binary files /dev/null and b/src/static/icons/users.png differ diff --git a/src/static/icons/去注册.png b/src/static/icons/去注册.png new file mode 100644 index 0000000..6b77d13 Binary files /dev/null and b/src/static/icons/去注册.png differ diff --git a/src/static/icons/弹幕1.png b/src/static/icons/弹幕1.png new file mode 100755 index 0000000..b1c727e Binary files /dev/null and b/src/static/icons/弹幕1.png differ diff --git a/src/static/icons/弹幕2.png b/src/static/icons/弹幕2.png new file mode 100755 index 0000000..8960e3e Binary files /dev/null and b/src/static/icons/弹幕2.png differ diff --git a/src/static/icons/弹幕3.png b/src/static/icons/弹幕3.png new file mode 100755 index 0000000..a0ecc3f Binary files /dev/null and b/src/static/icons/弹幕3.png differ diff --git a/src/static/icons/弹幕4.png b/src/static/icons/弹幕4.png new file mode 100755 index 0000000..e10869e Binary files /dev/null and b/src/static/icons/弹幕4.png differ diff --git a/src/static/icons/弹幕5.png b/src/static/icons/弹幕5.png new file mode 100755 index 0000000..957bd82 Binary files /dev/null and b/src/static/icons/弹幕5.png differ diff --git a/src/static/icons/弹幕6.png b/src/static/icons/弹幕6.png new file mode 100755 index 0000000..99377be Binary files /dev/null and b/src/static/icons/弹幕6.png differ diff --git a/src/static/icons/弹幕7.png b/src/static/icons/弹幕7.png new file mode 100755 index 0000000..c17d42d Binary files /dev/null and b/src/static/icons/弹幕7.png differ diff --git a/src/static/icons/弹幕8.png b/src/static/icons/弹幕8.png new file mode 100755 index 0000000..d2d6cad Binary files /dev/null and b/src/static/icons/弹幕8.png differ diff --git a/src/static/icons/弹幕9.png b/src/static/icons/弹幕9.png new file mode 100755 index 0000000..197fb4c Binary files /dev/null and b/src/static/icons/弹幕9.png differ diff --git a/src/utils/AESCrypto.js b/src/utils/AESCrypto.js new file mode 100644 index 0000000..b8f0a0d --- /dev/null +++ b/src/utils/AESCrypto.js @@ -0,0 +1,30 @@ +import AES from 'crypto-js/aes.js'; +import utf8 from 'crypto-js/enc-utf8.js'; + +class AESCrypto { + /** + * 密钥 + * @type {string} + */ + static #AES_KEY = import.meta.env.VITE_AES_KEY; + + /** + * AES加密 + * @param context {string} 加密内容 + */ + static encrypt = (context) => { + return AES.encrypt(context, this.#AES_KEY).toString(); + } + + /** + * AES解密 + * @param context {string} + * @return {string} + */ + static decrypt = (context) => { + const bytes = AES.decrypt(context, this.#AES_KEY); + return bytes.toString(utf8); + } +} + +export default AESCrypto; diff --git a/src/utils/request.js b/src/utils/request.js new file mode 100644 index 0000000..c05f4bc --- /dev/null +++ b/src/utils/request.js @@ -0,0 +1,24 @@ +import {showToast} from "./uils.js"; + +const request = (options) => { + return new Promise((resolve, reject) => { + const {url, method} = options; + + uni.request({ + method: method, + url: `${import.meta.env.VITE_API_URL}${url}`, + success: ({data}) => { + if (data.code !== 0) { + showToast(data.msg); + reject(data.msg); + } + resolve(data); + }, + fail: (err) => { + reject(err); + } + }); + }); +} + +export default request; diff --git a/src/utils/uils.js b/src/utils/uils.js new file mode 100644 index 0000000..0433cb9 --- /dev/null +++ b/src/utils/uils.js @@ -0,0 +1,15 @@ +export const showToast = (options) => { + if (typeof options === 'string') { + uni.showToast({ + title: options, + icon: 'none', + }).then(); + } else { + uni.showToast(options).then(); + } +} + +export const isWXWeb = () => { + const userAgent = navigator.userAgent; + return userAgent.includes('MicroMessenger'); +} diff --git a/tailwind.config.js b/tailwind.config.js index c6e2d3a..ca78ca2 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,7 +4,11 @@ module.exports = { "./src/**/*.{vue,js,ts,jsx,tsx}", // 根据你的项目结构调整路径 ], theme: { - extend: {}, + extend: { + screens: { + '375': '375px', // 自定义屏幕大小 + }, + }, }, plugins: [], };