mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-06-24 02:40:13 +08:00
refactor:项目升级Vue3+uView Plus
- 改造入口文件、全量替换组件引入 - 过滤器迁移混入,更新忽略配置,新增迁移文档
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<view class="section-info">
|
||||
<u-avatar mode="circle" size="60" class="portrait" :src="commItem.memberProfile"></u-avatar>
|
||||
<view class="star-con">
|
||||
<text class="name">{{ commItem.memberName | noPassByName }}</text>
|
||||
<text class="name">{{noPassByName(commItem.memberName) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="section-contant">
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
<u-parse
|
||||
class="vhtml"
|
||||
:lazy-load="true"
|
||||
:use-cache="true"
|
||||
:show-with-animation="true"
|
||||
:html="res.mobileIntro"
|
||||
:content="res.mobileIntro"
|
||||
:tag-style="style"
|
||||
></u-parse>
|
||||
</view>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<view class="image-wrapper">
|
||||
<u-image :src="item" mode="aspectFit" class="loaded" width="100%" height="100%">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
</u-image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<u-popup class="popup" v-model="addressFlag" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius" @close="closeAddress()" closeable>
|
||||
<u-popup class="popup" v-model:show="addressFlag" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius" @close="closeAddress()" closeable>
|
||||
<view class="header-title">选择地址</view>
|
||||
<view class="view-box" v-if="addressDetail">
|
||||
<view class="view-item" v-for="(item, index) in addressDetail" :key="index" @click="clickAddress(item)">
|
||||
@@ -8,7 +8,7 @@
|
||||
<u-icon v-if="item.isDefault" :class="{ active: item.isDefault }" name="checkmark" size="12"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box-dress" :class="{ 'box-dress-blod': item.isDefault }">{{ item.consigneeAddressPath | clearStrComma }}</view>
|
||||
<view class="view-box-dress" :class="{ 'box-dress-blod': item.isDefault }">{{clearStrComma(item.consigneeAddressPath) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box" v-else>
|
||||
@@ -46,23 +46,19 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
filters: {},
|
||||
watch: {},
|
||||
mounted() {
|
||||
props: ["goodsId", "addressFlag"],
|
||||
|
||||
methods: {
|
||||
mounted() {
|
||||
this.addressFlag = false;
|
||||
if( this.$options.filters.isLogin("auth") ){
|
||||
if( this.isLogin("auth") ){
|
||||
this.getShippingAddress()
|
||||
}
|
||||
else{
|
||||
uni.navigateTo({
|
||||
url: 'pages/passport/login'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
props: ["goodsId", "addressFlag"],
|
||||
|
||||
methods: {
|
||||
},
|
||||
/**关闭地址 */
|
||||
closeAddress() {
|
||||
this.$emit("closeAddress", false);
|
||||
@@ -79,7 +75,7 @@ export default {
|
||||
|
||||
/**获取地址 */
|
||||
getShippingAddress() {
|
||||
if (this.$options.filters.isLogin("auth")) {
|
||||
if (this.isLogin("auth")) {
|
||||
API_Address.getAddressList(1, 50).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.addressDetail = res.data.result.records;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="group-item" v-for="(order, index) in assembleOrder" :key="index">
|
||||
<view class="group-item-user">
|
||||
<u-image shape="circle" width="40px" height="40px" :src="order.face || userImage"></u-image>
|
||||
<span class="group-item-name">{{ order.nickName | noPassByName }}</span>
|
||||
<span class="group-item-name">{{noPassByName(order.nickName) }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<span class="group-item-name">还差{{ order.toBeGroupedNum }}人成团</span>
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
>
|
||||
¥
|
||||
<span class="flex-price">
|
||||
{{ $options.filters.goodsFormatPrice(detail.promotionPrice)[0] }}.{{
|
||||
$options.filters.goodsFormatPrice(detail.promotionPrice)[1]
|
||||
{{ goodsFormatPrice(detail.promotionPrice)[0] }}.{{
|
||||
goodsFormatPrice(detail.promotionPrice)[1]
|
||||
}}</span
|
||||
>
|
||||
</span>
|
||||
<view class="u-group-flex" v-if="detail.price != undefined">
|
||||
<span class="old-price"
|
||||
>¥{{ $options.filters.goodsFormatPrice(detail.price)[0] }}.{{
|
||||
$options.filters.goodsFormatPrice(detail.price)[1]
|
||||
>¥{{ goodsFormatPrice(detail.price)[0] }}.{{
|
||||
goodsFormatPrice(detail.price)[1]
|
||||
}}</span
|
||||
>
|
||||
<view class="promotion">限时抢购</view>
|
||||
@@ -42,8 +42,8 @@
|
||||
<span
|
||||
class="flex-price"
|
||||
v-if="promotion.groupbuy_goods_vo.price != undefined"
|
||||
>¥{{ $options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.price)[0] }}.{{
|
||||
$options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.price)[1]
|
||||
>¥{{ goodsFormatPrice(promotion.groupbuy_goods_vo.price)[0] }}.{{
|
||||
goodsFormatPrice(promotion.groupbuy_goods_vo.price)[1]
|
||||
}}</span
|
||||
>
|
||||
<!-- <span v-if="promotion.point">+{{promotion.point}}积分</span> -->
|
||||
@@ -53,9 +53,9 @@
|
||||
class="old-price"
|
||||
v-if="promotion.groupbuy_goods_vo.original_price != undefined"
|
||||
>¥{{
|
||||
$options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.original_price)[0]
|
||||
goodsFormatPrice(promotion.groupbuy_goods_vo.original_price)[0]
|
||||
}}.{{
|
||||
$options.filters.goodsFormatPrice(promotion.groupbuy_goods_vo.original_price)[1]
|
||||
goodsFormatPrice(promotion.groupbuy_goods_vo.original_price)[1]
|
||||
}}</span
|
||||
>
|
||||
<view class="promotion">团购活动</view>
|
||||
@@ -68,13 +68,13 @@
|
||||
v-if="detail.promotionPrice != undefined"
|
||||
>
|
||||
¥<span class="flex-price">
|
||||
{{ $options.filters.goodsFormatPrice(detail.promotionPrice)[0] }}.</span
|
||||
>{{ $options.filters.goodsFormatPrice(detail.promotionPrice)[1] }}
|
||||
{{ goodsFormatPrice(detail.promotionPrice)[0] }}.</span
|
||||
>{{ goodsFormatPrice(detail.promotionPrice)[1] }}
|
||||
</span>
|
||||
<view class="u-group-flex" v-if="detail.price != undefined">
|
||||
<span class="old-price"
|
||||
>¥{{ $options.filters.goodsFormatPrice(detail.price)[0] }}.{{
|
||||
$options.filters.goodsFormatPrice(detail.price)[1]
|
||||
>¥{{ goodsFormatPrice(detail.price)[0] }}.{{
|
||||
goodsFormatPrice(detail.price)[1]
|
||||
}}</span
|
||||
>
|
||||
<view class="promotion">拼团活动</view>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<view class="top">
|
||||
<div class="price">
|
||||
<span v-if="item.couponType == 'DISCOUNT'">{{ item.couponDiscount }}折</span>
|
||||
<span v-if="item.couponType == 'PRICE'">¥{{ item.price | unitPrice }}</span>
|
||||
<span v-if="item.couponType == 'PRICE'">¥{{unitPrice(item.price) }}</span>
|
||||
</div>
|
||||
<view class="text">
|
||||
<div class="coupon-List-title">
|
||||
@@ -18,7 +18,7 @@
|
||||
}}使用</view>
|
||||
</view>
|
||||
</div>
|
||||
<div>满{{ item.consumeThreshold | unitPrice }}可用</div>
|
||||
<div>满{{unitPrice(item.consumeThreshold) }}可用</div>
|
||||
</view>
|
||||
<view class="lingqu-btn" @click="getCoupon(item, index)">
|
||||
<div :class="yhqFlag[index] ? 'cur' : ''">
|
||||
@@ -27,7 +27,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="time">{{ item.startTime / 1000 | unixToDate }} - {{ item.endTime / 1000 | unixToDate }}</view>
|
||||
<view class="time">{{ item.startTime /unixToDate(1000) }} - {{ item.endTime /unixToDate(1000) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
<view class="recommend-list">
|
||||
<view class="recommend-item" @click="clickGoods(item)" v-for="(item, index) in res" :key="index">
|
||||
<u-image class="recommend-item-img" :fade="true" duration="450" :lazy-load="true" :src="item.thumbnail" height="218rpx">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
<view slot="error" style="font-size: 24rpx; ">加载失败</view>
|
||||
<template #loading><u-loading></u-loading></template>
|
||||
<template #error><view style="font-size: 24rpx; ">加载失败</view></template>
|
||||
</u-image>
|
||||
<view class="recommend-item-name">
|
||||
{{ item.goodsName }}
|
||||
</view>
|
||||
<view class="item-price" v-if="item.price != undefined">
|
||||
¥<span class="item-price-blod">{{ $options.filters.goodsFormatPrice(item.price)[0] }}</span>.{{ $options.filters.goodsFormatPrice(item.price)[1] }}
|
||||
¥<span class="item-price-blod">{{ goodsFormatPrice(item.price)[0] }}</span>.{{ goodsFormatPrice(item.price)[1] }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user