提交了

This commit is contained in:
A1300399510 2023-05-10 12:03:08 +08:00
parent 724cc9a2ed
commit 11a28aab6f
12 changed files with 75 additions and 37 deletions

BIN
img/top-image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -38,6 +38,7 @@ Page({
listPage: 1, // 列表数据 页数
listDataLeft: [], // 列表数据
listDataRight: [], // 列表数据
listType: "", // 推荐列表类型
},
/**
@ -232,12 +233,10 @@ Page({
statid
} = e.currentTarget.dataset
miucms.request(app.globalData.config.FormidInsert, {
session: wx.getStorageSync('session'),
// miucms.request(app.globalData.config.FormidInsert, {
miucms.request(app.globalData.baseURL + '/tenement/v2/api/ad/click', {
statid
}).then(res => {
console.log(res);
})
}).then(res => {})
// 判断跳转小程序
if (appid) {
@ -418,8 +417,17 @@ Page({
if (res.code != 200) return
let data = res.data.data
let listData = this.data.listData
listData.push(...data)
// data.forEach(element => {
// if (element.type == 'apartment') {
// // typeof str === 'string' || str instanceof String;
// if (Array.isArray(element['specifications'])) {
// console.log(element);
// // element.specifications.forEach()
// }
// }
// })
this.setData({
listPage: this.data.listPage + 1,
listData: data
@ -444,7 +452,8 @@ Page({
let type = targetData['type']
if (type == 'adv') {
this.getPictureHeight(targetData.image).then(res => {
this.whichSide(res, targetData)
targetData['imageLocal'] = res.path
this.whichSide(res.actual, targetData)
return
})
} else {
@ -462,7 +471,9 @@ Page({
})
this.getPictureHeight(targetData.image).then(res => {
altitude += res
altitude += res.actual
targetData['imageLocal'] = res.path
let select = type == 'apartment' ? '#apartment' : '#general'
let query = wx.createSelectorQuery();
@ -507,10 +518,14 @@ Page({
success: res => {
let {
width,
height
height,
path
} = res
let actual = height / width * 337 * this.ratio
resolve(actual)
resolve({
actual,
path
})
}
})
})

View File

@ -7,15 +7,18 @@
<view class="general-name1 flexacenter" id="general">{{ targetData['title'] }}</view>
</view>
<header-nav inner-text="Some text" isIndexPage="index">{{ topTitle }}</header-nav>
<!-- <header-nav inner-text="Some text" isIndexPage="index" position="{{ 'absolute' }}" bgcolor="transparent">{{ topTitle }}</header-nav> -->
<header-nav inner-text="Some text" isIndexPage="index" position="{{ 'absolute' }}" bgcolor="linear-gradient(0deg, rgba(246, 246, 246, 1) 2%, rgba(98, 177, 255, 1) 333%)" topImage="{{ true }}"></header-nav>
<!-- 新的 首页轮播图 -->
<block wx:if="{{ envVersionState && true }}">
<!-- 搜索框 -->
<view class="search-box flexacenter">
<image mode="widthFix" class="search-img" src="/img/search-icon.png"></image>
<input class="search-input flex1" confirm-type="search" bindconfirm="search" placeholder="{{ search.placeholder }}" />
</view>
<navigator url="/pages/search/search" hover-class="hover">
<view class="search-box flexacenter">
<image mode="widthFix" class="search-img" src="/img/search-icon.png"></image>
<input class="search-input flex1" disabled confirm-type="search" bindconfirm="search" placeholder="{{ search.placeholder }}" />
</view>
</navigator>
<view class="headSwiper">
<swiper class='headSwiper-swiper' current="{{ swiperCurrent }}" autoplay="{{ true }}" circular interval="{{ 3000 }}" duration="{{ 1000 }}" bindchange="bindchangeSwiper">
<block wx:for="{{ banner }}" wx:key="index">
@ -304,10 +307,10 @@
</view>
</scroll-view>
</view>
</block>
<!-- 服务号推广 -->
<image mode='widthFix' show-menu-by-longpress class="popularize" src="{{ service }}" bindtap="copy"></image>
<!-- 服务号推广 -->
<image mode='widthFix' show-menu-by-longpress class="popularize" src="{{ service }}" bindtap="copy"></image>
</block>
<fix-footer unreadMessages="{{ unreadMessages }}" bottomLift="{{ bottomLift }}"></fix-footer>
<view class='video-box' wx:if="{{ video }}">
@ -367,7 +370,7 @@
<!-- 广告 -->
<template name="adv">
<image class="pinterest-list-item" mode="widthFix" src="{{ item.image }}" bindtap="handleSwiper" data-id="{{ item.id }}" data-url="{{ item.url }}"></image>
<image class="pinterest-list-item" mode="widthFix" src="{{ item.imageLocal || item.image }}" bindtap="handleSwiper" data-id="{{ item.id }}" data-url="{{ item.path || item.url }}"></image>
</template>
<!-- 公寓 -->
@ -377,7 +380,7 @@
<image class="apartment-icon" mode="widthFix" src="/img/apartment-icon.png"></image>
<image class="apartment-text" mode="widthFix" src="/img/apartment-text.png"></image>
</view>
<image class="apartment-img" mode="widthFix" src="{{ item.image }}"></image>
<image class="apartment-img" mode="widthFix" src="{{ item.imageLocal || item.image }}"></image>
<view class="apartment-name">{{ item.title }}</view>
<view class="apartment-introduce">{{ item.propaganda }}</view>
<view class="apartment-price">
@ -400,7 +403,7 @@
<template name="general">
<view class="pinterest-list-item general">
<view class="top-right-corner flexcenter" wx:if="{{ item.gptype }}">{{ item.gptype }}</view>
<image class="general-img" mode="widthFix" src="{{ item.image }}"></image>
<image class="general-img" mode="widthFix" src="{{ item.imageLocal || item.image }}"></image>
<view class="general-name flexacenter" wx:if="{{ item.title }}">
<view class="general-tag flexcenter" wx:if="{{ item.leaseterm }}">{{ item.leaseterm }}</view>
{{ item.title }}

View File

@ -933,7 +933,7 @@
height: 72rpx;
border-radius: 345rpx;
border: 1rpx solid rgba(235, 235, 235, 1);
margin: 0 auto;
margin: 12rpx auto 0;
background-color: #fff;
}

View File

@ -402,7 +402,6 @@ Page({
page: this.data.page,
})
var that = this;
// console.log("sendData", sendData);
// miucms.request(app.globalData.config.lists.init, sendData).then(data => {
miucms.request(`${app.globalData.baseURL}/tenement/housingresources/lists`, sendData).then(data => {

View File

@ -49,7 +49,6 @@ Page({
this.setData({
[`info.subject`]: `${ app.globalData.topTitle }-14天房源`
})
},
@ -140,8 +139,10 @@ Page({
loading: true
})
miucms.request(app.globalData.config.studentapartment.quarantineLists, {
page: this.data.page.next_page
// miucms.request(app.globalData.config.studentapartment.quarantineLists, {
miucms.request(app.globalData.baseURL + '/tenement/housingresources/lists', {
page: this.data.page.next_page,
intermediarytype: 1
}).then(data => {
if (data.extraparam) {
wx.showModal({
@ -149,6 +150,8 @@ Page({
content: data.message,
})
} else {
console.log(data.data);
data = data.data
that.setData({
data: that.data.data.concat(data.data),
page: data.page,
@ -156,6 +159,8 @@ Page({
loading: false,
isloding: false
})
console.log("0", this.data.data);
}
wx.hideLoading()

View File

@ -13,6 +13,7 @@
"banner-ad": "../../template/bannerAD/bannerAD",
"ads": "../show/ads/ads",
"tab": "../personList/tab/tab",
"list-item": "../irentList/listItem/listItem"
"list-item": "../irentList/listItem/listItem",
"house-item": "/pages/restOfWorld/houseItem/houseItem"
}
}

View File

@ -1,16 +1,21 @@
<view class="container" wx:if="{{ !isloding }}">
<to-top wx:if="{{ showTOTOP }}"></to-top>
<!-- <header-nav haveSearch="true" >寄托港校租房</header-nav> -->
<header-nav haveSearch="true" >{{ topTitle }}</header-nav>
<header-nav haveSearch="true">{{ topTitle }}</header-nav>
<view class='irent-list-box'>
<head-swiper attachment="{{ imgUrls }}"></head-swiper>
<tab StudentapartmentNew="{{ StudentapartmentNew}}" page="quarantineLists" listTab="{{ listTab }}"></tab>
<view class='house-list'>
<block wx:for="{{ data }}" wx:key="index">
<list-item item="{{ item }}" listTab="{{ listTab }}"></list-item>
<navigator wx:if="{{ !item.isad }}" url="/pages/show/show?tid={{ item.tid }}&uniqid={{ item.uniqid }}">
<house-item item="{{ item }}"></house-item>
</navigator>
<ads isList="true" isrestofworld="true" wx:if="{{ item.isad && !item.banner }}" data-index="{{ index }}" bindclickAD="clickAD" bindcloseAD="closeAD" item="{{ item }}"></ads>
<banner-ad wx:if="{{ item.isad && item.banner }}" index="{{ index }}" item="{{ item }}"></banner-ad>
<!-- <list-item item="{{ item }}" listTab="{{ listTab }}"></list-item> -->
</block>
</view>
<view class="loading" hidden="{{ !loading }}">
@ -20,7 +25,7 @@
<view></view>
<view></view>
</view>
</view>
</view>

View File

@ -8,7 +8,7 @@
.house-list{
padding: 40rpx 30rpx 0;
/* padding: 40rpx 30rpx 0; */
color: #333;
}

