提交 413661a5 编写于 作者: guangjun.yang's avatar guangjun.yang

广告位等等

上级 207b4314
<template>
<div class="common-adert-wrapper">
<img @click="jumpPage" src="showInfo.imageUrl" alt="">
</div>
</template>
<script>
import { EMLINK } from 'constants';
export default {
name: 'common-title',
data() {
return {
showInfo: {
imageUrl: '',
jumpUrl: ''
}
};
},
props: {
advertInfoList: {
type: Array,
default: () => []
},
position: {
type: String | Number,
default: 0
}
},
watch: {
advertInfoList: {
handler (list) {
list.forEach(element => {
if(element.position == this.position) {
this.showInfo = element;
}
});
},
deep: true
}
},
created() {},
mounted() {
},
computed: {
},
methods: {
// 广告位跳转
jumpPage() {
let paramList = [
{
key: "pageUrl",
value: this.showInfo.jumpUrl,
type: 4,
seqNo: 1
}
]
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.common-adert-wrapper {
img {
width: 100%;
height: px2rem(120px);
}
}
</style>
......@@ -31,6 +31,10 @@
:studyNum="project.studyNum"
:subject="project.subject"
/>
<CommonAdertImg
:advertInfoList="advertInfoList"
position="0"
/>
<!-- 步骤条 -->
<div v-if="project.cmeType != 2">
<CmeStep
......@@ -90,6 +94,10 @@
/>
</div>
</div>
<CommonAdertImg
:advertInfoList="advertInfoList"
position="1"
/>
</div>
<!-- 弹框 -->
<CommonDialog
......@@ -130,6 +138,7 @@ import CellListDetail from "@/components/business/cell-list-detail";
// import CommonBannerVideo from "@/components/common/common-banner-video";
import CommonTcPlayer from "@/components/common/common-tcplayer";
import Loading from "@/components/common/common-loading";
import CommonAdertImg from "@/components/common/common-advert-img";
import CmeStep from "@/components/cme/cme-step";
import BasicInfo from "@/components/cme/basic-info";
......@@ -241,6 +250,7 @@ export default {
cardInfo: {
id: 0
},
advertInfoList: [],
};
},
components: {
......@@ -259,7 +269,8 @@ export default {
CommonDialog,
ExjumperButton,
ExjumperDialog,
CardPopup
CardPopup,
CommonAdertImg
},
computed: {
......@@ -305,6 +316,8 @@ export default {
param.setEntry = true;
_this.getProvinceIdByPosition(param);
}
this.getAdvertInfoList();
},
mounted() {
window.addEventListener("scroll", this.scrollFun);
......@@ -316,6 +329,22 @@ export default {
methods: {
...mapActions(["setUserInfo"]),
// 查询教培项目广告位配置信息
getAdvertInfoList() {
console.log('getAdvertInfoList');
// let _this = this;
let param = {
// token: _this.userInfo.userToken || _this.token,
setEntry: true
};
this.GET(`portal/jump/${this.projectId}/1`, param).then(res => {
if (res.code == "000000") {
this.advertInfoList = res.data || [];
console.log('advertInfoList', this.advertInfoList);
}
});
},
// 点击弹层
clickOverlay() {
console.log('clickOverlay');
......@@ -757,11 +786,14 @@ export default {
// TODO Add by Anndy Yang
if (_this.project.currentProgress == 2) {
this.$nextTick(() => {
_this.$nextTick(() => {
window.scrollTo(0, 0);
});
}
_this.provinceId = res.data.positionModel.provinceId;
_this.organizationId = res.data.positionModel.organizationId;
setTimeout( () => {
cataOffsetTop = document.getElementById("catalogue-content").offsetTop;
intorOffsetTop = document.getElementById("intro-content").offsetTop;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册