perf(uniapp): 小程序主包瘦身,迁移分包静态资源、清理冗余组件与全局样式

This commit is contained in:
pikachu1995@126.com
2026-10-20 18:46:39 +08:00
parent 755f574e8e
commit c15e954549
49 changed files with 282 additions and 2448 deletions

View File

@@ -1,8 +1,8 @@
<template>
<view :style="themeStyle" class="content">
<view class="portrait-box">
<image src="/static/pointTrade/point_bg_1.png" mode=""></image>
<image class="point-img" src="/static/pointTrade/tradehall.png" />
<image src="/pages/mine/static/point_bg_1.png" mode=""></image>
<image class="point-img" src="/pages/mine/static/tradehall.png" />
<view class="position-point">

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

View File

@@ -35,7 +35,7 @@
<view class="select-view">
<view class="select-cell" v-if="applyInfo.returnGoods" @click="onSelect(1)">
<view class="select-image">
<image class="select-icon" src="/static/order/t1.png"></image>
<image class="select-icon" src="/pages/order/static/t1.png"></image>
</view>
<view class="cell-body">
<view class="select-title">退货</view>
@@ -45,7 +45,7 @@
</view>
<view class="select-cell" v-if="applyInfo.returnMoney" @click="onSelect(3)">
<view class="select-image">
<image class="select-icon" src="/static/order/t3.png"></image>
<image class="select-icon" src="/pages/order/static/t3.png"></image>
</view>
<view class="cell-body">
<view class="select-title">退款</view>

BIN
pages/order/static/t1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

BIN
pages/order/static/t3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

View File

@@ -115,7 +115,7 @@
<u-icon v-if="item.title != 'APPLE'" color="#fff" size="42" :name="item.icon"
@click="navigateLogin(item)">
</u-icon>
<u-image v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)"
<u-image v-else src="/pages/passport/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)"
width="80" height="80" />
</div>
</template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -303,7 +303,7 @@ page {
.star-item {
width: 28rpx;
height: 28rpx;
background: url("/static/star.png");
background: url("/pages/product/static/star.png");
background-size: 100%;
opacity: 0.25;

View File

@@ -1,5 +1,5 @@
.group-wrapper {
background: url("/static/exchange.png");
background: url("/pages/product/static/exchange.png");
background-size: cover;
}
.u-group-row {

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -27,7 +27,7 @@
</u-navbar>
<!-- 顶部栏 -->
<view class="header-wraper">
<image class="header-banner" mode="aspectFit" src="/static/join-buy.png"></image>
<image class="header-banner" mode="aspectFit" src="/pages/promotion/static/join-buy.png"></image>
</view>
<!-- 商品栏 -->
<div class="swiper">
@@ -156,7 +156,7 @@ function GET_AssembleGoods() {
}
.header-wraper {
background: url('/static/bg.png') no-repeat center center;
background: url('/pages/promotion/static/bg.png') no-repeat center center;
background-size: cover;
height: 200rpx;
display: flex;

View File

@@ -32,7 +32,7 @@ async function init() {
padding: 0 20rpx;
height: 300rpx;
flex-shrink: 0;
background: url("/static/point-bg.png") no-repeat;
background: url("/pages/promotion/static/point-bg.png") no-repeat;
background-size: 100%;
display: flex;
align-items: center;

View File

@@ -9,7 +9,7 @@
@left-click="back"
></u-navbar>
<view class="header-wraper">
<image class="header-banner" mode="aspectFit" src="/static/seckill.png"></image>
<image class="header-banner" mode="aspectFit" src="/pages/promotion/static/seckill.png"></image>
</view>
<scroll-view scroll-x>
<view class="index-navs">
@@ -176,7 +176,7 @@ function clickNavigateTime(type: number) {
}
.header-wraper {
background: url('/static/bg.png') no-repeat center center;
background: url('/pages/promotion/static/bg.png') no-repeat center center;
background-size: cover;
height: 200rpx;
display: flex;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -18,7 +18,7 @@
<view style="width: 120rpx; height: 120rpx; float: right">
<image
@click="enableShowCoupon = false"
src="/static/cpauto1.png"
src="https://lilishop-uniapp.oss-cn-beijing.aliyuncs.com/cpauto1.png"
style="width: 100%; height: 100%"
></image>
</view>

View File

@@ -181,7 +181,7 @@ body {
background-size: cover;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
background-image: url("/static/img/main-bg.png");
background-image: url("https://lilishop-uniapp.oss-cn-beijing.aliyuncs.com/main-bg.png");
background-position: bottom;
background-repeat: no-repeat;
color: #ffffff;