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

add

上级 6cb6c937
...@@ -72,6 +72,10 @@ export default { ...@@ -72,6 +72,10 @@ export default {
type:Number, type:Number,
default:0 default:0
}, },
userToken:{
type:String,
default:''
}
}, },
mounted(){ mounted(){
this.menuHeight = this.statusBarHeight + 7 + 40 + "px"; this.menuHeight = this.statusBarHeight + 7 + 40 + "px";
...@@ -178,11 +182,12 @@ export default { ...@@ -178,11 +182,12 @@ export default {
}) })
let _this = this, let _this = this,
parm = { parm = {
token:this.token, token:_this.userToken,
type:status, type:status,
courseId:id, courseId:id,
setEntry: 'headers' setEntry: 'headers'
} }
/// alert(this.token)
_this.POST('contents/favors',parm).then(function(res){ _this.POST('contents/favors',parm).then(function(res){
if(res.code === '000000'){ if(res.code === '000000'){
......
...@@ -39,6 +39,12 @@ export default { ...@@ -39,6 +39,12 @@ export default {
mounted(){ mounted(){
this.getData(); this.getData();
}, },
props:{
userToken:{
type:String,
default:''
}
},
methods: { methods: {
goToPage(itemData){ goToPage(itemData){
//console.log(itemData); //console.log(itemData);
...@@ -62,6 +68,7 @@ export default { ...@@ -62,6 +68,7 @@ export default {
para = { para = {
category: 1, category: 1,
position:3, position:3,
token:this.userToken,
setEntry: 'headers' setEntry: 'headers'
} }
this.GET('contents/HomeColumn/Information', para).then(res => { this.GET('contents/HomeColumn/Information', para).then(res => {
......
...@@ -46,6 +46,12 @@ export default { ...@@ -46,6 +46,12 @@ export default {
id:'' id:''
} }
}, },
props:{
userToken:{
type:String,
default:''
}
},
created(){ created(){
let _this = this; let _this = this;
...@@ -137,13 +143,13 @@ export default { ...@@ -137,13 +143,13 @@ export default {
}) })
}, },
//获取轮播图数据 //获取数据
getData(){ getData(){
let _this = this, let _this = this,
parm = { parm = {
pageNo: 1, pageNo: 1,
token: _this.token, token: _this.userToken,
pageSize: 10, pageSize: 10,
data:{ data:{
setEntry: 'headers' setEntry: 'headers'
......
...@@ -35,20 +35,31 @@ export default { ...@@ -35,20 +35,31 @@ export default {
mounted(){ mounted(){
this.getData(); this.getData();
}, },
props:{
userToken:{
type:String,
default:''
}
},
methods: { methods: {
//跳转 //跳转
goToPage(item,parm){ goToPage(item,parm){
console.log(item); console.log(item);
let _this = this;
if(parm == 'list'){ if(parm == 'list'){
this.$router.push({ this.$router.push({
path: '/teachers' path: '/teachers',
query:{
userToken:_this.userToken
}
}) })
}else{ }else{
this.$router.push({ this.$router.push({
path: '/teachersDetail', path: '/teachersDetail',
query:{ query:{
id:item.id id:item.id,
userToken:_this.userToken
} }
}) })
} }
...@@ -121,6 +132,7 @@ export default { ...@@ -121,6 +132,7 @@ export default {
para = { para = {
pageNo:this.pageNo, pageNo:this.pageNo,
pageSize:this.pageSize, pageSize:this.pageSize,
token:this.userToken,
setEntry: 'headers' setEntry: 'headers'
} }
this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => { this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => {
......
...@@ -25,6 +25,13 @@ export default { ...@@ -25,6 +25,13 @@ export default {
mounted(){ mounted(){
this.getData(); this.getData();
}, },
props:{
userToken:{
type:String,
default:''
}
},
methods: { methods: {
goToPage(itemData){ goToPage(itemData){
this.pageBurialPoin({ this.pageBurialPoin({
...@@ -50,7 +57,8 @@ export default { ...@@ -50,7 +57,8 @@ export default {
para = { para = {
category: 1, category: 1,
position:1, position:1,
setEntry: 'headers' setEntry: 'headers',
token:this.userToken
} }
this.GET('contents/HomeColumn/Information', para).then(res => { this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){ if(res.code == '000000'){
......
...@@ -54,6 +54,10 @@ export default { ...@@ -54,6 +54,10 @@ export default {
default:false, default:false,
type:Boolean type:Boolean
},
userToken:{
type:String,
default:''
} }
}, },
data () { data () {
...@@ -87,9 +91,10 @@ export default { ...@@ -87,9 +91,10 @@ export default {
getData:function(){ getData:function(){
let _this = this, para = { let _this = this, para = {
sysCode: 27, sysCode: 27,
token: _this.token, token: _this.userToken,
setEntry: 'headers' setEntry: 'headers'
} }
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'){
...@@ -104,6 +109,9 @@ export default { ...@@ -104,6 +109,9 @@ export default {
_this.$emit('evluatFun',{isPull:isPullIndex}); _this.$emit('evluatFun',{isPull:isPullIndex});
} }
}else{
///alert(res.message);
} }
}) })
}, },
......
...@@ -42,6 +42,14 @@ export default { ...@@ -42,6 +42,14 @@ export default {
mounted(){ mounted(){
this.getData() this.getData()
}, },
props:{
userToken:{
type:String,
default:''
}
},
methods: { methods: {
//跳转 //跳转
goToPage(item){ goToPage(item){
...@@ -98,7 +106,7 @@ export default { ...@@ -98,7 +106,7 @@ export default {
}) })
let _this = this, let _this = this,
parm = { parm = {
token:this.token, token:this.userToken,
type:status, type:status,
courseId:id, courseId:id,
setEntry: 'headers' setEntry: 'headers'
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
<img src="../../images/grey-throw.png"/> <img src="../../images/grey-throw.png"/>
</span> </span>
{{title}} {{title}}
<span class="nav-share" @click="goShare"> <!-- <span class="nav-share" @click="goShare">
<img src="../../images/Shape1@2x.png"/> <img src="../../images/Shape1@2x.png"/>
</span> </span> -->
</div> </div>
</div> </div>
......
const yqyHome = { const yqyHome = {
state: { state: {
userMse: {},
}, },
mutations: { mutations: {
SET_USERMSE: (state, userMse) => {
state.userMse = userMse
},
}, },
actions: { actions: {
setUserMse({ commit }, userMse) {
commit('SET_USERMSE', userMse)
},
} }
} }
......
...@@ -102,6 +102,7 @@ module.exports = { ...@@ -102,6 +102,7 @@ module.exports = {
let path = paramList[0]['key']; let path = paramList[0]['key'];
let v = paramList[0]['value']; let v = paramList[0]['value'];
let query = this.setRouterParm(paramList); let query = this.setRouterParm(paramList);
//alert(this.token);
this.$router.push({ this.$router.push({
path: v, path: v,
query:query query:query
......
...@@ -32,24 +32,52 @@ export default { ...@@ -32,24 +32,52 @@ export default {
tabName:'测试', tabName:'测试',
tabList:[], tabList:[],
isShowBackTop:false, isShowBackTop:false,
pointStyle:'activity' pointStyle:'activity',
userToken:null
} }
}, },
components:{ components:{
TopNav, TopNav,
BackTop BackTop
}, },
mounted(){ created(){
///console.log(this.$route.query); let _this = this;
window.__getUserInfo = function(parm){
let jh = JSON.stringify(parm)
_this.token = parm.userToken;
}
this.getBaseInfo();
},
watch:{
token:function(){
if(this.token != null){
this.id = this.$route.query.categoryId this.id = this.$route.query.categoryId
this.getTabData(); this.getTabData();
window.addEventListener('scroll', this.scrollFun); window.addEventListener('scroll', this.scrollFun);
}
}
},
mounted(){
}, },
beforeDestroyed(){ beforeDestroyed(){
window.removeEventListener('scroll', this.scrollFun) window.removeEventListener('scroll', this.scrollFun)
}, },
methods:{ methods:{
//获取版本号
getBaseInfo(){
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
scrollFun(){ scrollFun(){
let scrollTop = document.documentElement.scrollTop; let scrollTop = document.documentElement.scrollTop;
this.isShowBackTop = scrollTop > 0 ? true : false; this.isShowBackTop = scrollTop > 0 ? true : false;
...@@ -81,7 +109,8 @@ export default { ...@@ -81,7 +109,8 @@ export default {
let _this = this, let _this = this,
parm = { parm = {
id:_this.id, id:_this.id,
setEntry: 'headers' setEntry: 'headers',
token:_this.userToken
} }
_this.GET('contents/contentList/tabById',parm).then(function(res){ _this.GET('contents/contentList/tabById',parm).then(function(res){
...@@ -104,7 +133,8 @@ export default { ...@@ -104,7 +133,8 @@ export default {
parm = { parm = {
id:_this.id, id:_this.id,
tabName : _this.tabName, tabName : _this.tabName,
setEntry: 'headers' setEntry: 'headers',
token:_this.userToken
} }
// if(_this.tabName != ''){ // if(_this.tabName != ''){
// parm.tabName = _this.tabName // parm.tabName = _this.tabName
......
<template> <template>
<section :class="isIntStyle"> <section :class="isIntStyle">
<!--展开收起学习评价--> <!--展开收起学习评价-->
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" v-on:evluatFun="getEluatFun"/> <YqyTopEvaluat :userToken="token" :isShowEvluat="isShowEvluat" v-if="isShowEvluat && token" v-on:evluatFun="getEluatFun"/>
<section class="home-header"> <section class="home-header">
<div class="home-topMenu"> <div class="home-topMenu">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
</section> </section>
<section class="home-body"> <section class="home-body">
<YqyHomeBanner/> <YqyHomeBanner :userToken="token" v-if="token"/>
<div class="pathologic-list"> <div class="pathologic-list">
<div class="pathologic-item" v-for="(item,index) in listMiddle" :style="index%2==1?'margin-right: 0':''" @click="goToPatholo(item)"> <div class="pathologic-item" v-for="(item,index) in listMiddle" :style="index%2==1?'margin-right: 0':''" @click="goToPatholo(item)">
...@@ -33,25 +33,25 @@ ...@@ -33,25 +33,25 @@
</div> </div>
<!--继续学习--> <!--继续学习-->
<YqyHomeKeepon :userMobile="userMobile"/> <YqyHomeKeepon :userMobile="userMobile" :userToken="token" v-if="token"/>
<!--专题分类--> <!--专题分类-->
<YqyCategoryThree1/> <YqyCategoryThree1 :userToken="token" v-if="token"/>
<!--健康守门人--> <!--健康守门人-->
<!-- <YqyHomePorter/> --> <!-- <YqyHomePorter/> -->
<!--云雀名师--> <!--云雀名师-->
<YqyHomeAdv/> <YqyHomeAdv :userToken="token" v-if="token"/>
<!--最新课程--> <!--最新课程-->
<YqyTeacherList/> <YqyTeacherList :userToken="token" v-if="token"/>
<!--分钟医学院--> <!--分钟医学院-->
<YqyFiveMinutes/> <YqyFiveMinutes :userToken="token" v-if="token"/>
<!--为你推荐--> <!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight"/> <YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight" v-if="token" :userToken="token"/>
<!--返回顶部--> <!--返回顶部-->
<BackTop v-if="isShowBackTop"/> <BackTop v-if="isShowBackTop"/>
...@@ -127,26 +127,27 @@ export default { ...@@ -127,26 +127,27 @@ export default {
_this.msgCount = params.msgNum || ''; _this.msgCount = params.msgNum || '';
} }
// window.__getUserInfo = function(parm){ window.__getUserInfo = function(parm){
// ///userMobile userName userToken systemType(Andriod: 1, iOS: 2) appVersion doctorId _this.systemType = parm.systemType;
// _this.systemType = parm.systemType; _this.appVersion = parm.appVersion;
// _this.appVersion = parm.appVersion; _this.token = parm.userToken;
// _this.userToken = parm.userToken; _this.userMobile = parm.userMobile;
// _this.userMobile = parm.userMobile; }
// if(!!_this.systemType && !!_this.appVersion){ ///_this.token = 'AF22B142535B440883135309BBF3F3B0'
// _this.getSwiper();
// } this.getUserInfo();
// }
window.__getStatusBarHeight = function(parm){ window.__getStatusBarHeight = function(parm){
_this.statusBarHeight = parm.statusBarHeight _this.statusBarHeight = parm.statusBarHeight
} }
}, },
mounted(){ mounted(){
console.log(this);
window.addEventListener('scroll', this.scrollFun); if(this.token != null ){
this.getStatusHight(); this.getStatusHight();
this.getUpdateData(); this.getUpdateData();
this.getMiddel(); this.getMiddel();
...@@ -154,6 +155,10 @@ export default { ...@@ -154,6 +155,10 @@ export default {
if(!!this.systemType && !!this.appVersion){ if(!!this.systemType && !!this.appVersion){
this.getSwiper(); this.getSwiper();
} }
window.addEventListener('scroll', this.scrollFun);
}
// this.getSwiper(); // this.getSwiper();
}, },
...@@ -176,8 +181,12 @@ export default { ...@@ -176,8 +181,12 @@ export default {
} }
} }
}, },
computed:{
},
methods:{ methods:{
//获取状态栏高度 //获取状态栏高度
getStatusHight(){ getStatusHight(){
rocNative.getStatusBarHeight({ rocNative.getStatusBarHeight({
...@@ -187,11 +196,11 @@ export default { ...@@ -187,11 +196,11 @@ export default {
}, },
//获取版本号 //获取版本号
// getUserInfo(){ getUserInfo(){
// rocNative.getUserInfo({ rocNative.getUserInfo({
// __funcName: '__getUserInfo' __funcName: '__getUserInfo'
// }) })
// }, },
//轮播图跳转 //轮播图跳转
goLinkByswiper(item){ goLinkByswiper(item){
...@@ -358,7 +367,7 @@ export default { ...@@ -358,7 +367,7 @@ export default {
para = { para = {
version:_this.appVersion, version:_this.appVersion,
systemType:_this.systemType, systemType:_this.systemType,
token:_this.userToken, token:_this.token,
data:{ data:{
setEntry: 'headers' setEntry: 'headers'
} }
......
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
collectFun(status,id){ collectFun(status,id){
let _this = this, let _this = this,
parm = { parm = {
token:this.token, token:_this.$route.query.userToken,
type:status, type:status,
courseId:id, courseId:id,
setEntry: 'headers' setEntry: 'headers'
......
...@@ -51,10 +51,12 @@ export default { ...@@ -51,10 +51,12 @@ export default {
}, },
methods:{ methods:{
goToDetail(id){ goToDetail(id){
let _this = this;
this.$router.push({ this.$router.push({
path: '/teachersDetail', path: '/teachersDetail',
query:{ query:{
id:id id:id,
userToken:_this.$route.query.userToken
} }
}) })
}, },
...@@ -84,7 +86,7 @@ export default { ...@@ -84,7 +86,7 @@ export default {
let _this = this, let _this = this,
para = { para = {
token:_this.token, token:_this.$route.query.userToken,
setEntry: 'headers' setEntry: 'headers'
} }
let url = '/contents/courseDoctor/getAllTeacher/orderby/'+_this.col+'/dir/'+_this.dir let url = '/contents/courseDoctor/getAllTeacher/orderby/'+_this.col+'/dir/'+_this.dir
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册