提交 6ced0580 编写于 作者: 杨广俊's avatar 杨广俊

1. 活动掠影 返回问题

上级 7c5ab358
无法预览此类型文件
<template>
<div class="wrapper" :class="{active:isScroll}">
<!-- <div class="status-bar"></div> -->
<div class="top-header" :class="{active:isScroll}">
<div class="content left-icon" @click="goBack()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png" alt="">
</div>
<div v-if="isScroll && isJSJ" class="content title" :class="{active:isScroll}">讲师集</div>
<div v-if="isScroll && !isJSJ" class="content title" :class="{active:isScroll}">云鹊医讲师</div>
<!-- <div class="content right-icon" @click="share()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon.png" alt="">
</div> -->
</div>
</div>
</template>
<script>
import {teacher_back} from '../../utils/buryingPoint.js';
// import {shareUrl} from '@/utils/index'
import {shareUrl} from '../../utils/index.js'
export default {
name:'MyHeader',
props:{
isOpacity:{
type:Boolean,
default:true
},
isScroll:{
type:Boolean,
default:false
},
isShare:{
type:Boolean,
default:true
},
doctorId:{
type:String,
default:""
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
computed: {
topTitle2() {
return this.topTitle
}
},
mounted(){
// console.log(this.isShare);
console.log(shareUrl);
console.log(`${shareUrl}`+'?doctorId='+this.doctorId)
},
methods:{
// backPre(){
// if(this.backMethod === 'inner') {
// this.$router.go(-1)
// } else {
// rocNative.goBack()
// }
// },
goBack(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
share(){
rocNative.shareWechat({
title1:'个人评价',
title2:'个人评价出现了喔',
shareUrl:`${shareUrl}gpr#/home`+'?doctorId='+this.doctorId,
type:6,
shareImageUrl:'https://file.yunqueyi.com/logo.png?version='+new Date().getTime(),
shareId:0
})
this.buryingPointShare();
},
/////////埋点//////////
//返回
buryingPointBack:function(){
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_back',
labelValue:'返回',
createdTime:new Date().getTime()
})
},
//分享
buryingPointShare:function(){
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_share',
labelValue:'分享',
createdTime:new Date().getTime()
})
},
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.wrapper{
position:fixed;
top: 0;
width:100%;
z-index:100000000;
/**************表头******************/
.top-header{
display:flex;
display:-webkit-flex;
flex-direction: row;
// justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果
align-items:center;
width:100%;
height:px2rem(45px);//header高度
margin-top:px2rem(25px);///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
}
.top-header.active{
// margin-top:0;
border-bottom:px2rem(2px) solid #e7e7e7;
background-color:#fff;
}
.top-header .left-icon{
margin-left:px2rem(15px);
}
.top-header .title{
width:px2rem(116px);
height:px2rem(18px);
line-height:px2rem(18px);
margin-left:px2rem(90px);
text-align:center;
color:#fff;
font-size:px2rem(18px);
}
.top-header .title.active{
color:#000;
}
.top-header .right-icon{
margin-left:px2rem(95px);
}
.top-header .left-icon img,.top-header .right-icon img{
display:block;//这样其外的div可以正好将其包裹住
width:px2rem(25px);
height:px2rem(25px);
}
}
.wrapper.active{
background-color:#fff;
// background-color:rgba(0,0,0,0.84);
// background-color:rgba(255,255,255,0.34)
}
</style>
\ No newline at end of file
<template>
<section class="back-top">
<div class="back-btn" @click="backTop">
<img src="../../images/backTop.png"/>
</div>
</section>
</template>
<script>
export default {
data(){
return{
objPoint:{}
}
},
props:{
burialPoint:{
default:'',
type:String
}
},
mounted(){
if(this.burialPoint == 'activity'){
this.objPoint = {
menuLevel:2,
menuFromCode:'m_home',
menuCode:'m_content_list',
functionCode:'f_activity',
actionCode:'c_top'
}
}
},
methods: {
backTop:function(){
if(this.burialPoint == 'activity'){
this.pageBurialPoin(this.objPoint);
}
var osTop = document.documentElement.scrollTop || document.body.scrollTop;
if(osTop > 0){
document.documentElement.scrollTop = document.body.scrollTop = 0;
}
}
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.back-btn{
position: fixed;
width: px2rem(35px);
height: px2rem(35px);
right: px2rem(15px);
z-index: 100;
bottom: px2rem(80px);;
img{
width: 100%;
height: 100%;
display: block;
}
}
</style>
\ No newline at end of file
<template>
<div>
<back-header :isScroll="isScroll" :backMethod="backMethod" :isJSJ="isJSJ"></back-header>
<div class="teach-top">
<!-- <div class="teach-top" :class="{'pt150': isScroll}"> -->
<!-- <div class="back" v-if="isScroll" @click="backPre" style="flex-direction:row;width:100%;">
<img src="../../images/left-icon.png">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
<span style="padding-bottom:10px;">dddd</span>
</div> -->
<!-- <TopNav :bgColor="bgColor" :title="navTitle" :isNavFix="isNavFix" :burialPoint="pointStyle"></TopNav> -->
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</div>
</template>
<script>
import BackHeader from '../../components/teachers/back-header';
export default {
data () {
return {
bgColor:'#fff',
parmObj:''
}
},
components:{
BackHeader
},
props:{
isShowCount: {
default:false,
type:Boolean
},
followCount: {
type:Number,
default:0
},
studyCount: {
type:Number,
default:0
},
statusBarHeight: {
type:Number,
default:0
},
isScroll:{
type: Boolean,
default: false
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.pt150 {
margin-top: px2rem(150px)
}
.teach-top{
width: 100%;
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.tc{
text-align: center;
}
.back{
position: fixed;
z-index: 110;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
font-size: px2rem(25px);
color: #fff;
padding: px2rem(55px) 0 px2rem(8px) 0;
font-weight: 500
}
.count{
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
}
}
</style>
\ No newline at end of file
<template>
<section :class="isNavFix ? 'nav-top fixed' : 'nav-top'">
<div class="nav-part" :style="'background:'+bgColor">
<div class="nav-title">
<span class="nav-back" @click="goBack">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png"/>
<!-- <img class="nav-back" src="../../images/grey-throw.png"/> -->
</span>
<!-- <span class="back" @click="goBack">
<img src="../../images/left-icon.png">
</span> -->
{{title}}
<!-- <span class="nav-share" @click="goShare">
<img src="../../images/Shape1@2x.png"/>
</span> -->
</div>
</div>
</section>
</template>
<script>
export default {
data(){
return{
// title:'测试',
content:'',
shareImageUrl:'',
}
},
props:{
bgColor:{//背景色
type:String,
default:''
},
title:{//标题
type:String,
default:'暂无数据'
},
isNavFix:{//是否fix定位
type:Boolean,
default:true
},
burialPoint:{
default:'',
type:String
},
backMethod: {
type: String,
default: 'native' // inner native
}
},
mounted(){
if(this.burialPoint == 'activity'){
this.objPoint = {
menuLevel:2,
menuFromCode:'m_home',
menuCode:'m_content_list',
functionCode:'f_activity',
actionCode:'c_last'
}
}
},
methods: {
//返回
goBack(){
if(this.burialPoint == 'activity'){
this.pageBurialPoin(this.objPoint);
}
if ( this.backMethod === 'inner' ) {
this.$router.back(-1);
} else {
rocNative.goBack();
}
//rocNative.backPreviousPage();
},
//分享
goShare(){
let url = location.hef,_this = this;
rocNative.shareWechat({
url:url,
title:_this.title,
content:_this.content,
shareImageUrl:_this.shareImageUrl
})
}
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.back{
position: absolute;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img {
width: px2rem(25px);
height: px2rem(25px);
}
}
.nav-top{
height: px2rem(65px);
background: #fff;
color: #333;
position: relative;
z-index: 109;
.nav-back{
display: inline-block;
position: absolute;
left: px2rem(16px);;
top: 0;
height: px2rem(25px);
width: px2rem(25px);
// -ms-transform: translate(180deg);
// -webkit-transform: (180deg);
// transform: rotate(180deg);
}
img{
display: block;
width: 100%;
height: 100%
}
.nav-icon{
display: inline-block;
width: 50px;
height: 50px;
svg{
stroke: #000;
fill: #0000ff;
}
}
.nav-share{
position: absolute;
right: px2rem(8px);;
top:0;
height: px2rem(25px);
width: px2rem(25px);
}
.nav-title{
display: inline-block;
width: 100%;
/* padding:0 px2rem(33px);*/
position: relative;
}
.nav-part{
width: 100%;
font-size: px2rem(18px);
text-align: center;
padding: px2rem(30px) 0 px2rem(10px) 0;
/* height: px2rem(25px);*/
}
}
.fixed{
.nav-part{
position: fixed;
top:0;
left: 0;
border-bottom: 1px solid #E7E7E7;
/* height: px2rem(25px);*/
}
}
</style>
\ No newline at end of file
......@@ -22,9 +22,11 @@
<script>
// import { setEventByModuleCode } from '@/utils/index'
import TopNav from '../../components/common/topNav';
// import TopNav from '../../components/common/topNav';
import TopNav from '../../componentsn/teacher/topNav';
// import teacherTop from '../../components/teachers/teach-top';
import BackTop from '../../components/common/backTop';
// import BackTop from '../../components/common/backTop';
import BackTop from '../../componentsn/teacher/backTop';
import {activity_action} from '../../utils/buryingPoint';
import { deepCopy } from '../../utils';
export default {
......
......@@ -77,7 +77,8 @@
</template>
<script>
import teacherTop from '../../components/teachers/teach-top';
// import teacherTop from '../../components/teachers/teach-top';
import teacherTop from '../../componentsn/teacher/teach-top';
import {teacher,teacher_info_collect} from '../../utils/buryingPoint';
export default {
components:{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册