mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57: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 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="goods-intro">
|
||||
<view>{{goods.goodsName}}</view>
|
||||
<view>{{goods.goods_sn}}</view>
|
||||
<view>¥{{goods.goods_price | unitPrice}}</view>
|
||||
<view>¥{{unitPrice(goods.goods_price)}}</view>
|
||||
</view>
|
||||
<!-- <button>找相似</button> -->
|
||||
</view>
|
||||
@@ -16,7 +16,7 @@
|
||||
<image :src="item.thumbnail" mode=""></image>
|
||||
<view class="nowrap">{{item.name}}</view>
|
||||
<view>
|
||||
<text>¥{{item.price | unitPrice}}
|
||||
<text>¥{{unitPrice(item.price)}}
|
||||
<!-- <text v-if="item.point">+{{item.point || 0}}积分</text> -->
|
||||
</text>
|
||||
<text>¥{{item.mktprice}}</text>
|
||||
|
||||
@@ -6,51 +6,51 @@
|
||||
<div class="paddingBox">
|
||||
<view class="interact-container">
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/address/addressManage')">
|
||||
<image src="/static/mine/myaddress.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/myaddress.png" mode=""></image>
|
||||
<view>地址管理</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/myTracks')">
|
||||
<image src="/static/mine/logistics.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/logistics.png" mode=""></image>
|
||||
<view>我的足迹</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
|
||||
<image src="/static/mine/feedback.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/feedback.png" mode=""></image>
|
||||
<view>我的评价</view>
|
||||
</view>
|
||||
<!-- <view class="interact-item" @click="linkMsgDetail()">
|
||||
<image src="/static/mine/mycommit.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/mycommit.png" mode=""></image>
|
||||
<view>我的消息</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/myCollect')">
|
||||
<image src="/static/mine/myfavorite.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/myfavorite.png" mode=""></image>
|
||||
<view>我的关注</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/point/myPoint')">
|
||||
<image src="/static/mine/mypoint.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/mypoint.png" mode=""></image>
|
||||
<view>我的积分</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="distribution">
|
||||
<image src="/static/mine/distribution.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/distribution.png" mode=""></image>
|
||||
<view>我的分销</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/order/complain/complainList')">
|
||||
<image src="/static/mine/shensu.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/shensu.png" mode=""></image>
|
||||
<view>我的投诉</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
||||
<image src="/static/mine/mycoupon.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/mycoupon.png" mode=""></image>
|
||||
<view>优惠券</view>
|
||||
</view>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
|
||||
<image src="/static/mine/sign.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/sign.png" mode=""></image>
|
||||
<view>每日签到</view>
|
||||
</view>
|
||||
|
||||
@@ -68,41 +68,41 @@
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')">
|
||||
<image src="/static/mine/couponcenter.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/couponcenter.png" mode=""></image>
|
||||
<view>领券中心</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')">
|
||||
<image src="/static/mine/kanjia.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/kanjia.png" mode=""></image>
|
||||
<view>砍价记录</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/feedBack')">
|
||||
<image src="/static/mine/feedback.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/feedback.png" mode=""></image>
|
||||
<view>意见反馈</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/editionIntro')">
|
||||
<image src="/static/mine/pointgift.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/pointgift.png" mode=""></image>
|
||||
<view>关于</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/passport/entry/seller/index')">
|
||||
<image src="/static/mine/feedback.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/feedback.png" mode=""></image>
|
||||
<view>店铺入驻</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="interact-item" @click="inviter()">-->
|
||||
<!-- <image src="/static/mine/share.png" mode=""></image>-->
|
||||
<!-- <image class="interact-item-icon" src="/static/mine/share.png" mode=""></image>-->
|
||||
<!-- <view>邀新</view>-->
|
||||
<!-- </view>-->
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
||||
<image src="/static/mine/setting.png" mode=""></image>
|
||||
<image class="interact-item-icon" src="/static/mine/setting.png" mode=""></image>
|
||||
<view>设置</view>
|
||||
</view>
|
||||
|
||||
@@ -111,10 +111,10 @@
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<u-popup v-model="sharingShow" mode="bottom" border-radius="14">
|
||||
<u-popup v-model:show="sharingShow" mode="bottom" border-radius="14">
|
||||
<view style="margin: 10px; text-align: center;"> 请邀请用户扫描二维码或者将地址复制转发给其他用户 </view>
|
||||
<view class='qrcode'>
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode" :value="sharingLink" :options="{ margin: 10 }">
|
||||
<uqrcode v-if="sharingLink" ref="uqrcode" canvas-id="qrcode" :value="sharingLink" :options="{ margin: 10 }">
|
||||
</uqrcode>
|
||||
</view>
|
||||
|
||||
@@ -171,7 +171,7 @@ export default {
|
||||
'/pages/mine/set/feedBack'
|
||||
]
|
||||
if (!ignores.includes(url)) {
|
||||
if (this.$options.filters.tipsToLogin('normal')) {
|
||||
if (this.tipsToLogin('normal')) {
|
||||
this.handleNavigate(url)
|
||||
}
|
||||
}
|
||||
@@ -253,17 +253,10 @@ export default {
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
|
||||
|
||||
.interact-item-img {
|
||||
width: 52rpx !important;
|
||||
height: 52rpx !important;
|
||||
// margin-bottom: !important;
|
||||
margin: 0 auto 6rpx auto !important;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-bottom: 6rpx;
|
||||
.interact-item-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
@@ -272,10 +265,17 @@ export default {
|
||||
text-align: center;
|
||||
|
||||
.interact-item {
|
||||
font-size: $font-sm;
|
||||
font-size: 24rpx;
|
||||
width: 25%;
|
||||
height: 160rpx;
|
||||
padding: 30rpx;
|
||||
flex: 0 0 25%;
|
||||
box-sizing: border-box;
|
||||
height: 150rpx;
|
||||
padding: 20rpx 8rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user