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

@@ -1,7 +1,7 @@
<template>
<view class="add-address">
<div class="uForm">
<u-form :border-bottom="false" :model="form" ref="uForm" :error-type="['toast']" :rule="rules">
<u-form :border-bottom="false" :model="form" ref="uForm" error-type="toast" :rules="rules">
<!-- #ifndef H5 -->
<view class="selectAddress" @click="clickUniMap">
选择收货地址
@@ -25,9 +25,7 @@
<u-form-item label="地址别名" label-width="130">
<u-input v-model="form.alias" placeholder="请输入地址别名" />
</u-form-item>
<u-checkbox-group shape="circle" size="30">
<u-checkbox :active-color="lightColor" v-model="form.isDefault">设为默认地址</u-checkbox>
</u-checkbox-group>
<u-checkbox usedAlone shape="circle" size="30" :active-color="lightColor" v-model:checked="form.isDefault" label="设为默认地址"></u-checkbox>
<div class="saveBtn" @click="save">保存</div>
</u-form>
@@ -144,33 +142,43 @@ export default {
// 保存当前 地址
save() {
this.$refs.uForm.validate((valid) => {
if (valid) {
let pages = getCurrentPages(); //获取页面栈
let beforePage = pages[pages.length - 2]; //上个页面
this.$refs.uForm.validate().then(() => {
const params = { ...this.form };
delete params.___path;
// 如果没有id则为新增地址
if (!this.form.id) {
// 删除没有的数据
delete this.form.___path;
addAddress(this.form).then((res) => {
if (res.data.success) {
uni.navigateBack();
}
});
} else {
// 修改地址
delete this.form.___path;
delete this.form.updateBy;
delete this.form.updateTime;
editAddress(this.form).then((res) => {
if (res.data.success) {
uni.navigateBack();
}
});
}
if (Array.isArray(params.consigneeAddressIdPath)) {
params.consigneeAddressIdPath = params.consigneeAddressIdPath.join(",");
}
});
if (Array.isArray(params.consigneeAddressPath)) {
params.consigneeAddressPath = params.consigneeAddressPath.join(",");
}
if (!params.id) {
addAddress(params).then((res) => {
if (res.data.success) {
uni.navigateBack();
} else {
uni.showToast({
title: res.data.message || "保存失败",
icon: "none",
});
}
});
} else {
delete params.updateBy;
delete params.updateTime;
editAddress(params).then((res) => {
if (res.data.success) {
uni.navigateBack();
} else {
uni.showToast({
title: res.data.message || "保存失败",
icon: "none",
});
}
});
}
}).catch(() => {});
},
// 三级地址联动回调
@@ -277,7 +285,7 @@ export default {
getAddressDetail(option.id).then((res) => {
const params = res.data.result;
params.___path = params.consigneeAddressPath;
this.$set(this, "form", params);
this["form"] = params;
if (this.$store.state.isShowToast){ uni.hideLoading() };
});

View File

@@ -119,14 +119,22 @@
background: $light-color;
position: fixed;
width: 690rpx;
bottom: 60rpx;
bottom: calc(60rpx + constant(safe-area-inset-bottom));
bottom: calc(60rpx + env(safe-area-inset-bottom));
height: 80rpx;
left: 30rpx;
font-size: 30rpx;
line-height: 80rpx;
.u-icon {
margin-right: 10rpx;
color: #fff;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 99;
overflow: hidden;
.btn-text {
margin-left: 12rpx;
line-height: 1;
}
}
}

View File

@@ -34,11 +34,11 @@
</view>
<view style="height: 100px"></view>
</view>
<button type="default" class="btn" @click="addAddress('')">
<u-icon name="plus-circle"></u-icon>
添加新收货人
</button>
<u-action-sheet :list="removeList" :tips="tips" v-model="showAction" @click="deleteAddressMessage"></u-action-sheet>
<view class="btn" @click="addAddress('')">
<u-icon name="plus-circle" color="#ffffff" size="18"></u-icon>
<text class="btn-text">添加新收货人</text>
</view>
<u-action-sheet :list="removeList" :tips="tips" v-model:show="showAction" @click="deleteAddressMessage"></u-action-sheet>
</view>
</template>

View File

@@ -34,12 +34,12 @@
<view style="height: 100px"></view>
</view>
<button type="default" class="btn" @click="addAddress('')">
<u-icon name="plus-circle"></u-icon>
添加新收货人
</button>
<view class="btn" @click="addAddress('')">
<u-icon name="plus-circle" color="#ffffff" size="18"></u-icon>
<text class="btn-text">添加新收货人</text>
</view>
<u-action-sheet :list="removeList" :tips="tips" v-model="showAction" @click="deleteAddressMessage"></u-action-sheet>
<u-action-sheet :list="removeList" :tips="tips" v-model:show="showAction" @click="deleteAddressMessage"></u-action-sheet>
</view>
</template>
@@ -86,7 +86,7 @@ export default {
* 进入页面检测当前账户是否登录
*/
onShow() {
if (this.$options.filters.tipsToLogin()) {
if (this.tipsToLogin()) {
this.getAddressList();
}
},

View File

@@ -16,7 +16,7 @@
</view>
<view style="height: 100px"></view>
</view>
<u-action-sheet :list="removeList" :tips="tips" v-model="showAction" @click="deleteAddressMessage"></u-action-sheet>
<u-action-sheet :list="removeList" :tips="tips" v-model:show="showAction" @click="deleteAddressMessage"></u-action-sheet>
</view>
</template>

View File

@@ -5,7 +5,7 @@
<view class="wrapper-show-money">
<view class="money-view">
<h3>预存款金额 </h3>
<view class="money">{{walletNum | unitPrice }}</view>
<view class="money">{{unitPrice(walletNum) }}</view>
</view>
</view>
@@ -20,9 +20,9 @@
<!-- <view class="-number">{{logItem.detail}}</view> -->
</view>
<view class="view-item-change">
<view class="-money green" v-if="logItem.serviceType == 'WALLET_PAY' || logItem.serviceType == 'WALLET_WITHDRAWAL'"> {{logItem.money | unitPrice}} </view>
<view class="-money green" v-if="logItem.serviceType == 'WALLET_PAY' || logItem.serviceType == 'WALLET_WITHDRAWAL'"> {{unitPrice(logItem.money)}} </view>
<view class="-money" v-if="logItem.serviceType == 'WALLET_REFUND' || logItem.serviceType == 'WALLET_RECHARGE' || logItem.serviceType == 'WALLET_COMMISSION' ">
+{{logItem.money | unitPrice}} </view>
+{{unitPrice(logItem.money)}} </view>
<view class="-time">{{logItem.createTime}}</view>
</view>
</view>

View File

@@ -1,13 +1,13 @@
<template>
<view class="wrapper">
<u-cell-group>
<u-cell-item title="申请单号"></u-cell-item>
<u-cell-item title="提现金额" value="新版本"></u-cell-item>
<u-cell-item title="收款银行"></u-cell-item>
<u-cell-item title="收款账号" value="新版本"></u-cell-item>
<u-cell-item title="开户人姓名"></u-cell-item>
<u-cell-item title="创建时间" value="新版本"></u-cell-item>
<u-cell-item title="提现状态" value="新版本"></u-cell-item>
<u-cell title="申请单号"></u-cell>
<u-cell title="提现金额" value="新版本"></u-cell>
<u-cell title="收款银行"></u-cell>
<u-cell title="收款账号" value="新版本"></u-cell>
<u-cell title="开户人姓名"></u-cell>
<u-cell title="创建时间" value="新版本"></u-cell>
<u-cell title="提现状态" value="新版本"></u-cell>
</u-cell-group>
</view>
</template>

View File

@@ -1,9 +1,9 @@
<template>
<div class="wrapper">
<u-navbar :custom-back="back" title="余额"></u-navbar>
<u-navbar :auto-back="false" @leftClick="back" title="余额"></u-navbar>
<div class="box">
<div class="deposit">预存款金额</div>
<div class="money">{{walletNum | unitPrice }}</div>
<div class="money">{{unitPrice(walletNum) }}</div>
<div class="operation-btns">
<div class="operation-btn light" @click="navigateTo('/pages/mine/deposit/withdrawal')">提现</div>
<div class="operation-btn" @click="navigateTo('/pages/mine/deposit/recharge')">充值</div>
@@ -33,11 +33,11 @@ export default {
};
},
async onShow() {
if (this.$options.filters.isLogin("auth")) {
if (this.isLogin("auth")) {
let result = await getUserWallet(); //预存款
this.walletNum = result.data.result.memberWallet;
} else {
this.$options.filters.navigateToLogin("redirectTo");
this.navigateToLogin("redirectTo");
}
},
methods: {

View File

@@ -8,7 +8,7 @@
<view class="-number" v-if="item.inspectRemark || item.errorMessage">{{ item.inspectRemark || item.errorMessage }}</view>
</view>
<view class="view-item-change">
<view class="-money">-{{ item.applyMoney | unitPrice }}</view>
<view class="-money">-{{unitPrice(item.applyMoney) }}</view>
<view class="-time">{{ item.createTime || item.inspectTime || "" }}</view>
<view v-if="item.applyStatus === 'WAIT_USER_CONFIRM'" class="confirm-btn" @click.stop="confirmWechatReceive(item)">确认收款</view>
</view>

View File

@@ -18,7 +18,7 @@
<view class="all">
<view @click="handleAll" :style="{ color: $mainColor }">全部</view>
<view style="font-size: 24rpx; color: #999">可提现金额<span>{{ walletNum | unitPrice }}</span></view>
<view style="font-size: 24rpx; color: #999">可提现金额<span>{{unitPrice(walletNum) }}</span></view>
</view>
</view>

View File

@@ -11,7 +11,7 @@
? "通过"
: "拒绝"
}}</view>
<view class="price">+{{ item.price | unitPrice }}</view>
<view class="price">+{{unitPrice(item.price) }}</view>
</view>
<view class="log-item-view">
<view>{{ item.createTime }}</view>
@@ -24,7 +24,7 @@
<view class="log-item">
<view class="log-item-view">
<view class="title">{{ item.goodsName }}</view>
<view class="price">提成金额+{{ item.rebate | unitPrice }}</view>
<view class="price">提成金额+{{unitPrice(item.rebate) }}</view>
</view>
<view class="log-item-view">
<view>创建时间{{ item.createTime }}</view>

View File

@@ -3,9 +3,9 @@
<view class="nav-list">
<view class="total">可提现金额</view>
<view class="price">{{ distributionData.canRebate | unitPrice }}</view>
<view class="price">{{unitPrice(distributionData.canRebate) }}</view>
<view class="frozen"
>冻结金额{{ distributionData.commissionFrozen | unitPrice }}</view
>冻结金额{{unitPrice(distributionData.commissionFrozen) }}</view
>
</view>
<view class="nav">
@@ -122,9 +122,7 @@ export default {
flex-direction: column;
align-items: center;
justify-content: center;
> * {
margin: 10rpx 0;
}
gap: 20rpx;
width: 33%;
// color: #fff;
}

View File

@@ -1,7 +1,7 @@
<template>
<view class="wrapper">
<!-- 筛选弹出层 TODO后续版本更新 -->
<!-- <u-popup width="90%" v-model="popup" mode="right">
<!-- <u-popup width="90%" v-model:show="popup" mode="right">
<view class="screen-title">商品筛选</view>
<view class="screen-view">
@@ -67,8 +67,9 @@
<view class="goods-list">
<scroll-view class="body-view" scroll-y @scrolltolower="renderDate">
<u-swipe-action v-for="(item, index) in goodsList" :disabled="!params.checked" :show="item.___selected" @open="openAction(item)" :index="index" :options="options" bg-color="#fff"
ref="swiperAction" :key="item.id" @click="changeActionTab(item)">
<u-swipe-action v-for="(item, index) in goodsList" ref="swiperAction" :key="item.id">
<u-swipe-action-item :disabled="!params.checked" :show="item.___selected" @open="openAction(item)" :name="index" :options="options"
@click="changeActionTab(item)">
<div class="goods-item">
<view class="goods-item-img" @click="handleNavgationGoods(item)">
@@ -82,7 +83,7 @@
<!-- 商品金额 -->
<view class="-item-price" @click="handleNavgationGoods(item)">
佣金:
<span> {{ item.commission | unitPrice }}</span>
<span> {{unitPrice(item.commission) }}</span>
</view>
<!-- 比率佣金 -->
<view class="-item-bottom">
@@ -92,7 +93,7 @@
<span>{{ "5.00%" }}</span>
</view> -->
<view class="-item-yj">
<span>{{ item.price | unitPrice }}</span>
<span>{{unitPrice(item.price) }}</span>
</view>
</view>
<view>
@@ -102,6 +103,7 @@
</view>
</view>
</div>
</u-swipe-action-item>
</u-swipe-action>
</scroll-view>
@@ -112,7 +114,7 @@
</view>
<canvas class="canvas-hide" canvas-id="qrcode" />
<drawCanvas ref="drawCanvas" v-if="showFlag" :res="res" />
<u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal>
<u-modal v-model:show="deleteShow" :confirm-style="{'color':lightColor}" @confirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal>
</view>
</template>
@@ -215,9 +217,9 @@ export default {
*/
openAction(val) {
this.goodsList.forEach((item) => {
this.$set(item, "___selected", false);
item["___selected"] = false;
});
this.$set(val, "___selected", true);
val["___selected"] = true;
},
/**
@@ -242,7 +244,7 @@ export default {
let callback = result.data.result;
this.res.container.title = `${goods.goodsName}`;
this.res.bottom.code = `data:image/png;base64,${callback}`;
this.res.bottom.price = this.$options.filters.unitPrice(
this.res.bottom.price = this.unitPrice(
goods.price,
"¥"
);
@@ -294,7 +296,7 @@ export default {
distributionGoods(this.params).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) {
res.data.result.records.forEach((item) => {
this.$set(item, "___selected", false);
item["___selected"] = false;
});
this.goodsList.push(...res.data.result.records);
}

View File

@@ -11,7 +11,7 @@
<view class="all">
<view @click="handleAll" :style="{ color: $mainColor }">全部</view>
<view style="font-size: 24rpx; color: #999"
>可提现金额<span>{{ distributionData.canRebate | unitPrice }}</span
>可提现金额<span>{{unitPrice(distributionData.canRebate) }}</span
></view
>
</view>

View File

@@ -1,6 +1,6 @@
<template>
<div class="wrapper">
<u-parse :show-with-animation="true" :lazy-load="true" :selectable="true" :html="res.content" v-if="res"></u-parse>
<u-parse :lazy-load="true" :selectable="true" :content="res.content" v-if="res"></u-parse>
</div>
</template>

View File

@@ -35,8 +35,7 @@
JSON.parse(item.text)['goodsName']
}}</text>
</view>
<view class="goods-desc-rice" >{{
JSON.parse(item.text)['price'] | unitPrice
<view class="goods-desc-rice" >{{unitPrice(JSON.parse(item.text)['price'])
}}
</view>
</view>
@@ -52,8 +51,7 @@
<div class="wes-2" >{{
order.name
}}</div>
<div class="main-color goods-desc-rice">{{
order.goodsPrice | unitPrice("¥")
<div class="main-color goods-desc-rice">{{unitPrice(order.goodsPrice, "¥")
}}</div>
</view>
@@ -145,8 +143,7 @@
goodListData.goodsName
}}</text>
</view>
<view class="goods-desc-rice" > {{
goodListData.price | unitPrice
<view class="goods-desc-rice" > {{unitPrice(goodListData.price)
}}
</view>
</view>

View File

@@ -6,13 +6,15 @@
<div class="bagbar">{{$u.timeFormat(row.send_time, 'yyyy-mm-dd')}}</div>
</div>
<u-card @click="goDetail(row.sn,row.logi_id,row.ship_no)" :title="title" title-color="#666666" title-size="24" sub-title-color="#666666" sub-title-size="24" :border="false" :sub-title=row.status>
<view class="msg-body" slot="body">
<template #body>
<view class="msg-body">
<image class="msgImg" :src="row.goods_img" mode=""></image>
<view class="msgView">
<view>{{row.goodsName}}</view>
<view class="msgNum">订单号:{{row.sn}}</view>
</view>
</view>
</view>
</template>
</u-card>
</view>
</block>
@@ -99,7 +101,7 @@ export default {
color: #fff;
font-size: 24rpx;
padding: 10rpx 20rpx;
background: $u-type-info-disabled;
background: $u-info-disabled;
}
.storeImg {
width: 100%;

View File

@@ -10,11 +10,11 @@
</div>
<div class="msgMsg">{{$u.timeFormat(row.send_time, 'yyyy-mm-dd')}}</div>
<u-card :title="title" :title-size="35" :border="false">
<view class slot="body">
<template #body>
<view class="u-body-item u-flex u-row-between u-p-b-0">
<view class="u-body-item-title u-line-2">{{row.content}}</view>
</view>
</view>
</template>
</u-card>
</view>
</block>

View File

@@ -1,60 +1,96 @@
<template>
<view class="content">
<u-navbar>
<u-tabs :active-color="lightColor" class="slot-wrap" :list="navList" count="count" :is-scroll="true" :current="tabCurrentIndex" @change="tabClick"></u-tabs>
<u-navbar
:fixed="true"
:placeholder="true"
:border="false"
left-icon=""
title=""
>
<template #center>
<view class="slot-wrap">
<u-tabs
:active-color="lightColor"
class="collect-tabs"
:list="navList"
:is-scroll="true"
:current="tabCurrentIndex"
@change="tabClick"
></u-tabs>
</view>
</template>
</u-navbar>
<view class="swiper-box">
<view class="collect-body">
<!-- 显示商品栏 -->
<view v-if="tabCurrentIndex == 0" class="tab-content">
<scroll-view class="list-scroll-content" scroll-y>
<!-- 空白页 -->
<u-empty style="margin-top: 40rpx" text="暂无收藏商品数据" mode="favor" v-if="goodsEmpty"></u-empty>
<!-- 商品展示数据 -->
<u-swipe-action @open="openLeftChange(item, index, 'goods')" :show="item.selected" btn-width="180"
:options="LeftOptions" v-else v-for="(item, index) in goodList"
@click="clickGoodsSwiperAction(item, index)" :index="index" :key="index">
<view class="goods" @click="goGoodsDetail(item)">
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
<u-loading slot="loading"></u-loading>
</u-image>
<view class="goods-intro">
<view>{{ item.goodsName }}</view>
<view class="goods-sn">{{ item.goods_sn }}</view>
<view>{{ item.price | unitPrice }}</view>
</view>
</view>
</u-swipe-action>
<template v-else>
<u-swipe-action
v-for="(item, index) in goodList"
:key="index"
class="collect-swipe"
>
<u-swipe-action-item
@open="openLeftChange(item, 'goods')"
:show="item.selected"
:options="LeftOptions"
@click="clickGoodsSwiperAction(item, index)"
:name="index"
>
<view class="goods" @click="goGoodsDetail(item)">
<u-image width="131rpx" height="131rpx" :src="item.image" mode="aspectFit">
<template #loading><u-loading></u-loading></template>
</u-image>
<view class="goods-intro">
<view class="goods-name">{{ item.goodsName }}</view>
<view class="goods-sn">{{ item.goods_sn }}</view>
<view class="goods-price">{{ unitPrice(item.price) }}</view>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</template>
</scroll-view>
</view>
<!-- 显示收藏的店铺栏 -->
<view v-else class="tab-content">
<scroll-view class="list-scroll-content" scroll-y>
<!-- 空白页 -->
<u-empty style="margin-top: 40rpx" text="暂无收藏店铺数据" mode="favor" v-if="storeEmpty"></u-empty>
<!-- 店铺展示数据 -->
<u-swipe-action @open="openLeftChange(item, 'store')" :show="item.selected" btn-width="180"
:options="LeftOptions" v-else v-for="(item, index) in storeList" :key="index"
@click="clickStoreSwiperAction(item)">
<view class="store" @click="goStoreMainPage(item.id)">
<view class="intro">
<view class="store-logo">
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
mode="aspectFit">
<u-loading slot="loading"></u-loading>
</u-image>
<template v-else>
<u-swipe-action
v-for="(item, index) in storeList"
:key="index"
class="collect-swipe"
>
<u-swipe-action-item
@open="openLeftChange(item, 'store')"
:show="item.selected"
:options="LeftOptions"
@click="clickStoreSwiperAction(item)"
:name="index"
>
<view class="store" @click="goStoreMainPage(item.id)">
<view class="intro">
<view class="store-logo">
<u-image width="102rpx" height="102rpx" :src="item.storeLogo" :alt="item.storeName"
mode="aspectFit">
<template #loading><u-loading></u-loading></template>
</u-image>
</view>
<view class="store-name">
<view>{{ item.storeName }}</view>
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated"
text="自营" mode="plain" shape="circle" />
</view>
<view class="store-collect">
<view>进店逛逛</view>
</view>
</view>
</view>
<view class="store-name">
<view>{{ item.storeName }}</view>
<u-tag size="mini" type="error" :color="$mainColor" v-if="item.selfOperated"
text="自营" mode="plain" shape="circle" />
</view>
<view class="store-collect">
<view>进店逛逛</view>
</view>
</view>
</view>
</u-swipe-action>
</u-swipe-action-item>
</u-swipe-action>
</template>
</scroll-view>
</view>
</view>
@@ -138,16 +174,10 @@
* 打开商品左侧取消收藏
*/
openLeftChange(val, type) {
const {
goodList,
storeList
} = this;
let way;
type == "goods" ? (way = goodList) : (way = storeList);
const way = type === "goods" ? this.goodList : this.storeList;
way.forEach((item) => {
this.$set(item, "selected", false);
item.selected = false;
});
this.$set(val, "selected", false);
val.selected = true;
},
@@ -280,19 +310,30 @@
height: 100%;
}
.slot-wrap{
flex: 1;
display: flex;
justify-content: center;
padding-right: 72rpx;
}
.content {
width: 100%;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.slot-wrap {
width: 100%;
display: flex;
justify-content: center;
}
.collect-tabs {
width: 100%;
}
.swiper-box {
overflow-y: auto;
.collect-body {
flex: 1;
min-height: 0;
}
.tab-content {
height: 100%;
}
.list-scroll-content {
@@ -300,63 +341,52 @@
width: 100%;
}
::v-deep .u-swipe-content {
.collect-swipe,
:deep(.u-swipe-action),
:deep(.u-swipe-action-item),
:deep(.u-swipe-action-item__content) {
width: 100%;
}
:deep(.u-swipe-action-item__content) {
overflow: hidden;
}
.goods {
background-color: #fff;
border-bottom: 1px solid $border-color-light;
height: 190rpx;
min-height: 190rpx;
box-sizing: border-box;
display: flex;
align-items: center;
padding: 30rpx 20rpx;
margin-top: 20rpx;
image {
width: 131rpx;
height: 131rpx;
border-radius: 10rpx;
}
width: 100%;
.goods-intro {
flex: 1;
min-width: 0;
font-size: $font-base;
line-height: 48rpx;
margin-left: 30rpx;
view:nth-child(1) {
.goods-name {
line-height: 1.4em;
font-size: 24rpx;
max-height: 2.8em; //height是line-height的整数倍防止文字显示不全
max-height: 2.8em;
overflow: hidden;
color: #666;
}
view:nth-child(2) {
.goods-sn {
color: #cccccc;
font-size: 24rpx;
}
view:nth-child(3) {
.goods-price {
color: $light-color;
}
}
button {
color: $main-color;
height: 50rpx;
width: 120rpx;
font-size: $font-sm;
padding: 0;
line-height: 50rpx;
background-color: #ffffff;
margin-top: 80rpx;
&::after {
border-color: $main-color;
}
}
}
.store {
@@ -364,90 +394,42 @@
border: 1px solid $border-color-light;
border-radius: 16rpx;
margin: 20rpx 10rpx;
width: calc(100% - 20rpx);
box-sizing: border-box;
.intro {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 30rpx 0 40rpx;
height: 170rpx;
min-height: 170rpx;
.store-logo {
width: 102rpx;
height: 102rpx;
border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
border-radius: 50%;
}
flex-shrink: 0;
}
.store-name {
flex: 1;
min-width: 0;
margin-left: 30rpx;
line-height: 2em;
:first-child {
font-size: $font-base;
}
:last-child {
font-size: $font-sm;
color: #999;
}
}
.store-collect {
flex-shrink: 0;
border-left: 1px solid $border-color-light;
padding-left: 20rpx;
text-align: center;
:last-child {
color: #999;
font-size: $font-sm;
}
}
}
}
.navbar {
display: flex;
height: 40px;
padding: 0 5px;
background: #fff;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
position: relative;
z-index: 10;
.nav-item {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
font-size: 26rpx;
text {
position: relative;
}
text.current {
color: $light-color;
font-weight: bold;
font-size: 28rpx;
&::after {
content: "";
position: absolute;
left: 20rpx;
bottom: -10rpx;
width: 30rpx;
height: 0;
border-bottom: 2px solid $light-color;
}
color: #999;
font-size: $font-sm;
}
}
}

View File

@@ -1,48 +1,56 @@
<template>
<view class="myTracks">
<u-navbar title="我的足迹">
<div slot="right">
<template #right>
<div class="light-color edit" @click="isEdit = !isEdit">{{ !isEdit ? '编辑' : '完成'}}</div>
</div>
</template>
</u-navbar>
<u-notice-bar mode="vertical" :list="['右划删除浏览记录']"></u-notice-bar>
<view class="tracks-tip">
<u-icon name="volume" color="#f9ae3d" size="19"></u-icon>
<text class="tracks-tip-text">右划删除浏览记录</text>
</view>
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else>
<view v-for="(item, index) in trackList" :key="index">
<view class="myTracks-title" @click="navigateToStore(item)">{{item.storeName}}</view>
<view class="myTracks-items">
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
@click="delTracks" @open="open" :options="options">
<view v-else class="tracks-list">
<block v-for="(item, index) in trackList" :key="index">
<view class="myTracks-title" @click="navigateToStore(item)">{{ item.storeName }}</view>
<u-swipe-action class="myTracks-swipe">
<u-swipe-action-item
:show="item.show"
:name="index"
@click="delTracks"
@open="open"
:options="options"
>
<view class="myTracks-item">
<u-checkbox-group v-if="isEdit" class="store-line-check">
<u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
@change="checkboxChangeDP(item)"></u-checkbox>
<u-checkbox
usedAlone
shape="circle"
:active-color="lightColor"
v-model:checked="item.checked"
@change="checkboxChangeDP(item)"
></u-checkbox>
</u-checkbox-group>
<view class="myTracks-item-img" @click.stop="navigateToDetail(item)">
<image :src="item.thumbnail"></image>
<image class="track-thumb" :src="item.thumbnail"></image>
</view>
<view class="myTracks-item-content" @click.stop="navigateToDetail(item)">
<view class="myTracks-item-title">
{{ item.goodsName }}
<view class="myTracks-item-title-desc"> </view>
</view>
<view class="myTracks-item-price">
{{ item.price | unitPrice }}
{{ unitPrice(item.price) }}
</view>
</view>
</view>
</u-swipe-action>
</view>
</u-swipe-action-item>
</u-swipe-action>
<view class="myTracks-divider"></view>
</view>
<div @click="handleClickDeleteSelected" v-if="isEdit" class="submit">
</block>
<view v-if="isEdit" class="submit" @click="handleClickDeleteSelected">
删除所选
</div>
</div>
</view>
</view>
</view>
</template>
@@ -163,8 +171,11 @@
/**
* 删除足迹
*/
delTracks(index,ids) {
deleteHistoryListId(ids || this.trackList[index].goodsId).then((res) => {
delTracks(e, ids) {
const index = typeof e === 'object' ? (e.name ?? e.index) : e;
const goodsId = ids || this.trackList[index]?.goodsId;
if (!goodsId) return;
deleteHistoryListId(goodsId).then((res) => {
if (res.data.code == 200) {
this.trackList = [];
this.params.pageNumber = 1
@@ -183,9 +194,10 @@
</script>
<style lang="scss" scoped>
.submit{
.submit {
position: fixed;
bottom: 20rpx;
bottom: calc(20rpx + constant(safe-area-inset-bottom));
bottom: calc(20rpx + env(safe-area-inset-bottom));
left: 10%;
width: 80%;
height: 80rpx;
@@ -195,110 +207,110 @@
align-items: center;
justify-content: center;
background: $light-color;
z-index: 99;
}
.myTracks {
width: 100%;
padding-top: 2rpx;
}
.tracks-tip {
display: flex;
align-items: center;
padding: 18rpx 24rpx;
background: #fdf6ec;
}
.tracks-tip-text {
margin-left: 10rpx;
font-size: 28rpx;
color: #f9ae3d;
line-height: 1.4;
}
.tracks-list {
width: 100%;
}
.myTracks-swipe,
:deep(.u-swipe-action),
:deep(.u-swipe-action-item),
:deep(.u-swipe-action-item__content) {
width: 100%;
}
:deep(.u-swipe-action-item__content) {
overflow: hidden;
}
.myTracks-title {
width: 100%;
height: 110rpx;
padding-left: 20rpx;
padding: 0 20rpx;
font-size: 28rpx;
color: #666;
font-weight: bold;
background-color: #fff;
align-items: center;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.myTracks-items {
padding-top: 2rpx;
align-items: center;
display: -webkit-box;
display: -webkit-flex;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.myTracks-item {
width: 100%;
height: 226rpx;
padding-left: 20rpx;
padding-right: 20rpx;
margin-bottom: 2rpx;
// border-radius: 6/@px;
min-height: 226rpx;
padding: 30rpx 20rpx;
background-color: #fff;
position: relative;
align-items: center;
display: -webkit-box;
display: -webkit-flex;
box-sizing: border-box;
display: flex;
align-items: center;
}
.store-line-check {
margin-right: 16rpx;
flex-shrink: 0;
}
.myTracks-item-img {
margin-right: 20rpx;
border-radius: 8rpx;
flex-shrink: 0;
image {
.track-thumb {
width: 130rpx;
height: 130rpx;
border-radius: 8rpx;
display: block;
}
}
.myTracks-item-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
justify-content: center;
}
.myTracks-item-title {
font-size: 28rpx;
color: #333;
}
.myTracks-item-title-desc {
font-size: 28rpx;
color: #999;
line-height: 1.4;
}
.myTracks-item-price {
font-size: 28rpx;
color: $light-color;
padding: 10rpx 0 0 0;
}
.myTracks-action {
display: flex;
justify-content: space-between;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
height: 75rpx;
align-items: center;
padding: 0 32rpx;
}
.myTracks-action-btn {
width: 130rpx;
height: 60rpx;
line-height: 60rpx;
padding-top: 10rpx;
}
.myTracks-divider {
width: 100%;
height: 20rpx;
background: #f5f5f5;
}
.myTracks-action-check {
align-items: center;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.edit{
padding-right: 32rpx;
.edit {
padding-right: 32rpx;
}
</style>

View File

@@ -8,24 +8,27 @@
</view>
</view>
<u-row class="portrait-box2">
<u-col span="6" class="portrait-box2-col" :gutter="16">
<view class="point-summary">
<view class="point-summary-item">
<text>累计获得</text>
<text class="pcolor">{{ pointData.totalPoint || 0 }}</text>
</u-col>
<u-col span="6" class="portrait-box2-col">
</view>
<view class="point-summary-divider"></view>
<view class="point-summary-item">
<text>剩余积分</text>
<text class="pcolor">{{ pointData.point || 0 }}</text>
</u-col>
</u-row>
</view>
</view>
<div class="point-list">
<view class="point-item" v-for="(item, index) in pointList" :key="index">
<view>
<view class="point-item-left">
<view class="point-label">{{ item.content }}</view>
<view>{{ item.createTime}}</view>
<view class="point-item-time">{{ item.createTime }}</view>
</view>
<view class="point-item-value" :class="[item.pointType == 'INCREASE' ? 'plus' : 'reduce']">
<text>{{ item.pointType == "INCREASE" ? "+" : "-" }}</text>{{ item.variablePoint }}
</view>
<view :class="[item.pointType == 'INCREASE' ? 'plus' : 'reduce']"><span>{{item.pointType == "INCREASE" ? '+' : '-'}}</span>{{ item.variablePoint }}</view>
</view>
<uni-load-more :status="count.loadStatus"></uni-load-more>
</div>
@@ -76,11 +79,11 @@ export default {
if (res.data.success) {
let data = res.data.result.records;
if (data.length < 10) {
this.$set(this.count, "loadStatus", "noMore");
this.count["loadStatus"] = "noMore";
this.pointList.push(...data);
} else {
this.pointList.push(...data);
if (data.length < 10) this.$set(this.count, "loadStatus", "noMore");
if (data.length < 10) this.count["loadStatus"] = "noMore";
}
}
});
@@ -99,8 +102,8 @@ export default {
</script>
<style lang="scss" scoped>
.point-list{
margin-top: 50rpx;
.point-list {
margin-top: 20rpx;
}
.title {
height: 80rpx;
@@ -120,45 +123,61 @@ export default {
.point-item {
width: 100%;
height: 130rpx;
padding: 0 20rpx;
min-height: 130rpx;
padding: 24rpx 20rpx;
background: #ffffff;
font-size: $font-sm;
border-bottom: 1px solid $border-color-light;
display: flex;
justify-content: end;
justify-content: space-between;
align-items: center;
> view:nth-child(1) {
box-sizing: border-box;
.point-item-left {
flex: 1;
min-width: 0;
line-height: 40rpx;
view {
color: #666666;
}
:last-child {
color: #999;
}
}
> view:nth-child(2) {
.point-item-time {
color: #999;
}
.point-item-value {
flex-shrink: 0;
width: 100rpx;
text-align: center;
}
}
.portrait-box2 {
height: 100rpx;
.point-summary {
display: flex;
align-items: center;
min-height: 100rpx;
padding: 28rpx 0;
background: #ffffff;
border-radius: 0 0 20rpx 20rpx;
margin: 0 20rpx;
font-size: 26rpx;
::v-deep .u-col {
text-align: center !important;
box-sizing: border-box;
.point-summary-item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
::v-deep .u-col:first-child {
border-right: 1px solid $border-color-light;
.point-summary-divider {
width: 1px;
height: 48rpx;
background: $border-color-light;
flex-shrink: 0;
}
.pcolor {
color: $light-color;
margin-left: 8rpx;
}
}
@@ -222,8 +241,9 @@ export default {
}
}
.point-label{
font-weight: bold;
margin-bottom: 10rpx;
.point-label {
font-weight: bold;
margin-bottom: 10rpx;
color: #666666;
}
</style>

View File

@@ -15,15 +15,15 @@
<!-- {{localVersion}} -->
<u-cell-group class="cell" :border="false">
<!-- #ifdef APP-PLUS -->
<u-cell-item v-if="IosWhether" @click="checkStar" title="去评分"></u-cell-item>
<u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
<u-cell v-if="IosWhether" @click="checkStar" title="去评分"></u-cell>
<u-cell title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell>
<u-cell title="检查更新" @click="checkUpdate"></u-cell>
<!-- #endif -->
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=LICENSE_INFORMATION')"></u-cell-item>
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')"></u-cell-item>
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=PRIVACY_POLICY')"></u-cell-item>
<u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=ABOUT')"></u-cell-item>
<u-cell title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=LICENSE_INFORMATION')"></u-cell>
<u-cell title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')"></u-cell>
<u-cell title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=PRIVACY_POLICY')"></u-cell>
<u-cell title="关于我们" :border="false" @click="navigateTo('/pages/mine/help/tips?type=ABOUT')"></u-cell>
</u-cell-group>

View File

@@ -9,7 +9,7 @@
<div class="feedBack-box">
<h4>问题反馈 <span style="margin-left:10rpx;" v-if="feedBack.type">@{{ list.find(item=>{return item.value == feedBack.type }).text }}</span></h4>
<u-input class="field-input" height="500" :border-bottom="false" v-model="feedBack.context" type="textarea" placeholder="请输入反馈信息">
<u-input class="field-input" height="500" border="none" v-model="feedBack.context" type="textarea" placeholder="请输入反馈信息">
</u-input>
</div>
@@ -18,14 +18,14 @@
<view class="opt-view">
<view class="img-title">上传凭证最多2张</view>
<view class="images-view">
<u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150" @on-uploaded="onUploaded" :max-count="2" :show-progress="false"></u-upload>
<u-upload :file-list="uploadFileList" :auto-upload="false" width="150" @afterRead="onUploadAfterRead" :max-count="2"></u-upload>
</view>
</view>
</div>
<div class="feedBack-box">
<h4>手机号</h4>
<u-input :border-bottom="false" v-model="feedBack.mobile" placeholder="请输入您的手机号">
<u-input border="none" v-model="feedBack.mobile" placeholder="请输入您的手机号">
</u-input>
</div>
@@ -38,7 +38,7 @@
import storage from "@/utils/storage.js";
import config from "@/config/config";
import { feedBack } from "@/api/members.js";
import { upload } from "@/api/common.js";
import { handleUploadAfterRead } from "@/utils/uploadHelper.js";
export default {
data() {
return {
@@ -47,7 +47,7 @@ export default {
feedBack: {
type: "FUNCTION", //默认反馈问题为 '功能相关'
},
action: upload, //图片上传地址
uploadFileList: [],
list: [
{ text: "功能相关", value: "FUNCTION" },
{ text: "优化反馈", value: "OPTIMIZE" },
@@ -58,16 +58,13 @@ export default {
methods: {
// 点击反馈内容
handleClick(index) {
this.$set(this.feedBack, "type", this.list[index].value);
this.feedBack["type"] = this.list[index].value;
},
//图片上传
onUploaded(lists) {
let images = [];
lists.forEach((item) => {
images.push(item.response.result);
onUploadAfterRead(event) {
handleUploadAfterRead(event, this.uploadFileList, (urls) => {
this.feedBack.images = urls.join(",");
});
this.feedBack.images = images.join(",");
},
/**

View File

@@ -17,7 +17,7 @@
<u-form-item label="生日" label-width="150" right-icon="arrow-right">
<div style="width: 100%;" @click="showBirthday = true">{{ birthday || '请选择出生日期' }}</div>
<u-picker v-model="showBirthday" mode="time" :confirm-color="lightColor" @confirm="selectTime"></u-picker>
<u-picker v-model:show="showBirthday" mode="time" :confirm-color="lightColor" @confirm="selectTime"></u-picker>
</u-form-item>
<u-form-item label="城市" label-width="150" placeholder="请选择城市" right-icon="arrow-right">
<div style="width: 100%;" @click="clickRegion">{{ form.___path || '请选择城市' }}</div>
@@ -44,10 +44,9 @@
import { saveUserInfo, getUserInfo } from "@/api/members.js";
import { upload } from "@/api/common.js";
import storage from "@/utils/storage.js";
import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue";
import city from "@/components/m-city/m-city.vue";
export default {
components: { uFormItem, "m-city": city },
components: { "m-city": city },
data() {
return {
lightColor: this.$lightColor, //高亮颜色
@@ -83,7 +82,7 @@ export default {
* 退出登录
*/
quiteLoginOut() {
this.$options.filters.quiteLoginOut();
this.quiteLoginOut();
},
/**
@@ -157,11 +156,9 @@ export default {
* 选择地址
*/
selectRegion(region) {
this.$set(
this.form,
"address",
`${region.province.label} ${region.city.label} ${region.area.label}`
);
this.form["address"] = `${region.province.label} ${region.city.label} ${region.area.label}`
;
},
/**

View File

@@ -15,8 +15,8 @@
<u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
<u-input v-model="codeForm.code" placeholder="请输入验证码" />
<u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
ref="uCode" @change="codeChange"></u-verification-code>
<u-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
ref="uCode" @change="codeChange"></u-code>
<view @tap="getCode" class="text-tips">{{ tips }}</view>
</u-form-item>

View File

@@ -15,8 +15,8 @@
<u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
<u-input v-model="codeForm.code" placeholder="请输入验证码" />
<u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
ref="uCode" @change="codeChange"></u-verification-code>
<u-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
ref="uCode" @change="codeChange"></u-code>
<view @tap="getCode" class="text-tips">{{ tips }}</view>
</u-form-item>
@@ -197,7 +197,7 @@
/**判断是否是当前用户的手机号 */
isUserPhone() {
let flage = false;
let user = this.$options.filters.isLogin();
let user = this.isLogin();
if (user.mobile != this.codeForm.mobile) {
uni.showToast({
title: "请输入当前绑定手机号",

View File

@@ -2,9 +2,11 @@
<template>
<view class="face-login">
<u-cell-group>
<u-cell-item class="border-top" :arrow="false" title="面容登录">
<u-switch slot="right-icon" @change="faceSwitchChange" active-color="#1abc9c" size="40" v-model="checked"></u-switch>
</u-cell-item>
<u-cell class="border-top" :isLink="false" title="面容登录">
<template #right-icon>
<u-switch @change="faceSwitchChange" active-color="#1abc9c" size="40" v-model="checked"></u-switch>
</template>
</u-cell>
</u-cell-group>
<view class="describe">开启后可使用面容认证完成快捷登录设置仅对本机生效</view>
</view>

View File

@@ -2,9 +2,11 @@
<template>
<view class="finger">
<u-cell-group>
<u-cell-item class="border-top" :arrow="false" title="指纹登录">
<u-switch slot="right-icon" @change="fingerSwitchChange" :active-color="lightColor" size="40" v-model="checked"></u-switch>
</u-cell-item>
<u-cell class="border-top" :isLink="false" title="指纹登录">
<template #right-icon>
<u-switch @change="fingerSwitchChange" :active-color="lightColor" size="40" v-model="checked"></u-switch>
</template>
</u-cell>
</u-cell-group>
<view class="describe">开启后可使用指纹认证完成快捷登录设置仅对本机生效如需修改指纹请在系统设置中操作</view>
</view>

View File

@@ -1,8 +1,8 @@
<template>
<view class="securityCenter">
<u-cell-group>
<u-cell-item title="修改密码" @click="navigateTo('/pages/mine/set/securityCenter/updatePwdTab')"></u-cell-item>
<u-cell-item title="注销账户" @click="zhuxiao"></u-cell-item>
<u-cell title="修改密码" @click="navigateTo('/pages/mine/set/securityCenter/updatePwdTab')"></u-cell>
<u-cell title="注销账户" @click="zhuxiao"></u-cell>
</u-cell-group>
</view>
</template>

View File

@@ -1,8 +1,8 @@
<template>
<view class="securityCenter">
<u-cell-group>
<u-cell-item title="验证密码" @click="navigateTo('/pages/mine/set/securityCenter/editLoginPassword')"></u-cell-item>
<u-cell-item title="验证手机号" @click="navigateTo('/pages/mine/set/securityCenter/editPassword')"></u-cell-item>
<u-cell title="验证密码" @click="navigateTo('/pages/mine/set/securityCenter/editLoginPassword')"></u-cell>
<u-cell title="验证手机号" @click="navigateTo('/pages/mine/set/securityCenter/editPassword')"></u-cell>
</u-cell-group>
</view>
</template>

View File

@@ -13,16 +13,16 @@
<!-- #endif -->
<u-cell-group :border="false">
<!-- #ifdef APP-PLUS -->
<u-cell-item title="清除缓存" :value="fileSizeString" @click="clearCache"></u-cell-item>
<u-cell title="清除缓存" :value="fileSizeString" @click="clearCache"></u-cell>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item>
<u-cell title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell>
<!-- #endif -->
<u-cell-item title="用户注销" v-if="userInfo.id" @click="logoff"></u-cell-item>
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
<u-cell title="用户注销" v-if="userInfo.id" @click="logoff"></u-cell>
<u-cell title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell>
<!-- #ifndef H5 -->
<!-- #endif -->
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
<u-cell :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell>
</u-cell-group>
<view class="submit" v-if="userInfo.id" @click="quiteLoginOut">退出登录</view>
</view>
@@ -54,14 +54,14 @@ export default {
* 退出登录
*/
quiteLoginOut() {
this.$options.filters.quiteLoginOut();
this.quiteLoginOut();
},
/**
* 用户注销
*/
logoff(){
this.$options.filters.logoff();
this.logoff();
},
/**
@@ -91,10 +91,10 @@ export default {
* 判断当前是否进入用户中心
*/
checkUserInfo() {
if (this.$options.filters.isLogin("auth")) {
if (this.isLogin("auth")) {
this.navigateTo("/pages/mine/set/personMsg");
} else {
this.$options.filters.tipsToLogin();
this.tipsToLogin();
}
},
@@ -155,7 +155,7 @@ export default {
},
},
onShow() {
this.userInfo = this.$options.filters.isLogin();
this.userInfo = this.isLogin();
// #ifdef APP-PLUS
this.getCacheSize();
// #endif