Browse Source

feat: 新增房源类型选择页面和会员中心功能

refactor: 重构房源发布表单输入类型和验证规则

feat(house): 新增经营性建设用地和其他农村资源录入页面

style: 优化首页位置显示和搜索框布局

refactor(user): 重构用户信息展示和会员状态显示

feat(detail): 优化房源详情页字段显示逻辑

refactor(store): 合并data和user模块到主store

fix(config): 修复uvUI初始化顺序和HTTP实例检查

docs: 更新README和注释说明

chore: 更新依赖和配置文件
master
前端-胡立永 3 months ago
parent
commit
cbac020334
25 changed files with 2790 additions and 329 deletions
  1. +5
    -0
      .cursor/rules/index.mdc
  2. +4
    -2
      App.vue
  3. +6
    -1
      common/api.js
  4. +2
    -1
      common/config.js
  5. +11
    -12
      config.js
  6. +27
    -20
      main.js
  7. +1
    -1
      manifest.json
  8. +1
    -1
      mixins/configList.js
  9. +36
    -10
      pages.json
  10. +26
    -6
      pages/home/index.vue
  11. +2
    -1
      pages/login/index.vue
  12. +404
    -84
      pages/tourGuide/tourGuide.vue
  13. +48
    -61
      pages/user/index.vue
  14. +35
    -28
      pages_subpack/detail/index.vue
  15. +450
    -0
      pages_subpack/house/commercial.vue
  16. +623
    -0
      pages_subpack/house/farmhouse.vue
  17. +23
    -10
      pages_subpack/house/index.vue
  18. +479
    -0
      pages_subpack/house/other.vue
  19. +254
    -0
      pages_subpack/house/select.vue
  20. +311
    -0
      pages_subpack/member/index.vue
  21. +10
    -5
      pages_subpack/version/index.vue
  22. BIN
      static/image/tourGuide/2.png
  23. +32
    -12
      store/index.js
  24. +0
    -21
      store/modules/data.js
  25. +0
    -53
      store/modules/user.js

+ 5
- 0
.cursor/rules/index.mdc View File

@ -0,0 +1,5 @@
---
description:
globs:
alwaysApply: true
---

+ 4
- 2
App.vue View File

@ -2,11 +2,13 @@
export default {
onLaunch: function() {
console.log('App Launch')
this.$store.commit('initConfig')
},
onShow: function() {
this.$store.commit('initConfig')
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
}
},
onHide: function() {
console.log('App Hide')


+ 6
- 1
common/api.js View File

@ -1,6 +1,11 @@
// 检查 HTTP 实例是否已初始化
if (!uni.$uv || !uni.$uv.http) {
console.error('HTTP 实例未初始化,请检查 uvUI 配置')
}
const { http } = uni.$uv
// 获取菜单
console.info(`http`,http)
export const fetchMenu = (params, config = {}) => http.get('/applet/index/getRecommendDocs', params, config)


+ 2
- 1
common/config.js View File

@ -1,7 +1,8 @@
export default {
// baseUrl : 'http://127.0.0.1:8000',
// baseUrl: 'https://api.book118.com',
baseUrl:'https://houserent-admin.hhlm1688.com'
baseUrl:'https://houserent-admin.hhlm1688.com',
// baseUrl:'http://augcl.natapp1.cc',
// baseUrl:'http://h5.xzaiyp.top'
// baseUrl:'https://houserent-admin.hhlm1688.com'
// baseUrl:'http://h5.xzaiyp.top'

+ 11
- 12
config.js View File

@ -1,11 +1,9 @@
import Vue from 'vue'
import utils from './utils/utils.js'
import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 移除重复的 uvUI 导入和初始化,已在 main.js 中处理
// 当前环境
const type = 'prod'
const type = 'dev'
// 环境配置
@ -17,7 +15,8 @@ const config = {
baseUrl : 'http://augcl.natapp1.cc/employ-api',
},
prod : {
baseUrl : 'https://employadmin.augcl.com/employ-api',
baseUrl : 'https://houserent-admin.hhlm1688.com/employ-api',
// baseUrl : 'https://employadmin.augcl.com/employ-api',
}
}
@ -25,18 +24,18 @@ const config = {
// 默认配置
const defaultConfig = {
mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
aliOss : {
url : 'https://tennis-oss.xzaiyp.top/',
config : {
aliOss: {
url: 'https://image.hhlm1688.com/',
config: {
//桶的地址
region: 'oss-cn-guangzhou',
//id
accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
//密钥
accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
//桶的名字
bucket: 'zhuoqiu-image',
endpoint:'oss-cn-guangzhou.aliyuncs.com',
bucket: 'hanhaiimage',
endpoint: 'oss-cn-shenzhen.aliyuncs.com',
}
},
}


+ 27
- 20
main.js View File

@ -1,20 +1,25 @@
import App from './App'
import uvUI from '@/uni_modules/uv-ui-tools' import { Request } from '@/util/request/index'
import uvUI from '@/uni_modules/uv-ui-tools'
import { Request } from '@/util/request/index'
import Vue from 'vue'
Vue.config.productionTip = false
import './config.js' import './utils/index.js'
import mixinConfigList from '@/mixins/configList.js'
Vue.mixin(mixinConfigList)
Vue.config.productionTip = false
// 确保 uvUI 在其他配置之前正确初始化
Vue.use(uvUI)
import './config.js'
import './utils/index.js'
import mixinConfigList from '@/mixins/configList.js'
Vue.mixin(mixinConfigList)
App.mpType = 'app'
App.mpType = 'app'
try {
function isPromise(obj) {
return (!!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function");
@ -36,15 +41,17 @@ try {
});
},
});
} catch (error) {}
import store from '@/store' Vue.prototype.$store = store
} catch (error) {}
import store from '@/store'
Vue.prototype.$store = store
// 初始化 HTTP 请求配置
Request()
const app = new Vue({
...App,
...App,
store
})
})
app.$mount()
Request(app)
app.$mount()

+ 1
- 1
manifest.json View File

@ -1,6 +1,6 @@
{
"name" : "tenancy-wechat-uniapp",
"appid" : "__UNI__09A45BC",
"appid" : "__UNI__197A38F",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",


+ 1
- 1
mixins/configList.js View File

@ -13,7 +13,7 @@ export default {
}
},
computed: {
...mapState(['userInfo']),
...mapState(['userInfo','vipInfo', 'configList']),
},
// 定义全局分享
// 1.发送给朋友


+ 36
- 10
pages.json View File

@ -4,7 +4,7 @@
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "租房",
"enablePullDownRefresh": true, //`
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
},
@ -32,7 +32,7 @@
"path": "pages/discover/index",
"style": {
"navigationBarTitleText": "发现",
"enablePullDownRefresh": true, //`
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
},
@ -60,7 +60,7 @@
{
"path": "pages/tourGuide/tourGuide",
"style": {
"navigationBarTitleText": "地图导览",
"navigationBarTitleText": "地图找房",
"navigationBarBackgroundColor": "#1EC77A",
"navigationBarTextStyle": "white"
}
@ -119,6 +119,30 @@
"navigationBarTitleText": "房屋发布"
}
},
{
"path": "house/select",
"style": {
"navigationBarTitleText": "选择发布类型"
}
},
{
"path": "house/farmhouse",
"style": {
"navigationBarTitleText": "闲置农房录入"
}
},
{
"path": "house/commercial",
"style": {
"navigationBarTitleText": "经营性建设用地录入"
}
},
{
"path": "house/other",
"style": {
"navigationBarTitleText": "其他农村资源录入"
}
},
{
"path": "realname/index",
"style": {
@ -178,6 +202,14 @@
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "member/index",
"style": {
"navigationBarTitleText": "开通会员",
"navigationBarBackgroundColor": "#1EC77A",
"navigationBarTextStyle": "white"
}
}
]
}
@ -202,14 +234,8 @@
"pagePath": "pages/tourGuide/tourGuide",
"iconPath": "static/bar/find.png",
"selectedIconPath": "static/bar/find_selected.png",
"text": "发现"
"text": "地图找房"
},
// {
// "pagePath": "pages/discover/index",
// "iconPath": "static/bar/find.png",
// "selectedIconPath": "static/bar/find_selected.png",
// "text": "发现"
// },
{
"pagePath": "pages/user/index",
"iconPath": "static/bar/user.png",


+ 26
- 6
pages/home/index.vue View File

@ -1,12 +1,12 @@
<template>
<view>
<view class="se-px-40 se-py-20" style="background-color: #1EC77A;">
<view class="se-bgc-white se-br-50 se-c-black se-px-20 se-py-5 se-flex se-flex-h-sb se-fs-26">
<view class="se-b-r se-pl-10 se-pr-20 se-flex se-flex-h se-h-40 se-lh-40 " @click="handleAreaChange()">
<text class="se-pr-20 nobreak">{{city?city:'未知'}}</text>
<uv-icon name="arrow-down-fill"></uv-icon>
<view class="se-bgc-white se-br-50 se-c-black se-px-20 se-py-5 se-flex se-flex-ai-c se-fs-26">
<view class="location-container se-b-r se-pl-10 se-pr-20 se-flex se-flex-h se-h-40 se-lh-40" @click="handleAreaChange()">
<text class="location-text se-pr-20">{{city?city:'未知'}}</text>
<!-- <uv-icon name="arrow-down-fill"></uv-icon> -->
</view>
<view class="se-ml-20">
<view class="search-container se-flex-1 se-ml-20">
<uv-search :disabled="true" @click="onSearch()" :showAction="false" bgColor="transparent" placeholder="请输入租房信息" v-model="keyword"></uv-search>
</view>
</view>
@ -198,7 +198,8 @@
}
getInfo({}).then(result=>{
uni.navigateTo({
url:"/pages_subpack/house/index"
// url:"/pages_subpack/house/index"
url:"/pages_subpack/house/select"
})
}).catch(err=>{
@ -345,4 +346,23 @@
.nobreak {
white-space: nowrap;
}
/* 位置显示优化 */
.location-container {
min-width: 0;
max-width: 200rpx;
flex-shrink: 0;
}
.location-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 140rpx;
display: inline-block;
}
.search-container {
min-width: 0;
}
</style>

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

@ -83,7 +83,8 @@
}
bindPhone(params).then((response) => {
console.info(response)
that.phone = response.result
console.info(JSON.parse(response.result).phone_info.phoneNumber)
that.phone = JSON.parse(response.result).phone_info.phoneNumber
}).catch(error=>{
})


+ 404
- 84
pages/tourGuide/tourGuide.vue View File

