Browse Source

11

master
1263428893@qq.com 9 months ago
parent
commit
5f9727e1fb
17 changed files with 943 additions and 154 deletions
  1. +19
    -0
      common/api.js
  2. +2
    -2
      common/config.js
  3. +1
    -0
      main.js
  4. +6
    -0
      pages.json
  5. +2
    -1
      pages/auth/index.vue
  6. +3
    -3
      pages/discover/index.vue
  7. +32
    -4
      pages/home/index.vue
  8. +47
    -11
      pages/login/index.vue
  9. +15
    -0
      pages/user/index.vue
  10. +62
    -0
      pages_subpack/broker-account/index.vue
  11. +6
    -1
      pages_subpack/broker-center/index.vue
  12. +163
    -53
      pages_subpack/category/component/search.vue
  13. +38
    -5
      pages_subpack/category/index.vue
  14. +181
    -29
      pages_subpack/detail/index.vue
  15. +354
    -38
      pages_subpack/house/index.vue
  16. +6
    -1
      pages_subpack/landlord-center/index.vue
  17. +6
    -6
      util/request/responseInterceptors.js

+ 19
- 0
common/api.js View File

@ -10,6 +10,8 @@ export const fetchMenu = (params, config = {}) => http.get('/applet/index/getRec
// 微信登录接口
export const wxLogin = (params) => http.get('/api/login/login', {params:params})
export const bindPhone = (params) => http.get('/houserent-admin/login_common/bindPhone', {params:params})
// 微信登录接口
export const appletLogin = (params) => http.get('/houserent-admin/login_common/appletLogin', {params:params})
@ -58,3 +60,20 @@ export const MyHousePageList = (params) => http.get('/houserent-admin/common_ind
export const MyVipPageList = (params) => http.get('/houserent-admin/common_index/getMyVipPageList', {params,params})
// 删除
export const deleteHouse = (params) => http.get('/houserent-admin/common_index/deleteHouse', {params,params})
// 发表评论
export const saveComment = (data) => http.post('/houserent-admin/comment/saveComment', data)
// 发表评论列表
export const commentPageList = (params) => http.get('/houserent-admin/comment/getCommentPageList', {params,params})
// 房源搜索条件-区域
export const houseArea = (params) => http.get('/houserent-admin/comment/getHouseArea', {params,params})
// 房源搜索条件-类型
export const houseIconClass = (params) => http.get('/houserent-admin/comment/getHouseIconClass', {params,params})
// 房源搜索条件-价格
export const housePrice = (params) => http.get('/houserent-admin/comment/getHousePrice', {params,params})
// 房源搜索条件-年限
export const houseYear = (params) => http.get('/houserent-admin/comment/getHouseYear', {params,params})
// 经济人获取账号密码以及邀请码
export const accountCode = (params) => http.get('/houserent-admin/comment/getAccountCode', {params,params})

+ 2
- 2
common/config.js View File

@ -1,5 +1,5 @@
export default {
// baseUrl: 'https://api.book118.com',
baseUrl:'https://houserent-admin.hhlm1688.com'
// baseUrl:'http://h5.xzaiyp.top'
// baseUrl:'https://houserent-admin.hhlm1688.com'
baseUrl:'http://h5.xzaiyp.top'
}

+ 1
- 0
main.js View File

@ -1,6 +1,7 @@
import App from './App'
import uvUI from '@/uni_modules/uv-ui-tools' import { Request } from '@/util/request/index'
import Vue from 'vue'


+ 6
- 0
pages.json View File

@ -68,6 +68,12 @@
"navigationBarTitleText": "分类"
}
},
{
"path": "broker-account/index",
"style": {
"navigationBarTitleText": "经纪人账号"
}
},
{
"path": "detail/index",
"style": {


+ 2
- 1
pages/auth/index.vue View File

@ -110,13 +110,14 @@
iv:event.detail.iv,
nickName:event.detail.userInfo.nickName,
session_key:"",
shareId:"",
shareId:uni.getStorageSync('userId'),
vid:""
}
appletLogin(params).then((response) => {
console.info(`response`,response)
uni.hideLoading()
uni.setStorageSync('token', response.result.token)
uni.setStorageSync('sessionKey', response.result.userInfo.sessionKey)
uni.setStorageSync('userInfo', response.result.userInfo)
// that.commit('setUserInfo',{userInfo:response.result.userInfo,token:response.result.token})
getInfo({}).then(result=>{


+ 3
- 3
pages/discover/index.vue View File

@ -2,12 +2,12 @@
<view class="se-p-20">
<view class="se-p-20 se-bgc-white se-br-20 se-mb-20" v-for="(items,indexs) in list" :key="indexs" @click="onDetail(items)">
<view class="se-flex se-flex-h">
<image class="se-a-80" src="../../static/image/6588.png" mode=""></image>
<image class="se-a-80 se-br-p-50 se-w-80" style="min-width: 80rpx;" :src="items.image" mode="aspectFill"></image>
<view class="se-flex se-flex-v se-ml-30">
<text class="se-fs-28 se-c-black">{{items.title}}</text>
<view class="se-flex se-flex-ai-c se-pt-10">
<text class="se-c-red se-fs-30 se-fw-6">450</text>
<text class="se-c-66 se-fs-22 se-ml-20">罗湖 莲塘</text>
<text class="se-c-red se-fs-30 se-fw-6">{{items.price}}</text>
<text class="se-c-66 se-fs-22 se-ml-20">{{items.address}}</text>
</view>
</view>
</view>


+ 32
- 4
pages/home/index.vue View File

@ -6,10 +6,9 @@
<text class="se-pr-20 nobreak">{{city?city:'未知'}}</text>
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
<view class="se-ml-20" @click="onLogin()">
<uv-search :showAction="false" bgColor="transparent" placeholder="请输入租房信息" v-model="keyword"></uv-search>
<view class="se-ml-20">
<uv-search :disabled="true" @click="onSearch()" :showAction="false" bgColor="transparent" placeholder="请输入租房信息" v-model="keyword"></uv-search>
</view>
</view>
</view>
<view class="backdrop se-mb-20">
@ -133,7 +132,30 @@
list:[]
}
},
mounted() {
onShareAppMessage() {
let share = {
title:"首页分享",
path:"/pages/home/index?userId="+uni.getStorageSync('userInfo').id,
success:(res) => {
console.info(res)
},
fail:(err)=>{
console.info(err)
}
}
console.info(share)
return share
},
onLoad(options) {
//#ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
});
//#endif
if(options.userId){
uni.setStorageSync('userId',options.userId)
}
uni.chooseAddress({
success(res) {
console.info(res)
@ -147,6 +169,7 @@
// this.onGetConfig()
this.$store.commit('initConfig')
},
onPullDownRefresh() {
let that = this
that.pageNo = 1
@ -194,6 +217,11 @@
})
},
onSearch(){
uni.navigateTo({
url:"/pages_subpack/category/index"
})
},
onLogin(){
console.info("onLogin")
uni.navigateTo({


+ 47
- 11
pages/login/index.vue View File

@ -23,6 +23,15 @@
<input type="nickname" placeholder="请输入昵称" v-model="nameUser"
@blur="bindblur" class="se-h-80 se-lh-80 se-w-320 se-fs-24 se-ta-r" placeholder-class="se-fs-24 se-ta-r" />
</view>
<view class=" se-b-b se-flex se-h-140 se-lh-140 se-flex-h-sb">
<text>手机号</text>
<button v-if="phone" class="default-btn se-h-100 se-p-0 se-m-0" open-type="getPhoneNumber" @getphonenumber="onPhonenumber">{{phone}}</button>
<button v-else class="se-w-140 se-h-60 se-lh-60 se-fs-20 se-bgc-green se-c-white se-py-0 se-br-30 se-px-20 se-m-0" open-type="getPhoneNumber" @getphonenumber="onPhonenumber">
获取手机号
</button>
<!-- <input type="nickname" placeholder="请输入昵称" v-model="phone"
@blur="bindblur" class="se-h-80 se-lh-80 se-w-320 se-fs-24 se-ta-r" placeholder-class="se-fs-24 se-ta-r" /> -->
</view>
</view>
<view class="se-mx-40">
<view @click="onUpdateInfo" class="se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-white se-bgc-green">
@ -33,13 +42,14 @@
</template>
<script>
import { UpdateInfo } from "@/common/api.js"
import { UpdateInfo,bindPhone } from "@/common/api.js"
export default {
name : 'Login',
data() {
return {
nameUser:"",
imagUrl:""
imagUrl:"",
phone:""
}
},
methods: {
@ -52,14 +62,33 @@
self.imagUrl = url
})
},
onPhonenumber(event){
let that = this
var detail = event.detail;
if(detail.errMsg=='getPhoneNumber:ok'){
let params={
code : detail.code,
encryptedData: detail.encryptedData,
iv:detail.iv,
sessionKey: uni.getStorageSync('sessionKey'),
openid:uni.getStorageSync('userInfo').appletOpenid
}
bindPhone(params).then((response) => {
console.info(response)
that.phone = response.result
}).catch(error=>{
})
}
},
onUpdateInfo(){
let that = this
let params={
avatarUrl:that.imagUrl,
nickName:that.nameUser
nickName:that.nameUser,
// phone:that.phone
}
if(that.imagUrl&&that.nameUser){
// if(that.imagUrl&&that.nameUser&&that.phone){
UpdateInfo(params).then((response) => {
uni.switchTab({
url:"/pages/home/index"
@ -67,12 +96,12 @@
}).catch((error) =>{
})
}else{
return uni.showToast({
icon:"none",
title:"头像和昵称不能为空!"
})
}
// }else{
// return uni.showToast({
// icon:"none",
// title:""
// })
// }
}
@ -81,4 +110,11 @@
</script>
<style scoped lang="scss">
.default-btn{
background-color: #fff;
}
.default-btn::after{
content: "";
border: none;
}
</style>

+ 15
- 0
pages/user/index.vue View File

@ -46,6 +46,15 @@
</view> -->
</view>
<view class="se-m-30 se-mt-30 se-pl-30 se-pr-20 se-br-20 se-bgc-white">
<view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onBrokerAccount">
<view class="se-flex se-flex-ai-c">
<image class="se-a-30" src="@/static/image/home4734.png" mode=""></image>
<text class="se-ml-20 se-fs-24 se-fw-5">经纪人账号</text>
</view>
<view class="se-flex se-flex-ai-c">
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
<view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onLandlord">
<view class="se-flex se-flex-ai-c">
<image class="se-a-30" src="@/static/image/home4734.png" mode=""></image>
@ -103,6 +112,7 @@
methods: {
onInfo(){
let that = this
that.user = uni.getStorageSync('userInfo')
getInfo({}).then(response=>{
that.user = response.result
console.info('response',response)
@ -125,6 +135,11 @@
url:"/pages_subpack/version/index"
})
},
onBrokerAccount(){
uni.navigateTo({
url:"/pages_subpack/broker-account/index"
})
},
onCustomerService(){
let that = this
let obj = that.$utils.getkeyContent('phone')


+ 62
- 0
pages_subpack/broker-account/index.vue View File

@ -0,0 +1,62 @@
<template>
<view class="se-px-20 se-py-30">
<!-- <view class="se-c-black se-fs-28">
11
</view>
<view class="se-flex se-flex-h-sb se-flex-ai-c se-fs-24 se-mt-10 se-c-66">
11
</view> -->
<view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b se-fs-26">
<view class="se-flex se-flex-ai-c">
<text class="se-ml-20 se-fw-5">账号</text>
</view>
<view class="se-flex se-flex-ai-c">
{{detail.account}}
</view>
</view>
<view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b se-fs-26">
<view class="se-flex se-flex-ai-c">
<text class="se-ml-20 se-fw-5">密码</text>
</view>
<view class="se-flex se-flex-ai-c">
{{detail.password}}
</view>
</view>
<view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b se-fs-26">
<view class="se-flex se-flex-ai-c">
<text class="se-ml-20 se-fw-5">邀请码</text>
</view>
<view class="se-flex se-flex-ai-c">
{{detail.invoice}}
</view>
</view>
</view>
</template>
<script>
import { accountCode } from "@/common/api.js"
export default{
data(){
return{
detail:{}
}
},
onLoad(options) {
this.onAccountCode()
},
methods:{
onAccountCode(){
let that = this
accountCode({}).then(response=>{
console.info('response',response)
that.detail = response.result
}).catch(error=>{
})
},
}
}
</script>
<style>
</style>

+ 6
- 1
pages_subpack/broker-center/index.vue View File

@ -38,7 +38,7 @@
</view>
<view class="se-flex se-fs-24">
<view class="se-flex-1 se-py-10">
<text class="se-c-99 se-mr-20">编辑</text>
<text class="se-c-99 se-mr-20" @click="onEdit(item)">编辑</text>
</view>
<view class="se-flex-1 se-py-10 se-flex se-flex-h-fe">
<text class="se-c-red se-mr-20" @click="onDelete(item)">删除</text>
@ -117,6 +117,11 @@
url:"/pages_subpack/detail/index?id="+event.id
})
},
onEdit(event){
uni.navigateTo({
url:"/pages_subpack/house/index?id="+event.id
})
},
onDelete(event){
let that = this;
uni.showModal({


+ 163
- 53
pages_subpack/category/component/search.vue View File

@ -27,6 +27,7 @@
</template>
<script>
import { houseArea,houseIconClass,housePrice,houseYear } from "@/common/api.js"
export default {
onPageScroll() {
//
@ -65,16 +66,18 @@
activeIndex: 0,
color: '#333',
activeColor: '#20CD7D',
child: [{
label: '全部区域',
value: 'all'
}, {
label: '湖南',
value: 'hunan'
}, {
label: '广州',
value: 'guangzhou'
}]
child: [
// {
// label: '',
// value: 'all'
// }, {
// label: '',
// value: 'hunan'
// }, {
// label: '广',
// value: 'guangzhou'
// },
]
},
rent:{
label: '租金',
@ -82,22 +85,25 @@
activeIndex: 0,
color: '#333',
activeColor: '#20CD7D',
child: [{
label: '全部',
value: 'all'
}, {
label: '0-2k',
value: '2000'
}, {
label: '2k-4k',
value: '4000'
}, {
label: '4k-6k',
value: '6000'
}, {
label: '6k+',
value: '6000+'
}]
child: [
// {
// label: '',
// value: 'all'
// },
// {
// label: '0-2k',
// value: '2000'
// }, {
// label: '2k-4k',
// value: '4000'
// }, {
// label: '4k-6k',
// value: '6000'
// }, {
// label: '6k+',
// value: '6000+'
// },
]
},
type: {
label: '类型',
@ -105,19 +111,21 @@
activeIndex: 0,
color: '#333',
activeColor: '#20CD7D',
child: [{
label: '全部',
value: 'all'
}, {
label: '闲置散居农房',
value: 'nongfang'
}, {
label: '鱼塘',
value: 'yutang'
}, {
label: '耕地',
value: 'gengdi'
}]
child: [
// {
// label: '',
// value: 'all'
// }, {
// label: '',
// value: 'nongfang'
// }, {
// label: '',
// value: 'yutang'
// }, {
// label: '',
// value: 'gengdi'
// },
]
},
duration:{
label: '年限',
@ -125,19 +133,22 @@
activeIndex: 0,
color: '#333',
activeColor: '#20CD7D',
child: [{
label: '全部',
value: 'all'
}, {
label: '5年内',
value: '0-5'
}, {
label: '5-10年',
value: '5-10'
}, {
label: '10-20年',
value: '10-20'
}]
child: [
// {
// label: '',
// value: 'all'
// },
// {
// label: '5',
// value: '0-5'
// }, {
// label: '5-10',
// value: '5-10'
// }, {
// label: '10-20',
// value: '10-20'
// },
]
},
activeName: 'region',
@ -148,7 +159,101 @@
}
}
},
mounted() {
let that = this
// setTimeout(()=>{
that.onhouseArea()
that.onhouseIconClass()
that.onhousePrice()
that.onhouseYear()
// },2000)
console.info('组件')
// houseArea,houseIconClass,housePrice,houseYear
},
methods: {
onhouseArea(){
let that = this
houseArea({}).then(response=>{
let arr = [
{
label: '全部',
value: 'all'
}
]
response.result.forEach(items=>{
let obj = {}
obj.label=items.title;
obj.value=items.id
arr.push(obj)
})
that.region.child=arr
console.info('houseArea',response.result)
}).catch(error=>{
})
},
onhouseIconClass(){
let that = this
houseIconClass({}).then(response=>{
console.info(response.result)
let arr = [
{
label: '全部',
value: 'all'
}
]
response.result.forEach(items=>{
let obj = {}
obj.label=items.title;
obj.value=items.id
arr.push(obj)
})
that.type.child=arr
}).catch(error=>{
})
},
onhousePrice(){
let that = this
housePrice({}).then(response=>{
let arr = [
{
label: '全部',
value: 'all'
}
]
response.result.forEach(items=>{
let obj = {}
obj.label=items.title;
obj.value=items.price
arr.push(obj)
})
that.rent.child=arr
}).catch(error=>{
})
},
onhouseYear(){
let that = this
houseYear({}).then(response=>{
console.info(response.result)
let arr = [
{
label: '全部',
value: 'all'
}
]
response.result.forEach(items=>{
let obj = {}
obj.label=items.title;
obj.value=items.timeGo
arr.push(obj)
})
that.duration.child=arr
}).catch(error=>{
})
},
onSearch(){
this.$emit("onSearch",this.keyword)
},
@ -194,6 +299,11 @@
label,
value
} = e;
this.result.push({
name: this.activeName,
label,
value
});
const findIndex = this.result.findIndex(item => item.name == this.activeName);
if (this.defaultValue.indexOf(value) > -1 && this[this.activeName].label) {
label = this[this.activeName].label;
@ -216,7 +326,7 @@
// uni.showModal({
// content: `${JSON.stringify(this.result)}`
// })
console.info(this.result)
console.info('onParent',this.result)
this.$emit("onParent",this.result)
}
}


+ 38
- 5
pages_subpack/category/index.vue View File

@ -1,6 +1,6 @@
<template>
<view class="uv-page">
<!-- <searchVue @onSearch="onSearch($event)" @onParent="onDropDown($event)" /> -->
<searchVue @onSearch="onSearch($event)" @onParent="onDropDown($event)" />
<view class="se-pb-200">
<view v-if="list.length>0">
<view @click="onDetail(item)" class="se-my-10 se-mx-20 se-px-20 se-py-20 se-br-20 se-bgc-white se-flex" v-for="(item,index) in list" :key="index">
@ -85,13 +85,17 @@
id:null,
pageNo:1,
pageSize:10,
areaId:null,
priceId:null,
typeId:null,
yearId:null,
list:[]
}
},
onLoad(options) {
this.id = options.id
uni.setNavigationBarTitle({
title: options.title
title: options.title ? options.title :"分类"
})
this.onHousePageList()
},
@ -112,7 +116,12 @@
let params={
iconClass:that.id,
pageNo:that.pageNo,
pageSize:that.pageSize
pageSize:that.pageSize,
title:that.keyword,
areaId:that.areaId,
priceId:that.priceId,
typeId:that.typeId,
yearId:that.yearId
}
housePageList(params).then((response) => {
console.info("responseindexsindexsindexs",response.result.records)
@ -141,10 +150,34 @@
})
},
onSearch(event){
console.info(event)
console.info('onSearch',event)
// console.info(event)
let that = this
that.keyword = event
that.list=[]
that.onHousePageList()
},
onDropDown(event){
console.info(event[0].value)
console.info('onDropDown',event)
let that = this
that.areaId = null;
that.priceId = null;
that.typeId = null;
that.yearId = null
event.forEach(items=>{
if(items.name=='region'){
that.areaId = items.value
}else if(items.name=='rent'){
that.priceId = items.value
}else if(items.name=='type'){
that.typeId = items.value
}else if(items.name=='duration'){
that.yearId = items.value
}
})
console.info('that.areaId',that.areaId)
that.list=[]
that.onHousePageList()
},
onDetail(event){
uni.navigateTo({


+ 181
- 29
pages_subpack/detail/index.vue View File

@ -12,9 +12,10 @@
{{detail.iconTitle}}
</view>
</view>
<view class="se-w-vw-10 se-pr-30 se-flex se-flex-v-c">
<uv-icon name="photo"></uv-icon>
<text class="se-c-black se-fs-20">分享</text>
<view class="se-pr-30 se-flex se-flex-v-c">
<!-- <uv-icon name="photo"></uv-icon> -->
<button class="se-w-140 se-h-60 se-lh-60 se-fs-22 se-bgc-green se-c-white se-py-0 se-br-30 se-px-20 se-m-0" open-type="share">分享</button>
<!-- <text class="se-c-black se-fs-20">分享</text> -->
</view>
</view>
<view class="se-mt-30 se-bgc-white se-py-30 se-flex se-flex-h-fs">
@ -197,62 +198,197 @@
<image class="se-w-320 se-h-180 se-br-5 se-ml-10" :src="detail.image" mode=""></image>
</view>
</view>
<!-- <view class="se-mt-30 se-p-40 se-bgc-white">
<view class="se-mt-30 se-p-40 se-bgc-white">
<view class="se-flex se-flex-ai-c se-pb-10">
<view class="line-green"></view>
<view class="se-ml-10 se-fs-32 se-c-black se-fw-6">
房东评价
</view>
</view>
<view class="se-mt-30" v-for="(items,indexs) in 1" :key="indexs">
<view class="se-flex se-w-p-100">
<view class="se-flex se-flex-1">
<image class="se-a-80 se-br-p-50" src="../../static/image/6588.png" mode=""></image>
<view class="se-flex se-flex-v-sa se-flex-ai-fs se-ml-10">
<text class="se-c-33 se-fs-26">IYU466930948</text>
<text class="se-c-66 se-fs-22">2024.04.18</text>
<view v-if="rateList.length>0">
<view class="se-mt-30" v-for="(items,indexs) in rateList" :key="indexs">
<view class="se-flex se-w-p-100">
<view class="se-flex se-flex-1">
<image class="se-a-80 se-br-p-50 se-bgc-f5" style="min-width: 80rpx;" :src="items.userHead" mode=""></image>
<view class="se-flex se-flex-v-sa se-flex-ai-fs se-ml-10">
<text class="se-c-33 se-fs-26">{{items.userName}}</text>
<text class="se-c-66 se-fs-22">{{items.createTime}}</text>
</view>
</view>
<view class="se-flex se-flex-h-fe">
<uv-rate :count="5" :readonly="true" activeColor="#FCD618" v-model="items.num"></uv-rate>
</view>
</view>
<view class="se-flex se-flex-1 se-flex-h-fe">
<uv-rate :count="5" activeColor="#FCD618" v-model="rate"></uv-rate>
<view class="se-lh-40 se-mt-10 se-fs-24 se-c-33">
{{items.userValue}}
</view>
<view class="se-mt-10 se-flex">
<image @click="previewImage(items.userImages, item)" v-for="(item,index) in items.userImages" :key="index" class="se-a-200 se-br-10 se-mr-10" :src="item" mode=""></image>
</view>
</view>
<view class="se-lh-40 se-mt-10 se-fs-24 se-c-33">
房东人很不错当时疫情没在房子里面住直接给我免了一个月房租真的很感动平时有什么需要维修的地方联系他也会很快处理
</view>
<view v-else class="se-py-30">
<uv-empty mode="list" text="快来留言哦"></uv-empty>
</view>
</view>
<view class="se-pb-160"></view>
<view class="content-box">
<view class="se-flex se-w-p-90 se-px-20" @click="show=true">
<uv-input :disabled="true" class="se-br-p-50" placeholder="请输入评论信息" v-model="content"></uv-input>
</view>
</view>
<view v-if="show" @click="show=false" style="z-index: 98;width: 750rpx;height:100vh; position: fixed;top: 0rpx;left:0rpx;background-color: rgba(0,0,0,0.4);"></view>
<view v-if="show" class="se-b-t se-b-ts" style="z-index: 99;width: 750rpx;padding: 20rpx 0rpx 120rpx 0rpx; position: fixed;bottom: 0rpx;left:0rpx;background-color: #fff;">
<view class="se-bgc-white se-px-40">
<view class="se-flex se-flex-v se-fs-26 se-mt-20">
<text class="se-pb-20">评论评分</text>
<uv-rate :count="5" activeColor="#FCD618" v-model="rate"></uv-rate>
</view>
<view class="se-flex se-flex-v se-fs-26 se-mt-20">
<text class="se-pb-20">评论内容</text>
<uv-textarea v-model="userValue" placeholder="请输入评论内容"></uv-textarea>
</view>
<view class="se-lh-40 se-mt-20 se-fs-24 se-c-99">
<text class="se-pb-20">评论图片</text>
<uv-upload customStyle="margin-top:20rpx;" :fileList="userImages" @afterRead="afterImageRead" @delete="deleteImagePic" name="1"
multiple :maxCount="10"></uv-upload>
</view>
<view class="se-flex se-flex-h-sb se-mt-40">
<view @click="onSubmit" class="se-br-20 se-ml-20 se-flex-1 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-white se-bgc-green">
<text class="se-ml-10">发布</text>
</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import { houseDetail } from "@/common/api.js"
import { houseDetail,saveComment,commentPageList } from "@/common/api.js"
export default{
data(){
return{
show:false,
content:"",
id:null,
detail:{},
rate:3,
list:[],
// list: [{
// url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
// title: '西',
// poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
// }, {
// url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
// title: ''
// }, {
// url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
// title: '西'
// }]
rate:0,
userImages:[],
userImage:"",
userValue:"",
pageNo:1,
pageSize:10,
rateList:[]
}
},
onLoad(options) {
//#ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
});
//#endif
this.id = options.id;
if(options.userId){
uni.setStorageSync('userId',options.userId)
}
this.onHouseDetail()
this.onCommentPageList()
},
onShareAppMessage() {
let share = {
title:"首页分享",
path:"/pages_subpack/detail/index?id="+this.id+"&userId="+uni.getStorageSync('userInfo').id,
success:(res) => {
console.info(res)
},
fail:(err)=>{
console.info(err)
}
}
console.info(share)
return share
},
methods:{
previewImage(urls, current) {
uni.previewImage({
urls: urls, // HTTP
current: current // urls
});
},
onCommentPageList(){
let that = this
let params ={
houseId:that.id,
pageNo:that.pageNo,
pageSize:that.pageSize
}
commentPageList(params).then(response=>{
console.info('response',response)
response.result.records.forEach(items=>{
if(items.userImage){
items.userImages=items.userImage.split(',')
}
console.info(items.userImages)
// items.userImages=items.userImage.split(',')
})
that.rateList = that.rateList.concat(response.result.records)
}).catch(error=>{
})
},
onSubmit(){
let that = this
if(that.userValue&&that.rate){
let params={
title:that.detail.title,
num:that.rate,
homeId:that.detail.id,
userId:uni.getStorageSync('userInfo').id,
userHead:uni.getStorageSync('userInfo').headImage,
userName:uni.getStorageSync('userInfo').nickName,
userValue: that.userValue,
userImage:that.userImages.map(item => item.url).join(','),
}
saveComment(params).then(response=>{
that.show = false
that.pageNo=1
that.rate = 0
that.userImages = []
that.userValue =''
that.rateList=[]
that.onCommentPageList()
}).catch(error=>{
})
}else{
return uni.showToast({
icon:"none",
title:"评分和内容不能为空!"
})
}
},
deleteImagePic(event) {
this.userImages.splice(event.index, 1)
},
async afterImageRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.userImages.push({
url
})
})
})
},
onHouseDetail(){
let that = this
houseDetail({houseId:that.id}).then(response=>{
@ -278,6 +414,13 @@
</script>
<style>
.default-btn{
background-color: #fff;
}
.default-btn::after{
content: "";
border: none;
}
page{
background-color: #f5f5f5;
}
@ -290,4 +433,13 @@
.bgc-active-lg{
background-color: #F1FFF9;
}
.content-box{
position: fixed;
bottom: 0;
height: 120rpx;
background: #fff;
width: 100%;
padding: 20rpx 0rpx;
border-top: 1px solid #ddd;
}
</style>

+ 354
- 38
pages_subpack/house/index.vue View File

@ -7,11 +7,23 @@
<uv-form-item label="价格" prop="price">
<uv-input v-model="form.price" type="text" placeholder="请输入价格" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="户主年龄" prop="homeAge">
<uv-input v-model="form.homeAge" type="text" placeholder="请输入户主年龄" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="户型" prop="house">
<uv-input v-model="form.house" type="text" placeholder="请输入户型" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="面积" prop="proportion">
<uv-input v-model="form.proportion" type="text" placeholder="请输入面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
<uv-form-item label="房屋面积" prop="proportion">
<uv-input v-model="form.proportion" type="text" placeholder="请输入房屋面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="房屋结构" prop="homeJg">
<uv-input v-model="form.homeJg" type="text" placeholder="请输入房屋结构" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="交通" prop="homeJt">
<uv-input v-model="form.homeJt" type="text" placeholder="请输入交通" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="面积" prop="homeMi">
<uv-input v-model="form.homeMi" type="text" placeholder="请输入面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="所属位置" prop="address" @click="handleAreaChange()">
<uv-input v-model="form.address" @click="handleAreaChange()" disabled disabledColor="#ffffff" placeholder="选择所在位置" border="none">
@ -20,55 +32,88 @@
<uv-icon name="arrow-right"></uv-icon>
</template>
</uv-form-item>
<uv-form-item label="分类标识" prop="classId" @click="handleClass()">
<uv-input v-model="form.className" @click="handleClass()" disabled disabledColor="#ffffff" placeholder="选择分类标识" border="none">
</uv-input>
<template v-slot:right>
<uv-icon name="arrow-right"></uv-icon>
</template>
</uv-form-item>
<uv-form-item label="所属分类" prop="commonId" @click="handleCommon()">
<uv-input v-model="form.commonName" @click="handleCommon()" disabled disabledColor="#ffffff" placeholder="选择所属分类" border="none">
</uv-input>
<template v-slot:right>
<uv-icon name="arrow-right"></uv-icon>
</template>
</uv-form-item>
<uv-form-item label="编号" prop="number">
<uv-input v-model="form.number" type="text" placeholder="请输入编号" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="房屋周边" prop="perimeter">
<uv-input v-model="form.perimeter" type="text" placeholder="请输入房屋周边" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="房屋朝向及海拔" prop="homeHb">
<uv-input v-model="form.homeHb" type="text" placeholder="请输入房屋朝向及海拔" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="距离场镇距离" prop="homeJl">
<uv-input v-model="form.homeJl" type="text" placeholder="请输入距离场镇距离" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="户主家庭职业" prop="homeJtzy">
<uv-input v-model="form.homeJtzy" type="text" placeholder="请输入户主家庭职业" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="标签" prop="iconTitle">
<uv-input v-model="form.iconTitle" type="text" placeholder="请输入标签用逗号隔开" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="房间数量" prop="housesNumber">
<uv-number-box v-model="form.housesNumber" :min="1" :max="10"></uv-number-box>
</uv-form-item>
<uv-form-item label="房屋主体是否改造" labelWidth="200" prop="revamp">
<uv-form-item label="房屋主体是否改造" prop="revamp">
<uv-radio-group v-model="form.revamp" placement="row">
<uv-radio name="1" label="是"></uv-radio>
<uv-radio name="0" customStyle="margin-left:30rpx;" label="否"></uv-radio>
</uv-radio-group>
</uv-form-item>
<uv-form-item label="是否经过安置" labelWidth="200" prop="resettle">
<uv-form-item label="是否经过安置" prop="resettle">
<uv-radio-group v-model="form.resettle" placement="row">
<uv-radio name="1" label="是"></uv-radio>
<uv-radio name="0" customStyle="margin-left:30rpx;" label="否"></uv-radio>
</uv-radio-group>
</uv-form-item>
<uv-form-item label="院子总面积" labelWidth="100" prop="yardProportion">
<uv-form-item label="院子总面积" prop="yardProportion">
<uv-input v-model="form.yardProportion" type="text" placeholder="请输入院子总面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="坟包及电塔工厂噪音" labelWidth="150" prop="noise">
<uv-form-item label="坟包及电塔工厂噪音" prop="noise">
<uv-input v-model="form.noise" type="text" placeholder="请输入坟包及电塔工厂噪音" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="菜地" prop="homeCai">
<uv-input v-model="form.homeCai" type="text" placeholder="请输入菜地" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="水电气网" prop="net">
<uv-input v-model="form.net" type="text" placeholder="请输入水电气网" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="距离成都西三环" prop="homeShjl">
<uv-input v-model="form.homeShjl" type="text" placeholder="请输入距离成都西三环" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="停车" prop="park">
<uv-input v-model="form.park" type="text" placeholder="请输入停车" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="付款方式及押金" labelWidth="120" prop="deposit">
<uv-form-item label="付款方式及押金" prop="deposit">
<uv-input v-model="form.deposit" type="text" placeholder="请输入押金" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="天府市民云房屋信息档案查询" labelWidth="100" prop="archival" labelPosition="top">
<uv-form-item label="天府市民云房屋信息档案查询" prop="archival">
<uv-input v-model="form.archival" type="text" placeholder="请输入天府市民云房屋信息档案查询" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="租期" prop="tenancy">
<uv-input v-model="form.tenancy" type="text" placeholder="请输入租期" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="邻居对房东的评价" labelWidth="120" prop="evaluate">
<uv-form-item label="邻居对房东的评价" prop="evaluate">
<uv-input v-model="form.evaluate" type="text" placeholder="请输入邻居对房东的评价" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="非正常死亡" labelWidth="80" prop="death">
<uv-form-item label="非正常死亡" prop="death">
<uv-input v-model="form.death" type="text" placeholder="请输入非正常死亡" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="钥匙" prop="key">
@ -84,6 +129,12 @@
<uv-form-item label="年限" prop="timeGo">
<uv-input v-model="form.timeGo" type="text" placeholder="请输入年限" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="浏览量" prop="num">
<uv-input v-model="form.num" type="text" placeholder="请输入浏览量" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="单位" prop="unit">
<uv-input v-model="form.unit" type="text" placeholder="请输入单位" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="报建手续" prop="procedures">
<uv-input v-model="form.procedures" type="text" placeholder="请输入报建手续" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
@ -91,12 +142,12 @@
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.ownershipList" @afterRead="afterOwnershipRead" @delete="deleteOwnershipPic" name="1"
multiple :maxCount="10"></uv-upload>
</uv-form-item>
<uv-form-item label="房屋照片/视频" labelWidth="250" prop="isHouseList" labelPosition="top">
<uv-form-item label="房屋照片" labelWidth="250" prop="isHouseList" labelPosition="top">
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.houseList" @afterRead="afterHouseRead" @delete="deleteHousePic" name="1"
multiple :maxCount="10"></uv-upload>
</uv-form-item>
<uv-form-item label="视频" labelWidth="250" prop="isMp4List" labelPosition="top">
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.mp4List" @afterRead="aftermp4Read" @delete="deletemp4Pic" name="1"
<uv-upload customStyle="margin-top:20rpx;" accept="media" :fileList="form.mp4List" @afterRead="aftermp4Read" @delete="deletemp4Pic" name="1"
multiple :maxCount="10"></uv-upload>
</uv-form-item>
<uv-form-item label="备注" prop="remark" labelPosition="top">
@ -108,11 +159,14 @@
</uv-form>
<!-- 地址 -->
<citySelect ref="citySelectRef" :zIndex="0" @city-change="handleCityChange"></citySelect>
<!-- 选择分类 -->
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
<uv-picker ref="pickerCommon" :columns="commonColumns" @confirm="commonConfirm"></uv-picker>
</view>
</template>
<script>
import { saveOrUpdateHouse } from "@/common/api.js"
import { saveOrUpdateHouse,houseDetail,houseType,commonIndexIndexIcon } from "@/common/api.js"
import citySelect from "@/components/cityselect/index.vue"
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
export default{
@ -122,6 +176,9 @@
data(){
return{
id:"",
houseTypeList:[],
columns:[],
commonColumns:[],
form:{
// title:"",//
// price:"32.34",//
@ -170,12 +227,20 @@
// remark:""
title:"",//
classId:"",//
className:"",//
commonId:"",//
commonName:"",//
price:"",//
house:"",//
proportion:"",//
homeJg:"",//
address:"",//
number:"",//
perimeter:"",//
homeCai:"",//
homeHb:"",//
homeJl:"",//
iconTitle:"",//
housesNumber:1,//
revamp:0,//
@ -183,11 +248,13 @@
yardProportion:"",//
noise:"",//
net:"",//
homeJt:"",//
park:"",//
deposit:"",//
archival:"",//
tenancy:"",//
evaluate:"",//
unit:"",//
death:"",//
key:"1",//
commission:"",//
@ -199,7 +266,10 @@
houseList:[],
isMp4List:"",
mp4List:[],
remark:""
remark:"",
num:"",
longitude:"",//
latitude:"",//
},
rules:{
title:[
@ -210,6 +280,30 @@
trigger: ['blur', 'change']
}
],
classId:[
{
type: 'string',
required: true,
message: '请选择分类',
trigger: ['blur', 'change']
}
],
commonId:[
{
type: 'string',
required: true,
message: '请选择所属分类',
trigger: ['blur', 'change']
}
],
homeAge:[
{
type: 'string',
required: true,
message: '请输入户主年龄',
trigger: ['blur', 'change']
}
],
price:[
{
type: 'string',
@ -226,6 +320,22 @@
trigger: ['blur', 'change']
}
],
unit:[
{
type: 'string',
required: true,
message: '请输入单位',
trigger: ['blur', 'change']
}
],
homeCai:[
{
type: 'string',
required: true,
message: '请输入菜地',
trigger: ['blur', 'change']
}
],
proportion:[
{
type: 'string',
@ -234,6 +344,14 @@
trigger: ['blur', 'change']
}
],
homeJg:[
{
type: 'string',
required: true,
message: '请输入房屋结构',
trigger: ['blur', 'change']
}
],
number:[
{
type: 'string',
@ -250,6 +368,14 @@
trigger: ['blur', 'change']
}
],
homeJl:[
{
type: 'string',
required: true,
message: '请输入距离场镇距离',
trigger: ['blur', 'change']
}
],
iconTitle:[
{
type: 'string',
@ -282,6 +408,38 @@
trigger: ['blur', 'change']
}
],
homeHb:[
{
type: 'string',
required: true,
message: '请输入房屋朝向及海拔',
trigger: ['blur', 'change']
}
],
num:[
{
type: 'string',
required: true,
message: '请输入浏览量',
trigger: ['blur', 'change']
}
],
homeJt:[
{
type: 'string',
required: true,
message: '请输入交通',
trigger: ['blur', 'change']
}
],
homeJtzy:[
{
type: 'string',
required: true,
message: '请输入户主家庭职业',
trigger: ['blur', 'change']
}
],
park:[
{
type: 'string',
@ -298,6 +456,14 @@
trigger: ['blur', 'change']
}
],
homeShjl:[
{
type: 'string',
required: true,
message: '请输入距离成都西三环',
trigger: ['blur', 'change']
}
],
archival:[
{
type: 'string',
@ -330,6 +496,14 @@
trigger: ['blur', 'change']
}
],
num:[
{
type: 'string',
required: true,
message: '请输入浏览量',
trigger: ['blur', 'change']
}
],
key:[
{
type: 'string',
@ -392,12 +566,129 @@
this.$refs.form.setRules(this.rules)
},
onLoad(options) {
this.id = options.id
let that = this
that.id = options.id
that.onHouseType()
that.onCommonIndexIndexIcon()
if(options.id){
houseDetail({houseId:options.id}).then(response=>{
let form = response.result
console.info('responseform',form)
that.form={
userId: uni.getStorageSync('userInfo').id,
id:form.id,
classId:form.classId,//
className:"",//
commonClass:form.commonId,//
commonName:"",//
// commonClass:"",//
address:form.address,//
homeAge:form.homeAge,//
resettle:form.homeAz,//
perimeter:form.homeBian,//
procedures:form.homeBjsx,//
homeCai:form.homeCai,//
park:form.homeCat,//
revamp:form.homeGz,//
homeHb:form.homeHb,//
remark:form.homeBz,//
homeJg:form.homeJg,//
homeJl:form.homeJl,//
homeJt:form.homeJt,//
homeJtzy:form.homeJtzy,//
homeMi:form.homeMi,//
proportion:form.homeMj,//
commission:String(form.homeMoney),//
number:String(form.homeNo),//
housesNumber:String(form.homeNum),//
deposit:String(form.homePay),//
evaluate:form.homePj,//
net:form.homeSd,//
homeShjl:form.homeShjl,//西
death:form.homeSw,//
archival:form.homeTf,//
tenancy:form.homeTime,//
house:form.homeType,//
key:String(form.homeYs),//
yardProportion:form.homeYzmj,//
noise:form.homeZy,//
// iconName:"",//
iconTitle:form.iconTitle,//
num:form.num,//
price:String(form.price) ,//
timeGo:String(form.timeGo),//
title:form.title,//
unit:form.unit,//
latitude:form.latitude,
longitude:form.longitude,
ownershipList:that.stringToKeyValueArray(form.image),//
// iconImage:"",//
houseList:that.stringToKeyValueArray(form.homeImage),//
homeMp4:"",//
}
that.onHouseType()
that.onCommonIndexIndexIcon()
}).catch(error=>{
})
}
},
mounted() {
},
methods:{
onHouseType(){
let that = this
houseType({}).then(response=>{
let arr=[]
that.houseTypeList = response.result
response.result.forEach(items=>{
arr.push(items.title)
if(items.id==that.form.commonClass){
that.form.commonName = items.title
}
})
that.columns[0]=arr
}).catch(error=>{
})
},
onCommonIndexIndexIcon(){
let that = this
commonIndexIndexIcon({}).then(response=>{
let arr=[]
that.commonIconList = response.result
response.result.forEach(items=>{
arr.push(items.title)
if(items.id==that.form.classId){
that.form.className = items.title
}
})
that.commonColumns[0]=arr
}).catch(error=>{
})
},
stringToKeyValueArray(str, delimiter1 = ',') {
console.info(str)
if(str){
let arro = str.split(delimiter1);
console.info('arro',arro)
let arr = [];
arro.forEach(items=>{
let obj = {};
obj["url"] = items
arr.push(obj)
})
console.info(arr)
return arr
}else{
return []
}
},
deleteHousePic(event) {
this.form.houseList.splice(event.index, 1)
},
@ -437,11 +728,31 @@
})
})
},
handleClass(){
this.$refs.picker.open();
},
confirm(e) {
let that = this
let {indexs,value,values} = e
that.form.classId = that.houseTypeList[indexs[0]].id;
that.form.className = that.houseTypeList[indexs[0]].title;
},
handleCommon(){
this.$refs.pickerCommon.open();
},
commonConfirm(e){
let that = this
let {indexs,value,values} = e
that.form.commonId = that.commonIconList[indexs[0]].id;
that.form.commonName = that.commonIconList[indexs[0]].title;
},
handleAreaChange(){
const that = this;
wx.chooseLocation({
// type: 'wgs84',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
const qqmapsdk = new QQMapWX({
@ -455,10 +766,12 @@
latitude: res.latitude,
longitude: res.longitude
},
success: function(res) {
success: function(response) {
console.log('逆地理编码结果:', response);
uni.hideLoading()
that.form.address = res.result.address
console.log('逆地理编码结果:', res);
that.form.longitude = response.result.location.lng
that.form.latitude = response.result.location.lat
that.form.address = response.result.address
},
fail: function(error) {
uni.hideLoading()
@ -504,35 +817,34 @@
that.$refs.form.validate().then(res => {
let params={
userId:"",
id:"",
classId:"",//
commonClass:"",//
id:that.form.id,
classId:that.form.classId,//
commonClass:that.form.commonId,//
address:that.form.address,//
homeAge:"",//
homeAz:"",//
homeAge:that.form.homeAge,//
homeAz:that.form.resettle,//
homeBian:that.form.perimeter,//
homeBjsx:"",//
homeCai:"",//
homeBjsx:that.form.procedures,//
homeCai:that.form.homeCai,//
homeCat:that.form.park,//
homeGz:that.form.revamp,//
homeHb:"",//
homeHb:that.form.homeHb,//
homeBz:that.form.remark,//
homeJg:"",//
homeJl:"",//
homeJt:"",//
homeJtzy:"",//
homeMi:"",//
homeJg:that.form.homeJg,//
homeJl:that.form.homeJl,//
homeJt:that.form.homeJt,//
homeJtzy:that.form.homeJtzy,//
homeMi:that.form.homeMi,//
homeMj:that.form.proportion,//
homeMoney:that.form.commission,//
homeNo:"",//
homeNo:that.form.number,//
homeNum:that.form.housesNumber,//
homePay:that.form.deposit,//
homePj:that.form.evaluate,//
homeSd:that.form.net,//
homeShjl:"",//西
homeShjl:that.form.homeShjl,//西
homeSw:that.form.death,//
homeTf:"",//
homeTf:that.form.archival,//
homeTime:that.form.tenancy,//
homeType:that.form.house,//
homeYs:that.form.key,//
@ -540,16 +852,20 @@
homeZy:that.form.noise,//
iconName:"",//
iconTitle:that.form.iconTitle,//
num:"",//
num:that.form.num,//
price:that.form.price,//
timeGo:that.form.timeGo,//
title:that.form.title,//
unit:"",//
unit:that.form.unit,//
image:that.form.ownershipList.map(item => item.url).join(','),//
iconImage:"",//
homeImage:that.form.houseList.map(item => item.url).join(','),//
homeMp4:"",//
homeMp4:that.form.mp4List.map(item => item.url).join(','),//
latitude:that.form.latitude,
longitude:that.form.longitude
}
console.info(JSON.stringify(params))
params = {"userId":"","classId":"1860389382874828802","commonClass":"1860387853019222017","address":"湖南省岳阳市湘阴县芙蓉北路","homeAge":"66666","homeAz":"1","homeBian":"11","homeBjsx":"11","homeCai":"11","homeCat":"11","homeGz":"1","homeHb":"11","homeBz":"aaaa","homeJg":"22","homeJl":"11","homeJt":"22","homeJtzy":"11","homeMi":"22","homeMj":"22","homeMoney":"11","homeNo":"11","homeNum":2,"homePay":"11","homePj":"11","homeSd":"11","homeShjl":"11","homeSw":"11","homeTf":"11","homeTime":"11","homeType":"666666","homeYs":"1","homeYzmj":"11","homeZy":"11","iconName":"","iconTitle":"11","num":"11","price":"6666","timeGo":"11","title":"66666","unit":"11","image":"https://tennis-oss.xzaiyp.top/2024-12-07/950752cc-2a22-4296-a8fa-f3c5718a60a1.png,https://tennis-oss.xzaiyp.top/2024-12-07/803308f0-06e1-482a-836c-2b500c281fdc.png","iconImage":"","homeImage":"https://tennis-oss.xzaiyp.top/2024-12-07/8e7e321d-8bf5-43d9-a9ff-de849d4d60fd.png,https://tennis-oss.xzaiyp.top/2024-12-07/024dbfc1-29ba-4dbe-8554-1d19feff220b.png","homeMp4":"https://tennis-oss.xzaiyp.top/2024-12-07/b9ebc286-b293-4ec0-8e1c-205cd1ea94b5.mp4","latitude":28.689608,"longitude":112.911421}
saveOrUpdateHouse(params).then(response=>{
console.info('response',response)
uni.showToast({


+ 6
- 1
pages_subpack/landlord-center/index.vue View File

@ -38,7 +38,7 @@
</view>
<view class="se-flex se-fs-24">
<view class="se-flex-1 se-py-20">
<text class="se-c-99 se-mr-20">编辑</text>
<text class="se-c-99 se-mr-20" @click="onEdit(item)">编辑</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<text class="se-c-red se-mr-20" @click="onDelete(item)">删除</text>
@ -116,6 +116,11 @@
url:"/pages_subpack/detail/index?id="+event.id
})
},
onEdit(event){
uni.navigateTo({
url:"/pages_subpack/house/index?id="+event.id
})
},
onDelete(event){
let that = this;
uni.showModal({


+ 6
- 6
util/request/responseInterceptors.js View File

@ -5,13 +5,13 @@
export const responseInterceptors = (vm) => {
uni.$uv.http.interceptors.response.use((response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/
const data = response.data
if (data.code == 200) {
if (data.code == 200 || data.code == 905) {
return Promise.resolve(data);
}else if(data.code === 500){
uni.navigateTo({
url:"/pages/auth/index"
})
return;
// }else if(data.code === 500){
// uni.navigateTo({
// url:"/pages/auth/index"
// })
// return;
}else{
uni.$uv.toast(data.message)
return Promise.reject(data)


Loading…
Cancel
Save