app
wangxia 5 months ago
parent 96783558ba
commit 14746af404

@ -1,348 +1,348 @@
<script lang="ts"> <script lang="ts">
import RootStore from "@xkit-yx/im-store-v2"; import RootStore from '@xkit-yx/im-store-v2'
import V2NIM, { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK"; import V2NIM, { V2NIMConst } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK'
import { getMsgContentTipByType } from "./pages/NEUIKit/utils/msg"; import { getMsgContentTipByType } from './pages/NEUIKit/utils/msg'
import { STORAGE_KEY } from "./pages/NEUIKit/utils/constants"; import { STORAGE_KEY } from './pages/NEUIKit/utils/constants'
import { isWxApp } from "./pages/NEUIKit/utils"; import { isWxApp } from './pages/NEUIKit/utils'
import { V2NIMMessage, V2NIMMessagePushConfig } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService"; import { V2NIMMessage, V2NIMMessagePushConfig } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService'
import { unix } from "dayjs"; import { unix } from 'dayjs'
export default { export default {
globalData: { globalData: {
timer: null, // timer: null, //
themeColor: "#00b666", themeColor: '#00b666',
themeBackgroundColor: "#00b66621", themeBackgroundColor: '#00b66621',
}, },
onShow: function (options) { onShow: function (options) {
let that = this; let that = this
console.log("show 项目init", options, decodeURIComponent(options.query.scene)); console.log('show 项目init', options, decodeURIComponent(options.query.scene))
// id // id
uni.removeStorageSync("scene"); uni.removeStorageSync('scene')
uni.removeStorageSync("user_scene"); uni.removeStorageSync('user_scene')
uni.removeStorageSync("user_options", options); uni.removeStorageSync('user_options', options)
if (options.query.id) { if (options.query.id) {
uni.setStorageSync("apply-jobdetail-id", options.query.id); uni.setStorageSync('apply-jobdetail-id', options.query.id)
} else { } else {
uni.setStorageSync("apply-jobdetail-id", 0); uni.setStorageSync('apply-jobdetail-id', 0)
} }
if (options.query.scene) { if (options.query.scene) {
let str = decodeURIComponent(options.query.scene); let str = decodeURIComponent(options.query.scene)
uni.setStorageSync( uni.setStorageSync(
"apply-invite-code", 'apply-invite-code',
JSON.stringify({ JSON.stringify({
key: str.split("=")[0], key: str.split('=')[0],
value: str.split("=")[1], value: str.split('=')[1],
}) })
); )
} else { } else {
uni.setStorageSync("apply-invite-code", ""); uni.setStorageSync('apply-invite-code', '')
} }
if (uni.getStorageSync("apply-token")) { if (uni.getStorageSync('apply-token')) {
this.G.checkToken(); this.G.checkToken()
} }
if (!that.globalData.timer) { if (!that.globalData.timer) {
if (uni.getStorageSync("apply-token")) { if (uni.getStorageSync('apply-token')) {
that.checkNum(); that.checkNum()
} }
that.globalData.timer = setInterval(() => { that.globalData.timer = setInterval(() => {
console.log("inner++++++++++++++++++++ +++++++++++++++++++++++++++"); console.log('inner++++++++++++++++++++ +++++++++++++++++++++++++++')
if (uni.getStorageSync("apply-token")) { if (uni.getStorageSync('apply-token')) {
that.checkNum(); that.checkNum()
} }
}, 1 * 30 * 1000); }, 1 * 30 * 1000)
} }
uni.$on("isGlogin", function (data) { uni.$on('isGlogin', function (data) {
console.log("app.vue 接收", data); console.log('app.vue 接收', data)
if (uni.getStorageSync("apply-uid")) { if (uni.getStorageSync('apply-uid')) {
that.initWyyx(); that.initWyyx()
} }
}); })
if (uni.getStorageSync("apply-token")) { if (uni.getStorageSync('apply-token')) {
console.log("app.vue 是否调用"); console.log('app.vue 是否调用')
that.initWyyx(); that.initWyyx()
} }
}, },
onHide: function () {}, onHide: function () {},
methods: { methods: {
initWyyx() { initWyyx() {
let that = this; let that = this
that.F.wyyxPost( that.F.wyyxPost(
that.api.wyyx_getConfig, that.api.wyyx_getConfig,
{ {
userId: uni.getStorageSync("apply-uid"), userId: uni.getStorageSync('apply-uid'),
}, },
(res) => { (res) => {
console.log("wyyx_getConfig", res); console.log('wyyx_getConfig', res)
let resData = { let resData = {
appkey: res.appKey, appkey: res.appKey,
accid: res.accid, accid: res.accid,
token: res.token, token: res.token,
}; }
const imOptions = { const imOptions = {
appkey: resData.appkey, // appkey appkey: resData.appkey, // appkey
account: resData.accid, // account account: resData.accid, // account
token: resData.token, // token token: resData.token, // token
// appkey: "7e19d679085266aa872a8de12f0c1ae5", // appkey // appkey: "7e19d679085266aa872a8de12f0c1ae5", // appkey
// account: "9", // account // account: "9", // account
// token: "2d4ca36cca6293cf3a81d6ca1b8026f7", // token // token: "2d4ca36cca6293cf3a81d6ca1b8026f7", // token
}; }
if (imOptions) { if (imOptions) {
this.initNim(imOptions); this.initNim(imOptions)
} else { } else {
// , // ,
} }
} }
); )
}, },
async initNim(opts) { async initNim(opts) {
let that = this; let that = this
// nim sdk // nim sdk
const nim = (uni.$UIKitNIM = V2NIM.getInstance( const nim = (uni.$UIKitNIM = V2NIM.getInstance(
{ {
appkey: opts.appkey, appkey: opts.appkey,
needReconnect: true, needReconnect: true,
// "reconnectionAttempts": 5, // "reconnectionAttempts": 5,
debugLevel: "debug", debugLevel: 'debug',
apiVersion: "v2", apiVersion: 'v2',
enableV2CloudConversation: true, enableV2CloudConversation: true,
}, },
{ {
V2NIMLoginServiceConfig: { V2NIMLoginServiceConfig: {
lbsUrls: isWxApp ? ["https://lbs.netease.im/lbs/wxwebconf.jsp"] : ["https://lbs.netease.im/lbs/webconf.jsp"], lbsUrls: isWxApp ? ['https://lbs.netease.im/lbs/wxwebconf.jsp'] : ['https://lbs.netease.im/lbs/webconf.jsp'],
linkUrl: isWxApp ? "wlnimsc0.netease.im" : "weblink.netease.im", linkUrl: isWxApp ? 'wlnimsc0.netease.im' : 'weblink.netease.im',
/** /**
* 使用固定设备 ID * 使用固定设备 ID
*/ */
isFixedDeviceId: true, isFixedDeviceId: true,
}, },
} }
)); ))
that.globalData.nim = nim; that.globalData.nim = nim
// store // store
const store = (uni.$UIKitStore = new RootStore( const store = (uni.$UIKitStore = new RootStore(
nim, nim,
{ {
addFriendNeedVerify: false, addFriendNeedVerify: false,
// p2p p2p false // p2p p2p false
p2pMsgReceiptVisible: true, p2pMsgReceiptVisible: true,
// false // false
teamMsgReceiptVisible: true, teamMsgReceiptVisible: true,
teamAgreeMode: V2NIMConst.V2NIMTeamAgreeMode.V2NIM_TEAM_AGREE_MODE_NO_AUTH, teamAgreeMode: V2NIMConst.V2NIMTeamAgreeMode.V2NIM_TEAM_AGREE_MODE_NO_AUTH,
sendMsgBefore: async (options: { msg: V2NIMMessage; conversationId: string; serverExtension?: Record<string, unknown> }) => { sendMsgBefore: async (options: { msg: V2NIMMessage; conversationId: string; serverExtension?: Record<string, unknown> }) => {
const pushContent = getMsgContentTipByType({ const pushContent = getMsgContentTipByType({
text: options.msg.text, text: options.msg.text,
messageType: options.msg.messageType, messageType: options.msg.messageType,
}); })
const yxAitMsg = options.serverExtension ? options.serverExtension.yxAitMsg : { forcePushIDsList: "[]", needForcePush: false }; const yxAitMsg = options.serverExtension ? options.serverExtension.yxAitMsg : { forcePushIDsList: '[]', needForcePush: false }
// at 线 // at 线
const { forcePushIDsList, needForcePush } = yxAitMsg const { forcePushIDsList, needForcePush } = yxAitMsg
? // @ts-ignore ? // @ts-ignore
store.msgStore._formatExtAitToPushInfo(yxAitMsg, options.msg.text) store.msgStore._formatExtAitToPushInfo(yxAitMsg, options.msg.text)
: { forcePushIDsList: "[]", needForcePush: false }; : { forcePushIDsList: '[]', needForcePush: false }
console.log("forcePushIDsList: ", forcePushIDsList); console.log('forcePushIDsList: ', forcePushIDsList)
const { conversationId } = options; const { conversationId } = options
const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId); const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId)
const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId); const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId)
const pushPayload = JSON.stringify({ const pushPayload = JSON.stringify({
// oppo // oppo
oppoField: { oppoField: {
click_action_type: 4, // oppo click_action_type: 4, // oppo
click_action_activity: "", // TODO click_action_activity: '', // TODO
action_parameters: { action_parameters: {
sessionId: targetId, sessionId: targetId,
sessionType: conversationType, sessionType: conversationType,
}, // }, //
}, },
// vivo // vivo
vivoField: { vivoField: {
pushMode: 0, //0 1 0 pushMode: 0, //0 1 0
}, },
// huawei // huawei
hwField: { hwField: {
click_action: { click_action: {
type: 1, type: 1,
action: "", // TODO action: '', // TODO
}, },
androidConfig: { androidConfig: {
category: "IM", category: 'IM',
data: JSON.stringify({ data: JSON.stringify({
sessionId: targetId, sessionId: targetId,
sessionType: conversationType, sessionType: conversationType,
}), }),
}, },
}, },
// //
sessionId: targetId, sessionId: targetId,
sessionType: conversationType, sessionType: conversationType,
}); })
const pushConfig: V2NIMMessagePushConfig = { const pushConfig: V2NIMMessagePushConfig = {
pushEnabled: true, pushEnabled: true,
pushNickEnabled: true, pushNickEnabled: true,
forcePush: needForcePush, forcePush: needForcePush,
forcePushContent: pushContent, forcePushContent: pushContent,
forcePushAccountIds: forcePushIDsList, forcePushAccountIds: forcePushIDsList,
pushPayload: "{}", pushPayload: '{}',
pushContent, pushContent,
}; }
return { ...options, pushConfig }; return { ...options, pushConfig }
}, },
}, },
"UniApp" 'UniApp'
)); ))
// #ifdef APP-PLUS // #ifdef APP-PLUS
const nimPushPlugin = uni.requireNativePlugin("NIMUniPlugin-PluginModule"); const nimPushPlugin = uni.requireNativePlugin('NIMUniPlugin-PluginModule')
nim.V2NIMSettingService.setOfflinePushConfig(nimPushPlugin, { nim.V2NIMSettingService.setOfflinePushConfig(nimPushPlugin, {
miPush: { miPush: {
appId: "2882303761520397320", appId: '2882303761520397320',
appKey: "5102039734320", appKey: '5102039734320',
certificateName: "xiaomiCertificateName", certificateName: 'xiaomiCertificateName',
}, },
vivoPush: { vivoPush: {
certificateName: "vivoCertificateName", certificateName: 'vivoCertificateName',
}, },
oppoPush: { oppoPush: {
appId: "32967155", appId: '32967155',
appKey: "b98618cb272944dea324af6421d42a79", appKey: 'b98618cb272944dea324af6421d42a79',
secret: "0b7ce705a2304a17b78f20011c18890c", secret: '0b7ce705a2304a17b78f20011c18890c',
certificateName: "opopCertificateName", certificateName: 'opopCertificateName',
}, },
honorPush: { honorPush: {
certificateName: "rongyaoCertificateName", certificateName: 'rongyaoCertificateName',
}, },
apns: { apns: {
// certificateName: 'AuthKey_98P8URRXUD_test', //: // certificateName: 'AuthKey_98P8URRXUD_test', //:
certificateName: "AuthKey_98P8URRXUD", // certificateName: 'AuthKey_98P8URRXUD', //
}, },
}); })
console.log("是否执行 推送"); console.log('是否执行 推送')
// #endif // #endif
nim.V2NIMLoginService.login(opts.account, opts.token).then(() => {}); nim.V2NIMLoginService.login(opts.account, opts.token).then(() => {})
nim.V2NIMConversationService.on("onConversationChanged", function (conversationList: V2NIMConversation[]) { nim.V2NIMConversationService.on('onConversationChanged', function (conversationList: V2NIMConversation[]) {
console.log("初始化监听会话:", conversationList); console.log('初始化监听会话:', conversationList)
let _bool = conversationList.filter((item) => { let _bool = conversationList.filter((item) => {
return Number(item.unreadCount) > 0; return Number(item.unreadCount) > 0
}); })
console.log("初始化监听会话bool:", _bool); console.log('初始化监听会话bool:', _bool)
if (_bool && _bool.length > 0) { if (_bool && _bool.length > 0) {
that.playAudio(); // that.playAudio() //
} }
}); })
}, },
playAudio() { playAudio() {
let that = this; let that = this
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext()
innerAudioContext.autoplay = true; innerAudioContext.autoplay = true
innerAudioContext.src = "https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/tip.mp3"; innerAudioContext.src = 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/tip.mp3'
innerAudioContext.onPlay(() => { innerAudioContext.onPlay(() => {
console.log("开始播放"); console.log('开始播放')
}); })
uni.vibrateShort(); uni.vibrateShort()
innerAudioContext.onError((res) => { innerAudioContext.onError((res) => {
console.log(res.errMsg); console.log(res.errMsg)
console.log(res.errCode); console.log(res.errCode)
}); })
}, },
checkNum() { checkNum() {
let that = this; let that = this
if (uni.getStorageSync("apply-token")) { if (uni.getStorageSync('apply-token')) {
that.G.Get(that.api.bind_getApplyNum, {}, (res) => { that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
console.log("获取待处理数量:", res); console.log('获取待处理数量:', res)
if (res.approvePassHasNotRed > 0) { if (res.approvePassHasNotRed > 0) {
uni.setTabBarBadge({ uni.setTabBarBadge({
index: 3, index: 2,
text: String(res.approvePassHasNotRed), text: String(res.approvePassHasNotRed),
}); })
} else { } else {
uni.removeTabBarBadge({ uni.removeTabBarBadge({
index: 3, index: 2,
}); })
} }
}); })
} }
}, },
}, },
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./static/css/iconfont.css"; @import './static/css/iconfont.css';
@import "./uni_modules/vk-uview-ui/index.scss"; @import './uni_modules/vk-uview-ui/index.scss';
@import "./static/css/base.scss"; @import './static/css/base.scss';
@import "./static/font/iconfont-weapp-icon.css"; @import './static/font/iconfont-weapp-icon.css';
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
page { page {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
} }
// #endif // #endif
// #ifdef H5 || APP-PLUS || MP-TOUTIAO || MP-KUAISHOU // #ifdef H5 || APP-PLUS || MP-TOUTIAO || MP-KUAISHOU
page { page {
width: 100vw; width: 100vw;
height: calc(100% - 0px); height: calc(100% - 0px);
--color-ysd: #ff4400; --color-ysd: #ff4400;
--color-hover: #ff4400cc; --color-hover: #ff4400cc;
--color-be: #ff4400; --color-be: #ff4400;
--color-027: #ff4400; --color-027: #ff4400;
--color-href: #576b95; --color-href: #576b95;
} }
// #endif // #endif
// uview // uview
.u-badge-mini { .u-badge-mini {
top: 22rpx !important; top: 22rpx !important;
right: 102rpx !important; right: 102rpx !important;
color: transparent !important; color: transparent !important;
width: 10px !important; width: 10px !important;
height: 10px !important; height: 10px !important;
border-radius: 50% !important; border-radius: 50% !important;
} }
.u-radio { .u-radio {
&:last-child { &:last-child {
.u-radio__label { .u-radio__label {
margin-right: 0; margin-right: 0;
} }
} }
} }
.g-apply-tab { .g-apply-tab {
.u-tab-bar { .u-tab-bar {
bottom: -2px !important; bottom: -2px !important;
} }
} }
.g_bg_f_5{ .g_bg_f_5 {
background-color: #ededed !important; background-color: #ededed !important;
} }
.g_mt_30{ .g_mt_30 {
margin-top: 30px; margin-top: 30px;
} }
.g_mt_84{ .g_mt_84 {
margin-top: 84px; margin-top: 84px;
} }
.g_pt_90{ .g_pt_90 {
padding-top: 90px; padding-top: 90px;
} }
</style> </style>

