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应该是一个标识,给后台识别所用的.
|
||||
// 数据较长,请仔细查看。
|
||||
export default [{
|
||||
"name": '小区',
|
||||
"type": 'hierarchy',
|
||||
"submenu": [
|
||||
{
|
||||
"name": "不限",
|
||||
"value": ""
|
||||
},
|
||||
]
|
||||
},
|
||||
export default [
|
||||
// {
|
||||
// "name": '小区',
|
||||
// "type": 'hierarchy',
|
||||
// "submenu": [
|
||||
// {
|
||||
// "name": "不限",
|
||||
// "value": ""
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
"name": '街道',
|
||||
"name": '商圈',
|
||||
"type": 'hierarchy',
|
||||
"submenu": [
|
||||
{
|
||||
@@ -27,24 +28,24 @@ export default [{
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": '方式',
|
||||
"type": 'hierarchy',
|
||||
"submenu": [
|
||||
{
|
||||
"name": "不限",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"name": "整租",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"name": "合租",
|
||||
"value": "1"
|
||||
},
|
||||
]
|
||||
},
|
||||
// {
|
||||
// "name": '方式',
|
||||
// "type": 'hierarchy',
|
||||
// "submenu": [
|
||||
// {
|
||||
// "name": "不限",
|
||||
// "value": ""
|
||||
// },
|
||||
// {
|
||||
// "name": "整租",
|
||||
// "value": "0"
|
||||
// },
|
||||
// {
|
||||
// "name": "合租",
|
||||
// "value": "1"
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
"name": '租金',
|
||||
"type": 'hierarchy',
|
||||
@@ -55,27 +56,27 @@ export default [{
|
||||
},
|
||||
{
|
||||
"name": "<1000元",
|
||||
"value": "1000"
|
||||
"value": "0-1000"
|
||||
},
|
||||
{
|
||||
"name": "1000-1500元",
|
||||
"value": "1500"
|
||||
"value": "1000-1500"
|
||||
},
|
||||
{
|
||||
"name": "1500-2000元",
|
||||
"value": "2000"
|
||||
"value": "1500-2000"
|
||||
},
|
||||
{
|
||||
"name": "2000-3000元",
|
||||
"value": "3000"
|
||||
"value": "2000-3000"
|
||||
},
|
||||
{
|
||||
"name": "3000-4500元",
|
||||
"value": "4500"
|
||||
"value": "3000-4500"
|
||||
},
|
||||
{
|
||||
"name": "<6000元",
|
||||
"value": "6000"
|
||||
"name": ">4500元",
|
||||
"value": "4500"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -83,7 +84,8 @@ export default [{
|
||||
"name": '筛选',
|
||||
"type": 'radio',
|
||||
"submenu": [{
|
||||
"name": "居室",
|
||||
"name": "房屋户型",
|
||||
"type": 'radio',
|
||||
"submenu": [{
|
||||
"name": "一室",
|
||||
"value": "一室"
|
||||
@@ -103,7 +105,8 @@ export default [{
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "装修",
|
||||
"name": "装修情况",
|
||||
"type": 'radio',
|
||||
"submenu": [
|
||||
{
|
||||
"name": "简装",
|
||||
@@ -114,51 +117,14 @@ export default [{
|
||||
"value": "中装",
|
||||
},
|
||||
{
|
||||
"name": "精装修",
|
||||
"value": "精装修"
|
||||
"name": "精修",
|
||||
"value": "精修"
|
||||
},
|
||||
{
|
||||
"name": "豪装",
|
||||
"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({
|
||||
// // 申请的高德key值
|
||||
// key: '4ef3b3b42d8bb823529908dc93414127'
|
||||
// }); //创建一个实例化对象
|
||||
const myAmapFun = new amapFile.AMapWX({
|
||||
// 申请的高德key值
|
||||
key: '4ef3b3b42d8bb823529908dc93414127'
|
||||
}); //创建一个实例化对象
|
||||
|
||||
// export default function wxGetAddress({longitude,latitude}) {
|
||||
// //根据传递进来经纬度进行反解析,调用的是高德给的方法
|
||||
// return new Promise((resolve, reject) => {
|
||||
// myAmapFun.getRegeo({
|
||||
// location: `${longitude},${latitude}`,
|
||||
// success: (res) => {
|
||||
// resolve(res[0])
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// resolve(null)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
export default function wxGetAddress({longitude,latitude}) {
|
||||
//根据传递进来经纬度进行反解析,调用的是高德给的方法
|
||||
return new Promise((resolve, reject) => {
|
||||
myAmapFun.getRegeo({
|
||||
location: `${longitude},${latitude}`,
|
||||
success: (res) => {
|
||||
resolve(res[0])
|
||||
},
|
||||
fail: (err) => {
|
||||
resolve(null)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- VR -->
|
||||
<view v-else-if="item.mediaType === 'vr'" class="vr-wrapper">
|
||||
<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>
|
||||
@@ -85,9 +85,9 @@
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
vrList:{
|
||||
type: Array,
|
||||
default: []
|
||||
assetsId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -151,9 +151,7 @@
|
||||
beforeUnmount() {
|
||||
this.stop()
|
||||
},
|
||||
onLoad() {
|
||||
this.fillVrList();
|
||||
},
|
||||
onLoad() {},
|
||||
watch: {
|
||||
normalizedList(list) {
|
||||
if (this.current >= list.length) this.current = 0
|
||||
@@ -231,18 +229,14 @@
|
||||
enterVR() {
|
||||
this.stop()
|
||||
this.stopVideo()
|
||||
if(this.vrList.length > 0) {
|
||||
console.log(this.vrViewPage)
|
||||
// this.$u.route({
|
||||
// url: this.vrViewPage,
|
||||
// params: {
|
||||
// title:"vr看资产",
|
||||
// vrList: this.vrList
|
||||
// }
|
||||
// })
|
||||
}
|
||||
this.$u.route({
|
||||
url: this.vrViewPage,
|
||||
params: {
|
||||
title: "vr看资产",
|
||||
id: this.assetsId
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/* 分区跳转 */
|
||||
jumpToType(item) {
|
||||
this.stop()
|
||||
@@ -348,15 +342,15 @@
|
||||
}
|
||||
|
||||
.vr-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 12%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 100rpx !important;
|
||||
height: 100rpx !important;
|
||||
background: rgba(80, 80,80,0.45);
|
||||
border-radius: 50%;
|
||||
padding: 12rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 12%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 100rpx !important;
|
||||
height: 100rpx !important;
|
||||
background: rgba(80, 80, 80, 0.45);
|
||||
border-radius: 50%;
|
||||
padding: 12rpx;
|
||||
}
|
||||
|
||||
.type-bar {
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
},
|
||||
showHome: {
|
||||
type: Boolean,
|
||||
default: true // 回首页按钮默认不显示
|
||||
default: true // 回首页按钮默认显示
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -165,7 +165,7 @@ export default {
|
||||
goHome(){
|
||||
uni.switchTab({
|
||||
url:'/pages/index/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"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"version": "1.19.11",
|
||||
"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",
|
||||
"jsencrypt": "^3.5.4",
|
||||
"qrcode": "^1.5.4",
|
||||
"three": "^0.182.0",
|
||||
"vue": "2.6.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -1162,11 +1161,6 @@
|
||||
"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": {
|
||||
"version": "1.19.11",
|
||||
"resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
"date-fns": "3.6.0",
|
||||
"jsencrypt": "^3.5.4",
|
||||
"qrcode": "^1.5.4",
|
||||
"three": "^0.182.0",
|
||||
"vue": "2.6.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,49 +1,46 @@
|
||||
<template>
|
||||
<view class="asset-detail">
|
||||
<!-- 顶部导航栏 -->
|
||||
<customNavbar
|
||||
title="资产详情"
|
||||
ref="navbar"
|
||||
:is-transparent="navbarStyle.isTransparent"
|
||||
:bg-color="navbarStyle.bgColor"
|
||||
:text-color="navbarStyle.textColor"
|
||||
:opacity="navbarStyle.opacity"
|
||||
:extra-icons="navbarStyle.extraIcons"
|
||||
:show-home="false"
|
||||
/>
|
||||
<customNavbar title="资产详情" ref="navbar" :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' }">
|
||||
<Carousel :list="swiperList" boxHeight="740rpx"
|
||||
:vrIcon="staticHost + '/public/static/icon/vr.png'"
|
||||
vrViewPage="/pages-biz/vr/vr"
|
||||
:vr-list="vrList"/>
|
||||
<Carousel :list="swiperList" boxHeight="740rpx" :vrIcon="staticHost + '/public/static/icon/vr.png'"
|
||||
vrViewPage="/pages-biz/vr/vr" :vr-list="vrList" />
|
||||
</view>
|
||||
|
||||
<!-- 资产基本信息 -->
|
||||
<view class="container">
|
||||
<view class="basic-info">
|
||||
<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>
|
||||
<view class="rent-price">{{asset.rent || '未知'}}/月</view>
|
||||
<view class="community-info">
|
||||
<text class="label">所属小区:</text>
|
||||
<text>{{ asset.community || '暂无'}}</text>
|
||||
<view class=" featureArea feature-list">
|
||||
<view class="feature-tag" v-for="(item, index) in asset.features" :key="index"
|
||||
:style="{ color: getRandomColor().color,backgroundColor: getRandomColor().bg}">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-info">
|
||||
<text class="label">地址:</text>
|
||||
<text>{{ asset.address || '未知'}}</text>
|
||||
<view class="stress-info">
|
||||
<view class="stress-item">
|
||||
<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 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">
|
||||
@@ -51,34 +48,56 @@
|
||||
<view class="table-content">
|
||||
<view class="table-row">
|
||||
<view class="row-item">
|
||||
<view class="item-label">编号</view>
|
||||
<view class="item-value">{{ asset.code || '未知'}}</view>
|
||||
<view class="item-label">朝向</view>
|
||||
<view class="item-value">{{ asset.orientation || '未知'}}</view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="item-label">面积</view>
|
||||
<view class="item-value">{{asset.area || '未知'}}㎡</view>
|
||||
<view class="item-label">电梯</view>
|
||||
<view class="item-value">{{ asset.hasLift|| '未知' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table-row">
|
||||
<view class="row-item">
|
||||
<view class="item-label">类别</view>
|
||||
<view class="item-value">{{ asset.category || '未知'}}</view>
|
||||
<view class="item-label">单元</view>
|
||||
<view class="item-value">{{ asset.unitNo || '未知'}}</view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="item-label">价值</view>
|
||||
<view class="item-value">¥{{ formatMoney((asset && asset.value) || 0) }}</view>
|
||||
<view class="item-label">楼层</view>
|
||||
<view class="item-value">{{ asset.floorNo || '暂无' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table-row">
|
||||
<view class="row-item full-width">
|
||||
<view class="item-label">权属</view>
|
||||
<view class="item-value">{{ asset.owner || '未知'}}</view>
|
||||
<view class="item-label">门牌号</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 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">
|
||||
<view class="popup-content">
|
||||
@@ -90,17 +109,10 @@
|
||||
</u-popup>
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
<assetBottomBar v-if="asset.status === '闲置中'"
|
||||
:assetId="assetId"
|
||||
:phone="managerPhone"
|
||||
@reserve="showReserve = true"
|
||||
btn-title="预约看资产"
|
||||
shareBtnTitle="分享资产"
|
||||
page-path="/pages-assets/assets/detail/assetsDetail"
|
||||
minicode-api="/pages-assets/assets/detail/assetsDetail"
|
||||
btnColor="#FF2F31"
|
||||
:query="assetId"
|
||||
/>
|
||||
<assetBottomBar v-if="asset.status === '闲置中'" :assetId="assetId" :phone="managerPhone"
|
||||
@reserve="showReserve = true" btn-title="预约看资产" shareBtnTitle="分享资产"
|
||||
page-path="/pages-assets/assets/detail/assetsDetail" minicode-api="/pages-assets/assets/detail/assetsDetail"
|
||||
btnColor="#FF2F31" :query="assetId" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -113,29 +125,6 @@
|
||||
CarouselVue
|
||||
},
|
||||
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 {
|
||||
// 控制预约弹窗显示
|
||||
showReserve: false,
|
||||
@@ -146,15 +135,10 @@
|
||||
assetId: null,
|
||||
// 直接使用静态数据
|
||||
asset: null,
|
||||
managerPhone:null,
|
||||
managerPhone: null,
|
||||
// 根据静态数据初始化标记
|
||||
vrList:[],
|
||||
markers: [{
|
||||
id: 1,
|
||||
latitude: staticAsset.lat,
|
||||
longitude: staticAsset.lng,
|
||||
title: staticAsset.name,
|
||||
}],
|
||||
vrList: [],
|
||||
markers: [],
|
||||
background: {
|
||||
backgroundColor: '#ffffff',
|
||||
// 渐变色
|
||||
@@ -166,12 +150,16 @@
|
||||
isTransparent: true,
|
||||
bgColor: '#ffffff',
|
||||
textColor: '#000000',
|
||||
opacity: 0,
|
||||
extraIcons: ['ellipsis', 'eye'] // 右侧额外图标
|
||||
opacity: 1,
|
||||
extraIcons: ['ellipsis'] // 右侧额外图标
|
||||
},
|
||||
|
||||
// 滚动距离
|
||||
scrollTop: 0
|
||||
scrollTop: 0,
|
||||
tagColors: [{
|
||||
color: '#ffffff',
|
||||
bg: '#FF2F31'
|
||||
}]
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -182,8 +170,8 @@
|
||||
},
|
||||
mounted() {
|
||||
const navbar = this.$refs.navbar;
|
||||
const navHeight = navbar.navContentHeight; // 直接拿子组件 data
|
||||
this.navTotalHeight = navHeight; // 加上额外间距
|
||||
const navHeight = navbar.navContentHeight; // 直接拿子组件 data
|
||||
this.navTotalHeight = navHeight; // 加上额外间距
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
@@ -191,41 +179,30 @@
|
||||
this.updateNavbarStyle(e.scrollTop);
|
||||
},
|
||||
computed: {
|
||||
staticHost() {
|
||||
return this.$config.staticUrl
|
||||
staticHost() {
|
||||
return this.$config.staticUrl
|
||||
},
|
||||
swiperList(){
|
||||
swiperList() {
|
||||
let list = [];
|
||||
if(this.asset && this.asset.vrImgs && this.asset.vrImgs.length > 0) {
|
||||
this.asset.vrImgs.forEach(img=> {
|
||||
if (this.asset && this.asset.vrImgs && this.asset.vrImgs.length > 0) {
|
||||
this.asset.vrImgs.forEach(img => {
|
||||
list.push({
|
||||
src: this.$config.staticUrl + img,
|
||||
mediaType:'vr',
|
||||
bizType:'vr'
|
||||
mediaType: 'vr',
|
||||
bizType: 'vr'
|
||||
})
|
||||
})
|
||||
}
|
||||
// if(this.asset && this.asset.detailImgs && this.asset.detailImgs.length > 0) {
|
||||
// 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=> {
|
||||
if (this.asset && this.asset.detailImgs && this.asset.detailImgs.length > 0) {
|
||||
this.asset.detailImgs.forEach(img => {
|
||||
list.push({
|
||||
src: this.$config.staticUrl + img,
|
||||
mediaType:'image',
|
||||
bizType:'详细图片'
|
||||
mediaType: 'image',
|
||||
bizType: '详细图片'
|
||||
})
|
||||
})
|
||||
}
|
||||
return list;
|
||||
return list;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -240,15 +217,18 @@
|
||||
opacity = Math.max(opacity, 0);
|
||||
|
||||
// 更新导航栏样式
|
||||
this.navbarStyle.opacity = opacity;
|
||||
// this.navbarStyle.opacity = opacity;
|
||||
|
||||
if (opacity > 0.5) {
|
||||
this.navbarStyle.isTransparent = false;
|
||||
} 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() {
|
||||
let url = `/assets/detail?id=${this.assetId}`
|
||||
@@ -257,33 +237,34 @@
|
||||
console.log(data)
|
||||
this.asset = {
|
||||
name: data.assetsName,
|
||||
community: data.community,
|
||||
bizZone: data.bizZone,
|
||||
code: data.assetsNo,
|
||||
category: data.assetsType,
|
||||
type: data.assetsType,
|
||||
area: data.footPrint,
|
||||
value: data.assetsValue,
|
||||
rent: data.rentFee,
|
||||
owner: data.owner,
|
||||
address: data.assetsAddress,
|
||||
hasLift: data.hasLift,
|
||||
lat: data.latitude,
|
||||
lng: data.longitude,
|
||||
unitNo: data.unitNo,
|
||||
roomNo: data.roomNo,
|
||||
floorNo: data.floorNo,
|
||||
description: data.assetsDesc,
|
||||
description: data.assetsDesc,
|
||||
detailImgs: data.detailImgs,
|
||||
layout: data.layout, //户型
|
||||
orientation: data.orientation, //朝向
|
||||
vrImgs: data.vrImgs,
|
||||
remark: data.assetsDesc,
|
||||
status: data.assetsStatus
|
||||
status: data.assetsStatus,
|
||||
features: ['家电齐全']
|
||||
};
|
||||
this.managerPhone = data.managerPhone
|
||||
this.markers = [
|
||||
{
|
||||
id: 1,
|
||||
latitude: this.asset.lat,
|
||||
longitude: this.asset.lng,
|
||||
title: this.asset.name,
|
||||
},
|
||||
];
|
||||
this.markers = [{
|
||||
id: 1,
|
||||
latitude: this.asset.lat,
|
||||
longitude: this.asset.lng,
|
||||
title: this.asset.name,
|
||||
}, ];
|
||||
}).catch(err => {
|
||||
console.log("获取资产信息失败:", err)
|
||||
})
|
||||
@@ -299,13 +280,13 @@
|
||||
});
|
||||
},
|
||||
validatePhoneNumber(phone) {
|
||||
const regex = /^1[3-9]\d{9}$/;
|
||||
return regex.test(phone);
|
||||
const regex = /^1[3-9]\d{9}$/;
|
||||
return regex.test(phone);
|
||||
},
|
||||
submitReserve() {
|
||||
console.log('提交预约看房申请')
|
||||
// 身份证校验
|
||||
if (this.validatePhoneNumber(this.reservePhone)) {
|
||||
if (!this.validatePhoneNumber(this.reservePhone)) {
|
||||
uni.showToast({
|
||||
title: '手机号格式不正确',
|
||||
icon: 'none'
|
||||
@@ -313,17 +294,17 @@
|
||||
return;
|
||||
}
|
||||
let url = '/reservate/submit'
|
||||
this.$u.post(url,{
|
||||
this.$u.post(url, {
|
||||
reserveName: this.reserveName,
|
||||
assetsNo: this.assetId,
|
||||
assetsName: this.asset.name,
|
||||
phone: this.reservePhone
|
||||
},{
|
||||
}, {
|
||||
WT: this.$getToken()
|
||||
}).then(res=>{
|
||||
if(res.flag) {
|
||||
}).then(res => {
|
||||
if (res.flag) {
|
||||
this.$mytip.toast('提交预约成功成功')
|
||||
}else{
|
||||
} else {
|
||||
|
||||
this.$mytip.toast('预约提交失败,请重试')
|
||||
}
|
||||
@@ -332,17 +313,17 @@
|
||||
},
|
||||
recordView(assetId) {
|
||||
let token = this.$getToken()
|
||||
if(token){
|
||||
if (token) {
|
||||
let url = "/potential/add";
|
||||
this.$u.get(url, {
|
||||
assetId: this.assetId
|
||||
}, {
|
||||
'WT': this.$getToken()
|
||||
}).then(obj => {
|
||||
this.$u.get(url, {
|
||||
assetId: this.assetId
|
||||
}, {
|
||||
'WT': this.$getToken()
|
||||
}).then(obj => {
|
||||
|
||||
}).catch(err => {
|
||||
console.log("记录客户浏览记录失败", err)
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log("记录客户浏览记录失败", err)
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -353,7 +334,7 @@
|
||||
.asset-detail {
|
||||
background-color: #f7f8fa;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 120rpx;
|
||||
padding-bottom: 400rpx;
|
||||
padding-top: 0;
|
||||
/* 不再需要固定的顶部内边距,由动态计算的 navTotalHeight 控制 */
|
||||
}
|
||||
@@ -383,6 +364,48 @@
|
||||
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 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -405,13 +428,26 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.rent-price {
|
||||
font-size: 36rpx;
|
||||
color: #FF2F31;
|
||||
margin: 15rpx 0;
|
||||
.feature-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.community-info,
|
||||
.address-info {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
@@ -429,9 +465,13 @@
|
||||
/* 地图容器 */
|
||||
.map-container {
|
||||
width: 100%;
|
||||
height: 168px;
|
||||
padding: 20rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
/* 资产信息表格 */
|
||||
@@ -442,7 +482,7 @@
|
||||
}
|
||||
|
||||
.table-title {
|
||||
font-size: 30rpx;
|
||||
font-size: 33rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
@@ -473,12 +513,12 @@
|
||||
}
|
||||
|
||||
.item-label {
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.item-value {
|
||||
font-size: 28rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
<!-- 关联合同 -->
|
||||
<view class="form-item">
|
||||
<text class="label">关联合同</text>
|
||||
<picker :range="contracts" range-key="name" @change="onContractChange">
|
||||
<picker :range="contracts" range-key="contractName" @change="onContractChange">
|
||||
<view class="picker-value">
|
||||
{{ selectedContract ? selectedContract.name : '请选择合同' }}
|
||||
{{ selectedContract ? selectedContract.contractName : '请选择合同' }}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
@@ -20,7 +20,7 @@
|
||||
<text class="label">关联资产</text>
|
||||
<view class="picker-value" @click="openAssetsPopup">
|
||||
{{ selectedAssetsList.length
|
||||
? selectedAssetsList.map(a => a.name).join(',')
|
||||
? selectedAssetsList.map(a => a.assetsName).join(',')
|
||||
: '请选择资产' }}
|
||||
<text v-if="selectedAssetsList.length">({{ selectedAssetsList.length }})</text>
|
||||
</view>
|
||||
@@ -54,10 +54,10 @@
|
||||
<input v-model="assetSearch" placeholder="搜索资产" class="search-input" />
|
||||
</view>
|
||||
<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"
|
||||
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>
|
||||
</checkbox-group>
|
||||
</scroll-view>
|
||||
@@ -99,11 +99,14 @@
|
||||
onContractChange(e) {
|
||||
const index = e.detail.value;
|
||||
this.selectedContract = this.contracts[index];
|
||||
this.assetsList = this.contracts[index].assets || [];
|
||||
this.assetsList = this.contracts[index].assetsInfos || [];
|
||||
// 清空之前选择
|
||||
this.selectedAssetsKeys = [];
|
||||
this.selectedAssetsList = [];
|
||||
},
|
||||
onAssetsChange(e) {
|
||||
this.selectedAssetsKeys = e.detail.value
|
||||
},
|
||||
openAssetsPopup() {
|
||||
if (!this.selectedContract) {
|
||||
uni.showToast({
|
||||
@@ -115,6 +118,7 @@
|
||||
this.showAssetsPopup = true;
|
||||
},
|
||||
confirmAssets() {
|
||||
console.log(this.selectedAssetsKeys)
|
||||
this.selectedAssetsList = this.assetsList.filter(a =>
|
||||
this.selectedAssetsKeys.includes(a.assetsNo)
|
||||
);
|
||||
@@ -139,6 +143,14 @@
|
||||
});
|
||||
},
|
||||
submitForm() {
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if(!userInfo.cusNo) {
|
||||
uni.showToast({
|
||||
title: '您还未实名',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (
|
||||
!this.selectedContract ||
|
||||
!this.cancelDate ||
|
||||
@@ -174,7 +186,7 @@
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$mytip.toast('提交退租申请失败')
|
||||
this.$mytip.toast('提交退租申请失败:' + res.message )
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -259,8 +271,8 @@
|
||||
|
||||
.popup-btn {
|
||||
margin: 20rpx;
|
||||
height: 60rpx;
|
||||
background: #007aff;
|
||||
height: 80rpx;
|
||||
background: #FB392A;
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<!-- 合同名称和状态 -->
|
||||
<view class="card-header">
|
||||
<text class="contract-name">{{ item.contractName }}</text>
|
||||
<text :class="['record-status', item.status]">
|
||||
{{ statusText(item.status) }}
|
||||
<text :class="['record-status', statusText(item.status)]">
|
||||
{{ item.status||'未知' }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
@@ -22,13 +22,16 @@
|
||||
<!-- 预约时间 -->
|
||||
<view class="info-item">
|
||||
<text class="info-label">申请时间:</text>
|
||||
<text class="info-value"> {{item.applyTime}} </text>
|
||||
<text class="info-value"> {{item.applyDate || ''}} </text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<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>
|
||||
|
||||
@@ -40,9 +43,9 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 底部新增留言按钮 -->
|
||||
<view class="add-btn-container">
|
||||
<!-- <view class="add-btn-container">
|
||||
<button class="add-btn" @click="toApply()">新增退租申请</button>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -60,12 +63,15 @@
|
||||
methods: {
|
||||
statusText(status) {
|
||||
switch (status) {
|
||||
case 'pending':
|
||||
return '待确认';
|
||||
case 'done':
|
||||
return '已完成';
|
||||
case '申请中':
|
||||
case '已批准':
|
||||
return 'pending';
|
||||
case '退租完成':
|
||||
return 'done';
|
||||
case '已驳回':
|
||||
return 'reject';
|
||||
default:
|
||||
return '未知';
|
||||
return 'unknown';
|
||||
}
|
||||
},
|
||||
formatDate(dateStr) {
|
||||
@@ -92,7 +98,6 @@
|
||||
WT: this.$getToken()
|
||||
}).then(res => {
|
||||
const rows = res.data.result || [];
|
||||
console.log(rows)
|
||||
if (this.pageNo === 1) this.flowList = [];
|
||||
this.flowList = this.flowList.concat(rows);
|
||||
if (rows.length < this.pageSize) {
|
||||
@@ -188,14 +193,18 @@
|
||||
border-radius: 4rpx;
|
||||
|
||||
&.done {
|
||||
background: #FCE5E0;
|
||||
color: #ED7748;
|
||||
background: #FCE5E0; /* 保持原有浅橙色背景 */
|
||||
color: #ED7748; /* 保持原有橙色文字 */
|
||||
}
|
||||
|
||||
&.pending {
|
||||
background: #F2F3F7;
|
||||
color: #86868C;
|
||||
}
|
||||
&.reject {
|
||||
background: #FFE4E1; /* 浅红色背景 */
|
||||
color: #DC143C; /* 深红色文字 */
|
||||
}
|
||||
}
|
||||
|
||||
.card-content {
|
||||
|
||||
@@ -28,10 +28,31 @@
|
||||
<!-- 新增留言弹窗 -->
|
||||
<u-popup v-model="showAddPopup" mode="center" length="60%">
|
||||
<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" />
|
||||
<button class="popup-btn" @click="addFallback()">提交留言</button>
|
||||
</view>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@@ -52,7 +73,12 @@
|
||||
loadStatus: 'loadmore',
|
||||
isRefreshing: false,
|
||||
// 滚动距离
|
||||
scrollTop: 0
|
||||
scrollTop: 0,
|
||||
showAssetsPopup: false,
|
||||
assetSearch: '',
|
||||
assetsList: [],
|
||||
selectedAssetKey: '', // 单个 assetsNo
|
||||
selectedAsset: null // 单个资产对象
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -73,6 +99,16 @@
|
||||
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() {
|
||||
if (this.loadStatus !== 'loadmore') return;
|
||||
this.loadStatus = 'loading';
|
||||
@@ -109,6 +145,15 @@
|
||||
},
|
||||
addFallback() {
|
||||
const content = this.newMessageContent.trim();
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if(!userInfo.cusNo) {
|
||||
uni.showToast({
|
||||
title: '您还未实名',
|
||||
icon: 'none'
|
||||
});
|
||||
this.showAddPopup = false;
|
||||
return;
|
||||
}
|
||||
if (!content) {
|
||||
uni.showToast({
|
||||
title: '请输入留言内容',
|
||||
@@ -123,13 +168,21 @@
|
||||
WT: token
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: '留言成功',
|
||||
icon: 'success'
|
||||
});
|
||||
if(res.flag){
|
||||
uni.showToast({
|
||||
title: '留言成功',
|
||||
icon: 'success'
|
||||
});
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
this.showAddPopup = false;
|
||||
this.newMessageContent = '';
|
||||
this.refresh();
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('新增留言失败:', err);
|
||||
@@ -245,7 +298,29 @@
|
||||
font-size: 24rpx;
|
||||
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 {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<!-- 顶部tab切换 -->
|
||||
<view class="tab-bar">
|
||||
<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 }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -48,8 +48,8 @@
|
||||
|
||||
<!-- 右侧金额 + 图标 -->
|
||||
<view class="right">
|
||||
<view class="amount" :class="item.inOutType === '收' ? 'income' : 'expense'">
|
||||
{{ item.inOutType === '收' ? '+' : '-' }}{{ item.itemAmount.toFixed(2) }}
|
||||
<view class="amount" :class="item.inOutType === '支' ? 'income' : 'expense'">
|
||||
{{ item.inOutType === '支' ? '+' : '-' }}{{ formatMoney(item.itemAmount) }}
|
||||
</view>
|
||||
<u-icon name="arrow-right" size="32" color="#ccc"></u-icon>
|
||||
</view>
|
||||
@@ -71,14 +71,14 @@
|
||||
pageSize:10,
|
||||
flowList: [],
|
||||
loadStatus: 'loadmore',
|
||||
activeTab: 'in', // 默认显示“收”
|
||||
activeTab: '收', // 默认显示“收”
|
||||
tabs: [{
|
||||
label: '收入',
|
||||
value: 'in'
|
||||
value: '支'
|
||||
},
|
||||
{
|
||||
label: '支出',
|
||||
value: 'out'
|
||||
value: '收'
|
||||
},
|
||||
],
|
||||
// 年份筛选相关
|
||||
@@ -109,6 +109,10 @@
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
onTabClick(val) {
|
||||
this.activeTab = val
|
||||
this.resetAndLoad()
|
||||
},
|
||||
fetchPayRecord() {
|
||||
if (this.loadStatus !== 'loadmore') return;
|
||||
this.loadStatus = 'loading';
|
||||
@@ -122,7 +126,6 @@
|
||||
WT:this.$getToken()
|
||||
}).then(res => {
|
||||
const rows = res.data.result || [];
|
||||
console.log(rows)
|
||||
if (this.pageNo === 1) this.flowList = [];
|
||||
this.flowList = this.flowList.concat(rows);
|
||||
if (rows.length < this.pageSize) {
|
||||
@@ -146,10 +149,14 @@
|
||||
this.showYearPicker = false;
|
||||
this.resetAndLoad();
|
||||
},
|
||||
formatMoney(val) {
|
||||
if (!val && val !== 0) return '—';
|
||||
return '¥' + Number(val).toFixed(2);
|
||||
},
|
||||
resetAndLoad(){
|
||||
// 重新加载数据
|
||||
this.loadStatus = 'loadmore';
|
||||
this.pageNo = 1;
|
||||
this.flowList = [];
|
||||
this.fetchPayRecord();
|
||||
},
|
||||
loadMore() {
|
||||
|
||||
@@ -134,8 +134,8 @@ export default {
|
||||
this.$u.post('/contract/queryPage', {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
startTime: this.startDate,
|
||||
endTime: this.endDate,
|
||||
startDate: this.startDate,
|
||||
endDate: this.endDate,
|
||||
signStatus: this.statusFilter
|
||||
}, {
|
||||
WT: this.$getToken()
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<view class="title">当前定位</view>
|
||||
<view class="body">
|
||||
<view class="left">
|
||||
<image src="../../static/navigate.png" mode="widthFix" class="img"></image>
|
||||
{{locationCity}}
|
||||
<image src="/static/navigate.png" mode="widthFix" class="img"></image>
|
||||
{{locationCity || '宜昌市'}}
|
||||
</view>
|
||||
<view class="right">切换城市</view>
|
||||
</view>
|
||||
@@ -28,7 +28,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import wxGetAddress from '@/common/utils/wxGetAddress.js'
|
||||
import wxGetAddress from '@/common/utils/wxGetAddress.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<view class="login-container">
|
||||
<!-- 顶部状态栏 -->
|
||||
<view class="status-bar"> <u-icon :name="btn.icon" :color="btn.color || '#333'" :size="btn.size || 40"></u-icon>
|
||||
</view>
|
||||
<!-- <view class="status-bar">
|
||||
<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">
|
||||
@@ -51,7 +54,8 @@
|
||||
screenWidth: 0,
|
||||
scale: 1,
|
||||
loginType: "0",
|
||||
agreeProtocol: false
|
||||
agreeProtocol: false,
|
||||
menuRect: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -62,6 +66,8 @@
|
||||
this.scale = this.screenWidth / this.designWidth
|
||||
}
|
||||
})
|
||||
const menuRect = wx.getMenuButtonBoundingClientRect()
|
||||
this.menuRect = menuRect
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
@@ -82,6 +88,15 @@
|
||||
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() {
|
||||
return this.$config.staticUrl
|
||||
},
|
||||
@@ -119,7 +134,13 @@
|
||||
}
|
||||
this.doLogin(code);
|
||||
},
|
||||
goBack() {
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
},
|
||||
/** 执行登录逻辑 */
|
||||
async doLogin(phoneGetCode) {
|
||||
if (!this.agreeProtocol) {
|
||||
@@ -142,19 +163,17 @@
|
||||
});
|
||||
|
||||
// 调用后端登录接口
|
||||
const authRes = await this.$u.post(`/login/weChatLogin`, {
|
||||
phoneGetCode: phoneGetCode,
|
||||
loginCode: loginRes.code,
|
||||
loginType: this.loginType
|
||||
});
|
||||
const authRes = await this.$u.post(`/login/weChatLogin`, {
|
||||
phoneGetCode: phoneGetCode,
|
||||
loginCode: loginRes.code,
|
||||
loginType: this.loginType
|
||||
});
|
||||
|
||||
// let tempToken = 'asd5646'
|
||||
// 保存token
|
||||
let token = authRes.data;
|
||||
this.$u.vuex('vuex_token', token);
|
||||
// this.$u.vuex('vuex_token', tempToken);
|
||||
uni.hideLoading();
|
||||
this.getUserOtherInfo(this.loginType,token)
|
||||
this.getUserOtherInfo(this.loginType, token)
|
||||
// 跳转首页
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
@@ -172,24 +191,17 @@
|
||||
'WT': token,
|
||||
'USERTYPE': loginType
|
||||
}).then(obj => {
|
||||
if(obj.flag){
|
||||
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
|
||||
userType: obj.data.userType,
|
||||
oaAuth: obj.data.oaAuth,
|
||||
cusNo: obj.data.cusNo,
|
||||
userName: obj.data.userName,
|
||||
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) {
|
||||
@@ -220,8 +232,18 @@
|
||||
overflow: hidden;
|
||||
|
||||
.status-bar {
|
||||
margin-top: 7.56%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 11.56%;
|
||||
height: var(--status-bar-height);
|
||||
|
||||
}
|
||||
|
||||
.nav-left {
|
||||
width: 80rpx;
|
||||
display: flex;
|
||||
padding-left: 5%;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -267,7 +289,8 @@
|
||||
}
|
||||
|
||||
.user-type {
|
||||
display: flex; justify-content: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
:show-with-animation="true"
|
||||
:selectable="true"></u-parse>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@@ -16,7 +20,9 @@
|
||||
return {
|
||||
id:null,
|
||||
title:'资讯',
|
||||
content: ``
|
||||
content: ``,
|
||||
imgList:[],
|
||||
attachments:[]
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -31,8 +37,25 @@
|
||||
if(res.flag) {
|
||||
this.title = res.data.noticeTitle;
|
||||
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;
|
||||
}
|
||||
let life = uni.getStorageSync('lifeData') || {}
|
||||
let token = life.vuex_token
|
||||
let token = this.$getToken()
|
||||
let url = "/login/updateVerifyCode";
|
||||
let encryptCode = rsaEncrypt(this.authCode);
|
||||
this.$u.post(url, {
|
||||
@@ -147,9 +146,9 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
// 此处执行微信才执行
|
||||
// #endif
|
||||
uni.removeStorageSync('userInfo');
|
||||
let token = this.$getToken();
|
||||
let loginType = this.user.userType
|
||||
let url = `/login/userInfo?loginType=${loginType}`;
|
||||
let url = `/login/userInfo`;
|
||||
this.$u.get(url, {}, {
|
||||
'WT': token
|
||||
}).then(obj => {
|
||||
@@ -158,7 +157,8 @@
|
||||
oaAuth: obj.data.oaAuth,
|
||||
cusNo: obj.data.cusNo,
|
||||
userName: obj.data.userName,
|
||||
openId: obj.data.openId
|
||||
openId: obj.data.openId,
|
||||
subscribe: obj.data.subscribeMsg
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<view class="setting-content">
|
||||
<u-cell-group>
|
||||
<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-cell-item> -->
|
||||
</u-cell-item>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow(){
|
||||
let user = uni.getStorageSync('userInfo');
|
||||
this.longSubscribe = user.subscribe;
|
||||
},
|
||||
methods: {
|
||||
profile() {
|
||||
@@ -49,7 +53,7 @@
|
||||
// 微信小程序专用
|
||||
// #ifdef MP-WEIXIN
|
||||
if (this.longSubscribe) {
|
||||
const tmplIds = ['TEMPLATE_ID_1', 'TEMPLATE_ID_2'] // 在小程序后台配置的长期订阅模板
|
||||
const tmplIds = ['ZVl9bkFv8Nzha2n_6wO36IBqe0H5VwJBvV-7OkVT5jo'] // 在小程序后台配置的长期订阅模板
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds,
|
||||
success: (res) => {
|
||||
@@ -89,6 +93,12 @@
|
||||
saveLongSubscribeStatus(enable) {
|
||||
// TODO: 后端保存用户长期订阅状态
|
||||
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) {
|
||||
if (!phone) return;
|
||||
if (!phone) {
|
||||
uni.showToast({
|
||||
title: '暂无管家联系方式',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.makePhoneCall({ phoneNumber: phone });
|
||||
},
|
||||
loadMore() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="u-margin-left-20 u-margin-right-20">
|
||||
<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>
|
||||
<!-- 搜索记录 -->
|
||||
<template v-if="historyList.length > 0">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- 搜索栏 -->
|
||||
<view class="search-bar-wrapper">
|
||||
<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 class="search-input" @click="search">
|
||||
<text class="icon-search"></text>
|
||||
@@ -42,12 +42,12 @@
|
||||
<u-lazy-load threshold="750" border-radius="8" :image="item.coverImgUrl" :index="index"
|
||||
@click="clickImage(item.assetsNo)" mode="aspectFill"></u-lazy-load>
|
||||
<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 class="item-tags">
|
||||
<view class="tag" v-for="(tag, tagIndex) in item.tags" :key="tagIndex">{{ tag }}</view>
|
||||
</view>
|
||||
<view class="item-price">¥{{ item.rentFee }}/<text>月</text></view>
|
||||
<view class="item-price">¥{{ item.rentFee || '未知'}}/<text>月</text></view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:right="{ rightList }">
|
||||
@@ -55,11 +55,11 @@
|
||||
<u-lazy-load threshold="750" border-radius="8" :image="item.coverImgUrl" :index="index"
|
||||
@click="clickImage(item.assetsNo)" mode="aspectFill"></u-lazy-load>
|
||||
<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="tag" v-for="(tag, tagIndex) in item.tags" :key="tagIndex">{{ tag }}</view>
|
||||
</view>
|
||||
<view class="item-price">¥{{ item.rentFee }}/<text>月</text></view>
|
||||
<view class="item-price">¥{{ item.rentFee || '未知'}}/<text>月</text></view>
|
||||
</view>
|
||||
</template>
|
||||
</u-waterfall>
|
||||
@@ -81,9 +81,11 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyWord: null,
|
||||
city: null,
|
||||
streetList: [],
|
||||
selectedBizZone: null,
|
||||
selectedLayout: null,
|
||||
selectedDecorationStatus: null,
|
||||
selectedFeatures:[],
|
||||
indexArr: [],
|
||||
valueArr: [],
|
||||
defaultSelected: [],
|
||||
@@ -109,9 +111,6 @@
|
||||
let villageName = option.villageName
|
||||
let lifeData = uni.getStorageSync('lifeData');
|
||||
let vuex_city = lifeData.vuex_city
|
||||
if (option.keyword) {
|
||||
this.keyWord = option.keyword
|
||||
}
|
||||
this.city = vuex_city
|
||||
this.searchData = {}
|
||||
if (type) {
|
||||
@@ -120,9 +119,9 @@
|
||||
if (villageName) {
|
||||
this.searchData.villageName = villageName
|
||||
}
|
||||
this.resetAndLoad()
|
||||
// 获取小区数据
|
||||
this.findVillageList()
|
||||
// 获取街道数据
|
||||
this.findFilterTabData()
|
||||
this.findHouseList(null,option.keyword)
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
@@ -167,13 +166,12 @@
|
||||
this.pageNo = 1;
|
||||
this.flowList = [];
|
||||
this.loadStatus = 'loadmore';
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.uWaterfall && this.$refs.uWaterfall.clear();
|
||||
this.findHouseList();
|
||||
});
|
||||
},
|
||||
findHouseList(type = null) {
|
||||
findHouseList(type = null,keyWord = null) {
|
||||
if (this.loadStatus !== 'loadmore') return;
|
||||
|
||||
this.loadStatus = 'loading';
|
||||
@@ -183,18 +181,16 @@
|
||||
assetsType: type,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
keyWord: this.keyWord
|
||||
keyWord: this.keyWord,
|
||||
bizZone: this.searchData.bizZone
|
||||
}).then(result => {
|
||||
|
||||
const rows = result.data.result || [];
|
||||
|
||||
// 第一页无数据
|
||||
if (this.pageNo === 1 && rows.length === 0) {
|
||||
this.flowList = [];
|
||||
this.loadStatus = 'nomore';
|
||||
return;
|
||||
}
|
||||
|
||||
rows.forEach(row => {
|
||||
if (row.coverImgUrl) {
|
||||
row.coverImgUrl = this.$config.staticUrl + row.coverImgUrl
|
||||
@@ -204,7 +200,6 @@
|
||||
})
|
||||
// 追加数据
|
||||
this.flowList = this.flowList.concat(rows);
|
||||
|
||||
// 判断是否还有下一页(核心)
|
||||
if (rows.length < this.pageSize) {
|
||||
this.loadStatus = 'nomore';
|
||||
@@ -212,6 +207,7 @@
|
||||
this.pageNo++; // ✅ 只有这里能 +1
|
||||
this.loadStatus = 'loadmore';
|
||||
}
|
||||
this.keyWord = null
|
||||
|
||||
}).catch(err => {
|
||||
console.log("获取资产信息失败:", err);
|
||||
@@ -226,40 +222,48 @@
|
||||
// 调用接口获取下一页
|
||||
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() {
|
||||
// 前端写死的测试小区数据
|
||||
// const villageData = [{
|
||||
// name: '景秀天成'
|
||||
// },
|
||||
// {
|
||||
// name: '锦绣花园'
|
||||
// },
|
||||
// {
|
||||
// name: '阳光小区'
|
||||
// },
|
||||
// {
|
||||
// name: '幸福家园'
|
||||
// },
|
||||
// {
|
||||
// name: '碧水湾'
|
||||
// }
|
||||
// ];
|
||||
|
||||
// 添加测试小区数据到筛选菜单
|
||||
// for (let i = 0; i < villageData.length; i++) {
|
||||
// searchData[0].submenu.push({
|
||||
// name: villageData[i].name,
|
||||
// value: villageData[i].name
|
||||
// });
|
||||
// }
|
||||
// this.filterData = searchData;
|
||||
async getFeatures(){
|
||||
const res = await this.$u.get('/assets/getFeatures');
|
||||
if (res.flag) {
|
||||
return res.data;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
async getBizZone(){
|
||||
const res = await this.$u.get('/assets/getBizZones');
|
||||
if (res.flag) {
|
||||
return res.data;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
clickImage(houseId) {
|
||||
this.$u.route({
|
||||
url: '/pages-assets/assets/detail',
|
||||
url: '/pages-assets/assets/assetsDetail',
|
||||
params: {
|
||||
assetsNo: houseId
|
||||
}
|
||||
@@ -267,25 +271,21 @@
|
||||
},
|
||||
//接收菜单结果
|
||||
confirm(e) {
|
||||
let type = e.value[1][0]
|
||||
let villageName = e.value[0][0]
|
||||
let price = e.value[2][0]
|
||||
let combo = e.value[3]
|
||||
let houseNum = combo[0]
|
||||
let bizZone = e.value[0][0]
|
||||
let price = e.value[1][0]
|
||||
let combo = e.value[2]
|
||||
let layout = combo[0]
|
||||
let decoration = combo[1]
|
||||
let feature = combo[2]
|
||||
this.searchData = {}
|
||||
if (type) {
|
||||
this.searchData.type = type
|
||||
}
|
||||
if (villageName) {
|
||||
this.searchData.villageName = villageName
|
||||
if (bizZone) {
|
||||
this.searchData.bizZone = bizZone
|
||||
}
|
||||
if (price) {
|
||||
this.searchData.price = price
|
||||
}
|
||||
if (houseNum && houseNum.length > 0) {
|
||||
this.searchData.houseNum = houseNum.toString()
|
||||
if (layout && layout.length > 0) {
|
||||
this.searchData.layout = layout.toString()
|
||||
}
|
||||
if (decoration && decoration.length > 0) {
|
||||
this.searchData.decoration = decoration.toString()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="calculator">
|
||||
<customNavbar title="计算器" :showHome="true" />
|
||||
|
||||
<input class="display" v-model="expression" disabled />
|
||||
<textarea class="display" auto-height v-model="expression" disabled />
|
||||
|
||||
<view class="keys">
|
||||
<view
|
||||
@@ -36,8 +36,7 @@ export default {
|
||||
'4','5','6','*',
|
||||
'1','2','3','-',
|
||||
'0','.','%','+',
|
||||
'C','⌫',
|
||||
'='
|
||||
'C','⌫','='
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -186,9 +185,10 @@ export default {
|
||||
}
|
||||
|
||||
.display {
|
||||
height: 120rpx;
|
||||
font-size: 44rpx;
|
||||
font-size: 70rpx;
|
||||
font-weight: 600;
|
||||
min-height: 400rpx;
|
||||
width: 95%;
|
||||
border-radius: 12rpx;
|
||||
background: #fff;
|
||||
padding: 0 24rpx;
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
background: #ffffff;
|
||||
text-align: center;
|
||||
padding: 36rpx 0;
|
||||
font-size: 36rpx;
|
||||
font-size: 70rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 10rpx 20rpx rgba(0,0,0,0.08);
|
||||
@@ -220,7 +220,7 @@ export default {
|
||||
background: #ffe8d9;
|
||||
color: #ff7a18;
|
||||
box-shadow: 0 10rpx 20rpx rgba(255,122,24,0.35);
|
||||
font-size: 40rpx;
|
||||
font-size: 70rpx;
|
||||
}
|
||||
|
||||
.control {
|
||||
@@ -230,10 +230,10 @@ export default {
|
||||
}
|
||||
|
||||
.equal {
|
||||
grid-column: span 4;
|
||||
width: 215%;
|
||||
background: linear-gradient(135deg, #4facfe, #00f2fe);
|
||||
color: #fff;
|
||||
font-size: 44rpx;
|
||||
font-size: 70rpx;
|
||||
font-weight: 600;
|
||||
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);
|
||||
}
|
||||
let sumFee = 0;
|
||||
this.selectedBills.forEach(b => sumFee += b.amount);
|
||||
this.selectedBills.forEach(b => sumFee += b.billAmount);
|
||||
this.sumAmount = sumFee;
|
||||
},
|
||||
updateSelected() {
|
||||
|
||||
@@ -1,438 +1,19 @@
|
||||
<template>
|
||||
<view class="vr-page">
|
||||
<!-- 返回按钮 -->
|
||||
<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>
|
||||
<web-view :src="src + id"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as THREE from 'three'
|
||||
import {
|
||||
GLTFLoader
|
||||
} from 'three/examples/jsm/loaders/GLTFLoader.js'
|
||||
|
||||
export default {
|
||||
name: 'VRView',
|
||||
data() {
|
||||
return {
|
||||
spaces: [], // VR 空间数组
|
||||
currentIndex: 0,
|
||||
currentSpace: null,
|
||||
|
||||
// Three.js 主场景
|
||||
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('拍照功能可扩展')
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: '' ,// WebView URL
|
||||
src: this.$config.staticUrl + '/public/vr/vr.html?id='
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id
|
||||
}
|
||||
}
|
||||
</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'
|
||||
this.$u.post(url, {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
|
||||
pageSize: this.pageSize,
|
||||
billStatus: '待缴费'
|
||||
}, {
|
||||
WT: token
|
||||
}).then(
|
||||
@@ -129,7 +129,7 @@
|
||||
this.selectedBills = this.selectedBills.filter(b => b.id !== item.id);
|
||||
}
|
||||
let sumFee = 0;
|
||||
this.selectedBills.forEach(b => sumFee += b.amount);
|
||||
this.selectedBills.forEach(b => sumFee += b.billAmount);
|
||||
this.sumAmount = sumFee;
|
||||
},
|
||||
updateSelected() {
|
||||
|
||||
@@ -173,12 +173,33 @@
|
||||
this.loadUserInfo()
|
||||
this.countHandlingReserve()
|
||||
this.countUnHandleContract()
|
||||
|
||||
|
||||
this.countUnpayRentBills()
|
||||
this.countUnpayWaeBills()
|
||||
this.countUnreadMsg()
|
||||
},
|
||||
|
||||
methods: {
|
||||
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');
|
||||
},
|
||||
logout() {
|
||||
@@ -234,7 +255,7 @@
|
||||
})
|
||||
},
|
||||
countUnreadMsg(){
|
||||
this.$u.get(`/messsage/countUnread`, {},{
|
||||
this.$u.get(`/message/countUnread`, {},{
|
||||
WT: this.$getToken()
|
||||
}).then(res => {
|
||||
if(res.flag){
|
||||
|
||||
@@ -110,17 +110,13 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
init: true,
|
||||
cusNo: null,
|
||||
openId: null,
|
||||
loginType: null,
|
||||
authCode: '', // 身份证号 / 社会信用代码
|
||||
keyword: '',
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
scrollTop: 0,
|
||||
activeIndex: 0, // 当前选中的索引
|
||||
noticeList: [],
|
||||
filterActiveConditions:[],
|
||||
defaultImgUrl: '/public/static/index/assets.jpg',
|
||||
navList: [{
|
||||
name: "住房",
|
||||
@@ -171,10 +167,6 @@
|
||||
label: '为您推荐',
|
||||
type: 'recommend'
|
||||
},
|
||||
{
|
||||
label: '附近',
|
||||
type: 'nearby'
|
||||
},
|
||||
{
|
||||
label: '上新',
|
||||
type: 'new'
|
||||
@@ -183,14 +175,14 @@
|
||||
// 筛选标签状态
|
||||
activeFilterTabs: [0], // 支持多选
|
||||
filterTabs: [{
|
||||
label: '两室两厅',
|
||||
room: 2,
|
||||
hall: 2
|
||||
label: '两室',
|
||||
filterType: '户型',
|
||||
value: '两室'
|
||||
},
|
||||
{
|
||||
label: '一室一厅',
|
||||
room: 1,
|
||||
hall: 1
|
||||
label: '一室',
|
||||
filterType: '户型',
|
||||
value: '一室'
|
||||
}
|
||||
],
|
||||
flowList: [],
|
||||
@@ -209,12 +201,6 @@
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if (userInfo) {
|
||||
this.cusNo = userInfo.cusNo;
|
||||
this.openId = userInfo.cusNo;
|
||||
}
|
||||
this.resetAndLoad()
|
||||
},
|
||||
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