Commit 5b0607d2 authored by spc's avatar spc

fixed vue

parent dc09af4c
...@@ -423,14 +423,21 @@ export default { ...@@ -423,14 +423,21 @@ export default {
async initBrandInfo() { async initBrandInfo() {
const { data } = await fetchBrandJSON(); const { data } = await fetchBrandJSON();
if (data) { if (data) {
this.swiperList = data.swiperList; this.swiperList = data.swiperList || [{
"title": "默认图",
"url": this.$baseUrl + "homepage/brandSwiperDefaultBg.png"
}];
this.erqiPeizhi = data.erqiPeizhi; this.erqiPeizhi = data.erqiPeizhi;
this.productTabList = data.productTabList || []; this.productTabList = data.productTabList || [];
this.productInfoList = data.product || []; this.productInfoList = data.product || [];
this.esgInfoList = data.esgInfoList[0] || []; this.esgInfoList = data.esgInfoList[0] || [];
this.qrInfoList = data.qrInfoList; this.qrInfoList = data.qrInfoList;
this.ipDesc = data.ipDesc; this.ipDesc = data.ipDesc;
this.swiperIconList = data.swiperIconList; this.swiperIconList = data.swiperIconList || [{
activeUrl: this.$baseUrl + "homepage/brandSwiperDefaultBg.png",
baseUrl: this.$baseUrl + "homepage/brandSwiperDefaultBg.png",
text: "默认图"
}];
this.testVideoUrl = data.videoUrl; this.testVideoUrl = data.videoUrl;
if (data.videoUrl.indexOf('http') === -1) { if (data.videoUrl.indexOf('http') === -1) {
data.videoUrl = this.$baseUrl + data.videoUrl; data.videoUrl = this.$baseUrl + data.videoUrl;
......
...@@ -576,13 +576,19 @@ export default { ...@@ -576,13 +576,19 @@ export default {
} = await fetchHomeJSON(); } = await fetchHomeJSON();
console.warn("data", data) console.warn("data", data)
if (data) { if (data) {
this.swiperList = data.swiperList; this.swiperList = data.swiperList || [
{
"link": {},
"title": "默认图",
"url": this.$baseUrl + "homepage/homeSwiperDefaultBg.png"
},
];
this.vipConfigList = data.vipConfigList; this.vipConfigList = data.vipConfigList;
// this.vipCardList = data.vipCardList; // this.vipCardList = data.vipCardList;
this.contentImgList = data.contentImgList; this.contentImgList = data.contentImgList;
this.channelTabList = data.channelTabList; this.channelTabList = data.channelTabList;
this.changelInfoList = data.changelInfoList; this.changelInfoList = data.changelInfoList;
this.childrenInfoList = data.childrenInfoList[0] || []; this.childrenInfoList = data.childrenInfoList || [];
this.bottomLinkList = data.bottomLinkList; this.bottomLinkList = data.bottomLinkList;
this.qrInfoList = data.qrInfoList || []; this.qrInfoList = data.qrInfoList || [];
this.toolList = data.toolList || []; this.toolList = data.toolList || [];
...@@ -1420,7 +1426,9 @@ export default { ...@@ -1420,7 +1426,9 @@ export default {
left: 0rpx; left: 0rpx;
top: 0rpx; top: 0rpx;
width: 400rpx; width: 400rpx;
height: 470rpx;z-index: 1; pointer-events: none;
height: 470rpx;
z-index: 1;
border-radius: 40rpx; border-radius: 40rpx;
} }
...@@ -1429,6 +1437,7 @@ export default { ...@@ -1429,6 +1437,7 @@ export default {
left: 300rpx; left: 300rpx;
top: 510rpx; top: 510rpx;
width: 74rpx; width: 74rpx;
pointer-events: none;
height: 44rpx; height: 44rpx;
} }
...@@ -1436,6 +1445,7 @@ export default { ...@@ -1436,6 +1445,7 @@ export default {
position: absolute; position: absolute;
left: 30rpx; left: 30rpx;
top: 510rpx; top: 510rpx;
pointer-events: none;
color: #000; color: #000;
font-size: 36rpx; font-size: 36rpx;
width: 300rpx; width: 300rpx;
...@@ -1456,6 +1466,7 @@ export default { ...@@ -1456,6 +1466,7 @@ export default {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
width: 300rpx; width: 300rpx;
pointer-events: none;
z-index: 2; z-index: 2;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
......
...@@ -404,7 +404,7 @@ const initData = async () => { ...@@ -404,7 +404,7 @@ const initData = async () => {
// 确保加载会员信息以获取手机号 // 确保加载会员信息以获取手机号
await userStore.loadMemberInfo(); await userStore.loadMemberInfo();
points.value = userStore.memberInfo?.points; points.value = userStore.memberInfo?.points;
if ( if (
userStore?.userInfo?.memberId && userStore?.userInfo?.memberId &&
userStore?.userInfo?.memberId == "not_login" userStore?.userInfo?.memberId == "not_login"
...@@ -552,7 +552,7 @@ onMounted(async () => { ...@@ -552,7 +552,7 @@ onMounted(async () => {
showLoading(); showLoading();
await userStore.loadMemberInfo(); await userStore.loadMemberInfo();
points.value = userStore.memberInfo?.points; points.value = userStore.memberInfo?.points;
await pageCfgStore.fetchCfg(); await pageCfgStore.fetchCfg();
console.log("pageCfgStore.contentCfg====", pageCfgStore.contentCfg); console.log("pageCfgStore.contentCfg====", pageCfgStore.contentCfg);
...@@ -952,6 +952,7 @@ defineExpose({}); ...@@ -952,6 +952,7 @@ defineExpose({});
.tool-icon { .tool-icon {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 24rpx;
display: block; display: block;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment