flat: 冲突链接登陆
This commit is contained in:
11
pages.json
11
pages.json
@@ -324,24 +324,17 @@
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/recruit/subPage/newsDetail/signContract",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务详情",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/recruit/subPage/newsDetail/userrecruitInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务详情",
|
||||
"navigationBarTitleText": "招工详情",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/recruit/subPage/newsDetail/workInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务详情",
|
||||
"navigationBarTitleText": "岗位详情",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<view class="body">
|
||||
<CustomNavbar @back="back" titke="申请消息"></CustomNavbar>
|
||||
<view v-for="(value,key) in data" class="newsList" @click="goList(value)" :key="key">
|
||||
<view v-for="(value, key) in messageList" class="newsList" @click="goList(value)" :key="key">
|
||||
<view class="newsIcon">
|
||||
<image :src="value.icon" mode=""></image>
|
||||
<view v-if="news_recruit.unread[value.id] > 0" class="point"></view>
|
||||
<!-- <view v-if="news_recruit.unread[value.id] > 0" class="point"></view> -->
|
||||
</view>
|
||||
<view class="newsListRight">
|
||||
<view class="head">
|
||||
<view class="head_left">
|
||||
{{value.title}}
|
||||
{{ value.title }}
|
||||
</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]}}
|
||||
</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)}}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<cs-button></cs-button>
|
||||
@@ -26,169 +26,281 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
|
||||
import CustomNavbar from '@/components/CustomNavbar/navbar.vue';
|
||||
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue'
|
||||
import CustomNavbar from '@/components/CustomNavbar/navbar.vue';
|
||||
|
||||
export default {
|
||||
components: {CustomTabbar,CustomNavbar},
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
if (!this.$store.state.user.token) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login"
|
||||
export default {
|
||||
components: { CustomTabbar, CustomNavbar },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
size: 20,
|
||||
messageList: [{
|
||||
id: "0",
|
||||
title: "消息通知",
|
||||
icon: "../../../static/img/notice.svg",
|
||||
page: {
|
||||
current: 0,
|
||||
size: this.size,
|
||||
total: this.size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "title",
|
||||
desc: (value) => {
|
||||
if (value.data[0]) return value.data[0][0]["desc"];
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "isRead",
|
||||
listDesc: "desc",
|
||||
},
|
||||
navigateTo(item) {
|
||||
uni.$once("getNewsDetail", (cb) => {
|
||||
cb(item);
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: "/pages/news/newsDetail?type=0",
|
||||
});
|
||||
},
|
||||
}, {
|
||||
id: "1",
|
||||
title: "任务申请",
|
||||
icon: "../../../static/img/renwu.png",
|
||||
page: {
|
||||
current: 0,
|
||||
size: this.size,
|
||||
total: this.size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "missionTitle",
|
||||
desc: (value) => {
|
||||
if (value.data[0])
|
||||
return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "status",
|
||||
listDesc: "companyName",
|
||||
},
|
||||
navigateTo(item, dispatch) {
|
||||
// dispatch("readNew", {
|
||||
// key: "1",
|
||||
// id: item.id,
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||
item.missionNo
|
||||
)}&id=${encodeURIComponent(item.id)}`,
|
||||
});
|
||||
},
|
||||
}, {
|
||||
id: "1",
|
||||
title: "岗位申请",
|
||||
icon: "../../../static/img/job_recruit.svg",
|
||||
page: {
|
||||
current: 0,
|
||||
size: this.size,
|
||||
total: this.size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "missionTitle",
|
||||
desc: (value) => {
|
||||
if (value.data[0])
|
||||
return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "status",
|
||||
listDesc: "companyName",
|
||||
},
|
||||
navigateTo(item, dispatch) {
|
||||
// dispatch("readNew", {
|
||||
// key: "1",
|
||||
// id: item.id,
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||
item.missionNo
|
||||
)}&id=${encodeURIComponent(item.id)}`,
|
||||
});
|
||||
},
|
||||
}, {
|
||||
id: "1",
|
||||
title: "个人户申请",
|
||||
icon: "../../../static/img/own_recruit.svg",
|
||||
page: {
|
||||
current: 0,
|
||||
size: this.size,
|
||||
total: this.size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "missionTitle",
|
||||
desc: (value) => {
|
||||
if (value.data[0])
|
||||
return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "status",
|
||||
listDesc: "companyName",
|
||||
},
|
||||
navigateTo(item, dispatch) {
|
||||
// dispatch("readNew", {
|
||||
// key: "1",
|
||||
// id: item.id,
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||
item.missionNo
|
||||
)}&id=${encodeURIComponent(item.id)}`,
|
||||
});
|
||||
},
|
||||
},]
|
||||
}
|
||||
},
|
||||
onLoad() { },
|
||||
onShow() {
|
||||
if (!this.$store.state.user.token) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
} else {
|
||||
uni.$emit('newsReadChange')
|
||||
}
|
||||
},
|
||||
// onPullDownRefresh() {
|
||||
// this.loading = true
|
||||
// this.$store.dispatch("newsInit").then(() => {
|
||||
// this.loading = false
|
||||
// uni.stopPullDownRefresh();
|
||||
// }).catch(() => {
|
||||
// this.loading = false
|
||||
// uni.stopPullDownRefresh();
|
||||
// })
|
||||
// },
|
||||
methods: {
|
||||
goList(item) {
|
||||
// if (item.data.length === 0) {
|
||||
// uni.showToast({
|
||||
// title: '暂无消息',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
console.log(item.data)
|
||||
// 任务推送、岗位推送、政策推送
|
||||
if (item.title == '任务申请') {
|
||||
console.log('任务申请')
|
||||
uni.navigateTo({
|
||||
url: './taskProjectList'
|
||||
})
|
||||
} else if (item.title == '岗位申请') {
|
||||
console.log('岗位申请')
|
||||
uni.navigateTo({
|
||||
url: './jobProjectList'
|
||||
})
|
||||
} else if (item.title == '个人户申请') {
|
||||
console.log('个人户申请')
|
||||
uni.navigateTo({
|
||||
url: './policyList'
|
||||
})
|
||||
} else {
|
||||
uni.$emit('newsReadChange')
|
||||
uni.navigateTo({
|
||||
url: './newsList?type=' + item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.loading = true
|
||||
this.$store.dispatch("newsInit").then(() => {
|
||||
this.loading = false
|
||||
uni.stopPullDownRefresh();
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
back() {
|
||||
uni.reLaunch({ url: '/pages/my/my' })
|
||||
},
|
||||
methods: {
|
||||
goList(item) {
|
||||
// if (item.data.length === 0) {
|
||||
// uni.showToast({
|
||||
// title: '暂无消息',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
console.log(item.data)
|
||||
// 任务推送、岗位推送、政策推送
|
||||
if(item.title == '任务申请') {
|
||||
console.log('任务申请')
|
||||
uni.navigateTo({
|
||||
url: './taskProjectList'
|
||||
})
|
||||
} else if(item.title == '岗位申请') {
|
||||
console.log('岗位申请')
|
||||
uni.navigateTo({
|
||||
url: './jobProjectList'
|
||||
})
|
||||
} else if(item.title == '个人户申请') {
|
||||
console.log('个人户申请')
|
||||
uni.navigateTo({
|
||||
url: './policyList'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: './newsList?type=' + item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
back() {
|
||||
uni.reLaunch({ url: '/pages/my/my' })
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['news_recruit']),
|
||||
data() {
|
||||
console.log(this.news_recruit.data,'--------------------==========');
|
||||
return this.news_recruit.data
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
width: 560rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
/*不换行*/
|
||||
text-overflow: ellipsis;
|
||||
/*超出部分文字以...显示*/
|
||||
}
|
||||
.content {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
width: 560rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
/*不换行*/
|
||||
text-overflow: ellipsis;
|
||||
/*超出部分文字以...显示*/
|
||||
}
|
||||
|
||||
.head_right {
|
||||
float: right;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24rpx;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
.head_right {
|
||||
float: right;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24rpx;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.head_left {
|
||||
float: left;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.head_left {
|
||||
float: left;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.head {
|
||||
overflow: hidden;
|
||||
width: 560rpx;
|
||||
}
|
||||
.head {
|
||||
overflow: hidden;
|
||||
width: 560rpx;
|
||||
}
|
||||
|
||||
.newsListRight {
|
||||
float: left;
|
||||
width: 560rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
.newsListRight {
|
||||
float: left;
|
||||
width: 560rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.newsList .newsIcon {
|
||||
position: relative;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
.newsList .newsIcon {
|
||||
position: relative;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.newsList image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
.newsList image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.newsList .point {
|
||||
position: absolute;
|
||||
top: 5rpx;
|
||||
right: 10rpx;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background: red;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.newsList .point {
|
||||
position: absolute;
|
||||
top: 5rpx;
|
||||
right: 10rpx;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background: red;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.newsList {
|
||||
border-bottom: 1rpx solid #dddddd;
|
||||
padding-bottom: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
padding-top: 30rpx;
|
||||
padding-left: 30rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.newsList {
|
||||
border-bottom: 1rpx solid #dddddd;
|
||||
padding-bottom: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
padding-top: 30rpx;
|
||||
padding-left: 30rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.body {
|
||||
background-color: #fefefe;
|
||||
/* padding-left: 30rpx;
|
||||
.body {
|
||||
background-color: #fefefe;
|
||||
/* padding-left: 30rpx;
|
||||
|
||||
width: 720rpx; */
|
||||
}
|
||||
}
|
||||
|
||||
page {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
page {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -110,13 +110,11 @@
|
||||
</view>
|
||||
</uniMask>
|
||||
<u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp">
|
||||
<view style="min-height: 200rpx;padding: 20rpx 40rpx;">
|
||||
<!-- <view style="font-size: 28rpx;font-weight: bold;">重要提示:</view>
|
||||
<view style="font-size: 24rpx;color:#707070;margin-top:10rpx;">为保障个人基本劳动权益,建议通过平台用工的形式就业</view> -->
|
||||
<view v-for="(item, index) in info.applyList" :key="index"
|
||||
style="text-align: center;font-size:28rpx;margin-top: 30rpx;"> {{ item.realName }} : {{
|
||||
item.telphone }} 申请时间: {{
|
||||
item.applyTime }}</view>
|
||||
<view style="min-height: 100rpx;padding: 60rpx 40rpx;">
|
||||
<view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index">
|
||||
<view>{{ item.realName }} : {{ item.telphone }}</view>
|
||||
<view class="applyTime">申请时间:{{ item.applyTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
@@ -142,7 +140,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { recruit_missionDetail, submit } from '@/api/mission.js';
|
||||
import { recruit_missionDetail } from '@/api/mission.js';
|
||||
import { GoLogin } from '@/untils/AxiosUtils.js';
|
||||
import { setRead } from '@/api/news.js';
|
||||
import { checkPass } from '@/api/auth.js';
|
||||
@@ -238,57 +236,10 @@ export default {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
submit: function () {
|
||||
if (!this.$store.state.user.token) {
|
||||
GoLogin()
|
||||
return
|
||||
}
|
||||
if (this.loading) return
|
||||
const auth = this.auth
|
||||
const contractOn = this.info.contractOn
|
||||
const sealOk = this.autograph && this.autograph.data && this.autograph.data.signSrcUrl
|
||||
// if (sealOk) {
|
||||
// console.log('直接抢任务')
|
||||
// this.submitTask()
|
||||
// } else
|
||||
// if (!auth.realNameState || !auth.laborState || !auth.insureState) {
|
||||
// this.goSign(0)
|
||||
// } else if (!auth.bankCardState){
|
||||
// this.goSign(1)
|
||||
// } else
|
||||
if (contractOn && !sealOk) {
|
||||
this.goSign(2)
|
||||
} else if (sealOk && contractOn) {
|
||||
this.nextBtn = true
|
||||
this.lookMask()
|
||||
} else {
|
||||
this.submitTask()
|
||||
}
|
||||
},
|
||||
// 查看合同
|
||||
lookMask() {
|
||||
this.maskShow = true
|
||||
},
|
||||
// 抢任务
|
||||
submitTask() {
|
||||
submit(this.missionNo, 0).then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.status = null;
|
||||
this.loading = false
|
||||
}, error => {
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
// 步骤
|
||||
goSign(active) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/signContract?active=${active}`
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
close() {
|
||||
this.maskShow = false
|
||||
@@ -309,7 +260,6 @@ export default {
|
||||
pass: password
|
||||
}
|
||||
checkPass(obj).then(res => {
|
||||
this.submitTask()
|
||||
this.closeShowCode()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
@@ -535,4 +485,23 @@ export default {
|
||||
word-break: break-all;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.contactWrapper {
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 5px;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tips">为了更方便的为您服务,请先完善认证信息!</view>
|
||||
<!--<step-bar :stepList="stepList" :active="active"></step-bar>-->
|
||||
<first v-if="active === '0' || active === 0" ref="first" @firstSubmit="backSubmit"></first>
|
||||
<second v-if="active === '1' || active === 1" ref="second" @secondSubmit="backSubmit" :stepLength="stepLength"></second>
|
||||
<three v-if="active === '2' || active === 2"></three>
|
||||
<view class="backLogin" @click="logout">
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import stepBar from '@/components/step-bar/index.vue'
|
||||
import first from './step/first.vue'
|
||||
import second from './step/second.vue'
|
||||
import three from './step/three.vue'
|
||||
export default{
|
||||
data() {
|
||||
return {
|
||||
stepList: ['实名认证','银行卡认证'],
|
||||
active: 0,
|
||||
stepLength: 2
|
||||
}
|
||||
},
|
||||
onLoad(options){
|
||||
if (Number(options.active) === 2) {
|
||||
this.stepList.push('个人签名')
|
||||
this.stepLength = 3
|
||||
}
|
||||
this.active = options.active
|
||||
},
|
||||
components: {stepBar,first, second, three},
|
||||
methods: {
|
||||
logout() {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
this.$store.dispatch('clearAuthState')
|
||||
this.$store.dispatch('endRefreshNewsTimer')
|
||||
})
|
||||
},
|
||||
backSubmit(){
|
||||
this.sign()
|
||||
},
|
||||
sign(){
|
||||
this.loading = false
|
||||
if (Number(this.active)+1 === this.stepList.length) {
|
||||
if (this.stepList.length === 2) {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
} else if (this.stepList.length === 3) {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.active++
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page{
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.tips{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
line-height: 28rpx;
|
||||
margin: 45rpx 0 50rpx 30rpx;
|
||||
}
|
||||
.backLogin{
|
||||
width: 128rpx;
|
||||
height: 45rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: #1C66FF;
|
||||
line-height: 45rpx;
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
left: 40%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,358 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!--<view style="height: 70rpx;"></view>-->
|
||||
<view class="list border" style="padding-right: 32rpx;">
|
||||
<view class="name">
|
||||
姓名
|
||||
</view>
|
||||
<text v-if="auth.realNameState" style="color: #1B66FF;">{{auth.authInfo.realName}}</text>
|
||||
<input v-else type="text" :value="name" placeholder="请输入" @input="setName" placeholder-style="color:#cccccc;" />
|
||||
</view>
|
||||
<view class="border" style="padding-right: 32rpx;">
|
||||
<view class="list">
|
||||
<view class="name">
|
||||
身份证号
|
||||
</view>
|
||||
<text v-if="auth.realNameState" style="color: #1B66FF;">{{idNumberFilter(auth.authInfo.idNumber)}}</text>
|
||||
<input v-else type="idcard" :value="card" placeholder="请输入" @input="setCard" style="text-transform:uppercase"
|
||||
placeholder-style="color:#cccccc;" />
|
||||
</view>
|
||||
<view v-if="error" class="error">身份证号格式不正确</view>
|
||||
</view>
|
||||
<view class="list border">
|
||||
<view class="listLeft">
|
||||
开户银行
|
||||
</view>
|
||||
<view v-if="auth.bankCardState" class="listRight" style="margin-right:32rpx;">
|
||||
{{auth.authInfo.bankName}}
|
||||
</view>
|
||||
<view v-else class="listRight" @click="goBankList">
|
||||
{{bankName}}
|
||||
<image src="@/static/img/right.svg" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list border">
|
||||
<view class="name">
|
||||
银行卡号
|
||||
</view>
|
||||
<text v-if="auth.bankCardState" style="color: #1B66FF;">{{auth.authInfo.cardNumber}}</text>
|
||||
<input v-else type="number" v-model="cardNumber" placeholder="请输入银行卡号" placeholder-style="color:#cccccc;" @input="blur" />
|
||||
</view>
|
||||
<picker @change="bindPickerChange" :value="index" :range="laborType" class="border">
|
||||
<view class="list">
|
||||
<view class="listLeft">
|
||||
<view class="listTitle">身份信息</view>
|
||||
</view>
|
||||
<view class="listRight">
|
||||
<view class="rightContent nochoose">
|
||||
<view v-if="auth.laborState" class="uni-input">{{ laborType[0] }}</view>
|
||||
<view v-else class="uni-input">请选择</view>
|
||||
</view>
|
||||
<image src="@/static/img/right.svg" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<picker @change="bindPickerChangeBao" :value="indexbao" :range="insureType" class="border">
|
||||
<view class="list">
|
||||
<view class="listLeft">
|
||||
<view class="listTitle">社保信息</view>
|
||||
</view>
|
||||
<view class="listRight">
|
||||
<view class="rightContent nochoose">
|
||||
<view v-if="auth.insureState" class="uni-input">{{ insureType[indexbao] }}</view>
|
||||
<view v-else class="uni-input">请选择</view>
|
||||
</view>
|
||||
<image src="@/static/img/right.svg" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="btn">
|
||||
<view v-if="auth.realNameState && auth.bankCardState" @click="next" class="bottombtn">
|
||||
完成
|
||||
</view>
|
||||
<view v-if="!loading && !status && !auth.bankCardState" class="bottombtn nocheck">
|
||||
完成
|
||||
</view>
|
||||
<view v-if="!loading && status && !auth.bankCardState" @click="next" class="bottombtn">
|
||||
完成
|
||||
</view>
|
||||
<view v-if="loading" class="bottombtn nocheck">
|
||||
提交中
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import textdata from '@/common/textdata.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import {
|
||||
idNumberFilter
|
||||
} from '@/untils/format.js'
|
||||
import {
|
||||
check18IdCardNo,
|
||||
validatenull
|
||||
} from '@/untils/validate.js'
|
||||
import {
|
||||
getStore
|
||||
} from '@/untils/store.js'
|
||||
import {
|
||||
newCertification,findAuth
|
||||
} from '@/api/auth.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
laborType: textdata.laborType,
|
||||
insureType: textdata.insureType,
|
||||
name: '',
|
||||
card: '',
|
||||
error: false,
|
||||
loading: false,
|
||||
index: 0,
|
||||
bankName: "选择银行",
|
||||
cardNumber: "",
|
||||
bankId: "",
|
||||
clickable: false,
|
||||
def: true, //银行卡是否为默认
|
||||
defCount: 5, //默认每日允许认证次数
|
||||
realCount:0,//已经认证的次数
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const realName = getStore({
|
||||
name: 'realName'
|
||||
})
|
||||
const bankCard = getStore({
|
||||
name: 'bankCard'
|
||||
})
|
||||
if (bankCard && bankCard.bankName) {
|
||||
this.bankName = bankCard.bankName
|
||||
this.bankId = bankCard.bankId
|
||||
this.cardNumber = bankCard.cardNumber
|
||||
}
|
||||
if (realName && realName.name) {
|
||||
this.name = realName.name
|
||||
this.card = realName.card
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
idNumberFilter,
|
||||
next() {
|
||||
var auth = this.auth
|
||||
console.log(auth.realNameState,auth.laborState , auth.insureState)
|
||||
if (auth.realNameState && auth.laborState && auth.insureState && auth.bankCardState) {
|
||||
this.$emit('firstSubmit')
|
||||
} else {
|
||||
this.submit()
|
||||
}
|
||||
},
|
||||
setName: function(e) {
|
||||
this.name = e.detail.value;
|
||||
this.setFirstObj()
|
||||
},
|
||||
setCard: function(e) {
|
||||
this.card = e.detail.value.toUpperCase();
|
||||
this.error = !check18IdCardNo(this.card)
|
||||
this.setFirstObj()
|
||||
return e.detail.value.toUpperCase()
|
||||
},
|
||||
bindPickerChange: function(e) {
|
||||
uni.showLoading()
|
||||
this.$store.dispatch('authLabor').then(resp => {
|
||||
this.index = e.target.value;
|
||||
uni.hideLoading()
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
bindPickerChangeBao: function(e) {
|
||||
uni.showLoading()
|
||||
this.$store.dispatch('authInsure', e.target.value * 1 + 1).then(resp => {
|
||||
uni.hideLoading()
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
setFirstObj() {
|
||||
var obj = {
|
||||
name: this.name,
|
||||
card: this.card
|
||||
}
|
||||
this.$store.dispatch('setRealName', obj)
|
||||
},
|
||||
submit() {
|
||||
findAuth().then(res=>{
|
||||
let count = res.data.data.authCount; //每次点“提交”都先查询已经认证了几次
|
||||
let diffCount = this.defCount - count; //剩余认证机会
|
||||
this.loading = true;
|
||||
if (count <= this.defCount) {
|
||||
let name=this.auth.realNameState?this.auth.authInfo.realName:this.name;
|
||||
let card=this.auth.realNameState?this.auth.authInfo.idNumber:this.card;
|
||||
newCertification(this.indexbao + 1, name, card, this.cardNumber, this.bankId, this.def ? 1 : 0, this.bankName)
|
||||
.then( //认证成功则跳转到首页面
|
||||
res => {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.$store.commit('SET_AUTH_REALNAME', true)
|
||||
this.$store.dispatch('setRealName', {})
|
||||
this.$store.commit('SET_AUTH_BANKCARD', true)
|
||||
this.loading = false
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}).catch((err) => { //认证失败会提示还有几次认证机会
|
||||
if (count > 1 && count <= 5) {
|
||||
//uni.hideToast();
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: `今日已认证${count}次,还有${diffCount}次认证机会`,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
this.loading = false;
|
||||
|
||||
})
|
||||
} else {
|
||||
if (count >= this.defCount) {
|
||||
uni.showToast({
|
||||
title: `今日已认证${this.defCount}次,请明日再来认证`,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
goBankList: function() {
|
||||
uni.$once('icCardSetBank', (data) => {
|
||||
this.bankId = data.id;
|
||||
this.bankName = data.name;
|
||||
this.setBankName()
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/bankList/bankList'
|
||||
})
|
||||
},
|
||||
setBankName() {
|
||||
const obj = {
|
||||
bankName: this.bankName,
|
||||
bankId: this.bankId,
|
||||
cardNumber: this.cardNumber
|
||||
}
|
||||
this.$store.dispatch('setBankCard', obj)
|
||||
},
|
||||
blur() {
|
||||
this.setBankName();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['auth', 'authInfo']),
|
||||
indexbao() {
|
||||
if (this.auth.insureState) {
|
||||
return this.authInfo.bakValue - 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
status() {
|
||||
if (this.auth.authInfo.realName && this.auth.authInfo.idNumber) {
|
||||
if (!this.cardNumber || !this.bankId || !this.auth.laborState || !this.auth.insureState) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
if (!this.name || !this.card || !this.cardNumber || !this.bankId || !this.auth.laborState || !this.auth.insureState) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.nocheck {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.bottombtn {
|
||||
background-color: #1B66FF;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 32rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background-color: #fefefe;
|
||||
padding: 70rpx 80rpx;
|
||||
}
|
||||
|
||||
.error {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24rpx;
|
||||
color: red;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 14px;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.border {
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
position: relative;
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
|
||||
.listRight {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.listRight image {
|
||||
width: 19rpx;
|
||||
height: 32rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
|
||||
.list .name {
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
@@ -1,224 +0,0 @@
|
||||
<template>
|
||||
<view style="margin-top: 70rpx;">
|
||||
<view class="list">
|
||||
<view class="listName">
|
||||
开户银行
|
||||
</view>
|
||||
<view v-if="auth.bankCardState" class="listContent" style="margin-right:32rpx;">
|
||||
{{auth.authInfo.bankName}}
|
||||
</view>
|
||||
<view v-else class="listContent" @click="goBankList">
|
||||
{{bankName}}
|
||||
<image src="@/static/img/right.svg" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="listName">
|
||||
银行卡号
|
||||
</view>
|
||||
<text v-if="auth.bankCardState" style="color: #999999;font-size: 14px;margin-right:32rpx;">{{auth.authInfo.cardNumber}}</text>
|
||||
<input v-else type="number" v-model="cardNumber" placeholder="请输入银行卡号" placeholder-style="color:#cccccc;" @input="blur"/>
|
||||
</view>
|
||||
<view class="cardTips">
|
||||
此银行卡信息仅作为发放工资使用;银行卡持卡人信息与基本信息一致。
|
||||
</view>
|
||||
<view v-if="stepLength === 2" class="btn">
|
||||
<view v-if="auth.bankCardState" @click="next" class="bottombtn">
|
||||
完成
|
||||
</view>
|
||||
<view v-if="!loading && !status && !auth.bankCardState" class="bottombtn nocheck">
|
||||
完成
|
||||
</view>
|
||||
<view v-if="!loading && status && !auth.bankCardState" @click="next" class="bottombtn">
|
||||
完成
|
||||
</view>
|
||||
<view v-if="loading" class="bottombtn nocheck">
|
||||
提交中
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="stepLength === 3" class="btn">
|
||||
<view v-if="auth.bankCardState" @click="next" class="bottombtn">
|
||||
下一步
|
||||
</view>
|
||||
<view v-if="!loading && !status && !auth.bankCardState" class="bottombtn nocheck">
|
||||
下一步
|
||||
</view>
|
||||
<view v-if="!loading && status && !auth.bankCardState" @click="next" class="bottombtn">
|
||||
下一步
|
||||
</view>
|
||||
<view v-if="loading" class="bottombtn nocheck">
|
||||
提交中
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {bank} from '@/api/auth.js'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {getStore} from '@/untils/store.js'
|
||||
export default{
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
edit: false,
|
||||
def: true,
|
||||
bankId: '',
|
||||
bankName: '选择银行',
|
||||
cardNumber: '',
|
||||
}
|
||||
},
|
||||
props:{
|
||||
stepLength: {
|
||||
type: Number,
|
||||
default: 2
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
const bankCard = getStore({
|
||||
name: 'bankCard'
|
||||
})
|
||||
if (bankCard && bankCard.bankName) {
|
||||
this.bankName = bankCard.bankName
|
||||
this.bankId = bankCard.bankId
|
||||
this.cardNumber = bankCard.cardNumber
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
next(){
|
||||
var auth = this.auth
|
||||
if (auth.bankCardState){
|
||||
this.$emit('secondSubmit')
|
||||
}else {
|
||||
this.submit()
|
||||
}
|
||||
},
|
||||
goBankList: function() {
|
||||
uni.$once('icCardSetBank', (data) => {
|
||||
this.bankId = data.id;
|
||||
this.bankName = data.name;
|
||||
this.setBankName()
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/bankList/bankList'
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.loading = true
|
||||
bank(this.bankName, this.auth.authInfo.realName, this.cardNumber, this.def ? 1 : 0).then(resp => {
|
||||
uni.showToast({
|
||||
title: resp.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
this.loading = false
|
||||
this.$store.commit('SET_AUTH_BANKCARD', true)
|
||||
this.$emit('secondSubmit')
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
// this.$emit('secondSubmit',false)
|
||||
})
|
||||
},
|
||||
blur(){
|
||||
this.setBankName()
|
||||
},
|
||||
setBankName(){
|
||||
const obj = {
|
||||
bankName: this.bankName,
|
||||
bankId: this.bankId,
|
||||
cardNumber: this.cardNumber
|
||||
}
|
||||
this.$store.dispatch('setBankCard', obj)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['auth']),
|
||||
status(){
|
||||
if (!this.cardNumber || !this.bankName) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.cardTips{
|
||||
width: 590rpx;
|
||||
height: 68rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
line-height: 34rpx;
|
||||
margin:71rpx 0 0 71rpx;
|
||||
}
|
||||
.nocheck {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.bottombtn {
|
||||
background-color: #1B66FF;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 32rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background-color: #fefefe;
|
||||
padding: 70rpx 80rpx;
|
||||
}
|
||||
.list switch {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.nocheck {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.listName {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.listContent image {
|
||||
width: 19rpx;
|
||||
height: 32rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
|
||||
.listContent {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.list input,
|
||||
.list text {
|
||||
margin-left: auto;
|
||||
text-align: right;
|
||||
}
|
||||
.list input{
|
||||
flex:1;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 30rpx 0;
|
||||
padding-left: 0;
|
||||
border-bottom: 1rpx solid #f2f2f2;
|
||||
margin: 0 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,174 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="sealBox">
|
||||
<view style="height: 70rpx;"></view>
|
||||
<view class="name">签名</view>
|
||||
<view v-if="src" class="sealContent">
|
||||
<image class="img" mode="aspectFit" :src="src"></image>
|
||||
</view>
|
||||
<view v-else class="sealContent" @click="go">
|
||||
<view class="contentFont">点击输入手写签名</view>
|
||||
</view>
|
||||
<view class="list" v-if="src">
|
||||
<view class="listLeft">
|
||||
<view class="listTitle">签名密码</view>
|
||||
</view>
|
||||
<view class="listRight">
|
||||
<view class="rightContent nochoose">
|
||||
<view v-if="src" class="uni-input">已设置</view>
|
||||
<view v-else class="uni-input">未设置</view>
|
||||
</view>
|
||||
<image src="@/static/img/right.svg" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!src" class="sealAgreement">
|
||||
<checkbox :checked="status" @click="checkClick"/>
|
||||
<view>我已阅读并同意</view>
|
||||
<view class="agreement" @click="goAgreement('/pages/user/sealAgreement')">《申请证书协议》</view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<view v-if="src" @click="next" class="bottombtn">完成</view>
|
||||
<view v-if="!src" class="bottombtn nocheck">完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
status:false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$store.dispatch('setAutograph')
|
||||
},
|
||||
methods: {
|
||||
goAgreement (url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
checkClick(){
|
||||
this.status = !this.status
|
||||
},
|
||||
next () {
|
||||
uni.navigateBack()
|
||||
// uni.switchTab({
|
||||
// url: '/pages/index/index'
|
||||
// })
|
||||
},
|
||||
go(url){
|
||||
if (!this.status){
|
||||
uni.showToast({
|
||||
title: '请先阅读并同意《申请证书协议》',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pageMy/setUserBase/seal/sealCanvas?path=/pageMy/setUserBase/seal/sealCanvas`
|
||||
})
|
||||
},
|
||||
getInpCode: function(e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['autograph']),
|
||||
src(){
|
||||
if (this.autograph.data && this.autograph.data.signSrcUrl){
|
||||
return this.autograph.data.signSrcUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.sealAgreement{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 30rpx;
|
||||
font-size: 32rpx;
|
||||
.agreement{
|
||||
color: #007AFF;
|
||||
}
|
||||
/deep/ .uni-checkbox-input{
|
||||
border-radius: 22px!important;
|
||||
}
|
||||
}
|
||||
.nocheck {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.bottombtn {
|
||||
background-color: #1B66FF;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 32rpx;
|
||||
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;
|
||||
|
||||
}
|
||||
.listRight {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.listRight image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
height: 88rpx;
|
||||
}
|
||||
.sealContent{
|
||||
background: #F6F6F6;
|
||||
padding: 16rpx;
|
||||
margin-top: 14rpx;
|
||||
position:relative;
|
||||
.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>
|
||||
@@ -117,13 +117,11 @@
|
||||
</view>
|
||||
</uniMask>
|
||||
<u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp">
|
||||
<view style="min-height: 200rpx;padding: 20rpx 40rpx;">
|
||||
<!-- <view style="font-size: 28rpx;font-weight: bold;">重要提示:</view>
|
||||
<view style="font-size: 24rpx;color:#707070;margin-top:10rpx;">为保障个人基本劳动权益,建议通过平台用工的形式就业</view> -->
|
||||
<view v-for="(item, index) in info.applyList" :key="index"
|
||||
style="text-align: center;font-size:28rpx;margin-top: 30rpx;"> {{ item.realName }} : {{
|
||||
item.telphone }} 申请时间: {{
|
||||
item.applyTime }}</view>
|
||||
<view style="min-height: 100rpx;padding: 60rpx 40rpx;">
|
||||
<view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index">
|
||||
<view>{{ item.realName }} : {{ item.telphone }}</view>
|
||||
<view class="applyTime">申请时间:{{ item.applyTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
@@ -149,7 +147,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { recruit_missionDetail, submit, } from '@/api/mission.js';
|
||||
import { recruit_missionDetail, } from '@/api/mission.js';
|
||||
import { GoLogin } from '@/untils/AxiosUtils.js';
|
||||
import { setRead } from '@/api/news.js';
|
||||
import { checkPass } from '@/api/auth.js';
|
||||
@@ -245,67 +243,12 @@ export default {
|
||||
self.covers[0].latitude = self.info.lat;
|
||||
self.covers[0].longitude = self.info.lon;
|
||||
self.showDetail = true;
|
||||
if (!this.seeDeatil) {
|
||||
if (self.type === 1) {
|
||||
// 设置已读
|
||||
setRead(self.id).then(res => {
|
||||
self.$store.commit("SET_READ");
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
submit: function () {
|
||||
if (!this.$store.state.user.token) {
|
||||
GoLogin()
|
||||
return
|
||||
}
|
||||
if (this.loading) return
|
||||
const auth = this.auth
|
||||
const contractOn = this.info.contractOn
|
||||
const sealOk = this.autograph && this.autograph.data && this.autograph.data.signSrcUrl
|
||||
// if (sealOk) {
|
||||
// console.log('直接抢任务')
|
||||
// this.submitTask()
|
||||
// } else
|
||||
// if (!auth.realNameState || !auth.laborState || !auth.insureState) {
|
||||
// this.goSign(0)
|
||||
// } else if (!auth.bankCardState){
|
||||
// this.goSign(1)
|
||||
// } else
|
||||
if (contractOn && !sealOk) {
|
||||
this.goSign(2)
|
||||
} else if (sealOk && contractOn) {
|
||||
this.nextBtn = true
|
||||
this.lookMask()
|
||||
} else {
|
||||
this.submitTask()
|
||||
}
|
||||
},
|
||||
// 查看合同
|
||||
lookMask() {
|
||||
this.maskShow = true
|
||||
},
|
||||
// 岗位申请
|
||||
submitTask() {
|
||||
submit(this.missionNo, 2).then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.status = null;
|
||||
this.loading = false
|
||||
}, error => {
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
// 步骤
|
||||
goSign(active) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/signContract?active=${active}`
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
close() {
|
||||
this.maskShow = false
|
||||
@@ -552,4 +495,23 @@ export default {
|
||||
word-break: break-all;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.contactWrapper {
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 5px;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -117,13 +117,11 @@
|
||||
</view>
|
||||
</uniMask>
|
||||
<u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp">
|
||||
<view style="min-height: 200rpx;padding: 20rpx 40rpx;">
|
||||
<!-- <view style="font-size: 28rpx;font-weight: bold;">重要提示:</view>
|
||||
<view style="font-size: 24rpx;color:#707070;margin-top:10rpx;">为保障个人基本劳动权益,建议通过平台用工的形式就业</view> -->
|
||||
<view v-for="(item, index) in info.applyList" :key="index"
|
||||
style="text-align: center;font-size:28rpx;margin-top: 30rpx;"> {{ item.realName }} : {{
|
||||
item.telphone }} 申请时间: {{
|
||||
item.applyTime }}</view>
|
||||
<view style="min-height: 100rpx;padding: 60rpx 40rpx;">
|
||||
<view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index">
|
||||
<view>{{ item.realName }} : {{ item.telphone }}</view>
|
||||
<view class="applyTime">申请时间:{{ item.applyTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
@@ -149,7 +147,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { missionDetail, submit, getCollectState, updateCollectStatus, workDetail } from '@/api/mission.js';
|
||||
import { recruit_missionDetail } from '@/api/mission.js';
|
||||
import { GoLogin } from '@/untils/AxiosUtils.js';
|
||||
import { setRead } from '@/api/news.js';
|
||||
import { checkPass } from '@/api/auth.js';
|
||||
@@ -218,32 +216,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
dateFormat,
|
||||
collect() {
|
||||
// console.log('收藏,取消收藏')
|
||||
const status = this.collectStatus == 0 ? 1 : 0;
|
||||
updateCollectStatus(this.info.id, status, 1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.getCollectStatus()
|
||||
}
|
||||
})
|
||||
},
|
||||
callPhone() {
|
||||
this.showPopUp = true;
|
||||
},
|
||||
closePopUp() {
|
||||
this.showPopUp = false;
|
||||
},
|
||||
// 获取收藏状态
|
||||
getCollectStatus() {
|
||||
getCollectState(this.info.id, 1).then(res => {
|
||||
// 0 未收藏,1 已收藏
|
||||
// console.log(res)
|
||||
this.collectStatus = res.data.data;
|
||||
})
|
||||
},
|
||||
getData: function () {
|
||||
const self = this;
|
||||
workDetail(self.workId).then(res => {
|
||||
recruit_missionDetail(self.workId, self.type).then(res => {
|
||||
self.info = res.data.data;
|
||||
self.status = res.data.data.status;
|
||||
self.missionNo = res.data.data.missionNo;
|
||||
@@ -252,68 +233,14 @@ export default {
|
||||
self.covers[0].latitude = self.info.lat;
|
||||
self.covers[0].longitude = self.info.lon;
|
||||
self.showDetail = true;
|
||||
self.getCollectStatus();
|
||||
if (self.type === 1) {
|
||||
// 设置已读
|
||||
setRead(self.id).then(res => {
|
||||
self.$store.commit("SET_READ");
|
||||
})
|
||||
}
|
||||
}, error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
submit: function () {
|
||||
if (!this.$store.state.user.token) {
|
||||
GoLogin()
|
||||
return
|
||||
}
|
||||
if (this.loading) return
|
||||
const auth = this.auth
|
||||
const contractOn = this.info.contractOn
|
||||
const sealOk = this.autograph && this.autograph.data && this.autograph.data.signSrcUrl
|
||||
// if (sealOk) {
|
||||
// console.log('直接抢任务')
|
||||
// this.submitTask()
|
||||
// } else
|
||||
// if (!auth.realNameState || !auth.laborState || !auth.insureState) {
|
||||
// this.goSign(0)
|
||||
// } else if (!auth.bankCardState){
|
||||
// this.goSign(1)
|
||||
// } else
|
||||
if (contractOn && !sealOk) {
|
||||
this.goSign(2)
|
||||
} else if (sealOk && contractOn) {
|
||||
this.nextBtn = true
|
||||
this.lookMask()
|
||||
} else {
|
||||
this.submitTask()
|
||||
}
|
||||
},
|
||||
// 查看合同
|
||||
lookMask() {
|
||||
this.maskShow = true
|
||||
},
|
||||
// 岗位申请
|
||||
submitTask() {
|
||||
submit(this.missionNo, 1).then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.status = null;
|
||||
this.loading = false
|
||||
}, error => {
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
// 步骤
|
||||
goSign(active) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/signContract?active=${active}`
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
close() {
|
||||
this.maskShow = false
|
||||
@@ -560,4 +487,23 @@ export default {
|
||||
word-break: break-all;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.contactWrapper {
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 5px;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,6 @@ const getters = {
|
||||
userChecked:state=>state.user.userChecked,
|
||||
area: state => state.area,
|
||||
news: state=> state.news,
|
||||
news_recruit: state=> state.news_recruit,
|
||||
auth: state => state.auth,
|
||||
authPass: (state,getters) => getters.auth.laborState && getters.auth.realNameState && getters.auth.bankCardState && getters.auth.insureState,
|
||||
authInfo: state => state.auth.authInfo,
|
||||
|
||||
@@ -6,7 +6,6 @@ import user from './models/user.js'
|
||||
import area from './models/area.js'
|
||||
import auth from './models/auth.js'
|
||||
import news from './models/news.js'
|
||||
import news_recruit from './models/news_recruit.js'
|
||||
import vip from './models/vip.js'
|
||||
import face from './models/face.js'
|
||||
import authentication from './models/authentication.js'
|
||||
@@ -18,7 +17,6 @@ const store = new Vuex.Store({
|
||||
area,
|
||||
auth,
|
||||
news,
|
||||
news_recruit,
|
||||
vip,
|
||||
face,
|
||||
authentication
|
||||
|
||||
@@ -1,338 +0,0 @@
|
||||
import {
|
||||
inviteCount,
|
||||
inviteList,
|
||||
inviteRead,
|
||||
inviteRemove,
|
||||
noticeCount,
|
||||
noticeList,
|
||||
noticeRead,
|
||||
noticeRemove,
|
||||
} from "@/api/news.js";
|
||||
import website from "@/config/website.js";
|
||||
const size = 20;
|
||||
const handler = {
|
||||
0: {
|
||||
count: noticeCount,
|
||||
getList: noticeList,
|
||||
read: noticeRead,
|
||||
remove: noticeRemove,
|
||||
},
|
||||
1: {
|
||||
count: inviteCount,
|
||||
getList: inviteList,
|
||||
read: inviteRead,
|
||||
remove: inviteRemove,
|
||||
},
|
||||
};
|
||||
|
||||
function getCount(data) {
|
||||
let sum = 0;
|
||||
for (let key in data) {
|
||||
sum += data[key];
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
let refreshTimer = null;
|
||||
|
||||
function startRefreshToken(dispatch) {
|
||||
refreshTimer = setInterval(() => {
|
||||
dispatch("newsInit");
|
||||
}, website.newsRefreshTime);
|
||||
}
|
||||
|
||||
function stopRefreshToken() {
|
||||
clearInterval(refreshTimer);
|
||||
}
|
||||
|
||||
const news = {
|
||||
state: {
|
||||
count: 0,
|
||||
data: {
|
||||
0: {
|
||||
id: "0",
|
||||
title: "消息通知",
|
||||
icon: "../../../static/img/notice.svg",
|
||||
page: {
|
||||
current: 0,
|
||||
size,
|
||||
total: size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "title",
|
||||
desc: (value) => {
|
||||
if (value.data[0]) return value.data[0][0]["desc"];
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "isRead",
|
||||
listDesc: "desc",
|
||||
},
|
||||
navigateTo(item) {
|
||||
uni.$once("getNewsDetail", (cb) => {
|
||||
cb(item);
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: "/pages/news/newsDetail?type=0",
|
||||
});
|
||||
},
|
||||
},
|
||||
1: {
|
||||
id: "1",
|
||||
title: "任务申请",
|
||||
icon: "../../../static/img/renwu.png",
|
||||
page: {
|
||||
current: 0,
|
||||
size,
|
||||
total: size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "missionTitle",
|
||||
desc: (value) => {
|
||||
if (value.data[0])
|
||||
return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "status",
|
||||
listDesc: "companyName",
|
||||
},
|
||||
navigateTo(item, dispatch) {
|
||||
dispatch("readNew", {
|
||||
key: "1",
|
||||
id: item.id,
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||
item.missionNo
|
||||
)}&id=${encodeURIComponent(item.id)}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
2: {
|
||||
id: "1",
|
||||
title: "岗位申请",
|
||||
icon: "../../../static/img/job_recruit.svg",
|
||||
page: {
|
||||
current: 0,
|
||||
size,
|
||||
total: size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "missionTitle",
|
||||
desc: (value) => {
|
||||
if (value.data[0])
|
||||
return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "status",
|
||||
listDesc: "companyName",
|
||||
},
|
||||
navigateTo(item, dispatch) {
|
||||
dispatch("readNew", {
|
||||
key: "1",
|
||||
id: item.id,
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||
item.missionNo
|
||||
)}&id=${encodeURIComponent(item.id)}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
// "3": {
|
||||
// id: "1",
|
||||
// title: "技能推送",
|
||||
// icon: "../../../static/img/jineng.svg",
|
||||
// page: {
|
||||
// current: 0,
|
||||
// size,
|
||||
// total: size
|
||||
// },
|
||||
// data: [],
|
||||
// prop: {
|
||||
// title: 'missionTitle',
|
||||
// desc: (value) => {
|
||||
// if (value.data[0])
|
||||
// return `您收到${value.data[0][0]['companyName']}的任务`
|
||||
// },
|
||||
// time: 'createTime',
|
||||
// isRead: 'status',
|
||||
// listDesc: 'companyName',
|
||||
// },
|
||||
// navigateTo(item, dispatch) {
|
||||
// dispatch('readNew', {
|
||||
// key: '1',
|
||||
// id: item.id
|
||||
// })
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}`
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
4: {
|
||||
id: "1",
|
||||
title: "个人户申请",
|
||||
icon: "../../../static/img/own_recruit.svg",
|
||||
page: {
|
||||
current: 0,
|
||||
size,
|
||||
total: size,
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: "missionTitle",
|
||||
desc: (value) => {
|
||||
if (value.data[0])
|
||||
return `您收到${value.data[0][0]["companyName"]}的任务`;
|
||||
},
|
||||
time: "createTime",
|
||||
isRead: "status",
|
||||
listDesc: "companyName",
|
||||
},
|
||||
navigateTo(item, dispatch) {
|
||||
dispatch("readNew", {
|
||||
key: "1",
|
||||
id: item.id,
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(
|
||||
item.missionNo
|
||||
)}&id=${encodeURIComponent(item.id)}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
unread: {
|
||||
0: 0,
|
||||
1: 0,
|
||||
},
|
||||
allUnread: 0,
|
||||
dic: {},
|
||||
},
|
||||
actions: {
|
||||
newsInit({ dispatch }) {
|
||||
const ps = [];
|
||||
ps.push(dispatch("getUnreadNum"));
|
||||
|
||||
for (let key in handler) {
|
||||
ps.push(dispatch("newsReload", key));
|
||||
}
|
||||
return Promise.all(ps);
|
||||
},
|
||||
newsReload({ dispatch, commit }, id) {
|
||||
commit("CLEAR_NEWS_DATA", id);
|
||||
return dispatch("newsGetNextPage", id);
|
||||
},
|
||||
getUnreadNum({ commit }) {
|
||||
for (let key in handler) {
|
||||
handler[key].count().then((result) => {
|
||||
commit("SET_UNREADNUM", {
|
||||
id: key,
|
||||
count: result,
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
newsGetNextPage({ state, commit }, id) {
|
||||
const item = state.data[id];
|
||||
const page = item.page;
|
||||
const current = page.current + 1;
|
||||
return new Promise((resolve, reject) => {
|
||||
if (parseInt(page.total / page.size) + 1 < current) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
handler[id]
|
||||
.getList(current, page.size)
|
||||
.then((res) => {
|
||||
const data = res.data.data;
|
||||
commit("ADD_NEWS_DATA", {
|
||||
id,
|
||||
data: data.records,
|
||||
current,
|
||||
total: data.total,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
},
|
||||
removeNew({ commit }, { id, key, group, index }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
commit("REMOVE_NEWS", {
|
||||
id,
|
||||
key,
|
||||
group,
|
||||
index,
|
||||
});
|
||||
handler[key].remove(id).then(resolve, reject);
|
||||
});
|
||||
},
|
||||
readNew({ commit }, { key, id }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
commit("READ_NEWS", {
|
||||
key,
|
||||
id,
|
||||
});
|
||||
handler[key].read(id).then(resolve, reject);
|
||||
});
|
||||
},
|
||||
endRefreshNewsTimer() {
|
||||
stopRefreshToken();
|
||||
},
|
||||
startRefreshNewsTimer({ state, commit, dispatch }) {
|
||||
console.log('触发1')
|
||||
dispatch("newsInit").then(() => {
|
||||
startRefreshToken(dispatch);
|
||||
});
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
SET_UNREADNUM: (state, { id, count }) => {
|
||||
state.unread[id] = count;
|
||||
state.allUnread = getCount(state.unread);
|
||||
},
|
||||
CLEAR_NEWS_DATA: (state, id) => {
|
||||
state.data[id].page = {
|
||||
current: 0,
|
||||
size,
|
||||
};
|
||||
state.data[id].data = [];
|
||||
},
|
||||
ADD_NEWS_DATA: (state, { id, data, current, total }) => {
|
||||
data.forEach((item) => {
|
||||
state.dic[item.id] = item;
|
||||
});
|
||||
state.data[id].page.total = total;
|
||||
state.data[id].page.current = current;
|
||||
if (data.length > 0) {
|
||||
state.data[id].data.push(data);
|
||||
}
|
||||
},
|
||||
REMOVE_NEWS: (state, { id, key, group, index }) => {
|
||||
const readProp = state.data[key].prop["isRead"];
|
||||
if (state.dic[id][readProp] === 0) {
|
||||
state.unread[key]--;
|
||||
state.allUnread--;
|
||||
}
|
||||
state.dic[id] = undefined;
|
||||
const data = state.data[key].data;
|
||||
data[group].splice(index, 1);
|
||||
if (data[group].length === 0) {
|
||||
data.splice(group, 1);
|
||||
}
|
||||
},
|
||||
READ_NEWS: (state, { key, id }) => {
|
||||
const readProp = state.data[key].prop["isRead"];
|
||||
if (state.dic[id][readProp] === 0) {
|
||||
state.dic[id][readProp] = 1;
|
||||
state.unread[key]--;
|
||||
state.allUnread--;
|
||||
}
|
||||
},
|
||||
},
|
||||
getters: {},
|
||||
};
|
||||
export default news;
|
||||
Reference in New Issue
Block a user