7 Commits

Author SHA1 Message Date
史典卓
6ad80f08e9 flat: ZKRD可以申请了 2025-08-05 18:33:09 +08:00
史典卓
233706e8d2 flat: 全部暂存 2025-05-16 21:04:01 +08:00
史典卓
dbefed8524 flat: 压缩图片,添加消息控制 2025-02-17 12:54:18 +08:00
史典卓
29cb92224b flat: 123 2024-10-24 16:28:13 +08:00
史典卓
a4ffe68ec2 flat: 国庆节暂存 2024-10-09 10:14:51 +08:00
Apcallover
6504a558ac flat:无 2024-07-25 11:22:05 +08:00
Apcallover
9fe5c37292 flat: 修改天地图 2024-07-22 15:12:17 +08:00
95 changed files with 7178 additions and 6503 deletions

235
App.vue
View File

@@ -1,96 +1,139 @@
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
</style>
<script>
import website from '@/config/website.js'
import {
mapGetters
} from 'vuex'
// #ifdef H5
import {
setPlatformByHostName
} from '@/untils/customized.js'
// #endif
export default {
onLaunch: function(options) {
this.$store.dispatch('InitArea')
if (options.query.token) {
uni.reLaunch({
url: '/pages/login/blank?token=' + options.query.token
})
} else if (this.$store.state.user.token) {
this.$store.dispatch('startRefreshTokenTimer')
this.$store.dispatch('startRefreshNewsTimer')
this.$store.dispatch('refreshAuthState')
this.$store.dispatch('getUserLocation')
this.$store.dispatch('getMobileIsCms')
}
// #ifdef H5
// 企业定制
setPlatformByHostName(this.$store)
// #endif
},
onShow: function() {},
onHide: function() {},
computed: {
...mapGetters(['news']),
allUnread() {
return this.news.allUnread
}
},
mounted() {
this.$config.showTitle && document.documentElement.style.setProperty('--hide-title', 'block');
},
watch: {
allUnread(value) {
console.log('allUnread', value)
if (!this.$store.state.user.token) {} else if (value > 0) {
uni.showTabBarRedDot({
index: 2
})
uni.$once('newsReadChange', () => {
uni.showTabBarRedDot({
index: 2
})
})
} else {
uni.hideTabBarRedDot({
index: 2
})
uni.$once('newsReadChange', () => {
uni.hideTabBarRedDot({
index: 2
})
})
}
}
}
};
</script>
<style lang="scss">
/*每个页面公共css */
/* tabbar 字体大小 */
/* .uni-tabbar__label{
font-size: 14px !important;
} */
@font-face {
font-family: 'uicon-iconfont';
font-weight: mormal;
font-style: mormal;
src: url('/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
}
:root {
--hide-title: none;
}
/* #ifdef H5 */
uni-page-head {
display: var(--hide-title);
}
/* #endif */
</style>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import '@/uni_modules/uview-ui/index.scss';
</style>
<script>
import website from '@/config/website.js';
import { mapGetters } from 'vuex';
import { GoLogin } from '@/untils/AxiosUtils.js';
// #ifdef H5
import { setPlatformByHostName } from '@/untils/customized.js';
import { reject } from 'lodash';
// #endif
export default {
onLaunch: function (options) {
this.$store.dispatch('InitArea');
if (options.query.token) {
this.tokenlogin(options.query.token).then(() => {
this.$store.dispatch('getUserLocation');
this.$store.dispatch('getNoticeState');
this.$store.dispatch('getMobileIsCms');
this.$store.dispatch('getResumeInfo');
});
} else {
this.$store.dispatch('FedLogOut');
}
// if (options.query.token) {
// // uni.reLaunch({
// // url: '/pages/login/blank?token=' + options.query.token
// // })
// this.tokenlogin(options.query.token)
// } else if (this.$api.haslogin()) {
// this.$store.dispatch('startRefreshTokenTimer')
// this.$store.dispatch('startRefreshNewsTimer')
// this.$store.dispatch('refreshAuthState')
// this.$store.dispatch('getUserLocation')
// this.$store.dispatch('getMobileIsCms')
// }
// #ifdef H5
// 企业定制
setPlatformByHostName(this.$store);
// #endif
},
onShow: function () {},
onHide: function () {},
computed: {
...mapGetters(['news', 'auth']),
allUnread() {
return this.news.allUnread;
},
},
mounted() {
this.$config.showTitle && document.documentElement.style.setProperty('--hide-title', 'block');
},
methods: {
tokenlogin(token) {
return new Promise((resolve, reject) => {
uni.showLoading({
title: '登录中',
});
if (token) {
const that = this;
this.$store
.dispatch('LoginByUsername', {
username: 'admin',
password: 'admin',
key: '',
code: '1111',
type: 'account',
token: token,
tenantId: website.tenantId,
})
.then((resp) => {
this.$store.dispatch('refreshAuthState').then(() => {
uni.hideLoading();
resolve();
});
})
.catch((err) => {
uni.hideLoading();
});
} else {
GoLogin();
}
});
},
},
watch: {
allUnread(value) {
console.log('allUnread', value);
if (!this.$api.haslogin()) {
} else if (value > 0) {
uni.showTabBarRedDot({
index: 2,
});
uni.$once('newsReadChange', () => {
uni.showTabBarRedDot({
index: 2,
});
});
} else {
uni.hideTabBarRedDot({
index: 2,
});
uni.$once('newsReadChange', () => {
uni.hideTabBarRedDot({
index: 2,
});
});
}
},
},
};
</script>
<style lang="scss">
/*每个页面公共css */
/* tabbar 字体大小 */
/* .uni-tabbar__label{
font-size: 14px !important;
} */
@font-face {
font-family: 'uicon-iconfont';
font-weight: mormal;
font-style: mormal;
src: url('/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
}
:root {
--hide-title: none;
}
/* #ifdef H5 */
uni-page-head {
display: var(--hide-title);
}
/* #endif */
</style>

View File

@@ -1,118 +1,144 @@
import {
request
} from '@/untils/AxiosUtils.js';
import website from "@/config/website";
const authUrl = '/api/jobslink-api/user/user/auth/auth'
export const findAuth = () => request({
url: '/api/jobslink-api/user/user/find',
method: 'get'
});
export const cheakValue = () => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 1,
bakvalue: 0
}
});
export const realName = (realName, idNumber) => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 2,
realName,
idNumber
}
});
export const bank = (bankName, realName, cardNumber, def, id) => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 3,
bankName,
cardNumber,
realName,
def,
id
}
});
export const insure = (bakvalue) => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 4,
bakvalue
}
});
// 判断当前用户是否采集签名
export const isGather = () => request({
url: "/api/jobslink-api/doc/docUserSeal/isGather",
method: 'get',
});
// 个人端签名采集
export const signGather = (signSrcUrl, password, confirmPassword) => request({
url: "/api/jobslink-api/doc/docUserSeal/signGather",
method: 'post',
data: {
signSrcUrl,
password,
confirmPassword
}
});
// 获取短信接口
export const sendValidate = (mobile) => request({
url: "/api/jobslink-api/doc/docUserCert/resetPass/sendValidate",
method: 'get',
data: {
mobile
}
});
// 密码重置接口
export const resetPass = (mobile, code, password) => request({
url: "/api/jobslink-api/doc/docUserCert/resetPass",
method: 'post',
headers: {
'SCaptcha-Key': mobile,
'SCaptcha-Code': code,
'password': password
}
});
// 我的合同
export const contractList = (params) => request({
url: "/api/jobslink-api/doc/contract/personal/contractList",
method: 'get',
data: params
});
// 签名密码 /jobslink-api/doc/docUserCert/checkPass
export const checkPass = (params) => request({
url: "/api/jobslink-api/doc/docUserCert/checkPass",
method: 'get',
data: params
});
// 返回的是base64格式的pdf
export const viewContract = (params) => request({
url: "/api/jobslink-api/doc/contract/viewContract",
method: 'get',
data: params
});
//新实名认证api
export const newCertification = (bakvalue, realName, idNumber, cardNumber, bankCode,def,bankName) => request({
url: '/api/jobslink-api/user/user/auth/authNew',
method: 'post',
data: {
bakvalue,
realName,
idNumber,
cardNumber,
bankCode,
def,
bankName
}
});
import {
request
} from '@/untils/AxiosUtils.js';
import {
decryptJson
} from '@/untils/authService.js'
import website from "@/config/website";
const authUrl = '/api/jobslink-api/user/user/auth/auth'
// export const findAuth = () => request({
// url: '/api/jobslink-api/user/user/find',
// method: 'get'
// });
export const findAuth = async () => {
try {
const encrypted = await request({
url: '/api/jobslink-api/user/user/find',
method: 'get',
responseType: 'text', // 接收纯文本密文
});
const decryptedStr = decryptJson(encrypted.data);
return {
data: JSON.parse(decryptedStr),
};
} catch (error) {
console.error('请求或解密过程中出错:', error);
return null;
}
};
export const cheakValue = () => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 1,
bakvalue: 0
}
});
export const realName = (realName, idNumber) => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 2,
realName,
idNumber
}
});
export const bank = (bankName, realName, cardNumber, def, id) => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 3,
bankName,
cardNumber,
realName,
def,
id
}
});
export const insure = (bakvalue) => request({
url: authUrl,
method: 'post',
data: {
cheakvalue: 4,
bakvalue
}
});
// 判断当前用户是否采集签名
export const isGather = () => request({
url: "/api/jobslink-api/doc/docUserSeal/isGather",
method: 'get',
});
// 个人端签名采集
export const signGather = (signSrcUrl, password, confirmPassword) => request({
url: "/api/jobslink-api/doc/docUserSeal/signGather",
method: 'post',
data: {
signSrcUrl,
password,
confirmPassword
}
});
// 获取短信接口
export const sendValidate = (mobile) => request({
url: "/api/jobslink-api/doc/docUserCert/resetPass/sendValidate",
method: 'get',
data: {
mobile
}
});
// 密码重置接口
export const resetPass = (mobile, code, password) => request({
url: "/api/jobslink-api/doc/docUserCert/resetPass",
method: 'post',
headers: {
'SCaptcha-Key': mobile,
'SCaptcha-Code': code,
'password': password
}
});
// 我的合同
export const contractList = (params) => request({
url: "/api/jobslink-api/doc/contract/personal/contractList",
method: 'get',
data: params
});
// 签名密码 /jobslink-api/doc/docUserCert/checkPass
export const checkPass = (params) => request({
url: "/api/jobslink-api/doc/docUserCert/checkPass",
method: 'get',
data: params
});
// 返回的是base64格式的pdf
export const viewContract = (params) => request({
url: "/api/jobslink-api/doc/contract/viewContract",
method: 'get',
data: params
});
//新实名认证api
export const newCertification = (bakvalue, realName, idNumber, cardNumber, bankCode, def, bankName) => request({
url: '/api/jobslink-api/user/user/auth/authNew',
method: 'post',
data: {
bakvalue,
realName,
idNumber,
cardNumber,
bankCode,
def,
bankName
}
});
// 电话联系
export const getPhoneCountNumber = (params) => request({
url: "/api/jobslink-api/serve/phone",
method: 'get',
data: params
});

View File

@@ -1,47 +1,55 @@
import {
request
} from '@/untils/AxiosUtils.js';
import website from "../config/website.js"
import store from '@/store/';
// 设置民族政治面貌 jobslink-api/user/user/setInfo
export const setInfo = (params) => request({
url: "/api/jobslink-api/user/user/setInfo",
method: 'post',
data: params
});
// 获取用户工会状态 /jobslink-api/doc/user/labourUnion/info
export const labourUnionInfo = () => request({
url: "/api/jobslink-api/doc/user/labourUnion/info",
method: 'get'
});
// 申请入会
export const contract = (params) => request({
url: "/api/jobslink-api/doc/user/labourUnion/apply",
method: 'post',
data: params
});
//会员信息--判断用户是否加入工会
export const labourUnionDetail = (no) => request({
url: "/api/jobslink-api/doc/jkLabourUnionAppl/list",
method: 'get',
params:{no}
});
//提交会员申请
export const saveApplication = (labourunionId,applType,applComment) =>{
applComment=applComment.substring(0,200)
return request({
url: "/api/jobslink-api/doc/jkLabourUnionDetail/save",
method: 'post',
data:{labourunionId,applType,applComment}
});
}
//查询提交的申请内容
export const applicationInfo = (no) => request({
url: "/api/jobslink-api/doc/jkLabourUnionDetail/list",
method: 'get',
params:{no}
});
import {
request
} from '@/untils/AxiosUtils.js';
import website from "../config/website.js"
import store from '@/store/';
// 设置民族政治面貌 jobslink-api/user/user/setInfo
export const setInfo = (params) => request({
url: "/api/jobslink-api/user/user/setInfo",
method: 'post',
data: params
});
// 获取用户工会状态 /jobslink-api/doc/user/labourUnion/info
export const labourUnionInfo = () => request({
url: "/api/jobslink-api/doc/user/labourUnion/info",
method: 'get'
});
// 申请入会
export const contract = (params) => request({
url: "/api/jobslink-api/doc/user/labourUnion/apply",
method: 'post',
data: params
});
//会员信息--判断用户是否加入工会
export const labourUnionDetail = (no) => request({
url: "/api/jobslink-api/doc/jkLabourUnionAppl/list",
method: 'get',
params: {
no
}
});
//提交会员申请
export const saveApplication = (labourunionId, applType, applComment) => {
applComment = applComment.substring(0, 200)
return request({
url: "/api/jobslink-api/doc/jkLabourUnionDetail/save",
method: 'post',
data: {
labourunionId,
applType,
applComment
}
});
}
//查询提交的申请内容
export const applicationInfo = (no) => request({
url: "/api/jobslink-api/doc/jkLabourUnionDetail/list",
method: 'get',
params: {
no
}
});

View File

@@ -306,4 +306,10 @@ export const getPolicyContentList = (params) => request({
url: '/api/jobslink-api/desk/article/getAllArticle',
method: 'get',
params
})
export const userWorkSearchListAll = (params) => request({
url: '/api/jobslink-api/user/userWork/searchListAll',
method: 'get',
params
})

View File

@@ -72,4 +72,14 @@ export const clearCache = () => request({
export const mobileIsCms = () => request({
url: '/api/jobslink-api/mobile/isCms',
method: 'get'
})
})
export const noticeIsEnable = () => request({
url: "/api/jobslink-api/desk/notice/isEnable",
method: 'get',
});
export const setNoticeIsEnable = (state) => request({
url: "/api/jobslink-api/desk/notice/isEnable/" + state,
method: 'PUT',
});

View File

