wzz лет назад: 4
Родитель
Сommit
cf9c023ef9
3 измененных файлов с 25 добавлено и 9 удалено
  1. 14 1
      pages/index/index.vue
  2. 2 0
      pages/index/record/record.vue
  3. 9 8
      pages/index/upload/upload.vue

+ 14 - 1
pages/index/index.vue

@@ -21,6 +21,7 @@
         </div>
       </div>
     </div>
+     <button class="submit-btn" @click="goUpload()">上传</button>
   </view>
 </template>
 
@@ -60,6 +61,11 @@ export default {
   onShow() {
   },
   methods: {
+	goUpload(){
+		uni.navigateTo({
+			url: "/pages/index/upload/upload",
+		})
+	},
 	getUserInfo() {
 	    let md5Sign = md5(
 	      "method=" +
@@ -218,7 +224,6 @@ export default {
         margin-left: 80rpx;
       }
     }
-
     .bg-img {
       z-index: -1;
       position: absolute;
@@ -267,4 +272,12 @@ export default {
 .fontGrey {
   color: $uni-text-color-grey;
 }
+.submit-btn {
+    color: white;
+    font-weight: normal;
+    width: 70%;
+    border-radius: 20rpx;
+    background-color: #02a7f0;
+    margin: 50rpx auto;
+  }
 </style>

+ 2 - 0
pages/index/record/record.vue

@@ -123,6 +123,8 @@ export default {
 <style lang="scss" scoped>
 .flex-box {
   display: flex;
+  flex-wrap: wrap;
+  width: 100%;
 }
 .view {
   display: flex;

+ 9 - 8
pages/index/upload/upload.vue

@@ -105,10 +105,9 @@ export default {
               title: "上传成功",
               icon: "none",
               duration: 2000,
-            });
-            // uni.setStorageSync("supply_name", this.company.name);
-            // uni.setStorageSync("supply_code", this.company.code);
-            // uni.setStorageSync("supply_tel", this.company.tel);
+            })
+			getApp().globalData.user_department = this.department;
+			getApp().globalData.user_real_name = this.name;
             setTimeout(() => {
               uni.navigateBack({});
             }, 1500);
@@ -130,9 +129,9 @@ export default {
     },
     getImage(type) {
       let that = this;
-      if (that.uploadList.length >= 3) {
+      if (that.uploadList.length >= 9) {
         uni.showToast({
-          title: "最多上传3张图片",
+          title: "最多上传9张图片",
           icon: "none",
           duration: 2500,
         });
@@ -140,7 +139,7 @@ export default {
       }
       uni.chooseImage({
         sourceType: [type],
-        count: 3 - that.uploadList.length,
+        count: 9 - that.uploadList.length,
         sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
         success: (res) => {
           for (let i = 0; i < res.tempFilePaths.length; i++) {
@@ -213,7 +212,8 @@ export default {
 
 <style lang="scss" scoped>
 .upload-parent-box {
-  height: 150rpx;
+  // height: 150rpx;
+  padding: 3%;
   padding-top: 25rpx;
   padding-left: 20rpx;
 }
@@ -247,6 +247,7 @@ export default {
 .update_button {
   text-align: center;
   display: flex;
+  flex-wrap: wrap;
 }
 .content {
   font-size: 28rpx;