提交 5409c0b5 编写于 作者: tao.wu's avatar tao.wu

修改分享参数

上级 8f9a14c6
export const wxShare = {
shareUrl: '',
title1: '您的好友邀请您领取医学课程',
title2: '参与云鹊奖活动,领取免费课程,赢取iphone11等丰厚奖品',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share2.png'
}
\ No newline at end of file
......@@ -223,9 +223,9 @@
import { Toast } from 'vant';
import { setEventByModuleCode, getFirstAwards } from '@/utils';
import { ENV_CONFIG } from '@/utils/enumerate';
import { wxShare } from '@/configs/wxShare';
const cookies = require('cookie-universal')();
let vm = null;
export default {
data () {
......@@ -303,12 +303,7 @@
id: '',
},
isWeb: false,
shareObj: {
shareUrl: '',
title1: '您的好友邀请您领取医学课程',
title2: '参与云鹊奖活动,领取免费课程,赢取iphone11等丰厚奖品',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share2.png'
},
shareObj: wxShare,
padTop: 0
}
},
......@@ -360,7 +355,6 @@
// vm.getTasks();
// // 这里需要删掉!!!
vm.isWeb = vm.$rocNative.isWeb;
// vm.shareObj.shareUrl = `${getShareUrl()}year_end_ssr/shareActive?id=${vm.encryptId}&taskId=${vm.eachInviteAward.taskId}&activityId=${vm.eachInviteAward.activityId}`
// 取服务器时间,切换不同时间段的显示
vm.getServerTime();
......
......@@ -54,6 +54,7 @@
<script>
import { getInviteInfo, getCourseById, getCaptchaGet, getAuthCode } from '@/service';
import { wxShare } from '@/configs/wxShare';
const TIMEALL = 60000; // 倒计时常量 60 秒
export default {
data(){
......@@ -68,7 +69,8 @@
captchaAnswer: '', // 输入的图形验证码
time: TIMEALL,
btnMsg: '点击获取',
isReq: false
isReq: false,
shareObj: wxShare,
}
},
async asyncData({ query }){
......@@ -93,17 +95,13 @@
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.shareObj.shareUrl = window.location.href;
window.localStorage.setItem('shareUrl', this.shareObj.shareUrl);
this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15,
authUrl: window.location.href,
authUrl: this.shareObj.shareUrl,
isDebug: false,
jsApiList: [
'onMenuShareTimeline',
......@@ -112,7 +110,7 @@
},(wx)=>{
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const link = this.shareObj.shareUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
......
......@@ -53,6 +53,7 @@
</template>
<script>
import { wxShare } from '@/configs/wxShare';
export default {
asyncData({ query }){
const { status } = query; // 上个页面传递过来领取结果, false 为已领取, true 为领取成功
......@@ -61,20 +62,20 @@
statusTxt
}
},
data(){
return {
shareObj: wxShare,
}
},
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.shareObj.shareUrl = window.localStorage.getItem('shareUrl') || window.location.href;
this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15,
authUrl: window.location.href,
authUrl: this.shareObj.shareUrl,
isDebug: false,
jsApiList: [
'onMenuShareTimeline',
......@@ -83,7 +84,7 @@
},(wx)=>{
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const link = this.shareObj.shareUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册