Commit 2cf60897 authored by youjie's avatar youjie

no message

parent 8b34a1be
...@@ -131,6 +131,42 @@ export function GetOrderPage(data) { ...@@ -131,6 +131,42 @@ export function GetOrderPage(data) {
}) })
} }
/**
* 新增修改"我的孩子"
* @param {JSON参数} data
*/
export function SetMyChild(data) {
return request({
url: '/AppletCenter/SetMyChild',
method: 'post',
data
})
}
/**
* 根据编号删除“我的孩子”
* @param {JSON参数} data
*/
export function RemoveMyChild(data) {
return request({
url: '/AppletCenter/RemoveMyChild',
method: 'post',
data
})
}
/**
* 获取“我的孩子”列表
* @param {JSON参数} data
*/
export function MyChildList(data) {
return request({
url: '/AppletCenter/MyChildList',
method: 'post',
data
})
}
/** /**
* 获取需要添加孩子的信息 * 获取需要添加孩子的信息
* @param {JSON参数} data * @param {JSON参数} data
......
import request from '../utils/request.js' import request from '../utils/request.js'
/**
* 新增修改"我的孩子"
* @param {JSON参数} data
*/
export function SetMyChild(data) {
return request({
url: '/AppletCenter/SetMyChild',
method: 'post',
data
})
}
/**
* 根据编号删除“我的孩子”
* @param {JSON参数} data
*/
export function RemoveMyChild(data) {
return request({
url: '/AppletCenter/RemoveMyChild',
method: 'post',
data
})
}
/**
* 获取“我的孩子”列表
* @param {JSON参数} data
*/
export function MyChildList(data) {
return request({
url: '/AppletCenter/MyChildList',
method: 'post',
data
})
}
/** /**
* 账号密码登录 * 账号密码登录
* @param {JSON参数} data * @param {JSON参数} data
......
...@@ -274,6 +274,25 @@ ...@@ -274,6 +274,25 @@
}); });
},2000) },2000)
}, },
async getData() {
uni.showLoading()
let res = await GetOrderPage(data.msg);
if (res) {
uni.hideLoading()
if (data.timer) data.timer = null;
if (data.msg.pageIndex === 1) {
data.dataList = res.Data&&res.Data.PageData;
} else {
data.dataList = [...data.dataList, ...res.Data.PageData];
}
data.pageCount = res.Data&&res.Data.PageCount
if (data.msg.pageIndex >= res.Data&&res.Data.PageCount) {
data.pageState = "none";
} else {
data.pageState = "more";
}
}
},
}; };
onMounted(() => { onMounted(() => {
......
...@@ -205,9 +205,11 @@ ...@@ -205,9 +205,11 @@
}); });
},2000) },2000)
}, },
getData() { async getData() {
let res = GetStudentPageList(data.msg); uni.showLoading()
let res = await GetStudentPageList(data.msg);
if (res) { if (res) {
uni.hideLoading()
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
if (data.msg.pageIndex === 1) { if (data.msg.pageIndex === 1) {
data.dataList = res.Data&&res.Data.PageData; data.dataList = res.Data&&res.Data.PageData;
......
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
</van-swipe-cell> </van-swipe-cell>
</view> </view>
<van-empty description="暂无小孩" v-if="dataList.length === 0" /> <van-empty description="暂无在读小孩" v-if="dataList.length === 0" />
<view v-if="dataList.length > 0"> <view v-if="dataList.length > 0">
<Loadmore :state="pageState" /> <Loadmore :state="pageState" />
</view> </view>
...@@ -199,9 +199,12 @@ ...@@ -199,9 +199,12 @@
} from "vue"; } from "vue";
import Loadmore from "../../components/loadmore.vue"; import Loadmore from "../../components/loadmore.vue";
import bottom from "../../components/bottom"; import bottom from "../../components/bottom";
import { // import {
// MyChildList
// } from "../../api/index";
import {
MyChildList MyChildList
} from "../../api/index"; } from "../../api/erp";
export default { export default {
components: { components: {
bottom, bottom,
...@@ -269,8 +272,10 @@ ...@@ -269,8 +272,10 @@
}); });
}, },
async getData() { async getData() {
uni.showLoading()
let res = await MyChildList(data.msg); let res = await MyChildList(data.msg);
if (res) { if (res) {
uni.hideLoading()
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
if (data.msg.pageIndex === 1) { if (data.msg.pageIndex === 1) {
data.dataList = res.Data.PageData; data.dataList = res.Data.PageData;
......
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