123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- <template>
- <div class="invite-user">
- <div class="box box1">
- <div class="box-title">参与步骤</div>
- <div class="box-content">
- <van-image
- class="cybz-content"
- src="~/assets/image/activity/invite-user/cybz-content@2x.png"
- />
- <div class="cybz-content-text">
- <div class="cybz-content-text-item">分享好友</div>
- <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>
- </div>
- <!-- <div class="h-40">13</div> -->
- </div>
- <div class="box box2">
- <div class="box-title">收益明细</div>
- <div class="box-content">
- <div class="grid grid-cols-2 gap-x-4 gap-y-8">
- <div
- v-for="(item, index) in dataList"
- :key="index"
- :class="{
- 'col-span-2': index === 6,
- }"
- >
- <div class="label text-sm">
- <span>{{ item.label }}</span>
- </div>
- <div class="value text-2xl font-bold">
- <span>{{ item.value | formatNumber('0,0') }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="box box3">
- <div class="box-title">返利套餐</div>
- <div class="box-content"></div>
- </div> -->
- <div class="box box4">
- <div class="box-title">活动规则</div>
- <div class="box-content text-sm">
- <p>1、传播过程中有任何疑问,可直接咨询客服</p>
- <p>
- 2、用户可以通过分享页面或者套餐给想要分享的人,被分享人购买云机套餐后,分享人可获得套餐对应的星币
- </p>
- <p>
- 3、星币为双子星云手机平台唯一认可代币,仅能通过充值、赠送和分享获得,其它渠道途径非法获取的星币,不受平台认可
- </p>
- <p>4、星币可在双子星购买任一等价值套餐</p>
- <p>
- 5、请勿利用双子星传播或扩散任何有关于政治、情色等任何违法的信息,一经发现,取消资格,如果触犯任何法律相关问题,平台不负任何责任
- </p>
- </div>
- </div>
- <!-- <div class="">invite-user</div> -->
- <!-- <button>刷新数据</button> -->
- <!-- <div class="">{{ data }}</div> -->
- <!-- <div class="text-center">
- <span>分享好友购买云机套餐<br />返星币换现金</span>
- </div>
- <div class="text-center mt-4">
- <van-button type="primary" @click="share()">邀请好友</van-button>
- </div>
- <van-icon name="chat-o" />
- <van-icon name="shape-plus" class-prefix="mdi" />
- <van-button @click="$fetch()">刷新</van-button>
- <div class="ccc">{{ 36666666.123456 | formatNumber }}</div>
- <div class="ccc">{{ '2020-01-01' | formatDate }}</div> -->
- </div>
- </template>
- <script>
- import qs from 'qs';
- import { getStarCoinOverview } from '~/api/activity/invite-user.js';
- export default {
- // auth: false,
- name: 'InviteUser',
- filters: {},
- data() {
- return {
- data: {
- todayIncomeStarCoin: 0,
- totalIncomeStarCoin: 0,
- todayBuyOrderCount: 0,
- totalBuyOrderCount: 0,
- todayBuyOrderSuccessCount: 0,
- totalBuyOrderSuccessCount: 0,
- withdrawStarCoinNum: 0,
- },
- };
- },
- async fetch() {
- //
- this.data = (await getStarCoinOverview(this)).data;
- },
- head: {
- title: '邀请好友',
- // share: {
- // title: '标题',
- // content: '内容',
- // gotoUrl: 'http://localhost',
- // shareImg: 'http://localhost',
- // },
- },
- computed: {
- dataList() {
- return [
- { label: '今日收益(星币)', value: this.data.todayIncomeStarCoin },
- { label: '总收益(星币)', value: this.data.totalIncomeStarCoin },
- { label: '今日购买订单数', value: this.data.totalBuyOrderCount },
- { label: '累计推广订单', value: this.data.totalBuyOrderCount },
- {
- label: '今日购买成功客户',
- value: this.data.todayBuyOrderSuccessCount,
- },
- {
- label: '累计购买成功客户',
- value: this.data.totalBuyOrderSuccessCount,
- },
- // { label: '可提现星币数量', value: this.data.withdrawStarCoinNum },
- ];
- },
- },
- mounted() {},
- methods: {
- share() {
- // window.aplus.getNextTrackCode(
- // {
- // appkey: '',
- // openid: '',
- // unionId: 'aTestUnionid',
- // trackCode: '',
- // rootTrackCode: '',
- // url: location.href || 'testurl',
- // },
- // () => {},
- // );
- window._hmt.push(['_trackEvent', '活动', '分享', '邀请好友', 0]);
- this.$native.share({
- title: '标题',
- content: '内容',
- gotoUrl: `${location.origin}${location.pathname}${qs.stringify(
- { id: 666 },
- { addQueryPrefix: true },
- )}`,
- shareImg: 'http://localhost',
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .invite-user {
- color: #333;
- background-image: url('~/assets/image/activity/invite-user/bg@2x.png');
- background-size: 100% auto;
- background-position-y: -44px;
- overflow: hidden;
- padding-bottom: 30px;
- }
- .box {
- width: 373px;
- box-sizing: border-box;
- margin: auto;
- border-image-source: url('~/assets/image/activity/invite-user/box@2x.png');
- border-image-slice: 38 * 2 20 * 2 30 * 2 fill;
- // border-image-width: 200px;
- // border-image-slice: 200%;
- border-width: 38px 15px 15px;
- // border-width: 1px;
- border-style: solid;
- position: relative;
- + .box {
- margin-top: 30px;
- }
- .box-title {
- position: absolute;
- top: -30px;
- // left: 141px;
- left: 0;
- right: 0;
- text-align: center;
- padding: 0 130px;
- color: #fff;
- }
- .box-content {
- padding: 30px 15px 20px;
- }
- }
- .box1 {
- margin-top: 275px;
- .box-content {
- // padding: 30px 15px 20px;
- padding-left: 0;
- padding-right: 0;
- }
- .cybz-content {
- width: 305px;
- height: 75px;
- margin: auto;
- display: block;
- // margin-top: 30px;
- }
- .cybz-content-text {
- // display: flex;
- display: grid;
- // width: 305px;
- // padding: 0 28px;
- // align-items: center;
- // margin: auto;
- // justify-content: space-between;
- grid-template-columns: 1fr 1fr 1fr;
- font-size: 12px;
- color: #333;
- .cybz-content-text-item {
- // width: 0;
- // flex: auto;
- text-align: center;
- }
- }
- .share-button {
- display: block;
- margin: auto;
- width: 302px;
- height: 62px;
- background-image: url('~/assets/image/activity/invite-user/share-button@2x.png');
- background-size: 100% 100%;
- margin-top: 24px;
- // margin-bottom: 24px;
- }
- }
- .box2 {
- .label {
- // font-size: 14px;
- }
- .value {
- color: #ff6600;
- // font-size: 24px;
- }
- .box-content {
- padding-left: 20px;
- padding-right: 20px;
- }
- }
- .box4 {
- .box-content {
- // padding-left: 20px;
- padding-top: 0;
- }
- }
- </style>
|