@@ -753,19 +753,8 @@ export default {
this.$toast('链接复制成功');
});
},
- () => {
- this.$native.clipboard
- .writeText(res.data.link)
- .then(() => {
- setTimeout(() => {
- this.$toast('链接复制成功');
- });
- })
- .catch(() => {
- this.$toast('链接复制失败');
+ (copy) => {
+ copy && copy()
);
}
@@ -94,7 +94,7 @@ export default {
.then((res) => {
if (res.success) {
if (!res.data.bargainingStatus) {
- let url = '/claimCloudPhone/1?menuRuleId=' + data.id;
+ let url = '/claimCloudPhone/type?type=1&menuRuleId=' + data.id;
if (this.$route.query.userCardId) {
url += `&userCardId=${this.$route.query.userCardId}`;
@@ -25,14 +25,17 @@ export function writeToClipboard(text, success = () => { }, error = () => { }) {
navigator.clipboard.writeText(text).then(() => {
success()
}).catch((error) => {
- alert(error)
error()
})
}, 0);
} catch (err) {
- error()
+ error(copy)
} else {
+ copy()
+ }
+
+ function copy() {
const textArea = document.createElement('textarea');
textArea.value = text;
document.body.appendChild(textArea);