|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="index-data">
|
|
|
<view class="index-top">
|
|
|
- <top-head></top-head>
|
|
|
+ <top-head @setBabAddress="setBabAddress"></top-head>
|
|
|
<view class="top-text">
|
|
|
{{ $t('index.index.top.one') }}
|
|
|
<!-- <view class="text-item">{{$t('index.index.top.one')}}</view>-->
|
|
|
@@ -12,7 +12,7 @@
|
|
|
<view class="top-but">
|
|
|
<button @click="goToUrl(1)">{{ $t('index.index.investment') }}</button>
|
|
|
</view>
|
|
|
- <view class="top-bottom">
|
|
|
+ <view class="top-bottom" @click="setClipboardData">
|
|
|
<image class="bottom-img" src="@/static/img/index/cp.png" mode="aspectFill"></image>
|
|
|
<text class="bottom-text">{{ $t('index.index.top.cp') }}</text>
|
|
|
</view>
|
|
|
@@ -38,7 +38,6 @@
|
|
|
|
|
|
</template>
|
|
|
<script>
|
|
|
-import tokenpocketBnb from "@/common/wallet/tokenpocket-wallet/tokenpocket-bnb";
|
|
|
import {getMemberInfo} from "@/api/member";
|
|
|
import Division from "@/pages/index/components/division";
|
|
|
import TopHead from "@/pages/index/components/top-head";
|
|
|
@@ -89,6 +88,18 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ setClipboardData(){
|
|
|
+ console.log(window.location)
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: window.origin+'/#/pages/index/index?inviteCode'+this.babAddress,
|
|
|
+ success: function () {
|
|
|
+ console.log('success');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setBabAddress(babAddress){
|
|
|
+ this.babAddress=babAddress
|
|
|
+ },
|
|
|
handlerDateDurationCurrent() {
|
|
|
let d1 = new Date('2021-11-12')
|
|
|
let d2 = new Date()
|
|
|
@@ -126,7 +137,6 @@ export default {
|
|
|
|
|
|
|
|
|
getMyData() {
|
|
|
- this.babAddress = tokenpocketBnb.getAccounts()
|
|
|
let token = uni.getStorageSync('token')
|
|
|
if (token) {
|
|
|
getMemberInfo().then((res) => {
|