ishop-ai-assistant

1.1.25 • Public • Published

ishop-ai-assistant 组件库

快速开始

1. 安装

npm install ishop-ai-assistant --save

2. 引入

import Vue from "vue";
import ishopAiAssistant from "ishop-ai-assistant";
import "ishop-ai-assistant/ishop-ai-assistant.css";

Vue.use(ishopAiAssistant.install);

3. 使用

<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>

Package Sidebar

Install

npm i ishop-ai-assistant

Weekly Downloads

4

Version

1.1.25

License

none

Unpacked Size

8.12 MB

Total Files

6

Last publish

Collaborators

  • not_name