From 5c27bc068373ebf6cf152c7ebedbf79218d8a143 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 26 六月 2024 18:19:05 +0800
Subject: [PATCH] bug

---
 h5/pages/staff/snapshot.vue |   31 ++++++++++++++++++++++++++-----
 1 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/h5/pages/staff/snapshot.vue b/h5/pages/staff/snapshot.vue
index 0c80c25..2ef9221 100644
--- a/h5/pages/staff/snapshot.vue
+++ b/h5/pages/staff/snapshot.vue
@@ -19,7 +19,7 @@
       <view class="line">
         <view class="label">
           <text>*</text>
-          <text>鎺ュ彈浜�</text>
+          <text>鎺ユ敹浜�</text>
         </view>
         <view class="value" @click="selMember">
           <text
@@ -227,6 +227,14 @@
         title: '璇烽�夋嫨闅愭偅绫诲瀷',
         icon: 'none'
       })
+      if (!param.content) return uni.showToast({
+        title: '璇疯緭鍏ユ儏鍐佃鏄�',
+        icon: 'none'
+      })
+      if (param.content.length < 10) return uni.showToast({
+        title: '鎯呭喌璇存槑涓嶅緱灏忎簬10涓瓧',
+        icon: 'none'
+      })
 
       DangerCreate({
         ...param,
@@ -252,7 +260,7 @@
       this.isShowType = false
     },
     seletedSafety(e) {
-
+  
     },
     seletedDate(e) {
       this.$set(this.param, 'submitTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'))
@@ -267,8 +275,12 @@
       })
     },
     selMember() {
+      if(!this.param.areaId) return uni.showToast({
+        title: '璇峰厛閫夋嫨闅愭偅鍖哄煙',
+        icon: 'none'
+      })
       uni.navigateTo({
-        url: '/pages/staff/memberSel'
+        url: '/pages/staff/memberSel?areaId=' + this.param.areaId
       })
     },
     fileDel(i) {
@@ -276,10 +288,10 @@
     },
     uploadImage() {
       this.showUpload = false
+      let token = uni.getStorageSync('token') || ''
       uni.chooseImage({
         count: 4,
         success: (chooseImageRes) => {
-          console.log('chooseImageRes.tempFilePaths', chooseImageRes.tempFilePaths)
           uni.showLoading({ title: '涓婁紶涓�', mask: true })
           const tempFilePaths = chooseImageRes.tempFilePaths
           let imgs = tempFilePaths.map((value, index) => {
@@ -294,6 +306,9 @@
             name: 'file',
             formData: {
               folder: 'HIDDEN_DANGER_FILE'
+            },
+            header: {
+              Dm_user_token: token
             },
             success: (uploadFileRes) => {
               let res = JSON.parse(uploadFileRes.data)
@@ -324,12 +339,16 @@
     uploadVideo() {
       this.showUpload = false
       let that = this
+      let token = uni.getStorageSync('token') || ''
       uni.chooseVideo({
         success: (chooseImageRes) => {
           uni.showLoading({ title: '涓婁紶涓�', mask: true })
           uni.uploadFile({
             url: `${uploadUrl}`,
             filePath: chooseImageRes.tempFilePath,
+            header: {
+              Dm_user_token: token
+            },
             name: 'file',
             formData: {
               folder: 'HIDDEN_DANGER_FILE'
@@ -360,6 +379,7 @@
 
 <style lang="scss">
 .main_wrap {
+  padding-bottom: 200rpx;
   .line {
     display: flex;
     justify-content: space-between;
@@ -416,6 +436,7 @@
         position: absolute;
         right: -20rpx;
         top: -20rpx;
+        z-index: 9999;
       }
       image {
         width: 100%;
@@ -423,7 +444,7 @@
       }
       video {
         width: 100%;
-        max-height: 160rpx;
+        max-height: 120rpx;
       }
     }
   }

--
Gitblit v1.9.3