Commit 45979dd3 authored by youjie's avatar youjie

no message

parent 4cff9d3d
......@@ -164,6 +164,13 @@
"backgroundColor": "#F6F6F6",
"navigationBarBackgroundColor": "#F6F6F6"
}
},{
"path": "addFriendsAndRelatives",
"style": {
"navigationBarTitleText": "加入亲友团",
"backgroundColor": "#F6F6F6",
"navigationBarBackgroundColor": "#FFFFFF"
}
}]
}
],
......
<style scoped>
.pages{
min-height: 100vh;
background-color: #f6f6f6;
}
.addChild-header{
flex-direction: column;
align-items: center;
background: #ffffff;
}
.addChild-header image{
padding: 54rpx 0 31rpx 0;
}
.addChild-header text{
font-size: 34rpx;
font-weight: 800;
color: #111111;
padding: 0 0 69rpx 0;
}
.title{
font-size: 34rpx;
font-weight: 500;
color: #282828;
text-align: center;
padding: 123rpx 0 50rpx 0;
}
.addChild-buttom{
width: 450rpx;
margin: auto;
background: #C91727;
border-radius: 44px;
line-height: 88rpx;
color: #ffffff;
font-weight: 500;
font-size: 30rpx;
z-index: 999;
text-align: center;
}
.addChild-buttom.active{
background: rgba(201, 23, 39, .5);
}
</style>
<template>
<view class="addChild pages">
<view class="addChild-header flex">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1664160541000_21.png"
style="width: 352rpx;height: 218rpx;"></image>
<text>李欣芮の亲友团</text>
</view>
<view class="title">
Ranjunjun邀请您加入亲友团
</view>
<view v-if="loading" class="addChild-buttom" @click="addFriend">
立即加入
</view>
<view v-else class="addChild-buttom active">
立即加入
</view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
inject,
} from "vue";
import Loadmore from "../../components/loadmore.vue";
import bottom from "../../components/bottom";
import {
GetStudentPageList,SetMyChild
} from "../../api/erp";
export default {
components: {
bottom,
Loadmore,
},
setup(props, context) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
loading:true,
Account:'',
form:{
Id:'',
AccountId:'',
StuId:'',
OpenId:'',
WeChatName:'',
WeChatImg:'',
UnionId:''
},
msg: {
pageIndex: 1,
pageSize: 1000,
KeyWords: '',//关键词
},
pageCount: 0,
dataList: [],
list:[],
pageState: "more",
timer: null, //防抖
});
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(){
return
data.loading = false
uni.showLoading()
let res = await SetMyChild(data.form);
if (res) {
uni.hideLoading()
data.loading = true
uni.navigateTo({
url: '',
});
}
},
async getData() {
uni.showLoading()
let res = await GetStudentPageList(data.msg);
if (res) {
uni.hideLoading()
}
},
};
let that = methods;
onMounted(() => {
// that.getData()
});
return {
...toRefs(data),
...methods
};
},
onLoad(options) {
},
onReachBottom() {
if (this.msg.pageIndex < this.pageCount) {
data.pageState = "loading";
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.msg.pageIndex++;
that.getList();
}, 1000);
} else {
this.pageState = "none";
}
}
};
</script>
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