feat: scaffold merged miniapp shell
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
VITE_ICE_API_BASE_URL=https://venue.test.chatgqt.top
|
||||||
|
VITE_COMPREHENSIVE_API_BASE_URL=https://venue2.test.chatgqt.top
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VITE_ICE_API_BASE_URL=http://127.0.0.1:8000
|
||||||
|
VITE_COMPREHENSIVE_API_BASE_URL=http://127.0.0.1:8001
|
||||||
Generated
+14058
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"name": "merged-venue-miniapp",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "冰场馆与综合场馆合并版微信小程序端",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev:mp-weixin": "uni -p mp-weixin",
|
||||||
|
"build:mp-weixin": "uni build -p mp-weixin",
|
||||||
|
"dev:h5": "uni",
|
||||||
|
"build:h5": "uni build"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@dcloudio/uni-app": "3.0.0-alpha-5000120260211001",
|
||||||
|
"@dcloudio/uni-components": "3.0.0-alpha-5000120260211001",
|
||||||
|
"@dcloudio/uni-h5": "3.0.0-alpha-5000120260211001",
|
||||||
|
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-5000120260211001",
|
||||||
|
"dayjs": "^1.11.21",
|
||||||
|
"pinia": "^2.3.1",
|
||||||
|
"uview-plus": "^3.8.37",
|
||||||
|
"vue": "^3.4.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@dcloudio/uni-automator": "3.0.0-alpha-5000120260211001",
|
||||||
|
"@dcloudio/uni-cli-shared": "3.0.0-alpha-5000120260211001",
|
||||||
|
"@dcloudio/uni-stacktracey": "3.0.0-alpha-5000120260211001",
|
||||||
|
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-5000120260211001",
|
||||||
|
"sass": "^1.83.0",
|
||||||
|
"vite": "^5.2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
onLaunch() {
|
||||||
|
console.log('Merged Venue Miniapp Launch')
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
console.log('Merged Venue Miniapp Show')
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
console.log('Merged Venue Miniapp Hide')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background-color: $bg-color-soft;
|
||||||
|
color: $text-color-main;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 1.5;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
view,
|
||||||
|
scroll-view,
|
||||||
|
swiper,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
textarea,
|
||||||
|
label,
|
||||||
|
image {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
button::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: $spacing-md;
|
||||||
|
background-color: $bg-color-soft;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-bottom-safe {
|
||||||
|
padding-bottom: calc(128rpx + env(safe-area-inset-bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
@include minimal-card;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 88rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
padding: 0 14rpx;
|
||||||
|
border-radius: $border-radius-sm;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
|
||||||
|
&.primary {
|
||||||
|
color: $color-primary;
|
||||||
|
background: $color-primary-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.success {
|
||||||
|
color: $color-success;
|
||||||
|
background: $color-success-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.warning {
|
||||||
|
color: $color-warning;
|
||||||
|
background: $color-warning-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.danger {
|
||||||
|
color: $color-danger;
|
||||||
|
background: $color-danger-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.muted {
|
||||||
|
color: $text-color-muted;
|
||||||
|
background: $bg-color-hover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary-button {
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: $border-radius-base;
|
||||||
|
background: $text-color-main;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 800;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
&[disabled],
|
||||||
|
&.disabled {
|
||||||
|
background: $text-color-light;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ghost-button {
|
||||||
|
height: 72rpx;
|
||||||
|
border-radius: $border-radius-base;
|
||||||
|
border: 1rpx solid $border-color;
|
||||||
|
background: $bg-color-main;
|
||||||
|
color: $text-color-regular;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state,
|
||||||
|
.load-more-tip {
|
||||||
|
padding: $spacing-xl $spacing-md;
|
||||||
|
text-align: center;
|
||||||
|
color: $text-color-light;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-action-bar {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 20;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: $spacing-md;
|
||||||
|
padding: $spacing-sm $spacing-md calc($spacing-sm + env(safe-area-inset-bottom));
|
||||||
|
background: rgba(255, 255, 255, 0.96);
|
||||||
|
border-top: 1rpx solid $border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price-text {
|
||||||
|
color: $text-color-main;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { createSSRApp } from 'vue'
|
||||||
|
import App from './App.vue'
|
||||||
|
import * as Pinia from 'pinia'
|
||||||
|
import uviewPlus from 'uview-plus'
|
||||||
|
import 'uview-plus/index.scss'
|
||||||
|
|
||||||
|
export function createApp() {
|
||||||
|
const app = createSSRApp(App)
|
||||||
|
app.use(Pinia.createPinia())
|
||||||
|
app.use(uviewPlus)
|
||||||
|
return {
|
||||||
|
app,
|
||||||
|
Pinia
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "场馆服务",
|
||||||
|
"appid": "",
|
||||||
|
"description": "冰场馆与综合场馆合并版会员服务小程序",
|
||||||
|
"versionName": "0.1.0",
|
||||||
|
"versionCode": "100",
|
||||||
|
"transformPx": false,
|
||||||
|
"mp-weixin": {
|
||||||
|
"appid": "wx516b3e0d9940c788",
|
||||||
|
"setting": {
|
||||||
|
"urlCheck": false,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": true,
|
||||||
|
"minified": true
|
||||||
|
},
|
||||||
|
"usingComponents": true
|
||||||
|
},
|
||||||
|
"vueVersion": "3"
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
$bg-color-main: #FFFFFF;
|
||||||
|
$bg-color-soft: #F8FAFC;
|
||||||
|
$bg-color-hover: #F1F5F9;
|
||||||
|
$bg-color-panel: #EFF6FF;
|
||||||
|
|
||||||
|
$text-color-main: #0F172A;
|
||||||
|
$text-color-regular: #334155;
|
||||||
|
$text-color-muted: #64748B;
|
||||||
|
$text-color-light: #94A3B8;
|
||||||
|
|
||||||
|
$color-primary: #0EA5E9;
|
||||||
|
$color-primary-light: #E0F2FE;
|
||||||
|
$color-success: #10B981;
|
||||||
|
$color-success-light: #D1FAE5;
|
||||||
|
$color-warning: #F59E0B;
|
||||||
|
$color-warning-light: #FEF3C7;
|
||||||
|
$color-danger: #EF4444;
|
||||||
|
$color-danger-light: #FEE2E2;
|
||||||
|
|
||||||
|
$border-color: #E2E8F0;
|
||||||
|
$border-radius-sm: 6rpx;
|
||||||
|
$border-radius-base: 12rpx;
|
||||||
|
$border-radius-lg: 20rpx;
|
||||||
|
|
||||||
|
$spacing-xs: 8rpx;
|
||||||
|
$spacing-sm: 16rpx;
|
||||||
|
$spacing-md: 24rpx;
|
||||||
|
$spacing-lg: 32rpx;
|
||||||
|
$spacing-xl: 48rpx;
|
||||||
|
|
||||||
|
@mixin minimal-card {
|
||||||
|
background: $bg-color-main;
|
||||||
|
border: 1rpx solid $border-color;
|
||||||
|
border-radius: $border-radius-base;
|
||||||
|
padding: $spacing-md;
|
||||||
|
box-shadow: 0 2rpx 8rpx rgba(15, 23, 42, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin text-ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
@use "@/styles/variables.scss" as *;
|
||||||
|
@import "uview-plus/theme.scss";
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
import { defineConfig, loadEnv } from 'vite'
|
||||||
|
import uniPlugin from '@dcloudio/vite-plugin-uni'
|
||||||
|
|
||||||
|
const uni = typeof uniPlugin === 'function' ? uniPlugin : uniPlugin.default
|
||||||
|
|
||||||
|
export default defineConfig(({ mode }) => {
|
||||||
|
const env = loadEnv(mode, process.cwd(), '')
|
||||||
|
const iceApiBase = env.VITE_ICE_API_BASE_URL || 'http://127.0.0.1:8000'
|
||||||
|
const comprehensiveApiBase = env.VITE_COMPREHENSIVE_API_BASE_URL || 'http://127.0.0.1:8001'
|
||||||
|
|
||||||
|
return {
|
||||||
|
plugins: [uni()],
|
||||||
|
optimizeDeps: {
|
||||||
|
include: ['uview-plus'],
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
css: {
|
||||||
|
preprocessorOptions: {
|
||||||
|
scss: {
|
||||||
|
api: 'modern-compiler',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
proxy: {
|
||||||
|
'/ice-api': {
|
||||||
|
target: iceApiBase,
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
rewrite: (path) => path.replace(/^\/ice-api/, ''),
|
||||||
|
},
|
||||||
|
'/comprehensive-api': {
|
||||||
|
target: comprehensiveApiBase,
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
rewrite: (path) => path.replace(/^\/comprehensive-api/, ''),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user