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

add

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