From 4ea559f51845a9d0944fe4e30a28dbefb6d49d87 Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Fri, 19 Jul 2024 14:15:28 +0800 Subject: [PATCH] =?UTF-8?q?flx=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=89=BF?= =?UTF-8?q?=E5=8C=85=E5=95=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/contractors/basicInfo.vue | 145 ++++++++++++++++++-------------- 1 file changed, 82 insertions(+), 63 deletions(-) diff --git a/pages/contractors/basicInfo.vue b/pages/contractors/basicInfo.vue index d834eedf..6ae22504 100644 --- a/pages/contractors/basicInfo.vue +++ b/pages/contractors/basicInfo.vue @@ -51,9 +51,8 @@ 资质照片 - + @@ -64,7 +63,7 @@ -
+
承包商名称 {{item.cbsName || '--'}} @@ -194,39 +193,39 @@ methods: { async getHeight() { const query = uni.createSelectorQuery().in(this); - - let fixedheaderHeight = 0 - const fixedHeaderPromise = new Promise((resolve) => { - query.select('.fixedheader').boundingClientRect(data => { - fixedheaderHeight = data.height - console.log('fixedheaderHeight:', data.height); - resolve(); - }).exec(); - }); - - let mobileTopHeight = 0 - const systemInfoPromise = new Promise((resolve) => { - uni.getSystemInfo({ - success(res) { - mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0; - resolve(); - } - }); - }); - - await fixedHeaderPromise; - await systemInfoPromise; - - this.barBoxHeight = fixedheaderHeight + mobileTopHeight; - console.log('this.barBoxHeight', this.barBoxHeight); - - let screenHeight = uni.getSystemInfoSync().screenHeight; - console.log('screenHeight', screenHeight); - - this.scrollHeight = screenHeight - this.barBoxHeight -44; - console.log('this.scrollHeight', this.scrollHeight); + + let fixedheaderHeight = 0 + const fixedHeaderPromise = new Promise((resolve) => { + query.select('.fixedheader').boundingClientRect(data => { + fixedheaderHeight = data.height + console.log('fixedheaderHeight:', data.height); + resolve(); + }).exec(); + }); + + let mobileTopHeight = 0 + const systemInfoPromise = new Promise((resolve) => { + uni.getSystemInfo({ + success(res) { + mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0; + resolve(); + } + }); + }); + + await fixedHeaderPromise; + await systemInfoPromise; + + this.barBoxHeight = fixedheaderHeight + mobileTopHeight; + console.log('this.barBoxHeight', this.barBoxHeight); + + let screenHeight = uni.getSystemInfoSync().screenHeight; + console.log('screenHeight', screenHeight); + + this.scrollHeight = screenHeight - this.barBoxHeight - 44; + console.log('this.scrollHeight', this.scrollHeight); }, - handleTab(val){ + handleTab(val) { this.checked = val }, supplierInfoList() { @@ -246,7 +245,7 @@ } }) }, - getDetailInfo(){ + getDetailInfo() { let data = { enterpriseId: this.id, projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn, @@ -259,33 +258,35 @@ success: res => { console.log("enterpriseInfo", res); this.enterpriseInfo = res.result - - if(this.enterpriseInfo.enterpriseQualificationUrl){ - // pc处理方式 - this.enterpriseInfo.enterpriseQualificationUrl = - res.result.enterpriseQualificationUrl && res.result.enterpriseQualificationUrl.split(',').length > 1 ? - res.result.enterpriseQualificationUrl.split(',').map(item => { - return { - name: item.split('*')[0], - url: that.url_config+'image/'+ item.split('*')[1], - } - }) : res.result.enterpriseQualificationUrl.indexOf('http://') >= 0 ? res.result.enterpriseQualificationUrl : - url_config+ 'image/' + res.result.enterpriseQualificationUrl; - console.log(this.enterpriseInfo.enterpriseQualificationUrl) + + if (this.enterpriseInfo.enterpriseQualificationUrl) { + // pc处理方式 + this.enterpriseInfo.enterpriseQualificationUrl = + res.result.enterpriseQualificationUrl && res.result.enterpriseQualificationUrl + .split(',').length > 1 ? + res.result.enterpriseQualificationUrl.split(',').map(item => { + return { + name: item.split('*')[0], + url: that.url_config + 'image/' + item.split('*')[1], + } + }) : res.result.enterpriseQualificationUrl.indexOf('http://') >= 0 ? res.result + .enterpriseQualificationUrl : + url_config + 'image/' + res.result.enterpriseQualificationUrl; + console.log(this.enterpriseInfo.enterpriseQualificationUrl) } - + //如果app有图片但没加载出来,就切换成上面pc处理方式 // if(this.enterpriseInfo.enterpriseQualificationUrl){ // this.enterpriseInfo.enterpriseQualificationUrl = this.enterpriseInfo.enterpriseQualificationUrl.split('*')[1] // } - + this.conProjectInfo = res.result.projectEnterprise } }) }, //预览图片 previewImage(url) { - console.log('url',url); + console.log('url', url); uni.previewImage({ urls: [url] }) @@ -295,27 +296,38 @@ + \ No newline at end of file