|
@@ -80,8 +80,9 @@
|
|
|
</template>
|
|
|
|
|
|
<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';
|
|
|
|
|
|
export default {
|
|
@@ -98,6 +99,7 @@ export default {
|
|
|
todayBuyOrderSuccessCount: 0,
|
|
|
totalBuyOrderSuccessCount: 0,
|
|
|
withdrawStarCoinNum: 0,
|
|
|
+ inviteUserName: null,
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -144,36 +146,30 @@ export default {
|
|
|
this.$router.resolve({
|
|
|
path: '/register-for-invite',
|
|
|
query: {
|
|
|
- invitationUserName: this.$auth.user?.phone,
|
|
|
- activityId: 1,
|
|
|
+ invitationUserName: this.data.invitationUserName,
|
|
|
+ activityId: this.$route.query.activityId,
|
|
|
},
|
|
|
}).href;
|
|
|
|
|
|
if (this.$userAgent.isMiniProgram) {
|
|
|
// 小程序环境
|
|
|
- await clipboard.write(url);
|
|
|
+ await clipboard.writeText(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,
|
|
|
+ gotoUrl: url,
|
|
|
+ shareImg: 'sdsa.png',
|
|
|
});
|
|
|
} else {
|
|
|
// 浏览器环境
|
|
|
- await clipboard.write(url);
|
|
|
+ await clipboard.writeText(url);
|
|
|
// throw new Error('1231');
|
|
|
this.$toast.success('链接复制成功');
|
|
|
}
|
|
|
},
|
|
|
- share2() {
|
|
|
- throw new Error('1231');
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|