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

add

上级 446d604b
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
goToPage(itemData){ goToPage(itemData){
let paramList = this.setEventByModuleCode(itemData); let paramList = this.setEventByModuleCode(itemData);
console.log(paramList);
if(itemData.appModuleInfo.code != 'M400'){ if(itemData.appModuleInfo.code != 'M400'){
//alert(itemData.appModuleInfo.code); //alert(itemData.appModuleInfo.code);
...@@ -48,7 +49,7 @@ export default { ...@@ -48,7 +49,7 @@ export default {
}else{ }else{
rocNative.gotoNewWebActivity({ rocNative.gotoNewWebActivity({
pageUrl: jumpWebPageUrl+'teachers' pageUrl: jumpWebPageUrl+'activity?categoryId'+paramList[0].query.categoryId
}) })
// this.$router.push({ // this.$router.push({
// path: paramList[0].url, // path: paramList[0].url,
...@@ -94,6 +95,7 @@ html,body{ ...@@ -94,6 +95,7 @@ html,body{
padding: px2rem(15px) px2rem(10px); padding: px2rem(15px) px2rem(10px);
box-shadow: 0 px2rem(1px) px2rem(5px) RGBA(49, 127, 119, 0.1); box-shadow: 0 px2rem(1px) px2rem(5px) RGBA(49, 127, 119, 0.1);
border-radius: px2rem(3px); border-radius: px2rem(3px);
z-index: 2;
} }
.banner-item{ .banner-item{
width: px2rem(50px); width: px2rem(50px);
......
...@@ -7,6 +7,7 @@ import '@/utils/rem' // 引入自适应 ...@@ -7,6 +7,7 @@ import '@/utils/rem' // 引入自适应
import '@/utils/yqyServerRegister' // 移动端服务 import '@/utils/yqyServerRegister' // 移动端服务
import FastClick from 'fastclick' import FastClick from 'fastclick'
import Logger from './plugins/logger' // 日志插件 import Logger from './plugins/logger' // 日志插件
import Swiper from './plugins/swiper.min.js' // 日志插件
// 引入Mint // 引入Mint
import Mint from 'mint-ui' import Mint from 'mint-ui'
......
...@@ -237,7 +237,7 @@ export function jumpEvaluatPage(){ ...@@ -237,7 +237,7 @@ export function jumpEvaluatPage(){
// const apiUrl = 'https://dev-api.yunqueyi.com/' // const apiUrl = 'https://dev-api.yunqueyi.com/'
// test1地址 // test1地址
const baseUrl = 'https://test1-sc.yunqueyi.com/' const baseUrl = 'https://test1-sc.yunqueyi.com/'
const apiUrl = 'https://test1-api.yunqueyi.com/' const apiUrl = 'https://test1-api.yunqueyi.com/'
const evaluatPageUrl = 'https://test1-phome.yunqueyi.com/gpr/#/home' const evaluatPageUrl = 'https://test1-phome.yunqueyi.com/gpr/#/home'
......
...@@ -9,16 +9,26 @@ ...@@ -9,16 +9,26 @@
<div class="home-topMenu"> <div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" :statusBarHeight="statusBarHeight" v-if="isHeightFromApp"/> <YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" :statusBarHeight="statusBarHeight" v-if="isHeightFromApp"/>
</div> </div>
<div class="swiper"> <div class="banner-container swiper-container">
<div class="swiper-wrapper">
<div class="banner-slide swiper-slide" v-for="(item,index) in listSwiper" :key="index">
<img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</div>
</div>
  <!--需要焦点按钮时加这段div-->
<div class="banner-pagination pagination">
<span></span>
</div>
</div>
<!-- <div class="swiper">
<mt-swipe :auto="0" :speed="speedSwiper"> <mt-swipe :auto="0" :speed="speedSwiper">
<mt-swipe-item v-for="(item,index) in listSwiper" :key="index" > <mt-swipe-item v-for="(item,index) in listSwiper" :key="index" >
<img :src="item.picturePath" @click="goLinkByswiper(item)"/> <img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</mt-swipe-item> </mt-swipe-item>
<!-- <mt-swipe-item>
<img src="../../images/552064153@2x.png"/>
</mt-swipe-item> -->
</mt-swipe> </mt-swipe>
</div> </div> -->
</section> </section>
<section class="home-body"> <section class="home-body">
<YqyHomeBanner :parmData="iconList" v-if="iconList.length>0"/> <YqyHomeBanner :parmData="iconList" v-if="iconList.length>0"/>
...@@ -109,7 +119,7 @@ export default { ...@@ -109,7 +119,7 @@ export default {
speedSwiper:20, speedSwiper:20,
stopPropagation:true, stopPropagation:true,
isIntStyle:'', isIntStyle:'',
listSwiper:[],//轮播图数据 listSwiper:[{},{}],//轮播图数据
listMiddle:[],//中间栏数据 listMiddle:[],//中间栏数据
scrollTimer:null, scrollTimer:null,
scrollTop:0, scrollTop:0,
...@@ -224,6 +234,23 @@ export default { ...@@ -224,6 +234,23 @@ export default {
}, },
methods:{ methods:{
//轮播图开始滚动
swiperFun(){
var swiper = new Swiper('.swiper-container', {
// autoplay: {
// delay: 6000,
// stopOnLastSlide: false,
// disableOnInteraction: false,
// },
pagination: {
el: '.swiper-pagination',
},
});
},
loadTop(){ loadTop(){
location.reload(); location.reload();
this.$refs.loadmore.onTopLoaded(); this.$refs.loadmore.onTopLoaded();
...@@ -237,6 +264,7 @@ export default { ...@@ -237,6 +264,7 @@ export default {
}, },
initAll(){ initAll(){
this.getSwiper()
this.getUpdateData(); this.getUpdateData();
this.getMiddel(); this.getMiddel();
this.getIconData(); this.getIconData();
...@@ -262,7 +290,7 @@ export default { ...@@ -262,7 +290,7 @@ export default {
}, },
//轮播图跳转 //轮播图跳转
goLinkByswiper(item){ goLinkByswiper(itemData){
///alert("0000"); ///alert("0000");
// console.log(item); // console.log(item);
this.pageBurialPoin({ this.pageBurialPoin({
...@@ -273,35 +301,6 @@ export default { ...@@ -273,35 +301,6 @@ export default {
// labelId:item.id, // labelId:item.id,
}) })
let moduleCode = 'M100'
if(item.moduleCode === 'M015'){
moduleCode = 'M002'
}
let itemData = {
"title":item.name,
"imageUrl":"",
"appModuleInfo":{
"code":moduleCode,
"type":4,
"name":"名师风采个人展示",
"paramFlag":1,
"paramList":[
{
"key":"jsName",
"value":item.link,
"type":4,
"seqNo":1
},
// {
// "key":keyName,
// "value":`${item.link}`,
// "type":1,
// "seqNo":2
// }
]
}
};
let paramList = this.setEventByModuleCode(itemData); let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code, modeCode: itemData.appModuleInfo.code,
...@@ -657,14 +656,22 @@ export default { ...@@ -657,14 +656,22 @@ export default {
// sys = 3; // sys = 3;
// token = '364ED1F1C8064CEBABF745CFFFDE18CF' // token = '364ED1F1C8064CEBABF745CFFFDE18CF'
let _this = this, let _this = this,
para = { para = {
version:appVersion, category:1,
systemType:systemType, position:4,
token:userToken, setEntry: 'headers',
data:{ data:{
setEntry: 'headers' setEntry: 'headers'
} }
} }
// para = {
// version:appVersion,
// systemType:systemType,
// token:userToken,
// data:{
// setEntry: 'headers'
// }
// }
// para = { // para = {
// version:version, // version:version,
// systemType:sys, // systemType:sys,
...@@ -675,9 +682,10 @@ export default { ...@@ -675,9 +682,10 @@ export default {
// } // }
// } // }
this.API_GET('contents/carusels/home', para).then(res => { this.GET('/contents/HomeColumn/Information', para).then(res => {
if(res.respCode == '200'){ if(res.code == '000000'){
_this.listSwiper = res.pcfList || [] _this.listSwiper = res.data.iconColumnInformationModels || []
_this.swiperFun();
} }
}) })
}, },
...@@ -751,6 +759,10 @@ export default { ...@@ -751,6 +759,10 @@ export default {
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin'; @import '../../style/mixin';
@import '../../style/swiper.min.css';
.banner-container{
height: px2rem(210px)
}
.mint-header { .mint-header {
background-color: rgba($color: #000000, $alpha: 0) background-color: rgba($color: #000000, $alpha: 0)
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册