Compare commits
2 Commits
5b4f51aeae
...
e4933d7eca
Author | SHA1 | Date | |
---|---|---|---|
|
e4933d7eca | ||
|
4e0e1a35f5 |
1
app.json
@ -17,7 +17,6 @@
|
||||
"pages/irentForm/irentForm",
|
||||
"pages/show/show",
|
||||
"pages/video_show/video_show",
|
||||
"pages/textarea/textarea",
|
||||
"pages/share/share",
|
||||
"pages/login/index",
|
||||
"pages/messageCenter/messageCenter",
|
||||
|
3
app.wxss
@ -284,9 +284,6 @@ view {
|
||||
}
|
||||
|
||||
.info-list .agent {
|
||||
/* position: absolute;
|
||||
right: 0;
|
||||
bottom: 0; */
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
background: #f2f2f2;
|
||||
|
BIN
img/circle-arrow.png
Normal file
After Width: | Height: | Size: 994 B |
BIN
img/kitchen.png
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 3.7 KiB |
BIN
img/map.png
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 1.6 KiB |
BIN
img/quyu.png
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 3.8 KiB |
BIN
img/reset-btn.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
img/toilet.png
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.5 KiB |
@ -970,138 +970,7 @@ Page({
|
||||
},
|
||||
|
||||
issubmit: false,
|
||||
// 提交第二步
|
||||
submit2: function (e) {
|
||||
let that = this;
|
||||
if (this.issubmit) {
|
||||
wx.showToast({
|
||||
title: '请勿重复提交~',
|
||||
icon: 'none'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
|
||||
this.issubmit = true;
|
||||
let images = []
|
||||
let status = e.currentTarget.dataset.status;
|
||||
wx.showLoading({
|
||||
title: '提交中...',
|
||||
})
|
||||
if (that.data.imgs.length > 0) {
|
||||
for (let i = 0; i < that.data.imgs.length; i++) {
|
||||
images.push(that.data.imgs[i].aid)
|
||||
}
|
||||
}
|
||||
|
||||
let info = {
|
||||
images,
|
||||
point: []
|
||||
}
|
||||
if (this.data.latitude) {
|
||||
info['point'] = [this.data.latitude, this.data.longitude]
|
||||
} else {
|
||||
info['point'] = []
|
||||
}
|
||||
for (let i in this.data.info) {
|
||||
info[i] = this.data.info[i].value
|
||||
}
|
||||
info['school'] = this.data.aroundSchoolList;
|
||||
miucms.request(app.globalData.config.post.submit, {
|
||||
session: wx.getStorageSync('session'),
|
||||
info: info,
|
||||
token: that.data.token,
|
||||
uniqid: that.data.uniqid,
|
||||
type: that.data.types == 'edit1' ? 'plus' : that.data.types,
|
||||
status: status,
|
||||
|
||||
}).then(data => {
|
||||
this.issubmit = false;
|
||||
wx.hideLoading()
|
||||
if (data.extraparam && data.extraparam.mode == 'right') {
|
||||
// 提交成功
|
||||
|
||||
wx.showToast({
|
||||
title: data.message,
|
||||
})
|
||||
|
||||
if (status == 0) {
|
||||
// 只是保存
|
||||
wx.redirectTo({
|
||||
url: '/pages/user/user?tab=publish'
|
||||
})
|
||||
|
||||
} else {
|
||||
wx.redirectTo({
|
||||
url: '/pages/show/show?uniqid=' + data.data.uniqid,
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: data.errMsg || data.message,
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}).catch(res => {
|
||||
this.issubmit = false
|
||||
})
|
||||
},
|
||||
|
||||
// 长内容
|
||||
to_textarea: function (e) {
|
||||
let {
|
||||
title,
|
||||
placeholder,
|
||||
index
|
||||
} = e.currentTarget.dataset;
|
||||
if (title == 'village' || title == 'school') {
|
||||
let myComponent = this.selectComponent('#inputComponent');
|
||||
myComponent.showPage(title);
|
||||
return false
|
||||
}
|
||||
let that = this,
|
||||
data = null;
|
||||
if (title == 'aroundSchool') {
|
||||
data = {
|
||||
index,
|
||||
distance: that.data.aroundSchoolList[index].distance
|
||||
}
|
||||
} else {
|
||||
data = that.data.info[title].value
|
||||
}
|
||||
wx.setStorage({
|
||||
key: title,
|
||||
data: data,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
write_long_textarea: title
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: '../textarea/textarea?name=' + title + '&placeholder=' + placeholder,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 有二级选项的提交
|
||||
submitMore(e) {
|
||||
this.data.info[e.currentTarget.dataset.name].value = e.detail.data;
|
||||
|
||||
this.setData({
|
||||
info: this.data.info
|
||||
})
|
||||
},
|
||||
// 有一级选项的提交
|
||||
submitSingle(e) {
|
||||
this.data.info[e.currentTarget.dataset.name].value = e.detail.value;
|
||||
|
||||
this.setData({
|
||||
info: this.data.info
|
||||
})
|
||||
},
|
||||
// 改变日期
|
||||
changeDate(e) {
|
||||
this.data.info.leasetime.value = e.detail.value.substring(0, 10);
|
||||
@ -1109,62 +978,7 @@ Page({
|
||||
info: this.data.info
|
||||
})
|
||||
},
|
||||
changeInputSelect() {},
|
||||
// 点击获取位置
|
||||
get_location: function () {
|
||||
let that = this;
|
||||
// wx.getLocation({
|
||||
// success: function (resget) {
|
||||
// wx.chooseLocation({
|
||||
// enableHighAccuracy: true,
|
||||
// latitude: that.data.latitude || '22.297759',
|
||||
// longitude: that.data.longitude || '114.179495',
|
||||
// success: function (res) {
|
||||
// that.data.info.address.value = res.address;
|
||||
// that.setData({
|
||||
// info: that.data.info,
|
||||
// latitude: res.latitude,
|
||||
// longitude: res.longitude
|
||||
// })
|
||||
// if (res.address) {
|
||||
// // 如果能获取到address
|
||||
// return false
|
||||
// }
|
||||
// },
|
||||
// fail(err) {
|
||||
// console.log(err);
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// fail(res) {
|
||||
// that.setData({
|
||||
// isrefusedAuthLocation: 1
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
bindopensetting(res) {
|
||||
var status = res.detail.authSetting['scope.userLocation'],
|
||||
that = this;
|
||||
|
||||
if (status) {
|
||||
//用户同意授权
|
||||
that.get_location()
|
||||
that.setData({
|
||||
isrefusedAuthLocation: 0
|
||||
})
|
||||
|
||||
} else {
|
||||
that.setData({
|
||||
isrefusedAuthLocation: 2
|
||||
})
|
||||
wx.showToast({
|
||||
title: '您已拒绝授权地址,请点击自行填写~',
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
clearleasetime() {
|
||||
this.data.info.leasetime.value = 0;
|
||||
|
||||
|
@ -57,9 +57,6 @@
|
||||
<!-- 发布失败 -->
|
||||
<!-- <template is="fail-pop"></template> -->
|
||||
|
||||
<!-- 目标区域 -->
|
||||
<!-- <template is="pop-target-area"></template> -->
|
||||
|
||||
<!-- 新的服务类型 -->
|
||||
<!-- <template is="new-marquee-box"></template> -->
|
||||
|
||||
@ -84,30 +81,28 @@
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{ true }}">
|
||||
<view class="edit-head-head flexacenter">
|
||||
<view class="edit-head-area flexacenter">
|
||||
<image class="edit-head-area-icon" mode="widthFix" src="/img/u706.png"></image>香港
|
||||
</view>
|
||||
<view class="edit-head-type flexcenter">求房源</view>
|
||||
<view class="edit-head-head flexacenter">
|
||||
<view class="edit-head-area flexacenter">
|
||||
<image class="edit-head-area-icon" mode="widthFix" src="/img/u706.png"></image>香港
|
||||
</view>
|
||||
<view class="edit-head-type flexcenter">求房源</view>
|
||||
</view>
|
||||
|
||||
<view class="housing-message flexacenter" wx:if="{{ types=='edit' && newStatus != 1 }}">
|
||||
<view class="housing-message-item">房源ID:{{ id }}</view>
|
||||
<block wx:if="{{ offshelftime || newStatus == 0 || newStatus == -5 }}">
|
||||
<view class="housing-message-vertical"></view>
|
||||
<view class="housing-message-item" wx:if="{{ newStatus == 0 }}">未发布</view>
|
||||
<view class="housing-message-item" wx:elif="{{ newStatus == -5 || offshelftime }}">下架:{{ offshelftime }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="housing-message flexacenter" wx:if="{{ types=='edit' && newStatus != 1 }}">
|
||||
<view class="housing-message-item">房源ID:{{ id }}</view>
|
||||
<block wx:if="{{ offshelftime || newStatus == 0 || newStatus == -5 }}">
|
||||
<view class="housing-message-vertical"></view>
|
||||
<view class="housing-message-item" wx:if="{{ newStatus == 0 }}">未发布</view>
|
||||
<view class="housing-message-item" wx:elif="{{ newStatus == -5 || offshelftime }}">下架:{{ offshelftime }}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="edit-head-surplus flexacenter" bindtap="getAbout">
|
||||
<view class="edit-head-surplus-text">您还可以发布 <text>{{ allowpublishednum }}</text> 条普通房源</view>
|
||||
<view class="flexacenter" wx:if="{{ false }}">
|
||||
了解更多<image class="edit-head-surplus-icon" src="/img/blue-arrow.svg"></image>
|
||||
</view>
|
||||
<view class="edit-head-surplus flexacenter" bindtap="getAbout">
|
||||
<view class="edit-head-surplus-text">您还可以发布 <text>{{ allowpublishednum }}</text> 条普通房源</view>
|
||||
<view class="flexacenter" wx:if="{{ false }}">
|
||||
了解更多<image class="edit-head-surplus-icon" src="/img/blue-arrow.svg"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="edit-box">
|
||||
<view class="edit-top" wx:if="{{ false }}">
|
||||
@ -117,11 +112,6 @@
|
||||
|
||||
<view class="edit-option">
|
||||
|
||||
<!-- 发布者身份 -->
|
||||
<!-- <view class="edit-option-item">
|
||||
<template is="clickInput" data="{{ item:fieldinfo.status[0], index:0,it:'status',newinfo }}"></template>
|
||||
</view> -->
|
||||
|
||||
<!-- 基础区域 -->
|
||||
<view class="edit-option-item">
|
||||
<block wx:for="{{ fieldinfo.basic }}" wx:key="index">
|
||||
@ -152,14 +142,6 @@
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 房屋视频和照片区域 -->
|
||||
<!-- <view class="edit-option-item">
|
||||
<block wx:for="{{ fieldinfo.upload }}" wx:key="index">
|
||||
<template wx:if="{{ item.field == 'video' }}" is="homeVideo" data="{{ videos,it:'upload' }}"></template>
|
||||
<template wx:else is="homePhoto" data="{{ imgs,it:'upload' }}"></template>
|
||||
</block>
|
||||
</view> -->
|
||||
|
||||
<!-- 个人介绍 -->
|
||||
<view class="edit-option-item">
|
||||
<block wx:for="{{ fieldinfo.introduce }}" wx:key="index">
|
||||
|
@ -19,7 +19,6 @@
|
||||
height: 88rpx;
|
||||
border-radius: 50%;
|
||||
vertical-align: top;
|
||||
|
||||
}
|
||||
|
||||
.header .r {
|
||||
|
@ -1,28 +0,0 @@
|
||||
// pages/pageIndex/cardBrands/cardBrands.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
item: Object
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
play() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/video_show/video_show?src=' + this.properties.item.video[0].video,
|
||||
})
|
||||
// this.triggerEvent('play', { src: this.properties.item.video[0].video })
|
||||
}
|
||||
}
|
||||
})
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<view style="display:flex;flex-direction: column;">
|
||||
<view class='img-box'>
|
||||
<image class="img" mode='widthFix' src='{{ item.imageurl || item.image }}'></image>
|
||||
<view class="play" catchtap="play" wx:if="{{ item.isvideo==1 }}">
|
||||
<image src="/img/play.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class='title'>
|
||||
<view class="brands-name" wx:if="{{ item.brand }}">{{ item.brand }}</view>
|
||||
{{ item.propaganda }}
|
||||
</view>
|
||||
<view class='position'>{{ item.title }}</view>
|
||||
<view class='point'>
|
||||
<view wx:for="{{ item.tags}}" wx:key="i" wx:for-item="s" wx:for-index="i">{{ s }}</view>
|
||||
</view>
|
||||
<view class="label" wx:if="{{ item.othertags.length>0 }}">
|
||||
<view class="i" wx:for="{{ item.othertags }}" wx:key="index" wx:for-item="s">{{ s }}</view>
|
||||
</view>
|
||||
<view class='price' wx:if="{{ item.rentprice >0}}">{{ item.currency ||"HK$"}}<view class='num'>{{ item.rentprice }}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="stick" wx:if="{{ item.istopping == 1 }}">置顶</view> -->
|
||||
</view>
|
@ -1,142 +0,0 @@
|
||||
/* pages/pageIndex/cardBrands/cardBrands.wxss */
|
||||
.item {
|
||||
background: #fff;
|
||||
margin-bottom: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 1px 1px 3px 3px #e8e8e8;
|
||||
}
|
||||
|
||||
.img-box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.img-box .img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.img-box .logo {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
|
||||
}
|
||||
|
||||
.img-box .play {
|
||||
position: absolute;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
border-radius: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
|
||||
.img-box .play image {
|
||||
flex: 0 0 36rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.img-box .logo image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 30rpx 26rpx 18rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.position {
|
||||
padding: 0rpx 26rpx 22rpx;
|
||||
font-size: 27rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.price {
|
||||
padding: 6rpx 26rpx 36rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.price .num {
|
||||
display: inline-block;
|
||||
font-size: 28rpx;
|
||||
color: #C63E3A;
|
||||
}
|
||||
|
||||
.price .top {
|
||||
display: inline-block;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.point {
|
||||
display: flex;
|
||||
padding: 0 10rpx 0rpx 26rpx;
|
||||
flex-wrap: wrap
|
||||
}
|
||||
|
||||
.point view {
|
||||
display: inline-flex;
|
||||
border-radius: 8rpx;
|
||||
font-size: 20rpx;
|
||||
padding: 2rpx 8rpx;
|
||||
margin: 0 8rpx 14rpx 0;
|
||||
background: #ecf6ff;
|
||||
color: #62b1ff;
|
||||
}
|
||||
|
||||
.label {
|
||||
padding: 10rpx 10rpx 20rpx 26rpx;
|
||||
color: #999;
|
||||
font-size: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.label .i {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.label .i:not(:last-child)::after {
|
||||
content: "·";
|
||||
display: inline-block;
|
||||
padding: 0 16rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.brands-name {
|
||||
display: inline-block;
|
||||
margin-right: 10rpx;
|
||||
color: #ffc05f;
|
||||
font-size: 20rpx;
|
||||
border: 1px solid #e4e4e4;
|
||||
padding: 2rpx 10rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.stick {
|
||||
background-color: #f2f2f2;
|
||||
color: #999;
|
||||
align-self: flex-end;
|
||||
margin-right: 26rpx;
|
||||
border-radius: 25rpx;
|
||||
font-size: 22rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding: 0 16rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
// pages/pageIndex/cardPerson/cardPerson.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
world:Boolean,
|
||||
item:Object,
|
||||
isads:Boolean
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
closeAd(){
|
||||
this.triggerEvent('closeAd', { position: this.properties.item.position, world: this.properties.world,id:this.properties.item.id})
|
||||
},
|
||||
clickAD(){
|
||||
if(!this.properties.isads){return false}
|
||||
this.triggerEvent('clickAD', { id: this.properties.item.id })
|
||||
}
|
||||
}
|
||||
})
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<view class="{{world?'card card-world': 'card'}}" bindtap="clickAD">
|
||||
<view class="{{ isads ? 'is-ads' :''}}">
|
||||
<image class="ad-img" wx:if="{{ item.image}}" src="{{ item.image }}" mode="widthFix" ></image>
|
||||
<view class="r">
|
||||
<view class="title">
|
||||
<image class="ischeck" src="/img/ischeck.png" wx:if="{{ item.verified==1 }}"></image>
|
||||
<image class="hot" src="/img/HOT.png" wx:if="{{ item.hotsthree>0 }}"></image>
|
||||
<image class="pic" src="/img/videologo.png" wx:if="{{ item.isvideo>0 }}"></image>
|
||||
<image class="pic" src="/img/pics.jpg" wx:if="{{ item.images>0 }}"></image>
|
||||
<text decode="true">{{ item.subject }}</text>
|
||||
</view>
|
||||
<view class='tips'>
|
||||
<view class='i' wx:if="{{ item.location || item.city }}">{{ item.location || item.city }}</view>
|
||||
<view class='i' wx:if="{{ item.type }}">{{ item.type }}</view>
|
||||
<view class='i' wx:if="{{ item.acreage }}">{{ item.acreage }}平方{{world ?'米': '呎'}}</view>
|
||||
<view class='i'>{{ item.gender }}</view>
|
||||
<!-- <view class='i'>{{ item.leaseterm ==1 ?'长租':(item.leaseterm ==2 ?'短租' :'')}}</view> -->
|
||||
</view>
|
||||
<view class='footer'>
|
||||
<view class='l'>
|
||||
{{ item.currency ||"HK$"}}
|
||||
<view class='num'>{{ item.rent }}</view>/{{ item.rentalperiod || "月"}}
|
||||
</view>
|
||||
<view class="btn">推广</view>
|
||||
<!-- <block wx:if="{{ item.intermediary != 2 && item.intermediary != 5 }}">
|
||||
<view class='agent'>{{ item.intermediary ==1?'中介' :(item.publisheridentity ==3 ?"房东" : '有房招室友') }}</view>
|
||||
</block> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="close-btn" catchtap="closeAd" wx:if="{{ isads }}">
|
||||
<image src="/img/close-c.png"></image>
|
||||
</view>
|
||||
</view>
|
@ -1,148 +0,0 @@
|
||||
/* pages/pageIndex/cardPerson/cardPerson.wxss */
|
||||
.card{
|
||||
padding: 42rpx 24rpx;
|
||||
border-left: 5rpx solid #ffd14f;
|
||||
display: block;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.card-world{
|
||||
border-left-color: #74cdc1;
|
||||
}
|
||||
.hot{
|
||||
display: inline-block;
|
||||
width: 48rpx;
|
||||
height: 21rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.pic{
|
||||
display: inline-block;
|
||||
width: 32rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.title{
|
||||
color:#1c1c1c;
|
||||
font-size: 34rpx;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
max-height: 90rpx;
|
||||
word-break: break-all;
|
||||
font-weight: bold;
|
||||
}
|
||||
.tips{
|
||||
color: #999;
|
||||
font-size: 0;
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
.tips .i{
|
||||
font-size: 22rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.tips .i:not(:last-child):after{
|
||||
margin: 0 16rpx;
|
||||
vertical-align: middle;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 6rpx;
|
||||
height: 6rpx;
|
||||
border-radius: 50%;
|
||||
background: #ccc;
|
||||
}
|
||||
.footer{
|
||||
font-size: 26rpx;
|
||||
/* position: relative */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.footer .btn{
|
||||
|
||||
display: none;
|
||||
border:1px rgb(227, 227, 227) solid;
|
||||
border-radius: 4rpx;
|
||||
flex: 0 0 60rpx;
|
||||
width: 60rpx;
|
||||
height: 30rpx;
|
||||
z-index: 35;
|
||||
font-size: 20rpx;
|
||||
color: #999;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.is-ads .footer .btn{
|
||||
display: inline-flex
|
||||
}
|
||||
.num{
|
||||
font-size: 26rpx;
|
||||
color: #C63E3A;
|
||||
display: inline-block;
|
||||
margin: 0 6rpx;
|
||||
}
|
||||
.agent{
|
||||
/* position: absolute;
|
||||
right: 0;
|
||||
bottom: 0; */
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
background: #f2f2f2;
|
||||
border-radius: 20rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
/* width: 92rpx; */
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
.is-ads{
|
||||
margin-right: -4rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.is-ads .title,.is-ads .tips{
|
||||
padding-right: 56rpx;
|
||||
}
|
||||
.close-btn{
|
||||
position: absolute;
|
||||
right: 5rpx;
|
||||
top: 5rpx;
|
||||
width:48rpx;
|
||||
height: 48rpx;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.close-btn image{
|
||||
width: 18rpx;
|
||||
height: 18rpx;
|
||||
}
|
||||
.is-ads .r{
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.is-ads .ad-img{
|
||||
display: inline-flex;
|
||||
width: 240rpx;
|
||||
flex: 0 0 240rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-right: 20rpx;
|
||||
max-height: 200rpx;
|
||||
}
|
||||
|
||||
.ischeck{
|
||||
display: inline-block;
|
||||
width: 36rpx;
|
||||
height: 28rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: 8rpx;
|
||||
}
|
@ -7,8 +7,6 @@
|
||||
"go-login": "../../template/goLogin/goLogin",
|
||||
"head-swiper": "../../template/headSwiper/headSwiper",
|
||||
"form-id": "../../template/formId/formId",
|
||||
"card-person": "./cardPerson/cardPerson",
|
||||
"card-brands": "./cardBrands/cardBrands",
|
||||
"fix-footer": "../../template/fixFooter/fixFooter",
|
||||
"announcement-popup": "../../template/announcementPopup/announcementPopup",
|
||||
"to-top": "/template/toTop/toTop"
|
||||
|
@ -99,248 +99,119 @@
|
||||
|
||||
</view>
|
||||
|
||||
<view></view>
|
||||
<block wx:if="{{ isNewVersions }}">
|
||||
<!-- 区域选择 新 -->
|
||||
<view class="area-selection">
|
||||
<view class="head flexacenter shadow">
|
||||
<!-- <view class="head-item flexcenter flex1 {{ index == areaIndex ? 'pitch' : '' }}" wx:for="{{ combination }}" wx:key="index" bindtap="setValue" data-key="areaIndex" data-value="{{ index }}"> -->
|
||||
<view class="head-item flexflex flex1 {{ index == areaIndex ? 'pitch' : '' }}" wx:for="{{ combination }}" wx:key="index" bindtap="setValue" data-key="areaIndex" data-value="{{ index }}">
|
||||
<block wx:if="{{ index == areaIndex }}">
|
||||
<view class="head-item-pitch head-item-pitch-left">
|
||||
<view class="semicircle"></view>
|
||||
<view class="head-item-bj"></view>
|
||||
</view>
|
||||
<view class="head-item-pitch head-item-pitch-right">
|
||||
<view class="semicircle"></view>
|
||||
<view class="head-item-bj"></view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 区域选择 新 -->
|
||||
<view class="area-selection">
|
||||
<view class="head flexacenter shadow">
|
||||
<!-- <view class="head-item flexcenter flex1 {{ index == areaIndex ? 'pitch' : '' }}" wx:for="{{ combination }}" wx:key="index" bindtap="setValue" data-key="areaIndex" data-value="{{ index }}"> -->
|
||||
<view class="head-item flexflex flex1 {{ index == areaIndex ? 'pitch' : '' }}" wx:for="{{ combination }}" wx:key="index" bindtap="setValue" data-key="areaIndex" data-value="{{ index }}">
|
||||
<block wx:if="{{ index == areaIndex }}">
|
||||
<view class="head-item-pitch head-item-pitch-left">
|
||||
<view class="semicircle"></view>
|
||||
<view class="head-item-bj"></view>
|
||||
</view>
|
||||
<view class="head-item-pitch head-item-pitch-right">
|
||||
<view class="semicircle"></view>
|
||||
<view class="head-item-bj"></view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="head-name">{{ item.name }}</view>
|
||||
<view class="head-underline" wx:if="{{ index == areaIndex }}"></view>
|
||||
</view>
|
||||
<view class="head-name">{{ item.name }}</view>
|
||||
<view class="head-underline" wx:if="{{ index == areaIndex }}"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="area-content">
|
||||
<view class="area-data flexcenter">
|
||||
<image class="area-icon" mode="widthFix" src="/img/area-icon.png"></image>
|
||||
当前共有 <view class="area-amount">{{ combination[areaIndex] && combination[areaIndex].num }}</view> 个房源
|
||||
</view>
|
||||
<!--
|
||||
<view class="area-content">
|
||||
<view class="area-data flexcenter">
|
||||
<image class="area-icon" mode="widthFix" src="/img/area-icon.png"></image>
|
||||
当前共有 <view class="area-amount">{{ combination[areaIndex] && combination[areaIndex].num }}</view> 个房源
|
||||
</view>
|
||||
<!--
|
||||
<view wx:if="{{ areaIndex == 0 || areaIndex == 1 }}" class="area-list area-school flexflex">
|
||||
<view class="area-item flexcenter" bindtap="{{ areaIndex == 0 ? 'skipPersonList' : 'openAreaPop' }}" wx:for="{{ combination[areaIndex].where }}" wx:key="index" data-id="{{ item.id }}" data-index="{{ index }}" data-key="school">{{ item.name }}</view>
|
||||
</view> -->
|
||||
|
||||
<view wx:if="{{ areaIndex == 0 }}" class="area-list area-school flexflex">
|
||||
<view class="area-item flexcenter" bindtap="skipPersonList" wx:for="{{ combination[areaIndex].where }}" wx:key="index" data-id="{{ item.id }}" data-key="school">{{ item.name }}</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{ areaIndex == 1 }}" class="area-list area-district flexflex">
|
||||
<view class="area-item flexcenter" bindtap="openAreaPop" data-index="{{ index }}" wx:for="{{ combination[areaIndex].where }}" wx:key="index" data-id="{{ item.id }}">{{ item.name }}</view>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{ areaIndex == 2 }}">
|
||||
<view class="area-list area-type flexflex" wx:for="{{ combination[areaIndex].where }}" wx:for-item="ite" wx:key="index">
|
||||
<view class="area-type-name">{{ ite.name }}</view>
|
||||
<view class="area-type-block flex1 flexflex">
|
||||
<view class="area-item flexcenter" bindtap="skipPersonList" data-id="{{ it.id }}" data-key="types" wx:for="{{ ite.data }}" wx:for-item="it" wx:key="index">{{ it.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view wx:if="{{ areaIndex == 0 }}" class="area-list area-school flexflex">
|
||||
<view class="area-item flexcenter" bindtap="skipPersonList" wx:for="{{ combination[areaIndex].where }}" wx:key="index" data-id="{{ item.id }}" data-key="school">{{ item.name }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view></view>
|
||||
|
||||
<!-- 公寓列表 新 -->
|
||||
<view class="apartment-block">
|
||||
<scroll-view scroll-x="{{ true }}" class="scroll">
|
||||
<view class="apartment-list flexflex">
|
||||
<view class="apartment-item flexflex" wx:for="{{ apartment }}" wx:key="index" bindtap="publicJumps" data-url="/pages/irentDetail/irentDetail?uniqid={{ item.id }}">
|
||||
<view class="apartment-name one-line-display">{{ item.title }}</view>
|
||||
<view class="apartment-introduce one-line-display">{{ item.propaganda }}</view>
|
||||
|
||||
<view class="apartment-image-list flexacenter">
|
||||
<block wx:for="{{ item.images }}" wx:key="index">
|
||||
<view class="apartment-image-item">
|
||||
<image class="" mode="aspectFill" wx:if="{{ index < 2}}" src="{{ item }}"></image>
|
||||
<image mode="widthFix" class="apartment-image-item-icon" src="/img/frontPlay.svg"></image>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
</view>
|
||||
<view wx:if="{{ areaIndex == 1 }}" class="area-list area-district flexflex">
|
||||
<view class="area-item flexcenter" bindtap="openAreaPop" data-index="{{ index }}" wx:for="{{ combination[areaIndex].where }}" wx:key="index" data-id="{{ item.id }}">{{ item.name }}</view>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{ areaIndex == 2 }}">
|
||||
<view class="area-list area-type flexflex" wx:for="{{ combination[areaIndex].where }}" wx:for-item="ite" wx:key="index">
|
||||
<view class="area-type-name">{{ ite.name }}</view>
|
||||
<view class="area-type-block flex1 flexflex">
|
||||
<view class="area-item flexcenter" bindtap="skipPersonList" data-id="{{ it.id }}" data-key="types" wx:for="{{ ite.data }}" wx:for-item="it" wx:key="index">{{ it.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 数据列表 tab 新 -->
|
||||
<view class="tab-list flexacenter">
|
||||
<view class="tab-item {{ item.select ? 'pitch' : '' }}" wx:for="{{ recommendedTab }}" wx:key="index" bindtap="cutTab" data-type="{{ item.type }}" data-index="{{ index }}">{{ item.name }}</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="pinterest-list flexflex">
|
||||
<view id="pinterest-list-left" class="pinterest-list-left flex1">
|
||||
<block wx:for="{{ listDataLeft }}" wx:key="index">
|
||||
<block wx:if="{{item.type == 'adv'}}">
|
||||
<template is="adv" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:elif="{{item.type == 'apartment'}}">
|
||||
<template is="apartment" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<template is="general" data="{{ item }}"></template>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view id="pinterest-list-right" class="pinterest-list-right flex1" style="display:flex;flex-direction:column;align-items: flex-end;">
|
||||
<block wx:for="{{ listDataRight }}" wx:key="index">
|
||||
<block wx:if="{{item.type == 'adv'}}">
|
||||
<template is="adv" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:elif="{{item.type == 'apartment'}}">
|
||||
<template is="apartment" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<template is="general" data="{{ item }}"></template>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:else>
|
||||
<!-- 个人房源 -->
|
||||
<view class="house-block">
|
||||
<navigator url="/pages/personList/personList" hover-class="hover" class="title">
|
||||
<view>个人房源</view>
|
||||
<view class="more">
|
||||
more
|
||||
<image src="/img/more-yellow.png"></image>
|
||||
</view>
|
||||
</navigator>
|
||||
<scroll-view scroll-x="true" class="scroll">
|
||||
<view class="inner-scroll">
|
||||
<block wx:for="{{ HKhousing }}" wx:key="index">
|
||||
<block wx:if="{{ index<HKhousing.length-1 }}">
|
||||
<!-- 非广告 -->
|
||||
<navigator class="item" hover-class="hover" url="/pages/show/show?tid={{ item.tid }}&uniqid={{ item.uniqid }}&cityid=1" wx:if="{{ !advListHKhousing[index+1] }}">
|
||||
<view class="card">
|
||||
<card-person isads="{{false}}" item="{{ item }}"></card-person>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 广告 -->
|
||||
<navigator class="item" hover-class="hover" url="/{{ advListHKhousing[index+1].path }}" wx:if="{{ advListHKhousing[index+1] }}">
|
||||
<view class="card">
|
||||
<card-person bindcloseAd="closeAd" bindclickAD="clickAD" isads="true" item="{{ advListHKhousing[index+1] }}"></card-person>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view></view>
|
||||
|
||||
<!-- 公寓列表 新 -->
|
||||
<view class="apartment-block">
|
||||
<scroll-view scroll-x="{{ true }}" class="scroll">
|
||||
<view class="apartment-list flexflex">
|
||||
<view class="apartment-item flexflex" wx:for="{{ apartment }}" wx:key="index" bindtap="publicJumps" data-url="/pages/irentDetail/irentDetail?uniqid={{ item.id }}">
|
||||
<view class="apartment-name one-line-display">{{ item.title }}</view>
|
||||
<view class="apartment-introduce one-line-display">{{ item.propaganda }}</view>
|
||||
|
||||
<view class="apartment-image-list flexacenter">
|
||||
<block wx:for="{{ item.images }}" wx:key="index">
|
||||
<view class="apartment-image-item">
|
||||
<image class="" mode="aspectFill" wx:if="{{ index < 2}}" src="{{ item }}"></image>
|
||||
<image mode="widthFix" class="apartment-image-item-icon" src="/img/frontPlay.svg"></image>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
</block>
|
||||
<navigator class="item" hover-class="hover" url="/pages/personList/personList" wx:if="{{ HKhousing.length>0}}">
|
||||
<view class="card">
|
||||
<card-person item="{{ HKhousing[HKhousing.length-1] }}"></card-person>
|
||||
</view>
|
||||
<view class="last-child">
|
||||
<view class="btn">查看更多
|
||||
<image src="/img/more-white.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 数据列表 tab 新 -->
|
||||
<view class="tab-list flexacenter">
|
||||
<view class="tab-item {{ item.select ? 'pitch' : '' }}" wx:for="{{ recommendedTab }}" wx:key="index" bindtap="cutTab" data-type="{{ item.type }}" data-index="{{ index }}">{{ item.name }}</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="pinterest-list flexflex">
|
||||
<view id="pinterest-list-left" class="pinterest-list-left flex1">
|
||||
<block wx:for="{{ listDataLeft }}" wx:key="index">
|
||||
<block wx:if="{{item.type == 'adv'}}">
|
||||
<template is="adv" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:elif="{{item.type == 'apartment'}}">
|
||||
<template is="apartment" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<template is="general" data="{{ item }}"></template>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 品牌公寓 -->
|
||||
<view class="house-block house-brands">
|
||||
<navigator url="/pages/irentList/irentList" hover-class="hover" class="title">
|
||||
<view>品牌公寓</view>
|
||||
<view class="more">
|
||||
more
|
||||
<image src="/img/more-blue.png"></image>
|
||||
</view>
|
||||
</navigator>
|
||||
<scroll-view scroll-x="true" class="scroll">
|
||||
<view class="inner-scroll">
|
||||
<block wx:for="{{ HKapartment }}" wx:key="index">
|
||||
<navigator class="item" hover-class="hover" url="/pages/irentDetail/irentDetail?uniqid={{item.uniqid}}" wx:if="{{ index<HKapartment.length-1 }}">
|
||||
<view class="card">
|
||||
<card-brands bindplay="play" item="{{ item }}" index="{{ index }}"></card-brands>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
<navigator class="item" hover-class="hover" url="/pages/irentList/irentList" wx:if="{{ HKapartment.length>0}}">
|
||||
<view class="card">
|
||||
<card-brands bindplay="play" item="{{ HKapartment[HKapartment.length-1] }}"></card-brands>
|
||||
</view>
|
||||
<view class="last-child">
|
||||
<view class="btn">查看更多
|
||||
<image src="/img/more-white.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view id="pinterest-list-right" class="pinterest-list-right flex1" style="display:flex;flex-direction:column;align-items: flex-end;">
|
||||
<block wx:for="{{ listDataRight }}" wx:key="index">
|
||||
<block wx:if="{{item.type == 'adv'}}">
|
||||
<template is="adv" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:elif="{{item.type == 'apartment'}}">
|
||||
<template is="apartment" data="{{ item }}"></template>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<template is="general" data="{{ item }}"></template>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 世界各地房源 -->
|
||||
<view wx:if="{{ otherHousing.length>0 }}" class="house-block world-block">
|
||||
<navigator url="/pages/restOfWorld/restOfWorld" hover-class="hover" class="title">
|
||||
<!-- <view>世界各地房源</view> -->
|
||||
<view>求房源</view>
|
||||
<view class="more">
|
||||
more
|
||||
<image src="/img/more-green.png"></image>
|
||||
</view>
|
||||
</navigator>
|
||||
<scroll-view scroll-x="true" class="scroll">
|
||||
<view class="inner-scroll">
|
||||
<!-- <block wx:for="{{ otherHousing }}" wx:key="index"> -->
|
||||
<block wx:for="{{ findHouseSource }}" wx:key="index">
|
||||
<block wx:if="{{ index<otherHousing.length-1 }}">
|
||||
<!-- 非广告 -->
|
||||
<navigator class="item" hover-class="hover" url="/pages/show/show?tid={{ item.tid }}&uniqid={{ item.uniqid }}" wx:if="{{ !advListotherHousing[index+1] }}">
|
||||
<view class="card">
|
||||
<card-person world="true" bindclickAD="clickAD" bindcloseAd="closeAd" isads="{{ false }}" item="{{ item }}"></card-person>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 广告 -->
|
||||
<navigator class="item" hover-class="hover" url="/{{ advListotherHousing[index+1].path}}" wx:if="{{ advListotherHousing[index+1] }}">
|
||||
<view class="card">
|
||||
<card-person world="true" bindclickAD="clickAD" bindcloseAd="closeAd" isads="{{ true }}" item="{{ advListotherHousing[index+1] }}"></card-person>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
|
||||
</block>
|
||||
<navigator class="item" hover-class="hover" url="/pages/restOfWorld/restOfWorld" wx:if="{{ otherHousing.length>0}}">
|
||||
<view class="card">
|
||||
<card-person world="true" item="{{ otherHousing[otherHousing.length-1] }}"></card-person>
|
||||
</view>
|
||||
<view class="last-child">
|
||||
<view class="btn">查看更多
|
||||
<image src="/img/more-white.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 服务号推广 -->
|
||||
<image mode='widthFix' show-menu-by-longpress class="popularize" src="{{ service }}" bindtap="copy"></image>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
|
||||
<fix-footer unreadMessages="{{ unreadMessages }}" bottomLift="{{ bottomLift }}"></fix-footer>
|
||||
<view class='video-box' wx:if="{{ video }}">
|
||||
<!-- <image src="../../img/close.png" class='close' bindtap='close_video'></image> -->
|
||||
|
@ -42,13 +42,11 @@ page {
|
||||
align-items: center;
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
/* padding: 0 30rpx 10rpx; */
|
||||
padding: 0 52.5rpx 10rpx;
|
||||
}
|
||||
|
||||
.types-tab .item {
|
||||
display: inline-flex;
|
||||
/* flex: 1; */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
@ -59,17 +57,12 @@ page {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* width: 110rpx;
|
||||
height: 110rpx; */
|
||||
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
/* border-radius: 30rpx; */
|
||||
border-radius: 24rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
/* box-shadow: 0.629px 0.777px 16px 0px rgba(243, 243, 243, 0.996); */
|
||||
box-shadow: 0px 0px 12rpx rgba(0, 0, 0, 0.0784313725490196);
|
||||
|
||||
}
|
||||
|
||||
.types-tab .item image {
|
||||
@ -77,26 +70,6 @@ page {
|
||||
height: 45rpx;
|
||||
}
|
||||
|
||||
/* .types-tab .item:nth-child(1) image {
|
||||
width: 62rpx;
|
||||
height: 58rpx;
|
||||
}
|
||||
|
||||
.types-tab .item:nth-child(2) image {
|
||||
width: 63rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.types-tab .item:nth-child(3) image {
|
||||
width: 66rpx;
|
||||
height: 57rpx;
|
||||
}
|
||||
|
||||
.types-tab .item:nth-child(4) image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
} */
|
||||
|
||||
.addhousingresource-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -134,59 +107,11 @@ page {
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.house-block {
|
||||
padding: 64rpx 0 0;
|
||||
}
|
||||
|
||||
.house-block .title {
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.house-block .title .more {
|
||||
color: #ffc05f;
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
}
|
||||
|
||||
.house-block .title .more image {
|
||||
width: 9rpx;
|
||||
height: 14rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
width: 100vw;
|
||||
|
||||
}
|
||||
|
||||
.scroll .inner-scroll {
|
||||
display: flex;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.scroll .inner-scroll .item {
|
||||
margin-right: 20rpx;
|
||||
display: inline-flex;
|
||||
border-radius: 10rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
box-shadow: 0.629px 0.777px 16px 0px rgba(243, 243, 243, 0.994);
|
||||
flex: 0 0 620rpx;
|
||||
max-width: calc(100vw - 130rpx);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.scroll .inner-scroll .right {
|
||||
display: inline-flex;
|
||||
flex: 0 0 2rpx;
|
||||
}
|
||||
|
||||
.scroll .last-child {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@ -404,60 +329,40 @@ page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgb(98, 177, 255);
|
||||
/* border: 1rpx solid rgb(98, 177, 255); */
|
||||
box-sizing: border-box;
|
||||
bottom: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.area-selection .head .head-item-pitch .semicircle::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 2rpx;
|
||||
height: 25rpx;
|
||||
top: 0;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.area-selection .head .head-item-pitch.head-item-pitch-right .semicircle::after {
|
||||
left: 0;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
.area-selection .head .head-item-pitch.head-item-pitch-left .semicircle::after {
|
||||
right: 0;
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.area-selection .head .head-item-pitch-left .semicircle {
|
||||
right: 0rpx;
|
||||
border-radius: 0 0 24rpx 0;
|
||||
/* border-width: 1rpx 0rpx 0rpx 1rpx;
|
||||
border-color: rgb(98, 177, 255) #fff #fff rgb(98, 177, 255); */
|
||||
}
|
||||
|
||||
.area-selection .head .head-item-pitch-right .semicircle {
|
||||
left: 0rpx;
|
||||
border-radius: 0 0 0 24rpx;
|
||||
/* border-width: 1rpx 1rpx 0rpx 0rpx; */
|
||||
/* left: 0;
|
||||
border-color: rgb(98, 177, 255) rgb(98, 177, 255) #fff #fff; */
|
||||
|
||||
}
|
||||
|
||||
/* .area-selection .head .head-item-pitch-left::after {
|
||||
border-radius: 0 0 24rpx 0;
|
||||
border: 1rpx solid rgb(98, 177, 255);
|
||||
box-sizing: border-box;
|
||||
} */
|
||||
|
||||
/* .area-selection .head .head-item-pitch-right::after {
|
||||
border-radius: 0 0 0 24rpx;
|
||||
border: 1rpx solid rgb(98, 177, 255);
|
||||
box-sizing: border-box;
|
||||
|
||||
} */
|
||||
|
||||
/* .area-selection .head .pitch::after,
|
||||
.area-selection .head .pitch::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 18rpx;
|
||||
right: -24rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background-color: rgb(98, 177, 255);
|
||||
border-radius: 0 0 0 24rpx;
|
||||
background: radial-gradient(24rpx at 24rpx 0px, transparent 24rpx, #fff 24rpx);
|
||||
} */
|
||||
|
||||
/* .area-selection .head .pitch::after {
|
||||
left: -24rpx;
|
||||
right: auto;
|
||||
transform: scaleX(-1);
|
||||
} */
|
||||
|
||||
.area-selection .head .head-underline {
|
||||
width: 122rpx;
|
||||
height: 8rpx;
|
||||
@ -471,7 +376,6 @@ page {
|
||||
border-radius: 24rpx;
|
||||
margin-top: -18rpx;
|
||||
padding-bottom: 48rpx;
|
||||
|
||||
}
|
||||
|
||||
.area-selection .area-data {
|
||||
@ -480,7 +384,6 @@ page {
|
||||
padding-top: 55rpx;
|
||||
position: relative;
|
||||
margin-bottom: 48rpx;
|
||||
|
||||
}
|
||||
|
||||
.area-selection .area-data::after,
|
||||
@ -505,7 +408,6 @@ page {
|
||||
margin: 0 15rpx;
|
||||
color: #000;
|
||||
font-family: 'Arial-Black';
|
||||
|
||||
}
|
||||
|
||||
.area-selection .area-icon {
|
||||
|
@ -64,7 +64,7 @@ Page({
|
||||
initState: false,
|
||||
topTitle: "",
|
||||
|
||||
isNewVersions: false,
|
||||
isNewVersions: true,
|
||||
},
|
||||
onPageScroll(e) {
|
||||
if (e.scrollTop > 1000 && !this.data.showTOTOP) {
|
||||
@ -469,7 +469,6 @@ Page({
|
||||
|
||||
// 处理 列表 事件
|
||||
submitOperations(e) {
|
||||
console.log("e", e);
|
||||
let type = e.detail.type
|
||||
if (type == 'brand') this.submitBrands(e)
|
||||
if (type == 'rent') this.submitMoney(e)
|
||||
|
@ -219,7 +219,6 @@ Component({
|
||||
this.setData({
|
||||
selectSchool: e.currentTarget.dataset.value
|
||||
})
|
||||
console.log("e", e);
|
||||
this.submit()
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<!-- 新的 -->
|
||||
<block wx:if="{{ isNewVersions }}">
|
||||
<list-operations location="{{ location }}" operationstype="housing" money="{{ money }}" brands="{{ brands }}" screen_data="{{ screen_data }}" roomtype="{{ roomtype }}" roomlistings="{{ roomlistings }}" bindsubmit="submitOperations"></list-operations>
|
||||
<list-operations school="{{ school }}" types="{{ types }}" location="{{ location }}" operationstype="housing" money="{{ money }}" brands="{{ brands }}" screen_data="{{ screen_data }}" roomtype="{{ roomtype }}" roomlistings="{{ roomlistings }}" bindsubmit="submitOperations" bindsubmitarea="submitarea"></list-operations>
|
||||
</block>
|
||||
|
||||
<!-- 条件框 -->
|
||||
|
@ -61,19 +61,6 @@
|
||||
暂无数据
|
||||
</view>
|
||||
</block>
|
||||
<!-- <block wx:for="{{ data }}" wx:key="index">
|
||||
<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>
|
||||
</block>
|
||||
<block wx:if="{{ data.length==0 && !loading }}">
|
||||
<view class='nocontent'>
|
||||
<image src="../../img/file.png" class='file'></image>
|
||||
暂无数据
|
||||
</view>
|
||||
</block> -->
|
||||
</view>
|
||||
|
||||
<view class='house-list' wx:else>
|
||||
|
@ -49,33 +49,15 @@ Page({
|
||||
if (res.code == 200) {
|
||||
let data = res.data
|
||||
app.globalData.user = data.user
|
||||
app.globalData.setSate = true
|
||||
if (this.data.isIndex) {
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
fail: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/more_offer/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
fail: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (data.status == 1 || data.status == 2) {
|
||||
wx.redirectTo({
|
||||
url: '/pagesSquare/pages/PCAuthorization/PCAuthorization?token=' + this.data.token + "&status=" + data.status,
|
||||
})
|
||||
} else {
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
fail: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
wx.showToast({
|
||||
@ -89,56 +71,10 @@ Page({
|
||||
nicknameinput(e) {
|
||||
let value = e.detail.value
|
||||
value = value.replaceAll(" ", "")
|
||||
if (value == this.data.nickname) return
|
||||
this.setData({
|
||||
nickname: value
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
})
|
@ -1,4 +1,3 @@
|
||||
<!--pages/setAvatarNickname/setAvatarNickname.wxml-->
|
||||
<view class="container">
|
||||
<header-nav bgcolor="#f6f6f6" isIndexPage="">设置头像昵称</header-nav>
|
||||
<view class="box shadow">
|
||||
@ -13,8 +12,8 @@
|
||||
<view class="item">
|
||||
<view class="left">昵称</view>
|
||||
<view class="right">
|
||||
<!-- <input type="nickname" class="nickname" model:value="{{nickname}}" maxlength="50" /> -->
|
||||
<input type="nickname" class="nickname" value="{{nickname}}" maxlength="50" bindinput="nicknameinput" />
|
||||
<input type="nickname" class="nickname" model:value="{{ nickname }}" maxlength="50" bindinput="nicknameinput" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -262,7 +262,6 @@
|
||||
<view class="location-box">
|
||||
<view class="location-header">
|
||||
<image class="location-icon" mode="widthFix" src="/img/u1695.png"></image>
|
||||
<!-- {{ info.cityid==1 ? info.location : ((info.country || '') +' > ' + (info.city || '')) }} -->
|
||||
{{ info.locationList[0].head + ' > ' + info.locationList[0].end }}
|
||||
</view>
|
||||
<!-- 地图 -->
|
||||
|
@ -1,66 +0,0 @@
|
||||
// pages/textarea/textarea.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -1,2 +0,0 @@
|
||||
<!--pages/textarea/textarea.wxml-->
|
||||
<text>pages/textarea/textarea.wxml</text>
|
@ -110,7 +110,7 @@ Page({
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
if (this.data.user) {
|
||||
if (JSON.stringify(this.data.user) != "{}") {
|
||||
this.setData({
|
||||
user: app.globalData.user
|
||||
})
|
||||
@ -181,6 +181,7 @@ Page({
|
||||
wx.hideLoading()
|
||||
}
|
||||
|
||||
console.log(data.user);
|
||||
this.setData({
|
||||
landlordcertification: data.landlordcertification,
|
||||
user: data.user,
|
||||
@ -886,7 +887,6 @@ Page({
|
||||
judgeEditSkip(e) {
|
||||
console.log(e);
|
||||
let url = e.currentTarget.dataset.url
|
||||
console.log("url", url);
|
||||
let user = app.globalData['user']
|
||||
let miniProgram = app.globalData['miniProgram']
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
<import src="../../wxParse/wxParse.wxml" />
|
||||
<view class="container" wx:if="{{ !loding }}">
|
||||
<header-nav inner-text="Some text" isIndexPage="index" isMessageCount="{{ true }}" unreadMessages="{{ unreadMessages }}" bindunreadMessagesalter="unreadMessagesalter" bgcolor="transparent" position="{{ 'absolute' }}">
|
||||
<!-- <view>寄托港校租房</view> -->
|
||||
<view>{{ topTitle }}</view>
|
||||
</header-nav>
|
||||
|
||||
@ -386,7 +385,6 @@
|
||||
|
||||
<!-- 顶上去升起弹出框 -->
|
||||
<view class="raise-popup {{ raisePopupState ? 'raisePopup' : ''}}">
|
||||
<!-- <image class="raise-popup-icon" src="/img/u458.svg" mode="heightFix" wx:if="{{ raisePopupMessage != '今天已顶过啦,明天再来吧!'}}"></image> <text>{{ raisePopupMessage }}</text> -->
|
||||
<image class="raise-popup-icon" src="/img/u458.svg" mode="heightFix" wx:if="{{ isdingState != 1}}"></image> <text>{{ raisePopupMessage }}</text>
|
||||
</view>
|
||||
|
||||
@ -395,7 +393,6 @@
|
||||
<view style="position: relative;z-index: 1001;">
|
||||
<announcement-popup interface='my' init="{{ initState }}"></announcement-popup>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
@ -77,15 +77,12 @@
|
||||
width: 687rpx;
|
||||
height: 75rpx;
|
||||
border-radius: 13.5rpx;
|
||||
/* margin-top: 63rpx; */
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
|
||||
.tab-box {
|
||||
border-top: 1px solid #d7d7d7;
|
||||
border-bottom: 1px solid #d7d7d7;
|
||||
/* border-top: 1px solid #e8e8e8;
|
||||
border-bottom: 1px solid #e8e8e8; */
|
||||
font-size: 0;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
|
@ -1,11 +1,7 @@
|
||||
<view class="banner" bindtap="topage">
|
||||
<block wx:if="{{ isvideo }}">
|
||||
<video id="video{{index}}" style="height:{{ height }}px" src="{{ item.annex.url}}" controls="{{ controls }}" muted="true" loop="{{ true }}" show-progress="{{ controls }}" show-fullscreen-btn="{{ controls }}" >
|
||||
|
||||
</video>
|
||||
|
||||
<video id="video{{index}}" style="height:{{ height }}px" src="{{ item.annex.url}}" controls="{{ controls }}" muted="true" loop="{{ true }}" show-progress="{{ controls }}" show-fullscreen-btn="{{ controls }}" ></video>
|
||||
</block>
|
||||
|
||||
<block wx:else>
|
||||
<image mode="widthFix" class="img" src="{{ item.annex.url}}"></image>
|
||||
</block>
|
||||
|
@ -1,5 +1,3 @@
|
||||
// template/listOperations/listOperations.js
|
||||
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
@ -15,20 +13,15 @@ Component({
|
||||
type: String,
|
||||
observer(res) {
|
||||
let conditionAllConfig = this.data.conditionAllConfig
|
||||
|
||||
this.setData({
|
||||
conditionObj: conditionAllConfig[res]
|
||||
})
|
||||
|
||||
console.log("conditionObj", this.data.conditionObj);
|
||||
}
|
||||
},
|
||||
location: {
|
||||
type: Object,
|
||||
observer(res) {
|
||||
let data = res.data
|
||||
console.log(res, 0);
|
||||
|
||||
if (!data) return
|
||||
let targetData = {}
|
||||
for (let key in data) {
|
||||
@ -37,25 +30,57 @@ Component({
|
||||
targetData[key] = {}
|
||||
targetData[key]['title'] = data[key]
|
||||
} else {
|
||||
if (!targetData[Math.trunc(key)]['data']) targetData[Math.trunc(key)]['data'] = {}
|
||||
if (!targetData[Math.trunc(key)]['data']) targetData[Math.trunc(key)]['data'] = {
|
||||
0: "不限"
|
||||
}
|
||||
targetData[Math.trunc(key)]['data'][key] = data[key]
|
||||
}
|
||||
}
|
||||
console.log("targetData", targetData);
|
||||
|
||||
this.setData({
|
||||
areaData: targetData
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
school: {
|
||||
type: Object,
|
||||
observer(res) {
|
||||
let list = res.list
|
||||
list[0] = "不限"
|
||||
this.setData({
|
||||
schoolData: res.list,
|
||||
schoolValue: res.value || 0
|
||||
})
|
||||
}
|
||||
},
|
||||
types: {
|
||||
type: Object,
|
||||
observer(res) {
|
||||
let data = res.data
|
||||
let targetData = {}
|
||||
for (let key in data) {
|
||||
key = Number(key)
|
||||
if (key % 1 === 0) {
|
||||
targetData[key] = {}
|
||||
targetData[key]['title'] = data[key]
|
||||
} else {
|
||||
if (!targetData[Math.trunc(key)]['data']) targetData[Math.trunc(key)]['data'] = {
|
||||
0: "不限"
|
||||
}
|
||||
targetData[Math.trunc(key)]['data'][key] = data[key]
|
||||
}
|
||||
}
|
||||
console.log(res, 0);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
conditionState: "school", // brand rent house floor school
|
||||
conditionState: "types", // brand rent house floor school
|
||||
conditionAllConfig: {
|
||||
student: {
|
||||
brand: {
|
||||
@ -92,13 +117,12 @@ Component({
|
||||
},
|
||||
orderby: {
|
||||
name: "最新",
|
||||
valueKey: "brands"
|
||||
valueKey: "orderby",
|
||||
valueText: "最新",
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
conditionObj: {},
|
||||
|
||||
rent: {
|
||||
min: 1000,
|
||||
max: 50000,
|
||||
@ -114,7 +138,27 @@ Component({
|
||||
areaState: "area", // area school 区域 弹窗的状态
|
||||
areaData: {}, // 区域弹窗的数据
|
||||
areaPitchValueOne: 0, // 区域选中 的 一级
|
||||
areaPitchValueTwo: 0, // 区域选中 的 二级
|
||||
areaPitchValueTwo: { // 区域选中 的 二级
|
||||
0: true
|
||||
},
|
||||
|
||||
schoolData: {}, // 学校弹窗 数据
|
||||
schoolValue: "", // 学校弹窗 选中数据
|
||||
orderby: {
|
||||
value: 'timestamp',
|
||||
list: {
|
||||
"timestamp": "最新发布",
|
||||
"hotnum": "热门",
|
||||
"rentasc": "价格从低到高",
|
||||
"rentdesc": "价格从高到低",
|
||||
},
|
||||
obj: {
|
||||
"timestamp": "最新发布",
|
||||
"hotnum": "热门",
|
||||
"rentasc": "价格从低到高",
|
||||
"rentdesc": "价格从高到低",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
@ -126,11 +170,12 @@ Component({
|
||||
key,
|
||||
value
|
||||
} = e.currentTarget.dataset
|
||||
|
||||
this.setData({
|
||||
[key]: value
|
||||
})
|
||||
console.log(this.data.conditionState);
|
||||
|
||||
console.log(this.data.areaPitchValueOne);
|
||||
},
|
||||
|
||||
changeItem(e) {
|
||||
@ -144,7 +189,7 @@ Component({
|
||||
let obj = this.data[valueKey].obj
|
||||
conditionObj[conditionState]['valueText'] = obj[value]
|
||||
|
||||
this.triggerEvent('submit', {
|
||||
this.triggerEvent('submitarea', {
|
||||
type: conditionState,
|
||||
value
|
||||
})
|
||||
@ -177,7 +222,7 @@ Component({
|
||||
rent_min = (rentValue[0] * rent['step']) + rent['min']
|
||||
rent_max = (rentValue[1] * rent['step']) + rent['min']
|
||||
conditionObj[conditionState]['valueText'] = `${rent_min} ~ ${rent_max}`
|
||||
}
|
||||
} else conditionObj[conditionState]['valueText'] = ""
|
||||
|
||||
this.triggerEvent('submit', {
|
||||
type: conditionState,
|
||||
@ -190,5 +235,113 @@ Component({
|
||||
conditionObj
|
||||
})
|
||||
},
|
||||
|
||||
// 处理区域选择 的 二级
|
||||
handleAreaPitchValueTwo(e) {
|
||||
let {
|
||||
value
|
||||
} = e.currentTarget.dataset
|
||||
let areaPitchValueTwo = this.data.areaPitchValueTwo
|
||||
if (value == 0) {
|
||||
areaPitchValueTwo = {
|
||||
0: true
|
||||
}
|
||||
} else {
|
||||
delete areaPitchValueTwo[0]
|
||||
if (areaPitchValueTwo[value]) areaPitchValueTwo[value] = false
|
||||
else areaPitchValueTwo[value] = true
|
||||
}
|
||||
this.setData({
|
||||
areaPitchValueTwo,
|
||||
})
|
||||
},
|
||||
|
||||
// 点击区域弹窗 的确定
|
||||
clickAreaPitch(e) {
|
||||
let {
|
||||
type
|
||||
} = e.currentTarget.dataset
|
||||
|
||||
let conditionObj = this.data.conditionObj
|
||||
let conditionState = this.data.conditionState
|
||||
|
||||
let areaPitchValueOne = this.data.areaPitchValueOne
|
||||
let areaPitchValueTwo = this.data.areaPitchValueTwo
|
||||
let areaData = this.data.areaData
|
||||
|
||||
if (type == "reset") {
|
||||
this.setData({
|
||||
areaPitchValueOne: 0,
|
||||
areaPitchValueTwo: {
|
||||
0: true
|
||||
},
|
||||
})
|
||||
} else {
|
||||
let location = []
|
||||
|
||||
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) || '港岛' }/...`
|
||||
this.setData({
|
||||
conditionState: "",
|
||||
conditionObj,
|
||||
})
|
||||
this.triggerEvent("submitarea", {
|
||||
school: "",
|
||||
location
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 处理学校 选中
|
||||
handleSchoolPitchValue(e) {
|
||||
let value = e.currentTarget.dataset.value
|
||||
let conditionObj = this.data.conditionObj
|
||||
let conditionState = this.data.conditionState
|
||||
|
||||
conditionObj[conditionState]['valueText'] = "学校"
|
||||
this.setData({
|
||||
schoolValue: value,
|
||||
areaPitchValueOne: 0,
|
||||
areaPitchValueTwo: {
|
||||
0: true
|
||||
},
|
||||
conditionObj,
|
||||
conditionState: "",
|
||||
})
|
||||
|
||||
this.triggerEvent("submitarea", {
|
||||
school: value,
|
||||
location: []
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 处理点击 排序
|
||||
submitOrderby(e) {
|
||||
let value = e.currentTarget.dataset.value
|
||||
|
||||
let conditionObj = this.data.conditionObj
|
||||
let orderby = this.data.orderby
|
||||
let conditionState = this.data.conditionState
|
||||
orderby["value"] = value
|
||||
conditionObj[conditionState]['valueText'] = orderby['list'][value]
|
||||
this.setData({
|
||||
orderby,
|
||||
conditionObj,
|
||||
conditionState: "",
|
||||
})
|
||||
console.log(conditionState);
|
||||
|
||||
this.triggerEvent("submit", {
|
||||
value,
|
||||
type: conditionState
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
@ -2,20 +2,11 @@
|
||||
<view class="page-action-bar flexacenter">
|
||||
<block wx:for="{{ conditionObj }}" wx:key="index">
|
||||
<view class="page-action-item flexcenter bold" bindtap="setValue" data-key="conditionState" data-value="{{ index }}">
|
||||
<!-- <block wx:if="{{ index == 'brand' && brands.value }}">{{ brands.obj[brands.value] }}</block>
|
||||
<block wx:elif="{{ index == 'rent' && money.rent_min }}">{{ (money.rent_min || '') + '~' + (money.rent_max || '') }}</block>
|
||||
<block wx:elif="{{ index == 'house' && roomtype.value }}">{{ roomtype.obj[roomtype.value] }}</block>
|
||||
<block wx:elif="{{ index == 'floor' && roomlistings.value }}">{{ roomlistings.obj[roomlistings.value] }}</block> -->
|
||||
|
||||
<block wx:if="{{ item['valueText'] }}">
|
||||
{{ item['valueText'] }}
|
||||
</block>
|
||||
<block wx:if="{{ item['valueText'] }}">{{ item['valueText'] }}</block>
|
||||
<view wx:else class="unselected">{{ item.name }}</view>
|
||||
|
||||
<view class="page-action-circle flexcenter">
|
||||
<image class="page-action-circle-icon" mode="widthFix" src="/img/arrow-gray.png"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="longString" wx:if="{{ index != 'floor' && index != 'orderby' }}"></view>
|
||||
</block>
|
||||
@ -72,7 +63,6 @@
|
||||
<picker-view-column class="picker-view-column">
|
||||
<view class="pickerpitch" wx:for="{{ rent['for'] }}" wx:for-item="it" wx:key="key">{{ rent.min + (it * rent.step) }}</view>
|
||||
</picker-view-column>
|
||||
|
||||
</picker-view>
|
||||
</view>
|
||||
|
||||
@ -88,6 +78,7 @@
|
||||
<view class="page-list-item three-rows-item flexcenter {{ roomtype.value == item.value ? 'pitch' : '' }}" wx:for="{{ roomtype.list }}" wx:key="index" bindtap="changeItem" data-value="{{ item.value }}">{{ item.name }}</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{ conditionState == 'floor' }}">
|
||||
<view class="page-list three-rows-list flexflex">
|
||||
<view class="page-list-item three-rows-item flexcenter {{ roomlistings.value == item.value ? 'pitch' : '' }}" wx:for="{{ roomlistings.list }}" wx:key="index" bindtap="changeItem" data-value="{{ item.value }}">{{ item.name }}</view>
|
||||
@ -100,20 +91,63 @@
|
||||
<view class="area-item flexcenter {{ areaState == 'area' ? 'pitch' : '' }}" bindtap="setValue" data-key="areaState" data-value="area">按区域</view>
|
||||
<view class="area-item flexcenter {{ areaState == 'school' ? 'pitch' : '' }}" bindtap="setValue" data-key="areaState" data-value="school">按学校</view>
|
||||
</view>
|
||||
<view class="area-centre {{ areaPitchValueOne == 0 ? 'selectUnlimited' : '' }}">
|
||||
<scroll-view scroll-y="{{ true }}" style="height: 600rpx;">
|
||||
<view class="area-item flexcenter area-item-unlimited" bindtap="setValue" data-key="areaPitchValueOne" data-value="{{ 0 }}">
|
||||
<view class="flexcenter" style="width: 150rpx;">不限</view>
|
||||
<image class="area-item-unlimited-icon" src="/img/green-circle-pitch.svg"></image>
|
||||
</view>
|
||||
<view wx:for="{{ areaData }}" wx:key="index" class="area-item flexcenter {{ areaPitchValueOne == index ? 'pitch' : '' }}" bindtap="setValue" data-key="areaPitchValueOne" data-value="{{ index }}">{{ item.title }}</view>
|
||||
</scroll-view>
|
||||
<block wx:if="{{ areaState == 'area' }}">
|
||||
<view class="area-centre {{ areaPitchValueOne == 0 ? 'selectUnlimited' : '' }}">
|
||||
<scroll-view scroll-y="{{ true }}" style="height: 600rpx;">
|
||||
<view class="area-item flexcenter area-item-unlimited" bindtap="setValue" data-key="areaPitchValueOne" data-value="{{ 0 }}">
|
||||
<view class="flexcenter" style="width: 150rpx;">不限</view>
|
||||
<image class="area-item-unlimited-icon" src="/img/green-circle-pitch.svg"></image>
|
||||
</view>
|
||||
<view wx:for="{{ areaData }}" wx:key="index" class="area-item flexcenter {{ areaPitchValueOne == index ? 'pitch' : '' }}" bindtap="setValue" data-key="areaPitchValueOne" data-value="{{ index }}">{{ item.title }}</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="area-right flex1" wx:if="{{ areaPitchValueOne }}">
|
||||
<scroll-view scroll-y="{{ true }}" style="height: 600rpx;">
|
||||
<view wx:for="{{ areaData[areaPitchValueOne].data }}" wx:key="index" bindtap="handleAreaPitchValueTwo" data-value="{{ index }}" class="area-item area flexacenter {{ areaPitchValueTwo[index] ? 'pitch' : '' }}">
|
||||
<view class="">{{ item }}</view>
|
||||
<image class="area-item-unlimited-icon" src="{{ index == 0 ? '/img/green-circle-pitch.svg' : '/img/green-block-pitch.svg' }}"></image>
|
||||
<view class="area-item-unselected" style="border-radius: {{ index == 0 ? '50%' : '8rpx' }};"></view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="area-centre selectUnlimited">
|
||||
<scroll-view scroll-y="{{ true }}" style="height: 600rpx;">
|
||||
<view class="area-item flexcenter school {{ schoolValue == index ? 'schoolPitch' : '' }} " style="width: 100%;justify-content: space-between;padding-right: 30rpx;padding-left: 48rpx;" wx:for="{{ schoolData }}" bindtap="handleSchoolPitchValue" data-value="{{ index }}">
|
||||
<view class="flexcenter">{{ item }}</view>
|
||||
<image class="area-item-unlimited-icon" src="/img/green-circle-pitch.svg"></image>
|
||||
<view class="area-item-unlimited-unselected"></view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="area-bottom flexacenter">
|
||||
<view class="reset-btn flexcenter" catchtap="clickAreaPitch" data-type="reset">
|
||||
<image class="reset-btn-icon" mode="widthFix" src="/img/reset-btn.png"></image>
|
||||
重置
|
||||
</view>
|
||||
<view class="area-right flex1" wx:if="{{ areaPitchValueOne }}">
|
||||
<scroll-view scroll-y="{{ true }}" style="height: 600rpx;">
|
||||
<view class="area-item flexacenter {{ !areaPitchValueTwo ? 'pitch' : '' }}">不限</view>
|
||||
<view wx:for="{{ areaData[areaPitchValueOne].data }}" wx:key="index" class="area-item flexacenter {{ areapitchValueOne == index ? 'pitch' : '' }}">{{ item }}</view>
|
||||
</scroll-view>
|
||||
<view class="confirm-btn flexcenter" catchtap="clickAreaPitch">确定</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{ conditionState == 'orderby' }}">
|
||||
<view class="page-list two-rows-list flexflex">
|
||||
<view class="page-list-item two-rows-item flexcenter {{ orderby.value == index ? 'pitch' : '' }}" wx:for="{{ orderby.list }}" wx:key="index" bindtap="submitOrderby" data-value="{{ index }}">{{ item }}</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{ conditionState == 'types' }}">
|
||||
<view class="types-box">
|
||||
<view class="types-list flexflex" wx:for="{{ 3 }}" wx:key="index">
|
||||
<view class="types-list-name flexacenter">
|
||||
合租
|
||||
<image class="types-list-name-icon" src="/img/circle-arrow.png"></image>
|
||||
</view>
|
||||
<view class="types-block flex1 flexflex">
|
||||
<view class="types-item flexcenter" wx:for="{{ 5 }}" wx:key="index">不限</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -54,17 +54,6 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* .page-action-bar .page-action-item:not(:last-of-type):after {
|
||||
width: 1rpx;
|
||||
height: 24rpx;
|
||||
background-color: #ebebeb;
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
transform: translateY(-50%);
|
||||
} */
|
||||
|
||||
.page-action-bar .page-action-item .unselected {
|
||||
font-weight: normal;
|
||||
color: #7F7F7F;
|
||||
@ -235,7 +224,13 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.area-box {}
|
||||
.area-box {
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.area-box .overstriking {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.area-box .area-item {
|
||||
height: 120rpx;
|
||||
@ -245,9 +240,12 @@
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.area-box .area-item.area-item-unlimited .area-item-unlimited-icon {
|
||||
.area-box .area-item .area-item-unlimited-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.area-box .area-item.area-item-unlimited .area-item-unlimited-icon {
|
||||
padding-right: 30rpx;
|
||||
display: none;
|
||||
}
|
||||
@ -261,6 +259,9 @@
|
||||
background-color: rgba(246, 246, 246, 1);
|
||||
}
|
||||
|
||||
.area-box .area-right .area-item {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.area-box .area-centre.selectUnlimited {
|
||||
flex: 1;
|
||||
@ -277,22 +278,144 @@
|
||||
|
||||
.area-box .area-centre .pitch {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
font-size: 27rpx;
|
||||
color: #000000;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.area-box .area-left .area-item.pitch {
|
||||
background-color: rgba(246, 246, 246, 1);
|
||||
font-size: 27rpx;
|
||||
color: #000000;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.area-box .area-left .area-item,
|
||||
.area-box .area-centre .area-item {
|
||||
width: 150rpx;
|
||||
}
|
||||
|
||||
.area-box .area-right {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.area-box .area-right .area-item {
|
||||
padding: 0 48rpx;
|
||||
padding: 0 30rpx 0 48rpx;
|
||||
}
|
||||
|
||||
.area-box .area-left .area-item.pitch {
|
||||
.area-box .area-item .area-item-unlimited-unselected {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid #d7d7d7;
|
||||
}
|
||||
|
||||
.area-box .area-right .area-item .area-item-unselected {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 4rpx solid #d7d7d7;
|
||||
}
|
||||
|
||||
.area-box .area-right .area-item.area.pitch {}
|
||||
|
||||
.area-box .area-right .area-item.area.pitch .area-item-unlimited-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.area-box .area-right .area-item.area.pitch .area-item-unselected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.area-box .area-right .area-item.area .area-item-unlimited-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.area-box .area-centre .area-item.school .area-item-unlimited-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.area-box .area-centre .area-item.school .area-item-unlimited-unselected {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.area-box .area-centre .area-item.schoolPitch {
|
||||
color: #50E3C2;
|
||||
}
|
||||
|
||||
.area-box .area-centre .area-item.schoolPitch .area-item-unlimited-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.area-box .area-centre .area-item.schoolPitch .area-item-unlimited-unselected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.area-bottom {
|
||||
padding: 36rpx 30rpx 54rpx;
|
||||
justify-content: space-between;
|
||||
border-top: 1rpx solid #ebebeb;
|
||||
}
|
||||
|
||||
.area-bottom .reset-btn {
|
||||
width: 180rpx;
|
||||
height: 96rpx;
|
||||
border: 1rpx solid rgba(215, 215, 215, 1);
|
||||
border-radius: 82.5rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.area-bottom .reset-btn .reset-btn-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 9rpx;
|
||||
}
|
||||
|
||||
.area-bottom .confirm-btn {
|
||||
width: 480rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 60rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 650;
|
||||
color: #fff;
|
||||
background-color: rgba(98, 177, 255, 1);
|
||||
}
|
||||
|
||||
.types-list {}
|
||||
|
||||
.types-box .types-list:not(:first-of-type) {
|
||||
padding-top: 48.5rpx;
|
||||
}
|
||||
|
||||
.types-list .types-list-name {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
line-height: 72rpx;
|
||||
width: 195rpx;
|
||||
height: 72rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.types-list .types-list-name-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.types-list .types-block {
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 28.5rpx;
|
||||
border-bottom: 2rpx solid #f2f2f2;
|
||||
}
|
||||
|
||||
.types-list .types-item {
|
||||
background-color: rgba(246, 246, 246, 1);
|
||||
}
|
||||
|
||||
.area-box .area-left .area-item,
|
||||
.area-box .area-centre .area-item {
|
||||
width: 150rpx;
|
||||
border-radius: 12rpx;
|
||||
height: 72rpx;
|
||||
width: 165rpx;
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
margin-right: 18rpx;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
696
utils/miucms.js
@ -2,433 +2,413 @@ var initial_url = 'https://app.gter.net/tenement';
|
||||
var app = null;
|
||||
|
||||
function initial(self) {
|
||||
app = self;
|
||||
getUserInfo(function (code) {
|
||||
sendData(code)
|
||||
self.globalData.code = code;
|
||||
});
|
||||
return true;
|
||||
app = self;
|
||||
getUserInfo(function (code) {
|
||||
sendData(code)
|
||||
self.globalData.code = code;
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
function sendData(code) {
|
||||
let Authorization = wx.getStorageSync('Authorization')
|
||||
if (!Authorization) {
|
||||
Authorization = app.randomString(32)
|
||||
wx.setStorageSync('Authorization', Authorization)
|
||||
wx.setStorageSync('session', Authorization)
|
||||
}
|
||||
wx.request({
|
||||
url: initial_url,
|
||||
data: {
|
||||
session: wx.getStorageSync('Authorization') || "",
|
||||
Authorization: wx.getStorageSync('Authorization') || "",
|
||||
code: code,
|
||||
options: app.globalData.options || '',
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
},
|
||||
success: function (res) {
|
||||
// console.log(res)
|
||||
var data = typeof res.data == 'string' ? JSON.parse(res.data) : res.data;
|
||||
// 将配置与用户session存于本地
|
||||
// if (!data.session) {
|
||||
// // 这里报错.用户授权不成功
|
||||
// return false;
|
||||
// }
|
||||
// wx.setStorageSync('session', data.user.session)
|
||||
app.globalData.session = data.user.session;
|
||||
// wx.setStorageSync('Authorization', data.user.session)
|
||||
app.globalData.Authorization = data.user.session;
|
||||
app.globalData.isUserAuthorization = data.user.session && data.user.session.length > 0 ? 2 : 1;
|
||||
app.globalData.expiration_day = data.expiration_day;
|
||||
app.globalData.config = data.config;
|
||||
app.globalData.notice = data.notice;
|
||||
app.globalData.title = data.title;
|
||||
app.globalData.user = data.user;
|
||||
app.globalData.status = data.status;
|
||||
app.globalData.StudentapartmentNew = data.StudentapartmentNew;
|
||||
app.globalData.listTab = data.listTab;
|
||||
|
||||
app.globalData.header = {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
};
|
||||
|
||||
// count()
|
||||
},
|
||||
fail: function () {
|
||||
// fail
|
||||
},
|
||||
complete: function () {
|
||||
// complete
|
||||
let Authorization = wx.getStorageSync('Authorization')
|
||||
if (!Authorization) {
|
||||
Authorization = app.randomString(32)
|
||||
wx.setStorageSync('Authorization', Authorization)
|
||||
wx.setStorageSync('session', Authorization)
|
||||
}
|
||||
})
|
||||
wx.request({
|
||||
url: initial_url,
|
||||
data: {
|
||||
session: wx.getStorageSync('Authorization') || "",
|
||||
Authorization: wx.getStorageSync('Authorization') || "",
|
||||
code: code,
|
||||
options: app.globalData.options || '',
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
},
|
||||
success: function (res) {
|
||||
// console.log(res)
|
||||
var data = typeof res.data == 'string' ? JSON.parse(res.data) : res.data;
|
||||
// 将配置与用户session存于本地
|
||||
// if (!data.session) {
|
||||
// // 这里报错.用户授权不成功
|
||||
// return false;
|
||||
// }
|
||||
// wx.setStorageSync('session', data.user.session)
|
||||
app.globalData.session = data.user.session;
|
||||
// wx.setStorageSync('Authorization', data.user.session)
|
||||
app.globalData.Authorization = data.user.session;
|
||||
app.globalData.isUserAuthorization = data.user.session && data.user.session.length > 0 ? 2 : 1;
|
||||
app.globalData.expiration_day = data.expiration_day;
|
||||
app.globalData.config = data.config;
|
||||
app.globalData.notice = data.notice;
|
||||
app.globalData.title = data.title;
|
||||
app.globalData.user = data.user;
|
||||
app.globalData.status = data.status;
|
||||
app.globalData.StudentapartmentNew = data.StudentapartmentNew;
|
||||
app.globalData.listTab = data.listTab;
|
||||
|
||||
app.globalData.header = {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
};
|
||||
|
||||
// count()
|
||||
},
|
||||
fail: function () {
|
||||
// fail
|
||||
},
|
||||
complete: function () {
|
||||
// complete
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 发送未读消息数请求
|
||||
function count() {
|
||||
return new Promise((resolve, reject) => {
|
||||
request(app.globalData.baseURL + "/tenement/message/count").then(res => {
|
||||
if (res.code == 200) {
|
||||
app.globalData['unreadMessages'] = res.data.count
|
||||
app.globalData['unreadMessagesState'] = true
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: res.message
|
||||
return new Promise((resolve, reject) => {
|
||||
request(app.globalData.baseURL + "/tenement/message/count").then(res => {
|
||||
if (res.code == 200) {
|
||||
app.globalData['unreadMessages'] = res.data.count
|
||||
app.globalData['unreadMessagesState'] = true
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: res.message
|
||||
})
|
||||
}
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
}
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 发送验证码
|
||||
function verify() {
|
||||
// 得到 uniqid 和过期时间
|
||||
// 得到 uniqid 和过期时间
|
||||
}
|
||||
|
||||
// 验证验证码并注册
|
||||
function register(o) {
|
||||
var config = wx.getStorageSync('config')
|
||||
// console.log('register',config)
|
||||
var self = this;
|
||||
wx.request({
|
||||
url: config.user.register,
|
||||
data: {
|
||||
session: wx.getStorageSync('session'),
|
||||
data: wx.getStorageSync('rawData'),
|
||||
uniqid: null, //上一步获取的ID
|
||||
code: null, //接收到的验证码
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain'
|
||||
},
|
||||
success: function (res) {
|
||||
var data = typeof res.data == 'string' ? JSON.parse(res.data) : res.data;
|
||||
console.log('登录/注册成功')
|
||||
initial(initial_url, app)
|
||||
},
|
||||
fail: function () {
|
||||
// fail
|
||||
},
|
||||
complete: function () {
|
||||
// complete
|
||||
}
|
||||
})
|
||||
var config = wx.getStorageSync('config')
|
||||
// console.log('register',config)
|
||||
var self = this;
|
||||
wx.request({
|
||||
url: config.user.register,
|
||||
data: {
|
||||
session: wx.getStorageSync('session'),
|
||||
data: wx.getStorageSync('rawData'),
|
||||
uniqid: null, //上一步获取的ID
|
||||
code: null, //接收到的验证码
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain'
|
||||
},
|
||||
success: function (res) {
|
||||
var data = typeof res.data == 'string' ? JSON.parse(res.data) : res.data;
|
||||
console.log('登录/注册成功')
|
||||
initial(initial_url, app)
|
||||
},
|
||||
fail: function () {
|
||||
// fail
|
||||
},
|
||||
complete: function () {
|
||||
// complete
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//用户登录
|
||||
function login() {
|
||||
return new Promise((resolve, reject) => wx.login({
|
||||
success: resolve,
|
||||
fail: reject
|
||||
}))
|
||||
return new Promise((resolve, reject) => wx.login({
|
||||
success: resolve,
|
||||
fail: reject
|
||||
}))
|
||||
}
|
||||
|
||||
//获取用户信息
|
||||
function getUserInfo(o) {
|
||||
// console.log('getUserInfogetUserInfo')
|
||||
login().then(res => {
|
||||
var code = res.code;
|
||||
o(code);
|
||||
// wx.getUserInfo({
|
||||
// success: function (res) {
|
||||
|
||||
// app.globalData.isUserAuthorization = 2;
|
||||
// console.log('getUserInfosuccess', app.globalData.isUserAuthorization)
|
||||
|
||||
// },
|
||||
// fail: function (res) {
|
||||
// app.globalData.isUserAuthorization = 1;
|
||||
// console.log('getUserInfofail', app.globalData.isUserAuthorization)
|
||||
// o(code);
|
||||
// }
|
||||
// })
|
||||
// console.log('getUserInfogetUserInfo')
|
||||
login().then(res => {
|
||||
var code = res.code;
|
||||
o(code);
|
||||
}).catch(res => {
|
||||
console.log(res)
|
||||
})
|
||||
.catch(res => {
|
||||
console.log(res)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function share(app, name) {
|
||||
if (!app.globalData.config.stat || !app.globalData.config.stat.share) {
|
||||
return false
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.config.stat.share,
|
||||
data: {
|
||||
page: name
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: app.globalData.header,
|
||||
success: function (res) {},
|
||||
fail: function (res) {},
|
||||
|
||||
})
|
||||
if (!app.globalData.config.stat || !app.globalData.config.stat.share) {
|
||||
return false
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.config.stat.share,
|
||||
data: {
|
||||
page: name
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: app.globalData.header,
|
||||
success: function (res) {},
|
||||
fail: function (res) {},
|
||||
})
|
||||
}
|
||||
|
||||
function html2wxml(str, index, that) {
|
||||
var arr = [];
|
||||
if (str.indexOf('</a>') != -1) {
|
||||
// 有a标签
|
||||
that.data.newFunction.text[index].push({
|
||||
text: str.substring(0, str.indexOf('<a')),
|
||||
node: 'text'
|
||||
})
|
||||
var rest = str.substring(str.indexOf('<a'));
|
||||
// a标签后面剩下的字符串
|
||||
// 第一个出现href的位置
|
||||
var href1 = rest.indexOf('href="') + 6;
|
||||
// 第二个“出现的位置
|
||||
var href2 = (rest.substring(href1)).indexOf('"')
|
||||
// 链接地址
|
||||
var href = rest.substring(href1, href1 + href2)
|
||||
rest = rest.substring(rest.indexOf('>'));
|
||||
// console.log('rest', rest)
|
||||
var text1 = rest.substring(1, rest.indexOf('</a>'))
|
||||
that.data.newFunction.text[index].push({
|
||||
text: text1,
|
||||
node: 'a',
|
||||
href: href
|
||||
})
|
||||
rest = rest.substring(rest.indexOf('</a>') + 4)
|
||||
if (rest.length > 0) {
|
||||
// a标签后还有字符串
|
||||
if (rest.indexOf('</a>') != -1) {
|
||||
// 还有A标签存在,再一次调用
|
||||
that.html2wxml(rest, index)
|
||||
} else {
|
||||
var arr = [];
|
||||
if (str.indexOf('</a>') != -1) {
|
||||
// 有a标签
|
||||
that.data.newFunction.text[index].push({
|
||||
text: rest,
|
||||
node: 'text',
|
||||
text: str.substring(0, str.indexOf('<a')),
|
||||
node: 'text'
|
||||
})
|
||||
}
|
||||
var rest = str.substring(str.indexOf('<a'));
|
||||
// a标签后面剩下的字符串
|
||||
// 第一个出现href的位置
|
||||
var href1 = rest.indexOf('href="') + 6;
|
||||
// 第二个“出现的位置
|
||||
var href2 = (rest.substring(href1)).indexOf('"')
|
||||
// 链接地址
|
||||
var href = rest.substring(href1, href1 + href2)
|
||||
rest = rest.substring(rest.indexOf('>'));
|
||||
var text1 = rest.substring(1, rest.indexOf('</a>'))
|
||||
that.data.newFunction.text[index].push({
|
||||
text: text1,
|
||||
node: 'a',
|
||||
href: href
|
||||
})
|
||||
rest = rest.substring(rest.indexOf('</a>') + 4)
|
||||
if (rest.length > 0) {
|
||||
// a标签后还有字符串
|
||||
if (rest.indexOf('</a>') != -1) {
|
||||
// 还有A标签存在,再一次调用
|
||||
that.html2wxml(rest, index)
|
||||
} else {
|
||||
that.data.newFunction.text[index].push({
|
||||
text: rest,
|
||||
node: 'text',
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
that.data.newFunction.text[index] = [{
|
||||
text: str,
|
||||
node: 'text',
|
||||
}]
|
||||
}
|
||||
} else {
|
||||
that.data.newFunction.text[index] = [{
|
||||
text: str,
|
||||
node: 'text',
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
function change_data(that, newFunction) {
|
||||
var arr = newFunction.split('\n');
|
||||
var arr2 = [];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
var str = arr[i];
|
||||
that.data.newFunction.text[i] = [];
|
||||
that.html2wxml(str, i)
|
||||
}
|
||||
that.setData({
|
||||
newFunction: that.data.newFunction
|
||||
})
|
||||
var arr = newFunction.split('\n');
|
||||
var arr2 = [];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
var str = arr[i];
|
||||
that.data.newFunction.text[i] = [];
|
||||
that.html2wxml(str, i)
|
||||
}
|
||||
that.setData({
|
||||
newFunction: that.data.newFunction
|
||||
})
|
||||
}
|
||||
|
||||
function copy(content, hintText) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.setClipboardData({
|
||||
data: content,
|
||||
success: function (res) {
|
||||
wx.getClipboardData({
|
||||
success: function (res) {
|
||||
wx.showToast({
|
||||
title: hintText || '复制成功!',
|
||||
})
|
||||
resolve()
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.setClipboardData({
|
||||
data: content,
|
||||
success: function (res) {
|
||||
wx.getClipboardData({
|
||||
success: function (res) {
|
||||
wx.showToast({
|
||||
title: hintText || '复制成功!',
|
||||
})
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//封装Request请求方法
|
||||
function request(url, data = {}, needGet = false) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// if (!app.globalData.config || !app.globalData.config.list) {
|
||||
// reject()
|
||||
// return false
|
||||
// }
|
||||
let sendData = Object.assign({
|
||||
session: wx.getStorageSync('session'),
|
||||
}, app.globalData.options, data)
|
||||
wx.request({
|
||||
url: url,
|
||||
data: sendData,
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
success: function (res) {
|
||||
var json = res.data;
|
||||
if (typeof json != 'object') {
|
||||
if (json != null) {
|
||||
json = json.replace("\ufeff", "");
|
||||
try {
|
||||
var jj = JSON.parse(json);
|
||||
res.data = jj;
|
||||
} catch (error) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '请求失败'
|
||||
})
|
||||
return new Promise((resolve, reject) => {
|
||||
// if (!app.globalData.config || !app.globalData.config.list) {
|
||||
// reject()
|
||||
// return false
|
||||
// }
|
||||
let sendData = Object.assign({
|
||||
session: wx.getStorageSync('session'),
|
||||
}, app.globalData.options, data)
|
||||
wx.request({
|
||||
url: url,
|
||||
data: sendData,
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
},
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
success: function (res) {
|
||||
var json = res.data;
|
||||
if (typeof json != 'object') {
|
||||
if (json != null) {
|
||||
json = json.replace("\ufeff", "");
|
||||
try {
|
||||
var jj = JSON.parse(json);
|
||||
res.data = jj;
|
||||
} catch (error) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '请求失败'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
var data = res.data;
|
||||
resolve(data)
|
||||
|
||||
},
|
||||
fail: function (msg) {
|
||||
wx.hideLoading();
|
||||
console.log('errmsg', msg)
|
||||
wx.showToast({
|
||||
title: msg,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
})
|
||||
reject('fail')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
var data = res.data;
|
||||
resolve(data)
|
||||
|
||||
},
|
||||
fail: function (msg) {
|
||||
wx.hideLoading();
|
||||
console.log('errmsg', msg)
|
||||
wx.showToast({
|
||||
title: msg,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
})
|
||||
reject('fail')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const wxget = function (url, data = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var authorization = wx.getStorageSync('Authorization');
|
||||
wx.request({
|
||||
url: url,
|
||||
data: data,
|
||||
header: {
|
||||
'Cookie': 'miucms_session=' + authorization,
|
||||
Authorization: authorization
|
||||
},
|
||||
method: 'GET',
|
||||
success: (res) => {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else if (res.data.code == 401) {
|
||||
// 需要授权
|
||||
// console.log(app)
|
||||
app.globalData.user.uid = 0;
|
||||
wx.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.message
|
||||
})
|
||||
reject(res)
|
||||
} else {
|
||||
wx.hideLoading()
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: res.data.message,
|
||||
})
|
||||
reject(res.data)
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
var authorization = wx.getStorageSync('Authorization');
|
||||
wx.request({
|
||||
url: url,
|
||||
data: data,
|
||||
header: {
|
||||
'Cookie': 'miucms_session=' + authorization,
|
||||
Authorization: authorization
|
||||
},
|
||||
method: 'GET',
|
||||
success: (res) => {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else if (res.data.code == 401) {
|
||||
// 需要授权
|
||||
// console.log(app)
|
||||
app.globalData.user.uid = 0;
|
||||
wx.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.message
|
||||
})
|
||||
reject(res)
|
||||
} else {
|
||||
wx.hideLoading()
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: res.data.message,
|
||||
})
|
||||
reject(res.data)
|
||||
}
|
||||
|
||||
},
|
||||
fail(res) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: res,
|
||||
})
|
||||
reject(res)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: res,
|
||||
})
|
||||
reject(res)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function closeAD(id) {
|
||||
// console.log(id)
|
||||
if (!app.globalData.config || !app.globalData.config.adv) {
|
||||
return false
|
||||
}
|
||||
request(app.globalData.config.adv.close, {
|
||||
advid: id
|
||||
}).then(res => {})
|
||||
if (!app.globalData.config || !app.globalData.config.adv) return false
|
||||
request(app.globalData.config.adv.close, {
|
||||
advid: id
|
||||
}).then(res => {})
|
||||
}
|
||||
|
||||
function clickAD(id) {
|
||||
if (!app.globalData.config || !app.globalData.config.adv) {
|
||||
return false
|
||||
}
|
||||
request(app.globalData.config.adv.click, {
|
||||
advid: id
|
||||
}).then(res => {})
|
||||
if (!app.globalData.config || !app.globalData.config.adv) {
|
||||
return false
|
||||
}
|
||||
request(app.globalData.config.adv.click, {
|
||||
advid: id
|
||||
}).then(res => {})
|
||||
}
|
||||
|
||||
function getTopTitle(that, app) {
|
||||
let topTitle = app.globalData.topTitle
|
||||
if (topTitle) {
|
||||
that.setData({
|
||||
topTitle: app.globalData.topTitle,
|
||||
miniProgram: app.globalData.miniProgram,
|
||||
})
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
that.getTopTitle()
|
||||
}, 300)
|
||||
}
|
||||
let topTitle = app.globalData.topTitle
|
||||
if (topTitle) {
|
||||
that.setData({
|
||||
topTitle: app.globalData.topTitle,
|
||||
miniProgram: app.globalData.miniProgram,
|
||||
})
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
that.getTopTitle()
|
||||
}, 300)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
initial: initial,
|
||||
share: share,
|
||||
change_data: change_data,
|
||||
html2wxml: html2wxml,
|
||||
copy,
|
||||
sendData,
|
||||
request,
|
||||
wxget,
|
||||
closeAD,
|
||||
clickAD,
|
||||
count,
|
||||
getTopTitle,
|
||||
https: function (url, data, success, fail) {
|
||||
wx.request({
|
||||
url: url,
|
||||
data: data,
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
},
|
||||
success: function (res) {
|
||||
typeof success == 'function' && success(res);
|
||||
},
|
||||
fail: function () {
|
||||
typeof fail == 'function' && fail(res);
|
||||
},
|
||||
complete: function () {
|
||||
typeof fail == 'function' && fail(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
initial: initial,
|
||||
share: share,
|
||||
change_data: change_data,
|
||||
html2wxml: html2wxml,
|
||||
copy,
|
||||
sendData,
|
||||
request,
|
||||
wxget,
|
||||
closeAD,
|
||||
clickAD,
|
||||
count,
|
||||
getTopTitle,
|
||||
https: function (url, data, success, fail) {
|
||||
wx.request({
|
||||
url: url,
|
||||
data: data,
|
||||
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
'Accept': 'application/json, text/plain',
|
||||
'Cookie': 'miucms_session=' + wx.getStorageSync('Authorization'),
|
||||
'Authorization': wx.getStorageSync('Authorization') || ''
|
||||
},
|
||||
success: function (res) {
|
||||
typeof success == 'function' && success(res);
|
||||
},
|
||||
fail: function () {
|
||||
typeof fail == 'function' && fail(res);
|
||||
},
|
||||
complete: function () {
|
||||
typeof fail == 'function' && fail(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
@ -1,924 +0,0 @@
|
||||
<!--**
|
||||
* author: Di (微信小程序开发工程师)
|
||||
* organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
|
||||
* 垂直微信小程序开发交流社区
|
||||
*
|
||||
* github地址: https://github.com/icindy/wxParse
|
||||
*
|
||||
* for: 微信小程序富文本解析
|
||||
* detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
|
||||
*/-->
|
||||
|
||||
<!--基础元素-->
|
||||
<template name="wxParseVideo">
|
||||
<!--增加video标签支持,并循环添加-->
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<video class="{{item.classStr}} wxParse-{{item.tag}}-video" src="{{item.attr.src}}"></video>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="wxParseImg">
|
||||
<image class="{{item.classStr}} wxParse-{{item.tag}}" data-from="{{item.from}}" data-src="{{item.attr.src}}" data-idx="{{item.imgIndex}}" src="{{item.attr.src}}" mode="aspectFit" bindload="wxParseImgLoad" bindtap="wxParseImgTap" mode="widthFix" style="width:{{item.width}}px;"
|
||||
/>
|
||||
</template>
|
||||
<template name="wxParseA">
|
||||
<navigator href="{{ item.attr.src }}"></navigator>
|
||||
<!-- <image class="{{item.classStr}} wxParse-{{item.tag}}" data-from="{{item.from}}" data-src="{{item.attr.src}}" data-idx="{{item.imgIndex}}" src="{{item.attr.src}}" mode="aspectFit" bindload="wxParseImgLoad" bindtap="wxParseImgTap" mode="widthFix" style="width:{{item.width}}px;"
|
||||
/> -->
|
||||
</template>
|
||||
|
||||
<template name="WxEmojiView">
|
||||
<view class="WxEmojiView wxParse-inline" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.textArray}}" wx:key="">
|
||||
<block class="{{item.text == '\\n' ? 'wxParse-hide':''}}" wx:if="{{item.node == 'text'}}">{{item.text}}</block>
|
||||
<block wx:elif="{{item.node == 'element'}}">
|
||||
<image class="wxEmoji" src="{{item.baseSrc}}{{item.text}}" />
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="WxParseBr">
|
||||
<text>\n</text>
|
||||
</template>
|
||||
<!--入口模版-->
|
||||
|
||||
<template name="wxParse">
|
||||
<block wx:for="{{wxParseData}}" wx:key="">
|
||||
<template is="wxParse0" data="{{item}}" />
|
||||
</block>
|
||||
</template>
|
||||
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse0">
|
||||
<!--<template is="wxParse1" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse1" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse1" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
<block wx:elif="{{item.tag == 'table'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse1" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse1" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse1" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse1">
|
||||
<!--<template is="wxParse2" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse2" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse2" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse2" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse2" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse2">
|
||||
<!--<template is="wxParse3" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse3" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse3" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse3" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse3" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse3">
|
||||
<!--<template is="wxParse4" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse4" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse4" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse4" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse4" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse4">
|
||||
<!--<template is="wxParse5" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse5" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse5" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse5" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse5" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse5">
|
||||
<!--<template is="wxParse6" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse6" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse6" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse6" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse6" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse6">
|
||||
<!--<template is="wxParse7" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse7" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse7" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse7" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse7" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
<!--循环模版-->
|
||||
<template name="wxParse7">
|
||||
<!--<template is="wxParse8" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse8" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse8" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse8" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse8" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse8">
|
||||
<!--<template is="wxParse9" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse9" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse9" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse9" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse9" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse9">
|
||||
<!--<template is="wxParse10" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse10" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse10" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse10" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse10" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse10">
|
||||
<!--<template is="wxParse11" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse11" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse11" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse11" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse11" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|
||||
|
||||
<!--循环模版-->
|
||||
<template name="wxParse11">
|
||||
<!--<template is="wxParse12" data="{{item}}" />-->
|
||||
<!--判断是否是标签节点-->
|
||||
<block wx:if="{{item.node == 'element'}}">
|
||||
<block wx:if="{{item.tag == 'button'}}">
|
||||
<button type="default" size="mini">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse12" data="{{item}}" />
|
||||
</block>
|
||||
</button>
|
||||
</block>
|
||||
<!--li类型-->
|
||||
<block wx:elif="{{item.tag == 'li'}}">
|
||||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}">
|
||||
<view class="{{item.classStr}} wxParse-li-inner">
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<view class="{{item.classStr}} wxParse-li-circle"></view>
|
||||
</view>
|
||||
<view class="{{item.classStr}} wxParse-li-text">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse12" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--video类型-->
|
||||
<block wx:elif="{{item.tag == 'video'}}">
|
||||
<template is="wxParseVideo" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--img类型-->
|
||||
<block wx:elif="{{item.tag == 'img'}}">
|
||||
<template is="wxParseImg" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<!--a类型-->
|
||||
<block wx:elif="{{item.tag == 'a'}}">
|
||||
<template is="wxParseA" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{item.tag == 'br'}}">
|
||||
<template is="WxParseBr"></template>
|
||||
</block>
|
||||
<!--其他块级标签-->
|
||||
<block wx:elif="{{item.tagType == 'block'}}">
|
||||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse12" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!--内联标签-->
|
||||
<view wx:else class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}">
|
||||
<block wx:for="{{item.nodes}}" wx:for-item="item" wx:key="">
|
||||
<template is="wxParse12" data="{{item}}" />
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
|
||||
<!--判断是否是文本节点-->
|
||||
<block wx:elif="{{item.node == 'text'}}">
|
||||
<!--如果是,直接进行-->
|
||||
<template is="WxEmojiView" data="{{item}}" />
|
||||
</block>
|
||||
|
||||
</template>
|