|
@@ -10,6 +10,7 @@ import { getAPIDocDetail } from '../../api/modules'
|
|
|
import CollectInfo from '@/components/collect-info/CollectInfo.vue'
|
|
|
import { throttle, forEach, uniqueId } from 'lodash'
|
|
|
import { useRoute } from 'vue-router/composables'
|
|
|
+import { useStore } from '@/store'
|
|
|
|
|
|
const route = useRoute()
|
|
|
const that = getCurrentInstance().proxy
|
|
@@ -610,9 +611,16 @@ function doSelectTab(item) {
|
|
|
scrollToTop(goElement, diff)
|
|
|
}
|
|
|
|
|
|
+const isLogin = computed(() => {
|
|
|
+ return useStore().getters['user/loginFlag']
|
|
|
+})
|
|
|
// 打开留资弹窗
|
|
|
const collectElement = ref(null)
|
|
|
function doCollect() {
|
|
|
+ if (!isLogin.value) {
|
|
|
+ that.$showLoginDialog(false, 'reload')
|
|
|
+ return false
|
|
|
+ }
|
|
|
if (collectElement.value) {
|
|
|
collectElement.value.moduleShow.email = false
|
|
|
collectElement.value.moduleShow.agree = false
|