@@ -1,244 +1,267 @@
<template>
<view class="body" @click="goInfo(companyitem)">
<view class="heads">
<view class="head_left">
<rich-text :nodes="string">
</rich-text>
</view>
<view class="head_right">
{{ companyitem.wage }}{{ wageUnit[companyitem.wageUnitCategory] }}
</view>
</view>
<view class="ask">
<view class="askList">
{{ companyitem.tradeNames }}
</view>
<view class="askList" v-for="(item, index) in skillNames" :key="index">
{{ item }}
</view>
<view style="flex:1;"></view>
<u-tag text="零工岗位" v-if="companyitem.type == 0" plain size="mini" type="warning"></u-tag>
<u-tag text="全职岗位" v-if="companyitem.type == 1" plain size="mini"></u-tag>
<u-tag text="招工" v-if="companyitem.type == 2" plain size="mini"></u-tag>
</view>
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
<view class="timeAddress" style="position: relative;">
<view style="display: flex;align-items: center;">
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
</image>
<view style="font-size: 26rpx;color:#333;">{{ companyitem.missionCompanyName }}</view>
</view>
<view style="display: flex;align-items: center;position:absolute;right:0;">
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
<view>--km</view>
</view>
</view>
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
<image class="commentimg_image" src="../../static/img/star.full.svg"
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
<image class="commentimg_image" src="../../static/img/star.empty.svg"
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
</view>
<view class="comment_content allName gocomment" v-else>
评价
</view>
</view>
</view>
</template>
<script>
import {
toDoller,
dateFormat
} from "../../untils/format.js";
import dictionary from '@/common/textdata.js';
import {
defaults
} from "lodash";
export default {
beforeCreate: function() {},
props: {
companyitem: {
type: Object,
default () {
return []
}
},
comment: {
type: Boolean,
default: false
},
noApply: {
type: Boolean,
default: true
},
near: {
type: Boolean,
default: false
}
},
data() {
return {
...dictionary,
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
.missionTitle +
"</div>"
};
},
computed: {
skillNames() {
if (this.companyitem.skillNames) {
return this.companyitem.skillNames?.split(',')
} else {
return []
}
}
},
methods: {
goComment: function(no) {
uni.navigateTo({
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
})
},
goInfo: function(item) {
// const isCan = this.noApply === false ? '0' : '1'
switch (item.type) {
case 0:
this.navTo(
`/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(item.missionNo)}&isCan=1`
)
break
case 1:
this.navTo(`/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`)
break
case 2:
this.navTo(`/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`)
break
default:
this.navTo(`/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`)
}
},
getCity: function(val) {
if (val) {
let areas = this.$store.getters.getAreaParents(val)
if (areas.length === 3) {
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
}
}
},
toDoller,
dateFormat
}
}
</script>
<style>
.commentimg_image {
width: 40rpx;
height: 40rpx;
}
.commentimg {
display: flex;
align-items: center;
justify-content: flex-end;
}
.gocomment {
font-size: 26rpx !important;
border-radius: 5rpx;
border: 1rpx solid #c3c3c3;
width: 160rpx;
text-align: center;
float: right;
height: 50rpx;
line-height: 50rpx;
}
.timeAddress {
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
margin: 10rpx 0;
padding: 10rpx 0;
}
.allName {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
}
.askList {
/* width: 14%; */
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #666666;
background-color: #f6f6f6;
padding: 5rpx 15rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
}
.ask {
overflow: hidden;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: flex-start;
margin: 20rpx 0;
}
.head_right {
ont-family: PingFangSC-Medium;
font-size: 28rpx;
color: #F46161;
font-weight: bold;
}
.head_left {
font-family: PingFangSC-Medium;
font-size: 32rpx;
font-weight: bold;
color: #333333;
width: 350rpx;
overflow: hidden;
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.highlight {
color: #F46161;
}
.body {
width: 690rpx;
margin: 0rpx auto;
background-color: #fefefe;
overflow: hidden;
box-sizing: border-box;
padding: 20rpx;
padding-bottom: 0;
border-radius: 20rpx;
margin-top: 20rpx;
}
.heads {
display: flex;
align-items: center;
justify-content: space-between;
}
<template>
<view class="body" @click="goInfo(companyitem)">
<view class="heads">
<view class="head_left">
<rich-text :nodes="string">
</rich-text>
</view>
<view class="head_right">
{{ companyitem.wage }}{{ wageUnit[companyitem.wageUnitCategory] }}
</view>
</view>
<view class="ask">
<view class="askList">
{{ companyitem.tradeNames }}
</view>
<view class="askList" v-for="(item, index) in skillNames" :key="index">
{{ item }}
</view>
<view style="flex:1;"></view>
<u-tag text="零工岗位" v-if="companyitem.type == 0" plain size="mini" type="warning"></u-tag>
<u-tag text="全职岗位" v-if="companyitem.type == 1" plain size="mini"></u-tag>
<u-tag text="招工" v-if="companyitem.type == 2" plain size="mini"></u-tag>
</view>
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
<view class="timeAddress" style="position: relative;">
<view style="display: flex;align-items: center;">
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
</image>
<view style="font-size: 26rpx;color:#333;">{{ companyitem.missionCompanyName }}</view>
</view>
<view style="display: flex;align-items: center;position:absolute;right:0;">
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
<view>{{distance(companyitem)}}</view>
</view>
</view>
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
<image class="commentimg_image" src="../../static/img/star.full.svg"
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
<image class="commentimg_image" src="../../static/img/star.empty.svg"
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
</view>
<view class="comment_content allName gocomment" v-else>
评价
</view>
</view>
</view>
</template>
<script>
import {
toDoller,
dateFormat
} from "../../untils/format.js";
import dictionary from '@/common/textdata.js';
import {
addZeroPrefix,
getDistanceFromLatLonInKm
} from '@/untils/tools.js'
import {
defaults
} from "lodash";
export default {
beforeCreate: function() {},
props: {
companyitem: {
type: Object,
default () {
return []
}
},
comment: {
type: Boolean,
default: false
},
noApply: {
type: Boolean,
default: true
},
near: {
type: Boolean,
default: false
},
location: Object
},
data() {
return {
...dictionary,
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
.missionTitle +
"</div>"
};
},
computed: {
skillNames() {
if (this.companyitem.skillNames) {
return this.companyitem.skillNames?.split(',')
} else {
return []
}
}
},
methods: {
distance(item) {
const {
lon,
lat
} = item
if (this.position && lon > 0) {
const {
longitude,
latitude
} = this.position
const {
m,
km
} = getDistanceFromLatLonInKm(lat, lon, latitude, longitude)
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
}
return '--km'
},
goComment: function(no) {
uni.navigateTo({
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
})
},
goInfo: function(item) {
// const isCan = this.noApply === false ? '0' : '1'
switch (item.type) {
case 0:
this.navTo(
`/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(item.missionNo)}&isCan=1`
)
break
case 1:
this.navTo(`/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`)
break
case 2:
this.navTo(`/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`)
break
default:
this.navTo(`/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`)
}
},
getCity: function(val) {
if (val) {
let areas = this.$store.getters.getAreaParents(val)
if (areas.length === 3) {
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
}
}
},
toDoller,
dateFormat
}
}
</script>
<style>
.commentimg_image {
width: 40rpx;
height: 40rpx;
}
.commentimg {
display: flex;
align-items: center;
justify-content: flex-end;
}
.gocomment {
font-size: 26rpx !important;
border-radius: 5rpx;
border: 1rpx solid #c3c3c3;
width: 160rpx;
text-align: center;
float: right;
height: 50rpx;
line-height: 50rpx;
}
.timeAddress {
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
margin: 10rpx 0;
padding: 10rpx 0;
}
.allName {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
}
.askList {
/* width: 14%; */
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #666666;
background-color: #f6f6f6;
padding: 5rpx 15rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
}
.ask {
overflow: hidden;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: flex-start;
margin: 20rpx 0;
}
.head_right {
ont-family: PingFangSC-Medium;
font-size: 28rpx;
color: #F46161;
font-weight: bold;
}
.head_left {
font-family: PingFangSC-Medium;
font-size: 32rpx;
font-weight: bold;
color: #333333;
width: 350rpx;
overflow: hidden;
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.highlight {
color: #F46161;
}
.body {
width: 690rpx;
margin: 0rpx auto;
background-color: #fefefe;
overflow: hidden;
box-sizing: border-box;
padding: 20rpx;
padding-bottom: 0;
border-radius: 20rpx;
margin-top: 20rpx;
}
.heads {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View File

@@ -90,7 +90,8 @@
near: {
type: Boolean,
default: false
}
},
position: Object,
},
data() {
return {

View File

@@ -130,7 +130,7 @@
if (this.option && this.option.apikey) {
const script = document.createElement('script')
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this)
document.head.appendChild(script)
}
@@ -145,7 +145,7 @@
if (this.option.apikey) {
const script = document.createElement('script')
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this)
document.head.appendChild(script)

View File

@@ -193,7 +193,7 @@
if (this.option && this.option.apikey) {
const script = document.createElement('script')
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this)
document.head.appendChild(script)
@@ -212,7 +212,7 @@
if (this.option.apikey) {
const script = document.createElement('script')
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this)
document.head.appendChild(script)

View File

@@ -133,7 +133,7 @@
mask: true
})
uni.request({
url: 'http://api.tianditu.gov.cn/v2/search',
url: 'https://api.tianditu.gov.cn/v2/search',
method: 'GET',
data: params,
success: res => {
@@ -257,7 +257,6 @@
tk: e.apikey
},
success: res => {
//console.log(res);
if (res.data.result) {
const value = that.formatterAdressLocation(res.data.result, 1)
that.arr_list = [value]
@@ -269,7 +268,36 @@
}
},
fail: () => {
//console.log('获取失败')
if (window.location.origin.search('localhost') >= 0 || window.location.origin
.search('10.165.0.173') >= 0) { // 测试环境
const value = that.formatterAdressLocation({
"formatted_address": "四川省德阳市广汉市西高镇李家院子东北约95米",
"location": {
"lon": 104.20046,
"lat": 31.0513
},
"addressComponent": {
"address": "李家院子",
"town": "高坪镇",
"nation": "中国",
"city": "德阳市",
"county_code": "156510681",
"poi_position": "东北",
"county": "广汉市",
"city_code": "156510600",
"address_position": "东北",
"poi": "李家院子",
"province_code": "156510000",
"town_code": "156510681103",
"province": "四川省",
"road": "洛小路",
"road_distance": 126,
"address_distance": 95,
"poi_distance": 95
}
}, 1)
that.arr_list = [value]
}
},
complete: () => {
uni.hideLoading();

View File

@@ -6,6 +6,8 @@ module.exports = {
apiKey: 'e4266a5e84fe6c10f60c559967f0a03f',
// 显示标题
showTitle: false,
loginURl: 'https://dy12333.org.cn/h5/#/pages/qyPackge/user/login/login',
AESKey: 'mL8na90u+5hoa/HKiMinvA==',
// map 1、黑色模块 2、白色模块
// supperMap: 'http://10.165.0.44:1205/proxy/rest/maps/f346b6c59dc64d5793713cf384fab78d/33cbaa14370449a08588f1074ecfec67',
// supperMap: 'http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768',

24
main.js
View File

@@ -8,6 +8,9 @@ import tools from '@/untils/tools.js'
import {
VueJsonp
} from 'vue-jsonp'
import {
GoLogin
} from '@/untils/AxiosUtils.js';
// 注册全局组件
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
@@ -16,9 +19,21 @@ import {
import empty from '@/components/empty/empty.vue'
function haslogin() {
return !!store.state.user.token
}
function hasResume() { // 是否填写简历
const data = store.state.user.resumeInfo
if (!(data.education && data.telephone && data.wage && data.workplace)) {
return false
}
return true
}
function navTo(url, needLogin) {
console.log(url)
if (needLogin) {
if (needLogin && !haslogin()) {
GoLogin()
return
}
uni.navigateTo({
@@ -26,6 +41,7 @@ function navTo(url, needLogin) {
})
}
const msg = (title, duration = 1500, mask = false, icon = 'none') => {
uni.showToast({
title,
@@ -50,7 +66,9 @@ Vue.component('super-map', superMapView)
Vue.component('empty', empty)
Vue.prototype.$api = {
msg,
sleep
sleep,
haslogin,
hasResume
}
Vue.prototype.tools = tools
Vue.prototype.$config = config

View File

@@ -5,6 +5,7 @@
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"sassImplementationName": "node-sass",
"app-plus": {
"usingComponents": true,
"compilerVersion": 3,
@@ -65,11 +66,7 @@
},
"h5": {
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI"
}
}
"maps": {}
},
"template": "index.html",
"router": {

5
package-lock.json generated
View File

@@ -1805,6 +1805,11 @@
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
},
"crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"csscolorparser": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/csscolorparser/-/csscolorparser-1.0.3.tgz",

View File

@@ -18,6 +18,7 @@
"license": "ISC",
"dependencies": {
"@supermap/iclient-ol": "^11.1.1",
"crypto-js": "^4.2.0",
"decimal.js": "^10.2.0",
"js-base64": "^2.4.9",
"js-md5": "^0.7.3",
@@ -26,4 +27,4 @@
"devDependencies": {
"@supermap/babel-plugin-import": "0.0.1"
}
}
}

View File

@@ -36,7 +36,7 @@
}
},
onShow() {
if (!this.$store.state.user.token){
if (!this.$api.haslogin()){
//modalTitle, content, whetherCancel, confirmText, pageUrl, cancelUrl
showUniModal('提示','您还未登录,点击确认去登录',true,'确定','/pages/login/login','/pages/index/index')
}else{

View File

@@ -171,6 +171,9 @@
</template>
<script>
import {
GoLogin
} from '@/untils/AxiosUtils.js';
import {
mapGetters
} from 'vuex'
@@ -247,6 +250,10 @@
}
},
onShow() {
if (!this.$api.haslogin()) {
GoLogin()
return
}
this.getSkill()
},
created() {
@@ -529,6 +536,7 @@
}).then(res => {
this.isShowButton = false;
this.getResume()
this.$store.dispatch('getResumeInfo')
this.$api.msg('保存成功')
})
} else {

View File

@@ -1,153 +1,158 @@
<template>
<view class="body">
<!-- <view class="tab">
<v-tabs :tabs="['全部任务','全部岗位']" v-model="activeTab" color="#999" activeColor="#000" fontSize="36rx"
activeFontSize="36rpx" @change='changeTab' />
</view> -->
<block v-for="(page, pIndex) in data" :key="pIndex">
<block v-for="(item, index) in page" :key="item.id">
<view class="probody">
<company-list :companyitem="item" :noApply="false"></company-list>
<view class="baddd"></view>
<!-- <block>
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
<image src="/static/img/tab.blue.svg" mode="" v-else-if="item.status === 2"></image>
<image src="/static/img/tab.green.svg" mode="" v-else-if="item.status === 3"></image>
<image src="/static/img/tab.gray.svg" mode="" v-else></image>
</block> -->
</view>
</block>
</block>
<view class="nothing" v-if="data.length === 0">
<image src="/static/img/pic_notask.svg" mode=""></image>
<view class="nothingContnt">
暂无收藏信息
</view>
</view>
</view>
</template>
<script>
import vTabs from '@/components/v-tabs/v-tabs.vue';
import companyList from '@/components/companyList/collectionList.vue';
import {
myCollection
} from '@/api/mission.js';
export default {
components: {
vTabs,
companyList
},
data() {
return {
data: [],
activeTab: 0,
current: 1,
size: 10,
total: 0
}
},
onLoad: function() {
this.init()
},
/*页面滚动到底部 换页*/
onReachBottom: function() {
if (this.current <= Math.ceil(this.total / this.size)) {
this.getData();
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
},
/*下拉刷新*/
onPullDownRefresh:function(){
this.init()
},
methods: {
init(){
this.current = 1
this.data = []
this.getData()
},
getData() {
var status = Number(this.activeTab) + 1
myCollection(this.current, this.size, status).then(res => {
uni.stopPullDownRefresh();
if (this.current === 1) {
this.data = [];
}
this.current += 1;
this.total = res.data.data.total;
if (res.data.data && res.data.data.records.length) {
this.data.push(res.data.data.records);
}
})
},
gomap: function() {
uni.navigateTo({
url: '../mapSeach/mapSeach'
})
},
changeTab: function(e) {
this.activeTab = e;
this.init()
}
}
}
</script>
<style scoped>
page {
height: 100%;
}
.tab {
height: 46px;
}
.body {
height: 100%;
}
.probody image {
width: 88rpx;
height: 88rpx;
position: absolute;
right: 0;
top: 0;
}
.probody {
width: 100%;
position: relative;
}
.baddd {
background: #f6f6f6;
height: 20rpx;
}
.nothing {
height: 100%;
padding-top: 50%;
box-sizing: border-box;
}
.nothing image {
width: 400rpx;
height: 200rpx;
display: block;
margin: 0 auto;
}
.nothingContnt {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666;
margin-top: 30rpx;
text-align: center;
}
</style>
<template>
<view class="body">
<!-- <view class="tab">
<v-tabs :tabs="['全部任务','全部岗位']" v-model="activeTab" color="#999" activeColor="#000" fontSize="36rx"
activeFontSize="36rpx" @change='changeTab' />
</view> -->
<block v-for="(page, pIndex) in data" :key="pIndex">
<block v-for="(item, index) in page" :key="item.id">
<view class="probody">
<company-list :companyitem="item" :noApply="false" :location="userLocation"></company-list>
<view class="baddd"></view>
<!-- <block>
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
<image src="/static/img/tab.blue.svg" mode="" v-else-if="item.status === 2"></image>
<image src="/static/img/tab.green.svg" mode="" v-else-if="item.status === 3"></image>
<image src="/static/img/tab.gray.svg" mode="" v-else></image>
</block> -->
</view>
</block>
</block>
<view class="nothing" v-if="data.length === 0">
<image src="/static/img/pic_notask.svg" mode=""></image>
<view class="nothingContnt">
暂无收藏信息
</view>
</view>
</view>
</template>
<script>
import vTabs from '@/components/v-tabs/v-tabs.vue';
import companyList from '@/components/companyList/collectionList.vue';
import {
myCollection
} from '@/api/mission.js';
import {
mapGetters
} from 'vuex'
export default {
components: {
vTabs,
companyList
},
data() {
return {
data: [],
activeTab: 0,
current: 1,
size: 10,
total: 0
}
},
computed: {
...mapGetters(['userLocation']),
},
onLoad: function() {
this.init()
},
/*页面滚动到底部 换页*/
onReachBottom: function() {
if (this.current <= Math.ceil(this.total / this.size)) {
this.getData();
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
},
/*下拉刷新*/
onPullDownRefresh: function() {
this.init()
},
methods: {
init() {
this.current = 1
this.data = []
this.getData()
},
getData() {
var status = Number(this.activeTab) + 1
myCollection(this.current, this.size, status).then(res => {
uni.stopPullDownRefresh();
if (this.current === 1) {
this.data = [];
}
this.current += 1;
this.total = res.data.data.total;
if (res.data.data && res.data.data.records.length) {
this.data.push(res.data.data.records);
}
})
},
gomap: function() {
uni.navigateTo({
url: '../mapSeach/mapSeach'
})
},
changeTab: function(e) {
this.activeTab = e;
this.init()
}
}
}
</script>
<style scoped>
page {
height: 100%;
}
.tab {
height: 46px;
}
.body {
height: 100%;
}
.probody image {
width: 88rpx;
height: 88rpx;
position: absolute;
right: 0;
top: 0;
}
.probody {
width: 100%;
position: relative;
}
.baddd {
background: #f6f6f6;
height: 20rpx;
}
.nothing {
height: 100%;
padding-top: 50%;
box-sizing: border-box;
}
.nothing image {
width: 400rpx;
height: 200rpx;
display: block;
margin: 0 auto;
}
.nothingContnt {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666;
margin-top: 30rpx;
text-align: center;
}
</style>

View File

@@ -191,16 +191,16 @@
</view>
</view>
<view class="info_market">
<!-- <view class="info_market">
<view class="market_top">
<view class="top_log"></view>
<view class="next_market" @click="navTo('/pages/market/market')">去市场</view>
</view>
<!-- <view class="market_bottom">
<view class="market_bottom">
<view>了解市场<u-icon name="arrow-right" color="#666666" size="13"></u-icon></view>
<view>我要咨询<u-icon name="arrow-right" color="#666666" size="13"></u-icon></view>
</view> -->
</view>
</view>
</view> -->
<view class="latestMission">
<view class="cardTips"
@@ -289,36 +289,26 @@
policyContentList: [],
policyType: 1,
swiperType: 1,
IsResume: true,
};
},
onLoad: function(options) {
myResume().then(res => {
const data = res.data.data
if (!(data.education && data.telephone && data.wage && data.workplace)) {
this.goures()
this.$api.sleep(1000).then(() => {
this.$api.msg('请输入基本信息')
})
}
})
if (this.$api.haslogin()) {
this.$store.dispatch('getResumeInfo')
}
},
onShow: function() {
if (!this.$store.state.user.token) {
uni.reLaunch({
url: '/pages/login/login'
})
return
}
this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth
if (!auth.bankCardState) {
this.step()
}
})
this.download()
this.getSwiperList()
this.getPolicy()
if (this.$api.haslogin()) {
this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth
if (!auth.bankCardState) {
this.step()
}
})
}
},
onReady() {
uni.setNavigationBarTitle({
@@ -394,11 +384,11 @@
})
},
download: function() {
this.isLogin = this.$store.state.user.token ? true : false;
this.isLogin = this.$api.haslogin() ? true : false;
newMission().then(res => {
this.companyList = res.data.data;
});
if (this.$store.state.user.token) {
if (this.$api.haslogin()) {
uni.$emit('newsReadChange')
this.$store.dispatch("getUnreadNum");
recMission().then(res => {
@@ -407,25 +397,7 @@
};
},
goLocation: function() {
if (!this.$store.state.user.token) {
uni.showModal({
title: '提示',
content: '您还未登录,点击确认去登录',
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: "/pages/login/login"
});
} else if (res.cancel) {
return
}
}
});
} else {
uni.navigateTo({
url: '../mapSeach/mapSeach'
});
}
this.navTo('../mapSeach/mapSeach', true)
},
goResume: function() {
uni.navigateTo({
@@ -439,40 +411,16 @@
});
},
goures: function() {
if (!this.$store.state.user.token) {
uni.showModal({
title: '提示',
content: '您还未登录,点击确认去登录',
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: "/pages/login/login"
});
} else if (res.cancel) {
return
}
}
});
} else {
uni.navigateTo({
url: '/pageMy/my/resume/index'
});
}
this.navTo('/pageMy/my/resume/index', true)
},
toNewTask() {
uni.navigateTo({
url: `/pages/project/newProject?tabIndex=${0}`
});
this.navTo(`/pages/project/newProject?tabIndex=${0}`, false)
},
toNewWork() {
uni.navigateTo({
url: `/pages/project/newProject?tabIndex=${1}`
});
this.navTo(`/pages/project/newProject?tabIndex=${1}`, false)
},
toNewProject() {
uni.navigateTo({
url: `/pages/project/newProject?tabIndex=${2}`
});
this.navTo(`/pages/project/newProject?tabIndex=${2}`, false)
},
toArticleDetail(id) {
if (id) {
@@ -482,49 +430,11 @@
}
},
gouserSet: function() {
if (!this.$store.state.user.token) {
uni.showModal({
title: '提示',
content: '您还未登录,点击确认去登录',
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: "/pages/login/login"
});
} else if (res.cancel) {
return
}
}
});
} else {
uni.navigateTo({
url: '/pageMy/setUserBase/index'
});
}
this.navTo('/pageMy/setUserBase/index', true)
},
goSeach: function() {
if (!this.$store.state.user.token) {
uni.showModal({
title: '提示',
content: '您还未登录,点击确认去登录',
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: '/pages/login/login'
})
} else if (res.cancel) {
return
}
}
});
} else {
// if (this.keywords) {
uni.navigateTo({
url: '../seach/seach?keywords=' + this.keywords
});
this.keywords = ''
// }
}
this.navTo('../seach/seach?keywords=' + this.keywords, true)
this.keywords = ''
},
getSwiperList() {
getSwiperList(this.swiperType).then(res => {

View File

@@ -7,6 +7,9 @@
import {
mapGetters
} from 'vuex'
import {
GoLogin
} from '@/untils/AxiosUtils.js';
import website from '@/config/website.js'
export default {
data() {
@@ -17,7 +20,7 @@
},
onLoad(options) {
uni.showLoading({
title: ''
title: '登录中'
})
if (options.token) {
const that = this
@@ -39,7 +42,6 @@
if (!auth.bankCardState) {
that.goSign(0)
} else {
uni.switchTab({
url: '/pages/index/index'
})
@@ -50,9 +52,10 @@
// this.$refs.code.refushCode()
});
} else {
uni.reLaunch({
url: '/pages/login/login'
})
// uni.reLaunch({
// url: '/pages/login/login'
// })
GoLogin()
}
},
method: {

View File

@@ -1,170 +1,171 @@
<template>
<login-template title="账号登录">
<!-- #ifdef H5 -->
<!-- <view class="login-go-home" @click="goHome">
<image class="login-go-home-image" src="@/static/img/home.svg"></image>
</view> -->
<!-- #endif -->
<jl-input type="text" v-model="phone" placeholder="请输入手机号" @confirm="login"></jl-input>
<jl-input type="text" v-model="password" placeholder="请输入登录密码" @confirm="login" showPassword clearable></jl-input>
<!-- <code-input ref="code" v-model="code" :getCode="getCaptcha" @key-change="keyChange" @confirm="login"></code-input> -->
<view v-if="loading" class="btn nocheck" loading="true"></view>
<view v-else-if="validate" class="btn" @click="login">立即登录</view>
<view v-else class="btn nocheck">立即登录</view>
<!-- <view class="changeLogintype">
<view class="" @click="goReg">手机注册</view>
<view class="" @click="goForget">忘记密码</view>
</view> -->
</login-template>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
getCaptcha
} from '@/api/user.js'
import {
isMobile
} from '@/untils/validate.js'
import website from '@/config/website.js'
import codeInput from './codeInput.vue'
import jlInput from '@/components/jl-input/main.vue'
import loginTemplate from './template.vue'
export default {
components: {
jlInput,
codeInput,
loginTemplate
},
data() {
return {
phone: '',
password: '',
code: '1111',
key: '',
loading: false
}
},
created() {
if (this.userInfo.token) {
uni.navigateBack()
}
},
onShow() {
// #ifdef MP-WEIXIN
wx.hideHomeButton();
//#endif
this.password = ''
if (this.$store.state.user.token) {
this.$store.dispatch('LogOut').then(() => {
this.$store.dispatch('clearAuthState')
this.$store.dispatch('endRefreshNewsTimer')
})
}
},
methods: {
goHome() {
uni.switchTab({
url: '/pages/index/index'
})
},
login(e) {
if (this.validate) {
this.userChecked = true;
console.log(this.userChecked)
// if (!this.userChecked) {
// uni.showToast({
// title:'请先阅读并同意《服务及隐私协议》',
// icon:'none',
// })
// } else {
var that = this
this.loading = true
this.$store.dispatch("LoginByUsername", {
username: this.phone,
password: this.password,
key: this.key,
code: this.code,
type: "account",
tenantId: website.tenantId
}).then((resp) => {
this.$store.dispatch('refreshAuthState').then(() => {
that.loading = false
var auth = this.auth
if (!auth.bankCardState) {
that.goSign(0)
} else {
uni.switchTab({
url: '/pages/index/index'
})
}
})
}).catch((err) => {
this.loading = false
// this.$refs.code.refushCode()
location.href = "https://dy12333.org.cn/h5/"
});
// }
}
},
// 步骤
goSign(active) {
uni.navigateTo({
url: `/pages/projectInfo/signContract?active=${active}`
})
},
keyChange(val) {
this.key = val
},
goReg() {
uni.navigateTo({
url: './reg'
})
},
goForget() {
uni.navigateTo({
url: './forgetPwd'
})
},
getCaptcha
},
computed: {
...mapGetters(['userInfo', 'auth', 'autograph', 'userChecked']),
validate() {
return this.phone && this.password && this.code
}
}
}
</script>
<style>
@import "./css.css";
/* #ifdef H5 */
.login-go-home {
position: absolute;
top: 10rpx;
left: 0;
border-radius: 50%;
width: 60rpx;
height: 60rpx;
background: rgb(217, 217, 217);
border: 1px solid rgb(198, 198, 198);
}
.login-go-home-image {
width: 40rpx;
height: 40rpx;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
/* #endif */
</style>
<template>
<login-template title="账号登录">
<!-- #ifdef H5 -->
<!-- <view class="login-go-home" @click="goHome">
<image class="login-go-home-image" src="@/static/img/home.svg"></image>
</view> -->
<!-- #endif -->
<jl-input type="text" v-model="phone" placeholder="请输入手机号" @confirm="login"></jl-input>
<jl-input type="text" v-model="password" placeholder="请输入登录密码" @confirm="login" showPassword
clearable></jl-input>
<!-- <code-input ref="code" v-model="code" :getCode="getCaptcha" @key-change="keyChange" @confirm="login"></code-input> -->
<view v-if="loading" class="btn nocheck" loading="true"></view>
<view v-else-if="validate" class="btn" @click="login">立即登录</view>
<view v-else class="btn nocheck">立即登录</view>
<!-- <view class="changeLogintype">
<view class="" @click="goReg">手机注册</view>
<view class="" @click="goForget">忘记密码</view>
</view> -->
</login-template>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
getCaptcha
} from '@/api/user.js'
import {
isMobile
} from '@/untils/validate.js'
import website from '@/config/website.js'
import codeInput from './codeInput.vue'
import jlInput from '@/components/jl-input/main.vue'
import loginTemplate from './template.vue'
export default {
components: {
jlInput,
codeInput,
loginTemplate
},
data() {
return {
phone: '',
password: '',
code: '1111',
key: '',
loading: false
}
},
created() {
if (this.userInfo.token) {
uni.navigateBack()
}
},
onShow() {
// #ifdef MP-WEIXIN
wx.hideHomeButton();
//#endif
this.password = ''
if (this.$api.haslogin()) {
this.$store.dispatch('LogOut').then(() => {
this.$store.dispatch('clearAuthState')
this.$store.dispatch('endRefreshNewsTimer')
})
}
},
methods: {
goHome() {
uni.switchTab({
url: '/pages/index/index'
})
},
login(e) {
if (this.validate) {
this.userChecked = true;
console.log(this.userChecked)
// if (!this.userChecked) {
// uni.showToast({
// title:'请先阅读并同意《服务及隐私协议》',
// icon:'none',
// })
// } else {
var that = this
this.loading = true
this.$store.dispatch("LoginByUsername", {
username: this.phone,
password: this.password,
key: this.key,
code: this.code,
type: "account",
tenantId: website.tenantId
}).then((resp) => {
this.$store.dispatch('refreshAuthState').then(() => {
that.loading = false
var auth = this.auth
if (!auth.bankCardState) {
that.goSign(0)
} else {
uni.switchTab({
url: '/pages/index/index'
})
}
})
}).catch((err) => {
this.loading = false
// this.$refs.code.refushCode()
location.href = "https://dy12333.org.cn/h5/"
});
// }
}
},
// 步骤
goSign(active) {
uni.navigateTo({
url: `/pages/projectInfo/signContract?active=${active}`
})
},
keyChange(val) {
this.key = val
},
goReg() {
uni.navigateTo({
url: './reg'
})
},
goForget() {
uni.navigateTo({
url: './forgetPwd'
})
},
getCaptcha
},
computed: {
...mapGetters(['userInfo', 'auth', 'autograph', 'userChecked']),
validate() {
return this.phone && this.password && this.code
}
}
}
</script>
<style>
@import "./css.css";
/* #ifdef H5 */
.login-go-home {
position: absolute;
top: 10rpx;
left: 0;
border-radius: 50%;
width: 60rpx;
height: 60rpx;
background: rgb(217, 217, 217);
border: 1px solid rgb(198, 198, 198);
}
.login-go-home-image {
width: 40rpx;
height: 40rpx;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
/* #endif */
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,353 +1,373 @@
<template>
<view class="body">
<view class="head">
<view class="userTitle">
<image v-if="userInfo.avatar" :src="userInfo.avatar" mode=""></image>
<image v-else src="../../static/img/head.svg" mode=""></image>
<view class="userRight">
<view class="userTel" v-if="userInfo.user_name">
{{ auth.authInfo.realName ? auth.authInfo.realName :
phoneFilter(userInfo.user_name) }}
</view>
<view class="userTel" v-else> </view>
<view class="userContent">
<view style="margin-right: 40rpx;">实名认证{{ auth.realNameState ? '已认证' : '未认证' }}</view>
<!-- <view>银行卡核验{{auth.bankCardState?'已认证':'未认证'}}</view> -->
</view>
</view>
</view>
<view class="centerBar">
<view class="BarList" @click="go('/pages/my/Browsinghistory')">
<image src="../../static/img/resumeMy.svg" mode=""></image>
我的邀请
</view>
<view class="BarList" @click="go('/pageMy/myProject/myProject')">
<image src="../../static/img/job.svg" mode=""></image>
我的申请
</view>
<view class="BarList" @click="go('/pageMy/myProject/myCollection')">
<image src="../../static/img/salary.svg" mode=""></image>
我的收藏
</view>
<view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
<image src="../../static/img/contract.png" mode=""></image>
浏览记录
</view>
<!-- <view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
<image src="../../static/img/contract.png" mode=""></image>
我要招工
</view> -->
</view>
</view>
<view style="height: 104rpx;"></view>
<!-- <view class="federation">
<view>新业态职工工会联合会</view>
<view v-if="!federationStatus" class="forMembership" @click="go('/pageMy/federation/forMembership/Notice')">申请入</view>
<view v-else class="forMembership" @click="go('/pageMy/federation/vip/information')">已加入</view>
</view> -->
<view class="btn">
<view class="btnList" @click="go('/pages/recruit/recruit')">
<image src="../../static/img/zhao_gong.png" mode=""></image>
我要招工
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="go('/pageMy/setUserBase/index')">
<image src="../../static/img/ID.svg" mode=""></image>
认证信息
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/mailbox')">
<image src="../../static/img/evaluate.png" mode=""></image>
咨询信箱
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/applicationsRecord')">
<image src="../../static/img/phone.svg" mode=""></image>
问卷调查
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/survey')">
<image src="../../static/img/phone.svg" mode=""></image>
用工调研
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/complain')">
<image src="../../static/img/vip.svg" mode=""></image>
投诉建议
<image src="../../static/img/right.svg" mode=""></image>
</view>
<template v-if="user.userIsCms">
<view class="btnList" @click="navTo('/pageMy/admin/check')">
<image src="../../static/img/check1.png" mode=""></image>
岗位发布审核
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/admin/dengji')">
<image src="../../static/img/dji.png" mode=""></image>
线下服务记录登记
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/admin/admin')">
<image src="../../static/img/dji.png" mode=""></image>
零工人员登记
<image src="../../static/img/right.svg" mode=""></image>
</view>
</template>
<!-- <view class="btnList" @click="go('/pageMy/apply/applications')">
<image src="../../static/img/apply.png" mode=""></image>
我的申请
<image src="../../static/img/right.svg" mode=""></image>
</view> -->
<!-- <view class="btnList" @click="go('/pageMy/help/help')">
<image src="../../static/img/help.svg" mode=""></image>
帮助与反馈
<image src="../../static/img/right.svg" mode=""></image>
</view> -->
<!-- <view class="btnList" @click="go('/pageMy/my/set')">
<image src="../../static/img/set.svg" mode=""></image>
设置
<image src="../../static/img/right.svg" mode=""></image>
</view> -->
</view>
<!-- <view class="btn-out" @click="logout">
退出登录
</view> -->
<view class="bottom" @click="makePhoneCall">
<view>德阳市人社局 电话0838-2505580</view>
<view>地址德阳市旌阳区天山南路1段-102</view>
</view>
<cs-button></cs-button>
</view>
</template>
<script>
import {
mapState,
mapGetters
} from 'vuex'
import {
phoneFilter,
stringFilterNum
} from '@/untils/format.js'
import {
labourUnionInfo
} from '@/api/federation.js'
export default {
data() {
return {
federationStatus: false
}
},
onLoad() {
this.$store.dispatch('getMobileIsCms')
// if (this.$store.state.user.token && this.authPass) {
// this.$store.dispatch('getVipCode')
// }
},
onShow() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: '/pages/login/login'
})
} else {
uni.$emit('newsReadChange')
this.$store.dispatch('refreshAuthState')
}
// this.labourUnionInfoInit()
},
methods: {
labourUnionInfoInit() {
labourUnionInfo().then(e => {
this.federationStatus = e.data.data.joined
})
},
// logout() {
// this.$store.dispatch('LogOut').then(() => {
// // uni.reLaunch({
// // url: '/pages/login/login'
// // })
// this.$store.dispatch('clearAuthState')
// this.$store.dispatch('endRefreshNewsTimer')
// location.href = "https://dy12333.org.cn/h5/"
// })
// },
go(url) {
uni.navigateTo({
url
})
},
makePhoneCall: function() {
uni.makePhoneCall({
phoneNumber: "18500206848"
})
},
phoneFilter,
stringFilterNum
},
computed: {
...mapState(['user']),
...mapGetters(['userInfo', 'auth', 'authPass'])
}
}
</script>
<style>
page {
height: 100%;
background: #f6f6f6;
}
.federation {
height: 48rpx;
border-radius: 10rpx;
padding: 28rpx 30rpx;
margin: 30rpx;
font-size: 32rpx;
font-weight: 400;
color: #6F5931;
display: flex;
justify-content: space-between;
align-items: center;
background: url(../../static/img/my/mybanner.png) no-repeat;
background-size: cover;
}
.forMembership {
width: 140rpx;
height: 50rpx;
background: linear-gradient(112deg, #EFE0BC 0%, #D29A5A 100%, #DDBA88 100%);
box-shadow: 0px 0px 2px 1px rgba(231, 174, 85, 0.39);
border-radius: 25rpx;
font-size: 26rpx;
font-weight: 400;
color: #6F5931;
line-height: 48rpx;
text-align: center;
}
.bottom {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
/* position: absolute; */
/* bottom: 120rpx; */
/* width: 100%; */
margin: 120rpx 0;
text-align: center;
}
.btnList image:last-child {
width: 19rpx;
height: 32rpx;
margin-left: auto;
margin-right: 0;
}
.btnList image {
width: 52rpx;
height: 52rpx;
margin-right: 10rpx;
}
.btnList {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 30rpx 20rpx;
}
.btn {
width: 690rpx;
margin: 0 auto;
border-radius: 15rpx;
background: #fefefe;
}
.BarList {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
float: left;
width: 25%;
text-align: center;
padding: 30rpx 0rpx;
}
.BarList image {
width: 52rpx;
height: 52rpx;
display: block;
margin: 0 auto;
}
.centerBar {
width: 690rpx;
background-color: #fefefe;
border-radius: 15rpx;
overflow: hidden;
position: absolute;
bottom: -70rpx;
left: 30rpx;
}
.userContent {
font-family: PingFangSC-Regular;
font-size: 26rpx;
color: #FFFFFF;
display: flex;
}
.userTel {
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #FFFFFF;
}
.userRight {
float: left;
height: 50rpx;
line-height: 50rpx;
}
.userTitle image {
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
float: left;
border-radius: 200rpx;
background-color: rgba(255, 255, 255, .3);
}
.userTitle {
padding: 0 30rpx;
}
.head {
background-color: #1B66FF;
width: 100%;
height: 200rpx;
padding-top: 200rpx;
position: relative;
}
.body {
background: #f6f6f6;
height: 100%;
position: relative;
overflow: auto;
}
/* .btn-out {
background-color: #fefefe;
margin-top: 20rpx;
padding: 20rpx 0;
text-align: center;
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #F46161;
} */
</style>
<template>
<view class="body">
<view class="head">
<view class="userTitle">
<image v-if="userInfo.avatar" :src="userInfo.avatar" mode=""></image>
<image v-else src="../../static/img/head.svg" mode=""></image>
<view class="userRight">
<view class="userTel" v-if="userInfo.user_name">
{{ auth.authInfo.realName ? auth.authInfo.realName : phoneFilter(userInfo.user_name) }}
</view>
<view class="userTel" v-else></view>
<view class="userContent">
<view style="margin-right: 40rpx">
实名认证{{ auth.realNameState ? '已认证' : '未认证' }}
</view>
<!-- <view>银行卡核验{{auth.bankCardState?'已认证':'未认证'}}</view> -->
</view>
</view>
</view>
<view class="centerBar">
<view class="BarList" @click="go('/pages/my/Browsinghistory')">
<image src="../../static/img/resumeMy.svg" mode=""></image>
我的邀请
</view>
<view class="BarList" @click="go('/pageMy/myProject/myProject')">
<image src="../../static/img/job.svg" mode=""></image>
我的申请
</view>
<view class="BarList" @click="go('/pageMy/myProject/myCollection')">
<image src="../../static/img/salary.svg" mode=""></image>
我的收藏
</view>
<view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
<image src="../../static/img/contract.png" mode=""></image>
浏览记录
</view>
<!-- <view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
<image src="../../static/img/contract.png" mode=""></image>
我要招工
</view> -->
</view>
</view>
<view style="height: 104rpx"></view>
<!-- <view class="federation">
<view>新业态职工工会联合</view>
<view v-if="!federationStatus" class="forMembership" @click="go('/pageMy/federation/forMembership/Notice')">申请入会</view>
<view v-else class="forMembership" @click="go('/pageMy/federation/vip/information')">已加入</view>
</view> -->
<view class="btn">
<view class="btnList" @click="go('/pages/recruit/recruit')">
<image src="../../static/img/zhao_gong.png" mode=""></image>
我要招工
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="go('/pageMy/setUserBase/index')">
<image src="../../static/img/ID.svg" mode=""></image>
认证信息
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/mailbox')">
<image src="../../static/img/evaluate.png" mode=""></image>
咨询信箱
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/applicationsRecord')">
<image src="../../static/img/phone.svg" mode=""></image>
问卷调查
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/survey')">
<image src="../../static/img/phone.svg" mode=""></image>
用工调研
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/setUserBase/complain')">
<image src="../../static/img/vip.svg" mode=""></image>
投诉建议
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList">
<image src="../../static/img/vip.svg" mode=""></image>
消息提醒
<switch class="imgswitch" :checked="user.isEnbleNotice" @change="switch1Change" />
</view>
<template v-if="user.userIsCms">
<view class="btnList" @click="navTo('/pageMy/admin/check')">
<image src="../../static/img/check1.png" mode=""></image>
岗位发布审核
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/admin/dengji')">
<image src="../../static/img/dji.png" mode=""></image>
线下服务记录登记
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/admin/admin')">
<image src="../../static/img/dji.png" mode=""></image>
零工人员登记
<image src="../../static/img/right.svg" mode=""></image>
</view>
</template>
<!-- <view class="btnList" @click="go('/pageMy/apply/applications')">
<image src="../../static/img/apply.png" mode=""></image>
我的申请
<image src="../../static/img/right.svg" mode=""></image>
</view> -->
<!-- <view class="btnList" @click="go('/pageMy/help/help')">
<image src="../../static/img/help.svg" mode=""></image>
帮助与反馈
<image src="../../static/img/right.svg" mode=""></image>
</view> -->
<!-- <view class="btnList" @click="go('/pageMy/my/set')">
<image src="../../static/img/set.svg" mode=""></image>
设置
<image src="../../static/img/right.svg" mode=""></image>
</view> -->
</view>
<!-- <view class="btn-out" @click="logout">
退出登录
</view> -->
<view class="bottom" @click="makePhoneCall">
<view>德阳市人社局 电话0838-2505580</view>
<view>地址德阳市旌阳区天山南路1段-102</view>
</view>
<cs-button></cs-button>
</view>
</template>
<script>
import { GoLogin } from '@/untils/AxiosUtils.js';
import { mapState, mapGetters } from 'vuex';
import { phoneFilter, stringFilterNum } from '@/untils/format.js';
import { labourUnionInfo } from '@/api/federation.js';
export default {
data() {
return {
federationStatus: false,
};
},
onLoad() {
// this.$store.dispatch('getMobileIsCms')
// if (this.$api.haslogin() && this.authPass) {
// this.$store.dispatch('getVipCode')
// }
},
onShow() {
if (/token/g.test(location.href)) {
this.$api.sleep(2000).then(() => {
if (!this.$api.haslogin()) {
GoLogin();
} else {
uni.$emit('newsReadChange');
this.$store.dispatch('refreshAuthState');
}
});
} else {
if (!this.$api.haslogin()) {
GoLogin();
} else {
uni.$emit('newsReadChange');
this.$store.dispatch('refreshAuthState');
}
}
// this.labourUnionInfoInit()
},
methods: {
switch1Change(e) {
if (e.detail.value) {
this.$store.dispatch('setNoticeOpen');
} else {
this.$store.dispatch('setNoticeClose');
}
},
labourUnionInfoInit() {
labourUnionInfo().then((e) => {
this.federationStatus = e.data.data.joined;
});
},
// logout() {
// this.$store.dispatch('LogOut').then(() => {
// // uni.reLaunch({
// // url: '/pages/login/login'
// // })
// this.$store.dispatch('clearAuthState')
// this.$store.dispatch('endRefreshNewsTimer')
// location.href = "https://dy12333.org.cn/h5/"
// })
// },
go(url) {
uni.navigateTo({
url,
});
},
makePhoneCall: function () {
uni.makePhoneCall({
phoneNumber: '18500206848',
});
},
phoneFilter,
stringFilterNum,
},
computed: {
...mapState(['user']),
...mapGetters(['userInfo', 'auth', 'authPass']),
},
};
</script>
<style>
page {
height: 100%;
background: #f6f6f6;
}
.federation {
height: 48rpx;
border-radius: 10rpx;
padding: 28rpx 30rpx;
margin: 30rpx;
font-size: 32rpx;
font-weight: 400;
color: #6f5931;
display: flex;
justify-content: space-between;
align-items: center;
background: url(../../static/img/my/mybanner.png) no-repeat;
background-size: cover;
}
.forMembership {
width: 140rpx;
height: 50rpx;
background: linear-gradient(112deg, #efe0bc 0%, #d29a5a 100%, #ddba88 100%);
box-shadow: 0px 0px 2px 1px rgba(231, 174, 85, 0.39);
border-radius: 25rpx;
font-size: 26rpx;
font-weight: 400;
color: #6f5931;
line-height: 48rpx;
text-align: center;
}
.bottom {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
/* position: absolute; */
/* bottom: 120rpx; */
/* width: 100%; */
margin: 120rpx 0;
text-align: center;
}
.btnList image:last-child {
width: 19rpx;
height: 32rpx;
margin-left: auto;
margin-right: 0;
}
.imgswitch {
margin-left: auto;
margin-right: 0;
}
.btnList image {
width: 52rpx;
height: 52rpx;
margin-right: 10rpx;
}
.btnList {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 30rpx 20rpx;
}
.btn {
width: 690rpx;
margin: 0 auto;
border-radius: 15rpx;
background: #fefefe;
}
.BarList {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
float: left;
width: 25%;
text-align: center;
padding: 30rpx 0rpx;
}
.BarList image {
width: 52rpx;
height: 52rpx;
display: block;
margin: 0 auto;
}
.centerBar {
width: 690rpx;
background-color: #fefefe;
border-radius: 15rpx;
overflow: hidden;
position: absolute;
bottom: -70rpx;
left: 30rpx;
}
.userContent {
font-family: PingFangSC-Regular;
font-size: 26rpx;
color: #ffffff;
display: flex;
}
.userTel {
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #ffffff;
}
.userRight {
float: left;
height: 50rpx;
line-height: 50rpx;
}
.userTitle image {
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
float: left;
border-radius: 200rpx;
background-color: rgba(255, 255, 255, 0.3);
}
.userTitle {
padding: 0 30rpx;
}
.head {
background-color: #1b66ff;
width: 100%;
height: 200rpx;
padding-top: 200rpx;
position: relative;
}
.body {
background: #f6f6f6;
height: 100%;
position: relative;
overflow: auto;
}
/* .btn-out {
background-color: #fefefe;
margin-top: 20rpx;
padding: 20rpx 0;
text-align: center;
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #F46161;
} */
</style>

View File

@@ -27,7 +27,9 @@
import {
mapGetters
} from 'vuex'
import {
GoLogin
} from '@/untils/AxiosUtils.js';
export default {
data() {
return {
@@ -36,14 +38,21 @@
},
onLoad() {},
onShow() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
if (/token/g.test(location.href)) {
this.$api.sleep(2000).then(() => {
if (!this.$api.haslogin()) {
GoLogin()
} else {
uni.$emit('newsReadChange')
}
})
} else {
uni.$emit('newsReadChange')
if (!this.$api.haslogin()) {
GoLogin()
} else {
uni.$emit('newsReadChange')
}
}
console.log(this.news)
},
onPullDownRefresh() {
this.loading = true

View File

@@ -92,24 +92,18 @@
},
mounted() {
const _this = this
uni.getLocation({
type: 'gcj02',
success: function(res) {
const {
longitude,
latitude
} = res
_this.latitude = latitude
_this.longitude = longitude
_this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers)
})
},
fail: function(err) {
_this.$api.msg('无法获得周边信息')
},
complete: function(e) {}
})
console.log(this.$store.state.user.userLocation)
if (this.$store.state.user.userLocation) {
const {
latitude,
longitude
} = this.$store.state.user.userLocation
_this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers)
})
} else {
_this.$api.msg('无法获得周边信息')
}
},
onShow() {
// const _this = this
@@ -144,25 +138,17 @@
},
search() {
const _this = this
uni.getLocation({
type: 'gcj02',
success: function(res) {
const {
longitude,
latitude
} = res
_this.latitude = latitude
_this.longitude = longitude
_this.getList(longitude, latitude).then((covers) => {
_this.$api.msg('成功获得周边信息')
_this.$refs.uMap.addFeature(covers)
})
},
fail: function(err) {
_this.$api.msg('无法获得周边信息')
},
complete: function(e) {}
})
if (this.$store.state.user.userLocation) {
const {
latitude,
longitude
} = this.$store.state.user.userLocation
_this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers)
})
} else {
_this.$api.msg('无法获得周边信息')
}
// this.getList(this.longitude, this.latitude).then((covers) => {
// this.$api.msg('成功获得周边信息')
// console.log(covers)

