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

Merge branch 'dev-app-home-1029' into Branch_tag-app

...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
data () { data () {
return { return {
list:[], list:[],
pageNo:1, pageNo:2,
isDisabled:false, isDisabled:false,
pageSize:10, pageSize:10,
title:'为您推荐', title:'为您推荐',
...@@ -62,6 +62,7 @@ export default { ...@@ -62,6 +62,7 @@ export default {
ptop:20, ptop:20,
popHeight:0, popHeight:0,
menuptop:0, menuptop:0,
isReauestBack:true,
} }
}, },
props:{ props:{
...@@ -89,7 +90,7 @@ export default { ...@@ -89,7 +90,7 @@ export default {
mounted(){ mounted(){
this.list = this.parmData; this.list = this.parmData;
this.pageNo = this.adjustPageNo; //this.pageNo = this.adjustPageNo;
// if(window.__isAndroid){ // if(window.__isAndroid){
// this.popHeight = this.statusBarHeight/2 // this.popHeight = this.statusBarHeight/2
...@@ -182,11 +183,12 @@ export default { ...@@ -182,11 +183,12 @@ export default {
loadMore(){ loadMore(){
let _this = this; let _this = this;
// alert(_this.pageNo);
if(!_this.noMore){
_this.pageNo += 1; if(_this.isReauestBack){
_this.isLoading = true; _this.isLoading = true;
_this.loading = true;
//埋点 //埋点
this.pageBurialPoin({ this.pageBurialPoin({
menuLevel:1, menuLevel:1,
...@@ -257,36 +259,25 @@ export default { ...@@ -257,36 +259,25 @@ export default {
setEntry: 'headers' setEntry: 'headers'
} }
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){ _this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){ if(res.code === '000000'){
if(res.data == null || !res.data){ if(res.data == null || res.data.length == 0){
res.data = []; res.data = [];
_this.isLoading = false; _this.isLoading = false;
_this.noMore = true; _this.noMore = true;
_this.loading = true; _this.loading = true;
_this.isReauestBack = false;
}else{ }else{
_this.isReauestBack = true;
_this.list = [..._this.list ,...res.data]; _this.list = [..._this.list ,...res.data];
_this.isLoading = true; _this.isLoading = true;
_this.noMore = false; _this.noMore = false;
_this.loading = false; _this.loading = false;
_this.pageNo += 1;
} }
// if(type == 'loadMore'){
// _this.list = [..._this.list ,...res.data];
// }
// else{
// _this.list = res.data || [];
// }
} }
///_this.clientHeight = 'auto'
},function(){
_this.isLoading = false;
_this.noMore = false;
_this.loading = false;
}) })
} }
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</p> </p>
<div class="course-opt"> <div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span> <span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id)"> <span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}} {{item.whetherFavors==2?'收藏':'已收藏'}}
</span> </span>
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
}, },
//收藏 取消收藏 //收藏 取消收藏
collectFun(status,id){ collectFun(status,id,name){
// alert(this.userToken) // alert(this.userToken)
status = status == 1 ? 2 : 1; status = status == 1 ? 2 : 1;
this.pageBurialPoin({ this.pageBurialPoin({
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
functionCode:'f_new_course', functionCode:'f_new_course',
actionCode:'c_collect', actionCode:'c_collect',
labelId:id, labelId:id,
/// labelValue :item.name, labelValue :name,
}) })
let _this = this, let _this = this,
parm = { parm = {
......
...@@ -239,7 +239,7 @@ export function jumpEvaluatPage(){ ...@@ -239,7 +239,7 @@ export function jumpEvaluatPage(){
// test1地址 // test1地址
// const baseUrl = 'https://test1-sc.yunqueyi.com/' // const baseUrl = 'https://test1-sc.yunqueyi.com/'
// const apiUrl = 'https://test1-api.yunqueyi.com/' // const apiUrl = 'https://test1-api.yunqueyi.com/'
// const evaluatPageUrl = 'https://test1-phome.yunqueyi.com/gpr/#/home' // const evaluatPageUrl = 'http://10.177.10.225:9001/#/home' || 'https://test1-phome.yunqueyi.com/gpr/#/home'
// export const jumpWebPageUrl = 'https://test1-phome.yunqueyi.com/appl/#/' // export const jumpWebPageUrl = 'https://test1-phome.yunqueyi.com/appl/#/'
......
<template> <template>
<div class="main-body" ref="wrapper" :style="{ height: (wrapperHeight-50) + 'px' }"> <div class="main-body" ref="wrapper">
<section :class="isIntStyle"> <section :class="isIntStyle">
<!--展开收起学习评价--> <!--展开收起学习评价-->
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" :parmData="evaluctObj" v-on:evluatFun="getEluatFun"/> <YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" :parmData="evaluctObj" v-on:evluatFun="getEluatFun"/>
...@@ -10,26 +8,26 @@ ...@@ -10,26 +8,26 @@
<div class="home-topMenu"> <div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" v-on:setAppMsg="goAppMsg"/> <YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" v-on:setAppMsg="goAppMsg"/>
</div> </div>
<div class="banner-container swiper-container"> <!-- <div class="banner-container swiper-container">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="banner-slide swiper-slide" v-for="(item,index) in listSwiper" :key="index"> <div class="banner-slide swiper-slide" v-for="(item,index) in listSwiper" :key="index">
<img :src="item.imageUrl" @click="goLinkByswiper(item)"/> <img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</div> </div>
</div> </div>
  <!--需要焦点按钮时加这段div-->   
<div class="banner-pagination pagination"> <div class="banner-pagination pagination">
<span></span> <span></span>
</div> </div>
</div> </div> -->
<!-- <div class="swiper"> <div class="swiper">
<mt-swipe :auto="0" :speed="speedSwiper"> <mt-swipe :auto="3000" :speed="speedSwiper" :stopPropagation="prevent">
<mt-swipe-item v-for="(item,index) in listSwiper" :key="index" > <mt-swipe-item v-for="(item,index) in listSwiper" :key="index" >
<img :src="item.imageUrl" @click="goLinkByswiper(item)"/> <img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</mt-swipe-item> </mt-swipe-item>
</mt-swipe> </mt-swipe>
</div> --> </div>
</section> </section>
<section class="home-body"> <section class="home-body">
<YqyHomeBanner :parmData="iconList" :userToken="userToken"/> <YqyHomeBanner :parmData="iconList" :userToken="userToken"/>
...@@ -86,6 +84,7 @@ ...@@ -86,6 +84,7 @@
<script> <script>
import { Swipe, SwipeItem ,Header} from 'mint-ui'; import { Swipe, SwipeItem ,Header} from 'mint-ui';
// import { setEventByModuleCode } from '@/utils/index' // import { setEventByModuleCode } from '@/utils/index'
// import pullRefresh from '../../components/common/pullrefresh'
import BackTop from '../../components/common/backTop'; import BackTop from '../../components/common/backTop';
import YqyTeacherList from '../../components/business-new/yqy-teacher-list'; import YqyTeacherList from '../../components/business-new/yqy-teacher-list';
import YqyTopEvaluat from '../../components/business-new/yqy-home-learn-evaluation'; import YqyTopEvaluat from '../../components/business-new/yqy-home-learn-evaluation';
...@@ -101,6 +100,7 @@ export default { ...@@ -101,6 +100,7 @@ export default {
data(){ data(){
return { return {
wrapperHeight:0, wrapperHeight:0,
prevent:true,
topDistance:20, topDistance:20,
allLoaded:false, allLoaded:false,
isAutoFill:false, isAutoFill:false,
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
fiveList:[],//五分钟医学院 fiveList:[],//五分钟医学院
adjustList:[],//为您推荐 adjustList:[],//为您推荐
isBodyPull:false, isBodyPull:false,
speedSwiper:20, speedSwiper:300,
stopPropagation:true, stopPropagation:true,
isIntStyle:'', isIntStyle:'',
listSwiper:[],//轮播图数据 listSwiper:[],//轮播图数据
...@@ -145,6 +145,7 @@ export default { ...@@ -145,6 +145,7 @@ export default {
isFailTeaches:false, isFailTeaches:false,
isFailFive:false, isFailFive:false,
adjustPageNo:1, adjustPageNo:1,
setTimer:null,
} }
}, },
components:{ components:{
...@@ -170,7 +171,7 @@ export default { ...@@ -170,7 +171,7 @@ export default {
window.__nativeCallMsg = function(params){ window.__nativeCallMsg = function(params){
_this.msgCount = params.msgNum || ''; _this.msgCount = params.msgNum || '';
//alert(_this.msgCount); // alert(_this.msgCount);
} }
...@@ -182,9 +183,15 @@ export default { ...@@ -182,9 +183,15 @@ export default {
} }
window.__refresh = function(params){ window.__refresh = function(params){
_this.adjustPageNo = 1;
if(_this.setTimer != null){
clearInterval(_this.setTimer);
_this.isShowEvluat = false; _this.isShowEvluat = false;
_this.isIntStyle = ''; _this.isIntStyle = '';
_this.adjustPageNo = 1; }
//alert(_this.isShowEvluat);
//返回 //返回
if(_this.isRefreshFromBack){ if(_this.isRefreshFromBack){
...@@ -225,23 +232,20 @@ export default { ...@@ -225,23 +232,20 @@ export default {
if(parm.userMobile && parm.userMobile != ''){ if(parm.userMobile && parm.userMobile != ''){
_this.getKeepData(parm.userToken); _this.getKeepData(parm.userToken);
} }
_this.initByToken(parm.userToken); _this.initByToken(parm.userToken);
} }
//_this.getStatusHight(); //_this.getStatusHight();
// _this.token = '3315E74ABBEC49E98B9FC8FF18A7F838'; //
// _this.token = '593F679F62964076AF1C7489DA3343ED';
// _this.msgCount = '2' // _this.msgCount = '2'
// _this.isShowKeep = true; // _this.isShowKeep = true;
// _this.isHeightFromApp = true; // _this.isHeightFromApp = true;
// _this.getKeepData(_this.token); // _this.getKeepData(_this.token);
// _this.initByToken(_this.token); //_this.initByToken('593F679F62964076AF1C7489DA3343ED');
// _this.getIconData(_this.token); // _this.getIconData(_this.token);
// _this.isIntStyle = 'font-style pull-down'; // _this.isIntStyle = 'font-style pull-down';
// _this.fiveTimePull(); // _this.fiveTimePull();
...@@ -265,7 +269,6 @@ export default { ...@@ -265,7 +269,6 @@ export default {
isShowEvluat:function(n){ isShowEvluat:function(n){
///alert(n); ///alert(n);
if(!n && this.isIntStyle == 'font-style pull-up'){ if(!n && this.isIntStyle == 'font-style pull-up'){
///alert("000");
rocNative.setTabMiniIcon({ rocNative.setTabMiniIcon({
tabIndex:3, tabIndex:3,
iconTitle:'学习评价', iconTitle:'学习评价',
...@@ -279,30 +282,6 @@ export default { ...@@ -279,30 +282,6 @@ export default {
methods:{ methods:{
//再次执行请求
sendAgain(){
let _this = this;
if(_this.isFailSwiper == 2){
_this.getSwiper()
}
if(_this.isFailCatagory1){
_this.getIconData();
}
if(_this.isFailCatagory2){
_this.this.getMiddel();
}
if(_this.isFailCatagory3){
_this.this.getCategoryData();
}
if(_this.isFailTeaches){
_this.getYqDoctorData();
}
if(_this.isFailFive){
_this.getFiveData();
}
},
goAppMsg(){ goAppMsg(){
this.isRefrshMsg = true; this.isRefrshMsg = true;
...@@ -319,15 +298,15 @@ export default { ...@@ -319,15 +298,15 @@ export default {
//轮播图开始滚动 //轮播图开始滚动
swiperFun(){ swiperFun(){
var swiper = new Swiper('.swiper-container', { // var swiper = new Swiper('.swiper-container', {
speed: 600, // speed: 600,
            //loop: true, //             //loop: true,
            observer:true, //             observer:true,
            observeParents:true, //             observeParents:true,
            autoplayDisableOnInteraction : false, //             autoplayDisableOnInteraction : false,
            autoplay:3000, //             autoplay:3000,
pagination: '.pagination' // pagination: '.pagination'
}); // });
}, },
...@@ -409,8 +388,12 @@ export default { ...@@ -409,8 +388,12 @@ export default {
token:userToken, token:userToken,
} }
} }
clearInterval(_this.setTimer);
_this.isShowEvluat = false;
_this.isIntStyle = ''
_this.GET('contents/gp/v1/homepage', para).then(res => { _this.GET('contents/gp/v1/homepage', para).then(res => {
if(res.code == '000000'){ if(res.code == '000000'){
// res.data = { // res.data = {
// avatarImageUrl: "https://test-file.yunqueyi.com/File/doctor_default.png", // avatarImageUrl: "https://test-file.yunqueyi.com/File/doctor_default.png",
...@@ -429,7 +412,8 @@ export default { ...@@ -429,7 +412,8 @@ export default {
}else{ }else{
_this.isShowEvluat = _this.evaluctObj.showFlag; _this.isShowEvluat = res.data.showFlag;
if(!_this.isShowEvluat){ if(!_this.isShowEvluat){
_this.isIntStyle = '' _this.isIntStyle = ''
}else{ }else{
...@@ -593,7 +577,7 @@ export default { ...@@ -593,7 +577,7 @@ export default {
//为您推荐 //为您推荐
getAdjustData(userToken){ getAdjustData(userToken){
//alert(userToken);
this.adjustList = [] this.adjustList = []
let _this = this, let _this = this,
parm = { parm = {
...@@ -701,6 +685,7 @@ export default { ...@@ -701,6 +685,7 @@ export default {
if( this.isIntStyle == 'font-style pull-down'){ if( this.isIntStyle == 'font-style pull-down'){
this.isIntStyle = 'font-style pull-up'; this.isIntStyle = 'font-style pull-up';
clearInterval(this.setTimer)
this.isShowEvluat = false; this.isShowEvluat = false;
} }
var adjustTop = 0; var adjustTop = 0;
...@@ -742,12 +727,12 @@ export default { ...@@ -742,12 +727,12 @@ export default {
//五秒之后收起 //五秒之后收起
fiveTimePull(){ fiveTimePull(){
let _this = this; let _this = this;
let setTimer = setInterval(function(){ _this.setTimer = setInterval(function(){
_this.isIntStyle = 'font-style pull-up'; _this.isIntStyle = 'font-style pull-up';
_this.isShowEvluat = false; _this.isShowEvluat = false;
///alert("0") ///alert("0")
clearInterval(setTimer) clearInterval(_this.setTimer)
},60000); },5000);
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册