|
@@ -11,25 +11,17 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bottomBtn">
|
|
<view class="bottomBtn">
|
|
- <u-swiper v-if="currTabIndex==0" type='img' class="swiper" :list="bannerList11" keyName="cover"
|
|
|
|
- indicator indicatorMode="line" :autoplay="false" height="996rpx" imgMode="widthFix" circular
|
|
|
|
- @change="e => currentNum = e.current">
|
|
|
|
- <view slot="indicator">
|
|
|
|
- </view>
|
|
|
|
- </u-swiper>
|
|
|
|
- <u-swiper v-if="currTabIndex==1" type='img' class="swiper" :list="bannerList22" keyName="cover"
|
|
|
|
- indicator indicatorMode="line" :autoplay="false" height="996rpx" imgMode="widthFix" circular
|
|
|
|
- @change="e => currentNum = e.current">
|
|
|
|
- <view slot="indicator">
|
|
|
|
- </view>
|
|
|
|
- </u-swiper>
|
|
|
|
- <u-swiper v-if="currTabIndex==2" type='img' class="swiper" :list="bannerList33" keyName="cover"
|
|
|
|
- indicator indicatorMode="line" :autoplay="false" height="996rpx" imgMode="widthFix" circular
|
|
|
|
- @change="e => currentNum = e.current">
|
|
|
|
- <view slot="indicator">
|
|
|
|
- </view>
|
|
|
|
- </u-swiper>
|
|
|
|
-
|
|
|
|
|
|
+ <swiper :current="currTabIndex" @change="bindChange" class='swiperImg'>
|
|
|
|
+ <swiper-item class="swiperImg">
|
|
|
|
+ <image class="swiperImg" :src="picBase+bannerList11[0].cover" mode=""></image>
|
|
|
|
+ </swiper-item class="swiperImg">
|
|
|
|
+ <swiper-item>
|
|
|
|
+ <image class="swiperImg" :src="picBase+bannerList22[0].cover" mode=""></image>
|
|
|
|
+ </swiper-item>
|
|
|
|
+ <swiper-item class="swiperImg">
|
|
|
|
+ <image class="swiperImg" :src="picBase+bannerList33[0].cover" mode=""></image>
|
|
|
|
+ </swiper-item>
|
|
|
|
+ </swiper>
|
|
<view class="bookingAndIndicator">
|
|
<view class="bookingAndIndicator">
|
|
<view class="btn" @click="toList">
|
|
<view class="btn" @click="toList">
|
|
<text class="btnTxt">一键定制</text>
|
|
<text class="btnTxt">一键定制</text>
|
|
@@ -166,9 +158,6 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- // staticImgConf: uni.getStorageSync('staticImgConf'),
|
|
|
|
- staticImgConf: null,
|
|
|
|
-
|
|
|
|
picUrl: this.$picUrl,
|
|
picUrl: this.$picUrl,
|
|
picBase: this.$picBase,
|
|
picBase: this.$picBase,
|
|
leadList: [],
|
|
leadList: [],
|
|
@@ -178,6 +167,7 @@
|
|
bannerList33: [],
|
|
bannerList33: [],
|
|
bannerList44: [],
|
|
bannerList44: [],
|
|
bannerList55: [],
|
|
bannerList55: [],
|
|
|
|
+ bannerList66: [],
|
|
|
|
|
|
|
|
|
|
bannerList1: [],
|
|
bannerList1: [],
|
|
@@ -190,13 +180,40 @@
|
|
navImg: require('@/static/index/logo.png'),
|
|
navImg: require('@/static/index/logo.png'),
|
|
list: [],
|
|
list: [],
|
|
|
|
|
|
- // priceConfig: {}
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async onLoad(o) {
|
|
async onLoad(o) {
|
|
// o.inviteId = ''
|
|
// o.inviteId = ''
|
|
|
|
+ let res55 = await getBannerDataReq()
|
|
|
|
+ if (res55.code == 0) {
|
|
|
|
+ console.log('首页全局配置数据:', res55);
|
|
|
|
+ this.bannerList11 = [res55.data.find((item, index) => {
|
|
|
|
+ return item.title == '无主灯'
|
|
|
|
+ })]
|
|
|
|
+ this.bannerList22 = [res55.data.find((item, index) => {
|
|
|
|
+ return item.title == '主灯'
|
|
|
|
+ })]
|
|
|
|
+ this.bannerList33 = [res55.data.find((item, index) => {
|
|
|
|
+ return item.title == '吸顶灯'
|
|
|
|
+ })]
|
|
|
|
+
|
|
|
|
+ this.bannerList44 = [res55.data.find((item, index) => {
|
|
|
|
+ return item.title == '智能控制系统'
|
|
|
|
+ })]
|
|
|
|
+ this.bannerList55 = [res55.data.find((item, index) => {
|
|
|
|
+ return item.title == '网络规划-全屋WiFi'
|
|
|
|
+ })]
|
|
|
|
+
|
|
|
|
+ // this.bannerList66[0] = this.bannerList11[0]
|
|
|
|
+ // this.bannerList66[1] = this.bannerList22[0]
|
|
|
|
+ // this.bannerList66[2] = this.bannerList33[0]
|
|
|
|
+ // console.log('首页全局配置数据this.bannerList66:', this.bannerList66);
|
|
|
|
+ console.log('全局静态资源数据', this.bannerList11, this.bannerList22, this.bannerList33, this
|
|
|
|
+ .bannerList44, this.bannerList55);
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast(res55.message)
|
|
|
|
+ }
|
|
|
|
|
|
- console.log('首页静态资源配置数据', this.staticImgConf);
|
|
|
|
if (o.inviteId) {
|
|
if (o.inviteId) {
|
|
uni.setStorageSync('inviteId', o.inviteId)
|
|
uni.setStorageSync('inviteId', o.inviteId)
|
|
console.log('接收到的o.inviteId', o.inviteId);
|
|
console.log('接收到的o.inviteId', o.inviteId);
|
|
@@ -230,40 +247,6 @@
|
|
}
|
|
}
|
|
console.log('首页收到的o:', JSON.stringify(o));
|
|
console.log('首页收到的o:', JSON.stringify(o));
|
|
|
|
|
|
- let res55 = await getBannerDataReq()
|
|
|
|
- if (res55.code == 0) {
|
|
|
|
- console.log('首页全局配置数据:', res55);
|
|
|
|
-
|
|
|
|
- this.bannerList11 = [res55.data.find((item, index) => {
|
|
|
|
- return item.title == '无主灯'
|
|
|
|
- })]
|
|
|
|
- this.bannerList22 = [res55.data.find((item, index) => {
|
|
|
|
- return item.title == '主灯'
|
|
|
|
- })]
|
|
|
|
- this.bannerList33 = [res55.data.find((item, index) => {
|
|
|
|
- return item.title == '吸顶灯'
|
|
|
|
- })]
|
|
|
|
-
|
|
|
|
- this.bannerList44 = [res55.data.find((item, index) => {
|
|
|
|
- return item.title == '智能控制系统'
|
|
|
|
- })]
|
|
|
|
- this.bannerList55 = [res55.data.find((item, index) => {
|
|
|
|
- return item.title == '网络规划-全屋WiFi'
|
|
|
|
- })]
|
|
|
|
- console.log('全局静态资源数据', this.bannerList11, this.bannerList22, this.bannerList33, this
|
|
|
|
- .bannerList44, this.bannerList55);
|
|
|
|
- } else {
|
|
|
|
- this.$toast(res55.message)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // let res = await getBannerDataReq()
|
|
|
|
- // if (res.code == 0) {
|
|
|
|
- // this.bannerList = res.data
|
|
|
|
- // console.log('顶部轮播图数据', this.bannerList);
|
|
|
|
- // } else {
|
|
|
|
- // this.$toast(res.message)
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
let res1 = await getAddressDataReq()
|
|
let res1 = await getAddressDataReq()
|
|
if (res1.code == 0) {
|
|
if (res1.code == 0) {
|
|
this.bannerList1 = res1.data
|
|
this.bannerList1 = res1.data
|
|
@@ -285,22 +268,13 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ bindChange(e) {
|
|
|
|
+ this.currTabIndex = e.detail.current
|
|
|
|
+ console.log('e-----------', e.detail.current);
|
|
|
|
+ },
|
|
|
|
+
|
|
tabChange(item, index) {
|
|
tabChange(item, index) {
|
|
this.currTabIndex = index
|
|
this.currTabIndex = index
|
|
- // if (index == 0) {
|
|
|
|
- // this.bannerList = [this.staticImgConf.find((item, index) => {
|
|
|
|
- // return item.title == '无主灯'
|
|
|
|
- // })]
|
|
|
|
- // } else if (index == 1) {
|
|
|
|
- // this.bannerList = [this.staticImgConf.find((item, index) => {
|
|
|
|
- // return item.title == '主灯'
|
|
|
|
- // })]
|
|
|
|
- // } else {
|
|
|
|
- // this.bannerList = [this.staticImgConf.find((item, index) => {
|
|
|
|
- // return item.title == '吸顶灯'
|
|
|
|
- // })]
|
|
|
|
- // }
|
|
|
|
- // console.log('当前tab图', this.bannerList);
|
|
|
|
},
|
|
},
|
|
toAddrList() {
|
|
toAddrList() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|