Commit a373d9bb authored by ltz's avatar ltz

闯关优化部分

parent 2452452d
......@@ -620,7 +620,8 @@
"root": "business/pages/morethemeindex",
"name": "businessmorethemeindex",
"pages": [
"index"
"index",
"studentact"
]
},
{
......
......@@ -1061,7 +1061,7 @@ Page({
})
}
},
// 参与概况
// 参与概况 成员管理
goclockm() {
wx.navigateTo({
url: `/business/pages/unlockclocksituation/index?id=${this.data.id}&tid=${this.data.tid}&sid=${this.data.sid}`
......@@ -1400,5 +1400,6 @@ Page({
this.setData({
'remindTips.show': false
})
}
},
true(){}
})
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container">
<btn-drag bind:btnDragEvent='goindex' tobottomDis='88' width='60' height="60" catchtouchmove="ture">
<view class="gohome gohome-b" bindtap="goindex" slot="dragcontent">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<view class="gohome gohome-b" slot="dragcontent">
<view class="home-text">首页</view>
</view>
</btn-drag>
......@@ -42,6 +39,13 @@
</view>
<view class="text">参与概况</view>
</view> -->
<view class="btn-box joinstatic"
bindtap="goclockm">
<view class="icon">
<image class="btn" src="{{imageRoot}}2b/themeindex/student-icon.png"></image>
</view>
<view class="text">成员管理</view>
</view>
</view>
</view>
......
This diff is collapsed.
{
"navigationBarTitleText": "个人动态",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#35BAFD",
"navigationBarTextStyle": "white",
"usingComponents": {
"empty-content": "../../../components/emptycontent",
"clock-item": "../../components/clockitem",
"comment-editor": "../../../components/commenteditor",
"expiredTip": "../../components/expiredTip",
"comment-editor-type-choose": "../../components/commentEditorTypeChoose"
}
}
\ No newline at end of file
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="header-box">
<view class="student-info">
<view class="left">
<image class="avatar" src="{{filter.imagify(studentInfo.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{studentInfo.avatar}}"/>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
</view>
<view class="right">
<view class="line-box nickname-box">
<view class="nickname">{{studentInfo.name}}</view>
<view class="num">已闯{{studentInfo.unlock_subject_count}}关 共{{studentInfo.subject_count}}关</view>
</view>
<view class="line-box wxnickname">微信昵称:{{studentInfo.wechat_user.nickname}}</view>
<view class="line-box mobile">手机号:{{studentInfo.mobile}}</view>
</view>
</view>
<view class="opt-box" wx:if="{{studentInfo.is_formal_student && studentInfo.is_formal_student}}">
<view class="btn btn-exchange" bindtap="bindBuyCourse">转化为在读学员</view>
<view class="btn btn-out">踢出</view>
</view>
</view>
<view class="content-box">
<view class="clock-list" wx:if="{{!emptyClockPage}}">
<block wx:for="{{clockList}}" wx:for-index="idx" wx:for-item="listItem" wx:key="idx">
<view class="clock-item" wx:for="{{listItem}}" wx:key="index">
<clock-item
clock="{{item}}"
bind:clocksplacetop="clocksplacetop"
bind:delClock="delClock"
bind:expandAccessment="expandAccessment"
bind:fingureUp="fingureUp"
cindex="{{index}}"
tid="{{tid}}"
cid="{{id}}"
bind:expandLikes="expandLikes"
bind:expandContent="expandContent"
bind:delComments="delComments"
bind:playvoice="playvoice"
bind:pausevoice="pausevoice"
bind:voiceslide="voiceslide"
audioStorage="{{audioStorage}}"
bind:slidestart="slidestart"
bind:slideend="slideend"
bind:playvideo="playvideo"
bind:showcommenteditor="showcommenteditor"
data-listindex="{{idx}}"
data-index="{{index}}"
bind:goCommentEditor="goCommentEditor"
>
</clock-item>
</view>
</block>
<list-loading loading="{{clockListLoading}}"></list-loading>
</view>
<view class="empty-content-box" wx:if="{{emptyClockPage}}">
<empty-content text="{{params.searchName?'没有找到该学员':'暂无数据'}}"></empty-content>
</view>
</view>
<view class="videodialog" wx:if="{{videostatus.videoShow}}">
<view class="videodialogmask" bindtap="closeVideo"></view>
<video class="" src="{{filter.transformOssVideofy(videostatus.src,videostatus.mode)}}" id="{{videostatus.videoId}}" initial-time="0" autoplay="false" loop="false" direction="0" bindplay="" bindpause="" bindended="" bindtimeupdate="" bindwaiting="" binderror="" bindfullscreenchange="screenchange"></video>
</view>
<view class="" data-editor="commenteditor">
<comment-editor wx:if="{{commenteditor}}" prams="{{commentclock}}" bind:hidecommenteditor="hidecommenteditor" type="2b"></comment-editor>
</view>
</view>
<expiredTip/>
<comment-editor-type-choose
show="{{goCommentEditorInfo.show}}"
classid="{{goCommentEditorInfo.info.id}}"
tid="{{goCommentEditorInfo.info.tid}}"
cid="{{goCommentEditorInfo.info.cid}}"
sid="{{goCommentEditorInfo.info.sid}}"
bind:hideChooseTypeDia="hideChooseTypeDia"
/>
\ No newline at end of file
/* business/pages/studentdetail/index.wxss */
@import "../../../style/commonlist.wxss";
.container{}
.header-box {
background:#35BAFD;
padding: 33rpx 24rpx 50rpx;
}
.header-box .student-info{
display: flex;
align-items: center;
justify-content: space-between;
}
.header-box .student-info .left{
padding-right: 24rpx;
}
.header-box .student-info .left .avatar{
width: 130rpx;
height: 130rpx;
border: 1px solid #fff;
border-radius: 50%;
}
.header-box .student-info .right{
flex: 1;
}
.header-box .student-info .right .line-box{
display: flex;
justify-content: space-between;
color: #fff;
line-height: 1;
font-size: 24rpx;
}
.header-box .student-info .right .nickname-box .nickname{
font-size: 30rpx;
}
.header-box .student-info .right .nickname-box .num{
white-space: nowrap;
padding-left: 30rpx;
}
.header-box .student-info .right .wxnickname{
padding-top: 29rpx;
}
.header-box .student-info .right .mobile{
padding-top: 16rpx;
}
.header-box .opt-box{
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 154rpx;
padding-top: 37rpx;
}
.header-box .opt-box .btn{
height: 70rpx;
border-radius: 35rpx;
font-size: 24rpx;
color: #5F5A5A;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.header-box .opt-box .btn-exchange{
width: 320rpx;
}
.header-box .opt-box .btn-out{
width: 105rpx;
}
.content-box{
width: 100%;
background: #fff;
border-radius: 20rpx 20rpx 0 0;
position: relative;
top: -30rpx;
z-index: 2;
overflow: hidden;
}
.clock-list{}
.clock-list .clock-item{
position: relative;
border-bottom: 15rpx solid #F7F7F9;
}
.clock-list .clock-item:last-of-type{
border-bottom: none;
}
.empty-content-box{
position: relative;
height: 600rpx;
}
.has-nomore{
font-size: 26rpx;
color: #9C9C9D;
padding: 75rpx 0;
text-align: center;
}
\ No newline at end of file
var app = getApp();
import {
themeDetail,
unlockClockMemberList,
} from '../../../service/business/themeindex.js';
import {
formIdCreate
} from '../../../service/common.js';
import {
sharePosteCanvas
} from '../../../utilities/generatePoster.js';
import {
generateCustomerQrcode,
posterLog,
schoolDetailGet
} from '../../../service/business/common.js'
import {
LocalStorage
} from '../../../utilities/index.js';
import {
screenshot
} from '../../../utilities/screenshot.js';
unlocksubjectstudents
} from '../../../service/business/morethemeindex'
Page({
data: {
imageRoot: app.globalData.imageRoot,
......@@ -29,49 +10,44 @@ Page({
id: 0,
tid: 0,//6870
sid: '',//1
searchName: '',
page: 1,
perPage: 10,
hasmore: true,
unlockMemberList: [],
memberLoading: false,
listLoading: false,
memberTotal: 0,
emptyPage: false,
emptyMemberPage: false,
shareObj: {},
initShareObj: {},
mode_id: 0
},
onLoad: function (options) {
let that = this;
const {tid,sid} = options;
that.setData({
mode_id: tid,
mode_id: tid || 0,
sid
})
wx.hideShareMenu();
this.clockMemberListGet('init');
},
onReady: function () {
let dakarole = LocalStorage.getItem('dakarole');
if (dakarole == 1) {
},
onShow: function () {
let that = this;
if(that.data.needRefresh){
this.setData({
permission: [1, 2, 3, 4, 5, 6, 7]
page: 1,
hasmore: true,
})
this.clockMemberListGet('init');
}
},
onShow: function () {
let that = this;
this.setData({
page: 1,
hasmore: true,
})
this.clockMemberListGet('init');
let dakarole = LocalStorage.getItem('dakarole');
onHide: function () {
this.data.needRefresh = false
},
onPullDownRefresh: function () {
this.setData({
mPage: 1,
page: 1,
hasmore: true,
})
this.clockMemberListGet('down');
......@@ -83,22 +59,21 @@ Page({
if (!this.data.hasmore) {
return
}
if (this.data.memberLoading) {
if (this.data.listLoading) {
return;
}
this.setData({
memberLoading: true
listLoading: true
})
unlockClockMemberList({
unlocksubjectstudents({
mode_id: this.data.mode_id,
page: this.data.page,
perPage: this.data.perPage,
school_id: this.data.sid,
keyword: this.data.searchName ? this.data.searchName : ''
}).then((res) => {
const { code,data } = res;
this.setData({
memberLoading: false
listLoading: false
})
if (code != 200) { // 失败的处理
......@@ -111,13 +86,10 @@ Page({
switch (type) {
case 'init': //页面进来第一次加载
this.setData({
unlockMemberList: data.list || []
unlockMemberList: [data.list] || []
}, () => {
if (this.data.memberTotal > this.data.unlockMemberList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
if (this.data.memberTotal > this.caculateArrLength(this.data.unlockMemberList)) {
this.data.page += 1;
} else { // 没有更多了
this.setData({
hasmore: false
......@@ -128,13 +100,10 @@ Page({
case 'down': // 页面下拉刷新
wx.stopPullDownRefresh();
this.setData({
unlockMemberList: data.list || []
unlockMemberList: [data.list]
}, () => {
if (this.data.memberTotal > this.data.unlockMemberList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
if (this.data.memberTotal > this.caculateArrLength(this.data.unlockMemberList)) {
this.data.page += 1;
} else { // 没有更多了
this.setData({
hasmore: false
......@@ -143,16 +112,11 @@ Page({
})
break;
case 'up': // 页面上拉加载
let list = this.data.unlockMemberList;
let _list = list.concat(data.list);
this.setData({
unlockMemberList: _list
[`unlockMemberList[${this.data.page - 1}]`]: data.list
}, () => {
if (this.data.memberTotal > this.data.unlockMemberList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
if (this.data.memberTotal > this.caculateArrLength(this.data.unlockMemberList)) {
this.data.page += 1;
} else { // 没有更多了
this.setData({
hasmore: false
......@@ -163,7 +127,7 @@ Page({
default:
break;
}
if (this.data.unlockMemberList.length) {
if (this.caculateArrLength(this.data.unlockMemberList) == 0) {
this.setData({
emptyMemberPage: true
})
......@@ -175,38 +139,22 @@ Page({
}
}).catch((e) => {
this.setData({
memberLoading: false
listLoading: false
})
})
},
formIdCreate(e) {
const { formId } = e.detail;
formIdCreate({
formId
caculateArrLength(array) {
let _length = 0;
array.forEach(ele => {
_length = _length + ele.length;
})
return _length;
},
// 搜索
searchinput(e) {
const { value } = e.detail;
this.setData({
searchName: value,
toStudentAct (e) {
const { id } = e.currentTarget.dataset;
console.log(id)
wx.navigateTo({
url: `/business/pages/morethemeindex/studentact?sid=${this.data.sid}&studentId=${id}&modeid=${this.data.mode_id}`
})
},
search() {
this.setData({
page: 1,
hasmore: true,
}, () => {
this.clockMemberListGet('down');
})
},
clearsearchinput() {
this.setData({
searchName: '',
page: 1,
hasmore: true,
}, () => {
this.clockMemberListGet('init');
})
},
}
})
\ No newline at end of file
{
"navigationBarTitleText": "参与概况",
"navigationBarTitleText": "成员管理",
"enablePullDownRefresh": true,
"usingComponents": {
"sjd-media-show": "../../../components/sjdmediashow",
"empty-content": "../../../components/emptycontent",
"poster-box": "../../../components/posterbox",
"go-top": "../../components/goTop",
"list-loading": "../../../components/listloading",
"comment-editor": "../../../components/commenteditor",
"calender": "../../../components/calendar",
"expiredTip": "../../components/expiredTip"
}
}
\ No newline at end of file
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="search-box">
<view class="ipt-box">
<image class="ipt-iocn" src="{{imageRoot}}2b/themeindex/w-icon.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<input type="text" placeholder-class="placeholderclass" class="search-input" value="{{searchName}}" bindinput="searchinput" placeholder="输入学员昵称"></input>
<image class="close-iocn" src="{{imageRoot}}2b/common/closeicon.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" bindtap="clearsearchinput" wx:if="{{searchName}}"></image>
</view>
<view class="btn" bindtap="search">搜索</view>
<view class="page-tip">正式学员 和潜客 是什么意思
<image class="tip-icon" src="{{imageRoot}}2c/ucenter2/icon_zuoye.png?{{imageVersion}}"></image>
</view>
<view class="wrap-box">
<view class="list-box" wx:if="{{unlockMemberList.length>0}}">
<view class="list-item" wx:for="{{unlockMemberList}}" wx:key="{{index}}">
<view class="list-box" wx:if="{{memberTotal>0}}">
<block wx:for="{{unlockMemberList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="list-item" wx:for="{{bigitem}}" wx:for-item="item" wx:key="{{index}}" bindtap="toStudentAct" data-id="{{item.student_id}}">
<view class="left">
<view class="userinfo">
<image class="avator" src="{{filter.imagify(item.avatar, 'image/resize,w_160/format,jpg')}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<view class="namebox">
<view class="name">{{item.nickname}}</view>
<view class="time">{{item.max_time}}</view>
</view>
</view>
<image class="avatar" src="{{filter.imagify(item.school_student.avatar, 'image/resize,w_160/format,jpg')}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
</view>
<view class="right">
<text>已挑战</text>
<text class="static">{{item.record_count}}</text>
<text>关</text>
<view class="nickname">{{item.school_student.nickname}}</view>
<view class="time">{{item.min_created_at}} 加入</view>
<view class="num">已闯{{item.unlock_subject_count}}关</view>
</view>
<view class="status {{item.is_formal_student?'status2':'status1'}}">{{item.is_formal_student?'在读':'非在读'}}</view>
</view>
</view>
<empty-content text="{{searchName?'没有找到该学员~':'暂无数据~'}}" emptyimg="common/empty/empty_b.png" wx:else></empty-content>
</block>
</view>
<empty-content text="暂无数据~" emptyimg="common/empty/empty_b.png" wx:else></empty-content>
</view>
<expiredTip/>
\ No newline at end of file
/* 搜索框 */
.search-box{
padding: 36rpx 25rpx 16rpx 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.search-box .btn{
width:92rpx;
height: 48rpx;
line-height: 46rpx;
text-align: center;
border:2rpx solid rgba(101,184,244,1);
border-radius:10rpx;
font-size:26rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(101,184,244,1);
box-sizing:content-box;
}
.search-box .ipt-box{
width:525rpx;
height:60rpx;
background:rgba(255,255,255,1);
border:1px solid rgba(228,229,240,1);
border-radius:30rpx;
display: flex;
justify-content: center;
box-sizing: content-box;
position: relative;
}
.search-box .ipt-box .close-iocn{
width: 17rpx;
height: 19rpx;
position: absolute;
right:0rpx;
top:0rpx;
padding:20rpx;
z-index:30;
}
.search-box .ipt-box .ipt-iocn{
width:29rpx;
height:30rpx;
padding: 15rpx 28rpx;
}
.search-box .ipt-box .search-input{
width: 440rpx;
border: none;
height: 60rpx;
}
.search-box .btn{
width: 92rpx;
height: 48rpx;
/* line-height: 48rpx;
text-align: center; */
border: 2rpx solid rgba(101,184,244,1);
border-radius: 10rpx;
font-size: 26rpx;
font-family: PingFang-SC-Regular;
font-weight: 400;
color: rgba(101,184,244,1);
display: flex;
justify-content: center;
align-items: center;
page{
background: #F0F0F4;
}
.page-tip{
width: 100%;
height: 70rpx;
background: #fff;
display: flex;
align-items: center;
font-size: 26rpx;
color: #65B8F4;
padding: 0 23rpx;
z-index: 2;
}
.page-tip .tip-icon{
width: 24rpx;
height: 24rpx;
margin-left: 12rpx;
}
.list-box {
background: #fff;
padding: 31rpx 24rpx;
}
.list-item {
.list-box .list-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 24rpx;
height: 130rpx;
padding: 20rpx;
position: relative;
margin-bottom: 24rpx;
border-radius: 20rpx;
background: #fff;
}
.list-item:after{
content: '';
width: 100%;
height: 1px;
background: rgba(0,0,0,1);
opacity: 0.05;
position: absolute;
left: 0;
bottom: 0;
}
.list-item:last-of-type:after{
display: none;
.list-box .list-item::last-of-type{
margin-bottom: 0
}
.list-item .left {
display: flex;
align-items: center;
.list-box .list-item .left {
width: 100rpx;
min-width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-right: 30rpx;
overflow: hidden;
}
.userinfo {
margin-left: 26rpx;
display: flex;
align-items: center;
line-height: 1;
.list-box .list-item .left .avatar{
width: 100%;
height: 100%;
}
.userinfo .avator {
display: block;
width: 66rpx;
height: 66rpx;
border-radius: 50%;
margin-right: 32rpx;
.list-box .list-item .right{
max-width: 400rpx;
}
.namebox .name {
width: 245rpx;
.list-box .list-item .right>view{
line-height: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #000;
font-size: 28rpx;
text-overflow: ellipsis;
}
.list-box .list-item .right .nickname{
font-size: 26rpx;
color: #1F1F1F;
font-weight: bold;
}
.list-box .list-item .right .time{
font-size: 22rpx;
color: #ADADAD;
padding-top: 10rpx;
}
.namebox .time {
padding-top: 26rpx;
.list-box .list-item .right .num{
font-size: 22rpx;
columns: #939393;
color: #ADADAD;
padding-top: 20rpx;
}
.right{
.status{
width: 114rpx;
height: 38rpx;
border-radius: 19rpx;
position: absolute;
right: 20rpx;
top: 20rpx;
font-size: 22rpx;
display: flex;
align-items: center;
justify-content: center;
color: #8F8F8F;
}
.right text {
font-size: 22rpx;
color: #898A88;
.status2{
color: #35BAFD;
background: rgba(53,186,253,.1);
}
.right text.static {
font-size: 26rpx;
color: #000;
padding: 0 8rpx;
.status1{
color: #FFBA01;
background: rgba(255,186,0,.1);
}
\ No newline at end of file
......@@ -30,7 +30,7 @@ Component({
},
candrag: {
type: Boolean,
value: false
value: true
}
},
options: {
......
......@@ -505,6 +505,8 @@ const apis = {
unlocksubjectindex: `${api}member/unlock_subject/index`, //B-模式对应的主题列表
unlocksubjectdetail: `${api}member/unlock_subject/detail`, //B-模式对应的主题列表
unlocksubjectsituation: `${api}member/unlock_subject/situation`, //B-参与概况
unlocksubjectstudents: `${api}member/unlock_subject/students`, //B-成员列表
modeStudentDetail: `${api}member/unlock_subject/mode_student_detail`, //B-闯关个人动态详情
},
points: {
exchangeRecord: `${api}member/integral_goods/exchange`, //B-积分兑换记录
......
export default {
imageRoot: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/',
host: 'https://qxapi.qingxiao.online/daka',
host2: 'https://wx.m.shangjiadao.cn',
// host: 'https://qxapi.qingxiao.online/daka',
// host2: 'https://wx.m.shangjiadao.cn',
storageVersion: '5.0',
imageVersion: '20200117',
// host: 'https://clock.wp53.cn',
// host2: 'https://test.wp53.cn',
host: 'https://clock.wp53.cn',
host2: 'https://test.wp53.cn',
appId: 'wxc1246ea029394785',
miniProgram: {
clock: 'wxdeee20e52a1fd7ee'
......
......@@ -42,9 +42,32 @@ function unlocksubjectsituation(data) {
errorresolve: 1,
})
}
// 闯关打卡成员列表
function unlocksubjectstudents(data) {
return wxRequest({
role: '2b',
url: apis.business.morethemeindex.unlocksubjectstudents,
data,
method: 'GET',
errorresolve: 1,
})
}
//闯关个人动态详情
function modeStudentDetail(data) {
return wxRequest({
role: '2b',
url: apis.business.morethemeindex.modeStudentDetail,
data,
method: 'GET',
errorresolve: 1,
})
}
export {
unlocksubjectshow,
unlocksubjectindex,
unlocksubjectdetail,
unlocksubjectsituation
unlocksubjectsituation,
unlocksubjectstudents,
modeStudentDetail
}
\ No newline at end of file
......@@ -1289,6 +1289,8 @@
height: auto;
background: rgba(247, 247, 247, 1);
border-radius: 8rpx;
position: relative;
z-index: 10;
}
.detail-theme-box .theme-box {
......
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