This commit is contained in:
JS-LM
2023-06-14 09:35:55 +08:00
parent b021ef71ad
commit 093aa320d0

View File

@@ -116,6 +116,7 @@
v-model="value"
:options="options"
@change="handleChange"
:props="cateProps"
></el-cascader>
<!-- <el-input v-model="ruleForm.prov_code"></el-input> -->
</el-form-item>
@@ -414,8 +415,14 @@ export default {
},
],
},
cateProps: {
expandTrigger: "click",
label: "title",
value: "value",
children: "cities",
},
value: [],
options: []
options: [],
};
},
methods: {
@@ -457,19 +464,26 @@ export default {
},
// 查询汇付结算账户
selectSettleAccount() {},
jsonHttp(){
jsonHttp() {
var that = this;
//(1).实例化ajax对象
let xhr = new XMLHttpRequest()
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')
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()
xhr.send();
//(4).注册回调函数
xhr.onload = function() {
console.log(xhr.responseText,'responseText')
}
}
xhr.onload = function () {
// console.log(xhr.responseText,'responseText')
that.options = JSON.parse(xhr.responseText);
console.log('检测类型',Object.prototype.toString.call(that.options))
console.log("option的值", that.options);
};
},
},
created() {
this.selectAdapayMember();