|
@@ -48,7 +48,7 @@
|
|
<view class="qrCode">
|
|
<view class="qrCode">
|
|
<image :src="shareUrl" style="width: 200px;height: 200px;"></image>
|
|
<image :src="shareUrl" style="width: 200px;height: 200px;"></image>
|
|
</view>
|
|
</view>
|
|
- <!-- <button v-if="shareUrl" class="send-button ss-m-b-30" @tap="handleSaveShareUrl">保存</button> -->
|
|
|
|
|
|
+ <view v-if="shareUrl" class="saveImg" @tap="handleSaveShareUrl">保存图片</view>
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
</view>
|
|
</view>
|
|
@@ -65,7 +65,7 @@ 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'
|
|
|
|
|
|
+import { base64src } from '@/utils/base64src.js'
|
|
// 设置自定义tabbar选中值
|
|
// 设置自定义tabbar选中值
|
|
onShow(() => {
|
|
onShow(() => {
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
@@ -134,12 +134,16 @@ const shareUrl = ref()
|
|
// 生成分享二维码
|
|
// 生成分享二维码
|
|
const handleShareCode = async () => {
|
|
const handleShareCode = async () => {
|
|
const userId = useUserStore?.accountInfo?.userId || ''
|
|
const userId = useUserStore?.accountInfo?.userId || ''
|
|
|
|
+ console.log(1, 'userId', userId)
|
|
if (!userId) {
|
|
if (!userId) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '请先登录',
|
|
title: '请先登录',
|
|
icon: 'none'
|
|
icon: 'none'
|
|
})
|
|
})
|
|
|
|
+ showAuthModal()
|
|
|
|
+ return
|
|
}
|
|
}
|
|
|
|
+ // if (!getAccessToken())
|
|
const query = {
|
|
const query = {
|
|
scene: 'shareId=' + userId,
|
|
scene: 'shareId=' + userId,
|
|
path: 'pages/login/index',
|
|
path: 'pages/login/index',
|
|
@@ -155,7 +159,7 @@ const handleShareCode = async () => {
|
|
|
|
|
|
// 保存到本地
|
|
// 保存到本地
|
|
const handleSaveShareUrl = async () => {
|
|
const handleSaveShareUrl = async () => {
|
|
- const convertData = await base64src(shareUrl.value, '我的分享码')
|
|
|
|
|
|
+ base64src(shareUrl.value, '我的分享码')
|
|
}
|
|
}
|
|
|
|
|
|
// 登录
|
|
// 登录
|
|
@@ -223,10 +227,7 @@ const handleLogoutConfirm = () => {
|
|
margin: 0 0 20rpx 30rpx;
|
|
margin: 0 0 20rpx 30rpx;
|
|
}
|
|
}
|
|
.shareQrCodePopupContent {
|
|
.shareQrCodePopupContent {
|
|
- // width: 80vw;
|
|
|
|
- // display: flex;
|
|
|
|
- // flex-direction: column;
|
|
|
|
- margin: 30rpx;
|
|
|
|
|
|
+ width: 80vw;
|
|
padding: 50rpx;
|
|
padding: 50rpx;
|
|
text-align: center;
|
|
text-align: center;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
@@ -236,5 +237,10 @@ const handleLogoutConfirm = () => {
|
|
.qrCode {
|
|
.qrCode {
|
|
margin-left: 4px;
|
|
margin-left: 4px;
|
|
}
|
|
}
|
|
|
|
+ .saveImg {
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ color: #00897B;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|