1.订单部分页面 2.会议部分页面
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
<view class="info">
|
||||
<view class="cv-section-title">访客信息</view>
|
||||
<view class="cv-avatar-upload" @click="chooseAvatar">
|
||||
<view v-if="!form.facePictures" class="cv-avatar-placeholder">上传正脸照</view>
|
||||
<image v-else :src="form.facePictures" class="cv-avatar-img" />
|
||||
<view v-if="!header" class="cv-avatar-placeholder">上传正脸照</view>
|
||||
<image v-else :src="header" class="cv-avatar-img" />
|
||||
</view>
|
||||
<input class="cv-input-name" placeholder="请输入姓名" v-model="form.visitorName" />
|
||||
<input class="cv-input-phone" placeholder="请输入来访人电话" v-model="form.visitorPhone" />
|
||||
@@ -73,7 +73,8 @@
|
||||
} from '@/common/upload.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
return {
|
||||
header:'',
|
||||
form: {
|
||||
visitorName: '',
|
||||
visitorPhone: '',
|
||||
@@ -104,7 +105,7 @@
|
||||
count: 1 // 根据剩余数量选择
|
||||
});
|
||||
// 将选择的图片添加到selectedImages数组
|
||||
this.form.facePictures = images[0].path
|
||||
this.header = images[0].path
|
||||
|
||||
} catch (error) {
|
||||
|
||||
@@ -112,7 +113,7 @@
|
||||
},
|
||||
async submit(){
|
||||
let images = [''];
|
||||
let filePath = this.form.facePictures.replace('file://', '');
|
||||
let filePath = this.header.replace('file://', '');
|
||||
images[0] = filePath;
|
||||
console.log("t1",images)
|
||||
const result = await uploadFiles({
|
||||
@@ -121,10 +122,19 @@
|
||||
name: 'file',
|
||||
vm: this // 关键:用于注入 token 等
|
||||
});
|
||||
console.log("t1",result)
|
||||
|
||||
if (result.code == '200') {
|
||||
data = result.data.url
|
||||
console.log("t1",result.data.url)
|
||||
}
|
||||
|
||||
this.form.facePictures = result.url
|
||||
},
|
||||
chooseRoom() {
|
||||
// 这里可弹出选择房间号
|
||||
// 这里可弹出选择房间号
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myVisitor/selectRoom'
|
||||
});
|
||||
},
|
||||
chooseCarNumber() {
|
||||
// 这里可弹出选择车牌号
|
||||
|
@@ -146,32 +146,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.visitor-navbar {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
padding-top: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
flex-shrink: 0;
|
||||
/* 防止被压缩 */
|
||||
}
|
||||
|
||||
.visitor-back {
|
||||
position: absolute;
|
||||
left: 37rpx;
|
||||
width: 15rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
|
||||
.visitor-title {
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.visitor-tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
155
pages/sys/user/myVisitor/selectRoom.vue
Normal file
155
pages/sys/user/myVisitor/selectRoom.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 搜索栏 -->
|
||||
<view class="search-bar">
|
||||
<picker mode="region" @change="onRegionChange">
|
||||
<view class="region">{{ region }}</view>
|
||||
</picker>
|
||||
<input class="search-input" placeholder="请输入您的地址" />
|
||||
</view>
|
||||
|
||||
<!-- 地图展示 -->
|
||||
<map
|
||||
class="map-view"
|
||||
:longitude="longitude"
|
||||
:latitude="latitude"
|
||||
scale="16"
|
||||
show-location
|
||||
:markers="markers"
|
||||
></map>
|
||||
|
||||
<!-- 地址列表 -->
|
||||
<view class="address-list">
|
||||
<block v-for="(item, index) in addressList" :key="index">
|
||||
<view
|
||||
class="address-item"
|
||||
@tap="onSelect(item)"
|
||||
>
|
||||
<view class="addr-info">
|
||||
<view class="addr-title">{{ item.name }}</view>
|
||||
<view class="addr-desc">{{ item.detail }}</view>
|
||||
</view>
|
||||
<radio :checked="selectedId === item.id" />
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
region: '重庆',
|
||||
latitude: 29.534,
|
||||
longitude: 106.565,
|
||||
selectedId: null,
|
||||
markers: [
|
||||
{
|
||||
id: 1,
|
||||
latitude: 29.534,
|
||||
longitude: 106.565,
|
||||
iconPath: '/static/ic_map.png', // 设置背景图
|
||||
width: 20,
|
||||
height: 20
|
||||
}
|
||||
],
|
||||
addressList: [
|
||||
{
|
||||
id: 1,
|
||||
name: '综合服务中心-1栋',
|
||||
detail: '重庆市南川区隆化大道9号'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '综合服务中心-2栋',
|
||||
detail: '重庆市南川区隆化大道12号'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '综合服务中心-3栋',
|
||||
detail: '重庆市南川区隆化大道4号'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '综合服务中心-4栋',
|
||||
detail: '重庆市南川区隆化大道5号'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '综合服务中心-5栋',
|
||||
detail: '重庆市南川区隆化大道145号'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onRegionChange(e) {
|
||||
this.region = e.detail.value;
|
||||
},
|
||||
onSelect(item) {
|
||||
this.selectedId = item.id;
|
||||
console.log('Selected:', item);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.region {
|
||||
margin-right: 20rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.map-view {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
.address-list {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.address-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.addr-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.addr-title {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.addr-desc {
|
||||
font-size: 26rpx;
|
||||
color: #888;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user