From 4d77a1070a0a0258ce727a78d1b6b9cc462bc1da Mon Sep 17 00:00:00 2001
From: wangxiaowei <1121133807@qq.com>
Date: Thu, 14 Aug 2025 17:29:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 64 +++++++++---------
src/main.ts | 2 +-
src/pages/index/index.vue | 134 +++++++++++++++++++++++++++-----------
src/uni.scss | 3 +-
4 files changed, 132 insertions(+), 71 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 5756dfb..421cc34 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,38 +1,40 @@
diff --git a/src/main.ts b/src/main.ts
index 9562a55..26559da 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -14,7 +14,7 @@ export function createApp() {
app.use(routeInterceptor)
app.use(requestInterceptor)
app.use(VueQueryPlugin)
- app.provide('OSS', '/src/static/')
+ app.provide('OSS', 'https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/')
return {
app,
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index bbd085a..674da85 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -13,22 +13,57 @@
-
- 上海
+
+ 上海
-
-
+
+
-
-
- 123--{{ index }}
+
+
+
+
+
+
+
+ 更多茶艺师点击预约
+
+
+
+
+
+ 一键约
+
+
+
+
+
+
+ 预约茶室
+
@@ -37,50 +72,73 @@
import { ref, inject } from 'vue'
import { getNavBarHeight } from '@/utils/index'
- defineOptions({
- name: 'Home',
- })
-
- let keyword = ref('')
let navbarHeight = ref(0)
- let OSS = inject('OSS') // '@/static/'
+ let OSS = inject('OSS')
+ let swiperList = ref([
+ { id: 1, image: `${OSS}images/banner1.png` },
+ { id: 2, image: `${OSS}images/banner1.png` },
+ { id: 3, image: `${OSS}images/banner1.png` }
+ ])
+ console.log("🚀 ~ swiperList:", swiperList)
+ const current = ref(0)
onLoad(() => {
navbarHeight.value = getNavBarHeight()
})
+ const swiper = {
+ handleClick: (item: any) => {
+ // 处理点击事件
+ console.log('Clicked item:', item)
+ },
+
+ onChange: (e: any) => {
+ // 设置 current.value 为当前轮播索引
+ current.value = e.current
+ }
+ }
+
\ No newline at end of file
diff --git a/src/uni.scss b/src/uni.scss
index bc750e1..1b5f86f 100644
--- a/src/uni.scss
+++ b/src/uni.scss
@@ -76,5 +76,6 @@ $uni-font-size-subtitle: 18px;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;
+/* chazhi 自定义 */
$cz-page-background: #F6F7F9; // 页面背景色
-$OSS: '/src/static/';
+$OSS: 'https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/';