|
@@ -42,6 +42,15 @@
|
|
<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 :src="shareUrl" style="width: 200px;height: 200px;"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- <button v-if="shareUrl" class="send-button ss-m-b-30" @tap="handleSaveShareUrl">保存</button> -->
|
|
|
|
+ </view>
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
</layout-page>
|
|
</layout-page>
|
|
</template>
|
|
</template>
|
|
@@ -55,6 +64,8 @@ import { getAccessToken } from '@/utils/request'
|
|
import layoutPage from '@/layout'
|
|
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 { base64src } from '@/utils/base64src.js'
|
|
// 设置自定义tabbar选中值
|
|
// 设置自定义tabbar选中值
|
|
onShow(() => {
|
|
onShow(() => {
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
@@ -68,12 +79,14 @@ const useUserStore = userStore()
|
|
const baseInfo = computed(() => useUserStore?.baseInfo)
|
|
const baseInfo = computed(() => useUserStore?.baseInfo)
|
|
const userInfo = computed(() => useUserStore?.userInfo)
|
|
const userInfo = computed(() => useUserStore?.userInfo)
|
|
const popup = ref()
|
|
const popup = ref()
|
|
|
|
+const shareQrCodePopup = ref()
|
|
const itemList = [
|
|
const itemList = [
|
|
{ title: "我的关注", path: "/pagesA/collect/index", icon: "list" },
|
|
{ title: "我的关注", path: "/pagesA/collect/index", icon: "list" },
|
|
{ title:'关注我的', path:'/pagesA/seenMe/index', icon:'staff' }
|
|
{ title:'关注我的', path:'/pagesA/seenMe/index', icon:'staff' }
|
|
]
|
|
]
|
|
|
|
|
|
const list = [
|
|
const list = [
|
|
|
|
+ { title: '我的分享码', path: 'shareQrCode' },
|
|
{ title: '在线简历', path: '/pagesA/resumeOnline/index' },
|
|
{ title: '在线简历', path: '/pagesA/resumeOnline/index' },
|
|
{ title: '附件简历', path: '/pagesA/resume/index' },
|
|
{ title: '附件简历', path: '/pagesA/resume/index' },
|
|
{ title: '面试管理', path: '/pagesA/interview/index' },
|
|
{ title: '面试管理', path: '/pagesA/interview/index' },
|
|
@@ -108,11 +121,43 @@ const handleToLink = (item) => {
|
|
showAuthModal()
|
|
showAuthModal()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if (item.path === 'shareQrCode') {
|
|
|
|
+ handleShareCode()
|
|
|
|
+ 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'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ 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 handleSaveShareUrl = async () => {
|
|
|
|
+ const convertData = await base64src(shareUrl.value, '我的分享码')
|
|
|
|
+}
|
|
|
|
+
|
|
// 登录
|
|
// 登录
|
|
const handleTap = () => {
|
|
const handleTap = () => {
|
|
if (!useUserStore.isLogin) {
|
|
if (!useUserStore.isLogin) {
|
|
@@ -177,4 +222,19 @@ const handleLogoutConfirm = () => {
|
|
.parent:first-child{
|
|
.parent:first-child{
|
|
margin: 0 0 20rpx 30rpx;
|
|
margin: 0 0 20rpx 30rpx;
|
|
}
|
|
}
|
|
|
|
+.shareQrCodePopupContent {
|
|
|
|
+ // width: 80vw;
|
|
|
|
+ // display: flex;
|
|
|
|
+ // flex-direction: column;
|
|
|
|
+ margin: 50rpx;
|
|
|
|
+ padding: 50rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ .text {
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
+ .qrCode {
|
|
|
|
+ margin-left: 4px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|