=chenming 5 vuotta sitten
vanhempi
commit
677ab2c1d5
3 muutettua tiedostoa jossa 19 lisäystä ja 3 poistoa
  1. +2
    -1
      496_dongfengqichen/app.js
  2. +16
    -1
      496_dongfengqichen/pages/index/index.js
  3. +1
    -1
      496_dongfengqichen/pages/index/index.wxml

+ 2
- 1
496_dongfengqichen/app.js Näytä tiedosto

@@ -72,7 +72,8 @@ App({
certificationState:0,//1车主,2合伙人,3同事
mobileData:null,
userPhoneType:null,
kvurl:null
kvurl:null,
kvurlH:0
},
// 获取openId
getOpenid: function (code) {

+ 16
- 1
496_dongfengqichen/pages/index/index.js Näytä tiedosto

@@ -34,6 +34,7 @@ Page({
isOnce:false,
userData:null,
kvurl: null,//顶部大图
kvurlH:0,
},
onLoad: function () {
app.globalData.nowPage = 1;
@@ -49,7 +50,8 @@ Page({
},
loadFun: function () {
this.setData({
kvurl: app.globalData.kvurl
kvurl: app.globalData.kvurl,
kvurlH: app.globalData.kvurlH
})
if (app.globalData.userInfoData) {
this.setData({
@@ -341,6 +343,19 @@ Page({
app.globalData.kvurl = res.data.kvurl;
app.globalData.isFirstLogin = false;
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({
isStartAdvertising: 0
})

+ 1
- 1
496_dongfengqichen/pages/index/index.wxml Näytä tiedosto

@@ -2,7 +2,7 @@
<view class="all" wx:if="{{mainShow}}">
<view class="main" wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}">
<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>
<view class="swiperFrame">
<swiper class="swiperSty" autoplay current="{{swiperCurrent}}" bindchange="swiperChange">

Loading…
Peruuta
Tallenna