mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 01:50:17 +08:00
update
This commit is contained in:
@@ -458,9 +458,17 @@ export default {
|
||||
// 查询汇付结算账户
|
||||
selectSettleAccount() {},
|
||||
jsonHttp(){
|
||||
const res = this.$http.get('https://cdn.cloudpnr.com/adapayresource/documents/Adapay%E7%9C%81%E5%B8%82%E7%BC%96%E7%A0%81%EF%BC%88%E5%9B%9B%E4%BD%8D%EF%BC%89.json');
|
||||
console.log("res:", res);
|
||||
this.options = res;
|
||||
//(1).实例化ajax对象
|
||||
let xhr = new XMLHttpRequest()
|
||||
//(2).设置请求方法和地址
|
||||
//get请求的数据直接添加在url的后面 格式是 url?key=value
|
||||
xhr.open('get', 'https://cdn.cloudpnr.com/adapayresource/documents/Adapay%E7%9C%81%E5%B8%82%E7%BC%96%E7%A0%81%EF%BC%88%E5%9B%9B%E4%BD%8D%EF%BC%89.json')
|
||||
//(3).发送请求
|
||||
xhr.send()
|
||||
//(4).注册回调函数
|
||||
xhr.onload = function() {
|
||||
console.log(xhr.responseText,'responseText')
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
Reference in New Issue
Block a user