Bladeren bron

style(iconfont): 使用 iconfont 替换部分图片图标显示

- 修改 iconfont 资源链接更新时间戳以确保资源更新
- 将购物车页面空状态的图片替换为对应 iconfont 图标
- 我的页面订单状态标签的图标由图片改为 iconfont 字符显示
- 子包 commonTab 组件中购物车及分类组件的图标由图片替换为 iconfont
- 统一商品项中购物车图标的显示方式,改用 iconfont 图标渲染
- 注释并删除了部分旧的图片标签,使用 iconfont 标签替代显示
zhangtao 1 week geleden
bovenliggende
commit
554ff61fec

BIN
src/iconfont/iconfont.ttf


BIN
src/iconfont/iconfont.woff


BIN
src/iconfont/iconfont.woff2


+ 4 - 4
src/iconfont/index.css

@@ -1,9 +1,9 @@
 @font-face {
   font-family: "iconfont"; /* Project id 5175205 */
-  src: url('iconfont.woff2?t=1778486227708') format('woff2'),
-       url('iconfont.woff?t=1778486227708') format('woff'),
-       url('iconfont.ttf?t=1778486227708') format('truetype'),
-       url('iconfont.svg?t=1778486227708#iconfont') format('svg');
+  src: url('iconfont.woff2?t=1778492797980') format('woff2'),
+       url('iconfont.woff?t=1778492797980') format('woff'),
+       url('iconfont.ttf?t=1778492797980') format('truetype'),
+       url('iconfont.svg?t=1778492797980#iconfont') format('svg');
 }
 
 .iconfont {

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

@@ -156,7 +156,8 @@ async function handleSelectAddress() {
 
         <view v-if="!cartList.length" class="box-border w-full flex items-center justify-center">
           <view class="mt-220rpx flex flex-col items-center">
-            <image :src="`${StaticUrl}/cart.png`" class="h-110rpx w-110rpx" />
+            <!-- <image :src="`${StaticUrl}/cart.png`" class="h-110rpx w-110rpx" /> -->
+            <i class="iconfont text-110rpx text-[var(--them-color)]">&#xe64d;</i>
             <view class="mb-20rpx mt-20rpx text-24rpx">
               你还没有添加商品哦~
             </view>

+ 7 - 5
src/pages/my/index.vue

@@ -13,10 +13,10 @@ definePage({
   },
 })
 const tabList = ref([
-  { title: '待支付', icon: `${StaticUrl}/1.png`, name: 'smqjh-order', status: 'paddingPay' },
-  { title: '进行中', icon: `${StaticUrl}/2.png`, name: 'smqjh-order', status: 'ing' },
-  { title: '已完成', icon: `${StaticUrl}/6.png`, name: 'smqjh-order', status: 'completed' },
-  { title: '退款售后', icon: `${StaticUrl}/3.png`, name: 'common-afterSalesList', status: '' },
+  { title: '待支付', icon: ``, name: 'smqjh-order', status: 'paddingPay' },
+  { title: '进行中', icon: ``, name: 'smqjh-order', status: 'ing' },
+  { title: '已完成', icon: ``, name: 'smqjh-order', status: 'completed' },
+  { title: '退款售后', icon: ``, name: 'common-afterSalesList', status: '' },
 ])
 onMounted(() => {
   useUserStore().getUserInfo()
@@ -98,7 +98,9 @@ function handleGo(item: { name: string, status: string }) {
         </template>
         <view class="grid grid-cols-4 gap-4">
           <view v-for="item in tabList" :key="item.title" class="flex flex-col items-center justify-center" @click="handleGo(item)">
-            <image :src="item.icon" class="h-56rpx w-56rpx" />
+            <i class="iconfont text-56rpx text-[var(--them-color)]">
+              {{ item.icon }}
+            </i>
             <view class="mt-20rpx text-24rpx">
               {{ item.title }}
             </view>

+ 1 - 1
src/subPack-xsb/commonTab/components/cart.vue

@@ -122,7 +122,7 @@ onMounted(async () => {
 
           <view v-if="!cartList.length" class="box-border w-full flex items-center justify-center">
             <view class="mt220rpx flex flex-col items-center">
-              <image :src="`${StaticUrl}/cart.png`" class="h110rpx w110rpx" />
+              <i class="iconfont text-110rpx text-[var(--them-color)]">&#xe64d;</i>
               <view class="mb20rpx mt20rpx text-24rpx">
                 你还没有添加商品哦~
               </view>

+ 5 - 3
src/subPack-xsb/commonTab/components/classfiy.vue

@@ -578,10 +578,12 @@ export default {
                       </view>
                       <view v-if="!item.num">
                         <view v-if="item.spuStock" @click.stop="handleAddCart($event, item)">
-                          <image :src="`${StaticUrl}/cart-yes.png`" class="h52rpx w52rpx" />
+                          <!-- <image :src="`${StaticUrl}/cart-yes.png`" class="h52rpx w52rpx" /> -->
+                          <i class="iconfont text-52rpx text-[var(--them-color)]">&#xe64c;</i>
                         </view>
                         <view v-else>
-                          <image :src="`${StaticUrl}/cart-no.png`" class="h52rpx w52rpx" />
+                          <!-- <image :src="`${StaticUrl}/cart-no.png`" class="h52rpx w52rpx" /> -->
+                          <i class="iconfont text-52rpx text-#ccc">&#xe64c;</i>
                         </view>
                       </view>
                       <view v-else>
@@ -851,7 +853,7 @@ export default {
       <template #footer>
         <view class="box-border w-full flex items-center justify-between py20rpx">
           <view class="w-48%">
-            <wd-button hairline plain block @click="selectGoods = false">
+            <wd-button plain hairline block @click="selectGoods = false">
               取消
             </wd-button>
           </view>

+ 7 - 5
src/subPack-xsb/commonTab/components/my.vue

@@ -3,10 +3,10 @@ import { StaticUrl } from '@/config'
 import router from '@/router'
 
 const tabList = ref([
-  { title: '待支付', icon: `${StaticUrl}/1.png`, name: 'xsb-order', status: 'paddingPay' },
-  { title: '进行中', icon: `${StaticUrl}/2.png`, name: 'xsb-order', status: 'ing' },
-  { title: '已完成', icon: `${StaticUrl}/6.png`, name: 'xsb-order', status: 'completed' },
-  { title: '退款售后', icon: `${StaticUrl}/3.png`, name: 'common-afterSalesList', status: '' },
+  { title: '待支付', icon: ``, name: 'xsb-order', status: 'paddingPay' },
+  { title: '进行中', icon: ``, name: 'xsb-order', status: 'ing' },
+  { title: '已完成', icon: ``, name: 'xsb-order', status: 'completed' },
+  { title: '退款售后', icon: ``, name: 'common-afterSalesList', status: '' },
 ])
 
 const { token, userInfo, getUserAvatar } = storeToRefs(useUserStore())
@@ -78,7 +78,9 @@ function handleGo(item: { name: string, status: string }) {
         </template>
         <view class="grid grid-cols-4 gap-4">
           <view v-for="item in tabList" :key="item.title" class="flex flex-col items-center justify-center" @click="handleGo(item)">
-            <image :src="item.icon" class="h56rpx w56rpx" />
+            <i class="iconfont text-56rpx text-[var(--them-color)]">
+              {{ item.icon }}
+            </i>
             <view class="mt20rpx text-24rpx">
               {{ item.title }}
             </view>

+ 1 - 1
src/subPack-xsb/components/goodsItem/index.vue

@@ -42,7 +42,7 @@ defineProps<{ itemGoods: Api.xsbCategoryProductList }>()
               </view>
             </view>
           </view>
-          <image :src="`${StaticUrl}/cart-yes.png`" class="h52rpx w52rpx" />
+          <i class="iconfont text-52rpx text-[var(--them-color)]">&#xe64c;</i>
         </view>
       </view>
     </view>