feat: 补充逻辑

This commit is contained in:
mayubo@gmail.com 2025-06-23 16:07:33 +08:00
parent 8b185efc22
commit 22554a26da
19 changed files with 233 additions and 62 deletions

View File

@ -18,7 +18,12 @@ page {
margin-top: 30rpx; margin-top: 30rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.item_right {
display: flex;
}
.right_input {
flex: 1;
}
.right_pic { .right_pic {

View File

@ -11,8 +11,10 @@
<view class="label"> <view class="label">
<view class="item_desc">房产</view> <view class="item_desc">房产</view>
</view> </view>
<view class="item_right" @click="chooseMsg">
<input :value="communityName" @click="chooseMsg" class="right_input" disabled type="text" placeholder="请选择您要入驻的房产" /> <input :value="communityName" class="right_input" disabled type="text" placeholder="请选择您要入驻的房产" />
<u-icon name="arrow-right"></u-icon>
</view>
</view> </view>
@ -21,7 +23,7 @@
<view class="item_desc">姓名</view> <view class="item_desc">姓名</view>
</view> </view>
<input :value="communityName" class="right_input" type="text" placeholder="请输入您的姓名" /> <input :value="name" @input="headerInputClick" data-name="name" class="right_input" type="text" placeholder="请输入您的姓名" />
</view> </view>
<view class="item"> <view class="item">
@ -29,15 +31,17 @@
<view class="item_desc">手机</view> <view class="item_desc">手机</view>
</view> </view>
<input :value="communityName" class="right_input" type="text" placeholder="请选择您的手机号" /> <input :value="mobile" @input="headerInputClick" data-name="mobile" class="right_input" type="text" placeholder="请选择您的手机号" />
</view> </view>
<view class="item"> <view class="item">
<view class="label"> <view class="label">
<view class="item_desc">身份</view> <view class="item_desc">身份</view>
</view> </view>
<view class="item_right" @click="changeShow" >
<input :value="communityName" class="right_input" type="text" placeholder="请输入您的身份" /> <input :value="identity.text" class="right_input" type="text" placeholder="请输入您的身份"/>
<u-icon name="arrow-right"></u-icon>
</view>
</view> </view>
<view class="tips "> <view class="tips ">
@ -59,7 +63,10 @@ import { apiArr } from '../../../api/community';
export default { export default {
data() { data() {
return { return {
communityName: '',
name: '',
mobile: '',
identity: {},
show: false, // show: false, //
columns: [ columns: [
[ [
@ -82,16 +89,21 @@ export default {
confirm(e) { confirm(e) {
console.log('eee', e); console.log('eee', e);
this.typeName = e.value[0].text; this.identity = e.value[0];
this.type = e.value[0].type;
this.show = false; this.show = false;
}, },
headerInputClick(e) {
const { name } = e.currentTarget.dataset;
const { value } = e.detail;
this[name] = value;
},
chooseMsg(){ chooseMsg(){
NavgateTo("../chooseMsg/index") NavgateTo("../chooseMsg/index")
}, },
submit() {
console.log('111', this);
}
}, },

View File

@ -275,4 +275,44 @@ image {
font-size: 30rpx; font-size: 30rpx;
text-align: center; text-align: center;
color: #FF370B; color: #FF370B;
} }
.popup_container {
margin: 0 55rpx;
}
.popup_title {
margin-top: 40rpx;
font-size: 30rpx;
color: #222222;
font-weight: 600;
}
.popup_community_name {
margin: 29rpx 0 8rpx;
text-align: center;
font-weight: 600;
font-size: 36rpx;
color: #FF370B;
}
.popup_desc {
font-weight: bold;
text-align: center;
font-size: 30rpx;
color: #FF370B;
margin-bottom: 40rpx;
}
.popup_btn_List {
display: flex;
justify-content: space-around;
}
.popup_btn {
width: 170rpx;
height: 52rpx;
line-height: 52rpx;
text-align: center;
background: #d9d9d9;
border-radius: 100rpx 100rpx 100rpx 100rpx;
}
.popup_btn1 {
background: #ff370b;
}

View File

@ -31,11 +31,9 @@
<div v-if="step == '0' && type == '0'"> <div v-if="step == '0' && type == '0'">
<div class="chooseTit">请选择楼栋</div> <div class="chooseTit">请选择楼栋</div>
<div class="communityInfoList"> <div class="communityInfoList">
<template v-for="(item, index) in 11"> <div v-for="(item, index) in 11" :key="index" :class="active == index ? 'communityInfo active' : 'communityInfo'" @click="choseTower(item + 1)">
<div :class="active == index ? 'communityInfo active' : 'communityInfo'" @click="choseTower"> 1{{index +1}}单元
1栋2单元 </div>
</div>
</template>
</div> </div>
<div class="addCommunityBtn" @click="addCommunity"> <div class="addCommunityBtn" @click="addCommunity">
新建楼栋 新建楼栋
@ -47,14 +45,14 @@
<view class="label"> <view class="label">
<view class="item_desc">楼栋号</view> <view class="item_desc">楼栋号</view>
</view> </view>
<input class="right_input" type="text" placeholder="请输入楼栋号" /> <input class="right_input" type="text" @input="headerInputClick" data-name="addStorey" :value="addStorey" placeholder="请输入楼栋号" />
</view> </view>
<view class="item"> <view class="item">
<view class="label"> <view class="label">
<view class="item_desc">单元号</view> <view class="item_desc">单元号</view>
</view> </view>
<input class="right_input" type="text" placeholder="请输入单元号" /> <input class="right_input" type="text" @input="headerInputClick" data-name="addUnit" :value="addUnit" placeholder="请输入单元号" />
</view> </view>
<div class="tip">注意新建的楼栋号需经物业或平台的核实后自动建 如核实未通过将会创建失败</div> <div class="tip">注意新建的楼栋号需经物业或平台的核实后自动建 如核实未通过将会创建失败</div>
@ -65,13 +63,11 @@
</div> </div>
<div v-if="step == '1' && type == '0'"> <div v-if="step == '1' && type == '0'">
<div class="chooseTit">请选择楼层13单元</div> <div class="chooseTit">请选择楼层1{{storey}}单元</div>
<div class="communityInfoList"> <div class="communityInfoList">
<template v-for="(item, index) in 11"> <div v-for="(item, index) in 11" :key="index" :class="active == index ? 'communityInfo2 active' : 'communityInfo2'" @click="choseFloor(item +1)">
<div :class="active == index ? 'communityInfo2 active' : 'communityInfo2'" @click="choseFloor"> {{ index + 1 }}
{{ index + 1 }} </div>
</div>
</template>
</div> </div>
<div class="addCommunityBtn" @click="addCommunity"> <div class="addCommunityBtn" @click="addCommunity">
新建楼层 新建楼层
@ -83,7 +79,7 @@
<view class="label"> <view class="label">
<view class="item_desc">楼层</view> <view class="item_desc">楼层</view>
</view> </view>
<input class="right_input" type="text" placeholder="请输入楼层(仅为数字)" /> <input class="right_input" type="text" @input="headerInputClick" data-name="addFloor" :value="addFloor" placeholder="请输入楼层(仅为数字)" />
</view> </view>
@ -95,15 +91,13 @@
</div> </div>
<div v-if="step == '2' && type == '0'"> <div v-if="step == '2' && type == '0'">
<div class="chooseTit">请选择房间13单元/2</div> <div class="chooseTit">请选择房间1{{storey}}单元/{{unit}}</div>
<div class="communityInfoList"> <div class="communityInfoList">
<template v-for="(item, index) in 11"> <div v-for="(item, index) in 11" :key="index" :class="active == index ? 'communityInfo2 active' : 'communityInfo2'" @click="choseRoom(item)">
<div :class="active == index ? 'communityInfo2 active' : 'communityInfo2'" @click="choseRoom"> {{unit}}0{{ index +1 }}
201
</div> </div>
</template>
</div> </div>
<div class="addCommunityBtn" @click="addRoom"> <div class="addCommunityBtn" @click="addRoom1">
新建房间号 新建房间号
</div> </div>
</div> </div>
@ -114,11 +108,11 @@
<view class="label"> <view class="label">
<view class="item_desc">房间号</view> <view class="item_desc">房间号</view>
</view> </view>
<input class="right_input" type="text" placeholder="请输入房间号" /> <input class="right_input" type="text" @input="headerInputClick" data-name="addRoom" :value="addRoom" placeholder="请输入房间号" />
</view> </view>
<div class="tip">注意新建的楼栋号需经物业或平台的核实后自动建 如核实未通过将会创建失败</div> <div class="tip">注意新建的房间号需经物业或平台的核实后自动建如核实未通过将会创建失败</div>
<div class="addCommunityBtn" @click="saveRoom"> <div class="addCommunityBtn" @click="saveRoom">
确定 确定
@ -192,7 +186,17 @@
</div> </div>
</div> </div>
<u-popup :show="selectShow" @close="close" mode="center" customStyle="width: 500rpx;" round="20rpx">
<view class="popup_container">
<view class="popup_title">请确认要入驻的房产</view>
<view class="popup_community_name">岸芷汀兰(东区)</view>
<view class="popup_desc">1栋4单元2层208室</view>
<view class="popup_btn_List">
<view class="popup_btn" @click="headerCloseClick">取消</view>
<view class="popup_btn popup_btn1" @click="headerPopupSubmitClick">确定</view>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
@ -214,16 +218,34 @@ export default {
active: "1", active: "1",
step: "0", step: "0",
type: "0", //1 0 type: "0", //1 0
createName: "8层", createName: "8层",
addStorey: '', //
addUnit: '', //
addFloor: '', //
addRoom: '', //
storey: '', // xx
unit: '', //
room: '', //
show1: false, // show1: false, //
show2: false, show2: false,
show3: false, show3: false,
show4: true, show4: false,
selectShow: false, //
} }
}, },
methods: { methods: {
headerInputClick(e) {
const { name } = e.currentTarget.dataset;
const { value } = e.detail;
this[name] = value;
},
// //
addCommunity() { addCommunity() {
this.type = "1" this.type = "1"
@ -231,9 +253,25 @@ export default {
// //
saveCommunity() { saveCommunity() {
let that = this let that = this;
if(!this.addStorey) {
uni.showToast({
title: '请输入楼栋号',
icon: 'none',
mask: true
})
return
}
if(!this.addUnit) {
uni.showToast({
title: '请输入单元号',
icon: 'none',
mask: true
})
return
}
uni.showModal({ uni.showModal({
title: `您是要创建:${this.step}`, title: `您是要创建:${this.addStorey}${this.addUnit}单元吗?`,
content: '新建的楼栋号需经物业或平台的核 实后才会创建成功。如核实未通过, 将会创建失败!', content: '新建的楼栋号需经物业或平台的核 实后才会创建成功。如核实未通过, 将会创建失败!',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
@ -246,27 +284,88 @@ export default {
}); });
}, },
// //
choseTower() { choseTower(item) {
console.log('111', item);
this.storey = item;
this.step = "1" this.step = "1"
}, },
// //
saveFloor() { saveFloor() {
this.type = "0" // this.type = "0"
let that = this;
if(!this.addFloor) {
uni.showToast({
title: '请输入楼层',
icon: 'none',
mask: true
})
return
}
uni.showModal({
title: `您是要创建:${this.addFloor}层吗?`,
content: '新建的楼层需经物业或平台的核实后才会创建成功。如核实未通过,将会创建失败!',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
that.type = "0"
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}, },
// //
choseFloor() { choseFloor(item) {
this.step = "2" this.step = "2";
this.unit = item;
}, },
// //
choseRoom() { choseRoom(item) {
this.step = "3" // this.step = "3"
console.log('1');
this.room = item;
this.selectShow = true
},
headerPopupSubmitClick () {
console.log('提交');
},
headerCloseClick() {
this.selectShow = false;
},
addRoom1() {
this.type = '1'
}, },
saveRoom() { saveRoom() {
this.type = "0" // this.type = "0"
let that = this;
if(!this.addRoom) {
uni.showToast({
title: '请输入房间号',
icon: 'none',
mask: true
})
return
}
uni.showModal({
title: `您是要创建:${this.addRoom}房间吗?`,
content: '注意:新建的房间号需经物业或平台的核实后自动建立。如核实未通过,将会创建失败!',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
that.type = "0"
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}, },
back() { back() {

View File

@ -86,6 +86,7 @@
</div> </div>
</div> </div>
</div> </div>
<nav-footer />
</div> </div>
</view> </view>

View File

@ -75,7 +75,7 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 50rpx; /* padding: 0 50rpx; */
margin-top: 40rpx; margin-top: 40rpx;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -67,7 +67,7 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 50rpx; /* padding: 0 50rpx; */
margin-top: 40rpx; margin-top: 40rpx;
} }
.tabItem { .tabItem {

View File

@ -8,11 +8,25 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "packages/community/addCommunity/index", "name": "packages/community/chooseMsgInfo/index",
"pathName": "packages/community/addCommunity/index", "pathName": "packages/community/chooseMsgInfo/index",
"query": "", "query": "",
"scene": null, "scene": null,
"launchMode": "default" "launchMode": "default"
},
{
"name": "packages/community/applyOwer/index",
"pathName": "packages/community/applyOwer/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "packages/community/applyOwer/index",
"pathName": "packages/community/applyOwer/index",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }