shaogen1995 3 سال پیش
والد
کامیت
d4ef0e5520

+ 2 - 2
houtai/src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 const service = axios.create({
   // baseURL: 'http://192.168.0.135:8016', // 本地调试
-  // baseURL: 'http://project.4dage.com:8016', // 线上调试
-  baseURL: '', // build
+  baseURL: 'http://project.4dage.com:8016', // 线上调试
+  // baseURL: '', // build
   timeout: 5000
 })
 // 请求拦截器

+ 1 - 0
houtai/src/views/tab1Main/five.vue

@@ -280,6 +280,7 @@ export default {
       const res = await saveEntity(obj)
       if (res.code === 0) {
         this.$message.success('操作成功')
+        this.id = res.data.id
       } else this.$message.warning(res.msg)
     }
   },

+ 1 - 0
houtai/src/views/tab1Main/four.vue

@@ -270,6 +270,7 @@ export default {
       const res = await saveEntity(obj)
       if (res.code === 0) {
         this.$message.success('操作成功')
+        this.id = res.data.id
       } else this.$message.warning(res.msg)
     }
   },

+ 8 - 5
houtai/src/views/tab1Main/one.vue

@@ -27,7 +27,7 @@
             :data="{
               menuId: menuId,
               type: 'img',
-              villageId:villageId,
+              villageId: villageId,
             }"
             :file-list="imgUpList"
             :headers="{ token }"
@@ -156,7 +156,9 @@ export default {
   methods: {
     // 点击保存
     async save () {
-      if (this.ruleForm.name.trim() === '') return this.$message.warning('文字信息不能为空')
+      if (this.ruleForm.name.trim() === '') {
+        return this.$message.warning('文字信息不能为空')
+      }
       const obj = {
         menuId: this.menuId,
         villageId: this.villageId,
@@ -168,6 +170,7 @@ export default {
       const res = await saveEntity(obj)
       if (res.code === 0) {
         this.$message.success('保存成功')
+        this.ruleForm.id = res.data.id
       } else this.$message.warning(res.msg)
     },
     // ---------------照片墙
@@ -276,16 +279,16 @@ export default {
       this.fileList = temp.videos || []
       // 图片回显
       if (temp.images) {
-        temp.images.forEach(v => {
+        temp.images.forEach((v) => {
           v.url = this.baseURL + v.filePath
         })
       }
       this.imgUpList = temp.images || []
       // id存储
-      this.fileList.forEach(v => {
+      this.fileList.forEach((v) => {
         this.videoIdArr.push(v.id)
       })
-      this.imgUpList.forEach(v => {
+      this.imgUpList.forEach((v) => {
         this.imgIdArr.push(v.id)
       })
     }

+ 1 - 0
houtai/src/views/tab1Main/three.vue

@@ -79,6 +79,7 @@ export default {
       const res = await saveEntity(obj)
       if (res.code === 0) {
         this.$message.success('保存成功')
+        this.id = res.data.id
       } else this.$message.warning(res.msg)
     },
     // -------------------上传视频

+ 1 - 0
houtai/src/views/tab1Main/tow.vue

@@ -85,6 +85,7 @@ export default {
       const res = await saveEntity(obj)
       if (res.code === 0) {
         this.$message.success('操作成功')
+        this.id = res.data.id
       } else this.$message.warning(res.msg)
     }
   },

+ 2 - 2
webM/src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 const service = axios.create({
   // baseURL: 'http://192.168.0.135:8016', // 本地调试
-  baseURL: 'http://project.4dage.com:8016', // 线上调试
-  // baseURL: '', // build
+  // baseURL: 'http://project.4dage.com:8016', // 线上调试
+  baseURL: '', // build
   timeout: 5000
 })
 // 请求拦截器