fix: 智聪健康微信小程序版本,代码提交。

This commit is contained in:
tianyongbao
2026-01-22 01:18:01 +08:00
parent 651f7f0c09
commit 14ebbf612b
103 changed files with 2177 additions and 5309 deletions

View File

@@ -22,6 +22,7 @@ export default {
}
function copyTextToClipboard(input, { target = document.body } = {}) {
// #ifdef H5
const element = document.createElement('textarea');
const previouslyFocusedElement = document.activeElement;
@@ -63,4 +64,18 @@ function copyTextToClipboard(input, { target = document.body } = {}) {
}
return isSuccess;
// #endif
// #ifndef H5
// 使用 uni-app 的剪贴板 API
uni.setClipboardData({
data: input,
success: function () {
return true;
},
fail: function () {
return false;
}
});
// #endif
}