mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
feat: 更新项目配置与组件使用
- 在入口文件中引入uview-plus的配置,优化字体加载逻辑 - 移除manifest.json中不必要的权限描述 - 更新package.json和package-lock.json,添加开发依赖 - 调整多个组件的样式和结构,提升用户体验 - 修复部分组件的逻辑和样式问题,确保兼容性
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
:y="navbarListY" placement="top-start" />
|
||||
<view class="index">
|
||||
<!-- topBar -->
|
||||
<u-navbar :bg-color="navbar.background" :auto-back="false" :class="headerFlag ? 'header' : 'header bg-none scroll-hide'">
|
||||
<u-navbar :bg-color="navbar.background" :auto-back="false" @leftClick="back" :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>
|
||||
@@ -36,7 +36,7 @@
|
||||
</u-navbar>
|
||||
|
||||
<u-navbar :border="false" v-show="!headerFlag" class="header-only-back" :bg-color="navbarOnlyBack.background"
|
||||
:auto-back="false">
|
||||
:auto-back="false" @leftClick="back">
|
||||
<div>
|
||||
<div class="bg-back">
|
||||
<u-icon size="40" @click="back()" name="arrow-left" class="icon-back"></u-icon>
|
||||
@@ -198,15 +198,15 @@
|
||||
<view class="page-bottom mp-iphonex-bottom" id="pageBottom">
|
||||
<view class="icon-btn">
|
||||
<view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)">
|
||||
<u-icon size="34" class="red" name="home-fill"></u-icon>
|
||||
<u-icon size="22" class="red" name="home-fill"></u-icon>
|
||||
<view class="red icon-btn-name">店铺</view>
|
||||
</view>
|
||||
<view class="icon-btn-item" @click="linkMsgDetail()">
|
||||
<u-icon size="34" name="kefu-ermai"></u-icon>
|
||||
<u-icon size="22" name="kefu-ermai"></u-icon>
|
||||
<view class="icon-btn-name">客服</view>
|
||||
</view>
|
||||
<view class="icon-btn-item" @click="reluchToCart()">
|
||||
<u-icon size="34" name="storeping-cart"></u-icon>
|
||||
<u-icon size="22" name="shopping-cart"></u-icon>
|
||||
<view class="icon-btn-name">购物车</view>
|
||||
<view v-if="nums && nums > 0" class="num-icon">{{ nums }}</view>
|
||||
</view>
|
||||
@@ -574,6 +574,10 @@ export default {
|
||||
}
|
||||
/**商品信息以及规格信息存储 */
|
||||
this.goodsDetail = response.data.result.data;
|
||||
// 清洗缩略图,避免损坏地址(如 1?x-oss-process=style/400X400)触发渲染层 500
|
||||
if (this.goodsDetail) {
|
||||
this.goodsDetail.thumbnail = this.parseGoodsImageUrl(this.goodsDetail.thumbnail);
|
||||
}
|
||||
this.wholesaleList = response.data.result.wholesaleList;
|
||||
this.goodsSpec = response.data.result.specs;
|
||||
this.PromotionList = response.data.result.promotionMap;
|
||||
@@ -592,8 +596,12 @@ export default {
|
||||
this.isSeckill = true
|
||||
}
|
||||
});
|
||||
// 轮播图
|
||||
this.imgList = this.goodsDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1);
|
||||
// 轮播图:兼容上传 JSON 与纯 URL,解析后去重
|
||||
const gallery = (this.goodsDetail.goodsGalleryList || [])
|
||||
.map((i) => this.parseGoodsImageUrl(i, ""))
|
||||
.filter(Boolean);
|
||||
this.imgList = [...new Set(gallery)];
|
||||
|
||||
|
||||
// 获取店铺基本信息
|
||||
this.getStoreBaseInfoFun(this.goodsDetail.storeId);
|
||||
@@ -740,6 +748,9 @@ export default {
|
||||
API_store.getStoreBaseInfo(id).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.storeDetail = res.data.result;
|
||||
if (this.storeDetail) {
|
||||
this.storeDetail.storeLogo = this.parseGoodsImageUrl(this.storeDetail.storeLogo);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -780,7 +791,10 @@ export default {
|
||||
storeId: this.goodsDetail.storeId,
|
||||
recommend: true,
|
||||
}).then((res) => {
|
||||
this.recommendList = res.data.result.records;
|
||||
this.recommendList = (res.data.result.records || []).map((item) => ({
|
||||
...item,
|
||||
thumbnail: this.parseGoodsImageUrl(item.thumbnail),
|
||||
}));
|
||||
});
|
||||
},
|
||||
|
||||
@@ -795,7 +809,10 @@ export default {
|
||||
currentGoodsId: this.goodsDetail.id,
|
||||
keyword: this.goodsDetail.name
|
||||
}).then((res) => {
|
||||
this.likeGoodsList = res.data.result.records;
|
||||
this.likeGoodsList = (res.data.result.records || []).map((item) => ({
|
||||
...item,
|
||||
thumbnail: this.parseGoodsImageUrl(item.thumbnail),
|
||||
}));
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user