@ -756,13 +756,13 @@ export default {
console.log("获取待处理数量:", res); console.log("获取待处理数量:", res);
if (res.approvePassHasNotRed > 0) { if (res.approvePassHasNotRed > 0) {
uni.setTabBarBadge({ uni.setTabBarBadge({
index: 3, index: 2,
text: String(res.approvePassHasNotRed), text: String(res.approvePassHasNotRed),
}); });
that.readed = false; that.readed = false;
} else { } else {
uni.removeTabBarBadge({ uni.removeTabBarBadge({
index: 3, index: 2,
}); });
that.readed = true; that.readed = true;
} }

@ -1,28 +1,21 @@
<template> <template>
<view class="p-root-detail-fellow g_w_all g_h_all g_bg_f_5 g_kuaishou"> <view class="p-root-detail-fellow g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view v-if="speed == 0"> <view v-if="speed == 0">
<g-loading /> <g-loading />
</view> </view>
<view v-if="speed == 1"> <view v-if="speed == 1">
<view class="g_h_10"></view> <view class="g_h_10"></view>
<view class="m-photo"> <view class="m-photo">
<g-panel-card-info <g-panel-card-info :info="{
:info="{
avatar: cdnBaseImg + 'mock_photo.svg', avatar: cdnBaseImg + 'mock_photo.svg',
title: '拍照或相册上传', title: '拍照或相册上传',
num: '系统智能识别并自动填写', num: '系统智能识别并自动填写',
titleFS: 16, titleFS: 16,
imgSize: 72, imgSize: 72,
}" }" radius="0" rightType="image" :rightImage="info.idCardImageUrl" @clickCard="handleClickInfo" />
radius="0" </view>
rightType="image" <view class="g_h_10"></view>
:rightImage="info.idCardImageUrl" <g-panel-form-slot :list="[
@clickCard="handleClickInfo"
/>
</view>
<view class="g_h_10"></view>
<g-panel-form-slot
:list="[
{ {
icon: '', icon: '',
label: '联系电话', label: '联系电话',
@ -32,30 +25,30 @@
type: 'slot', type: 'slot',
pColumn: 12, pColumn: 12,
}, },
]" ]">
> <slot>
<slot> <!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU --> <u-input type="number" :clearable="false" :password-icon="false" placeholder="请输入联系电话" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#cccccc;font-size:32rpx;line-height:1" v-model="info.tel" style="width: calc(100vw - (122px);flex: none;" />
<u-input type="number" :clearable="false" :password-icon="false" placeholder="请输入联系电话" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#cccccc;font-size:32rpx;line-height:1" v-model="info.tel" style="width: calc(100vw - (122px);flex: none;" /> <!-- #endif -->
<!-- #endif --> <!-- #ifdef MP-WEIXIN -->
<!-- #ifdef MP-WEIXIN --> <u-input type="number" :clearable="false" :password-icon="false" placeholder="请输入联系电话" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#cccccc;font-size:32rpx;line-height:1" v-model="info.tel" />
<u-input type="number" :clearable="false" :password-icon="false" placeholder="请输入联系电话" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#cccccc;font-size:32rpx;line-height:1" v-model="info.tel" /> <!-- #endif -->
<!-- #endif --> </slot>
</slot> </g-panel-form-slot>
</g-panel-form-slot> <view class="g_h_10"></view>
<view class="g_h_10"></view> <g-panel-form-slot
<g-panel-form-slot :list="[
:list="[ {
{
icon: '', icon: '',
label: '姓名', label: '姓名',
result: '', result: '',
value: info.name, value: info.name,
path: '', path: '',
tip: 'slot-name', tip: 'slot-upID',
placeholder: '请输入姓名', img: info.idCardImageUrl,
placeholder: '手动输入或拍照自动识别 → ',
type: 'slot', type: 'slot',
pColumn: 12, pColumn: 8,
require: true, require: true,
}, },
{ {
@ -67,7 +60,7 @@
tip: 'slot-sex', tip: 'slot-sex',
type: 'slot', type: 'slot',
pColumn: 12, pColumn: 12,
require: true, require: false,
customRequire: true, customRequire: true,
}, },
{ {
@ -80,7 +73,7 @@
placeholder: '请输入年龄', placeholder: '请输入年龄',
type: 'slot', type: 'slot',
pColumn: 12, pColumn: 12,
require: true, require: false,
}, },
{ {
icon: '', icon: '',
@ -116,162 +109,168 @@
pColumn: 12, pColumn: 12,
}, },
]" ]"
@changeName="handleClickName" @changeName="handleClickName"
@changeSex="handleClickSex" @changeSex="handleClickSex"
@changeAge="handleClickAge" @changeAge="handleClickAge"
@changeNation="handleClickNation" @changeNation="handleClickNation"
@changeIDcard="handleClickIDcard" @changeIDcard="handleClickIDcard"
@changeAddress="handleClickAddress" @changeAddress="handleClickAddress"
> ></g-panel-form-slot>
</g-panel-form-slot> <g-panel-fixed>
<g-panel-fixed> <slot>
<slot> <view class="g_flex_row_center">
<view class="g_flex_row_center"> <g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button>
<g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button> <g-button btnText="确定" class @clickBtn="handleSubmit" size="small" type="primary"></g-button>
<g-button btnText="确定" class=" " @clickBtn="handleSubmit" size="small" type="primary"></g-button> </view>
</view> </slot>
</slot> </g-panel-fixed>
</g-panel-fixed> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
import { nationlist } from "../../utils/nation.js"; import { nationlist } from '../../utils/nation.js'
export default { export default {
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,
speed: 0, speed: 0,
info: {}, info: {},
nation: nationlist.map((item, index) => { nation: nationlist.map((item, index) => {
return item.name; return item.name
}), }),
nationIndex: 0, nationIndex: 0,
}; }
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this
this.info = options; if (options) {
console.log("获取老乡信息:", options); this.info = options
}, if (options.sex) {
onShow() { options.sex = Number(options.sex)
let that = this; } else {
that.nation.forEach((item, index) => { options.sex = 1
if (item == that.info.nation) { }
console.log(that.info.nation); that.nation.forEach((item, index) => {
console.log(index); if (item == that.info.nation) {
that.nationIndex = index; console.log(that.info.nation)
} console.log(index)
}); that.nationIndex = index
that.speed = 0; }
setTimeout(() => { })
that.speed = 1; that.speed = 0
}, 300); setTimeout(() => {
}, that.speed = 1
created() { }, 300)
let that = this; console.log('获取老乡信息:', options)
}, }
methods: { },
handleClickName(e) { onShow() {
this.info.name = this.info.userName = e; let that = this
}, },
handleClickSex(e) { created() {
this.info.sex = e; let that = this
}, },
handleClickAge(e) { methods: {
this.info.age = e; handleClickName(e) {
}, this.info.name = this.info.userName = e
handleClickNation(e) { },
let that = this; handleClickSex(e) {
console.log(e.name); this.info.sex = e
this.info.nation = e.name; },
that.nation.forEach((item, index) => { handleClickAge(e) {
if (item == e.name) { this.info.age = e
// console.log(that.info.nation) },
// console.log(index) handleClickNation(e) {
that.nationIndex = index; let that = this
} console.log(e.name)
}); this.info.nation = e.name
}, that.nation.forEach((item, index) => {
handleClickNation(e) { if (item == e.name) {
let that = this; // console.log(that.info.nation)
console.log(e.name); // console.log(index)
this.info.nation = e.name; that.nationIndex = index
that.nation.forEach((item, index) => { }
if (item == e.name) { })
// console.log(that.info.nation) },
// console.log(index) handleClickNation(e) {
that.nationIndex = index; let that = this
} console.log(e.name)
}); this.info.nation = e.name
}, that.nation.forEach((item, index) => {
handleClickIDcard(e) { if (item == e.name) {
this.info.idCard = e; // console.log(that.info.nation)
}, // console.log(index)
handleClickAddress(e) { that.nationIndex = index
this.info.address = e; }
}, })
goReturn() { },
uni.navigateBack(); handleClickIDcard(e) {
}, this.info.idCard = e
handleSubmit() { },
let that = this; handleClickAddress(e) {
if (!that.G.setReg(that.info.tel, "tel")) { this.info.address = e
uni.showToast({ },
icon: "none", goReturn() {
title: "请输入正确的手机号", uni.navigateBack()
}); },
return false; handleSubmit() {
} let that = this
if (!that.G.setReg(that.info.tel, 'tel')) {
uni.showToast({
icon: 'none',
title: '请输入正确的手机号',
})
return false
}
if (!that.G.setReg(that.info.idCard, "idcard")) { if (!that.G.setReg(that.info.idCard, 'idcard')) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: "请输入正确的身份证号", title: '请输入正确的身份证号',
}); })
return false; return false
} }
if (!that.info.nation) { if (!that.info.nation) {
that.info.nation = "汉族"; that.info.nation = '汉族'
} }
that.G.Post(that.api.order_submitFellow, that.info, (res) => { that.G.Post(that.api.order_submitFellow, that.info, (res) => {
uni.showToast({ uni.showToast({
icon: "success", icon: 'success',
title: "保存成功", title: '保存成功',
}); })
setTimeout(() => { setTimeout(() => {
that.goReturn(); that.goReturn()
}, 300); }, 300)
}); })
}, },
handleClickInfo() { handleClickInfo() {
let that = this; let that = this
that.G.uploadImg((res) => { that.G.uploadImg((res) => {
that.info.name = res.info.name; that.info.name = res.info.name
that.info.sex = res.info.sex; that.info.sex = res.info.sex
that.info.age = res.info.age; that.info.age = res.info.age
that.info.nation = res.info.nationality; that.info.nation = res.info.nationality
that.info.idCard = res.info.num; that.info.idCard = res.info.num
that.info.idCardImageUrl = res.image; that.info.idCardImageUrl = res.image
that.info.userName = res.info.name; that.info.userName = res.info.name
that.info.address = res.info.address; that.info.address = res.info.address
that.nation.forEach((item, index) => { that.nation.forEach((item, index) => {
if (item == that.info.nation) { if (item == that.info.nation) {
that.nationIndex = index; that.nationIndex = index
} }
}); })
}, "idcard"); }, 'idcard')
}, },
}, },
}; }
</script> </script>
<style></style> <style></style>

