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

add

上级 205183f2
<template> <template>
<div class="cource-teach" id="adjust-u"> <div class="cource-teach" id="adjust-u">
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'"> <div :class="isFixed ? 'cource-header fixed' : 'cource-header'" :style="{paddingTop:ptop,height:menuHeight}">
<div class="font-title"> <div class="font-title" :style="{top:isFixed?ptop:'0'}">
{{title}} {{title}}
<div class="change-part gray" @click="changeFun"> <div class="change-part gray" @click="changeFun">
换一批 换一批
...@@ -59,17 +59,23 @@ export default { ...@@ -59,17 +59,23 @@ export default {
noMore:false, noMore:false,
clientHeight:0, clientHeight:0,
isShowLoading:true, isShowLoading:true,
menuHeight:0,
ptop:0,
} }
}, },
props: props:{
{
isFixed:{ isFixed:{
default:false, default:false,
type:Boolean type:Boolean
} },
statusBarHeight:{
type:Number,
default:0
},
}, },
mounted(){ mounted(){
this.menuHeight = this.statusBarHeight + 7 + 40 + "px";
this.ptop = this.statusBarHeight +7 + "px";
this.getData(); this.getData();
}, },
...@@ -264,9 +270,11 @@ export default { ...@@ -264,9 +270,11 @@ export default {
.cource-header{ .cource-header{
margin: 0 0 px2rem(11px) 0; margin: 0 0 px2rem(11px) 0;
overflow: hidden; overflow: hidden;
height: px2rem(40px);
.font-title{ .font-title{
line-height: px2rem(40px); line-height: px2rem(40px);
height: px2rem(40px);
background: #fff;
} }
} }
.loading-box{ .loading-box{
...@@ -299,10 +307,8 @@ export default { ...@@ -299,10 +307,8 @@ export default {
top:0; top:0;
left: 0; left: 0;
width: 100%; width: 100%;
height: px2rem(40px);
line-height: px2rem(40px);
background: #fff; background: #fff;
z-index: 102; z-index: 112;
padding: 0 px2rem(15px);; padding: 0 px2rem(15px);;
} }
} }
......
...@@ -41,6 +41,15 @@ export default { ...@@ -41,6 +41,15 @@ export default {
}, },
methods: { methods: {
goToPage(itemData){ goToPage(itemData){
//console.log(itemData);
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_module',
actionCode:'c_module',
labelId:itemData.id,
labelvalue:itemData.name,
})
let paramList = this.setEventByModuleCode(itemData); let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code, modeCode: itemData.appModuleInfo.code,
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
"imageUrl":"", "imageUrl":"",
"appModuleInfo":{ "appModuleInfo":{
"code":"M300", "code":"M200",
"type":4, "type":4,
"name":"课程介绍页", "name":"课程介绍页",
"paramFlag":1, "paramFlag":1,
...@@ -58,13 +58,13 @@ export default { ...@@ -58,13 +58,13 @@ export default {
itemData.title = item.name; itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [ itemData.appModuleInfo["paramList"] = [
{ {
"key":"pageUrl", "key":"className",
"value":url.detailUrl, "value":'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type":4, "type":4,
"seqNo":1 "seqNo":1
}, },
{ {
"key":"audioId", "key":"id",
"value":`${item.id}`, "value":`${item.id}`,
"type":1, "type":1,
"seqNo":2 "seqNo":2
...@@ -74,8 +74,8 @@ export default { ...@@ -74,8 +74,8 @@ export default {
itemData.appModuleInfo.paramList = [ itemData.appModuleInfo.paramList = [
{ {
"key":"pageUrl", "key":"className",
"value":url.pageListUrl, "value":'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type":4, "type":4,
"seqNo":1 "seqNo":1
} }
...@@ -96,13 +96,16 @@ export default { ...@@ -96,13 +96,16 @@ export default {
let _this = this, let _this = this,
parm = { parm = {
pageNo: 1, pageNo: 1,
// token: _this.token, token: _this.token,
pageSize: 10 pageSize: 10,
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} // 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.list = res.fiveMinutesMedicalContentList || []
this.GET('rest/fiveMinutes/contents',parm).then(res => { this.API_GET('contents/fiveMinutes/contents',parm).then(res => {
if(res.respCode == '200'){ if(res.respCode == '200'){
_this.list = res.fiveMinutesMedicalContentList || [] _this.list = res.fiveMinutesMedicalContentList || []
...@@ -141,7 +144,7 @@ export default { ...@@ -141,7 +144,7 @@ export default {
.hot-teacher{ .hot-teacher{
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
padding: 0 px2rem(15px) px2rem(26px); padding: 0 px2rem(15px) 0;
margin-top:px2rem(15px); margin-top:px2rem(15px);
.img{ .img{
width: px2rem(109px); width: px2rem(109px);
......
...@@ -27,56 +27,21 @@ export default { ...@@ -27,56 +27,21 @@ export default {
}, },
methods: { methods: {
goToPage(itemData){ goToPage(itemData){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_icon',
actionCode:'c_icon_files',
labelId:itemData.id,
labelvalue:itemData.name,
})
let paramList = this.setEventByModuleCode(itemData); let paramList = this.setEventByModuleCode(itemData);
// alert(JSON.stringify({
// modeCode: itemData.appModuleInfo.code,
// jsonString: paramList
// }))
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code, modeCode: itemData.appModuleInfo.code,
jsonString: paramList jsonString: paramList
}) })
}, },
// 根据Mode Code分发到具体Webview
dispatchEventByModuleCode(itemData) {
let modeCode = itemData.appModuleInfo.code
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
} else if( modeCode === 'M100' || modeCode === 'M300' ) {
let urlPara = this.getUrlParm(paramList)
paramList[0].value += urlPara
}
if(typeof paramList === 'string' && !paramList){
paramList = []
}
// alert(JSON.stringify({
// modeCode: itemData.appModuleInfo.code,
// jsonString: paramList
// }))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
// 根据列表拼接参数字符串
getUrlParm(paramList) {
if ( paramList.length <= 1) {
return ''
}
let dataStr = ''
let list = [];
for( let i = 1; i < paramList.length; i ++) {
list.push(paramList[i].key + '=' + paramList[i].value)
}
dataStr = list.join('&')
if (dataStr !== '') {
return '?' + dataStr
}
return ''
},
getData(){ getData(){
let _this = this, let _this = this,
para = { para = {
......
<template> <template>
<div :class="searchFix?'header fixed' : 'header' " id="search-top"> <div :class="searchFix?'header fixed' : 'header' " id="search-top" :style="{height:menuptop}">
<div class="search-menu"> <div class="search-menu" :style="{paddingTop:ptop}">
<div :class="isTransparent?'search-transparent':'bgWhite'" class="search"> <div :class="isTransparent?'search-transparent':'bgWhite'" class="search">
<input type="search" :class="isTransparent?'search-transparent':''" class="input" v-model="searchVal" :placeholder="placeholder" :disabled="disabled" /> <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'> <img v-if="searchFix" class="search-img" src='../../images/search-grey.png'>
...@@ -26,6 +26,8 @@ export default { ...@@ -26,6 +26,8 @@ export default {
isMax:false,//消息数量是否大于99 isMax:false,//消息数量是否大于99
count:'', count:'',
isShowMsg:true, isShowMsg:true,
ptop:0,
menuptop:0,
} }
}, },
props:{ props:{
...@@ -33,6 +35,10 @@ export default { ...@@ -33,6 +35,10 @@ export default {
type:String, type:String,
default:'' default:''
}, },
statusBarHeight:{
type:Number,
default:0
},
searchFix:{ searchFix:{
type:Boolean, type:Boolean,
default:false, default:false,
...@@ -40,7 +46,11 @@ export default { ...@@ -40,7 +46,11 @@ export default {
}, },
mounted(){ mounted(){
// console.log(this.msgCount);
this.count = this.msgCount; this.count = this.msgCount;
this.ptop = this.statusBarHeight+7+'px';
this.menuptop = this.statusBarHeight+7+43+'px'
// console.log(this.statusBarHeight);
if(this.msgCount == ''){ if(this.msgCount == ''){
this.isShowMsg = false this.isShowMsg = false
} }
...@@ -111,7 +121,7 @@ html,body{ ...@@ -111,7 +121,7 @@ html,body{
} }
.header{ .header{
width: 100%; width: 100%;
height: px2rem(50px); /*//height: px2rem(50px);*/
position: relative; position: relative;
} }
...@@ -119,10 +129,10 @@ html,body{ ...@@ -119,10 +129,10 @@ html,body{
.search-menu{ .search-menu{
background: #fff; background: #fff;
position: fixed; position: fixed;
height: px2rem(50px); z-index: 110;
top:0; top:0;
left: 0; left: 0;
padding:px2rem(10px) px2rem(25px) 0 px2rem(15px); padding:px2rem(10px) px2rem(25px) px2rem(13px) px2rem(15px);
} }
.search-transparent::-webkit-input-placeholder{ .search-transparent::-webkit-input-placeholder{
color:#666; color:#666;
...@@ -130,11 +140,16 @@ html,body{ ...@@ -130,11 +140,16 @@ html,body{
.search{ .search{
border-color:#ddd; border-color:#ddd;
} }
.info-count{
background: #FB5B52;
color: #fff
}
} }
.search-menu{ .search-menu{
padding: 0 px2rem(25px) 0 px2rem(15px); padding: 0 px2rem(25px) 0 px2rem(15px);
height: px2rem(30px);
width: 100%; width: 100%;
position: absolute;
} }
.search{ .search{
width: px2rem(290px); width: px2rem(290px);
......
...@@ -33,7 +33,15 @@ export default { ...@@ -33,7 +33,15 @@ export default {
}, },
methods: { methods: {
continueStudy(item){ continueStudy(item){
this.isShow = false;
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_course',
actionCode:'c_play',
labelId:itemData.id,
//labelvalue:itemData.name,
})
let itemData={ let itemData={
"title":item.name, "title":item.name,
"imageUrl":"", "imageUrl":"",
...@@ -62,9 +70,18 @@ export default { ...@@ -62,9 +70,18 @@ export default {
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code, modeCode: itemData.appModuleInfo.code,
jsonString: paramList jsonString: paramList
}) });
this.isShow = false;
}, },
cancel(){ cancel(){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_course',
actionCode:'c_close',
//labelId:itemData.id,
//labelvalue:itemData.name,
})
this.isShow = false this.isShow = false
}, },
getData(){ getData(){
......
...@@ -227,7 +227,8 @@ export function pageJumpUrl(){ ...@@ -227,7 +227,8 @@ export function pageJumpUrl(){
// test1地址 // test1地址
const baseUrl = 'http://dev-sc.yunqueyi.com/' || 'http://10.177.10.238:10201/' || 'http://test1-sc.yunqueyi.com/' const baseUrl = 'http://dev-sc.yunqueyi.com/' || 'http://10.177.10.238:10201/' || 'http://test1-sc.yunqueyi.com/'
const apiUrl = 'http://dev-sc.yunqueyi.com/'||'http://10.177.10.238:10201' || 'http://test1-api.yunqueyi.com/' const apiUrl = 'http://dev-api.yunqueyi.com/'||'http://10.177.10.238:10201' || 'http://test1-api.yunqueyi.com/'
const devApiUri = 'http://dev-api.yunqueyi.com/'
// // uat地址 // // uat地址
...@@ -240,7 +241,10 @@ const apiUrl = 'http://dev-sc.yunqueyi.com/'||'http://10.177.10.238:10201' || 'h ...@@ -240,7 +241,10 @@ const apiUrl = 'http://dev-sc.yunqueyi.com/'||'http://10.177.10.238:10201' || 'h
// 为每个URL添加应用校验密钥 // 为每个URL添加应用校验密钥
export function getBaseUrl(url) { export function getBaseUrl(url,str) {
if(str == 'dev-api'){
return devApiUri + url
}
return baseUrl + url return baseUrl + url
......
...@@ -44,7 +44,7 @@ module.exports = { ...@@ -44,7 +44,7 @@ module.exports = {
labelId:options.labelId || '', labelId:options.labelId || '',
labelvalue:options.labelvalue || '', labelvalue:options.labelvalue || '',
createdTime: options.createdTime || new Date().getTime(), createdTime: options.createdTime || new Date().getTime(),
type: options.type || '', type: options.type || '0',
menuCode: options.menuCode || '', menuCode: options.menuCode || '',
// menuToCode:options.menuToCode || '', // menuToCode:options.menuToCode || '',
duration: options.duration || 0, duration: options.duration || 0,
...@@ -118,11 +118,11 @@ module.exports = { ...@@ -118,11 +118,11 @@ module.exports = {
// 通用GET请求 // 通用GET请求
GET(api, para, callback) { GET(api, para, callback,str) {
para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
let url = api + this.getUrlPara(para) let url = api + this.getUrlPara(para)
return fetch({ return fetch({
url: getBaseUrl(url), url: str =='dev-api' ? getBaseUrl(url,'dev-api') : getBaseUrl(url),
method: 'get', method: 'get',
data: para data: para
}) })
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<section class="home-header"> <section class="home-header">
<div class="home-topMenu"> <div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix"/> <YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" :statusBarHeight="statusBarHeight"/>
</div> </div>
<div class="swiper"> <div class="swiper">
<mt-swipe :auto="0" :speed="speedSwiper"> <mt-swipe :auto="0" :speed="speedSwiper">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<YqyFiveMinutes/> <YqyFiveMinutes/>
<!--为你推荐--> <!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed"/> <YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight"/>
<!--返回顶部--> <!--返回顶部-->
<BackTop v-if="isShowBackTop"/> <BackTop v-if="isShowBackTop"/>
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
appVersion:'', appVersion:'',
userToken:'', userToken:'',
searchFix:false, searchFix:false,
statusBarHeight:0, statusBarHeight:20,
} }
}, },
components:{ components:{
...@@ -195,7 +195,15 @@ export default { ...@@ -195,7 +195,15 @@ export default {
//轮播图跳转 //轮播图跳转
goLinkByswiper(item){ goLinkByswiper(item){
///alert("0000"); ///alert("0000");
console.log(item); // console.log(item);
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_banner',
actionCode:'c_banner',
// labelId:item.id,
})
let itemData = { let itemData = {
"title":item.name, "title":item.name,
...@@ -302,13 +310,13 @@ export default { ...@@ -302,13 +310,13 @@ export default {
}else{ }else{
this.isShowBackTop = false; this.isShowBackTop = false;
} }
if(scrollTop >= searchBox){ if(scrollTop > searchBox){
///console.log(scrollTop,searchBox); ///console.log(scrollTop,searchBox);
this.searchFix = true; this.searchFix = true;
}else{ }else{
this.searchFix = false; this.searchFix = false;
} }
if(scrollTop >= adjustTop){ if(scrollTop+30 >= adjustTop){
this.isFixed = true; this.isFixed = true;
}else{ }else{
this.isFixed = false; this.isFixed = false;
...@@ -353,7 +361,7 @@ export default { ...@@ -353,7 +361,7 @@ export default {
this.GET('contents/carusels/home', para).then(res => { this.GET('contents/carusels/home', para).then(res => {
if(res.respCode == '200'){ if(res.respCode == '200'){
///alert("res");
_this.listSwiper = res.pcfList || [] _this.listSwiper = res.pcfList || []
} }
}) })
...@@ -377,6 +385,14 @@ export default { ...@@ -377,6 +385,14 @@ export default {
//中间栏跳转 //中间栏跳转
goToPatholo(itemData){ goToPatholo(itemData){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_middle',
actionCode:'c_field',
labelId:itemData.id,
labelvalue:itemData.name,
})
let paramList = this.setEventByModuleCode(itemData); let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code, modeCode: itemData.appModuleInfo.code,
...@@ -476,7 +492,7 @@ export default { ...@@ -476,7 +492,7 @@ export default {
.home-topMenu{ .home-topMenu{
width: 100%; width: 100%;
text-align:center; text-align:center;
top:px2rem(27px); top:0;
position: absolute; position: absolute;
z-index: 10; z-index: 10;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册