Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/api/auth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { customFetch } from '@/utils/customFetch'

// 获取跳转官网的 temp_auth_token
export function get_plugin_tmp_token() {
return customFetch('/bizyair/auth/plugin_tmp_token', {
method: 'POST',
credentials: 'include'
})
}
13 changes: 11 additions & 2 deletions src/views/btnProfile/DialogInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
import { useI18n } from 'vue-i18n'
import { computed } from 'vue'
import { useConfirm } from '@/components/modules/vConfirm'
import { get_plugin_tmp_token } from '@/api/auth'

useI18n()
const statusStore = useStatusStore()
Expand Down Expand Up @@ -284,7 +285,11 @@
cancelText: '取消',
continueText: '前往 bizyair.cn'
})
if (res) window.open('https://bizyair.cn/user/topup', '_blank')
if (res) {
const tmp_token = await get_plugin_tmp_token()
// window.open(`http://localhost:3000/user/topup?tmp_auth=${tmp_token.data.token}`, '_blank')
window.open(`https://bizyair.cn/user/topup?tmp_token=${tmp_token.data.token}`, '_blank')
}
}

const handleRenewClick = async () => {
Expand All @@ -294,7 +299,11 @@
cancelText: '取消',
continueText: '前往 bizyair.cn'
})
if (res) window.open('https://bizyair.cn/user/topup', '_blank')
if (res) {
const tmp_token = await get_plugin_tmp_token()
// window.open(`http://localhost:3000/user/topup?tmp_auth=${tmp_token.data.token}`, '_blank')
window.open(`https://bizyair.cn/user/topup?tmp_token=${tmp_token.data.token}`, '_blank')
}
}
</script>
<style scoped lang="less">
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.72
1.2.74
Loading