暂存
This commit is contained in:
@@ -95,7 +95,7 @@
|
|||||||
<view class="zhif_radio">
|
<view class="zhif_radio">
|
||||||
<u-radio-group v-model="payType">
|
<u-radio-group v-model="payType">
|
||||||
<view style="width: 100%;">
|
<view style="width: 100%;">
|
||||||
<view v-for="(item, index) in paylistIos" class="zhif_xuanx">
|
<view v-for="(item, index) in paylistIos" :key="index" class="zhif_xuanx">
|
||||||
<image :src="item.img"></image>
|
<image :src="item.img"></image>
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
<span v-if="item.id == 4"
|
<span v-if="item.id == 4"
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
class="content"
|
class="content"
|
||||||
:nodes="formatRichText(courseInfo.content)"
|
:nodes="formatRichText(courseInfo.content)"
|
||||||
></rich-text>
|
></rich-text>
|
||||||
<!-- <text>超强树选择器、树组件、树插件、无限级联树、单选树、多选树、自定义样式树、树形选择 </text> -->
|
|
||||||
</uni-section>
|
</uni-section>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
<view
|
<view
|
||||||
@click="openOrderModal(v)"
|
@click="openOrderModal(v)"
|
||||||
class="curriulum_title_box goods_item pay_item"
|
class="curriulum_title_box goods_item pay_item"
|
||||||
v-for="(v, i) in orderInfoList"
|
v-for="(v, i) in orderInfoList" :key="i"
|
||||||
>
|
>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
|
|
||||||
<view
|
<view
|
||||||
class="curriulum_title_box goods_item pay_item"
|
class="curriulum_title_box goods_item pay_item"
|
||||||
v-for="(v, i) in priceBreakdownList"
|
v-for="(v, i) in priceBreakdownList" :key="i"
|
||||||
>
|
>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
|
|||||||
@@ -5,22 +5,131 @@
|
|||||||
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
||||||
<view class="mainContent" v-if="thisClass.id">
|
<view class="mainContent" v-if="thisClass.id">
|
||||||
<view class="className">
|
<view class="className">
|
||||||
<h3>{{thisClass.title}}</h3>
|
<h3>{{thisClass.title}}</h3>
|
||||||
<text class="kaiban" v-if="thisClass.state == '0' && isMonitor">开班</text>
|
<text class="kaiban" v-if="thisClass.state == '0' && isMonitor || thisClass.state == '0' && isDirector">开班</text>
|
||||||
<text class="jieban" v-if="thisClass.state == '1' && isMonitor">结班</text>
|
<text class="jieban" v-if="thisClass.state == '1' && isMonitor || thisClass.state == '1' && isDirector">结班</text>
|
||||||
<text class="tuichu" v-if="!isMonitor && !isDirector && isHave" @click="outClass">退出班级</text>
|
<text class="tuichu" v-if="!isMonitor && !isDirector && isHave" @click="outClass">退出班级</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="otherItems flex_box">
|
<view class="otherItems flex_box">
|
||||||
<view><text class="ciyao">创建日期</text><text
|
<view><text class="ciyao">创建日期</text><text
|
||||||
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text></view>
|
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
|
||||||
|
</view>
|
||||||
<view><text class="ciyao">班级类型</text>
|
<view><text class="ciyao">班级类型</text>
|
||||||
<text class="mainTxt" v-if="classModel.type == '0'">普通小班</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 == '1'">联合班</text>
|
||||||
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
||||||
</view>
|
</view>
|
||||||
<view><text class="ciyao">班级人数</text><text class="mainTxt">{{thisClass.number}}人</text></view>
|
<view><text class="ciyao">班级人数</text><text class="mainTxt">{{thisClass.number}}人</text></view>
|
||||||
|
<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="" v-if="thisClass.content != ''">
|
||||||
|
<text class="adminName">教学目标/班级简介</text>
|
||||||
|
</view>
|
||||||
|
<rich-text
|
||||||
|
class="banjiJianjie"
|
||||||
|
:nodes="formatRichText(thisClass.content)"
|
||||||
|
></rich-text>
|
||||||
|
<!-- <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}}
|
||||||
|
<template v-if="isDirector || isMonitor">
|
||||||
|
<text >({{item.tel}})</text> <text @click="removeStudent(item)">提出班级</text>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</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 class="flex_box tijiaoTitle">
|
||||||
|
<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item)" v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
|
||||||
|
</view>
|
||||||
|
<!-- 班内任务 -->
|
||||||
|
<view class="">
|
||||||
|
<uni-section class="mb-10 nobg" title="任务列表" type="line"></uni-section>
|
||||||
|
<view></view>
|
||||||
|
<uni-section class="mb-10 nobg" title="提交的任务" type="line"></uni-section>
|
||||||
|
<view class="submitRecode">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 医案 -->
|
||||||
|
<view class="">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- 心得 -->
|
||||||
|
<view class="">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottomBox" v-if="!isHave && !isDirector && !isMonitor">
|
||||||
|
<button type="primary" @click="addClass">一键加入班级</button>
|
||||||
|
</view>
|
||||||
|
<!-- 管理弹出 -->
|
||||||
|
<u-popup key="1" :show="showMan" :round="10" @close="closeManager">
|
||||||
|
|
||||||
<view class="guanli">
|
<view class="guanli">
|
||||||
|
<h3>班内管理人员</h3>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text class="adminName">班长:</text>
|
<text class="adminName">班长:</text>
|
||||||
<view class="personbox" v-if="admins.monitor.id">
|
<view class="personbox" v-if="admins.monitor.id">
|
||||||
@@ -63,81 +172,7 @@
|
|||||||
<text v-else>暂未设置</text>
|
<text v-else>暂未设置</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" >
|
</u-popup>
|
||||||
<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> -->
|
<!-- </view> -->
|
||||||
<z-navigation></z-navigation>
|
<z-navigation></z-navigation>
|
||||||
</view>
|
</view>
|
||||||
@@ -195,25 +230,36 @@
|
|||||||
isMonitor:false, // 是管理者
|
isMonitor:false, // 是管理者
|
||||||
isDirector:false, // 是主任
|
isDirector:false, // 是主任
|
||||||
isHave:false,
|
isHave:false,
|
||||||
|
showMan:false,
|
||||||
|
tijiaoTitleList:[
|
||||||
|
{name:'班内任务', id:'0'},
|
||||||
|
{name:'医案', id:'1'},
|
||||||
|
{name:'心得', id:'2'},
|
||||||
|
],
|
||||||
|
tijiaoTitleId:'0'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
|
uni.hideTabBar();
|
||||||
this.classId = e.id
|
this.classId = e.id
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
this.getClassInfo()
|
|
||||||
if(e.have == 'isNotHave'){
|
// if(e.have == 'isNotHave'){
|
||||||
this.isHave = false // 未加入
|
// this.isHave = false // 未加入
|
||||||
}else if(e.have == 'have'){
|
// }else if(e.have == 'have'){
|
||||||
this.isHave = true // 已加入
|
// this.isHave = true // 已加入
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.getClassInfo()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
titleClick(item){
|
||||||
|
this.tijiaoTitleId = item.id
|
||||||
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
// 获取个人信息
|
// 获取个人信息
|
||||||
if (this.userInfo.id != undefined) {
|
if (this.userInfo.id != undefined) {
|
||||||
@@ -239,6 +285,39 @@
|
|||||||
console.log('e', e);
|
console.log('e', e);
|
||||||
this.tabId = e.id
|
this.tabId = e.id
|
||||||
},
|
},
|
||||||
|
formatRichText(html) {
|
||||||
|
if(html == ''){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//控制图片大小
|
||||||
|
let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
|
||||||
|
match = match
|
||||||
|
.replace(/style="[^"]+"/gi, "")
|
||||||
|
.replace(/style='[^']+'/gi, "");
|
||||||
|
match = match
|
||||||
|
.replace(/width="[^"]+"/gi, "")
|
||||||
|
.replace(/width='[^']+'/gi, "");
|
||||||
|
match = match
|
||||||
|
.replace(/height="[^"]+"/gi, "")
|
||||||
|
.replace(/height='[^']+'/gi, "");
|
||||||
|
return match;
|
||||||
|
});
|
||||||
|
newContent = newContent.replace(
|
||||||
|
/style="[^"]+"/gi,
|
||||||
|
function (match, capture) {
|
||||||
|
match = match
|
||||||
|
.replace(/width:[^;]+;/gi, "max-width:100%;")
|
||||||
|
.replace(/width:[^;]+;/gi, "max-width:100%;");
|
||||||
|
return match;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
|
||||||
|
newContent = newContent.replace(
|
||||||
|
/\<img/gi,
|
||||||
|
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
|
||||||
|
);
|
||||||
|
return newContent;
|
||||||
|
},
|
||||||
// 加入班级
|
// 加入班级
|
||||||
addClass(){
|
addClass(){
|
||||||
$http.request({
|
$http.request({
|
||||||
@@ -271,8 +350,16 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 显示班级成员
|
||||||
|
seeManager(){
|
||||||
|
this.showMan = true
|
||||||
|
},
|
||||||
|
closeManager(){
|
||||||
|
this.showMan = false
|
||||||
|
},
|
||||||
// 退出班级
|
// 退出班级
|
||||||
outClass(){
|
outClass(){
|
||||||
|
let that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '您即将退出当前班级,是否继续?',
|
content: '您即将退出当前班级,是否继续?',
|
||||||
@@ -283,7 +370,7 @@
|
|||||||
url: "common/class/quitClass",
|
url: "common/class/quitClass",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
"classId": this.classId ,
|
"classId": that.classId ,
|
||||||
},
|
},
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@@ -291,13 +378,15 @@
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.isHave = true
|
that.isHave = true
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `退出成功!`,
|
title: `退出成功!`,
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/miniClass/myClassList'
|
||||||
|
})
|
||||||
},200)
|
},200)
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
@@ -314,6 +403,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 踢出班级
|
||||||
|
removeStudent(item){
|
||||||
|
|
||||||
},
|
},
|
||||||
getClassInfo() {
|
getClassInfo() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -332,6 +425,7 @@
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
this.refresh = false
|
this.refresh = false
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
this.isHave = res.result.isJoin
|
||||||
this.thisClass = res.result.class
|
this.thisClass = res.result.class
|
||||||
this.admins.list = res.result.admins
|
this.admins.list = res.result.admins
|
||||||
this.admins.monitor = {}
|
this.admins.monitor = {}
|
||||||
@@ -387,8 +481,9 @@
|
|||||||
@import "@/style/mixin.scss";
|
@import "@/style/mixin.scss";
|
||||||
|
|
||||||
.flexbox{display: flex;}
|
.flexbox{display: flex;}
|
||||||
|
.nobg{background-color: transparent !important; }
|
||||||
.bottomBox{position: fixed; padding: 20rpx 0; text-align: center; bottom: 100rpx; left: 0; z-index: 2; width: 100%; background-color: #fff;
|
.bottomBox{position: fixed; padding: 20rpx 0; text-align: center; bottom: 100rpx; left: 0; z-index: 2; width: 100%; background-color: #fff;
|
||||||
button{width: 80%; }
|
button{width: 80%; margin: 0 auto; border-radius: 40rpx; }
|
||||||
}
|
}
|
||||||
.mainContent {
|
.mainContent {
|
||||||
color: #333;
|
color: #333;
|
||||||
@@ -472,7 +567,8 @@
|
|||||||
}
|
}
|
||||||
.otherItems {
|
.otherItems {
|
||||||
// border: 1px solid #dadada;
|
// border: 1px solid #dadada;
|
||||||
padding: 20rpx; background-color: rgba(255, 255, 255, .5);
|
padding: 20rpx;
|
||||||
|
// background-color: rgba(255, 255, 255, .5);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin: 20rpx 0;
|
margin: 20rpx 0;
|
||||||
@@ -486,8 +582,13 @@
|
|||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tijiaoTitle{ justify-content: space-between;
|
||||||
|
text{display: block; width: 30%; padding: 8rpx 0; border-radius: 10rpx; text-align: center; border: 1px solid $themeColor; color:$themeColor;}
|
||||||
|
text.active{background-color: $themeColor; color: #fff;}
|
||||||
|
}
|
||||||
.guanli {
|
.guanli {
|
||||||
|
padding: 40rpx;
|
||||||
|
h3{text-align: center; margin-bottom: 20rpx; color: #333;}
|
||||||
.item { color: #333;
|
.item { color: #333;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<!-- <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 v-show="item.state == '0'" @click="addClass(item.id)">一键加入</text>
|
||||||
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id,'isNotHave')">查看班内情况</text>
|
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id,'isNotHave')">查看班内情况</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -162,8 +162,37 @@
|
|||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
// 加入班级
|
// 加入班级
|
||||||
enterClass(){
|
// 加入班级
|
||||||
|
addClass(classId){
|
||||||
|
$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'
|
||||||
|
})
|
||||||
|
});
|
||||||
},
|
},
|
||||||
selectChange(e){
|
selectChange(e){
|
||||||
console.log("e:", e);
|
console.log("e:", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user