mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-03-07 17:32:25 +08:00
需求变更进行调整
This commit is contained in:
@@ -7,18 +7,19 @@
|
|||||||
*/
|
*/
|
||||||
// 以下演示数据中,我故意把value设置成跟name一样,只是为了方便演示,使示例更加易懂,实际使用时候value应该是一个标识,给后台识别所用的.
|
// 以下演示数据中,我故意把value设置成跟name一样,只是为了方便演示,使示例更加易懂,实际使用时候value应该是一个标识,给后台识别所用的.
|
||||||
// 数据较长,请仔细查看。
|
// 数据较长,请仔细查看。
|
||||||
export default [{
|
export default [
|
||||||
"name": '小区',
|
// {
|
||||||
"type": 'hierarchy',
|
// "name": '小区',
|
||||||
"submenu": [
|
// "type": 'hierarchy',
|
||||||
{
|
// "submenu": [
|
||||||
"name": "不限",
|
// {
|
||||||
"value": ""
|
// "name": "不限",
|
||||||
},
|
// "value": ""
|
||||||
]
|
// },
|
||||||
},
|
// ]
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
"name": '街道',
|
"name": '商圈',
|
||||||
"type": 'hierarchy',
|
"type": 'hierarchy',
|
||||||
"submenu": [
|
"submenu": [
|
||||||
{
|
{
|
||||||
@@ -27,24 +28,24 @@ export default [{
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
"name": '方式',
|
// "name": '方式',
|
||||||
"type": 'hierarchy',
|
// "type": 'hierarchy',
|
||||||
"submenu": [
|
// "submenu": [
|
||||||
{
|
// {
|
||||||
"name": "不限",
|
// "name": "不限",
|
||||||
"value": ""
|
// "value": ""
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
"name": "整租",
|
// "name": "整租",
|
||||||
"value": "0"
|
// "value": "0"
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
"name": "合租",
|
// "name": "合租",
|
||||||
"value": "1"
|
// "value": "1"
|
||||||
},
|
// },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
"name": '租金',
|
"name": '租金',
|
||||||
"type": 'hierarchy',
|
"type": 'hierarchy',
|
||||||
@@ -55,27 +56,27 @@ export default [{
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "<1000元",
|
"name": "<1000元",
|
||||||
"value": "1000"
|
"value": "0-1000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "1000-1500元",
|
"name": "1000-1500元",
|
||||||
"value": "1500"
|
"value": "1000-1500"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "1500-2000元",
|
"name": "1500-2000元",
|
||||||
"value": "2000"
|
"value": "1500-2000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "2000-3000元",
|
"name": "2000-3000元",
|
||||||
"value": "3000"
|
"value": "2000-3000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "3000-4500元",
|
"name": "3000-4500元",
|
||||||
"value": "4500"
|
"value": "3000-4500"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "<6000元",
|
"name": ">4500元",
|
||||||
"value": "6000"
|
"value": "4500"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -83,7 +84,8 @@ export default [{
|
|||||||
"name": '筛选',
|
"name": '筛选',
|
||||||
"type": 'radio',
|
"type": 'radio',
|
||||||
"submenu": [{
|
"submenu": [{
|
||||||
"name": "居室",
|
"name": "房屋户型",
|
||||||
|
"type": 'radio',
|
||||||
"submenu": [{
|
"submenu": [{
|
||||||
"name": "一室",
|
"name": "一室",
|
||||||
"value": "一室"
|
"value": "一室"
|
||||||
@@ -103,7 +105,8 @@ export default [{
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "装修",
|
"name": "装修情况",
|
||||||
|
"type": 'radio',
|
||||||
"submenu": [
|
"submenu": [
|
||||||
{
|
{
|
||||||
"name": "简装",
|
"name": "简装",
|
||||||
@@ -114,51 +117,14 @@ export default [{
|
|||||||
"value": "中装",
|
"value": "中装",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "精装修",
|
"name": "精修",
|
||||||
"value": "精装修"
|
"value": "精修"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "豪装",
|
"name": "豪装",
|
||||||
"value": "豪装"
|
"value": "豪装"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "房屋亮点",
|
|
||||||
"submenu": [
|
|
||||||
{
|
|
||||||
"name": "独卫",
|
|
||||||
"value": "独卫"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "独立阳台",
|
|
||||||
"value": "独立阳台"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "精装修",
|
|
||||||
"value": "精装修"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "智能锁",
|
|
||||||
"value": "智能锁"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "可短租",
|
|
||||||
"value": "可短租"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "首次出租",
|
|
||||||
"value": "首次出租"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "免物业费",
|
|
||||||
"value": "免物业费"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "民用水电",
|
|
||||||
"value": "民用水电"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
// import amapFile from '../../libs/amap-wx.130.js'
|
import amapFile from '../../libs/amap-wx.130.js'
|
||||||
|
|
||||||
// const myAmapFun = new amapFile.AMapWX({
|
const myAmapFun = new amapFile.AMapWX({
|
||||||
// // 申请的高德key值
|
// 申请的高德key值
|
||||||
// key: '4ef3b3b42d8bb823529908dc93414127'
|
key: '4ef3b3b42d8bb823529908dc93414127'
|
||||||
// }); //创建一个实例化对象
|
}); //创建一个实例化对象
|
||||||
|
|
||||||
// export default function wxGetAddress({longitude,latitude}) {
|
export default function wxGetAddress({longitude,latitude}) {
|
||||||
// //根据传递进来经纬度进行反解析,调用的是高德给的方法
|
//根据传递进来经纬度进行反解析,调用的是高德给的方法
|
||||||
// return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// myAmapFun.getRegeo({
|
myAmapFun.getRegeo({
|
||||||
// location: `${longitude},${latitude}`,
|
location: `${longitude},${latitude}`,
|
||||||
// success: (res) => {
|
success: (res) => {
|
||||||
// resolve(res[0])
|
resolve(res[0])
|
||||||
// },
|
},
|
||||||
// fail: (err) => {
|
fail: (err) => {
|
||||||
// resolve(null)
|
resolve(null)
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- VR -->
|
<!-- VR -->
|
||||||
<view v-else-if="item.mediaType === 'vr'" class="vr-wrapper">
|
<view v-else-if="item.mediaType === 'vr'" class="vr-wrapper">
|
||||||
<image class="vr-cover" :src="item.src" mode="aspectFill" />
|
<image class="vr-cover" :src="item.src" mode="aspectFill" />
|
||||||
<image class="vr-icon" mode="aspectFit" :src="vrIcon" @tap.stop="enterVR()" />
|
<image class="vr-icon" mode="aspectFit" :src="vrIcon" @tap.stop="enterVR()" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -85,9 +85,9 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
vrList:{
|
assetsId: {
|
||||||
type: Array,
|
type: String,
|
||||||
default: []
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -151,9 +151,7 @@
|
|||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.stop()
|
this.stop()
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {},
|
||||||
this.fillVrList();
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
normalizedList(list) {
|
normalizedList(list) {
|
||||||
if (this.current >= list.length) this.current = 0
|
if (this.current >= list.length) this.current = 0
|
||||||
@@ -231,18 +229,14 @@
|
|||||||
enterVR() {
|
enterVR() {
|
||||||
this.stop()
|
this.stop()
|
||||||
this.stopVideo()
|
this.stopVideo()
|
||||||
if(this.vrList.length > 0) {
|
this.$u.route({
|
||||||
console.log(this.vrViewPage)
|
url: this.vrViewPage,
|
||||||
// this.$u.route({
|
params: {
|
||||||
// url: this.vrViewPage,
|
title: "vr看资产",
|
||||||
// params: {
|
id: this.assetsId
|
||||||
// title:"vr看资产",
|
}
|
||||||
// vrList: this.vrList
|
})
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 分区跳转 */
|
/* 分区跳转 */
|
||||||
jumpToType(item) {
|
jumpToType(item) {
|
||||||
this.stop()
|
this.stop()
|
||||||
@@ -348,15 +342,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.vr-icon {
|
.vr-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 12%;
|
left: 12%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
width: 100rpx !important;
|
width: 100rpx !important;
|
||||||
height: 100rpx !important;
|
height: 100rpx !important;
|
||||||
background: rgba(80, 80,80,0.45);
|
background: rgba(80, 80, 80, 0.45);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
padding: 12rpx;
|
padding: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-bar {
|
.type-bar {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export default {
|
|||||||
},
|
},
|
||||||
showHome: {
|
showHome: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true // 回首页按钮默认不显示
|
default: true // 回首页按钮默认显示
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -165,7 +165,7 @@ export default {
|
|||||||
goHome(){
|
goHome(){
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:'/pages/index/index'
|
url:'/pages/index/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onExtraIconClick(index) {
|
onExtraIconClick(index) {
|
||||||
// 额外图标点击事件,可通过事件冒泡传递给父组件
|
// 额外图标点击事件,可通过事件冒泡传递给父组件
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
5
node_modules/.package-lock.json
generated
vendored
5
node_modules/.package-lock.json
generated
vendored
@@ -806,11 +806,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/three": {
|
|
||||||
"version": "0.182.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/three/-/three-0.182.0.tgz",
|
|
||||||
"integrity": "sha512-GbHabT+Irv+ihI1/f5kIIsZ+Ef9Sl5A1Y7imvS5RQjWgtTPfPnZ43JmlYI7NtCRDK9zir20lQpfg8/9Yd02OvQ=="
|
|
||||||
},
|
|
||||||
"node_modules/urijs": {
|
"node_modules/urijs": {
|
||||||
"version": "1.19.11",
|
"version": "1.19.11",
|
||||||
"resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
|
"resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
|
||||||
|
|||||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -18,7 +18,6 @@
|
|||||||
"date-fns": "3.6.0",
|
"date-fns": "3.6.0",
|
||||||
"jsencrypt": "^3.5.4",
|
"jsencrypt": "^3.5.4",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"three": "^0.182.0",
|
|
||||||
"vue": "2.6.14"
|
"vue": "2.6.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -1162,11 +1161,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/three": {
|
|
||||||
"version": "0.182.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/three/-/three-0.182.0.tgz",
|
|
||||||
"integrity": "sha512-GbHabT+Irv+ihI1/f5kIIsZ+Ef9Sl5A1Y7imvS5RQjWgtTPfPnZ43JmlYI7NtCRDK9zir20lQpfg8/9Yd02OvQ=="
|
|
||||||
},
|
|
||||||
"node_modules/urijs": {
|
"node_modules/urijs": {
|
||||||
"version": "1.19.11",
|
"version": "1.19.11",
|
||||||
"resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
|
"resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
"date-fns": "3.6.0",
|
"date-fns": "3.6.0",
|
||||||
"jsencrypt": "^3.5.4",
|
"jsencrypt": "^3.5.4",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"three": "^0.182.0",
|
|
||||||
"vue": "2.6.14"
|
"vue": "2.6.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,49 +1,46 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="asset-detail">
|
<view class="asset-detail">
|
||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<customNavbar
|
<customNavbar title="资产详情" ref="navbar" :is-transparent="navbarStyle.isTransparent"
|
||||||
title="资产详情"
|
:bg-color="navbarStyle.bgColor" :text-color="navbarStyle.textColor" :opacity="navbarStyle.opacity"
|
||||||
ref="navbar"
|
:extra-icons="navbarStyle.extraIcons" :show-home="false" />
|
||||||
:is-transparent="navbarStyle.isTransparent"
|
|
||||||
:bg-color="navbarStyle.bgColor"
|
|
||||||
:text-color="navbarStyle.textColor"
|
|
||||||
:opacity="navbarStyle.opacity"
|
|
||||||
:extra-icons="navbarStyle.extraIcons"
|
|
||||||
:show-home="false"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 图片展示区 -->
|
<!-- 图片展示区 -->
|
||||||
<view class="image-section" :style="{ paddingTop: navTotalHeight + 'px' }">
|
<view class="image-section" :style="{ paddingTop: navTotalHeight + 'px' }">
|
||||||
<Carousel :list="swiperList" boxHeight="740rpx"
|
<Carousel :list="swiperList" boxHeight="740rpx" :vrIcon="staticHost + '/public/static/icon/vr.png'"
|
||||||
:vrIcon="staticHost + '/public/static/icon/vr.png'"
|
vrViewPage="/pages-biz/vr/vr" :vr-list="vrList" />
|
||||||
vrViewPage="/pages-biz/vr/vr"
|
|
||||||
:vr-list="vrList"/>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 资产基本信息 -->
|
<!-- 资产基本信息 -->
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="basic-info">
|
<view class="basic-info">
|
||||||
<view class="info-header">
|
<view class="info-header">
|
||||||
<view class="category-tag">{{ asset.category || '未知' }}</view>
|
<view class="category-tag">{{ asset.type || '未知' }}</view>
|
||||||
<view class="asset-name">{{ asset.name || '未知'}}</view>
|
<view class="asset-name">{{ asset.name || '未知'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rent-price">{{asset.rent || '未知'}}/月</view>
|
<view class=" featureArea feature-list">
|
||||||
<view class="community-info">
|
<view class="feature-tag" v-for="(item, index) in asset.features" :key="index"
|
||||||
<text class="label">所属小区:</text>
|
:style="{ color: getRandomColor().color,backgroundColor: getRandomColor().bg}">
|
||||||
<text>{{ asset.community || '暂无'}}</text>
|
{{ item }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="address-info">
|
<view class="stress-info">
|
||||||
<text class="label">地址:</text>
|
<view class="stress-item">
|
||||||
<text>{{ asset.address || '未知'}}</text>
|
<view class="stress-value">{{ asset.rent || '未知'}}/月</view>
|
||||||
|
<view class="stress-label">租金</view>
|
||||||
|
</view>
|
||||||
|
<view class="stress-item">
|
||||||
|
<view class="stress-value">{{ asset.layout || '未知'}}</view>
|
||||||
|
<view class="stress-label">户型</view>
|
||||||
|
</view>
|
||||||
|
<view class="stress-item">
|
||||||
|
<view class="stress-value">{{ asset.area || '未知'}}㎡</view>
|
||||||
|
<view class="stress-label">面积</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 地图位置 -->
|
|
||||||
<view class="map-container">
|
|
||||||
<map :latitude="asset.lat||'0'" :longitude="asset.lng|| '0'" :markers="markers"
|
|
||||||
style="width: 92%; height: 300rpx;"></map>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 资产信息表格 -->
|
<!-- 资产信息表格 -->
|
||||||
<view class="asset-info-table">
|
<view class="asset-info-table">
|
||||||
@@ -51,34 +48,56 @@
|
|||||||
<view class="table-content">
|
<view class="table-content">
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="row-item">
|
<view class="row-item">
|
||||||
<view class="item-label">编号</view>
|
<view class="item-label">朝向</view>
|
||||||
<view class="item-value">{{ asset.code || '未知'}}</view>
|
<view class="item-value">{{ asset.orientation || '未知'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row-item">
|
<view class="row-item">
|
||||||
<view class="item-label">面积</view>
|
<view class="item-label">电梯</view>
|
||||||
<view class="item-value">{{asset.area || '未知'}}㎡</view>
|
<view class="item-value">{{ asset.hasLift|| '未知' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="row-item">
|
<view class="row-item">
|
||||||
<view class="item-label">类别</view>
|
<view class="item-label">单元</view>
|
||||||
<view class="item-value">{{ asset.category || '未知'}}</view>
|
<view class="item-value">{{ asset.unitNo || '未知'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row-item">
|
<view class="row-item">
|
||||||
<view class="item-label">价值</view>
|
<view class="item-label">楼层</view>
|
||||||
<view class="item-value">¥{{ formatMoney((asset && asset.value) || 0) }}</view>
|
<view class="item-value">{{ asset.floorNo || '暂无' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="row-item full-width">
|
<view class="row-item full-width">
|
||||||
<view class="item-label">权属</view>
|
<view class="item-label">门牌号</view>
|
||||||
<view class="item-value">{{ asset.owner || '未知'}}</view>
|
<view class="item-value">{{ asset.roomNo || '未知'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<view class="row-item full-width">
|
||||||
|
<view class="item-label">资产描述</view>
|
||||||
|
<view class="item-value">{{asset.remark || '未知'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<view class="row-item full-width">
|
||||||
|
<view class="item-label">商圈:</view>
|
||||||
|
<view class="item-value">{{ asset.bizZone || '暂无'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<view class="row-item full-width">
|
||||||
|
<view class="item-label">地址:</view>
|
||||||
|
<view class="item-value">{{ asset.address || '未知'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 地图位置 -->
|
||||||
|
<view class="map-container">
|
||||||
|
<map :latitude="asset.lat||'0'" :longitude="asset.lng|| '0'" :markers="markers"
|
||||||
|
style="width: 92%; height: 300rpx;"></map>
|
||||||
|
</view>
|
||||||
<!-- 预约弹窗 -->
|
<!-- 预约弹窗 -->
|
||||||
<u-popup v-model="showReserve" mode="bottom" border-radius="20">
|
<u-popup v-model="showReserve" mode="bottom" border-radius="20">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
@@ -90,17 +109,10 @@
|
|||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<!-- 底部导航栏 -->
|
<!-- 底部导航栏 -->
|
||||||
<assetBottomBar v-if="asset.status === '闲置中'"
|
<assetBottomBar v-if="asset.status === '闲置中'" :assetId="assetId" :phone="managerPhone"
|
||||||
:assetId="assetId"
|
@reserve="showReserve = true" btn-title="预约看资产" shareBtnTitle="分享资产"
|
||||||
:phone="managerPhone"
|
page-path="/pages-assets/assets/detail/assetsDetail" minicode-api="/pages-assets/assets/detail/assetsDetail"
|
||||||
@reserve="showReserve = true"
|
btnColor="#FF2F31" :query="assetId" />
|
||||||
btn-title="预约看资产"
|
|
||||||
shareBtnTitle="分享资产"
|
|
||||||
page-path="/pages-assets/assets/detail/assetsDetail"
|
|
||||||
minicode-api="/pages-assets/assets/detail/assetsDetail"
|
|
||||||
btnColor="#FF2F31"
|
|
||||||
:query="assetId"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -113,29 +125,6 @@
|
|||||||
CarouselVue
|
CarouselVue
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const staticAsset = {
|
|
||||||
name: '',
|
|
||||||
community: '',
|
|
||||||
code: '',
|
|
||||||
category: '',
|
|
||||||
area: 0,
|
|
||||||
value: 0,
|
|
||||||
rent: 0,
|
|
||||||
owner: '',
|
|
||||||
address: '',
|
|
||||||
lat: 0,
|
|
||||||
lng: 0,
|
|
||||||
images: [],
|
|
||||||
vrImage: '',
|
|
||||||
vr: '',
|
|
||||||
videos: [],
|
|
||||||
plans: [],
|
|
||||||
adImage: '',
|
|
||||||
remark: '',
|
|
||||||
isFavorite: false,
|
|
||||||
status: 0,
|
|
||||||
contact: ''
|
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
// 控制预约弹窗显示
|
// 控制预约弹窗显示
|
||||||
showReserve: false,
|
showReserve: false,
|
||||||
@@ -146,32 +135,31 @@
|
|||||||
assetId: null,
|
assetId: null,
|
||||||
// 直接使用静态数据
|
// 直接使用静态数据
|
||||||
asset: null,
|
asset: null,
|
||||||
managerPhone:null,
|
managerPhone: null,
|
||||||
// 根据静态数据初始化标记
|
// 根据静态数据初始化标记
|
||||||
vrList:[],
|
vrList: [],
|
||||||
markers: [{
|
markers: [],
|
||||||
id: 1,
|
|
||||||
latitude: staticAsset.lat,
|
|
||||||
longitude: staticAsset.lng,
|
|
||||||
title: staticAsset.name,
|
|
||||||
}],
|
|
||||||
background: {
|
background: {
|
||||||
backgroundColor: '#ffffff',
|
backgroundColor: '#ffffff',
|
||||||
// 渐变色
|
// 渐变色
|
||||||
// backgroundImage: 'linear-gradient(-90deg, #F9DED9 0%, #F8DFC0 99%);'
|
// backgroundImage: 'linear-gradient(-90deg, #F9DED9 0%, #F8DFC0 99%);'
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导航栏样式控制
|
// 导航栏样式控制
|
||||||
navbarStyle: {
|
navbarStyle: {
|
||||||
isTransparent: true,
|
isTransparent: true,
|
||||||
bgColor: '#ffffff',
|
bgColor: '#ffffff',
|
||||||
textColor: '#000000',
|
textColor: '#000000',
|
||||||
opacity: 0,
|
opacity: 1,
|
||||||
extraIcons: ['ellipsis', 'eye'] // 右侧额外图标
|
extraIcons: ['ellipsis'] // 右侧额外图标
|
||||||
},
|
},
|
||||||
|
|
||||||
// 滚动距离
|
// 滚动距离
|
||||||
scrollTop: 0
|
scrollTop: 0,
|
||||||
|
tagColors: [{
|
||||||
|
color: '#ffffff',
|
||||||
|
bg: '#FF2F31'
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -182,8 +170,8 @@
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const navbar = this.$refs.navbar;
|
const navbar = this.$refs.navbar;
|
||||||
const navHeight = navbar.navContentHeight; // 直接拿子组件 data
|
const navHeight = navbar.navContentHeight; // 直接拿子组件 data
|
||||||
this.navTotalHeight = navHeight; // 加上额外间距
|
this.navTotalHeight = navHeight; // 加上额外间距
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollTop = e.scrollTop;
|
this.scrollTop = e.scrollTop;
|
||||||
@@ -191,64 +179,56 @@
|
|||||||
this.updateNavbarStyle(e.scrollTop);
|
this.updateNavbarStyle(e.scrollTop);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
staticHost() {
|
staticHost() {
|
||||||
return this.$config.staticUrl
|
return this.$config.staticUrl
|
||||||
},
|
},
|
||||||
swiperList(){
|
swiperList() {
|
||||||
let list = [];
|
let list = [];
|
||||||
if(this.asset && this.asset.vrImgs && this.asset.vrImgs.length > 0) {
|
if (this.asset && this.asset.vrImgs && this.asset.vrImgs.length > 0) {
|
||||||
this.asset.vrImgs.forEach(img=> {
|
this.asset.vrImgs.forEach(img => {
|
||||||
list.push({
|
list.push({
|
||||||
src: this.$config.staticUrl + img,
|
src: this.$config.staticUrl + img,
|
||||||
mediaType:'vr',
|
mediaType: 'vr',
|
||||||
bizType:'vr'
|
bizType: 'vr'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// if(this.asset && this.asset.detailImgs && this.asset.detailImgs.length > 0) {
|
if (this.asset && this.asset.detailImgs && this.asset.detailImgs.length > 0) {
|
||||||
// this.asset.detailImgs.forEach(img=> {
|
this.asset.detailImgs.forEach(img => {
|
||||||
// list.push({
|
|
||||||
// src: this.$config.staticUrl + img,
|
|
||||||
// mediaType:'vr',
|
|
||||||
// bizType:'vr'
|
|
||||||
// })
|
|
||||||
// this.vrList.push(this.$config.staticUrl + img)
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
if(this.asset && this.asset.detailImgs && this.asset.detailImgs.length > 0) {
|
|
||||||
this.asset.detailImgs.forEach(img=> {
|
|
||||||
list.push({
|
list.push({
|
||||||
src: this.$config.staticUrl + img,
|
src: this.$config.staticUrl + img,
|
||||||
mediaType:'image',
|
mediaType: 'image',
|
||||||
bizType:'详细图片'
|
bizType: '详细图片'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 根据滚动距离更新导航栏样式
|
// 根据滚动距离更新导航栏样式
|
||||||
updateNavbarStyle(scrollTop) {
|
updateNavbarStyle(scrollTop) {
|
||||||
// 定义滚动阈值,超过此值导航栏变为不透明
|
// 定义滚动阈值,超过此值导航栏变为不透明
|
||||||
const threshold = 200;
|
const threshold = 200;
|
||||||
|
|
||||||
// 计算透明度
|
// 计算透明度
|
||||||
let opacity = scrollTop / threshold;
|
let opacity = scrollTop / threshold;
|
||||||
opacity = Math.min(opacity, 1);
|
opacity = Math.min(opacity, 1);
|
||||||
opacity = Math.max(opacity, 0);
|
opacity = Math.max(opacity, 0);
|
||||||
|
|
||||||
// 更新导航栏样式
|
|
||||||
this.navbarStyle.opacity = opacity;
|
|
||||||
|
|
||||||
if (opacity > 0.5) {
|
// 更新导航栏样式
|
||||||
this.navbarStyle.isTransparent = false;
|
// this.navbarStyle.opacity = opacity;
|
||||||
} else {
|
|
||||||
this.navbarStyle.isTransparent = true;
|
// if (opacity > 0.5) {
|
||||||
}
|
// this.navbarStyle.isTransparent = false;
|
||||||
|
// } else {
|
||||||
|
// this.navbarStyle.isTransparent = true;
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
getRandomColor() {
|
||||||
|
const index = Math.floor(Math.random() * this.tagColors.length)
|
||||||
|
return this.tagColors[index]
|
||||||
},
|
},
|
||||||
|
|
||||||
// 模拟接口请求
|
// 模拟接口请求
|
||||||
loadAssetDetail() {
|
loadAssetDetail() {
|
||||||
let url = `/assets/detail?id=${this.assetId}`
|
let url = `/assets/detail?id=${this.assetId}`
|
||||||
@@ -257,33 +237,34 @@
|
|||||||
console.log(data)
|
console.log(data)
|
||||||
this.asset = {
|
this.asset = {
|
||||||
name: data.assetsName,
|
name: data.assetsName,
|
||||||
community: data.community,
|
bizZone: data.bizZone,
|
||||||
code: data.assetsNo,
|
code: data.assetsNo,
|
||||||
category: data.assetsType,
|
type: data.assetsType,
|
||||||
area: data.footPrint,
|
area: data.footPrint,
|
||||||
value: data.assetsValue,
|
|
||||||
rent: data.rentFee,
|
rent: data.rentFee,
|
||||||
owner: data.owner,
|
|
||||||
address: data.assetsAddress,
|
address: data.assetsAddress,
|
||||||
|
hasLift: data.hasLift,
|
||||||
lat: data.latitude,
|
lat: data.latitude,
|
||||||
lng: data.longitude,
|
lng: data.longitude,
|
||||||
|
unitNo: data.unitNo,
|
||||||
roomNo: data.roomNo,
|
roomNo: data.roomNo,
|
||||||
floorNo: data.floorNo,
|
floorNo: data.floorNo,
|
||||||
description: data.assetsDesc,
|
description: data.assetsDesc,
|
||||||
detailImgs: data.detailImgs,
|
detailImgs: data.detailImgs,
|
||||||
|
layout: data.layout, //户型
|
||||||
|
orientation: data.orientation, //朝向
|
||||||
vrImgs: data.vrImgs,
|
vrImgs: data.vrImgs,
|
||||||
remark: data.assetsDesc,
|
remark: data.assetsDesc,
|
||||||
status: data.assetsStatus
|
status: data.assetsStatus,
|
||||||
|
features: ['家电齐全']
|
||||||
};
|
};
|
||||||
this.managerPhone = data.managerPhone
|
this.managerPhone = data.managerPhone
|
||||||
this.markers = [
|
this.markers = [{
|
||||||
{
|
id: 1,
|
||||||
id: 1,
|
latitude: this.asset.lat,
|
||||||
latitude: this.asset.lat,
|
longitude: this.asset.lng,
|
||||||
longitude: this.asset.lng,
|
title: this.asset.name,
|
||||||
title: this.asset.name,
|
}, ];
|
||||||
},
|
|
||||||
];
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log("获取资产信息失败:", err)
|
console.log("获取资产信息失败:", err)
|
||||||
})
|
})
|
||||||
@@ -299,13 +280,13 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
validatePhoneNumber(phone) {
|
validatePhoneNumber(phone) {
|
||||||
const regex = /^1[3-9]\d{9}$/;
|
const regex = /^1[3-9]\d{9}$/;
|
||||||
return regex.test(phone);
|
return regex.test(phone);
|
||||||
},
|
},
|
||||||
submitReserve() {
|
submitReserve() {
|
||||||
console.log('提交预约看房申请')
|
console.log('提交预约看房申请')
|
||||||
// 身份证校验
|
// 身份证校验
|
||||||
if (this.validatePhoneNumber(this.reservePhone)) {
|
if (!this.validatePhoneNumber(this.reservePhone)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '手机号格式不正确',
|
title: '手机号格式不正确',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -313,18 +294,18 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let url = '/reservate/submit'
|
let url = '/reservate/submit'
|
||||||
this.$u.post(url,{
|
this.$u.post(url, {
|
||||||
reserveName: this.reserveName,
|
reserveName: this.reserveName,
|
||||||
assetsNo: this.assetId,
|
assetsNo: this.assetId,
|
||||||
assetsName: this.asset.name,
|
assetsName: this.asset.name,
|
||||||
phone: this.reservePhone
|
phone: this.reservePhone
|
||||||
},{
|
}, {
|
||||||
WT: this.$getToken()
|
WT: this.$getToken()
|
||||||
}).then(res=>{
|
}).then(res => {
|
||||||
if(res.flag) {
|
if (res.flag) {
|
||||||
this.$mytip.toast('提交预约成功成功')
|
this.$mytip.toast('提交预约成功成功')
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
this.$mytip.toast('预约提交失败,请重试')
|
this.$mytip.toast('预约提交失败,请重试')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -332,17 +313,17 @@
|
|||||||
},
|
},
|
||||||
recordView(assetId) {
|
recordView(assetId) {
|
||||||
let token = this.$getToken()
|
let token = this.$getToken()
|
||||||
if(token){
|
if (token) {
|
||||||
let url = "/potential/add";
|
let url = "/potential/add";
|
||||||
this.$u.get(url, {
|
this.$u.get(url, {
|
||||||
assetId: this.assetId
|
assetId: this.assetId
|
||||||
}, {
|
}, {
|
||||||
'WT': this.$getToken()
|
'WT': this.$getToken()
|
||||||
}).then(obj => {
|
}).then(obj => {
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log("记录客户浏览记录失败", err)
|
console.log("记录客户浏览记录失败", err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -353,7 +334,7 @@
|
|||||||
.asset-detail {
|
.asset-detail {
|
||||||
background-color: #f7f8fa;
|
background-color: #f7f8fa;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding-bottom: 120rpx;
|
padding-bottom: 400rpx;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
/* 不再需要固定的顶部内边距,由动态计算的 navTotalHeight 控制 */
|
/* 不再需要固定的顶部内边距,由动态计算的 navTotalHeight 控制 */
|
||||||
}
|
}
|
||||||
@@ -383,6 +364,48 @@
|
|||||||
padding-top: 50rpx;
|
padding-top: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stress-info {
|
||||||
|
display: flex;
|
||||||
|
height: 150rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stress-item {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center; // 垂直居中
|
||||||
|
align-items: center; // 水平居中
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分隔线:不是最后一个才显示 */
|
||||||
|
.stress-item:not(:last-child)::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 25%;
|
||||||
|
width: 1px;
|
||||||
|
height: 50%;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上面的 value */
|
||||||
|
.stress-value {
|
||||||
|
font-size: 40rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #FF2F31;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下面的 label */
|
||||||
|
.stress-label {
|
||||||
|
margin-top: 8rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.info-header {
|
.info-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -405,13 +428,26 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rent-price {
|
.feature-list {
|
||||||
font-size: 36rpx;
|
display: flex;
|
||||||
color: #FF2F31;
|
flex-wrap: wrap;
|
||||||
margin: 15rpx 0;
|
gap: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.community-info,
|
.feature-tag {
|
||||||
|
padding: 6rpx 16rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featureArea{
|
||||||
|
margin-top: 30rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.address-info {
|
.address-info {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
@@ -429,9 +465,13 @@
|
|||||||
/* 地图容器 */
|
/* 地图容器 */
|
||||||
.map-container {
|
.map-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 168px;
|
||||||
|
padding: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 资产信息表格 */
|
/* 资产信息表格 */
|
||||||
@@ -442,7 +482,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table-title {
|
.table-title {
|
||||||
font-size: 30rpx;
|
font-size: 33rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
@@ -473,12 +513,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item-label {
|
.item-label {
|
||||||
font-size: 24rpx;
|
font-size: 26rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-value {
|
.item-value {
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
<!-- 关联合同 -->
|
<!-- 关联合同 -->
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<text class="label">关联合同</text>
|
<text class="label">关联合同</text>
|
||||||
<picker :range="contracts" range-key="name" @change="onContractChange">
|
<picker :range="contracts" range-key="contractName" @change="onContractChange">
|
||||||
<view class="picker-value">
|
<view class="picker-value">
|
||||||
{{ selectedContract ? selectedContract.name : '请选择合同' }}
|
{{ selectedContract ? selectedContract.contractName : '请选择合同' }}
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<text class="label">关联资产</text>
|
<text class="label">关联资产</text>
|
||||||
<view class="picker-value" @click="openAssetsPopup">
|
<view class="picker-value" @click="openAssetsPopup">
|
||||||
{{ selectedAssetsList.length
|
{{ selectedAssetsList.length
|
||||||
? selectedAssetsList.map(a => a.name).join(',')
|
? selectedAssetsList.map(a => a.assetsName).join(',')
|
||||||
: '请选择资产' }}
|
: '请选择资产' }}
|
||||||
<text v-if="selectedAssetsList.length">({{ selectedAssetsList.length }})</text>
|
<text v-if="selectedAssetsList.length">({{ selectedAssetsList.length }})</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -54,10 +54,10 @@
|
|||||||
<input v-model="assetSearch" placeholder="搜索资产" class="search-input" />
|
<input v-model="assetSearch" placeholder="搜索资产" class="search-input" />
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y style="height:500rpx;">
|
<scroll-view scroll-y style="height:500rpx;">
|
||||||
<checkbox-group v-model="selectedAssetsKeys">
|
<checkbox-group @change="onAssetsChange">
|
||||||
<label v-for="asset in filteredAssets" :key="asset.assetsNo"
|
<label v-for="asset in filteredAssets" :key="asset.assetsNo"
|
||||||
style="display:block;padding:12rpx 20rpx;border-bottom:1rpx solid #f0f0f0;">
|
style="display:block;padding:12rpx 20rpx;border-bottom:1rpx solid #f0f0f0;">
|
||||||
<checkbox :value="asset.assetsNo" /> {{ asset.name }}
|
<checkbox :value="asset.assetsNo" :checked="selectedAssetsKeys.includes(asset.assetsNo)" /> {{ asset.assetsName }}
|
||||||
</label>
|
</label>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -99,11 +99,14 @@
|
|||||||
onContractChange(e) {
|
onContractChange(e) {
|
||||||
const index = e.detail.value;
|
const index = e.detail.value;
|
||||||
this.selectedContract = this.contracts[index];
|
this.selectedContract = this.contracts[index];
|
||||||
this.assetsList = this.contracts[index].assets || [];
|
this.assetsList = this.contracts[index].assetsInfos || [];
|
||||||
// 清空之前选择
|
// 清空之前选择
|
||||||
this.selectedAssetsKeys = [];
|
this.selectedAssetsKeys = [];
|
||||||
this.selectedAssetsList = [];
|
this.selectedAssetsList = [];
|
||||||
},
|
},
|
||||||
|
onAssetsChange(e) {
|
||||||
|
this.selectedAssetsKeys = e.detail.value
|
||||||
|
},
|
||||||
openAssetsPopup() {
|
openAssetsPopup() {
|
||||||
if (!this.selectedContract) {
|
if (!this.selectedContract) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -115,6 +118,7 @@
|
|||||||
this.showAssetsPopup = true;
|
this.showAssetsPopup = true;
|
||||||
},
|
},
|
||||||
confirmAssets() {
|
confirmAssets() {
|
||||||
|
console.log(this.selectedAssetsKeys)
|
||||||
this.selectedAssetsList = this.assetsList.filter(a =>
|
this.selectedAssetsList = this.assetsList.filter(a =>
|
||||||
this.selectedAssetsKeys.includes(a.assetsNo)
|
this.selectedAssetsKeys.includes(a.assetsNo)
|
||||||
);
|
);
|
||||||
@@ -139,6 +143,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
let userInfo = uni.getStorageSync('userInfo');
|
||||||
|
if(!userInfo.cusNo) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '您还未实名',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
!this.selectedContract ||
|
!this.selectedContract ||
|
||||||
!this.cancelDate ||
|
!this.cancelDate ||
|
||||||
@@ -151,7 +163,7 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
contractNo: this.selectedContract.contractNo,
|
contractNo: this.selectedContract.contractNo,
|
||||||
cancelDate: this.cancelDate,
|
cancelDate: this.cancelDate,
|
||||||
@@ -174,7 +186,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$mytip.toast('提交退租申请失败')
|
this.$mytip.toast('提交退租申请失败:' + res.message )
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
@@ -259,8 +271,8 @@
|
|||||||
|
|
||||||
.popup-btn {
|
.popup-btn {
|
||||||
margin: 20rpx;
|
margin: 20rpx;
|
||||||
height: 60rpx;
|
height: 80rpx;
|
||||||
background: #007aff;
|
background: #FB392A;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
<!-- 合同名称和状态 -->
|
<!-- 合同名称和状态 -->
|
||||||
<view class="card-header">
|
<view class="card-header">
|
||||||
<text class="contract-name">{{ item.contractName }}</text>
|
<text class="contract-name">{{ item.contractName }}</text>
|
||||||
<text :class="['record-status', item.status]">
|
<text :class="['record-status', statusText(item.status)]">
|
||||||
{{ statusText(item.status) }}
|
{{ item.status||'未知' }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -22,13 +22,16 @@
|
|||||||
<!-- 预约时间 -->
|
<!-- 预约时间 -->
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="info-label">申请时间:</text>
|
<text class="info-label">申请时间:</text>
|
||||||
<text class="info-value"> {{item.applyTime}} </text>
|
<text class="info-value"> {{item.applyDate || ''}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="info-label">退租资产:</text>
|
<text class="info-label">退租资产:</text>
|
||||||
<text class="info-value"> {{item.dischargeItem}} </text>
|
<text class="info-value"> {{item.dischargeItem || ''}} </text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<text class="info-label">审批意见:</text>
|
||||||
|
<text class="info-value"> {{item.remark || ''}} </text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -40,9 +43,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!-- 底部新增留言按钮 -->
|
<!-- 底部新增留言按钮 -->
|
||||||
<view class="add-btn-container">
|
<!-- <view class="add-btn-container">
|
||||||
<button class="add-btn" @click="toApply()">新增退租申请</button>
|
<button class="add-btn" @click="toApply()">新增退租申请</button>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -60,12 +63,15 @@
|
|||||||
methods: {
|
methods: {
|
||||||
statusText(status) {
|
statusText(status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'pending':
|
case '申请中':
|
||||||
return '待确认';
|
case '已批准':
|
||||||
case 'done':
|
return 'pending';
|
||||||
return '已完成';
|
case '退租完成':
|
||||||
|
return 'done';
|
||||||
|
case '已驳回':
|
||||||
|
return 'reject';
|
||||||
default:
|
default:
|
||||||
return '未知';
|
return 'unknown';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formatDate(dateStr) {
|
formatDate(dateStr) {
|
||||||
@@ -92,7 +98,6 @@
|
|||||||
WT: this.$getToken()
|
WT: this.$getToken()
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const rows = res.data.result || [];
|
const rows = res.data.result || [];
|
||||||
console.log(rows)
|
|
||||||
if (this.pageNo === 1) this.flowList = [];
|
if (this.pageNo === 1) this.flowList = [];
|
||||||
this.flowList = this.flowList.concat(rows);
|
this.flowList = this.flowList.concat(rows);
|
||||||
if (rows.length < this.pageSize) {
|
if (rows.length < this.pageSize) {
|
||||||
@@ -188,14 +193,18 @@
|
|||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
|
|
||||||
&.done {
|
&.done {
|
||||||
background: #FCE5E0;
|
background: #FCE5E0; /* 保持原有浅橙色背景 */
|
||||||
color: #ED7748;
|
color: #ED7748; /* 保持原有橙色文字 */
|
||||||
}
|
}
|
||||||
|
|
||||||
&.pending {
|
&.pending {
|
||||||
background: #F2F3F7;
|
background: #F2F3F7;
|
||||||
color: #86868C;
|
color: #86868C;
|
||||||
}
|
}
|
||||||
|
&.reject {
|
||||||
|
background: #FFE4E1; /* 浅红色背景 */
|
||||||
|
color: #DC143C; /* 深红色文字 */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-content {
|
.card-content {
|
||||||
|
|||||||
@@ -28,10 +28,31 @@
|
|||||||
<!-- 新增留言弹窗 -->
|
<!-- 新增留言弹窗 -->
|
||||||
<u-popup v-model="showAddPopup" mode="center" length="60%">
|
<u-popup v-model="showAddPopup" mode="center" length="60%">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
|
<view class="asset-select" @click="showAssetsPopup = true">
|
||||||
|
<text v-if="!selectedAsset" class="placeholder">
|
||||||
|
请选择资产
|
||||||
|
</text>
|
||||||
|
<text v-else class="asset-text">
|
||||||
|
{{ selectedAsset.assetsName }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
<textarea v-model="newMessageContent" placeholder="请输入留言内容" class="textarea" />
|
<textarea v-model="newMessageContent" placeholder="请输入留言内容" class="textarea" />
|
||||||
<button class="popup-btn" @click="addFallback()">提交留言</button>
|
<button class="popup-btn" @click="addFallback()">提交留言</button>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<checkbox-group @change="onAssetChange">
|
||||||
|
<label
|
||||||
|
v-for="asset in filteredAssets"
|
||||||
|
:key="asset.assetsNo"
|
||||||
|
class="asset-item"
|
||||||
|
>
|
||||||
|
<checkbox
|
||||||
|
:value="asset.assetsNo"
|
||||||
|
:checked="selectedAssetKey === asset.assetsNo"
|
||||||
|
/>
|
||||||
|
{{ asset.assetsName }}
|
||||||
|
</label>
|
||||||
|
</checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -52,7 +73,12 @@
|
|||||||
loadStatus: 'loadmore',
|
loadStatus: 'loadmore',
|
||||||
isRefreshing: false,
|
isRefreshing: false,
|
||||||
// 滚动距离
|
// 滚动距离
|
||||||
scrollTop: 0
|
scrollTop: 0,
|
||||||
|
showAssetsPopup: false,
|
||||||
|
assetSearch: '',
|
||||||
|
assetsList: [],
|
||||||
|
selectedAssetKey: '', // 单个 assetsNo
|
||||||
|
selectedAsset: null // 单个资产对象
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@@ -73,6 +99,16 @@
|
|||||||
url: `/pages-assets/fallback/fallbackDetail?id=${item.id}`,
|
url: `/pages-assets/fallback/fallbackDetail?id=${item.id}`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
onAssetChange(e) {
|
||||||
|
const val = e.detail.value;
|
||||||
|
// 只取最后一个
|
||||||
|
this.selectedAssetKey = val.length ? val[val.length - 1] : '';
|
||||||
|
},
|
||||||
|
confirmAssets() {
|
||||||
|
this.selectedAsset =
|
||||||
|
this.assetsList.find(a => a.assetsNo === this.selectedAssetKey) || null;
|
||||||
|
this.showAssetsPopup = false;
|
||||||
|
},
|
||||||
fetchFallback() {
|
fetchFallback() {
|
||||||
if (this.loadStatus !== 'loadmore') return;
|
if (this.loadStatus !== 'loadmore') return;
|
||||||
this.loadStatus = 'loading';
|
this.loadStatus = 'loading';
|
||||||
@@ -109,6 +145,15 @@
|
|||||||
},
|
},
|
||||||
addFallback() {
|
addFallback() {
|
||||||
const content = this.newMessageContent.trim();
|
const content = this.newMessageContent.trim();
|
||||||
|
let userInfo = uni.getStorageSync('userInfo');
|
||||||
|
if(!userInfo.cusNo) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '您还未实名',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
this.showAddPopup = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!content) {
|
if (!content) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入留言内容',
|
title: '请输入留言内容',
|
||||||
@@ -123,13 +168,21 @@
|
|||||||
WT: token
|
WT: token
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
uni.showToast({
|
if(res.flag){
|
||||||
title: '留言成功',
|
uni.showToast({
|
||||||
icon: 'success'
|
title: '留言成功',
|
||||||
});
|
icon: 'success'
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
this.showAddPopup = false;
|
this.showAddPopup = false;
|
||||||
this.newMessageContent = '';
|
this.newMessageContent = '';
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error('新增留言失败:', err);
|
console.error('新增留言失败:', err);
|
||||||
@@ -245,7 +298,29 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #ADADB1;
|
color: #ADADB1;
|
||||||
}
|
}
|
||||||
|
/* 资产选择入口 */
|
||||||
|
.asset-select {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding: 20rpx 24rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
border: 1rpx solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 未选择时的占位文字 */
|
||||||
|
.asset-select .placeholder {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 已选择资产文字 */
|
||||||
|
.asset-select .asset-text {
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
.add-btn-container {
|
.add-btn-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<!-- 顶部tab切换 -->
|
<!-- 顶部tab切换 -->
|
||||||
<view class="tab-bar">
|
<view class="tab-bar">
|
||||||
<view v-for="(tab, index) in tabs" :key="index"
|
<view v-for="(tab, index) in tabs" :key="index"
|
||||||
:class="['tab-item', activeTab === tab.value ? 'active' : '']" @click="activeTab = tab.value">
|
:class="['tab-item', activeTab === tab.value ? 'active' : '']" @click="onTabClick(tab.value)">
|
||||||
{{ tab.label }}
|
{{ tab.label }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
<!-- 右侧金额 + 图标 -->
|
<!-- 右侧金额 + 图标 -->
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="amount" :class="item.inOutType === '收' ? 'income' : 'expense'">
|
<view class="amount" :class="item.inOutType === '支' ? 'income' : 'expense'">
|
||||||
{{ item.inOutType === '收' ? '+' : '-' }}{{ item.itemAmount.toFixed(2) }}
|
{{ item.inOutType === '支' ? '+' : '-' }}{{ formatMoney(item.itemAmount) }}
|
||||||
</view>
|
</view>
|
||||||
<u-icon name="arrow-right" size="32" color="#ccc"></u-icon>
|
<u-icon name="arrow-right" size="32" color="#ccc"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -71,14 +71,14 @@
|
|||||||
pageSize:10,
|
pageSize:10,
|
||||||
flowList: [],
|
flowList: [],
|
||||||
loadStatus: 'loadmore',
|
loadStatus: 'loadmore',
|
||||||
activeTab: 'in', // 默认显示“收”
|
activeTab: '收', // 默认显示“收”
|
||||||
tabs: [{
|
tabs: [{
|
||||||
label: '收入',
|
label: '收入',
|
||||||
value: 'in'
|
value: '支'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '支出',
|
label: '支出',
|
||||||
value: 'out'
|
value: '收'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 年份筛选相关
|
// 年份筛选相关
|
||||||
@@ -109,6 +109,10 @@
|
|||||||
computed: {
|
computed: {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onTabClick(val) {
|
||||||
|
this.activeTab = val
|
||||||
|
this.resetAndLoad()
|
||||||
|
},
|
||||||
fetchPayRecord() {
|
fetchPayRecord() {
|
||||||
if (this.loadStatus !== 'loadmore') return;
|
if (this.loadStatus !== 'loadmore') return;
|
||||||
this.loadStatus = 'loading';
|
this.loadStatus = 'loading';
|
||||||
@@ -122,7 +126,6 @@
|
|||||||
WT:this.$getToken()
|
WT:this.$getToken()
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const rows = res.data.result || [];
|
const rows = res.data.result || [];
|
||||||
console.log(rows)
|
|
||||||
if (this.pageNo === 1) this.flowList = [];
|
if (this.pageNo === 1) this.flowList = [];
|
||||||
this.flowList = this.flowList.concat(rows);
|
this.flowList = this.flowList.concat(rows);
|
||||||
if (rows.length < this.pageSize) {
|
if (rows.length < this.pageSize) {
|
||||||
@@ -146,10 +149,14 @@
|
|||||||
this.showYearPicker = false;
|
this.showYearPicker = false;
|
||||||
this.resetAndLoad();
|
this.resetAndLoad();
|
||||||
},
|
},
|
||||||
|
formatMoney(val) {
|
||||||
|
if (!val && val !== 0) return '—';
|
||||||
|
return '¥' + Number(val).toFixed(2);
|
||||||
|
},
|
||||||
resetAndLoad(){
|
resetAndLoad(){
|
||||||
// 重新加载数据
|
// 重新加载数据
|
||||||
|
this.loadStatus = 'loadmore';
|
||||||
this.pageNo = 1;
|
this.pageNo = 1;
|
||||||
this.flowList = [];
|
|
||||||
this.fetchPayRecord();
|
this.fetchPayRecord();
|
||||||
},
|
},
|
||||||
loadMore() {
|
loadMore() {
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ export default {
|
|||||||
this.$u.post('/contract/queryPage', {
|
this.$u.post('/contract/queryPage', {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
startTime: this.startDate,
|
startDate: this.startDate,
|
||||||
endTime: this.endDate,
|
endDate: this.endDate,
|
||||||
signStatus: this.statusFilter
|
signStatus: this.statusFilter
|
||||||
}, {
|
}, {
|
||||||
WT: this.$getToken()
|
WT: this.$getToken()
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
<view class="title">当前定位</view>
|
<view class="title">当前定位</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image src="../../static/navigate.png" mode="widthFix" class="img"></image>
|
<image src="/static/navigate.png" mode="widthFix" class="img"></image>
|
||||||
{{locationCity}}
|
{{locationCity || '宜昌市'}}
|
||||||
</view>
|
</view>
|
||||||
<view class="right">切换城市</view>
|
<view class="right">切换城市</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import wxGetAddress from '@/common/utils/wxGetAddress.js'
|
import wxGetAddress from '@/common/utils/wxGetAddress.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="login-container">
|
<view class="login-container">
|
||||||
<!-- 顶部状态栏 -->
|
<!-- 顶部状态栏 -->
|
||||||
<view class="status-bar"> <u-icon :name="btn.icon" :color="btn.color || '#333'" :size="btn.size || 40"></u-icon>
|
<!-- <view class="status-bar">
|
||||||
</view>
|
<u-icon name="arrow-left" size="40" color="#333" @tap="goBack" class="nav-left"></u-icon>
|
||||||
|
<u-icon :name="btn.icon" :color="btn.color || '#333'" :size="btn.size || 40"></u-icon>
|
||||||
|
</view> -->
|
||||||
|
<customNavbar opacity="0" :show-home="true" :show-back="false" :is-transparent="true" />
|
||||||
|
|
||||||
<!-- 主体内容区 -->
|
<!-- 主体内容区 -->
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@@ -51,7 +54,8 @@
|
|||||||
screenWidth: 0,
|
screenWidth: 0,
|
||||||
scale: 1,
|
scale: 1,
|
||||||
loginType: "0",
|
loginType: "0",
|
||||||
agreeProtocol: false
|
agreeProtocol: false,
|
||||||
|
menuRect: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -62,10 +66,12 @@
|
|||||||
this.scale = this.screenWidth / this.designWidth
|
this.scale = this.screenWidth / this.designWidth
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const menuRect = wx.getMenuButtonBoundingClientRect()
|
||||||
|
this.menuRect = menuRect
|
||||||
},
|
},
|
||||||
|
|
||||||
onUnload() {
|
onUnload() {
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// title 样式
|
// title 样式
|
||||||
@@ -82,6 +88,15 @@
|
|||||||
textAlign: 'center'
|
textAlign: 'center'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
navStyle() {
|
||||||
|
const rect = this.menuRect
|
||||||
|
if (!rect.top) return {}
|
||||||
|
return {
|
||||||
|
paddingTop: rect.top + 'px',
|
||||||
|
height: rect.height + 'px',
|
||||||
|
lineHeight: rect.height + 'px'
|
||||||
|
}
|
||||||
|
},
|
||||||
staticHost() {
|
staticHost() {
|
||||||
return this.$config.staticUrl
|
return this.$config.staticUrl
|
||||||
},
|
},
|
||||||
@@ -119,7 +134,13 @@
|
|||||||
}
|
}
|
||||||
this.doLogin(code);
|
this.doLogin(code);
|
||||||
},
|
},
|
||||||
|
goBack() {
|
||||||
|
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
/** 执行登录逻辑 */
|
/** 执行登录逻辑 */
|
||||||
async doLogin(phoneGetCode) {
|
async doLogin(phoneGetCode) {
|
||||||
if (!this.agreeProtocol) {
|
if (!this.agreeProtocol) {
|
||||||
@@ -142,19 +163,17 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 调用后端登录接口
|
// 调用后端登录接口
|
||||||
const authRes = await this.$u.post(`/login/weChatLogin`, {
|
const authRes = await this.$u.post(`/login/weChatLogin`, {
|
||||||
phoneGetCode: phoneGetCode,
|
phoneGetCode: phoneGetCode,
|
||||||
loginCode: loginRes.code,
|
loginCode: loginRes.code,
|
||||||
loginType: this.loginType
|
loginType: this.loginType
|
||||||
});
|
});
|
||||||
|
|
||||||
// let tempToken = 'asd5646'
|
|
||||||
// 保存token
|
// 保存token
|
||||||
let token = authRes.data;
|
let token = authRes.data;
|
||||||
this.$u.vuex('vuex_token', token);
|
this.$u.vuex('vuex_token', token);
|
||||||
// this.$u.vuex('vuex_token', tempToken);
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
this.getUserOtherInfo(this.loginType,token)
|
this.getUserOtherInfo(this.loginType, token)
|
||||||
// 跳转首页
|
// 跳转首页
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
@@ -172,24 +191,17 @@
|
|||||||
'WT': token,
|
'WT': token,
|
||||||
'USERTYPE': loginType
|
'USERTYPE': loginType
|
||||||
}).then(obj => {
|
}).then(obj => {
|
||||||
if(obj.flag){
|
if (obj.flag) {
|
||||||
uni.setStorageSync('userInfo', {
|
uni.setStorageSync('userInfo', {
|
||||||
userType: obj.data.userType,
|
userType: obj.data.userType,
|
||||||
oaAuth: obj.data.oaAuth,
|
oaAuth: obj.data.oaAuth,
|
||||||
cusNo: obj.data.cusNo,
|
cusNo: obj.data.cusNo,
|
||||||
userName: obj.data.userName,
|
userName: obj.data.userName,
|
||||||
openId: obj.data.openId
|
openId: obj.data.openId,
|
||||||
|
subscribe: obj.data.subscribeMsg
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// let tempUser = {
|
|
||||||
// userType: '0',
|
|
||||||
// oaAuth: '1',
|
|
||||||
// cusNo: 'cus0001',
|
|
||||||
// openId: '65456asd'
|
|
||||||
// }
|
|
||||||
// uni.setStorageSync('userInfo', tempUser)
|
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 触发手机号选择(子组件 → 父组件) */
|
/** 触发手机号选择(子组件 → 父组件) */
|
||||||
showPhoneSelector(phoneList, openid) {
|
showPhoneSelector(phoneList, openid) {
|
||||||
@@ -220,8 +232,18 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.status-bar {
|
.status-bar {
|
||||||
margin-top: 7.56%;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-top: 11.56%;
|
||||||
height: var(--status-bar-height);
|
height: var(--status-bar-height);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-left {
|
||||||
|
width: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
padding-left: 5%;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
@@ -267,8 +289,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-type {
|
.user-type {
|
||||||
display: flex; justify-content: center;
|
display: flex;
|
||||||
gap: 40rpx;
|
justify-content: center;
|
||||||
|
gap: 40rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
:show-with-animation="true"
|
:show-with-animation="true"
|
||||||
:selectable="true"></u-parse>
|
:selectable="true"></u-parse>
|
||||||
</view>
|
</view>
|
||||||
|
<u-swiper :list="imgList" @change="change"></u-swiper>
|
||||||
|
<view v-for="(item,index) in attachments" :key="index">
|
||||||
|
<text @click="download(item)">{{ item.fileName }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -16,7 +20,9 @@
|
|||||||
return {
|
return {
|
||||||
id:null,
|
id:null,
|
||||||
title:'资讯',
|
title:'资讯',
|
||||||
content: ``
|
content: ``,
|
||||||
|
imgList:[],
|
||||||
|
attachments:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@@ -31,8 +37,25 @@
|
|||||||
if(res.flag) {
|
if(res.flag) {
|
||||||
this.title = res.data.noticeTitle;
|
this.title = res.data.noticeTitle;
|
||||||
this.content = res.data.noticeContent;
|
this.content = res.data.noticeContent;
|
||||||
|
if(res.data.imgs) {
|
||||||
|
const _this = this;
|
||||||
|
res.data.imgs.forEach(img=>{
|
||||||
|
_this.imgList.push(_this.$config.staticUrl + img)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.attachments = res.data.attachments;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
download(item){
|
||||||
|
uni.downloadFile({
|
||||||
|
url: this.$config.staticUrl + item.url,
|
||||||
|
success(res) {
|
||||||
|
uni.openDocument({
|
||||||
|
filePath: res.tempFilePath
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,8 +100,7 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let life = uni.getStorageSync('lifeData') || {}
|
let token = this.$getToken()
|
||||||
let token = life.vuex_token
|
|
||||||
let url = "/login/updateVerifyCode";
|
let url = "/login/updateVerifyCode";
|
||||||
let encryptCode = rsaEncrypt(this.authCode);
|
let encryptCode = rsaEncrypt(this.authCode);
|
||||||
this.$u.post(url, {
|
this.$u.post(url, {
|
||||||
@@ -147,9 +146,9 @@
|
|||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 此处执行微信才执行
|
// 此处执行微信才执行
|
||||||
// #endif
|
// #endif
|
||||||
|
uni.removeStorageSync('userInfo');
|
||||||
let token = this.$getToken();
|
let token = this.$getToken();
|
||||||
let loginType = this.user.userType
|
let url = `/login/userInfo`;
|
||||||
let url = `/login/userInfo?loginType=${loginType}`;
|
|
||||||
this.$u.get(url, {}, {
|
this.$u.get(url, {}, {
|
||||||
'WT': token
|
'WT': token
|
||||||
}).then(obj => {
|
}).then(obj => {
|
||||||
@@ -158,7 +157,8 @@
|
|||||||
oaAuth: obj.data.oaAuth,
|
oaAuth: obj.data.oaAuth,
|
||||||
cusNo: obj.data.cusNo,
|
cusNo: obj.data.cusNo,
|
||||||
userName: obj.data.userName,
|
userName: obj.data.userName,
|
||||||
openId: obj.data.openId
|
openId: obj.data.openId,
|
||||||
|
subscribe: obj.data.subscribeMsg
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
<view class="setting-content">
|
<view class="setting-content">
|
||||||
<u-cell-group>
|
<u-cell-group>
|
||||||
<u-cell-item title="账号实名信息" @click="profile"></u-cell-item>
|
<u-cell-item title="账号实名信息" @click="profile"></u-cell-item>
|
||||||
<!-- <u-cell-item title="订阅系统消息" :arrow="false">
|
<u-cell-item title="订阅系统消息" :arrow="false">
|
||||||
|
|
||||||
<u-switch v-model="longSubscribe" @change="toggleLongSubscribe" />
|
<u-switch v-model="longSubscribe" @change="toggleLongSubscribe" />
|
||||||
|
|
||||||
</u-cell-item> -->
|
</u-cell-item>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -30,6 +30,10 @@
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow(){
|
||||||
|
let user = uni.getStorageSync('userInfo');
|
||||||
|
this.longSubscribe = user.subscribe;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
profile() {
|
profile() {
|
||||||
@@ -49,7 +53,7 @@
|
|||||||
// 微信小程序专用
|
// 微信小程序专用
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
if (this.longSubscribe) {
|
if (this.longSubscribe) {
|
||||||
const tmplIds = ['TEMPLATE_ID_1', 'TEMPLATE_ID_2'] // 在小程序后台配置的长期订阅模板
|
const tmplIds = ['ZVl9bkFv8Nzha2n_6wO36IBqe0H5VwJBvV-7OkVT5jo'] // 在小程序后台配置的长期订阅模板
|
||||||
wx.requestSubscribeMessage({
|
wx.requestSubscribeMessage({
|
||||||
tmplIds,
|
tmplIds,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
@@ -89,6 +93,12 @@
|
|||||||
saveLongSubscribeStatus(enable) {
|
saveLongSubscribeStatus(enable) {
|
||||||
// TODO: 后端保存用户长期订阅状态
|
// TODO: 后端保存用户长期订阅状态
|
||||||
console.log('保存长期订阅状态到后端', enable)
|
console.log('保存长期订阅状态到后端', enable)
|
||||||
|
let token = this.$getToken();
|
||||||
|
let url = `/login/subscribeMsg?subscribe=${enable}`;
|
||||||
|
this.$u.get(url, {}, {
|
||||||
|
'WT': token
|
||||||
|
}).then(obj => {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
callManager(phone) {
|
callManager(phone) {
|
||||||
if (!phone) return;
|
if (!phone) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂无管家联系方式',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
uni.makePhoneCall({ phoneNumber: phone });
|
uni.makePhoneCall({ phoneNumber: phone });
|
||||||
},
|
},
|
||||||
loadMore() {
|
loadMore() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="u-margin-left-20 u-margin-right-20">
|
<view class="u-margin-left-20 u-margin-right-20">
|
||||||
<u-navbar :is-back="true" title="搜索" :border-bottom="false"></u-navbar>
|
<u-navbar :is-back="true" title="搜索" :border-bottom="false"></u-navbar>
|
||||||
<u-search placeholder="请输入资产名称/街道/位置等信息" v-model="keyword" @search="clickSearch(value)"
|
<u-search placeholder="请输入资产名称/位置等信息" v-model="keyword" @search="clickSearch(value)"
|
||||||
:focus="true" action-text="取消" @custom="cancelSearch"></u-search>
|
:focus="true" action-text="取消" @custom="cancelSearch"></u-search>
|
||||||
<!-- 搜索记录 -->
|
<!-- 搜索记录 -->
|
||||||
<template v-if="historyList.length > 0">
|
<template v-if="historyList.length > 0">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- 搜索栏 -->
|
<!-- 搜索栏 -->
|
||||||
<view class="search-bar-wrapper">
|
<view class="search-bar-wrapper">
|
||||||
<view class="search-bar">
|
<view class="search-bar">
|
||||||
<view class="city-select" @click="location()">{{ city ||'宜昌'}} <text class="icon-down"></text>
|
<view class="city-select" @click="location()">{{ city ||'宜昌市'}} <text class="icon-down"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-input" @click="search">
|
<view class="search-input" @click="search">
|
||||||
<text class="icon-search"></text>
|
<text class="icon-search"></text>
|
||||||
@@ -42,12 +42,12 @@
|
|||||||
<u-lazy-load threshold="750" border-radius="8" :image="item.coverImgUrl" :index="index"
|
<u-lazy-load threshold="750" border-radius="8" :image="item.coverImgUrl" :index="index"
|
||||||
@click="clickImage(item.assetsNo)" mode="aspectFill"></u-lazy-load>
|
@click="clickImage(item.assetsNo)" mode="aspectFill"></u-lazy-load>
|
||||||
<view class="item-title">{{ item.assetsName }}</view>
|
<view class="item-title">{{ item.assetsName }}</view>
|
||||||
<view class="item-desc">{{ item.assetsType }} {{ item.footPrint }}㎡ {{ item.orientation }}
|
<view class="item-desc">{{ item.assetsType }} {{ item.footPrint }}㎡ {{ item.orientation ||'未知'}}
|
||||||
</view>
|
</view>
|
||||||
<view class="item-tags">
|
<view class="item-tags">
|
||||||
<view class="tag" v-for="(tag, tagIndex) in item.tags" :key="tagIndex">{{ tag }}</view>
|
<view class="tag" v-for="(tag, tagIndex) in item.tags" :key="tagIndex">{{ tag }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-price">¥{{ item.rentFee }}/<text>月</text></view>
|
<view class="item-price">¥{{ item.rentFee || '未知'}}/<text>月</text></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:right="{ rightList }">
|
<template v-slot:right="{ rightList }">
|
||||||
@@ -55,11 +55,11 @@
|
|||||||
<u-lazy-load threshold="750" border-radius="8" :image="item.coverImgUrl" :index="index"
|
<u-lazy-load threshold="750" border-radius="8" :image="item.coverImgUrl" :index="index"
|
||||||
@click="clickImage(item.assetsNo)" mode="aspectFill"></u-lazy-load>
|
@click="clickImage(item.assetsNo)" mode="aspectFill"></u-lazy-load>
|
||||||
<view class="item-title">{{ item.assetsName }}</view>
|
<view class="item-title">{{ item.assetsName }}</view>
|
||||||
<view class="item-desc">{{ item.assetsType}} {{ item.footPrint }}㎡ {{ item.orientation }}</view>
|
<view class="item-desc">{{ item.assetsType}} {{ item.footPrint }}㎡ {{ item.orientation ||'未知'}}</view>
|
||||||
<view class="item-tags">
|
<view class="item-tags">
|
||||||
<view class="tag" v-for="(tag, tagIndex) in item.tags" :key="tagIndex">{{ tag }}</view>
|
<view class="tag" v-for="(tag, tagIndex) in item.tags" :key="tagIndex">{{ tag }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-price">¥{{ item.rentFee }}/<text>月</text></view>
|
<view class="item-price">¥{{ item.rentFee || '未知'}}/<text>月</text></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-waterfall>
|
</u-waterfall>
|
||||||
@@ -81,9 +81,11 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
keyWord: null,
|
|
||||||
city: null,
|
city: null,
|
||||||
streetList: [],
|
selectedBizZone: null,
|
||||||
|
selectedLayout: null,
|
||||||
|
selectedDecorationStatus: null,
|
||||||
|
selectedFeatures:[],
|
||||||
indexArr: [],
|
indexArr: [],
|
||||||
valueArr: [],
|
valueArr: [],
|
||||||
defaultSelected: [],
|
defaultSelected: [],
|
||||||
@@ -109,9 +111,6 @@
|
|||||||
let villageName = option.villageName
|
let villageName = option.villageName
|
||||||
let lifeData = uni.getStorageSync('lifeData');
|
let lifeData = uni.getStorageSync('lifeData');
|
||||||
let vuex_city = lifeData.vuex_city
|
let vuex_city = lifeData.vuex_city
|
||||||
if (option.keyword) {
|
|
||||||
this.keyWord = option.keyword
|
|
||||||
}
|
|
||||||
this.city = vuex_city
|
this.city = vuex_city
|
||||||
this.searchData = {}
|
this.searchData = {}
|
||||||
if (type) {
|
if (type) {
|
||||||
@@ -120,9 +119,9 @@
|
|||||||
if (villageName) {
|
if (villageName) {
|
||||||
this.searchData.villageName = villageName
|
this.searchData.villageName = villageName
|
||||||
}
|
}
|
||||||
this.resetAndLoad()
|
// 获取街道数据
|
||||||
// 获取小区数据
|
this.findFilterTabData()
|
||||||
this.findVillageList()
|
this.findHouseList(null,option.keyword)
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollTop = e.scrollTop;
|
this.scrollTop = e.scrollTop;
|
||||||
@@ -167,13 +166,12 @@
|
|||||||
this.pageNo = 1;
|
this.pageNo = 1;
|
||||||
this.flowList = [];
|
this.flowList = [];
|
||||||
this.loadStatus = 'loadmore';
|
this.loadStatus = 'loadmore';
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.uWaterfall && this.$refs.uWaterfall.clear();
|
this.$refs.uWaterfall && this.$refs.uWaterfall.clear();
|
||||||
this.findHouseList();
|
this.findHouseList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
findHouseList(type = null) {
|
findHouseList(type = null,keyWord = null) {
|
||||||
if (this.loadStatus !== 'loadmore') return;
|
if (this.loadStatus !== 'loadmore') return;
|
||||||
|
|
||||||
this.loadStatus = 'loading';
|
this.loadStatus = 'loading';
|
||||||
@@ -183,18 +181,16 @@
|
|||||||
assetsType: type,
|
assetsType: type,
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
keyWord: this.keyWord
|
keyWord: this.keyWord,
|
||||||
|
bizZone: this.searchData.bizZone
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
|
|
||||||
const rows = result.data.result || [];
|
const rows = result.data.result || [];
|
||||||
|
|
||||||
// 第一页无数据
|
// 第一页无数据
|
||||||
if (this.pageNo === 1 && rows.length === 0) {
|
if (this.pageNo === 1 && rows.length === 0) {
|
||||||
this.flowList = [];
|
this.flowList = [];
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rows.forEach(row => {
|
rows.forEach(row => {
|
||||||
if (row.coverImgUrl) {
|
if (row.coverImgUrl) {
|
||||||
row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
|
row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
|
||||||
@@ -204,7 +200,6 @@
|
|||||||
})
|
})
|
||||||
// 追加数据
|
// 追加数据
|
||||||
this.flowList = this.flowList.concat(rows);
|
this.flowList = this.flowList.concat(rows);
|
||||||
|
|
||||||
// 判断是否还有下一页(核心)
|
// 判断是否还有下一页(核心)
|
||||||
if (rows.length < this.pageSize) {
|
if (rows.length < this.pageSize) {
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
@@ -212,6 +207,7 @@
|
|||||||
this.pageNo++; // ✅ 只有这里能 +1
|
this.pageNo++; // ✅ 只有这里能 +1
|
||||||
this.loadStatus = 'loadmore';
|
this.loadStatus = 'loadmore';
|
||||||
}
|
}
|
||||||
|
this.keyWord = null
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log("获取资产信息失败:", err);
|
console.log("获取资产信息失败:", err);
|
||||||
@@ -226,40 +222,48 @@
|
|||||||
// 调用接口获取下一页
|
// 调用接口获取下一页
|
||||||
this.findHouseList();
|
this.findHouseList();
|
||||||
},
|
},
|
||||||
findStreet() {
|
async findFilterTabData() {
|
||||||
|
// 填充商圈数据到筛选菜单
|
||||||
|
const bizZones = await this.getBizZone();
|
||||||
|
const features = await this.getFeatures();
|
||||||
|
let featureSubMenu = [];
|
||||||
|
for (let i = 0; i < bizZones.length; i++) {
|
||||||
|
searchData[0].submenu.push({
|
||||||
|
name: bizZones[i],
|
||||||
|
value: bizZones[i]
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
for (let i = 0; i < features.length; i++) {
|
||||||
|
featureSubMenu.push({
|
||||||
|
name: features[i],
|
||||||
|
value: features[i]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
searchData[2].submenu.push({
|
||||||
|
name:"基础配套",
|
||||||
|
type:"radio-multi",
|
||||||
|
submenu: featureSubMenu
|
||||||
|
})
|
||||||
|
this.filterData = searchData;
|
||||||
},
|
},
|
||||||
findVillageList() {
|
async getFeatures(){
|
||||||
// 前端写死的测试小区数据
|
const res = await this.$u.get('/assets/getFeatures');
|
||||||
// const villageData = [{
|
if (res.flag) {
|
||||||
// name: '景秀天成'
|
return res.data;
|
||||||
// },
|
}
|
||||||
// {
|
return [];
|
||||||
// name: '锦绣花园'
|
},
|
||||||
// },
|
async getBizZone(){
|
||||||
// {
|
const res = await this.$u.get('/assets/getBizZones');
|
||||||
// name: '阳光小区'
|
if (res.flag) {
|
||||||
// },
|
return res.data;
|
||||||
// {
|
}
|
||||||
// name: '幸福家园'
|
return [];
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '碧水湾'
|
|
||||||
// }
|
|
||||||
// ];
|
|
||||||
|
|
||||||
// 添加测试小区数据到筛选菜单
|
|
||||||
// for (let i = 0; i < villageData.length; i++) {
|
|
||||||
// searchData[0].submenu.push({
|
|
||||||
// name: villageData[i].name,
|
|
||||||
// value: villageData[i].name
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// this.filterData = searchData;
|
|
||||||
},
|
},
|
||||||
clickImage(houseId) {
|
clickImage(houseId) {
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pages-assets/assets/detail',
|
url: '/pages-assets/assets/assetsDetail',
|
||||||
params: {
|
params: {
|
||||||
assetsNo: houseId
|
assetsNo: houseId
|
||||||
}
|
}
|
||||||
@@ -267,25 +271,21 @@
|
|||||||
},
|
},
|
||||||
//接收菜单结果
|
//接收菜单结果
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
let type = e.value[1][0]
|
let bizZone = e.value[0][0]
|
||||||
let villageName = e.value[0][0]
|
let price = e.value[1][0]
|
||||||
let price = e.value[2][0]
|
let combo = e.value[2]
|
||||||
let combo = e.value[3]
|
let layout = combo[0]
|
||||||
let houseNum = combo[0]
|
|
||||||
let decoration = combo[1]
|
let decoration = combo[1]
|
||||||
let feature = combo[2]
|
let feature = combo[2]
|
||||||
this.searchData = {}
|
this.searchData = {}
|
||||||
if (type) {
|
if (bizZone) {
|
||||||
this.searchData.type = type
|
this.searchData.bizZone = bizZone
|
||||||
}
|
|
||||||
if (villageName) {
|
|
||||||
this.searchData.villageName = villageName
|
|
||||||
}
|
}
|
||||||
if (price) {
|
if (price) {
|
||||||
this.searchData.price = price
|
this.searchData.price = price
|
||||||
}
|
}
|
||||||
if (houseNum && houseNum.length > 0) {
|
if (layout && layout.length > 0) {
|
||||||
this.searchData.houseNum = houseNum.toString()
|
this.searchData.layout = layout.toString()
|
||||||
}
|
}
|
||||||
if (decoration && decoration.length > 0) {
|
if (decoration && decoration.length > 0) {
|
||||||
this.searchData.decoration = decoration.toString()
|
this.searchData.decoration = decoration.toString()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view class="calculator">
|
<view class="calculator">
|
||||||
<customNavbar title="计算器" :showHome="true" />
|
<customNavbar title="计算器" :showHome="true" />
|
||||||
|
|
||||||
<input class="display" v-model="expression" disabled />
|
<textarea class="display" auto-height v-model="expression" disabled />
|
||||||
|
|
||||||
<view class="keys">
|
<view class="keys">
|
||||||
<view
|
<view
|
||||||
@@ -36,8 +36,7 @@ export default {
|
|||||||
'4','5','6','*',
|
'4','5','6','*',
|
||||||
'1','2','3','-',
|
'1','2','3','-',
|
||||||
'0','.','%','+',
|
'0','.','%','+',
|
||||||
'C','⌫',
|
'C','⌫','='
|
||||||
'='
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -186,9 +185,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.display {
|
.display {
|
||||||
height: 120rpx;
|
font-size: 70rpx;
|
||||||
font-size: 44rpx;
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
min-height: 400rpx;
|
||||||
|
width: 95%;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
@@ -206,7 +206,7 @@ export default {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 36rpx 0;
|
padding: 36rpx 0;
|
||||||
font-size: 36rpx;
|
font-size: 70rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
box-shadow: 0 10rpx 20rpx rgba(0,0,0,0.08);
|
box-shadow: 0 10rpx 20rpx rgba(0,0,0,0.08);
|
||||||
@@ -220,7 +220,7 @@ export default {
|
|||||||
background: #ffe8d9;
|
background: #ffe8d9;
|
||||||
color: #ff7a18;
|
color: #ff7a18;
|
||||||
box-shadow: 0 10rpx 20rpx rgba(255,122,24,0.35);
|
box-shadow: 0 10rpx 20rpx rgba(255,122,24,0.35);
|
||||||
font-size: 40rpx;
|
font-size: 70rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.control {
|
.control {
|
||||||
@@ -230,10 +230,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.equal {
|
.equal {
|
||||||
grid-column: span 4;
|
width: 215%;
|
||||||
background: linear-gradient(135deg, #4facfe, #00f2fe);
|
background: linear-gradient(135deg, #4facfe, #00f2fe);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 44rpx;
|
font-size: 70rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
box-shadow: 0 12rpx 28rpx rgba(79,172,254,0.5);
|
box-shadow: 0 12rpx 28rpx rgba(79,172,254,0.5);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
this.selectedBills = this.selectedBills.filter(b => b.id !== item.id);
|
this.selectedBills = this.selectedBills.filter(b => b.id !== item.id);
|
||||||
}
|
}
|
||||||
let sumFee = 0;
|
let sumFee = 0;
|
||||||
this.selectedBills.forEach(b => sumFee += b.amount);
|
this.selectedBills.forEach(b => sumFee += b.billAmount);
|
||||||
this.sumAmount = sumFee;
|
this.sumAmount = sumFee;
|
||||||
},
|
},
|
||||||
updateSelected() {
|
updateSelected() {
|
||||||
|
|||||||
@@ -1,438 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="vr-page">
|
<web-view :src="src + id"></web-view>
|
||||||
<!-- 返回按钮 -->
|
|
||||||
<view class="back-btn" @click="back">‹ 返回</view>
|
|
||||||
|
|
||||||
<!-- 主 Canvas -->
|
|
||||||
<canvas canvas-id="vrCanvas" class="vr-canvas" @touchstart="onTouchStart" @touchmove="onTouchMove"
|
|
||||||
@touchend="onTouchEnd"></canvas>
|
|
||||||
|
|
||||||
<!-- 左上角 3D mini preview -->
|
|
||||||
<canvas v-if="currentSpace.type==='model'" canvas-id="miniCanvas" class="mini-canvas"></canvas>
|
|
||||||
|
|
||||||
<!-- Hotspot 点击由 Three.js raycaster 处理 -->
|
|
||||||
|
|
||||||
<!-- 底栏 -->
|
|
||||||
<view class="bottom-bar">
|
|
||||||
<!-- 左侧空间切换 -->
|
|
||||||
<view class="left">
|
|
||||||
<button @click="showSpaceList = !showSpaceList">
|
|
||||||
<image src="/static/icons/space.png" />
|
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
<!-- 右侧工具 -->
|
|
||||||
<view class="right">
|
|
||||||
<button @click="showTools = !showTools">
|
|
||||||
<image src="/static/icons/tools.png" />
|
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 空间缩略图弹窗 -->
|
|
||||||
<view v-if="showSpaceList" class="space-list">
|
|
||||||
<view v-for="space in spaces" :key="space.id" class="space-item" @click="switchSpace(space.id)">
|
|
||||||
<image :src="space.thumbnail" />
|
|
||||||
<text>{{ space.name }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 工具栏弹窗 -->
|
|
||||||
<view v-if="showTools" class="tools-panel">
|
|
||||||
<button @click="resetView">重置视角</button>
|
|
||||||
<button @click="toggleFullScreen">全屏</button>
|
|
||||||
<button @click="takePhoto">拍照</button>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 上一/下一空间按钮 -->
|
|
||||||
<view class="switch-btn left" @click="prevSpace">‹</view>
|
|
||||||
<view class="switch-btn right" @click="nextSpace">›</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as THREE from 'three'
|
export default {
|
||||||
import {
|
data() {
|
||||||
GLTFLoader
|
return {
|
||||||
} from 'three/examples/jsm/loaders/GLTFLoader.js'
|
id: '' ,// WebView URL
|
||||||
|
src: this.$config.staticUrl + '/public/vr/vr.html?id='
|
||||||
export default {
|
}
|
||||||
name: 'VRView',
|
},
|
||||||
data() {
|
computed: {
|
||||||
return {
|
},
|
||||||
spaces: [], // VR 空间数组
|
onLoad(options) {
|
||||||
currentIndex: 0,
|
this.id = options.id
|
||||||
currentSpace: null,
|
}
|
||||||
|
}
|
||||||
// Three.js 主场景
|
</script>
|
||||||
renderer: null,
|
|
||||||
scene: null,
|
|
||||||
camera: null,
|
|
||||||
sphere: null,
|
|
||||||
videoTexture: null,
|
|
||||||
|
|
||||||
// Mini 3D模型
|
|
||||||
miniRenderer: null,
|
|
||||||
miniScene: null,
|
|
||||||
miniCamera: null,
|
|
||||||
miniModel: null,
|
|
||||||
|
|
||||||
// Hotspot
|
|
||||||
raycaster: null,
|
|
||||||
mouse: new THREE.Vector2(),
|
|
||||||
|
|
||||||
// 触控
|
|
||||||
isDragging: false,
|
|
||||||
lastX: 0,
|
|
||||||
lastY: 0,
|
|
||||||
lon: 0,
|
|
||||||
lat: 0,
|
|
||||||
|
|
||||||
// UI
|
|
||||||
showSpaceList: false,
|
|
||||||
showTools: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
if (options.vrList) {
|
|
||||||
try {
|
|
||||||
// JSON.parse(decodeURIComponent(options.spaces))
|
|
||||||
this.spaces = options.vrList
|
|
||||||
} catch (e) {
|
|
||||||
console.error('解析 VR 空间失败', e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.currentSpace = this.spaces[this.currentIndex]
|
|
||||||
this.initThree()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
back() {
|
|
||||||
const pages = getCurrentPages();
|
|
||||||
if (pages.length > 1) {
|
|
||||||
uni.navigateBack();
|
|
||||||
} else {
|
|
||||||
uni.switchTab({
|
|
||||||
url:'/pages/index/index'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// ==================== Three.js 主场景 ====================
|
|
||||||
initThree() {
|
|
||||||
const canvasQuery = uni.createSelectorQuery()
|
|
||||||
canvasQuery.select('#vrCanvas').node().exec(res => {
|
|
||||||
const canvasNode = res[0].node
|
|
||||||
const {
|
|
||||||
windowWidth: width,
|
|
||||||
windowHeight: height
|
|
||||||
} = uni.getSystemInfoSync()
|
|
||||||
|
|
||||||
// 主 renderer
|
|
||||||
this.renderer = new THREE.WebGLRenderer({
|
|
||||||
canvas: canvasNode,
|
|
||||||
antialias: true
|
|
||||||
})
|
|
||||||
this.renderer.setSize(width, height)
|
|
||||||
|
|
||||||
// scene & camera
|
|
||||||
this.scene = new THREE.Scene()
|
|
||||||
this.camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 2000)
|
|
||||||
this.camera.position.set(0, 0, 0.01)
|
|
||||||
|
|
||||||
// raycaster
|
|
||||||
this.raycaster = new THREE.Raycaster()
|
|
||||||
|
|
||||||
this.loadSpace(this.currentSpace)
|
|
||||||
this.animate()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 加载空间
|
|
||||||
loadSpace(space) {
|
|
||||||
// 清空场景
|
|
||||||
while (this.scene.children.length) this.scene.remove(this.scene.children[0])
|
|
||||||
if (this.videoTexture) {
|
|
||||||
this.videoTexture = null
|
|
||||||
}
|
|
||||||
|
|
||||||
// 图片
|
|
||||||
if (space.type === 'image') {
|
|
||||||
const geometry = new THREE.SphereGeometry(500, 60, 40)
|
|
||||||
geometry.scale(-1, 1, 1)
|
|
||||||
const texture = new THREE.TextureLoader().load(space.src)
|
|
||||||
const material = new THREE.MeshBasicMaterial({
|
|
||||||
map: texture
|
|
||||||
})
|
|
||||||
this.sphere = new THREE.Mesh(geometry, material)
|
|
||||||
this.scene.add(this.sphere)
|
|
||||||
}
|
|
||||||
// CubeMap
|
|
||||||
else if (space.type === 'cubemap') {
|
|
||||||
const urls = [space.cubemap.px, space.cubemap.nx, space.cubemap.py, space.cubemap.ny, space.cubemap.pz,
|
|
||||||
space.cubemap.nz
|
|
||||||
]
|
|
||||||
const cubeTexture = new THREE.CubeTextureLoader().load(urls)
|
|
||||||
this.scene.background = cubeTexture
|
|
||||||
}
|
|
||||||
// 视频
|
|
||||||
else if (space.type === 'video') {
|
|
||||||
const video = document.createElement('video')
|
|
||||||
video.src = space.src
|
|
||||||
video.crossOrigin = 'anonymous'
|
|
||||||
video.loop = true
|
|
||||||
video.muted = false
|
|
||||||
video.autoplay = true
|
|
||||||
video.play()
|
|
||||||
this.videoTexture = new THREE.VideoTexture(video)
|
|
||||||
const geometry = new THREE.SphereGeometry(500, 60, 40)
|
|
||||||
geometry.scale(-1, 1, 1)
|
|
||||||
const material = new THREE.MeshBasicMaterial({
|
|
||||||
map: this.videoTexture
|
|
||||||
})
|
|
||||||
this.sphere = new THREE.Mesh(geometry, material)
|
|
||||||
this.scene.add(this.sphere)
|
|
||||||
}
|
|
||||||
// 模型
|
|
||||||
else if (space.type === 'model') {
|
|
||||||
const loader = new GLTFLoader()
|
|
||||||
loader.load(space.src, gltf => {
|
|
||||||
this.sphere = gltf.scene
|
|
||||||
this.sphere.scale.set(space.modelScale, space.modelScale, space.modelScale)
|
|
||||||
this.scene.add(this.sphere)
|
|
||||||
this.initMiniModel(gltf.scene.clone(), space.modelScale)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hotspots
|
|
||||||
if (space.hotspots && space.hotspots.length) {
|
|
||||||
space.hotspots.forEach(h => {
|
|
||||||
const spriteMap = new THREE.TextureLoader().load('/static/icons/hotspot.png')
|
|
||||||
const spriteMaterial = new THREE.SpriteMaterial({
|
|
||||||
map: spriteMap
|
|
||||||
})
|
|
||||||
const sprite = new THREE.Sprite(spriteMaterial)
|
|
||||||
const phi = THREE.MathUtils.degToRad(90 - h.position.lat)
|
|
||||||
const theta = THREE.MathUtils.degToRad(h.position.lon)
|
|
||||||
const radius = 500
|
|
||||||
sprite.position.set(
|
|
||||||
radius * Math.sin(phi) * Math.cos(theta),
|
|
||||||
radius * Math.cos(phi),
|
|
||||||
radius * Math.sin(phi) * Math.sin(theta)
|
|
||||||
)
|
|
||||||
sprite.userData.targetId = h.targetId
|
|
||||||
this.scene.add(sprite)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
animate() {
|
|
||||||
requestAnimationFrame(this.animate)
|
|
||||||
// 相机旋转
|
|
||||||
const phi = THREE.MathUtils.degToRad(90 - this.lat)
|
|
||||||
const theta = THREE.MathUtils.degToRad(this.lon)
|
|
||||||
this.camera.target = new THREE.Vector3(
|
|
||||||
500 * Math.sin(phi) * Math.cos(theta),
|
|
||||||
500 * Math.cos(phi),
|
|
||||||
500 * Math.sin(phi) * Math.sin(theta)
|
|
||||||
)
|
|
||||||
this.camera.lookAt(this.camera.target)
|
|
||||||
this.renderer.render(this.scene, this.camera)
|
|
||||||
|
|
||||||
// mini 模型同步旋转
|
|
||||||
if (this.currentSpace.type === 'model' && this.miniModel) {
|
|
||||||
this.miniModel.rotation.y = this.camera.rotation.y
|
|
||||||
this.miniRenderer.render(this.miniScene, this.miniCamera)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// ==================== Mini 3D 模型 ====================
|
|
||||||
initMiniModel(model, scale) {
|
|
||||||
const canvasQuery = uni.createSelectorQuery()
|
|
||||||
canvasQuery.select('#miniCanvas').node().exec(res => {
|
|
||||||
const canvasNode = res[0].node
|
|
||||||
this.miniRenderer = new THREE.WebGLRenderer({
|
|
||||||
canvas: canvasNode,
|
|
||||||
antialias: true,
|
|
||||||
alpha: true
|
|
||||||
})
|
|
||||||
this.miniRenderer.setSize(150, 150)
|
|
||||||
this.miniScene = new THREE.Scene()
|
|
||||||
this.miniCamera = new THREE.PerspectiveCamera(75, 1, 0.1, 2000)
|
|
||||||
this.miniCamera.position.set(0, 50, 100)
|
|
||||||
this.miniModel = model
|
|
||||||
this.miniScene.add(this.miniModel)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// ==================== 空间切换 ====================
|
|
||||||
switchSpace(id) {
|
|
||||||
const index = this.spaces.findIndex(s => s.id === id)
|
|
||||||
if (index >= 0) {
|
|
||||||
this.currentIndex = index
|
|
||||||
this.currentSpace = this.spaces[index]
|
|
||||||
this.loadSpace(this.currentSpace)
|
|
||||||
this.showSpaceList = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
prevSpace() {
|
|
||||||
this.currentIndex = (this.currentIndex - 1 + this.spaces.length) % this.spaces.length;
|
|
||||||
this.switchSpace(this.spaces[this.currentIndex].id)
|
|
||||||
},
|
|
||||||
nextSpace() {
|
|
||||||
this.currentIndex = (this.currentIndex + 1) % this.spaces.length;
|
|
||||||
this.switchSpace(this.spaces[this.currentIndex].id)
|
|
||||||
},
|
|
||||||
|
|
||||||
// ==================== 手势 ====================
|
|
||||||
onTouchStart(e) {
|
|
||||||
this.isDragging = true;
|
|
||||||
const t = e.touches[0];
|
|
||||||
this.lastX = t.clientX;
|
|
||||||
this.lastY = t.clientY
|
|
||||||
},
|
|
||||||
onTouchMove(e) {
|
|
||||||
if (!this.isDragging) return;
|
|
||||||
const t = e.touches[0];
|
|
||||||
const dx = t.clientX - this.lastX;
|
|
||||||
const dy = t.clientY - this.lastY;
|
|
||||||
this.lastX = t.clientX;
|
|
||||||
this.lastY = t.clientY;
|
|
||||||
this.lon -= dx * 0.1;
|
|
||||||
this.lat += dy * 0.1;
|
|
||||||
this.lat = Math.max(-85, Math.min(85, this.lat))
|
|
||||||
},
|
|
||||||
onTouchEnd() {
|
|
||||||
this.isDragging = false
|
|
||||||
},
|
|
||||||
|
|
||||||
// ==================== 工具栏功能示例 ====================
|
|
||||||
resetView() {
|
|
||||||
this.lon = 0;
|
|
||||||
this.lat = 0
|
|
||||||
},
|
|
||||||
toggleFullScreen() {
|
|
||||||
uni.setScreenBrightness({
|
|
||||||
value: 1
|
|
||||||
})
|
|
||||||
}, // 示例
|
|
||||||
takePhoto() {
|
|
||||||
console.log('拍照功能可扩展')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.vr-page {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: #000;
|
|
||||||
position: relative
|
|
||||||
}
|
|
||||||
|
|
||||||
.vr-canvas {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
display: block
|
|
||||||
}
|
|
||||||
|
|
||||||
.mini-canvas {
|
|
||||||
position: absolute;
|
|
||||||
top: 20rpx;
|
|
||||||
left: 20rpx;
|
|
||||||
width: 150rpx;
|
|
||||||
height: 150rpx;
|
|
||||||
z-index: 10;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 6rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-btn {
|
|
||||||
position: absolute;
|
|
||||||
top: 40rpx;
|
|
||||||
left: 20rpx;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 28rpx;
|
|
||||||
z-index: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-bar {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 80rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0 20rpx;
|
|
||||||
z-index: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-bar .left,
|
|
||||||
.bottom-bar .right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center
|
|
||||||
}
|
|
||||||
|
|
||||||
.space-list {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 80rpx;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 150rpx;
|
|
||||||
background: rgba(0, 0, 0, 0.7);
|
|
||||||
display: flex;
|
|
||||||
overflow-x: scroll;
|
|
||||||
padding: 10rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.space-list .space-item {
|
|
||||||
margin-right: 10rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center
|
|
||||||
}
|
|
||||||
|
|
||||||
.space-list image {
|
|
||||||
width: 120rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
border-radius: 6rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.tools-panel {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 80rpx;
|
|
||||||
right: 0;
|
|
||||||
width: 200rpx;
|
|
||||||
background: rgba(0, 0, 0, 0.7);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 10rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.tools-panel button {
|
|
||||||
margin-bottom: 10rpx;
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
.switch-btn {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
z-index: 10;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 60rpx;
|
|
||||||
background: rgba(0, 0, 0, 0.3);
|
|
||||||
width: 80rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 50%
|
|
||||||
}
|
|
||||||
|
|
||||||
.switch-btn.left {
|
|
||||||
left: 20rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.switch-btn.right {
|
|
||||||
right: 20rpx
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
let url = '/bill/pageQueryWaeBill'
|
let url = '/bill/pageQueryWaeBill'
|
||||||
this.$u.post(url, {
|
this.$u.post(url, {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize
|
pageSize: this.pageSize,
|
||||||
|
billStatus: '待缴费'
|
||||||
}, {
|
}, {
|
||||||
WT: token
|
WT: token
|
||||||
}).then(
|
}).then(
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
this.selectedBills = this.selectedBills.filter(b => b.id !== item.id);
|
this.selectedBills = this.selectedBills.filter(b => b.id !== item.id);
|
||||||
}
|
}
|
||||||
let sumFee = 0;
|
let sumFee = 0;
|
||||||
this.selectedBills.forEach(b => sumFee += b.amount);
|
this.selectedBills.forEach(b => sumFee += b.billAmount);
|
||||||
this.sumAmount = sumFee;
|
this.sumAmount = sumFee;
|
||||||
},
|
},
|
||||||
updateSelected() {
|
updateSelected() {
|
||||||
|
|||||||
@@ -173,12 +173,33 @@
|
|||||||
this.loadUserInfo()
|
this.loadUserInfo()
|
||||||
this.countHandlingReserve()
|
this.countHandlingReserve()
|
||||||
this.countUnHandleContract()
|
this.countUnHandleContract()
|
||||||
|
this.countUnpayRentBills()
|
||||||
|
this.countUnpayWaeBills()
|
||||||
|
this.countUnreadMsg()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
loadUserInfo(){
|
loadUserInfo(){
|
||||||
|
let userInfo = uni.getStorageSync('userInfo');
|
||||||
|
if(!userInfo) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let url = `/login/userInfo`;
|
||||||
|
this.$u.get(url, {}, {
|
||||||
|
'WT': this.$getToken(),
|
||||||
|
'USERTYPE': userInfo.userType
|
||||||
|
}).then(obj => {
|
||||||
|
if(obj.flag){
|
||||||
|
uni.setStorageSync('userInfo', {
|
||||||
|
userType: obj.data.userType,
|
||||||
|
oaAuth: obj.data.oaAuth,
|
||||||
|
cusNo: obj.data.cusNo,
|
||||||
|
userName: obj.data.userName,
|
||||||
|
openId: obj.data.openId,
|
||||||
|
subscribe: obj.data.subscribeMsg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
this.user = uni.getStorageSync('userInfo');
|
this.user = uni.getStorageSync('userInfo');
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
@@ -234,7 +255,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
countUnreadMsg(){
|
countUnreadMsg(){
|
||||||
this.$u.get(`/messsage/countUnread`, {},{
|
this.$u.get(`/message/countUnread`, {},{
|
||||||
WT: this.$getToken()
|
WT: this.$getToken()
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.flag){
|
if(res.flag){
|
||||||
|
|||||||
@@ -110,17 +110,13 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
init: true,
|
|
||||||
cusNo: null,
|
|
||||||
openId: null,
|
|
||||||
loginType: null,
|
|
||||||
authCode: '', // 身份证号 / 社会信用代码
|
|
||||||
keyword: '',
|
keyword: '',
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
activeIndex: 0, // 当前选中的索引
|
activeIndex: 0, // 当前选中的索引
|
||||||
noticeList: [],
|
noticeList: [],
|
||||||
|
filterActiveConditions:[],
|
||||||
defaultImgUrl: '/public/static/index/assets.jpg',
|
defaultImgUrl: '/public/static/index/assets.jpg',
|
||||||
navList: [{
|
navList: [{
|
||||||
name: "住房",
|
name: "住房",
|
||||||
@@ -171,10 +167,6 @@
|
|||||||
label: '为您推荐',
|
label: '为您推荐',
|
||||||
type: 'recommend'
|
type: 'recommend'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '附近',
|
|
||||||
type: 'nearby'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '上新',
|
label: '上新',
|
||||||
type: 'new'
|
type: 'new'
|
||||||
@@ -183,14 +175,14 @@
|
|||||||
// 筛选标签状态
|
// 筛选标签状态
|
||||||
activeFilterTabs: [0], // 支持多选
|
activeFilterTabs: [0], // 支持多选
|
||||||
filterTabs: [{
|
filterTabs: [{
|
||||||
label: '两室两厅',
|
label: '两室',
|
||||||
room: 2,
|
filterType: '户型',
|
||||||
hall: 2
|
value: '两室'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '一室一厅',
|
label: '一室',
|
||||||
room: 1,
|
filterType: '户型',
|
||||||
hall: 1
|
value: '一室'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
flowList: [],
|
flowList: [],
|
||||||
@@ -209,12 +201,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
let userInfo = uni.getStorageSync('userInfo');
|
|
||||||
if (userInfo) {
|
|
||||||
this.cusNo = userInfo.cusNo;
|
|
||||||
this.openId = userInfo.cusNo;
|
|
||||||
}
|
|
||||||
this.resetAndLoad()
|
this.resetAndLoad()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
|
|||||||
BIN
static/vr/qjt1.jpg
Normal file
BIN
static/vr/qjt1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
static/vr/qjt2.jpg
Normal file
BIN
static/vr/qjt2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
Reference in New Issue
Block a user