Commit 20346528 authored by youjie's avatar youjie

no message

parent 2cf60897
...@@ -89,6 +89,9 @@ ...@@ -89,6 +89,9 @@
color: #000000; color: #000000;
font-size: 36rpx; font-size: 36rpx;
} }
/deep/.van-empty{
padding: 0;
}
</style> </style>
<template> <template>
<view class="addChild pages"> <view class="addChild pages">
...@@ -106,16 +109,16 @@ ...@@ -106,16 +109,16 @@
</view> </view>
</view> </view>
<view> <view>
<view class="user-item" v-for="item in 2"> <view class="user-item" v-for="(item,index) in dataList" :key="index"
@click="item.checked=!item.checked,clickChecked()">
<view class="avatar"> <view class="avatar">
{{item.StuName.substring(0,1)}}
<!-- {{item.AccountName.substring(0,1)}} -->
</view> </view>
<view class="uname"> <view class="uname">
黎明 {{item.StuName}}
</view> </view>
<view class="check"> <view class="check">
<van-icon name="success" /> <van-icon :name="item.checked?success:circle" />
</view> </view>
</view> </view>
<van-empty description="暂无小孩信息" v-if="dataList.length === 0" /> <van-empty description="暂无小孩信息" v-if="dataList.length === 0" />
...@@ -188,10 +191,18 @@ ...@@ -188,10 +191,18 @@
}, },
pageCount: 0, pageCount: 0,
dataList: [], dataList: [],
list:[],
pageState: "more", pageState: "more",
timer: null, //防抖 timer: null, //防抖
}); });
const methods = { const methods = {
clickChecked(){
data.dataList.forEach(item=>{
if(item.checked){
data.list.push(item)
}
})
},
usernameInput(val) { usernameInput(val) {
data.msg.StuTel = val.detail; data.msg.StuTel = val.detail;
that.getData() that.getData()
...@@ -210,6 +221,13 @@ ...@@ -210,6 +221,13 @@
let res = await GetStudentPageList(data.msg); let res = await GetStudentPageList(data.msg);
if (res) { if (res) {
uni.hideLoading() uni.hideLoading()
let data = res.Data.PageData
let addList = function (arr) {
arr.forEach(item => {
item.checked = false
});
};
addList(data);
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;
......
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