View File

@@ -31,7 +31,7 @@
<block v-if="activeTab == 0">
<view v-if="newList.length > 0">
<block v-for="(item, index) in newList" :key="index">
<companyList :companyitem="item"></companyList>
<companyList :companyitem="item" :position="userLocation"></companyList>
</block>
</view>
<view v-else>
@@ -51,7 +51,7 @@
<view v-if="companyList.length > 0">
<block v-for="(item, index) in companyList" :key="item.id">
<workList :companyitem="item" :near="activeTab === 0"></workList>
<workList :companyitem="item" :position="userLocation" :near="activeTab === 0"></workList>
</block>
</view>
<view v-else>
@@ -109,7 +109,9 @@
getcoder
} from "@/api/map.js";
import verticalMenu from '@/components/vertical-menu/vertical-menu.vue';
import {
mapGetters
} from 'vuex'
export default {
components: {
vTabs,
@@ -117,15 +119,16 @@
verticalMenu,
workList
},
computed: {
...mapGetters(['userLocation']),
},
data() {
return {
policyContentList: [],
activeTab: 0,
activeTab: '0',
companyList: [],
recommendList: [],
newList: [],
nearPage: {
current: 1,
size: 10,
@@ -142,10 +145,7 @@
total: 0
},
currentAddress: '',
currentPoint: {
latitude: 0,
longitude: 0
},
key: 'FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI',
open: false,
showPopUp: false,
@@ -157,10 +157,11 @@
if (option.tabIndex) {
this.activeTab = option.tabIndex
}
this.getData()
this.getPolicy()
this.$store.dispatch('getUserLocation')
this.download()
},
onShow: function() {
const enumTitle = {
"0": '最新零工岗位',
"1": '最新全职岗位',
@@ -169,7 +170,7 @@
uni.setNavigationBarTitle({
title: enumTitle[this.activeTab]
})
if (this.$store.state.user.token) {
if (this.$api.haslogin()) {
this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth
if (!auth.bankCardState) {
@@ -177,7 +178,6 @@
}
})
}
const value = uni.getStorageSync('active');
if (value) {
this.activeTab = value;
@@ -190,13 +190,7 @@
},
/*下拉刷新*/
onPullDownRefresh: function() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
});
} else {
this.download();
}
this.download();
},
methods: {
step() {
@@ -228,30 +222,6 @@
url: '/pageMy/my/resume/addSkill'
})
},
/*定位*/
getLocation: function() {
var that = this;
uni.getLocation({
type: 'gcj02',
success: function(res) {
that.currentPoint = {
latitude: res.latitude,
longitude: res.longitude
}
// that.getAddrByPoint(res);
that.getNearList(that.currentPoint)
},
complete: function(e) {}
});
},
/*逆地址解析*/
getAddrByPoint: function(point) {
var that = this;
var location = point.latitude + ',' + point.longitude
getcoder(location, encodeURI(that.key), 0).then(res => {
that.currentAddress = res.data.result.address
});
},
goSeach: function() {
uni.navigateTo({
url: '../seach/seach'
@@ -271,8 +241,8 @@
this.activeTab = e;
},
//附近任务;
getNearList: function(point) {
nearMission(this.nearPage.current, this.nearPage.size).then(res => {
getNearList: function() {
nearMission(this.nearPage.current, this.nearPage.size, 1).then(res => {
if (this.nearPage.current === 1) {
this.companyList = [];
}
@@ -313,7 +283,7 @@
},
//最新任务;
getNewList: function() {
newMissionAll(this.newPage.current, this.newPage.size, '').then(res => {
newMissionAll(this.newPage.current, this.newPage.size, '', 1).then(res => {
if (this.newPage.current === 1) {
this.newList = [];
}
@@ -326,32 +296,31 @@
},
//上拉加载
upLoad: function() {
if (this.activeTab === 0) {
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
this.getNearList(this.currentPoint);
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === 1) {
if (this.recommendPage.current <= Math.ceil(this.recommendPage.total / this.recommendPage
.size)) {
this.getRecommendList();
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === 2) {
if (this.activeTab === '0') {
if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) {
this.getNewList();
this.getNewList()
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === '1') {
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
this.getNearList();
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === '2') {
if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) {
this.getPolicy();
} else {
uni.showToast({
icon: "none",
@@ -365,25 +334,24 @@
download: function() {
console.log(this.activeTab)
if (this.activeTab === '0') {
this.nearPage.current = 1;
console.log('123123')
this.getLocation();
this.newPage.current = 1;
this.getNewList();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
return
}
if (this.activeTab === '1') {
this.recommendPage.current = 1;
this.getRecommendList();
this.nearPage.current = 1;
this.getNearList();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
return
}
if (this.activeTab === '2') {
this.newPage.current = 1;
this.getNewList();
// this.newPage.current = 1;
this.getPolicy();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
@@ -391,20 +359,13 @@
}
},
getData: function() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
});
} else {
uni.$emit('newsReadChange');
this.nearPage.current = 1;
this.recommendPage.current = 1;
this.newPage.current = 1;
this.getLocation();
this.getRecommendList();
this.getNewList();
this.getNearList();
}
uni.$emit('newsReadChange');
this.nearPage.current = 1;
this.recommendPage.current = 1;
this.newPage.current = 1;
this.getRecommendList();
this.getNewList();
this.getNearList();
},
@@ -442,7 +403,8 @@
.content {
background-color: #f3f4f8;
padding-top: 20rpx;
min-height: 80vh;
/* min-height: 80vh; */
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
}

View File

@@ -181,7 +181,7 @@
this.getPolicy()
},
onShow: function() {
if (this.$store.state.user.token) {
if (this.$api.haslogin()) {
this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth
if (!auth.bankCardState) {
@@ -202,7 +202,7 @@
},
/*下拉刷新*/
onPullDownRefresh: function() {
if (!this.$store.state.user.token) {
if (!this.$api.haslogin()) {
uni.redirectTo({
url: "/pages/login/login"
});
@@ -244,7 +244,7 @@
getLocation: function() {
var that = this;
uni.getLocation({
type: 'gcj02',
type: 'wgs84',
success: function(res) {
that.currentPoint = {
latitude: res.latitude,
@@ -455,7 +455,7 @@
}
},
getData: function() {
if (!this.$store.state.user.token) {
if (!this.$api.haslogin()) {
uni.redirectTo({
url: "/pages/login/login"
});
@@ -588,7 +588,7 @@
.positionText {
margin: 0 10rpx;
font-weight: bold;
font-weight: bold;
}
}
@@ -610,7 +610,8 @@
.content {
background-color: #f3f4f8;
padding-top: 20rpx;
min-height: 80vh;
/* min-height: 80vh; */
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
}

View File

@@ -12,13 +12,16 @@
</view>
<view class="content">
<view class="typeButtonWrapper">
<view class="typeButtonLeft">
<scroll-view class="typeButtonLeft" scroll-x="true" scroll-left="0">
<view v-for="(item, index) in nonReactiveArray" :key="index"
:class="['typeButton', index == activeTab ? 'activeButton' : '']" @click="changeTab(index)">{{
item
}}</view>
</view>
:class="['typeButton', index == activeTab ? 'activeButton' : '']" @click="changeTab(index)">
{{item}}
</view>
</scroll-view>
<!-- <view class="typeButtonLeft">
<view v-for="(item, index) in nonReactiveArray" :key="index"
:class="['typeButton', index == activeTab ? 'activeButton' : '']" @click="changeTab(index)">{{item}}</view>
</view> -->
<!-- 筛选 -->
<view class="screenButton" @click="showPopUp = true">
筛选
@@ -55,7 +58,7 @@
<view v-if="companyList.length > 0" style="padding-bottom: 20rpx;">
<block v-for="(item, index) in companyList" :key="item.id">
<workList :companyitem="item" :near="activeTab === 0"></workList>
<workList :companyitem="item" :position="userLocation" :near="activeTab === 0"></workList>
</block>
</view>
<view v-else>
@@ -103,6 +106,9 @@
import companyList from '@/components/companyList/companyList.vue';
import workList from '@/components/companyList/workList.vue'
import userrecruitList from './userrecruitList.vue'
import {
GoLogin
} from '@/untils/AxiosUtils.js';
import {
newMissionAll,
recommendMission,
@@ -164,41 +170,25 @@
total: 0
},
currentAddress: '',
currentPoint: {
latitude: 0,
longitude: 0
},
key: 'FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI',
open: false,
showPopUp: false,
isSearch: false,
searchData: {},
// nonReactiveArray: ["推荐任务", "推荐岗位", "个体户招工"],
nonReactiveArray: ["推荐零工岗位", "推荐全职岗位", "全部零工岗位", "全部全职岗位"],
}
},
onLoad: function() {
this.getData()
console.log('userLocation', this.userLocation)
// this.getPolicy()
this.$store.dispatch('getUserLocation')
},
onShow: function() {
this.download();
if (this.$store.state.user.token) {
this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth
if (!auth.bankCardState) {
this.step()
}
if (/token/g.test(location.href)) {
this.$api.sleep(2000).then(() => {
this.showInit()
})
}
const value = uni.getStorageSync('active');
if (value) {
this.activeTab = value;
uni.removeStorageSync('active')
} else {
this.showInit()
}
},
/*页面滚动到底部 换页*/
@@ -207,7 +197,7 @@
},
/*下拉刷新*/
onPullDownRefresh: function() {
if (!this.$store.state.user.token) {
if (!this.$api.haslogin()) {
uni.redirectTo({
url: "/pages/login/login"
});
@@ -216,6 +206,27 @@
}
},
methods: {
showInit() {
if (!this.$api.haslogin()) {
GoLogin()
return
}
this.getData()
this.download();
if (this.$api.haslogin()) {
this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth
if (!auth.bankCardState) {
this.step()
}
})
}
const value = uni.getStorageSync('active');
if (value) {
this.activeTab = value;
uni.removeStorageSync('active')
}
},
step() {
var that = this
that.open = true
@@ -245,23 +256,6 @@
url: '/pageMy/my/resume/addSkill'
})
},
/*定位*/
getLocation: function() {
var that = this;
uni.getLocation({
type: 'gcj02',
success: function(res) {
that.currentPoint = {
latitude: res.latitude,
longitude: res.longitude
}
console.log('打印', res)
// that.getAddrByPoint(res);
that.getNearList(that.currentPoint)
},
complete: function(e) {}
});
},
/*逆地址解析*/
getAddrByPoint: function(point) {
var that = this;
@@ -419,10 +413,10 @@
//下拉刷新
download: function() {
this.isSearch = false;
this.$store.dispatch('getUserLocation')
if (this.activeTab === 0 || this.activeTab === 2) {
this.nearPage.current = 1;
this.newPage.current = 1;
this.getLocation();
this.getNewList()
setTimeout(function() {
uni.stopPullDownRefresh();
@@ -430,7 +424,8 @@
return
}
if (this.activeTab === 1 || this.activeTab === 3) {
this.nearPage.current === 1
this.nearPage.current = 1;
this.newPage.current = 1;
this.getNearList()
setTimeout(function() {
uni.stopPullDownRefresh();
@@ -447,20 +442,19 @@
// }
},
getData: function() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
});
} else {
uni.$emit('newsReadChange');
this.nearPage.current = 1;
this.policyPage.current = 1;
this.newPage.current = 1;
this.getLocation();
// this.getNewList();
// this.getNearList();
// this.getPolicy()
}
// if (!this.$api.haslogin()) {
// uni.redirectTo({
// url: "/pages/login/login"
// });
// } else {
uni.$emit('newsReadChange');
this.nearPage.current = 1;
this.policyPage.current = 1;
this.newPage.current = 1;
// this.getNewList();
// this.getNearList();
// this.getPolicy()
// }
},
closePopUp() {
this.showPopUp = false
@@ -630,8 +624,8 @@
.content {
background-color: #f3f4f8;
padding-top: 20rpx;
min-height: 80vh;
/* min-height: 80vh; */
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
}
@@ -647,6 +641,7 @@
line-height: 30px;
font-size: 14px;
background-color: #fff;
margin: 20rpx 0;
}
.typeButtonWrapper {
@@ -658,9 +653,8 @@
}
.typeButtonLeft {
display: flex;
width: 80%;
overflow-x: scroll;
white-space: nowrap;
}
.typeButton {
@@ -670,6 +664,8 @@
border-radius: 50px;
margin-right: 10rpx;
white-space: nowrap;
margin: 20rpx 10rpx 20rpx 0;
display: inline-block;
}
.activeButton {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,340 +1,345 @@
<template>
<view class="body">
<CustomNavbar @back="back" titke="申请消息"></CustomNavbar>
<view v-for="(value, key) in messageList" class="newsList" @click="goList(value)" :key="key">
<view class="newsIcon">
<image :src="value.icon" mode=""></image>
<!-- <view v-if="news_recruit.unread[value.id] > 0" class="point"></view> -->
</view>
<view class="newsListRight">
<view class="head">
<view class="head_left">
{{ value.title }}
</view>
<!-- <view class="head_right" v-if="value.data.length > 0">
{{value.data[0][0][value.prop.time]}}
</view> -->
</view>
<!-- <view class="content" v-if="value.data.length > 0">
{{value.prop.desc(value)}}
</view> -->
</view>
</view>
<cs-button></cs-button>
<CustomTabbar :currentpage="2"></CustomTabbar>
</view>
</template>
<script>
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
import CustomNavbar from '@/components/CustomNavbar/navbar.vue';
export default {
components: { CustomTabbar, CustomNavbar },
data() {
return {
loading: false,
size: 20,
messageList: [{
id: "0",
title: "消息通知",
icon: "../../../static/img/notice.svg",
page: {
current: 0,
size: this.size,
total: this.size,
},
data: [],
prop: {
title: "title",
desc: (value) => {
if (value.data[0]) return value.data[0][0]["desc"];
},
time: "createTime",
isRead: "isRead",
listDesc: "desc",
},
navigateTo(item) {
uni.$once("getNewsDetail", (cb) => {
cb(item);
});
uni.navigateTo({
url: "/pages/news/newsDetail?type=0",
});
},
}
// , {
// id: "1",
// title: "任务申请",
// icon: "../../../static/img/renwu.png",
// page: {
// current: 0,
// size: this.size,
// total: this.size,
// },
// data: [],
// prop: {
// title: "missionTitle",
// desc: (value) => {
// if (value.data[0])
// return `您收到${value.data[0][0]["companyName"]}的任务`;
// },
// time: "createTime",
// isRead: "status",
// listDesc: "companyName",
// },
// navigateTo(item, dispatch) {
// // dispatch("readNew", {
// // key: "1",
// // id: item.id,
// // });
// uni.navigateTo({
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
// item.missionNo
// )}&id=${encodeURIComponent(item.id)}`,
// });
// },
// }, {
// id: "1",
// title: "岗位申请",
// icon: "../../../static/img/job_recruit.svg",
// page: {
// current: 0,
// size: this.size,
// total: this.size,
// },
// data: [],
// prop: {
// title: "missionTitle",
// desc: (value) => {
// if (value.data[0])
// return `您收到${value.data[0][0]["companyName"]}的任务`;
// },
// time: "createTime",
// isRead: "status",
// listDesc: "companyName",
// },
// navigateTo(item, dispatch) {
// // dispatch("readNew", {
// // key: "1",
// // id: item.id,
// // });
// uni.navigateTo({
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
// item.missionNo
// )}&id=${encodeURIComponent(item.id)}`,
// });
// },
// }, {
// id: "1",
// title: "个体户申请",
// icon: "../../../static/img/own_recruit.svg",
// page: {
// current: 0,
// size: this.size,
// total: this.size,
// },
// data: [],
// prop: {
// title: "missionTitle",
// desc: (value) => {
// if (value.data[0])
// return `您收到${value.data[0][0]["companyName"]}的任务`;
// },
// time: "createTime",
// isRead: "status",
// listDesc: "companyName",
// },
// navigateTo(item, dispatch) {
// // dispatch("readNew", {
// // key: "1",
// // id: item.id,
// // });
// uni.navigateTo({
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
// item.missionNo
// )}&id=${encodeURIComponent(item.id)}`,
// });
// },
// },
]
}
},
onLoad() { },
onShow() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
})
} else {
uni.$emit('newsReadChange')
}
},
// onPullDownRefresh() {
// this.loading = true
// this.$store.dispatch("newsInit").then(() => {
// this.loading = false
// uni.stopPullDownRefresh();
// }).catch(() => {
// this.loading = false
// uni.stopPullDownRefresh();
// })
// },
methods: {
goList(item) {
// if (item.data.length === 0) {
// uni.showToast({
// title: '暂无消息',
// icon: 'none'
// });
// return
// }
console.log(item.data)
// 任务推送、岗位推送、政策推送
if (item.title == '岗位申请') {
console.log('岗位申请')
uni.navigateTo({
url: './taskProjectList'
})
} else if (item.title == '岗位申请') {
console.log('岗位申请')
uni.navigateTo({
url: './jobProjectList'
})
} else if (item.title == '个体户申请') {
uni.navigateTo({
url: './policyList'
})
} else {
uni.navigateTo({
url: './newsList?type=' + item.id
})
}
},
back() {
uni.reLaunch({ url: '/pages/my/my' })
},
},
}
</script>
<style>
.content {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
width: 560rpx;
overflow: hidden;
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.head_right {
float: right;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCCCC;
}
.head_left {
float: left;
font-family: PingFangSC-Regular;
font-size: 36rpx;
color: #333333;
}
.head {
overflow: hidden;
width: 560rpx;
}
.newsListRight {
float: left;
width: 560rpx;
height: 50rpx;
line-height: 50rpx;
padding-left: 30rpx;
}
.newsList .newsIcon {
position: relative;
width: 100rpx;
height: 100rpx;
display: inline-block;
float: left;
}
.newsList image {
width: 100rpx;
height: 100rpx;
}
.newsList .point {
position: absolute;
top: 5rpx;
right: 10rpx;
width: 20rpx;
height: 20rpx;
background: red;
border-radius: 50%;
}
.newsList {
border-bottom: 1rpx solid #dddddd;
padding-bottom: 30rpx;
padding-right: 30rpx;
padding-top: 30rpx;
padding-left: 30rpx;
overflow: hidden;
display: flex;
align-items: center;
}
.body {
background-color: #fefefe;
/* padding-left: 30rpx;
width: 720rpx; */
}
page {
background: #f6f6f6;
}
</style>
<!-- <template>
<view class="1">
<CustomNavbar @back="back" :titke="'消息'"></CustomNavbar>
<empty content="暂无数据" mr-top="300"></empty>
<CustomTabbar :currentpage="2"></CustomTabbar>
</view>
</template>
<script>
import CustomNavbar from '@/components/CustomNavbar/navbar.vue'
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
export default {
components: {CustomTabbar, CustomNavbar},
data() {
return {
}
},
methods: {
back() {
uni.reLaunch({
url: '/pages/my/my'
})
}
}
}
</script>
<style lang="scss" scoped>
<template>
<view class="body">
<CustomNavbar @back="back" titke="申请消息"></CustomNavbar>
<view v-for="(value, key) in messageList" class="newsList" @click="goList(value)" :key="key">
<view class="newsIcon">
<image :src="value.icon" mode=""></image>
<!-- <view v-if="news_recruit.unread[value.id] > 0" class="point"></view> -->
</view>
<view class="newsListRight">
<view class="head">
<view class="head_left">
{{ value.title }}
</view>
<!-- <view class="head_right" v-if="value.data.length > 0">
{{value.data[0][0][value.prop.time]}}
</view> -->
</view>
<!-- <view class="content" v-if="value.data.length > 0">
{{value.prop.desc(value)}}
</view> -->
</view>
</view>
<cs-button></cs-button>
<CustomTabbar :currentpage="2"></CustomTabbar>
</view>
</template>
<script>
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
import CustomNavbar from '@/components/CustomNavbar/navbar.vue';
export default {
components: {
CustomTabbar,
CustomNavbar
},
data() {
return {
loading: false,
size: 20,
messageList: [{
id: "0",
title: "消息通知",
icon: "../../../static/img/notice.svg",
page: {
current: 0,
size: this.size,
total: this.size,
},
data: [],
prop: {
title: "title",
desc: (value) => {
if (value.data[0]) return value.data[0][0]["desc"];
},
time: "createTime",
isRead: "isRead",
listDesc: "desc",
},
navigateTo(item) {
uni.$once("getNewsDetail", (cb) => {
cb(item);
});
uni.navigateTo({
url: "/pages/news/newsDetail?type=0",
});
},
}
// , {
// id: "1",
// title: "任务申请",
// icon: "../../../static/img/renwu.png",
// page: {
// current: 0,
// size: this.size,
// total: this.size,
// },
// data: [],
// prop: {
// title: "missionTitle",
// desc: (value) => {
// if (value.data[0])
// return `您收到${value.data[0][0]["companyName"]}的任务`;
// },
// time: "createTime",
// isRead: "status",
// listDesc: "companyName",
// },
// navigateTo(item, dispatch) {
// // dispatch("readNew", {
// // key: "1",
// // id: item.id,
// // });
// uni.navigateTo({
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
// item.missionNo
// )}&id=${encodeURIComponent(item.id)}`,
// });
// },
// }, {
// id: "1",
// title: "岗位申请",
// icon: "../../../static/img/job_recruit.svg",
// page: {
// current: 0,
// size: this.size,
// total: this.size,
// },
// data: [],
// prop: {
// title: "missionTitle",
// desc: (value) => {
// if (value.data[0])
// return `您收到${value.data[0][0]["companyName"]}的任务`;
// },
// time: "createTime",
// isRead: "status",
// listDesc: "companyName",
// },
// navigateTo(item, dispatch) {
// // dispatch("readNew", {
// // key: "1",
// // id: item.id,
// // });
// uni.navigateTo({
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
// item.missionNo
// )}&id=${encodeURIComponent(item.id)}`,
// });
// },
// }, {
// id: "1",
// title: "个体户申请",
// icon: "../../../static/img/own_recruit.svg",
// page: {
// current: 0,
// size: this.size,
// total: this.size,
// },
// data: [],
// prop: {
// title: "missionTitle",
// desc: (value) => {
// if (value.data[0])
// return `您收到${value.data[0][0]["companyName"]}的任务`;
// },
// time: "createTime",
// isRead: "status",
// listDesc: "companyName",
// },
// navigateTo(item, dispatch) {
// // dispatch("readNew", {
// // key: "1",
// // id: item.id,
// // });
// uni.navigateTo({
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
// item.missionNo
// )}&id=${encodeURIComponent(item.id)}`,
// });
// },
// },
]
}
},
onLoad() {},
onShow() {
if (!this.$api.haslogin()) {
uni.redirectTo({
url: "/pages/login/login"
})
} else {
uni.$emit('newsReadChange')
}
},
// onPullDownRefresh() {
// this.loading = true
// this.$store.dispatch("newsInit").then(() => {
// this.loading = false
// uni.stopPullDownRefresh();
// }).catch(() => {
// this.loading = false
// uni.stopPullDownRefresh();
// })
// },
methods: {
goList(item) {
// if (item.data.length === 0) {
// uni.showToast({
// title: '暂无消息',
// icon: 'none'
// });
// return
// }
console.log(item.data)
// 任务推送、岗位推送、政策推送
if (item.title == '岗位申请') {
console.log('岗位申请')
uni.navigateTo({
url: './taskProjectList'
})
} else if (item.title == '岗位申请') {
console.log('岗位申请')
uni.navigateTo({
url: './jobProjectList'
})
} else if (item.title == '个体户申请') {
uni.navigateTo({
url: './policyList'
})
} else {
uni.navigateTo({
url: './newsList?type=' + item.id
})
}
},
back() {
uni.reLaunch({
url: '/pages/my/my'
})
},
},
}
</script>
<style>
.content {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
width: 560rpx;
overflow: hidden;
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.head_right {
float: right;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCCCC;
}
.head_left {
float: left;
font-family: PingFangSC-Regular;
font-size: 36rpx;
color: #333333;
}
.head {
overflow: hidden;
width: 560rpx;
}
.newsListRight {
float: left;
width: 560rpx;
height: 50rpx;
line-height: 50rpx;
padding-left: 30rpx;
}
.newsList .newsIcon {
position: relative;
width: 100rpx;
height: 100rpx;
display: inline-block;
float: left;
}
.newsList image {
width: 100rpx;
height: 100rpx;
}
.newsList .point {
position: absolute;
top: 5rpx;
right: 10rpx;
width: 20rpx;
height: 20rpx;
background: red;
border-radius: 50%;
}
.newsList {
border-bottom: 1rpx solid #dddddd;
padding-bottom: 30rpx;
padding-right: 30rpx;
padding-top: 30rpx;
padding-left: 30rpx;
overflow: hidden;
display: flex;
align-items: center;
}
.body {
background-color: #fefefe;
/* padding-left: 30rpx;
width: 720rpx; */
}
page {
background: #f6f6f6;
}
</style>
<!-- <template>
<view class="1">
<CustomNavbar @back="back" :titke="'消息'"></CustomNavbar>
<empty content="暂无数据" mr-top="300"></empty>
<CustomTabbar :currentpage="2"></CustomTabbar>
</view>
</template>
<script>
import CustomNavbar from '@/components/CustomNavbar/navbar.vue'
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
export default {
components: {CustomTabbar, CustomNavbar},
data() {
return {
}
},
methods: {
back() {
uni.reLaunch({
url: '/pages/my/my'
})
}
}
}
</script>
<style lang="scss" scoped>
</style> -->

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,54 +1,18 @@
<template>
<view class="mainWrapper">
<view v-show="!searchResultShow" class="headSearch">
<view class="headSearch">
<view class="search-view">
<view class="search-item">
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
<input type="text" confirm-type="搜索" v-model="keywords" @confirm="getNewList('search')"
<input type="text" confirm-type="搜索" v-model="keywords" @confirm="getList"
placeholder="搜零工岗位/搜全职岗位/搜政策" />
<view @click="getNewList('search')"
<view @click="getList"
style="width: 80rpx;height: 50rpx;color:#fff;background-color: #0091ff;font-size:24rpx;text-align: center;line-height: 50rpx;border-radius: 25rpx;;">
搜索</view>
</view>
<!-- <view class="close" @click="closeBack">
取消
</view> -->
</view>
</view>
<view v-show="searchResultShow" class="headSearch">
<view class="search-view">
<view class="search-item" @click="clearCurrentKeyWords">
<!-- <image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image> -->
<!-- <input type="text" confirm-type="搜索" v-model="keywords" @confirm="getNewList('search')"
placeholder="搜零工任务/搜岗位/搜政策" /> -->
<!-- <view @click="getNewList('search')" style="width: 80rpx;height: 50rpx;color:#fff;background-color: #0091ff;font-size:24rpx;text-align: center;line-height: 50rpx;border-radius: 25rpx;;">搜索</view> -->
<view
style="font-size: 24rpx;height: 50rpx;background-color: #ddd;border-radius: 25rpx;line-height: 50rpx;padding: 0 20rpx;padding-right: 40rpx;position:relative;">
{{ keywords }}
<u-icon name="close" size="14" style="position:absolute;right:10rpx;top:13rpx;"></u-icon>
</view>
</view>
</view>
</view>
<view v-show="searchResultShow" class="search-result">
<view class="title">搜索结果</view>
<view v-for="(item, index) in searchResultList" class="search-item" @click="toDetail(item)">
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;margin-right: 10rpx;"
mode=""></image>
<view style="flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.name }}</view>
<view class="type" v-if="item.type == 0">零工岗位</view>
<view class="type" v-else-if="item.type == 1">全职岗位</view>
<view class="type" v-else-if="item.type == 2">政策</view>
<view class="type" v-else-if="item.type == 3">招工</view>
</view>
<view v-if="searchResultList.length > 0"
style="text-align: center;font-size: 26rpx;margin-top: 20rpx;color:#999;">没有更多数据了</view>
<view v-if="searchResultList.length == 0" style="text-align: center;font-size: 26rpx;margin-top: 20rpx;">
暂无数据</view>
</view>
<view v-show="!searchResultShow" class="search-history">
<view class="search-history">
<view class="title">搜索记录</view>
<view class="clear" @click="clearKeyWords">
<image src="../../static/img/delete.png" style="width: 24rpx;height: 24rpx;" mode=""></image>
@@ -60,15 +24,14 @@
</view>
</view>
<view v-else class="empty">暂无历史记录</view>
<v-tabs :tabs="tabList" height="45px" v-model="activeTab" color="#999" activeColor="#000" fontSize="30rpx"
activeFontSize="31rpx" @change='changeTab' />
</view>
<v-tabs v-show="!searchResultShow" :tabs="['推荐零工岗位', '推荐全职岗位', '推荐政策']" height="45px" v-model="activeTab"
color="#999" activeColor="#000" fontSize="30rpx" activeFontSize="31rpx" @change='changeTab' />
<block v-if="(activeTab == 0)&&!searchResultShow">
<view v-if="companyList.length > 0">
<block v-if="activeTab === 0">
<view v-if="companyList.length ">
<block v-for="(item, index) in companyList" :key="item.id">
<companyList :companyitem="item"></companyList>
<companyList :companyitem="item" :location="userLocation"></companyList>
</block>
</view>
<view v-else>
@@ -78,10 +41,10 @@
</view>
</view>
</block>
<block v-if="(activeTab == 1)&&!searchResultShow">
<view v-if="newList.length > 0">
<block v-if="activeTab === 1">
<view v-if="newList.length">
<block v-for="(item, index) in newList" :key="item.id">
<workList :companyitem="item" :near="activeTab === 0"></workList>
<workList :companyitem="item" :near="activeTab === 0" :location="userLocation"></workList>
</block>
</view>
<view v-else>
@@ -92,8 +55,8 @@
<block v-if="(activeTab == 2)&&!searchResultShow">
<view v-if="recommendList.length > 0">
<block v-if="activeTab == 2">
<view v-if="recommendList.length">
<!-- <block v-for="(item, index) in recommendList" :key="item.id">
<companyList :companyitem="item"></companyList>
</block> -->
@@ -109,94 +72,86 @@
<view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
完善技能获取精推荐
暂无信息
</view>
<!-- <view class="btn" @click="goResume">
完善技能
</view> -->
完善技能
</view> -->
</view>
</block>
<!-- <view v-if="companyList.length > 0">
<block v-for="(item, index) in companyList" :key="item.id">
<companyList :companyitem="item"></companyList>
<view class="baddd"></view>
</block>
</view>
<view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
暂无任务信息
</view>
</view> -->
<block v-if="activeTab == -1">
<view>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
没有更多数据
</view>
</view>
</block>
</view>
</template>
<script>
import {
cloneDeep
} from 'lodash';
import {
newMissionAll,
getSearchKeyWordsList,
clearSearchKeyWords,
getListByKeyWords,
nearMission,
getPolicyContentList
getPolicyContentList,
userWorkSearchListAll
} from '@/api/mission.js';
import {
mapGetters
} from 'vuex'
import companyList from '@/components/companyList/companyList.vue';
import vTabs from '@/components/v-tabs/v-tabs.vue';
import testData from '@/common/textdata.js';
import workList from '@/components/companyList/workList.vue'
const titleStatus = {
'mission': {
title: '零工岗位',
val: 0,
},
'work': {
title: '全职岗位',
val: 1,
},
'policy': {
title: '政策',
val: 2,
},
}
export default {
components: {
companyList,
vTabs,
workList
},
data() {
return {
activeTab: 0,
companyList: [],
recommendList: [],
newList: [],
keywords: '',
page: {
current: 1,
size: 10,
total: 0
},
searchHistoryList: [],
searchResultShow: false,
searchResultList: []
};
companyList: [],
newList: [],
recommendList: [],
tabList: ['零工岗位', '全职岗位', '政策']
}
},
onLoad: function(option) {
this.keywords = option.keywords ? option.keywords : ''
computed: {
...mapGetters(['userLocation']),
},
onShow: function() {
this.getList('refresh');
this.getKeyWordsList()
},
/*页面滚动到底部*/
onReachBottom: function() {
this.upLoad()
},
methods: {
clearCurrentKeyWords() {
this.keywords = '';
let that = this;
setTimeout(function() {
that.searchResultShow = false;
}, 100);
},
// 新面板搜索
getNewList() {
getListByKeyWords(this.keywords).then(res => {
this.searchResultShow = true
this.searchResultList = res.data.data
// this.searchResultList.forEach((item, index) => {
// item.name = this.getInf(item.name, this.keywords);
// })
})
goPolicyInfo(data) {
if (data) {
uni.navigateTo({
url: `/pages/user/policyContent?id=${data}`
})
}
},
// 获取搜索历史记录
getKeyWordsList() {
@@ -211,142 +166,6 @@
// console.log(keyWords)
this.searchResultShow = true;
this.keywords = keyWords;
this.getNewList();
},
//最新任务;
getList: function(type = 'add') {
//改变搜索条件页码值变为1
if (type === 'refresh') {
this.page.current = 1;
};
// if (this.keywords) {
newMissionAll(this.page.current, this.page.size, this.keywords).then(res => {
this.page.total = res.data.data.total;
if (type === 'refresh') {
this.companyList = res.data.data.records
} else if (res.data.data && res.data.data.records.length) {
this.companyList = this.companyList.concat(res.data.data.records);
}
this.page.current += 1;
})
},
getgwList(type = 'add') {
if (type === 'refresh') {
this.page.current = 1;
};
nearMission(this.page.current, this.page.size).then(res => {
this.page.total = res.data.data.total;
if (type === 'refresh') {
this.newList = res.data.data.records
} else if (res.data.data && res.data.data.records.length) {
this.newList = this.newList.concat(res.data.data.records);
}
this.page.current += 1;
})
},
getPoliyList(type = 'add') {
if (type === 'refresh') {
this.page.current = 1;
};
let params = {
current: this.page.current,
size: this.page.size,
type: 1
}
getPolicyContentList(params).then(res => {
this.page.total = res.data.data.total;
if (type === 'refresh') {
this.recommendList = res.data.data.records
} else if (res.data.data && res.data.data.records.length) {
this.recommendList = this.recommendList.concat(res.data.data.records);
}
this.page.current += 1;
})
},
goPolicyInfo(data) {
if (data) {
uni.navigateTo({
url: `/pages/user/policyContent?id=${data}`
})
} else {
// uni.showToast({
// title:'暂无内容',
// icon:'none'
// })
}
},
//上拉加载
upLoad: function() {
if (this.page.current <= Math.ceil(this.page.total / this.page.size)) {
switch (this.activeTab) {
case 0:
this.getList();
break;
case 1:
this.getgwList();
break;
case 2:
this.getPoliyList()
break;
}
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
return
}
},
closeBack() {
uni.navigateBack({
delta: 1
})
},
/**
* 指定关键字高亮
* @param {*} str 字符串
* @param {*} key 关键字
*/
getInf(str, key) {
if (str && key) {
let replaceReg = new RegExp(key, 'g') // 匹配关键字正则
let replaceString = "<span style='color: #1b66ff;'>" + key + "</span>" // 高亮替换
return str.replace(replaceReg, replaceString);
}
},
toDetail(item) {
const no = item.id
// 判断是岗位还是任务 0任务1岗位2政策
if (item.type == 0) {
uni.navigateTo({
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(no)}&isCan=1`
})
} else if (item.type == 1) {
uni.navigateTo({
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=1`
})
} else if (item.type == 2) {
uni.navigateTo({
url: `/pages/user/policyContent?id=${no}`
})
}
},
changeTab: function(e) {
this.activeTab = e;
switch (e) {
case 0:
this.getList('refresh');
break;
case 1:
this.getgwList('refresh');
break;
case 2:
this.getPoliyList('refresh')
break;
}
},
// 清空搜索历史
clearKeyWords() {
@@ -355,15 +174,55 @@
this.getKeyWordsList()
}
})
},
changeTab: function(e) {
this.activeTab = e;
// const tab = cloneDeep(this.tabList[e])
// Object.keys(titleStatus).map((key) => {
// if (titleStatus[key].title === tab) {
// this.activeTab = titleStatus[key].val;
// }
// })
},
async getList() {
const params = {
keywords: this.keywords
}
let resData = await userWorkSearchListAll(params)
if (resData.data.code === 200) {
const {
mission,
policy,
work
} = resData.data.data
const tabVal = []
Object.keys(titleStatus).map((key) => {
if (resData.data.data[key].length) {
tabVal.push(titleStatus[key].title)
}
})
if (tabVal.length) {
let count = 0
Object.keys(titleStatus).map((key) => {
if (!count && titleStatus[key].title === tabVal[0]) {
this.activeTab = titleStatus[key].val;
count++
}
})
}
this.companyList = mission
this.recommendList = policy
this.newList = work
}
}
}
};
}
</script>
<style scoped>
.mainWrapper {
background-color: #f3f4f8;
min-height: 95vh;
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
}
.baddd {
@@ -475,6 +334,7 @@
padding: 8rpx 12rpx;
border-radius: 20rpx;
margin-right: 10rpx;
position: relative;
}
.search-result {

517
pages/seach/seachCopy.vue Normal file
View File

@@ -0,0 +1,517 @@
<template>
<view class="mainWrapper">
<view v-show="!searchResultShow" class="headSearch">
<view class="search-view">
<view class="search-item">
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
<input type="text" confirm-type="搜索" v-model="keywords" @confirm="getNewList('search')"
placeholder="搜零工岗位/搜全职岗位/搜政策" />
<view @click="getNewList('search')"
style="width: 80rpx;height: 50rpx;color:#fff;background-color: #0091ff;font-size:24rpx;text-align: center;line-height: 50rpx;border-radius: 25rpx;;">
搜索</view>
</view>
<!-- <view class="close" @click="closeBack">
取消
</view> -->
</view>
</view>
<view v-show="searchResultShow" class="headSearch">
<view class="search-view">
<view class="search-item" @click="clearCurrentKeyWords">
<!-- <image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image> -->
<!-- <input type="text" confirm-type="搜索" v-model="keywords" @confirm="getNewList('search')"
placeholder="搜零工任务/搜岗位/搜政策" /> -->
<!-- <view @click="getNewList('search')" style="width: 80rpx;height: 50rpx;color:#fff;background-color: #0091ff;font-size:24rpx;text-align: center;line-height: 50rpx;border-radius: 25rpx;;">搜索</view> -->
<view
style="font-size: 24rpx;height: 50rpx;background-color: #ddd;border-radius: 25rpx;line-height: 50rpx;padding: 0 20rpx;padding-right: 40rpx;position:relative;">
{{ keywords }}
<u-icon name="close" size="14" style="position:absolute;right:10rpx;top:13rpx;"></u-icon>
</view>
</view>
</view>
</view>
<view v-show="searchResultShow" class="search-result">
<view>
<view>岗位/任务</view>
<view>政策</view>
</view>
<view class="title">搜索结果</view>
<view v-for="(item, index) in searchResultList" class="search-item" @click="toDetail(item)">
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;margin-right: 10rpx;"
mode=""></image>
<view style="flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.name }}</view>
<view class="type" v-if="item.type == 0">零工岗位</view>
<view class="type" v-else-if="item.type == 1">全职岗位</view>
<view class="type" v-else-if="item.type1 == 2">政策</view>
<view class="type" v-else-if="item.type == 3">招工</view>
</view>
<view v-if="searchResultList.length > 0"
style="text-align: center;font-size: 26rpx;margin-top: 20rpx;color:#999;">没有更多数据了</view>
<view v-if="searchResultList.length == 0" style="text-align: center;font-size: 26rpx;margin-top: 20rpx;">
暂无数据</view>
</view>
<view v-show="!searchResultShow" class="search-history">
<view class="title">搜索记录</view>
<view class="clear" @click="clearKeyWords">
<image src="../../static/img/delete.png" style="width: 24rpx;height: 24rpx;" mode=""></image>
<view style="margin-left: 5rpx;">清空</view>
</view>
<view class="wrapper" v-if="searchHistoryList.length > 0">
<view class="item" v-for="(item, index) in searchHistoryList" @click="keyWordsClick(item.keywords)">
{{ item.keywords }}
</view>
</view>
<view v-else class="empty">暂无历史记录</view>
</view>
<v-tabs v-show="!searchResultShow" :tabs="['推荐零工岗位', '推荐全职岗位', '推荐政策']" height="45px" v-model="activeTab"
color="#999" activeColor="#000" fontSize="30rpx" activeFontSize="31rpx" @change='changeTab' />
<block v-if="(activeTab == 0)&&!searchResultShow">
<view v-if="companyList.length > 0">
<block v-for="(item, index) in companyList" :key="item.id">
<companyList :companyitem="item"></companyList>
</block>
</view>
<view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
暂无信息
</view>
</view>
</block>
<block v-if="(activeTab == 1)&&!searchResultShow">
<view v-if="newList.length > 0">
<block v-for="(item, index) in newList" :key="item.id">
<workList :companyitem="item" :near="activeTab === 0"></workList>
</block>
</view>
<view v-else>
<image src="../../static/img/pic_notask.svg" class="nothing" mode=""></image>
<view class="nothingContnt">暂无信息</view>
</view>
</block>
<block v-if="(activeTab == 2)&&!searchResultShow">
<view v-if="recommendList.length > 0">
<!-- <block v-for="(item, index) in recommendList" :key="item.id">
<companyList :companyitem="item"></companyList>
</block> -->
<view v-for="(item, index) in recommendList" :key="index"
style="width: 90%;height: 100rpx;background-color: #fff;border-radius: 10rpx;margin:20rpx 5% 20rpx 5%;display: flex;align-items: center"
@click="goPolicyInfo(item.id)">
<image :src="item.headPic" style="width: 60rpx;height: 60rpx;margin: 0 20rpx;"></image>
<view style="font-size: 26rpx;">{{ item.articleTitle }}</view>
</view>
</view>
<view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
完善技能获取精推荐
</view>
<!-- <view class="btn" @click="goResume">
完善技能
</view> -->
</view>
</block>
<!-- <view v-if="companyList.length > 0">
<block v-for="(item, index) in companyList" :key="item.id">
<companyList :companyitem="item"></companyList>
<view class="baddd"></view>
</block>
</view>
<view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
暂无任务信息
</view>
</view> -->
</view>
</template>
<script>
import {
newMissionAll,
getSearchKeyWordsList,
clearSearchKeyWords,
getListByKeyWords,
nearMission,
getPolicyContentList
} from '@/api/mission.js';
import companyList from '@/components/companyList/companyList.vue';
import vTabs from '@/components/v-tabs/v-tabs.vue';
import testData from '@/common/textdata.js';
import workList from '@/components/companyList/workList.vue'
export default {
components: {
companyList,
vTabs,
workList
},
data() {
return {
activeTab: 0,
companyList: [],
recommendList: [],
newList: [],
keywords: '',
page: {
current: 1,
size: 10,
total: 0
},
searchHistoryList: [],
searchResultShow: false,
searchResultList: []
};
},
onLoad: function(option) {
this.keywords = option.keywords ? option.keywords : ''
},
onShow: function() {
this.getList('refresh');
this.getKeyWordsList()
},
/*页面滚动到底部*/
onReachBottom: function() {
this.upLoad()
},
methods: {
clearCurrentKeyWords() {
this.keywords = '';
let that = this;
setTimeout(function() {
that.searchResultShow = false;
}, 100);
},
// 新面板搜索
getNewList() {
getListByKeyWords(this.keywords).then(res => {
this.searchResultShow = true
this.searchResultList = res.data.data
// this.searchResultList.forEach((item, index) => {
// item.name = this.getInf(item.name, this.keywords);
// })
})
},
// 获取搜索历史记录
getKeyWordsList() {
getSearchKeyWordsList().then(res => {
let response = res.data
if (response.code == 200) {
this.searchHistoryList = response.data
}
})
},
keyWordsClick(keyWords) {
// console.log(keyWords)
this.searchResultShow = true;
this.keywords = keyWords;
this.getNewList();
},
//最新任务;
getList: function(type = 'add') {
//改变搜索条件页码值变为1
if (type === 'refresh') {
this.page.current = 1;
};
// if (this.keywords) {
newMissionAll(this.page.current, this.page.size, this.keywords).then(res => {
this.page.total = res.data.data.total;
if (type === 'refresh') {
this.companyList = res.data.data.records
} else if (res.data.data && res.data.data.records.length) {
this.companyList = this.companyList.concat(res.data.data.records);
}
this.page.current += 1;
})
},
getgwList(type = 'add') {
if (type === 'refresh') {
this.page.current = 1;
};
nearMission(this.page.current, this.page.size).then(res => {
this.page.total = res.data.data.total;
if (type === 'refresh') {
this.newList = res.data.data.records
} else if (res.data.data && res.data.data.records.length) {
this.newList = this.newList.concat(res.data.data.records);
}
this.page.current += 1;
})
},
getPoliyList(type = 'add') {
if (type === 'refresh') {
this.page.current = 1;
};
let params = {
current: this.page.current,
size: this.page.size,
type: 1
}
getPolicyContentList(params).then(res => {
this.page.total = res.data.data.total;
if (type === 'refresh') {
this.recommendList = res.data.data.records
} else if (res.data.data && res.data.data.records.length) {
this.recommendList = this.recommendList.concat(res.data.data.records);
}
this.page.current += 1;
})
},
goPolicyInfo(data) {
if (data) {
uni.navigateTo({
url: `/pages/user/policyContent?id=${data}`
})
} else {
// uni.showToast({
// title:'暂无内容',
// icon:'none'
// })
}
},
//上拉加载
upLoad: function() {
if (this.page.current <= Math.ceil(this.page.total / this.page.size)) {
switch (this.activeTab) {
case 0:
this.getList();
break;
case 1:
this.getgwList();
break;
case 2:
this.getPoliyList()
break;
}
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
return
}
},
closeBack() {
uni.navigateBack({
delta: 1
})
},
/**
* 指定关键字高亮
* @param {*} str 字符串
* @param {*} key 关键字
*/
getInf(str, key) {
if (str && key) {
let replaceReg = new RegExp(key, 'g') // 匹配关键字正则
let replaceString = "<span style='color: #1b66ff;'>" + key + "</span>" // 高亮替换
return str.replace(replaceReg, replaceString);
}
},
toDetail(item) {
const no = item.id
// 判断是岗位还是任务 0任务1岗位2政策
if (item.type == 0) {
uni.navigateTo({
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(no)}&isCan=1`
})
} else if (item.type == 1) {
uni.navigateTo({
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=1`
})
} else if (item.type == 2) {
uni.navigateTo({
url: `/pages/user/policyContent?id=${no}`
})
}
},
changeTab: function(e) {
this.activeTab = e;
switch (e) {
case 0:
this.getList('refresh');
break;
case 1:
this.getgwList('refresh');
break;
case 2:
this.getPoliyList('refresh')
break;
}
},
// 清空搜索历史
clearKeyWords() {
clearSearchKeyWords().then(res => {
if (res.data.code == 200) {
this.getKeyWordsList()
}
})
}
}
};
</script>
<style scoped>
.mainWrapper {
background-color: #f3f4f8;
min-height: 95vh;
}
.baddd {
background-color: #f6f6f6;
height: 20rpx;
}
.close {
position: absolute;
right: 24rpx;
top: 6rpx;
height: 60rpx;
padding: 5rpx 0;
line-height: 60rpx;
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
}
.headSearch .search-view {
border-bottom: 1rpx solid #dddddd;
padding: 14rpx 32rpx;
background: rgba(255, 255, 255, 1);
}
.headSearch .search-item {
display: flex;
padding: 0 10rpx;
height: 60rpx;
line-height: 60rpx;
background: rgba(249, 249, 249, 1);
border-radius: 200px;
align-items: center;
border: 1px solid #0091ff;
}
.headSearch .search-item input {
padding: 0 24rpx;
height: 80rpx;
font-weight: 400;
flex: 1;
text-align: start;
font-size: 28rpx;
font-family: PingFang-SC-Bold, PingFang-SC;
color: rgba(51, 51, 51, 1);
}
.headSearch .search-item .placeholderClass {
color: #CCCCCC;
}
.headSearch .search-item image {
height: 32rpx;
width: 32rpx;
}
.nothing {
width: 400rpx;
height: 200rpx;
display: block;
margin: 0 auto;
margin-top: 50%;
}
.nothingContnt {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #333333;
margin-top: 30rpx;
text-align: center;
}
.search-history {
background-color: #fff;
padding: 10rpx 40rpx;
position: relative;
}
.search-history .title {
font-size: 28rpx;
font-weight: bold;
}
.search-history .clear {
position: absolute;
right: 40rpx;
top: 10rpx;
font-size: 24rpx;
display: flex;
align-items: center;
color: #707070;
}
.search-history .empty {
font-size: 24rpx;
text-align: center;
color: #707070;
}
.search-history .wrapper {
display: flex;
flex-wrap: wrap;
margin-top: 10rpx;
}
.search-history .wrapper .item {
font-size: 24rpx;
background-color: #f6f6f6;
padding: 8rpx 12rpx;
border-radius: 20rpx;
margin-right: 10rpx;
}
.search-result {
padding: 20rpx 30rpx;
background-color: #fff;
height: 100vh;
}
.search-result .title {
font-size: 26rpx;
font-weight: bold;
border-bottom: 1rpx solid #ddd;
height: 60rpx;
line-height: 60rpx;
}
.search-result .search-item {
display: flex;
align-items: center;
font-size: 26rpx;
border-bottom: 1rpx solid #ddd;
height: 80rpx;
line-height: 80rpx;
}
.search-result .search-item .type {
font-size: 20rpx;
color: #707070;
background-color: #dddddd;
border-radius: 15rpx;
height: 30rpx;
line-height: 30rpx;
padding: 0 20rpx;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 565 B

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 B

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 975 B

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 895 B

View File

@@ -372,7 +372,7 @@ const news = {
current,
total
}) => {
console.log(data)
if (!data) return
data.forEach(item => {
state.dic[item.id] = item
})

View File

@@ -8,7 +8,9 @@ import {
getUserInfo,
logout,
refreshToken,
mobileIsCms
mobileIsCms,
noticeIsEnable,
setNoticeIsEnable
} from '@/api/user'
import md5 from 'js-md5'
import {
@@ -18,6 +20,9 @@ import {
import {
calcDate
} from '@/untils/date.js'
import {
myResume,
} from '@/api/resume.js';
let refreshTimer = null;
@@ -67,8 +72,52 @@ const user = {
}) || 0, // 0 个体招工 企业招工
userLocation: null,
userIsCms: false,
resumeInfo: {},
isEnbleNotice: false,
},
actions: {
getNoticeState({
commit,
dispatch
}) {
noticeIsEnable().then(res => {
if (res.data.code === 200) {
const data = res.data.data ? true : false
commit('upDateNoticeState', data)
}
})
},
setNoticeOpen({
commit,
dispatch
}) {
setNoticeIsEnable(1).then(res => {
if (res.code === 200) {
const data = res.data
commit('upDateNoticeState', true)
}
})
},
setNoticeClose({
commit,
dispatch
}) {
setNoticeIsEnable(0).then(res => {
if (res.code === 200) {
const data = res.data
commit('upDateNoticeState', false)
}
})
},
getResumeInfo({
commit,
dispatch
}) {
myResume().then(res => {
const data = res.data.data
commit('upDataResumeInfo', data)
})
},
getMobileIsCms({
commit,
dispatch
@@ -83,14 +132,14 @@ const user = {
commit,
dispatch
}) {
console.log('getUserLocation null1')
// commit('setLocation', {
// latitude: 31.133980,
// longitude: 104.404419,
// })
uni.getLocation({
type: 'gcj02',
type: 'wgs84',
success: function(res) {
console.warn('用户位置获取成功')
const {
longitude,
latitude
@@ -101,9 +150,12 @@ const user = {
})
},
fail: function(err) {
console.warn('用户位置获取失败')
commit('setLocation', null)
},
complete: function(e) {}
complete: function(e) {
console.warn('getUserLocation' + JSON.stringify(e))
}
})
},
//用户点击radio按钮
@@ -223,9 +275,15 @@ const user = {
commit
}, data) {
commit('SET_USER_SENDTIMES', data);
},
}
},
mutations: {
upDateNoticeState(state, payload) {
state.isEnbleNotice = payload
},
upDataResumeInfo(state, payload) {
state.resumeInfo = payload
},
setIsCms(state, payload) {
state.userIsCms = payload.val
},

View File

@@ -17,8 +17,10 @@ import {
import {
replaceStr
} from "../config";
import overAllConfig from "../config";
let showModal = true
const tabbarPageName = ['/pages/project/project', '/pages/my/my', '/pages/news/news']
/**
*
* @export
@@ -109,9 +111,9 @@ async function DoAjax(options, config = {}) {
if (statusWhiteList.includes(status)) throw res;
//如果是401则跳转到登录页面
if (status === 401) {
store.dispatch('FedLogOut').then(() => {
GoLogin()
});
// store.dispatch('FedLogOut').then(() => {
// GoLogin()
// });
throw new Error(message);
}
// 如果请求为非200否者默认统一处理
@@ -189,25 +191,33 @@ export function Promisify(func) {
export function GoLogin() {
if (showModal) {
showModal = false
location.href = "https://dy12333.org.cn/h5/"
// uni.showModal({
// title: "提示",
// content: "您还未登录,点击确认去登录",
// success({
// confirm
// }) {
// if (confirm) {
// uni.redirectTo({
// url: "/pages/login/login"
// });
// }
// showModal = true
// },
// fail() {
// showModal = true
// }
// })
uni.showModal({
title: "提示",
content: "您还未登录,点击确认去登录",
success({
confirm,
cancel
}) {
if (confirm) {
const returnPage = `${overAllConfig.loginURl}?returnPage=${location.href}`
location.href = returnPage
}
if (cancel) {
let pages = getCurrentPages();
let prePage = pages[pages.length - 1];
const resetPage = tabbarPageName.find((item) => item === prePage.$route.fullPath)
if (resetPage) {
uni.switchTab({
url: '/pages/index/index'
})
}
}
},
complete() {
showModal = true
}
})
}
}

44
untils/authService.js Normal file
View File

@@ -0,0 +1,44 @@
import CryptoJS from 'crypto-js';
import overAllConfig from '@/config.js'
/**
* AES-CBC 解密(从 Base64 中提取随机 IV
* @param {string} base64Str - 加密后的 Base64 字符串IV + 密文)
* @param {string} keyStr - 16 字节密钥字符串
* @returns {string} 解密后的明文
*/
export function decryptJson(encryptedBase64, base64Key = overAllConfig.AESKey) {
try {
// 1. Base64 解码密钥 & 数据
const key = CryptoJS.enc.Base64.parse(base64Key);
const combinedData = CryptoJS.enc.Base64.parse(encryptedBase64);
// 2. 提取 IV前16字节 = 4 个 32bit Word
const ivWords = combinedData.words.slice(0, 4);
const iv = CryptoJS.lib.WordArray.create(ivWords, 16);
// 3. 提取密文(剩余部分)
const ciphertextWords = combinedData.words.slice(4);
const ciphertext = CryptoJS.lib.WordArray.create(
ciphertextWords,
combinedData.sigBytes - 16
);
// 4. 解密
const decrypted = CryptoJS.AES.decrypt({
ciphertext
}, key, {
iv: iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7, // 等价于 Java 的 PKCS5Padding
});
const result = decrypted.toString(CryptoJS.enc.Utf8);
if (!result) throw new Error('解密失败,返回空字符串(可能密钥错误或格式错误)');
return result;
} catch (e) {
console.error('解密失败:', e);
return '';
}
}

View File

@@ -6,7 +6,8 @@ module.exports = {
port: 1887,
proxy: {
'/api': {
target: 'http://10.165.0.173:8000',
// target: 'http://10.165.0.173:8000',
target: 'http://192.168.1.115:8000',
ws: true,
pathRewrite: {
'^/api': '/'