|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
- <div class="invite-user">
|
|
|
+ <v-container class="invite-user pa-0" fluid>
|
|
|
<div class="box box1">
|
|
|
- <div class="box-title">参与步骤</div>
|
|
|
- <div class="box-content">
|
|
|
- <van-image
|
|
|
+ <div class="box-header">参与步骤</div>
|
|
|
+ <div class="box-main">
|
|
|
+ <v-img
|
|
|
class="cybz-content"
|
|
|
src="~/assets/image/activity/invite-user/cybz-content@2x.png"
|
|
|
/>
|
|
@@ -12,13 +12,14 @@
|
|
|
<div class="cybz-content-text-item">邀请购买云机</div>
|
|
|
<div class="cybz-content-text-item">返星币换现金</div>
|
|
|
</div>
|
|
|
- <van-button class="share-button" round @click="share()"></van-button>
|
|
|
+ <v-btn class="share-button" rounded @click="share()"></v-btn>
|
|
|
+ <!-- <button @click="share()">邀请</button> -->
|
|
|
</div>
|
|
|
<!-- <div class="h-40">13</div> -->
|
|
|
</div>
|
|
|
<div class="box box2">
|
|
|
- <div class="box-title">收益明细</div>
|
|
|
- <div class="box-content">
|
|
|
+ <div class="box-header">收益明细</div>
|
|
|
+ <div class="box-main">
|
|
|
<div class="grid grid-cols-2 gap-x-4 gap-y-8">
|
|
|
<div
|
|
|
v-for="(item, index) in dataList"
|
|
@@ -38,12 +39,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div class="box box3">
|
|
|
- <div class="box-title">返利套餐</div>
|
|
|
- <div class="box-content"></div>
|
|
|
+ <div class="box-header">返利套餐</div>
|
|
|
+ <div class="box-main"></div>
|
|
|
</div> -->
|
|
|
<div class="box box4">
|
|
|
- <div class="box-title">活动规则</div>
|
|
|
- <div class="box-content text-sm">
|
|
|
+ <div class="box-header">活动规则</div>
|
|
|
+ <div class="box-main text-sm">
|
|
|
<p>1、传播过程中有任何疑问,可直接咨询客服</p>
|
|
|
<p>
|
|
|
2、用户可以通过分享页面或者套餐给想要分享的人,被分享人购买云机套餐后,分享人可获得套餐对应的星币
|
|
@@ -75,12 +76,14 @@
|
|
|
|
|
|
<div class="ccc">{{ 36666666.123456 | formatNumber }}</div>
|
|
|
<div class="ccc">{{ '2020-01-01' | formatDate }}</div> -->
|
|
|
- </div>
|
|
|
+ </v-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import qs from 'qs';
|
|
|
+import clipboard from 'clipboardy/browser';
|
|
|
import { getStarCoinOverview } from '~/api/activity/invite-user.js';
|
|
|
+
|
|
|
export default {
|
|
|
// auth: false,
|
|
|
name: 'InviteUser',
|
|
@@ -132,17 +135,44 @@ export default {
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
- share() {
|
|
|
+ async share() {
|
|
|
+ console.log(this);
|
|
|
this.$tongji.trackEvent('活动', '分享', '', 0);
|
|
|
- this.$native.share({
|
|
|
- title: '标题',
|
|
|
- content: '内容',
|
|
|
- gotoUrl: `${location.origin}${location.pathname}${qs.stringify(
|
|
|
- { id: 666 },
|
|
|
- { addQueryPrefix: true },
|
|
|
- )}`,
|
|
|
- shareImg: 'http://localhost',
|
|
|
- });
|
|
|
+
|
|
|
+ const url =
|
|
|
+ location.origin +
|
|
|
+ this.$router.resolve({
|
|
|
+ path: '/register-for-invite',
|
|
|
+ query: {
|
|
|
+ invitationUserName: this.$auth.user?.phone,
|
|
|
+ activityId: 1,
|
|
|
+ },
|
|
|
+ }).href;
|
|
|
+
|
|
|
+ if (this.$userAgent.isMiniProgram) {
|
|
|
+ // 小程序环境
|
|
|
+ await clipboard.write(url);
|
|
|
+ this.$toast.success('链接复制成功');
|
|
|
+ } else if (this.$userAgent.isApp) {
|
|
|
+ // app环境
|
|
|
+ this.$native.share({
|
|
|
+ title: '双子星APP',
|
|
|
+ content: '分享好友购买云机套餐,返星币换现金',
|
|
|
+ gotoUrl: `${location.origin}${location.pathname}${qs.stringify(
|
|
|
+ { id: 666 },
|
|
|
+ { addQueryPrefix: true },
|
|
|
+ )}`,
|
|
|
+ shareImg: url,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 浏览器环境
|
|
|
+ // await clipboard.write(url);
|
|
|
+ throw new Error('1231');
|
|
|
+ // this.$toast.success('链接复制成功');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ share2() {
|
|
|
+ throw new Error('1231');
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -173,7 +203,7 @@ export default {
|
|
|
+ .box {
|
|
|
margin-top: 30px;
|
|
|
}
|
|
|
- .box-title {
|
|
|
+ .box-header {
|
|
|
position: absolute;
|
|
|
top: -30px;
|
|
|
// left: 141px;
|
|
@@ -183,13 +213,13 @@ export default {
|
|
|
padding: 0 130px;
|
|
|
color: #fff;
|
|
|
}
|
|
|
- .box-content {
|
|
|
+ .box-main {
|
|
|
padding: 30px 15px 20px;
|
|
|
}
|
|
|
}
|
|
|
.box1 {
|
|
|
margin-top: 275px;
|
|
|
- .box-content {
|
|
|
+ .box-main {
|
|
|
// padding: 30px 15px 20px;
|
|
|
padding-left: 0;
|
|
|
padding-right: 0;
|
|
@@ -237,13 +267,13 @@ export default {
|
|
|
color: #ff6600;
|
|
|
// font-size: 24px;
|
|
|
}
|
|
|
- .box-content {
|
|
|
+ .box-main {
|
|
|
padding-left: 20px;
|
|
|
padding-right: 20px;
|
|
|
}
|
|
|
}
|
|
|
.box4 {
|
|
|
- .box-content {
|
|
|
+ .box-main {
|
|
|
// padding-left: 20px;
|
|
|
padding-top: 0;
|
|
|
}
|