From 42e5ea86f7edc9361227edd979a8ae1952713161 Mon Sep 17 00:00:00 2001
From: Liuyi <candymxq888@outlook.com>
Date: 星期六, 19 十月 2024 16:19:16 +0800
Subject: [PATCH] 添加共享列表,修改共享功能相关代码

---
 pages/infoBreakdown/index.vue |   43 +++++++++++++++++++++++++++++++++++--------
 1 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/pages/infoBreakdown/index.vue b/pages/infoBreakdown/index.vue
index ecaec78..7155b05 100644
--- a/pages/infoBreakdown/index.vue
+++ b/pages/infoBreakdown/index.vue
@@ -42,6 +42,17 @@
 			}
 		});
 	}
+	
+	function toScan(){
+		// 调用二维码扫描接口
+		uni.scanCode({
+			scanType: ['qrCode'],
+			success: function (res) {
+				console.log('条码内容:' + res.result);
+				form.value.facilityCode = res.result
+			}
+		});
+	}
 	async function submit(){
 		form.value.url = uploadList.value
 		//去掉数组中空字符串,数组转字符串
@@ -77,8 +88,8 @@
 						<form>
 							<view class="form-item">
 								<view class="label">设备号:</view>
-								<input class="item-input" v-model="form.facilityCode" name="input" placeholder="请扫描水机站牌二维码或输入设备号" />
-								<image src="../../static/images/addCard/code.png" alt=""></image>
+								<input class="item-input" v-model="form.facilityCode" name="input" placeholder="请扫描或输入设备号" />
+								<image @click="toScan()" src="../../static/images/addCard/code.png" alt=""></image>
 							</view>
 							<view class="form-item">
 								<view class="label">联系方式:</view>
@@ -86,7 +97,7 @@
 							</view>
 							<view class="form-item">
 								<view class="label">问题类型:</view>
-								<input class="item-input" name="input" v-model="form.type" placeholder="请选择问题类型" />
+								<input class="item-input" name="input" v-model="form.type" placeholder="请输入数字" />
 							</view>
 							<view class="form-item">
 								<view class="label">问题描述:</view>
@@ -100,6 +111,7 @@
 							<block v-for="(item,index) in uploadList">
 								<view @click="uploadImg(index)" class="upload-img-item">
 									<image v-if="item" :src="item"></image>
+									<image v-else class="default-img" src="../../static/images/other/img-add.png" alt=""></image>
 								</view>
 							</block>
 						</view>
@@ -150,8 +162,14 @@
 						align-items: center;
 						border-bottom: 1rpx solid rgba(111, 111, 111, 0.1);
 						height:100rpx;
+						.label{
+							width:180rpx;
+						}
+						input{
+							width:340rpx;
+						}
 						image{
-							margin-left:60rpx;
+							margin-left:50rpx;
 							width:50rpx;
 							height:50rpx;
 						}
@@ -159,8 +177,8 @@
 				}
 				.upload-box{
 					.upload-title{
-						color: #5b93dc;
-						margin: 10rpx 20rpx 0;
+						color: #6a717e;
+						margin-top: 10rpx;
 					}
 					.upload-img{
 						display: flex;
@@ -174,9 +192,16 @@
 								border-radius:20rpx;
 								border:1rpx dashed #b7d4ff;
 								margin-bottom: 10rpx;
+								display: flex;
+								justify-content: center;
+								align-items: center;
 								image{
-									width:180rpx;
-									height:180rpx;
+									width:170rpx;
+									height:170rpx;
+								}
+								.default-img{
+									width:120rpx;
+									height:120rpx;
 								}
 						}
 					}
@@ -192,6 +217,8 @@
 				left: calc(50% - 35%);
 				text-align: center;
 				border-radius:50rpx;
+				color: #5b93dc;
+				letter-spacing:5rpx;
 			}
 	   }
    }

--
Gitblit v1.9.3