From b79f0c7fc01982e9e6dddb1e1138731fec16ba46 Mon Sep 17 00:00:00 2001 From: Apcallover <1503963513@qq.com> Date: Mon, 22 Apr 2024 22:31:50 +0800 Subject: [PATCH] =?UTF-8?q?flat:=20cityId=E5=A4=87=E4=BB=BD=20+=20?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/upload.js | 5 +++-- main.js | 2 ++ pages/projectInfo/projectInfo.vue | 3 ++- pages/projectInfo/userrecruitInfo.vue | 3 ++- pages/projectInfo/userrecruitWorkInfo.vue | 3 ++- pages/projectInfo/workInfo.vue | 3 ++- pages/recruit/subPage/task.vue | 16 +++++++--------- pages/recruit/subPage/work.vue | 17 ++++++++--------- untils/AxiosUtils.js | 2 +- untils/tools.js | 18 ++++++++++++++++++ 10 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 untils/tools.js diff --git a/api/upload.js b/api/upload.js index 132bfa5..68ac224 100644 --- a/api/upload.js +++ b/api/upload.js @@ -1,5 +1,6 @@ import { - request + request, + transformRepalceString } from '@/untils/AxiosUtils.js'; import { baseUrl @@ -34,7 +35,7 @@ export async function uploadFile(file) { statusCode, data }) => { - const resp = JSON.parse(data) + const resp = transformRepalceString(JSON.parse(data)) if (statusCode === 200 && resp.code === 200) { resolve(resp.msg) } else { diff --git a/main.js b/main.js index 6a34dcb..4d0c7f2 100644 --- a/main.js +++ b/main.js @@ -4,6 +4,7 @@ import App from './App' import util from './untils/func.js' import uView from '@/uni_modules/uview-ui' import config from './config'; +import tools from '@/untils/tools.js' import { VueJsonp } from 'vue-jsonp' @@ -49,6 +50,7 @@ Vue.prototype.$api = { msg, sleep } +Vue.prototype.tools = tools Vue.prototype.$config = config Vue.prototype.navTo = navTo Vue.config.productionTip = false diff --git a/pages/projectInfo/projectInfo.vue b/pages/projectInfo/projectInfo.vue index 7e2d6b1..550542e 100644 --- a/pages/projectInfo/projectInfo.vue +++ b/pages/projectInfo/projectInfo.vue @@ -158,7 +158,8 @@ 重要提示: 为保障个人基本劳动权益,建议通过平台用工的形式就业 {{ info.callName }} : - {{ info.callTel }} + {{ info.callTel }} diff --git a/pages/projectInfo/userrecruitInfo.vue b/pages/projectInfo/userrecruitInfo.vue index 8bd5bf8..d36e1d6 100644 --- a/pages/projectInfo/userrecruitInfo.vue +++ b/pages/projectInfo/userrecruitInfo.vue @@ -158,7 +158,8 @@ 重要提示: 为保障个人基本劳动权益,建议通过平台用工的形式就业 {{ info.callName }} : - {{ info.callTel }} + {{ info.callTel }} diff --git a/pages/projectInfo/userrecruitWorkInfo.vue b/pages/projectInfo/userrecruitWorkInfo.vue index 4ca592a..9754853 100644 --- a/pages/projectInfo/userrecruitWorkInfo.vue +++ b/pages/projectInfo/userrecruitWorkInfo.vue @@ -163,7 +163,8 @@ 重要提示: 为保障个人基本劳动权益,建议通过平台用工的形式就业 {{ info.callName }} : - {{ info.callTel }} + {{ info.callTel }} diff --git a/pages/projectInfo/workInfo.vue b/pages/projectInfo/workInfo.vue index 6395c42..2e97bdc 100644 --- a/pages/projectInfo/workInfo.vue +++ b/pages/projectInfo/workInfo.vue @@ -163,7 +163,8 @@ 重要提示: 为保障个人基本劳动权益,建议通过平台用工的形式就业 {{ info.callName }} : - {{ info.callTel }} + {{ info.callTel }} diff --git a/pages/recruit/subPage/task.vue b/pages/recruit/subPage/task.vue index 07e12b7..2a791be 100644 --- a/pages/recruit/subPage/task.vue +++ b/pages/recruit/subPage/task.vue @@ -116,11 +116,10 @@ - - + + @@ -191,7 +190,7 @@ value: '', showCalendar: false, showStime: false, - showjobAddress: false, + showCityId: false, showEtime: false, info: { jobName: '', // 招工名称 @@ -213,7 +212,7 @@ ageDesc: dic.ageArr[0][0].label, // 年龄要求 education: dic.eduArr[0][0].value, // 学历要求 experienceDesc: dic.expeArr[0][0].label, // 经验要求 - jobAddress: '', + cityId: '', jobCompanyName: '', // 企业名称 jobCompanyScale: '', // 企业信用代码 jobCompanyIndustry: '', // 所属行业 @@ -318,7 +317,7 @@ message: '请选择经验要求', trigger: ['change'] }, - jobAddress: { + cityId: { type: 'string', required: true, message: '请选择工作地址', @@ -658,7 +657,6 @@ 'education', 'educationLabel', 'experienceDesc', - 'jobAddress', 'jobCompanyName', 'jobCompanyScale', 'jobCompanyIndustry', diff --git a/pages/recruit/subPage/work.vue b/pages/recruit/subPage/work.vue index e36992a..1854fce 100644 --- a/pages/recruit/subPage/work.vue +++ b/pages/recruit/subPage/work.vue @@ -120,11 +120,10 @@ - - + + @@ -196,7 +195,7 @@ showCalendar: false, showStime: false, showEtime: false, - showjobAddress: false, + showCityId: false, info: { jobName: '', // 招工名称 stime: '', // 发布时间 @@ -217,7 +216,7 @@ ageDesc: dic.ageArr[0][0].label, // 年龄要求 education: dic.eduArr[0][0].value, // 学历要求 experienceDesc: dic.expeArr[0][0].label, // 经验要求 - jobAddress: '', + cityId: '', jobCompanyName: '', // 企业名称 jobCompanyScale: '', // 企业信用代码 jobCompanyIndustry: '', // 所属行业 @@ -322,7 +321,7 @@ message: '请选择经验要求', trigger: ['change'] }, - jobAddress: { + cityId: { type: 'string', required: true, message: '请选择工作地址', @@ -663,7 +662,7 @@ 'education', 'educationLabel', 'experienceDesc', - 'jobAddress', + 'cityId', 'jobCompanyName', 'jobCompanyScale', 'jobCompanyIndustry', diff --git a/untils/AxiosUtils.js b/untils/AxiosUtils.js index e7ad098..79738b9 100644 --- a/untils/AxiosUtils.js +++ b/untils/AxiosUtils.js @@ -129,7 +129,7 @@ async function DoAjax(options, config = {}) { } // 递归替换 url -function transformRepalceString(props) { +export function transformRepalceString(props) { if (typeof props !== 'object' || props === null) { for (const key in replaceStr) { if (typeof props === 'string') { diff --git a/untils/tools.js b/untils/tools.js new file mode 100644 index 0000000..ca303be --- /dev/null +++ b/untils/tools.js @@ -0,0 +1,18 @@ +function onDialingPhoneNumber(phone) { + return new Promise((resolve, reject) => { + uni.makePhoneCall({ + phoneNumber: phone, // 电话号码 + success: (res) => { + resolve(res) + }, + fail: (err) => { + reject(err) + } // 失败 + }); + }) +} + + +export default { + onDialingPhoneNumber +} \ No newline at end of file