feat: 更新项目名称为'jgdl'并优化首页样式
- 将项目名称从'myApp'改为'jgdl',并更新相关配置文件 - 优化首页UI样式,包括背景色、按钮样式和卡片布局 - 调整收藏按钮样式和价格显示大小 - 移除部分冗余代码和注释
Showing
6 changed files
with
30 additions
and
30 deletions
| ... | @@ -11,7 +11,7 @@ const { UnifiedWebpackPluginV5 } = require('weapp-tailwindcss/webpack') | ... | @@ -11,7 +11,7 @@ const { UnifiedWebpackPluginV5 } = require('weapp-tailwindcss/webpack') |
| 11 | // https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数 | 11 | // https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数 |
| 12 | export default defineConfig(async (merge) => { | 12 | export default defineConfig(async (merge) => { |
| 13 | const baseConfig = { | 13 | const baseConfig = { |
| 14 | - projectName: 'myApp', | 14 | + projectName: 'jgdl', |
| 15 | date: '2025-6-28', | 15 | date: '2025-6-28', |
| 16 | designWidth (input) { | 16 | designWidth (input) { |
| 17 | // 配置 NutUI 375 尺寸 | 17 | // 配置 NutUI 375 尺寸 | ... | ... |
| 1 | { | 1 | { |
| 2 | - "name": "myApp", | 2 | + "name": "jgdl", |
| 3 | "version": "1.0.0", | 3 | "version": "1.0.0", |
| 4 | "private": true, | 4 | "private": true, |
| 5 | - "description": "myApp", | 5 | + "description": "捡个电驴", |
| 6 | "templateInfo": { | 6 | "templateInfo": { |
| 7 | "name": "vue3-NutUI", | 7 | "name": "vue3-NutUI", |
| 8 | "typescript": false, | 8 | "typescript": false, | ... | ... |
| 1 | { | 1 | { |
| 2 | "miniprogramRoot": "./dist", | 2 | "miniprogramRoot": "./dist", |
| 3 | - "projectname": "myApp", | 3 | + "projectname": "jgdl", |
| 4 | - "description": "myApp", | 4 | + "description": "捡个电驴", |
| 5 | "appid": "touristappid", | 5 | "appid": "touristappid", |
| 6 | "setting": { | 6 | "setting": { |
| 7 | "urlCheck": true, | 7 | "urlCheck": true, | ... | ... |
| 1 | { | 1 | { |
| 2 | "miniprogramRoot": "./", | 2 | "miniprogramRoot": "./", |
| 3 | - "projectname": "myApp", | 3 | + "projectname": "jgdl", |
| 4 | - "description": "myApp", | 4 | + "description": "捡个电驴", |
| 5 | "appid": "touristappid", | 5 | "appid": "touristappid", |
| 6 | "setting": { | 6 | "setting": { |
| 7 | "urlCheck": true, | 7 | "urlCheck": true, | ... | ... |
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | <meta name="format-detection" content="telephone=no,address=no"> | 8 | <meta name="format-detection" content="telephone=no,address=no"> |
| 9 | <meta name="apple-mobile-web-app-status-bar-style" content="white"> | 9 | <meta name="apple-mobile-web-app-status-bar-style" content="white"> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" > | 10 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" > |
| 11 | - <title>myApp</title> | 11 | + <title>捡个电驴</title> |
| 12 | <script><%= htmlWebpackPlugin.options.script %></script> | 12 | <script><%= htmlWebpackPlugin.options.script %></script> |
| 13 | </head> | 13 | </head> |
| 14 | <body> | 14 | <body> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-06-28 10:33:00 | 2 | * @Date: 2025-06-28 10:33:00 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-07-03 21:09:43 | 4 | + * @LastEditTime: 2025-07-04 10:05:07 |
| 5 | * @FilePath: /jgdl/src/pages/index/index.vue | 5 | * @FilePath: /jgdl/src/pages/index/index.vue |
| 6 | * @Description: 捡个电驴首页 | 6 | * @Description: 捡个电驴首页 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | - <view class="flex flex-col bg-orange-50 min-h-screen"> | 9 | + <view class="flex flex-col bg-orange-50 min-h-screen" style="background-color: #f6f6f6;"> |
| 10 | <!-- Header --> | 10 | <!-- Header --> |
| 11 | <nut-sticky> | 11 | <nut-sticky> |
| 12 | <view class="bg-orange-400 p-4 pt-4 pb-4"> | 12 | <view class="bg-orange-400 p-4 pt-4 pb-4"> |
| ... | @@ -27,7 +27,7 @@ | ... | @@ -27,7 +27,7 @@ |
| 27 | </nut-sticky> | 27 | </nut-sticky> |
| 28 | 28 | ||
| 29 | <!-- Banner --> | 29 | <!-- Banner --> |
| 30 | - <view class="px-4 mt-4"> | 30 | + <view class="px-4 pt-4" style="background: linear-gradient( 180deg, #fb923c 0%, rgba(255,203,53,0) 61%);"> |
| 31 | <nut-swiper :init-page="0" :pagination-visible="true" pagination-color="#ffffff" auto-play="3000" | 31 | <nut-swiper :init-page="0" :pagination-visible="true" pagination-color="#ffffff" auto-play="3000" |
| 32 | class="rounded-lg overflow-hidden" height="160"> | 32 | class="rounded-lg overflow-hidden" height="160"> |
| 33 | <nut-swiper-item v-for="(image, index) in bannerImages" :key="index"> | 33 | <nut-swiper-item v-for="(image, index) in bannerImages" :key="index"> |
| ... | @@ -40,19 +40,19 @@ | ... | @@ -40,19 +40,19 @@ |
| 40 | <view class="px-4 mt-2"> | 40 | <view class="px-4 mt-2"> |
| 41 | <view class="flex justify-around py-4"> | 41 | <view class="flex justify-around py-4"> |
| 42 | <view class="flex flex-col items-center" @tap="onNewCarClick"> | 42 | <view class="flex flex-col items-center" @tap="onNewCarClick"> |
| 43 | - <view class="w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center"> | 43 | + <view class="w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center" style="background: linear-gradient( 135deg, rgba(255,161,53,0.15) 0%, rgba(235,83,5,0.25) 100%); box-shadow: 0px 2px 8px 0px rgba(235,83,5,0.15);"> |
| 44 | <Clock size="20" color="#f97316" /> | 44 | <Clock size="20" color="#f97316" /> |
| 45 | </view> | 45 | </view> |
| 46 | <text class="text-xs mt-1 text-gray-700">最新上架</text> | 46 | <text class="text-xs mt-1 text-gray-700">最新上架</text> |
| 47 | </view> | 47 | </view> |
| 48 | <view class="flex flex-col items-center" @tap="onGoodCarClick"> | 48 | <view class="flex flex-col items-center" @tap="onGoodCarClick"> |
| 49 | - <view class="w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center"> | 49 | + <view class="w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center" style="background: linear-gradient( 135deg, rgba(255,161,53,0.15) 0%, rgba(235,83,5,0.25) 100%); box-shadow: 0px 2px 8px 0px rgba(235,83,5,0.15);"> |
| 50 | <Star size="20" color="#f97316" /> | 50 | <Star size="20" color="#f97316" /> |
| 51 | </view> | 51 | </view> |
| 52 | <text class="text-xs mt-1 text-gray-700">特价好车</text> | 52 | <text class="text-xs mt-1 text-gray-700">特价好车</text> |
| 53 | </view> | 53 | </view> |
| 54 | <view class="flex flex-col items-center" @tap="onCertifiedClick"> | 54 | <view class="flex flex-col items-center" @tap="onCertifiedClick"> |
| 55 | - <view class="w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center"> | 55 | + <view class="w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center" style="background: linear-gradient( 135deg, rgba(255,161,53,0.15) 0%, rgba(235,83,5,0.25) 100%); box-shadow: 0px 2px 8px 0px rgba(235,83,5,0.15);"> |
| 56 | <Shop size="20" color="#f97316" /> | 56 | <Shop size="20" color="#f97316" /> |
| 57 | </view> | 57 | </view> |
| 58 | <text class="text-xs mt-1 text-gray-700">认证车源</text> | 58 | <text class="text-xs mt-1 text-gray-700">认证车源</text> |
| ... | @@ -75,31 +75,31 @@ | ... | @@ -75,31 +75,31 @@ |
| 75 | <view class="relative p-2"> | 75 | <view class="relative p-2"> |
| 76 | <image :src="scooter.imageUrl" :alt="scooter.name" mode="aspectFill" | 76 | <image :src="scooter.imageUrl" :alt="scooter.name" mode="aspectFill" |
| 77 | class="w-full h-36 object-cover rounded-lg" /> | 77 | class="w-full h-36 object-cover rounded-lg" /> |
| 78 | - <view class="absolute top-4 right-4 p-1" @tap.stop="() => toggleFavorite(scooter.id)"> | 78 | + <view class="absolute top-4 right-3 w-7 h-7 rounded-full bg-white bg-opacity-90" @tap.stop="() => toggleFavorite(scooter.id)" style="padding-top: 12rpx; padding-left: 10rpx;"> |
| 79 | - <Heart1 v-if="!favoriteIds.includes(scooter.id)" size="20" :color="'#ffffff'" /> | 79 | + <Heart1 v-if="!favoriteIds.includes(scooter.id)" size="22" :color="'#9ca3af'" /> |
| 80 | - <HeartFill v-else size="20" :color="'#ef4444'" /> | 80 | + <HeartFill v-else size="22" :color="'#ef4444'" /> |
| 81 | </view> | 81 | </view> |
| 82 | <view v-if="scooter.isVerified" | 82 | <view v-if="scooter.isVerified" |
| 83 | - class="absolute bottom-4 right-4 bg-orange-500 text-white text-xs px-1.5 py-0.5 rounded flex items-center"> | 83 | + class="absolute bottom-4 right-4 text-white text-xs px-1.5 py-0.5 rounded flex items-center" style="background-color: #EB5305;"> |
| 84 | <Check size="12" color="#ffffff" class="mr-0.5" /> | 84 | <Check size="12" color="#ffffff" class="mr-0.5" /> |
| 85 | <text class="text-white">认证</text> | 85 | <text class="text-white">认证</text> |
| 86 | </view> | 86 | </view> |
| 87 | </view> | 87 | </view> |
| 88 | - <view class="p-2"> | 88 | + <view class="p-2 pl-3"> |
| 89 | <text class="font-medium text-sm block">{{ scooter.name }}</text> | 89 | <text class="font-medium text-sm block">{{ scooter.name }}</text> |
| 90 | - <text class="text-xs text-gray-500 block"> | 90 | + <text class="text-xs text-gray-500 block mt-1 mb-1"> |
| 91 | - {{ scooter.year }} · | 91 | + {{ scooter.year }} · {{ scooter.school }} |
| 92 | <text v-if="scooter.batteryHealth">电池健康度{{ scooter.batteryHealth }}%</text> | 92 | <text v-if="scooter.batteryHealth">电池健康度{{ scooter.batteryHealth }}%</text> |
| 93 | <text v-if="scooter.mileage"> 行驶{{ scooter.mileage }}公里</text> | 93 | <text v-if="scooter.mileage"> 行驶{{ scooter.mileage }}公里</text> |
| 94 | </text> | 94 | </text> |
| 95 | <view class="mt-1"> | 95 | <view class="mt-1"> |
| 96 | - <text class="text-orange-500 font-bold"> | 96 | + <text class="text-orange-500 font-bold" style="font-size: 1.25rem;"> |
| 97 | ¥{{ scooter.price.toLocaleString() }} | 97 | ¥{{ scooter.price.toLocaleString() }} |
| 98 | </text> | 98 | </text> |
| 99 | - <text v-if="scooter.isVerified" class="ml-2 text-xs px-1 py-0.5 bg-orange-100 text-orange-500 rounded"> | 99 | + <!-- <text v-if="scooter.isVerified" class="ml-2 text-xs px-1 py-0.5 bg-orange-100 text-orange-500 rounded"> |
| 100 | 低于市场价10% | 100 | 低于市场价10% |
| 101 | - </text> | 101 | + </text> --> |
| 102 | - <text class="text-xs text-gray-500 mt-1 block">{{ scooter.school }}</text> | 102 | + <!-- <text class="text-xs text-gray-500 mt-1 block">{{ scooter.school }}</text> --> |
| 103 | </view> | 103 | </view> |
| 104 | </view> | 104 | </view> |
| 105 | </view> | 105 | </view> |
| ... | @@ -123,15 +123,15 @@ | ... | @@ -123,15 +123,15 @@ |
| 123 | <image :src="scooter.imageUrl" :alt="scooter.name" mode="aspectFill" | 123 | <image :src="scooter.imageUrl" :alt="scooter.name" mode="aspectFill" |
| 124 | class="w-full h-full object-cover rounded-lg" /> | 124 | class="w-full h-full object-cover rounded-lg" /> |
| 125 | <view v-if="scooter.isVerified" | 125 | <view v-if="scooter.isVerified" |
| 126 | - class="absolute bottom-3 right-3 bg-orange-500 text-white text-xs px-1 rounded flex items-center"> | 126 | + class="absolute bottom-3 right-3 text-white text-xs px-1 rounded flex items-center" style="background-color: #EB5305;"> |
| 127 | <Check size="12" color="#ffffff" class="mr-0.5" /> | 127 | <Check size="12" color="#ffffff" class="mr-0.5" /> |
| 128 | <text class="text-white">认证</text> | 128 | <text class="text-white">认证</text> |
| 129 | </view> | 129 | </view> |
| 130 | </view> | 130 | </view> |
| 131 | <view class="flex-1 p-3 relative"> | 131 | <view class="flex-1 p-3 relative"> |
| 132 | <view class="absolute top-2 right-2" @tap.stop="() => toggleFavorite(scooter.id)"> | 132 | <view class="absolute top-2 right-2" @tap.stop="() => toggleFavorite(scooter.id)"> |
| 133 | - <Heart1 v-if="!favoriteIds.includes(scooter.id)" size="16" :color="'#9ca3af'" /> | 133 | + <Heart1 v-if="!favoriteIds.includes(scooter.id)" size="22" :color="'#9ca3af'" /> |
| 134 | - <HeartFill v-else size="16" :color="'#ef4444'" /> | 134 | + <HeartFill v-else size="22" :color="'#ef4444'" /> |
| 135 | </view> | 135 | </view> |
| 136 | <text class="font-medium text-sm block">{{ scooter.name }}</text> | 136 | <text class="font-medium text-sm block">{{ scooter.name }}</text> |
| 137 | <text class="text-xs text-gray-600 mt-1 block"> | 137 | <text class="text-xs text-gray-600 mt-1 block"> |
| ... | @@ -140,7 +140,7 @@ | ... | @@ -140,7 +140,7 @@ |
| 140 | <text v-if="scooter.mileage"> 行驶{{ scooter.mileage }}公里</text> | 140 | <text v-if="scooter.mileage"> 行驶{{ scooter.mileage }}公里</text> |
| 141 | </text> | 141 | </text> |
| 142 | <view class="mt-2"> | 142 | <view class="mt-2"> |
| 143 | - <text class="text-orange-500 font-bold"> | 143 | + <text class="text-orange-500 font-bold" style="font-size: 1.25rem;"> |
| 144 | ¥{{ scooter.price.toLocaleString() }} | 144 | ¥{{ scooter.price.toLocaleString() }} |
| 145 | </text> | 145 | </text> |
| 146 | <text class="text-xs text-gray-500 mt-1 block">{{ scooter.school }}</text> | 146 | <text class="text-xs text-gray-500 mt-1 block">{{ scooter.school }}</text> |
| ... | @@ -161,7 +161,7 @@ import Taro from '@tarojs/taro' | ... | @@ -161,7 +161,7 @@ import Taro from '@tarojs/taro' |
| 161 | import '@tarojs/taro/html5.css' //和 nutui组件居然有冲突? | 161 | import '@tarojs/taro/html5.css' //和 nutui组件居然有冲突? |
| 162 | import { ref, onMounted } from 'vue' | 162 | import { ref, onMounted } from 'vue' |
| 163 | import { useDidShow, useReady } from '@tarojs/taro' | 163 | import { useDidShow, useReady } from '@tarojs/taro' |
| 164 | -import { Clock, Star, RectRight, Addfollow, Follow, Check, Search2, Shop, Heart1, HeartFill } from '@nutui/icons-vue-taro' | 164 | +import { Clock, Star, RectRight, Check, Search2, Shop, Heart1, HeartFill } from '@nutui/icons-vue-taro' |
| 165 | import TabBar from '@/components/TabBar.vue' | 165 | import TabBar from '@/components/TabBar.vue' |
| 166 | import "./index.less"; | 166 | import "./index.less"; |
| 167 | 167 | ... | ... |
-
Please register or login to post a comment