From 6683cc7a762d30d251695f19661088692921ad27 Mon Sep 17 00:00:00 2001
From: lzx_win <2602107437@qq.com>
Date: Mon, 22 Sep 2025 15:20:20 +0800
Subject: [PATCH] =?UTF-8?q?refactor(components):=20=E6=8F=90=E5=8F=96?=
=?UTF-8?q?=E4=BC=81=E4=B8=9A=E4=BF=A1=E6=81=AF=E4=B8=BA=E7=8B=AC=E7=AB=8B?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=B9=B6=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
将重复的企业信息展示逻辑提取为独立的CompanyInfo组件,提高代码复用性
同时将支付页面的默认支付方式从"1"改为"2"
---
components/company-info/index.vue | 118 +++++++++++++++++++++++++++++++
pages_subpack/job-order-detail/index.vue | 82 +++++----------------
pages_subpack/pay/index.vue | 2 +-
pages_subpack/payment/index.vue | 2 +-
4 files changed, 137 insertions(+), 67 deletions(-)
create mode 100644 components/company-info/index.vue
diff --git a/components/company-info/index.vue b/components/company-info/index.vue
new file mode 100644
index 0000000..97c8e35
--- /dev/null
+++ b/components/company-info/index.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+ 企业信息
+
+
+
+
+ 公司名称:{{companyData.employAuthenticationCompany && companyData.employAuthenticationCompany.name || companyData.workName || '暂未'}}
+
+ 公司地址:{{companyData.employAuthenticationCompany && companyData.employAuthenticationCompany.address || companyData.workAddress || '暂未'}}
+
+ 所属行业:{{companyData.employAuthenticationCompany && companyData.employAuthenticationCompany.industryName || '暂未'}}
+
+ 招聘联系人:{{companyData.employAuthenticationPerson && companyData.employAuthenticationPerson.name || '暂未'}}
+
+ 联系方式:{{companyData.employAuthenticationPerson && companyData.employAuthenticationPerson.phone || '暂未'}}
+
+ 复制
+
+
+
+ 工作地址:{{companyData.workAddress || '暂未'}}
+
+ 复制
+
+
+
+
+
+
+ 联系企业
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_subpack/job-order-detail/index.vue b/pages_subpack/job-order-detail/index.vue
index 1d636c0..eef8e0d 100644
--- a/pages_subpack/job-order-detail/index.vue
+++ b/pages_subpack/job-order-detail/index.vue
@@ -133,6 +133,15 @@
+
+
+
+
+
+
@@ -251,48 +260,11 @@
-
-
-
-
-
- 企业信息
-
-
-
-
- 公司名称:{{obj.employAuthenticationCompany && obj.employAuthenticationCompany.name || obj.workName || '暂未'}}
-
- 公司地址:{{obj.employAuthenticationCompany && obj.employAuthenticationCompany.address || obj.workAddress || '暂未'}}
-
- 所属行业:{{obj.employAuthenticationCompany && obj.employAuthenticationCompany.industryName || '暂未'}}
-
- 招聘联系人:{{obj.employAuthenticationPerson && obj.employAuthenticationPerson.name || '暂未'}}
-
- 联系方式:{{obj.employAuthenticationPerson && obj.employAuthenticationPerson.phone || '暂未'}}
-
- 复制
-
-
-
- 工作地址:{{obj.workAddress || '暂未'}}
-
- 复制
-
-
-
-
-
-
- 联系企业
-
-
-
-
+
+
@@ -307,9 +279,11 @@
confirmOrderTryCompanyOk,
} from "@/common/api.js"
import OrderStatus from "@/components/order-status/index.vue"
+ import CompanyInfo from "@/components/company-info/index.vue"
export default {
components: {
- OrderStatus
+ OrderStatus,
+ CompanyInfo
},
data() {
return {
@@ -489,28 +463,6 @@
});
}
},
-
- // 拨打企业联系人电话
- callCompany() {
- const phone = this.obj.employAuthenticationPerson && this.obj.employAuthenticationPerson.phone;
- if (phone) {
- uni.makePhoneCall({
- phoneNumber: phone,
- fail: (err) => {
- console.error('拨打电话失败', err);
- uni.showToast({
- title: '拨打电话失败',
- icon: 'none'
- });
- }
- });
- } else {
- uni.showToast({
- title: '企业联系人电话号码不存在',
- icon: 'none'
- });
- }
- },
}
}
diff --git a/pages_subpack/pay/index.vue b/pages_subpack/pay/index.vue
index 9cf5360..ef9a214 100644
--- a/pages_subpack/pay/index.vue
+++ b/pages_subpack/pay/index.vue
@@ -134,7 +134,7 @@
data() {
return {
amount: 0,
- payRadio: "1",
+ payRadio: "2",
orderId : 0,
checked : 0,
detail : {},
diff --git a/pages_subpack/payment/index.vue b/pages_subpack/payment/index.vue
index 04d575c..fa5a24b 100644
--- a/pages_subpack/payment/index.vue
+++ b/pages_subpack/payment/index.vue
@@ -119,7 +119,7 @@
myMoney:"",//账户余额
items:{},
amount:"9.9",
- payRadio:"1",
+ payRadio:"2",
sysList:[]
}
},