From 3cc4193b395ce4ea6daec62236467c81456aa661 Mon Sep 17 00:00:00 2001 From: jiangrui <403209447@qq.com> Date: Thu, 22 Apr 2021 10:01:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/region.js | 15 +++++++++++++++ src/views/convenience/detail.vue | 17 +++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 src/api/region.js diff --git a/src/api/region.js b/src/api/region.js new file mode 100644 index 0000000..3bce403 --- /dev/null +++ b/src/api/region.js @@ -0,0 +1,15 @@ +// /convenience/v2/region/list +import request from '@/utils/request' + +/** + * 获取行政区域列表 + * @param {*} type + * @returns + */ +export function getRegionList(type) { + return request({ + url: '/api/convenience/v2/region/list', + method: 'get', + params:type + }) + } \ No newline at end of file diff --git a/src/views/convenience/detail.vue b/src/views/convenience/detail.vue index b91bce6..d576194 100644 --- a/src/views/convenience/detail.vue +++ b/src/views/convenience/detail.vue @@ -710,6 +710,7 @@ import { import { parseTime } from "@/utils"; import { staffList } from "@/api/staff"; import AliOss from "@/components/AliOSS/index.vue"; +import { getRegionList } from '@/api/region'; export default { filters: { @@ -841,6 +842,7 @@ export default { this.getStaffList(); this.getCommunicationList(); this.getTypeList(); + this.getRegions(); }, methods: { getInfo() { @@ -1238,14 +1240,6 @@ export default { } }); }, - // handlePreviewAttachment(url) { - // const fileType = url.substr(url.lastIndexOf(".") + 1); - // if(this.isAssetTypeAnImage(fileType)){ - - // }else{ - - // } - // }, isAssetTypeAnImage(ext) { return ( ["png", "jpg", "jpeg", "bmp", "gif"].indexOf(ext.toLowerCase()) !== -1 @@ -1280,6 +1274,13 @@ export default { // tempRef.$el.style.display = "inline-block"; // this.$refs.eventTypeRef.focusFirstNode(); }, 100); + }, + + // ----------------------- + getRegions(){ + getRegionList('CONVENIENCE').then(res=>{ + console.log(res); + }) } }, beforeRouteLeave(to, from, next) {