|
@@ -62,6 +62,7 @@ import { useRouter } from 'vue-router'
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
import { prologue, defaultText } from '@/hooks/web/useIM'
|
|
import { prologue, defaultText } from '@/hooks/web/useIM'
|
|
import loginPage from '@/views/common/loginDialog.vue'
|
|
import loginPage from '@/views/common/loginDialog.vue'
|
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
|
|
|
const emits = defineEmits(['refresh'])
|
|
const emits = defineEmits(['refresh'])
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
@@ -76,14 +77,6 @@ const props = defineProps({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
|
-const showLogin = ref(false)
|
|
|
|
-// 打开快速登录
|
|
|
|
-const quickLogonOpen = () => {
|
|
|
|
- Snackbar.warning('您还未登录,请先登录后再试')
|
|
|
|
- showLogin.value = true
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
|
|
|
const desc = ['industryName', 'financingName', 'scaleName']
|
|
const desc = ['industryName', 'financingName', 'scaleName']
|
|
@@ -108,7 +101,14 @@ const handleToEnterprise = (item) => {
|
|
|
|
|
|
// 立即沟通
|
|
// 立即沟通
|
|
const toDetails = async (info) => {
|
|
const toDetails = async (info) => {
|
|
- if (!getToken()) return quickLogonOpen()
|
|
|
|
|
|
+ if (!getToken()) {
|
|
|
|
+ showLogin.value = true // 打开快速登录弹窗
|
|
|
|
+ Snackbar.warning('您还未登录,请先登录后再试')
|
|
|
|
+ //
|
|
|
|
+ nextFunc.value = null // 登录成功后要执行的操作
|
|
|
|
+ loginCloseWarningWord = '您已取消登录,无法对职位进行沟通' // 取消登录提示语
|
|
|
|
+ return
|
|
|
|
+ }
|
|
const userId = info.contact.userId
|
|
const userId = info.contact.userId
|
|
const enterpriseId = info.contact.enterpriseId
|
|
const enterpriseId = info.contact.enterpriseId
|
|
const textObj = {
|
|
const textObj = {
|
|
@@ -123,6 +123,21 @@ const toDetails = async (info) => {
|
|
|
|
|
|
router.push(url)
|
|
router.push(url)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const showLogin = ref(false)
|
|
|
|
+const nextFunc = ref(null)
|
|
|
|
+let loginCloseWarningWord = ''
|
|
|
|
+// 快速登录
|
|
|
|
+const loginSuccess = () => {
|
|
|
|
+ showLogin.value = false
|
|
|
|
+ Snackbar.success('登录成功')
|
|
|
|
+ if (nextFunc.value) nextFunc.value()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const loginClose = () => {
|
|
|
|
+ showLogin.value = false
|
|
|
|
+ Snackbar.warning(loginCloseWarningWord)
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|