|
@@ -47,7 +47,9 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="px-5 py-3 d-flex justify-space-evenly align-center mt-10 radius" style="background-color: #e3f2f0">
|
|
<div class="px-5 py-3 d-flex justify-space-evenly align-center mt-10 radius" style="background-color: #e3f2f0">
|
|
- <QrCode :text="shareUrlTxt" :width="120" />
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <img :src="url" width="150" height="150">
|
|
|
|
+ </div>
|
|
<div style="color: #333;" class="text-center">
|
|
<div style="color: #333;" class="text-center">
|
|
长 按 识 别 二 维 码
|
|
长 按 识 别 二 维 码
|
|
<div style="color: #6A6A6A">了 解 更 多 职 位 信 息</div>
|
|
<div style="color: #6A6A6A">了 解 更 多 职 位 信 息</div>
|
|
@@ -65,6 +67,8 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({name: 'recruit-personal-shareJob-index'})
|
|
defineOptions({name: 'recruit-personal-shareJob-index'})
|
|
|
|
+import { ref } from 'vue'
|
|
|
|
+import { getJobAdvertisedShareQrcode, getJobAdvertisedShare } from '@/api/position'
|
|
|
|
|
|
// 职位详情
|
|
// 职位详情
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -74,12 +78,23 @@ const props = defineProps({
|
|
})
|
|
})
|
|
|
|
|
|
const userInfo = localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo')) : {}
|
|
const userInfo = localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo')) : {}
|
|
-const shareUrlTxt = import.meta.env.VITE_ACCESS_BASE_URL + '/shareJob?' + new URLSearchParams({
|
|
|
|
- jobId: props.id,
|
|
|
|
- sharedById: userInfo?.id,
|
|
|
|
-}).toString()
|
|
|
|
-
|
|
|
|
-console.log('职位分享链接', shareUrlTxt)
|
|
|
|
|
|
+const url = ref('')
|
|
|
|
+// 获取二维码
|
|
|
|
+const getQrCode = async () => {
|
|
|
|
+ // 先将需要的参数传递给后端,后端返回一个id,再根据id获取二维码,小程序端根据scene中的id获取分享的职位id与推荐人id
|
|
|
|
+ const result = await getJobAdvertisedShare({ jobId: props.id, sharedById: userInfo?.id })
|
|
|
|
+ const query = {
|
|
|
|
+ scene: 'id=' + result,
|
|
|
|
+ path: 'pagesB/positionDetail/index',
|
|
|
|
+ width: 200,
|
|
|
|
+ autoColor: false,
|
|
|
|
+ checkPath: true,
|
|
|
|
+ hyaline: true
|
|
|
|
+ }
|
|
|
|
+ const data = await getJobAdvertisedShareQrcode(query)
|
|
|
|
+ url.value = 'data:image/png;base64,' + data
|
|
|
|
+}
|
|
|
|
+getQrCode()
|
|
|
|
|
|
const desc = [
|
|
const desc = [
|
|
{ value: 'areaName' },
|
|
{ value: 'areaName' },
|