Commit 19ea2576 authored by youjie's avatar youjie

no message

parent 0c7a3bb1
...@@ -248,10 +248,10 @@ ...@@ -248,10 +248,10 @@
data.loading = true data.loading = true
} }
}, },
async getData() { getData() {
uni.showLoading() uni.showLoading()
let res = await GetStudentPageList(data.msg); GetStudentPageList(data.msg).then(res => {
if (res) { if(res.Code==1){
uni.hideLoading() uni.hideLoading()
let datas = res.Data.PageData let datas = res.Data.PageData
let addList = function (arr) { let addList = function (arr) {
...@@ -260,6 +260,7 @@ ...@@ -260,6 +260,7 @@
}); });
}; };
addList(datas); addList(datas);
console.log(datas,'---')
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
// data.dataList = res.Data&&res.Data.PageData; // data.dataList = res.Data&&res.Data.PageData;
// return // return
...@@ -274,7 +275,12 @@ ...@@ -274,7 +275,12 @@
} else { } else {
data.pageState = "more"; data.pageState = "more";
} }
}else{
uni.hideLoading()
} }
}).catch(e => {
uni.hideLoading()
})
}, },
}; };
let that = methods; let that = methods;
......
...@@ -254,13 +254,16 @@ ...@@ -254,13 +254,16 @@
let msg = { let msg = {
Id: item.Id Id: item.Id
} }
let res = RemoveMyChild(msg); RemoveMyChild(msg).then(r => {
if (res.Code==1) { if(r.Code==1){
uni.hideLoading() uni.hideLoading()
that.getData() methods.getData();
}else{ }else{
uni.hideLoading() uni.hideLoading()
} }
}).catch(e => {
uni.hideLoading()
})
} else if (res.cancel) { } else if (res.cancel) {
uni.showToast({ uni.showToast({
...@@ -278,10 +281,10 @@ ...@@ -278,10 +281,10 @@
url: url, url: url,
}); });
}, },
async getData() { getData() {
uni.showLoading() uni.showLoading()
let res = await MyChildList(data.msg); MyChildList(data.msg).then(res => {
if (res) { if(res.Code==1){
uni.hideLoading() uni.hideLoading()
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
if (data.msg.pageIndex === 1) { if (data.msg.pageIndex === 1) {
...@@ -295,7 +298,12 @@ ...@@ -295,7 +298,12 @@
} else { } else {
data.pageState = "more"; data.pageState = "more";
} }
}else{
uni.hideLoading()
} }
}).catch(e => {
uni.hideLoading()
})
}, },
}; };
let that = methods; let that = methods;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment