ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ var moneyurl=‘复制内容’; if(mui.os.ios) { //苹果 var UIPasteboard = plus.ios.importClass("UIPasteboard"); var generalPasteboard = UIPasteboard.generalPasteboard(); generalPasteboard.setValueforPasteboardType(moneyurl, "public.utf8-plain-text"); var value = generalPasteboard.valueForPasteboardType("public.utf8-plain-text"); mui.toast('复制成功'); } else { //安卓 var Context = plus.android.importClass("android.content.Context"); var main = plus.android.runtimeMainActivity(); var clip = main.getSystemService(Context.CLIPBOARD_SERVICE); plus.android.invoke(clip, "setText", moneyurl); mui.toast('复制成功'); } ~~~