onLoad:async function (options) {
var that=this;
//app.sbtypelist(appUrl + "Device/GetDeviceTypes",that);
//app.typelist(appUrl,that);
await wx.request({
url: appUrl + "PigPen/GetPigpenTypes",
data: {},
header: {
'content-type': 'application/json'
},
method: 'GET',
dataType: 'json',
success: function (res) {
var list = [];
var listId = [];
if (res.data.success == "1") {
for (var i = 0; i < res.data.data.length; i++) {
list.push(res.data.data[i].PigpenTypeName);
listId.push(res.data.data[i].PigpenTypeId);
}
that.setData({
lsTypeList: list,
lsTypeListId: listId,
navtab: listId[0],
})
//栋号列表
await app.GetBuildingList(appUrl + "PigPen/GetBuildingList", 0, that, listId[0]);
let ScWord = that.data.ScWord;
let PageSize = that.data.PageSize;
let PageIndex = that.data.PageIndex;
await app.equipList(listId[0], that, ScWord, PageSize, PageIndex);
}
},
fail: function (res) { },
complete: function (res) { },
})
},
await 接 callback无效
没有按顺序执行
什么意思
你是说 await xxx() 没有等待吗