| | |
| | | > |
| | | <div |
| | | :style="{ |
| | | background: 'url(' + item.icon + ') no-repeat 100%,center' |
| | | background: 'url(' + item.icon + ') no-repeat 100%,center', |
| | | }" |
| | | alt |
| | | class="banner" |
| | |
| | | <div class="more" @click="openBtn('true')" v-else>收起 -</div> |
| | | </div> |
| | | <div class="partnerList"> |
| | | <div |
| | | :class="isOpen ? 'list' : 'list1'" |
| | | v-if="!partnersLoading && partnersList.length > 0" |
| | | > |
| | | <div class="list" v-if="!partnersLoading && partnersList.length > 0"> |
| | | <div |
| | | class="partnerItem" |
| | | v-for="(item, index) in partnersList" |
| | |
| | | > |
| | | <div class="imgBox"> |
| | | <img class="autoImg" :src="item.icon" /> |
| | | </div> |
| | | <div class="bookInfo"> |
| | | <div class="title" :title="item.name"> |
| | | {{ item.name }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | img: require("@/assets/images/home/guanwang3.png"), |
| | | circleName: "官网主页", |
| | | url: "https://www.tepcb.com/mobile/website/", |
| | | itemN: "circle-one" |
| | | itemN: "circle-one", |
| | | }, |
| | | { |
| | | img: require("@/assets/images/home/shuzijiaocai3.png"), |
| | | circleName: "数字教材", |
| | | url: "/bookList", |
| | | itemN: "circle-two" |
| | | itemN: "circle-two", |
| | | }, |
| | | { |
| | | img: require("@/assets/images/home/jiaoshirenzheng3.png"), |
| | | circleName: "教师认证", |
| | | url: "/teacherCertificate", |
| | | itemN: "circle-three" |
| | | } |
| | | ] |
| | | itemN: "circle-three", |
| | | }, |
| | | ], |
| | | }, |
| | | bookRecommendList: [], |
| | | bookRecommendLoading: true, |
| | |
| | | partnersList: [], |
| | | partnersLoading: false, |
| | | isOpen: true, |
| | | token: "" |
| | | token: "", |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | that.getPartnersList(); |
| | | }, |
| | | computed: { |
| | | ...mapState(["userInfo"]) |
| | | ...mapState(["userInfo"]), |
| | | }, |
| | | methods: { |
| | | getUserRoleMine() { |
| | | let that = this; |
| | | that.MG.identity.getCurrentAppUser().then(res => { |
| | | that.MG.identity.getCurrentAppUser().then((res) => { |
| | | if (res) { |
| | | that.userId = res.userId; |
| | | let teacherRole = res.roleLinks.find( |
| | | item => item.role?.refCode == "teacher" |
| | | (item) => item.role?.refCode == "teacher" |
| | | ); |
| | | let teacherInfo = res.infoList.find( |
| | | item => item.type == "teacherInfo" |
| | | (item) => item.type == "teacherInfo" |
| | | ); |
| | | let wechatInfo = res.infoList.find(item => item.type == "WeChat"); |
| | | let wechatInfo = res.infoList.find((item) => item.type == "WeChat"); |
| | | let studentInfo = res.infoList.find( |
| | | item => item.type == "basicInfo" || item.type == "Default" |
| | | (item) => item.type == "basicInfo" || item.type == "Default" |
| | | ); |
| | | let phoneInfo = res.secretList.find( |
| | | item => item.type == "MobilePhone" |
| | | (item) => item.type == "MobilePhone" |
| | | ); |
| | | if (teacherRole && teacherInfo) { |
| | | this.$store.dispatch("setUserInfo", { |
| | |
| | | phoneNumber: phoneInfo?.credential, |
| | | icon: wechatInfo?.icon, |
| | | role: "Teacher", |
| | | roleId: teacherRole.role.id |
| | | roleId: teacherRole.role.id, |
| | | }); |
| | | } else if (wechatInfo) { |
| | | this.$store.dispatch("setUserInfo", { |
| | | ...wechatInfo, |
| | | phoneNumber: phoneInfo?.credential, |
| | | role: "Student" |
| | | role: "Student", |
| | | }); |
| | | } else if (studentInfo) { |
| | | this.$store.dispatch("setUserInfo", { |
| | | ...studentInfo, |
| | | icon: wechatInfo?.icon, |
| | | phoneNumber: phoneInfo?.credential, |
| | | role: "Student" |
| | | role: "Student", |
| | | }); |
| | | } |
| | | } |
| | |
| | | getBanner() { |
| | | this.MG.resource |
| | | .getItem({ |
| | | path: "tourism_digitalTextbook\\tourism_digitalBannerMobile" |
| | | path: "tourism_digitalTextbook\\tourism_digitalBannerMobile", |
| | | }) |
| | | .then(res => { |
| | | .then((res) => { |
| | | this.educate.swipePic = res.datas; |
| | | console.log(res.datas); |
| | | }); |
| | |
| | | this.$router.push({ |
| | | path: "/bookList", |
| | | query: { |
| | | searchAllWords: this.searchAllWords |
| | | } |
| | | searchAllWords: this.searchAllWords, |
| | | }, |
| | | }); |
| | | }, |
| | | //推荐教材 |
| | |
| | | queryType: "*", |
| | | paging: { |
| | | start: 0, |
| | | size: 5 |
| | | size: 5, |
| | | }, |
| | | fields: { |
| | | tourism_author: [], |
| | | tourism_publicationDate: [], |
| | | viewCount: [] |
| | | viewCount: [], |
| | | }, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate" |
| | | field: "CreateDate", |
| | | }, |
| | | coverSize: { |
| | | height: 560 |
| | | } |
| | | height: 560, |
| | | }, |
| | | }) |
| | | .then(res => { |
| | | .then((res) => { |
| | | this.bookRecommendList = res.datas; |
| | | this.bookRecommendLoading = false; |
| | | }); |
| | |
| | | this.$router.push({ |
| | | path: "/bookDetail", |
| | | query: { |
| | | id: data.id |
| | | } |
| | | id: data.id, |
| | | }, |
| | | }); |
| | | }, |
| | | // 轮播图下方 列表跳转页面 |
| | |
| | | window.open(url); |
| | | } else { |
| | | this.$router.push({ |
| | | path: url |
| | | path: url, |
| | | }); |
| | | } |
| | | }, |
| | | showMore() { |
| | | this.$router.push({ |
| | | path: "/bookList" |
| | | path: "/bookList", |
| | | }); |
| | | }, |
| | | //视频说明 |
| | |
| | | path: "tourism_digitalTextbook\\tourism_digitalRecommendedTextbooks", |
| | | fields: { |
| | | tourism_file: [], |
| | | tourism_content: [] |
| | | } |
| | | tourism_content: [], |
| | | }, |
| | | }) |
| | | .then(res => { |
| | | .then((res) => { |
| | | if (res.datas.length > 0) { |
| | | res.datas.forEach(element => { |
| | | res.datas.forEach((element) => { |
| | | if ( |
| | | element.refCode == "tourism_digitalRecommendedTextbooksMobile" |
| | | ) { |
| | |
| | | }, |
| | | getManual() { |
| | | this.$router.push({ |
| | | path: "/manual" |
| | | path: "/manual", |
| | | }); |
| | | }, |
| | | //合作院校 |
| | |
| | | this.MG.resource |
| | | .getItem({ |
| | | path: "tourism_digitalTextbook\\tourism_digitalPartners", |
| | | fields: {} |
| | | fields: {}, |
| | | }) |
| | | .then(res => { |
| | | this.partnersList = res.datas; |
| | | .then((res) => { |
| | | const data = res.datas; |
| | | if (this.isOpen) { |
| | | this.partnersList = data.slice(0, 4); |
| | | } else { |
| | | this.partnersList = data; |
| | | } |
| | | |
| | | this.partnersLoading = false; |
| | | }); |
| | | }, |
| | |
| | | } else { |
| | | this.isOpen = false; |
| | | } |
| | | } |
| | | this.getPartnersList(); |
| | | }, |
| | | }, |
| | | components: { |
| | | Footer |
| | | } |
| | | Footer, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | |
| | | .partnerList { |
| | | margin-top: 10px; |
| | | overflow: hidden; |
| | | min-height: 180px; |
| | | min-height: 150px; |
| | | flex-wrap: wrap; |
| | | } |
| | | .list { |
| | | height: 160px; |
| | | min-height: 110px; |
| | | overflow: hidden; |
| | | } |
| | | .list1 { |
| | | /* .list1 { |
| | | line-height: 1.5; |
| | | min-height: 160px; |
| | | } |
| | | } */ |
| | | .partnerItem { |
| | | width: calc(100% / 4 - 10px); |
| | | width: 25%; |
| | | display: block; |
| | | box-sizing: border-box; |
| | | float: left; |
| | | padding: 5px 20px; |
| | | } |
| | | .partnerItem .imgBox { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100px; |
| | | min-height: 60px; |
| | | } |
| | | .partnerItem .bookInfo { |
| | | margin: 0; |