Pārlūkot izejas kodu

复制点击事件

lifanagju_citu 10 mēneši atpakaļ
vecāks
revīzija
bf8dc5abda

+ 2 - 28
src/views/recruit/personal/position/components/details.vue

@@ -54,7 +54,7 @@
             :prepend-icon="isCollection ? 'mdi-heart' : 'mdi-heart-outline'"
             @click="handleCollection"
           >{{ isCollection ? $t('position.cancelFavorite') : $t('position.collection') }}</v-btn>
-          <v-btn class="button-item mx-2 radius" color="success" variant="outlined">{{ $t('position.communicate') }}</v-btn>
+          <v-btn class="button-item mx-2 radius" color="success" variant="outlined" @click="toDetails(info)">{{ $t('position.communicate') }}</v-btn>
           <v-btn class="button-item radius" :disabled="delivery" color="primary" variant="outlined" @click="handleDelivery">{{ delivery ? $t('position.delivered') : $t('position.submitResume') }}</v-btn>
         </div>
       </div>
@@ -206,6 +206,7 @@ const getCollectionStatus = async () => {
   if (!getToken()) return isCollection.value = false
   const data = await getJobFavoriteCheck({ jobId: id })
   isCollection.value = data
+  console.log('isCollection', data)
 }
 getCollectionStatus()
 
@@ -229,33 +230,6 @@ const shareUrlTxt = computed(() => {
   return 'http://menduner.citupro.com:7878' + shareUrl.value
 })
 const copyText = async () => {
-  // try {
-  //   const txt = shareUrlTxt.value
-  //   if (navigator.clipboard && navigator.clipboard.writeText) {
-  //     await navigator.clipboard.writeText(txt)
-  //     Snackbar.success('复制成功')
-  //   } else {
-  //     const textArea = document.createElement("textarea")
-  //     textArea.value = txt
-  //     textArea.style.position = "fixed" // 避免在页面上滚动  
-  //     textArea.style.top = 0
-  //     textArea.style.left = 0
-  //     textArea.style.width = "2em"
-  //     textArea.style.height = "2em"
-  //     textArea.style.padding = 0
-  //     textArea.style.border = "none"
-  //     textArea.style.outline = "none"
-  //     textArea.style.boxShadow = "none"
-  //     textArea.style.background = "transparent"
-  //     document.body.appendChild(textArea)
-  //     textArea.focus()
-  //     textArea.select()
-  //     const successful = document.execCommand('copy')
-  //     Snackbar.success(successful ? '复制成功' : '复制失败,请手动复制。')
-  //   }
-  // } catch (err) {
-  //   Snackbar.error('复制失败,请手动复制。')
-  // }
   try {
     await navigator.clipboard.writeText(shareUrlTxt.value)
     Snackbar.success('复制成功')