暂存
This commit is contained in:
16
pages.json
16
pages.json
@@ -581,7 +581,21 @@
|
|||||||
"path" : "pages/miniClass/classList",
|
"path" : "pages/miniClass/classList",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "班级列表"
|
"navigationBarTitleText" : "主任班级列表"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/miniClass/courseClassList",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "课程下可加入班级列表"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/miniClass/myClassList",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "用户的班级列表"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -70,16 +70,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 小班入口 -->
|
<!-- 小班入口 -->
|
||||||
<view class="classEntrance">
|
<view class="classEntrance" v-if="linkClassList.length > 0">
|
||||||
<view class="flex_box" style="justify-content: space-between;">
|
<view class="flex_box" style="justify-content: space-between;">
|
||||||
<view class="flex_box classTitleBox">
|
<view class="flex_box classTitleBox">
|
||||||
<image src="../../static/icon/class.png" mode="" style="width: 64rpx; height: 64rpx;"></image>
|
<image src="../../static/icon/class.png" mode="" style="width: 64rpx; height: 64rpx;"></image>
|
||||||
<text class="mainTxt">
|
<text class="mainTxt">
|
||||||
<span style="font-weight: bold; padding: 0 16rpx;">50</span>
|
<span style="font-weight: bold; padding: 0 16rpx;">{{linkClassList.length}}</span>
|
||||||
个班级正在学习本门课程</text>
|
个班级正在学习本门课程</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="btntext">
|
<view class="btntext">
|
||||||
<text @click="goClassLIst('/pages/miniClass/classList', course.id,course.title)">前往查看 >></text>
|
<text @click="goClassLIst('/pages/miniClass/courseClassList', course.id,course.title)">前往查看 >></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -462,24 +462,7 @@
|
|||||||
fatherIndex: null,
|
fatherIndex: null,
|
||||||
supportFlag: false,
|
supportFlag: false,
|
||||||
selectGoodsData: {},
|
selectGoodsData: {},
|
||||||
buyOptions: [
|
buyOptions: [],
|
||||||
// {
|
|
||||||
// icon: 'chat',
|
|
||||||
// text: '客服'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// icon: 'shop',
|
|
||||||
// text: '店铺',
|
|
||||||
// // info: 2,
|
|
||||||
// infoBackgroundColor: '#007aff',
|
|
||||||
// infoColor: "#f5f5f5"
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// icon: 'cart',
|
|
||||||
// text: '购物车',
|
|
||||||
// info: 2
|
|
||||||
// }
|
|
||||||
],
|
|
||||||
customButtonGroup1: [{
|
customButtonGroup1: [{
|
||||||
with: 200,
|
with: 200,
|
||||||
text: "立即购买",
|
text: "立即购买",
|
||||||
@@ -493,6 +476,7 @@
|
|||||||
},
|
},
|
||||||
isAndorid: true,
|
isAndorid: true,
|
||||||
oprateOsName:'',
|
oprateOsName:'',
|
||||||
|
linkClassList:[], // 关联班级数组
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
@@ -504,7 +488,7 @@
|
|||||||
console.log(e, "传入分类id");
|
console.log(e, "传入分类id");
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.courseId = e.id;
|
this.courseId = e.id;
|
||||||
// this.getCateList(this.courseId)
|
this.getLinkClassList()
|
||||||
// await this.getData(e.id);
|
// await this.getData(e.id);
|
||||||
this.getSayList();
|
this.getSayList();
|
||||||
this.getOS()
|
this.getOS()
|
||||||
@@ -564,6 +548,35 @@
|
|||||||
},
|
},
|
||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获得课程关联的班级
|
||||||
|
getLinkClassList(){
|
||||||
|
this.$http
|
||||||
|
.request({
|
||||||
|
url: 'common/class/getClassByCourseIdNoUser',
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"courseId": this.courseId,
|
||||||
|
"state": '0', //小班状态0待开班1已开班2完成
|
||||||
|
"type": '0'
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
if (res.code == 0 && res.result.length > 0) {
|
||||||
|
this.linkClassList = res.result
|
||||||
|
}else{
|
||||||
|
this.linkClassList = []
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title:'获取班级列表错误',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获得操作系统
|
// 获得操作系统
|
||||||
getOS() {
|
getOS() {
|
||||||
let oprateOs = "";
|
let oprateOs = "";
|
||||||
@@ -1164,7 +1177,9 @@
|
|||||||
this.courseList = [];
|
this.courseList = [];
|
||||||
// console.log("at line 1167:", "调用了几次");
|
// console.log("at line 1167:", "调用了几次");
|
||||||
var that = this;
|
var that = this;
|
||||||
|
uni.showLoading({
|
||||||
|
title:'正在加载'
|
||||||
|
})
|
||||||
await $http
|
await $http
|
||||||
.request({
|
.request({
|
||||||
url: "sociology/course/getCourseDetail",
|
url: "sociology/course/getCourseDetail",
|
||||||
@@ -1250,8 +1265,10 @@
|
|||||||
// console.log("list at line 1233:", list);
|
// console.log("list at line 1233:", list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
uni.hideLoading()
|
||||||
console.log(e, "获取目录数据报错");
|
console.log(e, "获取目录数据报错");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -217,8 +217,8 @@
|
|||||||
flag: false
|
flag: false
|
||||||
},
|
},
|
||||||
oldValue : '',
|
oldValue : '',
|
||||||
cartList:[]
|
cartList:[],
|
||||||
|
addLearnFlag:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
@@ -640,6 +640,14 @@
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
addCollection(val,index){
|
addCollection(val,index){
|
||||||
|
if(this.addLearnFlag){
|
||||||
|
uni.showToast({
|
||||||
|
title:'请勿频繁操作哦',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.addLearnFlag = true
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "medical/course/addUserCourseStudying",
|
url: "medical/course/addUserCourseStudying",
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
@@ -652,6 +660,7 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
this.addLearnFlag = false
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'加入成功',
|
title:'加入成功',
|
||||||
@@ -666,6 +675,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
this.addLearnFlag = false
|
||||||
console.log('加入在学习', e)
|
console.log('加入在学习', e)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'加入失败',
|
title:'加入失败',
|
||||||
|
|||||||
@@ -1,53 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<view
|
<view style="
|
||||||
style="
|
|
||||||
padding: 0 0;
|
padding: 0 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
;
|
;
|
||||||
"
|
" class="commonPage commonPageBox">
|
||||||
class="commonPage commonPageBox"
|
|
||||||
>
|
|
||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<view class="bg_top">
|
<view class="bg_top">
|
||||||
<u-icon
|
<u-icon @click="goSetting" class="setIcon" labelColor="#258feb" labelPos="bottom" label="设置" name="setting"
|
||||||
@click="goSetting"
|
:style="`top:${(10 + statusBarHeight) * 2}rpx`" color="#258feb" size="28"></u-icon>
|
||||||
class="setIcon"
|
|
||||||
labelColor="#258feb"
|
|
||||||
labelPos="bottom"
|
|
||||||
label="设置"
|
|
||||||
name="setting"
|
|
||||||
:style="`top:${(10 + statusBarHeight) * 2}rpx`"
|
|
||||||
color="#258feb"
|
|
||||||
size="28"
|
|
||||||
></u-icon>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
|
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
|
||||||
<view class="per_mes">
|
<view class="per_mes">
|
||||||
<image
|
<image @click="goUserInfo" :src="userMes.avatar" v-if="userMes.avatar != null"
|
||||||
@click="goUserInfo"
|
class="per_mes_img color_shandow"></image>
|
||||||
:src="userMes.avatar"
|
|
||||||
v-if="userMes.avatar != null"
|
|
||||||
class="per_mes_img color_shandow"
|
|
||||||
></image>
|
|
||||||
<view class="user_vip_box">
|
<view class="user_vip_box">
|
||||||
<view v-if="userMes.vip == 1" class="user_vip super">超级VIP</view>
|
<view v-if="userMes.vip == 1" class="user_vip super">超级VIP</view>
|
||||||
<view v-if="userMes.vip == 3" class="user_vip">众妙之门VIP</view>
|
<view v-if="userMes.vip == 3" class="user_vip">众妙之门VIP</view>
|
||||||
<view v-if="userMes.vip == 2" class="user_vip">吴门医述VIP</view>
|
<view v-if="userMes.vip == 2" class="user_vip">吴门医述VIP</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<image
|
<image src="@/static/icon/home_icon_logo.png" v-if="userMes.avatar == null"
|
||||||
src="@/static/icon/home_icon_logo.png"
|
class="per_mes_img color_shandow"></image>
|
||||||
v-if="userMes.avatar == null"
|
|
||||||
class="per_mes_img color_shandow"
|
|
||||||
></image>
|
|
||||||
|
|
||||||
<view class="userInfoBox" style="width: calc(100% - 220rpx)">
|
<view class="userInfoBox" style="width: calc(100% - 220rpx)">
|
||||||
<template>
|
<template>
|
||||||
<view class="name"
|
<view class="name">昵称:{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
|
||||||
>昵称:{{ userMes.nickname ? userMes.nickname : "未设置" }}</view
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="userMes.tel">
|
<template v-if="userMes.tel">
|
||||||
@@ -64,39 +43,23 @@
|
|||||||
<br clear="both" />
|
<br clear="both" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view style="
|
||||||
style="
|
|
||||||
padding: 20rpx; overflow: hidden;
|
padding: 20rpx; overflow: hidden;
|
||||||
"
|
">
|
||||||
>
|
|
||||||
<!-- vip 只有安卓才显示-->
|
<!-- vip 只有安卓才显示-->
|
||||||
<view v-if="isAndorid"
|
<view v-if="isAndorid" class="chong_zhi boxShadow box_fillet vip_box"
|
||||||
class="chong_zhi boxShadow box_fillet vip_box"
|
@click="onPageJump('/pages/mine/vip/index')">
|
||||||
@click="onPageJump('/pages/mine/vip/index')"
|
|
||||||
>
|
|
||||||
<view v-if="!userMes.userVip" class="noVip">
|
<view v-if="!userMes.userVip" class="noVip">
|
||||||
<view class="zhanghu PM_font" style="text-align: left">
|
<view class="zhanghu PM_font" style="text-align: left">
|
||||||
<image
|
<image class="vip_image" src="@/static/vip.png" mode="aspectFit">
|
||||||
class="vip_image"
|
|
||||||
src="@/static/vip.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<text style="color: #fff; font-size: 60rpx;">VIP</text>
|
<text style="color: #fff; font-size: 60rpx;">VIP</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="width:calc(100% - 200rpx);">
|
<view class="" style="width:calc(100% - 200rpx);">
|
||||||
<swiper
|
<swiper :autoplay="true" :interval="3000" :duration="1000"
|
||||||
:autoplay="true"
|
style="width:100%; height: 60rpx">
|
||||||
:interval="3000"
|
<swiper-item v-for="(item, index) in swiperList" style="width: 100%; height: 100%">
|
||||||
:duration="1000"
|
<view style="
|
||||||
style="width:100%; height: 60rpx"
|
|
||||||
>
|
|
||||||
<swiper-item
|
|
||||||
v-for="(item, index) in swiperList"
|
|
||||||
style="width: 100%; height: 100%"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
style="
|
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
130deg,
|
130deg,
|
||||||
rgb(46, 103, 106) 0%,
|
rgb(46, 103, 106) 0%,
|
||||||
@@ -104,10 +67,7 @@
|
|||||||
)
|
)
|
||||||
text;
|
text;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
"
|
" :style="item.style" v-html="item.name"></view>
|
||||||
:style="item.style"
|
|
||||||
v-html="item.name"
|
|
||||||
></view>
|
|
||||||
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
|
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -115,18 +75,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-else class="noVip hasVip">
|
<view v-else class="noVip hasVip">
|
||||||
<view class="zhanghu PM_font" style="text-align: center">
|
<view class="zhanghu PM_font" style="text-align: center">
|
||||||
<image
|
<image class="vip_image" src="@/static/vip.png" mode="aspectFit">
|
||||||
class="vip_image"
|
|
||||||
src="@/static/vip.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<text style="color: #fff; font-size: 60rpx;">VIP</text>
|
<text style="color: #fff; font-size: 60rpx;">VIP</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="time"
|
<view class="time">{{ userMes.userVip.endTime.split(" ")[0] }}到期</view>
|
||||||
>{{ userMes.userVip.endTime.split(" ")[0] }}到期</view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
@@ -140,22 +94,15 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="chong_list">
|
<view class="chong_list">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view
|
<view class="chong_list_item" style="
|
||||||
class="chong_list_item"
|
|
||||||
style="
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
"
|
" @click="onPageJump('/pages/mine/wallet/index/index')">
|
||||||
@click="onPageJump('/pages/mine/wallet/index/index')"
|
|
||||||
>
|
|
||||||
<view class="pay_item_img">
|
<view class="pay_item_img">
|
||||||
天医币<u-icon
|
天医币<u-icon @click.native.stop="openInfo()" name="question-circle"
|
||||||
@click.native.stop="openInfo()"
|
style="float: right; margin: 0 6rpx"></u-icon>
|
||||||
name="question-circle"
|
|
||||||
style="float: right; margin: 0 6rpx"
|
|
||||||
></u-icon>
|
|
||||||
<!-- <image
|
<!-- <image
|
||||||
style="width: 100%; height: 100%"
|
style="width: 100%; height: 100%"
|
||||||
src="@/static/icon/pay_3.png"
|
src="@/static/icon/pay_3.png"
|
||||||
@@ -169,16 +116,12 @@
|
|||||||
}}</view>
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view class="chong_list_item" style="
|
||||||
class="chong_list_item"
|
|
||||||
style="
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
"
|
" @click="onPageJump('/pages/mine/wallet/jf/index')">
|
||||||
@click="onPageJump('/pages/mine/wallet/jf/index')"
|
|
||||||
>
|
|
||||||
<view class="pay_item_img">
|
<view class="pay_item_img">
|
||||||
积分
|
积分
|
||||||
<!-- <image
|
<!-- <image
|
||||||
@@ -201,39 +144,25 @@
|
|||||||
优惠券
|
优惠券
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <b class="chong_btn" @click="onPageJump('../sdkDemo/pay')">充 值</b> -->
|
<!-- <b class="chong_btn" @click="onPageJump('../sdkDemo/pay')">充 值</b> -->
|
||||||
<view
|
<view class="chong_list_item" style="
|
||||||
class="chong_list_item"
|
|
||||||
style="
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
"
|
">
|
||||||
>
|
<view class="chong_btn" v-if="iosHide"
|
||||||
<view
|
@click="onPageJump('/pages/mine/wallet/recharge/index')">充 值</view>
|
||||||
class="chong_btn"
|
</view>
|
||||||
v-if="iosHide"
|
|
||||||
@click="onPageJump('/pages/mine/wallet/recharge/index')"
|
|
||||||
>充 值</view
|
|
||||||
></view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="list_box">
|
<view class="list_box">
|
||||||
<view class="xiugai boxShadow box_fillet">
|
<view class="xiugai boxShadow box_fillet">
|
||||||
<common-list
|
<common-list :dataList="pageList" @hancleClick="handleClickTab" label="name">
|
||||||
:dataList="pageList"
|
|
||||||
@hancleClick="handleClickTab"
|
|
||||||
label="name"
|
|
||||||
>
|
|
||||||
<template slot="rightSlot" slot-scope="slotProps">
|
<template slot="rightSlot" slot-scope="slotProps">
|
||||||
<text
|
<text class="fdButtonBox aui-text-success"
|
||||||
class="fdButtonBox aui-text-success"
|
style="line-height: 40rpx">{{ slotProps.row.content }}</text>
|
||||||
style="line-height: 40rpx"
|
|
||||||
>{{ slotProps.row.content }}</text
|
|
||||||
>
|
|
||||||
|
|
||||||
<view> </view>
|
<view> </view>
|
||||||
</template>
|
</template>
|
||||||
@@ -242,13 +171,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-modal
|
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow = false"
|
||||||
:show="signShow"
|
@confirm="signOut">
|
||||||
:content="signContent"
|
|
||||||
:showCancelButton="true"
|
|
||||||
@cancel="signShow = false"
|
|
||||||
@confirm="signOut"
|
|
||||||
>
|
|
||||||
</u-modal>
|
</u-modal>
|
||||||
<!-- 分享弹窗 -->
|
<!-- 分享弹窗 -->
|
||||||
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
||||||
@@ -267,27 +191,18 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view
|
<view class="button_box" style="
|
||||||
class="button_box"
|
|
||||||
style="
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
"
|
">
|
||||||
>
|
|
||||||
<!-- <u-button
|
<!-- <u-button
|
||||||
size="small"
|
size="small"
|
||||||
text="不同意"
|
text="不同意"
|
||||||
@click="protocolShow=false"
|
@click="protocolShow=false"
|
||||||
></u-button> -->
|
></u-button> -->
|
||||||
<u-button
|
<u-button style="width: 200rpx; float: center" :plain="true" text="知道啦" color="#9b9b9b"
|
||||||
style="width: 200rpx; float: center"
|
size="small" @click="infoShow = false"></u-button>
|
||||||
:plain="true"
|
|
||||||
text="知道啦"
|
|
||||||
color="#9b9b9b"
|
|
||||||
size="small"
|
|
||||||
@click="infoShow = false"
|
|
||||||
></u-button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -305,21 +220,37 @@
|
|||||||
import musicPlay from "@/components/music.vue";
|
import musicPlay from "@/components/music.vue";
|
||||||
import $http from "@/config/requestConfig.js";
|
import $http from "@/config/requestConfig.js";
|
||||||
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
|
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
|
||||||
import { mapState, mapMutations } from "vuex";
|
import {
|
||||||
|
mapState,
|
||||||
|
mapMutations
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperList: [
|
swiperList: [{
|
||||||
{ name: "开通会员畅享更多活动",style:"color:#fff;font-size:28rpx" },
|
name: "开通会员畅享更多活动",
|
||||||
{ name: "众妙之门视频",style:"color:#fff;font-size:28rpx" },
|
style: "color:#fff;font-size:28rpx"
|
||||||
{
|
|
||||||
name: "吴门医述视频",style:"color:#fff;font-size:28rpx"
|
|
||||||
},
|
},
|
||||||
{ name: "专属视频视听",style:"color:#fff;font-size:28rpx" },
|
|
||||||
{
|
{
|
||||||
name: "读书相关权益",style:"color:#fff;font-size:28rpx"
|
name: "众妙之门视频",
|
||||||
|
style: "color:#fff;font-size:28rpx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "吴门医述视频",
|
||||||
|
style: "color:#fff;font-size:28rpx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "专属视频视听",
|
||||||
|
style: "color:#fff;font-size:28rpx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "读书相关权益",
|
||||||
|
style: "color:#fff;font-size:28rpx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "活动报名<text style='color:#ffaa7f'>(折扣价)</text>",
|
||||||
|
style: "color:#fff;font-size:28rpx"
|
||||||
},
|
},
|
||||||
{ name: "活动报名<text style='color:#ffaa7f'>(折扣价)</text>" ,style:"color:#fff;font-size:28rpx"},
|
|
||||||
],
|
],
|
||||||
infoShow: false, // 显示电子书相关
|
infoShow: false, // 显示电子书相关
|
||||||
showEbook: false, // 显示电子书相关
|
showEbook: false, // 显示电子书相关
|
||||||
@@ -331,8 +262,7 @@ export default {
|
|||||||
monitorShow: false, // 其他管理是否显示班级入口
|
monitorShow: false, // 其他管理是否显示班级入口
|
||||||
isAndorid: true,
|
isAndorid: true,
|
||||||
platform: null, // 设备系统
|
platform: null, // 设备系统
|
||||||
pageList: [
|
pageList: [{
|
||||||
{
|
|
||||||
name: "我的订单",
|
name: "我的订单",
|
||||||
url: "/pages/bookShop/orderList?type=mine",
|
url: "/pages/bookShop/orderList?type=mine",
|
||||||
|
|
||||||
@@ -365,7 +295,11 @@ export default {
|
|||||||
url: "/pages/mine/aboutUs/index",
|
url: "/pages/mine/aboutUs/index",
|
||||||
type: "pageJump",
|
type: "pageJump",
|
||||||
},
|
},
|
||||||
{ name: "问题反馈/申诉", url: "/pages/user/workOrder", type: "workOrder" },
|
{
|
||||||
|
name: "问题反馈/申诉",
|
||||||
|
url: "/pages/user/workOrder",
|
||||||
|
type: "workOrder"
|
||||||
|
},
|
||||||
// { name: "退出登录", type: "quitLogin" },
|
// { name: "退出登录", type: "quitLogin" },
|
||||||
// { name: "注销帐号", type: "loginOut" },
|
// { name: "注销帐号", type: "loginOut" },
|
||||||
],
|
],
|
||||||
@@ -380,14 +314,15 @@ export default {
|
|||||||
this.platform = uni.getSystemInfoSync().platform;
|
this.platform = uni.getSystemInfoSync().platform;
|
||||||
// console.log('操纵系统',this.platform)
|
// console.log('操纵系统',this.platform)
|
||||||
// #endif
|
// #endif
|
||||||
this.getData();
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
//页面显示
|
//页面显示
|
||||||
onShow() {
|
onShow() {
|
||||||
console.log(this.userInfo, "11111111111111");
|
// console.log(this.userInfo, "11111111111111");
|
||||||
|
this.getData();
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
// uni.hideTabBar();
|
// uni.hideTabBar();
|
||||||
},
|
},
|
||||||
@@ -499,6 +434,7 @@ export default {
|
|||||||
return item.name == '主任教学'
|
return item.name == '主任教学'
|
||||||
})
|
})
|
||||||
console.log('主任找到了么', n);
|
console.log('主任找到了么', n);
|
||||||
|
if (!n) {
|
||||||
// this.directorShow = true : this.directorShow = false
|
// this.directorShow = true : this.directorShow = false
|
||||||
var item = {
|
var item = {
|
||||||
// { // 主任之外的人显示班级管理
|
// { // 主任之外的人显示班级管理
|
||||||
@@ -509,12 +445,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.pageList.splice(3, 0, item);
|
this.pageList.splice(3, 0, item);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
var zhurenIndex = this.pageList.findIndex(item => {
|
||||||
|
return item.name == '主任教学'
|
||||||
|
})
|
||||||
|
if (zhurenIndex > -1) {
|
||||||
|
this.pageList.splice(zhurenIndex, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
if (res.isMonitor) {
|
if (res.isMonitor) {
|
||||||
var n = this.pageList.find(item => {
|
var n = this.pageList.find(item => {
|
||||||
return item.name == '班级管理'
|
return item.name == '班级管理'
|
||||||
})
|
})
|
||||||
console.log('班长n找到了么', n);
|
console.log('班长n找到了么', n);
|
||||||
// this.directorShow = true : this.directorShow = false
|
if (!n) {
|
||||||
var item = {
|
var item = {
|
||||||
// 主任之外的人显示班级管理
|
// 主任之外的人显示班级管理
|
||||||
name: "班级管理",
|
name: "班级管理",
|
||||||
@@ -524,9 +468,37 @@ export default {
|
|||||||
}
|
}
|
||||||
this.pageList.splice(3, 0, item);
|
this.pageList.splice(3, 0, item);
|
||||||
}
|
}
|
||||||
// ?
|
} else {
|
||||||
// res.isMonitor ? this.monitorShow = true : this.monitorShow = false
|
var zhurenIndex = this.pageList.findIndex(item => {
|
||||||
|
return item.name == '班级管理'
|
||||||
|
})
|
||||||
|
if (zhurenIndex > -1) {
|
||||||
|
this.pageList.splice(zhurenIndex, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!res.isMonitor && !res.isDirector){
|
||||||
|
var n = this.pageList.find(item => {
|
||||||
|
return item.name == '我的班级'
|
||||||
|
})
|
||||||
|
console.log('我的班级找到了么', n);
|
||||||
|
if (!n) {
|
||||||
|
var item = {
|
||||||
|
// 主任之外的人显示班级管理
|
||||||
|
name: "我的班级",
|
||||||
|
url: "/pages/miniClass/myClassList?type=mine",
|
||||||
|
type: "pageJump",
|
||||||
|
|
||||||
|
}
|
||||||
|
this.pageList.splice(3, 0, item);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
var yonghuIndex = this.pageList.findIndex(item => {
|
||||||
|
return item.name == '班级管理'
|
||||||
|
})
|
||||||
|
if (yonghuIndex > -1) {
|
||||||
|
this.pageList.splice(yonghuIndex, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -675,6 +647,7 @@ export default {
|
|||||||
background-image: linear-gradient(90deg, #dfa964 0%, #7f5218 100%);
|
background-image: linear-gradient(90deg, #dfa964 0%, #7f5218 100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commonPageBox {
|
.commonPageBox {
|
||||||
// background-image: url("@/static/icon/mine_bg.png");
|
// background-image: url("@/static/icon/mine_bg.png");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@@ -682,6 +655,7 @@ export default {
|
|||||||
background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #fdf0ed 100%);
|
background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #fdf0ed 100%);
|
||||||
// background-color: #d8f8e4 !important;
|
// background-color: #d8f8e4 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chong_zhi {
|
.chong_zhi {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
// border-bottom-left-radius: 0rpx !important;
|
// border-bottom-left-radius: 0rpx !important;
|
||||||
@@ -703,12 +677,14 @@ background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%,
|
|||||||
color: $themeColor;
|
color: $themeColor;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noVip {
|
.noVip {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
|
||||||
// flex-direction: column;
|
// flex-direction: column;
|
||||||
.zhanghu {
|
.zhanghu {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
@@ -718,6 +694,7 @@ background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%,
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
// justify-content: space-around;
|
// justify-content: space-around;
|
||||||
image {
|
image {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
@@ -739,16 +716,19 @@ background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%,
|
|||||||
// ) !important;
|
// ) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.chong_list {
|
.chong_list {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chong_list_item {
|
.chong_list_item {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
@@ -846,6 +826,7 @@ background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%,
|
|||||||
background-color: #f0f9fb;
|
background-color: #f0f9fb;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vip_box {
|
.vip_box {
|
||||||
margin-bottom: 32rpx;
|
margin-bottom: 32rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -907,6 +888,7 @@ uni-page-body {
|
|||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
margin-top: -10rpx;
|
margin-top: -10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pay_item_img {
|
.pay_item_img {
|
||||||
display: flex;
|
display: flex;
|
||||||
color: #333;
|
color: #333;
|
||||||
@@ -923,12 +905,14 @@ uni-page-body {
|
|||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
//margin-top:-10rpx;
|
//margin-top:-10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup_box {
|
.popup_box {
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
width: 88vw;
|
width: 88vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
@@ -966,6 +950,7 @@ uni-page-body {
|
|||||||
color: #b0b0b0;
|
color: #b0b0b0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.button_box {
|
.button_box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -981,6 +966,7 @@ uni-page-body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_vip_box {
|
.user_vip_box {
|
||||||
min-width: 130rpx;
|
min-width: 130rpx;
|
||||||
|
|
||||||
@@ -990,6 +976,7 @@ uni-page-body {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_vip {
|
.user_vip {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -1000,6 +987,7 @@ uni-page-body {
|
|||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
|
background: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.super {
|
.super {
|
||||||
background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%);
|
background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%);
|
||||||
color: #f4f2e4;
|
color: #f4f2e4;
|
||||||
|
|||||||
@@ -2,31 +2,545 @@
|
|||||||
<view>
|
<view>
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-nav-bar title="班级详情"></z-nav-bar>
|
<z-nav-bar title="班级详情"></z-nav-bar>
|
||||||
|
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
||||||
|
<view class="mainContent" v-if="thisClass.id">
|
||||||
|
<view class="className">
|
||||||
|
<h3>{{thisClass.title}}</h3>
|
||||||
|
<text class="kaiban" v-if="thisClass.state == '0' && isMonitor">开班</text>
|
||||||
|
<text class="jieban" v-if="thisClass.state == '1' && isMonitor">结班</text>
|
||||||
|
<text class="tuichu" v-if="!isMonitor && !isDirector && isHave" @click="outClass">退出班级</text>
|
||||||
|
</view>
|
||||||
|
<view class="otherItems flex_box">
|
||||||
|
<view><text class="ciyao">创建日期</text><text
|
||||||
|
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text></view>
|
||||||
|
<view><text class="ciyao">班级类型</text>
|
||||||
|
<text class="mainTxt" v-if="classModel.type == '0'">普通小班</text>
|
||||||
|
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
|
||||||
|
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
||||||
|
</view>
|
||||||
|
<view><text class="ciyao">班级人数</text><text class="mainTxt">{{thisClass.number}}人</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="guanli">
|
||||||
|
<view class="item">
|
||||||
|
<text class="adminName">班长:</text>
|
||||||
|
<view class="personbox" v-if="admins.monitor.id">
|
||||||
|
<text>{{admins.monitor.user.nickname != null && admins.monitor.user.nickname != '' ? admins.monitor.user.nickname : '匿名用户'}}</text>
|
||||||
|
<text v-if="admins.monitor.id">({{admins.monitor.user.tel}})</text>
|
||||||
|
</view>
|
||||||
|
<text v-else>暂未设置</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<text class="adminName">副班长:</text>
|
||||||
|
<view class="personbox" v-if="admins.dmonitor.id">
|
||||||
|
<text>{{admins.dmonitor.user.nickname != null && admins.dmonitor.user.nickname != '' ? admins.dmonitor.user.nickname : '匿名用户'}}</text>
|
||||||
|
<text>({{admins.dmonitor.user.tel}})</text>
|
||||||
|
</view>
|
||||||
|
<text v-else>暂未设置</text>
|
||||||
|
</view>
|
||||||
|
<view class="item"><text class="adminName">学习委员:</text>
|
||||||
|
<view class="personbox" v-if="admins.learner.id">
|
||||||
|
<text>{{admins.learner.user.nickname != null && admins.learner.user.nickname != '' ? admins.learner.user.nickname : '匿名用户'}}</text>
|
||||||
|
<text>({{admins.learner.user.tel}})</text>
|
||||||
|
</view>
|
||||||
|
<text v-else>暂未设置</text>
|
||||||
|
</view>
|
||||||
|
<view class="item arryItem"><text class="adminName">记分员:</text>
|
||||||
|
<template v-if="admins.counter.length > 0">
|
||||||
|
<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
|
||||||
|
<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
|
||||||
|
<text>({{item.user.tel}}) </text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<text v-else>暂未设置</text>
|
||||||
|
</view>
|
||||||
|
<view class="item arryItem"><text class="adminName">评分员:</text>
|
||||||
|
<template v-if="admins.scorer.length > 0">
|
||||||
|
<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
|
||||||
|
<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
|
||||||
|
<text>({{item.user.tel}}) </text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<text v-else>暂未设置</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" >
|
||||||
|
<text class="adminName">教学目标/班级简介</text>
|
||||||
|
</view>
|
||||||
|
<view class="banjiJianjie" v-html="thisClass.content"></view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="mainBox">
|
||||||
|
<view class="">
|
||||||
|
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="tabClick" :current="curTagIndex"
|
||||||
|
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
||||||
|
itemStyle="padding-left:10rpx; background-color:#fff; padding-right: 10rpx; height: 50px; font-size:26rpx"></u-tabs>
|
||||||
|
</view>
|
||||||
|
<!-- 课程列表 -->
|
||||||
|
<view class="newBox" v-show="courses.length > 0 && tabId == '0'">
|
||||||
|
<view class="item flexbox" v-for="(item, index) in courses" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||||
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
|
<view class="imgcontainer">
|
||||||
|
<image :src="item.image" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="buyItems">
|
||||||
|
<view class="txt555">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
<view class="jianjie" v-html="item.content"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-show="courses.length == 0 && tabId == '0'">
|
||||||
|
<u-divider text="暂无课程"></u-divider>
|
||||||
|
</view>
|
||||||
|
<!-- 班内问答 -->
|
||||||
|
<view class="" v-if=" tabId == '1'">
|
||||||
|
班内问答
|
||||||
|
</view>
|
||||||
|
<!-- 班内同学 -->
|
||||||
|
<view class="classMateBox" v-show="students.length> 0 && tabId == '2'">
|
||||||
|
<view class="newBox" >
|
||||||
|
<view
|
||||||
|
:class="['item','flexbox',
|
||||||
|
item.vip == '1' ? 'superVip' : '',
|
||||||
|
item.vip == '2' ? 'wumenVip' : '',
|
||||||
|
item.vip == '3' ? 'zmVip' : '']" v-for="(item, index) in students" :key="index">
|
||||||
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
|
<view class="classmateImg">
|
||||||
|
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar" mode="aspectFit"></image>
|
||||||
|
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="textItems flex_box">
|
||||||
|
<text class="txt555" v-if="item.nickname != null && item.nickname != ''">
|
||||||
|
{{item.nickname}}
|
||||||
|
</text>
|
||||||
|
<text class="txt555" v-else>
|
||||||
|
匿名用户
|
||||||
|
</text>
|
||||||
|
<text class="userType" v-if="item.vip == '1'">超级VIP用户</text>
|
||||||
|
<text class="userType" v-if="item.vip == '2' ">医学VIP用户</text>
|
||||||
|
<text class="userType" v-if="item.vip == '3' ">国学VIP用户</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-show="students.length == 0 && tabId == '2'">
|
||||||
|
<u-divider text="暂无学员加入"></u-divider>
|
||||||
|
</view>
|
||||||
|
<!-- 班内提交 -->
|
||||||
|
<view class="" v-if=" tabId == '3'">
|
||||||
|
班内提交
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottomBox" v-if="!isHave && !isDirector && !isMonitor">
|
||||||
|
<button type="primary" size="mini" @click="addClass">一键加入班级</button>
|
||||||
|
</view>
|
||||||
|
<!-- </view> -->
|
||||||
<z-navigation></z-navigation>
|
<z-navigation></z-navigation>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
thisClass: {},
|
||||||
|
students: [],
|
||||||
|
tabId:'0',
|
||||||
|
curTagIndex: 0,
|
||||||
|
scrollable: false,
|
||||||
|
tabList: [{
|
||||||
|
name: '班内课程',
|
||||||
|
id: '0'
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '班内讨论',
|
||||||
|
// id: '1'
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: '班内学员',
|
||||||
|
id: '2'
|
||||||
|
}, {
|
||||||
|
name: '班内提交',
|
||||||
|
id: '3'
|
||||||
|
}],
|
||||||
|
admins: {
|
||||||
|
list: [],
|
||||||
|
monitor: {},
|
||||||
|
dmonitor: {},
|
||||||
|
learner: {},
|
||||||
|
scorer: [],
|
||||||
|
counter: []
|
||||||
|
|
||||||
|
},
|
||||||
|
activeStyle: {
|
||||||
|
color: '#333',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
// transform: 'scale(1.2)',
|
||||||
|
// backgroundColor: '#258feb'
|
||||||
|
|
||||||
|
},
|
||||||
|
classModel:{},
|
||||||
|
courses: [],
|
||||||
|
classId: undefined,
|
||||||
|
refresh: true,
|
||||||
|
userMes:{},
|
||||||
|
isMonitor:false, // 是管理者
|
||||||
|
isDirector:false, // 是主任
|
||||||
|
isHave:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(e) {
|
||||||
|
this.classId = e.id
|
||||||
|
this.getUserInfo()
|
||||||
|
this.getClassInfo()
|
||||||
|
if(e.have == 'isNotHave'){
|
||||||
|
this.isHave = false // 未加入
|
||||||
|
}else if(e.have == 'have'){
|
||||||
|
this.isHave = true // 已加入
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getClassInfo(){
|
getUserInfo() {
|
||||||
|
// 获取个人信息
|
||||||
|
if (this.userInfo.id != undefined) {
|
||||||
|
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||||
|
this.userMes = res.result;
|
||||||
|
this.isMonitor = res.isMonitor
|
||||||
|
this.isDirector = res.isDirector
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title:'获取用户信息失败',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 跳转
|
||||||
|
onPageJump(url,id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `${url}?id=${id}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
tabClick(e) {
|
||||||
|
console.log('e', e);
|
||||||
|
this.tabId = e.id
|
||||||
|
},
|
||||||
|
// 加入班级
|
||||||
|
addClass(){
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/joinClass",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"classId": this.classId ,
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.isHave = true
|
||||||
|
uni.showToast({
|
||||||
|
title: `加入成功!`,
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.getClassInfo()
|
||||||
|
},200)
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
// this.status = 3
|
||||||
|
uni.showToast({
|
||||||
|
title: `加入失败`,
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 退出班级
|
||||||
|
outClass(){
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您即将退出当前班级,是否继续?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
// console.log('用户点击确定');
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/quitClass",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"classId": this.classId ,
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.isHave = true
|
||||||
|
uni.showToast({
|
||||||
|
title: `退出成功!`,
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
|
||||||
|
},200)
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
// this.status = 3
|
||||||
|
uni.showToast({
|
||||||
|
title: `退出失败`,
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getClassInfo() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '正在加载'
|
||||||
|
})
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/getClassInfo",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
"classId": this.classId // 班类型 0小班 1联合班 2精英班
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
this.refresh = false
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.thisClass = res.result.class
|
||||||
|
this.admins.list = res.result.admins
|
||||||
|
this.admins.monitor = {}
|
||||||
|
this.admins.dmonitor = {}
|
||||||
|
this.admins.learner = {}
|
||||||
|
this.admins.scorer = []
|
||||||
|
this.admins.counter = []
|
||||||
|
if (res.result.admins.length > 0) {
|
||||||
|
res.result.admins.forEach(item => {
|
||||||
|
if (item.role == '1') {
|
||||||
|
this.admins.monitor = item
|
||||||
|
}
|
||||||
|
if (item.role == '2') {
|
||||||
|
this.admins.dmonitor = item
|
||||||
|
}
|
||||||
|
if (item.role == '3') {
|
||||||
|
this.admins.learner = item
|
||||||
|
}
|
||||||
|
if (item.role == '4') {
|
||||||
|
// console.log('this.admins.counter',this.admins.counter);
|
||||||
|
this.admins.scorer.push(item)
|
||||||
|
}
|
||||||
|
if (item.role == '5') {
|
||||||
|
// console.log('this.admins.counter',this.admins.counter);
|
||||||
|
this.admins.counter.push(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.classModel = res.result.classModel
|
||||||
|
this.courses = res.result.courses
|
||||||
|
this.students = res.result.students
|
||||||
|
this.refresh = true
|
||||||
|
|
||||||
|
}
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(e => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
// this.status = 3
|
||||||
|
uni.showToast({
|
||||||
|
title: `获取数据失败`,
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
|
@import "@/style/mixin.scss";
|
||||||
|
|
||||||
|
.flexbox{display: flex;}
|
||||||
|
.bottomBox{position: fixed; padding: 20rpx 0; text-align: center; bottom: 100rpx; left: 0; z-index: 2; width: 100%; background-color: #fff;
|
||||||
|
button{width: 80%; }
|
||||||
|
}
|
||||||
|
.mainContent {
|
||||||
|
color: #333;
|
||||||
|
padding: 0 20rpx; padding-bottom: 20rpx;
|
||||||
|
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
.classMateBox{
|
||||||
|
.zmVip{background-image: linear-gradient(-60deg, #53966a 0%, #e1feef 50%, #e1feef 100%);}
|
||||||
|
.wumenVip{background-image: linear-gradient(-60deg, #578df0 0%, #f1f4fd 50%, #f1f4fd 100%);}
|
||||||
|
.superVip{background-image: linear-gradient(-60deg, #965af0 0%, #fdf0ed 50%, #fdf0ed 100%);}
|
||||||
|
.item{width: 100%; position: relative;
|
||||||
|
.textItems{width: 100%; align-items: center;
|
||||||
|
.txt555{font-size: 28rpx; color: #333; }
|
||||||
|
.userType{position: absolute; right: 30rpx; top: 30rpx; color: #fff;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.classmateImg{width:80rpx; margin-right: 40rpx; height: 80rpx; border-radius: 100rpx;
|
||||||
|
image{
|
||||||
|
width:80rpx; height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.mainBox{
|
||||||
|
margin-top: 40rpx;
|
||||||
|
.tabList{border-radius: 20rpx; overflow: hidden; margin-bottom: 20rpx;}
|
||||||
|
// background-color: #f4f7ff;
|
||||||
|
}
|
||||||
|
.newBox {
|
||||||
|
|
||||||
|
.item {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
@include ptop_bottm(10px);
|
||||||
|
@include pleft_right(10px);
|
||||||
|
|
||||||
|
@include mshadow(10px, 1)
|
||||||
|
.imgcontainer {
|
||||||
|
display: block;
|
||||||
|
width: 80rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
// background-size: cover;
|
||||||
|
// background-position: center;
|
||||||
|
height: 120rpx;
|
||||||
|
flex-grow: 1;
|
||||||
|
// @include ptop_bottm(10px);
|
||||||
|
overflow: hidden;
|
||||||
|
// @include pleft_right(10px);
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn_box{ text-align: right;
|
||||||
|
text{
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 3px 5px; @include theme("btn_bg");
|
||||||
|
font-size: 28rpx; color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.buyItems {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jianjie {
|
||||||
|
line-height: 30rpx; height: 60rpx; overflow: hidden;
|
||||||
|
overflow: hidden!important;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
@include bov();
|
||||||
|
color: #9c9c9c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txt555 {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #000;
|
||||||
|
@include bov()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.otherItems {
|
||||||
|
// border: 1px solid #dadada;
|
||||||
|
padding: 20rpx; background-color: rgba(255, 255, 255, .5);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 20rpx 0;
|
||||||
|
text {
|
||||||
|
display: block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ciyao {
|
||||||
|
color: #999;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.guanli {
|
||||||
|
.item { color: #333;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.personbox {
|
||||||
|
display: inline-block; color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.arryItem {
|
||||||
|
.arryItemSub {
|
||||||
|
display: inline-block; color: #666;
|
||||||
|
// padding-left: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.adminName {color: #333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.banjiJianjie{ color: #666; font-size: 30rpx; margin-top: 20rpx;}
|
||||||
|
.className {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #fff;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 20rpx;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
text.kaiban {
|
||||||
|
background-color: #67c23a;
|
||||||
|
}
|
||||||
|
|
||||||
|
text.jieban {
|
||||||
|
background-color: $themeColor
|
||||||
|
}
|
||||||
|
text.tuichu {
|
||||||
|
background-color: #f4a2a6;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -173,20 +173,6 @@
|
|||||||
surl(imageurl) {
|
surl(imageurl) {
|
||||||
return `url(${imageurl})`
|
return `url(${imageurl})`
|
||||||
},
|
},
|
||||||
goCreateClass(){
|
|
||||||
console.log('this.addType',this.addType);
|
|
||||||
if(this.addType != undefined){
|
|
||||||
uni.navigateTo({
|
|
||||||
url:`/pages/miniClass/addClass?type=${this.addType}&name=add`
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
uni.showToast({
|
|
||||||
title:'请选择班级的类型',
|
|
||||||
icon:'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fatherClick(e) {
|
fatherClick(e) {
|
||||||
console.log('点击', e)
|
console.log('点击', e)
|
||||||
this.page = 1
|
this.page = 1
|
||||||
@@ -202,11 +188,6 @@
|
|||||||
this.getData(this.subTabId);
|
this.getData(this.subTabId);
|
||||||
},
|
},
|
||||||
getData(id) {
|
getData(id) {
|
||||||
// if (!this.flag) {
|
|
||||||
// console.log('正在执行,未完成')
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.status = 1
|
this.status = 1
|
||||||
this.flag = false
|
this.flag = false
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -218,6 +199,7 @@
|
|||||||
data: {
|
data: {
|
||||||
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
||||||
"type": this.curTagId // 班类型 0小班 1联合班 2精英班
|
"type": this.curTagId // 班类型 0小班 1联合班 2精英班
|
||||||
|
|
||||||
},
|
},
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|||||||
420
pages/miniClass/courseClassList.vue
Normal file
420
pages/miniClass/courseClassList.vue
Normal file
@@ -0,0 +1,420 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
<public-module></public-module>
|
||||||
|
<z-nav-bar title="班级列表">
|
||||||
|
</z-nav-bar>
|
||||||
|
<view style="padding: 20rpx; background-color: #fff; border-bottom: 1px solid #eee;">当前课程:{{courseTitle}}</view>
|
||||||
|
<view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||||
|
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
||||||
|
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
||||||
|
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
||||||
|
</view>
|
||||||
|
<view class="containerBg">
|
||||||
|
<view class="subCate flex" v-if="subList.length> 0">
|
||||||
|
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
||||||
|
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="learnBox box">
|
||||||
|
<view class="newBox">
|
||||||
|
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" >
|
||||||
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
|
<view class="imgcontainer" v-if="item.icon != ''" @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
||||||
|
<image :src="item.icon" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="imgcontainer defaultImg" v-else @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
||||||
|
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="buyItems">
|
||||||
|
<view class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
<view class="jianjie">
|
||||||
|
目标学员人数:{{item.number}} 人
|
||||||
|
</view>
|
||||||
|
<!-- <view class="jianjie" v-html="item.content">
|
||||||
|
</view> -->
|
||||||
|
<view class="btn_box" >
|
||||||
|
<text @click="enterClass" v-show="item.state == '0'">一键加入</text>
|
||||||
|
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id,'isNotHave')">查看班内情况</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <u-divider v-show="status == 2" text="已加载全部"></u-divider>
|
||||||
|
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
|
||||||
|
<u-divider v-show="status == 1" text="加载中..."></u-divider> -->
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<!-- <u-back-top scroll-top="100"></u-back-top> -->
|
||||||
|
<u-back-top :scroll-top="scrollTop" bottom="150" :customStyle='bgiStyle'
|
||||||
|
:iconStyle="iconStyle"></u-back-top>
|
||||||
|
</view>
|
||||||
|
<z-navigation></z-navigation>
|
||||||
|
<!-- <music-play :playData="playData"></music-play> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import musicPlay from '@/components/music.vue'
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
var clear;
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
playData: {},
|
||||||
|
addType:undefined, // 小班类型
|
||||||
|
range:[
|
||||||
|
{ value: '0', text: "普通小班",name:"普通小班"},
|
||||||
|
{ value: '1', text: "联合班" ,name:"普通小班"},
|
||||||
|
{ value: '2', text: "精英班" ,name:"普通小班"},
|
||||||
|
],
|
||||||
|
tagId: null,
|
||||||
|
pid:null,
|
||||||
|
fixed: false,
|
||||||
|
pupShow:false,
|
||||||
|
fatherTabId: null,
|
||||||
|
subTabId: null, //
|
||||||
|
bgiStyle: {
|
||||||
|
background: '#fff'
|
||||||
|
},
|
||||||
|
iconStyle: {
|
||||||
|
fontSize: '40rpx',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: '#258feb',
|
||||||
|
},
|
||||||
|
scrollTop: 0,
|
||||||
|
activeStyle: {
|
||||||
|
color: '#000',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
transform: 'scale(1.2)',
|
||||||
|
// backgroundColor: '#258feb'
|
||||||
|
|
||||||
|
},
|
||||||
|
courseTitle:'',
|
||||||
|
subList: [{title:'待开班',id:'0'},{title:'已开班',id:'1'},{title:'已结班',id:'2'}],
|
||||||
|
scrollable: false,
|
||||||
|
pageTitle: '',
|
||||||
|
tabList: [
|
||||||
|
{name:'普通小班', id:'0'},{name:'联合班', id:'1'},{name:'精英班',id:'2'}],
|
||||||
|
curTagId: 0,
|
||||||
|
courseList: [],
|
||||||
|
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
||||||
|
page: 1,
|
||||||
|
flag: true, // 函数是否执行完
|
||||||
|
courseId:undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
//第一次加载
|
||||||
|
onLoad(e) {
|
||||||
|
// 隐藏原生的tabbar
|
||||||
|
uni.hideTabBar();
|
||||||
|
this.courseTitle = e.courseTitle
|
||||||
|
this.courseId = e.courseId
|
||||||
|
// this.tagId = e.id
|
||||||
|
this.curTagId = this.range[0].value
|
||||||
|
this.subTabId = this.subList[0].id
|
||||||
|
this.pageTitle = e.title
|
||||||
|
this.pid = e.pid
|
||||||
|
console.log(e, '传入分类id')
|
||||||
|
this.getData()
|
||||||
|
// this.getCateList(this.tagId)
|
||||||
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
this.scrollTop = e.scrollTop;
|
||||||
|
if (this.scrollTop >300) {
|
||||||
|
this.fixed = true
|
||||||
|
} else {
|
||||||
|
this.fixed = false
|
||||||
|
}
|
||||||
|
// console.log(this.scrollTop,'this.scrollTop')
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
console.log('下拉刷新')
|
||||||
|
// this.status = 3
|
||||||
|
// this.page = 1
|
||||||
|
this.courseList = []
|
||||||
|
this.getData()
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// if (this.status != 2 && this.flag) {
|
||||||
|
// this.page++
|
||||||
|
// this.getData(this.subTabId)
|
||||||
|
// }
|
||||||
|
console.log('触底加载', this.page)
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['userInfo'])
|
||||||
|
},
|
||||||
|
//页面显示
|
||||||
|
onShow() {
|
||||||
|
// 隐藏原生的tabbar
|
||||||
|
// uni.hideTabBar();
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
musicPlay
|
||||||
|
},
|
||||||
|
//方法
|
||||||
|
methods: {
|
||||||
|
// 加入班级
|
||||||
|
enterClass(){
|
||||||
|
|
||||||
|
},
|
||||||
|
selectChange(e){
|
||||||
|
console.log("e:", e);
|
||||||
|
},
|
||||||
|
closePup(){
|
||||||
|
this.pupShow = false
|
||||||
|
},
|
||||||
|
surl(imageurl) {
|
||||||
|
return `url(${imageurl})`
|
||||||
|
},
|
||||||
|
fatherClick(e) {
|
||||||
|
console.log('点击', e)
|
||||||
|
this.page = 1
|
||||||
|
// var item = e
|
||||||
|
this.curTagId = e.id
|
||||||
|
this.subTabId = this.subList[0].id
|
||||||
|
this.getData(this.subTabId);
|
||||||
|
},
|
||||||
|
curseClick(item) {
|
||||||
|
this.subTabId = item.id
|
||||||
|
this.courseList = []
|
||||||
|
this.page = 1
|
||||||
|
this.getData(this.subTabId);
|
||||||
|
},
|
||||||
|
getData(id) {
|
||||||
|
this.status = 1
|
||||||
|
this.flag = false
|
||||||
|
uni.showLoading({
|
||||||
|
title:'正在加载'
|
||||||
|
})
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/getClassByCourseIdNoUser",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
"courseId": Number(this.courseId),
|
||||||
|
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
||||||
|
"type": this.curTagId // 班类型 0小班 1联合班 2精英班
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
if (res.result.length > 0) {
|
||||||
|
this.courseList = res.result
|
||||||
|
}else{
|
||||||
|
this.courseList = []
|
||||||
|
}
|
||||||
|
this.flag = true
|
||||||
|
}
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(e => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.flag = true
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
// this.status = 3
|
||||||
|
uni.showToast({
|
||||||
|
title:`获取数据失败`,
|
||||||
|
icon:'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 跳转
|
||||||
|
onPageJump(url,id,have) {
|
||||||
|
// console.log('进来了',url,id);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `${url}?id=${id}&have=${have}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
shuomingPage(url,id,pid){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `${url}?id=${id}&pid=${pid}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@/style/mixin.scss';
|
||||||
|
/deep/.uni-select__selector{
|
||||||
|
top:unset;
|
||||||
|
bottom:calc(100% + 12px) ;
|
||||||
|
}
|
||||||
|
/deep/.uni-select{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
/deep/.uni-select__input-text{
|
||||||
|
font-size:14px;
|
||||||
|
color:#7f7f7f //修改为你的字体颜色
|
||||||
|
}
|
||||||
|
/deep/.uni-select__input-placeholder{
|
||||||
|
font-size:14px;
|
||||||
|
color:#7f7f7f //修改为你的字体颜色
|
||||||
|
}
|
||||||
|
/deep/.uni-popper__arrow{
|
||||||
|
top:unset;
|
||||||
|
bottom: -6px;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
/deep/.uni-popper__arrow::after{
|
||||||
|
top:0
|
||||||
|
}
|
||||||
|
.box6{
|
||||||
|
.btnBox{justify-content: center;}
|
||||||
|
}
|
||||||
|
.containerBg {
|
||||||
|
// background-color: $containerColor;
|
||||||
|
background-color: #f6f6f8;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.curseSet{margin-right: 20rpx; font-size: 28rpx; display: flex; align-items: center;}
|
||||||
|
.fixed {
|
||||||
|
position: fixed; top: 100rpx; border-bottom: 1px solid #eee;
|
||||||
|
z-index: 1; width: 100%; background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newBox {
|
||||||
|
|
||||||
|
.item {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
@include ptop_bottm(10px);
|
||||||
|
@include pleft_right(10px);
|
||||||
|
|
||||||
|
@include mshadow(10px, 1) .imgcontainer {
|
||||||
|
display: block;
|
||||||
|
width: 110rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
// background-size: cover;
|
||||||
|
// background-position: center;
|
||||||
|
height: 200rpx;
|
||||||
|
flex-grow: 1;
|
||||||
|
// @include ptop_bottm(10px);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
// @include pleft_right(10px);
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn_box{ text-align: right;
|
||||||
|
text{
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 3px 5px; @include theme("btn_bg");
|
||||||
|
font-size: 28rpx; color: #fff;
|
||||||
|
}
|
||||||
|
.seeInfo{background-color:#fff; background-image: none; border: 1px solid #666; color: #333; margin-left: 20rpx;}
|
||||||
|
}
|
||||||
|
.buyItems {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jianjie {
|
||||||
|
line-height: 30rpx; height: 60rpx; overflow: hidden;
|
||||||
|
overflow: hidden!important;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
@include bov();
|
||||||
|
color: #9c9c9c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txt555 {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #000;
|
||||||
|
@include bov()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.subCate {
|
||||||
|
padding-top:10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
.item {
|
||||||
|
border: 1px solid #bfcad9;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px; width: 100%;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
padding: 14rpx 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:last-child() {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.active {
|
||||||
|
border-color: $themeColor;
|
||||||
|
background-color: $themeColor;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabList {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flexbox {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgcontainer {
|
||||||
|
background-color: $imgBg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
// background-color: #fff;
|
||||||
|
min-height: calc(100vh - 270rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.learnBox {
|
||||||
|
// background-color: #fff;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.learn {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 48%;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txt555 {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
height: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 40rpx;
|
||||||
|
@include bov(1);
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="learnBox box">
|
<view class="learnBox box">
|
||||||
<view class="newBox">
|
<view class="newBox" v-if="classList.length > 0">
|
||||||
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" >
|
<view class="item flexbox" v-for="(item, index) in classList" :key="index" >
|
||||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
<view class="imgcontainer" v-if="item.icon != ''">
|
<view class="imgcontainer" v-if="item.icon != ''">
|
||||||
<image :src="item.icon" mode="aspectFit"></image>
|
<image :src="item.icon" mode="aspectFit"></image>
|
||||||
@@ -45,15 +45,16 @@
|
|||||||
<!-- <view class="jianjie" v-html="item.content">
|
<!-- <view class="jianjie" v-html="item.content">
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="btn_box" >
|
<view class="btn_box" >
|
||||||
<text @click="enterClass" v-show="item.state == '0'">一键加入</text>
|
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||||
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id)">查看班内情况</text>
|
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id)">进入班级</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <u-divider v-show="status == 2" text="已加载全部"></u-divider>
|
<u-divider v-else text="暂无数据"></u-divider>
|
||||||
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
|
<!-- <u-divider v-show="status == 2" text="已加载全部"></u-divider> -->
|
||||||
<u-divider v-show="status == 1" text="加载中..."></u-divider> -->
|
<!-- <u-divider v-show="status == 3" text="暂无数据"></u-divider> -->
|
||||||
|
<!-- <u-divider v-show="status == 1" text="加载中..."></u-divider> -->
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<!-- <u-back-top scroll-top="100"></u-back-top> -->
|
<!-- <u-back-top scroll-top="100"></u-back-top> -->
|
||||||
@@ -128,7 +129,7 @@
|
|||||||
tabList: [
|
tabList: [
|
||||||
{name:'普通小班', id:'0'},{name:'联合班', id:'1'},{name:'精英班',id:'2'}],
|
{name:'普通小班', id:'0'},{name:'联合班', id:'1'},{name:'精英班',id:'2'}],
|
||||||
curTagId: 0,
|
curTagId: 0,
|
||||||
courseList: [],
|
classList: [],
|
||||||
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
||||||
page: 1,
|
page: 1,
|
||||||
flag: true, // 函数是否执行完
|
flag: true, // 函数是否执行完
|
||||||
@@ -161,7 +162,7 @@
|
|||||||
console.log('下拉刷新')
|
console.log('下拉刷新')
|
||||||
// this.status = 3
|
// this.status = 3
|
||||||
// this.page = 1
|
// this.page = 1
|
||||||
this.courseList = []
|
this.classList = []
|
||||||
this.getData()
|
this.getData()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
},
|
||||||
@@ -222,7 +223,7 @@
|
|||||||
},
|
},
|
||||||
curseClick(item) {
|
curseClick(item) {
|
||||||
this.subTabId = item.id
|
this.subTabId = item.id
|
||||||
this.courseList = []
|
this.classList = []
|
||||||
this.page = 1
|
this.page = 1
|
||||||
this.getData(this.subTabId);
|
this.getData(this.subTabId);
|
||||||
},
|
},
|
||||||
@@ -251,16 +252,16 @@
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (res.classEntityList.length > 0) {
|
if (res.classEntityList.length > 0) {
|
||||||
this.courseList = res.classEntityList
|
this.classList = res.classEntityList
|
||||||
// var list = res.classEntityList
|
// var list = res.classEntityList
|
||||||
// this.courseList = this.courseList.concat(list)
|
// this.classList = this.classList.concat(list)
|
||||||
// if (res.courses.pages > this.page) {
|
// if (res.courses.pages > this.page) {
|
||||||
// this.status = 0
|
// this.status = 0
|
||||||
// } else {
|
// } else {
|
||||||
// this.status = 2
|
// this.status = 2
|
||||||
// }
|
// }
|
||||||
}else{
|
}else{
|
||||||
this.courseList = []
|
this.classList = []
|
||||||
}
|
}
|
||||||
// else if (this.page > 1) {
|
// else if (this.page > 1) {
|
||||||
// this.status = 2 // 加载完成
|
// this.status = 2 // 加载完成
|
||||||
|
|||||||
439
pages/miniClass/myClassList.vue
Normal file
439
pages/miniClass/myClassList.vue
Normal file
@@ -0,0 +1,439 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
<public-module></public-module>
|
||||||
|
<z-nav-bar title="主任教学">
|
||||||
|
<!-- <view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)"> -->
|
||||||
|
<!-- <uni-icons type="info" size="24"></uni-icons> 课程说明</view> -->
|
||||||
|
</z-nav-bar>
|
||||||
|
<view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||||
|
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
||||||
|
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
||||||
|
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
||||||
|
</view>
|
||||||
|
<view class="containerBg">
|
||||||
|
<view class="subCate flex" v-if="subList.length> 0">
|
||||||
|
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
||||||
|
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="learnBox box">
|
||||||
|
<view class="newBox" v-if="classList.length > 0">
|
||||||
|
<view class="item flexbox" v-for="(item, index) in classList" :key="index" >
|
||||||
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
|
<view class="imgcontainer" v-if="item.icon != ''">
|
||||||
|
<image :src="item.icon" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="imgcontainer defaultImg" v-else>
|
||||||
|
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="buyItems">
|
||||||
|
<view class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
<view class="jianjie">
|
||||||
|
目标学员人数:{{item.number}} 人
|
||||||
|
</view>
|
||||||
|
<!-- <view class="jianjie" v-html="item.content">
|
||||||
|
</view> -->
|
||||||
|
<view class="btn_box" >
|
||||||
|
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||||
|
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id,'have')">进入班级</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-divider v-else text="暂无数据"></u-divider>
|
||||||
|
<!-- <u-divider v-show="status == 2" text="已加载全部"></u-divider>
|
||||||
|
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
|
||||||
|
<u-divider v-show="status == 1" text="加载中..."></u-divider> -->
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<!-- <u-back-top scroll-top="100"></u-back-top> -->
|
||||||
|
<u-back-top :scroll-top="scrollTop" bottom="150" :customStyle='bgiStyle'
|
||||||
|
:iconStyle="iconStyle"></u-back-top>
|
||||||
|
</view>
|
||||||
|
<z-navigation></z-navigation>
|
||||||
|
<!-- <music-play :playData="playData"></music-play> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import musicPlay from '@/components/music.vue'
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
var clear;
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
playData: {},
|
||||||
|
addType:undefined, // 小班类型
|
||||||
|
range:[
|
||||||
|
{ value: '0', text: "普通小班",name:"普通小班"},
|
||||||
|
{ value: '1', text: "联合班" ,name:"普通小班"},
|
||||||
|
{ value: '2', text: "精英班" ,name:"普通小班"},
|
||||||
|
],
|
||||||
|
tagId: null,
|
||||||
|
pid:null,
|
||||||
|
fixed: false,
|
||||||
|
pupShow:false,
|
||||||
|
fatherTabId: null,
|
||||||
|
subTabId: null, //
|
||||||
|
bgiStyle: {
|
||||||
|
background: '#fff'
|
||||||
|
},
|
||||||
|
iconStyle: {
|
||||||
|
fontSize: '40rpx',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: '#258feb',
|
||||||
|
},
|
||||||
|
scrollTop: 0,
|
||||||
|
activeStyle: {
|
||||||
|
color: '#333',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
transform: 'scale(1.2)',
|
||||||
|
// backgroundColor: '#258feb'
|
||||||
|
|
||||||
|
},
|
||||||
|
subList: [{title:'待开班',id:'0'},{title:'已开班',id:'1'},{title:'已结班',id:'2'}],
|
||||||
|
scrollable: false,
|
||||||
|
pageTitle: '',
|
||||||
|
tabList: [
|
||||||
|
{name:'普通小班', id:'0'},{name:'联合班', id:'1'},{name:'精英班',id:'2'}],
|
||||||
|
curTagId: 0,
|
||||||
|
classList: [],
|
||||||
|
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
||||||
|
page: 1,
|
||||||
|
flag: true, // 函数是否执行完
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
//第一次加载
|
||||||
|
onLoad(e) {
|
||||||
|
// 隐藏原生的tabbar
|
||||||
|
uni.hideTabBar();
|
||||||
|
// this.tagId = e.id
|
||||||
|
this.curTagId = this.range[0].value
|
||||||
|
this.subTabId = this.subList[0].id
|
||||||
|
this.pageTitle = e.title
|
||||||
|
this.pid = e.pid
|
||||||
|
console.log(e, '传入分类id')
|
||||||
|
this.getData()
|
||||||
|
// this.getCateList(this.tagId)
|
||||||
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
this.scrollTop = e.scrollTop;
|
||||||
|
if (this.scrollTop > 500) {
|
||||||
|
this.fixed = true
|
||||||
|
} else {
|
||||||
|
this.fixed = false
|
||||||
|
}
|
||||||
|
// console.log(this.scrollTop,'this.scrollTop')
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
console.log('下拉刷新')
|
||||||
|
// this.status = 3
|
||||||
|
// this.page = 1
|
||||||
|
this.classList = []
|
||||||
|
this.getData()
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// if (this.status != 2 && this.flag) {
|
||||||
|
// this.page++
|
||||||
|
// this.getData(this.subTabId)
|
||||||
|
// }
|
||||||
|
console.log('触底加载', this.page)
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['userInfo'])
|
||||||
|
},
|
||||||
|
//页面显示
|
||||||
|
onShow() {
|
||||||
|
// 隐藏原生的tabbar
|
||||||
|
// uni.hideTabBar();
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
musicPlay
|
||||||
|
},
|
||||||
|
//方法
|
||||||
|
methods: {
|
||||||
|
// 加入班级
|
||||||
|
enterClass(){
|
||||||
|
|
||||||
|
},
|
||||||
|
selectChange(e){
|
||||||
|
console.log("e:", e);
|
||||||
|
},
|
||||||
|
closePup(){
|
||||||
|
this.pupShow = false
|
||||||
|
},
|
||||||
|
surl(imageurl) {
|
||||||
|
return `url(${imageurl})`
|
||||||
|
},
|
||||||
|
goCreateClass(){
|
||||||
|
console.log('this.addType',this.addType);
|
||||||
|
if(this.addType != undefined){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/miniClass/addClass?type=${this.addType}&name=add`
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title:'请选择班级的类型',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fatherClick(e) {
|
||||||
|
console.log('点击', e)
|
||||||
|
this.page = 1
|
||||||
|
// var item = e
|
||||||
|
this.curTagId = e.id
|
||||||
|
this.subTabId = this.subList[0].id
|
||||||
|
this.getData(this.subTabId);
|
||||||
|
},
|
||||||
|
curseClick(item) {
|
||||||
|
this.subTabId = item.id
|
||||||
|
this.classList = []
|
||||||
|
this.page = 1
|
||||||
|
this.getData(this.subTabId);
|
||||||
|
},
|
||||||
|
getData(id) {
|
||||||
|
if (!this.flag) {
|
||||||
|
console.log('正在执行,未完成')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.status = 1
|
||||||
|
this.flag = false
|
||||||
|
uni.showLoading({
|
||||||
|
title:'正在加载'
|
||||||
|
})
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/MyClassList",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
||||||
|
"type": this.curTagId // 班类型 0小班 1联合班 2精英班
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
if (res.result.length > 0) {
|
||||||
|
this.classList = res.result
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.classList = []
|
||||||
|
}
|
||||||
|
this.flag = true
|
||||||
|
}
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(e => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.flag = true
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
// this.status = 3
|
||||||
|
uni.showToast({
|
||||||
|
title:`获取数据失败`,
|
||||||
|
icon:'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 跳转
|
||||||
|
onPageJump(url,id,have) {
|
||||||
|
// console.log('进来了',url,id);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `${url}?id=${id}&have=${have}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
shuomingPage(url,id,pid){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `${url}?id=${id}&pid=${pid}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@/style/mixin.scss';
|
||||||
|
/deep/.uni-select__selector{
|
||||||
|
top:unset;
|
||||||
|
bottom:calc(100% + 12px) ;
|
||||||
|
}
|
||||||
|
/deep/.uni-select{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
/deep/.uni-select__input-text{
|
||||||
|
font-size:14px;
|
||||||
|
color:#7f7f7f //修改为你的字体颜色
|
||||||
|
}
|
||||||
|
/deep/.uni-select__input-placeholder{
|
||||||
|
font-size:14px;
|
||||||
|
color:#7f7f7f //修改为你的字体颜色
|
||||||
|
}
|
||||||
|
/deep/.uni-popper__arrow{
|
||||||
|
top:unset;
|
||||||
|
bottom: -6px;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
/deep/.uni-popper__arrow::after{
|
||||||
|
top:0
|
||||||
|
}
|
||||||
|
|
||||||
|
.box6{
|
||||||
|
.btnBox{justify-content: center;}
|
||||||
|
}
|
||||||
|
.containerBg {
|
||||||
|
// background-color: $containerColor;
|
||||||
|
background-color: #f6f6f8;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.curseSet{margin-right: 20rpx; font-size: 28rpx; display: flex; align-items: center;}
|
||||||
|
.fixed {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1; width: 100%; background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newBox {
|
||||||
|
|
||||||
|
.item {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
@include ptop_bottm(10px);
|
||||||
|
@include pleft_right(10px);
|
||||||
|
|
||||||
|
@include mshadow(10px, 1) .imgcontainer {
|
||||||
|
display: block;
|
||||||
|
width: 110rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
// background-size: cover;
|
||||||
|
// background-position: center;
|
||||||
|
height: 200rpx;
|
||||||
|
flex-grow: 1;
|
||||||
|
// @include ptop_bottm(10px);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
// @include pleft_right(10px);
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn_box{ text-align: right;
|
||||||
|
text{
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 3px 5px; @include theme("btn_bg");
|
||||||
|
font-size: 28rpx; color: #fff;
|
||||||
|
}
|
||||||
|
.seeInfo{background-color:#fff; background-image: none; border: 1px solid #666; color: #333; margin-left: 20rpx;}
|
||||||
|
}
|
||||||
|
.buyItems {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jianjie {
|
||||||
|
line-height: 30rpx; height: 60rpx; overflow: hidden;
|
||||||
|
overflow: hidden!important;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
@include bov();
|
||||||
|
color: #9c9c9c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txt555 {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #000;
|
||||||
|
@include bov()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.subCate {
|
||||||
|
padding-top:10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
.item {
|
||||||
|
border: 1px solid #bfcad9;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px; width: 100%;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
padding: 14rpx 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:last-child() {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.active {
|
||||||
|
border-color: $themeColor;
|
||||||
|
background-color: $themeColor;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabList {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flexbox {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgcontainer {
|
||||||
|
background-color: $imgBg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
// background-color: #fff;
|
||||||
|
min-height: calc(100vh - 270rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.learnBox {
|
||||||
|
// background-color: #fff;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.learn {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 48%;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txt555 {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
height: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 40rpx;
|
||||||
|
@include bov(1);
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -614,10 +614,11 @@
|
|||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
uni.showToast({
|
console.log('zouzhelima');
|
||||||
title:'登陆失败',
|
// uni.showToast({
|
||||||
icon:'none'
|
// title:e.msg,
|
||||||
})
|
// icon:'none'
|
||||||
|
// })
|
||||||
this.submitClickNum += 1
|
this.submitClickNum += 1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user