|
|
@@ -16,24 +16,297 @@
|
|
|
</view>
|
|
|
</u-navbar>
|
|
|
|
|
|
- <view class="no-course" v-if="false">
|
|
|
+
|
|
|
+
|
|
|
+ <view class="no-course" v-if="list.length == 0">
|
|
|
<image class="img" src="/static/no-course.png" mode="widthFix"></image>
|
|
|
<view class="title">暂无学习内容</view>
|
|
|
<view class="title">请先购买课程/题库</view>
|
|
|
<view class="btn" @click="goIndex">马上选课/选题</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="note-list">
|
|
|
- <picker class='picker' :range="list" range-key="name" @change="change">
|
|
|
- <view class="text">{{businessName || '请选择业务层次'}}</view>
|
|
|
+ <template v-else>
|
|
|
+ <view class="note-list">
|
|
|
+ <picker class='picker' :range="list" range-key="aliasName" @change="change">
|
|
|
+ <view class="text">{{businessName || '请选择业务层次'}}</view>
|
|
|
+
|
|
|
+ </picker>
|
|
|
+ <u-icon name="arrow-down"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="course-list">
|
|
|
+ <template v-if="getSelectType() == 1">
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon3.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的网课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages2/learn/my_learn?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon2.png" class="my_icon"></image>
|
|
|
+ <view class="point" v-if="userNums.periodSum > 0"></view>
|
|
|
+ <view>我的学时</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ 累计
|
|
|
+ <text>{{ userNums.periodSum }}</text>
|
|
|
+ 学时未通过
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon12.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的直播课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <view
|
|
|
+ hover-class="none"
|
|
|
+ @click="goBank()"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon4.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view>我的题库</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
|
|
|
- </picker>
|
|
|
- <u-icon name="arrow-down"></u-icon>
|
|
|
- </view>
|
|
|
+ <template v-if="getSelectType() == 2">
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon3.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的网课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon12.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的直播课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <view
|
|
|
+ hover-class="none"
|
|
|
+ @click="goBank()"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon4.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view>我的题库</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <navigator hover-class="none" :url="'/pages5/exam/index?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''" class="menu_box">
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon11.png" class="my_icon"></image>
|
|
|
+ <view class="point" v-if="total1 > 0"></view>
|
|
|
+ <view>我的模考</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total1 }}</text>
|
|
|
+ 个模考预约
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="getSelectType() == 3">
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon3.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的网课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages2/learn/my_learn?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon2.png" class="my_icon"></image>
|
|
|
+ <view class="point" v-if="userNums.periodSum > 0"></view>
|
|
|
+ <view>我的学时</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ 累计
|
|
|
+ <text>{{ userNums.periodSum }}</text>
|
|
|
+ 学时未通过
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <navigator hover-class="none" :url="'/pages2/exam/index?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''" class="menu_box">
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon10.png" class="my_icon"></image>
|
|
|
+ <view class="point" v-if="userNums.subscribeSum > 0"></view>
|
|
|
+ <view>我的考试</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ userNums.subscribeSum }}</text>
|
|
|
+ 考试预约
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon12.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的直播课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <view
|
|
|
+ hover-class="none"
|
|
|
+ @click="goBank()"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon4.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view>我的题库</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="getSelectType() == null">
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages2/wd/class?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon3.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的网课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ :url="'/pages5/liveDetail/list?projectId='+projectId+'&businessId='+businessId+'&educationId='+educationId+''"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon12.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view class="point" v-if="total2 > 0"></view>
|
|
|
+ <view>我的直播课</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+
|
|
|
+ <view
|
|
|
+ hover-class="none"
|
|
|
+ @click="goBank()"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon4.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view>我的题库</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
|
|
|
|
|
|
- <view class="course-list">
|
|
|
- <navigator
|
|
|
+
|
|
|
+ <!-- <navigator
|
|
|
hover-class="none"
|
|
|
url="/pages5/liveDetail/list"
|
|
|
class="menu_box"
|
|
|
@@ -49,6 +322,21 @@
|
|
|
个课程直播中
|
|
|
</view>
|
|
|
</navigator>
|
|
|
+ <navigator
|
|
|
+ hover-class="none"
|
|
|
+ url="/pages5/liveDetail/list"
|
|
|
+ class="menu_box"
|
|
|
+ >
|
|
|
+ <view class="box_left">
|
|
|
+ <image src="/static/icon/my_icon4.png" class="my_icon">
|
|
|
+ </image>
|
|
|
+ <view>我的题库</view>
|
|
|
+ </view>
|
|
|
+ <view class="box_right">
|
|
|
+ <text>{{ total2 }}</text>
|
|
|
+ 个课程直播中
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
<navigator
|
|
|
hover-class="none"
|
|
|
url="/pages5/liveDetail/list"
|
|
|
@@ -102,8 +390,7 @@
|
|
|
<text>{{ userNums.subscribeSum }}</text>
|
|
|
考试预约
|
|
|
</view>
|
|
|
- </navigator>
|
|
|
- </view>
|
|
|
+ </navigator> -->
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -114,12 +401,15 @@ export default {
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- list:[{name:'继续教育-建造师-二级',id:1},{name:'继续教育-建造师-一级',id:2}],
|
|
|
+ list:[],
|
|
|
businessId:'',
|
|
|
+ educationId:'',
|
|
|
+ projectId:'',
|
|
|
businessName:'',
|
|
|
userNums: {},
|
|
|
total1: 0,
|
|
|
total2: 0,
|
|
|
+ selectItem:null,
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -134,15 +424,81 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ goBank() {
|
|
|
+ this.$api
|
|
|
+ .lockLockStatus({
|
|
|
+ action: "bank",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ //有其他端在操作,不能学习
|
|
|
+ uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: res.data.msg,
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ } else if (res.data.code == 500) {
|
|
|
+ //可以学习
|
|
|
+
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages2/wd/question_bank?projectId='+this.projectId+'&businessId='+this.businessId+'&educationId='+this.educationId+'',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
orderUserAllBusinessList() {
|
|
|
this.$api.orderUserAllBusinessList().then(res => {
|
|
|
- console.log(res)
|
|
|
+ this.list = res.data.rows;
|
|
|
})
|
|
|
},
|
|
|
- change(e) {
|
|
|
- this.businessId = this.list[e.detail.value].id
|
|
|
- this.businessName = this.list[e.detail.value].name
|
|
|
+ getSelectType() {
|
|
|
+ if(!this.selectItem) {
|
|
|
+ return null
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.selectItem.educationName == '继续教育') {
|
|
|
+ if(this.selectItem.businessName == '一级') {
|
|
|
+ if(this.selectItem.projectName == '建造师') {
|
|
|
+ return 1;
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ } else if (this.selectItem.businessName == '二级') {
|
|
|
+ if(this.selectItem.projectName == '建造师' || this.selectItem.projectName == '造价工程师') {
|
|
|
+ return 1;
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ } else if (this.selectItem.businessName == '职称继续教育' && this.selectItem.projectName == '专业技术人员') {
|
|
|
+ return 1
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.selectItem.educationName == '考前培训') {
|
|
|
+ if(this.selectItem.businessName == '二级' || this.selectItem.businessName == '一级') {
|
|
|
+ if(this.selectItem.projectName == '建造师') {
|
|
|
+ return 2;
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ } else if(this.selectItem.businessName == '七大员' && this.selectItem.projectName == '施工现场专业人员') {
|
|
|
+ return 3;
|
|
|
+ } else{
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
+ return null
|
|
|
+ },
|
|
|
+ change(e) {
|
|
|
+ this.selectItem = this.list[e.detail.value]
|
|
|
+ this.businessId = this.list[e.detail.value].businessId
|
|
|
+ this.projectId = this.list[e.detail.value].projectId
|
|
|
+ this.educationId = this.list[e.detail.value].educationId
|
|
|
+ this.businessName = this.list[e.detail.value].educationName +'-'+ this.list[e.detail.value].aliasName
|
|
|
this.isLogin = this.$method.isLogin();
|
|
|
if (this.isLogin) {
|
|
|
this.$store.state.allowLoading = false;
|