update
This commit is contained in:
parent
313c16f4e7
commit
93112d2e51
@ -23,8 +23,44 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="content" scroll-y :scroll-into-view="scrollView" scroll-with-animation :refresher-enabled="true"
|
||||
@refresherrefresh="handleReloadFunIndex" :refresher-triggered="triggered" :style="{
|
||||
<!-- 骨架屏 -->
|
||||
<view v-if="isPageLoading" class="skeleton-container" :style="{
|
||||
paddingTop: menu.bottom + 22 + 'px',
|
||||
height: `calc(100vh - 50px - ${safeHeight}px )`,
|
||||
}">
|
||||
<!-- 轮播图骨架 -->
|
||||
<view class="skeleton-swiper">
|
||||
<view class="skeleton-item skeleton-animate"></view>
|
||||
</view>
|
||||
|
||||
<!-- 功能列表骨架 -->
|
||||
<view class="skeleton-function-list">
|
||||
<view class="skeleton-function-row" v-for="row in 2" :key="'row' + row">
|
||||
<view class="skeleton-function-item skeleton-animate" v-for="item in 3" :key="'item' + item"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 头条骨架 -->
|
||||
<view class="skeleton-news">
|
||||
<view class="skeleton-news-item skeleton-animate" v-for="item in 3" :key="'news' + item"></view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表骨架 -->
|
||||
<view class="skeleton-product-list">
|
||||
<view class="skeleton-product-row" v-for="row in 2" :key="'product-row' + row">
|
||||
<view class="skeleton-product-item skeleton-animate" v-for="item in 2" :key="'product' + item">
|
||||
<view class="skeleton-product-image skeleton-animate"></view>
|
||||
<view class="skeleton-product-info">
|
||||
<view class="skeleton-product-title skeleton-animate"></view>
|
||||
<view class="skeleton-product-price skeleton-animate"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view v-else class="content" scroll-y :scroll-into-view="scrollView" scroll-with-animation
|
||||
:refresher-enabled="true" @refresherrefresh="handleReloadFunIndex" :refresher-triggered="triggered" :style="{
|
||||
paddingTop: menu.bottom + 22 + 'px',
|
||||
height: `calc(100vh - 50px - ${safeHeight}px )`,
|
||||
}" @scroll="handlePageScroll">
|
||||
@ -416,6 +452,7 @@ export default {
|
||||
components: { tabbar },
|
||||
data() {
|
||||
return {
|
||||
isPageLoading: true,
|
||||
menu: {},
|
||||
funList: [
|
||||
{
|
||||
@ -625,40 +662,52 @@ export default {
|
||||
|
||||
await this.handleGetAdvertisementData()
|
||||
|
||||
// this.$refs.noticeRef.open("center");
|
||||
// if (new Date("2025-06-25 00:00:00").getTime() < new Date().getTime() && new Date("2025-07-02 23:59:59").getTime() > new Date().getTime()) {
|
||||
if (new Date(this.poster.PRESALE_STARTTIME).getTime() < new Date().getTime() && new Date(this.poster.PRESALE_ENDTIME).getTime() > new Date().getTime()) {
|
||||
this.$refs.noticeRef.open("center");
|
||||
let _this = this
|
||||
setTimeout(() => {
|
||||
_this.$refs.noticeRef.close();
|
||||
}, 8000)
|
||||
|
||||
} else {
|
||||
this.showPoster = false;
|
||||
}
|
||||
|
||||
// 高速头条播报
|
||||
this.handleGetHighwayHeadlines();
|
||||
// 促销单品
|
||||
this.handleGetSpecialOffers();
|
||||
// 甄选商品
|
||||
this.handleGetProductsList();
|
||||
// 商城的内容
|
||||
this.handleGetShoppingMall();
|
||||
// 并行加载所有数据
|
||||
const loadPromises = [
|
||||
this.handleGetHighwayHeadlines(), // 高速头条播报
|
||||
this.handleGetSpecialOffers(), // 促销单品
|
||||
this.handleGetProductsList(), // 甄选商品
|
||||
this.handleGetShoppingMall(), // 商城的内容
|
||||
this.handleGetShopMallData()
|
||||
];
|
||||
|
||||
if (this.seat.latitude && this.seat.longitude) {
|
||||
// 景区信息
|
||||
this.handleGetScenicData()
|
||||
loadPromises.push(this.handleGetScenicData());
|
||||
}
|
||||
|
||||
// 等待所有数据加载完成
|
||||
try {
|
||||
await Promise.all(loadPromises);
|
||||
} catch (error) {
|
||||
console.error('数据加载失败:', error);
|
||||
}
|
||||
|
||||
// this.handleAes()
|
||||
this.$utils.addUserBehaviorNew({
|
||||
behaviorRecordDesc: "进入了首页"
|
||||
});
|
||||
|
||||
this.handleGetShopMallData()
|
||||
// 所有数据加载完成,隐藏骨架屏
|
||||
this.isPageLoading = false;
|
||||
|
||||
// 骨架屏结束后显示广告弹窗
|
||||
this.$nextTick(() => {
|
||||
// 稍微延迟一下让页面渲染完成
|
||||
setTimeout(() => {
|
||||
// this.$refs.noticeRef.open("center");
|
||||
// if (new Date("2025-06-25 00:00:00").getTime() < new Date().getTime() && new Date("2025-07-02 23:59:59").getTime() > new Date().getTime()) {
|
||||
if (new Date(this.poster.PRESALE_STARTTIME).getTime() < new Date().getTime() && new Date(this.poster.PRESALE_ENDTIME).getTime() > new Date().getTime()) {
|
||||
this.$refs.noticeRef.open("center");
|
||||
let _this = this
|
||||
setTimeout(() => {
|
||||
_this.$refs.noticeRef.close();
|
||||
}, 8000)
|
||||
} else {
|
||||
this.showPoster = false;
|
||||
}
|
||||
}, 300);
|
||||
});
|
||||
},
|
||||
async onShow() {
|
||||
let currentService = uni.getStorageSync("currentService");
|
||||
@ -2144,6 +2193,107 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 骨架屏样式
|
||||
.skeleton-container {
|
||||
padding: 0 32rpx;
|
||||
background: #f7f8f8;
|
||||
}
|
||||
|
||||
.skeleton-animate {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes skeleton-loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 轮播图骨架
|
||||
.skeleton-swiper {
|
||||
margin: 24rpx 0;
|
||||
|
||||
.skeleton-item {
|
||||
width: 100%;
|
||||
height: 340rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 功能列表骨架
|
||||
.skeleton-function-list {
|
||||
margin: 40rpx 0;
|
||||
|
||||
.skeleton-function-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-function-item {
|
||||
width: 200rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 头条骨架
|
||||
.skeleton-news {
|
||||
margin: 40rpx 0;
|
||||
|
||||
.skeleton-news-item {
|
||||
height: 80rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品列表骨架
|
||||
.skeleton-product-list {
|
||||
margin: 40rpx 0;
|
||||
|
||||
.skeleton-product-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-product-item {
|
||||
width: 48%;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.skeleton-product-image {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-info {
|
||||
.skeleton-product-title {
|
||||
height: 40rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-price {
|
||||
height: 32rpx;
|
||||
width: 60%;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="typeBox" scroll-x>
|
||||
<scroll-view class="typeBox" scroll-x v-if="showContent">
|
||||
<div :class="pageType === 'UnionMall' ? 'contentBox' : 'contentBox contentBox2'" :style="{
|
||||
height:
|
||||
shopTypeList.length < 5
|
||||
@ -163,7 +163,57 @@
|
||||
</scroll-view>
|
||||
</div>
|
||||
|
||||
<div class="pageContent">
|
||||
<!-- 商城页面骨架屏 -->
|
||||
<view class="shop-skeleton" v-if="!showContent">
|
||||
<!-- 商品分类骨架 (对应 contentBox) -->
|
||||
<view class="skeleton-content-box">
|
||||
<view class="skeleton-category-grid">
|
||||
<view class="skeleton-category-item" v-for="index in 6" :key="index">
|
||||
<view class="skeleton skeleton-category-icon"></view>
|
||||
<view class="skeleton skeleton-category-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 每周特惠骨架 -->
|
||||
<view class="skeleton-section">
|
||||
<view class="skeleton-section-header">
|
||||
<view class="skeleton skeleton-section-title"></view>
|
||||
<view class="skeleton skeleton-more-button"></view>
|
||||
</view>
|
||||
<view class="skeleton-horizontal-list">
|
||||
<view class="skeleton-horizontal-item" v-for="index in 4" :key="index">
|
||||
<view class="skeleton skeleton-horizontal-image"></view>
|
||||
<view class="skeleton skeleton-horizontal-price"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 自有品牌骨架 -->
|
||||
<view class="skeleton-section">
|
||||
<view class="skeleton-section-header">
|
||||
<view class="skeleton skeleton-section-title"></view>
|
||||
<view class="skeleton skeleton-more-button"></view>
|
||||
</view>
|
||||
<view class="skeleton-horizontal-list">
|
||||
<view class="skeleton-horizontal-item" v-for="index in 4" :key="index">
|
||||
<view class="skeleton skeleton-horizontal-image"></view>
|
||||
<view class="skeleton skeleton-horizontal-price"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品网格骨架 -->
|
||||
<view class="skeleton-grid">
|
||||
<view class="skeleton-grid-item" v-for="index in 8" :key="index">
|
||||
<view class="skeleton skeleton-product-image"></view>
|
||||
<view class="skeleton skeleton-product-name"></view>
|
||||
<view class="skeleton skeleton-product-price"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="pageContent" v-if="showContent">
|
||||
<!-- 公告 -->
|
||||
<div class="noticeBox" @click="handleGoNotice" v-if="false">
|
||||
<div class="noticeLeft">
|
||||
@ -685,6 +735,8 @@ export default {
|
||||
components: { shopTabbar },
|
||||
data() {
|
||||
return {
|
||||
showContent: false, // 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true, // 是否是首次进入页面
|
||||
menu: {},
|
||||
specialOffersList: [], // 特价优惠
|
||||
weeklySpecialOffer: [], // 每周特惠
|
||||
@ -832,6 +884,18 @@ export default {
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// 只在首次进入时显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(() => {
|
||||
this.showContent = true;
|
||||
}, 800); // 适当延长骨架屏显示时间
|
||||
this.isFirstLoad = false; // 标记已经不是首次进入
|
||||
} else {
|
||||
// 非首次进入,直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
|
||||
// 判断当前的购物车里面是否有东西
|
||||
let shopCarList = [];
|
||||
if (this.pageType === "UnionMall") {
|
||||
@ -867,6 +931,10 @@ export default {
|
||||
path: `/pages/index/index?pageType=${this.pageType}`,
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
// 页面卸载时重置首次加载标记,确保下次进入仍显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
},
|
||||
methods: {
|
||||
handleHideExportFun() {
|
||||
this.showExportFun = false
|
||||
@ -1753,6 +1821,181 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/* 骨架屏动画 */
|
||||
@keyframes shimmer {
|
||||
0% {
|
||||
background-position: -468px 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 468px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 400px 100%;
|
||||
animation: shimmer 1.2s infinite;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
/* 商城页面骨架屏样式 */
|
||||
.shop-skeleton {
|
||||
padding: 0 32rpx;
|
||||
background: #f7f8fa;
|
||||
min-height: calc(100vh - 200rpx);
|
||||
}
|
||||
|
||||
.skeleton-content-box {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx 32rpx;
|
||||
|
||||
.skeleton-category-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-category-item {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-category-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 16rpx;
|
||||
margin: 0 auto 16rpx auto;
|
||||
}
|
||||
|
||||
.skeleton-category-text {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-categories {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow-x: auto;
|
||||
|
||||
.skeleton-category-item {
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
margin-right: 32rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.skeleton-category-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-category-text {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-section {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.skeleton-section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-section-title {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.skeleton-more-button {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-horizontal-list {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
|
||||
.skeleton-horizontal-item {
|
||||
flex-shrink: 0;
|
||||
margin-right: 24rpx;
|
||||
text-align: center;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.skeleton-horizontal-image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-horizontal-price {
|
||||
width: 80rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-grid {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-grid-item {
|
||||
width: calc(50% - 16rpx);
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-product-image {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-name {
|
||||
width: 80%;
|
||||
height: 28rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-price {
|
||||
width: 60%;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
@ -17,7 +17,31 @@
|
||||
<view class="backArrow"></view>
|
||||
</view>
|
||||
|
||||
<div style="
|
||||
<!-- 地址选择区域骨架 -->
|
||||
<div v-if="!showContent" style="
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding-top: 20px;
|
||||
box-sizing: border-box;
|
||||
">
|
||||
<div class="topLeft">
|
||||
<view style="display: flex; align-items: center">
|
||||
<view class="skeleton skeleton-location-icon-small" style="width: 16px; height: 16px; margin-right: 4px;"></view>
|
||||
<view class="skeleton skeleton-address-text" style="width: 200px; height: 20px;"></view>
|
||||
</view>
|
||||
<view style="margin-top: 8rpx">
|
||||
<view class="skeleton skeleton-phone-text" style="width: 150px; height: 18px;"></view>
|
||||
</view>
|
||||
</div>
|
||||
<div class="topRight">
|
||||
<view class="skeleton skeleton-edit-text" style="width: 60px; height: 20px;"></view>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="showContent" style="
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
@ -56,7 +80,44 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<scroll-view class="shopList" scroll-y :style="{
|
||||
<!-- 购物车页面骨架屏 -->
|
||||
<view class="shop-car-skeleton" v-if="!showContent">
|
||||
<!-- 商品列表骨架 -->
|
||||
<view class="skeleton-product-list">
|
||||
<view class="skeleton-product-item" v-for="index in 3" :key="index">
|
||||
<view class="skeleton-product-left">
|
||||
<view class="skeleton skeleton-checkbox"></view>
|
||||
<view class="skeleton skeleton-product-image"></view>
|
||||
<view class="skeleton skeleton-total-price"></view>
|
||||
</view>
|
||||
<view class="skeleton-product-right">
|
||||
<view class="skeleton skeleton-product-title"></view>
|
||||
<view class="skeleton-product-actions">
|
||||
<view class="skeleton-price-info">
|
||||
<view class="skeleton skeleton-price"></view>
|
||||
<view class="skeleton skeleton-unit"></view>
|
||||
</view>
|
||||
<view class="skeleton skeleton-quantity-control"></view>
|
||||
</view>
|
||||
<view class="skeleton skeleton-remark-input"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作栏骨架 -->
|
||||
<view class="skeleton-bottom">
|
||||
<view class="skeleton-bottom-left">
|
||||
<view class="skeleton skeleton-select-all"></view>
|
||||
</view>
|
||||
<view class="skeleton-bottom-right">
|
||||
<view class="skeleton skeleton-total-text"></view>
|
||||
<view class="skeleton skeleton-total-amount"></view>
|
||||
<view class="skeleton skeleton-submit-button"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="shopList" v-if="showContent" scroll-y :style="{
|
||||
height: `calc(100vh - ${50 + safeHeight + 60 + menu.top + 32 + 80 + 16
|
||||
}px)`,
|
||||
}">
|
||||
@ -149,7 +210,7 @@
|
||||
</div>
|
||||
</scroll-view>
|
||||
|
||||
<div class="bottom" :style="{ bottom: `${50 + safeHeight}px` }">
|
||||
<div class="bottom" v-if="showContent" :style="{ bottom: `${50 + safeHeight}px` }">
|
||||
<div class="bottomLeft" v-if="pageType === 'normal'">
|
||||
<radio :checked="isAllSelect" :color="bigPageType === 'UnionMall' ? '#4BCB7E' : '#4BCB7E'"
|
||||
@click="handleAllSelect" />全选
|
||||
@ -215,6 +276,8 @@ export default {
|
||||
components: { shopTabbar },
|
||||
data() {
|
||||
return {
|
||||
showContent: false, // 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true, // 是否是首次进入页面
|
||||
menu: {}, // 手机基本信息
|
||||
pageType: "normal", // 是否启用购物车管理功能 normal 时为正常
|
||||
shopList: [], // 购物车数据
|
||||
@ -294,6 +357,18 @@ export default {
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
// 只在首次进入时显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(() => {
|
||||
this.showContent = true;
|
||||
}, 800); // 适当延长骨架屏显示时间
|
||||
this.isFirstLoad = false; // 标记已经不是首次进入
|
||||
} else {
|
||||
// 非首次进入,直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
|
||||
// 判断当前的购物车里面是否有东西
|
||||
let shopCarList = [];
|
||||
if (this.bigPageType === "UnionMall") {
|
||||
@ -338,6 +413,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
// 页面卸载时重置首次加载标记,确保下次进入仍显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
},
|
||||
methods: {
|
||||
// 显示展开功能
|
||||
handleShowExportBox(e) {
|
||||
@ -1451,4 +1530,184 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 购物车页面骨架屏样式 */
|
||||
.shop-car-skeleton {
|
||||
width: 100%;
|
||||
background: #f2f4f5;
|
||||
padding-bottom: 120px;
|
||||
}
|
||||
|
||||
/* 基础骨架屏动画 */
|
||||
.skeleton {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% { background-position: 200% 0; }
|
||||
100% { background-position: -200% 0; }
|
||||
}
|
||||
|
||||
/* 顶部地址选择区域骨架样式 */
|
||||
.skeleton-location-icon-small {
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-address-text {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.skeleton-phone-text {
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
.skeleton-edit-text {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* 商品列表骨架 */
|
||||
.skeleton-product-list {
|
||||
width: calc(100% - 32px);
|
||||
margin: 0 16px;
|
||||
background: #ffffff;
|
||||
border-radius: 10px;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1px solid #f5f7f7;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-product-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-right: 16rpx;
|
||||
|
||||
.skeleton-checkbox {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-image {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-total-price {
|
||||
width: 100rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-product-right {
|
||||
flex: 1;
|
||||
|
||||
.skeleton-product-title {
|
||||
width: 85%;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.skeleton-price-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.skeleton-price {
|
||||
width: 80rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-unit {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-quantity-control {
|
||||
width: 240rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-remark-input {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部操作栏骨架 */
|
||||
.skeleton-bottom {
|
||||
position: fixed;
|
||||
bottom: 100rpx;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.skeleton-bottom-left {
|
||||
.skeleton-select-all {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-bottom-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.skeleton-total-text {
|
||||
width: 60rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-total-amount {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
|
||||
.skeleton-submit-button {
|
||||
width: 210rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -32,7 +32,40 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pageContent" :style="{
|
||||
<!-- 商品分类页面骨架屏 -->
|
||||
<view class="shop-type-skeleton" v-if="!showContent">
|
||||
<!-- 顶部分类标签骨架 -->
|
||||
<view class="skeleton-tabs">
|
||||
<view class="skeleton-tab-item" v-for="index in 6" :key="index">
|
||||
<view class="skeleton skeleton-tab-icon"></view>
|
||||
<view class="skeleton skeleton-tab-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 左右分栏骨架 -->
|
||||
<view class="skeleton-content">
|
||||
<!-- 左侧分类列表骨架 -->
|
||||
<view class="skeleton-left">
|
||||
<view class="skeleton-left-item" v-for="index in 8" :key="index">
|
||||
<view class="skeleton skeleton-left-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 右侧商品列表骨架 -->
|
||||
<view class="skeleton-right">
|
||||
<view class="skeleton-product-item" v-for="index in 6" :key="index">
|
||||
<view class="skeleton skeleton-product-image"></view>
|
||||
<view class="skeleton-product-info">
|
||||
<view class="skeleton skeleton-product-title"></view>
|
||||
<view class="skeleton skeleton-product-price"></view>
|
||||
<view class="skeleton skeleton-add-button"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="pageContent" v-if="showContent" :style="{
|
||||
height: `calc(100vh - 50px - ${safeHeight}px - ${menu.top + 32 + 32 + 12 + 12
|
||||
}px)`,
|
||||
}">
|
||||
@ -297,6 +330,8 @@ export default {
|
||||
components: { shopTabbar, NoData, CustomImage },
|
||||
data() {
|
||||
return {
|
||||
showContent: false, // 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true, // 是否是首次进入页面
|
||||
menu: {}, // 手机的一些位置信息
|
||||
searchText: "", // 搜索商品的文字
|
||||
shopTypeList: [], // 商品的大类列表
|
||||
@ -434,6 +469,18 @@ export default {
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
// 只在首次进入时显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(() => {
|
||||
this.showContent = true;
|
||||
}, 800); // 适当延长骨架屏显示时间
|
||||
this.isFirstLoad = false; // 标记已经不是首次进入
|
||||
} else {
|
||||
// 非首次进入,直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
|
||||
this.menu = uni.getMenuButtonBoundingClientRect();
|
||||
// 判断当前的购物车里面是否有东西
|
||||
let shopCarList = [];
|
||||
@ -490,6 +537,8 @@ export default {
|
||||
// this.searchText = "";
|
||||
},
|
||||
onUnload() {
|
||||
// 页面卸载时重置首次加载标记,确保下次进入仍显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
if (this.shopCarList && this.shopCarList.length > 0) {
|
||||
let list = JSON.parse(JSON.stringify(this.shopCarList));
|
||||
list.forEach((item) => {
|
||||
@ -2659,4 +2708,137 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 商品分类页面骨架屏样式 */
|
||||
.shop-type-skeleton {
|
||||
padding: 20rpx 0;
|
||||
background: #f7f8fa;
|
||||
height: calc(100vh - 200rpx);
|
||||
}
|
||||
|
||||
/* 基础骨架屏动画 */
|
||||
.skeleton {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 顶部分类标签骨架 */
|
||||
.skeleton-tabs {
|
||||
background: #ffffff;
|
||||
padding: 20rpx;
|
||||
margin: 0 20rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow-x: auto;
|
||||
|
||||
.skeleton-tab-item {
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
margin-right: 32rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.skeleton-tab-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-tab-text {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 左右分栏内容区域 */
|
||||
.skeleton-content {
|
||||
display: flex;
|
||||
height: calc(100vh - 300rpx);
|
||||
margin: 0 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 左侧分类列表骨架 */
|
||||
.skeleton-left {
|
||||
width: 200rpx;
|
||||
background: #f8f9fa;
|
||||
border-right: 1px solid #f0f0f0;
|
||||
|
||||
.skeleton-left-item {
|
||||
padding: 32rpx 24rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
.skeleton-left-text {
|
||||
width: 120rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 右侧商品列表骨架 */
|
||||
.skeleton-right {
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
|
||||
.skeleton-product-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
.skeleton-product-image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-right: 24rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.skeleton-product-info {
|
||||
flex: 1;
|
||||
|
||||
.skeleton-product-title {
|
||||
width: 80%;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-price {
|
||||
width: 60%;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-add-button {
|
||||
width: 120rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -5,7 +5,74 @@
|
||||
<image class="YDIcon" src="/static/images/home/yunnanLogo.svg" />
|
||||
</view>
|
||||
|
||||
<view class="pageTop" :style="{ paddingTop: menu.bottom + 16 + 'px' }">
|
||||
<!-- 用户页面骨架屏 -->
|
||||
<view class="user-skeleton" v-if="!showContent" :style="{ paddingTop: menu.bottom + 16 + 'px' }">
|
||||
<!-- 用户信息骨架 -->
|
||||
<view class="skeleton-user-top">
|
||||
<view class="skeleton-user-info">
|
||||
<view class="skeleton skeleton-avatar"></view>
|
||||
<view class="skeleton-user-details">
|
||||
<view class="skeleton skeleton-username"></view>
|
||||
<view class="skeleton skeleton-level"></view>
|
||||
</view>
|
||||
<view class="skeleton skeleton-qr-code"></view>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券统计骨架 -->
|
||||
<view class="skeleton-stats">
|
||||
<view class="skeleton-stat-item" v-for="index in 2" :key="index">
|
||||
<view class="skeleton skeleton-stat-number"></view>
|
||||
<view class="skeleton skeleton-stat-label"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务按钮骨架 -->
|
||||
<view class="skeleton-section">
|
||||
<view class="skeleton skeleton-section-title"></view>
|
||||
<view class="skeleton-service-grid">
|
||||
<view class="skeleton-service-item" v-for="index in 5" :key="index">
|
||||
<view class="skeleton skeleton-service-icon"></view>
|
||||
<view class="skeleton skeleton-service-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单状态骨架 -->
|
||||
<view class="skeleton-section">
|
||||
<view class="skeleton skeleton-section-title"></view>
|
||||
<view class="skeleton-order-grid">
|
||||
<view class="skeleton-order-item" v-for="index in 5" :key="index">
|
||||
<view class="skeleton skeleton-order-icon"></view>
|
||||
<view class="skeleton skeleton-order-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 点餐功能骨架 -->
|
||||
<view class="skeleton-section">
|
||||
<view class="skeleton skeleton-section-title"></view>
|
||||
<view class="skeleton-food-grid">
|
||||
<view class="skeleton-food-item" v-for="index in 4" :key="index">
|
||||
<view class="skeleton skeleton-food-icon"></view>
|
||||
<view class="skeleton skeleton-food-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 客服帮助骨架 -->
|
||||
<view class="skeleton-section">
|
||||
<view class="skeleton skeleton-section-title"></view>
|
||||
<view class="skeleton-service-cards">
|
||||
<view class="skeleton-service-card" v-for="index in 2" :key="index">
|
||||
<view class="skeleton skeleton-card-title"></view>
|
||||
<view class="skeleton skeleton-card-content"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pageTop" v-if="showContent" :style="{ paddingTop: menu.bottom + 16 + 'px' }">
|
||||
|
||||
|
||||
<!-- 两个包一下 改一下样式 -->
|
||||
@ -89,7 +156,7 @@
|
||||
|
||||
<!-- {{ showErrorText || "" }} -->
|
||||
|
||||
<view class="pageContent">
|
||||
<view class="pageContent" v-if="showContent">
|
||||
|
||||
<!-- 基础按钮 -->
|
||||
<view class="basicBox">
|
||||
@ -272,6 +339,8 @@ export default {
|
||||
components: { shopTabbar },
|
||||
data() {
|
||||
return {
|
||||
showContent: false, // 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true, // 是否首次进入页面
|
||||
pageType: "", // spring 春节模式
|
||||
menu: {},
|
||||
orderFunList: [
|
||||
@ -358,6 +427,10 @@ export default {
|
||||
if (query.pageType) {
|
||||
this.bigPageType = query.pageType
|
||||
}
|
||||
|
||||
// 确保首次加载时显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
this.showContent = false;
|
||||
|
||||
if (!this.user.MEMBERSHIP_ID) {
|
||||
uni.navigateTo({ url: "/pages/register/index" });
|
||||
@ -394,6 +467,18 @@ export default {
|
||||
});
|
||||
},
|
||||
async onShow() {
|
||||
// 只有第一次进入时才显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(() => {
|
||||
this.showContent = true;
|
||||
this.isFirstLoad = false; // 标记已不是第一次进入
|
||||
}, 500);
|
||||
} else {
|
||||
// 非第一次进入直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
|
||||
let inShop = uni.getStorageSync("inShop");
|
||||
this.inShop = inShop
|
||||
console.log('this.inShop', JSON.parse(JSON.stringify(this.inShop)));
|
||||
@ -2131,4 +2216,214 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 用户页面骨架屏样式 */
|
||||
.user-skeleton {
|
||||
width: 100vw;
|
||||
background-image: url('https://eshangtech.com/minTestImg/pageBg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100vh;
|
||||
padding-bottom: 200rpx;
|
||||
}
|
||||
|
||||
/* 基础骨架屏动画 */
|
||||
.skeleton {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% { background-position: 200% 0; }
|
||||
100% { background-position: -200% 0; }
|
||||
}
|
||||
|
||||
/* 用户顶部信息骨架 */
|
||||
.skeleton-user-top {
|
||||
width: calc(100vw - 64rpx);
|
||||
margin-left: 32rpx;
|
||||
background: linear-gradient(270deg, #27B25F 0%, #4CCC7F 100%);
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.skeleton-user-info {
|
||||
padding: 40rpx 42rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.skeleton-avatar {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 34rpx;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.skeleton-user-details {
|
||||
flex: 1;
|
||||
|
||||
.skeleton-username {
|
||||
width: 200rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.skeleton-level {
|
||||
width: 120rpx;
|
||||
height: 34rpx;
|
||||
border-radius: 17rpx;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-qr-code {
|
||||
width: 82rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 8rpx;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-stats {
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
padding: 20rpx 0;
|
||||
|
||||
.skeleton-stat-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.skeleton-stat-number {
|
||||
width: 60rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 22rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-stat-label {
|
||||
width: 80rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 功能区域骨架 */
|
||||
.skeleton-section {
|
||||
width: calc(100vw - 64rpx);
|
||||
margin: 24rpx 32rpx 0;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx;
|
||||
padding: 22rpx 34rpx;
|
||||
|
||||
.skeleton-section-title {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 42rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-service-grid {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-service-item {
|
||||
width: 18%;
|
||||
text-align: center;
|
||||
|
||||
.skeleton-service-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 8rpx;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-service-text {
|
||||
width: 60rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-order-grid {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-order-item {
|
||||
width: 18%;
|
||||
text-align: center;
|
||||
|
||||
.skeleton-order-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 8rpx;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-order-text {
|
||||
width: 60rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-food-grid {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-food-item {
|
||||
width: 22%;
|
||||
text-align: center;
|
||||
|
||||
.skeleton-food-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 8rpx;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-food-text {
|
||||
width: 60rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-service-cards {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-service-card {
|
||||
width: calc((100% - 20rpx) / 2);
|
||||
height: 130rpx;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.skeleton-card-title {
|
||||
width: 80rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-content {
|
||||
width: 120rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,7 +1,75 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 骨架屏 -->
|
||||
<view v-if="isPageLoading" class="skeleton-container">
|
||||
<!-- 头部导航骨架 -->
|
||||
<view class="skeleton-header" :style="{
|
||||
height: (menu.bottom || 88) + 8 + 'px',
|
||||
paddingTop: (menu.top || 44) + 'px'
|
||||
}">
|
||||
<view class="skeleton-nav">
|
||||
<view class="skeleton-back-btn skeleton-animate"></view>
|
||||
<view class="skeleton-title skeleton-animate"></view>
|
||||
<view class="skeleton-share-btn skeleton-animate"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品图片骨架 -->
|
||||
<view class="skeleton-product-image" :style="{
|
||||
marginTop: (menu.bottom || 88) + 8 + 'px',
|
||||
width: '100vw',
|
||||
height: '100vw'
|
||||
}">
|
||||
<view class="skeleton-swiper skeleton-animate"></view>
|
||||
</view>
|
||||
|
||||
<!-- 商品信息骨架 -->
|
||||
<view class="skeleton-product-info">
|
||||
<!-- 价格区域 -->
|
||||
<view class="skeleton-price-section">
|
||||
<view class="skeleton-price skeleton-animate"></view>
|
||||
<view class="skeleton-original-price skeleton-animate"></view>
|
||||
</view>
|
||||
|
||||
<!-- 标题和描述 -->
|
||||
<view class="skeleton-title-section">
|
||||
<view class="skeleton-product-title skeleton-animate"></view>
|
||||
<view class="skeleton-product-subtitle skeleton-animate"></view>
|
||||
</view>
|
||||
|
||||
<!-- 规格选择 -->
|
||||
<view class="skeleton-spec-section">
|
||||
<view class="skeleton-spec-title skeleton-animate"></view>
|
||||
<view class="skeleton-spec-options">
|
||||
<view class="skeleton-spec-item skeleton-animate" v-for="item in 3" :key="item"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情骨架 -->
|
||||
<view class="skeleton-detail-section">
|
||||
<view class="skeleton-detail-tabs">
|
||||
<view class="skeleton-tab-item skeleton-animate" v-for="item in 2" :key="item"></view>
|
||||
</view>
|
||||
<view class="skeleton-detail-content">
|
||||
<view class="skeleton-detail-line skeleton-animate" v-for="item in 5" :key="item"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮骨架 -->
|
||||
<view class="skeleton-bottom-bar">
|
||||
<view class="skeleton-bottom-left">
|
||||
<view class="skeleton-cart-btn skeleton-animate"></view>
|
||||
<view class="skeleton-collect-btn skeleton-animate"></view>
|
||||
</view>
|
||||
<view class="skeleton-bottom-right">
|
||||
<view class="skeleton-buy-btn skeleton-animate"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- scroll-y="true" @scroll="handlePageScroll" :scroll-into-view="scrollView" -->
|
||||
<view class="page-body" :style="{ paddingBottom: `${134 + (isCountdown || panicBuying ? 64 : 0)}rpx` }">
|
||||
<view v-else class="page-body" :style="{ paddingBottom: `${134 + (isCountdown || panicBuying ? 64 : 0)}rpx` }">
|
||||
<div class="product-image" :style="{
|
||||
// marginTop: menu.top - 4 + 'px',
|
||||
marginTop: menu.bottom + 8 + 'px',
|
||||
@ -461,6 +529,7 @@ export default {
|
||||
data() {
|
||||
const windows = uni.getSystemInfoSync();
|
||||
return {
|
||||
isPageLoading: true,
|
||||
safeHeight: 0,
|
||||
pageMsg: {
|
||||
current: 0,
|
||||
@ -483,7 +552,11 @@ export default {
|
||||
ratio: 0.5,
|
||||
scale: windows.pixelRatio,
|
||||
},
|
||||
menu: {},
|
||||
menu: {
|
||||
top: 44,
|
||||
bottom: 88,
|
||||
height: 32
|
||||
},
|
||||
inputMaxLength: -1,
|
||||
bottomBtnType: 0,
|
||||
shopCarList: [], // 当前的购物车
|
||||
@ -1721,6 +1794,7 @@ export default {
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
async onLoad(option) {
|
||||
console.log('页面开始加载,骨架屏状态:', this.isPageLoading);
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
let height = systemInfo.safeAreaInsets.bottom;
|
||||
this.safeHeight = Number(height);
|
||||
@ -1754,6 +1828,10 @@ export default {
|
||||
this.$utils.addUserBehaviorNew({
|
||||
behaviorRecordDesc: `查看商品【${this.good.COMMODITY_NAME}】详情`
|
||||
});
|
||||
|
||||
// 数据加载完成,立即隐藏骨架屏
|
||||
console.log('数据加载完成,隐藏骨架屏');
|
||||
this.isPageLoading = false;
|
||||
// if (option.scene) {
|
||||
// // 是否是商品分享码扫入的 带有他人的邀请码
|
||||
// let scene = decodeURIComponent(option.scene);
|
||||
@ -1776,6 +1854,215 @@ export default {
|
||||
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 骨架屏样式
|
||||
.skeleton-container {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.skeleton-animate {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes skeleton-loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 头部导航骨架
|
||||
.skeleton-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
z-index: 999;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32rpx;
|
||||
|
||||
.skeleton-nav {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-back-btn,
|
||||
.skeleton-share-btn {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.skeleton-title {
|
||||
width: 200rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 商品图片骨架
|
||||
.skeleton-product-image {
|
||||
.skeleton-swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品信息骨架
|
||||
.skeleton-product-info {
|
||||
background: #fff;
|
||||
padding: 32rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.skeleton-price-section {
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-price {
|
||||
width: 200rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-original-price {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-title-section {
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-product-title {
|
||||
width: 100%;
|
||||
height: 48rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-product-subtitle {
|
||||
width: 80%;
|
||||
height: 32rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-spec-section {
|
||||
.skeleton-spec-title {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-spec-options {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
|
||||
.skeleton-spec-item {
|
||||
width: 120rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 商品详情骨架
|
||||
.skeleton-detail-section {
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
.skeleton-detail-tabs {
|
||||
display: flex;
|
||||
margin-bottom: 32rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.skeleton-tab-item {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-detail-content {
|
||||
.skeleton-detail-line {
|
||||
width: 100%;
|
||||
height: 32rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
&:nth-child(2) {
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
&:nth-child(4) {
|
||||
width: 78%;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
width: 65%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 底部操作栏骨架
|
||||
.skeleton-bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 134rpx;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
|
||||
.skeleton-bottom-left {
|
||||
display: flex;
|
||||
gap: 32rpx;
|
||||
|
||||
.skeleton-cart-btn,
|
||||
.skeleton-collect-btn {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-bottom-right {
|
||||
.skeleton-buy-btn {
|
||||
width: 240rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page-body {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
|
||||
@ -5,7 +5,57 @@
|
||||
<image class="YDIcon" src="/static/images/home/yunnanLogo.svg" />
|
||||
</view>
|
||||
|
||||
<view class="pageTop" :style="{ paddingTop: menu.bottom + 16 + 'px' }">
|
||||
<!-- 用户页面骨架屏 -->
|
||||
<view class="user-skeleton" v-if="!showContent" :style="{ paddingTop: menu.bottom + 16 + 'px' }">
|
||||
<!-- 用户信息骨架 -->
|
||||
<view class="skeleton-user-info">
|
||||
<view class="skeleton-avatar skeleton"></view>
|
||||
<view class="skeleton-user-details">
|
||||
<view class="skeleton skeleton-username"></view>
|
||||
<view class="skeleton skeleton-level"></view>
|
||||
</view>
|
||||
<view class="skeleton skeleton-qr-code"></view>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券统计骨架 -->
|
||||
<view class="skeleton-coupon-box">
|
||||
<view class="skeleton-coupon-item">
|
||||
<view class="skeleton skeleton-number"></view>
|
||||
<view class="skeleton skeleton-label"></view>
|
||||
</view>
|
||||
<view class="skeleton-coupon-item">
|
||||
<view class="skeleton skeleton-number"></view>
|
||||
<view class="skeleton skeleton-label"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 我的服务骨架 -->
|
||||
<view class="skeleton-service-box">
|
||||
<view class="skeleton skeleton-title"></view>
|
||||
<view class="skeleton-service-grid">
|
||||
<view class="skeleton-service-item" v-for="index in 5" :key="index">
|
||||
<view class="skeleton skeleton-service-icon"></view>
|
||||
<view class="skeleton skeleton-service-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 我的订单骨架 -->
|
||||
<view class="skeleton-order-box">
|
||||
<view class="skeleton-order-header">
|
||||
<view class="skeleton skeleton-title"></view>
|
||||
<view class="skeleton skeleton-more"></view>
|
||||
</view>
|
||||
<view class="skeleton-order-grid">
|
||||
<view class="skeleton-order-item" v-for="index in 4" :key="index">
|
||||
<view class="skeleton skeleton-order-icon"></view>
|
||||
<view class="skeleton skeleton-order-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pageTop" v-else :style="{ paddingTop: menu.bottom + 16 + 'px' }">
|
||||
|
||||
|
||||
<!-- 两个包一下 改一下样式 -->
|
||||
@ -86,7 +136,7 @@
|
||||
|
||||
<!-- {{ showErrorText || "" }} -->
|
||||
|
||||
<view class="pageContent">
|
||||
<view class="pageContent" v-if="showContent">
|
||||
|
||||
<!-- 基础按钮 -->
|
||||
<view class="basicBox">
|
||||
@ -255,7 +305,7 @@
|
||||
|
||||
</view>
|
||||
|
||||
<tabbar :page="'/pages/user/index'" />
|
||||
<tabbar :page="'/pages/user/index'" v-if="showContent" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -268,6 +318,8 @@ export default {
|
||||
components: { tabbar, shopTabbar },
|
||||
data() {
|
||||
return {
|
||||
showContent: false, // 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true, // 是否是首次进入页面
|
||||
pageType: "", // spring 春节模式
|
||||
menu: {},
|
||||
orderFunList: [
|
||||
@ -349,6 +401,10 @@ export default {
|
||||
};
|
||||
},
|
||||
async onLoad() {
|
||||
// 确保首次加载时显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
this.showContent = false;
|
||||
|
||||
if (!this.user.MEMBERSHIP_ID) {
|
||||
uni.navigateTo({ url: `/pages/register/index?backTo=index` });
|
||||
}
|
||||
@ -388,6 +444,18 @@ export default {
|
||||
});
|
||||
},
|
||||
async onShow() {
|
||||
// 只有第一次进入时才显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(() => {
|
||||
this.showContent = true;
|
||||
this.isFirstLoad = false; // 标记已不是第一次进入
|
||||
}, 500);
|
||||
} else {
|
||||
// 非第一次进入直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
|
||||
let inShop = uni.getStorageSync("inShop");
|
||||
this.inShop = inShop
|
||||
console.log('this.inShop', JSON.parse(JSON.stringify(this.inShop)));
|
||||
@ -477,7 +545,6 @@ export default {
|
||||
|
||||
this.$forceUpdate()
|
||||
|
||||
|
||||
},
|
||||
|
||||
computed: {
|
||||
@ -1236,6 +1303,176 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/* 骨架屏动画 */
|
||||
@keyframes shimmer {
|
||||
0% {
|
||||
background-position: -468px 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 468px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 400px 100%;
|
||||
animation: shimmer 1.2s infinite;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
/* 用户页面骨架屏样式 */
|
||||
.user-skeleton {
|
||||
padding: 0 32rpx;
|
||||
background: #f7f8fa;
|
||||
}
|
||||
|
||||
.skeleton-user-info {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.skeleton-avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
|
||||
.skeleton-user-details {
|
||||
flex: 1;
|
||||
|
||||
.skeleton-username {
|
||||
width: 200rpx;
|
||||
height: 32rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-level {
|
||||
width: 120rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-qr-code {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-coupon-box {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
.skeleton-coupon-item {
|
||||
text-align: center;
|
||||
|
||||
.skeleton-number {
|
||||
width: 80rpx;
|
||||
height: 40rpx;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-label {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-service-box {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.skeleton-title {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.skeleton-service-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-service-item {
|
||||
width: calc(20% - 16rpx);
|
||||
text-align: center;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-service-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-service-text {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-order-box {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.skeleton-order-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.skeleton-title {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.skeleton-more {
|
||||
width: 40rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-order-grid {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.skeleton-order-item {
|
||||
text-align: center;
|
||||
|
||||
.skeleton-order-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-order-text {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
199
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
199
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
@ -128,65 +128,91 @@ var render = function () {
|
||||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var l0 = _vm.funList.slice(0, 9)
|
||||
var g0 = _vm.serviceDetail.ImageLits && _vm.serviceDetail.ImageLits.length > 0
|
||||
var g1 =
|
||||
_vm.ScenicData &&
|
||||
_vm.ScenicData.ImageList &&
|
||||
_vm.ScenicData.ImageList.length > 0
|
||||
var g2 = _vm.roadStatusList.length
|
||||
var g3 = _vm.roadStatusList && _vm.roadStatusList.length > 1
|
||||
var l1 = g3 ? _vm.roadStatusList.concat(_vm.roadStatusList) : null
|
||||
var g4 = _vm.roadStatusList && _vm.roadStatusList.length === 1
|
||||
var g5 = _vm.everyWeekShopData && _vm.everyWeekShopData.length > 0
|
||||
var l2 = g5
|
||||
? _vm.__map(_vm.everyWeekShopData, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g6 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") && item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g7 = item.IMAGE_PATH && g6 ? item.IMAGE_PATH.split(",") : null
|
||||
return {
|
||||
$orig: $orig,
|
||||
g6: g6,
|
||||
g7: g7,
|
||||
}
|
||||
})
|
||||
var l0 = !_vm.isPageLoading ? _vm.funList.slice(0, 9) : null
|
||||
var g0 = !_vm.isPageLoading
|
||||
? _vm.serviceDetail.ImageLits && _vm.serviceDetail.ImageLits.length > 0
|
||||
: null
|
||||
var g8 = _vm.specialOffersList && _vm.specialOffersList.length > 0
|
||||
var g9 = g8 ? _vm.productsList && _vm.productsList.length > 0 : null
|
||||
var l3 = g8
|
||||
? _vm.__map(_vm.specialOffersList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g10 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") && item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g11 = item.IMAGE_PATH && g10 ? item.IMAGE_PATH.split(",") : null
|
||||
return {
|
||||
$orig: $orig,
|
||||
g10: g10,
|
||||
g11: g11,
|
||||
}
|
||||
})
|
||||
var g1 = !_vm.isPageLoading
|
||||
? _vm.ScenicData &&
|
||||
_vm.ScenicData.ImageList &&
|
||||
_vm.ScenicData.ImageList.length > 0
|
||||
: null
|
||||
var g12 = _vm.productsList && _vm.productsList.length > 0
|
||||
var g13 = g12
|
||||
var g2 = !_vm.isPageLoading ? _vm.roadStatusList.length : null
|
||||
var g3 = !_vm.isPageLoading
|
||||
? _vm.roadStatusList && _vm.roadStatusList.length > 1
|
||||
: null
|
||||
var l1 =
|
||||
!_vm.isPageLoading && g3
|
||||
? _vm.roadStatusList.concat(_vm.roadStatusList)
|
||||
: null
|
||||
var g4 = !_vm.isPageLoading
|
||||
? _vm.roadStatusList && _vm.roadStatusList.length === 1
|
||||
: null
|
||||
var g5 = !_vm.isPageLoading
|
||||
? _vm.everyWeekShopData && _vm.everyWeekShopData.length > 0
|
||||
: null
|
||||
var l2 =
|
||||
!_vm.isPageLoading && g5
|
||||
? _vm.__map(_vm.everyWeekShopData, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g6 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") &&
|
||||
item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g7 = item.IMAGE_PATH && g6 ? item.IMAGE_PATH.split(",") : null
|
||||
return {
|
||||
$orig: $orig,
|
||||
g6: g6,
|
||||
g7: g7,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g8 = !_vm.isPageLoading
|
||||
? _vm.specialOffersList && _vm.specialOffersList.length > 0
|
||||
: null
|
||||
var l4 = g12
|
||||
? _vm.__map(_vm.productsList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g14 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") && item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g15 = item.IMAGE_PATH && g14 ? item.IMAGE_PATH.split(",") : null
|
||||
return {
|
||||
$orig: $orig,
|
||||
g14: g14,
|
||||
g15: g15,
|
||||
}
|
||||
})
|
||||
var g9 =
|
||||
!_vm.isPageLoading && g8
|
||||
? _vm.productsList && _vm.productsList.length > 0
|
||||
: null
|
||||
var l3 =
|
||||
!_vm.isPageLoading && g8
|
||||
? _vm.__map(_vm.specialOffersList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g10 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") &&
|
||||
item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g11 = item.IMAGE_PATH && g10 ? item.IMAGE_PATH.split(",") : null
|
||||
return {
|
||||
$orig: $orig,
|
||||
g10: g10,
|
||||
g11: g11,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g12 = !_vm.isPageLoading
|
||||
? _vm.productsList && _vm.productsList.length > 0
|
||||
: null
|
||||
var g13 =
|
||||
!_vm.isPageLoading && g12
|
||||
? _vm.specialOffersList && _vm.specialOffersList.length > 0
|
||||
: null
|
||||
var l4 =
|
||||
!_vm.isPageLoading && g12
|
||||
? _vm.__map(_vm.productsList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g14 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") &&
|
||||
item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g15 = item.IMAGE_PATH && g14 ? item.IMAGE_PATH.split(",") : null
|
||||
return {
|
||||
$orig: $orig,
|
||||
g14: g14,
|
||||
g15: g15,
|
||||
}
|
||||
})
|
||||
: null
|
||||
if (!_vm._isMounted) {
|
||||
_vm.e0 = function ($event, item) {
|
||||
var _temp = arguments[arguments.length - 1].currentTarget.dataset,
|
||||
@ -277,6 +303,7 @@ var _default = {
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
isPageLoading: true,
|
||||
menu: {},
|
||||
funList: [{
|
||||
label: "服务区",
|
||||
@ -434,7 +461,7 @@ var _default = {
|
||||
onLoad: function onLoad() {
|
||||
var _this2 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||||
var systemInfo, height, currentService, seatInfo, res, funList, newFunList, _this3;
|
||||
var systemInfo, height, currentService, seatInfo, res, funList, newFunList, loadPromises;
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
@ -480,42 +507,64 @@ var _default = {
|
||||
_context.next = 11;
|
||||
return _this2.handleGetAdvertisementData();
|
||||
case 11:
|
||||
// this.$refs.noticeRef.open("center");
|
||||
// if (new Date("2025-06-25 00:00:00").getTime() < new Date().getTime() && new Date("2025-07-02 23:59:59").getTime() > new Date().getTime()) {
|
||||
if (new Date(_this2.poster.PRESALE_STARTTIME).getTime() < new Date().getTime() && new Date(_this2.poster.PRESALE_ENDTIME).getTime() > new Date().getTime()) {
|
||||
_this2.$refs.noticeRef.open("center");
|
||||
_this3 = _this2;
|
||||
setTimeout(function () {
|
||||
_this3.$refs.noticeRef.close();
|
||||
}, 8000);
|
||||
} else {
|
||||
_this2.showPoster = false;
|
||||
}
|
||||
|
||||
// 并行加载所有数据
|
||||
loadPromises = [_this2.handleGetHighwayHeadlines(),
|
||||
// 高速头条播报
|
||||
_this2.handleGetHighwayHeadlines();
|
||||
_this2.handleGetSpecialOffers(),
|
||||
// 促销单品
|
||||
_this2.handleGetSpecialOffers();
|
||||
_this2.handleGetProductsList(),
|
||||
// 甄选商品
|
||||
_this2.handleGetProductsList();
|
||||
_this2.handleGetShoppingMall(),
|
||||
// 商城的内容
|
||||
_this2.handleGetShoppingMall();
|
||||
_this2.handleGetShopMallData()];
|
||||
if (_this2.seat.latitude && _this2.seat.longitude) {
|
||||
// 景区信息
|
||||
_this2.handleGetScenicData();
|
||||
loadPromises.push(_this2.handleGetScenicData());
|
||||
}
|
||||
|
||||
// 等待所有数据加载完成
|
||||
_context.prev = 13;
|
||||
_context.next = 16;
|
||||
return Promise.all(loadPromises);
|
||||
case 16:
|
||||
_context.next = 21;
|
||||
break;
|
||||
case 18:
|
||||
_context.prev = 18;
|
||||
_context.t0 = _context["catch"](13);
|
||||
console.error('数据加载失败:', _context.t0);
|
||||
case 21:
|
||||
// this.handleAes()
|
||||
_this2.$utils.addUserBehaviorNew({
|
||||
behaviorRecordDesc: "进入了首页"
|
||||
});
|
||||
_this2.handleGetShopMallData();
|
||||
case 19:
|
||||
|
||||
// 所有数据加载完成,隐藏骨架屏
|
||||
_this2.isPageLoading = false;
|
||||
|
||||
// 骨架屏结束后显示广告弹窗
|
||||
_this2.$nextTick(function () {
|
||||
// 稍微延迟一下让页面渲染完成
|
||||
setTimeout(function () {
|
||||
// this.$refs.noticeRef.open("center");
|
||||
// if (new Date("2025-06-25 00:00:00").getTime() < new Date().getTime() && new Date("2025-07-02 23:59:59").getTime() > new Date().getTime()) {
|
||||
if (new Date(_this2.poster.PRESALE_STARTTIME).getTime() < new Date().getTime() && new Date(_this2.poster.PRESALE_ENDTIME).getTime() > new Date().getTime()) {
|
||||
_this2.$refs.noticeRef.open("center");
|
||||
var _this3 = _this2;
|
||||
setTimeout(function () {
|
||||
_this3.$refs.noticeRef.close();
|
||||
}, 8000);
|
||||
} else {
|
||||
_this2.showPoster = false;
|
||||
}
|
||||
}, 300);
|
||||
});
|
||||
case 24:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee);
|
||||
}, _callee, null, [[13, 18]]);
|
||||
}))();
|
||||
},
|
||||
onShow: function onShow() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,3 +1,89 @@
|
||||
.skeleton-container.data-v-57280228 {
|
||||
padding: 0 32rpx;
|
||||
background: #f7f8f8;
|
||||
}
|
||||
.skeleton-animate.data-v-57280228 {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
-webkit-animation: skeleton-loading-data-v-57280228 1.5s infinite;
|
||||
animation: skeleton-loading-data-v-57280228 1.5s infinite;
|
||||
}
|
||||
@-webkit-keyframes skeleton-loading-data-v-57280228 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
@keyframes skeleton-loading-data-v-57280228 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
.skeleton-swiper.data-v-57280228 {
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
.skeleton-swiper .skeleton-item.data-v-57280228 {
|
||||
width: 100%;
|
||||
height: 340rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.skeleton-function-list.data-v-57280228 {
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
.skeleton-function-list .skeleton-function-row.data-v-57280228 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-function-list .skeleton-function-row .skeleton-function-item.data-v-57280228 {
|
||||
width: 200rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.skeleton-news.data-v-57280228 {
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
.skeleton-news .skeleton-news-item.data-v-57280228 {
|
||||
height: 80rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-list.data-v-57280228 {
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
.skeleton-product-list .skeleton-product-row.data-v-57280228 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-product-list .skeleton-product-row .skeleton-product-item.data-v-57280228 {
|
||||
width: 48%;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.skeleton-product-list .skeleton-product-row .skeleton-product-item .skeleton-product-image.data-v-57280228 {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-list .skeleton-product-row .skeleton-product-item .skeleton-product-info .skeleton-product-title.data-v-57280228 {
|
||||
height: 40rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.skeleton-product-list .skeleton-product-row .skeleton-product-item .skeleton-product-info .skeleton-product-price.data-v-57280228 {
|
||||
height: 32rpx;
|
||||
width: 60%;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.main.data-v-57280228 {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
@ -135,38 +135,52 @@ var render = function () {
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g1 = _vm.shopTypeList.length
|
||||
var g2 = !(g1 < 5) ? _vm.shopTypeList.length : null
|
||||
var g3 = !(g1 < 5) && g2 === 5 ? Math.ceil(6 / 5) : null
|
||||
var g4 = !(g1 < 5) && g2 === 5 ? Math.ceil(6 / 5) : null
|
||||
var g1 = _vm.showContent ? _vm.shopTypeList.length : null
|
||||
var g2 = _vm.showContent && !(g1 < 5) ? _vm.shopTypeList.length : null
|
||||
var g3 = _vm.showContent && !(g1 < 5) && g2 === 5 ? Math.ceil(6 / 5) : null
|
||||
var g4 = _vm.showContent && !(g1 < 5) && g2 === 5 ? Math.ceil(6 / 5) : null
|
||||
var g5 =
|
||||
!(g1 < 5) && !(g2 === 5) ? Math.ceil(_vm.shopTypeList.length / 5) : null
|
||||
_vm.showContent && !(g1 < 5) && !(g2 === 5)
|
||||
? Math.ceil(_vm.shopTypeList.length / 5)
|
||||
: null
|
||||
var g6 =
|
||||
!(g1 < 5) && !(g2 === 5) ? Math.ceil(_vm.shopTypeList.length / 5) : null
|
||||
var l1 = _vm.__map(_vm.shopTypeList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g7 =
|
||||
_vm.pageType === "UnionMall" &&
|
||||
index < Math.ceil(_vm.shopTypeList.length / 4 - 1) * 4
|
||||
return {
|
||||
$orig: $orig,
|
||||
g7: g7,
|
||||
}
|
||||
})
|
||||
_vm.showContent && !(g1 < 5) && !(g2 === 5)
|
||||
? Math.ceil(_vm.shopTypeList.length / 5)
|
||||
: null
|
||||
var l1 = _vm.showContent
|
||||
? _vm.__map(_vm.shopTypeList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g7 =
|
||||
_vm.pageType === "UnionMall" &&
|
||||
index < Math.ceil(_vm.shopTypeList.length / 4 - 1) * 4
|
||||
return {
|
||||
$orig: $orig,
|
||||
g7: g7,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g8 =
|
||||
_vm.haveActivity && false && _vm.pageType !== "UnionMall"
|
||||
_vm.showContent && _vm.haveActivity && false && _vm.pageType !== "UnionMall"
|
||||
? _vm.activityShopList && _vm.activityShopList.length > 0
|
||||
: null
|
||||
var g9 =
|
||||
_vm.haveActivity && false && _vm.pageType !== "UnionMall" && g8
|
||||
_vm.showContent &&
|
||||
_vm.haveActivity &&
|
||||
false &&
|
||||
_vm.pageType !== "UnionMall" &&
|
||||
g8
|
||||
? _vm.activityShopList.length
|
||||
: null
|
||||
var g10 =
|
||||
_vm.pageType !== "UnionMall" && _vm.pageType !== "UnionMall"
|
||||
_vm.showContent &&
|
||||
_vm.pageType !== "UnionMall" &&
|
||||
_vm.pageType !== "UnionMall"
|
||||
? _vm.weeklySpecialOffer.slice(0, 10).length
|
||||
: null
|
||||
var l2 =
|
||||
_vm.pageType !== "UnionMall" && _vm.pageType !== "UnionMall"
|
||||
_vm.showContent &&
|
||||
_vm.pageType !== "UnionMall" &&
|
||||
_vm.pageType !== "UnionMall"
|
||||
? _vm.__map(_vm.weeklySpecialOffer.slice(0, 10), function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g11 = item.IMAGE_PATH
|
||||
@ -182,11 +196,11 @@ var render = function () {
|
||||
})
|
||||
: null
|
||||
var g13 =
|
||||
_vm.pageType !== "UnionMall"
|
||||
_vm.showContent && _vm.pageType !== "UnionMall"
|
||||
? _vm.specialOffersList.slice(0, 10).length
|
||||
: null
|
||||
var l3 =
|
||||
_vm.pageType !== "UnionMall"
|
||||
_vm.showContent && _vm.pageType !== "UnionMall"
|
||||
? _vm.__map(_vm.specialOffersList.slice(0, 10), function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g14 = item.IMAGE_PATH
|
||||
@ -202,19 +216,19 @@ var render = function () {
|
||||
})
|
||||
: null
|
||||
var g16 =
|
||||
_vm.pageType === "UnionMall"
|
||||
_vm.showContent && _vm.pageType === "UnionMall"
|
||||
? _vm.newShopList && _vm.newShopList.length > 0
|
||||
: null
|
||||
var g17 =
|
||||
_vm.pageType === "UnionMall" && g16
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g16
|
||||
? _vm.hotShopList && _vm.hotShopList.length > 0
|
||||
: null
|
||||
var g18 =
|
||||
_vm.pageType === "UnionMall" && g16 && !g17
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g16 && !g17
|
||||
? _vm.goodShopList && _vm.goodShopList.length > 0
|
||||
: null
|
||||
var l4 =
|
||||
_vm.pageType === "UnionMall" && g16
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g16
|
||||
? _vm.__map(_vm.newShopList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g19 = _vm.goodShopList.length
|
||||
@ -225,19 +239,19 @@ var render = function () {
|
||||
})
|
||||
: null
|
||||
var g20 =
|
||||
_vm.pageType === "UnionMall"
|
||||
_vm.showContent && _vm.pageType === "UnionMall"
|
||||
? _vm.hotShopList && _vm.hotShopList.length > 0
|
||||
: null
|
||||
var g21 =
|
||||
_vm.pageType === "UnionMall" && g20
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g20
|
||||
? _vm.goodShopList && _vm.goodShopList.length > 0
|
||||
: null
|
||||
var g22 =
|
||||
_vm.pageType === "UnionMall" && g20 && !g21
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g20 && !g21
|
||||
? _vm.newShopList && _vm.newShopList.length > 0
|
||||
: null
|
||||
var l5 =
|
||||
_vm.pageType === "UnionMall" && g20
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g20
|
||||
? _vm.__map(_vm.hotShopList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g23 = _vm.goodShopList.length
|
||||
@ -248,19 +262,19 @@ var render = function () {
|
||||
})
|
||||
: null
|
||||
var g24 =
|
||||
_vm.pageType === "UnionMall"
|
||||
_vm.showContent && _vm.pageType === "UnionMall"
|
||||
? _vm.goodShopList && _vm.goodShopList.length > 0
|
||||
: null
|
||||
var g25 =
|
||||
_vm.pageType === "UnionMall" && g24
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g24
|
||||
? _vm.hotShopList && _vm.hotShopList.length > 0
|
||||
: null
|
||||
var g26 =
|
||||
_vm.pageType === "UnionMall" && g24 && !g25
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g24 && !g25
|
||||
? _vm.newShopList && _vm.newShopList.length > 0
|
||||
: null
|
||||
var l6 =
|
||||
_vm.pageType === "UnionMall" && g24
|
||||
_vm.showContent && _vm.pageType === "UnionMall" && g24
|
||||
? _vm.__map(_vm.goodShopList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g27 = _vm.goodShopList.length
|
||||
@ -271,18 +285,24 @@ var render = function () {
|
||||
})
|
||||
: null
|
||||
var g28 =
|
||||
_vm.pageType !== "UnionMall"
|
||||
_vm.showContent && _vm.pageType !== "UnionMall"
|
||||
? _vm.todayOffersList.slice(0, 10).length
|
||||
: null
|
||||
var l7 =
|
||||
_vm.pageType !== "UnionMall" ? _vm.todayOffersList.slice(0, 10) : null
|
||||
var g29 =
|
||||
_vm.pageType !== "UnionMall" &&
|
||||
_vm.productsList &&
|
||||
_vm.productsList.length > 0
|
||||
var g30 = g29 && _vm.pageType !== "UnionMall" ? _vm.productsList.length : null
|
||||
_vm.showContent && _vm.pageType !== "UnionMall"
|
||||
? _vm.todayOffersList.slice(0, 10)
|
||||
: null
|
||||
var g29 = _vm.showContent
|
||||
? _vm.pageType !== "UnionMall" &&
|
||||
_vm.productsList &&
|
||||
_vm.productsList.length > 0
|
||||
: null
|
||||
var g30 =
|
||||
_vm.showContent && g29 && _vm.pageType !== "UnionMall"
|
||||
? _vm.productsList.length
|
||||
: null
|
||||
var g31 =
|
||||
_vm.pageType === "UnionMall"
|
||||
_vm.showContent && _vm.pageType === "UnionMall"
|
||||
? _vm.showShopList && _vm.showShopList.length > 0
|
||||
: null
|
||||
if (!_vm._isMounted) {
|
||||
@ -406,6 +426,10 @@ var _default = {
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
showContent: false,
|
||||
// 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true,
|
||||
// 是否是首次进入页面
|
||||
menu: {},
|
||||
specialOffersList: [],
|
||||
// 特价优惠
|
||||
@ -622,6 +646,19 @@ var _default = {
|
||||
}))();
|
||||
},
|
||||
onShow: function onShow() {
|
||||
var _this3 = this;
|
||||
// 只在首次进入时显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(function () {
|
||||
_this3.showContent = true;
|
||||
}, 800); // 适当延长骨架屏显示时间
|
||||
this.isFirstLoad = false; // 标记已经不是首次进入
|
||||
} else {
|
||||
// 非首次进入,直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
|
||||
// 判断当前的购物车里面是否有东西
|
||||
var shopCarList = [];
|
||||
if (this.pageType === "UnionMall") {
|
||||
@ -657,6 +694,10 @@ var _default = {
|
||||
path: "/pages/index/index?pageType=".concat(this.pageType)
|
||||
};
|
||||
},
|
||||
onUnload: function onUnload() {
|
||||
// 页面卸载时重置首次加载标记,确保下次进入仍显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
},
|
||||
methods: {
|
||||
handleHideExportFun: function handleHideExportFun() {
|
||||
this.showExportFun = false;
|
||||
@ -713,7 +754,7 @@ var _default = {
|
||||
},
|
||||
// 榜单的方法
|
||||
handleGetSortList: function handleGetSortList() {
|
||||
var _this3 = this;
|
||||
var _this4 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
||||
var _this, data1, newShowList, data2, hotShopList, data3, goodShopList;
|
||||
return _regenerator.default.wrap(function _callee2$(_context2) {
|
||||
@ -721,7 +762,7 @@ var _default = {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
// 新品榜
|
||||
_this = _this3;
|
||||
_this = _this4;
|
||||
data1 = {};
|
||||
newShowList = uni.getStorageSync("newShowList");
|
||||
if (!newShowList) {
|
||||
@ -729,7 +770,7 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
data1 = newShowList;
|
||||
_this3.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
_this4.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
action_type: "WeChat_GetMallGoodsInfo",
|
||||
ownerUnitId: 911,
|
||||
COMMODITYNATURE: 5070,
|
||||
@ -746,7 +787,7 @@ var _default = {
|
||||
break;
|
||||
case 8:
|
||||
_context2.next = 10;
|
||||
return _this3.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
return _this4.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
action_type: "WeChat_GetMallGoodsInfo",
|
||||
ownerUnitId: 911,
|
||||
COMMODITYNATURE: 5070,
|
||||
@ -757,7 +798,7 @@ var _default = {
|
||||
case 10:
|
||||
data1 = _context2.sent;
|
||||
case 11:
|
||||
_this3.handleGetSortListShowData1(data1);
|
||||
_this4.handleGetSortListShowData1(data1);
|
||||
|
||||
// 热销榜
|
||||
data2 = {};
|
||||
@ -767,7 +808,7 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
data2 = hotShopList;
|
||||
_this3.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
_this4.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
action_type: "WeChat_GetMallGoodsInfo",
|
||||
ownerUnitId: 911,
|
||||
COMMODITYNATURE: 5070,
|
||||
@ -785,7 +826,7 @@ var _default = {
|
||||
break;
|
||||
case 19:
|
||||
_context2.next = 21;
|
||||
return _this3.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
return _this4.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
action_type: "WeChat_GetMallGoodsInfo",
|
||||
ownerUnitId: 911,
|
||||
COMMODITYNATURE: 5070,
|
||||
@ -797,7 +838,7 @@ var _default = {
|
||||
case 21:
|
||||
data2 = _context2.sent;
|
||||
case 22:
|
||||
_this3.handleGetSortListShowData2(data2);
|
||||
_this4.handleGetSortListShowData2(data2);
|
||||
|
||||
// 推荐榜
|
||||
data3 = {};
|
||||
@ -807,7 +848,7 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
data3 = goodShopList;
|
||||
_this3.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
_this4.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
action_type: "WeChat_GetMallGoodsInfo",
|
||||
ownerUnitId: 911,
|
||||
COMMODITYNATURE: 5070,
|
||||
@ -824,7 +865,7 @@ var _default = {
|
||||
break;
|
||||
case 30:
|
||||
_context2.next = 32;
|
||||
return _this3.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
return _this4.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
action_type: "WeChat_GetMallGoodsInfo",
|
||||
ownerUnitId: 911,
|
||||
COMMODITYNATURE: 5070,
|
||||
@ -835,7 +876,7 @@ var _default = {
|
||||
case 32:
|
||||
data3 = _context2.sent;
|
||||
case 33:
|
||||
_this3.handleGetSortListShowData3(data3);
|
||||
_this4.handleGetSortListShowData3(data3);
|
||||
case 34:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
@ -904,7 +945,7 @@ var _default = {
|
||||
},
|
||||
// 拿到工会之家的商品列表
|
||||
handleGetUnionShopList: function handleGetUnionShopList() {
|
||||
var _this4 = this;
|
||||
var _this5 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||||
var data, list, shopList, thisResList;
|
||||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||||
@ -915,39 +956,39 @@ var _default = {
|
||||
title: "加载中..."
|
||||
});
|
||||
_context3.next = 3;
|
||||
return _this4.$api.getCoop({
|
||||
return _this5.$api.getCoop({
|
||||
action_type: "WeChat_GetMallGoodsInfo",
|
||||
ownerUnitId: 911,
|
||||
// 业主单位 写死
|
||||
COMMODITYNATURE: 5070,
|
||||
// 一个商城的大类 也写死
|
||||
priceStart: _this4.minPrice,
|
||||
priceStart: _this5.minPrice,
|
||||
// 价钱的最小值
|
||||
priceEnd: _this4.maxPrice,
|
||||
priceEnd: _this5.maxPrice,
|
||||
// 价钱的最大值
|
||||
payMethod: "1000,3000",
|
||||
// 写死的
|
||||
commodityNature: 5070,
|
||||
// 一个商城的大类 也写死
|
||||
commodityName: _this4.searchShopName,
|
||||
commodityName: _this5.searchShopName,
|
||||
// 类型名称的搜索
|
||||
Page_Size: _this4.shopMsg.pageSize,
|
||||
Page_Size: _this5.shopMsg.pageSize,
|
||||
// 每页多少条
|
||||
Page_Index: _this4.shopMsg.pageIndex,
|
||||
Page_Index: _this5.shopMsg.pageIndex,
|
||||
// 页码
|
||||
userdefinedtypeId: _this4.selectProducts || "",
|
||||
userdefinedtypeId: _this5.selectProducts || "",
|
||||
// 大小类id
|
||||
justCommodity: 1,
|
||||
// 写死
|
||||
sortStr: "".concat(_this4.sortTypeList[_this4.sortType], " ").concat(new Date().getTime % 2 > 0 ? "" : "desc") // 排序
|
||||
sortStr: "".concat(_this5.sortTypeList[_this5.sortType], " ").concat(new Date().getTime % 2 > 0 ? "" : "desc") // 排序
|
||||
});
|
||||
case 3:
|
||||
data = _context3.sent;
|
||||
console.log("handleGetSpecialOffers", data);
|
||||
list = data.Data && data.Data.List ? data.Data.List : [];
|
||||
shopList = [];
|
||||
if (_this4.shopMsg.pageIndex > 1) {
|
||||
shopList = _this4.showShopList;
|
||||
if (_this5.shopMsg.pageIndex > 1) {
|
||||
shopList = _this5.showShopList;
|
||||
}
|
||||
thisResList = [];
|
||||
if (list && list.length > 0) {
|
||||
@ -972,13 +1013,13 @@ var _default = {
|
||||
});
|
||||
}
|
||||
if (thisResList && thisResList.length < 6) {
|
||||
_this4.shopMsg.isOver = true;
|
||||
_this5.shopMsg.isOver = true;
|
||||
}
|
||||
console.log("shopList", shopList);
|
||||
_this4.showShopList = shopList.concat(thisResList);
|
||||
_this5.showShopList = shopList.concat(thisResList);
|
||||
// this.allShopList = shopList
|
||||
// this.showShopList = this.allShopList.slice(0, this.pageIndex * 10)
|
||||
console.log("this.showShopList", _this4.showShopList);
|
||||
console.log("this.showShopList", _this5.showShopList);
|
||||
uni.hideLoading();
|
||||
case 15:
|
||||
case "end":
|
||||
@ -990,27 +1031,27 @@ var _default = {
|
||||
},
|
||||
// 重置价格筛选
|
||||
handleReset: function handleReset() {
|
||||
var _this5 = this;
|
||||
var _this6 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
||||
return _regenerator.default.wrap(function _callee4$(_context4) {
|
||||
while (1) {
|
||||
switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
_this5.maxPrice = "";
|
||||
_this5.minPrice = "";
|
||||
_this5.searchShopName = "";
|
||||
_this5.showShopList = [];
|
||||
_this5.shopMsg = {
|
||||
_this6.maxPrice = "";
|
||||
_this6.minPrice = "";
|
||||
_this6.searchShopName = "";
|
||||
_this6.showShopList = [];
|
||||
_this6.shopMsg = {
|
||||
pageIndex: 1,
|
||||
pageSize: 6,
|
||||
isOver: false
|
||||
};
|
||||
// 拿到工会之家的商品列表
|
||||
_context4.next = 7;
|
||||
return _this5.handleGetUnionShopList();
|
||||
return _this6.handleGetUnionShopList();
|
||||
case 7:
|
||||
_this5.$refs.priceRangeRef.close();
|
||||
_this5.priceRangeRefShow = false;
|
||||
_this6.$refs.priceRangeRef.close();
|
||||
_this6.priceRangeRefShow = false;
|
||||
case 9:
|
||||
case "end":
|
||||
return _context4.stop();
|
||||
@ -1021,33 +1062,33 @@ var _default = {
|
||||
},
|
||||
// 价格筛选的确认
|
||||
handleConfirm: function handleConfirm() {
|
||||
var _this6 = this;
|
||||
var _this7 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
||||
var newMax, newMin;
|
||||
return _regenerator.default.wrap(function _callee5$(_context5) {
|
||||
while (1) {
|
||||
switch (_context5.prev = _context5.next) {
|
||||
case 0:
|
||||
if (Number(_this6.minPrice) <= Number(_this6.maxPrice)) {} else {
|
||||
if (_this6.maxPrice && _this6.minPrice) {
|
||||
newMax = Number(_this6.minPrice);
|
||||
newMin = Number(_this6.maxPrice);
|
||||
_this6.maxPrice = newMax;
|
||||
_this6.minPrice = newMin;
|
||||
if (Number(_this7.minPrice) <= Number(_this7.maxPrice)) {} else {
|
||||
if (_this7.maxPrice && _this7.minPrice) {
|
||||
newMax = Number(_this7.minPrice);
|
||||
newMin = Number(_this7.maxPrice);
|
||||
_this7.maxPrice = newMax;
|
||||
_this7.minPrice = newMin;
|
||||
}
|
||||
}
|
||||
_this6.showShopList = [];
|
||||
_this6.shopMsg = {
|
||||
_this7.showShopList = [];
|
||||
_this7.shopMsg = {
|
||||
pageIndex: 1,
|
||||
pageSize: 6,
|
||||
isOver: false
|
||||
};
|
||||
// 拿到工会之家的商品列表
|
||||
_context5.next = 5;
|
||||
return _this6.handleGetUnionShopList();
|
||||
return _this7.handleGetUnionShopList();
|
||||
case 5:
|
||||
_this6.$refs.priceRangeRef.close();
|
||||
_this6.priceRangeRefShow = false;
|
||||
_this7.$refs.priceRangeRef.close();
|
||||
_this7.priceRangeRefShow = false;
|
||||
case 7:
|
||||
case "end":
|
||||
return _context5.stop();
|
||||
@ -1076,14 +1117,14 @@ var _default = {
|
||||
},
|
||||
// 拿到顶部商品大类的方法
|
||||
handleGetShopBigType: function handleGetShopBigType() {
|
||||
var _this7 = this;
|
||||
var _this8 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
||||
var _this, typeList, getWeChatGetMallGoodsType, data;
|
||||
return _regenerator.default.wrap(function _callee6$(_context6) {
|
||||
while (1) {
|
||||
switch (_context6.prev = _context6.next) {
|
||||
case 0:
|
||||
_this = _this7;
|
||||
_this = _this8;
|
||||
typeList = [];
|
||||
getWeChatGetMallGoodsType = uni.getStorageSync('getWeChatGetMallGoodsType');
|
||||
if (!getWeChatGetMallGoodsType) {
|
||||
@ -1091,7 +1132,7 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
typeList = getWeChatGetMallGoodsType;
|
||||
_this7.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
_this8.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
ownerUnitId: 911,
|
||||
commodityNature: 5070 // 类型
|
||||
}).then(function (data) {
|
||||
@ -1105,7 +1146,7 @@ var _default = {
|
||||
break;
|
||||
case 8:
|
||||
_context6.next = 10;
|
||||
return _this7.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
return _this8.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
ownerUnitId: 911,
|
||||
commodityNature: 5070 // 类型
|
||||
});
|
||||
@ -1116,7 +1157,7 @@ var _default = {
|
||||
uni.setStorageSync("getWeChatGetMallGoodsType", typeList);
|
||||
case 14:
|
||||
console.log('typeList', typeList);
|
||||
_this7.handleShowPageShopBigType(typeList);
|
||||
_this8.handleShowPageShopBigType(typeList);
|
||||
case 16:
|
||||
case "end":
|
||||
return _context6.stop();
|
||||
@ -1127,7 +1168,7 @@ var _default = {
|
||||
},
|
||||
// 拿到顶部商品大类的方法 实际要赋值到页面上去的方法
|
||||
handleShowPageShopBigType: function handleShowPageShopBigType(typeList) {
|
||||
var _this8 = this;
|
||||
var _this9 = this;
|
||||
var resList = [];
|
||||
// 如果有活动的话就有值
|
||||
var activityObj = {};
|
||||
@ -1138,7 +1179,7 @@ var _default = {
|
||||
resList.push(item);
|
||||
}
|
||||
if (item.UserdefinedType_Id === 1355) {
|
||||
_this8.haveActivity = true;
|
||||
_this9.haveActivity = true;
|
||||
activityObj = item;
|
||||
}
|
||||
});
|
||||
@ -1152,7 +1193,7 @@ var _default = {
|
||||
},
|
||||
// 拿到活动的商品列表 可能不调用 有判断的
|
||||
handleGetActivityList: function handleGetActivityList() {
|
||||
var _this9 = this;
|
||||
var _this10 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
||||
var data, list, res;
|
||||
return _regenerator.default.wrap(function _callee7$(_context7) {
|
||||
@ -1160,7 +1201,7 @@ var _default = {
|
||||
switch (_context7.prev = _context7.next) {
|
||||
case 0:
|
||||
_context7.next = 2;
|
||||
return _this9.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude',
|
||||
return _this10.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude',
|
||||
// url,
|
||||
{
|
||||
ownerUnitId: 911,
|
||||
@ -1189,7 +1230,7 @@ var _default = {
|
||||
}
|
||||
});
|
||||
}
|
||||
_this9.activityShopList = res;
|
||||
_this10.activityShopList = res;
|
||||
case 8:
|
||||
case "end":
|
||||
return _context7.stop();
|
||||
@ -1200,14 +1241,14 @@ var _default = {
|
||||
},
|
||||
// 拿到特价优惠的商品列表 nature 5030
|
||||
handleGetSpecialOffers: function handleGetSpecialOffers() {
|
||||
var _this10 = this;
|
||||
var _this11 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
||||
var _this, list, getWeChatGetMallGoodsInfoExclude, url, _url, data;
|
||||
return _regenerator.default.wrap(function _callee8$(_context8) {
|
||||
while (1) {
|
||||
switch (_context8.prev = _context8.next) {
|
||||
case 0:
|
||||
_this = _this10;
|
||||
_this = _this11;
|
||||
list = [];
|
||||
getWeChatGetMallGoodsInfoExclude = uni.getStorageSync("getWeChatGetMallGoodsInfoExclude");
|
||||
if (!getWeChatGetMallGoodsInfoExclude) {
|
||||
@ -1215,8 +1256,8 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
list = getWeChatGetMallGoodsInfoExclude;
|
||||
url = _this10.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
_this10.$api.$javaGet(url, {
|
||||
url = _this11.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
_this11.$api.$javaGet(url, {
|
||||
ownerUnitId: 911,
|
||||
// COMMODITYNATURE: 5030,//特价优惠
|
||||
COMMODITYNATURE: 5021,
|
||||
@ -1237,9 +1278,9 @@ var _default = {
|
||||
_context8.next = 14;
|
||||
break;
|
||||
case 9:
|
||||
_url = _this10.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
_url = _this11.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
_context8.next = 12;
|
||||
return _this10.$api.$javaGet(
|
||||
return _this11.$api.$javaGet(
|
||||
// '/third-party/getExcludeWeChatGetMallGoodsInfo',
|
||||
_url, {
|
||||
ownerUnitId: 911,
|
||||
@ -1257,7 +1298,7 @@ var _default = {
|
||||
data = _context8.sent;
|
||||
list = data.Data && data.Data.List ? data.Data.List : [];
|
||||
case 14:
|
||||
_this10.handleGetSpecialOffersShowData(list);
|
||||
_this11.handleGetSpecialOffersShowData(list);
|
||||
case 15:
|
||||
case "end":
|
||||
return _context8.stop();
|
||||
@ -1299,14 +1340,14 @@ var _default = {
|
||||
},
|
||||
// 拿到每周特惠的商品列表
|
||||
handleGetEveryWeekShop: function handleGetEveryWeekShop() {
|
||||
var _this11 = this;
|
||||
var _this12 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
||||
var _this, list, getWeChatGetMallGoodsInfo, data;
|
||||
return _regenerator.default.wrap(function _callee9$(_context9) {
|
||||
while (1) {
|
||||
switch (_context9.prev = _context9.next) {
|
||||
case 0:
|
||||
_this = _this11;
|
||||
_this = _this12;
|
||||
list = [];
|
||||
getWeChatGetMallGoodsInfo = uni.getStorageSync("getWeChatGetMallGoodsInfo");
|
||||
if (!getWeChatGetMallGoodsInfo) {
|
||||
@ -1314,7 +1355,7 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
list = getWeChatGetMallGoodsInfo;
|
||||
_this11.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
_this12.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
ownerUnitId: 911,
|
||||
userdefinedtypeId: 4597,
|
||||
userdefinedTypeId: 4597,
|
||||
@ -1330,7 +1371,7 @@ var _default = {
|
||||
break;
|
||||
case 8:
|
||||
_context9.next = 10;
|
||||
return _this11.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
return _this12.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
ownerUnitId: 911,
|
||||
userdefinedtypeId: 4597,
|
||||
userdefinedTypeId: 4597,
|
||||
@ -1341,7 +1382,7 @@ var _default = {
|
||||
list = data.Data && data.Data.List ? data.Data.List : [];
|
||||
uni.setStorageSync("getWeChatGetMallGoodsInfo", list);
|
||||
case 13:
|
||||
_this11.handleGetEveryWeekShopShowData(list);
|
||||
_this12.handleGetEveryWeekShopShowData(list);
|
||||
case 14:
|
||||
case "end":
|
||||
return _context9.stop();
|
||||
@ -1379,14 +1420,14 @@ var _default = {
|
||||
},
|
||||
// 拿到今日推荐的商品列表 nature 5050
|
||||
handleGetTodayOffers: function handleGetTodayOffers() {
|
||||
var _this12 = this;
|
||||
var _this13 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
||||
var _this, getWeChatGetMallGoodsInfoExcludeToday, list, data;
|
||||
return _regenerator.default.wrap(function _callee10$(_context10) {
|
||||
while (1) {
|
||||
switch (_context10.prev = _context10.next) {
|
||||
case 0:
|
||||
_this = _this12;
|
||||
_this = _this13;
|
||||
getWeChatGetMallGoodsInfoExcludeToday = uni.getStorageSync("getWeChatGetMallGoodsInfoExcludeToday");
|
||||
list = [];
|
||||
if (!getWeChatGetMallGoodsInfoExcludeToday) {
|
||||
@ -1394,7 +1435,7 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
list = getWeChatGetMallGoodsInfoExcludeToday;
|
||||
_this12.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', {
|
||||
_this13.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', {
|
||||
ownerUnitId: 911,
|
||||
// COMMODITYNATURE: 4598,// 原今日推荐
|
||||
COMMODITYNATURE: 5022,
|
||||
@ -1416,7 +1457,7 @@ var _default = {
|
||||
break;
|
||||
case 8:
|
||||
_context10.next = 10;
|
||||
return _this12.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', {
|
||||
return _this13.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', {
|
||||
ownerUnitId: 911,
|
||||
// COMMODITYNATURE: 4598,// 原今日推荐
|
||||
COMMODITYNATURE: 5022,
|
||||
@ -1432,7 +1473,7 @@ var _default = {
|
||||
data = _context10.sent;
|
||||
list = data.Data.List;
|
||||
case 12:
|
||||
_this12.handleGetTodayOffersShowData(list);
|
||||
_this13.handleGetTodayOffersShowData(list);
|
||||
case 13:
|
||||
case "end":
|
||||
return _context10.stop();
|
||||
@ -1493,7 +1534,7 @@ var _default = {
|
||||
},
|
||||
// 拿到甄选商品 3000
|
||||
handleGetProductsList: function handleGetProductsList() {
|
||||
var _this13 = this;
|
||||
var _this14 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
||||
var data, list, resList, thisResList;
|
||||
return _regenerator.default.wrap(function _callee11$(_context11) {
|
||||
@ -1504,7 +1545,7 @@ var _default = {
|
||||
title: "加载中"
|
||||
});
|
||||
_context11.next = 3;
|
||||
return _this13.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
return _this14.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
|
||||
ownerUnitId: 911,
|
||||
justCommodity: 1,
|
||||
payMethod: "2000,3000",
|
||||
@ -1516,8 +1557,8 @@ var _default = {
|
||||
console.log('积分商城', list);
|
||||
resList = [];
|
||||
thisResList = [];
|
||||
if (_this13.shopMsg.pageIndex > 1) {
|
||||
resList = _this13.productsList;
|
||||
if (_this14.shopMsg.pageIndex > 1) {
|
||||
resList = _this14.productsList;
|
||||
}
|
||||
if (list && list.length > 0) {
|
||||
// this.selectProducts = list[0].UserdefinedType_Id;
|
||||
@ -1542,11 +1583,11 @@ var _default = {
|
||||
});
|
||||
}
|
||||
if (thisResList && thisResList.length < 6) {
|
||||
_this13.shopMsg.isOver = true;
|
||||
_this14.shopMsg.isOver = true;
|
||||
}
|
||||
// this.productsList = list;
|
||||
_this13.productsList = resList.concat(thisResList);
|
||||
console.log("甄选商品", _this13.productsList);
|
||||
_this14.productsList = resList.concat(thisResList);
|
||||
console.log("甄选商品", _this14.productsList);
|
||||
uni.hideLoading();
|
||||
|
||||
// let shopList = []
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,3 +1,159 @@
|
||||
/* 骨架屏动画 */
|
||||
@-webkit-keyframes shimmer-data-v-79c11018 {
|
||||
0% {
|
||||
background-position: -468px 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 468px 0;
|
||||
}
|
||||
}
|
||||
@keyframes shimmer-data-v-79c11018 {
|
||||
0% {
|
||||
background-position: -468px 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 468px 0;
|
||||
}
|
||||
}
|
||||
.skeleton.data-v-79c11018 {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 400px 100%;
|
||||
-webkit-animation: shimmer-data-v-79c11018 1.2s infinite;
|
||||
animation: shimmer-data-v-79c11018 1.2s infinite;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
/* 商城页面骨架屏样式 */
|
||||
.shop-skeleton.data-v-79c11018 {
|
||||
padding: 0 32rpx;
|
||||
background: #f7f8fa;
|
||||
min-height: calc(100vh - 200rpx);
|
||||
}
|
||||
.skeleton-content-box.data-v-79c11018 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx 32rpx;
|
||||
}
|
||||
.skeleton-content-box .skeleton-category-grid.data-v-79c11018 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.skeleton-content-box .skeleton-category-grid .skeleton-category-item.data-v-79c11018 {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-content-box .skeleton-category-grid .skeleton-category-item .skeleton-category-icon.data-v-79c11018 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 16rpx;
|
||||
margin: 0 auto 16rpx auto;
|
||||
}
|
||||
.skeleton-content-box .skeleton-category-grid .skeleton-category-item .skeleton-category-text.data-v-79c11018 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.skeleton-categories.data-v-79c11018 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.skeleton-categories .skeleton-category-item.data-v-79c11018 {
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
.skeleton-categories .skeleton-category-item.data-v-79c11018:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.skeleton-categories .skeleton-category-item .skeleton-category-icon.data-v-79c11018 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
.skeleton-categories .skeleton-category-item .skeleton-category-text.data-v-79c11018 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.skeleton-section.data-v-79c11018 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.skeleton-section .skeleton-section-header.data-v-79c11018 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-section .skeleton-section-header .skeleton-section-title.data-v-79c11018 {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.skeleton-section .skeleton-section-header .skeleton-more-button.data-v-79c11018 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
.skeleton-section .skeleton-horizontal-list.data-v-79c11018 {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.skeleton-section .skeleton-horizontal-list .skeleton-horizontal-item.data-v-79c11018 {
|
||||
flex-shrink: 0;
|
||||
margin-right: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.skeleton-section .skeleton-horizontal-list .skeleton-horizontal-item.data-v-79c11018:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.skeleton-section .skeleton-horizontal-list .skeleton-horizontal-item .skeleton-horizontal-image.data-v-79c11018 {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-section .skeleton-horizontal-list .skeleton-horizontal-item .skeleton-horizontal-price.data-v-79c11018 {
|
||||
width: 80rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.skeleton-grid.data-v-79c11018 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.skeleton-grid .skeleton-grid-item.data-v-79c11018 {
|
||||
width: calc(50% - 16rpx);
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-grid .skeleton-grid-item .skeleton-product-image.data-v-79c11018 {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-grid .skeleton-grid-item .skeleton-product-name.data-v-79c11018 {
|
||||
width: 80%;
|
||||
height: 28rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.skeleton-grid .skeleton-grid-item .skeleton-product-price.data-v-79c11018 {
|
||||
width: 60%;
|
||||
height: 24rpx;
|
||||
}
|
||||
.main.data-v-79c11018 {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
@ -125,24 +125,26 @@ var render = function () {
|
||||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var l0 = _vm.__map(_vm.shopList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") && item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g1 = item.IMAGE_PATH && g0 ? item.IMAGE_PATH.split(",") : null
|
||||
var g2 = !item.IMAGE_PATH ? item.List && item.List.length > 0 : null
|
||||
var g3 = _vm.$utils.handleFormatNumber(
|
||||
item.COMMODITY_MEMBERPRICE * item.count
|
||||
)
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
g2: g2,
|
||||
g3: g3,
|
||||
}
|
||||
})
|
||||
var l0 = _vm.showContent
|
||||
? _vm.__map(_vm.shopList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") && item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g1 = item.IMAGE_PATH && g0 ? item.IMAGE_PATH.split(",") : null
|
||||
var g2 = !item.IMAGE_PATH ? item.List && item.List.length > 0 : null
|
||||
var g3 = _vm.$utils.handleFormatNumber(
|
||||
item.COMMODITY_MEMBERPRICE * item.count
|
||||
)
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
g2: g2,
|
||||
g3: g3,
|
||||
}
|
||||
})
|
||||
: null
|
||||
_vm.$mp.data = Object.assign(
|
||||
{},
|
||||
{
|
||||
@ -209,6 +211,10 @@ var _default = {
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
showContent: false,
|
||||
// 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true,
|
||||
// 是否是首次进入页面
|
||||
menu: {},
|
||||
// 手机基本信息
|
||||
pageType: "normal",
|
||||
@ -319,6 +325,19 @@ var _default = {
|
||||
}))();
|
||||
},
|
||||
onShow: function onShow() {
|
||||
var _this3 = this;
|
||||
// 只在首次进入时显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(function () {
|
||||
_this3.showContent = true;
|
||||
}, 800); // 适当延长骨架屏显示时间
|
||||
this.isFirstLoad = false; // 标记已经不是首次进入
|
||||
} else {
|
||||
// 非首次进入,直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
|
||||
// 判断当前的购物车里面是否有东西
|
||||
var shopCarList = [];
|
||||
if (this.bigPageType === "UnionMall") {
|
||||
@ -360,6 +379,10 @@ var _default = {
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function onUnload() {
|
||||
// 页面卸载时重置首次加载标记,确保下次进入仍显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
},
|
||||
methods: {
|
||||
// 显示展开功能
|
||||
handleShowExportBox: function handleShowExportBox(e) {
|
||||
@ -386,12 +409,12 @@ var _default = {
|
||||
},
|
||||
// 切换选中的地址
|
||||
handleChangeAddress: function handleChangeAddress(id) {
|
||||
var _this3 = this;
|
||||
var _this4 = this;
|
||||
console.log("this.selectAddressId", this.selectAddressId);
|
||||
this.addressList.forEach(function (item) {
|
||||
if (item.MEMBERADDRESS_ID === id) {
|
||||
_this3.showAddressObj = item;
|
||||
_this3.selectAddressId = item.MEMBERADDRESS_ID;
|
||||
_this4.showAddressObj = item;
|
||||
_this4.selectAddressId = item.MEMBERADDRESS_ID;
|
||||
}
|
||||
});
|
||||
this.$forceUpdate();
|
||||
@ -407,7 +430,7 @@ var _default = {
|
||||
},
|
||||
// 选择地址列表
|
||||
handleGetAddressList: function handleGetAddressList() {
|
||||
var _this4 = this;
|
||||
var _this5 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
||||
var data, list, haveMEMBERADDRESSCODEList, defaultAddress;
|
||||
return _regenerator.default.wrap(function _callee2$(_context2) {
|
||||
@ -415,7 +438,7 @@ var _default = {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return _this4.$api.getCoop({
|
||||
return _this5.$api.getCoop({
|
||||
action_type: "GetAddressList"
|
||||
});
|
||||
case 2:
|
||||
@ -441,14 +464,14 @@ var _default = {
|
||||
}
|
||||
}
|
||||
if (defaultAddress) {
|
||||
_this4.showAddressObj = defaultAddress;
|
||||
_this4.selectAddressId = defaultAddress.MEMBERADDRESS_ID;
|
||||
_this5.showAddressObj = defaultAddress;
|
||||
_this5.selectAddressId = defaultAddress.MEMBERADDRESS_ID;
|
||||
} else {
|
||||
_this4.showAddressObj = {};
|
||||
_this4.selectAddressId = 0;
|
||||
_this5.showAddressObj = {};
|
||||
_this5.selectAddressId = 0;
|
||||
}
|
||||
_this4.addressList = list;
|
||||
_this4.$forceUpdate();
|
||||
_this5.addressList = list;
|
||||
_this5.$forceUpdate();
|
||||
case 13:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
@ -459,7 +482,7 @@ var _default = {
|
||||
},
|
||||
// 获取最新的用户余额
|
||||
handleGetUserBalance: function handleGetUserBalance() {
|
||||
var _this5 = this;
|
||||
var _this6 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||||
var data;
|
||||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||||
@ -470,14 +493,14 @@ var _default = {
|
||||
title: "获取用户余额..."
|
||||
});
|
||||
_context3.next = 3;
|
||||
return _this5.$api.getCoop({
|
||||
return _this6.$api.getCoop({
|
||||
action_type: "GetMembershipInfo",
|
||||
WechatUserId: _this5.user.WechatUserId
|
||||
WechatUserId: _this6.user.WechatUserId
|
||||
});
|
||||
case 3:
|
||||
data = _context3.sent;
|
||||
_this5.userInfo = data.Data;
|
||||
console.log("this.userInfo", _this5.userInfo);
|
||||
_this6.userInfo = data.Data;
|
||||
console.log("this.userInfo", _this6.userInfo);
|
||||
uni.hideLoading();
|
||||
case 7:
|
||||
case "end":
|
||||
@ -551,13 +574,13 @@ var _default = {
|
||||
},
|
||||
// 拿到合计金额
|
||||
handleSum: function handleSum() {
|
||||
var _this6 = this;
|
||||
var _this7 = this;
|
||||
this.totalPay = 0;
|
||||
this.shopList.forEach(function (u) {
|
||||
if (u.select === true) {
|
||||
var goodNum = Number(u.count);
|
||||
_this6.totalPay += Number(u.COMMODITY_MEMBERPRICE) * goodNum;
|
||||
_this6.totalPay = Number(_this6.totalPay.toFixed(2));
|
||||
_this7.totalPay += Number(u.COMMODITY_MEMBERPRICE) * goodNum;
|
||||
_this7.totalPay = Number(_this7.totalPay.toFixed(2));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -454,4 +454,166 @@
|
||||
left: 50%;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
/* 购物车页面骨架屏样式 */
|
||||
.shop-car-skeleton.data-v-fce33af8 {
|
||||
width: 100%;
|
||||
background: #f2f4f5;
|
||||
padding-bottom: 120px;
|
||||
}
|
||||
/* 基础骨架屏动画 */
|
||||
.skeleton.data-v-fce33af8 {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 200% 100%;
|
||||
-webkit-animation: loading-data-v-fce33af8 1.5s infinite;
|
||||
animation: loading-data-v-fce33af8 1.5s infinite;
|
||||
}
|
||||
@-webkit-keyframes loading-data-v-fce33af8 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
@keyframes loading-data-v-fce33af8 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
/* 顶部地址选择区域骨架样式 */
|
||||
.skeleton-location-icon-small.data-v-fce33af8 {
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.skeleton-address-text.data-v-fce33af8 {
|
||||
border-radius: 10px;
|
||||
}
|
||||
.skeleton-phone-text.data-v-fce33af8 {
|
||||
border-radius: 9px;
|
||||
}
|
||||
.skeleton-edit-text.data-v-fce33af8 {
|
||||
border-radius: 10px;
|
||||
}
|
||||
/* 商品列表骨架 */
|
||||
.skeleton-product-list.data-v-fce33af8 {
|
||||
width: calc(100% - 32px);
|
||||
margin: 0 16px;
|
||||
background: #ffffff;
|
||||
border-radius: 10px;
|
||||
padding: 24rpx;
|
||||
}
|
||||
.skeleton-product-item.data-v-fce33af8 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1px solid #f5f7f7;
|
||||
}
|
||||
.skeleton-product-item.data-v-fce33af8:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.skeleton-product-left.data-v-fce33af8 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.skeleton-product-left .skeleton-checkbox.data-v-fce33af8 {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-left .skeleton-product-image.data-v-fce33af8 {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-left .skeleton-total-price.data-v-fce33af8 {
|
||||
width: 100rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
.skeleton-product-right.data-v-fce33af8 {
|
||||
flex: 1;
|
||||
}
|
||||
.skeleton-product-right .skeleton-product-title.data-v-fce33af8 {
|
||||
width: 85%;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-right .skeleton-product-actions.data-v-fce33af8 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-right .skeleton-product-actions .skeleton-price-info.data-v-fce33af8 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.skeleton-product-right .skeleton-product-actions .skeleton-price-info .skeleton-price.data-v-fce33af8 {
|
||||
width: 80rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.skeleton-product-right .skeleton-product-actions .skeleton-price-info .skeleton-unit.data-v-fce33af8 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.skeleton-product-right .skeleton-product-actions .skeleton-quantity-control.data-v-fce33af8 {
|
||||
width: 240rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.skeleton-product-right .skeleton-remark-input.data-v-fce33af8 {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
/* 底部操作栏骨架 */
|
||||
.skeleton-bottom.data-v-fce33af8 {
|
||||
position: fixed;
|
||||
bottom: 100rpx;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.skeleton-bottom .skeleton-bottom-left .skeleton-select-all.data-v-fce33af8 {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.skeleton-bottom .skeleton-bottom-right.data-v-fce33af8 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.skeleton-bottom .skeleton-bottom-right .skeleton-total-text.data-v-fce33af8 {
|
||||
width: 60rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.skeleton-bottom .skeleton-bottom-right .skeleton-total-amount.data-v-fce33af8 {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
.skeleton-bottom .skeleton-bottom-right .skeleton-submit-button.data-v-fce33af8 {
|
||||
width: 210rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
|
||||
|
||||
@ -125,25 +125,28 @@ var render = function () {
|
||||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var l0 = _vm.changBigTypeLoading
|
||||
? _vm.__map(_vm.visibleList, function (item, i) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") && item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g1 = item.IMAGE_PATH && g0 ? item.IMAGE_PATH.split(",") : null
|
||||
var g2 = item.SKULIST && item.SKULIST.length > 0
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
g2: g2,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g3 = _vm.changBigTypeLoading
|
||||
? !_vm.rightShopList || _vm.rightShopList.length === 0
|
||||
: null
|
||||
var l0 =
|
||||
_vm.showContent && _vm.changBigTypeLoading
|
||||
? _vm.__map(_vm.visibleList, function (item, i) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = item.IMAGE_PATH
|
||||
? item.IMAGE_PATH.split(",") &&
|
||||
item.IMAGE_PATH.split(",").length > 1
|
||||
: null
|
||||
var g1 = item.IMAGE_PATH && g0 ? item.IMAGE_PATH.split(",") : null
|
||||
var g2 = item.SKULIST && item.SKULIST.length > 0
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
g2: g2,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g3 =
|
||||
_vm.showContent && _vm.changBigTypeLoading
|
||||
? !_vm.rightShopList || _vm.rightShopList.length === 0
|
||||
: null
|
||||
if (!_vm._isMounted) {
|
||||
_vm.e0 = function (e) {
|
||||
return (e.target.src = "/static/images/home/defultImg.png")
|
||||
@ -229,6 +232,10 @@ var _default = {
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
showContent: false,
|
||||
// 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true,
|
||||
// 是否是首次进入页面
|
||||
menu: {},
|
||||
// 手机的一些位置信息
|
||||
searchText: "",
|
||||
@ -377,6 +384,18 @@ var _default = {
|
||||
});
|
||||
},
|
||||
onShow: function onShow() {
|
||||
var _this2 = this;
|
||||
// 只在首次进入时显示骨架屏
|
||||
if (this.isFirstLoad) {
|
||||
this.showContent = false;
|
||||
setTimeout(function () {
|
||||
_this2.showContent = true;
|
||||
}, 800); // 适当延长骨架屏显示时间
|
||||
this.isFirstLoad = false; // 标记已经不是首次进入
|
||||
} else {
|
||||
// 非首次进入,直接显示内容
|
||||
this.showContent = true;
|
||||
}
|
||||
this.menu = uni.getMenuButtonBoundingClientRect();
|
||||
// 判断当前的购物车里面是否有东西
|
||||
var shopCarList = [];
|
||||
@ -429,6 +448,8 @@ var _default = {
|
||||
// this.searchText = "";
|
||||
},
|
||||
onUnload: function onUnload() {
|
||||
// 页面卸载时重置首次加载标记,确保下次进入仍显示骨架屏
|
||||
this.isFirstLoad = true;
|
||||
if (this.shopCarList && this.shopCarList.length > 0) {
|
||||
var list = JSON.parse(JSON.stringify(this.shopCarList));
|
||||
list.forEach(function (item) {
|
||||
@ -512,31 +533,31 @@ var _default = {
|
||||
}), (0, _defineProperty2.default)(_methods, "isImageVisible", function isImageVisible(index) {
|
||||
return index >= this.startIndex && index < this.startIndex + this.visibleCount + this.buffer;
|
||||
}), (0, _defineProperty2.default)(_methods, "onVirtualScroll", function onVirtualScroll(e) {
|
||||
var _this2 = this;
|
||||
var _this3 = this;
|
||||
if (this.scrollLock) return;
|
||||
this.scrollLock = true;
|
||||
setTimeout(function () {
|
||||
var scrollTop = e.detail.scrollTop;
|
||||
var clientHeight = e.detail.clientHeight || _this2.visibleCount * _this2.itemHeight;
|
||||
var centerIndex = Math.floor((scrollTop + clientHeight / 2) / _this2.itemHeight);
|
||||
var clientHeight = e.detail.clientHeight || _this3.visibleCount * _this3.itemHeight;
|
||||
var centerIndex = Math.floor((scrollTop + clientHeight / 2) / _this3.itemHeight);
|
||||
|
||||
// 当前渲染的范围是 startIndex ~ startIndex + 60
|
||||
var currentStart = _this2.startIndex;
|
||||
var currentEnd = currentStart + _this2.buffer * 2;
|
||||
var currentStart = _this3.startIndex;
|
||||
var currentEnd = currentStart + _this3.buffer * 2;
|
||||
var distanceToEnd = currentEnd - centerIndex;
|
||||
|
||||
// ✅ 触发条件:即将滚到下缓冲区末尾(最后10个)时更新
|
||||
if (distanceToEnd <= 20 || centerIndex <= currentStart + 20) {
|
||||
// 👇 新的以中心为基准的缓冲区域
|
||||
var newStart = Math.max(0, centerIndex - _this2.buffer);
|
||||
var newEnd = newStart + _this2.buffer * 2;
|
||||
var newList = _this2.rightShopList.slice(newStart, newEnd);
|
||||
if (!_this2.shallowEqual(_this2.visibleList, newList)) {
|
||||
_this2.visibleList = newList;
|
||||
_this2.startIndex = newStart;
|
||||
var newStart = Math.max(0, centerIndex - _this3.buffer);
|
||||
var newEnd = newStart + _this3.buffer * 2;
|
||||
var newList = _this3.rightShopList.slice(newStart, newEnd);
|
||||
if (!_this3.shallowEqual(_this3.visibleList, newList)) {
|
||||
_this3.visibleList = newList;
|
||||
_this3.startIndex = newStart;
|
||||
}
|
||||
}
|
||||
_this2.scrollLock = false;
|
||||
_this3.scrollLock = false;
|
||||
}, 16);
|
||||
}), (0, _defineProperty2.default)(_methods, "shallowEqual", function shallowEqual(arr1, arr2) {
|
||||
if (arr1 === arr2) return true;
|
||||
@ -552,7 +573,7 @@ var _default = {
|
||||
}
|
||||
return true;
|
||||
}), (0, _defineProperty2.default)(_methods, "handleShowShopPopup", function handleShowShopPopup() {
|
||||
var _this3 = this;
|
||||
var _this4 = this;
|
||||
if (!this.user.MEMBERSHIP_ID) {
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
@ -592,44 +613,44 @@ var _default = {
|
||||
if (this.shopCarList && this.shopCarList.length > 0) {
|
||||
var list = JSON.parse(JSON.stringify(this.shopCarList));
|
||||
var filterList = list.filter(function (item) {
|
||||
return item.COMMODITY_ID === _this3.good.COMMODITY_ID;
|
||||
return item.COMMODITY_ID === _this4.good.COMMODITY_ID;
|
||||
});
|
||||
if (filterList && filterList.length > 0) {
|
||||
list.forEach(function (item) {
|
||||
// 先看看有没有规格id 如果选了规格 不一样规格 算不同的商品
|
||||
if (_this3.good.RTCOMMODITY_MULTI_ID) {
|
||||
if (_this4.good.RTCOMMODITY_MULTI_ID) {
|
||||
var filterRuleList = list.filter(function (item) {
|
||||
return item.RTCOMMODITY_MULTI_ID === _this3.good.RTCOMMODITY_MULTI_ID;
|
||||
return item.RTCOMMODITY_MULTI_ID === _this4.good.RTCOMMODITY_MULTI_ID;
|
||||
});
|
||||
// 如果有一样规格的 就替换值 没有 就等于新增商品
|
||||
if (filterRuleList && filterRuleList.length > 0) {
|
||||
if (item.COMMODITY_ID === _this3.good.COMMODITY_ID) {
|
||||
item.count = _this3.good.count;
|
||||
if (item.COMMODITY_ID === _this4.good.COMMODITY_ID) {
|
||||
item.count = _this4.good.count;
|
||||
}
|
||||
} else {
|
||||
list.push(_objectSpread({}, _this3.good));
|
||||
list.push(_objectSpread({}, _this4.good));
|
||||
nowShopList.forEach(function (item) {
|
||||
if (item.COMMODITY_ID === _this3.good.COMMODITY_ID) {
|
||||
item.count = _this3.good.count;
|
||||
if (item.COMMODITY_ID === _this4.good.COMMODITY_ID) {
|
||||
item.count = _this4.good.count;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (item.COMMODITY_ID === _this3.good.COMMODITY_ID) {
|
||||
item.count = _this3.good.count;
|
||||
if (item.COMMODITY_ID === _this4.good.COMMODITY_ID) {
|
||||
item.count = _this4.good.count;
|
||||
}
|
||||
}
|
||||
});
|
||||
nowShopList.forEach(function (item) {
|
||||
if (item.COMMODITY_ID === _this3.good.COMMODITY_ID) {
|
||||
item.count = _this3.good.count;
|
||||
if (item.COMMODITY_ID === _this4.good.COMMODITY_ID) {
|
||||
item.count = _this4.good.count;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
list.push(_objectSpread({}, this.good));
|
||||
nowShopList.forEach(function (item) {
|
||||
if (item.COMMODITY_ID === _this3.good.COMMODITY_ID) {
|
||||
item.count = _this3.good.count;
|
||||
if (item.COMMODITY_ID === _this4.good.COMMODITY_ID) {
|
||||
item.count = _this4.good.count;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -637,8 +658,8 @@ var _default = {
|
||||
} else {
|
||||
this.shopCarList = [_objectSpread({}, this.good)];
|
||||
nowShopList.forEach(function (item) {
|
||||
if (item.COMMODITY_ID === _this3.good.COMMODITY_ID) {
|
||||
item.count = _this3.good.count;
|
||||
if (item.COMMODITY_ID === _this4.good.COMMODITY_ID) {
|
||||
item.count = _this4.good.count;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -666,7 +687,7 @@ var _default = {
|
||||
}), (0, _defineProperty2.default)(_methods, "handleClosePop", function handleClosePop() {
|
||||
this.$refs.shopPopup.close();
|
||||
}), (0, _defineProperty2.default)(_methods, "handleGetUnionMallShopType", function handleGetUnionMallShopType() {
|
||||
var _this4 = this;
|
||||
var _this5 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||||
var data, typeList, resList, indexOfList;
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
@ -674,7 +695,7 @@ var _default = {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return _this4.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
return _this5.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
ownerUnitId: 911,
|
||||
appId: "wxee018fb96955552a",
|
||||
commodityNature: 5070
|
||||
@ -698,9 +719,9 @@ var _default = {
|
||||
});
|
||||
}
|
||||
console.log("this.shopTypeList222", resList);
|
||||
_this4.shopTypeList = resList;
|
||||
console.log("this.shopTypeList222", _this4.shopTypeList);
|
||||
_this4.handleGetAllShopItem(resList[_this4.activeTabs].UserdefinedType_Id);
|
||||
_this5.shopTypeList = resList;
|
||||
console.log("this.shopTypeList222", _this5.shopTypeList);
|
||||
_this5.handleGetAllShopItem(resList[_this5.activeTabs].UserdefinedType_Id);
|
||||
case 12:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
@ -709,14 +730,14 @@ var _default = {
|
||||
}, _callee);
|
||||
}))();
|
||||
}), (0, _defineProperty2.default)(_methods, "handleSearch", function handleSearch() {
|
||||
var _this5 = this;
|
||||
var _this6 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
||||
var url, data, list, shopList, res, shopIdList;
|
||||
return _regenerator.default.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
if (!_this5.searchText) {
|
||||
if (!_this6.searchText) {
|
||||
_context2.next = 18;
|
||||
break;
|
||||
}
|
||||
@ -733,16 +754,16 @@ var _default = {
|
||||
// payMethod: "1000,3000",
|
||||
// // justCommodity: 1,
|
||||
// });
|
||||
url = _this5.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
url = _this6.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
_context2.next = 5;
|
||||
return _this5.$api.$javaGet(
|
||||
return _this6.$api.$javaGet(
|
||||
// '/third-party/getExcludeWeChatGetMallGoodsInfo',
|
||||
url, {
|
||||
ownerUnitId: 911,
|
||||
appId: "wxee018fb96955552a",
|
||||
commodityName: _this5.searchText,
|
||||
excludeNature: _this5.pageType === "UnionMall" ? "" : 5070,
|
||||
commodityNature: _this5.pageType === "UnionMall" ? 5070 : "",
|
||||
commodityName: _this6.searchText,
|
||||
excludeNature: _this6.pageType === "UnionMall" ? "" : 5070,
|
||||
commodityNature: _this6.pageType === "UnionMall" ? 5070 : "",
|
||||
payMethod: "1000,3000"
|
||||
// justCommodity: 1,
|
||||
});
|
||||
@ -757,8 +778,8 @@ var _default = {
|
||||
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
|
||||
item.COMMODITYLIST.forEach(function (subItem) {
|
||||
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
|
||||
if (_this5.shopCarList && _this5.shopCarList.length > 0) {
|
||||
_this5.shopCarList.forEach(function (shopCarItem) {
|
||||
if (_this6.shopCarList && _this6.shopCarList.length > 0) {
|
||||
_this6.shopCarList.forEach(function (shopCarItem) {
|
||||
if (shopCarItem.COMMODITY_ID === subItem.COMMODITY_ID) {
|
||||
subItem.count = shopCarItem.count;
|
||||
if (subItem.SKULIST && subItem.SKULIST.length > 0) {
|
||||
@ -799,16 +820,16 @@ var _default = {
|
||||
}
|
||||
});
|
||||
}
|
||||
_this5.rightShopList = res;
|
||||
_this6.rightShopList = res;
|
||||
_context2.next = 19;
|
||||
break;
|
||||
case 18:
|
||||
if (_this5.pageType === "UnionMall") {
|
||||
if (_this6.pageType === "UnionMall") {
|
||||
// 工会之家拿到的商品类型
|
||||
_this5.handleGetUnionMallShopType();
|
||||
_this6.handleGetUnionMallShopType();
|
||||
} else {
|
||||
// 拿到全部商品类型
|
||||
_this5.handleGetShopType();
|
||||
_this6.handleGetShopType();
|
||||
}
|
||||
case 19:
|
||||
case "end":
|
||||
@ -818,14 +839,14 @@ var _default = {
|
||||
}, _callee2);
|
||||
}))();
|
||||
}), (0, _defineProperty2.default)(_methods, "handleGetShopType", function handleGetShopType() {
|
||||
var _this6 = this;
|
||||
var _this7 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||||
var _this, typeList, getWeChatGetMallGoodsType, data;
|
||||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||||
while (1) {
|
||||
switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
_this = _this6;
|
||||
_this = _this7;
|
||||
typeList = [];
|
||||
getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType");
|
||||
if (!getWeChatGetMallGoodsType) {
|
||||
@ -833,10 +854,10 @@ var _default = {
|
||||
break;
|
||||
}
|
||||
typeList = getWeChatGetMallGoodsType;
|
||||
_this6.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
_this7.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
ownerUnitId: 911,
|
||||
appId: "wxee018fb96955552a",
|
||||
commodityNature: _this6.pageType === "UnionMall" ? "" : 5070
|
||||
commodityNature: _this7.pageType === "UnionMall" ? "" : 5070
|
||||
}).then(function (data) {
|
||||
var newTypeList = data.Data.List;
|
||||
if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) {
|
||||
@ -848,16 +869,16 @@ var _default = {
|
||||
break;
|
||||
case 8:
|
||||
_context3.next = 10;
|
||||
return _this6.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
return _this7.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||
ownerUnitId: 911,
|
||||
appId: "wxee018fb96955552a",
|
||||
commodityNature: _this6.pageType === "UnionMall" ? "" : 5070
|
||||
commodityNature: _this7.pageType === "UnionMall" ? "" : 5070
|
||||
});
|
||||
case 10:
|
||||
data = _context3.sent;
|
||||
typeList = data.Data.List;
|
||||
case 12:
|
||||
_this6.handleGetShopTypeShowData(typeList);
|
||||
_this7.handleGetShopTypeShowData(typeList);
|
||||
case 13:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
@ -897,7 +918,7 @@ var _default = {
|
||||
}
|
||||
return [];
|
||||
}), (0, _defineProperty2.default)(_methods, "handleGetAllShopItem", function handleGetAllShopItem(id) {
|
||||
var _this7 = this;
|
||||
var _this8 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
||||
var url, data, list, thisAllType, haveAll, leftIndex, shopList, thisTypeAllShop, allShopID, obj, newList, allShopList, allShopID2;
|
||||
return _regenerator.default.wrap(function _callee4$(_context4) {
|
||||
@ -917,17 +938,17 @@ var _default = {
|
||||
// commodityNature: this.pageType === "UnionMall" ? 5070 : "",
|
||||
// // justCommodity: 1,
|
||||
// });
|
||||
url = _this7.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
url = _this8.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude';
|
||||
_context4.next = 5;
|
||||
return _this7.$api.$javaGet(
|
||||
return _this8.$api.$javaGet(
|
||||
// '/third-party/getExcludeWeChatGetMallGoodsInfo',
|
||||
url, {
|
||||
ownerUnitId: 911,
|
||||
userdefinedTypeId: _this7.searchText ? "" : id,
|
||||
userdefinedtypeId: _this7.searchText ? "" : id,
|
||||
commodityName: _this7.searchText,
|
||||
excludeNature: _this7.pageType === "UnionMall" ? "" : 5070,
|
||||
commodityNature: _this7.pageType === "UnionMall" ? 5070 : ""
|
||||
userdefinedTypeId: _this8.searchText ? "" : id,
|
||||
userdefinedtypeId: _this8.searchText ? "" : id,
|
||||
commodityName: _this8.searchText,
|
||||
excludeNature: _this8.pageType === "UnionMall" ? "" : 5070,
|
||||
commodityNature: _this8.pageType === "UnionMall" ? 5070 : ""
|
||||
// justCommodity: 1,
|
||||
});
|
||||
case 5:
|
||||
@ -936,9 +957,9 @@ var _default = {
|
||||
list = data.Data.List;
|
||||
console.log("拿到全部的商品", list);
|
||||
thisAllType = [];
|
||||
console.log("this.shopTypeList", _this7.shopTypeList);
|
||||
if (_this7.shopTypeList && _this7.shopTypeList.length > 0) {
|
||||
_this7.shopTypeList.forEach(function (item) {
|
||||
console.log("this.shopTypeList", _this8.shopTypeList);
|
||||
if (_this8.shopTypeList && _this8.shopTypeList.length > 0) {
|
||||
_this8.shopTypeList.forEach(function (item) {
|
||||
if (item.UserdefinedType_Id === id) {
|
||||
thisAllType = item.UserdefinedTypeList;
|
||||
}
|
||||
@ -966,12 +987,12 @@ var _default = {
|
||||
});
|
||||
}
|
||||
leftIndex = -1;
|
||||
console.log("this.pageType", _this7.pageType);
|
||||
console.log("this.leftId", _this7.leftId);
|
||||
if (_this7.pageType === "UnionMall" && _this7.leftId) {
|
||||
console.log("this.pageType", _this8.pageType);
|
||||
console.log("this.leftId", _this8.leftId);
|
||||
if (_this8.pageType === "UnionMall" && _this8.leftId) {
|
||||
if (thisAllType && thisAllType.length > 0) {
|
||||
thisAllType.forEach(function (item, index) {
|
||||
if (item.UserdefinedType_Id === Number(_this7.leftId)) {
|
||||
if (item.UserdefinedType_Id === Number(_this8.leftId)) {
|
||||
leftIndex = index;
|
||||
}
|
||||
});
|
||||
@ -980,9 +1001,9 @@ var _default = {
|
||||
console.log("list", list);
|
||||
console.log("thisAllType", thisAllType);
|
||||
if (leftIndex === -1) {
|
||||
leftIndex = _this7.leftSelectIndex;
|
||||
leftIndex = _this8.leftSelectIndex;
|
||||
}
|
||||
console.log("this.leftSelectIndex23", _this7.leftSelectIndex);
|
||||
console.log("this.leftSelectIndex23", _this8.leftSelectIndex);
|
||||
console.log("this.thisAllType31", thisAllType);
|
||||
|
||||
// 当前选中的商品列表
|
||||
@ -1010,13 +1031,13 @@ var _default = {
|
||||
console.log("list", list);
|
||||
console.log("leftIndex", leftIndex);
|
||||
if (leftIndex !== -1 && list[leftIndex] && list[leftIndex].COMMODITYLIST && list[leftIndex].COMMODITYLIST.length > 0) {
|
||||
console.log("this.leftId", _this7.leftId);
|
||||
if (_this7.pageType === "UnionMall" && _this7.leftId) {
|
||||
if (_this7.leftId) {
|
||||
console.log("this.leftId", _this8.leftId);
|
||||
if (_this8.pageType === "UnionMall" && _this8.leftId) {
|
||||
if (_this8.leftId) {
|
||||
obj = {};
|
||||
console.log('dsdhasjdhasld', list);
|
||||
list.forEach(function (item) {
|
||||
if (Number(item.USERDEFINEDTYPE_ID) === Number(_this7.leftId) || Number(item.UserdefinedType_Id) === Number(_this7.leftId) || Number(item.UserdefinedType_Id) === -1) {
|
||||
if (Number(item.USERDEFINEDTYPE_ID) === Number(_this8.leftId) || Number(item.UserdefinedType_Id) === Number(_this8.leftId) || Number(item.UserdefinedType_Id) === -1) {
|
||||
obj = item;
|
||||
}
|
||||
});
|
||||
@ -1037,8 +1058,8 @@ var _default = {
|
||||
if (shopList && shopList.length > 0) {
|
||||
shopList.forEach(function (item) {
|
||||
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
|
||||
if (_this7.shopCarList && _this7.shopCarList.length > 0) {
|
||||
_this7.shopCarList.forEach(function (shopCarItem) {
|
||||
if (_this8.shopCarList && _this8.shopCarList.length > 0) {
|
||||
_this8.shopCarList.forEach(function (shopCarItem) {
|
||||
if (shopCarItem.COMMODITY_ID === item.COMMODITY_ID) {
|
||||
item.count = shopCarItem.count;
|
||||
item.showReduce = true;
|
||||
@ -1089,7 +1110,7 @@ var _default = {
|
||||
allShopList = []; // 当前的全部商品id
|
||||
allShopID2 = [];
|
||||
if (newList && newList.length > 0) {
|
||||
_this7.leftToView = "left_" + leftIndex + "_" + newList[leftIndex].USERDEFINEDTYPE_ID;
|
||||
_this8.leftToView = "left_" + leftIndex + "_" + newList[leftIndex].USERDEFINEDTYPE_ID;
|
||||
newList.forEach(function (item) {
|
||||
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
|
||||
item.COMMODITYLIST.forEach(function (subItem) {
|
||||
@ -1105,21 +1126,21 @@ var _default = {
|
||||
});
|
||||
}
|
||||
newList[0].COMMODITYLIST = allShopList;
|
||||
_this7.leftTypeList = newList;
|
||||
console.log("this.leftTypeList", _this7.leftTypeList);
|
||||
_this7.leftSelectIndex = leftIndex;
|
||||
_this7.rightShopList = shopList;
|
||||
_this7.visibleList = shopList.slice(0, _this7.visibleCount + _this7.buffer * 2);
|
||||
console.log('this.rightShopListthis.rightShopListthis.rightShopList', _this7.rightShopList);
|
||||
console.log('this.visibleListthis.visibleList', _this7.visibleList);
|
||||
_this7.changBigTypeLoading = true;
|
||||
_this8.leftTypeList = newList;
|
||||
console.log("this.leftTypeList", _this8.leftTypeList);
|
||||
_this8.leftSelectIndex = leftIndex;
|
||||
_this8.rightShopList = shopList;
|
||||
_this8.visibleList = shopList.slice(0, _this8.visibleCount + _this8.buffer * 2);
|
||||
console.log('this.rightShopListthis.rightShopListthis.rightShopList', _this8.rightShopList);
|
||||
console.log('this.visibleListthis.visibleList', _this8.visibleList);
|
||||
_this8.changBigTypeLoading = true;
|
||||
} else {
|
||||
_this7.leftTypeList = [];
|
||||
_this7.leftToView = "";
|
||||
_this7.leftSelectIndex = 0;
|
||||
_this7.rightShopList = [];
|
||||
_this8.leftTypeList = [];
|
||||
_this8.leftToView = "";
|
||||
_this8.leftSelectIndex = 0;
|
||||
_this8.rightShopList = [];
|
||||
}
|
||||
console.log("现在的小类", _this7.leftTypeList);
|
||||
console.log("现在的小类", _this8.leftTypeList);
|
||||
uni.hideLoading();
|
||||
case 30:
|
||||
case "end":
|
||||
@ -1134,7 +1155,7 @@ var _default = {
|
||||
url: "/pages/shopPages/shopDetail/index?id=".concat(obj.COMMODITY_ID, "&pageType=").concat(this.pageType)
|
||||
});
|
||||
}), (0, _defineProperty2.default)(_methods, "handleUpdateLeftAllTypeObj", function handleUpdateLeftAllTypeObj(list) {
|
||||
var _this8 = this;
|
||||
var _this9 = this;
|
||||
// 最终要输出的对象
|
||||
var leftAllTypeObj = {};
|
||||
// 存储一下出现过的商品小类
|
||||
@ -1146,8 +1167,8 @@ var _default = {
|
||||
}
|
||||
item.COMMODITYLIST.forEach(function (subItem) {
|
||||
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
|
||||
if (_this8.shopCarList && _this8.shopCarList.length > 0) {
|
||||
_this8.shopCarList.forEach(function (shopCarItem) {
|
||||
if (_this9.shopCarList && _this9.shopCarList.length > 0) {
|
||||
_this9.shopCarList.forEach(function (shopCarItem) {
|
||||
if (shopCarItem.COMMODITY_ID === subItem.COMMODITY_ID) {
|
||||
subItem.count = shopCarItem.count;
|
||||
subItem.showReduce = true;
|
||||
@ -1225,7 +1246,7 @@ var _default = {
|
||||
this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id);
|
||||
// }
|
||||
}), (0, _defineProperty2.default)(_methods, "catClickFn", function catClickFn(e, index, obj) {
|
||||
var _this9 = this;
|
||||
var _this10 = this;
|
||||
this.leftToView = "left_".concat(index, "_") + this.leftTypeList[index].USERDEFINEDTYPE_ID;
|
||||
this.leftSelectIndex = index;
|
||||
var shopList = this.leftTypeList[index].COMMODITYLIST;
|
||||
@ -1236,8 +1257,8 @@ var _default = {
|
||||
if (shopList && shopList.length > 0) {
|
||||
shopList.forEach(function (item) {
|
||||
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
|
||||
if (_this9.shopCarList && _this9.shopCarList.length > 0) {
|
||||
_this9.shopCarList.forEach(function (shopCarItem) {
|
||||
if (_this10.shopCarList && _this10.shopCarList.length > 0) {
|
||||
_this10.shopCarList.forEach(function (shopCarItem) {
|
||||
if (shopCarItem.COMMODITY_ID === item.COMMODITY_ID) {
|
||||
item.count = shopCarItem.count;
|
||||
item.showReduce = true;
|
||||
@ -1404,7 +1425,7 @@ var _default = {
|
||||
});
|
||||
}
|
||||
}), (0, _defineProperty2.default)(_methods, "handleGoPointsMall", function handleGoPointsMall() {
|
||||
var _this10 = this;
|
||||
var _this11 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
||||
return _regenerator.default.wrap(function _callee5$(_context5) {
|
||||
while (1) {
|
||||
@ -1416,15 +1437,15 @@ var _default = {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/shopPages/shopList/index?pageType=pointsMall`,
|
||||
// });
|
||||
_this10.activeTabs = 999999;
|
||||
_this10.leftSelectIndex = 999999;
|
||||
_this10.leftToView = "left_0_999999";
|
||||
_this10.leftTypeList = [{
|
||||
_this11.activeTabs = 999999;
|
||||
_this11.leftSelectIndex = 999999;
|
||||
_this11.leftToView = "left_0_999999";
|
||||
_this11.leftTypeList = [{
|
||||
USERDEFINEDTYPE_NAME: "积分商城",
|
||||
USERDEFINEDTYPE_ID: 999999
|
||||
}];
|
||||
_context5.next = 7;
|
||||
return _this10.handleGetPointMallShop();
|
||||
return _this11.handleGetPointMallShop();
|
||||
case 7:
|
||||
uni.hideLoading();
|
||||
case 8:
|
||||
@ -1435,7 +1456,7 @@ var _default = {
|
||||
}, _callee5);
|
||||
}))();
|
||||
}), (0, _defineProperty2.default)(_methods, "handleGetPointMallShop", function handleGetPointMallShop() {
|
||||
var _this11 = this;
|
||||
var _this12 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
||||
var req, data, list, shopList;
|
||||
return _regenerator.default.wrap(function _callee6$(_context6) {
|
||||
@ -1447,10 +1468,10 @@ var _default = {
|
||||
ownerUnitId: 911,
|
||||
justCommodity: 1,
|
||||
payMethod: "2000,3000",
|
||||
excludeNature: _this11.user.INDUSTRY_MEMBERSHIP_ID ? '' : 5070
|
||||
excludeNature: _this12.user.INDUSTRY_MEMBERSHIP_ID ? '' : 5070
|
||||
};
|
||||
_context6.next = 3;
|
||||
return _this11.$api.getCoop(req);
|
||||
return _this12.$api.getCoop(req);
|
||||
case 3:
|
||||
data = _context6.sent;
|
||||
list = data.Data.List;
|
||||
@ -1468,8 +1489,8 @@ var _default = {
|
||||
if (shopList && shopList.length > 0) {
|
||||
shopList.forEach(function (item) {
|
||||
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
|
||||
if (_this11.shopCarList && _this11.shopCarList.length > 0) {
|
||||
_this11.shopCarList.forEach(function (shopCarItem) {
|
||||
if (_this12.shopCarList && _this12.shopCarList.length > 0) {
|
||||
_this12.shopCarList.forEach(function (shopCarItem) {
|
||||
if (shopCarItem.COMMODITY_ID === item.COMMODITY_ID) {
|
||||
item.count = shopCarItem.count;
|
||||
item.showReduce = true;
|
||||
@ -1489,9 +1510,9 @@ var _default = {
|
||||
item.RETbigNumber = item.COMMODITY_RETAILPRICE;
|
||||
}
|
||||
});
|
||||
_this11.changBigTypeLoading = true;
|
||||
_this11.rightShopList = shopList;
|
||||
_this11.visibleList = shopList.slice(0, _this11.visibleCount + _this11.buffer * 2);
|
||||
_this12.changBigTypeLoading = true;
|
||||
_this12.rightShopList = shopList;
|
||||
_this12.visibleList = shopList.slice(0, _this12.visibleCount + _this12.buffer * 2);
|
||||
}
|
||||
case 9:
|
||||
case "end":
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -858,4 +858,126 @@
|
||||
transform: translateY(-50%);
|
||||
background: #4BCB7E;
|
||||
}
|
||||
/* 商品分类页面骨架屏样式 */
|
||||
.shop-type-skeleton.data-v-36e5d840 {
|
||||
padding: 20rpx 0;
|
||||
background: #f7f8fa;
|
||||
height: calc(100vh - 200rpx);
|
||||
}
|
||||
/* 基础骨架屏动画 */
|
||||
.skeleton.data-v-36e5d840 {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 200% 100%;
|
||||
-webkit-animation: loading-data-v-36e5d840 1.5s infinite;
|
||||
animation: loading-data-v-36e5d840 1.5s infinite;
|
||||
}
|
||||
@-webkit-keyframes loading-data-v-36e5d840 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
@keyframes loading-data-v-36e5d840 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
/* 顶部分类标签骨架 */
|
||||
.skeleton-tabs.data-v-36e5d840 {
|
||||
background: #ffffff;
|
||||
padding: 20rpx;
|
||||
margin: 0 20rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.skeleton-tabs .skeleton-tab-item.data-v-36e5d840 {
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
.skeleton-tabs .skeleton-tab-item.data-v-36e5d840:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.skeleton-tabs .skeleton-tab-item .skeleton-tab-icon.data-v-36e5d840 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 12rpx;
|
||||
}
|
||||
.skeleton-tabs .skeleton-tab-item .skeleton-tab-text.data-v-36e5d840 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
/* 左右分栏内容区域 */
|
||||
.skeleton-content.data-v-36e5d840 {
|
||||
display: flex;
|
||||
height: calc(100vh - 300rpx);
|
||||
margin: 0 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
/* 左侧分类列表骨架 */
|
||||
.skeleton-left.data-v-36e5d840 {
|
||||
width: 200rpx;
|
||||
background: #f8f9fa;
|
||||
border-right: 1px solid #f0f0f0;
|
||||
}
|
||||
.skeleton-left .skeleton-left-item.data-v-36e5d840 {
|
||||
padding: 32rpx 24rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
.skeleton-left .skeleton-left-item .skeleton-left-text.data-v-36e5d840 {
|
||||
width: 120rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
/* 右侧商品列表骨架 */
|
||||
.skeleton-right.data-v-36e5d840 {
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.skeleton-right .skeleton-product-item.data-v-36e5d840 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
.skeleton-right .skeleton-product-item .skeleton-product-image.data-v-36e5d840 {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-right: 24rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.skeleton-right .skeleton-product-item .skeleton-product-info.data-v-36e5d840 {
|
||||
flex: 1;
|
||||
}
|
||||
.skeleton-right .skeleton-product-item .skeleton-product-info .skeleton-product-title.data-v-36e5d840 {
|
||||
width: 80%;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-right .skeleton-product-item .skeleton-product-info .skeleton-product-price.data-v-36e5d840 {
|
||||
width: 60%;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.skeleton-right .skeleton-product-item .skeleton-product-info .skeleton-add-button.data-v-36e5d840 {
|
||||
width: 120rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
@ -125,26 +125,33 @@ var render = function () {
|
||||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var l0 = _vm.showExportFun
|
||||
? _vm.__map(_vm.funList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = _vm.funList.length
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
}
|
||||
})
|
||||
var l0 =
|
||||
!_vm.isPageLoading && _vm.showExportFun
|
||||
? _vm.__map(_vm.funList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = _vm.funList.length
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g1 = !_vm.isPageLoading ? _vm.good.List && _vm.good.List.length > 0 : null
|
||||
var g2 = !_vm.isPageLoading
|
||||
? new Date(_vm.good.UPPER_DATE).getTime() > new Date().getTime() ||
|
||||
_vm.good.SEND_MODE > 0 ||
|
||||
_vm.good.DELIVER_AREA ||
|
||||
_vm.good.LIMIT_TOTALCOUNT > 0
|
||||
: null
|
||||
var g3 =
|
||||
!_vm.isPageLoading && g2 ? new Date(_vm.good.UPPER_DATE).getTime() : null
|
||||
var g4 = !_vm.isPageLoading && g2 ? new Date().getTime() : null
|
||||
var g5 = !_vm.isPageLoading
|
||||
? _vm.good.ContentImgList && _vm.good.ContentImgList.length > 0
|
||||
: null
|
||||
var g6 = !_vm.isPageLoading
|
||||
? _vm.good.ContentImgList && _vm.good.ContentImgList.length > 0
|
||||
: null
|
||||
var g1 = _vm.good.List && _vm.good.List.length > 0
|
||||
var g2 =
|
||||
new Date(_vm.good.UPPER_DATE).getTime() > new Date().getTime() ||
|
||||
_vm.good.SEND_MODE > 0 ||
|
||||
_vm.good.DELIVER_AREA ||
|
||||
_vm.good.LIMIT_TOTALCOUNT > 0
|
||||
var g3 = g2 ? new Date(_vm.good.UPPER_DATE).getTime() : null
|
||||
var g4 = g2 ? new Date().getTime() : null
|
||||
var g5 = _vm.good.ContentImgList && _vm.good.ContentImgList.length > 0
|
||||
var g6 = _vm.good.ContentImgList && _vm.good.ContentImgList.length > 0
|
||||
var g7 =
|
||||
_vm.good.PAY_METHOD !== 2000 &&
|
||||
_vm.pageType !== "pointsMall" &&
|
||||
@ -236,6 +243,7 @@ var _default = {
|
||||
data: function data() {
|
||||
var windows = uni.getSystemInfoSync();
|
||||
return {
|
||||
isPageLoading: true,
|
||||
safeHeight: 0,
|
||||
pageMsg: {
|
||||
current: 0,
|
||||
@ -261,7 +269,11 @@ var _default = {
|
||||
ratio: 0.5,
|
||||
scale: windows.pixelRatio
|
||||
},
|
||||
menu: {},
|
||||
menu: {
|
||||
top: 44,
|
||||
bottom: 88,
|
||||
height: 32
|
||||
},
|
||||
inputMaxLength: -1,
|
||||
bottomBtnType: 0,
|
||||
shopCarList: [],
|
||||
@ -1460,6 +1472,7 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
console.log('页面开始加载,骨架屏状态:', _this8.isPageLoading);
|
||||
systemInfo = uni.getSystemInfoSync();
|
||||
height = systemInfo.safeAreaInsets.bottom;
|
||||
_this8.safeHeight = Number(height);
|
||||
@ -1484,13 +1497,17 @@ var _default = {
|
||||
if (shopCarList && shopCarList.length > 0) {
|
||||
_this8.shopCarList = shopCarList;
|
||||
}
|
||||
_context4.next = 14;
|
||||
_context4.next = 15;
|
||||
return _this8.getDetail(option.id);
|
||||
case 14:
|
||||
case 15:
|
||||
_this8.handleGetIsCollect();
|
||||
_this8.$utils.addUserBehaviorNew({
|
||||
behaviorRecordDesc: "\u67E5\u770B\u5546\u54C1\u3010".concat(_this8.good.COMMODITY_NAME, "\u3011\u8BE6\u60C5")
|
||||
});
|
||||
|
||||
// 数据加载完成,立即隐藏骨架屏
|
||||
console.log('数据加载完成,隐藏骨架屏');
|
||||
_this8.isPageLoading = false;
|
||||
// if (option.scene) {
|
||||
// // 是否是商品分享码扫入的 带有他人的邀请码
|
||||
// let scene = decodeURIComponent(option.scene);
|
||||
@ -1507,7 +1524,7 @@ var _default = {
|
||||
// this.pageMsg.buyCount = 1;
|
||||
|
||||
// this.getRate();
|
||||
case 16:
|
||||
case 19:
|
||||
case "end":
|
||||
return _context4.stop();
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,3 +1,176 @@
|
||||
.skeleton-container.data-v-0dc4ca38 {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
}
|
||||
.skeleton-animate.data-v-0dc4ca38 {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
-webkit-animation: skeleton-loading-data-v-0dc4ca38 1.5s infinite;
|
||||
animation: skeleton-loading-data-v-0dc4ca38 1.5s infinite;
|
||||
}
|
||||
@-webkit-keyframes skeleton-loading-data-v-0dc4ca38 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
@keyframes skeleton-loading-data-v-0dc4ca38 {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
.skeleton-header.data-v-0dc4ca38 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
z-index: 999;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
.skeleton-header .skeleton-nav.data-v-0dc4ca38 {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.skeleton-header .skeleton-nav .skeleton-back-btn.data-v-0dc4ca38,
|
||||
.skeleton-header .skeleton-nav .skeleton-share-btn.data-v-0dc4ca38 {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.skeleton-header .skeleton-nav .skeleton-title.data-v-0dc4ca38 {
|
||||
width: 200rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.skeleton-product-image .skeleton-swiper.data-v-0dc4ca38 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
}
|
||||
.skeleton-product-info.data-v-0dc4ca38 {
|
||||
background: #fff;
|
||||
padding: 32rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-price-section.data-v-0dc4ca38 {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-price-section .skeleton-price.data-v-0dc4ca38 {
|
||||
width: 200rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-price-section .skeleton-original-price.data-v-0dc4ca38 {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-title-section.data-v-0dc4ca38 {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-title-section .skeleton-product-title.data-v-0dc4ca38 {
|
||||
width: 100%;
|
||||
height: 48rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-title-section .skeleton-product-subtitle.data-v-0dc4ca38 {
|
||||
width: 80%;
|
||||
height: 32rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-spec-section .skeleton-spec-title.data-v-0dc4ca38 {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-spec-section .skeleton-spec-options.data-v-0dc4ca38 {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.skeleton-product-info .skeleton-spec-section .skeleton-spec-options .skeleton-spec-item.data-v-0dc4ca38 {
|
||||
width: 120rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.skeleton-detail-section.data-v-0dc4ca38 {
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
padding: 32rpx;
|
||||
}
|
||||
.skeleton-detail-section .skeleton-detail-tabs.data-v-0dc4ca38 {
|
||||
display: flex;
|
||||
margin-bottom: 32rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.skeleton-detail-section .skeleton-detail-tabs .skeleton-tab-item.data-v-0dc4ca38 {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
.skeleton-detail-section .skeleton-detail-content .skeleton-detail-line.data-v-0dc4ca38 {
|
||||
width: 100%;
|
||||
height: 32rpx;
|
||||
border-radius: 6rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.skeleton-detail-section .skeleton-detail-content .skeleton-detail-line.data-v-0dc4ca38:nth-child(2) {
|
||||
width: 85%;
|
||||
}
|
||||
.skeleton-detail-section .skeleton-detail-content .skeleton-detail-line.data-v-0dc4ca38:nth-child(3) {
|
||||
width: 92%;
|
||||
}
|
||||
.skeleton-detail-section .skeleton-detail-content .skeleton-detail-line.data-v-0dc4ca38:nth-child(4) {
|
||||
width: 78%;
|
||||
}
|
||||
.skeleton-detail-section .skeleton-detail-content .skeleton-detail-line.data-v-0dc4ca38:last-child {
|
||||
width: 65%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.skeleton-bottom-bar.data-v-0dc4ca38 {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 134rpx;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
.skeleton-bottom-bar .skeleton-bottom-left.data-v-0dc4ca38 {
|
||||
display: flex;
|
||||
gap: 32rpx;
|
||||
}
|
||||
.skeleton-bottom-bar .skeleton-bottom-left .skeleton-cart-btn.data-v-0dc4ca38,
|
||||
.skeleton-bottom-bar .skeleton-bottom-left .skeleton-collect-btn.data-v-0dc4ca38 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.skeleton-bottom-bar .skeleton-bottom-right .skeleton-buy-btn.data-v-0dc4ca38 {
|
||||
width: 240rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
.page-body.data-v-0dc4ca38 {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
|
||||
40
unpackage/dist/dev/mp-weixin/pages/user/index.js
vendored
40
unpackage/dist/dev/mp-weixin/pages/user/index.js
vendored
@ -102,7 +102,9 @@ var render = function () {
|
||||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var g0 = _vm.$utils.handleFormatNumber(_vm.userInfo.MEMBERSHIP_POINT || 0)
|
||||
var g0 = !!_vm.showContent
|
||||
? _vm.$utils.handleFormatNumber(_vm.userInfo.MEMBERSHIP_POINT || 0)
|
||||
: null
|
||||
_vm.$mp.data = Object.assign(
|
||||
{},
|
||||
{
|
||||
@ -175,6 +177,10 @@ var _default = {
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
showContent: false,
|
||||
// 是否显示内容(控制骨架屏切换)
|
||||
isFirstLoad: true,
|
||||
// 是否是首次进入页面
|
||||
pageType: "",
|
||||
// spring 春节模式
|
||||
menu: {},
|
||||
@ -255,6 +261,9 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
// 确保首次加载时显示骨架屏
|
||||
_this2.isFirstLoad = true;
|
||||
_this2.showContent = false;
|
||||
if (!_this2.user.MEMBERSHIP_ID) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/register/index?backTo=index"
|
||||
@ -272,17 +281,17 @@ var _default = {
|
||||
_this2.cards = userData.LicencePlate.List && userData.LicencePlate.List.length > 0 ? userData.LicencePlate.List[0].License_Plate : "";
|
||||
}
|
||||
// 拿用户信息
|
||||
_context.next = 9;
|
||||
_context.next = 11;
|
||||
return _this2.handleGetUserDetail();
|
||||
case 9:
|
||||
case 11:
|
||||
shopOrderStatus = uni.getStorageSync('shopOrderStatus');
|
||||
if (shopOrderStatus) {
|
||||
_context.next = 13;
|
||||
_context.next = 15;
|
||||
break;
|
||||
}
|
||||
_context.next = 13;
|
||||
_context.next = 15;
|
||||
return _this2.handleGetOrderDetail();
|
||||
case 13:
|
||||
case 15:
|
||||
// 拿到订单信息
|
||||
// await this.handleGetOrderDetail()
|
||||
// 拿车牌号
|
||||
@ -291,7 +300,7 @@ var _default = {
|
||||
_this2.$utils.addUserBehaviorNew({
|
||||
behaviorRecordDesc: "进入了我的页面"
|
||||
});
|
||||
case 14:
|
||||
case 16:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
@ -307,6 +316,17 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
// 只有第一次进入时才显示骨架屏
|
||||
if (_this3.isFirstLoad) {
|
||||
_this3.showContent = false;
|
||||
setTimeout(function () {
|
||||
_this3.showContent = true;
|
||||
_this3.isFirstLoad = false; // 标记已不是第一次进入
|
||||
}, 500);
|
||||
} else {
|
||||
// 非第一次进入直接显示内容
|
||||
_this3.showContent = true;
|
||||
}
|
||||
inShop = uni.getStorageSync("inShop");
|
||||
_this3.inShop = inShop;
|
||||
console.log('this.inShop', JSON.parse(JSON.stringify(_this3.inShop)));
|
||||
@ -383,11 +403,11 @@ var _default = {
|
||||
_this3.$forceUpdate();
|
||||
}
|
||||
console.log('userDatauserDatauserData', userData);
|
||||
_context2.next = 13;
|
||||
_context2.next = 14;
|
||||
return _this3.handleGetOrderDetail();
|
||||
case 13:
|
||||
_this3.$forceUpdate();
|
||||
case 14:
|
||||
_this3.$forceUpdate();
|
||||
case 15:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
151
unpackage/dist/dev/mp-weixin/pages/user/index.wxss
vendored
151
unpackage/dist/dev/mp-weixin/pages/user/index.wxss
vendored
@ -1,3 +1,154 @@
|
||||
/* 骨架屏动画 */
|
||||
@-webkit-keyframes shimmer-data-v-137d5072 {
|
||||
0% {
|
||||
background-position: -468px 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 468px 0;
|
||||
}
|
||||
}
|
||||
@keyframes shimmer-data-v-137d5072 {
|
||||
0% {
|
||||
background-position: -468px 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 468px 0;
|
||||
}
|
||||
}
|
||||
.skeleton.data-v-137d5072 {
|
||||
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
|
||||
background-size: 400px 100%;
|
||||
-webkit-animation: shimmer-data-v-137d5072 1.2s infinite;
|
||||
animation: shimmer-data-v-137d5072 1.2s infinite;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
/* 用户页面骨架屏样式 */
|
||||
.user-skeleton.data-v-137d5072 {
|
||||
padding: 0 32rpx;
|
||||
background: #f7f8fa;
|
||||
}
|
||||
.skeleton-user-info.data-v-137d5072 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.skeleton-user-info .skeleton-avatar.data-v-137d5072 {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
.skeleton-user-info .skeleton-user-details.data-v-137d5072 {
|
||||
flex: 1;
|
||||
}
|
||||
.skeleton-user-info .skeleton-user-details .skeleton-username.data-v-137d5072 {
|
||||
width: 200rpx;
|
||||
height: 32rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.skeleton-user-info .skeleton-user-details .skeleton-level.data-v-137d5072 {
|
||||
width: 120rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
.skeleton-user-info .skeleton-qr-code.data-v-137d5072 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.skeleton-coupon-box.data-v-137d5072 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.skeleton-coupon-box .skeleton-coupon-item.data-v-137d5072 {
|
||||
text-align: center;
|
||||
}
|
||||
.skeleton-coupon-box .skeleton-coupon-item .skeleton-number.data-v-137d5072 {
|
||||
width: 80rpx;
|
||||
height: 40rpx;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
.skeleton-coupon-box .skeleton-coupon-item .skeleton-label.data-v-137d5072 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.skeleton-service-box.data-v-137d5072 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.skeleton-service-box .skeleton-title.data-v-137d5072 {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-service-box .skeleton-service-grid.data-v-137d5072 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.skeleton-service-box .skeleton-service-grid .skeleton-service-item.data-v-137d5072 {
|
||||
width: calc(20% - 16rpx);
|
||||
text-align: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-service-box .skeleton-service-grid .skeleton-service-item .skeleton-service-icon.data-v-137d5072 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
.skeleton-service-box .skeleton-service-grid .skeleton-service-item .skeleton-service-text.data-v-137d5072 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.skeleton-order-box.data-v-137d5072 {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.skeleton-order-box .skeleton-order-header.data-v-137d5072 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.skeleton-order-box .skeleton-order-header .skeleton-title.data-v-137d5072 {
|
||||
width: 120rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.skeleton-order-box .skeleton-order-header .skeleton-more.data-v-137d5072 {
|
||||
width: 40rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
.skeleton-order-box .skeleton-order-grid.data-v-137d5072 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.skeleton-order-box .skeleton-order-grid .skeleton-order-item.data-v-137d5072 {
|
||||
text-align: center;
|
||||
}
|
||||
.skeleton-order-box .skeleton-order-grid .skeleton-order-item .skeleton-order-icon.data-v-137d5072 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 16rpx;
|
||||
}
|
||||
.skeleton-order-box .skeleton-order-grid .skeleton-order-item .skeleton-order-text.data-v-137d5072 {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.main.data-v-137d5072 {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
16
unpackage/dist/dev/mp-weixin/project.config.json
vendored
16
unpackage/dist/dev/mp-weixin/project.config.json
vendored
@ -1,8 +1,7 @@
|
||||
{
|
||||
"description": "项目配置文件。",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
"ignore": []
|
||||
},
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
@ -10,15 +9,10 @@
|
||||
"postcss": false,
|
||||
"minified": false,
|
||||
"newFeature": true,
|
||||
"bigPackageSizeSupport": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
}
|
||||
"bigPackageSizeSupport": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.9.2",
|
||||
"libVersion": "",
|
||||
"appid": "wxee018fb96955552a",
|
||||
"projectname": "caiyunyi",
|
||||
"condition": {
|
||||
@ -38,9 +32,5 @@
|
||||
"current": -1,
|
||||
"list": []
|
||||
}
|
||||
},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user