diff --git a/img/camera.png b/img/camera.png new file mode 100644 index 0000000..1e98f7f Binary files /dev/null and b/img/camera.png differ diff --git a/img/frontPlay.svg b/img/frontPlay.svg new file mode 100644 index 0000000..020a3b7 --- /dev/null +++ b/img/frontPlay.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/common/common.wxml b/pages/common/common.wxml index 0b266b6..a20417f 100644 --- a/pages/common/common.wxml +++ b/pages/common/common.wxml @@ -23,7 +23,7 @@ {{ item.subject }} - + {{ item.location }} @@ -149,7 +149,7 @@ {{ item.subject }} - + diff --git a/pages/edit/edit.wxml b/pages/edit/edit.wxml index a62da4c..2d5a62c 100644 --- a/pages/edit/edit.wxml +++ b/pages/edit/edit.wxml @@ -401,7 +401,6 @@ - {{ item.title || popUpTitle }} @@ -626,6 +625,9 @@ 微信 + + 填写微信号 + diff --git a/pages/index/index.js b/pages/index/index.js index ebbace8..23a8bcf 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -97,7 +97,6 @@ Page({ getNewInit() { miucms.wxget(`${app.globalData.baseURL}/tenement/v2/api/home`).then(res => { let data = res.data - // console.log(data); let { recommendedTab } = data @@ -458,15 +457,12 @@ Page({ type: this.data.listType, pagevalue: this.data.pagevalue || 0, }).then(res => { - // this.getListDataState = false - if (res.code != 200) return let data = res.data.data let pagevalue = res.data.pagevalue let recommendedTab = this.data.recommendedTab - this.setData({ listPage: this.data.listPage + 1, listData: data, @@ -474,8 +470,13 @@ Page({ recommendedTab }) - this.listDataIndex = 0 - this.calculateProcessingCenter() + + this.calculationBefore(data) + + + // this.listDataIndex = 0 + // this.listDataIndex = 9 + // this.calculateProcessingCenter() }).catch(() => { this.getListDataState = false @@ -484,10 +485,35 @@ Page({ }) }, + calculationBefore(data = [...data]) { + let listDataLeft = this.data.listDataLeft + let listDataRight = this.data.listDataRight + + data = data.slice(0, 10) + + data.forEach((el, index) => { + if (index % 2 === 0) listDataLeft.push(el) + else listDataRight.push(el) + }) + + this.setData({ + listDataLeft, + listDataRight, + }) + + this.top10State = true + + return + this.pinterestImgLoadIndex = 0 + this.listDataIndex = 9 + this.calculateProcessingCenter() + }, + listDataIndex: 0, leftHeight: 0, // px 单位 rightHeight: 0, ratio: 0, + pinterestImgLoadIndex: 0, // 加载了建施图 // 计算 calculateProcessingCenter() { @@ -556,6 +582,25 @@ Page({ } }, + pinterestImgLoad(e) { + this.pinterestImgLoadIndex++ + + if (this.pinterestImgLoadIndex >= 10 && this.top10State) { + this.top10State = false + this.pinterestImgLoadIndex = 0 + this.listDataIndex = 10 + let query = wx.createSelectorQuery(); + query.select("#pinterest-list-left").boundingClientRect() + query.select("#pinterest-list-right").boundingClientRect() + query.exec(rect => { + this.leftHeight = rect[0].height + this.rightHeight = rect[1].height + this.calculateProcessingCenter() + }) + + } + }, + // 获取图片高度 getPictureHeight(src) { return new Promise((resolve, reject) => { @@ -580,6 +625,7 @@ Page({ // 上拉到底部 onReachBottom() { + // return this.getListData() }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index f93900b..8714c28 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -127,7 +127,7 @@ 当前共有 {{ combination[areaIndex] && combination[areaIndex].num }} 个房源 - @@ -164,7 +164,11 @@ - + + + + + @@ -180,7 +184,7 @@ - + @@ -194,7 +198,7 @@ - + @@ -391,13 +395,13 @@ - + @@ -408,7 +412,7 @@ - + {{ item.title }} {{ item.propaganda }} @@ -425,18 +429,16 @@ 更多 - -