提交 c4b55d1f 编写于 作者: chendeli's avatar chendeli

add

上级 83d71703
......@@ -3,7 +3,7 @@
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'">
<div class="font-title">
{{title}}
<div class="change-part gray">
<div class="change-part gray" @click="changeFun">
换一批
<img src="../../images/change.png"/>
......@@ -14,7 +14,7 @@
<div>
<div class="couse-list" v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="50">
<div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in list">
<div class="course-pic">
<div class="course-pic" @click="goToPage(item.name)">
<img :src="item.appIndexCourseUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
......@@ -68,6 +68,21 @@ export default {
},
methods: {
//跳转
goToPage(name){
rocNative.gotoNewActivityWithParams({
"className": "com.picahealth.yunque.activitys.courseplaynew.CourseIntroduc",
"params": { "title": name }
})
},
//换一批
changeFun(){
this.pageNo++;
this.list = [];
this.getData();
},
//滑动加载更多
loadMore(){
......
<template>
<div class="hot-teacher">
<div :style="{'text-align': resourceData.direction}" class="title">{{resourceData.title}}</div>
<div class="title">{{title}}</div>
<!--展示形式 左一 右二-->
<div class="teacher-item space-between">
<div class="category-left">
<img class="category-img1" :src="resourceData.item.pic1.right"/>
<div class="category-left" @click="goToPage(leftObj)">
<img class="category-img" :src="leftObj.imageUrl"/>
</div>
<div class="category-right">
<div class="right-img">
<img class="category-img" :src="resourceData.item.pic2.bg"/>
<div class="right-img" @click="goToPage(rightTop)">
<img class="category-img" :src="rightTop.imageUrl"/>
</div>
<div class="right-img mt5">
<img class="category-img" :src="resourceData.item.pic3.bg"/>
<div class="right-img mt5" @click="goToPage(rightBottom)">
<img class="category-img" :src="rightBottom.imageUrl"/>
</div>
</div>
</div>
<div class="holder-img">
<img :src="resourceData.item.pic3.bg" class="category-img"/>
<div class="holder-img" @click="goToPage(rightBp)">
<img :src="rightBp.imageUrl" class="category-img"/>
</div>
</div>
</template>
<script>
import { setEventByModuleCode } from '@/utils/index'
export default {
data () {
return {
data(){
return{
list:[],
leftObj:{},
rightTop:{},
rightBottom:{},
rightBp:{},
title:'专题分类'
}
},
mounted(){
this.getData();
},
props: {
resourceData: {
type: Object,
default:()=>{
return {
title: '专题分类',
direction: 'left',
item: {
pic1:{
bg: 'RGBA(230, 243, 243, 1)',
title: '用医学知识 赢百万现金',
time: '每周四20:00开赛',
left: '../../images/Shape@2x.png',
right: '../../images/Shape@2x.png'
},
pic2:{
bg: '../../images/Shape@2x.png',
title: '心血管病高危人群早期筛查与综合干预',
left: '../../images/Shape@2x.png'
},
pic3:{
bg: '../../images/Shape@2x.png',
title: '心血管病高危人群早期筛查与综合干预',
left: '../../images/Shape@2x.png'
}
}
}
methods: {
goToPage(itemData){
let paramList = setEventByModuleCode(itemData);
// alert(JSON.stringify({
// modeCode: itemData.appModuleInfo.code,
// jsonString: paramList
// }))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
getData(){
let _this = this,
para = {
category: 1,
position:3
}
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
// console.log(res);
_this.list = res.data && res.data.iconColumnInformationModels || [];
_this.leftObj = _this.list[0] || {};
_this.rightTop = _this.list[1] || {};
_this.rightBottom = _this.list[2] || {};
_this.rightBp = _this.list[3] || {};
}
})
},
},
methods: {
}
}
</script>
......@@ -82,6 +88,10 @@ export default {
width: 100%;
margin-top: px2rem(15px);
padding: 0 px2rem(15px) px2rem(26px);
.category-img{
width: 100%;
height: 100%;
}
.teacher-item{
width: 100%;
height: px2rem(190px);
......@@ -100,10 +110,7 @@ export default {
.category-right{
width: px2rem(170px);
height: px2rem(190px);
.category-img{
width: 100%;
height: 100%;
}
.right-img{
width: px2rem(170px);
height: px2rem(95px);
......@@ -113,8 +120,9 @@ export default {
}
.holder-img{
margin-top:px2rem(15px);
width: 100%;
height: px2rem(125px);
height: px2rem(65px);
}
}
......
......@@ -2,18 +2,23 @@
<div class="hot-teacher">
<div class="space-between">
<img class="img" src="../../images/mins.png"/>
<div @click="fiveMinutesMore" class="five-more gray fs11">
<div @click="playMore" class="five-more gray fs11">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
</div>
</div>
<div class="teacher-item space-between" :key="index" v-for="(item,index) in hotTeachers">
<div class="teacher-item" :key="index" v-for="(item,index) in list">
<div class="teacher-itemimg">
<img :src="item.img"/>
<img :src="item.appImageUrl"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14">{{item.name}}</div>
<div class="five-tag fs11">#心动时刻</div>
<img @click="video(index)" class="five-radio" src="../../images/play.png"/>
<div class="teacher-itemname fs14">{{item.title}}</div>
<div class="five-tag fs11">
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click="playFun(item)">
<img class="five-radio" src="../../images/play.png"/>
</span>
</div>
</div>
</div>
</div>
......@@ -22,55 +27,54 @@
<script>
export default {
name: 'YqyFiveMinutes',
components: {
data(){
return {
list:[]
}
},
watch: {
mounted(){
this.getData();
},
props: {
hotTeachers: {
type: Array,
default:()=>{
return [
{
img: '../../images/Shape@2x.png',
name: '原来高血压还能这么预防最有效!赶快来看看',
hospital: '北京大学人民医院'
},
{
img: '../../images/Shape@2x.png',
name: '蒋立新',
hospital: '医院'
},
{
img: '../../images/Shape@2x.png',
name: '蒋立新',
hospital: '医院'
},
{
img: '../../images/Shape@2x.png',
name: '蒋立新',
hospital: '医院'
}
]
methods: {
//获取轮播图数据
getData(){
let _this = this,
parm = {
pageNo: 1,
token: 'ACEEFAE765AA4D9EB68BE80735845BF9',
pageSize: 10
}
this.GET('contents/fiveMinutes/contents',parm).then(res => {
if(res.respCode == '200'){
_this.list = res.fiveMinutesMedicalContentList || []
}
})
},
playMore(){
},
playFun(item){
rocNative.openFiveMintusAudio({
categoryName: item.categoryName,
appImageUrl: item.appImageUrl,
publishTime: item.publishTime,
id: item.id,
filePath: item.filePath,
title: item.title,
size:item.size,
isPlay: true,
fileType: item.fileType,
totalTime: item.totalTime
})
}
},
data () {
return {
}
},
mounted(){
},
methods: {
fiveMinutesMore(){
console.log('fiveMinutesMore');
this.$emit('fiveMinutesMore')
},
video(val){
console.log('video',val);
this.$emit('video')
}
}
}
</script>
......@@ -107,32 +111,56 @@ export default {
border-bottom: 1px solid RGBA(240, 240, 240, 1);
}
.teacher-itemimg{
width: px2rem(65px);
height: px2rem(65px);
width: px2rem(60px);
height: px2rem(60px);
border-radius: px2rem(3px);
float: left;
img{
width:100%;
height: 100%;
display: inline-block;
}
}
.five-text{
width: px2rem(260px);
margin-left:px2rem(70px);
height: px2rem(38px);
}
.teacher-itemname{
color: RGBA(102, 102, 102, 1);
margin-bottom: px2rem(13px);
height: px2rem(38px);
line-height: px2rem(19px);
font-size: px2rem(14px);
margin-bottom: px2rem(5px);
}
.five-tag{
width: px2rem(61px);
height: px2rem(17px);
border-radius: 0 px2rem(3px) px2rem(3px) px2rem(3px);
color: RGBA(191, 158, 21, 1);
background-color: RGBA(250, 229, 175, 1);
position: relative;
padding-right: px2rem(25px);
.m-tag{
height: px2rem(17px);
line-height: px2rem(17px);
padding: 0 px2rem(5px);
color: #BF9E15;
border-radius: 0 px2rem(3px) px2rem(3px) px2rem(3px);
background-color: px2rem(17px);
border:1px solid #FAE5AF;
}
}
.five-radio{
width: px2rem(25px);
height: px2rem(25px);
border-radius: 50%;
.m-play{
width: px2rem(22px);
height: px2rem(22px);
display: inline-block;
position:absolute;
right: 0;
top: px2rem(46px);
bottom: 0;
img{
width: 100%;
height: 100%;
display: block;
}
}
}
}
......
<template>
<div class="hot-teacher" id="famus-teacher">
<div class="title">
{{title}}
<div class="titleTop">
<span class="title">{{title}}</span>
<div class="get-more gray fs11" @click="goToPage('','list')">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
</div>
</div>
<div class="tea-list">
<div class="tea-listbox">
<div class="tea-item" :key="index" v-for="(item,index) in hotTeachers">
<div class="tea-item" :key="index" v-for="(item,index) in list" @click="goToPage(item.id)">
<div class="head-pic">
<img class="tea-itemimg" :src="item.avatarImageUrl"/>
</div>
......@@ -22,14 +25,7 @@ export default {
data(){
return {
title:'云鹊名师',
hotTeachers:[
{
"id": 381,
"name": "宣淼01",
"avatarImageUrl": "https://test-file.yunqueyi.com/image/jpeg/2018/07/26/20180726162641165-6c6f6a38.jpg",
"appImageUrl": "https://test-file.yunqueyi.com/image/jpeg/2018/06/23/20180623152219485-d71ef663.jpg"
}
],
list:[],
pageNo:1,
pageSize:10
}
......@@ -39,15 +35,33 @@ export default {
this.getData();
},
methods: {
//跳转
goToPage(id,parm){
if(parm == 'list'){
rocNative.gotoNewActivity({
"className": "com.picahealth.yunque.activitys.experienceshare.ExperienceShcom.picahealth.yunque.activitys.experienceshare.ExperienceSh"
})
}else{
rocNative.gotoNewActivityWithParams({
"className": "com.picahealth.yunque.activitys.playvideo.PlayVideoFullScrenA",
"params": { "id": id }
})
}
},
getData(){
let para = {
let _this = this,
para = {
pageNo:this.pageNo,
pageSize:this.pageSize,
}
this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => {
if(res.code == '000000'){
_this.list = res.data && res.data.pCourseDoctorModels || []
}
})
}
......@@ -58,15 +72,34 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.hot-teacher{
width: 100%;
background-color: #fff;
padding: 0 0 px2rem(26px) px2rem(15px);
.titleTop{
padding: 0 px2rem(15px) px2rem(15px) 0;
overflow: hidden;
}
.title{
font-size: px2rem(18px);
padding: 0 0 px2rem(21px) px2rem(5px);
font-weight: bold;
}
.get-more{
border: 1px solid RGBA(169, 174, 183, 1);
border-radius: px2rem(9px);
padding: px2rem(3px) px2rem(5px) px2rem(2px) px2rem(6px);
vertical-align: middle;
display: inline-block;
float: right;
margin-top:px2rem(3px);
}
.thorw-icon{
width: px2rem(8px);
height: px2rem(8px);
}
.tea-list{
width: 100%;
overflow: hidden;
......
<template>
<div class="banner-box">
<div class="banner space-between">
<div :class="index+1==resourceData.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in resourceData">
<!-- <img class="bannerImg" :src="item.img"/> -->
<img class="banner-img" src="../../images/Shape@2x.png"/>
<div :class="index+1==list.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in list" @click="goToPage(item)">
<img class="banner-img" :src="item.imageUrl"/>
<span class="banner-text fs24">
{{item.name}}<i></i>
{{item.name}}
<!-- <i></i> -->
</span>
</div>
</div>
</div>
</template>
<script>
import { setEventByModuleCode } from '@/utils/index'
export default {
name: 'YqyHomeBanner',
watch: {
},
props: {
resourceData: {
type: Array,
default:()=>{
return [
{img: '../../images/Shape@2x.png',
name: '微专业'},
{img: '../../images/Shape@2x.png',
name: '名师讲堂'},
{img: '../../images/Shape@2x.png',
name: '患者教育'},
{img: '../../images/Shape@2x.png',
name: '专项合作'},
{img: '../../images/Shape@2x.png',
name: '活动掠影'}
]
}
}
},
data () {
data(){
return {
list:[],
}
},
mounted(){
this.getData();
},
methods: {
}
goToPage(itemData){
let paramList = setEventByModuleCode(itemData);
// alert(JSON.stringify({
// modeCode: itemData.appModuleInfo.code,
// jsonString: paramList
// }))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
// 根据Mode Code分发到具体Webview
dispatchEventByModuleCode(itemData) {
let modeCode = itemData.appModuleInfo.code
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
} else if( modeCode === 'M100' || modeCode === 'M300' ) {
let urlPara = this.getUrlParm(paramList)
paramList[0].value += urlPara
}
if(typeof paramList === 'string' && !paramList){
paramList = []
}
// alert(JSON.stringify({
// modeCode: itemData.appModuleInfo.code,
// jsonString: paramList
// }))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
// 根据列表拼接参数字符串
getUrlParm(paramList) {
if ( paramList.length <= 1) {
return ''
}
let dataStr = ''
let list = [];
for( let i = 1; i < paramList.length; i ++) {
list.push(paramList[i].key + '=' + paramList[i].value)
}
dataStr = list.join('&')
if (dataStr !== '') {
return '?' + dataStr
}
return ''
},
getData(){
let _this = this,
para = {
category: 1,
position:1
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
//alert("000");
_this.list = res.data && res.data.iconColumnInformationModels || []
}
})
},
},
}
</script>
......
<template>
<div class="space-between header">
<div :class="resourceData.isTransparent?'search-transparent':'bgWhite'" class="search">
<input type="search" :class="resourceData.isTransparent?'search-transparent':''" class="input" v-model="message" :placeholder="resourceData.placeholder"/>
<div :class="isTransparent?'search-transparent':'bgWhite'" class="search">
<input type="search" :class="isTransparent?'search-transparent':''" class="input" v-model="searchVal" :placeholder="placeholder" :disabled="disabled" />
<img class="search-img" src='../../images/Group2@2x.png'>
</div>
<div class="header-right">
<img class="info" src='../../images/msg1.png'>
<div :class="resourceData.isTransparent?'transparent':'not-transparent'" class="info-count fs10">{{resourceData.count}}</div>
<div :class="isTransparent?'transparent':'not-transparent'" class="info-count fs10">{{count}}</div>
</div>
</div>
</template>
......@@ -15,38 +15,21 @@
export default {
data(){
return {
}
},
components: {
},
props: {
resourceData: {
type: Object,
default:()=>{
return {
isTransparent: true,
placeholder: '请输入课程名称',
img: '../../images/msg1.png',
count: "10"
}
}
}
},
watch: {
message(val){
console.log('val',val);
}
},
data () {
return {
message: ''
placeholder: '即将上线,敬请期待',
disabled:'disabled',
searchVal:'',
isTransparent: true,
count:111
}
},
mounted(){
},
methods: {
}
},
}
</script>
......
......@@ -32,7 +32,7 @@ export default {
},
methods: {
continueStudy(){
},
cancel(){
......@@ -48,6 +48,12 @@ export default {
if(res.code === '000000'){
_this.parmObj = res.data && res.data.continueLearningCourseModel || {};
if(_this.parmObj.remanentCourseNum == 0){
_this.isShow = false;
}else{
_this.isShow = _this.parmObj.showFlag ? true : false;
}
}
})
}
......
......@@ -94,7 +94,7 @@ export default {
if(res.code == '000000'){
_this.parmObj = res.data || {};
_this.isShow = _this.parmObj.showFlag;
_this.isShow = true || _this.parmObj.showFlag;
let isPullIndex = _this.isShow ? '1' : '2';
_this.$emit('evluatFun',{isPull:isPullIndex});
}
......
......@@ -6,7 +6,7 @@
<div class="couse-list">
<div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in list">
<div class="course-pic">
<div class="course-pic" @click="goToPage(item.name)">
<img :src="item.appIndexCourseUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
......@@ -42,6 +42,31 @@ export default {
this.getData()
},
methods: {
//跳转
goToPage(name){
rocNative.gotoNewActivityWithParams({
"className": "com.picahealth.yunque.activitys.courseplaynew.CourseIntroduc",
"params": { "title": name }
})
},
//收藏 取消收藏
collectFun(status,id){
let _this = this,
parm = {
token:this.token,
type:status,
courseId:id,
setEntry: 'headers'
}
_this.POST('favors',parm).then(function(res){
if(res.code === '000000'){
status = status == 1 ? 2 : 1;
_this.handelData(id,status);
}
})
},
getData(){
let _this = this,
parm = {
......
......@@ -55,6 +55,8 @@ export function parseTime(time, cFormat) {
return time_str
}
export function formatTime(time, option) {
time = +time * 1000
const d = new Date(time)
......@@ -157,8 +159,55 @@ export function getHostnameAndPort() {
}
}
function getUrlParmByCode(paramList) {
if ( paramList.length <= 1) {
return ''
}
let dataStr = ''
let list = [];
for( let i = 1; i < paramList.length; i ++) {
list.push(paramList[i].key + '=' + paramList[i].value)
}
dataStr = list.join('&')
if (dataStr !== '') {
return '?' + dataStr
}
return ''
}
export function setEventByModuleCode(itemData){
let modeCode = itemData.appModuleInfo.code || '';
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
}else if( modeCode === 'M100' || modeCode === 'M300' ) {
let urlPara = this.getUrlParm(paramList)
paramList[0].value += urlPara;
}else if( modeCode === 'M400') {
//单独跳转
this.$route.push({
path:'/certain',
query: {
}
})
///let url = ''
// let urlPara = this.getUrlParm(paramList)
// paramList[0].value += urlPara
}
if(typeof paramList === 'string' && !paramList){
paramList = []
}
return paramList;
}
// test1地址
const baseUrl = 'http://10.177.10.238:10201/'||'http://test1-sc.yunqueyi.com/'
const baseUrl = 'http://test1-api.yunqueyi.com/' || 'http://test1-sc.yunqueyi.com/'
const apiUrl = 'http://10.177.10.238:10201' || 'http://test1-api.yunqueyi.com/'
// // uat地址
......
/*
注册移动端通用服务
*/
(function (e) {
!function (e) {
var i = {}, t = {}, n = 0;
var stateChange;
e.rocNative = {
// 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法
__nativeCall: function (e, t, n) {
var a = i[e];
delete i[e], "function" == typeof a && a(t, n)
},
// if (t === '__gotoAuthentication') {
// __gotoAuthentication()
// }
// var a = i[e];
// delete i[e], "function" == typeof a && a(t, n)
},
__callNative: function (t, a, o) {
"function" == typeof o && (n++ , i[n] = o);
var __funcName = a && a.__funcName ? a.__funcName : '__funcName__' + n
a && a.__funcName && delete a.__funcName
var param = a === undefined ? {} : a;
var r = JSON.stringify({
name: t,
callbackId: "function" == typeof o ? n : -1,
param: a === undefined ? {} : a
// callbackId: "function" == typeof o ? n : -1,
callbackId: __funcName,
param: param
});
if (e.__rocAndroid) {
e.__rocAndroid.postMessage(r)
alert(r);
e.__rocAndroid.postMessage(r);
// e.__isAndroid = true;
return true;
}
if (e.webkit && window.webkit.messageHandlers.rociOS) {
// alert(r)
window.webkit.messageHandlers.rociOS.postMessage(r)
// e.__isIOS = true;
return true;
}
return false;
},
__onEvent: function (e, i) {
}, __onEvent: function (e, i) {
if (e && i && "function" == typeof i) {
(t[e] || (t[e] = [])).push(i)
}
},
__clearEvent: function (e) {
}, __clearEvent: function (e) {
e && delete t[e]
},
__fireEvent: function (e, i) {
}, __fireEvent: function (e, i) {
var n = t[e];
n && n.forEach(function (e) {
e(i)
})
},
on: function (e, i) {
}, on: function (e, i) {
rocNative.__onEvent(e, i)
},
off: function (e) {
}, off: function (e) {
rocNative.__clearEvent(e)
}
}, function () {
......@@ -55,5 +60,12 @@
})
}
})
}("toast", "pushView", "goBack", "appVersion", "appInit", "heartBeat", "getAppSetting", "setAppSetting")
})(window)
}("dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "gotoLogin", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight")
}(window);
window.__gotoAuthentication = function (params) {
alert('I am in __gotoAuthentication')
}
// console.log(33344)
// if (__isIOS){
// // rocNative.appInit()
// }
......@@ -8,13 +8,13 @@
<YqyHomeHeader/>
</div>
<div class="swiper">
<mt-swipe :auto="0">
<mt-swipe-item>
<img src="../../images/552064153@2x.png"/>
<mt-swipe :auto="0" :stopPropagation="stopPropagation" :prevent="stopPropagation" :speed="speedSwiper">
<mt-swipe-item v-for="(item,index) in listSwiper" :key="index">
<img :src="item.picturePath"/>
</mt-swipe-item>
<mt-swipe-item>
<!-- <mt-swipe-item>
<img src="../../images/552064153@2x.png"/>
</mt-swipe-item>
</mt-swipe-item> -->
</mt-swipe>
</div>
</section>
......@@ -22,18 +22,13 @@
<YqyHomeBanner/>
<div class="pathologic-list">
<div class="pathologic-item">
<span class="pathologic-icon">
<img src="../../images/G@2x.png"/>
</span>
<span class="pathologic-txt fs14">高血压全解析</span>
</div>
<div class="pathologic-item" style="margin-right: 0">
<div class="pathologic-item" v-for="(item,index) in listMiddle" :style="index%2==1?'margin-right: 0':''" @click="goToPatholo(item)">
<span class="pathologic-icon">
<img src="../../images/G3x.png"/>
<img :src="item.imageUrl"/>
</span>
<span class="pathologic-txt fs14">高血压全解析</span>
<span class="pathologic-txt fs14">{{item.name}}</span>
</div>
<div class="clear"></div>
</div>
......@@ -73,6 +68,7 @@
<script>
import { Swipe, SwipeItem ,Header} from 'mint-ui';
import { setEventByModuleCode } from '@/utils/index'
import BackTop from '../../components/common/backTop';
import YqyTeacherList from '../../components/business-new/yqy-teacher-list';
import YqyTopEvaluat from '../../components/business-new/yqy-home-learn-evaluation';
......@@ -92,7 +88,11 @@ export default {
isShowBackTop:false,
isShowEvluat:true,//是否显示下拉
isBodyPull:false,
speedSwiper:200,
stopPropagation:true,
isIntStyle:'',
listSwiper:[],//轮播图数据
listMiddle:[],//中间栏数据
}
},
components:{
......@@ -114,7 +114,9 @@ export default {
mounted(){
window.addEventListener('scroll', this.scrollFun);
this.init()
this.getSwiper();
this.getMiddel();
// this.init()
},
computed:{
......@@ -126,9 +128,10 @@ export default {
methods:{
scrollFun(){
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
//document.body.scrollTop + document.documentElement.scrollTop
if(scrollTop > 0 && this.isIntStyle == 'font-style pull-down'){
this.isIntStyle = 'font-style pull-up';
this.isShowEvluat = false;
}
//滚动条滚动到最新课程
var newCourseTop = document.querySelector('#famus-teacher').offsetTop;
var clientHeight = document.querySelector('#famus-teacher').clientHeight;
......@@ -150,7 +153,7 @@ export default {
},
getEluatFun(obj){
console.log(obj);
///console.log(obj);
if(obj.isPull == '1'){
this.isIntStyle = 'font-style pull-down'
}else if(obj.isPull == '2'){
......@@ -160,6 +163,53 @@ export default {
}
},
//获取轮播图数据
getSwiper(){
//version=3.7.3&systemType=3&token=364ED1F1C8064CEBABF745CFFFDE18CF
let _this = this,
para = {
version:"3.7.3",
systemType:3,
token:'364ED1F1C8064CEBABF745CFFFDE18CF'
}
//alert("000");
this.GET('contents/carusels/home', para).then(res => {
if(res.respCode == '200'){
_this.listSwiper = res.pcfList || []
}
})
},
//中间栏数据
getMiddel(){
let _this = this,
para = {
category: 1,
position:2
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
// console.log(res);
_this.listMiddle = res.data && res.data.iconColumnInformationModels || []
}
})
},
//中间栏跳转
goToPatholo(itemData){
let paramList = setEventByModuleCode(itemData);
// alert(JSON.stringify({
// modeCode: itemData.appModuleInfo.code,
// jsonString: paramList
// }))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
init() {
// this.API_GET('contents/homeButton/msg', {}).then( res => {
......@@ -231,11 +281,17 @@ export default {
transform: translateX(0%);
transform: translateY(-50%);
}
.swiper .mint-swipe-item img{
width: 100%;
height: 100%;
}
.swiper .mint-swipe-indicator{
width:2px;
height: 8px;
background: #fff;
opacity: 0.4;
float: left;
margin-top:3px;
}
.swiper .is-active{
opacity: 1;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册