From 9461caf2a459a7ed1eb16f8f439c02cfbcf1930b Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期三, 02 八月 2023 15:06:08 +0800 Subject: [PATCH] 新增功能 --- pages/tabBar/notice/measures.vue | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pages/tabBar/notice/measures.vue b/pages/tabBar/notice/measures.vue index 0a6832b..6aa6d4b 100644 --- a/pages/tabBar/notice/measures.vue +++ b/pages/tabBar/notice/measures.vue @@ -56,6 +56,7 @@ <script> import { measureList, submitMeasures, getMeasureDetail } from '@/api/notice.js' + import VUE_APP_BASE_URL from '../../../common/constant.js' export default { components:{ @@ -73,7 +74,7 @@ autoHeight: true, detailData : {}, measureIds : [], - baseUrl: '', + baseUrl: VUE_APP_BASE_URL, list: [], showBtn: false } @@ -86,18 +87,12 @@ this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; uni.hideTabBar(); this.getMeasureList(); - console.log("huan",process.env.NODE_ENV) - if (process.env.NODE_ENV == 'development') { - this.baseUrl = 'http://192.168.0.41:8086' - }else { - this.baseUrl = 'http://121.239.169.30:13001' - } }, methods: { getMeasureList() { const param = { pageIndex: 1, - pageSize: 10000000, + pageSize: 10000, } measureList(param).then(res => { if(res.code == 100){ @@ -119,6 +114,13 @@ console.log('change', this.measureIds); }, submit() { + if(this.measureIds.length <0) { + uni.showToast({ + icon: "none", + title: '请勾选基础措施' + }); + return; + } const param = { id: this.detailData.id, baseMeasures: this.measureIds, @@ -170,7 +172,7 @@ uploadFilePromise(url) { return new Promise((resolve, reject) => { let a = uni.uploadFile({ - url: this.baseUrl + '/attachment/uploadMeasureImage/key', + url: VUE_APP_BASE_URL + '/attachment/uploadMeasureImage/key', filePath: url, name: 'file', header: { -- Gitblit v1.9.2