小白接口(YesApi.cn)vue SDK包
- 开始: npm install
- 在yesapi.js配置你的host,app_key, app_secret
- 在页面axios请求
- 编译运行: npm run serve
methods: {
function() {
var params = {
s: 'App.Hello.World',
name: 'hello,小白'
};
var that = this;
this.$axios({
method: 'get',
url: yesapi.YESAPI_HOST,
params : yesapi.encrypt(params)
}).then(function (response) {
console.log(response);
that.res = response.data;
}).catch(function (error) {
console.log(error);
});
}
},