zsk 6 months ago
commit 8b43beb0dc

@ -42,7 +42,7 @@ export default {
let that = this; let that = this;
console.log("show 项目init", options, decodeURIComponent(options.query.scene)); console.log("show 项目init", options, decodeURIComponent(options.query.scene));
let requestComeFrom = this.G.globalConstantData.requestComeFrom; let requestComeFrom = this.G.globalConstantData.requestComeFrom;
uni.setStorageSync("requestComeFrom", (requestComeFrom && (requestComeFrom == "assistant_miniapp" || requestComeFrom == "supply_chain_miniapp")) ? 'isToB' : 'isToC'); uni.setStorageSync("requestComeFrom", requestComeFrom && (requestComeFrom == "assistant_miniapp" || requestComeFrom == "supply_chain_miniapp") ? "isToB" : "isToC");
// id // id
uni.removeStorageSync("scene"); uni.removeStorageSync("scene");
@ -96,6 +96,36 @@ export default {
// console.log("app.vue IM"); // console.log("app.vue IM");
that.checkAndReconnectIM(); that.checkAndReconnectIM();
} }
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function (res) {
console.log("检测是否有新版本:", res.hasUpdate);
});
updateManager.onUpdateReady(function (res) {
uni.showModal({
title: "更新提示",
content: "新版本已经准备好,需重启应用",
showCancel: false,
success(res) {
if (res.confirm) {
console.log("新版本已经准备好,需重启应用");
updateManager.applyUpdate();
}
},
});
});
updateManager.onUpdateFailed(function (res) {
uni.showModal({
title: "更新提示",
content: "新版本下载异常,需重启应用",
showCancel: false,
success(res) {
if (res.confirm) {
console.log("新版本下载异常,需重启应用");
updateManager.applyUpdate();
}
},
});
});
}, },
onHide: function () { onHide: function () {
// //

@ -98,22 +98,31 @@ export default {
text: "首页", text: "首页",
iconSize: 48, iconSize: 48,
}, },
{ // {
iconPath: "icon-fadanhao-31 g_c_9", // iconPath: "icon-fadanhao-31 g_c_9",
selectedIconPath: "icon-fadanhao-31 g_c_main", // selectedIconPath: "icon-fadanhao-31 g_c_main",
pagePath: "/pages/home/order", // pagePath: "/pages/home/order",
text: "发单号", // text: "",
iconSize: 48, // iconSize: 48,
}, // },
{ {
iconPath: "icon-message g_c_9", iconPath: "icon-message g_c_9",
selectedIconPath: "icon-message g_c_main", selectedIconPath: "icon-message g_c_main",
pagePath: "/pages/message/index", pagePath: "/pages/message/index",
text: "消息", text: "消息",
iconSize: 78, iconSize: 48,
iconType: "custom", iconType: "custom",
count: 0, count: 0,
}, },
// u-icon
{
iconPath: "icon-kuaisubaoming g_c_main",
selectedIconPath: "icon-kuaisubaoming g_c_main",
pagePath: "/pages/addJob/index",
iconSize: 78,
iconType: "custom",
iconPadding: "2px",
},
{ {
iconPath: "icon-order_active g_c_9", iconPath: "icon-order_active g_c_9",
selectedIconPath: "icon-order_active g_c_main", selectedIconPath: "icon-order_active g_c_main",
@ -141,6 +150,12 @@ export default {
let that = this; let that = this;
console.log(index); console.log(index);
this.isShow = false; this.isShow = false;
if (index === 2) {
uni.navigateTo({
url: "/root/home/quickApplication",
});
return false;
}
return true; return true;
}, },
uploadPage() { uploadPage() {

@ -124,7 +124,7 @@
</div> </div>
<!-- 身份证号输入框 --> <!-- 身份证号输入框 -->
<div class="form-new-idcard g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-code-idcard'"> <div class="form-new-idcard g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-code-idcard'">
<u-input type="idcard" :clearable="false" :maxlength="18" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleIDcard(e, item, index)" /> <u-input type="idcard" :clearable="false" :maxlength="18" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleIDcard(e, item, index)" @blur="(e) => handleIDcard(e, item, index)" />
</div> </div>
<!-- 家庭住址输入框 --> <!-- 家庭住址输入框 -->
<div class="form-new-address g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-address'"> <div class="form-new-address g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-address'">
@ -385,6 +385,7 @@ export default {
}, },
// //
handleIDcard(e, $item, $index) { handleIDcard(e, $item, $index) {
console.log('123123132',e);
this.$emit("changeIDcard", e); this.$emit("changeIDcard", e);
}, },
// //

@ -206,7 +206,7 @@ export function createApp () {
}, $sourceType); }, $sourceType);
}, },
/* /*
*/ */
uploadImgByAlbum (callback = () => { }, type = 'default', $num = 1, $sourceType = ['album']) { uploadImgByAlbum (callback = () => { }, type = 'default', $num = 1, $sourceType = ['album']) {
var that = this; var that = this;
G.uploadImage($num, (imgRes) => { G.uploadImage($num, (imgRes) => {

@ -107,9 +107,9 @@
<!-- <g-panel-image :url="cdnBaseImg + 'quick_application0610.svg'" size="96" /> --> <!-- <g-panel-image :url="cdnBaseImg + 'quick_application0610.svg'" size="96" /> -->
</div> </div>
<div hover-class="none" style="position: fixed; right: 20px; bottom: 120px; z-index: 0" hover-stop-propagation="false" @click="toRecord" v-if="isLogin && userInfo.agencyId"> <!-- <div hover-class="none" style="position: fixed; right: 20px; bottom: 120px; z-index: 0" hover-stop-propagation="false" @click="toRecord" v-if="isLogin && userInfo.agencyId">
<g-panel-image :url="cdnBaseImg + 'quick_application0610.svg'" size="96" /> <g-panel-image :url="cdnBaseImg + 'quick_application0610.svg'" size="96" />
</div> </div> -->
<g-filter :show.sync="whichOneShow" @hideDrawer="(e) => (whichOneShow = e)" ref="filterChild" top="43px" :getFilterDataNew="getFilterData" @filterObj="receiveFromChild"></g-filter> <g-filter :show.sync="whichOneShow" @hideDrawer="(e) => (whichOneShow = e)" ref="filterChild" top="43px" :getFilterDataNew="getFilterData" @filterObj="receiveFromChild"></g-filter>
@ -171,11 +171,11 @@ export default {
uni.$on("updateJobList", () => { uni.$on("updateJobList", () => {
that.updateJobInfo(); that.updateJobInfo();
}); });
if (uni.getStorageSync("SHOW_INVITE_ALL")) { // if (uni.getStorageSync("SHOW_INVITE_ALL")) {
if (uni.getStorageSync("SHOW_INVITE_ALL") == 1 && uni.getStorageSync("SHOW_INVITE") == 1) { // if (uni.getStorageSync("SHOW_INVITE_ALL") == 1 && uni.getStorageSync("SHOW_INVITE") == 1) {
that.getInviteList(); // that.getInviteList();
} // }
} // }
console.log('uni.getStorageSync("apply-supplierAccount")', uni.getStorageSync("apply-supplierAccount")); console.log('uni.getStorageSync("apply-supplierAccount")', uni.getStorageSync("apply-supplierAccount"));
that.updateJobInfo(); that.updateJobInfo();
} }
@ -196,6 +196,7 @@ export default {
uni.setStorageSync("TABBAR_HEIGHT", res.height); uni.setStorageSync("TABBAR_HEIGHT", res.height);
}) })
.exec(); .exec();
}, },
data() { data() {
return { return {
@ -259,7 +260,7 @@ export default {
size: 50, size: 50,
list: [], list: [],
isFinish: -1, isFinish: -1,
sortTag: 2, sortTag: 0,
}, },
keyword: "", keyword: "",
tabInfo: { tabInfo: {
@ -419,12 +420,14 @@ export default {
.select("#tttop") .select("#tttop")
.boundingClientRect((data) => { .boundingClientRect((data) => {
console.log("data", data); console.log("data", data);
if (data.top <= 0) { if(data){
that.toTop = true; if (data.top <= 0) {
that.showToTop = true; that.toTop = true;
} else { that.showToTop = true;
that.toTop = false; } else {
that.showToTop = false; that.toTop = false;
that.showToTop = false;
}
} }
// domTopInfo.value[id] = data.top; // domTopInfo.value[id] = data.top;
// scrollTop.value = data.top - 200; // scrollTop.value = data.top - 200;
@ -443,9 +446,7 @@ export default {
reachBottom() { reachBottom() {
let that = this; let that = this;
console.log("onReachBottom", that.query.isFinish); console.log("onReachBottom", that.query.isFinish);
this.G.isLogin(); if(uni.getStorageSync("apply-token")){
if (this.G.isLogin()) {
console.log("that.query.size", that.query.size);
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) { if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++; that.query.page++;
that.getList("concat"); that.getList("concat");
@ -778,7 +779,7 @@ export default {
let that = this; let that = this;
that.attentionConfig.num++; that.attentionConfig.num++;
this.getInviteList(); // this.getInviteList();
}, },
/** /**

@ -54,7 +54,7 @@
</view> </view>
<view class="g_mt_10"> <view class="g_mt_10">
<!-- v-if="userInfo.admin" --> <!-- v-if="userInfo.admin" -->
<!-- <view class="g_mt_10 g_position_rela" v-if="userInfo.agencyId"> <view class="g_mt_10 g_position_rela" v-if="userInfo.agencyId">
<div class="g_w_8 g_h_8 g_radius_50 g_bg_f0a g_position_abso" style="right: 18px; top: 10px" v-if="!readed"></div> <div class="g_w_8 g_h_8 g_radius_50 g_bg_f0a g_position_abso" style="right: 18px; top: 10px" v-if="!readed"></div>
<g-panel-form-item <g-panel-form-item
:list="[ :list="[
@ -69,7 +69,7 @@
]" ]"
@clickItem="goPage('/root/bind/order?active=0')" @clickItem="goPage('/root/bind/order?active=0')"
/> />
</view> --> </view>
<view class="g_mt_10" v-if="userInfo.agencyId"> <view class="g_mt_10" v-if="userInfo.agencyId">
<g-panel-card-num :list="billDataList" titleNav="/root/person/applyIndex" :border="true" :speed="1" :marginBottom="16" cusType="num" :height="26" :num="5" cusTitle="报名工单(我报的)" @clickItem="goOrder" /> <g-panel-card-num :list="billDataList" titleNav="/root/person/applyIndex" :border="true" :speed="1" :marginBottom="16" cusType="num" :height="26" :num="5" cusTitle="报名工单(我报的)" @clickItem="goOrder" />
<!-- <g-panel-card-num :list="todayDataList" <!-- <g-panel-card-num :list="todayDataList"

@ -201,10 +201,7 @@ export default {
that.isLogin = uni.getStorageSync("apply-token") ? true : false; that.isLogin = uni.getStorageSync("apply-token") ? true : false;
console.log("that.isLogin", that.isLogin); console.log("that.isLogin", that.isLogin);
that.loginInfo = uni.getStorageSync("apply-userinfo"); that.loginInfo = uni.getStorageSync("apply-userinfo");
if (uni.getStorageSync("applyType") || uni.getStorageSync("applyType") === 0) {
that.menuActive = uni.getStorageSync("applyType");
uni.removeStorageSync("applyType");
}
this.getList(); this.getList();
if (!that.isLogin) { if (!that.isLogin) {
that.loading = false; that.loading = false;
@ -220,6 +217,10 @@ export default {
onShow() { onShow() {
let that = this; let that = this;
if (that.isLogin) { if (that.isLogin) {
if (uni.getStorageSync("applyType") || uni.getStorageSync("applyType") === 0) {
that.menuActive = uni.getStorageSync("applyType");
uni.removeStorageSync("applyType");
}
this.getList(); this.getList();
} }
this.getGZHInfo(); this.getGZHInfo();

@ -468,15 +468,15 @@ const keyboardheightchange = (e) => {
// uni.$emit("msgKeyHeight", availableHeight); // // uni.$emit("msgKeyHeight", availableHeight); //
// writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; // writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
if (systemInfo.platform === 'ios') { if (systemInfo.platform === "ios") {
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value + 34; const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value + 34;
uni.$emit("msgKeyHeight", availableHeight); // uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
}else{ } else {
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
uni.$emit("msgKeyHeight", availableHeight); // uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
} }
} }
setTimeout(() => { setTimeout(() => {
uni.$emit(events.ON_SCROLL_BOTTOM); uni.$emit(events.ON_SCROLL_BOTTOM);
@ -846,24 +846,24 @@ screenHeight.value = uni.getSystemInfoSync().windowHeight;
const chooseData = ref({}); const chooseData = ref({});
onMounted(() => { onMounted(() => {
try { try {
const windowInfo = uni.getWindowInfo(); const windowInfo = uni.getWindowInfo();
console.log("windowInfo", windowInfo); console.log("windowInfo", windowInfo);
let safeTop = windowInfo?.safeArea?.top || 0; let safeTop = windowInfo?.safeArea?.top || 0;
// safeArea.top 0使 // safeArea.top 0使
if (safeTop === 0) { if (safeTop === 0) {
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
// iOS // iOS
if (systemInfo.platform === 'ios') { if (systemInfo.platform === "ios") {
safeTop = systemInfo.statusBarHeight || 44; // iOS 44 safeTop = systemInfo.statusBarHeight || 44; // iOS 44
} else { } else {
safeTop = systemInfo.statusBarHeight || 30; safeTop = systemInfo.statusBarHeight || 30;
} }
} }
ssff.value = safeTop + 14; ssff.value = safeTop + 14;
} catch (error) { } catch (error) {
ssff.value = 48; // ssff.value = 48; //
} }
if (uni.getStorageSync("im_sendParams")) { if (uni.getStorageSync("im_sendParams")) {
chooseData.value = JSON.parse(uni.getStorageSync("im_sendParams")).jobDetail; chooseData.value = JSON.parse(uni.getStorageSync("im_sendParams")).jobDetail;
} }

@ -1,5 +1,5 @@
<template> <template>
<view class="p-root-other-more g_w_all g_h_all g_bg_f_5 g_pl_10 g_pr_10 g_kuaishou"> <view class="p-root-other-more g_w_all g_h_all g_bg_f_5 g_pl_10 g_pr_10 g_kuaishou" style="box-sizing:border-box">
<view class="g_h_10 g_w_pull"></view> <view class="g_h_10 g_w_pull"></view>
<view class="g_bg_f g_pl_16 g_pr_16 g_radius_8 g_mb_24"> <view class="g_bg_f g_pl_16 g_pr_16 g_radius_8 g_mb_24">
<view class="g_flex_row_between g_h_56" v-if="type == 1 || type == 3" :class="type == 3 ? 'g_border_e_b' : ''"> <view class="g_flex_row_between g_h_56" v-if="type == 1 || type == 3" :class="type == 3 ? 'g_border_e_b' : ''">

@ -74,10 +74,10 @@
</view> </view>
<view class="g_fs_14 g_c_9 g_mt_4"> <view class="g_fs_14 g_c_9 g_mt_4">
<view class="g_flex_row_start"> <view class="g_flex_row_start">
<view class="g_flex_row_start"> <!-- <view class="g_flex_row_start">
<view>总职位</view> <view>总职位</view>
<view class="g_mr_8">{{ item.jobNum ? item.jobNum : "0" }}</view> <view class="g_mr_8">{{ item.jobNum ? item.jobNum : "0" }}</view>
</view> </view> -->
<view class="g_flex_row_start"> <view class="g_flex_row_start">
<view>在招</view> <view>在招</view>
<view class="g_mr_8">{{ item.recruitmentJobNum ? item.recruitmentJobNum : "0" }}</view> <view class="g_mr_8">{{ item.recruitmentJobNum ? item.recruitmentJobNum : "0" }}</view>

@ -2078,12 +2078,17 @@
}, },
animate($type = "heavy") { animate($type = "heavy") {
uni.vibrateShort({ const systemInfo = uni.getSystemInfoSync();
type: $type, if(systemInfo.platform === 'ios'){
fail(err){
console.log('震动失败:',err) }else{
} uni.vibrateShort({
}); type: $type,
fail(err) {
console.log("震动失败:", err);
},
});
}
}, },
clearMsg() { clearMsg() {
this.sendMsg = ""; this.sendMsg = "";

@ -4,12 +4,12 @@
<u-modal v-model="submitConfirm" width="90%" negativeTop="150" confirmText="发布职位" :showTitle="false" :confirmStyle="{ color: '#576b95', 'font-weight': 600 }" :cancelStyle="{ color: '#000', 'font-weight': 600 }" :showConfirmButton="false"> <u-modal v-model="submitConfirm" width="90%" negativeTop="150" confirmText="发布职位" :showTitle="false" :confirmStyle="{ color: '#576b95', 'font-weight': 600 }" :cancelStyle="{ color: '#000', 'font-weight': 600 }" :showConfirmButton="false">
<div class="g_fs_17 g_text_c"> <div class="g_fs_17 g_text_c">
<div class style="padding: 42px 24px 36px"> <div class style="padding: 42px 24px 36px">
<div class="g_text_c g_fw_600 g_c_0">创建团队/企业</div> <div class="g_text_c g_fw_600 g_c_0">创建公司账号</div>
<div class="g_text_l g_c_6 g_mb_8 g_mt_24 g_pl_12">团队名称/企业简称</div> <div class="g_text_l g_c_6 g_mb_8 g_mt_24 g_pl_12">您的公司简称</div>
<div class="g_fs_14 g_pl_12 g_bg_f2 g_border_d g_radius_4 g_flex_row_start flex_center"> <div class="g_fs_14 g_pl_12 g_bg_f2 g_border_d g_radius_4 g_flex_row_start flex_center">
<u-input v-model="agencyInfo.fullName" :customStyle="{ color: disabled ? '#999' : '#333', fontSize: '17px' }" :disabled="disabled" height="96" placeholder="如:上海发财劳务"></u-input> <u-input v-model="agencyInfo.fullName" :customStyle="{ color: disabled ? '#999' : '#333', fontSize: '17px' }" :disabled="disabled" height="96" placeholder="如:上海发财劳务"></u-input>
</div> </div>
<div class="g_text_l g_c_9 g_mt_8 g_fs_14 g_pl_12">创建团队后可关注发单号浏览职位及工单报名</div> <div class="g_text_l g_c_9 g_mt_8 g_fs_14 g_pl_12">报名助手需以公司身份使用创建公司后可关注发单号浏览职位及工单报名</div>
</div> </div>
<div class="g_flex_row_center flex_center g_fw_600 g_border_e_t"> <div class="g_flex_row_center flex_center g_fw_600 g_border_e_t">
<div class="g_flex_1 g_h_50 g_text_c g_c_0 g_border_e_r" hover-class="thover" @click="submitConfirm = false" style="line-height: 50px">取消</div> <div class="g_flex_1 g_h_50 g_text_c g_c_0 g_border_e_r" hover-class="thover" @click="submitConfirm = false" style="line-height: 50px">取消</div>
@ -255,7 +255,9 @@ export default {
// //
applyFlowWidthoutAgencyConfirm() { applyFlowWidthoutAgencyConfirm() {
let that = this; let that = this;
this.confirmWithoutAgency = true; // this.confirmWithoutAgency = true;
this.submitConfirm = true;
return; return;
that.G.handleConfirm({ that.G.handleConfirm({
cancelText: "创建团队", cancelText: "创建团队",

@ -374,7 +374,7 @@ export default {
}, },
handleClickIDcard(e) { handleClickIDcard(e) {
this.info.idCard = e; this.info.idCard = e;
if (this.info.idCard.length == 15 || this.info.idCard.length == 18) { if (this.info.idCard && (this.info.idCard.length == 15 || this.info.idCard.length == 18)) {
let info = this.G.getInfoByIDcard(this.info.idCard); let info = this.G.getInfoByIDcard(this.info.idCard);
this.info.age = info.age; this.info.age = info.age;
this.info.sex = info.sex ? (info.sex == "男" ? 1 : 2) : ""; this.info.sex = info.sex ? (info.sex == "男" ? 1 : 2) : "";

@ -510,7 +510,7 @@
<div class="g_fs_12 g_c_6" style="margin-top: 8px">客服</div> <div class="g_fs_12 g_c_6" style="margin-top: 8px">客服</div>
</button> --> </button> -->
</div> </div>
<div class="g_flex_1 g_flex_row_center"> <div class="g_flex_1 g_flex_row_center" v-if="userinfo && userinfo.agencyId">
<div class="g_flex_none g_flex_column_center g_mr_12"> <div class="g_flex_none g_flex_column_center g_mr_12">
<g-button btnText="联系客服" class="g_w_100" size="small_auto" @clickBtn="goIm"></g-button> <g-button btnText="联系客服" class="g_w_100" size="small_auto" @clickBtn="goIm"></g-button>
</div> </div>
@ -611,6 +611,7 @@ export default {
onReady() { onReady() {
this.G.setNavStyle(); this.G.setNavStyle();
}, },
onShareAppMessage() { onShareAppMessage() {
// return this.G.shareFun("/root/detail/job?id=" + this.jobDetail.id, // return this.G.shareFun("/root/detail/job?id=" + this.jobDetail.id,
// "", this.jobDetail.jobName + " " + this.jobDetail.priceStr + " " + " "); // "", this.jobDetail.jobName + " " + this.jobDetail.priceStr + " " + " ");
@ -643,6 +644,18 @@ export default {
this.currentTime = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 06:00"; this.currentTime = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 06:00";
this.dateTimeArray = obj.dateTimeArray; this.dateTimeArray = obj.dateTimeArray;
this.dateTime = obj.dateTime; this.dateTime = obj.dateTime;
// uni.showShareMenu({
// withShareTicket: true,
// menus: ["shareAppMessage", "shareTimeline"],
// });
// //
// onShare1Timeline() {
// return {
// title: "",
// imageUrl: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/pugongying/goxj2-qpwbo.png",
// query: { info: `{info:'test'}` },
// };
// },
}, },
data() { data() {
return { return {
@ -1381,7 +1394,7 @@ export default {
if (that.goImLoading) { if (that.goImLoading) {
return false; return false;
} }
that.goImLoading = true; that.goImLoading = true;
that.F.wyyxGet(that.api.job_get_cus + "?jobId=" + that.jobDetail.id, {}, (cusData) => { that.F.wyyxGet(that.api.job_get_cus + "?jobId=" + that.jobDetail.id, {}, (cusData) => {
that.F.wyyxPost( that.F.wyyxPost(
@ -1404,7 +1417,8 @@ export default {
}); });
that.jobDetail.info = newList.join("丨"); that.jobDetail.info = newList.join("丨");
that.F.wyyxPost( that.F.wyyxPost(
that.api.wyyx_sendCard, { that.api.wyyx_sendCard,
{
conversationType: 1, conversationType: 1,
// senderUserId: uni.getStorageSync("apply-uid"), // id id // senderUserId: uni.getStorageSync("apply-uid"), // id id
// receiverUserId: cusData, // id // receiverUserId: cusData, // id
@ -1414,8 +1428,7 @@ export default {
jobDetail: { jobDetail: {
title: that.jobDetail.jobName, title: that.jobDetail.jobName,
info: that.jobDetail.info, info: that.jobDetail.info,
label: that.jobDetail.jobRequestLabelNames.length > 0 ? that label: that.jobDetail.jobRequestLabelNames.length > 0 ? that.jobDetail.jobRequestLabelNames : "",
.jobDetail.jobRequestLabelNames : "",
salaryClassifyValue: that.jobDetail.priceStr, salaryClassifyValue: that.jobDetail.priceStr,
serviceFee: that.jobDetail.fuWuFei, serviceFee: that.jobDetail.fuWuFei,
monthPay: that.jobDetail.monthPay, monthPay: that.jobDetail.monthPay,

@ -10,7 +10,7 @@
'background-image': info.supplierAccountCoverUrl ? `url(${info.supplierAccountCoverUrl})` : 'url(https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/mbg.jpg)', 'background-image': info.supplierAccountCoverUrl ? `url(${info.supplierAccountCoverUrl})` : 'url(https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/mbg.jpg)',
'background-size': '100% 100%', 'background-size': '100% 100%',
width: 'calc(100vw + ' + backgroundScale + 'px)', width: 'calc(100vw + ' + backgroundScale + 'px)',
height: 'calc(' + (100 / 1.2).toFixed(2) + 'vw + ' + moveDistance + 'px)', height: 'calc(' + (100 / 1.4).toFixed(2) + 'vw + ' + moveDistance + 'px)',
'transform-origin': '50% 0%', 'transform-origin': '50% 0%',
transform: `scale(${1 + backgroundScale * 0.008})`, transform: `scale(${1 + backgroundScale * 0.008})`,
}" }"
@ -18,7 +18,7 @@
</view> </view>
</view> </view>
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar> <u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar>
<scroll-view :refresher-enabled="true" class="scroll-container" scroll-y style="height: 100vh" refresher-default-style="none" @touchstart="onTouchStart" @touchmove="onTouchMove" :refresher-threshold="0" :refresher-triggered="isTrigger" @refresherrefresh="refreshJobList" @touchend="onTouchEnd" @scroll="checkScroll" @scrolltolower="reachBottom"> <scroll-view :refresher-enabled="true" class="scroll-container" scroll-y style="height: 100vh" refresher-default-style="none" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" :refresher-threshold="0" @refresherrefresh="refreshJobList" @scroll="scroll" @scrolltolower="reachBottom">
<view <view
class="u-navbar-fixed" class="u-navbar-fixed"
:style="{ :style="{
@ -112,8 +112,11 @@
</template> </template>
</div> </div>
</view> </view>
<div class="g_bg_f =" v-if="info.recordStatus == 1 || info.recordStatus == 2"> <div class="g_bg_f sticky" :style="{ top: stickyHeight + 'px' }" v-if="info.recordStatus == 1 || info.recordStatus == 2">
<u-tabs bg-color="transparent" from="index" gutter="20" :list="tabInfo.list" :is-scroll="true" v-model="tabInfo.active" active-color="#000" bar-width="64" bar-height="6" @change="handleUpdateTab" font-size="32" duration="0.05" height="56"></u-tabs> <u-tabs bg-color="transparent" from="index" gutter="20" :list="tabInfo.list" :is-scroll="true" v-model="tabInfo.active" active-color="#000" bar-width="64" bar-height="6" @change="handleUpdateTab" font-size="32" duration="0.05" height="56"></u-tabs>
<div class="m-search g_p_10 g_pt_8 bg_shawdoc g_flex_1" style="top: 0">
<u-search v-model="keyword" class="g_flex_1" placeholder="搜索职位名称" bg-color="#ededed" :show-action="false" placeholder-class="g_c_c" :input-style="{ fontSize: '16px' }" height="80" search-icon-color="#999999" :maxlength="20" @input="checkLength" @clear="searchJob" @search="searchJob"></u-search>
</div>
</div> </div>
<!-- 基本信息 --> <!-- 基本信息 -->
@ -150,6 +153,12 @@ export default {
onReady() { onReady() {
this.G.setNavStyle(); this.G.setNavStyle();
}, },
mounted() {
let systemInfo = uni.getSystemInfoSync();
let height = systemInfo.platform == "ios" ? 44 : 48;
this.stickyHeight = systemInfo.statusBarHeight + height;
},
// onShareAppMessage(){ // onShareAppMessage(){
// return this.G.shareFun(); // return this.G.shareFun();
// }, // },
@ -157,6 +166,7 @@ export default {
return { return {
numSlot: [], numSlot: [],
showPage: false, showPage: false,
stickyHeight: 0, // sticky
fromShare: false, fromShare: false,
btnLoading: false, btnLoading: false,
background: { background: {
@ -247,11 +257,11 @@ export default {
}; };
}, },
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop > 120) { // if (e.scrollTop > 120) {
this.navColor = `rgb(255,255,255,${e.scrollTop / 200})`; // this.navColor = `rgb(255,255,255,${e.scrollTop / 200})`;
} else { // } else {
this.navColor = `rgb(255,255,255,0)`; // this.navColor = `rgb(255,255,255,0)`;
} // }
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
@ -336,11 +346,18 @@ export default {
} }
}, },
methods: { methods: {
scroll(e) {
if (e.detail.scrollTop > 120) {
this.navColor = `rgb(255,255,255,${e.detail.scrollTop / 200})`;
} else {
this.navColor = `rgb(255,255,255,0)`;
}
},
// //
onTouchStart(e) { onTouchStart(e) {
if(this.isTouching){ if (this.isTouching) {
return false return false;
} }
this.isTouching = true; this.isTouching = true;
this.mtScroll = 0; this.mtScroll = 0;
this.backgroundScale = 0; this.backgroundScale = 0;
@ -433,6 +450,11 @@ export default {
}); });
} }
}, },
searchJob() {
this.query.list = [];
this.query.page = 1;
this.getDefault();
},
/** /**
* 获取登录人的团队信息 * 获取登录人的团队信息
*/ */
@ -599,6 +621,7 @@ export default {
pageNum: that.query.page, pageNum: that.query.page,
pageSize: that.query.size, pageSize: that.query.size,
agencyId: that.info.id, agencyId: that.info.id,
keys: that.keyword,
}; };
console.log("that.tabInfo.active", that.tabInfo.active); console.log("that.tabInfo.active", that.tabInfo.active);
if (that.tabInfo.active == 1) { if (that.tabInfo.active == 1) {
@ -694,7 +717,7 @@ export default {
console.log("resresresresresres++++++++++++++", that.agencyInfo); console.log("resresresresresres++++++++++++++", that.agencyInfo);
console.log("resresresresresres++++++++++++++", that.isSelf); console.log("resresresresresres++++++++++++++", that.isSelf);
that.info = res; that.info = res;
that.speed = res.jobList.length; // that.speed = res.jobList.length;
that.showPage = true; that.showPage = true;
@ -702,10 +725,10 @@ export default {
that.isSelf = true; that.isSelf = true;
} }
that.numSlot = [ that.numSlot = [
{ // {
name: "总职位", // name: "",
num: that.info.jobNum, // num: that.info.jobNum,
}, // },
{ {
name: "在招", name: "在招",
num: that.info.recruitmentJobNum, num: that.info.recruitmentJobNum,
@ -772,8 +795,9 @@ export default {
let that = this; let that = this;
this.G.isLogin(); this.G.isLogin();
if (this.G.isLogin()) { if (this.G.isLogin()) {
if (that.userInfo.agencyId) { if (that.userInfo.agencyId && that.userInfo.fullName) {
// that.submitConfirm = true; // that.submitConfirm = true;
// that.$refs.applyFlow.applyFlowWidthoutAgencyConfirm();
that.$refs.applyFlow.applyFlowConfirm(); that.$refs.applyFlow.applyFlowConfirm();
} else { } else {
that.$refs.applyFlow.applyFlowWidthoutAgencyConfirm(); that.$refs.applyFlow.applyFlowWidthoutAgencyConfirm();
@ -785,6 +809,7 @@ export default {
let that = this; let that = this;
console.log("eeeeeee", e); console.log("eeeeeee", e);
that.tabInfo.active = e; that.tabInfo.active = e;
that.speed = -1;
that.query.list = []; that.query.list = [];
that.query.page = 1; that.query.page = 1;
that.getDefault(); that.getDefault();
@ -839,4 +864,10 @@ export default {
.scroll-area { .scroll-area {
height: 100vh; height: 100vh;
} }
.sticky {
position: sticky;
// top: 95px;
left: 0;
z-index: 100;
}
</style> </style>

@ -1,261 +1,262 @@
<template> <template>
<div class="g_p_10 g_position_rela"> <div class="g_p_10 g_position_rela">
<div class="g_bg_f g_p_10 g_radius_8"> <div class="g_bg_f g_p_10 g_radius_8">
<u-line-progress class="g_position_abso" v-if="ailoading" style="position: fixed; width: 100%; top: -2px; left: 0px; z-index: 99999" active-color="#3578f6" :percent="defaultPercent" :round="false" height="8" :show-percent="false" inactiveColor="#f5f5f5"></u-line-progress> <u-line-progress class="g_position_abso" v-if="ailoading" style="position: fixed; width: 100%; top: -2px; left: 0px; z-index: 99999" active-color="#3578f6" :percent="defaultPercent" :round="false" height="8" :show-percent="false" inactiveColor="#f5f5f5"></u-line-progress>
<gao-ChatSSEClient ref="sseTest" @onOpen="openCore" @onError="errorCore" @onMessage="messageCore" @onFinish="finishCore" /> <gao-ChatSSEClient ref="sseTest" @onOpen="openCore" @onError="errorCore" @onMessage="messageCore" @onFinish="finishCore" />
<div class="g_pb_8" v-if="currentImg" @click="currentImg = ''"> <div class="g_pb_8" v-if="currentImg" @click="currentImg = ''">
<img :src="currentImg" class="g_w_48 g_h_48 g_radius_8" alt /> <img :src="currentImg" class="g_w_48 g_h_48 g_radius_8" alt />
</div> </div>
<textarea class data-type="desp" v-model="aitext" placeholder="粘贴工友信息, 用AI识别 " placeholder-style="color:#999" :maxlength="-1" :style="{ width: '100%', 'min-height': true ? '104px' : '104px' }"></textarea> <textarea class data-type="desp" v-model="aitext" placeholder="粘贴工友信息, 用AI识别 " placeholder-style="color:#999" :maxlength="-1" :style="{ width: '100%', 'min-height': true ? '104px' : '104px' }"></textarea>
<div class> <div class>
<view class="g_flex_row_end flex_center"> <view class="g_flex_row_end flex_center">
<view class="iconfont icon-jia1 g_c_9 g_mr_8 g_fs_20 g_position_rela biggerSize" @click="chooseImgShow = true"></view> <view class="iconfont icon-jia1 g_c_9 g_mr_8 g_fs_20 g_position_rela biggerSize" @click="chooseImgShow = true"></view>
<view class="g_mr_8 g_w_72 g_fw_600"> <view class="g_mr_8 g_w_72 g_fw_600">
<g-button size="small_auto" type="none" height="24" :fontSize="12" @clickBtn="getClipboard" :btnText="(aitext ? '清空' : '粘贴') + '内容'"></g-button> <g-button size="small_auto" type="none" height="24" :fontSize="12" @clickBtn="getClipboard" :btnText="(aitext ? '清空' : '粘贴') + '内容'"></g-button>
</view> </view>
<view class="g_w_72 g_fw_600"> <view class="g_w_72 g_fw_600">
<g-button size="small_auto" gradual="linear-gradient(-130deg, #5c6cf7, #9963f9)" icon="icon-aitubiao" type="gradual" height="24" :fontSize="12" btnText="AI识别" @clickBtn="getCoze"></g-button> <g-button size="small_auto" gradual="linear-gradient(-130deg, #5c6cf7, #9963f9)" icon="icon-aitubiao" type="gradual" height="24" :fontSize="12" btnText="AI识别" @clickBtn="getCoze"></g-button>
</view> </view>
</view> </view>
</div> </div>
</div> </div>
<u-popup v-model="chooseImgShow" mode="bottom" z-index="999999" border-radius="12" :closeable="false" :mask-close-able="true" @close="chooseImgShow = false"> <u-popup v-model="chooseImgShow" mode="bottom" z-index="999999" border-radius="12" :closeable="false" :mask-close-able="true" @close="chooseImgShow = false">
<div class="g_text_c g_bg_f_5 g_fs_17"> <div class="g_text_c g_bg_f_5 g_fs_17">
<div class="g_bg_f"> <div class="g_bg_f">
<div class="g_c_3"> <div class="g_c_3">
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('camera')"></div> <div class="g_p_16 g_border_e_t" @click="uploadPhoto('camera')"></div>
<div class="g_p_16 g_border_e_t" @click="uploadPhotoByChat"></div> <div class="g_p_16 g_border_e_t" @click="uploadPhotoByChat"></div>
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('album')"></div> <div class="g_p_16 g_border_e_t" @click="uploadPhoto('album')"></div>
</div> </div>
</div> </div>
<div class="g_p_16 g_mt_10 g_bg_f" style="padding-bottom: calc(constant(safe-area-inset-bottom) + 16px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px)" @click="chooseImgShow = false">取消</div> <div class="g_p_16 g_mt_10 g_bg_f" style="padding-bottom: calc(constant(safe-area-inset-bottom) + 16px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px)" @click="chooseImgShow = false">取消</div>
</div> </div>
</u-popup> </u-popup>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
aitext: '', aitext: "",
timer: null, timer: null,
timer1: null, timer1: null,
defaultPercent: 0, defaultPercent: 0,
ailoading: false, ailoading: false,
aiConfig: { aiConfig: {
token: '', token: "",
id: '', id: "",
}, },
chooseImgShow: false, chooseImgShow: false,
currentImg: '', currentImg: "",
} };
}, },
created() { created() {
this.getAiToken() this.getAiToken();
}, },
methods: { methods: {
openCore(respons) { openCore(respons) {
console.log('open sse', respons) console.log("open sse", respons);
}, },
errorCore(err) { errorCore(err) {
console.log('error sse', err) console.log("error sse", err);
}, },
messageCore(msg) { messageCore(msg) {
let that = this let that = this;
console.log('message sse', msg) console.log("message sse", msg);
if (msg.event == 'Done') { if (msg.event == "Done") {
clearInterval(that.timer) clearInterval(that.timer);
that.ailoading = false that.ailoading = false;
} else if (msg.event == 'Message') { } else if (msg.event == "Message") {
let info = JSON.parse(msg.data) let info = JSON.parse(msg.data);
if (info.node_type == 'End') { if (info.node_type == "End") {
this.setInfo(info) this.setInfo(info);
} }
} }
}, },
getAiToken() { getAiToken() {
let that = this let that = this;
that.G.Get('/yishoudan/common/structure/getConfig', {}, (res) => { that.G.Get("/yishoudan/common/structure/getConfig", {}, (res) => {
console.log('res', res) console.log("res", res);
that.aiConfig = { that.aiConfig = {
token: res.token, token: res.token,
id: res.workflowId, id: res.workflowId,
} };
}) });
}, },
uploadPhoto($sourceType) { uploadPhoto($sourceType) {
let that = this let that = this;
console.log('$sourceType', $sourceType) console.log("$sourceType", $sourceType);
uni.chooseImage({ uni.chooseImage({
count: 1, //9 count: 1, //9
sizeType: ['original'], // sizeType: ["original"], //
sourceType: [$sourceType], //album camera 使 sourceType: [$sourceType], //album camera 使
success: function (res) { success: function (res) {
console.log('选取文件数据:', res) console.log("选取文件数据:", res);
that.uploadCozeFile(res.tempFilePaths[0]) that.uploadCozeFile(res.tempFilePaths[0]);
}, },
}) });
}, },
uploadCozeFile(tempFilePath) { uploadCozeFile(tempFilePath) {
let that = this let that = this;
that.chooseImgShow = false that.chooseImgShow = false;
that.currentImg = tempFilePath that.currentImg = tempFilePath;
uni.uploadFile({ uni.uploadFile({
url: 'https://api.coze.cn/v1/files/upload', url: "https://api.coze.cn/v1/files/upload",
method: 'POST', method: "POST",
filePath: tempFilePath, filePath: tempFilePath,
name: 'file', name: "file",
header: { header: {
Authorization: 'Bearer ' + that.aiConfig.token, Authorization: "Bearer " + that.aiConfig.token,
'Content-Type': 'multipart/form-data', "Content-Type": "multipart/form-data",
}, },
formData: {}, formData: {},
success: function (res) { success: function (res) {
console.log('文件', res) console.log("文件", res);
let data = JSON.parse(res.data) let data = JSON.parse(res.data);
that.appCoze(data.data.id) that.appCoze(data.data.id);
}, },
fail: function (err) { fail: function (err) {
console.log(err) console.log(err);
}, },
}) });
}, },
uploadPhotoByChat() { uploadPhotoByChat() {
let that = this let that = this;
uni.chooseMessageFile({ uni.chooseMessageFile({
count: 1, count: 1,
type: 'image', type: "image",
success(res) { success(res) {
console.log('resresresresresres', res) console.log("resresresresresres", res);
if (res.errMsg == 'chooseMessageFile:ok') { if (res.errMsg == "chooseMessageFile:ok") {
console.log('res', res) console.log("res", res);
that.uploadCozeFile(res.tempFiles[0].path) that.uploadCozeFile(res.tempFiles[0].path);
} }
}, },
}) });
}, },
getClipboard() { getClipboard() {
let that = this let that = this;
if (this.aitext) { if (this.aitext) {
this.aitext = '' this.aitext = "";
} else { } else {
uni.getClipboardData({ uni.getClipboardData({
success(res) { success(res) {
console.log(res) console.log(res);
if(res.data){ if (res.data) {
that.aitext = res.data that.aitext = res.data;
}else{ } else {
uni.showToast({ uni.showToast({
title: '请先复制内容', title: "请先复制内容",
icon: 'none', icon: "none",
}) });
} }
}, },
fail() { fail() {
uni.showToast({ uni.showToast({
title: '读取剪切板失败', title: "读取剪切板失败",
icon: 'none', icon: "none",
}) });
}, },
}) });
} }
}, },
setInfo(parsed) { setInfo(parsed) {
let that = this let that = this;
const finalData = JSON.parse(parsed.content) const finalData = JSON.parse(parsed.content);
if (finalData) { if (finalData) {
console.log('解析后的用户信息:', finalData) console.log("解析后的用户信息:", finalData);
let info = { let info = {
idCard: finalData.idcard, idCard: finalData.idcard,
address: finalData.address, address: finalData.address,
name: finalData.username, name: finalData.username,
nation: finalData.nation, nation: finalData.nation,
userName: finalData.username, userName: finalData.username,
sex: finalData.sex ? (finalData.sex == '男' ? 1 : 2) : '', sex: finalData.sex ? (finalData.sex == "男" ? 1 : 2) : "",
age: finalData.age, age: finalData.age,
tel: finalData.tel, tel: finalData.tel,
} };
// uni.$emit('getTownsman', { info }) // uni.$emit('getTownsman', { info })
that.$emit('outputInfo', info) that.$emit("outputInfo", info);
// //
that.ailoading = false that.ailoading = false;
} else { } else {
that.ailoading = false that.ailoading = false;
} }
clearInterval(that.timer) clearInterval(that.timer);
}, },
getCoze() { getCoze() {
let that = this let that = this;
if (!that.aitext) { if (!that.aitext) {
uni.showToast({ uni.showToast({
title: '请粘贴内容', title: "请粘贴内容",
icon: 'none', icon: "none",
}) });
return false return false;
} }
this.appCoze() this.appCoze();
}, },
appCoze(_id) { appCoze(_id) {
let that = this let that = this;
let parameters = {} let parameters = {};
// //
that.ailoading = true that.ailoading = true;
that.defaultPercent = 3 that.defaultPercent = 3;
that.timer = setInterval(() => { that.timer = setInterval(() => {
that.defaultPercent = that.defaultPercent < 15 ? (that.defaultPercent = 15) : that.defaultPercent + 3 that.defaultPercent = that.defaultPercent < 15 ? (that.defaultPercent = 15) : that.defaultPercent + 3;
// console.log('12313123123123123') // console.log('12313123123123123')
if (that.defaultPercent >= 99) { if (that.defaultPercent >= 99) {
clearInterval(that.timer) clearInterval(that.timer);
} }
}, 150) }, 150);
that.timer1 = setTimeout(() => { that.timer1 = setTimeout(() => {
console.log('5687678678678678678') console.log("5687678678678678678");
that.ailoading = false that.ailoading = false;
clearInterval(that.timer) clearInterval(that.timer);
// setLoading() // setLoading()
}, 30000) }, 30000);
if (_id) { if (_id) {
parameters = { parameters = {
img: { img: {
file_id: _id, file_id: _id,
}, },
} };
} else { } else {
parameters = { parameters = {
txt: that.aitext, txt: that.aitext,
} };
} }
this.$refs.sseTest.startChat({ this.$refs.sseTest.startChat({
/** /**
* 将它换成你的地址 * 将它换成你的地址
* 注意 * 注意
* 如果使用 sse-server.js 要在手机端使用的话请确保你的手机和电脑处在一个局域网下并且是正常的ip地址 * 如果使用 sse-server.js 要在手机端使用的话请确保你的手机和电脑处在一个局域网下并且是正常的ip地址
*/ */
url: 'https://api.coze.cn/v1/workflow/stream_run', url: "https://api.coze.cn/v1/workflow/stream_run",
// //
headers: { headers: {
// that.aiConfig.token // that.aiConfig.token
Authorization: 'Bearer ' + that.aiConfig.token, Authorization: "Bearer " + that.aiConfig.token,
'Content-Type': 'application/json', "Content-Type": "application/json",
}, },
// post // post
method: 'post', method: "post",
body: { body: {
parameters, parameters,
// workflow_id: that.aiConfig.id, // workflow_id: that.aiConfig.id,
workflow_id: '7520814905613664310', workflow_id: "7520814905613664310",
// workflow_id: '7492238568816656410', // workflow_id: '7492238568816656410',
}, },
}) });
}, },
}, ressetAitext() {
} this.aitext = "";
},
},
};
</script> </script>
<style> <style></style>
</style>

@ -1,9 +1,10 @@
<template> <template>
<view class="p-root-detail-fellow g_w_all g_bg_page g_kuaishou"> <view class="p-root-detail-fellow g_w_all g_bg_page g_kuaishou">
<view style="padding-bottom: 200rpx;"> <view style="padding-bottom: 200rpx">
<AiApply class @outputInfo="getTownsManInfo" /> <AiApply class @outputInfo="getTownsManInfo" />
<view class="g_h_10"></view> <view class="g_h_10"></view>
<g-panel-form-slot :list="[ <g-panel-form-slot
:list="[
{ {
icon: '', icon: '',
label: '工友电话', label: '工友电话',
@ -16,10 +17,12 @@
pColumn: 8, pColumn: 8,
require: false, require: false,
}, },
]" @changeMobile="handleClickMobile"></g-panel-form-slot> ]"
<view class="g_h_10"></view> @changeMobile="handleClickMobile"
<g-panel-form-slot ></g-panel-form-slot>
:list="[ <view class="g_h_10"></view>
<g-panel-form-slot
:list="[
{ {
icon: '', icon: '',
label: '姓名', label: '姓名',
@ -94,17 +97,18 @@
pColumn: 8, pColumn: 8,
}, },
]" ]"
@changeName="handleClickName" @changeName="handleClickName"
@changeSex="handleClickSex" @changeSex="handleClickSex"
@changeAge="handleClickAge" @changeAge="handleClickAge"
@changeNation="handleClickNation" @changeNation="handleClickNation"
@changeIDcard="handleClickIDcard" @changeIDcard="handleClickIDcard"
@changeAddress="handleClickAddress" @changeAddress="handleClickAddress"
@updateFile="updateFile" @updateFile="updateFile"
@updateIDInfo="handlerIDInfo" @updateIDInfo="handlerIDInfo"
></g-panel-form-slot> ></g-panel-form-slot>
<view class="g_h_10"></view> <view class="g_h_10"></view>
<g-panel-form-slot :list="[ <g-panel-form-slot
:list="[
{ {
icon: '', icon: '',
label: '上传附件', label: '上传附件',
@ -114,273 +118,282 @@
tip: 'slot-update-file', tip: 'slot-update-file',
pColumn: 16, pColumn: 16,
}, },
]" @updateFile="updateFile"> ]"
<template v-slot:after> @updateFile="updateFile"
<view class="g_flex_row_start g_p_10" v-if="imgList.length > 0"> >
<view v-for="(item, index) in imgList" class="g_position_rela" :class="index <= 2 ? 'g_mr_18' : ''" :key="index"> <template v-slot:after>
<i class="iconfont icon-guanbi img-close" @click="delImg(index)"></i> <view class="g_flex_row_start g_p_10" v-if="imgList.length > 0">
<image :src="item" class="g_w_56 g_h_56 g_radius_8" /> <view v-for="(item, index) in imgList" class="g_position_rela" :class="index <= 2 ? 'g_mr_18' : ''" :key="index">
</view> <i class="iconfont icon-guanbi img-close" @click="delImg(index)"></i>
</view> <image :src="item" class="g_w_56 g_h_56 g_radius_8" />
</template> </view>
</g-panel-form-slot> </view>
<g-panel-fixed> </template>
<slot> </g-panel-form-slot>
<view class="g_flex_row_center"> <g-panel-fixed>
<g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button> <slot>
<g-button btnText="确定" class @clickBtn="handleSubmit" size="small" type="primary"></g-button> <view class="g_flex_row_center">
</view> <g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button>
</slot> <g-button btnText="确定" class @clickBtn="handleSubmit" size="small" type="primary"></g-button>
</g-panel-fixed> </view>
</view> </slot>
</view> </g-panel-fixed>
</view>
</view>
</template> </template>
<script> <script>
import AiApply from './components/AiApply.vue' import AiApply from "./components/AiApply.vue";
import { nationlist } from '../../utils/nation.js' import { nationlist } from "../../utils/nation.js";
export default { export default {
components: { components: {
AiApply, AiApply,
}, },
onReady() { onReady() {
this.G.setNavStyle() this.G.setNavStyle();
}, },
onShareAppMessage() { onShareAppMessage() {
return this.G.shareFun() return this.G.shareFun();
}, },
data() { data() {
return { return {
cdnBaseImg: this.G.store().cdnBaseImg, cdnBaseImg: this.G.store().cdnBaseImg,
info: { info: {
nation: '汉族', nation: "汉族",
}, },
nation: nationlist.map((item, index) => { nation: nationlist.map((item, index) => {
return item.name return item.name;
}), }),
nationIndex: 0, nationIndex: 0,
imgList: [], imgList: [],
} };
}, },
onLoad(options) { watch: {
let that = this "info.idCard"() {
console.log('快速报名:', options) console.log("this.info.idCard", this.info.idCard);
if (options) { if (this.info.idCard && (this.info.idCard.length == 15 || this.info.idCard.length == 18)) {
if (options.sex) { let info = this.G.getInfoByIDcard(this.info.idCard);
options.sex = Number(options.sex) console.log("info info info ", info);
} else { this.info.age = info.age;
options.sex = 1 this.info.sex = info.sex ? (info.sex == "男" ? 1 : 2) : "";
} }
if (options.nation) { },
options.nation = options.nation.indexOf('族') > -1 ? options.nation : options.nation + '族' },
} else { onLoad(options) {
options.nation = '汉族' let that = this;
} console.log("快速报名:", options);
this.info = options if (options) {
// if (options.sex) {
that.nation.forEach((item, index) => { options.sex = Number(options.sex);
if (item == that.info.nation) { } else {
that.nationIndex = index options.sex = 1;
} }
}) if (options.nation) {
if (this.info.imgs) { options.nation = options.nation.indexOf("族") > -1 ? options.nation : options.nation + "族";
this.imgList = this.info.imgs.split(',') } else {
} options.nation = "汉族";
} }
console.log('获取工友信息:', options) this.info = options;
}, //
onShow() { that.nation.forEach((item, index) => {
let that = this if (item == that.info.nation) {
// that.nation.forEach((item, index) => { that.nationIndex = index;
// if (item == that.info.nation) { }
// console.log(that.info.nation); });
// console.log(index); if (this.info.imgs) {
// that.nationIndex = index; this.imgList = this.info.imgs.split(",");
// } }
// }); }
// that.speed = 0; console.log("获取工友信息:", options);
// setTimeout(() => { },
// }, 300); onShow() {
}, let that = this;
created() { // that.nation.forEach((item, index) => {
let that = this // if (item == that.info.nation) {
}, // console.log(that.info.nation);
methods: { // console.log(index);
getTownsManInfo(info) { // that.nationIndex = index;
let that = this // }
console.log('info', info) // });
that.info = { // that.speed = 0;
...info, // setTimeout(() => {
index: that.info.index, // }, 300);
nation: info.nation + '族', },
} created() {
}, let that = this;
handleClickName(e) { },
this.info.name = this.info.userName = e methods: {
}, getTownsManInfo(info) {
handleClickSex(e) { let that = this;
this.info.sex = e console.log("info", info);
}, that.info = {
handleClickAge(e) { ...info,
this.info.age = e index: that.info.index,
}, nation: info.nation + "族",
handleClickMobile(e) { };
this.info.tel = e },
}, handleClickName(e) {
handleClickNation(e) { this.info.name = this.info.userName = e;
let that = this },
console.log(e.name) handleClickSex(e) {
this.info.nation = e.name this.info.sex = e;
that.nation.forEach((item, index) => { },
if (item == e.name) { handleClickAge(e) {
// console.log(that.info.nation) this.info.age = e;
// console.log(index) },
that.nationIndex = index handleClickMobile(e) {
} this.info.tel = e;
}) },
}, handleClickNation(e) {
/** let that = this;
* 获取上传的身份信息 console.log(e.name);
*/ this.info.nation = e.name;
handlerIDInfo(res) { that.nation.forEach((item, index) => {
console.log('res', res) if (item == e.name) {
let that = this // console.log(that.info.nation)
that.info.name = res.info.name // console.log(index)
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : '' that.nationIndex = index;
that.info.age = res.info.age }
that.info.nation = res.info.nationality + '族' });
that.info.idCard = res.info.num },
that.info.idCardImageUrl = res.image /**
that.info.userName = res.info.name * 获取上传的身份信息
that.info.address = res.info.address */
that.nation.forEach((item, index) => { handlerIDInfo(res) {
console.log('item1', item) console.log("res", res);
console.log('that.info.nation + "族"', that.info.nation + '族') let that = this;
if (item == that.info.nation) { that.info.name = res.info.name;
console.log('item2', item) that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
that.info.age = res.info.age;
that.info.nation = res.info.nationality + "族";
that.info.idCard = res.info.num;
that.info.idCardImageUrl = res.image;
that.info.userName = res.info.name;
that.info.address = res.info.address;
that.nation.forEach((item, index) => {
console.log("item1", item);
console.log('that.info.nation + "族"', that.info.nation + "族");
if (item == that.info.nation) {
console.log("item2", item);
that.nationIndex = index that.nationIndex = index;
} }
}) });
console.log('that.info', that.info) console.log("that.info", that.info);
console.log('that.nationIndex', that.nationIndex) console.log("that.nationIndex", that.nationIndex);
that.$forceUpdate() that.$forceUpdate();
}, },
// //
delImg(ind) { delImg(ind) {
this.imgList.splice( this.imgList.splice(
this.imgList.findIndex((item, index) => index == ind), this.imgList.findIndex((item, index) => index == ind),
1 1
) );
}, },
// //
updateFile(e) { updateFile(e) {
let that = this let that = this;
if (that.imgList.length < 4) { if (that.imgList.length < 4) {
that.imgList.push(e) that.imgList.push(e);
uni.hideLoading() uni.hideLoading();
} else { } else {
uni.showToast({ uni.showToast({
title: '最多只能上传4张', title: "最多只能上传4张",
icon: 'none', icon: "none",
}) });
} }
}, },
handleClickIDcard(e) { handleClickIDcard(e) {
this.info.idCard = e this.info.idCard = e;
if (this.info.idCard.length == 15 || this.info.idCard.length == 18) { console.log("eeeeee", this.info.idCard);
let info = this.G.getInfoByIDcard(this.info.idCard)
this.info.age = info.age
this.info.sex = info.sex ? (info.sex == '男' ? 1 : 2) : ''
this.$forceUpdate()
}
// console.log(this.G.getInfoByIDcard(this.info.idCard));
},
handleClickAddress(e) {
this.info.address = e
},
goReturn() {
uni.navigateBack()
},
handleSubmit() {
let that = this
console.log('that.info.imgs', that.info.imgs)
console.log('that.imgList', that.imgList)
if (!that.info.name) { // console.log(this.G.getInfoByIDcard(this.info.idCard));
uni.showToast({ },
icon: 'none', handleClickAddress(e) {
title: '请输入姓名', this.info.address = e;
}) },
return false goReturn() {
} uni.navigateBack();
if (!that.info.tel && !that.info.idCard) { },
uni.showToast({ handleSubmit() {
icon: 'none', let that = this;
title: '请至少输入手机号或者身份证号', console.log("that.info.imgs", that.info.imgs);
}) console.log("that.imgList", that.imgList);
return false
}
if (that.info.tel && !that.G.setReg(that.info.tel, 'tel')) {
uni.showToast({
icon: 'none',
title: '请输入正确的手机号',
})
return false
}
if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) {
uni.showToast({
icon: 'none',
title: '请输入正确的身份证号',
})
return false
}
console.log(that.info) if (!that.info.name) {
if (that.imgList.length > 0) { uni.showToast({
that.info.imgs = that.imgList icon: "none",
} title: "请输入姓名",
console.log('that.info.imgs', that.info.imgs) });
uni.$emit('getTownsman', { info: that.info }) return false;
uni.navigateBack() }
}, if (!that.info.tel && !that.info.idCard) {
handleClickInfo() { uni.showToast({
let that = this icon: "none",
that.G.uploadImg((res) => { title: "请至少输入手机号或者身份证号",
console.log('res', res) });
that.info.name = res.info.name || '' return false;
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : '' }
that.info.age = res.info.age || '' if (that.info.tel && !that.G.setReg(that.info.tel, "tel")) {
that.info.nation = res.info.nationality || '' uni.showToast({
that.info.idCard = res.info.num || '' icon: "none",
that.info.idCardImageUrl = res.image || '' title: "请输入正确的手机号",
that.info.userName = res.info.name || '' });
that.info.address = res.info.address || '' return false;
that.nation.forEach((item, index) => { }
if (item == that.info.nation) { if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) {
that.nationIndex = index uni.showToast({
} icon: "none",
}) title: "请输入正确的身份证号",
that.$forceUpdate() });
}, 'idcard') return false;
}, }
},
} console.log(that.info);
if (that.imgList.length > 0) {
that.info.imgs = that.imgList;
}
console.log("that.info.imgs", that.info.imgs);
uni.$emit("getTownsman", { info: that.info });
uni.navigateBack();
},
handleClickInfo() {
let that = this;
that.G.uploadImg((res) => {
console.log("res", res);
that.info.name = res.info.name || "";
that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
that.info.age = res.info.age || "";
that.info.nation = res.info.nationality || "";
that.info.idCard = res.info.num || "";
that.info.idCardImageUrl = res.image || "";
that.info.userName = res.info.name || "";
that.info.address = res.info.address || "";
that.nation.forEach((item, index) => {
if (item == that.info.nation) {
that.nationIndex = index;
}
});
that.$forceUpdate();
}, "idcard");
},
},
};
</script> </script>
<style> <style>
.img-close { .img-close {
position: absolute; position: absolute;
width: 18px; width: 18px;
height: 18px; height: 18px;
right: -6px; right: -6px;
top: -6px; top: -6px;
z-index: 99; z-index: 99;
background-color: #666; background-color: #666;
color: #fff; color: #fff;
font-size: 8px; font-size: 8px;
text-align: center; text-align: center;
line-height: 18px; line-height: 18px;
border-radius: 50%; border-radius: 50%;
} }
</style> </style>

@ -1,6 +1,6 @@
<template> <template>
<view class="p-root-home-quick g_w_all g_bg_f_5 g_kuaishou"> <view class="p-root-home-quick g_w_all g_bg_f_5 g_kuaishou">
<AiApply class="" @outputInfo="getTownsManInfo" /> <AiApply class="" @outputInfo="getTownsManInfo" ref="AiApplyRef" />
<view class=""> <view class="">
<view class="card-tip g_pt_12 g_pb_8 g_pl_20 g_c_6">工友信息</view> <view class="card-tip g_pt_12 g_pb_8 g_pl_20 g_c_6">工友信息</view>
@ -109,8 +109,14 @@ export default {
onReady() { onReady() {
this.G.setNavStyle(); this.G.setNavStyle();
let that = this; let that = this;
uni.$on("getTownsman", function (data) { uni.$on("getTownsman", (data) => {
console.log("getTownsman", data); console.log("getTownsman", data);
//
if (data.info.idCard && (data.info.idCard.length == 15 || data.info.idCard.length == 18)) {
let infoByIDcard = this.G.getInfoByIDcard(data.info.idCard);
data.info.age = infoByIDcard.age;
}
if (that.persenInfo.length == 0) { if (that.persenInfo.length == 0) {
that.persenInfo[0] = { that.persenInfo[0] = {
...data.info, ...data.info,
@ -459,11 +465,7 @@ export default {
handleClickMobile() {}, handleClickMobile() {},
submitForm() { submitForm() {
let that = this; let that = this;
uni.navigateTo({
url: "/root/home/applicationSuccess?jobId=" + that.updateInfo.jobId,
});
return
if (!that.agreeRadio) { if (!that.agreeRadio) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
@ -543,6 +545,7 @@ export default {
}); });
// that.persenInfo = []; // that.persenInfo = [];
that.btnLoading = false; that.btnLoading = false;
that.$refs.AiApplyRef.ressetAitext();
// that.$forceUpdate(); // that.$forceUpdate();
setTimeout(() => { setTimeout(() => {
@ -585,6 +588,7 @@ export default {
}); });
// that.persenInfo = []; // that.persenInfo = [];
that.$refs.AiApplyRef.ressetAitext();
// that.$forceUpdate(); // that.$forceUpdate();
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({

@ -110,13 +110,13 @@ export default {
applyAdd() { applyAdd() {
let that = this; let that = this;
if (!this.agencyInfo.fullName) { // if (!this.agencyInfo.fullName) {
uni.showToast({ // uni.showToast({
title: "请输入企业简称", // title: "",
icon: "none", // icon: "none",
}); // });
return; // return;
} // }
if (this.ing) { if (this.ing) {
return; return;
} }

@ -9,18 +9,18 @@
<div class="g_mt_8 g_fs_14 g_c_main" style="text-decoration: underline" @click="goHome('/pages/home/index')"></div> <div class="g_mt_8 g_fs_14 g_c_main" style="text-decoration: underline" @click="goHome('/pages/home/index')"></div>
</div> </div>
<div class="r_box g_text_c g_h_56 g_mt_10 g_flex_row_between flex_center g_fs_16 g_pl_10 g_pr_10"> <div class="r_box g_text_c g_h_56 g_mt_10 g_flex_row_between flex_center g_fs_16 g_pl_10 g_pr_10">
<div class="g_fw_600">我的团队</div> <div class="g_fw_600">我的公司</div>
<div class="g_c_9">{{ agencyInfo.fullName || agencyInfo.userName }}{{ agencyNum > 0 ? `${agencyNum}人)` : "" }}</div> <div class="g_c_9">{{ agencyInfo.fullName || agencyInfo.userName }}{{ agencyNum > 0 ? `${agencyNum}人)` : "" }}</div>
</div> </div>
<div class="r_box g_pl_10 g_pr_10 g_mt_10 g_pb_40"> <div class="r_box g_pl_10 g_pr_10 g_mt_10 g_pb_40">
<div class="g_text_c g_fs_18 g_fw_600 g_pt_12 g_pb_12" style="border-bottom: 1rpx dotted #eee">添加团队成员</div> <div class="g_text_c g_fs_18 g_fw_600 g_pt_12 g_pb_12" style="border-bottom: 1rpx dotted #eee">添加公司成员</div>
<div class="g_pt_12 g_c_3 g_fs_14"> <div class="g_pt_12 g_c_3 g_fs_14">
<p class="g_mb_10 g_fw_600">为什么要添加成员到团队?</p> <p class="g_mb_10 g_fw_600">为什么要添加成员到公司?</p>
<div class="g_pl_20 g_c_6"> <div class="g_pl_20 g_c_6">
<p>1.发单号是以团队为单位进行发单和关注的</p> <p>1.发单号是以公司为单位进行发单和关注的</p>
<p>2.创建人关注发单号后内部成员均可报名</p> <p>2.创建人关注发单号后内部成员均可报名</p>
<p>3.团队成员无需再次关注共享报名权限</p> <p>3.公司成员无需再次关注共享报名权限</p>
<p>4.系统自动完成团队内部数据汇总与统计</p> <p>4.系统自动完成公司内部数据汇总与统计</p>
</div> </div>
</div> </div>
<div class="g_mt_40 g_flex_row_center"> <div class="g_mt_40 g_flex_row_center">
@ -51,7 +51,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
console.log(options); console.log(options);
this.getNum(); // this.getNum();
}, },
created() {}, created() {},

@ -15,7 +15,7 @@
@clickItem="handleClickItem" @clickItem="handleClickItem"
/> />
</view> </view>
<view class="g_pl_10 g_pr_10 g_pb_16" v-if="isCreator"> <!-- <view class="g_pl_10 g_pr_10 g_pb_16" v-if="isCreator">
<view class="g_bg_f g_pl_20 g_pr_20 g_radius_8"> <view class="g_bg_f g_pl_20 g_pr_20 g_radius_8">
<view class="g_flex_row_between g_h_56"> <view class="g_flex_row_between g_h_56">
<view class="g_flex_column_center g_fs_16 g_c_3">关注邀请</view> <view class="g_flex_column_center g_fs_16 g_c_3">关注邀请</view>
@ -25,7 +25,7 @@
</view> </view>
</view> </view>
<view class="g_fs_14 g_mt_8 g_pl_20 g_c_9"> 关闭后首页收到的发单号邀请不再主动弹出 </view> <view class="g_fs_14 g_mt_8 g_pl_20 g_c_9"> 关闭后首页收到的发单号邀请不再主动弹出 </view>
</view> </view> -->
<g-panel-form-item <g-panel-form-item
:list="[ :list="[
{ {

@ -528,6 +528,9 @@ $max-font-size: 28;
font-size: 12px; font-size: 12px;
zoom: 0.95; zoom: 0.95;
} }
.g_fs_36 {
font-size: 36px;
}
// //
$min-size: 0; $min-size: 0;
$max-size: 200; $max-size: 200;

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4374774 */ font-family: "iconfont"; /* Project id 4374774 */
src: url('//at.alicdn.com/t/c/font_4374774_y7g55uwl0s.woff2?t=1756693701292') format('woff2'), src: url('//at.alicdn.com/t/c/font_4374774_2935rh1xxue.woff2?t=1763019619317') format('woff2'),
url('//at.alicdn.com/t/c/font_4374774_y7g55uwl0s.woff?t=1756693701292') format('woff'), url('//at.alicdn.com/t/c/font_4374774_2935rh1xxue.woff?t=1763019619317') format('woff'),
url('//at.alicdn.com/t/c/font_4374774_y7g55uwl0s.ttf?t=1756693701292') format('truetype'); url('//at.alicdn.com/t/c/font_4374774_2935rh1xxue.ttf?t=1763019619317') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,62 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-kuaisubaoming:before {
content: "\e67f";
}
.icon-filedone:before {
content: "\e7b4";
}
.icon-file-exception:before {
content: "\e7b5";
}
.icon-filesync:before {
content: "\e7b6";
}
.icon-filesearch:before {
content: "\e7b9";
}
.icon-fileprotect:before {
content: "\e7bb";
}
.icon-file-text:before {
content: "\e7bc";
}
.icon-audit:before {
content: "\e7bf";
}
.icon-antdesign:before {
content: "\e879";
}
.icon-shujudaping:before {
content: "\e616";
}
.icon-shujudaping1:before {
content: "\e644";
}
.icon-shujutongji:before {
content: "\e62f";
}
.icon-chengyuanjituanduiguanli:before {
content: "\e6c5";
}
.icon-wokanguodemingpian:before {
content: "\e6d2";
}
.icon-detail:before { .icon-detail:before {
content: "\e793"; content: "\e793";
} }

@ -66,6 +66,7 @@ export default {
imgradius: { imgradius: {
default: "0", default: "0",
}, },
// ()
imgType: { imgType: {
default: "", default: "",
}, },
@ -291,9 +292,9 @@ export default {
@import "../../iconfont.css"; @import "../../iconfont.css";
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4374774 */ font-family: "iconfont"; /* Project id 4374774 */
src: url('//at.alicdn.com/t/c/font_4374774_pm01bomgppe.woff2?t=1755661995542') format('woff2'), src: url('//at.alicdn.com/t/c/font_4374774_2935rh1xxue.woff2?t=1763019619317') format('woff2'),
url('//at.alicdn.com/t/c/font_4374774_pm01bomgppe.woff?t=1755661995542') format('woff'), url('//at.alicdn.com/t/c/font_4374774_2935rh1xxue.woff?t=1763019619317') format('woff'),
url('//at.alicdn.com/t/c/font_4374774_pm01bomgppe.ttf?t=1755661995542') format('truetype'); url('//at.alicdn.com/t/c/font_4374774_2935rh1xxue.ttf?t=1763019619317') format('truetype');
} }
.iconfont { .iconfont {
@ -303,25 +304,9 @@ export default {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
// .icon-kuaisubaoming:before {
.icon-home:before { font-size: 36px;
content: "\e7e1"; content: "\e67f";
}
//
.icon-order_active:before {
content: "\e617";
}
//
.icon-message:before {
content: "\e78a";
}
//
.icon-user:before {
content: "\e7ae";
}
//
.icon-fadanhao-32:before {
content: "\e67d";
} }
.u-icon { .u-icon {
display: inline-flex; display: inline-flex;

@ -6,7 +6,7 @@
position: 'absolute', position: 'absolute',
left: left + 'px', left: left + 'px',
top: top + 'px', top: top + 'px',
zIndex: 9998, zIndex: 99,
overflow: 'hidden' overflow: 'hidden'
}" }"
@touchmove.stop.prevent> @touchmove.stop.prevent>

@ -1197,10 +1197,16 @@ let data = {
getInfoByIDcard (idCard) { getInfoByIDcard (idCard) {
let info = {} let info = {}
let birthday let birthday
if (idCard.length !== 15 && idCard.length !== 18) {
return {
sex: '',
age: '',
}
}
// 获取性别 // 获取性别
if (idCard.length === 15) { if (idCard.length === 15) {
info.sex = ['女', '男'][idCard.substr(14, 1) % 2] info.sex = ['女', '男'][idCard.substr(14, 1) % 2]
birthday = Y + [idCard.substr(6, 2), idCard.substr(8, 2), idCard.substr(10, 2)].join('-') birthday = [idCard.substr(6, 2), idCard.substr(8, 2), idCard.substr(10, 2)].join('-')
} else if (idCard.length === 18) { } else if (idCard.length === 18) {
info.sex = ['女', '男'][idCard.substr(16, 1) % 2] info.sex = ['女', '男'][idCard.substr(16, 1) % 2]
birthday = [idCard.substr(6, 4), idCard.substr(10, 2), idCard.substr(12, 2)].join('-') birthday = [idCard.substr(6, 4), idCard.substr(10, 2), idCard.substr(12, 2)].join('-')

Loading…
Cancel
Save