@dmapp/zdan_jsapi
v0.0.2
Published
zdan sdk
Downloads
2
Maintainers
Readme
@dmapp/zdan_jsapi
环境 node 18+ 最佳环境 node v18.18.0
yarn
# 单独安装
npm install @dmapp/zdan_jsapi -D
建议直接在脚手架中使用
安装脚手架
npm install create-dmapp -g
create-dmapp my-project
vue example
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import * as zdan_jsapi from '@dmapp/zdan_jsapi'
import pacakgeJson from '../package.json'
import router from './router/index'
;(async () => {
await zdan_jsapi.init(pacakgeJson.dmappId, {})
let app = createApp(App)
app.use(router)
app.mount('#app')
})()
// App.vue
<template>
<div @click="callApi">call micro service api</div>
<code>{{ dev }}</code>
</template>
<script setup >
import * as zdan_jsapi from "@dmapp/zdan_jsapi";
let callApi = async () => {
console.log('[[call hello')
let result = await zdan_jsapi.GetMainMSService().Call('getTest', {})
console.log(']]call hello result:', result)
}
</script>