| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666 |
- <template>
- <view class="study-center">
- <u-navbar
- :is-back="false"
- title="学习中心"
- class="navbar"
- :border-bottom="false"
- title-color="#333333"
- back-icon-color="#ffffff"
- >
- <view class="slot-wrap">
- <image
- src="/static/logo2.png"
- style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
- ></image>
- </view>
- </u-navbar>
-
-
-
- <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>
-
- <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>
-
- <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>
-
-
-
- <!-- <navigator
- hover-class="none"
- url="/pages5/liveDetail/list"
- 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"
- 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"
- 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>
- <navigator
- hover-class="none"
- url="/pages2/learn/my_learn"
- 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/exam/index" 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>
- <navigator hover-class="none" url="/pages2/exam/index" 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> -->
-
- </view>
- </template>
- <script>
- import { mapGetters } from "vuex";
- export default {
- components: {},
- data() {
- return {
- list:[],
- businessId:'',
- educationId:'',
- projectId:'',
- businessName:'',
- userNums: {},
- total1: 0,
- total2: 0,
- selectItem:null,
- };
- },
- onPullDownRefresh() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
- if (this.$method.isLogin()) {
- this.orderUserAllBusinessList();
- }
- },
- 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 => {
- this.list = res.data.rows;
- })
- },
- 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;
- this.getCount();
- this.goodsLivingSectionList();
- this.getNums()
- this.$store.state.allowLoading = true;
- }
- },
- getCount() {
- this.$api
- .mockSubscribeListSubscribe({
- mockStatus: 0,
- pageNum: 1,
- pageSize: 1,
- })
- .then((res) => {
- this.total1 = res.data.total;
- });
- },
- getNums() {
- this.$api.getinfoAttached().then((res) => {
- if (res.data.code === 200) {
- this.userNums = res.data.data;
- const nums =
- res.data.data.informSum +
- res.data.data.orderSum +
- res.data.data.periodSum +
- res.data.data.planSum +
- res.data.data.subscribeSum;
- this.$store.commit("tabNum", nums);
- }
- });
- },
- goodsLivingSectionList() {
- this.$api.goodsLivingSectionList().then((res) => {
- this.total2 = res.data.data.length;
- });
- },
-
- goIndex() {
- uni.switchTab({
- url:'../index/index'
- })
- }
- },
- onReachBottom() {
-
- },
- computed: { ...mapGetters(["userInfo"]) },
- };
- </script>
- <style >
- page {
- background-color: #EAEEF1;
- }
- </style>
- <style scoped lang="scss">
- .study-center {
-
- .navbar {
-
- /deep/ .u-navbar-inner {
- margin-right: 0 !important;
- }
-
- .slot-wrap {
- width: 100%;
- }
- }
-
- .no-course {
- margin: 80rpx auto 0;
- text-align: center;
-
- .img {
- width:360rpx;
- }
-
- .title {
- margin-top:10rpx;
- font-size: 32rpx;
- text-align: center;
- color: #999999;
- }
-
- .btn {
- margin:40rpx auto 0;
- width: 280rpx;
- text-align: center;
- line-height: 64rpx;
- color:#fff;
- font-size: 30rpx;
- height: 64rpx;
- background: #007AFF;
- border-radius: 32rpx;
- }
- }
-
-
- .note-list {
- background: #FFFFFF;
- display: flex;
- align-items: center;
- padding:0 32rpx;
-
- .picker {
- line-height: 80rpx;
- height: 80rpx;
- flex:1;
- }
-
- }
-
- .course-list {
- padding:0 32rpx;
-
- .menu_box {
- height: 104rpx;
- background: #ffffff;
- border-radius: 24rpx;
- margin-top: 30rpx;
- display: flex;
- align-items: center;
- padding: 0 20rpx;
- justify-content: space-between;
- color: #666666;
- font-size: 32rpx;
-
- .box_left {
- display: flex;
- align-items: center;
- position:relative;
-
- .point {
- width:16rpx;
- height:16rpx;
- border-radius:50%;
- background: red;
- position:absolute;
- left:50rpx;
- top:0;
- }
- }
-
- .box_right {
- font-size: 32rpx;
-
- text {
- color: #007aff;
- margin: 0 5rpx;
- }
- }
- }
-
-
- .my_icon {
- width: 56rpx;
- height: 56rpx;
- margin-right: 20rpx;
- }
- }
- }
- </style>
|