提交 2dc67952 编写于 作者: chengxiang.li's avatar chengxiang.li

Merge branch 'dev-stage2-20191125' of...

Merge branch 'dev-stage2-20191125' of http://192.168.110.53/com.pica.cloud.foundation.frontend/year-end-activitiy into dev-stage2-20191125
......@@ -3,7 +3,7 @@ header{
position: fixed;
left: 0;
top: 0;
z-index: 100;
z-index: 300;
.status{
width: 375px;
}
......
......@@ -42,7 +42,11 @@
setedScroll: { // 是否使用外部父组件的scroll事件
type: Boolean,
default: false
}
},
isCheckAuth: { // 是否校驗權限
type: Boolean,
default: false
}
},
data(){
return {
......@@ -91,7 +95,13 @@
this.$sendBuriedData({
component_tag: `301#301001`
});
this.$rocNative.shareWechat(this.shareObj);
if(this.isCheckAuth){
this.$emit('checkAuth', ()=>{
this.$rocNative.shareWechat(this.shareObj);
})
}else{
this.$rocNative.shareWechat(this.shareObj);
}
},
// 默认滚动事件
scrollHandleOwn(){
......@@ -103,7 +113,7 @@
if(document.documentElement){
documentScrollTop = document.documentElement.scrollTop;
}
const heightVal = imgHeight1 + imgHeight2 + imgHeight3;
// const heightVal = imgHeight1 + imgHeight2 + imgHeight3;
const scrollVal = bodyScrollTop || documentScrollTop;
this.setScrollHandle(scrollVal);
}
......
此差异已折叠。
<template>
<div class="in-activity-wrap">
<h5header
v-if="isWeb"
title="云鹊奖2019"
:baseShowHeight="25"
:shareObj="shareObj"
:isCheckAuth="true"
@checkAuth="handleLoginCheck"
/>
<!-- 顶部的四个阶段 进度条 -->
<ul class="top-process-bar">
<li v-for="(item, index) in stageDateList" :class="returnStageClass(item, index)">
......@@ -199,6 +207,7 @@
<script>
import { getUserScoreInfo, getInviteList, getClockStatus, goToUpdateClock } from '@/service/activityMainpage';
import { checkHospitalStatus } from '@/service';
import h5header from '@/components/h5header';
import { getShareUrl } from '@/utils/index';
import { Toast } from 'vant';
......@@ -266,9 +275,13 @@
mark: 5,
bean: 5,
},
isWeb: false,
shareObj: {}
}
},
components: {
h5header,
},
computed: {
returnBeanImg() {
let hospitalScore = vm.doctorInfo.hospitalScore;
......@@ -309,6 +322,13 @@
},
mounted() {
vm.shareObj = {
shareUrl: window.location.href,
title1: '分享title分享title',
title2: '分享desc分享desc',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
}
vm.isWeb = vm.$rocNative.isWeb;
vm.getTasks(); // 放到登录后或其他************************
......
......@@ -92,6 +92,37 @@
mounted(){
document.querySelector('body').setAttribute('style', 'background: #FE9A51;');
this.checkCache();
// 微信分享
this.shareObj = {
shareUrl: window.location.href,
title1: '分享title分享title',
title2: '分享desc分享desc',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
}
this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15,
authUrl: window.location.href,
isDebug: false,
jsApiList: [
'onMenuShareTimeline',
'onMenuShareAppMessage'
]
},(wx)=>{
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
});
// 分享到朋友圈
wx.onMenuShareTimeline({
title,desc,link,imgUrl
});
})
},
methods: {
// 校验用户浏览器是否有登录缓存,此缓存为纯前端缓存,与token之类的无关
......
......@@ -63,6 +63,37 @@
},
mounted(){
document.querySelector('body').setAttribute('style', 'background: "";');
// 微信分享
this.shareObj = {
shareUrl: window.location.href,
title1: '分享title分享title',
title2: '分享desc分享desc',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
}
this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15,
authUrl: window.location.href,
isDebug: false,
jsApiList: [
'onMenuShareTimeline',
'onMenuShareAppMessage'
]
},(wx)=>{
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
});
// 分享到朋友圈
wx.onMenuShareTimeline({
title,desc,link,imgUrl
});
})
},
methods: {
downApp(){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册