软测宝小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
keysass_app/pages/personal/personal.vue

702 lines
16 KiB

7 months ago
<template>
<view>
<image src="../../static/index/dd.png" class="seticon" @click="goSetUp"></image>
7 months ago
<view class="topbg">
<view style="display: flex;justify-content: space-between;">
<view v-if='phoneuserinfo' style="display: flex;align-items: center">
<view @click="goUserInfo">
<img style='width:55px;height:55px;border-radius: 50%' v-if='avatar'
:src="avatar.indexOf('http')==0?avatar:base+avatar" alt="">
<img v-else style='width:55px;height:55px;border-radius: 50%'
src="../../static/crowd/defaultAva.jpg" alt="">
7 months ago
</view>
<view style='margin-left:10px;'>
<p v-if='phoneuserinfo.companyName' style='margin-bottom:5px;font-size:17px;font-weight:600;'>
{{phoneuserinfo.companyName}}
</p>
7 months ago
<p v-else style='margin-bottom:5px;font-size:17px;font-weight:600;'>{{nickName}}</p>
<view style="display: flex;align-items: center;">
<!-- <p v-if='phoneuserinfo.userName'
style='color:rgb(0 0 0/0.7);margin-right:10px;font-size:15px;'>UID:
{{phoneuserinfo.userName}}
</p> -->
<block v-if="!applyInfo.applyId && !applyInfo.companyApplyId">
<view class="unapply" @click="goApply">
未认证
</view>
</block>
<block v-else-if="applyInfo.applyId">
<view class="userapply" @click="goUserApply">
<image src="../../static/crowd/PAYB.png" mode=""></image>
<view class="userapplytext">
个人
</view>
</view>
</block>
<block v-else-if="applyInfo.companyApplyId">
<view class="companyapply" @click="goCompanyApply">
<image src="../../static/crowd/PAYB.png" mode=""></image>
<view class="companyapplytext">
企业
</view>
</view>
</block>
<!-- <u-tag :text="testerStatustext" plan type="info" shape='circle' color='#FEFEFE'
bg-color='#1A81F9' border-color='transparent' @click="nextcert" /> -->
7 months ago
</view>
</view>
</view>
<view v-else style="display: flex;">
<img style='width:55px;height:55px;' src="http://image.keyitest.cn/static/my/mphoto.png" alt="">
<view style='margin-left:10px;'>
<p style='margin-bottom:10px;font-size:16px;margin-top: 15px;font-weight: 700;'
@click="logingj">点击登录</p>
7 months ago
</view>
</view>
</view>
</view>
<view class="changyong">
<view class="cyboxtop">
<view class="cytitle">
常用功能
</view>
<view class="cycontentgrid">
<view class="cycontentit" @click="servier('myper')">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
钱包
</view>
</view>
<view class="cycontentit" @click="servier('bcrowd')">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
我的众包
</view>
</view>
<view class="cycontentit" @click="servier('myreview')">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
我的评价
</view>
</view>
<view class="cycontentit" @click="servier('message')">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
消息中心
</view>
7 months ago
</view>
</view>
</view>
</view>
<view class="changyong changyong1">
<view class="cyboxtop">
<view class="cytitle">
基本功能
</view>
<view class="cycontentgrid">
<view class="cycontentit" @click="orders">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
我的订单
</view>
7 months ago
</view>
<view class="cycontentit" @click="servier('peixunban')" v-if="signuplistLength != 0">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
报名管理
</view>
7 months ago
</view>
<view v-if="applyInfo.companyApplyId" class="cycontentit cycontentitcompany"
@click="servier('companynotes')">
<view class="cycontentitcompanyws" v-if="applyInfo.companyDesc && applyInfo.companyDesc == '无'">
待完善
</view>
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
企业简介
</view>
</view>
<view v-else class="cycontentit" @click="servier('notes')">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
个人简历
</view>
7 months ago
</view>
<view class="cycontentit" @click="servier('usepeople')" v-if="useListLength != 0">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
用人记录
</view>
7 months ago
</view>
</view>
</view>
</view>
7 months ago
<view style="height:15px"> </view>
<u-toast ref="uToast" />
<u-modal title='温馨提示' v-model="tokenshow" content="您还没有登录" confirm-text='现在就去' cancel-text='稍等一下'
show-cancel-button='true' cancel-color='#1578ED' confirm-color='#1578ED' @confirm="lkconfirm"
@cancel='tokenshow=false'></u-modal>
7 months ago
</view>
</template>
<script>
import comstemutil from '../../utils/comstemutil'
export default {
data() {
return {
wxUserInfo: null,
grantType: 'phone',
7 months ago
canIUseGetUserProfile: false,
phoneuserinfo: null,
tokenshow: false,
testerStatustext: '',
avatar: '',
nickName: '',
base: this.http.baseUrl,
applyInfo: {}, //用户认证信息
signuplistLength: 0, //培训班
useListLength: 0, //用人需求
7 months ago
}
},
onShow() {
let Token = uni.getStorageSync('accessToken');
if (Token) {
this.phoneuserinfo = uni.getStorageSync('wxUserInfo');
this.avatar = uni.getStorageSync('avatar');
this.nickName = uni.getStorageSync('nickName');
this.http.quickGet(`/tester/cert/apply/${this.phoneuserinfo.userId}`, true).then(res => {
console.log('实名认证信息---', res)
if (res.data.code == 200) {
this.applyInfo = res.data.data
if (res.data.data.companyStatus == 1 && this.phoneuserinfo.companyStatus != 2) {
this.phoneuserinfo.companyStatus = 2
uni.setStorageSync('wxUserInfo', this.phoneuserinfo)
}
} else {
this.testerStatustext = '未认证'
}
})
this.getNum()
} else {
this.phoneuserinfo = null
this.signuplistLength = 0
this.useListLength = 0
7 months ago
}
},
onLoad() {},
7 months ago
methods: {
// 培训班
async getNum() {
this.http.quickGet(`/train/myTrainingList`, true).then(res => {
this.signuplistLength = res.data.rows.length
})
const id = uni.getStorageSync('wxUserInfo').userId
const {
data
} = await this.http.quickGet(`/labor/my/demand/${id}`, true)
this.useListLength = data.rows.length
},
// 去认证类型页面
goApply() {
uni.navigateTo({
url: '/pages/personal/setup/applyType'
})
},
goUserApply() {
uni.navigateTo({
url: '/pages/personal/setup/certification'
})
},
goCompanyApply() {
uni.navigateTo({
url: '/pages/personal/setup/companyApply'
})
},
// 设置页面
goSetUp() {
uni.navigateTo({
url: '/pages/personal/setup/index'
})
},
// 用户信息
7 months ago
goUserInfo() {
uni.navigateTo({
url: '/pages/personal/setup/Information'
})
},
nextcert() {
if (this.testerStatustext == '未认证') {
7 months ago
uni.navigateTo({
url: '/pages/personal/setup/certification'
})
}
},
lkconfirm() {
7 months ago
uni.navigateTo({
url: '/pages/personal/login'
})
},
logingj() {
7 months ago
uni.navigateTo({
url: '/pages/personal/login'
7 months ago
})
},
details(type, id) {
if (type == 'tool') {
7 months ago
uni.navigateTo({
url: `../index/tooldetails?id=${id}`
})
} else {
7 months ago
uni.navigateTo({
url: './crowdsourcingdetails'
})
}
},
//工具加入购物车
addcart(id) {
7 months ago
let accessToken = uni.getStorageSync('accessToken');
if (!accessToken) {
this.tokenshow = true
} else {
7 months ago
//
this.http.quickGet(`/my/addShoppingCart/${id}/1`, true).then(response => {
if (response.data.code == 200) {
7 months ago
console.log('111')
this.$refs.uToast.show({
title: '添加购物车成功',
type: 'success',
duration: 1000,
isTab: true,
url: '/pages/shoppingtrolley/shoppingtrolley'
})
}
})
7 months ago
}
7 months ago
},
orders() {
7 months ago
let accessToken = uni.getStorageSync('accessToken');
if (!accessToken) {
this.tokenshow = true
} else {
7 months ago
uni.navigateTo({
url: './ordernumber/ordernumber?current=0'
7 months ago
})
}
},
changeOrderUrl(url) {
7 months ago
let accessToken = uni.getStorageSync('accessToken');
if (!accessToken) {
this.tokenshow = true
} else {
7 months ago
uni.navigateTo({
url: url
7 months ago
})
}
},
// 我的服务跳转页面
servier(type) {
if (this.phoneuserinfo) {
if (type == 'message') {
7 months ago
uni.navigateTo({
url: '/pages/message/message'
7 months ago
})
} else if (type == 'signup') {
7 months ago
uni.navigateTo({
url: '/pages/personal/mysignup/notice'
7 months ago
})
} else if (type == 'bcrowd') {
7 months ago
uni.navigateTo({
url: '/pages/personal/mycrowdtest/mycrowdtest'
7 months ago
})
} else if (type == 'authentication') {
7 months ago
uni.navigateTo({
url: '/pages/personal/setup/certification'
7 months ago
})
} else if (type == 'companynotes') {
uni.navigateTo({
url: '/pages/personal/setup/companyMsg'
})
} else if (type == 'notes') {
7 months ago
uni.navigateTo({
url: '/pages/personal/personalresume/personalresume'
7 months ago
})
} else if (type == 'myper') {
7 months ago
uni.navigateTo({
url: '/pages/personal/mytestkit/mytestkit'
7 months ago
})
} else if (type == 'setmy') {
7 months ago
uni.navigateTo({
url: '/pages/personal/setup/index'
7 months ago
})
} else if (type == 'pcweb') {
7 months ago
uni.navigateTo({
url: '/pages/personal/setup/pcweb'
7 months ago
})
} else if (type == 'peixunban') {
7 months ago
uni.navigateTo({
url: '/pages/personal/setup/peixunban'
7 months ago
})
} else if (type == 'usepeople') {
7 months ago
uni.navigateTo({
url: '/pages/personal/setup/usepeople'
7 months ago
})
} else if (type == 'myreview') {
7 months ago
uni.navigateTo({
url: '/pages/personal/setup/myreview'
7 months ago
})
}
} else {
this.tokenshow = true
7 months ago
}
}
}
}
</script>
<style lang="scss">
// 没有认证
.unapply {
width: 86rpx;
height: 32rpx;
line-height: 32rpx;
background: linear-gradient(90deg, #99A4B3, #77818D);
border-radius: 16rpx;
text-align: center;
font-weight: 500;
font-size: 22rpx;
color: #FEFEFE;
}
.userapply {
display: flex;
align-items: center;
image {
width: 27rpx;
height: 27rpx;
margin-right: 10rpx;
}
.userapplytext {
width: 86rpx;
height: 32rpx;
background: linear-gradient(90deg, #5EA6FD, #1A81F9);
border-radius: 16rpx;
line-height: 32rpx;
text-align: center;
font-weight: 500;
font-size: 22rpx;
color: #FEFEFE;
}
}
.companyapply {
display: flex;
align-items: center;
image {
width: 27rpx;
height: 27rpx;
margin-right: 10rpx;
}
.companyapplytext {
width: 86rpx;
height: 32rpx;
background: linear-gradient(90deg, #F9BD55, #F49C45);
border-radius: 16rpx;
line-height: 32rpx;
text-align: center;
font-weight: 500;
font-size: 22rpx;
color: #FEFEFE;
}
}
.seticon {
position: fixed;
top: 93rpx;
right: 40rpx;
width: 35rpx;
height: 35rpx;
7 months ago
}
.changyong {
width: 700rpx;
height: 230rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 18rpx 0rpx rgba(30, 66, 111, 0.1);
border-radius: 10rpx;
padding: 0 25rpx;
box-sizing: border-box;
margin: -120rpx auto 0 auto;
.cyboxtop {
display: flex;
flex-direction: column;
}
.cytitle {
font-weight: bold;
font-size: 30rpx;
color: #000000;
padding: 30rpx 0 10rpx 0;
}
.cycontentgrid {
padding: 25rpx 0;
box-sizing: border-box;
flex: 1;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
.cycontentitcompany {
position: relative;
.cycontentitcompanyws {
position: absolute;
right: -20rpx;
top: -20rpx;
width: 80rpx;
height: 30rpx;
border-radius: 15rpx;
border: 1px solid #F49D46;
font-weight: 500;
font-size: 20rpx;
color: #F49F46;
line-height: 30rpx;
text-align: center;
}
}
.cycontentit {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.cycontentitimg {
width: 40rpx;
height: 40rpx;
margin-bottom: 10rpx;
}
.cycontentittext {
font-weight: 500;
font-size: 28rpx;
color: #4D4D4D;
}
}
}
}
.changyong1 {
margin: 40rpx auto 0 auto;
}
.topbg {
width: 100vw;
height: 45vw;
background-size: 100% 45vw;
background-image: url('http://image.keyitest.cn/static/my/mpersonbanner.png');
background-repeat: no-repeat;
padding: 30px 0vw 20px 5vw;
}
.peoinfo {
height: 38px;
width: 110px;
7 months ago
line-height: 38px;
background: rgba(255, 241, 228, 0.25);
border-radius: 30px 0px 0px 30px;
font-size: 16px;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
.personinfo {
7 months ago
height: 38px;
width: 110px;
line-height: 38px;
font-size: 15px;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
margin-top: 10px;
7 months ago
}
.memeber {
width: 90vw;
height: 16vw;
7 months ago
margin-top: 20px;
background-size: 100% 16vw;
background-image: url('http://image.keyitest.cn/member.png');
background-repeat: no-repeat;
7 months ago
display: flex;
align-items: center;
justify-content: space-around;
7 months ago
color: #FEDD92;
}
.handle {
7 months ago
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 29px 0px rgba(187, 86, 25, 0.17);
border-radius: 5px;
padding: 5px 0 0 0;
7 months ago
}
.handle img {
7 months ago
width: 20px;
height: 20px;
}
.associationddd {
width: 65px;
text-align: center;
margin: 5px 0;
7 months ago
color: #595959;
}
.recomimg {
7 months ago
width: 50vw;
height: 4vw;
7 months ago
display: flex;
margin: 20px auto;
}
.recommend {
7 months ago
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.currekei {
width: 48%;
7 months ago
/* height: 360rpx; */
background: #FFFFFF;
border-radius: 10px;
padding: 10px;
margin-bottom: 20rpx
7 months ago
}
.leop {
font-size: 30rpx;
7 months ago
/* height:40px ; */
font-weight: bold;
color: #1A1A1A;
/* margin: 13rpx 0; */
display: flex;
align-items: center;
justify-content: center;
}
.tabone {
7 months ago
/* width: 98rpx; */
/* height: 33rpx; */
border: 1px solid #2B80FC;
border-radius: 4rpx;
font-size: 20rpx;
font-weight: 500;
color: #2387EE;
text-align: center;
/* line-height: 33rpx; */
padding: 3px 5px;
7 months ago
}
.currekei :nth-child(4) {
7 months ago
color: #FD461A;
font-weight: 800;
font-size: 34rpx;
}
.imgone {
7 months ago
width: 119rpx;
margin: 10px auto;
7 months ago
}
.imgone img {
7 months ago
width: 119rpx;
height: 123rpx;
}
.imgtwo {
7 months ago
width: 32rpx;
height: 32rpx;
7 months ago
}
.perfect {
7 months ago
width: 80%;
height: 50px;
margin: 25px auto;
7 months ago
line-height: 50px;
background: linear-gradient(90deg, #5EA6FD, #1A81F9);
/* box-shadow: -4px 7px 18px 0px rgba(248, 164, 54, 0.33); */
border-radius: 44px;
font-size: 18px;
color: #FFFFFF;
}
7 months ago
/* .u-drawer__scroll-view{
height:0;
} */
.perfectsty {
7 months ago
text-align: center;
border-radius: 22px;
7 months ago
}
.popupu {
overflow-y: scroll;
7 months ago
}
.topbg .u-tag {
border-color: none;
7 months ago
}
.advance {
7 months ago
display: flex;
justify-content: space-between;
margin-top: 15px;
}
.medaget {
7 months ago
border-bottom: 1px solid #99999926;
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 14px;
width: 93%;
7 months ago
}
.advance img {
7 months ago
width: 15px;
height: 15px;
margin-top: 3px;
}
</style>