@ -1,21 +1,50 @@
<template>
<view class="Locations">
<map style="width: 100%;height: 60vh" :layer-style='5' :show-location='true' :latitude="position.latitude"
:longitude="position.longitude" :markers="spotGuideMarkers" :scale="scale" @markertap="markertap" id="mapId"
@callouttap="callouttap">
<map style="width: 100%;height: 60vh"
:layer-style='5'
:show-location='true'
:latitude="position.latitude"
:longitude="position.longitude"
:markers="spotGuideMarkers"
:scale="scale"
@markertap="markertap"
id="mapId"
@callouttap="callouttap"
:enable-zoom="true"
:enable-scroll="true"
:enable-rotate="true">
</map>
<!-- 测试按钮 -->
<view class="test-button" @click="testLoadHouseList">
<text>测试加载房源</text>
</view>
<!-- <view class="tabs">
<view class=""
v-for="(item, index) in tabs"
:key="index"
@click="setSpotGuideIndex(index)"
:class="{act : spotGuideIndex == index}">
{{ item }}
</view>
</view> -->
<!-- 搜索功能 -->
<view class="search-container">
<view class="se-bgc-white se-pb-20 se-pt-30 se-px-40">
<uv-search @search="onSearch()" placeholder="搜索租房信息" :showAction="false" v-model="keyword"></uv-search>
</view>
<view class="se-pb-10 se-px-40 se-bgc-white">
<uv-drop-down ref="dropDown" sign="dropDown_1" text-active-color="#1EC77A"
:extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}"
:extra-active-icon="{name:'arrow-up-fill',color:'#1EC77A',size:'26rpx'}" :defaultValue="defaultValue"
:custom-style="{padding: '0rpx 0rpx',borderBottom:'1rpx solid transparent'}" @click="selectMenu">
<uv-drop-down-item name="region" type="2" :label="dropItem('region').label" :value="dropItem('region').value">
</uv-drop-down-item>
<uv-drop-down-item name="rent" type="2" :label="dropItem('rent').label" :value="dropItem('rent').value">
</uv-drop-down-item>
<uv-drop-down-item name="type" type="2" :label="dropItem('type').label" :value="dropItem('type').value">
</uv-drop-down-item>
<uv-drop-down-item name="duration" type="2" :label="dropItem('duration').label" :value="dropItem('duration').value">
</uv-drop-down-item>
</uv-drop-down>
<uv-drop-down-popup sign="dropDown_1" :click-overlay-on-close="true" :currentDropItem="currentDropItem"
@clickItem="clickItem" @popupChange="change"></uv-drop-down-popup>
</view>
</view>
<uv-tabs :list="houseTypeList" :activeStyle="{ color: '#1EC77A', fontWeight: 600 }" lineColor="#1EC77A"
lineHeight="8rpx" lineWidth="50rpx" keyName="title" :current="currentHouseType"
@ -73,7 +102,7 @@
</template>
<script>
import { housePageList, houseType } from "@/common/api.js"
import { housePageList, houseType, houseArea, houseIconClass, housePrice, houseYear } from "@/common/api.js"
import { getInfo } from "@/common/api.js"
export default {
data() {
@ -93,23 +122,71 @@ export default {
pageNo: 1,
pageSize: 10,
houseTypeList: [], //
currentHouseType: 0 ,//
currentHouseType: 0, //
userInfo: null, //
//
keyword: "",
// value
defaultValue: ['all', 'all', 'all','all'],
//
result: [],
region:{
label: '区域',
value: 'all',
activeIndex: 0,
color: '#333',
activeColor: '#1EC77A',
child: []
},
rent:{
label: '租金',
value: 'all',
activeIndex: 0,
color: '#333',
activeColor: '#1EC77A',
child: []
},
type: {
label: '类型',
value: 'all',
activeIndex: 0,
color: '#333',
activeColor: '#1EC77A',
child: []
},
duration:{
label: '年限',
value: 'all',
activeIndex: 0,
color: '#333',
activeColor: '#1EC77A',
child: []
},
activeName: 'region',
//
priceId: null,
typeId: null,
yearId: null
}
},
computed: {
spotGuideMarkers() {
let markers = [];
console.log('计算地图标记点,房源列表长度:', this.list.length)
this.list.forEach((item, index) => {
if (item.latitude && item.longitude) {
console.log(`添加标记点 ${index}:`, item.title, item.latitude, item.longitude)
markers.push({
id: index,
latitude: item.latitude,
longitude: item.longitude,
iconPath: '/static/image/tourGuide/marker.png',
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
iconPath: '/static/image/tourGuide/2.png',
width: 30,
height: 30,
callout: {
content: item.spotName,
content: item.title || '房源',
color: '#000000',
fontSize: 14,
borderRadius: 5,
@ -120,42 +197,85 @@ export default {
});
}
});
console.log('生成的标记点数量:', markers.length)
return markers;
},
//
dropItem() {
return (name) => {
const result = {};
const find = this.result.find(item => item.name === name);
if (find) {
result.label = find.label;
result.value = find.value;
} else {
result.label = this[name].label;
result.value = this[name].value;
}
return result;
}
},
//
currentDropItem() {
return this[this.activeName];
}
},
onLoad() {
console.log('页面加载完成')
//
this.$nextTick(() => {
if (this.list.length === 0) {
this.onHousePageList()
}
})
},
onPageScroll() {
//
if (this.$refs.dropDown) {
this.$refs.dropDown.init();
}
},
created() {
this.getCurrentLocation()
this.onHouseType() //
this.onHousePageList() //
this.getUserInfo() //
//this.getUserInfo() //
//
this.initSearchData()
//
this.$nextTick(() => {
this.onHousePageList() //
})
},
onPullDownRefresh() {
if(!uni.getStorageSync('token') || this.userInfo.isPay != 1){
return
}
let that = this
that.pageNo = 1
that.list = []
that.onHousePageList()
},
onReachBottom() {
if(!uni.getStorageSync('token') || this.userInfo.isPay != 1){
return
}
let that = this
that.pageNo = that.pageNo + 1
that.onHousePageList()
},
methods: {
getUserInfo(state){
this.$store.commit('getUserInfo', userInfo => {
if(userInfo.isPay != 1){
this.$store.commit('getUserInfo', (userInfo) => {
this.userInfo = userInfo
if(userInfo && userInfo.isPay != 1){
uni.showModal({
title: '开通会员可查看租房地图',
content: '开通会员后可查看详细地址和联系方式',
confirmText: '立即开通',
cancelText: '取消',
success : res => {
if(res.confirm){
this.getUserInfo()
//
uni.navigateTo({
url: '/pages_subpack/member/index'
})
}
}
})
@ -228,32 +348,16 @@ export default {
console.log("markertap===你点击了标记点===", e)
let event = this.list[e.markerId]
this.onDetail(event)
// uni.openLocation({
// latitude: spot.latitude,
// longitude: spot.longitude,
// })
// BYCLICK
// ALWAYS
// this.$store.commit('setDisplay',
// this.spotGuideMarkers[e.markerId].id)
// this.$forceUpdate()
// this.spotGuideMarkers.forEach((n, i) => {
// if(i == e.markerId){
// //
// n.callout.display = 'ALWAYS'
// }else{
// //
// n.callout.display = 'BYCLICK'
// }
// })
if (event) {
this.onDetail(event)
} else {
console.error('未找到对应的房源数据')
uni.showToast({
title: '房源信息获取失败',
icon: 'none'
})
}
},
openLocation(n) {
uni.openLocation({
@ -264,11 +368,20 @@ export default {
//
callouttap(e) {
console.log('callouttap地图点击事件', e)
let spot = this.spotGuideMarkers[e.markerId]
uni.openLocation({
latitude: spot.latitude,
longitude: spot.longitude,
})
let event = this.list[e.markerId]
if (event && event.latitude && event.longitude) {
uni.openLocation({
latitude: event.latitude,
longitude: event.longitude,
})
} else {
console.error('未找到对应的房源位置信息')
uni.showToast({
title: '房源位置信息获取失败',
icon: 'none'
})
}
},
toUrl(item) {
console.log(item);
@ -325,16 +438,17 @@ export default {
},
//
onHousePageList() {
if(!uni.getStorageSync('token') || this.userInfo.isPay != 1){
return
}
let that = this
let params = {
classId: that.classId,
pageNo: that.pageNo,
pageSize: that.pageSize
pageSize: that.pageSize,
//
title: that.keyword, //
areaId: that.areaId, //
priceId: that.priceId, //
typeId: that.typeId, //
yearId: that.yearId //
}
//
@ -343,28 +457,60 @@ export default {
params.longitude = that.position.longitude
}
console.log('请求房源列表参数:', params)
housePageList(params).then((response) => {
console.info("房源列表数据", response.result.records)
response.result.records.forEach((items, indexs) => {
if (items.image) {
items.images = items.image.split(',')
} else {
items.images = []
}
if (items.homeImage) {
items.homeImages = items.homeImage.split(',')
} else {
items.homeImages = []
}
if (items.iconTitle) {
items.iconTitles = items.iconTitle.split(',')
} else {
items.iconTitles = []
if (response.result && response.result.records) {
response.result.records.forEach((items, indexs) => {
if (items.image) {
items.images = items.image.split(',')
} else {
items.images = []
}
if (items.homeImage) {
items.homeImages = items.homeImage.split(',')
} else {
items.homeImages = []
}
if (items.iconTitle) {
items.iconTitles = items.iconTitle.split(',')
} else {
items.iconTitles = []
}
})
that.list = that.list.concat(response.result.records)
//
let markersCount = that.list.filter(item => item.latitude && item.longitude).length
console.log(`房源总数: ${that.list.length}, 有位置信息的房源: ${markersCount}`)
//
if (that.list.length > 0) {
let firstHouse = that.list.find(item => item.latitude && item.longitude)
if (firstHouse) {
that.position.latitude = firstHouse.latitude
that.position.longitude = firstHouse.longitude
}
//
that.$nextTick(() => {
let mapContext = uni.createMapContext('mapId', that)
if (mapContext) {
mapContext.updateGroundOverlay({
id: 'markers',
'include-points': that.spotGuideMarkers
})
}
})
}
})
that.list = that.list.concat(response.result.records)
}
}).catch((error) => {
console.error('获取房源列表失败:', error)
uni.showToast({
title: '获取房源列表失败',
icon: 'none'
})
})
},
//
@ -374,12 +520,186 @@ export default {
})
},
//
//
initSearchData() {
this.onhouseArea()
this.onhouseIconClass()
this.onhousePrice()
this.onhouseYear()
},
//
onSearch() {
console.info('搜索关键词:', this.keyword)
this.pageNo = 1
this.list = []
this.onHousePageList()
},
//
selectMenu(name) {
this.activeName = name;
},
//
clickItem(item) {
console.log('选择筛选项:', item);
//
this[this.activeName].label = item.label;
this[this.activeName].value = item.value;
//
this.handleFilter(item);
},
//
handleFilter(item) {
console.info('筛选条件变化:', item)
this.pageNo = 1
//
if (this.activeName === 'region') {
this.areaId = item.value === 'all' ? null : item.value
} else if (this.activeName === 'rent') {
this.priceId = item.value === 'all' ? null : item.value
} else if (this.activeName === 'type') {
this.typeId = item.value === 'all' ? null : item.value
} else if (this.activeName === 'duration') {
this.yearId = item.value === 'all' ? null : item.value
}
this.list = []
this.onHousePageList()
},
//
change(e) {
console.log('弹窗打开状态:', e);
},
//
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('区域数据', 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 => {
})
},
//
testLoadHouseList() {
console.log('手动触发房源列表加载');
this.pageNo = 1;
this.list = [];
this.onHousePageList();
}
}
}
</script>
<style scoped lang="scss">
.test-button {
position: fixed;
top: 20rpx;
right: 20rpx;
background-color: #1EC77A;
color: white;
padding: 20rpx;
border-radius: 10rpx;
z-index: 999;
font-size: 24rpx;
}
.Locations {
.search-container {
background-color: #fff;
border-bottom: 1rpx solid #f0f0f0;
}
.tabs {
display: flex;


+ 48
- 61
pages/user/index.vue View File

@ -2,36 +2,31 @@
<view class="u-page">
<view class="se-pt-30 se-pb-60 se-px-40 se-bgc-green se-c-white se-pos">
<view class="se-flex">
<image @click="onHead" :src="user.headImage" class="se-br-p-50 se-bgc-f9 se-w-120 se-h-120" mode=""></image>
<image @click="onHead" :src="user.headImage" class="se-br-p-50 se-bgc-f9 se-w-120 se-h-120" mode="">
</image>
<view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
<view class="se-flex"
style="align-items: center;">
<text class="se-fw-6 se-fs-30">{{user.nickName?user.nickName:'暂无昵称'}}</text>
<view class=""
v-if="user.isPay == 1"
style="display: flex;background-color: #fff;
<view class="se-flex" style="align-items: center;">
<text class="se-fw-6 se-fs-30">{{userInfo.nickName?userInfo.nickName:'暂无昵称'}}</text>
<!-- 会员状态 -->
<view class="" v-if="vipInfo.title" style="display: flex;background-color: #fff;
color: #0f0;
font-size: 24rpx;
align-items: center;
border-radius: 20rpx;
padding: 4rpx 10rpx;">
<uv-icon
name="level"
size="40rpx"
color="#0f0"
></uv-icon>
会员
{{vipInfo.title}}
</view>
<!-- <view class="se-flex se-flex-ai-c se-ml-20">
<image class="se-a-25 se-mr-10" src="@/static/image/pencil.png" mode=""></image>
<text class="se-fs-22">修改资料</text>
</view> -->
</view>
<view class="se-fs-24 se-display-ib" v-if="user.phone">
<view class="se-fs-24 se-display-ib" v-if="userInfo.phone">
<text>手机号:</text>
<text class="se-ml-20">{{user.phone}}</text>
<text class="se-ml-20">{{userInfo.phone}}</text>
</view>
</view>
</view>
@ -64,7 +59,7 @@
</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-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>
@ -90,7 +85,7 @@
<view class="se-flex se-flex-ai-c">
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
</view> -->
<view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onCustomerService">
<view class="se-flex se-flex-ai-c">
<image class="se-a-30" src="@/static/image/user49384.png" mode=""></image>
@ -122,92 +117,84 @@
</template>
<script>
import { getInfo } from "@/common/api.js"
export default {
data() {
return {
user:{}
}
return {}
},
onLoad() {
},
onShow() {
this.onInfo()
this.$store.commit('getUserInfo')
},
methods: {
onHead(){
onHead() {
uni.navigateTo({
url:"/pages/login/index?back="+1
url: "/pages/login/index?back=" + 1
})
},
onInfo(){
let that = this
that.user = uni.getStorageSync('userInfo')
getInfo({}).then(response=>{
that.user = response.result
console.info('response',response)
}).catch(error=>{
openMemberPage() {
uni.navigateTo({
url: "/pages_subpack/member/index"
})
},
onLandlord(){
onLandlord() {
uni.navigateTo({
url:"/pages_subpack/landlord-center/index"
url: "/pages_subpack/landlord-center/index"
})
},
onBrokerCenter(){
onBrokerCenter() {
uni.navigateTo({
url:"/pages_subpack/broker-center/index"
url: "/pages_subpack/broker-center/index"
})
},
onVersion(){
onVersion() {
uni.navigateTo({
url:"/pages_subpack/version/index"
url: "/pages_subpack/version/index"
})
},
onBrokerAccount(){
onBrokerAccount() {
uni.navigateTo({
url:"/pages_subpack/broker-account/index"
url: "/pages_subpack/broker-account/index"
})
},
onLogOut(){
onLogOut() {
uni.showModal({
title:"温馨提示",
content:"确定退出当前登录",
cancelText:"取消",
confirmText:"确定",
success:(res)=> {
title: "温馨提示",
content: "确定退出当前登录",
cancelText: "取消",
confirmText: "确定",
success: (res) => {
console.info(res)
if(res.confirm==true){
if (res.confirm == true) {
uni.removeStorageSync("userInfo")
uni.removeStorageSync("token")
uni.removeStorageSync("sessionKey")
uni.navigateTo({
url:"/pages/auth/index"
url: "/pages/auth/index"
})
}
}
})
},
onCustomerService(){
onCustomerService() {
let that = this
let obj = that.$utils.getkeyContent('phone')
if (uni.canIUse('makePhoneCall')) {
uni.makePhoneCall({
phoneNumber: obj.keyContent, //
success: function () {
console.log('拨打电话成功');
},
fail: function () {
console.log('拨打电话失败');
}
phoneNumber: this.configList.phone, //
success: function() {
console.log('拨打电话成功');
},
fail: function() {
console.log('拨打电话失败');
}
});
} else {
console.log('你的设备不支持拨打电话功能');
}
}
}
}


+ 35
- 28
pages_subpack/detail/index.vue View File

@ -42,25 +42,25 @@
房源信息
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.id">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">编号</text>
<text class="se-c-black">{{detail.classId}}</text>
<text class="se-c-black">{{detail.id}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeJg">
<text class="se-c-66 se-mr-20">房屋结构</text>
<text class="se-c-black">{{detail.homeJg}}</text>
</view>
</view>
<view class="se-flex se-fs-24"
v-if="userInfo.isPay == 1">
v-if="userInfo.isPay == 1 && detail.address">
<view class="se-flex-2 se-py-20">
<text class="se-c-66 se-mr-20">房屋地址</text>
<text class="se-c-black se-fw-6">{{ detail.address }}</text>
</view>
</view>
<view class="se-flex bgc-active-lg se-py-20 se-br-10"
v-if="userInfo.isPay == 1">
v-if="userInfo.isPay == 1 && detail.address">
<view class="se-w-p-85 se-pl-30">
<view class=" se-c-black se-fw-6 se-fs-24">
您的位置{{ detail.address }}
@ -78,63 +78,64 @@
<text class="se-c-black se-fs-20 se-mt-10">导航</text>
</view> -->
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeBian">
<view class="se-flex-2 se-py-20">
<text class="se-c-66 se-mr-20">房屋周边</text>
<text class="se-c-black se-fw-6">{{detail.homeBian}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeNum">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">房间数量</text>
<text class="se-c-black">{{detail.homeNum}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeCai">
<text class="se-c-66 se-mr-20">菜地</text>
<text class="se-c-black">{{detail.homeCai}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeJl">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">距离场镇距离</text>
<text class="se-c-black">{{detail.homeJl}}km</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeShjl">
<text class="se-c-66 se-mr-20">距离成都西三环</text>
<text class="se-c-black">{{detail.homeShjl}}km</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeGz">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">房屋主体是否改造</text>
<text class="se-c-black">{{detail.homeGz}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeMj">
<text class="se-c-66 se-mr-20">房屋面积</text>
<text class="se-c-black">{{detail.homeMj}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeYzmj">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">院子总面积</text>
<text class="se-c-black">{{detail.homeYzmj}}</text>
</view>
<view class="se-flex-2 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-2 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeHb">
<text class="se-c-66 se-mr-20">房屋朝向及海拔</text>
<text class="se-c-black">{{detail.homeHb}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeAz">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">是否经过安置</text>
<text class="se-c-black">{{detail.homeAz}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeJt">
<text class="se-c-66 se-mr-20">交通</text>
<text class="se-c-black">{{detail.homeJt}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<!-- 隐藏坟包及电塔字段 -->
<!-- <view class="se-flex se-fs-24">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">坟包及电塔 工厂噪音</text>
<text class="se-c-black">{{detail.homeZy}}</text>
@ -143,53 +144,59 @@
<text class="se-c-66 se-mr-20">水电气网</text>
<text class="se-c-black">{{detail.homeSd}}</text>
</view>
</view> -->
<view class="se-flex se-fs-24" v-if="detail.homeSd">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">水电气网</text>
<text class="se-c-black">{{detail.homeSd}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeCat">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">停车</text>
<text class="se-c-black">{{detail.homeCat}}</text>
</view>
<view class="se-flex-2 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-2 se-py-20 se-flex se-flex-h-fe" v-if="detail.homePay">
<text class="se-c-66 se-mr-20">付款方式及押金</text>
<text class="se-c-black">{{detail.homePay}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeTime">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">租期</text>
<text class="se-c-black">{{detail.homeTime}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<text class="se-c-66 se-mr-20">非正常死亡</text>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeSw">
<text class="se-c-66 se-mr-20">不利因素</text>
<text class="se-c-black">{{detail.homeSw}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homePj">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">邻居对房东评价</text>
<text class="se-c-black">{{detail.homePj}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeMoney">
<text class="se-c-66 se-mr-20">佣金</text>
<text class="se-c-black">{{detail.homeMoney}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeYs">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">钥匙</text>
<text class="se-c-black">{{detail.homeYs}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeJtzy">
<text class="se-c-66 se-mr-20">户主家庭职业</text>
<text class="se-c-black">{{detail.homeJtzy}}</text>
</view>
</view>
<view class="se-flex se-fs-24">
<view class="se-flex se-fs-24" v-if="detail.homeBjsx">
<view class="se-flex-1 se-py-20">
<text class="se-c-66 se-mr-20">报建手续</text>
<text class="se-c-black">{{detail.homeBjsx}}</text>
</view>
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe">
<view class="se-flex-1 se-py-20 se-flex se-flex-h-fe" v-if="detail.homeAge">
<text class="se-c-66 se-mr-20">户主年龄</text>
<text class="se-c-black">{{detail.homeAge}}</text>
</view>


+ 450
- 0
pages_subpack/house/commercial.vue View File

@ -0,0 +1,450 @@
<template>
<view class="container">
<view class="header">
<view class="title">经营性建设用地录入</view>
</view>
<view class="form-container">
<uv-form labelPosition="left" :model="form" :rules="rules" ref="form" labelWidth="80" labelStyle="font-size:28rpx;">
<!-- 必填项 -->
<view class="section-title">基本信息必填</view>
<!-- 1. 出租/出让 -->
<uv-form-item label="类型" prop="type" required>
<uv-radio-group v-model="form.type" placement="row">
<uv-radio name="rent" label="出租"></uv-radio>
<uv-radio name="transfer" customStyle="margin-left:30rpx;" label="出让"></uv-radio>
</uv-radio-group>
</uv-form-item>
<!-- 2. 地址 -->
<uv-form-item label="地址" prop="address" required @click="handleAddressSelect()">
<uv-input v-model="form.address" @click="handleAddressSelect()" disabled disabledColor="#ffffff" placeholder="请选择地块位置" border="none">
</uv-input>
<template v-slot:right>
<uv-icon name="arrow-right"></uv-icon>
</template>
</uv-form-item>
<!-- 3. 联系人和电话 -->
<uv-form-item label="联系人" prop="contactName" required>
<uv-input v-model="form.contactName" 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="contactPhone" required>
<uv-input v-model="form.contactPhone" type="number" placeholder="请输入联系电话" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<!-- 4. 产权证照片 -->
<uv-form-item label="产权证照片" labelWidth="250" prop="propertyImages" labelPosition="top" required>
<view class="upload-tip">请上传房产证土地证或不动产权证照片</view>
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.propertyImages" @afterRead="afterPropertyRead" @delete="deletePropertyPic" name="1"
multiple :maxCount="5"></uv-upload>
</uv-form-item>
<!-- 5. 土地面积 -->
<uv-form-item label="土地面积" prop="landArea" required>
<view class="input-with-unit">
<uv-input v-model="form.landArea" type="digit" placeholder="请输入土地面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
<text class="unit"></text>
</view>
<view class="input-tip">请录入土地使用证或不动产权证面积仅输入数字</view>
</uv-form-item>
<!-- 6. 地块视频 -->
<uv-form-item label="地块视频" labelWidth="250" prop="videos" labelPosition="top" required>
<view class="upload-tip">请上传地块视频1分钟内</view>
<uv-upload customStyle="margin-top:20rpx;" accept="video" :fileList="form.videos" @afterRead="afterVideoRead" @delete="deleteVideoPic" name="1"
multiple :maxCount="2"></uv-upload>
</uv-form-item>
<!-- 7. 价格 -->
<uv-form-item label="价格" prop="price" required>
<view class="price-container">
<uv-input v-model="form.price" type="digit" placeholder="请输入价格" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;flex:1;"></uv-input>
<text class="price-unit" v-if="form.type === 'rent'">//</text>
<text class="price-unit" v-else-if="form.type === 'transfer'">万元/</text>
<text class="price-unit" v-else></text>
</view>
<view class="input-tip">请输入数字支持小数点后两位</view>
</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>
<!-- 选填项 -->
<view class="section-title">详细信息选填</view>
<!-- 8. 地块介绍 -->
<uv-form-item label="地块介绍" prop="description" labelPosition="top">
<uv-input
v-model="form.description"
type="textarea"
placeholder="请详细介绍地块情况、用途规划、周边环境等"
customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:10px;"
:autoHeight="true"
:maxlength="500"
></uv-input>
</uv-form-item>
<uv-form-item>
<uv-button type="primary" text="提交信息" customStyle="margin-top: 30px;background-color: #1EC77A;border-radius: 30px;" @click="submit"></uv-button>
</uv-form-item>
</uv-form>
</view>
<!-- 分类选择器 -->
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
</view>
</template>
<script>
import { saveOrUpdateHouse, houseType } from "@/common/api.js"
export default {
data() {
return {
commonClass: '', // ID
form: {
type: '', // /
address: '', //
contactName: '', //
contactPhone: '', //
propertyImages: [], //
landArea: '', //
videos: [], //
price: '', //
description: '', //
longitude: '', //
latitude: '', //
classId: '', //
className: '' //
},
columns: [], //
houseTypeList: [], //
rules: {
type: [
{ required: true, message: '请选择出租或出让', trigger: ['blur', 'change'] }
],
address: [
{ required: true, message: '请选择地块地址', trigger: ['blur', 'change'] }
],
contactName: [
{ required: true, message: '请输入联系人姓名', trigger: ['blur', 'change'] }
],
contactPhone: [
{ required: true, message: '请输入联系电话', trigger: ['blur', 'change'] },
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: ['blur', 'change'] }
],
landArea: [
{ required: true, message: '请输入土地面积', trigger: ['blur', 'change'] },
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的数字格式', trigger: ['blur', 'change'] }
],
price: [
{ required: true, message: '请输入价格', trigger: ['blur', 'change'] },
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的价格格式', trigger: ['blur', 'change'] }
],
classId: [
{ required: true, message: '请选择分类标识', trigger: ['blur', 'change'] }
]
}
}
},
onReady() {
this.$refs.form.setRules(this.rules)
},
onLoad(options) {
//
uni.setNavigationBarTitle({
title: '经营性建设用地录入'
})
// commonClass
if(options.commonClass) {
this.commonClass = options.commonClass
}
// classId
if(options.classId) {
this.form.classId = options.classId
}
//
this.onHouseType()
},
methods: {
//
onHouseType(){
let that = this
houseType({}).then(response=>{
let arr=[]
that.houseTypeList = response.result
response.result.forEach(items=>{
arr.push(items.title)
// classIdclassName
if(items.id == that.form.classId){
that.form.className = items.title
}
})
that.columns[0]=arr
}).catch(error=>{
})
},
//
handleAddressSelect() {
const that = this;
wx.chooseLocation({
success: function (res) {
console.log('选择的位置:', res);
that.form.longitude = res.longitude
that.form.latitude = res.latitude
that.form.address = res.address
}
})
},
//
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;
},
//
async afterPropertyRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.propertyImages.push({
url
})
})
})
},
deletePropertyPic(event) {
this.form.propertyImages.splice(event.index, 1)
},
//
async afterVideoRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.videos.push({
url
})
})
})
},
deleteVideoPic(event) {
this.form.videos.splice(event.index, 1)
},
//
submit() {
this.$refs.form.validate().then(res => {
//
if (this.form.propertyImages.length === 0) {
uni.showToast({
title: '请上传产权证照片',
icon: 'none'
});
return;
}
if (this.form.videos.length === 0) {
uni.showToast({
title: '请上传地块视频',
icon: 'none'
});
return;
}
// index.vue
const params = {
userId: uni.getStorageSync('userInfo')?.id || "",
id: "", // ID
classId: this.form.classId, // 使
commonClass: this.commonClass, //
address: this.form.address, //
homeAge: "", // -
homeAz: "", // -
homeBian: "", // -
homeBjsx: "", // -
homeCai: "", // -
homeCat: "", // -
homeGz: "", // -
homeHb: "", // -
homeBz: this.form.description, // - 使
homeJg: "经营性建设用地", // - 使
homeJl: "", // -
homeJt: "", // -
homeJtzy: "", // -
homeMi: this.form.landArea, // - 使
homeMj: this.form.landArea, // - 使
homeMoney: "", // -
homeNo: "", // -
homeNum: "", // -
homePay: "", // -
homePj: "", // -
homeSd: "", // -
homeShjl: "", // 西 -
homeSw: "", // -
homeTf: "", // -
homeTime: "", // -
homeType: this.form.type === 'rent' ? '出租' : '出让', // - 使
homeYs: "", // -
homeYzmj: this.form.landArea, // - 使
homeZy: "", // -
iconName: "经营性建设用地", //
iconTitle: "经营性用地", //
num: "0", // - 0
price: this.form.price, //
timeGo: "", // -
title: `${this.form.type === 'rent' ? '出租' : '出让'}-经营性建设用地-${this.form.address.split('市')[1] || this.form.address}`, // -
unit: this.form.type === 'rent' ? '元/亩/年' : '万元/亩', //
image: "", // -
iconImage: "", //
homeImage: this.form.propertyImages.map(item => item.url).join(','), //
homeMp4: this.form.videos.map(item => item.url).join(','), //
latitude: this.form.latitude,
longitude: this.form.longitude,
//
category: 'commercial',
contactName: this.form.contactName,
contactPhone: this.form.contactPhone
};
console.log('经营性用地提交参数:', params);
uni.showLoading({
title: '提交中...'
});
// API
saveOrUpdateHouse(params).then(response => {
uni.hideLoading();
uni.showToast({
title: response.message || '提交成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: "/pages_subpack/successful-apply/index"
});
}, 2000);
}).catch(error => {
uni.hideLoading();
uni.showToast({
title: error.message || '提交失败',
icon: 'none'
});
console.error('经营性用地提交失败:', error);
});
}).catch(errors => {
console.log('表单验证失败:', errors);
uni.showToast({
title: '请补全必填项',
icon: 'none'
});
});
}
}
}
</script>
<style scoped>
.container {
min-height: 100vh;
background-color: #f5f5f5;
}
.header {
background: linear-gradient(135deg, #1EC77A 0%, #4CAF50 100%);
padding: 40rpx 40rpx 60rpx;
color: white;
}
.title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
}
.form-container {
background: white;
margin: -30rpx 20rpx 20rpx;
border-radius: 20rpx;
padding: 40rpx;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.1);
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin: 40rpx 0 30rpx;
padding-left: 20rpx;
border-left: 6rpx solid #1EC77A;
}
.section-title:first-child {
margin-top: 0;
}
.input-with-unit {
display: flex;
align-items: center;
gap: 10rpx;
}
.unit {
font-size: 26rpx;
color: #666;
margin-left: 10rpx;
}
.input-tip {
font-size: 22rpx;
color: #999;
margin-top: 10rpx;
line-height: 1.4;
}
.upload-tip {
font-size: 24rpx;
color: #666;
margin-bottom: 10rpx;
line-height: 1.5;
}
.price-container {
display: flex;
align-items: center;
gap: 10rpx;
}
.price-unit {
font-size: 26rpx;
color: #FF6B35;
font-weight: bold;
margin-left: 10rpx;
}
</style>

+ 623
- 0
pages_subpack/house/farmhouse.vue View File

@ -0,0 +1,623 @@
<template>
<view class="container">
<view class="header">
<view class="title">闲置农房信息录入</view>
</view>
<view class="form-container">
<uv-form labelPosition="left" :model="form" :rules="rules" ref="form" labelWidth="80" labelStyle="font-size:28rpx;">
<!-- 必填项 -->
<view class="section-title">基本信息必填</view>
<!-- 1. 出租/流转 -->
<uv-form-item label="类型" prop="type" required>
<uv-radio-group v-model="form.type" placement="row">
<uv-radio name="rent" label="出租"></uv-radio>
<uv-radio name="transfer" customStyle="margin-left:30rpx;" label="流转"></uv-radio>
</uv-radio-group>
</uv-form-item>
<!-- 2. 地址 -->
<uv-form-item label="地址" prop="address" required @click="handleAddressSelect()">
<uv-input v-model="form.address" @click="handleAddressSelect()" disabled disabledColor="#ffffff" placeholder="请选择房屋位置" border="none">
</uv-input>
<template v-slot:right>
<uv-icon name="arrow-right"></uv-icon>
</template>
</uv-form-item>
<!-- 3. 联系人和电话 -->
<uv-form-item label="联系人" prop="contactName" required>
<uv-input v-model="form.contactName" 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="contactPhone" required>
<uv-input v-model="form.contactPhone" type="number" placeholder="请输入联系电话" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<!-- 4. 房屋状况 -->
<uv-form-item label="房屋状况" prop="houseCondition" required @click="handleHouseConditionSelect()">
<uv-input v-model="form.houseConditionName" @click="handleHouseConditionSelect()" disabled disabledColor="#ffffff" placeholder="请选择房屋状况" border="none">
</uv-input>
<template v-slot:right>
<uv-icon name="arrow-right"></uv-icon>
</template>
</uv-form-item>
<!-- 5. 产权证照片 -->
<uv-form-item label="产权证照片" labelWidth="250" prop="propertyImages" labelPosition="top" required>
<view class="upload-tip">请上传房产证土地证或不动产权证照片</view>
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.propertyImages" @afterRead="afterPropertyRead" @delete="deletePropertyPic" name="1"
multiple :maxCount="5"></uv-upload>
</uv-form-item>
<!-- 6. 产权面积 -->
<uv-form-item label="房屋面积" prop="houseArea" required>
<view class="input-with-unit">
<uv-input v-model="form.houseArea" type="digit" placeholder="请输入房屋面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
<text class="unit">平米</text>
</view>
<view class="input-tip">请录入房屋证或不动产权证登记面积</view>
</uv-form-item>
<uv-form-item label="土地面积" prop="landArea" required>
<view class="input-with-unit">
<uv-input v-model="form.landArea" type="digit" placeholder="请输入土地面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
<text class="unit">平米</text>
</view>
<view class="input-tip">请录入土地使用证或不动产权证面积</view>
</uv-form-item>
<!-- 7. 房屋正面照片 -->
<uv-form-item label="房屋正面照片" labelWidth="250" prop="frontImages" labelPosition="top" required>
<view class="upload-tip">作为封面展示建议拍摄房屋正面全貌</view>
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.frontImages" @afterRead="afterFrontRead" @delete="deleteFrontPic" name="1"
multiple :maxCount="3"></uv-upload>
</uv-form-item>
<!-- 8. 房屋视频 -->
<uv-form-item label="房屋视频" labelWidth="250" prop="videos" labelPosition="top" required>
<view class="upload-tip">请上传房屋内部和外部视频1分钟内</view>
<uv-upload customStyle="margin-top:20rpx;" accept="video" :fileList="form.videos" @afterRead="afterVideoRead" @delete="deleteVideoPic" name="1"
multiple :maxCount="2"></uv-upload>
</uv-form-item>
<!-- 9. 价格 -->
<uv-form-item label="价格" prop="price" required>
<view class="price-container">
<uv-input v-model="form.price" type="digit" placeholder="请输入价格" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;flex:1;"></uv-input>
<text class="price-unit" v-if="form.type === 'rent'">/</text>
<text class="price-unit" v-else-if="form.type === 'transfer'">万元</text>
<text class="price-unit" v-else></text>
</view>
<view class="input-tip">请输入数字支持小数点后两位</view>
</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>
<!-- 选填项 -->
<view class="section-title">详细信息选填</view>
<!-- 10. 可用菜地 -->
<uv-form-item label="可用菜地" prop="vegetableGarden">
<view class="input-with-unit">
<uv-input v-model="form.vegetableGarden" type="digit" placeholder="请输入菜地面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
<text class="unit">平米</text>
</view>
</uv-form-item>
<!-- 11. 房屋亮点 -->
<uv-form-item label="房屋亮点" prop="highlights" labelPosition="top">
<view class="tags-container">
<view
class="tag-item"
:class="{ 'tag-selected': form.highlights.includes(item) }"
v-for="item in highlightOptions"
:key="item"
@click="toggleHighlight(item)"
>
{{item}}
</view>
</view>
</uv-form-item>
<!-- 12. 不利因素 -->
<uv-form-item label="不利因素" prop="disadvantages" labelPosition="top">
<view class="tags-container">
<view
class="tag-item disadvantage-tag"
:class="{ 'tag-selected': form.disadvantages.includes(item) }"
v-for="item in disadvantageOptions"
:key="item"
@click="toggleDisadvantage(item)"
>
{{item}}
</view>
</view>
</uv-form-item>
<!-- 13. 房屋介绍 -->
<uv-form-item label="房屋介绍" prop="description" labelPosition="top">
<uv-input
v-model="form.description"
type="textarea"
placeholder="请详细介绍房屋情况、周边环境等"
customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:10px;"
:autoHeight="true"
:maxlength="500"
></uv-input>
</uv-form-item>
<uv-form-item>
<uv-button type="primary" text="提交信息" customStyle="margin-top: 30px;background-color: #1EC77A;border-radius: 30px;" @click="submit"></uv-button>
</uv-form-item>
</uv-form>
</view>
<!-- 房屋状况选择器 -->
<uv-picker ref="houseConditionPicker" :columns="houseConditionColumns" @confirm="confirmHouseCondition"></uv-picker>
<!-- 分类选择器 -->
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
</view>
</template>
<script>
import { saveOrUpdateHouse, houseType } from "@/common/api.js"
export default {
data() {
return {
commonClass: '', // ID
form: {
type: '', // /
address: '', //
contactName: '', //
contactPhone: '', //
houseCondition: '', // ID
houseConditionName: '', //
propertyImages: [], //
houseArea: '', //
landArea: '', //
frontImages: [], //
videos: [], //
price: '', //
longitude: '', //
latitude: '', //
vegetableGarden: '', //
highlights: [], //
disadvantages: [], //
description: '', //
classId: '', //
className: '' //
},
houseConditionColumns: [
['老旧房屋', '装修较好可拎包入住', '新房']
],
highlightOptions: [
'靠河', '靠山', '通自来水', '通天然气', '近场镇或城市',
'双车道到家', '精装修', '四合院', '周边无坟墓', '周边无电线塔'
],
disadvantageOptions: [
'可见坟墓', '周边有电塔', '非正常死亡'
],
columns: [], //
houseTypeList: [], //
rules: {
type: [
{ required: true, message: '请选择出租或流转', trigger: ['blur', 'change'] }
],
address: [
{ required: true, message: '请选择房屋地址', trigger: ['blur', 'change'] }
],
contactName: [
{ required: true, message: '请输入联系人姓名', trigger: ['blur', 'change'] }
],
contactPhone: [
{ required: true, message: '请输入联系电话', trigger: ['blur', 'change'] },
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: ['blur', 'change'] }
],
houseCondition: [
{ required: true, message: '请选择房屋状况', trigger: ['blur', 'change'] }
],
houseArea: [
{ required: true, message: '请输入房屋面积', trigger: ['blur', 'change'] },
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的数字格式', trigger: ['blur', 'change'] }
],
landArea: [
{ required: true, message: '请输入土地面积', trigger: ['blur', 'change'] },
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的数字格式', trigger: ['blur', 'change'] }
],
price: [
{ required: true, message: '请输入价格', trigger: ['blur', 'change'] },
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的价格格式', trigger: ['blur', 'change'] }
],
classId: [
{ required: true, message: '请选择分类标识', trigger: ['blur', 'change'] }
]
}
}
},
onReady() {
this.$refs.form.setRules(this.rules)
},
onLoad(options) {
//
uni.setNavigationBarTitle({
title: '闲置农房录入'
})
// commonClass
if(options.commonClass) {
this.commonClass = options.commonClass
}
// classId
if(options.classId) {
this.form.classId = options.classId
}
//
this.onHouseType()
},
methods: {
//
onHouseType(){
let that = this
houseType({}).then(response=>{
let arr=[]
that.houseTypeList = response.result
response.result.forEach(items=>{
arr.push(items.title)
// classIdclassName
if(items.id == that.form.classId){
that.form.className = items.title
}
})
that.columns[0]=arr
}).catch(error=>{
})
},
//
handleAddressSelect() {
const that = this;
wx.chooseLocation({
success: function (res) {
console.log('选择的位置:', res);
that.form.longitude = res.longitude
that.form.latitude = res.latitude
that.form.address = res.address
}
})
},
//
handleHouseConditionSelect() {
this.$refs.houseConditionPicker.open();
},
confirmHouseCondition(e) {
const { indexs, value } = e;
this.form.houseCondition = value[0]; // 使
this.form.houseConditionName = value[0];
},
//
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;
},
//
async afterPropertyRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.propertyImages.push({
url
})
})
})
},
deletePropertyPic(event) {
this.form.propertyImages.splice(event.index, 1)
},
//
async afterFrontRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.frontImages.push({
url
})
})
})
},
deleteFrontPic(event) {
this.form.frontImages.splice(event.index, 1)
},
//
async afterVideoRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.videos.push({
url
})
})
})
},
deleteVideoPic(event) {
this.form.videos.splice(event.index, 1)
},
//
toggleHighlight(item) {
const index = this.form.highlights.indexOf(item);
if (index > -1) {
this.form.highlights.splice(index, 1);
} else {
this.form.highlights.push(item);
}
},
//
toggleDisadvantage(item) {
const index = this.form.disadvantages.indexOf(item);
if (index > -1) {
this.form.disadvantages.splice(index, 1);
} else {
this.form.disadvantages.push(item);
}
},
//
submit() {
this.$refs.form.validate().then(res => {
//
if (this.form.propertyImages.length === 0) {
uni.showToast({
title: '请上传产权证照片',
icon: 'none'
});
return;
}
if (this.form.frontImages.length === 0) {
uni.showToast({
title: '请上传房屋正面照片',
icon: 'none'
});
return;
}
if (this.form.videos.length === 0) {
uni.showToast({
title: '请上传房屋视频',
icon: 'none'
});
return;
}
// index.vue
const params = {
userId: uni.getStorageSync('userInfo')?.id || "",
id: "", // ID
classId: this.form.classId, // 使
commonClass: this.commonClass, //
address: this.form.address, //
homeAge: "", // -
homeAz: "", // -
homeBian: this.form.highlights.join(','), // - 使
homeBjsx: "", // -
homeCai: this.form.vegetableGarden || "", //
homeCat: "", // -
homeGz: "", // -
homeHb: "", // -
homeBz: this.form.description, // - 使
homeJg: this.form.houseCondition, // - 使
homeJl: "", // -
homeJt: "", // -
homeJtzy: "", // -
homeMi: "", // - 使
homeMj: this.form.houseArea, //
homeMoney: "", // -
homeNo: "", // -
homeNum: "1", // -
homePay: "", // -
homePj: "", // -
homeSd: "", // -
homeShjl: "", // 西 -
homeSw: this.form.disadvantages.join(','), // -
homeTf: "", // -
homeTime: "", // -
homeType: this.form.type === 'rent' ? '出租' : '流转', // - 使
homeYs: "", // -
homeYzmj: this.form.landArea, // - 使
homeZy: this.form.disadvantages.join(','), // - 使
iconName: "闲置农房", //
iconTitle: this.form.highlights.join(','), // - 使
num: "0", // - 0
price: this.form.price, //
timeGo: "", // -
title: `${this.form.type === 'rent' ? '出租' : '流转'}-${this.form.address.split('市')[1] || this.form.address}`, // -
unit: this.form.type === 'rent' ? '元/年' : '万元', //
image: this.form.frontImages.map(item => item.url).join(','), // - 使
iconImage: "", //
homeImage: this.form.propertyImages.map(item => item.url).join(','), //
homeMp4: this.form.videos.map(item => item.url).join(','), //
latitude: this.form.latitude,
longitude: this.form.longitude,
//
category: 'farmhouse',
contactName: this.form.contactName,
contactPhone: this.form.contactPhone
};
console.log('农房提交参数:', params);
uni.showLoading({
title: '提交中...'
});
// API
saveOrUpdateHouse(params).then(response => {
uni.hideLoading();
uni.showToast({
title: response.message || '提交成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: "/pages_subpack/successful-apply/index"
});
}, 2000);
}).catch(error => {
uni.hideLoading();
uni.showToast({
title: error.message || '提交失败',
icon: 'none'
});
console.error('农房提交失败:', error);
});
}).catch(errors => {
console.log('表单验证失败:', errors);
uni.showToast({
title: '请补全必填项',
icon: 'none'
});
});
}
}
}
</script>
<style scoped>
.container {
min-height: 100vh;
background-color: #f5f5f5;
}
.header {
background: linear-gradient(135deg, #1EC77A 0%, #4CAF50 100%);
padding: 40rpx 40rpx 60rpx;
color: white;
}
.title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
}
.form-container {
background: white;
margin: -30rpx 20rpx 20rpx;
border-radius: 20rpx;
padding: 40rpx;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.1);
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin: 40rpx 0 30rpx;
padding-left: 20rpx;
border-left: 6rpx solid #1EC77A;
}
.section-title:first-child {
margin-top: 0;
}
.input-with-unit {
display: flex;
align-items: center;
gap: 10rpx;
}
.unit {
font-size: 26rpx;
color: #666;
margin-left: 10rpx;
}
.input-tip {
font-size: 22rpx;
color: #999;
margin-top: 10rpx;
line-height: 1.4;
}
.upload-tip {
font-size: 24rpx;
color: #666;
margin-bottom: 10rpx;
line-height: 1.5;
}
.price-container {
display: flex;
align-items: center;
gap: 10rpx;
}
.price-unit {
font-size: 26rpx;
color: #1EC77A;
font-weight: bold;
margin-left: 10rpx;
}
.tags-container {
display: flex;
flex-wrap: wrap;
gap: 15rpx;
margin-top: 20rpx;
}
.tag-item {
padding: 15rpx 25rpx;
border: 2rpx solid #e0e0e0;
border-radius: 25rpx;
font-size: 24rpx;
color: #666;
background: #f9f9f9;
transition: all 0.3s ease;
}
.tag-item.tag-selected {
border-color: #1EC77A;
background: #1EC77A;
color: white;
}
.disadvantage-tag.tag-selected {
border-color: #ff4757;
background: #ff4757;
color: white;
}
</style>

+ 23
- 10
pages_subpack/house/index.vue View File

@ -5,16 +5,16 @@
<uv-input v-model="form.title" 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="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-input v-model="form.price" type="number" 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-input v-model="form.homeAge" type="number" 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-input v-model="form.proportion" type="digit" 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>
@ -23,7 +23,7 @@
<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-input v-model="form.homeMi" type="digit" 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">
@ -48,7 +48,7 @@
</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-input v-model="form.number" type="number" 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>
@ -82,7 +82,7 @@
</uv-radio-group>
</uv-form-item>
<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-input v-model="form.yardProportion" type="digit" placeholder="请输入院子总面积(支持小数)" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<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>
@ -124,19 +124,19 @@
<!-- <uv-input v-model="form.key" 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="commission">
<uv-input v-model="form.commission" type="text" placeholder="请输入佣金" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
<uv-input v-model="form.commission" type="digit" placeholder="请输入佣金(支持小数)" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<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-input v-model="form.timeGo" type="number" 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-input v-model="form.num" type="number" 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-input v-model="form.procedures" type="number" placeholder="请输入报建手续(仅限整数)" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<uv-form-item label="房屋照片" labelWidth="250" prop="isOwnershipList" labelPosition="top">
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.ownershipList" @afterRead="afterOwnershipRead" @delete="deleteOwnershipPic" name="1"
@ -176,6 +176,8 @@
data(){
return{
id:"",
houseType:"", //
houseTitle:"", //
houseTypeList:[],
columns:[],
commonColumns:[],
@ -568,6 +570,17 @@
onLoad(options) {
let that = this
that.id = options.id
//
if(options.type && options.title) {
that.houseType = options.type
that.houseTitle = options.title
//
uni.setNavigationBarTitle({
title: options.title
})
}
that.onHouseType()
that.onCommonIndexIndexIcon()
if(options.id){


+ 479
- 0
pages_subpack/house/other.vue View File

@ -0,0 +1,479 @@
<template>
<view class="container">
<view class="header">
<view class="title">其他农村资源录入</view>
</view>
<view class="form-container">
<uv-form labelPosition="left" :model="form" :rules="rules" ref="form" labelWidth="80" labelStyle="font-size:28rpx;">
<!-- 必填项 -->
<view class="section-title">基本信息必填</view>
<!-- 1. 出租/流转 -->
<uv-form-item label="类型" prop="type" required>
<uv-radio-group v-model="form.type" placement="row">
<uv-radio name="rent" label="出租"></uv-radio>
<uv-radio name="transfer" customStyle="margin-left:30rpx;" label="流转"></uv-radio>
</uv-radio-group>
</uv-form-item>
<!-- 2. 地址 -->
<uv-form-item label="地址" prop="address" required @click="handleAddressSelect()">
<uv-input v-model="form.address" @click="handleAddressSelect()" disabled disabledColor="#ffffff" placeholder="请选择资源位置" border="none">
</uv-input>
<template v-slot:right>
<uv-icon name="arrow-right"></uv-icon>
</template>
</uv-form-item>
<!-- 3. 联系人和电话 -->
<uv-form-item label="联系人" prop="contactName" required>
<uv-input v-model="form.contactName" 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="contactPhone" required>
<uv-input v-model="form.contactPhone" type="number" placeholder="请输入联系电话" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
</uv-form-item>
<!-- 4. 照片和视频 -->
<uv-form-item label="资源照片" labelWidth="250" prop="images" labelPosition="top" required>
<view class="upload-tip">请上传资源相关照片</view>
<uv-upload customStyle="margin-top:20rpx;" :fileList="form.images" @afterRead="afterImageRead" @delete="deleteImagePic" name="1"
multiple :maxCount="10"></uv-upload>
</uv-form-item>
<uv-form-item label="资源视频" labelWidth="250" prop="videos" labelPosition="top" required>
<view class="upload-tip">请上传资源视频1分钟内</view>
<uv-upload customStyle="margin-top:20rpx;" accept="video" :fileList="form.videos" @afterRead="afterVideoRead" @delete="deleteVideoPic" name="1"
multiple :maxCount="3"></uv-upload>
</uv-form-item>
<!-- 5. 价格 -->
<uv-form-item label="价格" prop="price" required>
<view class="price-container">
<uv-input v-model="form.price" type="text" placeholder="请描述价格,如:面议、1000元/年等" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;flex:1;"></uv-input>
</view>
<view class="input-tip">开放式填写可填写具体价格或"面议"</view>
</uv-form-item>
<!-- 6. 资源介绍 -->
<uv-form-item label="资源介绍" prop="description" labelPosition="top" required>
<uv-input
v-model="form.description"
type="textarea"
placeholder="请详细介绍资源类型、用途、特色、优势等信息"
customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:10px;"
:autoHeight="true"
:maxlength="1000"
></uv-input>
<view class="char-count">{{form.description.length}}/1000</view>
<view class="input-tip">请详细描述资源的类型用途特色规模优势等</view>
</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>
<!-- 代理协议 -->
<view class="section-title">代理协议</view>
<view class="agreement-container">
<view class="agreement-content">
<text class="agreement-title">代理协议</text>
<text class="agreement-text">
本人同意授权我平台发布信息代理销售等本人承诺所提供的信息真实有效并同意平台进行相关推广和销售代理
</text>
</view>
<uv-checkbox v-model="form.agreeProtocol" shape="circle" activeColor="#1EC77A">
<text class="agreement-label">我已阅读并同意代理协议</text>
</uv-checkbox>
</view>
<uv-form-item>
<uv-button type="primary" text="提交信息" customStyle="margin-top: 30px;background-color: #1EC77A;border-radius: 30px;" @click="submit"></uv-button>
</uv-form-item>
</uv-form>
</view>
<!-- 分类选择器 -->
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
</view>
</template>
<script>
import { saveOrUpdateHouse, houseType } from "@/common/api.js"
export default {
data() {
return {
commonClass: '', // ID
form: {
type: '', // /
address: '', //
contactName: '', //
contactPhone: '', //
images: [], //
videos: [], //
price: '', //
description: '', //
agreeProtocol: false, //
longitude: '', //
latitude: '', //
classId: '', //
className: '' //
},
columns: [], //
houseTypeList: [], //
rules: {
type: [
{ required: true, message: '请选择出租或流转', trigger: ['blur', 'change'] }
],
address: [
{ required: true, message: '请选择资源地址', trigger: ['blur', 'change'] }
],
contactName: [
{ required: true, message: '请输入联系人姓名', trigger: ['blur', 'change'] }
],
contactPhone: [
{ required: true, message: '请输入联系电话', trigger: ['blur', 'change'] },
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: ['blur', 'change'] }
],
price: [
{ required: true, message: '请输入价格信息', trigger: ['blur', 'change'] }
],
description: [
{ required: true, message: '请输入资源介绍', trigger: ['blur', 'change'] },
{ min: 10, message: '资源介绍至少需要10个字符', trigger: ['blur', 'change'] }
],
classId: [
{ required: true, message: '请选择分类标识', trigger: ['blur', 'change'] }
]
}
}
},
onReady() {
this.$refs.form.setRules(this.rules)
},
onLoad(options) {
//
uni.setNavigationBarTitle({
title: '其他农村资源录入'
})
// commonClass
if(options.commonClass) {
this.commonClass = options.commonClass
}
// classId
if(options.classId) {
this.form.classId = options.classId
}
//
this.onHouseType()
},
methods: {
//
onHouseType(){
let that = this
houseType({}).then(response=>{
let arr=[]
that.houseTypeList = response.result
response.result.forEach(items=>{
arr.push(items.title)
// classIdclassName
if(items.id == that.form.classId){
that.form.className = items.title
}
})
that.columns[0]=arr
}).catch(error=>{
})
},
//
handleAddressSelect() {
const that = this;
wx.chooseLocation({
success: function (res) {
console.log('选择的位置:', res);
that.form.longitude = res.longitude
that.form.latitude = res.latitude
that.form.address = res.address
}
})
},
//
async afterImageRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.images.push({
url
})
})
})
},
deleteImagePic(event) {
this.form.images.splice(event.index, 1)
},
//
async afterVideoRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.videos.push({
url
})
})
})
},
deleteVideoPic(event) {
this.form.videos.splice(event.index, 1)
},
//
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;
},
//
submit() {
//
if (!this.form.agreeProtocol) {
uni.showToast({
title: '请先同意代理协议',
icon: 'none'
});
return;
}
this.$refs.form.validate().then(res => {
//
if (this.form.images.length === 0) {
uni.showToast({
title: '请上传资源照片',
icon: 'none'
});
return;
}
if (this.form.videos.length === 0) {
uni.showToast({
title: '请上传资源视频',
icon: 'none'
});
return;
}
// index.vue
const params = {
userId: uni.getStorageSync('userInfo')?.id || "",
id: "", // ID
classId: this.form.classId, // 使
commonClass: this.commonClass, //
address: this.form.address, //
homeAge: "", // -
homeAz: "", // -
homeBian: "", // -
homeBjsx: "", // -
homeCai: "", // -
homeCat: "", // -
homeGz: "", // -
homeHb: "", // -
homeBz: this.form.description, // - 使
homeJg: "其他农村资源", // - 使
homeJl: "", // -
homeJt: "", // -
homeJtzy: "", // -
homeMi: "", // -
homeMj: "", // -
homeMoney: "", // -
homeNo: "", // -
homeNum: "", // -
homePay: this.form.price, // - 使
homePj: "", // -
homeSd: "", // -
homeShjl: "", // 西 -
homeSw: "", // -
homeTf: "", // -
homeTime: "", // -
homeType: this.form.type === 'rent' ? '出租' : '流转', // - 使
homeYs: "", // -
homeYzmj: "", // -
homeZy: "", // -
iconName: "其他农村资源", //
iconTitle: "其他资源", //
num: "0", // - 0
price: this.form.price, //
timeGo: "", // -
title: `${this.form.type === 'rent' ? '出租' : '流转'}-其他农村资源-${this.form.address.split('市')[1] || this.form.address}`, // -
unit: "", // -
image: this.form.images.map(item => item.url).join(','), // - 使
iconImage: "", //
homeImage: "", // -
homeMp4: this.form.videos.map(item => item.url).join(','), //
latitude: this.form.latitude,
longitude: this.form.longitude,
//
category: 'other',
contactName: this.form.contactName,
contactPhone: this.form.contactPhone
};
console.log('其他资源提交参数:', params);
uni.showLoading({
title: '提交中...'
});
// API
saveOrUpdateHouse(params).then(response => {
uni.hideLoading();
uni.showToast({
title: response.message || '提交成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: "/pages_subpack/successful-apply/index"
});
}, 2000);
}).catch(error => {
uni.hideLoading();
uni.showToast({
title: error.message || '提交失败',
icon: 'none'
});
console.error('其他资源提交失败:', error);
});
}).catch(errors => {
console.log('表单验证失败:', errors);
uni.showToast({
title: '请补全必填项',
icon: 'none'
});
});
}
}
}
</script>
<style scoped>
.container {
min-height: 100vh;
background-color: #f5f5f5;
}
.header {
background: linear-gradient(135deg, #1EC77A 0%, #4CAF50 100%);
padding: 40rpx 40rpx 60rpx;
color: white;
}
.title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
}
.form-container {
background: white;
margin: -30rpx 20rpx 20rpx;
border-radius: 20rpx;
padding: 40rpx;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.1);
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin: 40rpx 0 30rpx;
padding-left: 20rpx;
border-left: 6rpx solid #1EC77A;
}
.section-title:first-child {
margin-top: 0;
}
.input-tip {
font-size: 22rpx;
color: #999;
margin-top: 10rpx;
line-height: 1.4;
}
.upload-tip {
font-size: 24rpx;
color: #666;
margin-bottom: 10rpx;
line-height: 1.5;
}
.price-container {
display: flex;
align-items: center;
gap: 10rpx;
}
.char-count {
font-size: 22rpx;
color: #999;
text-align: right;
margin-top: 10rpx;
}
.agreement-container {
margin: 30rpx 0;
padding: 30rpx;
background: #f8f9fa;
border-radius: 15rpx;
border: 2rpx solid #e9ecef;
}
.agreement-content {
margin-bottom: 30rpx;
}
.agreement-title {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
}
.agreement-text {
display: block;
font-size: 24rpx;
color: #666;
line-height: 1.6;
}
.agreement-label {
font-size: 26rpx;
color: #333;
margin-left: 10rpx;
}
</style>

