Commit e70e3d65 by 施宇

Merge branch 'lt_yaohaoyou' into Development

parents 5a214868 c39ce500
......@@ -20,10 +20,6 @@
type: String,
default: window.location.href
},
currentUrl: {
type: String,
default:window.location.href
},
title: {
type: String,
default: '好物分享给你,帮我助力,我们一起免费拿样品'
......@@ -70,20 +66,27 @@
}
}
},
beforeCreate(){
let href = window.location.href;
if(href.indexOf('groupmessage') > -1 || href.indexOf('singlemessage') > -1 || href.indexOf('timeline') > -1){
href = href.replace(/\?from=(groupmessage|singlemessage|timeline)(\S*)#/, '#');
window.location.replace(href);
}
},
created() {
//无需登录的情况下
let me = this;
if (!this.isLogin) {
this.$store.dispatch({
type: "wxShare",
current_url:me.currentUrl
current_url:location.href
});
}
else{
if (util.getCookie("Yo4teW_uid")) {
this.$store.dispatch({
type: "wxShare",
current_url: me.currentUrl
current_url:location.href
});
}
}
......
<template>
<section class="oscilloscope">
<Header :title="title" :meaushow="meaushow" :bgcolor="bgcolor"></Header>
<wxShare :link="shareUrl" :isSbq="true" :isLogin="false" :currentUrl="currentUrl" title="DS1104示波器年中惊爆价3299,速抢!" desc="示波器年中狂欢,ZDS1104仅需3299,邀请好友还能拿奖励〜" imgUrl="http://img.ichunt.com/images/ichunt/self_sample/sbq-icon.jpg"></wxShare>
<wxShare :link="shareUrl" :isSbq="true" :isLogin="false" title="DS1104示波器年中惊爆价3299,速抢!" desc="示波器年中狂欢,ZDS1104仅需3299,邀请好友还能拿奖励〜" imgUrl="http://img.ichunt.com/images/ichunt/self_sample/sbq-icon.jpg"></wxShare>
<div class="top-users">
<ul :class="{'animate-ul':animate}">
<li v-for="item in bannerData">{{item}}</li>
......@@ -118,11 +118,11 @@ export default {
meaushow: true,
bgcolor: "#fafafa",
animate:false,
shareUrl: window.location.origin + window.location.pathname + ((util.getCookie("Yo4teW_uid"))?('#/oscilloscope?invitedId='+util.getCookie("Yo4teW_uid")):"#/oscilloscope"),
currentUrl:window.location.origin+window.location.pathname
shareUrl: window.location.origin + window.location.pathname + ((util.getCookie("Yo4teW_uid"))?('#/oscilloscope?invitedId='+util.getCookie("Yo4teW_uid")):"#/oscilloscope")
};
},
created(){
console.log(this.shareUrl)
let {invitedId} = this.$route.query;
if(invitedId){
SetCookie('sbqinvitedId',invitedId,1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment