|
@@ -80,8 +80,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import qs from 'qs';
|
|
|
|
-import clipboard from 'clipboardy/browser';
|
|
|
|
|
|
+// import qs from 'qs';
|
|
|
|
+// import clipboard from 'clipboardy/browser';
|
|
|
|
+import * as clipboard from 'clipboard-polyfill/text';
|
|
import { getStarCoinOverview } from '~/api/activity/invite-user.js';
|
|
import { getStarCoinOverview } from '~/api/activity/invite-user.js';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -98,6 +99,7 @@ export default {
|
|
todayBuyOrderSuccessCount: 0,
|
|
todayBuyOrderSuccessCount: 0,
|
|
totalBuyOrderSuccessCount: 0,
|
|
totalBuyOrderSuccessCount: 0,
|
|
withdrawStarCoinNum: 0,
|
|
withdrawStarCoinNum: 0,
|
|
|
|
+ inviteUserName: null,
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -136,7 +138,7 @@ export default {
|
|
mounted() {},
|
|
mounted() {},
|
|
methods: {
|
|
methods: {
|
|
async share() {
|
|
async share() {
|
|
- console.log(this);
|
|
|
|
|
|
+ // console.log(this);
|
|
this.$tongji.trackEvent('活动', '分享', '', 0);
|
|
this.$tongji.trackEvent('活动', '分享', '', 0);
|
|
|
|
|
|
const url =
|
|
const url =
|
|
@@ -144,36 +146,30 @@ export default {
|
|
this.$router.resolve({
|
|
this.$router.resolve({
|
|
path: '/register-for-invite',
|
|
path: '/register-for-invite',
|
|
query: {
|
|
query: {
|
|
- invitationUserName: this.$auth.user?.phone,
|
|
|
|
- activityId: 1,
|
|
|
|
|
|
+ invitationUserName: this.data.invitationUserName,
|
|
|
|
+ activityId: this.$route.query.activityId,
|
|
},
|
|
},
|
|
}).href;
|
|
}).href;
|
|
|
|
|
|
if (this.$userAgent.isMiniProgram) {
|
|
if (this.$userAgent.isMiniProgram) {
|
|
// 小程序环境
|
|
// 小程序环境
|
|
- await clipboard.write(url);
|
|
|
|
|
|
+ await clipboard.writeText(url);
|
|
this.$toast.success('链接复制成功');
|
|
this.$toast.success('链接复制成功');
|
|
} else if (this.$userAgent.isApp) {
|
|
} else if (this.$userAgent.isApp) {
|
|
// app环境
|
|
// app环境
|
|
this.$native.share({
|
|
this.$native.share({
|
|
title: '双子星APP',
|
|
title: '双子星APP',
|
|
content: '分享好友购买云机套餐,返星币换现金',
|
|
content: '分享好友购买云机套餐,返星币换现金',
|
|
- gotoUrl: `${location.origin}${location.pathname}${qs.stringify(
|
|
|
|
- { id: 666 },
|
|
|
|
- { addQueryPrefix: true },
|
|
|
|
- )}`,
|
|
|
|
- shareImg: url,
|
|
|
|
|
|
+ gotoUrl: url,
|
|
|
|
+ shareImg: 'sdsa.png',
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
// 浏览器环境
|
|
// 浏览器环境
|
|
- // await clipboard.write(url);
|
|
|
|
- throw new Error('1231');
|
|
|
|
- // this.$toast.success('链接复制成功');
|
|
|
|
|
|
+ await clipboard.writeText(url);
|
|
|
|
+ // throw new Error('1231');
|
|
|
|
+ this.$toast.success('链接复制成功');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- share2() {
|
|
|
|
- throw new Error('1231');
|
|
|
|
- },
|
|
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -251,8 +247,8 @@ export default {
|
|
.share-button {
|
|
.share-button {
|
|
display: block;
|
|
display: block;
|
|
margin: auto;
|
|
margin: auto;
|
|
- width: 302px;
|
|
|
|
- height: 62px;
|
|
|
|
|
|
+ width: 302px !important;
|
|
|
|
+ height: 62px !important;
|
|
background-image: url('~/assets/image/activity/invite-user/share-button@2x.png');
|
|
background-image: url('~/assets/image/activity/invite-user/share-button@2x.png');
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
margin-top: 24px;
|
|
margin-top: 24px;
|
|
@@ -275,7 +271,7 @@ export default {
|
|
.box4 {
|
|
.box4 {
|
|
.box-main {
|
|
.box-main {
|
|
// padding-left: 20px;
|
|
// padding-left: 20px;
|
|
- padding-top: 0;
|
|
|
|
|
|
+ // padding-top: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|