提交 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{ ...@@ -3,7 +3,7 @@ header{
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
z-index: 100; z-index: 300;
.status{ .status{
width: 375px; width: 375px;
} }
......
...@@ -42,7 +42,11 @@ ...@@ -42,7 +42,11 @@
setedScroll: { // 是否使用外部父组件的scroll事件 setedScroll: { // 是否使用外部父组件的scroll事件
type: Boolean, type: Boolean,
default: false default: false
} },
isCheckAuth: { // 是否校驗權限
type: Boolean,
default: false
}
}, },
data(){ data(){
return { return {
...@@ -91,7 +95,13 @@ ...@@ -91,7 +95,13 @@
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: `301#301001` 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(){ scrollHandleOwn(){
...@@ -103,7 +113,7 @@ ...@@ -103,7 +113,7 @@
if(document.documentElement){ if(document.documentElement){
documentScrollTop = document.documentElement.scrollTop; documentScrollTop = document.documentElement.scrollTop;
} }
const heightVal = imgHeight1 + imgHeight2 + imgHeight3; // const heightVal = imgHeight1 + imgHeight2 + imgHeight3;
const scrollVal = bodyScrollTop || documentScrollTop; const scrollVal = bodyScrollTop || documentScrollTop;
this.setScrollHandle(scrollVal); this.setScrollHandle(scrollVal);
} }
......
此差异已折叠。
<template> <template>
<div class="in-activity-wrap"> <div class="in-activity-wrap">
<h5header
v-if="isWeb"
title="云鹊奖2019"
:baseShowHeight="25"
:shareObj="shareObj"
:isCheckAuth="true"
@checkAuth="handleLoginCheck"
/>
<!-- 顶部的四个阶段 进度条 --> <!-- 顶部的四个阶段 进度条 -->
<ul class="top-process-bar"> <ul class="top-process-bar">
<li v-for="(item, index) in stageDateList" :class="returnStageClass(item, index)"> <li v-for="(item, index) in stageDateList" :class="returnStageClass(item, index)">
...@@ -199,6 +207,7 @@ ...@@ -199,6 +207,7 @@
<script> <script>
import { getUserScoreInfo, getInviteList, getClockStatus, goToUpdateClock } from '@/service/activityMainpage'; import { getUserScoreInfo, getInviteList, getClockStatus, goToUpdateClock } from '@/service/activityMainpage';
import { checkHospitalStatus } from '@/service'; import { checkHospitalStatus } from '@/service';
import h5header from '@/components/h5header';
import { getShareUrl } from '@/utils/index'; import { getShareUrl } from '@/utils/index';
import { Toast } from 'vant'; import { Toast } from 'vant';
...@@ -266,9 +275,13 @@ ...@@ -266,9 +275,13 @@
mark: 5, mark: 5,
bean: 5, bean: 5,
}, },
isWeb: false,
shareObj: {}
} }
}, },
components: {
h5header,
},
computed: { computed: {
returnBeanImg() { returnBeanImg() {
let hospitalScore = vm.doctorInfo.hospitalScore; let hospitalScore = vm.doctorInfo.hospitalScore;
...@@ -309,6 +322,13 @@ ...@@ -309,6 +322,13 @@
}, },
mounted() { 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(); // 放到登录后或其他************************ vm.getTasks(); // 放到登录后或其他************************
......
...@@ -92,6 +92,37 @@ ...@@ -92,6 +92,37 @@
mounted(){ mounted(){
document.querySelector('body').setAttribute('style', 'background: #FE9A51;'); document.querySelector('body').setAttribute('style', 'background: #FE9A51;');
this.checkCache(); 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: { methods: {
// 校验用户浏览器是否有登录缓存,此缓存为纯前端缓存,与token之类的无关 // 校验用户浏览器是否有登录缓存,此缓存为纯前端缓存,与token之类的无关
......
...@@ -63,6 +63,37 @@ ...@@ -63,6 +63,37 @@
}, },
mounted(){ mounted(){
document.querySelector('body').setAttribute('style', 'background: "";'); 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: { methods: {
downApp(){ downApp(){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册