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

add

上级 3a0a43fe
......@@ -51,7 +51,7 @@ export default {
title:'为您推荐',
isCollected:'',
allLoaded:true,
loading:true,//是否滚动加载
loading:false,//是否滚动加载
isLoading:false,//加载中
noMore:false,
clientHeight:'auto',
......@@ -69,15 +69,16 @@ export default {
type:Number,
default:0
},
userToken:{
type:String,
default:''
}
parmData:{
type:Array,
default:[]
},
},
mounted(){
this.list = this.parmData;
this.menuHeight = this.statusBarHeight + 7 + 40 + "px";
this.ptop = this.statusBarHeight +7 + "px";
this.getData();
// this.getData();
},
components:{
......@@ -126,26 +127,8 @@ export default {
})
},
//换一批
changeFun(){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_change',
})
// this.clientHeight = document.documentElement.clientHeight+'px';
// document.documentElement.scrollTop = document.documentElement.scrollTop - 100;
// document.body.scrollTop = document.body.scrollTop - 100;
//console.log(document.documentElement.scrollTop);
this.loading = true;
this.noMore = false;
this.list = [];
this.getData("change");
},
//滑动加载更多
loadMore(){
......
......@@ -37,13 +37,19 @@ export default {
},
mounted(){
this.getData();
// this.getData();
this.list = this.parmData;
this.leftObj = this.list[0] || {};
this.rightTop = this.list[1] || {};
this.rightBottom = this.list[2] || {};
this.rightBp = this.list[3] || {};
},
props:{
userToken:{
type:String,
default:''
}
parmData:{
type:Array,
default:[]
},
},
methods: {
goToPage(itemData){
......
......@@ -16,12 +16,12 @@
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click.stop="playFun(item)">
<div class="play-opt play-start" v-if="item.play =='1'">
<div class="play-opt play-start" v-show="item['play'] =='1'">
<span></span>
<span></span>
<span></span>
</div>
<div class="play-opt play-stop" v-if="item.play == '2'">
<div class="play-opt play-stop" v-show="item.play == '2'">
<span></span>
<span></span>
<span></span>
......@@ -47,9 +47,9 @@ export default {
}
},
props:{
userToken:{
type:String,
default:''
parmData:{
type:Array,
default:[]
}
},
created(){
......@@ -71,7 +71,7 @@ export default {
}
},
mounted(){
this.getData();
this.list = this.parmData;
},
methods: {
goToPage(item){
......@@ -142,40 +142,7 @@ export default {
jsonString: paramList
})
},
//获取数据
getData(){
let _this = this,
parm = {
pageNo: 1,
token: _this.userToken,
pageSize: 3,
data:{
setEntry: 'headers'
}
}
// let res = {"fiveMinutesMedicalContentList":[{"id":109,"title":"1312312","fileType":4,"filePath":"http://test-file.yunqueyi.com/audio/mp3/2018/06/09/2018060917174163-ef5bf97c.mp3","appImageUrl":"https://test-file.yunqueyi.com/image/jpeg/2018/06/09/20180609171335722-06552629.jpg","size":15463892,"totalTime":642,"publishTime":1528534800000,"categoryName":"政策播报"},{"id":109,"title":"1312312","fileType":4,"filePath":"http://test-file.yunqueyi.com/audio/mp3/2018/06/09/2018060917174163-ef5bf97c.mp3","appImageUrl":"https://test-file.yunqueyi.com/image/jpeg/2018/06/09/20180609171335722-06552629.jpg","size":15463892,"totalTime":642,"publishTime":1528534800000,"categoryName":"政策播报"},{"id":109,"title":"1312312","fileType":4,"filePath":"http://test-file.yunqueyi.com/audio/mp3/2018/06/09/2018060917174163-ef5bf97c.mp3","appImageUrl":"https://test-file.yunqueyi.com/image/jpeg/2018/06/09/20180609171335722-06552629.jpg","size":15463892,"totalTime":642,"publishTime":1528534800000,"categoryName":"政策播报"}],"respMsg":"成功","respCode":200}
// _this.list = res.fiveMinutesMedicalContentList || []
this.API_GET('contents/fiveMinutes/contents',parm).then(res => {
if(res.respCode == '200'){
_this.list = _this.handel(res.fiveMinutesMedicalContentList) || []
}
})
},
playMore(){
},
handel(d){
for(let i=0;i<d.length;i++){
d[i].play = '0';
}
return d;
},
changePlay(id,str){
//play : 1播放 2:暂停 0:初始状态
......@@ -198,6 +165,7 @@ export default {
},
playFun(item){
this.id = item.id;//保存id
this.changePlay(item.id,'1');
this.pageBurialPoin({
......@@ -263,7 +231,7 @@ export default {
width: px2rem(60px);
height: px2rem(60px);
border-radius: px2rem(3px);
box-shadow: 0 px2rem(2px) px2rem(3px) #004E40;
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(0, 78, 64, 0.1);
float: left;
img{
width:100%;
......
......@@ -33,13 +33,18 @@ export default {
},
mounted(){
this.getData();
this.list = this.parmData
//this.getData();
},
props:{
userToken:{
type:String,
default:''
}
parmData:{
type:Array,
default:[]
},
// userToken:{
// type:String,
// default:''
// }
},
methods: {
......
......@@ -23,14 +23,16 @@ export default {
}
},
mounted(){
this.getData();
this.list = this.parmData;
// this.getData();
},
props:{
userToken:{
type:String,
default:''
}
parmData:{
type:Array,
default:[]
},
},
methods: {
goToPage(itemData){
......@@ -51,22 +53,7 @@ export default {
}
},
getData(){
let _this = this,
para = {
category: 1,
position:1,
setEntry: 'headers',
token:this.userToken
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
//alert("000");
_this.list = res.data && res.data.iconColumnInformationModels || []
}
})
},
}
},
}
</script>
......
......@@ -8,7 +8,7 @@
</div> -->
<div class="header-right" @click="goToPage">
<img v-if="searchFix" class="info" src='../../images/msg2.png'>
<img e-else class="info" src='../../images/msg1.png'>
<img v-else class="info" src='../../images/msg1.png'>
<div :class="isMax?'num-max':'num-min'" class="info-count fs10" v-show="isShowMsg">{{count}}</div>
</div>
</div>
......
<template>
<div class="keep-learn">
<div v-show="isShow" class="border-bottom keep-learnbox">
<div class="border-bottom keep-learnbox">
<div class="learning-txt">
<div class="gray keepon-title">{{parmObj.name || '糖尿病诊疗'}}</div>
<div class="gray keepon-title">{{parmData.name || '糖尿病诊疗'}}</div>
<div class="keepon-txt">
<span class="gray fs24 keepon-right">已学习:{{parmObj.day}}</span>
<span class="gray fs24 keepon-right">剩余:{{parmObj.remanentCourseNum}}%</span>
<span class="gray fs24 continue-study" @click="continueStudy(parmObj)">继续学习></span>
<span class="gray fs24 keepon-right">已学习:{{parmData.day}}</span>
<span class="gray fs24 keepon-right">剩余:{{parmData.remanentCourseNum}}%</span>
<span class="gray fs24 continue-study" @click="continueStudy(parmData)">继续学习></span>
</div>
</div>
......@@ -29,23 +29,20 @@ export default {
}
},
props:{
userMobile:{
default:'',
type:String
parmData:{
type:Object,
default:{}
},
userToken:{
type:String,
default:''
}
},
mounted(){
if(this.userMobile != ''){
this.getData();
}else{
this.isShow = false;
}
// if(this.userMobile != ''){
// this.getData();
// }else{
// this.isShow = false;
// }
},
methods: {
......
......@@ -7,7 +7,7 @@
</span>
<span class="evaluat-persent">您的学习速度战胜了本院内{{setStyle(parmObj.gradePKToHospital)}}%的医生</span>
</div>
<div class="evaluat-part">
<div class="evaluat-part" @click="goToPage">
<span class="part-throw"><img src='../../images/grey-throw.png'/></span>
<div class="part-item part-finish">
<div class="item-num">
......@@ -48,6 +48,7 @@
</template>
<script>
import { jumpEvaluatPage } from '@/utils/index'
export default {
props: {
isShowEvluat:{
......@@ -55,6 +56,10 @@ export default {
type:Boolean
},
parmData:{
type:Object,
default:{}
},
userToken:{
type:String,
default:''
......@@ -68,10 +73,19 @@ export default {
}
},
mounted(){
this.getData();
this.isShow = this.isShowEvluat;
console.log(this.isShowEvluat)
},
methods: {
// 跳转到新的web界面
goToPage: function () {
let url =jumpEvaluatPage();
rocNative.gotoNewWebActivity({
pageUrl: url
})
},
setStyle:function(num){
var str = '';
if(num == NaN){
......@@ -108,14 +122,6 @@ export default {
let isPullIndex = _this.isShow ? '1' : '2';
_this.$emit('evluatFun',{isPull:isPullIndex});
}
// _this.isShow = _this.parmObj.showFlag;
// let isPullIndex = _this.isShow ? '1' : '2';
// _this.$emit('evluatFun',{isPull:isPullIndex});
}else{
///alert(res.message);
}
})
},
......
......@@ -40,14 +40,15 @@ export default {
}
},
mounted(){
this.getData()
//this.getData()
this.list = this.parmData;
},
props:{
userToken:{
type:String,
default:''
}
parmData:{
type:Array,
default:[]
},
},
methods: {
......
......@@ -14,9 +14,13 @@ 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
config.headers['token'] = config.data.token || '625D128F3DBA486AABE7CBA9BDF90E69'
if(config.token){
config.headers['token'] = config.data.token || '63C3FA92AF8A45A48B31EB7FD97B95EB'
}
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
}
return config
}, error => {
logger.debug('service.interceptors.request: ', error)
......
......@@ -224,6 +224,11 @@ export function pageJumpUrl(){
return url;
}
//跳转个人评价页面
export function jumpEvaluatPage(){
return evaluatPageUrl
}
// dev地址
// const baseUrl = 'https://dev-sc.yunqueyi.com/'
......@@ -232,6 +237,9 @@ export function pageJumpUrl(){
// test1地址
const baseUrl = 'https://test1-sc.yunqueyi.com/'
const apiUrl = 'https://test1-api.yunqueyi.com/'
const evaluatPageUrl = 'https://test1-phome.yunqueyi.com/gpr/#/home'
//const devApiUri = 'https://test1-api.yunqueyi.com/'
// // uat地址
......
......@@ -119,7 +119,10 @@ module.exports = {
// 通用GET请求
GET(api, para, callback,str) {
para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
if(para.token){
para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC'
}
let url = api + this.getUrlPara(para)
return fetch({
url: getBaseUrl(url),
......@@ -130,7 +133,10 @@ module.exports = {
// 通用POST请求
POST(api, para, callback) {
para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
if(para.token){
para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC'
}
//para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
return fetch({
url: getBaseUrl(api),
method: 'post',
......
<template>
<section :class="isIntStyle">
<!--展开收起学习评价-->
<YqyTopEvaluat :userToken="token" :isShowEvluat="isShowEvluat" v-if="isShowEvluat && token" v-on:evluatFun="getEluatFun"/>
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" :parmData="evaluctObj"/>
<section class="home-header">
<div class="home-topMenu">
......@@ -19,7 +19,7 @@
</div>
</section>
<section class="home-body">
<YqyHomeBanner :userToken="token" v-if="token"/>
<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)">
......@@ -33,25 +33,25 @@
</div>
<!--继续学习-->
<YqyHomeKeepon :userMobile="userMobile" :userToken="token" v-if="token"/>
<YqyHomeKeepon :parmData="keeponData" v-if="isShowKeep"/>
<!--专题分类-->
<YqyCategoryThree1 :userToken="token" v-if="token"/>
<YqyCategoryThree1 v-if="listCategory.length>0" :parmData="listCategory"/>
<!--健康守门人-->
<!-- <YqyHomePorter/> -->
<!--云雀名师-->
<YqyHomeAdv :userToken="token" v-if="token"/>
<YqyHomeAdv :parmData="yqDoctorList" v-if="yqDoctorList.length>0"/>
<!--最新课程-->
<YqyTeacherList :userToken="token" v-if="token"/>
<YqyTeacherList :parmData="newsDatalist" v-if="newsDatalist.length>0"/>
<!--分钟医学院-->
<YqyFiveMinutes :userToken="token" v-if="token"/>
<YqyFiveMinutes :parmData="fiveList" v-if="fiveList.length>0"/>
<!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight" v-if="token" :userToken="token"/>
<YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight" :parmData="adjustList" v-if="adjustList.length>0"/>
<!--返回顶部-->
<BackTop v-if="isShowBackTop"/>
......@@ -86,7 +86,16 @@ export default {
showNewCorse:false, // 是否显示新内容 默认不显示
isFixed:false,
isShowBackTop:false,
isShowEvluat:true,//是否显示下拉
isShowEvluat:false, //是否显示下拉
evaluctObj:{}, //下拉数据
iconList:[], //icon数据
keeponData:{}, //继续学习
isShowKeep:false,
listCategory:[], //专题分类数据
yqDoctorList:[],//云雀名师数据
newsDatalist:[],//最新课程
fiveList:[],//五分钟医学院
adjustList:[],//为您推荐
isBodyPull:false,
speedSwiper:20,
stopPropagation:true,
......@@ -98,12 +107,11 @@ export default {
hideNewCourse:true,
updateTotal:0,
msgCount:'',
userToken:'',
searchFix:false,
statusBarHeight:20,
statusBarHeight:0,
userMobile:'',
userToken:''
userToken:'',
}
},
components:{
......@@ -128,7 +136,11 @@ export default {
_this.msgCount = params.msgNum || '';
}
window.__refresh = function(params){
_this.init()
_this.initByToken()
}
window.__getStatusBarHeight = function(parm){
_this.statusBarHeight = parm.statusBarHeight
}
......@@ -139,34 +151,24 @@ export default {
_this.token = parm.userToken;
_this.userToken = parm.userToken;
_this.userMobile = parm.userMobile;
_this.initByToken();
_this.getSwiper(_this.appVersion,_this.systemType);
_this.init()
}
// _this.token = 'AA093EC1A2084B17B098515F2A04A6';
// _this.init()
_this.initAll()
// _this.token = '63C3FA92AF8A45A48B31EB7FD97B95EB';
// _this.initByToken();
this.getUserInfo();
window.__getStatusBarHeight = function(parm){
_this.statusBarHeight = parm.statusBarHeight
}
},
watch:{
userToken:function(n){
if(n != ''){
alert("000");
}
}
},
mounted(){
console.log(this.isShowEvluat);
},
beforeDestroyed(){
......@@ -188,24 +190,32 @@ export default {
}
}
},
computed:{
},
methods:{
init(){
if(this.token != null ){
initByToken(){
this.getAdjustData();
this.getNewsData();
this.getEvaluctData();
this.getKeepData();
window.addEventListener('scroll', this.scrollFun);
},
initAll(){
this.getStatusHight();
this.getUpdateData();
this.getMiddel();
this.getIconData();
this.getCategoryData();
this.getYqDoctorData();
// if(!!this.systemType && !!this.appVersion){
// this.getSwiper();
// }
window.addEventListener('scroll', this.scrollFun);
}
this.getFiveData();
},
//获取状态栏高度
......@@ -268,6 +278,169 @@ export default {
},
//获取评价
getEvaluctData(){
let _this = this, para = {
sysCode: 27,
token: _this.userToken,
setEntry: 'headers'
}
this.GET('contents/gp/v1/homepage', para).then(res => {
if(res.code == '000000'){
_this.evaluctObj = res.data || {};
if(res.data.certificateAcquireNumOfSelf == 0 && res.data.courseOverNumOfSelf == 0 && res.data.examOverNumOfSelf == 0){
_this.isShowEvluat = false;
}else{
_this.isShowEvluat = _this.evaluctObj.showFlag;
}
}
})
},
//获取小icon数据
getIconData(){
let _this = this,
para = {
category: 1,
position:1,
setEntry: 'headers',
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
//alert("000");
_this.iconList = res.data && res.data.iconColumnInformationModels || []
}
})
},
//获取专题分类s数据
getCategoryData(){
let _this = this,
para = {
category: 1,
position:3,
setEntry: 'headers'
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
//console.log(res);
_this.listCategory = res.data && res.data.iconColumnInformationModels || [];
/// console.log(_this.list);
}
})
},
//继续学习数据
getKeepData(){
let _this = this,
parm = {
token:_this.userToken,
setEntry: 'headers'
}
_this.GET('contents/courses/continueLearningCourse',parm).then(function(res){
if(res.code === '000000'){
_this.keeponData = res.data && res.data.continueLearningCourseModel || {};
if(_this.keeponData.remanentCourseNum == 0){
_this.isShowKeep = false;
}else{
_this.isShowKeep = _this.keeponData.showFlag ? true : false;
}
}
})
},
//云雀名师
getYqDoctorData(){
let _this = this,
para = {
pageNo:1,
pageSize:10,
setEntry: 'headers'
}
this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => {
if(res.code == '000000'){
_this.yqDoctorList = res.data && res.data.pCourseDoctorModels || []
}
})
},
//最新课程
getNewsData(){
let _this = this,
parm = {
pageNo:1,
pageSize:6,
token:_this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation',parm).then(function(res){
if(res.code === '000000'){
_this.newsDatalist = res.data.contentAppModels || [];
}
})
},
//五分钟医学院
getFiveData(){
let _this = this,
parm = {
pageNo: 1,
pageSize: 3,
data:{
setEntry: 'headers'
}
}
this.API_GET('contents/fiveMinutes/contents',parm).then(res => {
if(res.respCode == '200'){
_this.fiveList = _this.handelFive(res.fiveMinutesMedicalContentList) || []
}
})
},
//处理五分钟数据 初始化播放状态
handelFive(d){
for(let i=0;i<d.length;i++){
d[i].play = '0';
}
return d;
},
//为您推荐
getAdjustData(){
let _this = this,
parm = {
pageNo:1,
pageSize:10,
token:_this.userToken,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){
_this.adjustList = res.data || []
}
})
},
//有更新数据
getUpdateData(){
let _this = this,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册