提交
This commit is contained in:
parent
9ee36afa83
commit
5babc74e27
@ -141,7 +141,6 @@ Page({
|
||||
},
|
||||
header: app.globalData.header,
|
||||
success: function (res) {
|
||||
console.log("res", res);
|
||||
try {
|
||||
var data = JSON.parse(res.data);
|
||||
if (data.aid > 0) {
|
||||
@ -194,7 +193,6 @@ Page({
|
||||
success: function (res) {
|
||||
try {
|
||||
res = JSON.parse(res.data);
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
['uploadQRCodeSendData.url']: res.data.url,
|
||||
@ -211,7 +209,6 @@ Page({
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
wx.showToast({
|
||||
title: error,
|
||||
icon: 'none'
|
||||
@ -389,50 +386,8 @@ Page({
|
||||
popUpInput(e) {
|
||||
let value = e.detail.value
|
||||
value = value.substr(0, 200)
|
||||
|
||||
this.setData({
|
||||
complaintReason: value
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
|
||||
})
|
@ -427,7 +427,7 @@ Page({
|
||||
if (res.code != 200) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: res.message
|
||||
content: res.message,
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -740,8 +740,7 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
},
|
||||
onShow: function () {},
|
||||
|
||||
onReady: function () {
|
||||
this.picker = this.selectComponent("#custom-picker")
|
||||
@ -1476,8 +1475,6 @@ Page({
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// miucms.request(app.globalData.baseURL + '/tenement/publish/submit', {
|
||||
miucms.request(app.globalData.baseURL + '/tenement/v2/api/publish/submit', {
|
||||
info: newinfo,
|
||||
token: this.data.newToken,
|
||||
@ -1491,7 +1488,7 @@ Page({
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
popUpIs: "succeed-pop"
|
||||
popUpIs: "intermediary-voluntarily-succeed-pop"
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
|
@ -1608,6 +1608,7 @@ wx-slider .wx-slider-handle-wrapper {
|
||||
color: #7f7f7f;
|
||||
line-height: 36rpx;
|
||||
font-size: 21rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.housing-message .housing-message-item:not(:last-of-type) {
|
||||
|
@ -471,16 +471,13 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 列表和搜索页面的 搜索框 -->
|
||||
<template name="header-search">
|
||||
<!-- 列表页面的 搜索框 -->
|
||||
<template name="list-header-search">
|
||||
<view class='header-search flexacenter'>
|
||||
<form class="flexacenter" bindsubmit="submit" report-submit='true' data-types="confirm">
|
||||
<view class="form flexacenter" bindtap="publicJumps" data-url="/pages/search/search">
|
||||
<image class="search-icon" src="../../img/search-icon.svg"></image>
|
||||
<input disabled="{{ disabled }}" placeholder='搜索房源或输入房源ID' placeholder-class='placeholder' confirm-type='search' value='{{ kw }}' bindinput='input' bindconfirm='submit' focus="{{ focus }}"></input>
|
||||
<view class="clear" bindtap="clearKW" hidden="{{ kw.length==0 }}">
|
||||
<image class="clear-icon" src="/img/gray-cross.png"></image>
|
||||
</view>
|
||||
</form>
|
||||
<input disabled placeholder='搜索房源或输入房源ID'></input>
|
||||
</view>
|
||||
<view class="map-btn flexcenter" wx:if="{{ isNeedMap }}">
|
||||
<image class="map-btn-icon" mode="widthFix" src="/img/map-icon.png"></image>
|
||||
</view>
|
||||
|
@ -616,11 +616,11 @@
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.header-search form {
|
||||
background: #fff;
|
||||
.header-search .form {
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
width: 588rpx;
|
||||
flex: 1;
|
||||
height: 84rpx;
|
||||
height: 72rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
@ -638,47 +638,35 @@
|
||||
|
||||
.header-search input {
|
||||
display: inline-flex;
|
||||
height: 84rpx;
|
||||
height: 72rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
background-color: transparent;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.header-search .clear {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
padding: 30rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.header-search .clear .clear-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.header-search navigator {
|
||||
/* .header-search navigator {
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
width: 80rpx;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
} */
|
||||
|
||||
.header-search .map-btn {
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 232.5rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 12rpx rgba(0, 0, 0, 0.0784313725490196);
|
||||
margin-left: 19.5rpx;
|
||||
box-shadow: 0 0 12rpx rgba(0, 0, 0, 0.0784313725490196);
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
.header-search .map-btn .map-btn-icon {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
|
@ -1838,37 +1838,28 @@ Page({
|
||||
// 电梯 晾晒区
|
||||
if (element.field == "elevator" || element.field == 'sunshinearea') {
|
||||
element.choices.forEach(res => {
|
||||
console.log(res);
|
||||
if (res.value == newinfo[element.field]) {
|
||||
newinfo[element.field] = res.key
|
||||
}
|
||||
if (res.value == newinfo[element.field]) newinfo[element.field] = res.key
|
||||
})
|
||||
}
|
||||
|
||||
// 房屋类型
|
||||
if (element.field == "property") {
|
||||
element.choices.forEach(res => {
|
||||
if (res.value == newinfo.property) {
|
||||
newinfo.property = res.key
|
||||
}
|
||||
if (res.value == newinfo.property) newinfo.property = res.key
|
||||
})
|
||||
}
|
||||
|
||||
// 性别
|
||||
if (element.field == "gender") {
|
||||
element.choices.forEach((el, index) => {
|
||||
if (el.value == newinfo.gender) {
|
||||
newinfo.gender = index + 1
|
||||
}
|
||||
if (el.value == newinfo.gender) newinfo.gender = index + 1
|
||||
})
|
||||
}
|
||||
|
||||
// 发布者身份
|
||||
if (element.field == 'intermediary') {
|
||||
element.choices.forEach((el, index) => {
|
||||
if (el.value == newinfo.intermediary) {
|
||||
newinfo.intermediary = el.key
|
||||
}
|
||||
if (el.value == newinfo.intermediary) newinfo.intermediary = el.key
|
||||
})
|
||||
}
|
||||
|
||||
@ -1876,9 +1867,7 @@ Page({
|
||||
if (element.field == 'location') {
|
||||
this.data.fieldinfoNew[element.field].choices.forEach(el => {
|
||||
el.choices.forEach(e => {
|
||||
if (newinfo.location && newinfo.location.indexOf(e.value) >= 0) {
|
||||
newinfo.location = e.key
|
||||
}
|
||||
if (newinfo.location && newinfo.location.indexOf(e.value) >= 0) newinfo.location = e.key
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -31,10 +31,10 @@
|
||||
<view class="room-type-item " wx:for="{{ data.specifications }}" wx:key="index">
|
||||
<view class="room-type-title">{{ item.title }}</view>
|
||||
<view class="room-type-tab flexflex">
|
||||
<view class="room-type-tab-item highlight" wx:for="{{ 3 }}" wx:key="index">限女生</view>
|
||||
<view class="room-type-tab-item {{ index == 0 ? 'highlight' : '' }}" wx:for="{{ 3 }}" wx:key="index">限女生</view>
|
||||
</view>
|
||||
<view class="room-type-media">
|
||||
<view class="room-type-media-item flexcenter" wx:for="{{ 14 }}">
|
||||
<view class="room-type-media-item flexcenter" wx:for="{{ 4 }}">
|
||||
<image class="room-type-media-image" mode="center"></image>
|
||||
<image class="room-type-videoplay" src="/img/videoplay.png"></image>
|
||||
</view>
|
||||
@ -264,12 +264,11 @@
|
||||
|
||||
<!-- v4 的新底部栏 -->
|
||||
<view wx:if="{{ isNewVersions }}" class="bottom-bar flexacenter" style="padding-bottom: {{ bottomLift }}rpx;">
|
||||
<view class="bottom-bar-item bottom-bar-collect flexcenter">
|
||||
<!-- <view class="bottom-bar-item bottom-bar-collect flexcenter">
|
||||
<image class="bottom-bar-icon" mode="widthFix" src="/img/u1970.png"></image>6
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="bottom-bar-item bottom-bar-share flexcenter" catchtap="share_pic">
|
||||
<image class="bottom-bar-icon" mode="widthFix" src="/img/u1975.png"></image>
|
||||
转发
|
||||
<image class="bottom-bar-icon" mode="widthFix" src="/img/u1975.png"></image>转发
|
||||
</view>
|
||||
<view class="register-btn flexcenter" catchtap="send_form_id">预登记</view>
|
||||
</view>
|
||||
|
@ -999,7 +999,7 @@ map .clickmap {
|
||||
|
||||
.room-type-box .room-type-bottom .room-type-price {
|
||||
color: #f95d5d;
|
||||
font-size: 36rpx;
|
||||
font-size: 43rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
@ -1198,7 +1198,7 @@ map .clickmap {
|
||||
}
|
||||
|
||||
.bottom-bar .register-btn {
|
||||
width: 450rpx;
|
||||
width: 550rpx;
|
||||
height: 105rpx;
|
||||
font-size: 36rpx;
|
||||
border-radius: 69rpx;
|
||||
@ -1211,6 +1211,9 @@ map .clickmap {
|
||||
flex-direction: column;
|
||||
font-size: 21rpx;
|
||||
color: #000000;
|
||||
/* margin-left: 45rpx; */
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.bottom-bar .bottom-bar-item .bottom-bar-icon {
|
||||
|
@ -67,6 +67,16 @@ Page({
|
||||
isNewVersions: true,
|
||||
},
|
||||
onPageScroll(e) {
|
||||
if (e.scrollTop > this.operationsHeight && !this.data.operationsTop) {
|
||||
this.setData({
|
||||
operationsTop: true
|
||||
})
|
||||
} else if (e.scrollTop <= this.operationsHeight && this.data.operationsTop) {
|
||||
this.setData({
|
||||
operationsTop: false
|
||||
})
|
||||
}
|
||||
|
||||
if (e.scrollTop > 1000 && !this.data.showTOTOP) {
|
||||
this.setData({
|
||||
showTOTOP: true
|
||||
@ -477,6 +487,27 @@ Page({
|
||||
if (type == 'floor') this.submitRoomlistings(e)
|
||||
},
|
||||
|
||||
// 记录 轮播图的高度 // 随便计算 筛选的高度
|
||||
// 筛选到顶部的高度
|
||||
recordSwiperHeight(e) {
|
||||
let swiperHeight = e.detail
|
||||
let screen_data = this.data.screen_data
|
||||
// console.log(swiperHeight, "swiperHeight");
|
||||
// return
|
||||
wx.createSelectorQuery().select("#annex-school").boundingClientRect((rect) => {
|
||||
if (!rect) return
|
||||
let top = rect.top - screen_data['totalTopHeight']
|
||||
this.operationsHeight = top
|
||||
console.log(this.operationsHeight, "operationsHeight");
|
||||
}).exec()
|
||||
},
|
||||
|
||||
// 公共跳转
|
||||
publicJumps(e) {
|
||||
let url = e.currentTarget.dataset.url
|
||||
wx.navigateTo({
|
||||
url,
|
||||
})
|
||||
},
|
||||
|
||||
})
|
@ -1,17 +1,18 @@
|
||||
{
|
||||
"navigationBarTitleText": "寄托租房",
|
||||
"usingComponents": {
|
||||
"header-nav": "../../template/headerNav/index",
|
||||
"form-id": "../../template/formId/formId",
|
||||
"go-login": "../../template/goLogin/goLogin",
|
||||
"head-swiper": "../../template/headSwiper/headSwiper",
|
||||
"tab": "../personList/tab/tab",
|
||||
"to-top": "../../template/toTop/toTop",
|
||||
"select-single": "../../template/selectSingle/selectSingle",
|
||||
"range-box": "../../template/rangeBox/rangeBox",
|
||||
"list-item": "./listItem/listItem",
|
||||
"announcement-popup": "../../template/announcementPopup/announcementPopup",
|
||||
"list-operations": "/template/listOperations/listOperations"
|
||||
},
|
||||
"enablePullDownRefresh": false
|
||||
"navigationBarTitleText": "寄托租房",
|
||||
"usingComponents": {
|
||||
"header-nav": "../../template/headerNav/index",
|
||||
"form-id": "../../template/formId/formId",
|
||||
"go-login": "../../template/goLogin/goLogin",
|
||||
"head-swiper": "../../template/headSwiper/headSwiper",
|
||||
"tab": "../personList/tab/tab",
|
||||
"to-top": "../../template/toTop/toTop",
|
||||
"select-single": "../../template/selectSingle/selectSingle",
|
||||
"range-box": "../../template/rangeBox/rangeBox",
|
||||
"list-item": "./listItem/listItem",
|
||||
"announcement-popup": "../../template/announcementPopup/announcementPopup",
|
||||
"list-operations": "/template/listOperations/listOperations",
|
||||
"xin-head-swiper": "/template/xinHeadSwiper/xinHeadSwiper"
|
||||
},
|
||||
"enablePullDownRefresh": false
|
||||
}
|
@ -3,14 +3,30 @@
|
||||
<view class="container">
|
||||
<to-top wx:if="{{ showTOTOP }}"></to-top>
|
||||
<!-- <header-nav inner-text="Some text">寄托港校租房</header-nav> -->
|
||||
<header-nav inner-text="Some text">{{ isNewVersions? '香港房源' : topTitle }}</header-nav>
|
||||
<!-- <header-nav inner-text="Some text">{{ isNewVersions? '香港房源' : topTitle }}</header-nav> -->
|
||||
<header-nav wx:if="{{ isNewVersions }}" bgcolor="{{ operationsTop ? '#fff' : 'transparent' }}">香港房源</header-nav>
|
||||
<header-nav wx:else>{{ topTitle }}</header-nav>
|
||||
|
||||
<template is="irenCouponReceive" data="{{ irentCouponBig:irentCouponBig,hideCoupon:hideCoupon,irenCouponReceive:irenCouponReceive }}"></template>
|
||||
<view class='irent-list-box'>
|
||||
<head-swiper attachment="{{ imgUrls }}"></head-swiper>
|
||||
<tab StudentapartmentNew="{{ StudentapartmentNew}}" page="irentList" listTab="{{ listTab }}"></tab>
|
||||
|
||||
<view class="header-bj" wx:if="{{ isNewVersions }}"></view>
|
||||
|
||||
<view>
|
||||
<template is="list-header-search" data="{{ isNeedMap: true }}"></template>
|
||||
</view>
|
||||
|
||||
<xin-head-swiper wx:if="{{ isNewVersions }}" bindrecordSwiperHeight="recordSwiperHeight" data="{{ imgUrls }}"></xin-head-swiper>
|
||||
<head-swiper wx:else attachment="{{ imgUrls }}"></head-swiper>
|
||||
<view wx:if="{{ isNewVersions }}" style="height: 48rpx; width: 100vw;"></view>
|
||||
|
||||
<view class="tab-box">
|
||||
<tab isNewVersions="{{ isNewVersions }}" StudentapartmentNew="{{ StudentapartmentNew }}" page="irentList" listTab="{{ listTab }}"></tab>
|
||||
</view>
|
||||
|
||||
|
||||
<block wx:if="{{ isNewVersions }}">
|
||||
<view class="annex-school flexacenter">
|
||||
<view id="annex-school" class="annex-school flexacenter">
|
||||
<view class="annex-school-name flexacenter">学校附近</view>
|
||||
<scroll-view scroll-x="{{ true }}" style="white-space: nowrap;display: grid;" class="flex1">
|
||||
<view class="annex-school-item flexcenter {{ school == '' ? 'pitch' : '' }}" bindtap="chooseSchool" data-id="">不限</view>
|
||||
@ -32,93 +48,95 @@
|
||||
</block>
|
||||
|
||||
<block wx:if="{{ isNewVersions }}">
|
||||
<list-operations tabTitle="品牌公寓" operationstype="student" money="{{ money }}" brands="{{ brands }}" screen_data="{{ screen_data }}" roomtype="{{ roomtype }}" roomlistings="{{ roomlistings }}" bindsubmit="submitOperations"></list-operations>
|
||||
<view id="list-operations" class="list-operations {{ operationsTop ? 'list-operations-top' : '' }}" wx:if="{{ isNewVersions }}" style="top: {{ screen_data.totalTopHeight }}px;">
|
||||
<list-operations tabTitle="品牌公寓" isNewVersions="{{ isNewVersions }}" operationstype="student" money="{{ money }}" brands="{{ brands }}" screen_data="{{ screen_data }}" roomtype="{{ roomtype }}" roomlistings="{{ roomlistings }}" bindsubmit="submitOperations"></list-operations>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 条件框 -->
|
||||
<view wx:else class="condition-box" style="top:{{screen_data.totalTopHeight}}px">
|
||||
<view class="tab">
|
||||
<select-single title="请选择品牌" slots="true" list="{{ brands.list }}" value="{{ brands.value }}" bindsubmit="submitBrands">
|
||||
<view class="{{ brands.value ? 'bold' :''}}">
|
||||
{{ brands.value ? brands.obj[brands.value] : '品牌' }}
|
||||
<image src="/img/tobottom-c.png" class="tobottom"></image>
|
||||
</view>
|
||||
</select-single>
|
||||
</view>
|
||||
|
||||
<view class="tab">
|
||||
<range-box title="租金区间(港元)" img="tobottom" bindsubmit="submitMoney" value1="{{ money.rent_min }}" value2="{{ money.rent_max }}">
|
||||
<view wx:if="{{ money.rent_min || money.rent_max }}" class="bold">
|
||||
{{ (money.rent_min || '') + '~' + (money.rent_max || '') }}
|
||||
</view>
|
||||
<block wx:if="{{ !money.rent_min && !money.rent_max}}">租金</block>
|
||||
<!-- 条件框 -->
|
||||
<view wx:else class="condition-box" style="top:{{screen_data.totalTopHeight}}px">
|
||||
<view class="tab">
|
||||
<select-single title="请选择品牌" slots="true" list="{{ brands.list }}" value="{{ brands.value }}" bindsubmit="submitBrands">
|
||||
<view class="{{ brands.value ? 'bold' :''}}">
|
||||
{{ brands.value ? brands.obj[brands.value] : '品牌' }}
|
||||
<image src="/img/tobottom-c.png" class="tobottom"></image>
|
||||
</range-box>
|
||||
</view>
|
||||
<view class="tab">
|
||||
<select-single title="请选择房型" slots="true" list="{{ roomtype.list }}" value="{{ roomtype.value }}" bindsubmit="submitRoomtype">
|
||||
<view class="{{ roomtype.value ? 'bold' :''}}">
|
||||
{{ roomtype.value ? roomtype.obj[roomtype.value] : '房型' }}
|
||||
<image src="/img/tobottom-c.png" class="tobottom"></image>
|
||||
</view>
|
||||
</select-single>
|
||||
</view>
|
||||
<view class="tab">
|
||||
<select-single title="请选择楼型" slots="true" list="{{ roomlistings.list }}" value="{{ roomlistings.value }}" bindsubmit="submitRoomlistings">
|
||||
<view class="{{ roomlistings.value ? 'bold' :''}}">
|
||||
{{ roomlistings.value ? roomlistings.obj[roomlistings.value] : '楼型' }}
|
||||
<image src="/img/tobottom-c.png" class="tobottom"></image>
|
||||
</view>
|
||||
</select-single>
|
||||
</view>
|
||||
</view>
|
||||
</select-single>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{ isNewVersions }}">
|
||||
<view class='house-list apartment-list'>
|
||||
<template wx:for="{{ data }}" data="{{ item }}" is="apartment-item"></template>
|
||||
</view>
|
||||
|
||||
<!-- 疑问 -->
|
||||
<view class="query-box flexcenter" wx:if="{{ true }}">
|
||||
<view class="query-text flexacenter">有疑问?来找<image class="query-img" mode="widthFix" src="/img/smiling-face.png"></image>寄托方同学!</view>
|
||||
<view class="query-btn flexcenter" bindtap="copyWechat">复制微信号</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class='house-list'>
|
||||
<block wx:for="{{ data }}" wx:key="index">
|
||||
<list-item item="{{ item }}" listTab="{{ listTab }}"></list-item>
|
||||
</block>
|
||||
<view class="tab">
|
||||
<range-box title="租金区间(港元)" img="tobottom" bindsubmit="submitMoney" value1="{{ money.rent_min }}" value2="{{ money.rent_max }}">
|
||||
<view wx:if="{{ money.rent_min || money.rent_max }}" class="bold">
|
||||
{{ (money.rent_min || '') + '~' + (money.rent_max || '') }}
|
||||
</view>
|
||||
<block wx:if="{{ !money.rent_min && !money.rent_max}}">租金</block>
|
||||
<image src="/img/tobottom-c.png" class="tobottom"></image>
|
||||
</range-box>
|
||||
</view>
|
||||
<view class="loading" hidden="{{ !loading }}">
|
||||
<view></view>
|
||||
<view></view>
|
||||
<view></view>
|
||||
<view></view>
|
||||
<view></view>
|
||||
<view class="tab">
|
||||
<select-single title="请选择房型" slots="true" list="{{ roomtype.list }}" value="{{ roomtype.value }}" bindsubmit="submitRoomtype">
|
||||
<view class="{{ roomtype.value ? 'bold' :''}}">
|
||||
{{ roomtype.value ? roomtype.obj[roomtype.value] : '房型' }}
|
||||
<image src="/img/tobottom-c.png" class="tobottom"></image>
|
||||
</view>
|
||||
</select-single>
|
||||
</view>
|
||||
<block wx:if="{{ data.length==0 && !loading }}">
|
||||
<view class='nocontent'>
|
||||
<image src="../../img/file.png" class='file'></image>
|
||||
暂无数据
|
||||
</view>
|
||||
</block>
|
||||
<view class='bottom-already' hidden='{{page.next_page>=1 }}'>
|
||||
<!-- <view class='text'>到底啦</view> -->
|
||||
<view class='more'>
|
||||
<view>有疑问?</view>
|
||||
<view>来找{{ contact.nickname }}</view>
|
||||
<!-- <navigator url="/pages/irentForm/irentForm?from=list&uniqid=jC80yzHfav1u" class="btn btn-a">马上登记</navigator> -->
|
||||
<view class='btn' bindtap='copy' data-content="{{ contact.wechat }}">复制微信号</view>
|
||||
</view>
|
||||
<view class="tab">
|
||||
<select-single title="请选择楼型" slots="true" list="{{ roomlistings.list }}" value="{{ roomlistings.value }}" bindsubmit="submitRoomlistings">
|
||||
<view class="{{ roomlistings.value ? 'bold' :''}}">
|
||||
{{ roomlistings.value ? roomlistings.obj[roomlistings.value] : '楼型' }}
|
||||
<image src="/img/tobottom-c.png" class="tobottom"></image>
|
||||
</view>
|
||||
</select-single>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view wx:if="{{ irenCouponReceive && irenCouponReceive.appId}}" class="irenCouponReceive">
|
||||
|
||||
<block wx:if="{{ isNewVersions }}">
|
||||
<view class='house-list apartment-list'>
|
||||
<template wx:for="{{ data }}" data="{{ item }}" is="apartment-item"></template>
|
||||
</view>
|
||||
|
||||
<!-- 疑问 -->
|
||||
<view class="query-box flexcenter">
|
||||
<view class="query-text flexacenter">有疑问?来找<image class="query-img" mode="widthFix" src="/img/smiling-face.png"></image>寄托方同学!</view>
|
||||
<view class="query-btn flexcenter" bindtap="copyWechat">复制微信号</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class='house-list'>
|
||||
<block wx:for="{{ data }}" wx:key="index">
|
||||
<list-item item="{{ item }}" listTab="{{ listTab }}"></list-item>
|
||||
</block>
|
||||
</view>
|
||||
<view class="loading" hidden="{{ !loading }}">
|
||||
<view></view>
|
||||
<view></view>
|
||||
<view></view>
|
||||
<view></view>
|
||||
<view></view>
|
||||
</view>
|
||||
<block wx:if="{{ data.length==0 && !loading }}">
|
||||
<view class='nocontent'>
|
||||
<image src="../../img/file.png" class='file'></image>
|
||||
暂无数据
|
||||
</view>
|
||||
</block>
|
||||
<view class='bottom-already' hidden='{{page.next_page>=1 }}'>
|
||||
<!-- <view class='text'>到底啦</view> -->
|
||||
<view class='more'>
|
||||
<view>有疑问?</view>
|
||||
<view>来找{{ contact.nickname }}</view>
|
||||
<!-- <navigator url="/pages/irentForm/irentForm?from=list&uniqid=jC80yzHfav1u" class="btn btn-a">马上登记</navigator> -->
|
||||
<view class='btn' bindtap='copy' data-content="{{ contact.wechat }}">复制微信号</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view wx:if="{{ irenCouponReceive && irenCouponReceive.appId}}" class="irenCouponReceive">
|
||||
<view bindtap="tominiProgram" class="a" data-appId="{{ irenCouponReceive.appId }}" data-path="{{ irenCouponReceive.path }}">
|
||||
<image src="{{ irenCouponReceive.image }}" mode="widthFix" class="img"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
<announcement-popup interface="apartmentlist" init="{{ initState }}"></announcement-popup>
|
||||
<announcement-popup interface="apartmentlist" init="{{ initState }}"></announcement-popup>
|
||||
|
||||
|
||||
</view>
|
@ -281,6 +281,7 @@
|
||||
.apartment-list {
|
||||
background-color: rgba(246, 246, 246, 1);
|
||||
border-radius: 60rpx 60rpx 0 0;
|
||||
box-shadow: 0 0 12rpx rgba(0, 0, 0, 0.156862745098039);
|
||||
}
|
||||
|
||||
.query-box {
|
||||
@ -314,8 +315,8 @@
|
||||
.annex-school {
|
||||
height: 60rpx;
|
||||
width: 100vw;
|
||||
margin-top: 40.5rpx;
|
||||
display: inline-flex;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.annex-school .annex-school-name {
|
||||
@ -343,4 +344,8 @@
|
||||
background-color: rgb(231, 251, 247);
|
||||
border: none;
|
||||
color: rgb(80, 227, 194);
|
||||
}
|
||||
|
||||
.tab-box {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"header-nav": "/template/headerNav/index"
|
||||
}
|
||||
},
|
||||
"navigationBarTextStyle": "white"
|
||||
|
||||
}
|
@ -122,6 +122,12 @@ Page({
|
||||
|
||||
operationsTop: false, // 操作栏 是否在顶部
|
||||
|
||||
intermediaryObj: {
|
||||
0: "个人",
|
||||
1: "中介",
|
||||
6: "求房源",
|
||||
},
|
||||
|
||||
isNewVersions: true,
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@ -160,7 +166,6 @@ Page({
|
||||
title: '加载中',
|
||||
})
|
||||
|
||||
|
||||
let that = this;
|
||||
var location = [];
|
||||
if (options.location) location = options.location.split(',')
|
||||
@ -174,6 +179,7 @@ Page({
|
||||
|
||||
this.setData({
|
||||
q: options.q ? options.q : '',
|
||||
intermediary: options.intermediary || 0,
|
||||
options: options || {},
|
||||
location: that.data.location,
|
||||
school: that.data.school,
|
||||
@ -184,8 +190,6 @@ Page({
|
||||
setTimeout(function () {
|
||||
that.get_config()
|
||||
}, 200)
|
||||
|
||||
|
||||
},
|
||||
|
||||
getTopTitle() {
|
||||
@ -208,9 +212,12 @@ Page({
|
||||
langs: app.globalData.langs,
|
||||
})
|
||||
|
||||
app.globalData['langs'] ? '' : this.getDtailsLangs() // 先全局吧
|
||||
app.globalData['langs'] ? '' : this.getDtailsLangs()
|
||||
|
||||
if (!this.data.isNewVersions) {
|
||||
this.getgroupSearch();
|
||||
}
|
||||
|
||||
this.getgroupSearch();
|
||||
this.get_list();
|
||||
this.getAd();
|
||||
this.getLocationList();
|
||||
@ -250,6 +257,7 @@ Page({
|
||||
this.handleDetailData(data)
|
||||
}, 300)
|
||||
} else {
|
||||
if (!data) return
|
||||
data.forEach(ele => {
|
||||
// 这个是将 详情键 替换语言包里的值
|
||||
let list = ['type', 'rentalduration', 'intermediary', "property", "elevator", "sunshinearea", "gender"]
|
||||
@ -324,7 +332,6 @@ Page({
|
||||
title = this.data.topTitle + '-' + this.data.school.list[this.data.school.value + ''] + '附近个人房源';
|
||||
}
|
||||
let path = `/pages/personList/personList?school=${this.data.school.value}&location=${location}`;
|
||||
|
||||
return {
|
||||
path: path,
|
||||
title: title,
|
||||
@ -336,8 +343,11 @@ Page({
|
||||
// 拉去广告
|
||||
getAd() {
|
||||
let that = this;
|
||||
miucms.request(app.globalData.config.special.lists, {}).then(data => {
|
||||
|
||||
let intermediary = this.data.intermediary
|
||||
let url = intermediary == 0 ? app.globalData.config.special.lists : app.globalData.config.studentapartment.quarantineBanner
|
||||
miucms.request(url, {}).then(data => {
|
||||
// miucms.request(app.globalData.config.special.lists, {}).then(data => {
|
||||
// miucms.request(app.globalData.config.studentapartment.quarantineBanner, {}).then(data => {
|
||||
that.setData({
|
||||
attachment: data.data
|
||||
})
|
||||
@ -373,12 +383,10 @@ Page({
|
||||
getgroupSearch() {
|
||||
var that = this;
|
||||
miucms.request(app.globalData.config.lists.groupsearch, {}).then(data => {
|
||||
|
||||
this.setData({
|
||||
groupSearch: data.data
|
||||
}, function () {
|
||||
that.caclulatesearchIndex()
|
||||
// that.calculateConditionPosition()
|
||||
})
|
||||
wx.hideLoading()
|
||||
|
||||
@ -445,9 +453,8 @@ Page({
|
||||
// 获取列表
|
||||
get_list: function () {
|
||||
var that = this;
|
||||
if (this.data.page == 0 || this.data.loading) {
|
||||
return false;
|
||||
}
|
||||
if (this.data.page == 0 || this.data.loading) return false;
|
||||
|
||||
that.setData({
|
||||
loading: true
|
||||
})
|
||||
@ -455,13 +462,13 @@ Page({
|
||||
var sendData = Object.assign({}, this.data.options, this.data.moreCondition.data, this.data.money, {
|
||||
session: wx.getStorageSync('session'),
|
||||
orderby: this.data.orderby.value,
|
||||
'type': this.data.types.value,
|
||||
'types': this.data.types.value,
|
||||
location: that.data.location.value,
|
||||
school: that.data.school.value,
|
||||
// school: 309,
|
||||
page: this.data.page,
|
||||
// intermediarytype: 2,
|
||||
intermediary: 0
|
||||
intermediary: this.data.intermediary
|
||||
// intermediary: 1
|
||||
})
|
||||
|
||||
var that = this;
|
||||
@ -782,8 +789,9 @@ Page({
|
||||
},
|
||||
// 提交出租方式
|
||||
submittype(e) {
|
||||
console.log(e.detail);
|
||||
this.data.types.value = e.detail.types || e.detail.data;
|
||||
if (this.data.isNewVersions) this.data.types.value = e.detail.types
|
||||
else this.data.types.value = e.detail.data;
|
||||
|
||||
this.setData({
|
||||
types: this.data.types,
|
||||
selectGroupIndex: null
|
||||
|
@ -6,8 +6,8 @@
|
||||
<block wx:if="{{ isNewVersions }}">
|
||||
<view class="header-bj" wx:if="{{ isNewVersions }}"></view>
|
||||
<header-nav bgcolor="{{ operationsTop ? '#fff' : 'transparent' }}">{{ topTitle }}</header-nav>
|
||||
<view bindtap="getLocationList" bindtap="publicJumps" data-url="/pages/search/search">
|
||||
<template is="header-search" data="{{ kw:'',disabled: true,isNeedMap: true }}"></template>
|
||||
<view>
|
||||
<template is="list-header-search" data="{{ kw:'',disabled: true,isNeedMap: true }}"></template>
|
||||
</view>
|
||||
<xin-head-swiper bindrecordSwiperHeight="recordSwiperHeight" data="{{ attachment }}"></xin-head-swiper>
|
||||
</block>
|
||||
@ -16,8 +16,8 @@
|
||||
<head-swiper attachment="{{ attachment }}"></head-swiper>
|
||||
</block>
|
||||
<!-- 临时隔断用的 -->
|
||||
<view wx:if="{{ isNewVersions }}" style="height: 48rpx; width: 100rpx;"></view>
|
||||
<tab isNewVersions="{{ isNewVersions }}" StudentapartmentNew="{{ StudentapartmentNew}}" page="personList" listTab="{{ listTab }}"></tab>
|
||||
<view wx:if="{{ isNewVersions }}" style="height: 48rpx; width: 100vw;"></view>
|
||||
<tab isNewVersions="{{ isNewVersions }}" StudentapartmentNew="{{ StudentapartmentNew }}" page="{{ intermediary == 0 ? 'personList' : 'quarantineLists' }}" listTab="{{ listTab }}"></tab>
|
||||
<!-- 热词 -->
|
||||
<view class="hot-text-box" wx:if="{{ !isNewVersions }}">
|
||||
<view class="hot-text" wx:if="{{ groupSearch.length>0 }}">
|
||||
|
@ -1,54 +1,57 @@
|
||||
// pages/index/tab/tab.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
StudentapartmentNew: Boolean,
|
||||
page: String,
|
||||
listTab: Object,
|
||||
isNewVersions: Boolean
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
// isNewVersions: true,
|
||||
tabList: [{
|
||||
name: "个人房源",
|
||||
value: "personList",
|
||||
}, {
|
||||
name: "中介房源",
|
||||
value: "quarantineLists"
|
||||
}, {
|
||||
name: "学生公寓",
|
||||
value: "irentList"
|
||||
}]
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
toPage(e) {
|
||||
let page = e.currentTarget.dataset.page;
|
||||
|
||||
if (this.properties.page === page) {
|
||||
return false
|
||||
}
|
||||
wx.redirectTo({
|
||||
url: `/pages/${page}/${page}`,
|
||||
})
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
StudentapartmentNew: Boolean,
|
||||
page: String,
|
||||
listTab: Object,
|
||||
isNewVersions: Boolean
|
||||
},
|
||||
|
||||
|
||||
// 跳转中介房源
|
||||
toIntermediaryPage() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/quarantineLists/quarantineLists',
|
||||
})
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
// isNewVersions: true,
|
||||
tabList: [{
|
||||
name: "个人房源",
|
||||
value: "personList",
|
||||
url: "/pages/personList/personList"
|
||||
}, {
|
||||
name: "中介房源",
|
||||
value: "quarantineLists",
|
||||
url: "/pages/personList/personList?intermediary=1"
|
||||
}, {
|
||||
name: "学生公寓",
|
||||
value: "irentList",
|
||||
url: "/pages/irentList/irentList"
|
||||
}]
|
||||
},
|
||||
|
||||
}
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
toPage(e) {
|
||||
let page = e.currentTarget.dataset.page;
|
||||
let url = e.currentTarget.dataset.url;
|
||||
if (!url) url = `/pages/${page}/${page}`
|
||||
|
||||
if (this.properties.page === page) return false
|
||||
wx.redirectTo({
|
||||
url,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 跳转中介房源
|
||||
toIntermediaryPage() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/quarantineLists/quarantineLists',
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
})
|
@ -1,5 +1,5 @@
|
||||
<view class="tab-list flexacenter" wx:if="{{ isNewVersions }}">
|
||||
<view class="tab-item flexcenter {{ page == item.value ? 'pitch' : '' }}" wx:for="{{ tabList }}" wx:key="index" bindtap="toPage" data-page="{{ item.value }}">{{ item.name }}</view>
|
||||
<view class="tab-item flexcenter {{ page == item.value ? 'pitch' : '' }}" wx:for="{{ tabList }}" wx:key="index" bindtap="toPage" data-page="{{ item.value }}" data-url="{{ item.url }}">{{ item.name }}</view>
|
||||
</view>
|
||||
|
||||
<view class='irent-tab-box tab-box' wx:else>
|
||||
|
@ -4,481 +4,473 @@ var config = {};
|
||||
var miucms = require('../../utils/miucms.js');
|
||||
var WxParse = require('../../wxParse/wxParse.js');
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
isloding: true,
|
||||
StudentapartmentNew: null, //是否顯示new
|
||||
showTOTOP: false,
|
||||
tid: '',
|
||||
uniqid: '0W4XS5SrvSHD',
|
||||
token: '',
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
isloding: true,
|
||||
StudentapartmentNew: null, //是否顯示new
|
||||
showTOTOP: false,
|
||||
tid: '',
|
||||
uniqid: '0W4XS5SrvSHD',
|
||||
token: '',
|
||||
|
||||
imgUrls: [],
|
||||
imgUrls: [],
|
||||
|
||||
page: {
|
||||
next_page: 1
|
||||
},
|
||||
data: [],
|
||||
contact: {},
|
||||
loading: false,
|
||||
info: {
|
||||
// subject: '寄托港校租房-14天房源'
|
||||
subject: `${ app.globalData.topTitle }-14天房源`
|
||||
},
|
||||
listTab: {},
|
||||
topTitle: "",
|
||||
groupSearch: [], //组合最热
|
||||
location: {
|
||||
value: [],
|
||||
data: null
|
||||
},
|
||||
types: {
|
||||
value: '',
|
||||
data: null
|
||||
}, //6.24删除
|
||||
money: {
|
||||
rent_min: 0,
|
||||
rent_max: ''
|
||||
},
|
||||
moreCondition: {
|
||||
show: false,
|
||||
data: {
|
||||
gender: "0",
|
||||
leaseterm: "0",
|
||||
publish: "twomonth",
|
||||
}
|
||||
},
|
||||
|
||||
school: {
|
||||
list: {},
|
||||
value: ''
|
||||
},
|
||||
|
||||
orderby: {
|
||||
value: 'timestamp',
|
||||
list: [{
|
||||
name: "最新发布",
|
||||
value: 'timestamp'
|
||||
page: {
|
||||
next_page: 1
|
||||
},
|
||||
{
|
||||
name: "热门",
|
||||
value: 'hotnum'
|
||||
},
|
||||
{
|
||||
name: "价格从低到高",
|
||||
value: 'rentasc'
|
||||
},
|
||||
{
|
||||
name: "价格从高到低",
|
||||
value: 'rentdesc'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
selectGroupIndex: null,
|
||||
isNewVersions: true,
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.get_config()
|
||||
this.setData({
|
||||
topTitle: app.globalData.topTitle
|
||||
})
|
||||
|
||||
this.getTopTitle()
|
||||
},
|
||||
|
||||
getTopTitle() {
|
||||
miucms.getTopTitle(this, app)
|
||||
|
||||
this.setData({
|
||||
[`info.subject`]: `${ app.globalData.topTitle }-14天房源`
|
||||
})
|
||||
},
|
||||
|
||||
onPageScroll(e) {
|
||||
if (e.scrollTop > 1000 && !this.data.showTOTOP) {
|
||||
this.setData({
|
||||
showTOTOP: true
|
||||
})
|
||||
} else if (e.scrollTop < 1000 && this.data.showTOTOP) {
|
||||
this.setData({
|
||||
showTOTOP: false
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
this.setData({
|
||||
page: {
|
||||
next_page: 1
|
||||
},
|
||||
data: []
|
||||
})
|
||||
this.getList()
|
||||
wx.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
// 加载下一页
|
||||
|
||||
this.getList()
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function (res) {
|
||||
|
||||
if (res.from === 'button') {
|
||||
// 来自页面内转发按钮
|
||||
var types = res.from === 'button' ? 'share_btn' : 'show';
|
||||
}
|
||||
let that = this;
|
||||
return {
|
||||
title: this.data.topTitle + '-' + this.data.listTab.quarantineLists,
|
||||
imageUrl: that.data.info.share_img,
|
||||
success: function (res) {
|
||||
miucms.share(app, types)
|
||||
},
|
||||
fail: function (res) {
|
||||
// 转发失败
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
get_config() {
|
||||
var that = this;
|
||||
if (app.globalData.config && app.globalData.config.lists) {
|
||||
|
||||
config = app.globalData.config;
|
||||
|
||||
that.data.user = app.globalData.user;
|
||||
this.setData({
|
||||
screen_data: app.globalData.screen_data,
|
||||
StudentapartmentNew: app.globalData.StudentapartmentNew,
|
||||
listTab: app.globalData.listTab
|
||||
})
|
||||
this.get_content();
|
||||
this.getList();
|
||||
this.getgroupSearch();
|
||||
this.getLocationList();
|
||||
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
that.get_config()
|
||||
}, 200)
|
||||
}
|
||||
},
|
||||
|
||||
getgroupSearch() {
|
||||
var that = this;
|
||||
miucms.request(app.globalData.config.lists.groupsearch, {}).then(data => {
|
||||
this.setData({
|
||||
groupSearch: data.data
|
||||
}, function () {
|
||||
that.caclulatesearchIndex()
|
||||
})
|
||||
wx.hideLoading()
|
||||
|
||||
}).catch(res => {})
|
||||
},
|
||||
|
||||
// 是否选中关键词
|
||||
caclulatesearchIndex() {
|
||||
let groupSearch = this.data.groupSearch;
|
||||
let that = this;
|
||||
let searchindex = null;
|
||||
|
||||
for (let i = 0; i < groupSearch.length; i++) {
|
||||
let ishere = true;
|
||||
|
||||
for (let j in groupSearch[i].where) {
|
||||
let moreCondition = ['gender', 'leaseterm', 'publish'];
|
||||
let money = ['rent_min', 'rent_max'];
|
||||
if (moreCondition.indexOf(j) > -1) {
|
||||
if (j != 'publish') {
|
||||
if (groupSearch[i].where[j] * 1 != that.data.moreCondition.data[j] * 1) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (groupSearch[i].where[j] != that.data.moreCondition.data[j]) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (money.indexOf(j) > -1) {
|
||||
if (groupSearch[i].where[j] != that.data.money[j]) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else if (j == 'location') {
|
||||
if (groupSearch[i].where[j].sort().toString() != that.data[j].value.sort().toString()) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else if (j == 'type') {
|
||||
if (groupSearch[i].where[j] != that.data['types'].value) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (groupSearch[i].where[j] != that.data[j].value) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ishere) {
|
||||
searchindex = i;
|
||||
this.setData({
|
||||
selectGroupIndex: searchindex
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getList: function () {
|
||||
let that = this;
|
||||
|
||||
if (this.data.loading || this.data.page.next_page === 0) return false
|
||||
|
||||
this.setData({
|
||||
loading: true
|
||||
})
|
||||
|
||||
this.caclulatesearchIndex()
|
||||
var sendData = Object.assign({}, this.data.options, this.data.moreCondition.data, this.data.money, {
|
||||
session: wx.getStorageSync('session'),
|
||||
orderby: this.data.orderby.value,
|
||||
'type': this.data.types.value,
|
||||
location: that.data.location.value,
|
||||
school: that.data.school.value,
|
||||
// page: this.data.page,
|
||||
page: this.data.page.next_page,
|
||||
intermediarytype: 1,
|
||||
})
|
||||
|
||||
let isNewVersions = this.data.isNewVersions
|
||||
|
||||
let url = isNewVersions ? `${app.globalData.baseURL}/tenement/housingresources/lists` : app.globalData.config.studentapartment.quarantineLists
|
||||
|
||||
// miucms.request(app.globalData.config.studentapartment.quarantineLists, {
|
||||
// page: this.data.page.next_page
|
||||
// }).then(data => {
|
||||
// // miucms.request(app.globalData.baseURL + '/tenement/housingresources/lists', sendData).then(data => {
|
||||
miucms.request(url, sendData).then(data => {
|
||||
if (data.extraparam) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: data.message,
|
||||
})
|
||||
} else {
|
||||
if (isNewVersions) {
|
||||
data = data.data
|
||||
data.data.forEach(el => {
|
||||
console.log(el['verified']);
|
||||
el['intermediary_text'] = el['intermediary']
|
||||
})
|
||||
}
|
||||
|
||||
that.setData({
|
||||
data: that.data.data.concat(data.data),
|
||||
page: data.page,
|
||||
contact: data.contact,
|
||||
loading: false,
|
||||
isloding: false
|
||||
})
|
||||
}
|
||||
wx.hideLoading()
|
||||
|
||||
}).catch(res => {
|
||||
wx.hideLoading()
|
||||
this.setData({
|
||||
data: [],
|
||||
contact: {},
|
||||
loading: false,
|
||||
isloding: false
|
||||
})
|
||||
})
|
||||
info: {
|
||||
// subject: '寄托港校租房-14天房源'
|
||||
subject: `${ app.globalData.topTitle }-14天房源`
|
||||
},
|
||||
listTab: {},
|
||||
topTitle: "",
|
||||
groupSearch: [], //组合最热
|
||||
location: {
|
||||
value: [],
|
||||
data: null
|
||||
},
|
||||
types: {
|
||||
value: '',
|
||||
data: null
|
||||
}, //6.24删除
|
||||
money: {
|
||||
rent_min: 0,
|
||||
rent_max: ''
|
||||
},
|
||||
moreCondition: {
|
||||
show: false,
|
||||
data: {
|
||||
gender: "0",
|
||||
leaseterm: "0",
|
||||
publish: "twomonth",
|
||||
}
|
||||
},
|
||||
|
||||
school: {
|
||||
list: {},
|
||||
value: ''
|
||||
},
|
||||
|
||||
orderby: {
|
||||
value: 'timestamp',
|
||||
list: [{
|
||||
name: "最新发布",
|
||||
value: 'timestamp'
|
||||
},
|
||||
{
|
||||
name: "热门",
|
||||
value: 'hotnum'
|
||||
},
|
||||
{
|
||||
name: "价格从低到高",
|
||||
value: 'rentasc'
|
||||
},
|
||||
{
|
||||
name: "价格从高到低",
|
||||
value: 'rentdesc'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
selectGroupIndex: null,
|
||||
isNewVersions: true,
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
get_content: function () {
|
||||
let that = this;
|
||||
var sendData = Object.assign({}, this.data.options, {
|
||||
session: wx.getStorageSync('session'),
|
||||
|
||||
})
|
||||
miucms.request(app.globalData.config.studentapartment.quarantineBanner, {}).then(data => {
|
||||
wx.hideLoading()
|
||||
if (data.extraparam) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: data.message,
|
||||
})
|
||||
} else {
|
||||
|
||||
that.setData({
|
||||
imgUrls: data.data
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.get_config()
|
||||
this.setData({
|
||||
topTitle: app.globalData.topTitle
|
||||
})
|
||||
|
||||
}
|
||||
}).catch(res => {})
|
||||
this.getTopTitle()
|
||||
},
|
||||
|
||||
},
|
||||
copy(e) {
|
||||
loading
|
||||
const content = e.currentTarget.dataset.content;
|
||||
miucms.copy(content).then((res) => {
|
||||
console.log('res', res)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
getTopTitle() {
|
||||
miucms.getTopTitle(this, app)
|
||||
|
||||
},
|
||||
this.setData({
|
||||
[`info.subject`]: `${ app.globalData.topTitle }-14天房源`
|
||||
})
|
||||
},
|
||||
|
||||
// 提交更多
|
||||
myEventSelectSubmit(e) {
|
||||
this.setData({
|
||||
moreCondition: {
|
||||
show: false,
|
||||
data: e.detail
|
||||
},
|
||||
selectGroupIndex: null
|
||||
})
|
||||
this.hasMoreCondition()
|
||||
this.clear_data()
|
||||
},
|
||||
onPageScroll(e) {
|
||||
if (e.scrollTop > 1000 && !this.data.showTOTOP) {
|
||||
this.setData({
|
||||
showTOTOP: true
|
||||
})
|
||||
} else if (e.scrollTop < 1000 && this.data.showTOTOP) {
|
||||
this.setData({
|
||||
showTOTOP: false
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
this.setData({
|
||||
page: {
|
||||
next_page: 1
|
||||
},
|
||||
data: []
|
||||
})
|
||||
this.getList()
|
||||
wx.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
// 加载下一页
|
||||
|
||||
// 判断‘更多’是否加粗
|
||||
hasMoreCondition() {
|
||||
let hascondition = false;
|
||||
for (let i in this.data.moreCondition.data) {
|
||||
// 存在一个就加粗
|
||||
if (this.data.moreCondition.data[i] != 0) hascondition = true;
|
||||
}
|
||||
this.setData({
|
||||
hascondition,
|
||||
})
|
||||
},
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 租金条件筛选提交
|
||||
submitMoney(e) {
|
||||
this.data.money = Object.assign({}, e.detail);
|
||||
this.setData({
|
||||
selectGroupIndex: null,
|
||||
money: this.data.money
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
|
||||
// 提交排序
|
||||
submitOrderby(e) {
|
||||
this.data.orderby.value = e.detail.value;
|
||||
this.setData({
|
||||
orderby: this.data.orderby
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function (res) {
|
||||
// 来自页面内转发按钮
|
||||
if (res.from === 'button') var types = res.from === 'button' ? 'share_btn' : 'show';
|
||||
|
||||
// 选择热词
|
||||
selectGroup(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
let obj = this.data.groupSearch[index].where;
|
||||
let that = this;
|
||||
return {
|
||||
title: this.data.topTitle + '-' + this.data.listTab.quarantineLists,
|
||||
imageUrl: that.data.info.share_img,
|
||||
success: function (res) {
|
||||
miucms.share(app, types)
|
||||
},
|
||||
}
|
||||
|
||||
this.data.school.value = obj.school || ''; //学校
|
||||
this.data.location.value = Array.isArray(obj.location) ? [...obj.location] : []; //区域
|
||||
this.data.types.value = obj['type']; //出租方式
|
||||
this.data.money.rent_min = obj.rent_min;
|
||||
this.data.money.rent_max = obj.rent_max; //租金
|
||||
this.data.orderby.value = obj.orderby; //排序
|
||||
this.data.moreCondition.data = {
|
||||
gender: obj.gender,
|
||||
leaseterm: obj.leaseterm,
|
||||
publish: obj.publish,
|
||||
},
|
||||
get_config() {
|
||||
var that = this;
|
||||
if (app.globalData.config && app.globalData.config.lists) {
|
||||
|
||||
}
|
||||
this.setData({
|
||||
selectGroupIndex: index,
|
||||
school: this.data.school,
|
||||
location: this.data.location,
|
||||
types: this.data.types,
|
||||
money: this.data.money,
|
||||
orderby: this.data.orderby,
|
||||
moreCondition: this.data.moreCondition
|
||||
})
|
||||
this.hasMoreCondition()
|
||||
this.clear_data()
|
||||
},
|
||||
config = app.globalData.config;
|
||||
|
||||
// 清空数组
|
||||
clear_data: function () {
|
||||
this.setData({
|
||||
page: {
|
||||
next_page: 1
|
||||
},
|
||||
data: []
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
that.data.user = app.globalData.user;
|
||||
this.setData({
|
||||
screen_data: app.globalData.screen_data,
|
||||
StudentapartmentNew: app.globalData.StudentapartmentNew,
|
||||
listTab: app.globalData.listTab
|
||||
})
|
||||
this.get_content();
|
||||
this.getList();
|
||||
this.getgroupSearch();
|
||||
this.getLocationList();
|
||||
|
||||
// 获取地域列表
|
||||
getLocationList() {
|
||||
let that = this;
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
that.get_config()
|
||||
}, 200)
|
||||
}
|
||||
},
|
||||
|
||||
miucms.request(app.globalData.config.lists.region, {}).then(data => {
|
||||
this.data.location.data = data.data.location;
|
||||
this.data.types.data = data.data['type'];
|
||||
this.data.school.list = data.data.school
|
||||
that.setData({
|
||||
location: that.data.location,
|
||||
types: that.data.types,
|
||||
property: data.data.property,
|
||||
school: that.data.school
|
||||
})
|
||||
wx.hideLoading()
|
||||
getgroupSearch() {
|
||||
var that = this;
|
||||
miucms.request(app.globalData.config.lists.groupsearch, {}).then(data => {
|
||||
this.setData({
|
||||
groupSearch: data.data
|
||||
}, function () {
|
||||
that.caclulatesearchIndex()
|
||||
})
|
||||
wx.hideLoading()
|
||||
}).catch(res => {})
|
||||
},
|
||||
|
||||
}).catch(res => {})
|
||||
},
|
||||
// 是否选中关键词
|
||||
caclulatesearchIndex() {
|
||||
let groupSearch = this.data.groupSearch;
|
||||
let that = this;
|
||||
let searchindex = null;
|
||||
|
||||
// 提交出租方式
|
||||
submittype(e) {
|
||||
this.data.types.value = e.detail.data;
|
||||
this.setData({
|
||||
types: this.data.types,
|
||||
selectGroupIndex: null
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
for (let i = 0; i < groupSearch.length; i++) {
|
||||
let ishere = true;
|
||||
|
||||
// 提交区域
|
||||
submitarea(e) {
|
||||
let {
|
||||
school,
|
||||
location
|
||||
} = e.detail;
|
||||
this.data.school.value = school;
|
||||
this.data.location.value = location;
|
||||
this.setData({
|
||||
location: this.data.location,
|
||||
school: this.data.school,
|
||||
selectGroupIndex: null
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
for (let j in groupSearch[i].where) {
|
||||
let moreCondition = ['gender', 'leaseterm', 'publish'];
|
||||
let money = ['rent_min', 'rent_max'];
|
||||
if (moreCondition.indexOf(j) > -1) {
|
||||
if (j != 'publish') {
|
||||
if (groupSearch[i].where[j] * 1 != that.data.moreCondition.data[j] * 1) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (groupSearch[i].where[j] != that.data.moreCondition.data[j]) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (money.indexOf(j) > -1) {
|
||||
if (groupSearch[i].where[j] != that.data.money[j]) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else if (j == 'location') {
|
||||
if (groupSearch[i].where[j].sort().toString() != that.data[j].value.sort().toString()) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else if (j == 'type') {
|
||||
if (groupSearch[i].where[j] != that.data['types'].value) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (groupSearch[i].where[j] != that.data[j].value) {
|
||||
ishere = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ishere) {
|
||||
searchindex = i;
|
||||
this.setData({
|
||||
selectGroupIndex: searchindex
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getList: function () {
|
||||
let that = this;
|
||||
|
||||
if (this.data.loading || this.data.page.next_page === 0) return false
|
||||
|
||||
this.setData({
|
||||
loading: true
|
||||
})
|
||||
|
||||
this.caclulatesearchIndex()
|
||||
var sendData = Object.assign({}, this.data.options, this.data.moreCondition.data, this.data.money, {
|
||||
session: wx.getStorageSync('session'),
|
||||
orderby: this.data.orderby.value,
|
||||
'type': this.data.types.value,
|
||||
location: that.data.location.value,
|
||||
school: that.data.school.value,
|
||||
// page: this.data.page,
|
||||
page: this.data.page.next_page,
|
||||
intermediarytype: 1,
|
||||
})
|
||||
|
||||
let isNewVersions = this.data.isNewVersions
|
||||
|
||||
let url = isNewVersions ? `${app.globalData.baseURL}/tenement/housingresources/lists` : app.globalData.config.studentapartment.quarantineLists
|
||||
|
||||
// miucms.request(app.globalData.config.studentapartment.quarantineLists, {
|
||||
// page: this.data.page.next_page
|
||||
// }).then(data => {
|
||||
// // miucms.request(app.globalData.baseURL + '/tenement/housingresources/lists', sendData).then(data => {
|
||||
miucms.request(url, sendData).then(data => {
|
||||
if (data.extraparam) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: data.message,
|
||||
})
|
||||
} else {
|
||||
if (isNewVersions) {
|
||||
data = data.data
|
||||
data.data.forEach(el => {
|
||||
console.log(el['verified']);
|
||||
el['intermediary_text'] = el['intermediary']
|
||||
})
|
||||
}
|
||||
|
||||
that.setData({
|
||||
data: that.data.data.concat(data.data),
|
||||
page: data.page,
|
||||
contact: data.contact,
|
||||
loading: false,
|
||||
isloding: false
|
||||
})
|
||||
}
|
||||
wx.hideLoading()
|
||||
|
||||
}).catch(res => {
|
||||
wx.hideLoading()
|
||||
this.setData({
|
||||
loading: false,
|
||||
isloding: false
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
get_content: function () {
|
||||
let that = this;
|
||||
var sendData = Object.assign({}, this.data.options, {
|
||||
session: wx.getStorageSync('session'),
|
||||
|
||||
})
|
||||
miucms.request(app.globalData.config.studentapartment.quarantineBanner).then(data => {
|
||||
wx.hideLoading()
|
||||
if (data.extraparam) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: data.message,
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
imgUrls: data.data
|
||||
})
|
||||
}
|
||||
}).catch(res => {})
|
||||
|
||||
},
|
||||
copy(e) {
|
||||
loading
|
||||
const content = e.currentTarget.dataset.content;
|
||||
miucms.copy(content).then((res) => {
|
||||
console.log('res', res)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 提交更多
|
||||
myEventSelectSubmit(e) {
|
||||
this.setData({
|
||||
moreCondition: {
|
||||
show: false,
|
||||
data: e.detail
|
||||
},
|
||||
selectGroupIndex: null
|
||||
})
|
||||
this.hasMoreCondition()
|
||||
this.clear_data()
|
||||
},
|
||||
|
||||
// 判断‘更多’是否加粗
|
||||
hasMoreCondition() {
|
||||
let hascondition = false;
|
||||
for (let i in this.data.moreCondition.data) {
|
||||
// 存在一个就加粗
|
||||
if (this.data.moreCondition.data[i] != 0) hascondition = true;
|
||||
}
|
||||
this.setData({
|
||||
hascondition,
|
||||
})
|
||||
},
|
||||
|
||||
// 租金条件筛选提交
|
||||
submitMoney(e) {
|
||||
this.data.money = Object.assign({}, e.detail);
|
||||
this.setData({
|
||||
selectGroupIndex: null,
|
||||
money: this.data.money
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
|
||||
// 提交排序
|
||||
submitOrderby(e) {
|
||||
this.data.orderby.value = e.detail.value;
|
||||
this.setData({
|
||||
orderby: this.data.orderby
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
|
||||
// 选择热词
|
||||
selectGroup(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
let obj = this.data.groupSearch[index].where;
|
||||
|
||||
this.data.school.value = obj.school || ''; //学校
|
||||
this.data.location.value = Array.isArray(obj.location) ? [...obj.location] : []; //区域
|
||||
this.data.types.value = obj['type']; //出租方式
|
||||
this.data.money.rent_min = obj.rent_min;
|
||||
this.data.money.rent_max = obj.rent_max; //租金
|
||||
this.data.orderby.value = obj.orderby; //排序
|
||||
this.data.moreCondition.data = {
|
||||
gender: obj.gender,
|
||||
leaseterm: obj.leaseterm,
|
||||
publish: obj.publish,
|
||||
|
||||
}
|
||||
this.setData({
|
||||
selectGroupIndex: index,
|
||||
school: this.data.school,
|
||||
location: this.data.location,
|
||||
types: this.data.types,
|
||||
money: this.data.money,
|
||||
orderby: this.data.orderby,
|
||||
moreCondition: this.data.moreCondition
|
||||
})
|
||||
this.hasMoreCondition()
|
||||
this.clear_data()
|
||||
},
|
||||
|
||||
// 清空数组
|
||||
clear_data: function () {
|
||||
this.setData({
|
||||
page: {
|
||||
next_page: 1
|
||||
},
|
||||
data: []
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 获取地域列表
|
||||
getLocationList() {
|
||||
let that = this;
|
||||
|
||||
miucms.request(app.globalData.config.lists.region, {}).then(data => {
|
||||
this.data.location.data = data.data.location;
|
||||
this.data.types.data = data.data['type'];
|
||||
this.data.school.list = data.data.school
|
||||
that.setData({
|
||||
location: that.data.location,
|
||||
types: that.data.types,
|
||||
property: data.data.property,
|
||||
school: that.data.school
|
||||
})
|
||||
wx.hideLoading()
|
||||
|
||||
}).catch(res => {})
|
||||
},
|
||||
|
||||
// 提交出租方式
|
||||
submittype(e) {
|
||||
this.data.types.value = e.detail.data;
|
||||
this.setData({
|
||||
types: this.data.types,
|
||||
selectGroupIndex: null
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
|
||||
// 提交区域
|
||||
submitarea(e) {
|
||||
let {
|
||||
school,
|
||||
location
|
||||
} = e.detail;
|
||||
this.data.school.value = school;
|
||||
this.data.location.value = location;
|
||||
this.setData({
|
||||
location: this.data.location,
|
||||
school: this.data.school,
|
||||
selectGroupIndex: null
|
||||
})
|
||||
this.clear_data()
|
||||
},
|
||||
|
||||
|
||||
})
|
@ -507,7 +507,7 @@ Page({
|
||||
if (user['uid']) {
|
||||
if (!user['nickname']) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/setAvatarNickname/setAvatarNickname',
|
||||
url: '/pagesLoginRequired/pages/setAvatarNickname/setAvatarNickname',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -614,6 +614,8 @@ Page({
|
||||
operationstype: operationstypeObj[tab]
|
||||
})
|
||||
|
||||
console.log("operationstype", this.data.operationstype);
|
||||
|
||||
if (this.data.isUpdateData) { // 处理筛选后并切换tab 是需要刷新数据
|
||||
let obj = {
|
||||
count: 0,
|
||||
|
@ -3,7 +3,20 @@
|
||||
<to-top wx:if="{{ showTOTOP }}"></to-top>
|
||||
<header-nav bgcolor="rgba(246, 246, 246, 1)" notShowIndex="{{ true }}" inner-text="Some text">搜索</header-nav>
|
||||
|
||||
<template is="header-search" data="{{ focus,kw,isNeedMap: true }}"></template>
|
||||
<!-- <template is="header-search" data="{{ focus,kw,isNeedMap: true }}"></template> -->
|
||||
<view class='header-search flexacenter'>
|
||||
<form class="flexacenter" bindsubmit="submit" report-submit='true' data-types="confirm">
|
||||
<image class="search-icon" src="../../img/search-icon.svg"></image>
|
||||
<input disabled="{{ disabled }}" placeholder='搜索房源或输入房源ID' placeholder-class='placeholder' confirm-type='search' value='{{ kw }}' bindinput='input' bindconfirm='submit' focus="{{ focus }}"></input>
|
||||
<view class="clear" bindtap="clearKW" hidden="{{ kw.length==0 }}">
|
||||
<image class="clear-icon" src="/img/gray-cross.png"></image>
|
||||
</view>
|
||||
</form>
|
||||
<view class="map-btn flexcenter">
|
||||
<image class="map-btn-icon" mode="widthFix" src="/img/map-icon.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-initial" wx:if="{{ !search }}">
|
||||
<view class='keywords history' wx:if="{{ log.length>0 }}">
|
||||
<view class='name'>
|
||||
|
@ -358,4 +358,74 @@ button:hover {
|
||||
.search-initial {
|
||||
background-color: #fff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.header-search {
|
||||
padding: 20rpx 30rpx 48rpx;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.header-search form {
|
||||
background: #fff;
|
||||
width: 588rpx;
|
||||
flex: 1;
|
||||
height: 84rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
color: #333;
|
||||
position: relative;
|
||||
border-radius: 306rpx;
|
||||
box-shadow: 0 0 12rpx rgba(0, 0, 0, 0.0784313725490196);
|
||||
}
|
||||
|
||||
.header-search .search-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
.header-search input {
|
||||
display: inline-flex;
|
||||
height: 84rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.header-search .clear {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
padding: 30rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.header-search .clear .clear-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
/* .header-search navigator {
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
width: 80rpx;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
} */
|
||||
|
||||
.header-search .map-btn {
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
border-radius: 232.5rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 12rpx rgba(0, 0, 0, 0.0784313725490196);
|
||||
margin-left: 19.5rpx;
|
||||
}
|
||||
|
||||
.header-search .map-btn .map-btn-icon {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
}
|
@ -80,11 +80,11 @@
|
||||
<!-- 图片和视频 -->
|
||||
<view class="media-box" wx:if="{{ (info.video && info.video.length != 0) || (info.picturegroup && info.picturegroup.length != 0) }}">
|
||||
<view class="housing-information-media-top flexacenter">
|
||||
<block wx:if="{{ info.video }}">
|
||||
<block wx:if="{{ info.video && info.video.length != 0 }}">
|
||||
<image class="housing-information-media-icon1" src="/img/u1737.png" mode="widthFix"></image>
|
||||
<view class="housing-information-media-quantity flexcenter">{{ info.video.length }}</view>
|
||||
</block>
|
||||
<block wx:if="{{ info.picturegroup }}">
|
||||
<block wx:if="{{ info.picturegroup && info.picturegroup.length != 0 }}">
|
||||
<image class="housing-information-media-icon" src="/img/u1738.png" mode="widthFix"></image>
|
||||
<view class="housing-information-media-quantity flexcenter">{{ info.picturegroup.length }}</view>
|
||||
</block>
|
||||
@ -227,8 +227,8 @@
|
||||
<view class="pinterest-list flexflex">
|
||||
<view id="pinterest-list-left" class="pinterest-list-left flex1">
|
||||
<block wx:for="{{ listDataLeft }}" wx:key="index">
|
||||
<template wx:if="{{item.typee == 'adv'}}" is="adv" data="{{ item }}"></template>
|
||||
<template wx:elif="{{item.typee == 'apartment'}}" is="apartment" data="{{ item }}"></template>
|
||||
<template wx:if="{{item.type == 'adv'}}" is="adv" data="{{ item }}"></template>
|
||||
<template wx:elif="{{item.type == 'apartment'}}" is="apartment" data="{{ item }}"></template>
|
||||
<template wx:else is="general" data="{{ item }}"></template>
|
||||
</block>
|
||||
</view>
|
||||
|
@ -170,7 +170,7 @@ Page({
|
||||
|
||||
this.getTopTitle()
|
||||
|
||||
this.get_config();
|
||||
this.get_config()
|
||||
this.getNoticeNumber()
|
||||
|
||||
app.globalData['langs'] ? this.data.langs = app.globalData['langs'] : this.getDtailsLangs()
|
||||
@ -279,36 +279,58 @@ Page({
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
let tab = this.data.tab;
|
||||
if (!app.globalData.config.lists) {
|
||||
wx.stopPullDownRefresh();
|
||||
return false
|
||||
}
|
||||
|
||||
if (tab == 'fav') {
|
||||
this.setData({
|
||||
fav_page: {
|
||||
next_page: 1
|
||||
},
|
||||
fav_list: []
|
||||
})
|
||||
} else if (tab == 'message') {
|
||||
this.setData({
|
||||
message_page: {
|
||||
next_page: 1
|
||||
},
|
||||
message_list: [],
|
||||
})
|
||||
} else if (tab == 'publish') {
|
||||
this.setData({
|
||||
publish_page: {
|
||||
next_page: 1
|
||||
},
|
||||
publish_list: []
|
||||
})
|
||||
}
|
||||
|
||||
this['get_' + this.data.tab]();
|
||||
let isNewVersions = this.data.isNewVersions
|
||||
wx.stopPullDownRefresh();
|
||||
|
||||
if (!app.globalData.config.lists) return false
|
||||
|
||||
if (isNewVersions) {
|
||||
if (this.data.tab == 'fav') {
|
||||
this.setData({
|
||||
fav: {
|
||||
page: 1,
|
||||
count: 0,
|
||||
data: []
|
||||
}
|
||||
})
|
||||
this.getFavData()
|
||||
} else {
|
||||
this.setData({
|
||||
publish: {
|
||||
page: 1,
|
||||
count: 0,
|
||||
data: []
|
||||
}
|
||||
})
|
||||
this.getPublishData()
|
||||
}
|
||||
} else {
|
||||
if (tab == 'fav') {
|
||||
this.setData({
|
||||
fav_page: {
|
||||
next_page: 1
|
||||
},
|
||||
fav_list: []
|
||||
})
|
||||
} else if (tab == 'message') {
|
||||
this.setData({
|
||||
message_page: {
|
||||
next_page: 1
|
||||
},
|
||||
message_list: [],
|
||||
})
|
||||
} else if (tab == 'publish') {
|
||||
this.setData({
|
||||
publish_page: {
|
||||
next_page: 1
|
||||
},
|
||||
publish_list: []
|
||||
})
|
||||
}
|
||||
|
||||
this['get_' + this.data.tab]();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@ -316,13 +338,14 @@ Page({
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
if (!app.globalData.config.lists) return false
|
||||
|
||||
let isNewVersions = this.data.isNewVersions
|
||||
if (this.data.tab == 'fav') {
|
||||
this.get_fav()
|
||||
this.getFavData()
|
||||
isNewVersions ? this.getFavData() : this.get_fav()
|
||||
|
||||
} else if (this.data.tab == 'publish') {
|
||||
this.get_publish()
|
||||
this.getPublishData()
|
||||
isNewVersions ? this.getPublishData() : this.get_publish()
|
||||
// this.get_publish()
|
||||
// this.getPublishData()
|
||||
} else {
|
||||
this.get_message();
|
||||
}
|
||||
@ -720,10 +743,19 @@ Page({
|
||||
})
|
||||
},
|
||||
change_item_status: function (e) {
|
||||
let uniqid = e.currentTarget.dataset.uniqid || e.detail.uniqid;
|
||||
let token = e.currentTarget.dataset.token || e.detail.token;
|
||||
let index = e.currentTarget.dataset.index || e.detail.index;
|
||||
let status = e.currentTarget.dataset.status || e.detail.status;
|
||||
let uniqid, token, index, status
|
||||
|
||||
if (this.data.isNewVersions) {
|
||||
uniqid = e.detail.uniqid;
|
||||
token = e.detail.token;
|
||||
index = e.detail.index;
|
||||
status = e.detail.status;
|
||||
} else {
|
||||
uniqid = e.currentTarget.dataset.uniqid
|
||||
token = e.currentTarget.dataset.token
|
||||
index = e.currentTarget.dataset.index
|
||||
status = e.currentTarget.dataset.status
|
||||
}
|
||||
this.setData({
|
||||
chage_status_obj: {
|
||||
show: true,
|
||||
@ -733,7 +765,9 @@ Page({
|
||||
status
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
change_status: function () {
|
||||
var that = this;
|
||||
wx.showLoading({
|
||||
@ -744,13 +778,27 @@ Page({
|
||||
uniqid: that.data.chage_status_obj.uniqid,
|
||||
status: that.data.chage_status_obj.status == 1 ? 2 : 1
|
||||
}).then(data => {
|
||||
// if (data.extraparam.mode == 'right') {
|
||||
if (data.code == 200) {
|
||||
// 成功
|
||||
that.data.chage_status_obj.show = false;
|
||||
if (this.data.isNewVersions) {
|
||||
this.data.publish.data[that.data.chage_status_obj.index].status = data.data.status;
|
||||
let status = that.data.chage_status_obj.status
|
||||
let stat = this.data.stat
|
||||
console.log("newStatus", newStatus);
|
||||
|
||||
if (status == 1) stat['listing']--
|
||||
else if (status == 0) stat['draft']--
|
||||
else stat['offshelf']--
|
||||
|
||||
let newStatus = data.data.status
|
||||
console.log("newStatus", newStatus);
|
||||
if (newStatus == 1) stat['listing']++
|
||||
else if (newStatus == 0) stat['draft']++
|
||||
else stat['offshelf']++
|
||||
|
||||
this.data.publish.data[that.data.chage_status_obj.index].status = newStatus
|
||||
this.setData({
|
||||
stat,
|
||||
publish: this.data.publish,
|
||||
chage_status_obj: this.data.chage_status_obj
|
||||
})
|
||||
@ -761,7 +809,6 @@ Page({
|
||||
chage_status_obj: that.data.chage_status_obj
|
||||
})
|
||||
}
|
||||
|
||||
wx.showToast({
|
||||
title: data.message,
|
||||
})
|
||||
@ -795,17 +842,26 @@ Page({
|
||||
},
|
||||
// 点击顶上去
|
||||
bindtopUp(e) {
|
||||
let token = e.currentTarget.dataset.token || e.detail.token
|
||||
let index = e.currentTarget.dataset.index || e.detail.index
|
||||
let isding = e.currentTarget.dataset.isding || e.detail.isding
|
||||
console.log("isding", isding);
|
||||
let token, index, isding
|
||||
|
||||
if (this.data.isNewVersions) {
|
||||
token = e.detail.token
|
||||
index = e.detail.index
|
||||
isding = e.detail.isding
|
||||
} else {
|
||||
token = e.currentTarget.dataset.token
|
||||
index = e.currentTarget.dataset.index
|
||||
isding = e.currentTarget.dataset.isding
|
||||
}
|
||||
|
||||
if (isding == 1) {
|
||||
this.setData({
|
||||
raisePopupMessage: "今天已顶过啦,明天再来吧!",
|
||||
raisePopupState: true,
|
||||
isdingState: 1
|
||||
isdingState: 0
|
||||
})
|
||||
setTimeout(() => {
|
||||
return
|
||||
this.setData({
|
||||
raisePopupState: false,
|
||||
})
|
||||
@ -815,7 +871,6 @@ Page({
|
||||
})
|
||||
}, 500)
|
||||
}, 1500)
|
||||
|
||||
return
|
||||
}
|
||||
miucms.request(app.globalData.baseURL + "/tenement/post/ding", {
|
||||
@ -967,7 +1022,7 @@ Page({
|
||||
// 跳转修改头像和昵称页面
|
||||
goSetAvatarNickname() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/setAvatarNickname/setAvatarNickname',
|
||||
url: '/pagesLoginRequired/pages/setAvatarNickname/setAvatarNickname',
|
||||
})
|
||||
},
|
||||
|
||||
@ -1058,6 +1113,7 @@ Page({
|
||||
}).then(res => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
// data.data[0]['verified'] = 1
|
||||
this.handleDetailData(data.data)
|
||||
|
||||
let stat = data.stat
|
||||
|
@ -59,14 +59,17 @@
|
||||
<view class="list-new-top flexflex">
|
||||
<view class="list-new-top-bg"></view>
|
||||
<view class="list-new-top-item flexflex {{ tab == 'fav' ? 'selected' : '' }}" bindtap="cutTab" data-type="fav">
|
||||
<image wx:if="{{ tab == 'fav' }}" class="list-new-top-icon list-new-top-icon-selected" mode="widthFix" src="/img/user-collect-selected.png"></image>
|
||||
<image wx:else class="list-new-top-icon" mode="widthFix" src="/img/user-collect-unselected.svg"></image>
|
||||
收藏
|
||||
<view class="flexacenter">
|
||||
<image wx:if="{{ tab == 'fav' }}" class="list-new-top-icon list-new-top-icon-selected" mode="widthFix" src="/img/user-collect-selected.png"></image>
|
||||
<image wx:else class="list-new-top-icon" mode="widthFix" src="/img/user-collect-unselected.svg"></image>收藏
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="list-new-top-item flexflex {{ tab == 'publish' ? 'selected selectedpublish' : '' }}" bindtap="cutTab" data-type="publish">
|
||||
<image wx:if="{{ tab == 'publish' }}" class="list-new-top-icon list-new-top-icon-selected" mode="widthFix" src="/img/user-issue-selected.png"></image>
|
||||
<image wx:else class="list-new-top-icon" mode="widthFix" src="/img/user-issue-unselected.svg"></image>
|
||||
发布
|
||||
<view class="flexacenter">
|
||||
<image wx:if="{{ tab == 'publish' }}" class="list-new-top-icon list-new-top-icon-selected" mode="widthFix" src="/img/user-issue-selected.png"></image>
|
||||
<image wx:else class="list-new-top-icon" mode="widthFix" src="/img/user-issue-unselected.svg"></image>发布
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -401,11 +404,9 @@
|
||||
|
||||
<!-- 顶上去升起弹出框 -->
|
||||
<view class="raise-popup {{ raisePopupState ? 'raisePopup' : ''}}">
|
||||
<image class="raise-popup-icon" src="/img/u458.svg" mode="heightFix" wx:if="{{ isdingState != 1}}"></image> <text>{{ raisePopupMessage }}</text>
|
||||
<image class="raise-popup-icon" src="/img/u458.svg" mode="heightFix" wx:if="{{ isdingState != 1 }}"></image> <text>{{ raisePopupMessage }}</text>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view style="position: relative;z-index: 1001;">
|
||||
<announcement-popup interface='my' init="{{ initState }}"></announcement-popup>
|
||||
</view>
|
||||
|
@ -706,7 +706,8 @@
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
display: inline-table;
|
||||
/* display: inline-table; */
|
||||
display: table;
|
||||
align-items: center;
|
||||
box-shadow: 0px 0px 10px rgb(0 0 0 / 35%);
|
||||
background-color: #eff7ff;
|
||||
@ -714,21 +715,21 @@
|
||||
position: fixed;
|
||||
bottom: -90rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
/* transform: translateY(20px); */
|
||||
transition: all .5s linear;
|
||||
transform: translateX(-50%);
|
||||
z-index: 100;
|
||||
/* width: fit-content; */
|
||||
}
|
||||
|
||||
.raise-popup .raise-popup-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
vertical-align: text-bottom;
|
||||
vertical-align: middle;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.container .raisePopup {
|
||||
bottom: 200rpx;
|
||||
transition: all .5s linear;
|
||||
}
|
||||
|
||||
.NavBar {
|
||||
@ -977,8 +978,8 @@
|
||||
.list-new .list-new-top .selected.list-new-top-item::after {
|
||||
content: "";
|
||||
background-color: #f6f6f6;
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
@ -993,7 +994,7 @@
|
||||
background-color: rgba(98, 177, 255, 1);
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 2rpx;
|
||||
bottom: 1rpx;
|
||||
transform: translateX(100%);
|
||||
z-index: 111;
|
||||
}
|
||||
@ -1001,20 +1002,21 @@
|
||||
.list-new .list-new-top .selectedpublish.list-new-top-item::after {
|
||||
left: 0;
|
||||
right: none;
|
||||
transform: translateX(-99%);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
.list-new .list-new-top .selectedpublish.list-new-top-item::before {
|
||||
border-radius: 0 0 100% 0;
|
||||
left: 0;
|
||||
right: none;
|
||||
/* transform: translateX(-100%); */
|
||||
transform: translateX(-99%);
|
||||
}
|
||||
|
||||
.list-new .list-new-top .list-new-top-item {
|
||||
position: relative;
|
||||
width: 376rpx;
|
||||
height: 88rpx;
|
||||
/* height: 88rpx; */
|
||||
box-shadow: 0 -6rpx 6rpx rgba(0, 0, 0, 0.0284313725490196);
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
@ -1023,13 +1025,14 @@
|
||||
}
|
||||
|
||||
.list-new .list-new-top .list-new-top-item.selected {
|
||||
height: 96rpx;
|
||||
height: 97rpx;
|
||||
background-color: #f6f6f6;
|
||||
color: #000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 650;
|
||||
border-radius: 0 34rpx 0 0;
|
||||
box-shadow: 6rpx -6rpx 6rpx rgba(0, 0, 0, 0.0284313725490196);
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.list-new .list-new-top .list-new-top-item.selectedpublish {
|
||||
|
@ -1,5 +1,6 @@
|
||||
// var miucms = require('../../utils/miucms.js');
|
||||
var miucms = require('/utils/miucms');
|
||||
// var miucms = require('/utils/miucms');
|
||||
var miucms = require('../../../utils/miucms');
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -5,7 +5,8 @@
|
||||
<view class="left">头像</view>
|
||||
<view class="right">
|
||||
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
|
||||
<image class="head" src="{{ avatarUrl || '../../img/defaultAvatar.png' }}"></image>
|
||||
<!-- <image class="head" src="{{ avatarUrl || '../../img/defaultAvatar.png' }}"></image> -->
|
||||
<image class="head" src="{{ avatarUrl || '/img/defaultAvatar.png' }}"></image>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
@ -13,7 +14,6 @@
|
||||
<view class="left">昵称</view>
|
||||
<view class="right">
|
||||
<input type="nickname" class="nickname" model:value="{{ nickname }}" maxlength="50" bindinput="nicknameinput" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -19,7 +19,10 @@ Component({
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
bgColorObj: {
|
||||
1: "#50e3c2",
|
||||
6: "#62b1ff"
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!--template/commonList/commonList.wxml-->
|
||||
<view class="item" bindtap="goShow" data-status="{{ item.status }}" data-uniqid="{{ item.uniqid }}">
|
||||
<view class="top-right-corner">
|
||||
<view class="top-right-corner" style="background: {{ bgColorObj[item.intermediary] }};">
|
||||
<view class="top-right-corner-content"></view>
|
||||
</view>
|
||||
<view class="head flexacenter" wx:if="{{ item.verified == 1 }}">
|
||||
@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
<view class="title-hint" wx:if="{{ stateData.text }}">{{ stateData.text }}</view> {{ item.subject || '暂无标题' }}
|
||||
<view class="title-hint" wx:if="{{ item.verifiedstatus == 1 }}">认证审核中</view><view class="title-hint" wx:if="{{ stateData.text }}">{{ stateData.text }}</view> {{ item.subject || '暂无标题' }}
|
||||
</view>
|
||||
<view class="information flexacenter">
|
||||
<view class="left">
|
||||
|
@ -90,7 +90,7 @@
|
||||
|
||||
.price-section {
|
||||
color: #555555;
|
||||
margin-top: 20rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
|
||||
.tab-list {
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tab-list .tab-item {
|
||||
|
@ -92,7 +92,7 @@ Component({
|
||||
if (user['uid']) {
|
||||
if (!user['nickname']) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/setAvatarNickname/setAvatarNickname',
|
||||
url: '/pagesLoginRequired/pages/setAvatarNickname/setAvatarNickname',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -183,7 +183,6 @@ Component({
|
||||
// console.log(this.data.heightArr)
|
||||
},
|
||||
send_form_id: function (e) {
|
||||
console.log(e);
|
||||
let {
|
||||
statid,
|
||||
url,
|
||||
|
@ -14,13 +14,13 @@ Component({
|
||||
haveSearch: Boolean,
|
||||
customBack: Boolean,
|
||||
isMessageCount: Boolean,
|
||||
unreadMessages: Number,
|
||||
isMessage: Boolean,
|
||||
topImage: Boolean,
|
||||
unreadMessages: Number,
|
||||
bgcolor: String,
|
||||
position: String, // css 定位方式
|
||||
topImage: Boolean,
|
||||
headerSrc: String,
|
||||
backSrc: String
|
||||
backSrc: String,
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,8 @@
|
||||
<image class="NavBar-BackIcon" src="{{ backSrc || '/img/Back.svg'}}"></image>
|
||||
</view>
|
||||
<view bindtap="backHome" wx:if="{{ !notShowIndex }}" class='Btn'>
|
||||
<image class="NavBar-HomeIcon backToHome" mode="widthFix" src="../../img/u1657.png"></image>
|
||||
<!-- <image class="NavBar-HomeIcon backToHome" mode="widthFix" src="../../img/u1657.png"></image> -->
|
||||
<image class="NavBar-HomeIcon backToHome" mode="widthFix" src="/img/area-icon.png"></image>
|
||||
</view>
|
||||
<navigator url='../search/search' class='Btn search-btn' hover-class='hover' wx:if="{{ haveSearch }}">
|
||||
<!-- <image class='searchbtn' src="../../img/searchbtn-3.png" /> -->
|
||||
|
@ -17,8 +17,7 @@ Component({
|
||||
let conditionAllConfig = this.data.conditionAllConfig
|
||||
let key = res
|
||||
let moreOtherKey = this.data.moreOtherKey
|
||||
if (res == "personhousing" || res == 'intermediaryhousing ' || res == "askinghousing") key = "housing"
|
||||
|
||||
if (res == "personhousing" || res == 'intermediaryhousing' || res == "askinghousing") key = "housing"
|
||||
let obj = {}
|
||||
if (res == "askinghousing") obj['isindependentsuite'] = '独立套房'
|
||||
else if (res == "personhousing") obj['isverified'] = '认证房源'
|
||||
@ -375,6 +374,7 @@ Component({
|
||||
|
||||
let areaPitchValueOne = this.data.areaPitchValueOne
|
||||
let areaPitchValueTwo = this.data.areaPitchValueTwo
|
||||
console.log(areaPitchValueOne, "areaPitchValueOne");
|
||||
let areaData = this.data.areaData
|
||||
|
||||
if (type == "reset") {
|
||||
@ -387,16 +387,23 @@ Component({
|
||||
} else {
|
||||
let location = []
|
||||
|
||||
if (!areaPitchValueTwo[0]) { // 选择二级的
|
||||
|
||||
if (areaPitchValueOne == 0) {} else if (!areaPitchValueTwo[0]) { // 选择二级的
|
||||
for (const key in areaPitchValueTwo) {
|
||||
if (areaPitchValueTwo[key]) location.push(key)
|
||||
}
|
||||
} else location.push(areaPitchValueOne) // 选择一级的
|
||||
conditionObj[conditionState]['valueText'] = `${ (areaData[areaPitchValueOne] && areaData[areaPitchValueOne].title) || '港岛' }/...`
|
||||
|
||||
if (areaPitchValueOne == 0) conditionObj[conditionState]['valueText'] = null
|
||||
else {
|
||||
conditionObj[conditionState]['valueText'] = `${ (areaData[areaPitchValueOne] && areaData[areaPitchValueOne].title) || '港岛' }/...`
|
||||
}
|
||||
|
||||
this.setData({
|
||||
conditionState: "",
|
||||
conditionObj,
|
||||
})
|
||||
console.log("location0000", location);
|
||||
this.triggerEvent("submit", {
|
||||
type: conditionState,
|
||||
school: "",
|
||||
@ -465,6 +472,7 @@ Component({
|
||||
if (value != 0) conditionObj[conditionState]['valueText'] = `${text}/...`
|
||||
else conditionObj[conditionState]['valueText'] = ""
|
||||
|
||||
console.log(value, "value");
|
||||
this.triggerEvent("submit", {
|
||||
types: value,
|
||||
type: conditionState
|
||||
|
@ -50,6 +50,7 @@ Component({
|
||||
|
||||
// 新 轮播图 点击事件
|
||||
handleSwiper(e) {
|
||||
console.log("ee", e);
|
||||
let {
|
||||
appid,
|
||||
url,
|
||||
@ -57,13 +58,13 @@ Component({
|
||||
finderusername,
|
||||
feedid,
|
||||
type,
|
||||
advertisingtype,
|
||||
advtype,
|
||||
} = e.currentTarget.dataset
|
||||
|
||||
let requestUrl = app.globalData.config.FormidInsert
|
||||
miucms.request(requestUrl, {
|
||||
statid
|
||||
statid,
|
||||
formid: e.detail.formId
|
||||
}).then(res => {})
|
||||
|
||||
// 跳转视频号
|
||||
|
@ -4,7 +4,10 @@
|
||||
<swiper class='headSwiper-swiper' current="{{ swiperCurrent }}" autoplay="{{ true }}" circular interval="{{ 3000 }}" duration="{{ 500 }}" bindanimationfinish="bindchangeSwiper" style="height: {{ HeadSwiperHeight + 5 }}px;">
|
||||
<block wx:for="{{ data }}" wx:key="index">
|
||||
<swiper-item>
|
||||
<image class="headSwiper-img" mode="widthFix" bindtap="handleSwiper" data-type="{{ item.type }}" data-appid="{{ item.appid }}" data-url="{{ item.url }}" data-finderUserName="{{ item.finderUserName }}" data-feedId="{{ item.feedId }}" src="{{ item.imageurl }}" bindload="loadHeadSwiper"></image>
|
||||
<form class="form" bindsubmit="handleSwiper" report-submit='true' data-types="confirm" data-type="{{ item.type }}" data-appid="{{ item.appid }}" data-url="{{ item.url }}" data-statid="{{ item.statid }}" data-finderUserName="{{ item.finderUserName }}" data-feedId="{{ item.feedId }}">
|
||||
<image class="headSwiper-img" mode="widthFix" src="{{ item.imageurl || item.image }}" bindload="loadHeadSwiper"></image>
|
||||
<button form-type="submit" hover-class="none" type="default" size="mini"></button>
|
||||
</form>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* template/xinHeadSwiper/xinHeadSwiper.wxss */
|
||||
|
||||
@import '/app.wxss';
|
||||
|
||||
.headSwiper-swiper {
|
||||
position: relative;
|
||||
}
|
||||
@ -44,4 +45,27 @@
|
||||
.headSwiper .indication-point .indication-point-item.pitch {
|
||||
border: none;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.form {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.form button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.form button::after {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user