@ -50,12 +50,13 @@
<div v-else> <div v-else>
<div class="g_flex_row_center" v-if="beFllowAgencyInfo.recordStatus == 1"> <div class="g_flex_row_center" v-if="beFllowAgencyInfo.recordStatus == 1">
<!-- 已关注 1 --> <!-- 已关注 1 -->
<div style="width:calc((100vw - 50px) / 2);" class="g_mr_10"> <!-- class="g_mr_10" -->
<div style="width:calc(100vw - 40px);" >
<g-button btnText="已关注发单号" size="auto" type="disabled" class></g-button> <g-button btnText="已关注发单号" size="auto" type="disabled" class></g-button>
</div> </div>
<div style="width:calc((100vw - 50px) / 2);"> <!-- <div style="width:calc((100vw - 50px) / 2);">
<g-button btnText="联系客服" size="auto" type="disabled" class></g-button> <g-button btnText="联系客服" size="auto" type="disabled" class></g-button>
</div> </div> -->
</div> </div>
<div style="width: calc(100vw - 40px)" v-else-if="beFllowAgencyInfo.recordStatus == 2"> <div style="width: calc(100vw - 40px)" v-else-if="beFllowAgencyInfo.recordStatus == 2">
@ -76,7 +77,7 @@
</div> </div>
</view> </view>
<div class="g_bg_f g_pt_8"> <div class="g_bg_f g_pt_8">
<u-tabs bg-color="transparent" from="index" gutter="20" :list="tabInfo.list" :is-scroll="true" :current="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" :current="tabInfo.active" active-color="#000" bar-width="64" bar-height="6" @change="handleUpdateTab" font-size="32" duration="0.05" height="56"></u-tabs> -->
</div> </div>
<!-- 基本信息 --> <!-- 基本信息 -->

