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

add

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