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

add

上级 ff60f25e
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</p> </p>
<div class="course-opt"> <div class="course-opt">
<span class="opt-info">{{item.showTime == '' ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span> <span class="opt-info">{{item.showTime == '' ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id)"> <span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}} {{item.whetherFavors==2?'收藏':'已收藏'}}
</span> </span>
...@@ -80,6 +80,14 @@ export default { ...@@ -80,6 +80,14 @@ export default {
//跳转 //跳转
goToPage(item){ goToPage(item){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_course',
labelId:item.id,
labelvalue:item.name,
})
let itemData={ let itemData={
"title":item.name, "title":item.name,
"imageUrl":"", "imageUrl":"",
...@@ -113,6 +121,13 @@ export default { ...@@ -113,6 +121,13 @@ export default {
//换一批 //换一批
changeFun(){ changeFun(){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_change',
})
this.clientHeight = document.documentElement.clientHeight+'px'; this.clientHeight = document.documentElement.clientHeight+'px';
document.documentElement.scrollTop = document.documentElement.scrollTop - 20; document.documentElement.scrollTop = document.documentElement.scrollTop - 20;
document.body.scrollTop = document.body.scrollTop - 20; document.body.scrollTop = document.body.scrollTop - 20;
...@@ -131,7 +146,13 @@ export default { ...@@ -131,7 +146,13 @@ export default {
_this.pageNo += 1; _this.pageNo += 1;
_this.isLoading = true; _this.isLoading = true;
this.loading = true; this.loading = true;
//埋点
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_load_more'
})
setTimeout(()=>{ setTimeout(()=>{
_this.getData('loadMore'); _this.getData('loadMore');
},500) },500)
...@@ -140,7 +161,15 @@ export default { ...@@ -140,7 +161,15 @@ export default {
}, },
//收藏 取消收藏 //收藏 取消收藏
collectFun(status,id){ collectFun(status,id,name){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_collect',
labelId:id,
labelvalue:name,
})
let _this = this, let _this = this,
parm = { parm = {
token:this.token, token:this.token,
...@@ -196,12 +225,18 @@ export default { ...@@ -196,12 +225,18 @@ export default {
_this.list = res.data || []; _this.list = res.data || [];
} }
}else{ }else{
alert(res.message) _this.isLoading = false;
_this.noMore = false;
_this.loading = false;
} }
_this.clientHeight = 'auto' _this.clientHeight = 'auto'
_this.isLoading = false; _this.isLoading = false;
_this.loading = false; _this.loading = false;
},function(){
_this.isLoading = false;
_this.noMore = false;
_this.loading = false;
}) })
} }
} }
......
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
let _this = this, let _this = this,
para = { para = {
category: 1, category: 1,
position:3 position:3,
setEntry: 'headers'
} }
this.GET('contents/HomeColumn/Information', para).then(res => { this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){ if(res.code == '000000'){
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
methods: { methods: {
goToPage(item){ goToPage(item){
let url = pageJumpUrl(); let url = pageJumpUrl();
console.log(url); //console.log(url);
let itemData={ let itemData={
"title":item.name, "title":item.name,
"imageUrl":"", "imageUrl":"",
......
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
para = { para = {
pageNo:this.pageNo, pageNo:this.pageNo,
pageSize:this.pageSize, pageSize:this.pageSize,
setEntry: 'headers'
} }
this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => { this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => {
if(res.code == '000000'){ if(res.code == '000000'){
......
...@@ -81,7 +81,8 @@ export default { ...@@ -81,7 +81,8 @@ export default {
let _this = this, let _this = this,
para = { para = {
category: 1, category: 1,
position:1 position:1,
setEntry: 'headers'
} }
this.GET('contents/HomeColumn/Information', para).then(res => { this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){ if(res.code == '000000'){
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<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 class="search-img" src='../../images/Group2@2x.png'> <img class="search-img" src='../../images/Group2@2x.png'>
</div> </div>
<div class="header-right"> <div class="header-right" @click="goToPage">
<img class="info" src='../../images/msg1.png'> <img class="info" src='../../images/msg1.png'>
<div :class="isMax?'num-max':'num-min'" class="info-count fs10" v-show="isShowMsg">{{count}}</div> <div :class="isMax?'num-max':'num-min'" class="info-count fs10" v-show="isShowMsg">{{count}}</div>
</div> </div>
...@@ -43,7 +43,15 @@ export default { ...@@ -43,7 +43,15 @@ export default {
}, },
methods: { methods: {
goToPage(){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_notification',
actionCode:'c_notification',
})
rocNative.readMessage();
}
}, },
...@@ -74,6 +82,7 @@ html,body{ ...@@ -74,6 +82,7 @@ html,body{
width: px2rem(20px); width: px2rem(20px);
height: px2rem(20px); height: px2rem(20px);
position: relative; position: relative;
margin-top:px2rem(5px);
img{ img{
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -49,8 +49,9 @@ ...@@ -49,8 +49,9 @@
//返回 //返回
goBack(){ goBack(){
this.$router.back(-1);
//rocNative.backPreviousPage(); //rocNative.backPreviousPage();
rocNative.goBack(); //rocNative.goBack();
}, },
//分享 //分享
......
...@@ -222,8 +222,8 @@ export function pageJumpUrl(){ ...@@ -222,8 +222,8 @@ export function pageJumpUrl(){
// test1地址 // test1地址
const baseUrl = '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://10.177.10.238:10201' || 'http://test1-api.yunqueyi.com/' const apiUrl = 'http://dev-sc.yunqueyi.com/'||'http://10.177.10.238:10201' || 'http://test1-api.yunqueyi.com/'
// // uat地址 // // uat地址
......
...@@ -34,6 +34,27 @@ module.exports = { ...@@ -34,6 +34,27 @@ module.exports = {
} }
return '' return ''
}, },
pageBurialPoin(options){
let opt = {
menuLevel:options.menuLevel || '',
functionCode:options.functionCode || '',
actionCode: options.actionCode || '',
label:options.label || '',
labelId:options.labelId || '',
labelvalue:options.labelvalue || '',
createdTime: options.createdTime || new Date().getTime(),
type: options.type || '',
menuCode: options.menuCode || '',
// menuToCode:options.menuToCode || '',
duration: options.duration || 0,
menuFromCode:options.menuFromCode ||'',
params:options.params || '',
session:options.session || '',
}
console.log(opt);
rocNative.appBuryingPointEntrust(opt)
},
setRouterParm(paramList){ setRouterParm(paramList){
let parm = {}; let parm = {};
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
return true; return true;
} }
if (e.webkit && window.webkit.messageHandlers.rociOS) { if (e.webkit && window.webkit.messageHandlers.rociOS) {
alert(r) //alert(r)
window.webkit.messageHandlers.rociOS.postMessage(r) window.webkit.messageHandlers.rociOS.postMessage(r)
// e.__isIOS = true; // e.__isIOS = true;
return true; return true;
......
...@@ -22,10 +22,10 @@ import BackTop from '../../components/common/backTop'; ...@@ -22,10 +22,10 @@ import BackTop from '../../components/common/backTop';
export default { export default {
data(){ data(){
return { return {
tittle:'活动掠影', tittle:'',
list:[], list:[],
bgColor:'#fff', bgColor:'#fff',
navTitle:'活动掠影', navTitle:'',
isBorder:true, isBorder:true,
isNavFix:true, isNavFix:true,
id:'1', id:'1',
...@@ -39,13 +39,23 @@ export default { ...@@ -39,13 +39,23 @@ export default {
BackTop BackTop
}, },
mounted(){ mounted(){
console.log(this.$route.query); ///console.log(this.$route.query);
this.id = this.$route.query.categoryId this.id = this.$route.query.categoryId
this.getTabData(); this.getTabData();
window.addEventListener('scroll', this.scrollFun);
},
beforeDestroyed(){
window.removeEventListener('scroll', this.scrollFun)
}, },
methods:{ methods:{
scrollFun(){
let scrollTop = document.documentElement.scrollTop;
this.isShowBackTop = scrollTop > 0 ? true : false;
// if(scrollTop > 0){
// this.isShowBackTop = true;
// }
},
goToPage(itemData){ goToPage(itemData){
let paramList = this.setEventByModuleCode(itemData); let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
...@@ -54,16 +64,20 @@ export default { ...@@ -54,16 +64,20 @@ export default {
}) })
}, },
//查询tab //查询tab
getTabData(){ getTabData(){
let _this = this, let _this = this,
parm = { parm = {
id:_this.id id:_this.id,
setEntry: 'headers'
} }
_this.GET('contents/contentList/tabById',parm).then(function(res){ _this.GET('contents/contentList/tabById',parm).then(function(res){
if(res.code === '000000'){ if(res.code === '000000'){
_this.tabName = res.data.name || ''; _this.navTitle = res.data.name || '';
_this.tabName = _this.tabList[0] || '';
// if(_this.tabList.length>0){ // if(_this.tabList.length>0){
// _this.tabName = _this.tabList[0] || ''; // _this.tabName = _this.tabList[0] || '';
// } // }
...@@ -79,7 +93,8 @@ export default { ...@@ -79,7 +93,8 @@ export default {
let _this = this, let _this = this,
parm = { parm = {
id:_this.id, id:_this.id,
tabName : _this.tabName tabName : _this.tabName,
setEntry: 'headers'
} }
// if(_this.tabName != ''){ // if(_this.tabName != ''){
// parm.tabName = _this.tabName // parm.tabName = _this.tabName
...@@ -88,10 +103,7 @@ export default { ...@@ -88,10 +103,7 @@ export default {
if(res.code === '000000'){ if(res.code === '000000'){
_this.list = res.data.contentList && res.data.contentList.contentList || []; _this.list = res.data.contentList && res.data.contentList.contentList || [];
let scrollTop = document.documentElement.scrollTop;
if(scrollTop > 0){
_this.isShowBackTop = true;
}
} }
}) })
} }
...@@ -113,12 +125,13 @@ export default { ...@@ -113,12 +125,13 @@ export default {
.activity-item{ .activity-item{
position: relative; position: relative;
width: px2rem(345px); width: px2rem(345px);
height: px2rem(170px); /* height: px2rem(170px);*/
margin-top:px2rem(15px); margin-top:px2rem(15px);
box-shadow: 0 px2rem(2px) px2rem(6px) RGBA(42, 94, 161, 0.15); box-shadow: 0 px2rem(2px) px2rem(6px) RGBA(42, 94, 161, 0.15);
.img{ .img{
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block;
} }
.time{ .time{
position: absolute; position: absolute;
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册