app
wangxia 5 months ago
parent 96783558ba
commit 14746af404

@ -1,348 +1,348 @@
<script lang="ts">
import RootStore from "@xkit-yx/im-store-v2";
import V2NIM, { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
import { getMsgContentTipByType } from "./pages/NEUIKit/utils/msg";
import { STORAGE_KEY } from "./pages/NEUIKit/utils/constants";
import { isWxApp } from "./pages/NEUIKit/utils";
import { V2NIMMessage, V2NIMMessagePushConfig } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService";
import { unix } from "dayjs";
import RootStore from '@xkit-yx/im-store-v2'
import V2NIM, { V2NIMConst } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK'
import { getMsgContentTipByType } from './pages/NEUIKit/utils/msg'
import { STORAGE_KEY } from './pages/NEUIKit/utils/constants'
import { isWxApp } from './pages/NEUIKit/utils'
import { V2NIMMessage, V2NIMMessagePushConfig } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService'
import { unix } from 'dayjs'
export default {
globalData: {
timer: null, //
themeColor: "#00b666",
themeBackgroundColor: "#00b66621",
},
onShow: function (options) {
let that = this;
console.log("show 项目init", options, decodeURIComponent(options.query.scene));
// id
uni.removeStorageSync("scene");
uni.removeStorageSync("user_scene");
uni.removeStorageSync("user_options", options);
globalData: {
timer: null, //
themeColor: '#00b666',
themeBackgroundColor: '#00b66621',
},
onShow: function (options) {
let that = this
console.log('show 项目init', options, decodeURIComponent(options.query.scene))
// id
uni.removeStorageSync('scene')
uni.removeStorageSync('user_scene')
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) {
uni.setStorageSync("apply-jobdetail-id", options.query.id);
} else {
uni.setStorageSync("apply-jobdetail-id", 0);
}
const { conversationId } = options
const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId)
const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId)
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);
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,
});
}
});
}
},
},
};
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: 2,
text: String(res.approvePassHasNotRed),
})
} else {
uni.removeTabBarBadge({
index: 2,
})
}
})
}
},
},
}
</script>
<style lang="scss">
@import "./static/css/iconfont.css";
@import "./uni_modules/vk-uview-ui/index.scss";
@import "./static/css/base.scss";
@import "./static/font/iconfont-weapp-icon.css";
@import './static/css/iconfont.css';
@import './uni_modules/vk-uview-ui/index.scss';
@import './static/css/base.scss';
@import './static/font/iconfont-weapp-icon.css';
// #ifdef MP-WEIXIN
page {
width: 100vw;
height: 100vh;
width: 100vw;
height: 100vh;
}
// #endif
// #ifdef H5 || APP-PLUS || MP-TOUTIAO || MP-KUAISHOU
page {
width: 100vw;
height: calc(100% - 0px);
--color-ysd: #ff4400;
--color-hover: #ff4400cc;
--color-be: #ff4400;
--color-027: #ff4400;
--color-href: #576b95;
width: 100vw;
height: calc(100% - 0px);
--color-ysd: #ff4400;
--color-hover: #ff4400cc;
--color-be: #ff4400;
--color-027: #ff4400;
--color-href: #576b95;
}
// #endif
// uview
.u-badge-mini {
top: 22rpx !important;
right: 102rpx !important;
color: transparent !important;
width: 10px !important;
height: 10px !important;
border-radius: 50% !important;
top: 22rpx !important;
right: 102rpx !important;
color: transparent !important;
width: 10px !important;
height: 10px !important;
border-radius: 50% !important;
}
.u-radio {
&:last-child {
.u-radio__label {
margin-right: 0;
}
}
&:last-child {
.u-radio__label {
margin-right: 0;
}
}
}
.g-apply-tab {
.u-tab-bar {
bottom: -2px !important;
}
.u-tab-bar {
bottom: -2px !important;
}
}
.g_bg_f_5{
background-color: #ededed !important;
.g_bg_f_5 {
background-color: #ededed !important;
}
.g_mt_30{
margin-top: 30px;
.g_mt_30 {
margin-top: 30px;
}
.g_mt_84{
margin-top: 84px;
.g_mt_84 {
margin-top: 84px;
}
.g_pt_90{
padding-top: 90px;
.g_pt_90 {
padding-top: 90px;
}
</style>

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

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

@ -50,12 +50,13 @@
<div v-else>
<div class="g_flex_row_center" v-if="beFllowAgencyInfo.recordStatus == 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>
</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>
</div>
</div> -->
</div>
<div style="width: calc(100vw - 40px)" v-else-if="beFllowAgencyInfo.recordStatus == 2">
@ -76,7 +77,7 @@
</div>
</view>
<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>
<!-- 基本信息 -->

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

@ -159,42 +159,7 @@ export default {
that.updateInfo.upAgencyId = options.agencyId;
}
this.updateInfo.interviewTimeStr = "";
},
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 = [
that.jobData = [
{
icon: "",
label: "报名职位",
@ -207,6 +172,18 @@ export default {
customRequire: true,
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: "",
label: "预约面试时间",
@ -295,6 +272,43 @@ export default {
});
}
}, 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: {
getTownsManInfo(info){
@ -445,12 +459,12 @@ export default {
return false;
}
if(that.btnLaoding){
return
return false
}
that.btnLaoding= true
that.btnLaoding = true
let submitInfo = {
...that.updateInfo,
}
submitInfo.applyUserJson = JSON.stringify(
that.persenInfo.map((item) => {

Loading…
Cancel
Save