Compare commits
3 Commits
CareerMap
...
40127060b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40127060b8 | ||
|
|
16d1e50c85 | ||
|
|
6006f5cd28 |
@@ -139,13 +139,15 @@ const validateRole = () => {
|
|||||||
|
|
||||||
const getPhoneNumber = (e) => {
|
const getPhoneNumber = (e) => {
|
||||||
console.log('获取手机号:', e);
|
console.log('获取手机号:', e);
|
||||||
|
console.log('userType.value', userType.value)
|
||||||
// 验证角色是否已选择
|
// 验证角色是否已选择
|
||||||
if (!validateRole()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||||
|
if (userType.value === null) {
|
||||||
|
$api.msg('请先选择您的角色');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: (loginRes) => {
|
success: (loginRes) => {
|
||||||
|
|||||||
@@ -525,6 +525,11 @@ function previewImage(url, index) {
|
|||||||
current: index
|
current: index
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查看简历
|
||||||
|
function viewResume(userId) {
|
||||||
|
navTo(`/packageA/pages/myResume/myResume?userId=${userId}`);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|||||||
@@ -58,8 +58,57 @@ const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction
|
|||||||
import useUserStore from '@/stores/useUserStore';
|
import useUserStore from '@/stores/useUserStore';
|
||||||
import useDictStore from '@/stores/useDictStore';
|
import useDictStore from '@/stores/useDictStore';
|
||||||
|
|
||||||
function jumps(url){
|
onLoad(() => {
|
||||||
navTo(url);
|
thirdLogin()
|
||||||
|
});
|
||||||
|
|
||||||
|
async function jumps(url){
|
||||||
|
if(await thirdLogin()){
|
||||||
|
navTo(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function thirdLogin(){
|
||||||
|
let form={}
|
||||||
|
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
|
form={
|
||||||
|
usertype: '1',
|
||||||
|
idno: uni.getStorageSync('userInfo').idCard,
|
||||||
|
name: uni.getStorageSync('userInfo').name,
|
||||||
|
enterprisecode:"",
|
||||||
|
enterprisename: "",
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
}
|
||||||
|
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
|
form={
|
||||||
|
usertype: "2",
|
||||||
|
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
|
enterprisename: uni.getStorageSync('userInfo').name,
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
idno: "",
|
||||||
|
name: ""
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请先登录'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||||
|
if (resLogin.code=='200') {
|
||||||
|
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '单点异常'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -202,12 +202,10 @@ function getData() {
|
|||||||
function getHeart() {
|
function getHeart() {
|
||||||
const raw = uni.getStorageSync("Padmin-Token");
|
const raw = uni.getStorageSync("Padmin-Token");
|
||||||
const token = typeof raw === "string" ? raw.trim() : "";
|
const token = typeof raw === "string" ? raw.trim() : "";
|
||||||
const headers = token ? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` }: {}
|
const headers = token ? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` }: {};
|
||||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
||||||
if (resData.code == 200) {
|
if (resData.code == 200) {
|
||||||
getUserInfo();
|
getUserInfo();
|
||||||
} else {
|
|
||||||
navTo('/packageB/login')
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -218,6 +216,7 @@ function getUserInfo(){
|
|||||||
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
|
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
|
||||||
userId.value=resData.info.userId
|
userId.value=resData.info.userId
|
||||||
getData()
|
getData()
|
||||||
|
updateVideoInfo()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getDictionary(){
|
function getDictionary(){
|
||||||
@@ -277,15 +276,20 @@ function updateVideoInfo(){
|
|||||||
'Authorization':uni.getStorageSync('Padmin-Token'),
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
'Content-Type': "application/x-www-form-urlencoded"
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
}
|
}
|
||||||
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
|
|
||||||
$api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, header).then((resData) => {
|
||||||
console.log("视频播放时长更新成功")
|
if (resData.code == 200) {
|
||||||
});
|
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
|
||||||
}else{
|
$api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
|
||||||
$api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
|
console.log("视频播放时长更新成功")
|
||||||
console.log("视频播放时长更新成功")
|
});
|
||||||
});
|
}else{
|
||||||
}
|
$api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
|
||||||
|
console.log("视频播放时长更新成功")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 计算并上报停留时长
|
// 计算并上报停留时长
|
||||||
function reportPageDuration() {
|
function reportPageDuration() {
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ const getItemBackgroundStyle = (imageName) => ({
|
|||||||
});
|
});
|
||||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
const trainVideoImgUrl=config.trainVideoImgUrl
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(async () => {
|
||||||
|
await thirdLogin()
|
||||||
getDataList('refresh');
|
getDataList('refresh');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -135,8 +136,53 @@ function getDataList(type = 'add') {
|
|||||||
|
|
||||||
|
|
||||||
// 播放视频
|
// 播放视频
|
||||||
function playVideo(video) {
|
async function playVideo(video) {
|
||||||
navTo(`/packageB/train/video/videoDetail?id=${video.videoId}`);
|
if(await thirdLogin()){
|
||||||
|
navTo(`/packageB/train/video/videoDetail?id=${video.videoId}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function thirdLogin(){
|
||||||
|
let form={}
|
||||||
|
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
|
form={
|
||||||
|
usertype: '1',
|
||||||
|
idno: uni.getStorageSync('userInfo').idCard,
|
||||||
|
name: uni.getStorageSync('userInfo').name,
|
||||||
|
enterprisecode:"",
|
||||||
|
enterprisename: "",
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
}
|
||||||
|
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
|
form={
|
||||||
|
usertype: "2",
|
||||||
|
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
|
enterprisename: uni.getStorageSync('userInfo').name,
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
idno: "",
|
||||||
|
name: ""
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请先登录'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||||
|
if (resLogin.code=='200') {
|
||||||
|
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '单点异常'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -143,13 +143,59 @@
|
|||||||
// startDate: currentDate,
|
// startDate: currentDate,
|
||||||
// });
|
// });
|
||||||
// weekList.value = result;
|
// weekList.value = result;
|
||||||
getHeart();
|
if(thirdLogin()){
|
||||||
|
getHeart();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 更新自定义tabbar选中状态
|
// 更新自定义tabbar选中状态
|
||||||
tabbarManager.updateSelected(1);
|
tabbarManager.updateSelected(1);
|
||||||
});
|
});//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
async function thirdLogin(){
|
||||||
|
let form={}
|
||||||
|
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
|
form={
|
||||||
|
usertype: '1',
|
||||||
|
idno: uni.getStorageSync('userInfo').idCard,
|
||||||
|
name: uni.getStorageSync('userInfo').name,
|
||||||
|
enterprisecode:"",
|
||||||
|
enterprisename: "",
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
}
|
||||||
|
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
|
form={
|
||||||
|
usertype: "2",
|
||||||
|
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
|
enterprisename: uni.getStorageSync('userInfo').name,
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
idno: "",
|
||||||
|
name: ""
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请先登录'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||||
|
if (resLogin.code=='200') {
|
||||||
|
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '单点异常'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 监听退出登录事件,显示微信登录弹窗
|
// 监听退出登录事件,显示微信登录弹窗
|
||||||
@@ -168,19 +214,22 @@
|
|||||||
// 可以在这里添加登录成功后的处理逻辑
|
// 可以在这里添加登录成功后的处理逻辑
|
||||||
};
|
};
|
||||||
|
|
||||||
function goDetail(jobFairId){
|
async function goDetail(jobFairId){
|
||||||
if(state.current != 3){
|
if(await thirdLogin()){
|
||||||
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
debugger
|
||||||
}else{
|
if(state.current != 3){
|
||||||
console.log(userInfo.value, 'userInfo');
|
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
||||||
if(userInfo.value){
|
}else{
|
||||||
if(userInfo.value.userType=='ent'){
|
console.log(userInfo.value, 'userInfo');
|
||||||
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
|
if(userInfo.value){
|
||||||
}else{
|
if(userInfo.value.userType=='ent'){
|
||||||
navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
|
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
|
||||||
|
}else{
|
||||||
|
navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toSelectDate() {
|
function toSelectDate() {
|
||||||
|
|||||||
@@ -216,6 +216,14 @@
|
|||||||
v-model="contact.name"
|
v-model="contact.name"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="form-group">
|
||||||
|
<view class="label">职位</view>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
placeholder="请输入职位"
|
||||||
|
v-model="contact.position"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<view class="form-group">
|
<view class="form-group">
|
||||||
<view class="label">联系电话</view>
|
<view class="label">联系电话</view>
|
||||||
<input
|
<input
|
||||||
@@ -280,6 +288,7 @@ const formData = reactive({
|
|||||||
contacts: [
|
contacts: [
|
||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
|
position: '',
|
||||||
phone: ''
|
phone: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -504,6 +513,7 @@ const addContact = () => {
|
|||||||
if (formData.contacts.length < 3) {
|
if (formData.contacts.length < 3) {
|
||||||
formData.contacts.push({
|
formData.contacts.push({
|
||||||
name: '',
|
name: '',
|
||||||
|
position: '',
|
||||||
phone: ''
|
phone: ''
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -653,7 +663,11 @@ const publishJob = async () => {
|
|||||||
jobCategory: formData.jobCategory,
|
jobCategory: formData.jobCategory,
|
||||||
companyId: formData.companyId,
|
companyId: formData.companyId,
|
||||||
companyName: formData.companyName,
|
companyName: formData.companyName,
|
||||||
jobContactList: formData.contacts.filter(contact => contact.name.trim() && contact.phone.trim()),
|
jobContactList: formData.contacts.filter(contact => contact.name.trim() && contact.phone.trim()).map(contact => ({
|
||||||
|
contactPerson: contact.name,
|
||||||
|
contactPersonPhone: contact.phone,
|
||||||
|
position: contact.position
|
||||||
|
})),
|
||||||
filesList: formData.images.map(image => ({ bussinessid: image.bussinessid })) // 新增:岗位图片列表,使用bussinessid
|
filesList: formData.images.map(image => ({ bussinessid: image.bussinessid })) // 新增:岗位图片列表,使用bussinessid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,8 @@ const handleLogin = async () => {
|
|||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
window.location.assign('http://222.80.110.161:11111/mechine-dual-vue/login')
|
// window.location.assign('http://222.80.110.161:11111/mechine-dual-vue/login')
|
||||||
|
window.location.assign('http://222.80.110.161:11111/mechine-single-vue/login')
|
||||||
// // 跳转到首页
|
// // 跳转到首页
|
||||||
// uni.reLaunch({
|
// uni.reLaunch({
|
||||||
// url: '/pages/index/index'
|
// url: '/pages/index/index'
|
||||||
|
|||||||
@@ -246,10 +246,10 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers =
|
|||||||
}
|
}
|
||||||
// 显示具体的错误信息
|
// 显示具体的错误信息
|
||||||
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: errorMsg,
|
// title: errorMsg,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
const err = new Error(errorMsg)
|
const err = new Error(errorMsg)
|
||||||
err.error = resData
|
err.error = resData
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user