<!--packageCourse/pages/course/index.wxml-->
|
<view class="contentBox" wx:if="{{!skeletonLoding}}">
|
<view class="header">
|
<t-search style="flex:1" value="{{searchKey}}" bind:clear="changeHandle" bind:submit="changeHandle" placeholder="搜索名称" clearable />
|
</view>
|
<view class="contentList" wx:if="{{userList.length > 0}}">
|
<scroll-view class="scroll" class="content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{80}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom">
|
<view slot="refresher" class="refresh-container">
|
<view class="loading">
|
<t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" />
|
</view>
|
</view>
|
<view class="userList" wx:for="{{userList}}" wx:key="index">
|
<view class="userInfo">
|
<t-avatar class="avatar-example" size="small" image="{{item.appUser.icon}}" />
|
<text class="user">{{item.appUser.name}}</text>
|
</view>
|
<view>
|
<t-button bindtap="selectIdentity" data-item="{{item}}" style="margin: 0;color: green;" size="extra-small" wx:if="{{item.state != 'Normal' && item.linkType != 'Creator'}}" variant="text">通过</t-button>
|
<t-button bindtap="removeStudent" data-item="{{item}}" style="margin: 0;color: red;" size="extra-small" wx:if="{{item.linkType != 'Creator' }}" variant="text">移除</t-button>
|
<text style="color: #ff6d00;" wx:if="{{item.linkType == 'Creator'}}">创建人</text>
|
</view>
|
</view>
|
<view class="bottom-loading" wx:if="{{bottomLoading}}">
|
<t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
|
</view>
|
<view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
|
<text>没有更多了</text>
|
</view>
|
</scroll-view>
|
</view>
|
<view class="content" wx:if="{{userList.length == 0}}">
|
<empty />
|
</view>
|
</view>
|
<t-popup visible="{{showConfirm}}" usingCustomNavbar bind:visible-change="onVisibleChange" placement="center">
|
<view class="block--select">
|
<view class="block-select-title">设置用户角色</view>
|
<view class="block-select-radio">
|
<t-radio-group class="groupRadio" value="{{radioVal}}" borderless t-class="box" bind:change='onChangeVal'>
|
<view wx:for="{{roleList}}" wx:key="index">
|
<t-radio class="radioItem" style="font-size: 30rpx;" block="{{false}}" label="{{item.name}}" value="{{item.value}}" />
|
</view>
|
</t-radio-group>
|
</view>
|
<view class="block-select-confirm">
|
<t-button style="padding: 0 25px; margin:0 15px;" size="small" bindtap="cancle" variant="outline">取消</t-button>
|
<t-button style="padding: 0 25px; margin:0;" size="small" bindtap="updateStateNormal">确认</t-button>
|
</view>
|
</view>
|
</t-popup>
|
|
<!-- 骨架屏 -->
|
<view wx:if="{{skeletonLoding}}">
|
<view class="group" wx:for="{{10}}" wx:key="index">
|
<t-skeleton class="group-avatar" rowCol="{{[{ size: '96rpx', type: 'circle' }]}}" loading></t-skeleton>
|
<t-skeleton class="group-content" rowCol="{{[{ width: '50%' }, { width: '100%' }]}}" loading></t-skeleton>
|
</view>
|
</view>
|
|
|
<wxs module="refresh">
|
module.exports = {
|
onPulling: function (evt, instance) {
|
var p = Math.min(evt.detail.dy / 80, 1)
|
var view = instance.selectComponent('.refresh-container')
|
view.setStyle({
|
opacity: p,
|
transform: "scale(" + p + ")"
|
})
|
}
|
}
|
|
</wxs>
|