certificationState:0,//1车主,2合伙人,3同事 | certificationState:0,//1车主,2合伙人,3同事 | ||||
mobileData:null, | mobileData:null, | ||||
userPhoneType:null, | userPhoneType:null, | ||||
kvurl:null | |||||
kvurl:null, | |||||
kvurlH:0 | |||||
}, | }, | ||||
// 获取openId | // 获取openId | ||||
getOpenid: function (code) { | getOpenid: function (code) { |
isOnce:false, | isOnce:false, | ||||
userData:null, | userData:null, | ||||
kvurl: null,//顶部大图 | kvurl: null,//顶部大图 | ||||
kvurlH:0, | |||||
}, | }, | ||||
onLoad: function () { | onLoad: function () { | ||||
app.globalData.nowPage = 1; | app.globalData.nowPage = 1; | ||||
}, | }, | ||||
loadFun: function () { | loadFun: function () { | ||||
this.setData({ | this.setData({ | ||||
kvurl: app.globalData.kvurl | |||||
kvurl: app.globalData.kvurl, | |||||
kvurlH: app.globalData.kvurlH | |||||
}) | }) | ||||
if (app.globalData.userInfoData) { | if (app.globalData.userInfoData) { | ||||
this.setData({ | this.setData({ | ||||
app.globalData.kvurl = res.data.kvurl; | app.globalData.kvurl = res.data.kvurl; | ||||
app.globalData.isFirstLogin = false; | app.globalData.isFirstLogin = false; | ||||
setTimeout(() => { | setTimeout(() => { | ||||
setTimeout(() => { | |||||
const query = wx.createSelectorQuery() | |||||
query.select('.kvurlImg').boundingClientRect() | |||||
query.selectViewport().scrollOffset() | |||||
query.exec((res)=>{ | |||||
if (res.data && res.data[0]) { | |||||
this.setData({ | |||||
kvurlH: res.data[0].height | |||||
}) | |||||
app.globalData.kvurlH = res.data[0].height; | |||||
} | |||||
}) | |||||
},200) | |||||
this.setData({ | this.setData({ | ||||
isStartAdvertising: 0 | isStartAdvertising: 0 | ||||
}) | }) |
<view class="all" wx:if="{{mainShow}}"> | <view class="all" wx:if="{{mainShow}}"> | ||||
<view class="main" wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"> | <view class="main" wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"> | ||||
<view class="contentFrame"> | <view class="contentFrame"> | ||||
<image style="width:750rpx;height:0rpx;" mode="widthFix" src="{{kvurl}}"></image> | |||||
<image class="kvurlImg" style="width:100%;height:{{kvurlH}}px;" mode="widthFix" src="{{kvurl}}"></image> | |||||
<image style="width:750rpx;height:331rpx;" src="{{imgUrl+'/images/indexText.png'}}"></image> | <image style="width:750rpx;height:331rpx;" src="{{imgUrl+'/images/indexText.png'}}"></image> | ||||
<view class="swiperFrame"> | <view class="swiperFrame"> | ||||
<swiper class="swiperSty" autoplay current="{{swiperCurrent}}" bindchange="swiperChange"> | <swiper class="swiperSty" autoplay current="{{swiperCurrent}}" bindchange="swiperChange"> |