parent
83c59016da
commit
99a4baaf02
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "智能拾物登记"
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
<view class="container">
|
||||
<!-- 上传区域 - 只在识别前显示 -->
|
||||
<view class="upload-container {{isIdentified ? 'hidden' : ''}}">
|
||||
<view class="upload-area">
|
||||
<!-- 相机图标按钮 -->
|
||||
<view class="camera-icon-wrapper" bindtap="takePhoto">
|
||||
<view class="upload-icon">📷</view>
|
||||
<view class="camera-label">点击拍照</view>
|
||||
</view>
|
||||
|
||||
<view class="upload-text">{{uploadText}}</view>
|
||||
|
||||
<view class="action-buttons">
|
||||
<button class="action-button photo-btn" bindtap="takePhoto">拍照</button>
|
||||
<button class="action-button album-btn" bindtap="chooseFromAlbum">从相册选择</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 识别后的内容 -->
|
||||
<view class="identified-content {{isIdentified ? '' : 'hidden'}}">
|
||||
<!-- 顶部返回按钮 -->
|
||||
<view class="header-bar">
|
||||
<view class="back-btn" bindtap="goBackToUpload">
|
||||
<text class="back-icon">←</text>
|
||||
<text class="back-text">返回</text>
|
||||
</view>
|
||||
<view class="header-title">智能识物登记</view>
|
||||
</view>
|
||||
|
||||
<!-- 预览图片 -->
|
||||
<view class="preview-section">
|
||||
<image class="preview-image" src="{{imagePath}}" mode="aspectFit"></image>
|
||||
<view class="preview-actions">
|
||||
<button class="action-btn rechoose-btn" bindtap="rechooseImage">重新选择</button>
|
||||
<button class="action-btn retake-btn" bindtap="retakePhoto">重新拍摄</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 信息表单 -->
|
||||
<view class="info-form">
|
||||
<view class="form-title">识别结果</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">物品:</text>
|
||||
<input class="form-input" value="{{itemName}}" placeholder="请输入物品名称" bindinput="onItemNameInput" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">颜色:</text>
|
||||
<input class="form-input" value="{{itemColor}}" placeholder="请输入物品颜色" bindinput="onItemColorInput" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">特征:</text>
|
||||
<input class="form-input" value="{{itemFeature}}" placeholder="请输入物品特征" bindinput="onItemFeatureInput" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">品牌:</text>
|
||||
<input class="form-input" value="{{itemBrand}}" placeholder="请输入物品品牌" bindinput="onItemBrandInput" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">联系方式:</text>
|
||||
<input class="form-input" value="{{itemPhone}}" placeholder="请输入您的手机号" bindinput="onItemPhoneInput" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="form-label">当前位置:</text>
|
||||
<view class="location-area">
|
||||
<input class="form-input location-input" value="{{itemLocation}}" placeholder="请输入当前位置" bindinput="onItemLocationInput" />
|
||||
<!-- <button class="location-btn" bindtap="getLocation">获取位置</button> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="note">
|
||||
注:若实际情况与以上识别结果有不符,可完善以上信息
|
||||
</view>
|
||||
|
||||
<view class="form-actions">
|
||||
<button class="cancel-btn" bindtap="goBackToUpload">取消</button>
|
||||
<button class="submit-btn" bindtap="submitForm">发布</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -0,0 +1,295 @@
|
||||
.container {
|
||||
padding: 20rpx;
|
||||
background-color: #f8f8f8;
|
||||
min-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 上传容器 - 只在识别前显示 */
|
||||
.upload-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: -20rpx;
|
||||
}
|
||||
|
||||
.upload-area {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding:70rpx 50rpx;
|
||||
text-align: center;
|
||||
box-shadow: 20rpx 8rpx 30rpx rgba(0,0,0,0.15);
|
||||
width: 80%;
|
||||
max-width: 600rpx;
|
||||
}
|
||||
|
||||
/* 相机图标包装 */
|
||||
.camera-icon-wrapper {
|
||||
margin-bottom: 40rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
background: linear-gradient(135deg, #09BB07, #08a806);
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.camera-icon-wrapper:active {
|
||||
transform: scale(0.95);
|
||||
background: linear-gradient(135deg, #08a806, #079705);
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
font-size: 120rpx;
|
||||
color: white;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.camera-label {
|
||||
font-size: 32rpx;
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.upload-text {
|
||||
color: #666;
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 50rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 操作按钮组 */
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
gap: 30rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
border: none;
|
||||
border-radius: 12rpx;
|
||||
padding: 25rpx 40rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.action-button:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.photo-btn {
|
||||
background-color: #09BB07;
|
||||
color: white;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.album-btn {
|
||||
background-color: #10AEFF;
|
||||
color: white;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* 识别后的内容 */
|
||||
.identified-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 顶部返回栏 */
|
||||
.header-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 15rpx 25rpx;
|
||||
border-radius: 8rpx;
|
||||
background-color: #f8f8f8;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
font-size: 32rpx;
|
||||
margin-right: 10rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.back-text {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
margin-right: 120rpx;
|
||||
}
|
||||
|
||||
/* 预览区域 */
|
||||
.preview-section {
|
||||
background-color: #fff;
|
||||
border-radius: 15rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: block;
|
||||
border: 2rpx solid #eee;
|
||||
}
|
||||
|
||||
.preview-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
flex: 1;
|
||||
border: none;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.rechoose-btn {
|
||||
background-color: #f0f0f0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.retake-btn {
|
||||
background-color: #10AEFF;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 信息表单 */
|
||||
.info-form {
|
||||
background-color: #fff;
|
||||
border-radius: 15rpx;
|
||||
padding: 40rpx 30rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.1);
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-size: 38rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 40rpx;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
margin-bottom: 35rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
width: 180rpx;
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
/* padding: 0rpx; */
|
||||
border: 2rpx solid #e5e5e5;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
box-sizing: border-box;
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.form-input:focus {
|
||||
border-color: #09BB07;
|
||||
}
|
||||
|
||||
.location-area {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.location-input {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.location-btn {
|
||||
background-color: #10AEFF;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 10rpx;
|
||||
padding: 24rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.note {
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
margin-top: 40rpx;
|
||||
line-height: 1.6;
|
||||
padding: 20rpx;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 8rpx;
|
||||
border-left: 4rpx solid #09BB07;
|
||||
}
|
||||
|
||||
/* 表单操作按钮 */
|
||||
.form-actions {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
margin-top: auto;
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
flex: 1;
|
||||
background-color: #f8f8f8;
|
||||
color: #666;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
border-radius: 12rpx;
|
||||
padding: 25rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
flex: 2;
|
||||
background-color: #09BB07;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 12rpx;
|
||||
padding: 25rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
Loading…
Reference in new issue