+ 254
- 0
pages_subpack/house/select.vue View File

@ -0,0 +1,254 @@
<template>
<view class="container">
<view class="header">
<view class="title">选择发布类型</view>
<view class="subtitle">请选择您要发布的房源类型</view>
</view>
<view class="options-container">
<view
class="option-item"
v-for="(item, index) in optionList"
:key="index"
@click="onSelectOption(item)"
>
<view class="option-icon">
<image :src="item.image" v-if="item.image" mode="aspectFill"></image>
<text class="icon-emoji" v-if="item.icon">{{item.icon}}</text>
</view>
<view class="option-content">
<view class="option-title">{{item.title}}</view>
<view class="option-desc">{{item.shortTitle}}</view>
</view>
<view class="option-arrow">
<uv-icon name="arrow-right" color="#999" size="20"></uv-icon>
</view>
</view>
</view>
<view class="tips">
<view class="tips-title">温馨提示</view>
<!-- <view class="tips-content">
请根据您的实际情况选择对应的发布类型<br/>
不同类型的房源信息录入内容会有所差异<br/>
提交后将进入相应的信息录入页面
</view> -->
<view class="tips-content"
v-html="info">
</view>
</view>
</view>
</template>
<script>
import { commonIndexIndexIcon } from "@/common/api.js"
export default {
data() {
return {
optionList: [
// {
// code: 'idle_farmhouse',
// title: '/',
// shortTitle: '',
// icon: '🏡',
// type: 1
// },
// {
// code: 'commercial_land',
// title: '',
// shortTitle: '',
// icon: '🏢',
// type: 2
// },
// {
// code: 'other_resources',
// title: '',
// shortTitle: '',
// icon: '🌾',
// type: 3
// },
],
info : '',
}
},
onLoad() {
this.getRlease_home_info()
this.onCommonIndexIndexIcon()
},
methods: {
onCommonIndexIndexIcon(){
let that = this
commonIndexIndexIcon({}).then(response=>{
console.info('onCommonIndexIndexIcon',response)
that.optionList = response.result
})
},
getRlease_home_info(){
console.log(this.$utils.getkeyContent('release_home_info'));
let a = this.$utils.getkeyContent('release_home_info') || {}
this.info = (a.keyContent || '').replaceAll('\n', '<br>')
},
onSelectOption(item) {
console.log('选择了:', item);
//
let targetUrl = '';
if (item.code === 'idle_farmhouse') {
//
targetUrl = `/pages_subpack/house/farmhouse?commonClass=${item.id}`;
} else if (item.code === 'commercial_land') {
//
targetUrl = `/pages_subpack/house/commercial?commonClass=${item.id}`;
} else if (item.code === 'other_resources') {
//
targetUrl = `/pages_subpack/house/other?commonClass=${item.id}`;
} else {
//
targetUrl = `/pages_subpack/house/index?id=${item.id}&title=${item.title}`;
}
uni.navigateTo({
url: targetUrl
});
}
}
}
</script>
<style scoped lang="scss">
.container {
min-height: 100vh;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
padding: 40rpx;
}
.header {
text-align: center;
margin-bottom: 80rpx;
padding-top: 60rpx;
}
.title {
font-size: 48rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
}
.subtitle {
font-size: 28rpx;
color: #666;
line-height: 1.6;
}
.options-container {
margin-bottom: 60rpx;
}
.option-item {
background: #fff;
border-radius: 20rpx;
padding: 40rpx 30rpx;
margin-bottom: 30rpx;
display: flex;
align-items: center;
box-shadow: 0 8rpx 25rpx rgba(0,0,0,0.08);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.option-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6rpx;
background: linear-gradient(90deg, #1EC77A 0%, #4CAF50 100%);
transform: scaleX(0);
transition: transform 0.3s ease;
}
.option-item:active {
transform: translateY(2rpx);
box-shadow: 0 4rpx 15rpx rgba(0,0,0,0.12);
}
.option-item:active::before {
transform: scaleX(1);
}
.option-icon {
width: 120rpx;
height: 120rpx;
margin-right: 30rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f8f9fa;
border-radius: 50%;
image{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
.icon-emoji {
font-size: 60rpx;
line-height: 1;
}
.option-content {
flex: 1;
}
.option-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
}
.option-desc {
font-size: 26rpx;
color: #666;
line-height: 1.5;
}
.option-arrow {
margin-left: 20rpx;
}
.tips {
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
box-shadow: 0 4rpx 15rpx rgba(0,0,0,0.06);
}
.tips-title {
font-size: 28rpx;
font-weight: bold;
color: #1EC77A;
margin-bottom: 20rpx;
display: flex;
align-items: center;
}
.tips-title::before {
content: '';
width: 8rpx;
height: 32rpx;
background: #1EC77A;
border-radius: 4rpx;
margin-right: 15rpx;
}
.tips-content {
font-size: 24rpx;
color: #666;
line-height: 1.8;
}
</style>

+ 311
- 0
pages_subpack/member/index.vue View File

@ -0,0 +1,311 @@
<template>
<view class="u-page">
<!-- 头部会员卡片 -->
<view class="member-header">
<view class="member-card">
<view class="card-bg">
<view class="member-title">
<uv-icon name="level" size="60rpx" color="#FFD700"></uv-icon>
<text class="title-text">会员中心</text>
</view>
<view class="member-desc">开通永久会员享受更多专属权益</view>
</view>
</view>
</view>
<!-- 会员权益 -->
<view class="rights-section">
<view class="section-title">
<text>会员专享权益</text>
</view>
<view class="rights-list">
<view class="right-item">
<view class="right-icon">
<uv-icon name="map-fill" size="40rpx" color="#FF6B6B"></uv-icon>
</view>
<view class="right-content">
<text class="right-title">查看详细地址</text>
<text class="right-desc">查看具体定位和村址普通用户只能看到乡镇</text>
</view>
</view>
<view class="right-item">
<view class="right-icon">
<uv-icon name="phone-fill" size="40rpx" color="#4ECDC4"></uv-icon>
</view>
<view class="right-content">
<text class="right-title">查看联系方式</text>
<text class="right-desc">查看房主手机号方便直接联系</text>
</view>
</view>
<view class="right-item">
<view class="right-icon">
<uv-icon name="star-fill" size="40rpx" color="#FFD700"></uv-icon>
</view>
<view class="right-content">
<text class="right-title">优先查看房源</text>
<text class="right-desc">抢先查看最新房源信息</text>
</view>
</view>
<view class="right-item">
<view class="right-icon">
<uv-icon name="heart-fill" size="40rpx" color="#9B59B6"></uv-icon>
</view>
<view class="right-content">
<text class="right-title">专属客服</text>
<text class="right-desc">享受一对一专属客服服务</text>
</view>
</view>
<view class="right-item">
<view class="right-icon">
<uv-icon name="gift-fill" size="40rpx" color="#E74C3C"></uv-icon>
</view>
<view class="right-content">
<text class="right-title">永久会员标识</text>
<text class="right-desc">尊贵的永久会员身份标识</text>
</view>
</view>
</view>
</view>
<!-- 永久会员价格 -->
<view class="package-section">
<view class="price-card">
<view class="price-header">
<view class="price-tag">
<text class="currency"></text>
<text class="price">99</text>
</view>
<text class="price-desc">永久会员</text>
</view>
<view class="price-benefits">
<text class="benefit-text"> 一次购买终身享受所有会员权益</text>
<text class="benefit-text"> 无需续费永久有效</text>
</view>
</view>
</view>
<!-- 开通按钮 -->
<view class="action-section">
<uv-button type="primary" @click="openMember"
style="background: linear-gradient(135deg, #1EC77A 0%, #16A085 100%); border: none; border-radius: 50rpx; height: 100rpx; font-size: 32rpx; font-weight: bold;">
立即开通永久会员 - 99
</uv-button>
<view class="agreement">
<text>开通即表示同意</text>
<text class="link" @click="showAgreement">永久会员服务协议</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
memberPrice: 99 //
}
},
methods: {
openMember() {
uni.showModal({
title: '确认开通',
content: `确定开通永久会员吗?\n价格:¥${this.memberPrice}\n终身享受会员权益`,
confirmText: '确认开通',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
this.processPay()
}
}
})
},
processPay() {
//
uni.showLoading({
title: '处理中...'
})
//
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '永久会员开通成功',
icon: 'success',
duration: 2000
})
//
setTimeout(() => {
uni.navigateBack()
}, 2000)
}, 2000)
},
showAgreement() {
uni.showModal({
title: '永久会员服务协议',
content: '1. 永久会员享有查看详细地址和联系方式的权限\n2. 会员权益包括但不限于:查看具体定位、村址信息、房主手机号等\n3. 永久会员权益终身有效,无需续费\n4. 其他会员服务条款...',
showCancel: false,
confirmText: '我知道了'
})
}
}
}
</script>
<style scoped>
.u-page {
background: linear-gradient(180deg, #1EC77A 0%, #f5f5f5 30%);
min-height: 100vh;
}
.member-header {
padding: 40rpx 30rpx;
}
.member-card {
background: rgba(255, 255, 255, 0.15);
border-radius: 20rpx;
padding: 40rpx;
backdrop-filter: blur(10rpx);
}
.member-title {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.title-text {
font-size: 40rpx;
font-weight: bold;
color: white;
margin-left: 20rpx;
}
.member-desc {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.8);
}
.rights-section, .package-section {
margin: 30rpx;
background: white;
border-radius: 20rpx;
padding: 40rpx 30rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 30rpx;
}
.rights-list {
display: flex;
flex-direction: column;
gap: 30rpx;
}
.right-item {
display: flex;
align-items: center;
}
.right-icon {
margin-right: 20rpx;
}
.right-content {
flex: 1;
}
.right-title {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 8rpx;
}
.right-desc {
font-size: 24rpx;
color: #666;
}
.price-card {
text-align: center;
background: linear-gradient(135deg, #1EC77A 0%, #16A085 100%);
border-radius: 20rpx;
padding: 50rpx 30rpx;
color: white;
position: relative;
overflow: hidden;
}
.price-card::before {
content: '';
position: absolute;
top: -50rpx;
right: -50rpx;
width: 200rpx;
height: 200rpx;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
}
.price-header {
margin-bottom: 30rpx;
}
.price-tag {
display: flex;
align-items: baseline;
justify-content: center;
margin-bottom: 10rpx;
}
.currency {
font-size: 40rpx;
font-weight: bold;
}
.price {
font-size: 120rpx;
font-weight: bold;
line-height: 1;
}
.price-desc {
font-size: 32rpx;
font-weight: bold;
opacity: 0.9;
}
.price-benefits {
display: flex;
flex-direction: column;
gap: 15rpx;
}
.benefit-text {
font-size: 26rpx;
opacity: 0.9;
text-align: left;
}
.action-section {
padding: 30rpx;
}
.agreement {
text-align: center;
margin-top: 20rpx;
font-size: 24rpx;
color: #666;
}
.link {
color: #1EC77A;
}
</style>

+ 10
- 5
pages_subpack/version/index.vue View File

@ -1,8 +1,10 @@
<template>
<view>
<view class="se-flex se-flex-v-c se-pt-180">
<image class="se-a-150" src="@/static/image/logo.png" mode=""></image>
<text class="se-c-black se-fs-28 se-pt-30">1.0.0</text>
<view class="page">
<view class="">
<!-- <image class="se-a-150" src="@/static/image/logo.png" mode=""></image>
<text class="se-c-black se-fs-28 se-pt-30">1.0.0</text> -->
<uv-parse :content="configList.myInfo"></uv-parse>
</view>
</view>
</template>
@ -13,5 +15,8 @@
}
</script>
<style>
<style scoped lang="scss">
.page{
padding: 20rpx;
}
</style>

BIN
static/image/tourGuide/2.png View File

Before After
Width: 51  |  Height: 59  |  Size: 3.2 KiB

+ 32
- 12
store/index.js View File

@ -1,7 +1,5 @@
import Vue from 'vue'
import Vuex from 'vuex'
import data from './modules/data'
import user from './modules/user'
import { getConfig, getInfo } from "@/common/api.js"
@ -11,18 +9,39 @@ const store = new Vuex.Store({
state: {
token:"",
userInfo : {}, //用户信息
vipInfo : {},
configList : {},
},
mutations: {
// 初始化配置
initConfig(state){
getConfig({}).then(response=>{
uni.setStorageSync('configList', response.result)
}).catch(error=>{
console.log('initConfig 开始执行')
if (!uni.$uv || !uni.$uv.http) {
console.error('uni.$uv.http 未初始化,请检查 uvUI 配置')
return
}
getConfig({}).then(res=>{
console.log('getConfig 请求成功:', res)
uni.setStorageSync('configList', res.result)
const configList = {
...state.configList,
}
if (res.code == 200) {
res.result.forEach(n => {
configList[n.keyName] = n.keyContent;
configList[n.keyName + '_keyValue'] = n.keyValue;
});
}
state.configList = configList
uni.$emit('initConfig', state.configList)
console.log('配置初始化完成:', state.configList)
}).catch(error=>{
console.error('getConfig 请求失败:', error)
})
},
onAuth(state){
},
setUserInfo(state,obj){
state.userInfo = obj.userInfo
@ -35,10 +54,11 @@ const store = new Vuex.Store({
}
getInfo({}).then(result=>{
if(result.result.nickName){
state.userInfo = result.result
fn && fn(result.result)
}else{
state.userInfo = result.result.member || {}
state.vipInfo = result.result.vipInfo || {}
if(!result.result.member.nickName){
uni.navigateTo({
url:"/pages/login/index"
})


+ 0
- 21
store/modules/data.js View File

@ -1,21 +0,0 @@
import { getConfig } from "@/common/api.js"
export default {
state: {
},
getters: {
},
mutations: {
// 初始化配置
initConfig(state){
getConfig({}).then(response=>{
uni.setStorageSync('configList', response.result)
}).catch(error=>{
})
},
},
actions: {}
}

+ 0
- 53
store/modules/user.js View File

@ -1,53 +0,0 @@
import { getInfo } from "@/common/api.js"
export default {
state: {
token:"",
userInfo : {}, //用户信息
},
mutations: {
onAuth(state){
},
setUserInfo(state,obj){
state.userInfo = obj.userInfo
state.token = obj.token
},
getUserInfo(state){
if(!uni.getStorageSync('token')){
return
}
getInfo({}).then(result=>{
if(result.result.nickName){
state.userInfo = result.result
}else{
uni.navigateTo({
url:"/pages/login/index"
})
}
})
},
logout(state){
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
state.userInfo = {}
state.token = ""
uni.removeStorageSync('token')
uni.redirectTo({
url: '/pages/index/index'
})
}
}
})
},
},
actions: {}
}

Loading…
Cancel
Save