View File

@ -17,6 +17,7 @@ Component({
isMessage: Boolean,
bgcolor: String,
position: String, // css 定位方式
topImage: Boolean,
},
/**

View File

@ -3,7 +3,7 @@
<view>
<new-features></new-features>
<view class="NavBar-holder" style="height:{{screen_data.totalTopHeight}}px"></view>
<view class="NavBar" style="height:{{screen_data.totalTopHeight}}px;background-color: {{ bgcolor }};position:{{ position }};">
<view class="NavBar" style="height:{{screen_data.totalTopHeight}}px;background: {{ bgcolor }};position:{{ position }};">
<view class="NavBar-statusBar" style="height:{{screen_data.statusBarHeight}}px"></view>
<view class="NavBar-titlebar" style="height:{{screen_data.titleBarHeight}}px">
<view class="NavBar-content">
@ -15,7 +15,10 @@
<image class="NavBar-HomeIcon user" hover-class='hover' src="../../img/userblack.png"></image>
</navigator>
</view>
<view class="NavBar-left NavBar-left-more" style="width:{{screen_data.titleWidth}}px;width:{{!notShowIndex && haveSearch ? 108 :88}}px">
<view class="NavBar-left NavBar-left-more" style="width:{{screen_data.titleWidth}}px;width:{{!notShowIndex && haveSearch ? 108 :88}}px;flex: {{ topImage ? 1 : 'none' }};">
<block wx:if="{{ topImage }}">
<image class="top-image" mode="widthFix" src="/img/top-image.png"></image>
</block>
<block wx:if="{{ !isIndexPage }}">
<view bindtap="navigategoBack" class='Btn'>
<image class="NavBar-BackIcon" src="/img/Back.svg"></image>

View File

@ -168,4 +168,10 @@
display: flex;
justify-content: center;
align-items: center;
}
.top-image{
width: 255rpx;
height: 42rpx;
margin-left: 30rpx;
}