Put bmob js-sdk in the static directory, and then introduce it in the form of a script tag in the index.html page, and you can use bmob js-sdk globally in vue. This article mainly shares with you the tutorial on using bmob js-sdk in vue. Friends who need it can refer to it. I hope it can help everyone.
Introduction of BmobSDK
Place bmob js-sdk in the static directory, and then add the script tag to the index.html page Introduced in the form, you can use bmob js-sdk globally in vue
Create a js folder in the assets directory, and then create key.js to store bmob Use key
Bmob.initialize("你的Application ID", "你的REST API Key");
to introduce key.js into main.js. The introduction of bmobsdk is complete. Now you can request a piece of data to celebrate. [If you need to use bmob for a single js file in a Vue project, you need to introduce key.js, or fill in the bmob application key]
##
import Vue from 'vue' import App from './App' import router from './router' import './assets/js/key' //引入bmob js-sdk Vue.config.productionTip = false new Vue({ el: '#app', router, render: h => h(App) })
Implement Node.js in WeChat JS-SDK backend interface
Detailed explanation of WeChat JS-SDK development scan interface function implementation code
WeChat JS-SDK image interface development
The above is the detailed content of Sharing tutorial examples of using bmob js-sdk in vue. For more information, please follow other related articles on the PHP Chinese website!