From bc91efe368c15e87b600b284c69aa2af1931e395 Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 12 Dec 2025 23:44:07 +0800 Subject: [PATCH] Add src directory for uni-app build --- src/App.vue | 37 ++++++++ src/main.js | 21 +++++ src/manifest.json | 60 +++++++++++++ src/pages.json | 220 ++++++++++++++++++++++++++++++++++++++++++++++ src/uni.scss | 80 +++++++++++++++++ 5 files changed, 418 insertions(+) create mode 100644 src/App.vue create mode 100644 src/main.js create mode 100644 src/manifest.json create mode 100644 src/pages.json create mode 100644 src/uni.scss diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..65d9e74 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..c993206 --- /dev/null +++ b/src/main.js @@ -0,0 +1,21 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..e3b1b81 --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,60 @@ +{ + "name": "martial-mini", + "appid": "", + "description": "武术赛事报名系统", + "versionName": "2.0", + "versionCode": "200", + "transformPx": false, + "app-plus": { + "usingComponents": true, + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + "modules": {}, + "distribute": { + "android": { + "permissions": [] + }, + "ios": {}, + "sdkConfigs": {} + } + }, + "quickapp": {}, + "mp-weixin": { + "appid": "", + "setting": { + "urlCheck": false, + "es6": true, + "postcss": true, + "minified": true + }, + "usingComponents": true + }, + "mp-alipay": { + "usingComponents": true + }, + "mp-baidu": { + "usingComponents": true + }, + "mp-toutiao": { + "usingComponents": true + }, + "h5": { + "title": "武术赛事报名系统", + "template": "index.html", + "router": { + "mode": "hash", + "base": "./" + }, + "optimization": { + "treeShaking": { + "enable": true + } + } + } +} diff --git a/src/pages.json b/src/pages.json new file mode 100644 index 0000000..2ef98ea --- /dev/null +++ b/src/pages.json @@ -0,0 +1,220 @@ +{ + "pages": [ + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "登录", + "navigationStyle": "custom" + } + }, + { + "path": "pages/register/register", + "style": { + "navigationBarTitleText": "注册", + "navigationStyle": "custom" + } + }, + { + "path": "pages/home/home", + "style": { + "navigationBarTitleText": "武术赛事通", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/profile/profile", + "style": { + "navigationBarTitleText": "个人中心", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/change-password/change-password", + "style": { + "navigationBarTitleText": "修改密码", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/common-info/common-info", + "style": { + "navigationBarTitleText": "常用信息", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/add-player/add-player", + "style": { + "navigationBarTitleText": "新增选手", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/edit-player/edit-player", + "style": { + "navigationBarTitleText": "编辑选手", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/add-contact/add-contact", + "style": { + "navigationBarTitleText": "新增联系人", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/my-registration/my-registration", + "style": { + "navigationBarTitleText": "我的报名", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-list/event-list", + "style": { + "navigationBarTitleText": "全部赛事列表", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-detail/event-detail", + "style": { + "navigationBarTitleText": "赛事详情", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/select-event/select-event", + "style": { + "navigationBarTitleText": "选择报名项目", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-register/event-register", + "style": { + "navigationBarTitleText": "赛事报名", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/register-type/register-type", + "style": { + "navigationBarTitleText": "选择报名", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-info/event-info", + "style": { + "navigationBarTitleText": "信息发布", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-info-detail/event-info-detail", + "style": { + "navigationBarTitleText": "信息详情", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-rules/event-rules", + "style": { + "navigationBarTitleText": "赛事规程", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-schedule/event-schedule", + "style": { + "navigationBarTitleText": "活动日程", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-players/event-players", + "style": { + "navigationBarTitleText": "参赛选手", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-live/event-live", + "style": { + "navigationBarTitleText": "比赛实况", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-lineup/event-lineup", + "style": { + "navigationBarTitleText": "出场顺序", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-score/event-score", + "style": { + "navigationBarTitleText": "成绩", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/event-medals/event-medals", + "style": { + "navigationBarTitleText": "奖牌榜", + "navigationBarBackgroundColor": "#C93639", + "navigationBarTextStyle": "white" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "武术赛事", + "navigationBarBackgroundColor": "#C93639", + "backgroundColor": "#F8F8F8" + }, + "tabBar": { + "color": "#999999", + "selectedColor": "#C93639", + "backgroundColor": "#ffffff", + "borderStyle": "black", + "list": [ + { + "pagePath": "pages/home/home", + "text": "首页", + "iconPath": "static/images/首页灰@3x.png", + "selectedIconPath": "static/images/首页亮@3x.png" + }, + { + "pagePath": "pages/profile/profile", + "text": "个人中心", + "iconPath": "static/images/个人中心灰@3x.png", + "selectedIconPath": "static/images/个人中心亮@3x.png" + } + ] + } +} diff --git a/src/uni.scss b/src/uni.scss new file mode 100644 index 0000000..9a2d32f --- /dev/null +++ b/src/uni.scss @@ -0,0 +1,80 @@ +/* 全局颜色变量 */ +$primary-color: #C93639; +$primary-red: #C93639; +$text-color: #333333; +$text-gray: #666666; +$text-light: #999999; +$border-color: #eeeeee; +$bg-gray: #f5f5f5; +$white: #ffffff; + +/* 常用尺寸 */ +$page-padding: 30rpx; +$border-radius: 16rpx; +$border-radius-lg: 24rpx; + +/* 公共样式 */ +.container { + min-height: 100vh; + background-color: $bg-gray; +} + +.page-padding { + padding: $page-padding; +} + +.card { + background-color: $white; + border-radius: $border-radius; + padding: 30rpx; + margin-bottom: 20rpx; +} + +.flex { + display: flex; +} + +.flex-center { + display: flex; + align-items: center; + justify-content: center; +} + +.flex-between { + display: flex; + align-items: center; + justify-content: space-between; +} + +.flex-column { + display: flex; + flex-direction: column; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} + +.primary-btn { + background-color: $primary-color; + color: $white; + border-radius: 12rpx; + font-size: 32rpx; + padding: 28rpx; + text-align: center; + font-weight: bold; +} + +.disabled-btn { + background-color: rgba(201, 54, 57, 0.5); + color: $white; + border-radius: 12rpx; + font-size: 32rpx; + padding: 28rpx; + text-align: center; + font-weight: bold; +}