diff --git a/components/company/company.vue b/components/company/company.vue index 1093628..d5d300a 100644 --- a/components/company/company.vue +++ b/components/company/company.vue @@ -15,44 +15,45 @@ - 区域:{{company.address}} + 区域:{{company.address}} + + + + + + + 电子合同 + + + + 甲方:{{contract.party_a_name}} + 乙方:{{contract.party_b_name}} + 合同类型:{{contract.contract_type_name}} + 合同编号:{{contract.contract_no}} + + + + + + + + 合同 + + + {{contract.create_time}} + + + + + + + 查看 + + - - - - 电子合同 - - - - 甲方:{{contract.party_a_name}} - 乙方:{{contract.party_b_name}} - 合同类型:{{contract.contract_type_name}} - 合同编号:{{contract.contract_no}} - - - - - - - - 合同 - - - {{contract.create_time}} - - - - - - - 查看 - - - - - @@ -72,31 +73,35 @@ - - 其他联系人 - - 姓名:{{other.name}} - 职位:{{other.position}} - 联系电话:{{other.phone}} - 邮箱:{{other.email}} - - + + 其他联系人 + + 姓名:{{other.name}} + 职位:{{other.position}} + 联系电话:{{other.phone}} + 邮箱:{{other.email}} + + - + - + - + 资质信息 - - - - - - + + + + + + @@ -106,18 +111,18 @@ import { contractView } from "@/api/contract.js" import { companyView } from "@/api/company.js" import { download_file } from "@/api/junziqian.js" - + export default { - name:"company", + name: "company", data() { return { skeleton: true, company: { - qualification: { - bank_account:"", - bank_accountB:"", - business_license:"", - business_licenseB:"", + qualification: { + bank_account: "", + bank_accountB: "", + business_license: "", + business_licenseB: "", }, }, contract: {}, @@ -125,38 +130,38 @@ current: 1 } }, - props: ['id','type'], + props: ['id', 'type'], mounted() { - this.initContract(this.$props.id, this.$props.type||null); + this.initContract(this.$props.id, this.$props.type || null); }, methods: { naviTo(contract_no) { - download_file({applyNo:contract_no}).then(res=>{ - if(res.code!=1){ - Toast(res.msg) - } - uni.navigateTo({ - url: `/subpkg/pdfView/pdfView?url=${res.data.url}` - }) - }) + download_file({ applyNo: contract_no }).then(res => { + if (res.code != 1) { + Toast(res.msg) + } + uni.navigateTo({ + url: `/subpkg/pdfView/pdfView?url=${res.data.url}` + }) + }) }, - naviBack(){ + naviBack() { uni.navigateBack() }, - async initContract(id, type="contract") { + async initContract(id, type = "contract") { let res; //判断是合同还是公司 - if(id&&(type=="contract"||type==null)){ - res = await contractView({ id }); - } else{ - if(id>0){ - res = await companyView({id}); - }else{ - res = await companyView(); - } - - } + if (id && (type == "contract" || type == null)) { + res = await contractView({ id }); + } else { + if (id > 0) { + res = await companyView({ id }); + } else { + res = await companyView(); + } + + } this.company = res.data.company; this.user = res.data.user; this.contract = res.data.contract; @@ -164,31 +169,31 @@ // console.log(res.data); }, //查看图片 - priview(url){ + priview(url) { uni.previewImage({ - urls:[url], + urls: [url], longPressActions: { - itemList: ['保存图片'], - success: function(data) { - if (data.tapIndex === 0) { - uni.saveImageToPhotosAlbum({ - filePath: url, - success: function() { - uni.showToast({ - title: '保存成功', - icon: 'success' - }) - }, - fail: function() { - uni.showToast({ - title: '保存失败', - icon: 'none' - }) - } + itemList: ['保存图片'], + success: function(data) { + if (data.tapIndex === 0) { + uni.saveImageToPhotosAlbum({ + filePath: url, + success: function() { + uni.showToast({ + title: '保存成功', + icon: 'success' }) - } + }, + fail: function() { + uni.showToast({ + title: '保存失败', + icon: 'none' + }) + } + }) } } + } }) } }, @@ -196,197 +201,197 @@ \ No newline at end of file diff --git a/utils/oahttp.js b/utils/oahttp.js index 2aa993a..99a66d5 100644 --- a/utils/oahttp.js +++ b/utils/oahttp.js @@ -44,7 +44,7 @@ function baseRequestTwo(url, method, data, { url: Url + '/api' + url, method: method || 'GET', header: header, - data: data || {}, + data: method != 'GET' ? data || {} : {}, params: method == 'GET' ? data : {}, success: (res) => { // uni.hideLoading()