File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { customFetch } from '@/utils/customFetch'
2+
3+ // 获取跳转官网的 temp_auth_token
4+ export function get_plugin_tmp_token ( ) {
5+ return customFetch ( '/bizyair/auth/plugin_tmp_token' , {
6+ method : 'POST' ,
7+ credentials : 'include'
8+ } )
9+ }
Original file line number Diff line number Diff line change 223223 import { useI18n } from ' vue-i18n'
224224 import { computed } from ' vue'
225225 import { useConfirm } from ' @/components/modules/vConfirm'
226+ import { get_plugin_tmp_token } from ' @/api/auth'
226227
227228 useI18n ()
228229 const statusStore = useStatusStore ()
284285 cancelText: ' 取消' ,
285286 continueText: ' 前往 bizyair.cn'
286287 })
287- if (res ) window .open (' https://bizyair.cn/user/topup' , ' _blank' )
288+ if (res ) {
289+ const tmp_token = await get_plugin_tmp_token ()
290+ // window.open(`http://localhost:3000/user/topup?tmp_auth=${tmp_token.data.token}`, '_blank')
291+ window .open (` https://bizyair.cn/user/topup?tmp_token=${tmp_token .data .token } ` , ' _blank' )
292+ }
288293 }
289294
290295 const handleRenewClick = async () => {
294299 cancelText: ' 取消' ,
295300 continueText: ' 前往 bizyair.cn'
296301 })
297- if (res ) window .open (' https://bizyair.cn/user/topup' , ' _blank' )
302+ if (res ) {
303+ const tmp_token = await get_plugin_tmp_token ()
304+ // window.open(`http://localhost:3000/user/topup?tmp_auth=${tmp_token.data.token}`, '_blank')
305+ window .open (` https://bizyair.cn/user/topup?tmp_token=${tmp_token .data .token } ` , ' _blank' )
306+ }
298307 }
299308 </script >
300309<style scoped lang="less">
Original file line number Diff line number Diff line change 1- 1.2.72
1+ 1.2.74
You can’t perform that action at this time.
0 commit comments