Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23284483c4 | ||
|
|
5e3a853a2a | ||
|
|
7845b6333c | ||
|
|
ba14872e89 | ||
|
|
23aaa5a4ab |
231
App.vue
@@ -1,139 +1,92 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||||
@import '@/uni_modules/uview-ui/index.scss';
|
@import "@/uni_modules/uview-ui/index.scss";
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import website from '@/config/website.js';
|
import website from '@/config/website.js'
|
||||||
import { mapGetters } from 'vuex';
|
import {
|
||||||
import { GoLogin } from '@/untils/AxiosUtils.js';
|
mapGetters
|
||||||
// #ifdef H5
|
} from 'vuex'
|
||||||
import { setPlatformByHostName } from '@/untils/customized.js';
|
// #ifdef H5
|
||||||
import { reject } from 'lodash';
|
import {
|
||||||
// #endif
|
setPlatformByHostName
|
||||||
|
} from '@/untils/customized.js'
|
||||||
export default {
|
// #endif
|
||||||
onLaunch: function (options) {
|
|
||||||
this.$store.dispatch('InitArea');
|
export default {
|
||||||
if (options.query.token) {
|
onLaunch: function(options) {
|
||||||
this.tokenlogin(options.query.token).then(() => {
|
this.$store.dispatch('InitArea')
|
||||||
this.$store.dispatch('getUserLocation');
|
if (this.$store.state.user.token) {
|
||||||
this.$store.dispatch('getNoticeState');
|
this.$store.dispatch('startRefreshTokenTimer')
|
||||||
this.$store.dispatch('getMobileIsCms');
|
this.$store.dispatch('startRefreshNewsTimer')
|
||||||
this.$store.dispatch('getResumeInfo');
|
this.$store.dispatch('refreshAuthState')
|
||||||
});
|
this.$store.dispatch('getUserLocation')
|
||||||
} else {
|
this.$store.dispatch('getMobileIsCms')
|
||||||
this.$store.dispatch('FedLogOut');
|
}
|
||||||
}
|
// #ifdef H5
|
||||||
// if (options.query.token) {
|
// 企业定制
|
||||||
// // uni.reLaunch({
|
setPlatformByHostName(this.$store)
|
||||||
// // url: '/pages/login/blank?token=' + options.query.token
|
// #endif
|
||||||
// // })
|
},
|
||||||
// this.tokenlogin(options.query.token)
|
onShow: function() {},
|
||||||
// } else if (this.$api.haslogin()) {
|
onHide: function() {},
|
||||||
// this.$store.dispatch('startRefreshTokenTimer')
|
computed: {
|
||||||
// this.$store.dispatch('startRefreshNewsTimer')
|
...mapGetters(['news']),
|
||||||
// this.$store.dispatch('refreshAuthState')
|
allUnread() {
|
||||||
// this.$store.dispatch('getUserLocation')
|
return this.news.allUnread
|
||||||
// this.$store.dispatch('getMobileIsCms')
|
}
|
||||||
// }
|
},
|
||||||
// #ifdef H5
|
mounted() {
|
||||||
// 企业定制
|
this.$config.showTitle && document.documentElement.style.setProperty('--hide-title', 'block');
|
||||||
setPlatformByHostName(this.$store);
|
},
|
||||||
// #endif
|
watch: {
|
||||||
},
|
allUnread(value) {
|
||||||
onShow: function () {},
|
console.log('allUnread', value)
|
||||||
onHide: function () {},
|
if (!this.$store.state.user.token) {} else if (value > 0) {
|
||||||
computed: {
|
uni.showTabBarRedDot({
|
||||||
...mapGetters(['news', 'auth']),
|
index: 2
|
||||||
allUnread() {
|
})
|
||||||
return this.news.allUnread;
|
uni.$once('newsReadChange', () => {
|
||||||
},
|
uni.showTabBarRedDot({
|
||||||
},
|
index: 2
|
||||||
mounted() {
|
})
|
||||||
this.$config.showTitle && document.documentElement.style.setProperty('--hide-title', 'block');
|
})
|
||||||
},
|
} else {
|
||||||
methods: {
|
uni.hideTabBarRedDot({
|
||||||
tokenlogin(token) {
|
index: 2
|
||||||
return new Promise((resolve, reject) => {
|
})
|
||||||
uni.showLoading({
|
uni.$once('newsReadChange', () => {
|
||||||
title: '登录中',
|
uni.hideTabBarRedDot({
|
||||||
});
|
index: 2
|
||||||
if (token) {
|
})
|
||||||
const that = this;
|
})
|
||||||
this.$store
|
}
|
||||||
.dispatch('LoginByUsername', {
|
}
|
||||||
username: 'admin',
|
}
|
||||||
password: 'admin',
|
};
|
||||||
key: '',
|
</script>
|
||||||
code: '1111',
|
|
||||||
type: 'account',
|
<style lang="scss">
|
||||||
token: token,
|
/*每个页面公共css */
|
||||||
tenantId: website.tenantId,
|
/* tabbar 字体大小 */
|
||||||
})
|
/* .uni-tabbar__label{
|
||||||
.then((resp) => {
|
font-size: 14px !important;
|
||||||
this.$store.dispatch('refreshAuthState').then(() => {
|
} */
|
||||||
uni.hideLoading();
|
@font-face {
|
||||||
resolve();
|
font-family: 'uicon-iconfont';
|
||||||
});
|
font-weight: mormal;
|
||||||
})
|
font-style: mormal;
|
||||||
.catch((err) => {
|
src: url('/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
|
||||||
uni.hideLoading();
|
}
|
||||||
});
|
|
||||||
} else {
|
:root {
|
||||||
GoLogin();
|
--hide-title: none;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
/* #ifdef H5 */
|
||||||
},
|
uni-page-head {
|
||||||
watch: {
|
display: var(--hide-title);
|
||||||
allUnread(value) {
|
}
|
||||||
console.log('allUnread', value);
|
|
||||||
if (!this.$api.haslogin()) {
|
/* #endif */
|
||||||
} else if (value > 0) {
|
</style>
|
||||||
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>
|
|
||||||
262
api/auth.js
@@ -1,144 +1,118 @@
|
|||||||
import {
|
import {
|
||||||
request
|
request
|
||||||
} from '@/untils/AxiosUtils.js';
|
} from '@/untils/AxiosUtils.js';
|
||||||
import {
|
import website from "@/config/website";
|
||||||
decryptJson
|
|
||||||
} from '@/untils/authService.js'
|
const authUrl = '/api/jobslink-api/user/user/auth/auth'
|
||||||
import website from "@/config/website";
|
|
||||||
|
export const findAuth = () => request({
|
||||||
const authUrl = '/api/jobslink-api/user/user/auth/auth'
|
url: '/api/jobslink-api/user/user/find',
|
||||||
|
method: 'get'
|
||||||
// export const findAuth = () => request({
|
});
|
||||||
// url: '/api/jobslink-api/user/user/find',
|
|
||||||
// method: 'get'
|
export const cheakValue = () => request({
|
||||||
// });
|
url: authUrl,
|
||||||
|
method: 'post',
|
||||||
export const findAuth = async () => {
|
data: {
|
||||||
try {
|
cheakvalue: 1,
|
||||||
const encrypted = await request({
|
bakvalue: 0
|
||||||
url: '/api/jobslink-api/user/user/find',
|
}
|
||||||
method: 'get',
|
});
|
||||||
responseType: 'text', // 接收纯文本密文
|
|
||||||
});
|
export const realName = (realName, idNumber) => request({
|
||||||
const decryptedStr = decryptJson(encrypted.data);
|
url: authUrl,
|
||||||
return {
|
method: 'post',
|
||||||
data: JSON.parse(decryptedStr),
|
data: {
|
||||||
};
|
cheakvalue: 2,
|
||||||
} catch (error) {
|
realName,
|
||||||
console.error('请求或解密过程中出错:', error);
|
idNumber
|
||||||
return null;
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
|
export const bank = (bankName, realName, cardNumber, def, id) => request({
|
||||||
export const cheakValue = () => request({
|
url: authUrl,
|
||||||
url: authUrl,
|
method: 'post',
|
||||||
method: 'post',
|
data: {
|
||||||
data: {
|
cheakvalue: 3,
|
||||||
cheakvalue: 1,
|
bankName,
|
||||||
bakvalue: 0
|
cardNumber,
|
||||||
}
|
realName,
|
||||||
});
|
def,
|
||||||
|
id
|
||||||
export const realName = (realName, idNumber) => request({
|
}
|
||||||
url: authUrl,
|
});
|
||||||
method: 'post',
|
|
||||||
data: {
|
export const insure = (bakvalue) => request({
|
||||||
cheakvalue: 2,
|
url: authUrl,
|
||||||
realName,
|
method: 'post',
|
||||||
idNumber
|
data: {
|
||||||
}
|
cheakvalue: 4,
|
||||||
});
|
bakvalue
|
||||||
|
}
|
||||||
export const bank = (bankName, realName, cardNumber, def, id) => request({
|
});
|
||||||
url: authUrl,
|
// 判断当前用户是否采集签名
|
||||||
method: 'post',
|
export const isGather = () => request({
|
||||||
data: {
|
url: "/api/jobslink-api/doc/docUserSeal/isGather",
|
||||||
cheakvalue: 3,
|
method: 'get',
|
||||||
bankName,
|
});
|
||||||
cardNumber,
|
// 个人端签名采集
|
||||||
realName,
|
export const signGather = (signSrcUrl, password, confirmPassword) => request({
|
||||||
def,
|
url: "/api/jobslink-api/doc/docUserSeal/signGather",
|
||||||
id
|
method: 'post',
|
||||||
}
|
data: {
|
||||||
});
|
signSrcUrl,
|
||||||
|
password,
|
||||||
export const insure = (bakvalue) => request({
|
confirmPassword
|
||||||
url: authUrl,
|
}
|
||||||
method: 'post',
|
});
|
||||||
data: {
|
// 获取短信接口
|
||||||
cheakvalue: 4,
|
export const sendValidate = (mobile) => request({
|
||||||
bakvalue
|
url: "/api/jobslink-api/doc/docUserCert/resetPass/sendValidate",
|
||||||
}
|
method: 'get',
|
||||||
});
|
data: {
|
||||||
// 判断当前用户是否采集签名
|
mobile
|
||||||
export const isGather = () => request({
|
}
|
||||||
url: "/api/jobslink-api/doc/docUserSeal/isGather",
|
});
|
||||||
method: 'get',
|
// 密码重置接口
|
||||||
});
|
export const resetPass = (mobile, code, password) => request({
|
||||||
// 个人端签名采集
|
url: "/api/jobslink-api/doc/docUserCert/resetPass",
|
||||||
export const signGather = (signSrcUrl, password, confirmPassword) => request({
|
method: 'post',
|
||||||
url: "/api/jobslink-api/doc/docUserSeal/signGather",
|
headers: {
|
||||||
method: 'post',
|
'SCaptcha-Key': mobile,
|
||||||
data: {
|
'SCaptcha-Code': code,
|
||||||
signSrcUrl,
|
'password': password
|
||||||
password,
|
}
|
||||||
confirmPassword
|
});
|
||||||
}
|
// 我的合同
|
||||||
});
|
export const contractList = (params) => request({
|
||||||
// 获取短信接口
|
url: "/api/jobslink-api/doc/contract/personal/contractList",
|
||||||
export const sendValidate = (mobile) => request({
|
method: 'get',
|
||||||
url: "/api/jobslink-api/doc/docUserCert/resetPass/sendValidate",
|
data: params
|
||||||
method: 'get',
|
});
|
||||||
data: {
|
// 签名密码 /jobslink-api/doc/docUserCert/checkPass
|
||||||
mobile
|
export const checkPass = (params) => request({
|
||||||
}
|
url: "/api/jobslink-api/doc/docUserCert/checkPass",
|
||||||
});
|
method: 'get',
|
||||||
// 密码重置接口
|
data: params
|
||||||
export const resetPass = (mobile, code, password) => request({
|
});
|
||||||
url: "/api/jobslink-api/doc/docUserCert/resetPass",
|
// 返回的是base64格式的pdf
|
||||||
method: 'post',
|
export const viewContract = (params) => request({
|
||||||
headers: {
|
url: "/api/jobslink-api/doc/contract/viewContract",
|
||||||
'SCaptcha-Key': mobile,
|
method: 'get',
|
||||||
'SCaptcha-Code': code,
|
data: params
|
||||||
'password': password
|
});
|
||||||
}
|
|
||||||
});
|
//新实名认证api
|
||||||
// 我的合同
|
export const newCertification = (bakvalue, realName, idNumber, cardNumber, bankCode,def,bankName) => request({
|
||||||
export const contractList = (params) => request({
|
url: '/api/jobslink-api/user/user/auth/authNew',
|
||||||
url: "/api/jobslink-api/doc/contract/personal/contractList",
|
method: 'post',
|
||||||
method: 'get',
|
data: {
|
||||||
data: params
|
bakvalue,
|
||||||
});
|
realName,
|
||||||
// 签名密码 /jobslink-api/doc/docUserCert/checkPass
|
idNumber,
|
||||||
export const checkPass = (params) => request({
|
cardNumber,
|
||||||
url: "/api/jobslink-api/doc/docUserCert/checkPass",
|
bankCode,
|
||||||
method: 'get',
|
def,
|
||||||
data: params
|
bankName
|
||||||
});
|
}
|
||||||
// 返回的是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
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -1,55 +1,47 @@
|
|||||||
import {
|
import {
|
||||||
request
|
request
|
||||||
} from '@/untils/AxiosUtils.js';
|
} from '@/untils/AxiosUtils.js';
|
||||||
import website from "../config/website.js"
|
import website from "../config/website.js"
|
||||||
import store from '@/store/';
|
import store from '@/store/';
|
||||||
// 设置民族政治面貌 jobslink-api/user/user/setInfo
|
// 设置民族政治面貌 jobslink-api/user/user/setInfo
|
||||||
export const setInfo = (params) => request({
|
export const setInfo = (params) => request({
|
||||||
url: "/api/jobslink-api/user/user/setInfo",
|
url: "/api/jobslink-api/user/user/setInfo",
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取用户工会状态 /jobslink-api/doc/user/labourUnion/info
|
// 获取用户工会状态 /jobslink-api/doc/user/labourUnion/info
|
||||||
export const labourUnionInfo = () => request({
|
export const labourUnionInfo = () => request({
|
||||||
url: "/api/jobslink-api/doc/user/labourUnion/info",
|
url: "/api/jobslink-api/doc/user/labourUnion/info",
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
|
|
||||||
// 申请入会
|
// 申请入会
|
||||||
export const contract = (params) => request({
|
export const contract = (params) => request({
|
||||||
url: "/api/jobslink-api/doc/user/labourUnion/apply",
|
url: "/api/jobslink-api/doc/user/labourUnion/apply",
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
});
|
});
|
||||||
|
|
||||||
//会员信息--判断用户是否加入工会
|
//会员信息--判断用户是否加入工会
|
||||||
export const labourUnionDetail = (no) => request({
|
export const labourUnionDetail = (no) => request({
|
||||||
url: "/api/jobslink-api/doc/jkLabourUnionAppl/list",
|
url: "/api/jobslink-api/doc/jkLabourUnionAppl/list",
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params:{no}
|
||||||
no
|
});
|
||||||
}
|
//提交会员申请
|
||||||
});
|
export const saveApplication = (labourunionId,applType,applComment) =>{
|
||||||
//提交会员申请
|
applComment=applComment.substring(0,200)
|
||||||
export const saveApplication = (labourunionId, applType, applComment) => {
|
return request({
|
||||||
applComment = applComment.substring(0, 200)
|
url: "/api/jobslink-api/doc/jkLabourUnionDetail/save",
|
||||||
return request({
|
method: 'post',
|
||||||
url: "/api/jobslink-api/doc/jkLabourUnionDetail/save",
|
data:{labourunionId,applType,applComment}
|
||||||
method: 'post',
|
});
|
||||||
data: {
|
}
|
||||||
labourunionId,
|
|
||||||
applType,
|
//查询提交的申请内容
|
||||||
applComment
|
export const applicationInfo = (no) => request({
|
||||||
}
|
url: "/api/jobslink-api/doc/jkLabourUnionDetail/list",
|
||||||
});
|
method: 'get',
|
||||||
}
|
params:{no}
|
||||||
|
});
|
||||||
//查询提交的申请内容
|
|
||||||
export const applicationInfo = (no) => request({
|
|
||||||
url: "/api/jobslink-api/doc/jkLabourUnionDetail/list",
|
|
||||||
method: 'get',
|
|
||||||
params: {
|
|
||||||
no
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -306,10 +306,4 @@ export const getPolicyContentList = (params) => request({
|
|||||||
url: '/api/jobslink-api/desk/article/getAllArticle',
|
url: '/api/jobslink-api/desk/article/getAllArticle',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
|
||||||
|
|
||||||
export const userWorkSearchListAll = (params) => request({
|
|
||||||
url: '/api/jobslink-api/user/userWork/searchListAll',
|
|
||||||
method: 'get',
|
|
||||||
params
|
|
||||||
})
|
})
|
||||||
@@ -58,8 +58,7 @@ export const setResume = ({
|
|||||||
education,
|
education,
|
||||||
wage,
|
wage,
|
||||||
workplace,
|
workplace,
|
||||||
telephone,
|
telephone,
|
||||||
wageUpper,
|
|
||||||
workExperience
|
workExperience
|
||||||
}) => {
|
}) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -71,8 +70,7 @@ export const setResume = ({
|
|||||||
wage,
|
wage,
|
||||||
workplace,
|
workplace,
|
||||||
telephone,
|
telephone,
|
||||||
workExperience,
|
workExperience
|
||||||
wageUpper,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
12
api/user.js
@@ -72,14 +72,4 @@ export const clearCache = () => request({
|
|||||||
export const mobileIsCms = () => request({
|
export const mobileIsCms = () => request({
|
||||||
url: '/api/jobslink-api/mobile/isCms',
|
url: '/api/jobslink-api/mobile/isCms',
|
||||||
method: 'get'
|
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',
|
|
||||||
});
|
|
||||||
@@ -367,36 +367,40 @@ const workwageUnitCategoryState = [
|
|||||||
|
|
||||||
const addressColumn = [
|
const addressColumn = [
|
||||||
[{
|
[{
|
||||||
value: '95',
|
value: '4',
|
||||||
label: "绵竹市"
|
label: "馆陶县"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '185',
|
value: '5',
|
||||||
label: "广汉市"
|
label: "馆陶镇"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '143',
|
value: '6',
|
||||||
label: "旌阳区"
|
label: "房寨镇"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '150',
|
value: '7',
|
||||||
label: "罗江区"
|
label: "魏僧寨镇"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '42',
|
value: '8',
|
||||||
label: "什邡市"
|
label: "柴堡镇"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '156',
|
value: '9',
|
||||||
label: "中江县"
|
label: "寿山寺"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '44139628',
|
value: '10',
|
||||||
label: "经济技术开发区"
|
label: " 王桥乡"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '79194151',
|
value: '11',
|
||||||
label: "德阳市开发区"
|
label: "路桥乡"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '12',
|
||||||
|
label: "南徐村乡"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -65,12 +65,6 @@
|
|||||||
// uni.switchTab({
|
// uni.switchTab({
|
||||||
// url: item.path
|
// url: item.path
|
||||||
// })
|
// })
|
||||||
if (item.id === 1) {
|
|
||||||
return uni.showToast({
|
|
||||||
icon: "none",
|
|
||||||
title: '系统正在升级完善',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: item.path
|
url: item.path
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,231 +1,254 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="body" @click="goInfo(companyitem)">
|
<view class="body" @click="goInfo(companyitem)">
|
||||||
<view class="heads">
|
<view class="heads">
|
||||||
<view class="head_left">
|
<view class="head_left">
|
||||||
<rich-text :nodes="string">
|
<rich-text :nodes="string">
|
||||||
</rich-text>
|
</rich-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="head_right">
|
<view class="head_right">
|
||||||
{{ companyitem.wage }}
|
{{ companyitem.wage }}{{ wageUnit[companyitem.wageUnitCategory] }}
|
||||||
|
</view>
|
||||||
</view>
|
|
||||||
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
|
<view class="ask">
|
||||||
<view class="ask">
|
<view class="askList">
|
||||||
<view class="askList">
|
{{ companyitem.tradeNames }}
|
||||||
{{ companyitem.tradeNames }}
|
</view>
|
||||||
</view>
|
<view class="askList" v-for="(item, index) in skillNames" :key="index">
|
||||||
<view class="askList" v-for="(item, index) in skillNames" :key="index">
|
{{ item }}
|
||||||
{{ item }}
|
</view>
|
||||||
</view>
|
<view style="flex:1;"></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 == 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 == 1" plain size="mini"></u-tag>
|
<u-tag text="招工" v-if="companyitem.type == 2" plain size="mini"></u-tag>
|
||||||
<u-tag text="招工" v-if="companyitem.type == 2" plain size="mini"></u-tag>
|
</view>
|
||||||
</view>
|
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
||||||
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
<view class="timeAddress" style="position: relative;">
|
||||||
<view class="timeAddress" style="position: relative;">
|
<view style="display: flex;align-items: center;">
|
||||||
<view style="display: flex;align-items: center;">
|
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
|
||||||
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
|
</image>
|
||||||
</image>
|
<view style="font-size: 26rpx;color:#333;">{{ companyitem.missionCompanyName }}</view>
|
||||||
<view style="font-size: 26rpx;color:#333;">{{ companyitem.missionCompanyName }}</view>
|
</view>
|
||||||
</view>
|
<view style="display: flex;align-items: center;position:absolute;right:0;">
|
||||||
<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>
|
||||||
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
|
<view>{{distance(companyitem)}}</view>
|
||||||
<view>--km</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
|
||||||
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
|
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
|
||||||
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
|
<image class="commentimg_image" src="../../static/img/star.full.svg"
|
||||||
<image class="commentimg_image" src="../../static/img/star.full.svg"
|
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
|
||||||
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
|
<image class="commentimg_image" src="../../static/img/star.empty.svg"
|
||||||
<image class="commentimg_image" src="../../static/img/star.empty.svg"
|
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
|
||||||
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
|
</view>
|
||||||
</view>
|
<view class="comment_content allName gocomment" v-else>
|
||||||
<view class="comment_content allName gocomment" v-else>
|
评价
|
||||||
评价
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</template>
|
||||||
</template>
|
|
||||||
|
<script>
|
||||||
<script>
|
import {
|
||||||
import {
|
toDoller,
|
||||||
toDoller,
|
dateFormat
|
||||||
dateFormat
|
} from "../../untils/format.js";
|
||||||
} from "../../untils/format.js";
|
import dictionary from '@/common/textdata.js';
|
||||||
import dictionary from '@/common/textdata.js';
|
import {
|
||||||
|
addZeroPrefix,
|
||||||
export default {
|
getDistanceFromLatLonInKm
|
||||||
beforeCreate: function() {},
|
} from '@/untils/tools.js'
|
||||||
props: {
|
export default {
|
||||||
companyitem: {
|
beforeCreate: function() {},
|
||||||
type: Object,
|
props: {
|
||||||
default () {
|
companyitem: {
|
||||||
return []
|
type: Object,
|
||||||
}
|
default () {
|
||||||
},
|
return []
|
||||||
comment: {
|
}
|
||||||
type: Boolean,
|
},
|
||||||
default: false
|
comment: {
|
||||||
},
|
type: Boolean,
|
||||||
noApply: {
|
default: false
|
||||||
type: Boolean,
|
},
|
||||||
default: true
|
noApply: {
|
||||||
},
|
type: Boolean,
|
||||||
near: {
|
default: true
|
||||||
type: Boolean,
|
},
|
||||||
default: false
|
near: {
|
||||||
}
|
type: Boolean,
|
||||||
},
|
default: false
|
||||||
data() {
|
},
|
||||||
return {
|
position: {
|
||||||
...dictionary,
|
default: null
|
||||||
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
|
}
|
||||||
.missionTitle +
|
},
|
||||||
"</div>"
|
data() {
|
||||||
};
|
return {
|
||||||
},
|
...dictionary,
|
||||||
computed: {
|
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
|
||||||
skillNames() {
|
.missionTitle +
|
||||||
return this.companyitem.skillNames?.split(',')
|
"</div>"
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
computed: {
|
||||||
goComment: function(no) {
|
skillNames() {
|
||||||
uni.navigateTo({
|
return this.companyitem.skillNames?.split(',')
|
||||||
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
|
}
|
||||||
})
|
},
|
||||||
},
|
methods: {
|
||||||
goInfo: function(item) {
|
distance(item) {
|
||||||
// const isCan = this.noApply === false ? '0' : '1'
|
const {
|
||||||
if (item.type == 0) {
|
lon,
|
||||||
uni.navigateTo({
|
lat
|
||||||
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(item.missionNo)}&isCan=1`
|
} = item
|
||||||
})
|
if (this.position && lon > 0) {
|
||||||
} else if (item.type == 1) {
|
const {
|
||||||
uni.navigateTo({
|
longitude,
|
||||||
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`
|
latitude
|
||||||
})
|
} = this.position
|
||||||
}
|
const {
|
||||||
},
|
m,
|
||||||
getCity: function(val) {
|
km
|
||||||
if (val) {
|
} = getDistanceFromLatLonInKm(lat, lon, latitude, longitude)
|
||||||
let areas = this.$store.getters.getAreaParents(val)
|
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
|
||||||
if (areas.length === 3) {
|
}
|
||||||
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
|
return '--km'
|
||||||
}
|
},
|
||||||
}
|
goComment: function(no) {
|
||||||
},
|
uni.navigateTo({
|
||||||
toDoller,
|
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
|
||||||
dateFormat
|
})
|
||||||
}
|
},
|
||||||
}
|
goInfo: function(item) {
|
||||||
</script>
|
// const isCan = this.noApply === false ? '0' : '1'
|
||||||
|
if (item.type == 0) {
|
||||||
<style>
|
uni.navigateTo({
|
||||||
.commentimg_image {
|
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(item.missionNo)}&isCan=1`
|
||||||
width: 40rpx;
|
})
|
||||||
height: 40rpx;
|
} else if (item.type == 1) {
|
||||||
}
|
uni.navigateTo({
|
||||||
|
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`
|
||||||
.commentimg {
|
})
|
||||||
display: flex;
|
}
|
||||||
align-items: center;
|
},
|
||||||
justify-content: flex-end;
|
getCity: function(val) {
|
||||||
}
|
if (val) {
|
||||||
|
let areas = this.$store.getters.getAreaParents(val)
|
||||||
.gocomment {
|
if (areas.length === 3) {
|
||||||
font-size: 26rpx !important;
|
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
|
||||||
border-radius: 5rpx;
|
}
|
||||||
border: 1rpx solid #c3c3c3;
|
}
|
||||||
width: 160rpx;
|
},
|
||||||
text-align: center;
|
toDoller,
|
||||||
float: right;
|
dateFormat
|
||||||
height: 50rpx;
|
}
|
||||||
line-height: 50rpx;
|
}
|
||||||
}
|
</script>
|
||||||
|
|
||||||
.timeAddress {
|
<style>
|
||||||
display: flex;
|
.commentimg_image {
|
||||||
align-items: center;
|
width: 40rpx;
|
||||||
justify-content: space-between;
|
height: 40rpx;
|
||||||
font-family: PingFangSC-Regular;
|
}
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
.commentimg {
|
||||||
margin: 10rpx 0;
|
display: flex;
|
||||||
padding: 10rpx 0;
|
align-items: center;
|
||||||
}
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
.allName {
|
|
||||||
font-family: PingFangSC-Regular;
|
.gocomment {
|
||||||
font-size: 28rpx;
|
font-size: 26rpx !important;
|
||||||
color: #666666;
|
border-radius: 5rpx;
|
||||||
}
|
border: 1rpx solid #c3c3c3;
|
||||||
|
width: 160rpx;
|
||||||
.askList {
|
text-align: center;
|
||||||
/* width: 14%; */
|
float: right;
|
||||||
font-family: PingFangSC-Regular;
|
height: 50rpx;
|
||||||
font-size: 24rpx;
|
line-height: 50rpx;
|
||||||
color: #666666;
|
}
|
||||||
background-color: #f6f6f6;
|
|
||||||
padding: 5rpx 15rpx;
|
.timeAddress {
|
||||||
margin-right: 10rpx;
|
display: flex;
|
||||||
margin-bottom: 10rpx;
|
align-items: center;
|
||||||
}
|
justify-content: space-between;
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
.ask {
|
font-size: 24rpx;
|
||||||
overflow: hidden;
|
color: #999999;
|
||||||
width: 100%;
|
margin: 10rpx 0;
|
||||||
display: flex;
|
padding: 10rpx 0;
|
||||||
align-items: center;
|
}
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: flex-start;
|
.allName {
|
||||||
margin: 20rpx 0;
|
font-family: PingFangSC-Regular;
|
||||||
}
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
.head_right {
|
}
|
||||||
ont-family: PingFangSC-Medium;
|
|
||||||
font-size: 28rpx;
|
.askList {
|
||||||
color: #F46161;
|
/* width: 14%; */
|
||||||
font-weight: bold;
|
font-family: PingFangSC-Regular;
|
||||||
}
|
font-size: 24rpx;
|
||||||
|
color: #666666;
|
||||||
.head_left {
|
background-color: #f6f6f6;
|
||||||
font-family: PingFangSC-Medium;
|
padding: 5rpx 15rpx;
|
||||||
font-size: 32rpx;
|
margin-right: 10rpx;
|
||||||
font-weight: bold;
|
margin-bottom: 10rpx;
|
||||||
color: #333333;
|
}
|
||||||
width: 350rpx;
|
|
||||||
overflow: hidden;
|
.ask {
|
||||||
white-space: nowrap;
|
overflow: hidden;
|
||||||
/*不换行*/
|
width: 100%;
|
||||||
text-overflow: ellipsis;
|
display: flex;
|
||||||
/*超出部分文字以...显示*/
|
align-items: center;
|
||||||
}
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
.highlight {
|
margin: 20rpx 0;
|
||||||
color: #F46161;
|
}
|
||||||
}
|
|
||||||
|
.head_right {
|
||||||
.body {
|
ont-family: PingFangSC-Medium;
|
||||||
width: 690rpx;
|
font-size: 28rpx;
|
||||||
margin: 0rpx auto;
|
color: #F46161;
|
||||||
background-color: #fefefe;
|
font-weight: bold;
|
||||||
overflow: hidden;
|
}
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 20rpx;
|
.head_left {
|
||||||
padding-bottom: 0;
|
font-family: PingFangSC-Medium;
|
||||||
border-radius: 20rpx;
|
font-size: 32rpx;
|
||||||
margin-top: 20rpx;
|
font-weight: bold;
|
||||||
}
|
color: #333333;
|
||||||
|
width: 350rpx;
|
||||||
.heads {
|
overflow: hidden;
|
||||||
display: flex;
|
white-space: nowrap;
|
||||||
align-items: center;
|
/*不换行*/
|
||||||
justify-content: space-between;
|
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>
|
</style>
|
||||||
@@ -57,14 +57,13 @@
|
|||||||
dateFormat
|
dateFormat
|
||||||
} from "../../untils/format.js";
|
} from "../../untils/format.js";
|
||||||
import dictionary from '@/common/textdata.js';
|
import dictionary from '@/common/textdata.js';
|
||||||
|
import {
|
||||||
|
defaults
|
||||||
|
} from "lodash";
|
||||||
import {
|
import {
|
||||||
addZeroPrefix,
|
addZeroPrefix,
|
||||||
getDistanceFromLatLonInKm
|
getDistanceFromLatLonInKm
|
||||||
} from '@/untils/tools.js'
|
} from '@/untils/tools.js'
|
||||||
import {
|
|
||||||
defaults
|
|
||||||
} from "lodash";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
beforeCreate: function() {},
|
beforeCreate: function() {},
|
||||||
props: {
|
props: {
|
||||||
@@ -86,7 +85,9 @@
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
location: Object
|
position: {
|
||||||
|
default: null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="head_right">
|
<view class="head_right">
|
||||||
{{ companyitem.wage }}
|
{{ companyitem.wage }} {{ wageUnit[companyitem.wageUnitCategory] }}
|
||||||
<!-- 后台处理 单位-->
|
|
||||||
<!-- {{ wageUnit[companyitem.wageUnitCategory] }} -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ask">
|
<view class="ask">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="head_right">
|
<view class="head_right">
|
||||||
{{ companyitem.wage }}~{{companyitem.wageUpper}}{{ wageUnit[companyitem.wageUnitCategory] }}
|
{{ companyitem.wage }}{{ wageUnit[companyitem.wageUnitCategory] }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ask">
|
<view class="ask">
|
||||||
@@ -90,8 +90,7 @@
|
|||||||
near: {
|
near: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
}
|
||||||
position: Object,
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
if (this.option && this.option.apikey) {
|
if (this.option && this.option.apikey) {
|
||||||
const script = document.createElement('script')
|
const script = document.createElement('script')
|
||||||
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
|
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
|
||||||
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
||||||
script.onload = this.initEcharts.bind(this)
|
script.onload = this.initEcharts.bind(this)
|
||||||
document.head.appendChild(script)
|
document.head.appendChild(script)
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
if (this.option.apikey) {
|
if (this.option.apikey) {
|
||||||
|
|
||||||
const script = document.createElement('script')
|
const script = document.createElement('script')
|
||||||
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
||||||
|
|
||||||
script.onload = this.initEcharts.bind(this)
|
script.onload = this.initEcharts.bind(this)
|
||||||
document.head.appendChild(script)
|
document.head.appendChild(script)
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
if (this.option && this.option.apikey) {
|
if (this.option && this.option.apikey) {
|
||||||
const script = document.createElement('script')
|
const script = document.createElement('script')
|
||||||
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
|
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
|
||||||
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
||||||
|
|
||||||
script.onload = this.initEcharts.bind(this)
|
script.onload = this.initEcharts.bind(this)
|
||||||
document.head.appendChild(script)
|
document.head.appendChild(script)
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
if (this.option.apikey) {
|
if (this.option.apikey) {
|
||||||
|
|
||||||
const script = document.createElement('script')
|
const script = document.createElement('script')
|
||||||
script.src = 'https://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey
|
||||||
|
|
||||||
script.onload = this.initEcharts.bind(this)
|
script.onload = this.initEcharts.bind(this)
|
||||||
document.head.appendChild(script)
|
document.head.appendChild(script)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'https://api.tianditu.gov.cn/v2/search',
|
url: 'http://api.tianditu.gov.cn/v2/search',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: params,
|
data: params,
|
||||||
success: res => {
|
success: res => {
|
||||||
@@ -257,6 +257,7 @@
|
|||||||
tk: e.apikey
|
tk: e.apikey
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
|
//console.log(res);
|
||||||
if (res.data.result) {
|
if (res.data.result) {
|
||||||
const value = that.formatterAdressLocation(res.data.result, 1)
|
const value = that.formatterAdressLocation(res.data.result, 1)
|
||||||
that.arr_list = [value]
|
that.arr_list = [value]
|
||||||
@@ -268,36 +269,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: () => {
|
||||||
if (window.location.origin.search('localhost') >= 0 || window.location.origin
|
//console.log('获取失败')
|
||||||
.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: () => {
|
complete: () => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|||||||
@@ -5,46 +5,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import 'ol/ol.css';
|
|
||||||
import Map from 'ol/Map';
|
|
||||||
import View from 'ol/View';
|
|
||||||
import TileLayer from 'ol/layer/Tile';
|
|
||||||
import SourceVector from 'ol/source/Vector';
|
|
||||||
import LayerVector from 'ol/layer/Vector';
|
|
||||||
import * as control from 'ol/control';
|
|
||||||
import {
|
|
||||||
toLonLat
|
|
||||||
} from 'ol/proj';
|
|
||||||
import Overlay from 'ol/Overlay';
|
|
||||||
import {
|
|
||||||
toStringHDMS
|
|
||||||
} from 'ol/coordinate';
|
|
||||||
import {
|
|
||||||
Select
|
|
||||||
} from 'ol/interaction'
|
|
||||||
import {
|
|
||||||
GeoJSON
|
|
||||||
} from 'ol/format';
|
|
||||||
import {
|
|
||||||
Style,
|
|
||||||
Circle,
|
|
||||||
Fill,
|
|
||||||
Stroke,
|
|
||||||
Icon,
|
|
||||||
Text
|
|
||||||
} from 'ol/style';
|
|
||||||
import Feature from 'ol/Feature';
|
|
||||||
import {
|
|
||||||
Point,
|
|
||||||
Polygon
|
|
||||||
} from 'ol/geom';
|
|
||||||
import {
|
|
||||||
Logo,
|
|
||||||
TileSuperMapRest,
|
|
||||||
FeatureService,
|
|
||||||
GetFeaturesByGeometryParameters
|
|
||||||
} from '@supermap/iclient-ol';
|
|
||||||
const geoJSONParser = new GeoJSON();
|
|
||||||
let mypoint = require('@/static/img/mypoint.png');
|
let mypoint = require('@/static/img/mypoint.png');
|
||||||
export default {
|
export default {
|
||||||
name: "uMapView",
|
name: "uMapView",
|
||||||
@@ -114,297 +74,12 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.init) {
|
|
||||||
this.initMap()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {}
|
||||||
initMap(options) {
|
|
||||||
let lat, lon;
|
|
||||||
if (options) {
|
|
||||||
lat = options.lat
|
|
||||||
lon = options.lon
|
|
||||||
} else {
|
|
||||||
lat = this.latitude
|
|
||||||
lon = this.longitude
|
|
||||||
}
|
|
||||||
this.map = new Map({
|
|
||||||
target: 'map',
|
|
||||||
controls: control.defaults({
|
|
||||||
attribution: false,
|
|
||||||
zoom: this.ScaleZoom,
|
|
||||||
}),
|
|
||||||
layers: [
|
|
||||||
new TileLayer({ // 使用瓦片
|
|
||||||
source: new TileSuperMapRest({
|
|
||||||
url: this.MapUrl,
|
|
||||||
wrapX: true,
|
|
||||||
}),
|
|
||||||
projection: 'EPSG:4326',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
view: new View({
|
|
||||||
center: [lon, lat],
|
|
||||||
maxZoom: this.maxZoom,
|
|
||||||
minZoom: this.minZoom,
|
|
||||||
zoom: this.zoom,
|
|
||||||
projection: 'EPSG:4326',
|
|
||||||
})
|
|
||||||
});
|
|
||||||
//添加查询结果图层
|
|
||||||
this.vectorSource = new SourceVector({
|
|
||||||
wrapX: false
|
|
||||||
});
|
|
||||||
const resultLayer = new LayerVector({
|
|
||||||
source: this.vectorSource,
|
|
||||||
});
|
|
||||||
|
|
||||||
//添加点图层
|
|
||||||
this.addPointsSource = new SourceVector({
|
|
||||||
wrapX: false
|
|
||||||
});
|
|
||||||
const addPointsLayer = new LayerVector({
|
|
||||||
source: this.addPointsSource,
|
|
||||||
});
|
|
||||||
this.map.addLayer(addPointsLayer);
|
|
||||||
this.map.addLayer(resultLayer);
|
|
||||||
this.map.on('pointermove', (e) => {
|
|
||||||
if (this.isShowToolTip) {
|
|
||||||
this.helpTooltip.setPosition(undefined);
|
|
||||||
this.helpTooltipElement.classList.add('hidden');
|
|
||||||
}
|
|
||||||
this.$emit('regionchange', e.pixel)
|
|
||||||
});
|
|
||||||
this.map.on('singleclick', (e) => {
|
|
||||||
this.$emit('clickMap', e.coordinate)
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.open) {
|
|
||||||
this.addFeature([{
|
|
||||||
id: 1,
|
|
||||||
latitude: lat,
|
|
||||||
longitude: lon,
|
|
||||||
iconPath: mypoint,
|
|
||||||
title: '',
|
|
||||||
width: 20,
|
|
||||||
height: 20
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.flagTip) {
|
|
||||||
this.createHelpTooltip()
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
addMarker(point) {
|
|
||||||
console.log('point', point)
|
|
||||||
// this.ceateMarker([104.404419, 31.133980])
|
|
||||||
},
|
|
||||||
addFeature(covers) {
|
|
||||||
console.log(covers)
|
|
||||||
const features = covers.map((item) => ({
|
|
||||||
type: 'Feature',
|
|
||||||
geometry: {
|
|
||||||
type: 'Point',
|
|
||||||
coordinates: [item.longitude, item.latitude],
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
iconPath: item.iconPath,
|
|
||||||
text: item.title,
|
|
||||||
value: JSON.stringify(item),
|
|
||||||
scale: item.id === 1 ? [0.15, 0.15] : [0.1, 0.1]
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
this.careateFeature(features)
|
|
||||||
|
|
||||||
},
|
|
||||||
ceateMarker(point) {
|
|
||||||
// 创建一个坐标点
|
|
||||||
const pointed = new Point(point); // 这里的[0, 0]应该替换为您的经度和纬度
|
|
||||||
|
|
||||||
// 创建一个特征
|
|
||||||
const pointFeature = new Feature({
|
|
||||||
geometry: pointed,
|
|
||||||
name: 'My Point'
|
|
||||||
});
|
|
||||||
|
|
||||||
pointFeature.setStyle(new Style({
|
|
||||||
image: new Circle({
|
|
||||||
fill: new Fill({
|
|
||||||
color: [255, 0, 0, 0.5]
|
|
||||||
}),
|
|
||||||
stroke: new Stroke({
|
|
||||||
color: 'red',
|
|
||||||
width: 2
|
|
||||||
}),
|
|
||||||
radius: 8
|
|
||||||
})
|
|
||||||
}));
|
|
||||||
|
|
||||||
pointFeature.setProperties({
|
|
||||||
POP: 1,
|
|
||||||
CAPITAL: 'test'
|
|
||||||
});
|
|
||||||
this.addPointsSource.clear()
|
|
||||||
// 将特征添加到矢量图层
|
|
||||||
this.addPointsSource.addFeature(pointFeature);
|
|
||||||
// 确保更新地图视图以显示新的标点
|
|
||||||
this.map.getView().fit(this.addPointsSource.getExtent());
|
|
||||||
// // 或者移动视图
|
|
||||||
// _this.map.getView().animate({
|
|
||||||
// duration: 850,
|
|
||||||
// zoom: 5,
|
|
||||||
// center: point,
|
|
||||||
// });
|
|
||||||
|
|
||||||
},
|
|
||||||
careateFeature(result) {
|
|
||||||
if (this.vectorSourceIcon) {
|
|
||||||
this.vectorSourceIcon.clear()
|
|
||||||
const geojsonObject = {
|
|
||||||
type: 'FeatureCollection',
|
|
||||||
features: result,
|
|
||||||
};
|
|
||||||
this.vectorSourceIcon.addFeatures(geoJSONParser.readFeatures(geojsonObject))
|
|
||||||
this.vectorSourceIcon.changed()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const geojsonObject = {
|
|
||||||
type: 'FeatureCollection',
|
|
||||||
features: result,
|
|
||||||
};
|
|
||||||
// 创建一个图层作为点位
|
|
||||||
this.vectorSourceIcon = new SourceVector({
|
|
||||||
features: geoJSONParser.readFeatures(geojsonObject)
|
|
||||||
});
|
|
||||||
this.vectorLayerIcon = new LayerVector({
|
|
||||||
source: this.vectorSourceIcon,
|
|
||||||
style: feature => {
|
|
||||||
return new Style({
|
|
||||||
image: new Icon({
|
|
||||||
anchor: [0.5, 0.9],
|
|
||||||
scale: feature.get('scale'),
|
|
||||||
src: feature.get('iconPath'),
|
|
||||||
}),
|
|
||||||
text: new Text({
|
|
||||||
text: feature.get('text'),
|
|
||||||
fill: new Fill({
|
|
||||||
color: '#000'
|
|
||||||
}),
|
|
||||||
stroke: new Stroke({
|
|
||||||
color: '#fff',
|
|
||||||
width: 3
|
|
||||||
}),
|
|
||||||
font: 'normal 12px Calibri, sans-serif',
|
|
||||||
textAlign: 'center', // 文本对齐
|
|
||||||
offsetX: 0,
|
|
||||||
offsetY: 15,
|
|
||||||
rotation: 0, // 文本旋转
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.map.addLayer(this.vectorLayerIcon);
|
|
||||||
// 添加事件
|
|
||||||
this.selectInteraction = new Select({
|
|
||||||
layers: [this.vectorLayerIcon]
|
|
||||||
});
|
|
||||||
this.selectInteraction.on('select', (event) => {
|
|
||||||
const selectedFeatures = event.selected;
|
|
||||||
if (selectedFeatures.length) {
|
|
||||||
const select = selectedFeatures[0].values_
|
|
||||||
this.$emit('markertap', JSON.parse(select.value))
|
|
||||||
// tooltip
|
|
||||||
if (this.flagTip) {
|
|
||||||
const coordinate = selectedFeatures[0].values_.geometry.flatCoordinates;
|
|
||||||
this.helpTooltipElement.innerHTML = select.text;
|
|
||||||
console.log(this.helpTooltip)
|
|
||||||
this.helpTooltip.setPosition(coordinate);
|
|
||||||
this.helpTooltipElement.classList.remove('hidden');
|
|
||||||
this.map.addOverlay(this.helpTooltip);
|
|
||||||
this.isShowToolTip = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.map.addInteraction(this.selectInteraction);
|
|
||||||
},
|
|
||||||
createHelpTooltip() {
|
|
||||||
this.helpTooltipElement
|
|
||||||
if (this.helpTooltipElement) {
|
|
||||||
this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement);
|
|
||||||
}
|
|
||||||
this.helpTooltipElement = document.createElement('div');
|
|
||||||
this.helpTooltipElement.className = 'tooltip hidden';
|
|
||||||
this.helpTooltip = new Overlay({
|
|
||||||
element: this.helpTooltipElement,
|
|
||||||
offset: [-30, 20],
|
|
||||||
positioning: 'center-left'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.app-content {}
|
|
||||||
|
|
||||||
.editPane {
|
|
||||||
position: absolute;
|
|
||||||
right: 65px;
|
|
||||||
top: 8px;
|
|
||||||
text-align: center;
|
|
||||||
background: #FFF;
|
|
||||||
z-index: 1000;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-popup {
|
|
||||||
position: absolute;
|
|
||||||
background-color: white;
|
|
||||||
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
|
||||||
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
|
||||||
padding: 15px;
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 1px solid #cccccc;
|
|
||||||
bottom: 12px;
|
|
||||||
left: -50px;
|
|
||||||
min-width: 120px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-popup:after,
|
|
||||||
.ol-popup:before {
|
|
||||||
top: 100%;
|
|
||||||
border: solid transparent;
|
|
||||||
content: " ";
|
|
||||||
height: 0;
|
|
||||||
width: 0;
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-popup:after {
|
|
||||||
border-top-color: white;
|
|
||||||
border-width: 10px;
|
|
||||||
left: 48px;
|
|
||||||
margin-left: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-popup:before {
|
|
||||||
border-top-color: #cccccc;
|
|
||||||
border-width: 11px;
|
|
||||||
left: 48px;
|
|
||||||
margin-left: -11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip {
|
|
||||||
position: relative;
|
|
||||||
background: rgba(0, 0, 0, 0.5);
|
|
||||||
border-radius: 4px;
|
|
||||||
color: white;
|
|
||||||
padding: 4px 8px;
|
|
||||||
opacity: 0.7;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
410
components/uMapView/uMapViewcopy.vue
Normal file
@@ -0,0 +1,410 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app-content">
|
||||||
|
<view id="map" style="width: 100%;height: 100%;"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import 'ol/ol.css';
|
||||||
|
import Map from 'ol/Map';
|
||||||
|
import View from 'ol/View';
|
||||||
|
import TileLayer from 'ol/layer/Tile';
|
||||||
|
import SourceVector from 'ol/source/Vector';
|
||||||
|
import LayerVector from 'ol/layer/Vector';
|
||||||
|
import * as control from 'ol/control';
|
||||||
|
import {
|
||||||
|
toLonLat
|
||||||
|
} from 'ol/proj';
|
||||||
|
import Overlay from 'ol/Overlay';
|
||||||
|
import {
|
||||||
|
toStringHDMS
|
||||||
|
} from 'ol/coordinate';
|
||||||
|
import {
|
||||||
|
Select
|
||||||
|
} from 'ol/interaction'
|
||||||
|
import {
|
||||||
|
GeoJSON
|
||||||
|
} from 'ol/format';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
Circle,
|
||||||
|
Fill,
|
||||||
|
Stroke,
|
||||||
|
Icon,
|
||||||
|
Text
|
||||||
|
} from 'ol/style';
|
||||||
|
import Feature from 'ol/Feature';
|
||||||
|
import {
|
||||||
|
Point,
|
||||||
|
Polygon
|
||||||
|
} from 'ol/geom';
|
||||||
|
import {
|
||||||
|
Logo,
|
||||||
|
TileSuperMapRest,
|
||||||
|
FeatureService,
|
||||||
|
GetFeaturesByGeometryParameters
|
||||||
|
} from '@supermap/iclient-ol';
|
||||||
|
const geoJSONParser = new GeoJSON();
|
||||||
|
let mypoint = require('@/static/img/mypoint.png');
|
||||||
|
export default {
|
||||||
|
name: "uMapView",
|
||||||
|
props: {
|
||||||
|
latitude: {
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
longitude: {
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
zoom: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 10,
|
||||||
|
},
|
||||||
|
maxZoom: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 20,
|
||||||
|
},
|
||||||
|
minZoom: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
ScaleZoom: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
MapUrl: { // 瓦片地图URL
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
flagTip: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
open: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
init: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 实例化对象
|
||||||
|
map: null,
|
||||||
|
addPointsSource: null,
|
||||||
|
vectorSource: null,
|
||||||
|
vectorSourceIcon: null,
|
||||||
|
vectorLayerIcon: null,
|
||||||
|
selectInteraction: null,
|
||||||
|
helpTooltipElement: null,
|
||||||
|
helpTooltip: null,
|
||||||
|
isclearPoint: null,
|
||||||
|
overlay: null,
|
||||||
|
// 控制参数
|
||||||
|
isShowToolTip: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.init) {
|
||||||
|
this.initMap()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initMap(options) {
|
||||||
|
let lat, lon;
|
||||||
|
if (options) {
|
||||||
|
lat = options.lat
|
||||||
|
lon = options.lon
|
||||||
|
} else {
|
||||||
|
lat = this.latitude
|
||||||
|
lon = this.longitude
|
||||||
|
}
|
||||||
|
this.map = new Map({
|
||||||
|
target: 'map',
|
||||||
|
controls: control.defaults({
|
||||||
|
attribution: false,
|
||||||
|
zoom: this.ScaleZoom,
|
||||||
|
}),
|
||||||
|
layers: [
|
||||||
|
new TileLayer({ // 使用瓦片
|
||||||
|
source: new TileSuperMapRest({
|
||||||
|
url: this.MapUrl,
|
||||||
|
wrapX: true,
|
||||||
|
}),
|
||||||
|
projection: 'EPSG:4326',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
view: new View({
|
||||||
|
center: [lon, lat],
|
||||||
|
maxZoom: this.maxZoom,
|
||||||
|
minZoom: this.minZoom,
|
||||||
|
zoom: this.zoom,
|
||||||
|
projection: 'EPSG:4326',
|
||||||
|
})
|
||||||
|
});
|
||||||
|
//添加查询结果图层
|
||||||
|
this.vectorSource = new SourceVector({
|
||||||
|
wrapX: false
|
||||||
|
});
|
||||||
|
const resultLayer = new LayerVector({
|
||||||
|
source: this.vectorSource,
|
||||||
|
});
|
||||||
|
|
||||||
|
//添加点图层
|
||||||
|
this.addPointsSource = new SourceVector({
|
||||||
|
wrapX: false
|
||||||
|
});
|
||||||
|
const addPointsLayer = new LayerVector({
|
||||||
|
source: this.addPointsSource,
|
||||||
|
});
|
||||||
|
this.map.addLayer(addPointsLayer);
|
||||||
|
this.map.addLayer(resultLayer);
|
||||||
|
this.map.on('pointermove', (e) => {
|
||||||
|
if (this.isShowToolTip) {
|
||||||
|
this.helpTooltip.setPosition(undefined);
|
||||||
|
this.helpTooltipElement.classList.add('hidden');
|
||||||
|
}
|
||||||
|
this.$emit('regionchange', e.pixel)
|
||||||
|
});
|
||||||
|
this.map.on('singleclick', (e) => {
|
||||||
|
this.$emit('clickMap', e.coordinate)
|
||||||
|
});
|
||||||
|
|
||||||
|
if (this.open) {
|
||||||
|
this.addFeature([{
|
||||||
|
id: 1,
|
||||||
|
latitude: lat,
|
||||||
|
longitude: lon,
|
||||||
|
iconPath: mypoint,
|
||||||
|
title: '',
|
||||||
|
width: 20,
|
||||||
|
height: 20
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.flagTip) {
|
||||||
|
this.createHelpTooltip()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
addMarker(point) {
|
||||||
|
console.log('point', point)
|
||||||
|
// this.ceateMarker([104.404419, 31.133980])
|
||||||
|
},
|
||||||
|
addFeature(covers) {
|
||||||
|
console.log(covers)
|
||||||
|
const features = covers.map((item) => ({
|
||||||
|
type: 'Feature',
|
||||||
|
geometry: {
|
||||||
|
type: 'Point',
|
||||||
|
coordinates: [item.longitude, item.latitude],
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
iconPath: item.iconPath,
|
||||||
|
text: item.title,
|
||||||
|
value: JSON.stringify(item),
|
||||||
|
scale: item.id === 1 ? [0.15, 0.15] : [0.1, 0.1]
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
this.careateFeature(features)
|
||||||
|
|
||||||
|
},
|
||||||
|
ceateMarker(point) {
|
||||||
|
// 创建一个坐标点
|
||||||
|
const pointed = new Point(point); // 这里的[0, 0]应该替换为您的经度和纬度
|
||||||
|
|
||||||
|
// 创建一个特征
|
||||||
|
const pointFeature = new Feature({
|
||||||
|
geometry: pointed,
|
||||||
|
name: 'My Point'
|
||||||
|
});
|
||||||
|
|
||||||
|
pointFeature.setStyle(new Style({
|
||||||
|
image: new Circle({
|
||||||
|
fill: new Fill({
|
||||||
|
color: [255, 0, 0, 0.5]
|
||||||
|
}),
|
||||||
|
stroke: new Stroke({
|
||||||
|
color: 'red',
|
||||||
|
width: 2
|
||||||
|
}),
|
||||||
|
radius: 8
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
|
||||||
|
pointFeature.setProperties({
|
||||||
|
POP: 1,
|
||||||
|
CAPITAL: 'test'
|
||||||
|
});
|
||||||
|
this.addPointsSource.clear()
|
||||||
|
// 将特征添加到矢量图层
|
||||||
|
this.addPointsSource.addFeature(pointFeature);
|
||||||
|
// 确保更新地图视图以显示新的标点
|
||||||
|
this.map.getView().fit(this.addPointsSource.getExtent());
|
||||||
|
// // 或者移动视图
|
||||||
|
// _this.map.getView().animate({
|
||||||
|
// duration: 850,
|
||||||
|
// zoom: 5,
|
||||||
|
// center: point,
|
||||||
|
// });
|
||||||
|
|
||||||
|
},
|
||||||
|
careateFeature(result) {
|
||||||
|
if (this.vectorSourceIcon) {
|
||||||
|
this.vectorSourceIcon.clear()
|
||||||
|
const geojsonObject = {
|
||||||
|
type: 'FeatureCollection',
|
||||||
|
features: result,
|
||||||
|
};
|
||||||
|
this.vectorSourceIcon.addFeatures(geoJSONParser.readFeatures(geojsonObject))
|
||||||
|
this.vectorSourceIcon.changed()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const geojsonObject = {
|
||||||
|
type: 'FeatureCollection',
|
||||||
|
features: result,
|
||||||
|
};
|
||||||
|
// 创建一个图层作为点位
|
||||||
|
this.vectorSourceIcon = new SourceVector({
|
||||||
|
features: geoJSONParser.readFeatures(geojsonObject)
|
||||||
|
});
|
||||||
|
this.vectorLayerIcon = new LayerVector({
|
||||||
|
source: this.vectorSourceIcon,
|
||||||
|
style: feature => {
|
||||||
|
return new Style({
|
||||||
|
image: new Icon({
|
||||||
|
anchor: [0.5, 0.9],
|
||||||
|
scale: feature.get('scale'),
|
||||||
|
src: feature.get('iconPath'),
|
||||||
|
}),
|
||||||
|
text: new Text({
|
||||||
|
text: feature.get('text'),
|
||||||
|
fill: new Fill({
|
||||||
|
color: '#000'
|
||||||
|
}),
|
||||||
|
stroke: new Stroke({
|
||||||
|
color: '#fff',
|
||||||
|
width: 3
|
||||||
|
}),
|
||||||
|
font: 'normal 12px Calibri, sans-serif',
|
||||||
|
textAlign: 'center', // 文本对齐
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 15,
|
||||||
|
rotation: 0, // 文本旋转
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.map.addLayer(this.vectorLayerIcon);
|
||||||
|
// 添加事件
|
||||||
|
this.selectInteraction = new Select({
|
||||||
|
layers: [this.vectorLayerIcon]
|
||||||
|
});
|
||||||
|
this.selectInteraction.on('select', (event) => {
|
||||||
|
const selectedFeatures = event.selected;
|
||||||
|
if (selectedFeatures.length) {
|
||||||
|
const select = selectedFeatures[0].values_
|
||||||
|
this.$emit('markertap', JSON.parse(select.value))
|
||||||
|
// tooltip
|
||||||
|
if (this.flagTip) {
|
||||||
|
const coordinate = selectedFeatures[0].values_.geometry.flatCoordinates;
|
||||||
|
this.helpTooltipElement.innerHTML = select.text;
|
||||||
|
console.log(this.helpTooltip)
|
||||||
|
this.helpTooltip.setPosition(coordinate);
|
||||||
|
this.helpTooltipElement.classList.remove('hidden');
|
||||||
|
this.map.addOverlay(this.helpTooltip);
|
||||||
|
this.isShowToolTip = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.map.addInteraction(this.selectInteraction);
|
||||||
|
},
|
||||||
|
createHelpTooltip() {
|
||||||
|
this.helpTooltipElement
|
||||||
|
if (this.helpTooltipElement) {
|
||||||
|
this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement);
|
||||||
|
}
|
||||||
|
this.helpTooltipElement = document.createElement('div');
|
||||||
|
this.helpTooltipElement.className = 'tooltip hidden';
|
||||||
|
this.helpTooltip = new Overlay({
|
||||||
|
element: this.helpTooltipElement,
|
||||||
|
offset: [-30, 20],
|
||||||
|
positioning: 'center-left'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.app-content {}
|
||||||
|
|
||||||
|
.editPane {
|
||||||
|
position: absolute;
|
||||||
|
right: 65px;
|
||||||
|
top: 8px;
|
||||||
|
text-align: center;
|
||||||
|
background: #FFF;
|
||||||
|
z-index: 1000;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-popup {
|
||||||
|
position: absolute;
|
||||||
|
background-color: white;
|
||||||
|
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
||||||
|
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
bottom: 12px;
|
||||||
|
left: -50px;
|
||||||
|
min-width: 120px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-popup:after,
|
||||||
|
.ol-popup:before {
|
||||||
|
top: 100%;
|
||||||
|
border: solid transparent;
|
||||||
|
content: " ";
|
||||||
|
height: 0;
|
||||||
|
width: 0;
|
||||||
|
position: absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-popup:after {
|
||||||
|
border-top-color: white;
|
||||||
|
border-width: 10px;
|
||||||
|
left: 48px;
|
||||||
|
margin-left: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-popup:before {
|
||||||
|
border-top-color: #cccccc;
|
||||||
|
border-width: 11px;
|
||||||
|
left: 48px;
|
||||||
|
margin-left: -11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip {
|
||||||
|
position: relative;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 4px;
|
||||||
|
color: white;
|
||||||
|
padding: 4px 8px;
|
||||||
|
opacity: 0.7;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,41 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="v-tabs" :style="{ height: height }">
|
<view class="v-tabs" :style="{ height: height }">
|
||||||
<scroll-view
|
<scroll-view class="scroll-view" :show-scrollbar="false" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width: auto; height: 100%; overflow: hidden;">
|
||||||
class="scroll-view"
|
<view class="v-tabs__inner">
|
||||||
:show-scrollbar="false"
|
<view
|
||||||
scroll-x
|
class="v-tabs__item"
|
||||||
scroll-with-animation
|
:style="{
|
||||||
:scroll-left="scrollLeft"
|
color: activeTab == i ? activeColor : color,
|
||||||
style="width: auto; height: 100%; overflow: hidden"
|
fontSize: activeTab == i ? activeFontSize : fontSize,
|
||||||
|
backgroundColor: activeTab == i ? backgroundColor : '',
|
||||||
|
borderRadius,
|
||||||
|
padding,
|
||||||
|
|
||||||
|
}"
|
||||||
|
:data-index="i"
|
||||||
|
:class="{ active: activeTab == i }"
|
||||||
|
@tap="handleTapItem"
|
||||||
|
v-for="(v, i) in tabs"
|
||||||
|
:key="i"
|
||||||
>
|
>
|
||||||
<view class="v-tabs__inner">
|
<view class="">
|
||||||
<view
|
{{ v }}
|
||||||
class="v-tabs__item"
|
</view>
|
||||||
:style="{
|
<view class="bottomborder"></view>
|
||||||
color: activeTab == i ? activeColor : color,
|
</view>
|
||||||
fontSize: activeTab == i ? activeFontSize : fontSize,
|
</view>
|
||||||
backgroundColor: activeTab == i ? backgroundColor : '',
|
<!-- <view
|
||||||
borderRadius,
|
|
||||||
padding,
|
|
||||||
}"
|
|
||||||
:data-index="i"
|
|
||||||
:class="{ active: activeTab == i }"
|
|
||||||
@tap="handleTapItem"
|
|
||||||
v-for="(v, i) in tabs"
|
|
||||||
:key="i"
|
|
||||||
>
|
|
||||||
<view class="">
|
|
||||||
{{ v }}
|
|
||||||
</view>
|
|
||||||
<view class="bottomborder"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- <view
|
|
||||||
class="v-tabs__line"
|
class="v-tabs__line"
|
||||||
:style="{ width: `${lineWidth}px`, height: `${lineHeight}`, backgroundColor: lineColor, transform: `translateX(${lineLeft}px)`, top: `calc(${height} - ${lineHeight})` }"
|
:style="{ width: `${lineWidth}px`, height: `${lineHeight}`, backgroundColor: lineColor, transform: `translateX(${lineLeft}px)`, top: `calc(${height} - ${lineHeight})` }"
|
||||||
></view> -->
|
></view> -->
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -58,190 +52,190 @@
|
|||||||
* @event {Function(activeTab)} change 改变标签触发
|
* @event {Function(activeTab)} change 改变标签触发
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
name: 'VTabs',
|
name: 'VTabs',
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 0,
|
default: 0
|
||||||
},
|
|
||||||
height: {
|
|
||||||
type: String,
|
|
||||||
default: '45px',
|
|
||||||
},
|
|
||||||
tabs: {
|
|
||||||
type: Array,
|
|
||||||
default() {
|
|
||||||
return [];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
backgroundColor: {
|
|
||||||
type: String,
|
|
||||||
default: 'transparent',
|
|
||||||
},
|
|
||||||
borderRadius: {
|
|
||||||
type: String,
|
|
||||||
default: '5px',
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
type: String,
|
|
||||||
default: '#333333',
|
|
||||||
},
|
|
||||||
activeColor: {
|
|
||||||
type: String,
|
|
||||||
default: '#007AFF',
|
|
||||||
},
|
|
||||||
fontSize: {
|
|
||||||
type: String,
|
|
||||||
default: '14px',
|
|
||||||
},
|
|
||||||
activeFontSize: {
|
|
||||||
type: String,
|
|
||||||
default: '14px',
|
|
||||||
},
|
|
||||||
padding: {
|
|
||||||
type: String,
|
|
||||||
default: '10rpx 20rpx',
|
|
||||||
},
|
|
||||||
lineScale: {
|
|
||||||
type: Number,
|
|
||||||
default: 0.6,
|
|
||||||
},
|
|
||||||
lineHeight: {
|
|
||||||
type: String,
|
|
||||||
default: '3px',
|
|
||||||
},
|
|
||||||
lineColor: {
|
|
||||||
type: String,
|
|
||||||
default: '#007AFF',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data() {
|
height: {
|
||||||
return {
|
type: String,
|
||||||
scrollLeft: 0,
|
default: '45px'
|
||||||
activeTab: 0,
|
|
||||||
width: 0,
|
|
||||||
lineLeft: 0,
|
|
||||||
lineWidth: 0,
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
watch: {
|
tabs: {
|
||||||
activeTab(newVal) {
|
type: Array,
|
||||||
this.$emit('input', newVal * 1);
|
default() {
|
||||||
},
|
return []
|
||||||
value(newVal) {
|
}
|
||||||
this.activeTab = newVal;
|
|
||||||
this.getTabsWidth(0);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
backgroundColor: {
|
||||||
handleTapItem(e) {
|
type: String,
|
||||||
const index = e.currentTarget.dataset.index;
|
default: 'transparent'
|
||||||
if (this.activeTab != index) {
|
},
|
||||||
this.activeTab = index;
|
borderRadius: {
|
||||||
this.getTabsWidth(e.currentTarget.offsetLeft);
|
type: String,
|
||||||
this.$emit('change', this.activeTab);
|
default: '5px'
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
default: '#333333'
|
||||||
|
},
|
||||||
|
activeColor: {
|
||||||
|
type: String,
|
||||||
|
default: '#007AFF'
|
||||||
|
},
|
||||||
|
fontSize: {
|
||||||
|
type: String,
|
||||||
|
default: '14px'
|
||||||
|
},
|
||||||
|
activeFontSize: {
|
||||||
|
type: String,
|
||||||
|
default: '14px'
|
||||||
|
},
|
||||||
|
padding: {
|
||||||
|
type: String,
|
||||||
|
default: '10rpx 20rpx'
|
||||||
|
},
|
||||||
|
lineScale: {
|
||||||
|
type: Number,
|
||||||
|
default: 0.6
|
||||||
|
},
|
||||||
|
lineHeight: {
|
||||||
|
type: String,
|
||||||
|
default: '3px'
|
||||||
|
},
|
||||||
|
lineColor: {
|
||||||
|
type: String,
|
||||||
|
default: '#007AFF'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
scrollLeft: 0,
|
||||||
|
activeTab: 0,
|
||||||
|
width: 0,
|
||||||
|
lineLeft: 0,
|
||||||
|
lineWidth: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
activeTab(newVal) {
|
||||||
|
this.$emit('input', newVal * 1)
|
||||||
|
},
|
||||||
|
value(newVal) {
|
||||||
|
this.activeTab = newVal
|
||||||
|
this.getTabsWidth(0)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTapItem(e) {
|
||||||
|
const index = e.currentTarget.dataset.index
|
||||||
|
if (this.activeTab != index) {
|
||||||
|
this.activeTab = index
|
||||||
|
this.getTabsWidth(e.currentTarget.offsetLeft)
|
||||||
|
this.$emit('change', this.activeTab)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getTabsWidth(offsetLeft) {
|
||||||
|
const query = uni.createSelectorQuery().in(this)
|
||||||
|
query
|
||||||
|
.select('.v-tabs')
|
||||||
|
.boundingClientRect(data => {
|
||||||
|
this.width = data.width
|
||||||
|
})
|
||||||
|
.exec()
|
||||||
|
setTimeout(() => {
|
||||||
|
let i = 0
|
||||||
|
let width = 0
|
||||||
|
query
|
||||||
|
.selectAll('.v-tabs__item')
|
||||||
|
.boundingClientRect(data => {
|
||||||
|
width = data.reduce((total, currentValue, currentIndex, arr) => {
|
||||||
|
if (currentIndex < this.activeTab) {
|
||||||
|
total = total + currentValue.width
|
||||||
|
}
|
||||||
|
return total
|
||||||
|
}, 0)
|
||||||
|
const padding = this.padding.split(' ')[0]
|
||||||
|
const res = /(\d+)(upx|rpx|px)/.exec(padding)
|
||||||
|
if (res && (res[2] == 'upx' || res[2] == 'rpx')) {
|
||||||
|
width += uni.upx2px(res[1]) * 2 * this.activeTab
|
||||||
|
} else {
|
||||||
|
width += res[1] * this.activeTab
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
getTabsWidth(offsetLeft) {
|
.exec()
|
||||||
const query = uni.createSelectorQuery().in(this);
|
query
|
||||||
query
|
.select('.v-tabs__item.active')
|
||||||
.select('.v-tabs')
|
.boundingClientRect(data => {
|
||||||
.boundingClientRect((data) => {
|
const ol = offsetLeft ? offsetLeft : width
|
||||||
this.width = data.width;
|
if (data.width) {
|
||||||
})
|
this.lineLeft = ol + (data.width * (1 - this.lineScale)) / 2
|
||||||
.exec();
|
this.lineWidth = data.width * this.lineScale
|
||||||
setTimeout(() => {
|
this.scrollLeft = ol - (this.width - data.width) / 2
|
||||||
let i = 0;
|
}
|
||||||
let width = 0;
|
})
|
||||||
query
|
.exec()
|
||||||
.selectAll('.v-tabs__item')
|
}, 10)
|
||||||
.boundingClientRect((data) => {
|
}
|
||||||
width = data.reduce((total, currentValue, currentIndex, arr) => {
|
},
|
||||||
if (currentIndex < this.activeTab) {
|
mounted() {
|
||||||
total = total + currentValue.width;
|
this.activeTab = this.value
|
||||||
}
|
this.getTabsWidth(0)
|
||||||
return total;
|
}
|
||||||
}, 0);
|
}
|
||||||
const padding = this.padding.split(' ')[0];
|
|
||||||
const res = /(\d+)(upx|rpx|px)/.exec(padding);
|
|
||||||
if (res && (res[2] == 'upx' || res[2] == 'rpx')) {
|
|
||||||
width += uni.upx2px(res[1]) * 2 * this.activeTab;
|
|
||||||
} else {
|
|
||||||
width += res[1] * this.activeTab;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.exec();
|
|
||||||
query
|
|
||||||
.select('.v-tabs__item.active')
|
|
||||||
.boundingClientRect((data) => {
|
|
||||||
const ol = offsetLeft ? offsetLeft : width;
|
|
||||||
if (data.width) {
|
|
||||||
this.lineLeft = ol + (data.width * (1 - this.lineScale)) / 2;
|
|
||||||
this.lineWidth = data.width * this.lineScale;
|
|
||||||
this.scrollLeft = ol - (this.width - data.width) / 2;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.exec();
|
|
||||||
}, 10);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.activeTab = this.value;
|
|
||||||
this.getTabsWidth(0);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.v-tabs {
|
.v-tabs {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
border-bottom: 1rpx solid #dddddd;
|
||||||
|
.v-tabs__inner {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
display: flex;
|
||||||
white-space: nowrap;
|
align-items: center;
|
||||||
overflow: hidden;
|
height: 100%;
|
||||||
border-bottom: 1rpx solid #dddddd;
|
justify-content: center;
|
||||||
.v-tabs__inner {
|
background-color: #fefefe;
|
||||||
position: relative;
|
// border-bottom: 1rpx solid #dddddd;
|
||||||
display: flex;
|
border-bottom: 0;
|
||||||
align-items: center;
|
}
|
||||||
height: 100%;
|
|
||||||
justify-content: center;
|
.active{
|
||||||
background-color: #fefefe;
|
border-radius: 0 !important;
|
||||||
// border-bottom: 1rpx solid #dddddd;
|
.bottomborder{
|
||||||
border-bottom: 0;
|
width: 42rpx;
|
||||||
|
height: 6rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #1B66FF;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
display: block !important;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.v-tabs__item {
|
||||||
|
// display: inline-flex;
|
||||||
|
margin-right: 20upx;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.active {
|
.v-tabs__line {
|
||||||
border-radius: 0 !important;
|
position: absolute;
|
||||||
.bottomborder {
|
z-index: 99;
|
||||||
width: 42rpx;
|
transition: all 0.3s linear;
|
||||||
height: 6rpx;
|
border-radius: 4upx;
|
||||||
margin: 0 auto;
|
}
|
||||||
background-color: #1b66ff;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
display: block !important;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.v-tabs__item {
|
|
||||||
// display: inline-flex;
|
|
||||||
margin-right: 20upx;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.v-tabs__line {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 99;
|
|
||||||
transition: all 0.3s linear;
|
|
||||||
border-radius: 4upx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep ::-webkit-scrollbar {
|
/deep/ ::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,11 +3,9 @@ module.exports = {
|
|||||||
// 图片地址
|
// 图片地址
|
||||||
imageUrl: '',
|
imageUrl: '',
|
||||||
// 天地图tk
|
// 天地图tk
|
||||||
apiKey: 'e4266a5e84fe6c10f60c559967f0a03f',
|
apiKey: 'aa9b92683ff22363aa17baa16599cff8',
|
||||||
// 显示标题
|
// 显示标题
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
loginURl: 'https://dy12333.org.cn/h5/#/pages/qyPackge/user/login/login',
|
|
||||||
AESKey: 'mL8na90u+5hoa/HKiMinvA==',
|
|
||||||
// map 1、黑色模块 2、白色模块
|
// 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/f346b6c59dc64d5793713cf384fab78d/33cbaa14370449a08588f1074ecfec67',
|
||||||
// supperMap: 'http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768',
|
// supperMap: 'http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768',
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
21
main.js
@@ -8,9 +8,6 @@ import tools from '@/untils/tools.js'
|
|||||||
import {
|
import {
|
||||||
VueJsonp
|
VueJsonp
|
||||||
} from 'vue-jsonp'
|
} from 'vue-jsonp'
|
||||||
import {
|
|
||||||
GoLogin
|
|
||||||
} from '@/untils/AxiosUtils.js';
|
|
||||||
// 注册全局组件
|
// 注册全局组件
|
||||||
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
|
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
|
||||||
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
|
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
|
||||||
@@ -23,17 +20,9 @@ function haslogin() {
|
|||||||
return !!store.state.user.token
|
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) {
|
function navTo(url, needLogin) {
|
||||||
if (needLogin && !haslogin()) {
|
console.log(url)
|
||||||
GoLogin()
|
if (needLogin) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -41,7 +30,6 @@ function navTo(url, needLogin) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const msg = (title, duration = 1500, mask = false, icon = 'none') => {
|
const msg = (title, duration = 1500, mask = false, icon = 'none') => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title,
|
title,
|
||||||
@@ -62,13 +50,12 @@ Vue.component('jl-button', JlButton)
|
|||||||
Vue.component('jl-form', JlForm)
|
Vue.component('jl-form', JlForm)
|
||||||
Vue.component('jl-form-item', JlFormItem)
|
Vue.component('jl-form-item', JlFormItem)
|
||||||
Vue.component('cs-button', CSButton)
|
Vue.component('cs-button', CSButton)
|
||||||
Vue.component('super-map', superMapView)
|
// Vue.component('super-map', superMapView)
|
||||||
Vue.component('empty', empty)
|
Vue.component('empty', empty)
|
||||||
Vue.prototype.$api = {
|
Vue.prototype.$api = {
|
||||||
msg,
|
msg,
|
||||||
sleep,
|
sleep,
|
||||||
haslogin,
|
haslogin
|
||||||
hasResume
|
|
||||||
}
|
}
|
||||||
Vue.prototype.tools = tools
|
Vue.prototype.tools = tools
|
||||||
Vue.prototype.$config = config
|
Vue.prototype.$config = config
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "招聘",
|
"name": "招聘",
|
||||||
"appid": "__UNI__BFB9B45",
|
"appid": "__UNI__2BC0F87",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "1.0.0",
|
"versionName": "1.0.0",
|
||||||
"versionCode": "100",
|
"versionCode": "100",
|
||||||
|
|||||||
5
package-lock.json
generated
@@ -1805,11 +1805,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
|
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
|
||||||
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
|
"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": {
|
"csscolorparser": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmmirror.com/csscolorparser/-/csscolorparser-1.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/csscolorparser/-/csscolorparser-1.0.3.tgz",
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@supermap/iclient-ol": "^11.1.1",
|
"@supermap/iclient-ol": "^11.1.1",
|
||||||
"crypto-js": "^4.2.0",
|
|
||||||
"decimal.js": "^10.2.0",
|
"decimal.js": "^10.2.0",
|
||||||
"js-base64": "^2.4.9",
|
"js-base64": "^2.4.9",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
@@ -27,4 +26,4 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@supermap/babel-plugin-import": "0.0.1"
|
"@supermap/babel-plugin-import": "0.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (!this.$api.haslogin()){
|
if (!this.$store.state.user.token){
|
||||||
//modalTitle, content, whetherCancel, confirmText, pageUrl, cancelUrl
|
//modalTitle, content, whetherCancel, confirmText, pageUrl, cancelUrl
|
||||||
showUniModal('提示','您还未登录,点击确认去登录',true,'确定','/pages/login/login','/pages/index/index')
|
showUniModal('提示','您还未登录,点击确认去登录',true,'确定','/pages/login/login','/pages/index/index')
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
}) => {
|
}) => {
|
||||||
console.log('detail,', detail)
|
console.log('detail,', detail)
|
||||||
// this.skillsId = id
|
// this.skillsId = id
|
||||||
this.skillsName = `${detail.parentLabel}-${detail.label}`
|
this.skillsName = `${detail.parentLabel}-${detail.parentTwoLabel}-${detail.label}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -113,12 +113,10 @@
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
skillLevel: function() {
|
skillLevel: function() {
|
||||||
uni.navigateTo({
|
|
||||||
url: `./skill?id=${this.worktypesId}&tradeId=${this.tradeId}&maxLayer=2&type=2`
|
uni.navigateTo({
|
||||||
|
url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=3&type=2`
|
||||||
})
|
})
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=3&type=2`
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
submit: async function() {
|
submit: async function() {
|
||||||
// console.log(this.tradeName, this.worktypesName, this.skillsName);
|
// console.log(this.tradeName, this.worktypesName, this.skillsName);
|
||||||
|
|||||||
@@ -31,10 +31,8 @@
|
|||||||
<view class="list_text">
|
<view class="list_text">
|
||||||
{{ item.worktypes }}、{{ item.skills }}
|
{{ item.worktypes }}、{{ item.skills }}
|
||||||
</view>
|
</view>
|
||||||
<view class="delt" @click="removeSkills(item.id, index)">
|
<view>
|
||||||
删除
|
<image src="../../../static/img/left_right.png" mode=""></image>
|
||||||
<!-- 向右滑动删除 -->
|
|
||||||
<!-- <image src="../../../static/img/left_right.png" mode=""></image> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</m-slide-list>
|
</m-slide-list>
|
||||||
@@ -76,21 +74,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- @click="showPickerFunc('wage')" -->
|
<view class="jobcontent" @click="showPickerFunc('wage')">
|
||||||
<view class="jobcontent" >
|
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view v-bind:class="['jobAddress', { 'input-error': !myResume.wage && isShowBorder }]">
|
<view v-bind:class="['jobAddress', { 'input-error': !myResume.wage && isShowBorder }]">
|
||||||
我的期望薪资
|
我的期望薪资
|
||||||
</view>
|
</view>
|
||||||
<view v-bind:class="['jobText', 'jobDis']">
|
<view v-bind:class="['jobText']">
|
||||||
<!-- {{ myResume.wage ? myResume.wage : '请选择' }} -->
|
{{ myResume.wage ? myResume.wage : '请选择' }}
|
||||||
|
|
||||||
<u--input type="number" border="none" @focus="change1" @change="change($event, 'wage')" :value="myResume.wage" placeholder="请输入期望薪资范围" class="jobNumber" /><span>~</span>
|
|
||||||
<u--input type="number" border="none" @focus="change1" @change="change($event, 'wageUpper')" :value="myResume.wageUpper" placeholder="请输入期望薪资范围" class="jobNumber" /><span>元/月</span>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <image src="../../../static/img/right.svg" mode=""></image> -->
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="jobcontent">
|
<view class="jobcontent">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
@@ -171,15 +165,12 @@
|
|||||||
<!-- 省市 -->
|
<!-- 省市 -->
|
||||||
<data-picker :show="areaModal.addressShow" @confirm='confirmAddress' @cancel='areaModal.addressShow = false'
|
<data-picker :show="areaModal.addressShow" @confirm='confirmAddress' @cancel='areaModal.addressShow = false'
|
||||||
@close='areaModal.addressShow = false' :defaultNames="areaModal.defaultNames" :indexs="areaModal.indexs"
|
@close='areaModal.addressShow = false' :defaultNames="areaModal.defaultNames" :indexs="areaModal.indexs"
|
||||||
:defaultIds="areaModal.defaultIds" :showToolbar="false" :showBottombar="true" :sourceData=areaData
|
:defaultIds="areaModal.defaultIds" :showToolbar="false" :showBottombar="true"
|
||||||
:labelName="areaModal.labelName"></data-picker>
|
:labelName="areaModal.labelName"></data-picker>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
|
||||||
GoLogin
|
|
||||||
} from '@/untils/AxiosUtils.js';
|
|
||||||
import {
|
import {
|
||||||
mapGetters
|
mapGetters
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
@@ -197,9 +188,7 @@
|
|||||||
import {
|
import {
|
||||||
cloneDeep,
|
cloneDeep,
|
||||||
forIn
|
forIn
|
||||||
} from 'lodash';
|
} from 'lodash';
|
||||||
import area from "./province-city-county.json"
|
|
||||||
|
|
||||||
const validateForm = {
|
const validateForm = {
|
||||||
name: '请输入企业名称',
|
name: '请输入企业名称',
|
||||||
work: '请输入工作岗位',
|
work: '请输入工作岗位',
|
||||||
@@ -225,8 +214,7 @@
|
|||||||
city: {},
|
city: {},
|
||||||
education: {},
|
education: {},
|
||||||
wage: "",
|
wage: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
wageUpper: ''
|
|
||||||
},
|
},
|
||||||
mySkills: [],
|
mySkills: [],
|
||||||
id: undefined,
|
id: undefined,
|
||||||
@@ -250,26 +238,16 @@
|
|||||||
address: '',
|
address: '',
|
||||||
addressShow: false,
|
addressShow: false,
|
||||||
title: 'Hello',
|
title: 'Hello',
|
||||||
indexs: [0,0],
|
// indexs: [0, 0, 8],
|
||||||
// defaultIds: [1, 110000, 110106],
|
// defaultIds: [1, 110000, 110106],
|
||||||
// defaultNames: ['北京市', '北京市', '东城区'],
|
defaultNames: ['北京市', '北京市', '东城区'],
|
||||||
// defaultNames: ['德阳市', '旌阳区'],
|
|
||||||
labelName: "areaName"
|
labelName: "areaName"
|
||||||
|
|
||||||
},
|
},
|
||||||
areaData: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (!this.$api.haslogin()) {
|
this.getSkill()
|
||||||
GoLogin()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.getSkill()
|
|
||||||
// this.areaData = area.find(i => i.id === 510000).children
|
|
||||||
const areaObj = area.find(i => i.id === 510000).children
|
|
||||||
const areaObj1 = areaObj.find(i => i.id === 510600)
|
|
||||||
this.areaData = [areaObj1]
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getResume()
|
this.getResume()
|
||||||
@@ -280,7 +258,7 @@
|
|||||||
watch: {
|
watch: {
|
||||||
myResume: {
|
myResume: {
|
||||||
handler: function(newVal, oldVal) {
|
handler: function(newVal, oldVal) {
|
||||||
if (newVal.city && newVal.education && newVal.wage && newVal.phone && newVal.wageUpper) {
|
if (newVal.city && newVal.education && newVal.wage && newVal.phone) {
|
||||||
this.canSubMit = true;
|
this.canSubMit = true;
|
||||||
} else {
|
} else {
|
||||||
this.canSubMit = false;
|
this.canSubMit = false;
|
||||||
@@ -361,8 +339,7 @@
|
|||||||
education: {
|
education: {
|
||||||
label: data.education
|
label: data.education
|
||||||
},
|
},
|
||||||
wage: data.wage,
|
wage: data.wage,
|
||||||
wageUpper: data.wageUpper,
|
|
||||||
phone: data.telephone
|
phone: data.telephone
|
||||||
}
|
}
|
||||||
this.isShowButton = false;
|
this.isShowButton = false;
|
||||||
@@ -500,15 +477,7 @@
|
|||||||
}
|
}
|
||||||
this.isShowButton = true;
|
this.isShowButton = true;
|
||||||
this.showPicker = true;
|
this.showPicker = true;
|
||||||
},
|
},
|
||||||
change(e, type) {
|
|
||||||
console.log(type, e, '----')
|
|
||||||
this.myResume[type] = e
|
|
||||||
|
|
||||||
},
|
|
||||||
change1(){
|
|
||||||
this.isShowButton = true;
|
|
||||||
},
|
|
||||||
pickerButtonFunc(e) {
|
pickerButtonFunc(e) {
|
||||||
console.log(e, this.myResume, this.myResume[this.showType]);
|
console.log(e, this.myResume, this.myResume[this.showType]);
|
||||||
this.myResume[this.showType] = e.value[0];
|
this.myResume[this.showType] = e.value[0];
|
||||||
@@ -538,8 +507,7 @@
|
|||||||
city,
|
city,
|
||||||
education,
|
education,
|
||||||
phone,
|
phone,
|
||||||
wage,
|
wage
|
||||||
wageUpper,
|
|
||||||
} = this.myResume
|
} = this.myResume
|
||||||
// 中国大陆手机号码正则表达式
|
// 中国大陆手机号码正则表达式
|
||||||
const mobileRegex = /\b(1[3-9]\d{9})\b/;
|
const mobileRegex = /\b(1[3-9]\d{9})\b/;
|
||||||
@@ -547,7 +515,7 @@
|
|||||||
const landlineRegex = /\b(0\d{2,3}-\d{7,8}(-\d{1,4})?)\b/;
|
const landlineRegex = /\b(0\d{2,3}-\d{7,8}(-\d{1,4})?)\b/;
|
||||||
|
|
||||||
const workList = JSON.stringify(this.gzList)
|
const workList = JSON.stringify(this.gzList)
|
||||||
if (!wage || !wageUpper) return this.showToast("请正确填写薪资范围");
|
|
||||||
if (mobileRegex.test(phone) || landlineRegex.test(phone)) {
|
if (mobileRegex.test(phone) || landlineRegex.test(phone)) {
|
||||||
// 电话号码格式正确
|
// 电话号码格式正确
|
||||||
console.log(phone, "电话号码格式正确");
|
console.log(phone, "电话号码格式正确");
|
||||||
@@ -556,13 +524,11 @@
|
|||||||
education: education.label,
|
education: education.label,
|
||||||
workplace: city.workplace ? city.workplace : city.parentLabel + '-' + city.label,
|
workplace: city.workplace ? city.workplace : city.parentLabel + '-' + city.label,
|
||||||
telephone: phone,
|
telephone: phone,
|
||||||
wage,
|
wage,
|
||||||
wageUpper,
|
|
||||||
workExperience: workList
|
workExperience: workList
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.isShowButton = false;
|
this.isShowButton = false;
|
||||||
this.getResume()
|
this.getResume()
|
||||||
this.$store.dispatch('getResumeInfo')
|
|
||||||
this.$api.msg('保存成功')
|
this.$api.msg('保存成功')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -842,49 +808,5 @@
|
|||||||
|
|
||||||
.input-error {
|
.input-error {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.delt {
|
|
||||||
color: red;
|
|
||||||
font-size: 26rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobDis {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
height: 60rpx;
|
|
||||||
border: 1rpx solid #999999;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
span:nth-of-type(1) {
|
|
||||||
padding: 0 20rpx;
|
|
||||||
border: 1rpx solid #999999;
|
|
||||||
border-top: none;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
span:nth-of-type(2) {
|
|
||||||
padding: 0 10rpx;
|
|
||||||
width: 80rpx;
|
|
||||||
font-size: 20rpx;
|
|
||||||
border-left: 1rpx solid #999999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.jobNumber {
|
|
||||||
height: 60rpx;
|
|
||||||
padding-left: 16rpx;
|
|
||||||
/* border: 1rpx solid #999999; */
|
|
||||||
/* border-top: none;
|
|
||||||
border-bottom: none; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-input-placeholder {
|
|
||||||
padding-left: 16rpx !important;
|
|
||||||
}
|
|
||||||
.uni-input-input, .uni-input-placeholder {
|
|
||||||
padding-left: 16rpx !important;
|
|
||||||
}
|
|
||||||
.u-input__content__field-wrapper__field {
|
|
||||||
padding-left: 16rpx !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -1,27 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="search">
|
<view class="title">
|
||||||
<input
|
全部
|
||||||
v-model="searchKeyword"
|
</view>
|
||||||
type="text"
|
<block v-for="(item, index) in city" :key="index">
|
||||||
class="search-input"
|
|
||||||
placeholder="请输入关键词搜索"
|
|
||||||
@input="handleSearch"
|
|
||||||
@focus="isSearchFocused = true"
|
|
||||||
@blur="handleSearchBlur"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="title">
|
|
||||||
全部
|
|
||||||
</view>
|
|
||||||
<block v-for="(item, index) in filteredResults" :key="index">
|
|
||||||
<view class="cityList" @click="cityClick(item)">
|
<view class="cityList" @click="cityClick(item)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
<image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image>
|
<image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image>
|
||||||
<image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image>
|
<image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view>
|
<view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view>
|
||||||
<view class="btn" v-if="layer === maxLayer" @click="comfirm">
|
<view class="btn" v-if="layer === maxLayer" @click="comfirm">
|
||||||
<view class="bottombtn">
|
<view class="bottombtn">
|
||||||
@@ -49,11 +37,7 @@
|
|||||||
id: '',
|
id: '',
|
||||||
label: '',
|
label: '',
|
||||||
|
|
||||||
tradeId: '',
|
tradeId: '',
|
||||||
searchKeyword: '', // 模糊关键字搜索
|
|
||||||
isSearchFocused: true,
|
|
||||||
searchFields: ['name'],
|
|
||||||
type: 1
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -67,20 +51,7 @@
|
|||||||
} else {
|
} else {
|
||||||
return this.workTypeList;
|
return this.workTypeList;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
filteredResults() {
|
|
||||||
if (!this.searchKeyword) {
|
|
||||||
return this.city
|
|
||||||
}
|
|
||||||
|
|
||||||
const keyword = this.searchKeyword.toLowerCase()
|
|
||||||
return this.city.filter(item => {
|
|
||||||
return this.searchFields.some(field => {
|
|
||||||
const value = this.getObjectValue(item, field)
|
|
||||||
return value && value.toLowerCase().includes(keyword)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
getWorktypesList(1).then(res => {
|
getWorktypesList(1).then(res => {
|
||||||
@@ -93,15 +64,12 @@
|
|||||||
tradeId,
|
tradeId,
|
||||||
parentId,
|
parentId,
|
||||||
layer,
|
layer,
|
||||||
maxLayer,
|
maxLayer
|
||||||
type
|
|
||||||
}) {
|
}) {
|
||||||
this.parentId = parentId
|
this.parentId = parentId
|
||||||
this.tradeId = tradeId || 0
|
this.tradeId = tradeId || 0
|
||||||
this.layer = parseInt(layer || 1)
|
this.layer = parseInt(layer || 1)
|
||||||
this.maxLayer = parseInt(maxLayer || 2)
|
this.maxLayer = parseInt(maxLayer || 2)
|
||||||
console.log(type, 'type')
|
|
||||||
this.type = type
|
|
||||||
},
|
},
|
||||||
onShow: function() {},
|
onShow: function() {},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -120,32 +88,18 @@
|
|||||||
},
|
},
|
||||||
goCityInfo(item) {
|
goCityInfo(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./skill?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}&type=${this.type}`
|
url: `./skill?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
comfirm: function() {
|
comfirm: function() {
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
console.log(this.type)
|
uni.$emit('setworkTypes', {
|
||||||
if (this.type == '1') {
|
detail: {
|
||||||
console.log('00000000')
|
id: this.id,
|
||||||
uni.$emit('setworkTypes', {
|
label: this.label,
|
||||||
detail: {
|
parentLabel: this.$route.query.parentLabel
|
||||||
id: this.id,
|
}
|
||||||
label: this.label,
|
})
|
||||||
parentLabel: this.$route.query.parentLabel
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.log('1111111')
|
|
||||||
uni.$emit('setSkill', {
|
|
||||||
detail: {
|
|
||||||
id: this.id,
|
|
||||||
label: this.label,
|
|
||||||
parentLabel: this.$route.query.parentLabel,
|
|
||||||
parentTwoLabel: this.$route.query.parentTwoLabel
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: this.layer
|
delta: this.layer
|
||||||
})
|
})
|
||||||
@@ -155,23 +109,7 @@
|
|||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 模糊搜索
|
|
||||||
handleSearch() {
|
|
||||||
|
|
||||||
console.log(this.searchKeyword)
|
|
||||||
},
|
|
||||||
// 失去焦点
|
|
||||||
handleSearchBlur() {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 获取对象深层值
|
|
||||||
getObjectValue(obj, path) {
|
|
||||||
return path.split('.').reduce((current, key) => {
|
|
||||||
return current && current[key] !== undefined ? current[key] : ''
|
|
||||||
}, obj)
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,18 +185,5 @@
|
|||||||
|
|
||||||
page {
|
page {
|
||||||
background-color: #fefefe;
|
background-color: #fefefe;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
|
||||||
width: 80%;
|
|
||||||
height: 60rpx;
|
|
||||||
margin: 10rpx auto;
|
|
||||||
border: 1rpx solid #dddddd;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
padding-left: 30rpx;
|
|
||||||
}
|
|
||||||
.search-input {
|
|
||||||
width: 80%;
|
|
||||||
height: 60rpx;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<block v-for="(page, pIndex) in data" :key="pIndex">
|
<block v-for="(page, pIndex) in data" :key="pIndex">
|
||||||
<block v-for="(item, index) in page" :key="item.id">
|
<block v-for="(item, index) in page" :key="item.id">
|
||||||
<view class="probody">
|
<view class="probody">
|
||||||
<company-list :companyitem="item" :noApply="false" :location="userLocation"></company-list>
|
<company-list :companyitem="item" :position="userLocation" :noApply="false"></company-list>
|
||||||
<view class="baddd"></view>
|
<view class="baddd"></view>
|
||||||
<!-- <block>
|
<!-- <block>
|
||||||
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
|
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
|
||||||
|
|||||||
@@ -1,153 +1,158 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<!-- <view class="tab">
|
<!-- <view class="tab">
|
||||||
<v-tabs :tabs="['全部任务','全部岗位']" v-model="activeTab" color="#999" activeColor="#000" fontSize="36rx"
|
<v-tabs :tabs="['全部任务','全部岗位']" v-model="activeTab" color="#999" activeColor="#000" fontSize="36rx"
|
||||||
activeFontSize="36rpx" @change='changeTab' />
|
activeFontSize="36rpx" @change='changeTab' />
|
||||||
</view> -->
|
</view> -->
|
||||||
<block v-for="(page, pIndex) in data" :key="pIndex">
|
<block v-for="(page, pIndex) in data" :key="pIndex">
|
||||||
<block v-for="(item, index) in page" :key="item.id">
|
<block v-for="(item, index) in page" :key="item.id">
|
||||||
<view class="probody">
|
<view class="probody">
|
||||||
<company-list :companyitem="item" :noApply="false"></company-list>
|
<company-list :companyitem="item" :position="userLocation" :noApply="false"></company-list>
|
||||||
<view class="baddd"></view>
|
<view class="baddd"></view>
|
||||||
<!-- <block>
|
<!-- <block>
|
||||||
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
|
<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.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.green.svg" mode="" v-else-if="item.status === 3"></image>
|
||||||
<image src="/static/img/tab.gray.svg" mode="" v-else></image>
|
<image src="/static/img/tab.gray.svg" mode="" v-else></image>
|
||||||
</block> -->
|
</block> -->
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</block>
|
</block>
|
||||||
<view class="nothing" v-if="data.length === 0">
|
<view class="nothing" v-if="data.length === 0">
|
||||||
<image src="/static/img/pic_notask.svg" mode=""></image>
|
<image src="/static/img/pic_notask.svg" mode=""></image>
|
||||||
<view class="nothingContnt">
|
<view class="nothingContnt">
|
||||||
暂无申请信息
|
暂无申请信息
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
||||||
import companyList from '@/components/companyList/applyList.vue';
|
import companyList from '@/components/companyList/applyList.vue';
|
||||||
import {
|
import {
|
||||||
myMission
|
myMission
|
||||||
} from '@/api/mission.js';
|
} from '@/api/mission.js';
|
||||||
|
import {
|
||||||
export default {
|
mapGetters
|
||||||
components: {
|
} from 'vuex'
|
||||||
vTabs,
|
export default {
|
||||||
companyList
|
components: {
|
||||||
},
|
vTabs,
|
||||||
data() {
|
companyList
|
||||||
return {
|
},
|
||||||
data: [],
|
data() {
|
||||||
activeTab: 0,
|
return {
|
||||||
current: 1,
|
data: [],
|
||||||
size: 10,
|
activeTab: 0,
|
||||||
total: 0
|
current: 1,
|
||||||
}
|
size: 10,
|
||||||
},
|
total: 0
|
||||||
onLoad: function() {
|
}
|
||||||
this.init()
|
},
|
||||||
},
|
onLoad: function() {
|
||||||
/*页面滚动到底部 换页*/
|
this.init()
|
||||||
onReachBottom: function() {
|
},
|
||||||
if (this.current <= Math.ceil(this.total / this.size)) {
|
/*页面滚动到底部 换页*/
|
||||||
this.getData();
|
onReachBottom: function() {
|
||||||
} else {
|
if (this.current <= Math.ceil(this.total / this.size)) {
|
||||||
uni.showToast({
|
this.getData();
|
||||||
icon: "none",
|
} else {
|
||||||
title: '已经是最后一页',
|
uni.showToast({
|
||||||
})
|
icon: "none",
|
||||||
}
|
title: '已经是最后一页',
|
||||||
},
|
})
|
||||||
/*下拉刷新*/
|
}
|
||||||
onPullDownRefresh:function(){
|
},
|
||||||
this.init()
|
/*下拉刷新*/
|
||||||
},
|
onPullDownRefresh: function() {
|
||||||
methods: {
|
this.init()
|
||||||
init(){
|
},
|
||||||
this.current = 1
|
computed: {
|
||||||
this.data = []
|
...mapGetters(['userLocation']),
|
||||||
this.getData()
|
},
|
||||||
},
|
methods: {
|
||||||
getData() {
|
init() {
|
||||||
var status = Number(this.activeTab) + 1
|
this.current = 1
|
||||||
myMission(this.current, this.size, status).then(res => {
|
this.data = []
|
||||||
uni.stopPullDownRefresh();
|
this.getData()
|
||||||
if (this.current === 1) {
|
},
|
||||||
this.data = [];
|
getData() {
|
||||||
}
|
var status = Number(this.activeTab) + 1
|
||||||
this.current += 1;
|
myMission(this.current, this.size, status).then(res => {
|
||||||
this.total = res.data.data.total;
|
uni.stopPullDownRefresh();
|
||||||
if (res.data.data && res.data.data.records.length) {
|
if (this.current === 1) {
|
||||||
this.data.push(res.data.data.records);
|
this.data = [];
|
||||||
}
|
}
|
||||||
})
|
this.current += 1;
|
||||||
},
|
this.total = res.data.data.total;
|
||||||
gomap: function() {
|
if (res.data.data && res.data.data.records.length) {
|
||||||
uni.navigateTo({
|
this.data.push(res.data.data.records);
|
||||||
url: '../mapSeach/mapSeach'
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTab: function(e) {
|
gomap: function() {
|
||||||
this.activeTab = e;
|
uni.navigateTo({
|
||||||
this.init()
|
url: '../mapSeach/mapSeach'
|
||||||
}
|
})
|
||||||
}
|
},
|
||||||
}
|
changeTab: function(e) {
|
||||||
</script>
|
this.activeTab = e;
|
||||||
|
this.init()
|
||||||
<style scoped>
|
}
|
||||||
page {
|
}
|
||||||
height: 100%;
|
}
|
||||||
}
|
</script>
|
||||||
|
|
||||||
.tab {
|
<style scoped>
|
||||||
height: 46px;
|
page {
|
||||||
}
|
height: 100%;
|
||||||
|
}
|
||||||
.body {
|
|
||||||
height: 100%;
|
.tab {
|
||||||
}
|
height: 46px;
|
||||||
|
}
|
||||||
.probody image {
|
|
||||||
width: 88rpx;
|
.body {
|
||||||
height: 88rpx;
|
height: 100%;
|
||||||
position: absolute;
|
}
|
||||||
right: 0;
|
|
||||||
top: 0;
|
.probody image {
|
||||||
}
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
.probody {
|
position: absolute;
|
||||||
width: 100%;
|
right: 0;
|
||||||
position: relative;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.baddd {
|
.probody {
|
||||||
background: #f6f6f6;
|
width: 100%;
|
||||||
height: 20rpx;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nothing {
|
.baddd {
|
||||||
height: 100%;
|
background: #f6f6f6;
|
||||||
padding-top: 50%;
|
height: 20rpx;
|
||||||
box-sizing: border-box;
|
}
|
||||||
}
|
|
||||||
|
.nothing {
|
||||||
.nothing image {
|
height: 100%;
|
||||||
width: 400rpx;
|
padding-top: 50%;
|
||||||
height: 200rpx;
|
box-sizing: border-box;
|
||||||
display: block;
|
}
|
||||||
margin: 0 auto;
|
|
||||||
}
|
.nothing image {
|
||||||
|
width: 400rpx;
|
||||||
.nothingContnt {
|
height: 200rpx;
|
||||||
font-family: PingFangSC-Regular;
|
display: block;
|
||||||
font-size: 28rpx;
|
margin: 0 auto;
|
||||||
color: #666;
|
}
|
||||||
margin-top: 30rpx;
|
|
||||||
text-align: center;
|
.nothingContnt {
|
||||||
}
|
font-family: PingFangSC-Regular;
|
||||||
</style>
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/project/newProject",
|
"path": "pages/project/newProject",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "德阳市灵活就业平台",
|
"navigationBarTitleText": "馆陶县灵活就业平台",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="homeFooter">
|
<view class="homeFooter">
|
||||||
<view class="atBottom">德阳市人力资源和社会保障局主办</view>
|
<view class="atBottom">馆陶县人力资源和社会保障局主办</view>
|
||||||
<!-- <image src="../../static/img/index/seeMore.png" mode="" @click="goMore()"></image> -->
|
<!-- <image src="../../static/img/index/seeMore.png" mode="" @click="goMore()"></image> -->
|
||||||
</view>
|
</view>
|
||||||
<policy-content ref="pContent"></policy-content>
|
<policy-content ref="pContent"></policy-content>
|
||||||
@@ -289,23 +289,38 @@
|
|||||||
policyContentList: [],
|
policyContentList: [],
|
||||||
policyType: 1,
|
policyType: 1,
|
||||||
swiperType: 1,
|
swiperType: 1,
|
||||||
IsResume: true,
|
isResume: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
if (this.$api.haslogin()) {
|
|
||||||
this.$store.dispatch('getResumeInfo')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onShow: function() {
|
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.download()
|
||||||
this.getSwiperList()
|
this.getSwiperList()
|
||||||
this.getPolicy()
|
this.getPolicy()
|
||||||
if (this.$api.haslogin()) {
|
if (this.isResume) {
|
||||||
this.$store.dispatch('refreshAuthState').then((e) => {
|
this.isResume = false
|
||||||
var auth = this.$store.state.auth
|
myResume().then(res => {
|
||||||
if (!auth.bankCardState) {
|
const data = res.data.data
|
||||||
this.step()
|
if (!(data.education && data.telephone && data.wage && data.workplace)) {
|
||||||
|
this.goures()
|
||||||
|
this.$api.sleep(1000).then(() => {
|
||||||
|
this.$api.msg('请输入基本信息')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -384,11 +399,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
download: function() {
|
download: function() {
|
||||||
this.isLogin = this.$api.haslogin() ? true : false;
|
this.isLogin = this.$store.state.user.token ? true : false;
|
||||||
newMission().then(res => {
|
newMission().then(res => {
|
||||||
this.companyList = res.data.data;
|
this.companyList = res.data.data;
|
||||||
});
|
});
|
||||||
if (this.$api.haslogin()) {
|
if (this.$store.state.user.token) {
|
||||||
uni.$emit('newsReadChange')
|
uni.$emit('newsReadChange')
|
||||||
this.$store.dispatch("getUnreadNum");
|
this.$store.dispatch("getUnreadNum");
|
||||||
recMission().then(res => {
|
recMission().then(res => {
|
||||||
@@ -397,7 +412,25 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
goLocation: function() {
|
goLocation: function() {
|
||||||
this.navTo('../mapSeach/mapSeach', true)
|
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'
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
goResume: function() {
|
goResume: function() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -411,16 +444,40 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
goures: function() {
|
goures: function() {
|
||||||
this.navTo('/pageMy/my/resume/index', true)
|
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'
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toNewTask() {
|
toNewTask() {
|
||||||
this.navTo(`/pages/project/newProject?tabIndex=${0}`, false)
|
uni.navigateTo({
|
||||||
|
url: `/pages/project/newProject?tabIndex=${0}`
|
||||||
|
});
|
||||||
},
|
},
|
||||||
toNewWork() {
|
toNewWork() {
|
||||||
this.navTo(`/pages/project/newProject?tabIndex=${1}`, false)
|
uni.navigateTo({
|
||||||
|
url: `/pages/project/newProject?tabIndex=${1}`
|
||||||
|
});
|
||||||
},
|
},
|
||||||
toNewProject() {
|
toNewProject() {
|
||||||
this.navTo(`/pages/project/newProject?tabIndex=${2}`, false)
|
uni.navigateTo({
|
||||||
|
url: `/pages/project/newProject?tabIndex=${2}`
|
||||||
|
});
|
||||||
},
|
},
|
||||||
toArticleDetail(id) {
|
toArticleDetail(id) {
|
||||||
if (id) {
|
if (id) {
|
||||||
@@ -430,11 +487,49 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
gouserSet: function() {
|
gouserSet: function() {
|
||||||
this.navTo('/pageMy/setUserBase/index', true)
|
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'
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
goSeach: function() {
|
goSeach: function() {
|
||||||
this.navTo('../seach/seach?keywords=' + this.keywords, true)
|
if (!this.$store.state.user.token) {
|
||||||
this.keywords = ''
|
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 = ''
|
||||||
|
// }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getSwiperList() {
|
getSwiperList() {
|
||||||
getSwiperList(this.swiperType).then(res => {
|
getSwiperList(this.swiperType).then(res => {
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
import {
|
import {
|
||||||
mapGetters
|
mapGetters
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
import {
|
|
||||||
GoLogin
|
|
||||||
} from '@/untils/AxiosUtils.js';
|
|
||||||
import website from '@/config/website.js'
|
import website from '@/config/website.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -20,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '登录中'
|
title: ''
|
||||||
})
|
})
|
||||||
if (options.token) {
|
if (options.token) {
|
||||||
const that = this
|
const that = this
|
||||||
@@ -42,6 +39,7 @@
|
|||||||
if (!auth.bankCardState) {
|
if (!auth.bankCardState) {
|
||||||
that.goSign(0)
|
that.goSign(0)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
@@ -52,10 +50,9 @@
|
|||||||
// this.$refs.code.refushCode()
|
// this.$refs.code.refushCode()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// uni.reLaunch({
|
uni.reLaunch({
|
||||||
// url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
// })
|
})
|
||||||
GoLogin()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
method: {
|
method: {
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
<view v-if="loading" class="btn nocheck" loading="true"></view>
|
<view v-if="loading" class="btn nocheck" loading="true"></view>
|
||||||
<view v-else-if="validate" class="btn" @click="login">立即登录</view>
|
<view v-else-if="validate" class="btn" @click="login">立即登录</view>
|
||||||
<view v-else class="btn nocheck">立即登录</view>
|
<view v-else class="btn nocheck">立即登录</view>
|
||||||
<!-- <view class="changeLogintype">
|
<view class="changeLogintype">
|
||||||
<view class="" @click="goReg">手机注册</view>
|
<view class="" @click="goReg">手机注册</view>
|
||||||
<view class="" @click="goForget">忘记密码</view>
|
<view class="" @click="goForget">忘记密码</view>
|
||||||
</view> -->
|
</view>
|
||||||
</login-template>
|
</login-template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
wx.hideHomeButton();
|
wx.hideHomeButton();
|
||||||
//#endif
|
//#endif
|
||||||
this.password = ''
|
this.password = ''
|
||||||
if (this.$api.haslogin()) {
|
if (this.$store.state.user.token) {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
this.$store.dispatch('clearAuthState')
|
this.$store.dispatch('clearAuthState')
|
||||||
this.$store.dispatch('endRefreshNewsTimer')
|
this.$store.dispatch('endRefreshNewsTimer')
|
||||||
@@ -74,8 +74,8 @@
|
|||||||
},
|
},
|
||||||
login(e) {
|
login(e) {
|
||||||
if (this.validate) {
|
if (this.validate) {
|
||||||
this.userChecked = true;
|
// this.userChecked = true;
|
||||||
console.log(this.userChecked)
|
// console.log(this.userChecked)
|
||||||
// if (!this.userChecked) {
|
// if (!this.userChecked) {
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title:'请先阅读并同意《服务及隐私协议》',
|
// title:'请先阅读并同意《服务及隐私协议》',
|
||||||
@@ -106,7 +106,8 @@
|
|||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
// this.$refs.code.refushCode()
|
// this.$refs.code.refushCode()
|
||||||
location.href = "https://dy12333.org.cn/h5/"
|
// location.href = "https://dy12333.org.cn/h5/"
|
||||||
|
this.$api.msg('登录失败')
|
||||||
});
|
});
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
@@ -168,4 +169,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
.changeLogintype {
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #1B66FF;
|
||||||
|
margin-top: 15px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,106 +1,113 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="login-body">
|
<view class="login-body">
|
||||||
<view class="nothing" style="height: 100rpx;"></view>
|
<view class="nothing" style="height: 100rpx;"></view>
|
||||||
<view class="titleText">{{title}}</view>
|
<view class="titleText">{{title}}</view>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<view v-if="!hideBottom" class="bottomt">
|
<view v-if="!hideBottom" class="bottomt">
|
||||||
<view class="bottomt-box">
|
<view class="bottomt-box">
|
||||||
<!-- <view class="check-icon" @click="checkChanged">
|
<view class="check-icon" @click="checkChanged">
|
||||||
<image v-if="userChecked" src="../../static/img/checkOk.png" style="width: 30rpx;height:30rpx;"></image>
|
<image v-if="userChecked" :src="checked" style="width: 30rpx;height:30rpx;">
|
||||||
<view class="noneCheck" v-else></view>
|
</image>
|
||||||
</view>
|
<view class="noneCheck" v-else></view>
|
||||||
已阅读并同意<text class="bottomtText" @click="goMent">《服务及隐私协议》</text> -->
|
</view>
|
||||||
|
已阅读并同意<text class="bottomtText" @click="goMent">《服务及隐私协议》</text>
|
||||||
</view>
|
|
||||||
|
</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</view>
|
||||||
|
</template>
|
||||||
<script>
|
|
||||||
import {mapGetters} from 'vuex'
|
<script>
|
||||||
export default {
|
import checked from '../../static/img/checkOk.png'
|
||||||
|
import {
|
||||||
data(){
|
mapGetters
|
||||||
return{
|
} from 'vuex'
|
||||||
|
export default {
|
||||||
}
|
|
||||||
},
|
data() {
|
||||||
props: {
|
return {
|
||||||
title: String,
|
checked
|
||||||
hideBottom: Boolean
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
props: {
|
||||||
goMent() {
|
title: String,
|
||||||
uni.navigateTo({
|
hideBottom: Boolean
|
||||||
url: '/pages/user/agreement'
|
},
|
||||||
})
|
methods: {
|
||||||
},
|
goMent() {
|
||||||
checkChanged(){
|
uni.navigateTo({
|
||||||
let checkedValue=!this.userChecked;
|
url: '/pages/user/agreement'
|
||||||
this.$store.dispatch('UserCheckedBtn',checkedValue)
|
})
|
||||||
|
},
|
||||||
}
|
checkChanged() {
|
||||||
},
|
let checkedValue = !this.userChecked;
|
||||||
computed:{
|
this.$store.dispatch('UserCheckedBtn', checkedValue)
|
||||||
...mapGetters(['userChecked'])
|
|
||||||
},
|
}
|
||||||
mounted() {
|
},
|
||||||
|
computed: {
|
||||||
},
|
...mapGetters(['userChecked'])
|
||||||
}
|
},
|
||||||
</script>
|
mounted() {
|
||||||
|
|
||||||
<style lang="scss">
|
},
|
||||||
.login-body {
|
}
|
||||||
min-height: 880rpx;
|
</script>
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
<style lang="scss">
|
||||||
width: 80%;
|
.login-body {
|
||||||
margin: 0 auto;
|
min-height: 880rpx;
|
||||||
}
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
.titleText {
|
width: 80%;
|
||||||
font-family: PingFangSC-Medium;
|
margin: 0 auto;
|
||||||
font-size: 46rpx;
|
}
|
||||||
color: #333333;
|
|
||||||
font-weight: bold;
|
.titleText {
|
||||||
padding: 30rpx 0;
|
font-family: PingFangSC-Medium;
|
||||||
}
|
font-size: 46rpx;
|
||||||
|
color: #333333;
|
||||||
.bottomtText {
|
font-weight: bold;
|
||||||
color: #151515;
|
padding: 30rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottomt {
|
.bottomtText {
|
||||||
font-family: PingFangSC-Regular;
|
color: #151515;
|
||||||
font-size: 24rpx;
|
}
|
||||||
color: #999999;
|
|
||||||
position: absolute;
|
.bottomt {
|
||||||
bottom: 80rpx;
|
font-family: PingFangSC-Regular;
|
||||||
left: 0;
|
font-size: 24rpx;
|
||||||
width: 100%;
|
color: #999999;
|
||||||
text-align: center;
|
position: absolute;
|
||||||
.bottomt-box{
|
bottom: 80rpx;
|
||||||
display: flex;
|
left: 0;
|
||||||
justify-content: center;
|
width: 100%;
|
||||||
align-items: center;
|
text-align: center;
|
||||||
}
|
|
||||||
}
|
.bottomt-box {
|
||||||
.check-icon{
|
display: flex;
|
||||||
font-size: 28rpx;
|
justify-content: center;
|
||||||
font-weight: 400;
|
align-items: center;
|
||||||
color: #999999;
|
}
|
||||||
align-items: center;
|
}
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
.check-icon {
|
||||||
margin-right: 12rpx;
|
font-size: 28rpx;
|
||||||
.noneCheck{
|
font-weight: 400;
|
||||||
width: 26rpx;
|
color: #999999;
|
||||||
height: 26rpx;
|
align-items: center;
|
||||||
border-radius: 50%;
|
width: 30rpx;
|
||||||
border: 2rpx solid #999999;
|
height: 30rpx;
|
||||||
margin-right:12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
|
||||||
}
|
.noneCheck {
|
||||||
</style>
|
width: 26rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2rpx solid #999999;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="conatiner_card">
|
<view class="conatiner_card">
|
||||||
<view class="row blod fs_34">德阳市智慧就业市场</view>
|
<view class="row blod fs_34">馆陶县智慧就业市场</view>
|
||||||
<view class="row color_666 fs_30 marT_30">
|
<view class="row color_666 fs_30 marT_30">
|
||||||
<u-icon style="margin-right: 10rpx;" name="calendar" color="#666666" size="16"></u-icon>营业时间
|
<u-icon style="margin-right: 10rpx;" name="calendar" color="#666666" size="16"></u-icon>营业时间
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
726
pages/my/my.vue
@@ -1,373 +1,353 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<view class="userTitle">
|
<view class="userTitle">
|
||||||
<image v-if="userInfo.avatar" :src="userInfo.avatar" mode=""></image>
|
<image v-if="userInfo.avatar" :src="userInfo.avatar" mode=""></image>
|
||||||
<image v-else src="../../static/img/head.svg" mode=""></image>
|
<image v-else src="../../static/img/head.svg" mode=""></image>
|
||||||
<view class="userRight">
|
<view class="userRight">
|
||||||
<view class="userTel" v-if="userInfo.user_name">
|
<view class="userTel" v-if="userInfo.user_name">
|
||||||
{{ auth.authInfo.realName ? auth.authInfo.realName : phoneFilter(userInfo.user_name) }}
|
{{ auth.authInfo.realName ? auth.authInfo.realName :
|
||||||
</view>
|
phoneFilter(userInfo.user_name) }}
|
||||||
<view class="userTel" v-else></view>
|
</view>
|
||||||
<view class="userContent">
|
<view class="userTel" v-else> </view>
|
||||||
<view style="margin-right: 40rpx">
|
<view class="userContent">
|
||||||
实名认证:{{ auth.realNameState ? '已认证' : '未认证' }}
|
<view style="margin-right: 40rpx;">实名认证:{{ auth.realNameState ? '已认证' : '未认证' }}</view>
|
||||||
</view>
|
<!-- <view>银行卡核验:{{auth.bankCardState?'已认证':'未认证'}}</view> -->
|
||||||
<!-- <view>银行卡核验:{{auth.bankCardState?'已认证':'未认证'}}</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="centerBar">
|
||||||
<view class="centerBar">
|
<view class="BarList" @click="go('/pages/my/Browsinghistory')">
|
||||||
<view class="BarList" @click="go('/pages/my/Browsinghistory')">
|
<image src="../../static/img/resumeMy.svg" mode=""></image>
|
||||||
<image src="../../static/img/resumeMy.svg" mode=""></image>
|
我的邀请
|
||||||
我的邀请
|
</view>
|
||||||
</view>
|
<view class="BarList" @click="go('/pageMy/myProject/myProject')">
|
||||||
<view class="BarList" @click="go('/pageMy/myProject/myProject')">
|
<image src="../../static/img/job.svg" mode=""></image>
|
||||||
<image src="../../static/img/job.svg" mode=""></image>
|
我的申请
|
||||||
我的申请
|
</view>
|
||||||
</view>
|
<view class="BarList" @click="go('/pageMy/myProject/myCollection')">
|
||||||
<view class="BarList" @click="go('/pageMy/myProject/myCollection')">
|
<image src="../../static/img/salary.svg" mode=""></image>
|
||||||
<image src="../../static/img/salary.svg" mode=""></image>
|
我的收藏
|
||||||
我的收藏
|
</view>
|
||||||
</view>
|
<view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
|
||||||
<view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
|
<image src="../../static/img/contract.png" mode=""></image>
|
||||||
<image src="../../static/img/contract.png" mode=""></image>
|
浏览记录
|
||||||
浏览记录
|
</view>
|
||||||
</view>
|
<!-- <view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
|
||||||
<!-- <view class="BarList" @click="go('/pageMy/myProject/browsingHistory')">
|
<image src="../../static/img/contract.png" mode=""></image>
|
||||||
<image src="../../static/img/contract.png" mode=""></image>
|
我要招工
|
||||||
我要招工
|
</view> -->
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view style="height: 104rpx;"></view>
|
||||||
<view style="height: 104rpx"></view>
|
<!-- <view class="federation">
|
||||||
<!-- <view class="federation">
|
<view>新业态职工工会联合会</view>
|
||||||
<view>新业态职工工会联合会</view>
|
<view v-if="!federationStatus" class="forMembership" @click="go('/pageMy/federation/forMembership/Notice')">申请入会</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 v-else class="forMembership" @click="go('/pageMy/federation/vip/information')">已加入</view>
|
</view> -->
|
||||||
</view> -->
|
|
||||||
|
<view class="btn">
|
||||||
<view class="btn">
|
<view class="btnList" @click="go('/pages/recruit/recruit')">
|
||||||
<view class="btnList" @click="go('/pages/recruit/recruit')">
|
<image src="../../static/img/zhao_gong.png" mode=""></image>
|
||||||
<image src="../../static/img/zhao_gong.png" mode=""></image>
|
我要招工
|
||||||
我要招工
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
<view class="btnList" @click="go('/pageMy/setUserBase/index')">
|
||||||
<view class="btnList" @click="go('/pageMy/setUserBase/index')">
|
<image src="../../static/img/ID.svg" mode=""></image>
|
||||||
<image src="../../static/img/ID.svg" mode=""></image>
|
认证信息
|
||||||
认证信息
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
<view class="btnList" @click="navTo('/pageMy/setUserBase/mailbox')">
|
||||||
<view class="btnList" @click="navTo('/pageMy/setUserBase/mailbox')">
|
<image src="../../static/img/evaluate.png" mode=""></image>
|
||||||
<image src="../../static/img/evaluate.png" mode=""></image>
|
咨询信箱
|
||||||
咨询信箱
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
<view class="btnList" @click="navTo('/pageMy/setUserBase/applicationsRecord')">
|
||||||
<view class="btnList" @click="navTo('/pageMy/setUserBase/applicationsRecord')">
|
<image src="../../static/img/phone.svg" mode=""></image>
|
||||||
<image src="../../static/img/phone.svg" mode=""></image>
|
问卷调查
|
||||||
问卷调查
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
<view class="btnList" @click="navTo('/pageMy/setUserBase/survey')">
|
||||||
<view class="btnList" @click="navTo('/pageMy/setUserBase/survey')">
|
<image src="../../static/img/phone.svg" mode=""></image>
|
||||||
<image src="../../static/img/phone.svg" mode=""></image>
|
用工调研
|
||||||
用工调研
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
<view class="btnList" @click="navTo('/pageMy/setUserBase/complain')">
|
||||||
<view class="btnList" @click="navTo('/pageMy/setUserBase/complain')">
|
<image src="../../static/img/vip.svg" mode=""></image>
|
||||||
<image src="../../static/img/vip.svg" mode=""></image>
|
投诉建议
|
||||||
投诉建议
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
<template v-if="user.userIsCms">
|
||||||
<view class="btnList">
|
<view class="btnList" @click="navTo('/pageMy/admin/check')">
|
||||||
<image src="../../static/img/vip.svg" mode=""></image>
|
<image src="../../static/img/check1.png" mode=""></image>
|
||||||
消息提醒
|
岗位发布审核
|
||||||
<switch class="imgswitch" :checked="user.isEnbleNotice" @change="switch1Change" />
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="user.userIsCms">
|
<view class="btnList" @click="navTo('/pageMy/admin/dengji')">
|
||||||
<view class="btnList" @click="navTo('/pageMy/admin/check')">
|
<image src="../../static/img/dji.png" mode=""></image>
|
||||||
<image src="../../static/img/check1.png" mode=""></image>
|
线下服务记录登记
|
||||||
岗位发布审核
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
<view class="btnList" @click="navTo('/pageMy/admin/admin')">
|
||||||
<view class="btnList" @click="navTo('/pageMy/admin/dengji')">
|
<image src="../../static/img/dji.png" mode=""></image>
|
||||||
<image src="../../static/img/dji.png" mode=""></image>
|
零工人员登记
|
||||||
线下服务记录登记
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view>
|
</template>
|
||||||
<view class="btnList" @click="navTo('/pageMy/admin/admin')">
|
<!-- <view class="btnList" @click="go('/pageMy/apply/applications')">
|
||||||
<image src="../../static/img/dji.png" mode=""></image>
|
<image src="../../static/img/apply.png" mode=""></image>
|
||||||
零工人员登记
|
我的申请
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view> -->
|
||||||
</template>
|
<!-- <view class="btnList" @click="go('/pageMy/help/help')">
|
||||||
<!-- <view class="btnList" @click="go('/pageMy/apply/applications')">
|
<image src="../../static/img/help.svg" mode=""></image>
|
||||||
<image src="../../static/img/apply.png" mode=""></image>
|
帮助与反馈
|
||||||
我的申请
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view> -->
|
||||||
</view> -->
|
<!-- <view class="btnList" @click="go('/pageMy/my/set')">
|
||||||
<!-- <view class="btnList" @click="go('/pageMy/help/help')">
|
<image src="../../static/img/set.svg" mode=""></image>
|
||||||
<image src="../../static/img/help.svg" mode=""></image>
|
设置
|
||||||
帮助与反馈
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
</view> -->
|
||||||
</view> -->
|
</view>
|
||||||
<!-- <view class="btnList" @click="go('/pageMy/my/set')">
|
<!-- <view class="btn-out" @click="logout">
|
||||||
<image src="../../static/img/set.svg" mode=""></image>
|
退出登录
|
||||||
设置
|
</view> -->
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
<!-- <view class="bottom" @click="makePhoneCall">
|
||||||
</view> -->
|
<view>德阳市人社局 电话:0838-2505580</view>
|
||||||
</view>
|
<view>地址:德阳市旌阳区天山南路1段-102号</view>
|
||||||
<!-- <view class="btn-out" @click="logout">
|
</view> -->
|
||||||
退出登录
|
<cs-button></cs-button>
|
||||||
</view> -->
|
</view>
|
||||||
<view class="bottom" @click="makePhoneCall">
|
</template>
|
||||||
<view>德阳市人社局 电话:0838-2505580</view>
|
|
||||||
<view>地址:德阳市旌阳区天山南路1段-102号</view>
|
<script>
|
||||||
</view>
|
import {
|
||||||
<cs-button></cs-button>
|
mapState,
|
||||||
</view>
|
mapGetters
|
||||||
</template>
|
} from 'vuex'
|
||||||
|
import {
|
||||||
<script>
|
phoneFilter,
|
||||||
import { GoLogin } from '@/untils/AxiosUtils.js';
|
stringFilterNum
|
||||||
import { mapState, mapGetters } from 'vuex';
|
} from '@/untils/format.js'
|
||||||
import { phoneFilter, stringFilterNum } from '@/untils/format.js';
|
import {
|
||||||
import { labourUnionInfo } from '@/api/federation.js';
|
labourUnionInfo
|
||||||
export default {
|
} from '@/api/federation.js'
|
||||||
data() {
|
export default {
|
||||||
return {
|
data() {
|
||||||
federationStatus: false,
|
return {
|
||||||
};
|
federationStatus: false
|
||||||
},
|
}
|
||||||
onLoad() {
|
},
|
||||||
// this.$store.dispatch('getMobileIsCms')
|
onLoad() {
|
||||||
// if (this.$api.haslogin() && this.authPass) {
|
this.$store.dispatch('getMobileIsCms')
|
||||||
// this.$store.dispatch('getVipCode')
|
// if (this.$store.state.user.token && this.authPass) {
|
||||||
// }
|
// this.$store.dispatch('getVipCode')
|
||||||
},
|
// }
|
||||||
onShow() {
|
},
|
||||||
if (/token/g.test(location.href)) {
|
onShow() {
|
||||||
this.$api.sleep(2000).then(() => {
|
if (!this.$store.state.user.token) {
|
||||||
if (!this.$api.haslogin()) {
|
uni.redirectTo({
|
||||||
GoLogin();
|
url: '/pages/login/login'
|
||||||
} else {
|
})
|
||||||
uni.$emit('newsReadChange');
|
} else {
|
||||||
this.$store.dispatch('refreshAuthState');
|
uni.$emit('newsReadChange')
|
||||||
}
|
this.$store.dispatch('refreshAuthState')
|
||||||
});
|
}
|
||||||
} else {
|
// this.labourUnionInfoInit()
|
||||||
if (!this.$api.haslogin()) {
|
},
|
||||||
GoLogin();
|
methods: {
|
||||||
} else {
|
labourUnionInfoInit() {
|
||||||
uni.$emit('newsReadChange');
|
labourUnionInfo().then(e => {
|
||||||
this.$store.dispatch('refreshAuthState');
|
this.federationStatus = e.data.data.joined
|
||||||
}
|
})
|
||||||
}
|
},
|
||||||
// this.labourUnionInfoInit()
|
// logout() {
|
||||||
},
|
// this.$store.dispatch('LogOut').then(() => {
|
||||||
methods: {
|
// // uni.reLaunch({
|
||||||
switch1Change(e) {
|
// // url: '/pages/login/login'
|
||||||
if (e.detail.value) {
|
// // })
|
||||||
this.$store.dispatch('setNoticeOpen');
|
// this.$store.dispatch('clearAuthState')
|
||||||
} else {
|
// this.$store.dispatch('endRefreshNewsTimer')
|
||||||
this.$store.dispatch('setNoticeClose');
|
// location.href = "https://dy12333.org.cn/h5/"
|
||||||
}
|
// })
|
||||||
},
|
// },
|
||||||
labourUnionInfoInit() {
|
go(url) {
|
||||||
labourUnionInfo().then((e) => {
|
uni.navigateTo({
|
||||||
this.federationStatus = e.data.data.joined;
|
url
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// logout() {
|
makePhoneCall: function() {
|
||||||
// this.$store.dispatch('LogOut').then(() => {
|
uni.makePhoneCall({
|
||||||
// // uni.reLaunch({
|
phoneNumber: "18500206848"
|
||||||
// // url: '/pages/login/login'
|
})
|
||||||
// // })
|
},
|
||||||
// this.$store.dispatch('clearAuthState')
|
phoneFilter,
|
||||||
// this.$store.dispatch('endRefreshNewsTimer')
|
stringFilterNum
|
||||||
// location.href = "https://dy12333.org.cn/h5/"
|
},
|
||||||
// })
|
computed: {
|
||||||
// },
|
...mapState(['user']),
|
||||||
go(url) {
|
...mapGetters(['userInfo', 'auth', 'authPass'])
|
||||||
uni.navigateTo({
|
}
|
||||||
url,
|
}
|
||||||
});
|
</script>
|
||||||
},
|
|
||||||
makePhoneCall: function () {
|
<style>
|
||||||
uni.makePhoneCall({
|
page {
|
||||||
phoneNumber: '18500206848',
|
height: 100%;
|
||||||
});
|
background: #f6f6f6;
|
||||||
},
|
}
|
||||||
phoneFilter,
|
|
||||||
stringFilterNum,
|
.federation {
|
||||||
},
|
height: 48rpx;
|
||||||
computed: {
|
border-radius: 10rpx;
|
||||||
...mapState(['user']),
|
padding: 28rpx 30rpx;
|
||||||
...mapGetters(['userInfo', 'auth', 'authPass']),
|
margin: 30rpx;
|
||||||
},
|
font-size: 32rpx;
|
||||||
};
|
font-weight: 400;
|
||||||
</script>
|
color: #6F5931;
|
||||||
|
display: flex;
|
||||||
<style>
|
justify-content: space-between;
|
||||||
page {
|
align-items: center;
|
||||||
height: 100%;
|
background: url(../../static/img/my/mybanner.png) no-repeat;
|
||||||
background: #f6f6f6;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.federation {
|
.forMembership {
|
||||||
height: 48rpx;
|
width: 140rpx;
|
||||||
border-radius: 10rpx;
|
height: 50rpx;
|
||||||
padding: 28rpx 30rpx;
|
background: linear-gradient(112deg, #EFE0BC 0%, #D29A5A 100%, #DDBA88 100%);
|
||||||
margin: 30rpx;
|
box-shadow: 0px 0px 2px 1px rgba(231, 174, 85, 0.39);
|
||||||
font-size: 32rpx;
|
border-radius: 25rpx;
|
||||||
font-weight: 400;
|
font-size: 26rpx;
|
||||||
color: #6f5931;
|
font-weight: 400;
|
||||||
display: flex;
|
color: #6F5931;
|
||||||
justify-content: space-between;
|
line-height: 48rpx;
|
||||||
align-items: center;
|
text-align: center;
|
||||||
background: url(../../static/img/my/mybanner.png) no-repeat;
|
}
|
||||||
background-size: cover;
|
|
||||||
}
|
.bottom {
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
.forMembership {
|
font-size: 24rpx;
|
||||||
width: 140rpx;
|
color: #999999;
|
||||||
height: 50rpx;
|
/* position: absolute; */
|
||||||
background: linear-gradient(112deg, #efe0bc 0%, #d29a5a 100%, #ddba88 100%);
|
/* bottom: 120rpx; */
|
||||||
box-shadow: 0px 0px 2px 1px rgba(231, 174, 85, 0.39);
|
/* width: 100%; */
|
||||||
border-radius: 25rpx;
|
margin: 120rpx 0;
|
||||||
font-size: 26rpx;
|
text-align: center;
|
||||||
font-weight: 400;
|
}
|
||||||
color: #6f5931;
|
|
||||||
line-height: 48rpx;
|
.btnList image:last-child {
|
||||||
text-align: center;
|
width: 19rpx;
|
||||||
}
|
height: 32rpx;
|
||||||
|
margin-left: auto;
|
||||||
.bottom {
|
margin-right: 0;
|
||||||
font-family: PingFangSC-Regular;
|
}
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
.btnList image {
|
||||||
/* position: absolute; */
|
width: 52rpx;
|
||||||
/* bottom: 120rpx; */
|
height: 52rpx;
|
||||||
/* width: 100%; */
|
margin-right: 10rpx;
|
||||||
margin: 120rpx 0;
|
}
|
||||||
text-align: center;
|
|
||||||
}
|
.btnList {
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
.btnList image:last-child {
|
font-size: 32rpx;
|
||||||
width: 19rpx;
|
color: #333333;
|
||||||
height: 32rpx;
|
display: flex;
|
||||||
margin-left: auto;
|
align-items: center;
|
||||||
margin-right: 0;
|
justify-content: flex-start;
|
||||||
}
|
padding: 30rpx 20rpx;
|
||||||
|
}
|
||||||
.imgswitch {
|
|
||||||
margin-left: auto;
|
.btn {
|
||||||
margin-right: 0;
|
width: 690rpx;
|
||||||
}
|
margin: 0 auto;
|
||||||
|
border-radius: 15rpx;
|
||||||
.btnList image {
|
background: #fefefe;
|
||||||
width: 52rpx;
|
}
|
||||||
height: 52rpx;
|
|
||||||
margin-right: 10rpx;
|
.BarList {
|
||||||
}
|
font-family: PingFangSC-Regular;
|
||||||
|
font-size: 28rpx;
|
||||||
.btnList {
|
color: #666666;
|
||||||
font-family: PingFangSC-Regular;
|
float: left;
|
||||||
font-size: 32rpx;
|
width: 25%;
|
||||||
color: #333333;
|
text-align: center;
|
||||||
display: flex;
|
padding: 30rpx 0rpx;
|
||||||
align-items: center;
|
}
|
||||||
justify-content: flex-start;
|
|
||||||
padding: 30rpx 20rpx;
|
.BarList image {
|
||||||
}
|
width: 52rpx;
|
||||||
|
height: 52rpx;
|
||||||
.btn {
|
display: block;
|
||||||
width: 690rpx;
|
margin: 0 auto;
|
||||||
margin: 0 auto;
|
}
|
||||||
border-radius: 15rpx;
|
|
||||||
background: #fefefe;
|
.centerBar {
|
||||||
}
|
width: 690rpx;
|
||||||
|
background-color: #fefefe;
|
||||||
.BarList {
|
border-radius: 15rpx;
|
||||||
font-family: PingFangSC-Regular;
|
overflow: hidden;
|
||||||
font-size: 28rpx;
|
position: absolute;
|
||||||
color: #666666;
|
bottom: -70rpx;
|
||||||
float: left;
|
left: 30rpx;
|
||||||
width: 25%;
|
}
|
||||||
text-align: center;
|
|
||||||
padding: 30rpx 0rpx;
|
.userContent {
|
||||||
}
|
font-family: PingFangSC-Regular;
|
||||||
|
font-size: 26rpx;
|
||||||
.BarList image {
|
color: #FFFFFF;
|
||||||
width: 52rpx;
|
display: flex;
|
||||||
height: 52rpx;
|
}
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
.userTel {
|
||||||
}
|
font-family: PingFangSC-Medium;
|
||||||
|
font-size: 36rpx;
|
||||||
.centerBar {
|
color: #FFFFFF;
|
||||||
width: 690rpx;
|
}
|
||||||
background-color: #fefefe;
|
|
||||||
border-radius: 15rpx;
|
.userRight {
|
||||||
overflow: hidden;
|
float: left;
|
||||||
position: absolute;
|
height: 50rpx;
|
||||||
bottom: -70rpx;
|
line-height: 50rpx;
|
||||||
left: 30rpx;
|
}
|
||||||
}
|
|
||||||
|
.userTitle image {
|
||||||
.userContent {
|
width: 100rpx;
|
||||||
font-family: PingFangSC-Regular;
|
height: 100rpx;
|
||||||
font-size: 26rpx;
|
margin-right: 20rpx;
|
||||||
color: #ffffff;
|
float: left;
|
||||||
display: flex;
|
border-radius: 200rpx;
|
||||||
}
|
background-color: rgba(255, 255, 255, .3);
|
||||||
|
}
|
||||||
.userTel {
|
|
||||||
font-family: PingFangSC-Medium;
|
.userTitle {
|
||||||
font-size: 36rpx;
|
padding: 0 30rpx;
|
||||||
color: #ffffff;
|
}
|
||||||
}
|
|
||||||
|
.head {
|
||||||
.userRight {
|
background-color: #1B66FF;
|
||||||
float: left;
|
width: 100%;
|
||||||
height: 50rpx;
|
height: 200rpx;
|
||||||
line-height: 50rpx;
|
padding-top: 200rpx;
|
||||||
}
|
position: relative;
|
||||||
|
}
|
||||||
.userTitle image {
|
|
||||||
width: 100rpx;
|
.body {
|
||||||
height: 100rpx;
|
background: #f6f6f6;
|
||||||
margin-right: 20rpx;
|
height: 100%;
|
||||||
float: left;
|
position: relative;
|
||||||
border-radius: 200rpx;
|
overflow: auto;
|
||||||
background-color: rgba(255, 255, 255, 0.3);
|
}
|
||||||
}
|
|
||||||
|
/* .btn-out {
|
||||||
.userTitle {
|
background-color: #fefefe;
|
||||||
padding: 0 30rpx;
|
margin-top: 20rpx;
|
||||||
}
|
padding: 20rpx 0;
|
||||||
|
text-align: center;
|
||||||
.head {
|
font-family: PingFangSC-Regular;
|
||||||
background-color: #1b66ff;
|
font-size: 32rpx;
|
||||||
width: 100%;
|
color: #F46161;
|
||||||
height: 200rpx;
|
} */
|
||||||
padding-top: 200rpx;
|
</style>
|
||||||
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>
|
|
||||||
@@ -27,9 +27,7 @@
|
|||||||
import {
|
import {
|
||||||
mapGetters
|
mapGetters
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
import {
|
|
||||||
GoLogin
|
|
||||||
} from '@/untils/AxiosUtils.js';
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -38,23 +36,14 @@
|
|||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (/token/g.test(location.href)) {
|
if (!this.$store.state.user.token) {
|
||||||
this.$api.sleep(2000).then(() => {
|
uni.redirectTo({
|
||||||
if (!this.$api.haslogin()) {
|
url: "/pages/login/login"
|
||||||
GoLogin()
|
|
||||||
console.log('300')
|
|
||||||
} else {
|
|
||||||
uni.$emit('newsReadChange')
|
|
||||||
console.log('000')
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (!this.$api.haslogin()) {
|
uni.$emit('newsReadChange')
|
||||||
GoLogin()
|
|
||||||
} else {
|
|
||||||
uni.$emit('newsReadChange')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
console.log(this.news)
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
@@ -15,19 +15,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-map">
|
<view class="view-map">
|
||||||
<super-map
|
<!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
|
||||||
ref="uMap"
|
:zoom="14" :min-zoom="10" :max-zoom="20" @markertap="clickmark" @regionchange="show = false"
|
||||||
style="width: 100%; height: 100%"
|
:MapUrl="$config.supperMap" :flag-tip="false"></super-map> -->
|
||||||
:latitude="latitude"
|
<zhuo-tianditu-MultiPoint-Mapper
|
||||||
:longitude="longitude"
|
ref="tMap"
|
||||||
:zoom="14"
|
@onSelect="clickmark"
|
||||||
:min-zoom="10"
|
:api-key="$config.apiKey"
|
||||||
:max-zoom="20"
|
></zhuo-tianditu-MultiPoint-Mapper>
|
||||||
@markertap="clickmark"
|
|
||||||
@regionchange="show = false"
|
|
||||||
:MapUrl="$config.supperMap"
|
|
||||||
:flag-tip="false"
|
|
||||||
></super-map>
|
|
||||||
<!-- <view id="map" ></view> -->
|
<!-- <view id="map" ></view> -->
|
||||||
<!-- <map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude"
|
<!-- <map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude"
|
||||||
:markers="covers" @markertap="clickmark" @regionchange="show = false"></map> -->
|
:markers="covers" @markertap="clickmark" @regionchange="show = false"></map> -->
|
||||||
@@ -68,6 +64,7 @@
|
|||||||
import { addZeroPrefix, getDistanceFromLatLonInKm } from '@/untils/tools.js';
|
import { addZeroPrefix, getDistanceFromLatLonInKm } from '@/untils/tools.js';
|
||||||
import testData from '@/common/textdata.js';
|
import testData from '@/common/textdata.js';
|
||||||
import { geQueryJobsByNearby } from '@/api/map.js';
|
import { geQueryJobsByNearby } from '@/api/map.js';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
let taskpoint = require('../../static/img/taskpoint.png');
|
let taskpoint = require('../../static/img/taskpoint.png');
|
||||||
let gwpoint = require('../../static/img/gwpoint.png');
|
let gwpoint = require('../../static/img/gwpoint.png');
|
||||||
let mypoint = require('../../static/img/mypoint.png');
|
let mypoint = require('../../static/img/mypoint.png');
|
||||||
@@ -86,6 +83,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters(['userLocation']),
|
||||||
distance() {
|
distance() {
|
||||||
const { lon, lat } = this.productInfo;
|
const { lon, lat } = this.productInfo;
|
||||||
if (lon) {
|
if (lon) {
|
||||||
@@ -97,14 +95,32 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
console.log(this.$store.state.user.userLocation);
|
uni.getLocation({
|
||||||
if (this.$store.state.user.userLocation) {
|
type: 'wgs84',
|
||||||
const { latitude, longitude } = this.$store.state.user.userLocation;
|
success: function (res) {
|
||||||
_this.getList(longitude, latitude).then((covers) => {
|
console.log(res, '成功获得周边信息');
|
||||||
_this.$refs.uMap.addFeature(covers);
|
const { longitude, latitude } = res;
|
||||||
});
|
_this.latitude = latitude;
|
||||||
|
_this.longitude = longitude;
|
||||||
|
_this.getList(longitude, latitude).then((covers) => {
|
||||||
|
_this.covers = covers;
|
||||||
|
_this.$nextTick(() => {
|
||||||
|
_this.$refs.tMap.addFeature(covers);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log(err, '无法获得周边信息');
|
||||||
|
_this.$api.msg('无法获得周边信息');
|
||||||
|
},
|
||||||
|
complete: function (e) {},
|
||||||
|
});
|
||||||
|
console.log('userLocation', this.userLocation);
|
||||||
|
if (this.userLocation) {
|
||||||
|
const { longitude, latitude } = this.userLocation;
|
||||||
|
this.$refs.tMap.open(longitude, latitude);
|
||||||
} else {
|
} else {
|
||||||
_this.$api.msg('无法获得周边信息');
|
this.$store.dispatch('getUserLocation');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -120,12 +136,13 @@ export default {
|
|||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onSelect(item) {},
|
||||||
openMap(lon, lat) {
|
openMap(lon, lat) {
|
||||||
//打开地图,并将门店位置传入
|
//打开地图,并将门店位置传入
|
||||||
// type: post 岗位 mission 任务
|
// type: post 岗位 mission 任务
|
||||||
switch (this.productInfo.type) {
|
switch (this.productInfo.type) {
|
||||||
case 'post':
|
case 'post':
|
||||||
const no = encodeURIComponent(1);
|
const no = encodeURIComponent(this.productInfo.id);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${1}`,
|
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${1}`,
|
||||||
});
|
});
|
||||||
@@ -140,14 +157,22 @@ export default {
|
|||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
if (this.$store.state.user.userLocation) {
|
uni.getLocation({
|
||||||
const { latitude, longitude } = this.$store.state.user.userLocation;
|
type: 'wgs84',
|
||||||
_this.getList(longitude, latitude).then((covers) => {
|
success: function (res) {
|
||||||
_this.$refs.uMap.addFeature(covers);
|
const { longitude, latitude } = res;
|
||||||
});
|
_this.latitude = latitude;
|
||||||
} else {
|
_this.longitude = longitude;
|
||||||
_this.$api.msg('无法获得周边信息');
|
_this.getList(longitude, latitude).then((covers) => {
|
||||||
}
|
_this.$api.msg('成功获得周边信息');
|
||||||
|
_this.$refs.uMap.addFeature(covers);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
_this.$api.msg('无法获得周边信息');
|
||||||
|
},
|
||||||
|
complete: function (e) {},
|
||||||
|
});
|
||||||
// this.getList(this.longitude, this.latitude).then((covers) => {
|
// this.getList(this.longitude, this.latitude).then((covers) => {
|
||||||
// this.$api.msg('成功获得周边信息')
|
// this.$api.msg('成功获得周边信息')
|
||||||
// console.log(covers)
|
// console.log(covers)
|
||||||
@@ -189,6 +214,9 @@ export default {
|
|||||||
id: item.id,
|
id: item.id,
|
||||||
longitude: item.lon,
|
longitude: item.lon,
|
||||||
latitude: item.lat,
|
latitude: item.lat,
|
||||||
|
lon: item.lon,
|
||||||
|
lat: item.lat,
|
||||||
|
label: item.missionTitle,
|
||||||
iconPath: item.type === 'post' ? gwpoint : taskpoint,
|
iconPath: item.type === 'post' ? gwpoint : taskpoint,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
@@ -208,6 +236,9 @@ export default {
|
|||||||
title: '我的位置',
|
title: '我的位置',
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
lon: lat,
|
||||||
|
lat: lon,
|
||||||
|
label: '我的位置',
|
||||||
});
|
});
|
||||||
resolve(arr);
|
resolve(arr);
|
||||||
}
|
}
|
||||||
@@ -354,7 +385,7 @@ export default {
|
|||||||
border-radius: 36rpx;
|
border-radius: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .put-pla {
|
/deep/ .put-pla {
|
||||||
height: 33rpx;
|
height: 33rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -1,172 +1,174 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="sealBox">
|
<view class="sealBox">
|
||||||
<view style="height: 70rpx"></view>
|
<view style="height: 70rpx;"></view>
|
||||||
<view class="name">签名</view>
|
<view class="name">签名</view>
|
||||||
<view v-if="src" class="sealContent">
|
<view v-if="src" class="sealContent">
|
||||||
<image class="img" mode="aspectFit" :src="src"></image>
|
<image class="img" mode="aspectFit" :src="src"></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="sealContent" @click="go">
|
<view v-else class="sealContent" @click="go">
|
||||||
<view class="contentFont">点击输入手写签名</view>
|
<view class="contentFont">点击输入手写签名</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list" v-if="src">
|
<view class="list" v-if="src">
|
||||||
<view class="listLeft">
|
<view class="listLeft">
|
||||||
<view class="listTitle">签名密码</view>
|
<view class="listTitle">签名密码</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="listRight">
|
<view class="listRight">
|
||||||
<view class="rightContent nochoose">
|
<view class="rightContent nochoose">
|
||||||
<view v-if="src" class="uni-input">已设置</view>
|
<view v-if="src" class="uni-input">已设置</view>
|
||||||
<view v-else class="uni-input">未设置</view>
|
<view v-else class="uni-input">未设置</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="@/static/img/right.svg" mode=""></image>
|
<image src="@/static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!src" class="sealAgreement">
|
<view v-if="!src" class="sealAgreement">
|
||||||
<checkbox :checked="status" @click="checkClick" />
|
<checkbox :checked="status" @click="checkClick"/>
|
||||||
<view>我已阅读并同意</view>
|
<view>我已阅读并同意</view>
|
||||||
<view class="agreement" @click="goAgreement('/pages/user/sealAgreement')">《申请证书协议》</view>
|
<view class="agreement" @click="goAgreement('/pages/user/sealAgreement')">《申请证书协议》</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<view v-if="src" @click="next" class="bottombtn">完成</view>
|
<view v-if="src" @click="next" class="bottombtn">完成</view>
|
||||||
<view v-if="!src" class="bottombtn nocheck">完成</view>
|
<view v-if="!src" class="bottombtn nocheck">完成</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import {mapGetters} from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
status: false,
|
status:false
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.$store.dispatch('setAutograph')
|
// this.$store.dispatch('setAutograph')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goAgreement(url) {
|
goAgreement (url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url,
|
url
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
checkClick() {
|
checkClick(){
|
||||||
this.status = !this.status;
|
this.status = !this.status
|
||||||
},
|
},
|
||||||
next() {
|
next () {
|
||||||
uni.navigateBack();
|
uni.navigateBack()
|
||||||
// uni.switchTab({
|
// uni.switchTab({
|
||||||
// url: '/pages/index/index'
|
// url: '/pages/index/index'
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
go(url) {
|
go(url){
|
||||||
if (!this.status) {
|
if (!this.status){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请先阅读并同意《申请证书协议》',
|
title: '请先阅读并同意《申请证书协议》',
|
||||||
icon: 'none',
|
icon: 'none'
|
||||||
});
|
})
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pageMy/setUserBase/seal/sealCanvas?path=/pageMy/setUserBase/seal/sealCanvas`,
|
url: `/pageMy/setUserBase/seal/sealCanvas?path=/pageMy/setUserBase/seal/sealCanvas`
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getInpCode: function (e) {
|
getInpCode: function(e) {
|
||||||
console.log(e);
|
console.log(e)
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['autograph']),
|
...mapGetters(['autograph']),
|
||||||
src() {
|
src(){
|
||||||
if (this.autograph.data && this.autograph.data.signSrcUrl) {
|
if (this.autograph.data && this.autograph.data.signSrcUrl){
|
||||||
return this.autograph.data.signSrcUrl;
|
return this.autograph.data.signSrcUrl
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.sealAgreement {
|
.sealAgreement{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 30rpx;
|
margin: 30rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
.agreement {
|
.agreement{
|
||||||
color: #007aff;
|
color: #007AFF;
|
||||||
}
|
}
|
||||||
::v-deep .uni-checkbox-input {
|
/deep/ .uni-checkbox-input{
|
||||||
border-radius: 22px !important;
|
border-radius: 22px!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.nocheck {
|
.nocheck {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
.bottombtn {
|
.bottombtn {
|
||||||
background-color: #1b66ff;
|
background-color: #1B66FF;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
font-family: PingFangSC-Medium;
|
font-family: PingFangSC-Medium;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-color: #fefefe;
|
||||||
|
padding: 70rpx 80rpx;
|
||||||
|
}
|
||||||
|
.sealBox{
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
padding: 0 15px 0 15px;
|
||||||
|
.name{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 45rpx;
|
||||||
|
|
||||||
.btn {
|
}
|
||||||
background-color: #fefefe;
|
.listRight {
|
||||||
padding: 70rpx 80rpx;
|
display: flex;
|
||||||
}
|
align-items: center;
|
||||||
.sealBox {
|
justify-content: space-between;
|
||||||
background-color: #ffffff;
|
font-family: PingFangSC-Regular;
|
||||||
padding: 0 15px 0 15px;
|
font-size: 28rpx;
|
||||||
.name {
|
color: #999999;
|
||||||
font-size: 32rpx;
|
}
|
||||||
font-weight: 400;
|
|
||||||
color: #333333;
|
.listRight image {
|
||||||
line-height: 45rpx;
|
width: 40rpx;
|
||||||
}
|
height: 40rpx;
|
||||||
.listRight {
|
margin-left: 15rpx;
|
||||||
display: flex;
|
}
|
||||||
align-items: center;
|
.list {
|
||||||
justify-content: space-between;
|
display: flex;
|
||||||
font-family: PingFangSC-Regular;
|
align-items: center;
|
||||||
font-size: 28rpx;
|
justify-content: space-between;
|
||||||
color: #999999;
|
font-family: PingFangSC-Regular;
|
||||||
}
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
.listRight image {
|
height: 88rpx;
|
||||||
width: 40rpx;
|
}
|
||||||
height: 40rpx;
|
.sealContent{
|
||||||
margin-left: 15rpx;
|
background: #F6F6F6;
|
||||||
}
|
padding: 16rpx;
|
||||||
.list {
|
margin-top: 14rpx;
|
||||||
display: flex;
|
position:relative;
|
||||||
align-items: center;
|
.img{
|
||||||
justify-content: space-between;
|
width: 100%;
|
||||||
font-family: PingFangSC-Regular;
|
height: 312rpx;
|
||||||
font-size: 32rpx;
|
background-color: #FFFFFF;
|
||||||
color: #333333;
|
}
|
||||||
height: 88rpx;
|
.contentFont{
|
||||||
}
|
height: 312rpx;
|
||||||
.sealContent {
|
line-height: 312rpx;
|
||||||
background: #f6f6f6;
|
font-size: 30rpx;
|
||||||
padding: 16rpx;
|
color: #999999;
|
||||||
margin-top: 14rpx;
|
background: #FFFFFF;
|
||||||
position: relative;
|
text-align: center;
|
||||||
.img {
|
}
|
||||||
width: 100%;
|
}
|
||||||
height: 312rpx;
|
}
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
.contentFont {
|
|
||||||
height: 312rpx;
|
|
||||||
line-height: 312rpx;
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #999999;
|
|
||||||
background: #ffffff;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -31,15 +31,11 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
idNumber: (state) => {
|
idNumber: (state) => state.auth.authInfo.idNumber
|
||||||
console.log(state.auth.authInfo, 'auth.authInfo')
|
|
||||||
return state.auth.authInfo.idNumber
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
next(type) {
|
next(type) {
|
||||||
// return this.$api.msg('该功能正在完善中')
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
this.isHaveCode(this.idNumber).then(() => {
|
this.isHaveCode(this.idNumber).then(() => {
|
||||||
@@ -67,10 +63,7 @@
|
|||||||
if (resData.data.code === 200) {
|
if (resData.data.code === 200) {
|
||||||
if (resData.data.data.haveCode) {
|
if (resData.data.data.haveCode) {
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return this.$api.msg('系统正在建设中')
|
|
||||||
|
|
||||||
switch (resData.data.data.reviewStatus) {
|
switch (resData.data.data.reviewStatus) {
|
||||||
case 0:
|
case 0:
|
||||||
this.$api.msg('您提交的认证信息正在审核中')
|
this.$api.msg('您提交的认证信息正在审核中')
|
||||||
|
|||||||
@@ -1,345 +1,340 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<CustomNavbar @back="back" titke="申请消息"></CustomNavbar>
|
<CustomNavbar @back="back" titke="申请消息"></CustomNavbar>
|
||||||
<view v-for="(value, key) in messageList" class="newsList" @click="goList(value)" :key="key">
|
<view v-for="(value, key) in messageList" class="newsList" @click="goList(value)" :key="key">
|
||||||
<view class="newsIcon">
|
<view class="newsIcon">
|
||||||
<image :src="value.icon" mode=""></image>
|
<image :src="value.icon" mode=""></image>
|
||||||
<!-- <view v-if="news_recruit.unread[value.id] > 0" class="point"></view> -->
|
<!-- <view v-if="news_recruit.unread[value.id] > 0" class="point"></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="newsListRight">
|
<view class="newsListRight">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<view class="head_left">
|
<view class="head_left">
|
||||||
{{ value.title }}
|
{{ value.title }}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="head_right" v-if="value.data.length > 0">
|
<!-- <view class="head_right" v-if="value.data.length > 0">
|
||||||
{{value.data[0][0][value.prop.time]}}
|
{{value.data[0][0][value.prop.time]}}
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="content" v-if="value.data.length > 0">
|
<!-- <view class="content" v-if="value.data.length > 0">
|
||||||
{{value.prop.desc(value)}}
|
{{value.prop.desc(value)}}
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<cs-button></cs-button>
|
<cs-button></cs-button>
|
||||||
<CustomTabbar :currentpage="2"></CustomTabbar>
|
<CustomTabbar :currentpage="2"></CustomTabbar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
|
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
|
||||||
import CustomNavbar from '@/components/CustomNavbar/navbar.vue';
|
import CustomNavbar from '@/components/CustomNavbar/navbar.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: { CustomTabbar, CustomNavbar },
|
||||||
CustomTabbar,
|
data() {
|
||||||
CustomNavbar
|
return {
|
||||||
},
|
loading: false,
|
||||||
data() {
|
size: 20,
|
||||||
return {
|
messageList: [{
|
||||||
loading: false,
|
id: "0",
|
||||||
size: 20,
|
title: "消息通知",
|
||||||
messageList: [{
|
icon: "../../../static/img/notice.svg",
|
||||||
id: "0",
|
page: {
|
||||||
title: "消息通知",
|
current: 0,
|
||||||
icon: "../../../static/img/notice.svg",
|
size: this.size,
|
||||||
page: {
|
total: this.size,
|
||||||
current: 0,
|
},
|
||||||
size: this.size,
|
data: [],
|
||||||
total: this.size,
|
prop: {
|
||||||
},
|
title: "title",
|
||||||
data: [],
|
desc: (value) => {
|
||||||
prop: {
|
if (value.data[0]) return value.data[0][0]["desc"];
|
||||||
title: "title",
|
},
|
||||||
desc: (value) => {
|
time: "createTime",
|
||||||
if (value.data[0]) return value.data[0][0]["desc"];
|
isRead: "isRead",
|
||||||
},
|
listDesc: "desc",
|
||||||
time: "createTime",
|
},
|
||||||
isRead: "isRead",
|
navigateTo(item) {
|
||||||
listDesc: "desc",
|
uni.$once("getNewsDetail", (cb) => {
|
||||||
},
|
cb(item);
|
||||||
navigateTo(item) {
|
});
|
||||||
uni.$once("getNewsDetail", (cb) => {
|
uni.navigateTo({
|
||||||
cb(item);
|
url: "/pages/news/newsDetail?type=0",
|
||||||
});
|
});
|
||||||
uni.navigateTo({
|
},
|
||||||
url: "/pages/news/newsDetail?type=0",
|
}
|
||||||
});
|
// , {
|
||||||
},
|
// id: "1",
|
||||||
}
|
// title: "任务申请",
|
||||||
// , {
|
// icon: "../../../static/img/renwu.png",
|
||||||
// id: "1",
|
// page: {
|
||||||
// title: "任务申请",
|
// current: 0,
|
||||||
// icon: "../../../static/img/renwu.png",
|
// size: this.size,
|
||||||
// page: {
|
// total: this.size,
|
||||||
// current: 0,
|
// },
|
||||||
// size: this.size,
|
// data: [],
|
||||||
// total: this.size,
|
// prop: {
|
||||||
// },
|
// title: "missionTitle",
|
||||||
// data: [],
|
// desc: (value) => {
|
||||||
// prop: {
|
// if (value.data[0])
|
||||||
// title: "missionTitle",
|
// return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||||
// desc: (value) => {
|
// },
|
||||||
// if (value.data[0])
|
// time: "createTime",
|
||||||
// return `您收到${value.data[0][0]["companyName"]}的任务`;
|
// isRead: "status",
|
||||||
// },
|
// listDesc: "companyName",
|
||||||
// time: "createTime",
|
// },
|
||||||
// isRead: "status",
|
// navigateTo(item, dispatch) {
|
||||||
// listDesc: "companyName",
|
// // dispatch("readNew", {
|
||||||
// },
|
// // key: "1",
|
||||||
// navigateTo(item, dispatch) {
|
// // id: item.id,
|
||||||
// // dispatch("readNew", {
|
// // });
|
||||||
// // key: "1",
|
// uni.navigateTo({
|
||||||
// // id: item.id,
|
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||||
// // });
|
// item.missionNo
|
||||||
// uni.navigateTo({
|
// )}&id=${encodeURIComponent(item.id)}`,
|
||||||
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
// });
|
||||||
// item.missionNo
|
// },
|
||||||
// )}&id=${encodeURIComponent(item.id)}`,
|
// }, {
|
||||||
// });
|
// id: "1",
|
||||||
// },
|
// title: "岗位申请",
|
||||||
// }, {
|
// icon: "../../../static/img/job_recruit.svg",
|
||||||
// id: "1",
|
// page: {
|
||||||
// title: "岗位申请",
|
// current: 0,
|
||||||
// icon: "../../../static/img/job_recruit.svg",
|
// size: this.size,
|
||||||
// page: {
|
// total: this.size,
|
||||||
// current: 0,
|
// },
|
||||||
// size: this.size,
|
// data: [],
|
||||||
// total: this.size,
|
// prop: {
|
||||||
// },
|
// title: "missionTitle",
|
||||||
// data: [],
|
// desc: (value) => {
|
||||||
// prop: {
|
// if (value.data[0])
|
||||||
// title: "missionTitle",
|
// return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||||
// desc: (value) => {
|
// },
|
||||||
// if (value.data[0])
|
// time: "createTime",
|
||||||
// return `您收到${value.data[0][0]["companyName"]}的任务`;
|
// isRead: "status",
|
||||||
// },
|
// listDesc: "companyName",
|
||||||
// time: "createTime",
|
// },
|
||||||
// isRead: "status",
|
// navigateTo(item, dispatch) {
|
||||||
// listDesc: "companyName",
|
// // dispatch("readNew", {
|
||||||
// },
|
// // key: "1",
|
||||||
// navigateTo(item, dispatch) {
|
// // id: item.id,
|
||||||
// // dispatch("readNew", {
|
// // });
|
||||||
// // key: "1",
|
// uni.navigateTo({
|
||||||
// // id: item.id,
|
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||||
// // });
|
// item.missionNo
|
||||||
// uni.navigateTo({
|
// )}&id=${encodeURIComponent(item.id)}`,
|
||||||
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
// });
|
||||||
// item.missionNo
|
// },
|
||||||
// )}&id=${encodeURIComponent(item.id)}`,
|
// }, {
|
||||||
// });
|
// id: "1",
|
||||||
// },
|
// title: "个体户申请",
|
||||||
// }, {
|
// icon: "../../../static/img/own_recruit.svg",
|
||||||
// id: "1",
|
// page: {
|
||||||
// title: "个体户申请",
|
// current: 0,
|
||||||
// icon: "../../../static/img/own_recruit.svg",
|
// size: this.size,
|
||||||
// page: {
|
// total: this.size,
|
||||||
// current: 0,
|
// },
|
||||||
// size: this.size,
|
// data: [],
|
||||||
// total: this.size,
|
// prop: {
|
||||||
// },
|
// title: "missionTitle",
|
||||||
// data: [],
|
// desc: (value) => {
|
||||||
// prop: {
|
// if (value.data[0])
|
||||||
// title: "missionTitle",
|
// return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||||
// desc: (value) => {
|
// },
|
||||||
// if (value.data[0])
|
// time: "createTime",
|
||||||
// return `您收到${value.data[0][0]["companyName"]}的任务`;
|
// isRead: "status",
|
||||||
// },
|
// listDesc: "companyName",
|
||||||
// time: "createTime",
|
// },
|
||||||
// isRead: "status",
|
// navigateTo(item, dispatch) {
|
||||||
// listDesc: "companyName",
|
// // dispatch("readNew", {
|
||||||
// },
|
// // key: "1",
|
||||||
// navigateTo(item, dispatch) {
|
// // id: item.id,
|
||||||
// // dispatch("readNew", {
|
// // });
|
||||||
// // key: "1",
|
// uni.navigateTo({
|
||||||
// // id: item.id,
|
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||||
// // });
|
// item.missionNo
|
||||||
// uni.navigateTo({
|
// )}&id=${encodeURIComponent(item.id)}`,
|
||||||
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
// });
|
||||||
// item.missionNo
|
// },
|
||||||
// )}&id=${encodeURIComponent(item.id)}`,
|
// },
|
||||||
// });
|
]
|
||||||
// },
|
}
|
||||||
// },
|
},
|
||||||
]
|
onLoad() { },
|
||||||
}
|
onShow() {
|
||||||
},
|
if (!this.$store.state.user.token) {
|
||||||
onLoad() {},
|
uni.redirectTo({
|
||||||
onShow() {
|
url: "/pages/login/login"
|
||||||
if (!this.$api.haslogin()) {
|
})
|
||||||
uni.redirectTo({
|
} else {
|
||||||
url: "/pages/login/login"
|
uni.$emit('newsReadChange')
|
||||||
})
|
}
|
||||||
} else {
|
},
|
||||||
uni.$emit('newsReadChange')
|
// onPullDownRefresh() {
|
||||||
}
|
// this.loading = true
|
||||||
},
|
// this.$store.dispatch("newsInit").then(() => {
|
||||||
// onPullDownRefresh() {
|
// this.loading = false
|
||||||
// this.loading = true
|
// uni.stopPullDownRefresh();
|
||||||
// this.$store.dispatch("newsInit").then(() => {
|
// }).catch(() => {
|
||||||
// this.loading = false
|
// this.loading = false
|
||||||
// uni.stopPullDownRefresh();
|
// uni.stopPullDownRefresh();
|
||||||
// }).catch(() => {
|
// })
|
||||||
// this.loading = false
|
// },
|
||||||
// uni.stopPullDownRefresh();
|
methods: {
|
||||||
// })
|
goList(item) {
|
||||||
// },
|
// if (item.data.length === 0) {
|
||||||
methods: {
|
// uni.showToast({
|
||||||
goList(item) {
|
// title: '暂无消息',
|
||||||
// if (item.data.length === 0) {
|
// icon: 'none'
|
||||||
// uni.showToast({
|
// });
|
||||||
// title: '暂无消息',
|
// return
|
||||||
// icon: 'none'
|
// }
|
||||||
// });
|
console.log(item.data)
|
||||||
// return
|
// 任务推送、岗位推送、政策推送
|
||||||
// }
|
if (item.title == '岗位申请') {
|
||||||
console.log(item.data)
|
console.log('岗位申请')
|
||||||
// 任务推送、岗位推送、政策推送
|
uni.navigateTo({
|
||||||
if (item.title == '岗位申请') {
|
url: './taskProjectList'
|
||||||
console.log('岗位申请')
|
})
|
||||||
uni.navigateTo({
|
} else if (item.title == '岗位申请') {
|
||||||
url: './taskProjectList'
|
console.log('岗位申请')
|
||||||
})
|
uni.navigateTo({
|
||||||
} else if (item.title == '岗位申请') {
|
url: './jobProjectList'
|
||||||
console.log('岗位申请')
|
})
|
||||||
uni.navigateTo({
|
} else if (item.title == '个体户申请') {
|
||||||
url: './jobProjectList'
|
uni.navigateTo({
|
||||||
})
|
url: './policyList'
|
||||||
} else if (item.title == '个体户申请') {
|
})
|
||||||
uni.navigateTo({
|
} else {
|
||||||
url: './policyList'
|
uni.navigateTo({
|
||||||
})
|
url: './newsList?type=' + item.id
|
||||||
} else {
|
})
|
||||||
uni.navigateTo({
|
}
|
||||||
url: './newsList?type=' + item.id
|
},
|
||||||
})
|
back() {
|
||||||
}
|
uni.reLaunch({ url: '/pages/my/my' })
|
||||||
},
|
},
|
||||||
back() {
|
},
|
||||||
uni.reLaunch({
|
}
|
||||||
url: '/pages/my/my'
|
</script>
|
||||||
})
|
|
||||||
},
|
<style>
|
||||||
},
|
.content {
|
||||||
}
|
font-family: PingFangSC-Regular;
|
||||||
</script>
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
<style>
|
width: 560rpx;
|
||||||
.content {
|
overflow: hidden;
|
||||||
font-family: PingFangSC-Regular;
|
white-space: nowrap;
|
||||||
font-size: 28rpx;
|
/*不换行*/
|
||||||
color: #666666;
|
text-overflow: ellipsis;
|
||||||
width: 560rpx;
|
/*超出部分文字以...显示*/
|
||||||
overflow: hidden;
|
}
|
||||||
white-space: nowrap;
|
|
||||||
/*不换行*/
|
.head_right {
|
||||||
text-overflow: ellipsis;
|
float: right;
|
||||||
/*超出部分文字以...显示*/
|
font-family: PingFangSC-Regular;
|
||||||
}
|
font-size: 24rpx;
|
||||||
|
color: #CCCCCC;
|
||||||
.head_right {
|
}
|
||||||
float: right;
|
|
||||||
font-family: PingFangSC-Regular;
|
.head_left {
|
||||||
font-size: 24rpx;
|
float: left;
|
||||||
color: #CCCCCC;
|
font-family: PingFangSC-Regular;
|
||||||
}
|
font-size: 36rpx;
|
||||||
|
color: #333333;
|
||||||
.head_left {
|
}
|
||||||
float: left;
|
|
||||||
font-family: PingFangSC-Regular;
|
.head {
|
||||||
font-size: 36rpx;
|
overflow: hidden;
|
||||||
color: #333333;
|
width: 560rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head {
|
.newsListRight {
|
||||||
overflow: hidden;
|
float: left;
|
||||||
width: 560rpx;
|
width: 560rpx;
|
||||||
}
|
height: 50rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
.newsListRight {
|
padding-left: 30rpx;
|
||||||
float: left;
|
}
|
||||||
width: 560rpx;
|
|
||||||
height: 50rpx;
|
.newsList .newsIcon {
|
||||||
line-height: 50rpx;
|
position: relative;
|
||||||
padding-left: 30rpx;
|
width: 100rpx;
|
||||||
}
|
height: 100rpx;
|
||||||
|
display: inline-block;
|
||||||
.newsList .newsIcon {
|
float: left;
|
||||||
position: relative;
|
}
|
||||||
width: 100rpx;
|
|
||||||
height: 100rpx;
|
.newsList image {
|
||||||
display: inline-block;
|
width: 100rpx;
|
||||||
float: left;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.newsList image {
|
.newsList .point {
|
||||||
width: 100rpx;
|
position: absolute;
|
||||||
height: 100rpx;
|
top: 5rpx;
|
||||||
}
|
right: 10rpx;
|
||||||
|
width: 20rpx;
|
||||||
.newsList .point {
|
height: 20rpx;
|
||||||
position: absolute;
|
background: red;
|
||||||
top: 5rpx;
|
border-radius: 50%;
|
||||||
right: 10rpx;
|
}
|
||||||
width: 20rpx;
|
|
||||||
height: 20rpx;
|
.newsList {
|
||||||
background: red;
|
border-bottom: 1rpx solid #dddddd;
|
||||||
border-radius: 50%;
|
padding-bottom: 30rpx;
|
||||||
}
|
padding-right: 30rpx;
|
||||||
|
padding-top: 30rpx;
|
||||||
.newsList {
|
padding-left: 30rpx;
|
||||||
border-bottom: 1rpx solid #dddddd;
|
overflow: hidden;
|
||||||
padding-bottom: 30rpx;
|
display: flex;
|
||||||
padding-right: 30rpx;
|
align-items: center;
|
||||||
padding-top: 30rpx;
|
}
|
||||||
padding-left: 30rpx;
|
|
||||||
overflow: hidden;
|
.body {
|
||||||
display: flex;
|
background-color: #fefefe;
|
||||||
align-items: center;
|
/* padding-left: 30rpx;
|
||||||
}
|
|
||||||
|
width: 720rpx; */
|
||||||
.body {
|
}
|
||||||
background-color: #fefefe;
|
|
||||||
/* padding-left: 30rpx;
|
page {
|
||||||
|
background: #f6f6f6;
|
||||||
width: 720rpx; */
|
}
|
||||||
}
|
</style>
|
||||||
|
|
||||||
page {
|
|
||||||
background: #f6f6f6;
|
|
||||||
}
|
|
||||||
</style>
|
<!-- <template>
|
||||||
|
<view class="1">
|
||||||
|
<CustomNavbar @back="back" :titke="'消息'"></CustomNavbar>
|
||||||
|
<empty content="暂无数据" mr-top="300"></empty>
|
||||||
|
<CustomTabbar :currentpage="2"></CustomTabbar>
|
||||||
<!-- <template>
|
</view>
|
||||||
<view class="1">
|
</template>
|
||||||
<CustomNavbar @back="back" :titke="'消息'"></CustomNavbar>
|
|
||||||
<empty content="暂无数据" mr-top="300"></empty>
|
<script>
|
||||||
<CustomTabbar :currentpage="2"></CustomTabbar>
|
import CustomNavbar from '@/components/CustomNavbar/navbar.vue'
|
||||||
</view>
|
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
|
||||||
</template>
|
export default {
|
||||||
|
components: {CustomTabbar, CustomNavbar},
|
||||||
<script>
|
data() {
|
||||||
import CustomNavbar from '@/components/CustomNavbar/navbar.vue'
|
return {
|
||||||
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
|
|
||||||
export default {
|
}
|
||||||
components: {CustomTabbar, CustomNavbar},
|
},
|
||||||
data() {
|
methods: {
|
||||||
return {
|
back() {
|
||||||
|
uni.reLaunch({
|
||||||
}
|
url: '/pages/my/my'
|
||||||
},
|
})
|
||||||
methods: {
|
}
|
||||||
back() {
|
}
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/my/my'
|
}
|
||||||
})
|
</script>
|
||||||
}
|
|
||||||
}
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
</style> -->
|
</style> -->
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<view class="condition">
|
<view class="condition">
|
||||||
<view class="cond_list" v-if="pageType === 'enterprise'">
|
<view class="cond_list" v-if="pageType === 'enterprise'">
|
||||||
<view v-for="(item, index) in arrTitle" :key="index"
|
<view v-for="(item, index) in arrTitle" :key="index"
|
||||||
:class="['cond_item', item.id === currentArrTitleID ? 'activeButton' : '']" @click="changeTab(item)">
|
:class="['cond_item', index === currentArrTitleID ? 'activeButton' : '']" @click="changeTab(item)">
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,12 +39,10 @@
|
|||||||
} from '@/api/userrecruit.js'
|
} from '@/api/userrecruit.js'
|
||||||
import userrecruitList from '../components/userrecruitList.vue'
|
import userrecruitList from '../components/userrecruitList.vue'
|
||||||
let arrGuide = ['在线填写招工需求', '后台审核沟通发布', '平台展示招工信息'];
|
let arrGuide = ['在线填写招工需求', '后台审核沟通发布', '平台展示招工信息'];
|
||||||
let arrTitle = [
|
let arrTitle = [{
|
||||||
// {
|
text: "发布零工岗位",
|
||||||
// text: "发布零工岗位",
|
id: 0
|
||||||
// id: 0
|
}, {
|
||||||
// },
|
|
||||||
{
|
|
||||||
text: "发布全职岗位",
|
text: "发布全职岗位",
|
||||||
id: 1
|
id: 1
|
||||||
}
|
}
|
||||||
@@ -78,7 +76,7 @@
|
|||||||
reviewStatus,
|
reviewStatus,
|
||||||
pickerColumns,
|
pickerColumns,
|
||||||
openPicker: false,
|
openPicker: false,
|
||||||
currentArrTitleID: 1,
|
currentArrTitleID: 2,
|
||||||
currentReviewStatusID: '-1',
|
currentReviewStatusID: '-1',
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -89,7 +87,7 @@
|
|||||||
}) {
|
}) {
|
||||||
if (this.enterprise) {
|
if (this.enterprise) {
|
||||||
this.pageType = 'enterprise'
|
this.pageType = 'enterprise'
|
||||||
this.currentArrTitleID = 1
|
this.currentArrTitleID = 0
|
||||||
}
|
}
|
||||||
this.getList('refresh')
|
this.getList('refresh')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1036,7 +1036,7 @@ export default {
|
|||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .wageunitLeft .u-form-item__body {
|
/deep/.wageunitLeft .u-form-item__body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="mainWrapper">
|
<view class="mainWrapper">
|
||||||
<view class="headSearch">
|
<view v-show="!searchResultShow" class="headSearch">
|
||||||
<view class="search-view">
|
<view class="search-view">
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
|
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
|
||||||
<input type="text" confirm-type="搜索" v-model="keywords" @confirm="getList"
|
<input type="text" confirm-type="搜索" v-model="keywords" @confirm="getNewList('search')"
|
||||||
placeholder="搜零工岗位/搜全职岗位/搜政策" />
|
placeholder="搜零工岗位/搜全职岗位/搜政策" />
|
||||||
<view @click="getList"
|
<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;;">
|
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>
|
</view>
|
||||||
|
<!-- <view class="close" @click="closeBack">
|
||||||
|
取消
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-history">
|
<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="title">搜索记录</view>
|
<view class="title">搜索记录</view>
|
||||||
<view class="clear" @click="clearKeyWords">
|
<view class="clear" @click="clearKeyWords">
|
||||||
<image src="../../static/img/delete.png" style="width: 24rpx;height: 24rpx;" mode=""></image>
|
<image src="../../static/img/delete.png" style="width: 24rpx;height: 24rpx;" mode=""></image>
|
||||||
@@ -24,14 +60,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="empty">暂无历史记录</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>
|
</view>
|
||||||
<block v-if="activeTab === 0">
|
<v-tabs v-show="!searchResultShow" :tabs="['推荐零工岗位', '推荐全职岗位', '推荐政策']" height="45px" v-model="activeTab"
|
||||||
<view v-if="companyList.length ">
|
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">
|
<block v-for="(item, index) in companyList" :key="item.id">
|
||||||
<companyList :companyitem="item" :location="userLocation"></companyList>
|
<companyList :companyitem="item"></companyList>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
@@ -41,10 +78,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-if="activeTab === 1">
|
<block v-if="(activeTab == 1)&&!searchResultShow">
|
||||||
<view v-if="newList.length">
|
<view v-if="newList.length > 0">
|
||||||
<block v-for="(item, index) in newList" :key="item.id">
|
<block v-for="(item, index) in newList" :key="item.id">
|
||||||
<workList :companyitem="item" :near="activeTab === 0" :location="userLocation"></workList>
|
<workList :companyitem="item" :near="activeTab === 0"></workList>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
@@ -55,8 +92,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<block v-if="activeTab == 2">
|
<block v-if="(activeTab == 2)&&!searchResultShow">
|
||||||
<view v-if="recommendList.length">
|
<view v-if="recommendList.length > 0">
|
||||||
<!-- <block v-for="(item, index) in recommendList" :key="item.id">
|
<!-- <block v-for="(item, index) in recommendList" :key="item.id">
|
||||||
<companyList :companyitem="item"></companyList>
|
<companyList :companyitem="item"></companyList>
|
||||||
</block> -->
|
</block> -->
|
||||||
@@ -72,86 +109,94 @@
|
|||||||
<view v-else>
|
<view v-else>
|
||||||
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
|
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
|
||||||
<view class="nothingContnt">
|
<view class="nothingContnt">
|
||||||
暂无信息
|
完善技能,获取精推荐
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="btn" @click="goResume">
|
<!-- <view class="btn" @click="goResume">
|
||||||
完善技能
|
完善技能
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block v-if="activeTab == -1">
|
<!-- <view v-if="companyList.length > 0">
|
||||||
<view>
|
<block v-for="(item, index) in companyList" :key="item.id">
|
||||||
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
|
<companyList :companyitem="item"></companyList>
|
||||||
<view class="nothingContnt">
|
<view class="baddd"></view>
|
||||||
没有更多数据
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view v-else>
|
||||||
</block>
|
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
|
||||||
|
<view class="nothingContnt">
|
||||||
|
暂无任务信息
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
|
||||||
cloneDeep
|
|
||||||
} from 'lodash';
|
|
||||||
import {
|
import {
|
||||||
newMissionAll,
|
newMissionAll,
|
||||||
getSearchKeyWordsList,
|
getSearchKeyWordsList,
|
||||||
clearSearchKeyWords,
|
clearSearchKeyWords,
|
||||||
getListByKeyWords,
|
getListByKeyWords,
|
||||||
nearMission,
|
nearMission,
|
||||||
getPolicyContentList,
|
getPolicyContentList
|
||||||
userWorkSearchListAll
|
|
||||||
} from '@/api/mission.js';
|
} from '@/api/mission.js';
|
||||||
import {
|
|
||||||
mapGetters
|
|
||||||
} from 'vuex'
|
|
||||||
import companyList from '@/components/companyList/companyList.vue';
|
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'
|
import workList from '@/components/companyList/workList.vue'
|
||||||
const titleStatus = {
|
|
||||||
'mission': {
|
|
||||||
title: '零工岗位',
|
|
||||||
val: 0,
|
|
||||||
},
|
|
||||||
'work': {
|
|
||||||
title: '全职岗位',
|
|
||||||
val: 1,
|
|
||||||
},
|
|
||||||
'policy': {
|
|
||||||
title: '政策',
|
|
||||||
val: 2,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
companyList,
|
companyList,
|
||||||
|
vTabs,
|
||||||
workList
|
workList
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeTab: 0,
|
activeTab: 0,
|
||||||
keywords: '',
|
|
||||||
searchHistoryList: [],
|
|
||||||
companyList: [],
|
companyList: [],
|
||||||
newList: [],
|
|
||||||
recommendList: [],
|
recommendList: [],
|
||||||
tabList: ['零工岗位', '全职岗位', '政策']
|
newList: [],
|
||||||
}
|
keywords: '',
|
||||||
|
page: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
searchHistoryList: [],
|
||||||
|
searchResultShow: false,
|
||||||
|
searchResultList: []
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
onLoad: function(option) {
|
||||||
...mapGetters(['userLocation']),
|
this.keywords = option.keywords ? option.keywords : ''
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
this.getList('refresh');
|
||||||
this.getKeyWordsList()
|
this.getKeyWordsList()
|
||||||
},
|
},
|
||||||
|
/*页面滚动到底部*/
|
||||||
|
onReachBottom: function() {
|
||||||
|
this.upLoad()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goPolicyInfo(data) {
|
clearCurrentKeyWords() {
|
||||||
if (data) {
|
this.keywords = '';
|
||||||
uni.navigateTo({
|
let that = this;
|
||||||
url: `/pages/user/policyContent?id=${data}`
|
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() {
|
getKeyWordsList() {
|
||||||
@@ -166,6 +211,142 @@
|
|||||||
// console.log(keyWords)
|
// console.log(keyWords)
|
||||||
this.searchResultShow = true;
|
this.searchResultShow = true;
|
||||||
this.keywords = keyWords;
|
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() {
|
clearKeyWords() {
|
||||||
@@ -174,55 +355,15 @@
|
|||||||
this.getKeyWordsList()
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.mainWrapper {
|
.mainWrapper {
|
||||||
background-color: #f3f4f8;
|
background-color: #f3f4f8;
|
||||||
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
min-height: 95vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.baddd {
|
.baddd {
|
||||||
@@ -334,7 +475,6 @@
|
|||||||
padding: 8rpx 12rpx;
|
padding: 8rpx 12rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
position: relative;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-result {
|
.search-result {
|
||||||
|
|||||||
@@ -1,517 +0,0 @@
|
|||||||
<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>
|
|
||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 563 B |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 809 B |
|
Before Width: | Height: | Size: 389 B After Width: | Height: | Size: 888 B |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 531 B |
|
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 565 B |
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 637 B |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 856 B After Width: | Height: | Size: 881 B |
|
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 55 KiB |
BIN
static/img/index/inLogo22.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 962 B After Width: | Height: | Size: 975 B |
|
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 875 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1007 B After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 798 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.7 KiB |