|
@@ -172,7 +172,9 @@
|
|
|
<script>
|
|
|
// import qs from 'qs';
|
|
|
// import clipboard from 'clipboardy/browser';
|
|
|
-import * as clipboard from 'clipboard-polyfill/text';
|
|
|
+
|
|
|
+// import * as clipboard from 'clipboard-polyfill/text';
|
|
|
+// console.log("🚀 ~ file: index.vue ~ line 176 ~ clipboard", clipboard)
|
|
|
// import { getStarCoinOverview } from '~/api/activity/invite-user.js';
|
|
|
// import { getContentByType } from '~/api/public/agreement.js';
|
|
|
export default {
|
|
@@ -180,7 +182,7 @@ export default {
|
|
|
name: 'InviteUser',
|
|
|
filters: {
|
|
|
activationCodeMask(value) {
|
|
|
- // 微信环境不支持此正则
|
|
|
+ // 微信环境不支持零宽断言
|
|
|
// return value.replace(/(?<=^.{4})(.*)(?=.{4}$)/, '***');
|
|
|
|
|
|
return value.replace(/(.{4})(.*)(.{4}$)/, '$1***$3');
|
|
@@ -408,7 +410,10 @@ export default {
|
|
|
this.$native.share(this.shareInfo);
|
|
|
} else {
|
|
|
// 浏览器环境
|
|
|
- await clipboard.writeText(`${this.shareInfo.link} 唔即云手机`);
|
|
|
+
|
|
|
+ await this.$native.clipboard.writeText(
|
|
|
+ `${this.shareInfo.link} 唔即云手机`,
|
|
|
+ );
|
|
|
// throw new Error('1231');
|
|
|
this.$toast.success('链接复制成功');
|
|
|
}
|
|
@@ -434,7 +439,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async copyCode(item) {
|
|
|
- await clipboard.writeText(item.activationCode);
|
|
|
+ await this.$native.clipboard.writeText(item.activationCode);
|
|
|
this.$toast.success('复制成功');
|
|
|
},
|
|
|
codeLoadMoreIntersect(event) {
|