|
|
<template>
|
|
|
<div>
|
|
|
<div ref='copy' class="btn" @click="onClick">
|
|
|
<div ref="copy" class="btn" @click="onClick">
|
|
|
立即邀请
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {createNamespacedHelpers} from 'vuex';
|
|
|
import { get } from 'lodash';
|
|
|
import Clipboard from 'clipboard';
|
|
|
import { createNamespacedHelpers } from "vuex";
|
|
|
import { get } from "lodash";
|
|
|
import Clipboard from "clipboard";
|
|
|
|
|
|
const {mapActions} = createNamespacedHelpers('gain');
|
|
|
const { mapActions } = createNamespacedHelpers("gain");
|
|
|
|
|
|
export default {
|
|
|
name: 'GainFooter',
|
|
|
name: "GainFooter",
|
|
|
data() {
|
|
|
return {
|
|
|
isUnionType: false,
|
|
|
shareUrl: 'https://activity.yoho.cn/feature/5475.html?share_id=8169&title=新人礼遇'
|
|
|
shareUrl:
|
|
|
"https://activity.yoho.cn/feature/5475.html?share_id=8169&title=新人礼遇"
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
...
|
...
|
@@ -30,24 +31,23 @@ export default { |
|
|
}
|
|
|
});
|
|
|
|
|
|
this.copyBtn.on('success', function() {
|
|
|
this.copyBtn.on("success", function() {
|
|
|
if (vm.isUnionType) {
|
|
|
vm.$createToast({
|
|
|
txt: '邀请链接已复制,快去粘贴吧~',
|
|
|
type: 'txt'
|
|
|
txt: "邀请链接已复制,快去粘贴吧~",
|
|
|
type: "txt"
|
|
|
}).show();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.copyBtn.on('error', function() {
|
|
|
});
|
|
|
this.copyBtn.on("error", function() {});
|
|
|
|
|
|
this.fetchUnionStatus().then(result => {
|
|
|
this.isUnionType = get(result, 'data.unionType', false);
|
|
|
this.isUnionType = get(result, "data.unionType", false);
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchUnionStatus']),
|
|
|
...mapActions(["fetchUnionStatus"]),
|
|
|
|
|
|
async onClick() {
|
|
|
let vm = this;
|
...
|
...
|
@@ -61,18 +61,18 @@ export default { |
|
|
|
|
|
if (!vm.isUnionType) {
|
|
|
this.$yoho.goNewPage({
|
|
|
url: 'http://m.yohobuy.com/activity/have-gain/apply?title=有货有赚介绍&openby:yohobuy={"action":"go.h5","params":{"title":"有货有赚介绍","url":"http://m.yohobuy.com/activity/have-gain/apply"}}'
|
|
|
url:
|
|
|
'http://m.yohobuy.com/activity/have-gain/apply?title=有货有赚介绍&openby:yohobuy={"action":"go.h5","params":{"title":"有货有赚介绍","url":"http://m.yohobuy.com/activity/have-gain/apply"}}'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.btn {
|
|
|
.btn {
|
|
|
font-size: 32px;
|
|
|
width: 100%;
|
|
|
height: 98px;
|
...
|
...
|
@@ -80,5 +80,5 @@ export default { |
|
|
color: white;
|
|
|
text-align: center;
|
|
|
background: #444;
|
|
|
}
|
|
|
}
|
|
|
</style> |
...
|
...
|
|