渲染修改

This commit is contained in:
taoxu 2023-12-07 17:28:46 +08:00
parent 76008bc03a
commit 8aa8d9d471

View File

@ -2,7 +2,7 @@
<view class="view_body"> <view class="view_body">
<u-navbar :is-back="true" title='班级详情' title-color="#000" :border-bottom="false" :background="true" id="navbar"> <u-navbar :is-back="true" title='班级详情' title-color="#000" :border-bottom="false" :background="true" id="navbar">
</u-navbar> </u-navbar>
<view class="view_botton"> <view class="view_botton" v-if="loading==false">
<view class="view_spoken"> <view class="view_spoken">
<view> <view>
<image src="https://file.langsi.online/yasiimg/web/static/uXJ24nLEqmCb0FkFpmfy" mode=""></image> <image src="https://file.langsi.online/yasiimg/web/static/uXJ24nLEqmCb0FkFpmfy" mode=""></image>
@ -24,11 +24,11 @@
</view> </view>
</view> </view>
</view> </view>
<view class="view_yellowBotton"> <view class="view_yellowBotton" @click="toaddwork()">
安排作业 安排作业
</view> </view>
</view> </view>
<view class="view_zy"> <view class="view_zy" v-if="loading==false">
<view class="view_left" @click="tostu()"> <view class="view_left" @click="tostu()">
@ -51,8 +51,11 @@
<text>带班老师</text> <text>带班老师</text>
<u-icon name="arrow-right" color="#646D7B" size="16"></u-icon> <u-icon name="arrow-right" color="#646D7B" size="16"></u-icon>
</view> </view>
<view class="view_images"> <view class="view_images" >
<image :src="item1.url" mode="" v-for="(item1,index) in item.image"></image> <image :src="item.memberInfo.avatar" mode="" v-for="(item,index ) in classinfo.members" :key="index" v-if="index<=4"></image>
<view class="shenlue" v-if="classinfo.members.length>4">
{{classinfo.members.length}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -94,7 +97,7 @@
data() { data() {
return { return {
isShow: false, isShow: true,
operation:[ operation:[
{ {
@ -120,7 +123,9 @@
], ],
classid:0, classid:0,
classinfo:{} classinfo:{},
workinfo:{},
loading:true
} }
}, },
onLoad(option) { onLoad(option) {
@ -130,8 +135,18 @@
}, },
onShow(){ onShow(){
this.getclassinfo() this.getclassinfo()
this.getworkinfo()
}, },
methods:{ methods:{
toaddwork(){
uni.navigateTo({
url: "/pages_teacher/teacher_teachers/teacher_addOperation?id=" + this.classinfo.id
}).then(res => {
}).catch(err => {
});
},
getclassinfo() { getclassinfo() {
this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/detail?id=${this.classid}`).then(res => { this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/detail?id=${this.classid}`).then(res => {
@ -140,6 +155,20 @@
this.classinfo=res.data this.classinfo=res.data
// this.classlist = res.data.list // this.classlist = res.data.list
// this.isloding = false // this.isloding = false
this.loading=false
}
})
},
getworkinfo() {
this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/work-record?classroomId=${this.classid}`).then(res => {
if (res.code == 0) {
this.workinfo=res.data
// this.classlist = res.data.list
// this.isloding = false
} }
}) })