Commit f5184167 authored by youjie's avatar youjie

no message

parent d961c33d
...@@ -90,55 +90,17 @@ ...@@ -90,55 +90,17 @@
erpUserInfo:null, erpUserInfo:null,
userInfo:null, userInfo:null,
loading:true, loading:true,
Account:'',
form:{ form:{
Id:'',
AccountId:'',
StuId:'', StuId:'',
OpenId:'',
WeChatName:'',
WeChatImg:'',
UnionId:'' UnionId:''
}, },
msg: { msg: {
pageIndex: 1,
pageSize: 1000,
KeyWords: '',//关键词
}, },
pageCount: 0,
dataList: [], dataList: [],
list:[],
pageState: "more",
timer: null, //防抖
}); });
const methods = { const methods = {
clickChecked(item){
data.dataList.forEach(i=>{
i.checked=false
if(item.StuId==i.StuId){
data.list.push(i)
}
})
item.checked = true
data.form = {
Id: item.Id,
AccountId: item.AccountId,
StuId: item.StuId,
OpenId: item.OpenId,
WeChatName: item.WeChatName,
WeChatImg: item.WeChatImg,
UnionId: item.UnionId
}
},
clickIcon(){
that.getData()
},
usernameInput(val) {
data.msg.KeyWords = val.detail.value
that.getData()
},
async addFriend(){ async addFriend(){
return
data.loading = false data.loading = false
uni.showLoading() uni.showLoading()
let res = await SetMyChild(data.form); let res = await SetMyChild(data.form);
...@@ -174,18 +136,13 @@ ...@@ -174,18 +136,13 @@
onShow(){ onShow(){
this.erpUserInfo = uni.getStorageSync('erpUserInfo') this.erpUserInfo = uni.getStorageSync('erpUserInfo')
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo')
this.form = {
StuId: '',
UnionId: uni.getStorageSync('wxUserAuthInfo').unionid
}
}, },
onReachBottom() { onReachBottom() {
if (this.msg.pageIndex < this.pageCount) {
this.pageState = "loading";
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.msg.pageIndex++;
this.getList();
}, 1000);
} else {
this.pageState = "none";
}
} }
}; };
</script> </script>
...@@ -193,8 +193,6 @@ ...@@ -193,8 +193,6 @@
item.checked = false item.checked = false
data.form = { data.form = {
StuId: '', StuId: '',
// WeChatName: item.WeChatName,
// WeChatImg: item.WeChatImg,
UnionId: '' UnionId: ''
} }
}else{ }else{
...@@ -207,8 +205,6 @@ ...@@ -207,8 +205,6 @@
item.checked = true item.checked = true
data.form = { data.form = {
StuId: item.StuId, StuId: item.StuId,
// WeChatName: item.WeChatName,
// WeChatImg: item.WeChatImg,
UnionId: uni.getStorageSync('wxUserAuthInfo').unionid UnionId: uni.getStorageSync('wxUserAuthInfo').unionid
} }
......
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