瀏覽代碼

更新地区选择接口

306132416@qq.com 4 年之前
父節點
當前提交
a62d9ab701
共有 1 個文件被更改,包括 21 次插入3 次删除
  1. 21 3
      src/views/notification/editPage/editPage.vue

+ 21 - 3
src/views/notification/editPage/editPage.vue

@@ -26,7 +26,7 @@
               :value="item"
               v-model="contentParam.area"
               @click="clickCheckbox(index)"
-            /><span>{{ item }}</span>
+            /><span class="area-font">{{ item }}</span>
           </div>
         </div>
       </div>
@@ -83,7 +83,7 @@ export default {
       noticeTitle: "",
       InfoType: "",
       title: this.$route.query.title,
-      areaList: ["全区", "华东", "华南","华北"],
+      areaList: [],
       content: "",
       unifiedUrl: "/lexus_php/api/",
       fileDes: [], // 上传的文件名,
@@ -225,6 +225,21 @@ export default {
         query: {},
       });
     },
+    getAreaList: function () {
+      this.$http({
+        method: "post",
+        url: "/sys/agent/selectAgentAreaInfoList",
+      })
+        .then((res) => {
+          if (res.data && res.data.code === 200) {
+            this.areaList = res.data.data;
+            this.areaList.unshift('全区');
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
     // 转地区的格式
     // areaToList() {
     //   this.contentParam = this.$route.query
@@ -276,6 +291,7 @@ export default {
   },
   mounted() {
   //  this.getDataList();
+    this.getAreaList();
     this.contentParam = JSON.parse(localStorage.getItem('nowPageEdit'));
     console.log(this.contentParam)
     this.noticeId = this.contentParam.id;
@@ -343,8 +359,10 @@ export default {
   display: flex;
 }
 .areaBox span {
-  width: 30px;
+  width: 60px;
+  justify-content: center;
 }
+
 .areaBox input {
   vertical-align: middle;
 }