提交 6e8ffb01 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

处理不同页面及状态微信分享文案图标展示

上级 b53c4486
......@@ -2,7 +2,7 @@
<section class="hospital-grade-wrap rank-wrap">
<h5header
v-if="!isWeb"
:title="title[this.hospitalType]"
:title="`${title[this.hospitalType]}榜榜单`"
isGoHistory="1"
:isOpacity="false"
:shareObj="shareObj"/>
......@@ -48,7 +48,6 @@
<script>
import { getHospitalRank, getPersonScore, } from '@/service/stage3Api';
import { wxShare } from '@/configs/wxShare';
import h5header from '@/components/h5header';
export default {
name: "hospital-grades",
......@@ -59,12 +58,18 @@
return {
isWeb: false,
personalData: {},
shareObj: wxShare,
shareObj: {},
title: {
'0': '星火榜榜单',
'1': '萌芽榜榜单',
'2': '奋进榜榜单',
'3': '超越榜榜单'
'0': '星火',
'1': '萌芽',
'2': '奋进',
'3': '超越'
},
hospitalTypeName: {
'0': '微型',
'1': '小型',
'2': '中型',
'3': '大型'
},
rankIcon: {
0: require('../../assets/img/stage3/rank-icon1.png'),
......@@ -83,7 +88,7 @@
},
head () {
return {
title: `${this.title[this.hospitalType]}`,
title: `${this.title[this.hospitalType]}榜榜单`,
}
},
created() {
......@@ -91,17 +96,22 @@
mounted() {
this.$rocNative.appInit();
this.isWeb = this.$rocNative.isWeb;
this.shareObj.shareUrl = location.href; //微信分享链接
this.shareObj = {
title1: `云鹊${this.title[this.hospitalType]}奖榜单公布`,
title2: `全国最杰出的${this.hospitalTypeName[this.hospitalType]}机构在这里`,
shareImageUrl: 'https://file.yunqueyi.com/h5/images/hd/icon-share.png',
shareUrl: location.href, //微信分享链接
};
this.appCallUrl = location.href; //唤起app页面
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
......
......@@ -121,7 +121,6 @@
import h5header from '@/components/h5header';
import { wxShare } from '@/configs/wxShare';
import { setCookie, getCookie, delCookie } from '@/utils/cookieFun';
export default {
name: "index",
......@@ -133,7 +132,7 @@
isLogin: true,
mainInfo: {},//顶部个人信息等相关数据
isWeb: false,
shareObj: wxShare,
shareObj: {},
mainInfoType: 1,//1,机构参加,2机构未参加
rankName: {
'0': '星火',
......@@ -170,17 +169,22 @@
/*if(getCookie('token')) {
this.getMainInfo();
}*/
this.shareObj.shareUrl = location.href; //微信分享链接
this.shareObj = {
title1: '云鹊奖榜单公布',
title2: '来看看全中国最杰出的医院机构和医生个人',
shareImageUrl: 'https://file.yunqueyi.com/h5/images/hd/icon-share.png',
shareUrl: location.href, //微信分享链接
};
this.appCallUrl = location.href; //唤起app页面
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
......
......@@ -85,7 +85,6 @@
<script>
import { getMyGrades } from '@/service/stage3Api';
import { wxShare } from '@/configs/wxShare';
import h5header from '@/components/h5header';
export default {
name: "personal-grade",
......@@ -94,9 +93,7 @@
},
data() {
return {
/* rightText1: '',//右侧文案
rightText2: '',//右侧文案*/
shareObj: wxShare,
shareObj: {},
isWeb: false,
appCallUrl: '',
rewardIcon: {
......@@ -132,17 +129,22 @@
mounted() {
getMyGrades({id: this.encyptId})
this.isWeb = this.$rocNative.isWeb;
this.shareObj.shareUrl = location.href; //微信分享链接
this.shareObj = {
title1: '云鹊奖全国医生成绩公布',
title2: '【点击查看】天呐!我在全国医生中的排名居然在这里',
shareImageUrl: 'https://file.yunqueyi.com/h5/images/hd/icon-share.png',
shareUrl: location.href, //微信分享链接
};
this.appCallUrl = location.href; //唤起app页面
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
......
......@@ -49,7 +49,6 @@
<script>
import { getPersonScore,getPersonList } from '@/service/stage3Api';
import { wxShare } from '@/configs/wxShare';
import h5header from '@/components/h5header';
export default {
name: "personal-rank",
......@@ -60,7 +59,7 @@
return {
personalData: {},
isWeb: false,
shareObj: wxShare,
shareObj: {},
rankIcon: {
0: require('../../assets/img/stage3/rank-icon1.png'),
1: require('../../assets/img/stage3/rank-icon2.png'),
......@@ -81,17 +80,22 @@
mounted() {
this.$rocNative.appInit();
// this.isWeb = this.$rocNative.isWeb;
this.shareObj.shareUrl = location.href; //微信分享链接
this.shareObj = {
title1: '云鹊奖个人榜单公布',
title2: '全中国最杰出的医生个人在这里',
shareImageUrl: 'https://file.yunqueyi.com/h5/images/hd/icon-share.png',
shareUrl: location.href, //微信分享链接
};
this.appCallUrl = location.href; //唤起app页面
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册