|
@@ -5,6 +5,12 @@
|
|
|
<v-btn icon="mdi-plus" variant="outlined" color="primary" size="small" @click="handleAdd"></v-btn>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="d-flex align-center cursor-pointer color-primary mt-3 font-size-18" @click="handleShareCode">
|
|
|
+ <v-icon class="mr-1">mdi-qrcode</v-icon>我的分享码
|
|
|
+ <span class="text-decoration-underline">(点击生成)</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 个人画像标签编辑 -->
|
|
|
<CtDialog
|
|
|
:visible="visible"
|
|
|
titleClass="text-h6"
|
|
@@ -43,6 +49,22 @@
|
|
|
</div>
|
|
|
</CtDialog>
|
|
|
|
|
|
+ <!-- 分享二维码生成 -->
|
|
|
+ <CtDialog
|
|
|
+ :visible="showShare"
|
|
|
+ titleClass="text-h6"
|
|
|
+ title="我的分享码"
|
|
|
+ :widthType="2"
|
|
|
+ @close="showShare = false; shareUrl = ''"
|
|
|
+ submitText="保存到本地"
|
|
|
+ @submit="handleShareSubmit"
|
|
|
+ >
|
|
|
+ <div class="d-flex align-center justify-center flex-column">
|
|
|
+ <p class="color-primary font-size-18 mb-3">邀请用户注册领50积分</p>
|
|
|
+ <img :src="shareUrl" width="200" height="200">
|
|
|
+ </div>
|
|
|
+ </CtDialog>
|
|
|
+
|
|
|
<Loading :visible="loading"></Loading>
|
|
|
</template>
|
|
|
|
|
@@ -52,9 +74,11 @@ defineOptions({ name: 'person-portrait'})
|
|
|
import { ref } from 'vue'
|
|
|
import { getTagTreeDataApi } from '@/api/enterprise'
|
|
|
import { useUserStore } from '@/store/user'
|
|
|
+import { getJobAdvertisedShareQrcode } from '@/api/position'
|
|
|
import { savePersonPortrait } from '@/api/recruit/personal/resume'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import cloneDeep from 'lodash/cloneDeep'
|
|
|
+import { downloadBase64 } from '@/utils'
|
|
|
|
|
|
const loading = ref(false)
|
|
|
const visible = ref(false)
|
|
@@ -123,6 +147,28 @@ const handleSubmit = async () => {
|
|
|
visible.value = false
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// 生成分享二维码
|
|
|
+const showShare = ref(false)
|
|
|
+const shareUrl = ref(null)
|
|
|
+const handleShareCode = async () => {
|
|
|
+ const query = {
|
|
|
+ scene: 'shareId=' + JSON.parse(localStorage.getItem('accountInfo')).userId,
|
|
|
+ path: 'pages/login/index',
|
|
|
+ width: 200,
|
|
|
+ autoColor: false,
|
|
|
+ checkPath: true,
|
|
|
+ hyaline: true
|
|
|
+ }
|
|
|
+ const data = await getJobAdvertisedShareQrcode(query)
|
|
|
+ shareUrl.value = 'data:image/png;base64,' + data
|
|
|
+ showShare.value = true
|
|
|
+}
|
|
|
+
|
|
|
+// 保存到本地
|
|
|
+const handleShareSubmit = () => {
|
|
|
+ downloadBase64(shareUrl.value, '我的分享码')
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|