|
@@ -1,26 +1,22 @@
|
|
<template>
|
|
<template>
|
|
<layout-page>
|
|
<layout-page>
|
|
<view class="pb-150">
|
|
<view class="pb-150">
|
|
- <view class="text-center" :class="vip ? 'vipBox' : 'avatarBox'" @tap="handleTap">
|
|
|
|
- <img :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)" alt="" class="img-box">
|
|
|
|
- <image v-if="vip" src="/static/svg/vip.svg" class="vipIcon" @click.stop="handleToLink({path: '/pagesA/vip/index'})"></image>
|
|
|
|
|
|
+ <view class="text-center ss-p-b-30" :class="vip ? 'vipBox' : 'avatarBox'" @tap="handleTap">
|
|
|
|
+ <img :src="getUserAvatar(userInfo?.avatar, userInfo?.sex)" alt="" class="img-box">
|
|
|
|
+ <image v-if="vip" src="/static/svg/vip.svg" class="vipIcon"></image>
|
|
<view v-if="!useUserStore.isLogin" class="font-weight-bold font-size-20">点击登录</view>
|
|
<view v-if="!useUserStore.isLogin" class="font-weight-bold font-size-20">点击登录</view>
|
|
- <view v-else class="font-weight-bold font-size-20">{{ baseInfo?.name || userInfo?.phone }}</view>
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <view style="padding: 40rpx 0 0 0;">
|
|
|
|
- <resume-status></resume-status>
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <view class="d-flex">
|
|
|
|
- <view v-for="(item, index) in itemList" :key="index" @tap="handleToLink(item)" class="parent">
|
|
|
|
- <view class="d-flex justify-space-around align-center">
|
|
|
|
- <uni-icons color="#00B760" :type="item.icon" size="30"/>
|
|
|
|
- <text class="itemText">{{ item.title }}</text>
|
|
|
|
|
|
+ <view v-else>
|
|
|
|
+ <view>
|
|
|
|
+ <span class="font-weight-bold font-size-20">{{ userInfo?.name || userInfo?.phone }}</span>
|
|
|
|
+ <uni-icons @tap="handleEdit('')" class="ss-m-l-10" type="compose" :size="22"></uni-icons>
|
|
|
|
+ </view>
|
|
|
|
+ <view style="color: #0E100F" class="ss-m-t-20">
|
|
|
|
+ <span>{{ formatName(userInfo?.enterpriseAnotherName || userInfo?.enterpriseName) }}</span>
|
|
|
|
+ <uni-icons @tap="handleEdit('')" class="ss-m-l-10" type="compose" :size="22"></uni-icons>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view style="height: 20rpx; background-color: #f8f8fa;"></view>
|
|
<view style="height: 20rpx; background-color: #f8f8fa;"></view>
|
|
|
|
|
|
<view class="card">
|
|
<view class="card">
|
|
@@ -44,21 +40,6 @@
|
|
<uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title="系统提示" content="确认退出账号?" @confirm="handleLogoutConfirm"
|
|
<uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title="系统提示" content="确认退出账号?" @confirm="handleLogoutConfirm"
|
|
@close="handleLogoutClose"></uni-popup-dialog>
|
|
@close="handleLogoutClose"></uni-popup-dialog>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
- <!-- 我的分享码 -->
|
|
|
|
- <uni-popup ref="shareQrCodePopup" type="dialog">
|
|
|
|
- <view class="shareQrCodePopupContent">
|
|
|
|
- <view class="color-primary text">邀请用户注册领50积分</view>
|
|
|
|
- <view class="qrCode">
|
|
|
|
- <image
|
|
|
|
- v-if="!!shareUrl"
|
|
|
|
- :src="shareUrl"
|
|
|
|
- :show-menu-by-longpress="true"
|
|
|
|
- style="width: 200px;height: 200px; padding: 20rpx;"
|
|
|
|
- ></image>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="shareUrl" class="saveImg">长按二维码保存图片</view>
|
|
|
|
- </view>
|
|
|
|
- </uni-popup>
|
|
|
|
|
|
|
|
<uni-popup ref="inputDialog" type="dialog">
|
|
<uni-popup ref="inputDialog" type="dialog">
|
|
<view class="shareQrCodePopupContent">
|
|
<view class="shareQrCodePopupContent">
|
|
@@ -72,14 +53,14 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { ref, computed, watch } from 'vue'
|
|
import { ref, computed, watch } from 'vue'
|
|
-import ResumeStatus from '@/components/ResumeStatus'
|
|
|
|
import { userStore } from '@/store/user'
|
|
import { userStore } from '@/store/user'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
-import { getAccessToken, showNecessaryInfoPopup } from '@/utils/request'
|
|
|
|
|
|
+import { getAccessToken } from '@/utils/request'
|
|
import layoutPage from '@/layout'
|
|
import layoutPage from '@/layout'
|
|
|
|
+import { formatName } from '@/utils/getText'
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
import { onShow, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
|
import { onShow, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
|
-import { getJobAdvertisedShareQrcode } from '@/api/user'
|
|
|
|
|
|
+
|
|
// 设置自定义tabbar选中值
|
|
// 设置自定义tabbar选中值
|
|
onShow(() => {
|
|
onShow(() => {
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
@@ -89,61 +70,27 @@ onShow(() => {
|
|
currentTabBar?.setData({ selected: 3 });
|
|
currentTabBar?.setData({ selected: 3 });
|
|
})
|
|
})
|
|
|
|
|
|
-// showAuthModal('') //测试 selectUserType
|
|
|
|
-
|
|
|
|
const inputDialog = ref()
|
|
const inputDialog = ref()
|
|
const useUserStore = userStore()
|
|
const useUserStore = userStore()
|
|
-const baseInfo = computed(() => useUserStore?.baseInfo)
|
|
|
|
const userInfo = computed(() => useUserStore?.userInfo)
|
|
const userInfo = computed(() => useUserStore?.userInfo)
|
|
|
|
+
|
|
const vip = computed(() => new Date().getTime() < useUserStore?.userInfo?.vipExpireDate)
|
|
const vip = computed(() => new Date().getTime() < useUserStore?.userInfo?.vipExpireDate)
|
|
|
|
|
|
const popup = ref()
|
|
const popup = ref()
|
|
-const shareQrCodePopup = ref()
|
|
|
|
-const itemList = [
|
|
|
|
- { title: "我的关注", path: "/pagesA/collect/index", icon: "list" },
|
|
|
|
- { title:'关注我的', path:'/pagesA/seenMe/index', icon:'staff' }
|
|
|
|
-]
|
|
|
|
|
|
|
|
const defaultList = [
|
|
const defaultList = [
|
|
- { title: '在线简历', path: '/pagesA/resumeOnline/index' },
|
|
|
|
- { title: '附件简历', path: '/pagesA/resume/index' },
|
|
|
|
- { title: '学生专区', path: '/pagesA/student/index', key: 'student', defaultHide: true },
|
|
|
|
- { title: '面试管理', path: '/pagesA/interview/index' },
|
|
|
|
- { title: '会员套餐', path: '/pagesA/vipPackage/index' },
|
|
|
|
- { title: '我的分享码', path: '/pagesB/sharePoster/index' },
|
|
|
|
- { title: '新用户邀请记录', path: '/pagesB/inviteRecord/index' },
|
|
|
|
- { title: '门墩儿商城', appId: 'wx6decdf12f9e7a061' },
|
|
|
|
- { title: '我要招聘', key: 'recruit' },
|
|
|
|
|
|
+ // { title: '在线简历', path: '/pagesA/resumeOnline/index' },
|
|
|
|
+ // { title: '附件简历', path: '/pagesA/resume/index' },
|
|
|
|
+ // { title: '学生专区', path: '/pagesA/student/index', key: 'student', defaultHide: true },
|
|
|
|
+ // { title: '面试管理', path: '/pagesA/interview/index' },
|
|
|
|
+ // { title: '会员套餐', path: '/pagesA/vipPackage/index' },
|
|
|
|
+ { title: '门墩儿商城', showDialog: true }, // wx6decdf12f9e7a061
|
|
{ title: '联系我们', path: '/pagesB/contactUs/index' },
|
|
{ title: '联系我们', path: '/pagesB/contactUs/index' },
|
|
- { title: '协议中心', path: '/pagesB/agreement/index', open: true }
|
|
|
|
|
|
+ { title: '协议中心', path: '/pagesB/agreement/index', open: true },
|
|
|
|
+ { title: '我要求职', appId: 'wx5dd538ccc752b03a' },
|
|
]
|
|
]
|
|
const list = ref(defaultList.filter(e => !e.defaultHide))
|
|
const list = ref(defaultList.filter(e => !e.defaultHide))
|
|
|
|
|
|
-watch(
|
|
|
|
- () => baseInfo.value,
|
|
|
|
- (newVal) => {
|
|
|
|
- if (newVal) {
|
|
|
|
- list.value = defaultList.map(e => { // 不改变原数组,退出登录需要重置菜单
|
|
|
|
- let hide = e.defaultHide
|
|
|
|
- if (e?.key === 'student' && newVal.type === '1') hide = false // 学生信息管理。 type:0是求职者,1是学生
|
|
|
|
- return hide ? null : e
|
|
|
|
- }).filter(Boolean)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- { immediate: true },
|
|
|
|
- // { deep: true }
|
|
|
|
-)
|
|
|
|
-
|
|
|
|
-watch(
|
|
|
|
- () => vip.value,
|
|
|
|
- (newVal) => {
|
|
|
|
- if (newVal) list.value.splice(3, 0, { title: 'vip权益', key: 'vip', path: '/pagesA/vip/index' })
|
|
|
|
- else list.value = list.value.filter(e => !e.key || e.key !== 'vip')
|
|
|
|
- },
|
|
|
|
- { immediate: true },
|
|
|
|
- // { deep: true }
|
|
|
|
-)
|
|
|
|
-
|
|
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
wx.showShareMenu({
|
|
wx.showShareMenu({
|
|
withShareTicket: true,
|
|
withShareTicket: true,
|
|
@@ -165,43 +112,20 @@ onLoad(() => {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
|
|
-const openSubscribe = (path) => {
|
|
|
|
- wx.requestSubscribeMessage({
|
|
|
|
- tmplIds: ['2dByiI4wf6D3ZmxDH1QywH264F3N-9ysnvsS7xQm4PE'],
|
|
|
|
- success:(res)=>{
|
|
|
|
- console.log(res, 'uni.requestSubscribeMessage-res')
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: path
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- fail:(err)=>{
|
|
|
|
- console.log('订阅失败', err)
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: path
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// 列表跳转
|
|
// 列表跳转
|
|
const dialogType = ref('')
|
|
const dialogType = ref('')
|
|
const handleToLink = (item) => {
|
|
const handleToLink = (item) => {
|
|
if (item.open && item.path) return uni.navigateTo({ url: item.path })
|
|
if (item.open && item.path) return uni.navigateTo({ url: item.path })
|
|
if (item.appId) {
|
|
if (item.appId) {
|
|
- // uni.navigateToMiniProgram({
|
|
|
|
- // appId: item.appId,
|
|
|
|
- // })
|
|
|
|
- // return
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: '请前往网页版门墩儿商城',
|
|
|
|
- // icon: 'none'
|
|
|
|
- // })
|
|
|
|
- dialogType.value = 0
|
|
|
|
- inputDialog.value.open()
|
|
|
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
|
+ appId: item.appId,
|
|
|
|
+ })
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- if (item.key === 'recruit') {
|
|
|
|
- dialogType.value = 1
|
|
|
|
|
|
+ if (item?.showDialog) {
|
|
|
|
+ dialogType.value = 0
|
|
inputDialog.value.open()
|
|
inputDialog.value.open()
|
|
|
|
+ return
|
|
}
|
|
}
|
|
if (!item.path) return
|
|
if (!item.path) return
|
|
if (!getAccessToken()) {
|
|
if (!getAccessToken()) {
|
|
@@ -212,59 +136,19 @@ const handleToLink = (item) => {
|
|
showAuthModal()
|
|
showAuthModal()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (showNecessaryInfoPopup()) {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '请先完善基本信息',
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- showAuthModal('necessaryInfo')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (item.path === 'shareQrCode') {
|
|
|
|
- handleShareCode()
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- // 点击在线简历需调起订阅消息
|
|
|
|
- if (item.title === '在线简历'){
|
|
|
|
- openSubscribe(item.path)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: item.path
|
|
url: item.path
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-const shareUrl = ref()
|
|
|
|
-// 生成分享二维码
|
|
|
|
-const handleShareCode = async () => {
|
|
|
|
- const userId = useUserStore?.accountInfo?.userId || ''
|
|
|
|
- if (!userId) {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '请先登录',
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- showAuthModal()
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (showNecessaryInfoPopup()) {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '请先完善基本信息',
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- showAuthModal('necessaryInfo')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- const query = {
|
|
|
|
- scene: 'shareId=' + userId,
|
|
|
|
- path: 'pages/login/index',
|
|
|
|
- width: 200,
|
|
|
|
- autoColor: false,
|
|
|
|
- checkPath: true,
|
|
|
|
- hyaline: true
|
|
|
|
- }
|
|
|
|
- const res = await getJobAdvertisedShareQrcode(query)
|
|
|
|
- shareUrl.value = res?.data ? 'data:image/png;base64,' + res.data : ''
|
|
|
|
- shareQrCodePopup.value.open()
|
|
|
|
|
|
+const handleEdit = (url) => {
|
|
|
|
+ // if (!useUserStore.isLogin) {
|
|
|
|
+ // showAuthModal()
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
// 登录
|
|
// 登录
|
|
@@ -311,7 +195,7 @@ const handleLogoutConfirm = () => {
|
|
position: absolute;
|
|
position: absolute;
|
|
width: 45px;
|
|
width: 45px;
|
|
height: 24px;
|
|
height: 24px;
|
|
- bottom: 34px;
|
|
|
|
|
|
+ top: 60px;
|
|
left: 50%;
|
|
left: 50%;
|
|
}
|
|
}
|
|
}
|
|
}
|