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

add

上级 96191de6
<template>
<div class="cource-teach" id="adjust-u">
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'" :style="{paddingTop:ptop,height:menuHeight}">
<div class="font-title" :style="{top:isFixed?ptop:'0'}">
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'" :style="{height:menuHeight}">
<div class="font-title" :style="{paddingTop:ptop}">
{{title}}
</div>
......@@ -58,6 +58,7 @@ export default {
isShowLoading:true,
menuHeight:0,
ptop:0,
popHeight:0
}
},
props:{
......@@ -79,10 +80,15 @@ export default {
},
},
mounted(){
//alert(this.userToken+"自组建");
this.list = this.parmData;
this.menuHeight = this.statusBarHeight + 7 + 40 + "px";
this.ptop = this.statusBarHeight + "px";
if(window.__isAndroid){
this.popHeight = this.statusBarHeight/2
}else{
this.popHeight = this.statusBarHeight
}
this.menuHeight = this.popHeight + 7 + 40 + "px";
this.ptop = this.popHeight + "px";
// this.getData();
},
......@@ -172,7 +178,12 @@ export default {
token:_this.userToken,
type:status,
courseId:id,
setEntry: 'headers'
setEntry: 'headers',
token:_this.userToken,
setEntry: 'headers',
data:{
token:_this.userToken,
}
}
/// alert(this.token)
_this.POST('contents/favors',parm).then(function(res){
......@@ -266,7 +277,7 @@ export default {
.font-title{
line-height: px2rem(40px);
height: px2rem(40px);
/*height: px2rem(40px);*/
background: #fff;
}
}
......@@ -295,6 +306,7 @@ export default {
}
}
.fixed{
background: #fff;
.font-title{
position: fixed;
top:0;
......
<template>
<div class="hot-teacher">
<div class="space-between">
<div class="hot-teacher" >
<div class="space-between" id="fiveBoxMenu">
<img class="img" src="../../images/mins.png"/>
<div @click="goToPage('')" class="five-more gray fs11">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
......
......@@ -22,6 +22,7 @@
<script>
// import { setEventByModuleCode } from '@/utils/index'
import { jumpWebPageUrl } from '@/utils/index'
export default {
data(){
return {
......@@ -50,32 +51,20 @@ export default {
//跳转
goToPage(item,parm){
console.log(item);
//console.log(item);
let _this = this;
let url = location.host+'/#/'
//let url = location.protocol+'//'+location.host+'/#/'
//alert(url);
if(parm == 'list'){
rocNative.gotoNewWebActivity({
url: 'http://10.177.10.231:8000/#/teachers'
url: jumpWebPageUrl+'teachers'
})
// this.$router.push({
// path: '/teachers',
// query:{
// userToken:_this.userToken
// }
// })
}else{
rocNative.gotoNewWebActivity({
url: 'http://10.177.10.231:8000/#/teachersDetail?id='+item.id+"&from=appHome"
url: jumpWebPageUrl+'teachersDetail?id='+item.id+"&from=appHome"
})
// this.$router.push({
// path: '/teachersDetail',
// query:{
// id:item.id,
// userToken:_this.userToken
// }
// })
}
// let obj = {}
......
......@@ -14,7 +14,7 @@
</template>
<script>
// import { setEventByModuleCode } from '@/utils/index'
import { jumpWebPageUrl } from '@/utils/index'
export default {
name: 'YqyHomeBanner',
data(){
......@@ -38,11 +38,22 @@ export default {
goToPage(itemData){
let paramList = this.setEventByModuleCode(itemData);
if(itemData.appModuleInfo && itemData.appModuleInfo.code != 'M400'){
if(itemData.appModuleInfo.code != 'M400'){
//alert(itemData.appModuleInfo.code);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
}else{
rocNative.gotoNewWebActivity({
url: jumpWebPageUrl+'teachers'
})
// this.$router.push({
// path: paramList[0].url,
// query:paramList[0].query
// })
}
this.pageBurialPoin({
menuLevel:1,
......
<template>
<div :class="searchFix?'header fixed' : 'header' " id="search-top" :style="{height:menuptop}">
<div class="search-menu" :style="{paddingTop:ptop}">
<div class="search-menu" :style="{paddingTop:'20px'}">
<!-- <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 v-if="searchFix" class="search-img" src='../../images/search-grey.png'>
......@@ -28,6 +28,7 @@ export default {
isShowMsg:true,
ptop:0,
menuptop:0,
popHeight:0
}
},
props:{
......@@ -47,9 +48,14 @@ export default {
mounted(){
if(window.__isAndroid){
this.popHeight = this.statusBarHeight/2
}else{
this.popHeight = this.statusBarHeight
}
this.count = this.msgCount;
this.ptop = this.statusBarHeight+7+'px';
this.menuptop = this.statusBarHeight+7+43+'px'
this.ptop = this.popHeight+7+'px';
this.menuptop = this.popHeight+7+'px'
// console.log(this.statusBarHeight);
if(this.msgCount == ''){
this.isShowMsg = false
......
<template>
<div class="cource-teach" id="new-course">
<div class="space-between cource-header" >
<div class="title" >{{title}}</div>
<div class="cource-teach" >
<div class="space-between cource-header">
<div class="title" id="new-course">{{title}}</div>
</div>
<div class="couse-list">
......@@ -112,10 +112,13 @@ export default {
})
let _this = this,
parm = {
token:this.userToken,
token:_this.userToken,
type:status,
courseId:id,
setEntry: 'headers'
setEntry: 'headers',
data:{
token:_this.userToken,
}
}
_this.POST('contents/favors',parm).then(function(res){
......
......@@ -41,7 +41,7 @@ export default {
methods: {
backPre(){
alert("999");
///alert("999");
rocNative.goBack()
// this.$router.back(-1);
},
......
......@@ -14,7 +14,7 @@ service.interceptors.request.use(config => {
// console.log('config: ', config, config.data.setEntry)
if (config.data && config.data.setEntry) {
config.headers['sysCode'] = config.data.sysCode || 10
if(config.token){
if(config.data.token){
config.headers['token'] = config.data.token || '63C3FA92AF8A45A48B31EB7FD97B95EB'
}
......
......@@ -230,6 +230,8 @@ export function jumpEvaluatPage(){
}
// dev地址
// const baseUrl = 'https://dev-sc.yunqueyi.com/'
// const apiUrl = 'https://dev-api.yunqueyi.com/'
......@@ -240,6 +242,8 @@ const apiUrl = 'https://test1-api.yunqueyi.com/'
const evaluatPageUrl = 'https://test1-phome.yunqueyi.com/gpr/#/home'
export const jumpWebPageUrl = 'https://test1-sc.yunqueyi.com/appl/#/'
//const devApiUri = 'https://test1-api.yunqueyi.com/'
// // uat地址
......
......@@ -103,11 +103,12 @@ module.exports = {
let path = paramList[0]['key'];
let v = paramList[0]['value'];
let query = this.setRouterParm(paramList);
//alert(this.token);
this.$router.push({
path: v,
paramList = [{
url:v,
query:query
})
}]
//alert(this.token);
}
if(typeof paramList === 'string' && !paramList){
paramList = []
......
<template>
<section :class="isIntStyle">
<!--展开收起学习评价-->
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" :parmData="evaluctObj" v-on:evluatFun="getEluatFun"/>
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" :statusBarHeight="statusBarHeight" v-if="isHeightFromApp"/>
</div>
<div class="swiper">
<mt-swipe :auto="0" :speed="speedSwiper">
<mt-swipe-item v-for="(item,index) in listSwiper" :key="index" >
<img :src="item.picturePath" @click="goLinkByswiper(item)"/>
</mt-swipe-item>
<!-- <mt-swipe-item>
<img src="../../images/552064153@2x.png"/>
</mt-swipe-item> -->
</mt-swipe>
</div>
</section>
<section class="home-body">
<YqyHomeBanner :parmData="iconList" v-if="iconList.length>0"/>
<div class="pathologic-list">
<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="item.imageUrl"/>
</span>
<span class="pathologic-txt fs14">{{item.name}}</span>
</div>
<div class="clear"></div>
</div>
<!--继续学习-->
<YqyHomeKeepon :parmData="keeponData" v-if="isShowKeep"/>
<div class="main-body" ref="wrapper" :style="{ height: (wrapperHeight-50) + 'px' }">
<mt-loadmore :top-method="loadTop" ref="loadmore" :autoFill="isAutoFill" :bottom-all-loaded="allLoaded" :topDistance="topDistance">
<section :class="isIntStyle">
<!--展开收起学习评价-->
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" :parmData="evaluctObj" v-on:evluatFun="getEluatFun"/>
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" :statusBarHeight="statusBarHeight" v-if="isHeightFromApp"/>
</div>
<div class="swiper">
<mt-swipe :auto="0" :speed="speedSwiper">
<mt-swipe-item v-for="(item,index) in listSwiper" :key="index" >
<img :src="item.picturePath" @click="goLinkByswiper(item)"/>
</mt-swipe-item>
<!-- <mt-swipe-item>
<img src="../../images/552064153@2x.png"/>
</mt-swipe-item> -->
</mt-swipe>
</div>
</section>
<section class="home-body">
<YqyHomeBanner :parmData="iconList" v-if="iconList.length>0"/>
<div class="pathologic-list">
<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="item.imageUrl"/>
</span>
<span class="pathologic-txt fs14">{{item.name}}</span>
</div>
<div class="clear"></div>
</div>
<!--继续学习-->
<YqyHomeKeepon :parmData="keeponData" v-if="isShowKeep"/>
<!--专题分类-->
<YqyCategoryThree1 v-if="listCategory.length>0" :parmData="listCategory"/>
<!--专题分类-->
<YqyCategoryThree1 v-if="listCategory.length>0" :parmData="listCategory"/>
<!--健康守门人-->
<!-- <YqyHomePorter/> -->
<!--云雀名师-->
<YqyHomeAdv :parmData="yqDoctorList" v-if="yqDoctorList.length>0"/>
<!--健康守门人-->
<!-- <YqyHomePorter/> -->
<!--云雀名师-->
<YqyHomeAdv :parmData="yqDoctorList" v-if="yqDoctorList.length>0"/>
<!--最新课程-->
<YqyTeacherList :parmData="newsDatalist" v-if="newsDatalist.length>0" :userToken="userToken"/>
<!--分钟医学院-->
<YqyFiveMinutes :parmData="fiveList" v-if="fiveList.length>0"/>
<!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight" :parmData="adjustList" v-if="adjustList.length>0" :userToken="userToken"/>
<!--返回顶部-->
<BackTop v-if="isShowBackTop"/>
<a class="news-update" @click="goAnchors" v-show="showNewCorse">
<span class="news-info">
{{updateTotal}}个新内容
<i></i>
</span>
</a>
</section>
</section>
<!--最新课程-->
<YqyTeacherList :parmData="newsDatalist" v-if="newsDatalist.length>0" :userToken="userToken"/>
<!--分钟医学院-->
<YqyFiveMinutes :parmData="fiveList" v-if="fiveList.length>0"/>
<!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight" :parmData="adjustList" v-if="adjustList.length>0" :userToken="userToken"/>
<!--返回顶部-->
<BackTop v-if="isShowBackTop"/>
<a class="news-update" @click="goAnchors" v-show="showNewCorse">
<span class="news-info">
{{updateStr}}个新内容
<i></i>
</span>
</a>
</section>
</section>
</mt-loadmore>
</div>
</template>
<script>
......@@ -83,6 +88,10 @@ import YqyHomeAdjust from '../../components/business-new/yqy-adjust';
export default {
data(){
return {
wrapperHeight:0,
topDistance:20,
allLoaded:false,
isAutoFill:false,
showNewCorse:false, // 是否显示新内容 默认不显示
isFixed:false,
isShowBackTop:false,
......@@ -113,6 +122,8 @@ export default {
userMobile:'',
userToken:'',
isHeightFromApp:false,
isFirstPull:true,
updateStr:''
}
},
components:{
......@@ -154,25 +165,25 @@ export default {
window.__getUserInfo = function(parm){
// alert(parm.userToken);
//alert(parm.userToken);
_this.systemType = parm.systemType;
_this.appVersion = parm.appVersion;
_this.token = parm.userToken;
// _this.userToken = parm.userToken;
_this.userMobile = parm.userMobile;
if(parm.userMobile != ''){
_this.getKeepData();
_this.getKeepData(parm.userToken);
}
_this.initByToken(parm.userToken);
_this.getSwiper(_this.appVersion,_this.systemType);
_this.getSwiper(_this.appVersion,_this.systemType,parm.userToken);
}
_this.initAll()
// _this.token = '63C3FA92AF8A45A48B31EB7FD97B95EB';
// _this.token = 'A19F2200C11A4E958650B2246039B560';
// _this.isHeightFromApp = true;
// _this.initByToken(_this.token);
......@@ -186,6 +197,8 @@ export default {
mounted(){
//console.log(this.isShowEvluat);
//this.getSwiper();
this.wrapperHeight =document.documentElement.clientHeight - this.$refs.wrapper.getBoundingClientRect().top;
},
beforeDestroyed(){
......@@ -209,14 +222,16 @@ export default {
},
methods:{
loadTop(){
location.reload();
this.$refs.loadmore.onTopLoaded();
},
initByToken(userToken){
this.getAdjustData(userToken);
this.getNewsData(userToken);
this.getEvaluctData(userToken);
window.addEventListener('scroll', this.scrollFun);
},
initAll(){
......@@ -256,12 +271,16 @@ export default {
// labelId:item.id,
})
let moduleCode = 'M100'
if(item.moduleCode === 'M015'){
moduleCode = 'M002'
}
let itemData = {
"title":item.name,
"imageUrl":"",
"appModuleInfo":{
"code":"M100",
"code":moduleCode,
"type":4,
"name":"名师风采个人展示",
"paramFlag":1,
......@@ -295,7 +314,10 @@ export default {
let _this = this, para = {
sysCode: 27,
token: userToken,
setEntry: 'headers'
setEntry: 'headers',
data:{
token:userToken,
}
}
this.GET('contents/gp/v1/homepage', para).then(res => {
......@@ -366,11 +388,16 @@ export default {
},
//继续学习数据
getKeepData(){
getKeepData(userToken){
let _this = this,
parm = {
token:_this.userToken,
setEntry: 'headers'
token:userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('contents/courses/continueLearningCourse',parm).then(function(res){
......@@ -411,7 +438,10 @@ export default {
pageNo:1,
pageSize:6,
token:userToken,
setEntry: 'headers'
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation',parm).then(function(res){
......@@ -455,14 +485,18 @@ export default {
//为您推荐
getAdjustData(userToken){
// alert(userToken);
//alert(userToken);
this.adjustList = []
let _this = this,
parm = {
pageNo:1,
pageSize:10,
token:userToken,
setEntry: 'headers'
setEntry: 'headers',
data:{
token:userToken,
}
}
......@@ -471,6 +505,7 @@ export default {
if(res.code === '000000'){
_this.adjustList = res.data || [];
if(_this.adjustList.length>0){
window.addEventListener('scroll', _this.scrollFun);
_this.userToken = userToken
}
......@@ -491,20 +526,14 @@ export default {
this.GET('contents/courses/queryCourseCount', para).then(res => {
if(res.code == '000000'){
if(res.data != null){
if(res.data.courseCount + res.data.fiveHospCount > 0){
_this.updateTotal = res.data.courseCount + res.data.fiveHospCount || 0
if(_this.updateTotal > 0){
_this.showNewCorse = true;
if((res.data.courseCount + res.data.fiveHospCount)>9){
//_this.showNewCorse = _this.updateTotal > 0 ? true : false
_this.updateTotal = '9+';
}
_this.updateStr = _this.updateTotal>9 ? '9+' : _this.updateTotal
}else{
_this.showNewCorse = false
}
}
}
}
......@@ -524,16 +553,18 @@ export default {
scrollEndFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
// let newCourseTop = document.querySelector('#famus-teacher').offsetTop;
// let fivesTop = document.querySelector('#fiveBoxMenu').offsetTop;
if(this.scrollTop != scrollTop){
this.showNewCorse = false;
}else{
//alert("000");
if(this.updateTotal.length>0){
this.showNewCorse = true;
}
this.showNewCorse = this.updateTotal>0 ? true : false;
}
},
scrollFun(){
......@@ -604,22 +635,22 @@ export default {
},
//获取轮播图数据
getSwiper(appVersion,systemType){
getSwiper(appVersion,systemType,userToken){
// let version = '3.7.3',
// systemType = 3;
// sys = 3;
// token = '364ED1F1C8064CEBABF745CFFFDE18CF'
let _this = this,
let _this = this,
para = {
version:appVersion,
systemType:systemType,
token:_this.token,
token:userToken,
data:{
setEntry: 'headers'
}
}
// para = {
// version:version,
// systemType:systemType,
// systemType:sys,
// token:_this.token,
// //setEntry: 'headers',
// data:{
......@@ -699,6 +730,7 @@ export default {
.swiper .is-active{
opacity: 1;
}
.mint-loadmore-top .mint-loadmore-text{font-size: 12px;}
</style>
<style lang="scss" scoped>
@import '../../style/mixin';
......
......@@ -29,7 +29,7 @@
<div class="item-line" v-for="(item,index) in newsList">
<div class="line-img" @click="goToPage(item)">
<img :src="item.imageUrl">
<span class="tag">{{item.structureName}}</span>
<span class="tag" v-if="item.structureName">{{item.structureName}}</span>
<span class="line-play" @click.stop="goToPage(item)">
<img src="../../images/grey-play.png">
</span>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册