onShow: function () {
this.getsubList(); //获取subarray
},
getsubList() {
var that = this
let subArray = ['xxxx']
let sub = [{
id: 0
}],
list = {};
HTTP({
url: url' //自己的接口地址
method: 'post', //
data: {},
success(res) {
let list = res.data.data
console.log(list);
for (let i in res.data.data) {
subArray.push(res.data.data[i].subCenter); //将接口返回的值push到subarray