1. 去萤石云注册账户
2. 找到我的应用,获取AppKey和Secret
3. axios请求
import qs from 'qs';
let data = {
appKey: '007493f17fce45c799d0a3255b57684b',
appSecret: '7f26c3a11f6f3181ef538fc081fecd48',
}
axios({
url: 'https://open.ys7.com/api/lapp/token/get',
method: 'post',
headers: {
'content-type': 'application/x-www-form-urlencoded'
},
data: qs.stringify(data),
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
( 如果报错 code: "10001", msg: "appKey不能为空" 请检查红色部分是否正确 )