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) {
uni.setStorageSync('apply-jobdetail-id', options.query.id)
} else {
uni.setStorageSync('apply-jobdetail-id', 0)
}
if (options.query.scene) {
let str = decodeURIComponent(options.query.scene)
uni.setStorageSync(
'apply-invite-code',
JSON.stringify({
key: str.split('=')[0],
value: str.split('=')[1],
})
)
} else {
uni.setStorageSync('apply-invite-code', '')
}
if (uni.getStorageSync('apply-token')) {
this.G.checkToken()
}
if (!that.globalData.timer) {
if (uni.getStorageSync('apply-token')) {
that.checkNum()
}
that.globalData.timer = setInterval(() => {
console.log('inner++++++++++++++++++++ +++++++++++++++++++++++++++')
if (uni.getStorageSync('apply-token')) {
that.checkNum()
}
}, 1 * 30 * 1000)
}
uni.$on('isGlogin', function (data) {
console.log('app.vue 接收', data)
if (uni.getStorageSync('apply-uid')) {
that.initWyyx()
}
})
if (uni.getStorageSync('apply-token')) {
console.log('app.vue 是否调用')
that.initWyyx()
}
},
onHide: function () {},
methods: {
initWyyx() {
let that = this
that.F.wyyxPost(
that.api.wyyx_getConfig,
{
userId: uni.getStorageSync('apply-uid'),
},
(res) => {
console.log('wyyx_getConfig', res)
let resData = {
appkey: res.appKey,
accid: res.accid,
token: res.token,
}
const imOptions = {
appkey: resData.appkey, // appkey
account: resData.accid, // account
token: resData.token, // token
// appkey: "7e19d679085266aa872a8de12f0c1ae5", // appkey
// account: "9", // account
// token: "2d4ca36cca6293cf3a81d6ca1b8026f7", // token
}
if (imOptions) {
this.initNim(imOptions)
} else {
// ,
}
}
)
},
async initNim(opts) {
let that = this
// nim sdk
const nim = (uni.$UIKitNIM = V2NIM.getInstance(
{
appkey: opts.appkey,
needReconnect: true,
// "reconnectionAttempts": 5,
debugLevel: 'debug',
apiVersion: 'v2',
enableV2CloudConversation: true,
},
{
V2NIMLoginServiceConfig: {
lbsUrls: isWxApp ? ['https://lbs.netease.im/lbs/wxwebconf.jsp'] : ['https://lbs.netease.im/lbs/webconf.jsp'],
linkUrl: isWxApp ? 'wlnimsc0.netease.im' : 'weblink.netease.im',
/**
* 使用固定设备 ID
*/
isFixedDeviceId: true,
},
}
))
that.globalData.nim = nim
// store
const store = (uni.$UIKitStore = new RootStore(
nim,
{
addFriendNeedVerify: false,
// p2p p2p false
p2pMsgReceiptVisible: true,
// false
teamMsgReceiptVisible: true,
teamAgreeMode: V2NIMConst.V2NIMTeamAgreeMode.V2NIM_TEAM_AGREE_MODE_NO_AUTH,
sendMsgBefore: async (options: { msg: V2NIMMessage; conversationId: string; serverExtension?: Record<string, unknown> }) => {
const pushContent = getMsgContentTipByType({
text: options.msg.text,
messageType: options.msg.messageType,
})
const yxAitMsg = options.serverExtension ? options.serverExtension.yxAitMsg : { forcePushIDsList: '[]', needForcePush: false }
// at 线
const { forcePushIDsList, needForcePush } = yxAitMsg
? // @ts-ignore
store.msgStore._formatExtAitToPushInfo(yxAitMsg, options.msg.text)
: { forcePushIDsList: '[]', needForcePush: false }
console.log('forcePushIDsList: ', forcePushIDsList)
if (options.query.id) { const { conversationId } = options
uni.setStorageSync("apply-jobdetail-id", options.query.id); const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId)
} else { const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId)
uni.setStorageSync("apply-jobdetail-id", 0);
}
if (options.query.scene) { const pushPayload = JSON.stringify({
let str = decodeURIComponent(options.query.scene); // oppo
uni.setStorageSync( oppoField: {
"apply-invite-code", click_action_type: 4, // oppo
JSON.stringify({ click_action_activity: '', // TODO
key: str.split("=")[0], action_parameters: {
value: str.split("=")[1], sessionId: targetId,
}) sessionType: conversationType,
); }, //
} else { },
uni.setStorageSync("apply-invite-code", "");
} // vivo
if (uni.getStorageSync("apply-token")) { vivoField: {
this.G.checkToken(); pushMode: 0, //0 1 0
} },
if (!that.globalData.timer) {
if (uni.getStorageSync("apply-token")) { // huawei
that.checkNum(); hwField: {
} click_action: {
that.globalData.timer = setInterval(() => { type: 1,
console.log("inner++++++++++++++++++++ +++++++++++++++++++++++++++"); action: '', // TODO
if (uni.getStorageSync("apply-token")) { },
that.checkNum(); androidConfig: {
} category: 'IM',
}, 1 * 30 * 1000); data: JSON.stringify({
} sessionId: targetId,
sessionType: conversationType,
uni.$on("isGlogin", function (data) { }),
console.log("app.vue 接收", data); },
if (uni.getStorageSync("apply-uid")) { },
that.initWyyx();
} //
}); sessionId: targetId,
if (uni.getStorageSync("apply-token")) { sessionType: conversationType,
console.log("app.vue 是否调用"); })
that.initWyyx();
} const pushConfig: V2NIMMessagePushConfig = {
}, pushEnabled: true,
onHide: function () {}, pushNickEnabled: true,
methods: { forcePush: needForcePush,
initWyyx() { forcePushContent: pushContent,
let that = this; forcePushAccountIds: forcePushIDsList,
pushPayload: '{}',
that.F.wyyxPost( pushContent,
that.api.wyyx_getConfig, }
{
userId: uni.getStorageSync("apply-uid"), return { ...options, pushConfig }
}, },
(res) => { },
console.log("wyyx_getConfig", res); 'UniApp'
let resData = { ))
appkey: res.appKey,
accid: res.accid, // #ifdef APP-PLUS
token: res.token, const nimPushPlugin = uni.requireNativePlugin('NIMUniPlugin-PluginModule')
}; nim.V2NIMSettingService.setOfflinePushConfig(nimPushPlugin, {
const imOptions = { miPush: {
appkey: resData.appkey, // appkey appId: '2882303761520397320',
account: resData.accid, // account appKey: '5102039734320',
token: resData.token, // token certificateName: 'xiaomiCertificateName',
// appkey: "7e19d679085266aa872a8de12f0c1ae5", // appkey },
// account: "9", // account vivoPush: {
// token: "2d4ca36cca6293cf3a81d6ca1b8026f7", // token certificateName: 'vivoCertificateName',
}; },
if (imOptions) { oppoPush: {
this.initNim(imOptions); appId: '32967155',
} else { appKey: 'b98618cb272944dea324af6421d42a79',
// , secret: '0b7ce705a2304a17b78f20011c18890c',
} certificateName: 'opopCertificateName',
} },
); honorPush: {
}, certificateName: 'rongyaoCertificateName',
async initNim(opts) { },
let that = this; apns: {
// nim sdk // certificateName: 'AuthKey_98P8URRXUD_test', //:
const nim = (uni.$UIKitNIM = V2NIM.getInstance( certificateName: 'AuthKey_98P8URRXUD', //
{ },
appkey: opts.appkey, })
needReconnect: true, console.log('是否执行 推送')
// "reconnectionAttempts": 5, // #endif
debugLevel: "debug",
apiVersion: "v2", nim.V2NIMLoginService.login(opts.account, opts.token).then(() => {})
enableV2CloudConversation: true,
}, nim.V2NIMConversationService.on('onConversationChanged', function (conversationList: V2NIMConversation[]) {
{ console.log('初始化监听会话:', conversationList)
V2NIMLoginServiceConfig: { let _bool = conversationList.filter((item) => {
lbsUrls: isWxApp ? ["https://lbs.netease.im/lbs/wxwebconf.jsp"] : ["https://lbs.netease.im/lbs/webconf.jsp"], return Number(item.unreadCount) > 0
linkUrl: isWxApp ? "wlnimsc0.netease.im" : "weblink.netease.im", })
/** console.log('初始化监听会话bool:', _bool)
* 使用固定设备 ID if (_bool && _bool.length > 0) {
*/ that.playAudio() //
isFixedDeviceId: true, }
}, })
} },
)); playAudio() {
let that = this
that.globalData.nim = nim; const innerAudioContext = uni.createInnerAudioContext()
innerAudioContext.autoplay = true
// store innerAudioContext.src = 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/tip.mp3'
const store = (uni.$UIKitStore = new RootStore( innerAudioContext.onPlay(() => {
nim, console.log('开始播放')
{ })
addFriendNeedVerify: false, uni.vibrateShort()
// p2p p2p false
p2pMsgReceiptVisible: true, innerAudioContext.onError((res) => {
// false console.log(res.errMsg)
teamMsgReceiptVisible: true, console.log(res.errCode)
teamAgreeMode: V2NIMConst.V2NIMTeamAgreeMode.V2NIM_TEAM_AGREE_MODE_NO_AUTH, })
sendMsgBefore: async (options: { msg: V2NIMMessage; conversationId: string; serverExtension?: Record<string, unknown> }) => { },
const pushContent = getMsgContentTipByType({ checkNum() {
text: options.msg.text, let that = this
messageType: options.msg.messageType, if (uni.getStorageSync('apply-token')) {
}); that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
const yxAitMsg = options.serverExtension ? options.serverExtension.yxAitMsg : { forcePushIDsList: "[]", needForcePush: false }; console.log('获取待处理数量:', res)
if (res.approvePassHasNotRed > 0) {
// at 线 uni.setTabBarBadge({
index: 2,
const { forcePushIDsList, needForcePush } = yxAitMsg text: String(res.approvePassHasNotRed),
? // @ts-ignore })
store.msgStore._formatExtAitToPushInfo(yxAitMsg, options.msg.text) } else {
: { forcePushIDsList: "[]", needForcePush: false }; uni.removeTabBarBadge({
index: 2,
console.log("forcePushIDsList: ", forcePushIDsList); })
}
const { conversationId } = options; })
const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId); }
const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId); },
},
const pushPayload = JSON.stringify({ }
// oppo
oppoField: {
click_action_type: 4, // oppo
click_action_activity: "", // TODO
action_parameters: {
sessionId: targetId,
sessionType: conversationType,
}, //
},
// vivo
vivoField: {
pushMode: 0, //0 1 0
},
// huawei
hwField: {
click_action: {
type: 1,
action: "", // TODO
},
androidConfig: {
category: "IM",
data: JSON.stringify({
sessionId: targetId,
sessionType: conversationType,
}),
},
},
//
sessionId: targetId,
sessionType: conversationType,
});
const pushConfig: V2NIMMessagePushConfig = {
pushEnabled: true,
pushNickEnabled: true,
forcePush: needForcePush,
forcePushContent: pushContent,
forcePushAccountIds: forcePushIDsList,
pushPayload: "{}",
pushContent,
};
return { ...options, pushConfig };
},
},
"UniApp"
));
// #ifdef APP-PLUS
const nimPushPlugin = uni.requireNativePlugin("NIMUniPlugin-PluginModule");
nim.V2NIMSettingService.setOfflinePushConfig(nimPushPlugin, {
miPush: {
appId: "2882303761520397320",
appKey: "5102039734320",
certificateName: "xiaomiCertificateName",
},
vivoPush: {
certificateName: "vivoCertificateName",
},
oppoPush: {
appId: "32967155",
appKey: "b98618cb272944dea324af6421d42a79",
secret: "0b7ce705a2304a17b78f20011c18890c",
certificateName: "opopCertificateName",
},
honorPush: {
certificateName: "rongyaoCertificateName",
},
apns: {
// certificateName: 'AuthKey_98P8URRXUD_test', //:
certificateName: "AuthKey_98P8URRXUD", //
},
});
console.log("是否执行 推送");
// #endif
nim.V2NIMLoginService.login(opts.account, opts.token).then(() => {});
nim.V2NIMConversationService.on("onConversationChanged", function (conversationList: V2NIMConversation[]) {
console.log("初始化监听会话:", conversationList);
let _bool = conversationList.filter((item) => {
return Number(item.unreadCount) > 0;
});
console.log("初始化监听会话bool:", _bool);
if (_bool && _bool.length > 0) {
that.playAudio(); //
}
});
},
playAudio() {
let that = this;
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = "https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/tip.mp3";
innerAudioContext.onPlay(() => {
console.log("开始播放");
});
uni.vibrateShort();
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
});
},
checkNum() {
let that = this;
if (uni.getStorageSync("apply-token")) {
that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
console.log("获取待处理数量:", res);
if (res.approvePassHasNotRed > 0) {
uni.setTabBarBadge({
index: 3,
text: String(res.approvePassHasNotRed),
});
} else {
uni.removeTabBarBadge({
index: 3,
});
}
});
}
},
},
};
</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