refactor: 移动端升级 Vue3 + uView Plus

将 lilishop-uniapp 从 Vue2/uView 1.6 迁移到 Vue3/uview-plus,优先支持 H5/微商城与微信小程序;移除 vendored uview-ui,改用 npm 依赖、Vuex4 与迁移脚本/补丁,并补充 VUE3_MIGRATION.md 回归清单。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pikachu1995@126.com
2026-06-30 18:50:38 +08:00
parent c290c7a329
commit dc2bef455a
299 changed files with 5507 additions and 43811 deletions

View File

@@ -18,7 +18,7 @@
<!-- 如果有图片则会循环显示评价的图片 -->
<view class="goods-imgs-view" v-if="comment.images != null && comment.images.length != 0">
<view class="img-view" v-for="(img, imgIndex) in comment.images.split(',')" :key="imgIndex">
<u-image @click.native="preview(comment.images.split(','),imgIndex)" width="160rpx" height="160rpx" :src="img"></u-image>
<u-image @click="preview(comment.images.split(','),imgIndex)" width="160rpx" height="160rpx" :src="img"></u-image>
</view>
</view>
<view class="goods-name">

View File

@@ -7,7 +7,8 @@
</view>
<swiper class="swiper-box" :current="current" @change="changeSwiper" duration="500">
<swiper-item v-for="(item, listIndex) in list" :key="listIndex">
<scroll-view scroll-y style="height: 100%" @scrolltolower="renderData(listIndex)">
<scroll-view scroll-y :enable-flex="true" class="evaluate-scroll" @scrolltolower="renderData(listIndex)">
<view class="evaluate-scroll-inner">
<u-empty text="尚无需要评价的商品" mode="list" v-if="orderList.length == 0"></u-empty>
<view class="seller-view" v-for="(order, index) in orderList" :key="index">
<!-- 店铺名称 -->
@@ -38,7 +39,7 @@
<view class="goods-imgs-view" v-if="order.image">
<view class="img-view" v-if="order.image" v-for="(img, imgIndex) in order.image.split(',')"
:key="imgIndex">
<u-image v-if="order.image" @click.native="
<u-image v-if="order.image" @click="
preview(order.image.split(','), imgIndex)
" width="160rpx" height="160rpx" :src="img"></u-image>
</view>
@@ -62,6 +63,7 @@
</view>
<uni-load-more :status="params.loadStatus"></uni-load-more>
</view>
</scroll-view>
</swiper-item>
</swiper>
@@ -327,6 +329,16 @@ page {
height: calc(100% - 88rpx);
}
.evaluate-scroll {
height: 100%;
display: flex;
flex-direction: column;
}
.evaluate-scroll-inner {
width: 100%;
}
.goods-specs {
margin-bottom: 10rpx;
color: #cccccc;

View File

@@ -51,8 +51,8 @@
</view>
<view class="info-evaluate-view">
<view class="images-view">
<u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150"
@on-uploaded="onUploaded" :max-count="5" :show-progress="false"></u-upload>
<u-upload :file-list="uploadFileList" :auto-upload="false" width="150"
@afterRead="onUploadAfterRead" :max-count="5"></u-upload>
</view>
</view>
</view>
@@ -62,20 +62,20 @@
<view class="seller-rate-view">
<view class="rate-title">描述相符</view>
<view>
<u-rate count="count" gutter="20" active-color="#FFC71C" v-model="form.descriptionScore" :size="40">
<u-rate :count="5" gutter="20" active-color="#FFC71C" v-model="form.descriptionScore" :size="40">
</u-rate>
</view>
</view>
<view class="seller-rate-view">
<view class="rate-title">服务态度</view>
<view>
<u-rate count="count" gutter="20" active-color="#FFC71C" v-model="form.serviceScore" :size="40"></u-rate>
<u-rate :count="5" gutter="20" active-color="#FFC71C" v-model="form.serviceScore" :size="40"></u-rate>
</view>
</view>
<view class="seller-rate-view">
<view class="rate-title">物流服务</view>
<view>
<u-rate count="count" gutter="20" active-color="#FFC71C" v-model="form.deliveryScore" :size="40"></u-rate>
<u-rate :count="5" gutter="20" active-color="#FFC71C" v-model="form.deliveryScore" :size="40"></u-rate>
</view>
</view>
</view>
@@ -89,7 +89,7 @@
<script>
import storage from "@/utils/storage.js";
import { commentsMemberOrder } from "@/api/members.js";
import { upload } from "@/api/common.js";
import { handleUploadAfterRead } from "@/utils/uploadHelper.js";
export default {
data() {
@@ -111,7 +111,7 @@ export default {
serviceScore: 5, //默认服务得分为5分
deliveryScore: 5, //默认物流得分为5分
},
action: upload, //图片上传地址
uploadFileList: [],
};
},
onLoad(options) {
@@ -153,15 +153,10 @@ export default {
});
},
/**
* 图片成功后回调
*/
onUploaded(lists) {
let images = [];
lists.forEach((item) => {
images.push(item.response.result);
onUploadAfterRead(event) {
handleUploadAfterRead(event, this.uploadFileList, (urls) => {
this.form.images = urls;
});
this.form.images = images;
},
},
};