@ -172,11 +172,17 @@ export default {
options.sex = 1 options.sex = 1
} }
if (options.nation) { if (options.nation) {
options.nation = options.nation options.nation = options.nation.indexOf('族') > -1 ? options.nation : options.nation + '族'
} else { } else {
options.nation = '汉族' options.nation = '汉族'
} }
this.info = options this.info = options
//
that.nation.forEach((item, index) => {
if (item == that.info.nation) {
that.nationIndex = index
}
})
if (this.info.imgs) { if (this.info.imgs) {
this.imgList = this.info.imgs.split(',') this.imgList = this.info.imgs.split(',')
} }

@ -159,42 +159,7 @@ export default {
that.updateInfo.upAgencyId = options.agencyId; that.updateInfo.upAgencyId = options.agencyId;
} }
this.updateInfo.interviewTimeStr = ""; this.updateInfo.interviewTimeStr = "";
}, that.jobData = [
data() {
return {
IS_CREATOR: false,
jobType: 2,
cdnBaseImg: this.G.store().cdnBaseImg,
nation: nationlist.map((item, index) => {
return item.name;
}),
nationIndex: 0,
userTel: "",
info: {
name: "",
sex: "男",
age: "",
nation: "",
idCard: "",
address: "",
},
updateInfo: {
jobId: 0,
jobName: "请选择报名职位",
desp: "",
interviewTimeStr: "",
},
persenInfo: [],
agreeRadio: ["agree"],
jobData: [],
zhengceTextList: [],
btnLaoding:false
};
},
onShow() {
let that = this;
that.pageSpeed = -1;
that.jobData = [
{ {
icon: "", icon: "",
label: "报名职位", label: "报名职位",
@ -207,6 +172,18 @@ export default {
customRequire: true, customRequire: true,
pColumn: 12, pColumn: 12,
}, },
{
icon: "",
label: "面试地址",
result: "",
path: "/root/other/search?from=record",
placeholder: "请选择面试地址",
fontColor: that.updateInfo.jobName == "请选择面试地址" ? "g_c_9" : "g_c_3",
tip: "slot-choose&input-address",
require: false,
customRequire: true,
pColumn: 12,
},
{ {
icon: "", icon: "",
label: "预约面试时间", label: "预约面试时间",
@ -295,6 +272,43 @@ export default {
}); });
} }
}, 1); }, 1);
},
data() {
return {
IS_CREATOR: false,
jobType: 2,
cdnBaseImg: this.G.store().cdnBaseImg,
nation: nationlist.map((item, index) => {
return item.name;
}),
nationIndex: 0,
userTel: "",
info: {
name: "",
sex: "男",
age: "",
nation: "",
idCard: "",
address: "",
},
updateInfo: {
jobId: 0,
jobName: "请选择报名职位",
desp: "",
interviewTimeStr: "",
},
persenInfo: [],
agreeRadio: ["agree"],
jobData: [],
zhengceTextList: [],
btnLaoding:false
};
},
onShow() {
let that = this;
that.pageSpeed = -1;
}, },
methods: { methods: {
getTownsManInfo(info){ getTownsManInfo(info){
@ -445,12 +459,12 @@ export default {
return false; return false;
} }
if(that.btnLaoding){ if(that.btnLaoding){
return return false
} }
that.btnLaoding= true that.btnLaoding = true
let submitInfo = { let submitInfo = {
...that.updateInfo, ...that.updateInfo,
} }
submitInfo.applyUserJson = JSON.stringify( submitInfo.applyUserJson = JSON.stringify(
that.persenInfo.map((item) => { that.persenInfo.map((item) => {

Loading…
Cancel
Save