<template>
<div>
<ishop-ai-assistant v-if="aiAssistantVisible"
:env="env"
@close="closeAiAssistant"
@goBuy="goBuy"></ishop-ai-assistant>
</div>
</template>
<script>
export default {
data() {
env: 'dev',
aiAssistantVisible: false,
},
methods: {
// 关闭AI人工智能助手弹窗
closeAiAssistant() {
this.aiAssistantVisible = false
},
// AI人工智能助手购买续费
async goBuy() {
const userTel = JSON.parse(sessionStorage.getItem('userInfo')).TenantMobile
const uri = await getIshopUri(userTel)
const devUri = window.location.origin + '/#/'
const routerMode = process.env.NODE_ENV === 'development' ? devUri : uri
this.openLink(`${routerMode}buyAndRenewal?userTel=${userTel}`)
},
},
}
</script>