|
@@ -1,8 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<layout-page>
|
|
<layout-page>
|
|
<view class="pb-120">
|
|
<view class="pb-120">
|
|
- <view class="text-center" @tap="handleTap">
|
|
|
|
|
|
+ <view class="text-center" :class="vip ? 'vipBox' : 'avatarBox'" @tap="handleTap">
|
|
<img :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)" alt="" class="img-box">
|
|
<img :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)" alt="" class="img-box">
|
|
|
|
+ <uni-icons class="vipIcon" type="vip-filled" size="45" color="#ffbc00"></uni-icons>
|
|
<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 v-else class="font-weight-bold font-size-20">{{ baseInfo?.name || userInfo?.phone }}</view>
|
|
</view>
|
|
</view>
|
|
@@ -70,7 +71,6 @@ import layoutPage from '@/layout'
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
import { getJobAdvertisedShareQrcode } from '@/api/user'
|
|
import { getJobAdvertisedShareQrcode } from '@/api/user'
|
|
-// import { base64src } from '@/utils/base64src.js'
|
|
|
|
// 设置自定义tabbar选中值
|
|
// 设置自定义tabbar选中值
|
|
onShow(() => {
|
|
onShow(() => {
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
@@ -83,6 +83,7 @@ onShow(() => {
|
|
const useUserStore = userStore()
|
|
const useUserStore = userStore()
|
|
const baseInfo = computed(() => useUserStore?.baseInfo)
|
|
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 popup = ref()
|
|
const popup = ref()
|
|
const shareQrCodePopup = ref()
|
|
const shareQrCodePopup = ref()
|
|
const itemList = [
|
|
const itemList = [
|
|
@@ -163,34 +164,31 @@ const handleShareCode = async () => {
|
|
}
|
|
}
|
|
|
|
|
|
// 保存到本地
|
|
// 保存到本地
|
|
-const handleSaveShareUrl = async () => {
|
|
|
|
- // base64src(shareUrl.value, '我的分享码')
|
|
|
|
- const fsm = wx.getFileSystemManager()
|
|
|
|
- const data = shareUrl.value
|
|
|
|
- // console.log('data:', data)
|
|
|
|
- if (!data) return
|
|
|
|
- fsm.writeFile({
|
|
|
|
- filePath:wx.env.USER_DATA_PATH+'/MySharingCode.png',
|
|
|
|
- data: data.slice(22),
|
|
|
|
- encoding:'base64',
|
|
|
|
- success: res => {
|
|
|
|
- wx.saveImageToPhotosAlbum({
|
|
|
|
- filePath: wx.env.USER_DATA_PATH + '/MySharingCode.png',
|
|
|
|
- success: function (res) {
|
|
|
|
- wx.showToast({
|
|
|
|
- title: '保存成功',
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- fail: function (err) {
|
|
|
|
- console.log(err)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // console.log(res)
|
|
|
|
- }, fail: err => {
|
|
|
|
- console.log(err)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
|
|
+// const handleSaveShareUrl = async () => {
|
|
|
|
+// const fsm = wx.getFileSystemManager()
|
|
|
|
+// const data = shareUrl.value
|
|
|
|
+// if (!data) return
|
|
|
|
+// fsm.writeFile({
|
|
|
|
+// filePath:wx.env.USER_DATA_PATH+'/MySharingCode.png',
|
|
|
|
+// data: data.slice(22),
|
|
|
|
+// encoding:'base64',
|
|
|
|
+// success: res => {
|
|
|
|
+// wx.saveImageToPhotosAlbum({
|
|
|
|
+// filePath: wx.env.USER_DATA_PATH + '/MySharingCode.png',
|
|
|
|
+// success: function (res) {
|
|
|
|
+// wx.showToast({
|
|
|
|
+// title: '保存成功',
|
|
|
|
+// })
|
|
|
|
+// },
|
|
|
|
+// fail: function (err) {
|
|
|
|
+// console.log(err)
|
|
|
|
+// }
|
|
|
|
+// })
|
|
|
|
+// }, fail: err => {
|
|
|
|
+// console.log(err)
|
|
|
|
+// }
|
|
|
|
+// })
|
|
|
|
+// }
|
|
|
|
|
|
// 登录
|
|
// 登录
|
|
const handleTap = () => {
|
|
const handleTap = () => {
|
|
@@ -225,6 +223,18 @@ const handleLogoutConfirm = () => {
|
|
border: 2rpx solid #ccc;
|
|
border: 2rpx solid #ccc;
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
|
|
+.vipBox {
|
|
|
|
+ color: #a18a0f;
|
|
|
|
+ position: relative;
|
|
|
|
+ .img-box {
|
|
|
|
+ border: 1px solid gold;
|
|
|
|
+ }
|
|
|
|
+ .vipIcon {
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 24px;
|
|
|
|
+ left: 50%;
|
|
|
|
+ }
|
|
|
|
+}
|
|
:deep(.uni-list-item) {
|
|
:deep(.uni-list-item) {
|
|
height: 120rpx !important;
|
|
height: 120rpx !important;
|
|
line-height: 120rpx !important;
|
|
line-height: 120rpx !important;
|