123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <template>
- <view class="main">
- <view class="user" @click="go('info')">
- <image :src="user.avatarUrl ? user.avatarUrl : '../../../static/favicon.png'" class="head"></image>
- <view class="con" v-if="user.id">
- <view class="nickName">微信用户</view>
- <view class="welcome">欢迎使用爱就业咨询服务平台</view>
- </view>
- <view class="con" v-else>
- <view class="nickName">你还没登录</view>
- <view class="welcome">欢迎使用爱就业咨询服务平台</view>
- </view>
- <view class="icon"></view>
- </view>
- <view class="rows">
- <view class="row">
- <view class="out">
- <view class="int">
- <view class="num">12</view>
- <view class="desc">全职投递</view>
- </view>
- </view>
- </view>
- <view class="row">
- <view class="out">
- <view class="int">
- <view class="num">0</view>
- <view class="desc">兼职投递</view>
- </view>
- </view>
- </view>
- <view class="row">
- <view class="out">
- <view class="int">
- <view class="num">0.00</view>
- <view class="desc">账户余额</view>
- </view>
- </view>
- </view>
- </view>
- <!--政务服务-->
- <view class="mtt">政务服务</view>
- <view class="menu">
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #f44336"></view>
- <view class="title">失业登记</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #4581fb"></view>
- <view class="title">就业补贴</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #ff9800"></view>
- <view class="title">培训指导</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #00BCD4"></view>
- <view class="title">法务服务</view>
- </view>
- </view>
- </view>
- </view>
- <view class="mtt">企业服务</view>
- <view class="menu">
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #03A9F4"></view>
- <view class="title">任务列表</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #3f51b5"></view>
- <view class="title">合同列表</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #795548"></view>
- <view class="title">交付进度</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #607d8b"></view>
- <view class="title">邀请列表</view>
- </view>
- </view>
- </view>
- </view>
- <view class="mtt">求职服务</view>
- <view class="menu">
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #3f51b5"></view>
- <view class="title">我的简历</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #4caf50"></view>
- <view class="title">面试邀约</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #607d8b"></view>
- <view class="title">投递历史</view>
- </view>
- </view>
- </view>
- </view>
- <view class="mtt">更多服务</view>
- <view class="menu">
- <view class="cd" @click="go('index')">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #ffc107"></view>
- <view class="title">结算广场</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #2196f3"></view>
- <view class="title">设置</view>
- </view>
- </view>
- </view>
- <view class="cd">
- <view class="out">
- <view class="int">
- <view class="icon" style="background-color: #FF5722"></view>
- <view class="title">分享有利</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- ip: this.http.ip,
- user: {}
- };
- },
- onShow() {
- /* this.user = {
- token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI0M2FmZjFmLWQ1YWMtNDk3Yi1hNDNiLTEwYTRiMmJmYmI4YiJ9.2IEItPPaVUBQw416MK9SA6OM_PE5WgcpvTdVf_-KJ8AQsI1J9PzMlRiA2ZCQT6gdHbY9l9wS1ZxQzdIxTx9PjQ'
- };
- uni.setStorageSync('user', this.user); */
- if (this.hasLogin()) {
- this.getUserInfo();
- }
- },
- methods: {
- getUserInfo() {
- this.http.request({
- url: '/app/user/info',
- success: (res) => {
- this.user = res.data.data;
- }
- });
- },
- go(url) {
- if (this.hasLogin()) {
- if (url == 'index') {
- uni.navigateTo({ url: '/pages/index/index' });
- }
- if (url == 'auth') {
- uni.navigateTo({ url: '/pages/auth/index' });
- }
- if (url == 'company' && this.user.isAuthentication === 1) {
- uni.navigateTo({ url: '/pages/company/index' });
- }
- if (url == 'packages' && this.user.isCompany > 0 && this.user.isContract == 1) {
- uni.switchTab({ url: '/pages/packages/index' });
- }
- if (url == 'contract' && this.user.isContract == 1) {
- this.look();
- }
- if (url == 'info') {
- uni.navigateTo({ url: '/pages/user/info' });
- }
- } else {
- uni.navigateTo({ url: '/pages/user/login' });
- }
- },
- //查看合同
- look() {
- uni.showLoading({ title: '正在打开合同...', mask: true });
- uni.downloadFile({
- url: this.user.isContract == 0 ? this.ip + this.contract.url : this.ip + '/app/contract/look',
- header: { Authorization: this.getUser().token },
- success: (res) => {
- uni.openDocument({
- filePath: res.tempFilePath,
- showMenu: true,
- success: (res) => {
- uni.hideLoading();
- }
- });
- },
- fail: (res) => {
- uni.hideLoading();
- }
- });
- },
- //退出登录
- exit(url) {
- uni.showModal({
- title: '提示',
- content: '确定退出登录?',
- success: (res) => {
- if (res.confirm) {
- this.http.request({
- url: this.http.urls.logout,
- success: (res) => {
- uni.removeStorageSync('user');
- uni.$emit('top');
- uni.switchTab({
- url: '/pages/index/index'
- });
- }
- });
- }
- }
- });
- }
- }
- };
- </script>
- <style lang="scss">
- @import 'index.scss';
- </style>
|