From f9691d544e62d6c04dbfe45d05a6c7bc5e004291 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 29 十二月 2023 11:52:29 +0800
Subject: [PATCH] 服务商
---
bicycle/pages/problemReporting/problemReporting.vue | 98 ++++++++++++++++++++++++++++++++----------------
1 files changed, 65 insertions(+), 33 deletions(-)
diff --git a/bicycle/pages/problemReporting/problemReporting.vue b/bicycle/pages/problemReporting/problemReporting.vue
index 5436ca4..c7284c6 100644
--- a/bicycle/pages/problemReporting/problemReporting.vue
+++ b/bicycle/pages/problemReporting/problemReporting.vue
@@ -25,13 +25,19 @@
<view class="form_item_label">鐜板満鎯呭喌</view>
<view class="form_item_uplaod">
<view class="form_item_uplaod_list">
- <image class="uploadImg" @click="uploadImg" src="@/static/icon/ic_upload@2x.png" mode="widthFix"></image>
+ <view class="uploadImg">
+ <image @click="uploadImg" src="@/static/icon/ic_upload@2x.png" mode="widthFix"></image>
+ </view>
+
<view class="form_item_uplaod_list_item" v-for="(item, index) in from.files" :key="index">
<view class="images">
<image class="img" :src="item.url" mode="widthFix"></image>
</view>
<image class="close" @click="dele(index)" src="@/static/icon/ic_clean@2x1.png" mode="widthFix"></image>
</view>
+ <view class="form_item_uplaod_list_item1"></view>
+ <view class="form_item_uplaod_list_item1"></view>
+ <view class="form_item_uplaod_list_item1"></view>
</view>
<textarea v-model="from.info" placeholder="璇疯缁嗘弿杩扮幇鍦烘儏鍐碉紝涓嶅皯浜�10涓瓧"></textarea>
</view>
@@ -98,7 +104,8 @@
phone: '',
typeId: ''
},
- problemList: []
+ problemList: [],
+ isEnd: true
};
},
computed: {
@@ -127,31 +134,39 @@
},
// 鎻愪氦
submit() {
- if (this.from.problemId == '') {
- uni.showToast({ title: '杞﹁締闂涓嶈兘涓虹┖', icon: 'none', duration: 2000 });
- return
- }
- this.$u.api.saveRepair({
- addr: this.from.address,
- bikeCode: this.from.code,
- binkeId: this.binkeId,
- content: this.from.info,
- fileUrlList: this.from.files.map(item => item.imgaddr),
- latitude: this.from.latitude,
- linkname: this.from.contacts,
- linkphone: this.from.phone,
- longitude: this.from.longitude,
- param: this.from.problemName,
- paramId: this.from.problemId,
- typeId: this.from.typeId
- }).then(res => {
- if (res.code === 200) {
- uni.showToast({ title: '涓婃姤鎴愬姛', icon: 'success', duration: 2000 });
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- }, 2000)
+ if (this.isEnd) {
+ if (this.from.problemId == '') {
+ uni.showToast({ title: '杞﹁締闂涓嶈兘涓虹┖', icon: 'none', duration: 2000 });
+ return
}
- })
+ if (this.from.info.length < 10) {
+ uni.showToast({ title: '鏈�灏戝瓧鏁颁笉鑳戒綆浜�10涓瓧', icon: 'none', duration: 2000 });
+ return
+ }
+ this.isEnd = false
+ this.$u.api.saveRepair({
+ addr: this.from.address,
+ bikeCode: this.from.code,
+ binkeId: this.binkeId,
+ content: this.from.info,
+ fileUrlList: this.from.files.map(item => item.imgaddr),
+ latitude: this.from.latitude,
+ linkname: this.from.contacts,
+ linkphone: this.from.phone,
+ longitude: this.from.longitude,
+ param: this.from.problemName,
+ paramId: this.from.problemId,
+ typeId: this.from.typeId
+ }).then(res => {
+ if (res.code === 200) {
+ uni.showToast({ title: '涓婃姤鎴愬姛', icon: 'success', duration: 2000 });
+ this.isEnd = true
+ // setTimeout(() => {
+ uni.navigateBack({ delta: 1 });
+ // }, 2000)
+ }
+ })
+ }
},
// 鎷ㄦ墦鐢佃瘽
calling(mobile) {
@@ -526,23 +541,38 @@
.form_item_uplaod_list {
display: flex;
align-items: center;
+ flex-wrap: wrap;
+ justify-content: space-between;
.uploadImg {
- width: 150rpx;
- height: 150rpx;
- margin-right: 16rpx;
+ width: 22%;
+ height: 150rpx !important;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ // margin-right: 16rpx;
+ margin-bottom: 30rpx;
+ image {
+ width: 100%;
+ height: 100%;
+ }
+ }
+
+ .form_item_uplaod_list_item1 {
+ width: 22%;
+ height: 0;
}
.form_item_uplaod_list_item {
- width: 150rpx;
+ width: 22%;
height: 150rpx;
- border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
- margin-right: 16rpx;
-
+ // margin-right: 25rpx;
+ margin-bottom: 30rpx;
+
&:last-child {
margin-right: 0 !important;
}
@@ -550,6 +580,8 @@
.images {
width: 150rpx;
height: 150rpx;
+ border-radius: 16rpx;
+ overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
--
Gitblit v1.9.3