Ver Fonte

feat: 静态资源替换

liangan há 1 semana atrás
pai
commit
6d15a4ec19

+ 9 - 16
src/pages/index/index.vue

@@ -31,13 +31,6 @@ const paging = ref(null)
 // 类似mixins,如果是页面滚动务必要写这一行,并传入当前ref绑定的paging,注意此处是paging,而非paging.value
 useZPaging(paging)
 
-// 搜索
-function toSearch() {
-  uni.navigateTo({
-    url: '/pages/search/search',
-  })
-}
-
 // 轮播图
 const current = ref<number>(0)
 const swiperList = ref([
@@ -56,31 +49,31 @@ function onChange(e) {
 // 导航图标
 const navIcons = ref([
   {
-    image: '/static/icons/home-vip.png',
+    image: '/static/icons/mission-center.png',
     title: 'home.missionCenter',
     size: '100rpx',
     url: '/pages/missionCenter/missionCenter',
   },
   {
-    image: '/static/icons/home-vip.png',
+    image: '/static/icons/refer-earn.png',
     title: 'home.refer&earn',
     size: '100rpx',
     url: '/pages/referEarn/referEarn',
   },
   {
-    image: '/static/icons/home-vip.png',
+    image: '/static/icons/vip-membership.png',
     title: 'home.vip',
     size: '112rpx',
     url: '/pages/vipMembership/vipMembership',
   },
   {
-    image: '/static/icons/home-vip.png',
+    image: '/static/icons/best-sellers.png',
     title: 'home.bestSellers',
     size: '100rpx',
     url: '/pages/bestSellers/bestSellers',
   },
   {
-    image: '/static/icons/home-vip.png',
+    image: '/static/icons/top-champions.png',
     title: 'home.topChampions',
     size: '100rpx',
     url: '/pages/topChampions/topChampions',
@@ -128,7 +121,7 @@ const priceTabList = ref([
 ])
 
 const dataList = ref<any>([])
-async function queryList(pageNo, pageSize) {
+async function queryList(pageNo: number, pageSize: number) {
   // 获取当前选中tab的价格范围,默认为第一个tab (0-300)
   const currentTab = priceTabList.value[priceTab.value] || priceTabList.value[0]
   const minPrice = currentTab?.minPrice ?? 0
@@ -163,8 +156,8 @@ onLoad(() => {
       >
         <image src="/static/header-logo.png" class="h-54rpx w-250rpx" />
         <view class="flex items-center">
-          <wd-icon custom-class="mr-20rpx" name="search1" size="38rpx" @click="toSearch" />
-          <wd-icon name="notification" size="38rpx" @click="toPage('/pages/notifications/notifications')" />
+          <image src="/static/icons/search.png" class="mr-20rpx h-36rpx w-36rpx" @click="toPage('/pages/search/search')" />
+          <image src="/static/icons/notifications.png" class="h-36rpx w-36rpx" @click="toPage('/pages/notifications/notifications')" />
         </view>
       </view>
     </template>
@@ -185,7 +178,7 @@ onLoad(() => {
           </view>
         </view>
       </view>
-      <view>
+      <view v-if="newProducts.length">
         <view class="mb-16rpx text-32rpx">
           News
         </view>

+ 18 - 12
src/pages/mine/mine.vue

@@ -35,14 +35,20 @@ const userInfo = computed(() => {
   return userStore.userInfo
 })
 
-// 简单的模拟数据
+const groupList = ref([
+  { name: 'To Pay', url: `/pages/myOrders/myOrders`, type: 1, icon: '/static/icons/to-pay.png' },
+  { name: 'Success', url: `/pages/myOrders/myOrders`, type: 2, icon: '/static/icons/success.png' },
+  { name: 'Failed', url: `/pages/myOrders/myOrders`, type: 3, icon: '/static/icons/failed.png' },
+  { name: 'Reward', url: `/pages/myOrders/myOrders`, type: 4, icon: '/static/icons/reward.png' },
+])
+
 const menuList = ref([
-  { name: 'My Profile', url: '/pages/mine/myProfile' },
-  { name: 'Address Book', url: '/pages/mine/addressBook' },
-  { name: 'Share', url: '' },
-  { name: 'My Favorite', url: '' },
-  { name: 'Live Chat', url: '' },
-  { name: 'Activity Group', url: '' },
+  { name: 'My Profile', url: '/pages/mine/myProfile', icon: '/static/icons/my-profile.png' },
+  { name: 'Address Book', url: '/pages/mine/addressBook', icon: '/static/icons/address-book.png' },
+  { name: 'Share', url: '', icon: '/static/icons/share.png' },
+  { name: 'My Favorite', url: '', icon: '/static/icons/my-favorite.png' },
+  { name: 'Live Chat', url: '', icon: '/static/icons/live-chat.png' },
+  { name: 'Activity Group', url: '', icon: '/static/icons/activity-group.png' },
 ])
 const walletInfo = ref<any>({})
 async function getWalletInfo() {
@@ -92,7 +98,7 @@ onShow(() => {
       class="flex items-center justify-between rounded-12rpx bg-[rgba(var(--wot-color-theme-rgb),0.1)] px-16rpx py-22rpx"
     >
       <view class="flex items-center" @click="toPage('/pages/wallet/myWallet')">
-        <wd-img width="84rpx" height="84rpx" round src="/static/images/avatar.jpg" />
+        <wd-img width="84rpx" height="84rpx" round src="/static/icons/wallet-balance.png" />
         <view class="ml-18rpx">
           <view class="text-22rpx text-#595959">
             Wallet Balance
@@ -125,17 +131,17 @@ onShow(() => {
       </view>
     </view>
     <view class="grid grid-cols-4 gap-24rpx">
-      <view v-for="i in 4" :key="i" class="flex flex-col items-center">
-        <wd-img width="48rpx" height="48rpx" src="/static/images/avatar.jpg" />
+      <view v-for="(item, index) in groupList" :key="index" class="flex flex-col items-center" @click="toPage(item.url, { type: item.type })">
+        <wd-img width="48rpx" height="48rpx" :src="item.icon" />
         <view class="mt-18rpx text-22rpx text-#3A444C">
-          To Pay
+          {{ item.name }}
         </view>
       </view>
     </view>
   </view>
   <view class="grid grid-cols-3 gap-24rpx bg-white py-45rpx">
     <view v-for="(item, index) in menuList" :key="index" class="flex flex-col items-center" @click="toPage(item.url)">
-      <wd-img width="48rpx" height="48rpx" src="/static/images/avatar.jpg" />
+      <wd-img width="48rpx" height="48rpx" :src="item.icon" />
       <view class="mt-18rpx text-22rpx text-#3A444C">
         {{ item.name }}
       </view>

BIN
src/static/icons/activity-group.png


BIN
src/static/icons/address-book.png


BIN
src/static/icons/best-sellers.png


BIN
src/static/icons/failed.png


BIN
src/static/icons/home-vip.png


BIN
src/static/icons/live-chat.png


BIN
src/static/icons/mission-center.png


BIN
src/static/icons/my-favorite.png


BIN
src/static/icons/my-profile.png


BIN
src/static/icons/notifications.png


BIN
src/static/icons/refer-earn.png


BIN
src/static/icons/reward.png


BIN
src/static/icons/search.png


BIN
src/static/icons/share.png


BIN
src/static/icons/success.png


BIN
src/static/icons/to-pay.png


BIN
src/static/icons/top-champions.png


BIN
src/static/icons/vip-membership.png


BIN
src/static/icons/wallet-balance.png


BIN
src/static/tabbar/home.png


BIN
src/static/tabbar/homeHL.png


BIN
src/static/tabbar/icome.png


BIN
src/static/tabbar/icomeHL.png


BIN
src/static/tabbar/income.png


BIN
src/static/tabbar/incomeHL.png


BIN
src/static/tabbar/mine.png


BIN
src/static/tabbar/mineHL.png