Browse Source

feat: ✨ v0.0.1静态版本

zhangtao 1 week ago
parent
commit
8ae549d8f8

+ 1 - 0
eslint.config.mjs

@@ -6,6 +6,7 @@ export default uni(
     rules: {
       'no-console': 'off',
       'eslint-comments/no-unlimited-disable': 'off',
+      'vue/eqeqeq': 'off',
     },
   },
 )

+ 3 - 2
manifest.config.ts

@@ -60,13 +60,14 @@ export default defineManifestConfig({
       urlCheck: false,
     },
     usingComponents: true,
-    requiredPrivateInfos: ['getLocation', 'chooseLocation'],
+    requiredPrivateInfos: ['getLocation', 'chooseLocation', 'chooseAddress'],
     permission: {
       'scope.userLocation': {
         desc: '你的位置信息将用于小程序推荐附近的商家和活动',
       },
     },
-    // darkmode: false,`
+    embeddedAppIdList: ['wxbc64403830bb13c5', 'wx9894a01b9e92c368'],
+    // darkmode: false,
     // themeLocation: 'theme.json',
   },
   'mp-alipay': {

+ 2 - 1
src/App.vue

@@ -6,7 +6,8 @@ onLaunch(() => {})
 .page-wraper {
   min-height: calc(100vh - var(--window-top));
   box-sizing: border-box;
-  background: #f9f9f9;
+  background: #f6f6f6;
+  --them-color:#9ED605
 }
 
 .wot-theme-dark.page-wraper {

+ 4 - 0
src/auto-imports.d.ts

@@ -64,6 +64,7 @@ declare global {
   const mapWritableState: typeof import('pinia')['mapWritableState']
   const markRaw: typeof import('vue')['markRaw']
   const mountApis: typeof import('./api/createApis')['mountApis']
+  const navCommonMiniProgram: typeof import('./utils/index')['navCommonMiniProgram']
   const nextTick: typeof import('vue')['nextTick']
   const onActivated: typeof import('vue')['onActivated']
   const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites']
@@ -294,6 +295,7 @@ declare global {
   const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
   const useSupported: typeof import('@vueuse/core')['useSupported']
   const useSwipe: typeof import('@vueuse/core')['useSwipe']
+  const useSysStore: typeof import('./store/sys')['useSysStore']
   const useTabbar: typeof import('./composables/useTabbar')['useTabbar']
   const useTemplateRef: typeof import('vue')['useTemplateRef']
   const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
@@ -418,6 +420,7 @@ declare module 'vue' {
     readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
     readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
     readonly mountApis: UnwrapRef<typeof import('./api/createApis')['mountApis']>
+    readonly navCommonMiniProgram: UnwrapRef<typeof import('./utils/index')['navCommonMiniProgram']>
     readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
     readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
     readonly onAddToFavorites: UnwrapRef<typeof import('@dcloudio/uni-app')['onAddToFavorites']>
@@ -645,6 +648,7 @@ declare module 'vue' {
     readonly useStyleTag: UnwrapRef<typeof import('@vueuse/core')['useStyleTag']>
     readonly useSupported: UnwrapRef<typeof import('@vueuse/core')['useSupported']>
     readonly useSwipe: UnwrapRef<typeof import('@vueuse/core')['useSwipe']>
+    readonly useSysStore: UnwrapRef<typeof import('./store/sys')['useSysStore']>
     readonly useTabbar: UnwrapRef<typeof import('./composables/useTabbar')['useTabbar']>
     readonly useTemplateRefsList: UnwrapRef<typeof import('@vueuse/core')['useTemplateRefsList']>
     readonly useTextDirection: UnwrapRef<typeof import('@vueuse/core')['useTextDirection']>

+ 1 - 1
src/composables/types/theme.ts

@@ -37,7 +37,7 @@ export interface SystemThemeState {
  * 预定义的主题色选项
  */
 export const themeColorOptions: ThemeColorOption[] = [
-  { name: '默认蓝', value: 'blue', primary: '#4D7FFF' },
+  { name: '默认蓝', value: 'blue', primary: '#9ED605' },
   { name: '活力橙', value: 'orange', primary: '#FF7D00' },
   { name: '薄荷绿', value: 'green', primary: '#07C160' },
   { name: '樱花粉', value: 'pink', primary: '#FF69B4' },

+ 10 - 4
src/composables/useTabbar.ts

@@ -1,15 +1,21 @@
+import icon3 from '@/static/tab/cart1.png'
+import icon4 from '@/static/tab/cart2.png'
+import icon5 from '@/static/tab/my1.png'
+import icon6 from '@/static/tab/my2.png'
+
 export interface TabbarItem {
   name: string
   value: number | null
   active: boolean
   title: string
-  icon: string
+  icon2: string
+  icon1: string
 }
 
 const tabbarItems = ref<TabbarItem[]>([
-  { name: 'home', value: null, active: true, title: '首页', icon: 'home' },
-  { name: 'cart', value: null, active: false, title: '购物车', icon: 'cart' },
-  { name: 'my', value: null, active: false, title: '我的', icon: 'user' },
+  { name: 'home', value: null, active: true, title: '首页', icon1: '', icon2: '' },
+  { name: 'cart', value: null, active: false, title: '购物车', icon1: icon3, icon2: icon4 },
+  { name: 'my', value: null, active: false, title: '我的', icon1: icon5, icon2: icon6 },
 ])
 
 export function useTabbar() {

+ 8 - 0
src/config/index.ts

@@ -0,0 +1,8 @@
+/**
+ * 星闪豹appid
+ */
+export const ZSWLXSB_APPID = 'wxbc64403830bb13c5'
+
+export const ZSWLZSDD_APPID = 'wx9894a01b9e92c368'
+
+export const VITE_OSS_BASE_URL = 'https://zswl-shop.oss-cn-chengdu.aliyuncs.com/'

+ 46 - 10
src/layouts/tabbar.vue

@@ -1,7 +1,10 @@
 <script lang="ts" setup>
-const router = useRouter()
+import icon2 from '@/static/tab/index1.png'
+import icon1 from '@/static/tab/index2.png'
 
+const router = useRouter()
 const route = useRoute()
+const { ScrollDown } = storeToRefs(useSysStore())
 
 const { activeTabbar, getTabbarItemValue, setTabbarItemActive, tabbarList } = useTabbar()
 
@@ -20,6 +23,12 @@ onMounted(() => {
     }
   })
 })
+function handleClick() {
+  uni.pageScrollTo({
+    duration: 50,
+    scrollTop: 0,
+  })
+}
 </script>
 
 <script lang="ts">
@@ -34,13 +43,40 @@ export default {
 
 <template>
   <slot />
-  <wd-tabbar
-    :model-value="activeTabbar.name" bordered safe-area-inset-bottom placeholder fixed
-    @change="handleTabbarChange"
-  >
-    <wd-tabbar-item
-      v-for="(item, index) in tabbarList" :key="index" :name="item.name"
-      :value="getTabbarItemValue(item.name)" :title="item.title" :icon="item.icon"
-    />
-  </wd-tabbar>
+  <view class="page-tab">
+    <wd-tabbar
+      :model-value="activeTabbar.name" safe-area-inset-bottom placeholder fixed :bordered="false"
+      custom-class="custom-tab" @change="handleTabbarChange"
+    >
+      <wd-tabbar-item
+        v-for="(item, index) in tabbarList" :key="index" :name="item.name"
+        :value="getTabbarItemValue(item.name)" :title="index == 0 && item.active ? '' : item.title"
+      >
+        <template #icon="{ active }">
+          <template v-if="index == 0 && !active">
+            <image src="@/static/tab/index.png" class="h44rpx w44rpx" />
+          </template>
+          <template v-else-if="index == 0 && active">
+            <image v-if="ScrollDown" :src="icon1" class="h74rpx w74rpx" @click="handleClick" />
+            <image v-else :src="icon2" class="h74rpx w74rpx" />
+          </template>
+          <template v-else-if="index != 0">
+            <image v-if="active" :src="item.icon2" class="h44rpx w44rpx" />
+            <image v-else :src="item.icon1" class="h44rpx w44rpx" />
+          </template>
+        </template>
+      </wd-tabbar-item>
+    </wd-tabbar>
+  </view>
 </template>
+
+<style scoped lang="scss">
+.page-tab {
+  :deep() {
+    .custom-tab {
+      border-radius: 28rpx 28rpx 0 0;
+     box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0,0,0,0.09);
+    }
+  }
+}
+</style>

+ 7 - 2
src/manifest.json

@@ -52,13 +52,18 @@
     },
     "requiredPrivateInfos": [
       "getLocation",
-      "chooseLocation"
+      "chooseLocation",
+      "chooseAddress"
     ],
     "permission": {
       "scope.userLocation": {
         "desc": "你的位置信息将用于小程序推荐附近的商家和活动"
       }
-    }
+    },
+    "embeddedAppIdList": [
+      "wxbc64403830bb13c5",
+      "wx9894a01b9e92c368"
+    ]
   },
   "mp-alipay": {
     "usingComponents": true,

+ 3 - 1
src/pages.json

@@ -7,7 +7,9 @@
       "layout": "tabbar",
       "style": {
         "navigationBarTitleText": "首页",
-        "navigationStyle": "custom"
+        "navigationStyle": "custom",
+        "backgroundColor": "#9ED605",
+        "backgroundColorTop": "#9ED605"
       }
     },
     {

+ 35 - 2
src/pages/cart/index.vue

@@ -5,11 +5,44 @@ definePage({
   style: {
     navigationBarTitleText: '购物车',
   },
+
+})
+onMounted(() => {
+  setNavBack()
+})
+onShow(() => {
+  console.log('触发')
+  nextTick(() => {
+    setNavBack()
+  })
 })
+function setNavBack() {
+  uni.setNavigationBarColor({
+    backgroundColor: '#9ED605',
+    frontColor: '#ffffff',
+    fail: (e) => {
+      console.log('fail', e)
+    },
+    success: (e) => {
+      console.log('success', e)
+    },
+  })
+}
 </script>
 
 <template>
-  <view class="box-border py-3">
-    1234156
+  <view class="box-border w-full flex items-center justify-center">
+    <view class="mt220rpx flex flex-col items-center">
+      <image
+        src="@/static/my/cart.png"
+        class="h110rpx w110rpx"
+      />
+      <view class="mb20rpx mt20rpx text-24rpx">
+        你还没有添加商品哦~
+      </view>
+      <wd-button plain>
+        去逛逛
+      </wd-button>
+    </view>
   </view>
 </template>

+ 355 - 5
src/pages/index/index.vue

@@ -1,28 +1,378 @@
 <script setup lang="ts">
+import { VITE_OSS_BASE_URL, ZSWLXSB_APPID, ZSWLZSDD_APPID } from '@/config'
+
 definePage({
   name: 'home',
   layout: 'tabbar',
   style: {
     navigationBarTitleText: '首页',
     navigationStyle: 'custom',
+    backgroundColor: '#9ED605',
+    backgroundColorTop: '#9ED605',
   },
 })
+const { statusBarHeight } = uni.getSystemInfoSync()
+const { height } = uni.getMenuButtonBoundingClientRect()
 const addressStore = useAddressStore()
+const { ScrollDown } = storeToRefs(useSysStore())
+const { name } = storeToRefs(addressStore)
+const navList = ref([
+  { icon: `${VITE_OSS_BASE_URL}2025/11/4dabcf9b8d794d3c99aa6b49be34f205.png`, title: '星闪豹' },
+  { icon: `${VITE_OSS_BASE_URL}2025/11/40cb38e287234a83885d68f30c9c39bc.png`, title: '充电' },
+  { icon: `${VITE_OSS_BASE_URL}2025/11/9981d979739b4ae6b4eec941b7d2c9b0.png`, title: '电影演出' },
+  { icon: `${VITE_OSS_BASE_URL}2025/11/f2b15ec1048e4b5689fe1ba26f6058e1.png`, title: '视频权益' },
+  { icon: `${VITE_OSS_BASE_URL}2025/11/0e971577095c406a88c5ea10af419246.png`, title: '大牌点餐' },
+  { icon: `${VITE_OSS_BASE_URL}2025/11/95e2ea622dbd498a8a36ab74f00209f3.png`, title: '加油' },
+  { icon: `${VITE_OSS_BASE_URL}2025/11/f5178ca02e3e4ebb9072d9e129bb3fd4.png`, title: '酒店民宿' },
+  { icon: `${VITE_OSS_BASE_URL}2025/11/d1f4d36d6fcc442a841f4f4f4927df19.png`, title: '代驾' },
+])
 onMounted(() => {
   addressStore.getLocation()
 })
+onPageScroll((e) => {
+  if (e.scrollTop >= 80) {
+    ScrollDown.value = true
+  }
+  else {
+    ScrollDown.value = false
+  }
+})
+function handleClick(title: string) {
+  if (title === '星闪豹') {
+    navCommonMiniProgram(ZSWLXSB_APPID)
+  }
+  if (title === '充电') {
+    navCommonMiniProgram(ZSWLZSDD_APPID)
+  }
+}
 </script>
 
 <template>
-  <view class="box-border">
+  <view class="page-class box-border">
     <wd-navbar
-      title="" custom-style="background-color: transparent !important;" :bordered="false"
-      :z-index="99"
-      safe-area-inset-top placeholder fixed
+      title=""
+      :custom-style="`background-color:${ScrollDown ? 'var(--them-color)' : 'transparent !important'}`"
+      :bordered="false" :z-index="99" safe-area-inset-top fixed
     >
       <template #left>
-        <view>富力中心</view>
+        <image class="h48rpx w202rpx" src="@/static/my/logo.png" />
       </template>
     </wd-navbar>
+    <view class="header h320rpx px24rpx" :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + height + 12}px` }">
+      <view class="box-border flex items-center">
+        <view class="flex items-center" @click="addressStore.getMapAddress">
+          <image :src="`${VITE_OSS_BASE_URL}2025/11/9b914bd06e584af09c7e9055b9bfeaf9.png`" class="h33.8rpx min-w28.97rpx w28.97rpx" />
+          <view class="ml18rpx max-w-180rpx truncate text-32rpx">
+            {{ name }}
+          </view>
+        </view>
+        <view class="ml16rpx h60rpx w502rpx flex items-center justify-between rounded-40rpx bg-white pr6rpx">
+          <view class="flex items-center pb14rpx pl24rpx pt16rpx">
+            <wd-icon name="search" size="14" color="#ccc" />
+            <view class="ml12rpx text-24rpx text-gray">
+              霸王茶姬
+            </view>
+          </view>
+          <view
+            class="h50rpx w96rpx flex items-center justify-center rounded-26rpx bg-[var(--them-color)] text-24rpx text-white font-semibold"
+          >
+            搜索
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="px24rpx -mt260rpx">
+      <view class="grid grid-cols-4 mt24rpx rounded-16rpx bg-white py24rpx">
+        <view
+          v-for="item in navList" :key="item.icon" class="flex flex-col items-center justify-center"
+          @click="handleClick(item.title)"
+        >
+          <image :src="item.icon" class="h120rpx w120rpx" />
+          <view class="text-24rpx">
+            {{ item.title }}
+          </view>
+        </view>
+      </view>
+      <view class="mt20rpx">
+        <view class="w-full flex items-center justify-between">
+          <view class="flex-box-item box-border w344rpx rounded-16rpx p24rpx">
+            <image :src="`${VITE_OSS_BASE_URL}2025/11/118d1846025745a6be878c760b411dcf.png`" class="h32rpx w190rpx" />
+            <view class="flex items-center justify-between">
+              <view class="w136rpx">
+                <image :src="`${VITE_OSS_BASE_URL}2025/11/c74aa846a019446594d2546c013266dd.png`" class="h136rpx w136rpx" />
+                <view class="flex items-center justify-between rounded-16rpx bg-[rgba(255,74,57,0.1)] pr8rpx">
+                  <image :src="`${VITE_OSS_BASE_URL}2025/11/2a75591de19e4ea097558f70a64a26f0.png`" class="h32rpx w48rpx" />
+                  <view class="text-24rpx text-#FF4A39">
+                    ¥18.8
+                  </view>
+                </view>
+              </view>
+              <view class="w136rpx">
+                <image :src="`${VITE_OSS_BASE_URL}2025/11/e00384631c964ba8a106de7c77129ea2.png`" class="h136rpx w136rpx" />
+                <view class="flex items-center justify-between rounded-16rpx bg-[rgba(255,74,57,0.1)] pr8rpx">
+                  <image :src="`${VITE_OSS_BASE_URL}2025/11/2a75591de19e4ea097558f70a64a26f0.png`" class="h32rpx w48rpx" />
+                  <view class="text-24rpx text-#FF4A39">
+                    ¥12.5
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+          <view class="flex-box-item box-border w344rpx rounded-16rpx p24rpx">
+            <image :src="`${VITE_OSS_BASE_URL}2025/11/8b70aeb509d54409a04665304c8f5068.png`" class="h32rpx w110rpx" />
+            <view class="flex items-center justify-between">
+              <view class="w136rpx flex flex-col items-center">
+                <image :src="`${VITE_OSS_BASE_URL}2025/11/e1585c7e7da54d8498e379964cbe1b53.png`" class="h136rpx w136rpx" />
+                <view class="baoyou mt8rpx w100rpx flex items-center justify-center text-24rpx text-white">
+                  ¥9.9
+                </view>
+              </view>
+              <view class="w136rpx flex flex-col items-center">
+                <image :src="`${VITE_OSS_BASE_URL}2025/11/e7c53e3fd6b744eaa0cf41a4fd64b430.png`" class="h136rpx w136rpx" />
+                <view class="baoyou mt8rpx w100rpx flex items-center justify-center text-24rpx text-white">
+                  ¥9.9
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="mt20rpx">
+        <view class="flex items-center">
+          <scroll-view scroll-y type="custom">
+            <grid-view type="masonry" cross-axis-count="2" main-axis-gap="10" cross-axis-gap="10">
+              <view class="flex items-center justify-between">
+                <view class="rounded-16rpx bg-white px12rpx py20rpx">
+                  <view class="flex items-center rounded-8rpx bg-#FFEEEC text-24rpx font-semibold">
+                    <image :src="`${VITE_OSS_BASE_URL}2025/11/5e2df94dea5e4e4ca5cb1239321930f5.png`" class="h36rpx w36rpx" />
+                    <view class="px4rpx py2rpx text-#FF4A39">
+                      直播低价
+                    </view>
+                  </view>
+                  <view class="mt16rpx flex items-center justify-center">
+                    <image :src="`${VITE_OSS_BASE_URL}2025/11/358c2f46c0ea4e00b98615712ccc142a.png`" class="h116rpx w116rpx" />
+                  </view>
+                  <view class="mt8rpx text-center text-24rpx text-#FF4A39 font-semibold">
+                    ¥35.9
+                  </view>
+                </view>
+                <view class="rounded-16rpx bg-white px12rpx py20rpx">
+                  <view class="flex items-center rounded-8rpx bg-#FFEEEC text-24rpx font-semibold">
+                    <image :src="`${VITE_OSS_BASE_URL}2025/11/5e2df94dea5e4e4ca5cb1239321930f5.png`" class="h36rpx w36rpx" />
+                    <view class="px4rpx py2rpx text-#FF4A39">
+                      爆品好价
+                    </view>
+                  </view>
+                  <view class="mt16rpx flex items-center justify-center">
+                    <image :src="`${VITE_OSS_BASE_URL}2025/11/00fc4d8ffba6453685c05ffae06e2d78.png`" class="h116rpx w116rpx" />
+                  </view>
+                  <view class="mt8rpx text-center text-24rpx text-#FF4A39 font-semibold">
+                    ¥25.6
+                  </view>
+                </view>
+              </view>
+              <view class="overflow-hidden rounded-16rpx bg-white pb16rpx">
+                <view class="relative h344rpx">
+                  <image :src="`${VITE_OSS_BASE_URL}2025/11/9d42892888304abf85487deea0271f62.png`" class="h344rpx w344rpx" />
+                  <view class="absolute bottom-0 left-0 flex items-center text-22rpx">
+                    <view class="rounded-tl-8rpx bg-#02ECFD pl4rpx">
+                      充电
+                    </view>
+                    <view class="rounded-tr-8rpx bg-[rgba(0,0,0,0.5)] pl8rpx pr4rpx text-white">
+                      峰10:00-13:00
+                    </view>
+                  </view>
+                </view>
+                <view class="mt16rpx pl20rpx pr6rpx">
+                  <view class="flex items-center">
+                    <view class="rounded-8rpx bg-#FF4D3A px12rpx text-24rpx text-white">
+                      补贴
+                    </view>
+                    <view class="ml12rpx text-28rpx font-semibold">
+                      轩宇智慧停车场
+                    </view>
+                  </view>
+                  <view class="mt20rpx flex items-end text-#FF4D3A">
+                    <view class="text-24rpx">
+                      ¥
+                    </view>
+                    <view class="text-36rpx line-height-[36rpx]">
+                      1.395
+                    </view>
+                    <view class="text-24rpx">
+                      元/度
+                    </view>
+                  </view>
+                </view>
+              </view>
+              <view class="overflow-hidden rounded-16rpx bg-white pb16rpx">
+                <view class="relative h344rpx">
+                  <image :src="`${VITE_OSS_BASE_URL}2025/11/8177f50dc5f040188dbd40149831273a.png`" class="h344rpx w344rpx" />
+                  <view class="absolute bottom-0 left-0 flex items-center text-22rpx">
+                    <view class="rounded-tl-8rpx bg-#FCD22B pl4rpx pr8rpx">
+                      酒店民宿
+                    </view>
+                    <view class="rounded-tr-8rpx bg-[rgba(0,0,0,0.5)] pl8rpx pr4rpx text-white">
+                      距您5km
+                    </view>
+                  </view>
+                </view>
+                <view class="mt16rpx pl20rpx pr6rpx">
+                  <view class="flex">
+                    <view class="h32rpx flex items-center rounded-8rpx bg-#FF4D3A px12rpx text-24rpx text-white">
+                      <image :src="`${VITE_OSS_BASE_URL}2025/11/3437d2a44ffe4238b827c5472019d323.png`" class="mr8rpx h18rpx w20rpx" /> 直播中
+                    </view>
+                    <view class="ml8rpx text-28rpx font-semibold">
+                      长白山雪景温
+                    </view>
+                  </view>
+                  <view class="ml12rpx text-28rpx font-semibold">
+                    泉度假酒店
+                  </view>
+                  <view class="mt20rpx flex items-end text-#FF4D3A">
+                    <view class="text-24rpx">
+                      ¥
+                    </view>
+                    <view class="text-36rpx line-height-[36rpx]">
+                      398
+                    </view>
+                    <view class="text-24rpx">
+                      元
+                    </view>
+                  </view>
+                </view>
+              </view>
+              <view class="overflow-hidden rounded-16rpx bg-white pb16rpx">
+                <view class="relative h344rpx">
+                  <image :src="`${VITE_OSS_BASE_URL}2025/11/04433c8d7186465d929a03d89a652caa.png`" class="h344rpx w344rpx" />
+                  <view class="absolute bottom-0 left-0 flex items-center text-22rpx">
+                    <view class="rounded-tl-8rpx bg-#006CE8 pl4rpx pr8rpx text-white">
+                      星闪豹
+                    </view>
+                    <view class="rounded-tr-8rpx bg-[rgba(0,0,0,0.5)] pl8rpx pr4rpx text-white">
+                      48分钟
+                    </view>
+                  </view>
+                </view>
+                <view class="mt16rpx pl20rpx pr6rpx">
+                  <view class="flex items-center">
+                    <view class="text-28rpx font-semibold">
+                      海湾高盐特大白虾200g
+                    </view>
+                  </view>
+                  <view class="mt20rpx flex items-center">
+                    <view class="flex items-end text-#FF4D3A">
+                      <view class="text-24rpx">
+                        ¥
+                      </view>
+                      <view class="text-36rpx line-height-[36rpx]">
+                        29
+                      </view>
+                      <view class="text-24rpx">
+                        元
+                      </view>
+                      <view class="ml10rpx text-24rpx text-#aaa line-through">
+                        ¥39
+                      </view>
+                    </view>
+                  </view>
+                </view>
+              </view>
+              <view class="overflow-hidden rounded-16rpx bg-white pb16rpx">
+                <view class="relative h344rpx">
+                  <image :src="`${VITE_OSS_BASE_URL}2025/11/4e2d6f2096a643f18fb9d11dee764509.png`" class="h344rpx w344rpx" />
+                  <view class="absolute bottom-0 left-0 flex items-center text-22rpx">
+                    <view class="rounded-tl-8rpx bg-#FF4D3A pl4rpx pr8rpx text-white">
+                      电影演出
+                    </view>
+                    <view class="rounded-tr-8rpx bg-[rgba(0,0,0,0.5)] pl8rpx pr4rpx text-white">
+                      评分8.9 1w+人想看
+                    </view>
+                  </view>
+                </view>
+                <view class="mt16rpx pl20rpx pr6rpx">
+                  <view class="flex items-center">
+                    <view class="rounded-8rpx bg-#FF4D3A px12rpx text-24rpx text-white">
+                      折扣大促
+                    </view>
+                    <view class="ml12rpx text-28rpx font-semibold">
+                      疯狂动物城2
+                    </view>
+                  </view>
+                  <view class="mt20rpx flex items-center">
+                    <view class="flex items-end text-#FF4D3A">
+                      <view class="text-24rpx">
+                        ¥
+                      </view>
+                      <view class="text-36rpx line-height-[36rpx]">
+                        19.9
+                      </view>
+                      <view class="text-24rpx">
+                        元
+                      </view>
+                      <view class="ml8rpx text-24rpx text-#aaa">
+                        起
+                      </view>
+                    </view>
+                  </view>
+                  <view class="mt16rpx text-24rpx text-#aaa">
+                    电影演出上新榜No.1
+                  </view>
+                </view>
+              </view>
+              <view class="overflow-hidden rounded-16rpx bg-white pb16rpx">
+                <view class="relative h344rpx">
+                  <image :src="`${VITE_OSS_BASE_URL}2025/11/52624954555942dbbbe8dabf872c29c4.png`" class="h344rpx w344rpx" />
+                  <view class="absolute bottom-0 left-0 flex items-center text-22rpx">
+                    <view class="rounded-tl-8rpx bg-#02ECFD pl4rpx pr8rpx">
+                      大牌点餐
+                    </view>
+                    <view class="rounded-tr-8rpx bg-[rgba(0,0,0,0.5)] pl8rpx pr4rpx text-white">
+                      距您1.2km
+                    </view>
+                  </view>
+                </view>
+                <view class="mt16rpx pl20rpx pr6rpx">
+                  <view class="flex items-center">
+                    <view class="truncate rounded-8rpx bg-#FF4D3A px12rpx text-nowrap text-24rpx text-white">
+                      折扣大促
+                    </view>
+                    <view class="ml12rpx truncate text-nowrap text-28rpx font-semibold">
+                      大堡口福三件套
+                    </view>
+                  </view>
+                  <view class="mt20rpx flex items-end text-#FF4D3A">
+                    <view class="text-24rpx">
+                      ¥
+                    </view>
+                    <view class="text-36rpx line-height-[36rpx]">
+                      22
+                    </view>
+                    <view class="text-24rpx">
+                      元
+                    </view>
+                  </view>
+                </view>
+              </view>
+            </grid-view>
+          </scroll-view>
+        </view>
+      </view>
+    </view>
   </view>
 </template>
+
+<style scoped lang="scss">
+.header {
+  background: linear-gradient(180deg, var(--them-color) 0%, rgba(255, 255, 255, 0) 100%);
+}
+
+.flex-box-item {
+ background: linear-gradient( 180deg, #EBFFB4 0%, #FFFFFF 46%, #FFFFFF 100%);
+}
+
+.baoyou {
+  background: url('https://zswl-shop.oss-cn-chengdu.aliyuncs.com/2025/11/771b8a09633448d8b62c0004a8928054.png') no-repeat;
+  background-size: contain;
+}
+</style>

+ 1 - 1
src/pages/my/index.vue

@@ -101,7 +101,7 @@ const tabList = ref([
 
 <style lang="scss" scoped>
 .header {
-  background: linear-gradient(113deg, #B8D9FF 0%, #92C5FF 25%, #BEDDFF 51%, #8FC4FF 83%, #DFEEFF 100%);
+ background: linear-gradient( 113deg, #F7FFDC 0%, #E0FF8E 25%, #F2FFCE 51%, #E3FF98 83%, #F6FFD6 100%);
 }
 
 .page-class {

BIN
src/static/logo.png


+ 0 - 1
src/static/logo.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="512" height="512" viewBox="0 0 512 512"><defs><clipPath id="master_svg0_25_97"><rect x="0" y="0" width="512" height="512" rx="0"/></clipPath><clipPath id="master_svg1_25_11"><rect x="11" y="39" width="490" height="435" rx="0"/></clipPath></defs><g style="mix-blend-mode:passthrough" clip-path="url(#master_svg0_25_97)"><g clip-path="url(#master_svg1_25_11)"><g><path d="M51.4931,294.222767578125L205.214,437.551767578125C211.594,443.498767578125,220.016,446.812767578125,228.778,446.812767578125C237.54,446.812767578125,245.962,443.498767578125,252.342,437.551767578125L254.554,435.512767578125C238.306,411.638767578125,228.778,382.751767578125,228.778,351.655767578125C228.778,269.073767578125,295.812,202.124767578125,378.5,202.124767578125C402.575,202.124767578125,425.288,207.817767578125,445.45,217.842767578125C446.215,212.320767578125,446.556,206.797767578125,446.556,201.19076757812502L446.556,196.262767578125C446.556,136.874967578125,403.595,86.238267578125,344.983,76.467747578125C306.191,70.010717578125,266.719,82.669897578125,238.986,110.36716757812499L228.778,120.562467578125L218.569,110.36716757812499C190.837,82.669897578125,151.365,70.010717578125,112.573,76.467747578125C53.9601,86.238267578125,11,136.874967578125,11,196.262767578125L11,201.19076757812502C11,236.448767578125,25.6319,270.17876757812496,51.4931,294.222767578125ZM378.5,473.999767578125C446.13,473.999767578125,501,419.199767578125,501,351.655767578125C501,284.112767578125,446.13,229.312767578125,378.5,229.312767578125C310.87,229.312767578125,256,284.112767578125,256,351.655767578125C256,419.199767578125,310.87,473.999767578125,378.5,473.999767578125Z" fill="#2B9939" fill-opacity="1"/></g><g style="mix-blend-mode:passthrough"><path d="M322,415L441,415L441,293.5L419,293.5L419,393L344.5,393L344.5,293.5L322,293.5L322,415Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></svg>

BIN
src/static/my/1.png


BIN
src/static/my/2.png


BIN
src/static/my/3.png


BIN
src/static/my/6.png


BIN
src/static/my/9.png


BIN
src/static/my/cart.png


BIN
src/static/my/logo.png


BIN
src/static/tab/cart1.png


BIN
src/static/tab/cart2.png


BIN
src/static/tab/index.png


BIN
src/static/tab/index1.png


BIN
src/static/tab/index2.png


BIN
src/static/tab/my1.png


BIN
src/static/tab/my2.png


BIN
src/static/vite.png


+ 13 - 0
src/store/address.ts

@@ -11,6 +11,7 @@ interface addressState {
      */
     longitude: number | null
   }
+  name: string
 }
 export const useAddressStore = defineStore('address', {
   state: (): addressState => ({
@@ -18,6 +19,7 @@ export const useAddressStore = defineStore('address', {
       latitude: null,
       longitude: null,
     },
+    name: '富力中心',
   }),
   actions: {
   // 获取地理位置的函数
@@ -86,5 +88,16 @@ export const useAddressStore = defineStore('address', {
         },
       })
     },
+    getMapAddress() {
+      uni.chooseLocation({
+        success: (res) => {
+          console.log(res, '收获地址')
+          this.name = res.name
+        },
+        fail: (e) => {
+          console.log('获取地址失败', e)
+        },
+      })
+    },
   },
 })

+ 12 - 0
src/store/sys.ts

@@ -0,0 +1,12 @@
+import { defineStore } from 'pinia'
+
+interface SysState {
+  ScrollDown: boolean
+}
+export const useSysStore = defineStore('system', {
+  state: (): SysState => ({
+    ScrollDown: false,
+  }),
+  actions: {
+  },
+})

+ 7 - 5
src/theme.json

@@ -1,15 +1,16 @@
 {
   "light": {
-    "bgColor": "#F8F8F8",
-    "bgColorBottom": "#F8F8F8",
-    "bgColorTop": "#F8F8F8",
+    "bgColor": "#f6f6f6",
+    "bgColorBottom": "#f6f6f6",
+    "bgColorTop": "#f6f6f6",
     "bgTxtStyle": "dark",
     "navBgColor": "#FFF",
     "navTxtStyle": "black",
     "tabBgColor": "#ffffff",
     "tabBorderStyle": "black",
     "tabColor": "#bfbfbf",
-    "tabSelectedColor": "#0165FF"
+    "tabSelectedColor": "#0165FF",
+    "themColor": "#FFD300"
   },
   "dark": {
     "bgColor": "#000",
@@ -21,6 +22,7 @@
     "tabBgColor": "#1a1a1a",
     "tabBorderStyle": "white",
     "tabColor": "#bfbfbf",
-    "tabSelectedColor": "#0165FF"
+    "tabSelectedColor": "#0165FF",
+    "themColor": "#FFD300"
   }
 }

+ 11 - 0
src/utils/index.ts

@@ -7,3 +7,14 @@ export function getCurrentPath() {
   const currentPage = pages[pages.length - 1]
   return currentPage.route || ''
 }
+
+/**
+ * 统一跳转小程序方法
+ * @param appid
+ * @param path
+ */
+export function navCommonMiniProgram(appid: string) {
+  uni.openEmbeddedMiniProgram({
+    appId: appid,
+  })
+}