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() {
|
||||
// 这里可弹出选择车牌号
|
||||
|
Reference in New Issue
Block a user