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:
@@ -22,7 +22,7 @@
|
||||
<view class="section-info">
|
||||
<image class="portrait" :src="item.memberProfile || userImage" mode="aspectFit"></image>
|
||||
<view class="star-content">
|
||||
<text class="name">{{ item.memberName | noPassByName }}</text>
|
||||
<text class="name">{{noPassByName(item.memberName) }}</text>
|
||||
<text class="time">{{ item.createTime }}</text>
|
||||
</view>
|
||||
<view class="stars">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:y="navbarListY" placement="top-start" />
|
||||
<view class="index">
|
||||
<!-- topBar -->
|
||||
<u-navbar :background="navbar" :is-back="false" :class="headerFlag ? 'header' : 'header bg-none scroll-hide'">
|
||||
<u-navbar :bg-color="navbar.background" :auto-back="false" :class="headerFlag ? 'header' : 'header bg-none scroll-hide'">
|
||||
<div class="headerRow">
|
||||
<div class="backs">
|
||||
<u-icon @click="back()" name="arrow-left" class="icon-back"></u-icon>
|
||||
@@ -35,8 +35,8 @@
|
||||
</div>
|
||||
</u-navbar>
|
||||
|
||||
<u-navbar :border-bottom="false" v-show="!headerFlag" class="header-only-back" :background="navbarOnlyBack"
|
||||
:is-back="false">
|
||||
<u-navbar :border="false" v-show="!headerFlag" class="header-only-back" :bg-color="navbarOnlyBack.background"
|
||||
:auto-back="false">
|
||||
<div>
|
||||
<div class="bg-back">
|
||||
<u-icon size="40" @click="back()" name="arrow-left" class="icon-back"></u-icon>
|
||||
@@ -87,21 +87,21 @@
|
||||
<span>
|
||||
<span v-if="wholesaleList.length">
|
||||
<span>¥</span><span class="price">{{
|
||||
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[0]
|
||||
goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[0]
|
||||
}}</span>.{{
|
||||
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1]
|
||||
goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1]
|
||||
}}
|
||||
~
|
||||
<span>¥</span><span class="price">{{
|
||||
$options.filters.goodsFormatPrice(wholesaleList[0].price)[0]
|
||||
goodsFormatPrice(wholesaleList[0].price)[0]
|
||||
}}</span>.{{
|
||||
$options.filters.goodsFormatPrice(wholesaleList[0].price)[1]
|
||||
goodsFormatPrice(wholesaleList[0].price)[1]
|
||||
}}
|
||||
</span>
|
||||
<span v-else>
|
||||
<span>¥</span><span class="price">{{
|
||||
$options.filters.goodsFormatPrice(goodsDetail.price)[0]
|
||||
}}</span>.{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
|
||||
goodsFormatPrice(goodsDetail.price)[0]
|
||||
}}</span>.{{ goodsFormatPrice(goodsDetail.price)[1] }}
|
||||
</span>
|
||||
</span>
|
||||
</view>
|
||||
@@ -169,8 +169,7 @@
|
||||
<view class="card-flex" @click="shutMask(3)">
|
||||
<view class="card-title"> 送至</view>
|
||||
<view class="card-content">
|
||||
<span v-if="delivery">{{
|
||||
delivery.consigneeAddressPath | clearStrComma
|
||||
<span v-if="delivery">{{clearStrComma(delivery.consigneeAddressPath)
|
||||
}}</span>
|
||||
<span v-else>暂无地址信息</span>
|
||||
</view>
|
||||
@@ -227,11 +226,11 @@
|
||||
<!-- 拼团结算 -->
|
||||
<view class="detail-btn" v-else-if="isGroup">
|
||||
<view class="to-store-car pt-buy to-store-btn" @click="shutMask(4, 'buy')">
|
||||
<view>¥{{ goodsDetail.price | unitPrice }}</view>
|
||||
<view>¥{{unitPrice(goodsDetail.price) }}</view>
|
||||
<view>单独购买</view>
|
||||
</view>
|
||||
<view class="to-buy pt-buy to-store-btn" @click="toAssembleBuyNow">
|
||||
<view>¥{{ goodsDetail.promotionPrice | unitPrice }}</view>
|
||||
<view>¥{{unitPrice(goodsDetail.promotionPrice) }}</view>
|
||||
<view>拼团价格</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -239,7 +238,7 @@
|
||||
<!-- 规格-模态层弹窗 -->
|
||||
<view class="spec">
|
||||
<!-- 促销弹窗 -->
|
||||
<u-popup v-model="promotionShow" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius"
|
||||
<u-popup v-model:show="promotionShow" :height="setup.height" :mode="setup.mode" :border-radius="setup.radius"
|
||||
@close="promotionShow = false" :mask-close-able="setup.close" closeable>
|
||||
<view class="header-title">优惠</view>
|
||||
<view class="cuxiao">
|
||||
@@ -567,7 +566,7 @@ export default {
|
||||
// }, 500);
|
||||
}
|
||||
// 这里是绑定分销员
|
||||
if ((distributionId || this.$store.state.distributionId) && this.$options.filters.isLogin("auth")) {
|
||||
if ((distributionId || this.$store.state.distributionId) && this.isLogin("auth")) {
|
||||
let disResult = await getGoodsDistribution(distributionId);
|
||||
if (!disResult.data.success || disResult.statusCode == 403) {
|
||||
this.$store.state.distributionId = distributionId;
|
||||
@@ -609,7 +608,7 @@ export default {
|
||||
this.getOtherLikeGoods();
|
||||
// 获取商品是否已被收藏 如果未登录不获取
|
||||
|
||||
if (this.$options.filters.isLogin("auth")) {
|
||||
if (this.isLogin("auth")) {
|
||||
this.getGoodsCollectionFun(this.goodsDetail.id);
|
||||
}
|
||||
// 获取IM 需要的话使用
|
||||
@@ -625,7 +624,7 @@ export default {
|
||||
|
||||
linkMsgDetail () {
|
||||
// lili 基础客服
|
||||
this.$options.filters.talkIm(this.goodsDetail.storeId, this.routerVal.goodsId, this.routerVal.id)
|
||||
this.talkIm(this.goodsDetail.storeId, this.routerVal.goodsId, this.routerVal.id)
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/mine/im/index?userId=${this.goodsDetail.storeId}&goodsid=${this.routerVal.goodsId}&skuid=${this.routerVal.id}`
|
||||
// });
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<div class="flex store-distance">
|
||||
<div>
|
||||
<span class="store-score">{{item.serviceScore | unitPrice}}</span>
|
||||
<span class="store-score">{{unitPrice(item.serviceScore)}}</span>
|
||||
<span class="line">|</span>
|
||||
<span class="store-collection">收藏 {{item.collectionNum}}</span>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<!-- 楼层装修店铺信息 -->
|
||||
<div>
|
||||
<u-navbar :border-bottom="false">
|
||||
<u-navbar :border="false">
|
||||
<u-search
|
||||
v-model="keyword"
|
||||
@search="search"
|
||||
@@ -74,7 +74,7 @@
|
||||
<view class="xian"></view>
|
||||
<view class="text">
|
||||
<text>{{ "领取优惠券" }}</text>
|
||||
<text>满{{ item.consumeThreshold | unitPrice }}元可用</text>
|
||||
<text>满{{unitPrice(item.consumeThreshold) }}元可用</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -113,7 +113,7 @@
|
||||
<u-navbar
|
||||
class="navbar"
|
||||
v-if="item.type == 'search'"
|
||||
:is-fixed="index === 1 ? false : true"
|
||||
:fixed="index === 1 ? false : true"
|
||||
>
|
||||
<div class="navbar-right"></div>
|
||||
|
||||
@@ -293,7 +293,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
talk(){
|
||||
this.$options.filters.talkIm(this.storeInfo.storeId)
|
||||
this.talkIm(this.storeInfo.storeId)
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
@@ -325,7 +325,7 @@ export default {
|
||||
this.categoryList = [];
|
||||
this.couponList = [];
|
||||
this.goodsParams.pageNumber = 1;
|
||||
if (this.$options.filters.isLogin("auth")) {
|
||||
if (this.isLogin("auth")) {
|
||||
this.enableGoodsIsCollect();
|
||||
}
|
||||
// 店铺信息
|
||||
@@ -482,14 +482,14 @@ export default {
|
||||
* 领取
|
||||
*/
|
||||
getCoupon(item) {
|
||||
if (!this.$options.filters.isLogin("auth")) {
|
||||
if (!this.isLogin("auth")) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
duration: 3000,
|
||||
title: "请先登录!",
|
||||
});
|
||||
|
||||
this.$options.filters.navigateToLogin("redirectTo");
|
||||
this.navigateToLogin("redirectTo");
|
||||
return false;
|
||||
}
|
||||
receiveCoupons(item.id).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user