Commit e071ff68 authored by 王炽's avatar 王炽

66666

parent 142df6e6
import requestModule from './request.js';
const {
api
} = requestModule;
/**
* 获取积分信息
* @returns
*/
export const fetchIntegralJSON = () => api.get('/c/front/content',{type:'integral'});
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
> >
<image <image
class="tab-bg" class="tab-bg"
:src="$baseUrl + (activeIndex === index ? 'contentLibrary/1001/tab-bg-cl0.png' : '/static/contentLibrary/1001/tab-bg-cl1.png')" :src="$baseUrl + (activeIndex === index ? 'contentLibrary/1001/tab-bg-cl0.png' : 'contentLibrary/1001/tab-bg-cl1.png')"
mode="aspectFit" mode="aspectFit"
/> />
<text <text
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
class="banner-img" class="banner-img"
:src="$baseUrl + `integral/1001/${item?.bannerImg}`" :src="$baseUrl + `integral/1001/${item?.bannerImg}`"
mode="aspectFill" mode="aspectFill"
@click="bannerHandler(index)" @click="bannerHandler(item?.url)"
/> />
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -301,15 +301,16 @@ ...@@ -301,15 +301,16 @@
// 轮播图数据可在此定义(当前使用静态路径) // 轮播图数据可在此定义(当前使用静态路径)
// "rgba(255,255,255,0.5)" // "rgba(255,255,255,0.5)"
import { ref, onMounted, onBeforeMount } from 'vue'; import { ref, onMounted, onBeforeMount, computed } from 'vue';
import { jump, JumpType } from '@/utils/index.js' import { jump, JumpType } from '@/utils/index.js'
import { useUserStore } from "@/stores/user"; import { useUserStore } from "@/stores/user";
import { fetchIntegralJSON } from '../api/integral';
const integralData = { const integralData = ref({
swiper: [ swiper: [
{ {
bannerImg:"integralBannerBg0.png", bannerImg:"integralBannerBg0.png",
url:"https://www.baidu.com", url:"subPackages/shopMainList/topicNew/index?id=1000916",
type:0 type:0
}, },
{ {
...@@ -491,7 +492,9 @@ ...@@ -491,7 +492,9 @@
// 其他分类数据... // 其他分类数据...
] ]
} }
}; });
// const integralData = ref({});
const swiperData = ref([]);//banner图片 const swiperData = ref([]);//banner图片
const vipLvIcons = ref([]);//会员等级图标 const vipLvIcons = ref([]);//会员等级图标
...@@ -597,8 +600,14 @@ ...@@ -597,8 +600,14 @@
const nickName = ref(''); const nickName = ref('');
//banner点击事件 //banner点击事件
const bannerHandler = (index) => { const bannerHandler = (url) => {
const url = swiperData.value[index].url; // const url = swiperData.value[index].url;
if(url != ""){
jump({
type: JumpType.MINI,
url: url
})
}
console.log('bannerHandler=',url); console.log('bannerHandler=',url);
} }
...@@ -694,19 +703,22 @@ ...@@ -694,19 +703,22 @@
} }
onBeforeMount(async() => { onBeforeMount(async() => {
console.log('onBeforeMount');
const {data} = await fetchIntegralJSON();
integralData.value = {...data};
}) })
onMounted(async() => { onMounted(async() => {
swiperData.value = integralData.swiper; swiperData.value = integralData.value.swiper;
vipLvIcons.value = integralData.viplv.imgs; vipLvIcons.value = integralData.value.viplv.imgs;
vipIntegral.value = integralData.vipIntegral; vipIntegral.value = integralData.value.vipIntegral;
vipActive.value = integralData.vipActive; vipActive.value = integralData.value.vipActive;
tabInfo.value = integralData.goodsListData.tabInfo; tabInfo.value = integralData.value.goodsListData.tabInfo;
goodsData.value = integralData.goodsListData.goodsData; goodsData.value = integralData.value.goodsListData.goodsData;
imgInfos.value = integralData.qunyiInfo.imgInfos; imgInfos.value = integralData.value.qunyiInfo.imgInfos;
vipQuanyiData.value = [];////?????? vipQuanyiData.value = [];////??????
vipQuanyiData.value = integralData.qunyiInfo.vipLvsQuanyi; vipQuanyiData.value = integralData.value.qunyiInfo.vipLvsQuanyi;
quanyiListIcon.value = [];/////???? quanyiListIcon.value = [];/////????
imgInfos.value.forEach((element,index) => { imgInfos.value.forEach((element,index) => {
......
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