mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 02:47:25 +08:00
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:
@@ -4,9 +4,9 @@
|
||||
<view class="status_bar">
|
||||
<!-- 这里是状态栏 -->
|
||||
</view>
|
||||
<view class="header" @click="userDetail">
|
||||
<view class="header" @click="userDetail">
|
||||
<view class="head-1">
|
||||
<image :src="userInfo.face || userImage"></image>
|
||||
<image class="head-avatar" :src="userInfo.face || userImage"></image>
|
||||
</view>
|
||||
<view class="head-2" v-if="userInfo.id">
|
||||
<view class="user-name">{{ userInfo.nickName }}</view>
|
||||
@@ -14,57 +14,55 @@
|
||||
<view class="head-2" v-else>
|
||||
<view class="user-name">登录/注册</view>
|
||||
</view>
|
||||
<u-icon style="display: flex;align-items: flex-start;" name="arrow-right"></u-icon>
|
||||
<u-icon class="header-arrow" name="arrow-right"></u-icon>
|
||||
</view>
|
||||
<!-- 积分,优惠券,关注, -->
|
||||
<div class="pointBox box">
|
||||
<u-row text-align="center" gutter="16" class="point">
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/operation')">
|
||||
<view>预存款</view>
|
||||
<view class="money">{{ walletNum | unitPrice }}</view>
|
||||
</u-col>
|
||||
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
||||
<view>优惠券</view>
|
||||
<view>{{ couponNum || 0 }}</view>
|
||||
</u-col>
|
||||
|
||||
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/myTracks')">
|
||||
<view>足迹</view>
|
||||
<view>{{ footNum || 0 }}</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<view class="point">
|
||||
<view class="point-item" @click="navigateTo('/pages/mine/deposit/operation')">
|
||||
<view class="point-label">预存款</view>
|
||||
<view class="point-value money">{{ unitPrice(walletNum) }}</view>
|
||||
</view>
|
||||
<view class="point-item" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
||||
<view class="point-label">优惠券</view>
|
||||
<view class="point-value">{{ couponNum || 0 }}</view>
|
||||
</view>
|
||||
<view class="point-item" @click="navigateTo('/pages/mine/myTracks')">
|
||||
<view class="point-label">足迹</view>
|
||||
<view class="point-value">{{ footNum || 0 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的订单,代付款 -->
|
||||
<view class="order">
|
||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=1')">
|
||||
<div class="bag bag2">
|
||||
<u-icon name="bag-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>待付款</view>
|
||||
<view class="bag bag2">
|
||||
<u-icon name="bag-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">待付款</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=3')">
|
||||
<div class="bag bag3">
|
||||
<u-icon name="car-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>待收货</view>
|
||||
<view class="bag bag3">
|
||||
<u-icon name="car-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">待收货</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
|
||||
<div class="bag bag4">
|
||||
<u-icon name="star-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>待评价</view>
|
||||
<view class="bag bag4">
|
||||
<u-icon name="star-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">待评价</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/afterSales/afterSales')">
|
||||
<div class="bag bag5">
|
||||
<u-icon name="server-fill" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>售后</view>
|
||||
<view class="bag bag5">
|
||||
<u-icon name="server-fill" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">售后</view>
|
||||
</view>
|
||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')">
|
||||
<div class="bag bag1">
|
||||
<u-icon name="order" size="35" color="#fff"></u-icon>
|
||||
</div>
|
||||
<view>我的订单</view>
|
||||
<view class="bag bag1">
|
||||
<u-icon name="order" size="22" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="order-item-label">我的订单</view>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
@@ -98,8 +96,8 @@ export default {
|
||||
},
|
||||
onLoad() { },
|
||||
onShow() {
|
||||
this.userInfo = this.$options.filters.isLogin() || {};
|
||||
if (this.$options.filters.isLogin("auth")) {
|
||||
this.userInfo = this.isLogin() || {};
|
||||
if (this.isLogin("auth")) {
|
||||
this.getUserOrderNum();
|
||||
} else {
|
||||
this.walletNum = 0;
|
||||
@@ -109,7 +107,7 @@ export default {
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getUserOrderNum();
|
||||
this.userInfo = this.$options.filters.isLogin();
|
||||
this.userInfo = this.isLogin();
|
||||
},
|
||||
// #ifndef MP
|
||||
onNavigationBarButtonTap(e) {
|
||||
@@ -134,7 +132,7 @@ export default {
|
||||
userDetail() {
|
||||
this.userInfo.id
|
||||
? this.navigateTo("/pages/mine/set/personMsg")
|
||||
: this.$options.filters.navigateToLogin();;
|
||||
: this.navigateToLogin();;
|
||||
},
|
||||
async getUserOrderNum() {
|
||||
uni.stopPullDownRefresh();
|
||||
@@ -179,21 +177,18 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.head-1 {
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
width: 152rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
.head-avatar {
|
||||
width: 152rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 30rpx;
|
||||
border: 3px solid #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.edti-head {
|
||||
@@ -205,7 +200,7 @@ body {
|
||||
top: 100rpx;
|
||||
right: 0;
|
||||
|
||||
image {
|
||||
.head-avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -215,13 +210,14 @@ body {
|
||||
.head-2 {
|
||||
flex: 1;
|
||||
margin-left: 30rpx;
|
||||
margin-top: 100rpx;
|
||||
line-height: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .u-icon,
|
||||
.u-icon {
|
||||
margin-top: 106rpx;
|
||||
.header-arrow {
|
||||
flex-shrink: 0;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,47 +230,53 @@ body {
|
||||
}
|
||||
|
||||
.point {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
height: 160rpx;
|
||||
|
||||
font-size: $font-sm;
|
||||
// #ifdef MP-WEIXIN
|
||||
padding: 24rpx;
|
||||
|
||||
// #endif
|
||||
.u-col {
|
||||
view {
|
||||
color: $u-main-color;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
view:last-child {
|
||||
margin-top: 8rpx;
|
||||
color: $main-color;
|
||||
font-size: $font-lg;
|
||||
}
|
||||
.point-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.point-label {
|
||||
color: $u-main-color;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.point-value {
|
||||
margin-top: 8rpx;
|
||||
color: $main-color;
|
||||
font-size: $font-lg;
|
||||
}
|
||||
}
|
||||
|
||||
.order {
|
||||
height: 140rpx;
|
||||
text-align: center;
|
||||
font-size: $font-sm;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 0 3%;
|
||||
color: #999;
|
||||
|
||||
.order-item {
|
||||
position: relative;
|
||||
line-height: 2em;
|
||||
width: 96rpx;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:first-child {
|
||||
font-size: 48rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.order-item-label {
|
||||
margin-top: 10rpx;
|
||||
line-height: 1.4;
|
||||
font-size: $font-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,13 +287,18 @@ body {
|
||||
|
||||
.user-name {
|
||||
font-size: 34rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bag {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.bag1 {
|
||||
|
||||
Reference in New Issue
Block a user