- 多端应用在构建应用打包生成的时候报错?
[miniapp 17:21:54.234 INFO] cloudBuild.ts:main - cloudbuild start! [miniapp 17:21:54.248 INFO] cloudBuild.ts:main - argsOptions processing [miniapp 17:21:54.248 INFO] cloudBuild.ts:main - landun options getProcessArgs [miniapp 17:21:54.248 INFO] cloudBuild.ts:main - setCosConfig finished [miniapp 17:21:54.249 INFO] cloudBuild.ts:main - new MaterialManager [miniapp 17:21:55.114 INFO] material.ts - fetchTaskRes finished [miniapp 17:21:55.244 INFO] material.ts - gunzip finished [miniapp 17:21:55.245 INFO] material.ts - wxapkg.unpack finished [miniapp 17:21:55.335 INFO] material.ts - getMaterial 写入project目录 [miniapp 17:21:55.335 INFO] material.ts - tryGetIOSMiniappJson/Volumes/data/workspace/project [miniapp 17:21:55.373 INFO] material.ts - tryGetIOSMiniappJson finished [miniapp 17:21:55.374 INFO] material.ts - [generateMiniappIOSResources] not using iPad Beta [miniapp 17:21:55.374 INFO] material.ts - downloadMiniappIOSResources ing ... [miniapp 17:21:55.375 INFO] material.ts - /generic/wechatdevtools/custom/ios-sdk/1.5.1/x86.zip [miniapp 17:21:55.376 INFO] material.ts - /generic/wechatdevtools/custom/ios-sdk/1.5.1/arm64.zip [miniapp 17:21:55.377 INFO] material.ts - /generic/wechatdevtools/custom/ios-sdk/1.5.1/WeAppSDK-1.5.1.zip [miniapp 17:21:55.675 INFO] material.ts - /Volumes/data/workspace/v2-ipa/1.5.1/x86.zip downloaded successfully. [miniapp 17:21:55.680 INFO] material.ts - /Volumes/data/workspace/v2-ipa/1.5.1/arm64.zip downloaded successfully. [miniapp 17:21:58.118 INFO] material.ts - /Volumes/data/workspace/v2-ipa/1.5.1/WeAppSDK-1.5.1.zip downloaded successfully. [miniapp 17:21:58.119 INFO] material.ts - Download ios resources successfully [miniapp 17:21:58.119 INFO] material.ts - [generateMiniappIOSResources] Archive ios resources... [miniapp 17:22:01.855 INFO] material.ts - this.generateMiniappIOSResources finished [miniapp 17:22:01.858 INFO] cloudBuild.ts:main - finished materialManagerIns.getProjectMaterial. [miniapp 17:22:01.877 INFO] material.ts - mvMiniprogrameWxapkg success [miniapp 17:22:01.877 INFO] cloudBuild.ts:main - finished mvMiniprogrameWxapkg. [miniapp 17:22:01.880 INFO] cloudBuild.ts:main - finished getPluginList. [miniapp 17:22:01.880 INFO] cloudBuild.ts:main - 50000000 doing iOS cloud build in landun start [miniapp 17:22:01.881 INFO] cloudBuild.ts:main - 50000000 doing import certificate of iOS cloud build [miniapp 17:22:01.901 INFO] cloudBuild.ts:main - 50000000 doing /Volumes/data/workspace/project/zs/1b5c0a4e3d464c4394085691c9d91c19 (1).p12 com.BleAttendance.db /Volumes/data/workspace/cer [miniapp 17:22:01.906 INFO] cloudBuild.ts:main - 50000000 doing create-keychain "-p" "123456" "ios-build.keychain" [miniapp 17:22:01.925 INFO] cloudBuild.ts:main - 50000000 doing create done [miniapp 17:22:01.931 INFO] cloudBuild.ts:main - 50000000 doing import "/Volumes/data/workspace/cer/intermediate/AppleWWDRCA.cer" "-k" "/Users/bkdevops/Library/Keychains/ios-build.keychain" "-T" "/usr/bin/codesign" [miniapp 17:22:01.970 INFO] cloudBuild.ts:main - 50000000 doing 1 certificate imported. [miniapp 17:22:01.978 INFO] cloudBuild.ts:main - 50000000 doing import "/Volumes/data/workspace/cer/intermediate/AppleWWDRCAG3.cer" "-k" "/Users/bkdevops/Library/Keychains/ios-build.keychain" "-T" "/usr/bin/codesign" [miniapp 17:22:02.003 INFO] cloudBuild.ts:main - 50000000 doing 1 certificate imported. [miniapp 17:22:02.009 INFO] cloudBuild.ts:main - 50000000 doing import "/Volumes/data/workspace/cer/intermediate/AppleWWDRCAG4.cer" "-k" "/Users/bkdevops/Library/Keychains/ios-build.keychain" "-T" "/usr/bin/codesign" [miniapp 17:22:02.039 INFO] cloudBuild.ts:main - 50000000 doing 1 certificate imported. [miniapp 17:22:02.046 INFO] cloudBuild.ts:main - 50000000 doing import "/Volumes/data/workspace/cer/intermediate/DeveloperIDG2CA.cer" "-k" "/Users/bkdevops/Library/Keychains/ios-build.keychain" "-T" "/usr/bin/codesign" [miniapp 17:22:02.074 INFO] cloudBuild.ts:main - 50000000 doing 1 certificate imported. [miniapp 17:22:02.075 INFO] cloudBuild.ts:main - 50000000 doing import intermediate cer done [miniapp 17:22:02.088 INFO] cloudBuild.ts:main - 50000000 doing security: Error reading infile /Volumes/data/workspace/project/zs/1b5c0a4e3d464c4394085691c9d91c19: No such file or directory [miniapp 17:22:02.089 INFO] cloudBuild.ts:main - 50000000 doing -e execute failed [miniapp 17:22:02.091 ERROR] cloudBuild.ts:main - main try catch failed! undefined stack: undefined
12-11 - 多端应用在构建应用打包生成的时候报错?
ENOENT: no such file or directory, open 'E:\测试\测试考勤\unpackage\dist\build\mp-weixin\{"androidExtendedSdkVersion":{"tpush":{"1.0.1":{"version":"1.0.1","minMainSdk":"1.0.4","updateTime":1689563793508},"1.0.2":{"version":"1.0.2","minMainSdk":"1.0.4","updateTime":1689563793508},"1.0.3":{"version":"1.0.3","updateTime":1692952354829,"minMainSdk":"1.0.4"},"1.0.4":{"version":"1.0.4","updateTime":1693365824867,"minMainSdk":"1.0.4"},"1.0.5":{"version":"1.0.5","updateTime":1697595323126,"minMainSdk":"1.0.4"},"1.0.6":{"version":"1.0.6","updateTime":1697687051059,"minMainSdk":"1.0.4"}},"map":{"1.0.0":{"version":"1.0.0","updateTime":1689679668620,"minMainSdk":"1.0.7"},"1.0.1":{"version":"1.0.1","updateTime":1695289129405,"minMainSdk":"1.0.7"},"1.2.0":{"version":"1.2.0","updateTime":1703040905923,"minMainSdk":"1.2.0"},"1.2.1":{"version":"1.2.1","updateTime":1717659346470,"minMainSdk":"1.2.0"}}},"sdkVersionList":{"ios":{"defaultVersion":"1.2.13","version":[{"version":"1.3.28","wxapplibVersion":"3.2.5-28","updateTime":1718789665},{"version":"1.3.27","wxapplibVersion":"3.2.5-27","updateTime":1718267614},{"version":"1.3.26","wxapplibVersion":"3.2.5-26","updateTime":1718175939},{"version":"1.3.25","wxapplibVersion":"3.2.5-25","updateTime":1717746506},{"version":"1.3.24","wxapplibVersion":"3.2.5-25","updateTime":1717733758},{"version":"1.3.23","wxapplibVersion":"3.2.5-25","updateTime":1717726852},{"version":"1.3.22","wxapplibVersion":"3.2.5-25","updateTime":1717504094},{"version":"1.3.21","wxapplibVersion":"3.2.5-25","updateTime":1717488987},{"version":"1.3.20","wxapplibVersion":"3.2.5-23","updateTime":1717072779},{"version":"1.3.19","wxapplibVersion":"3.2.5-21","updateTime":1716985068},{"version":"1.3.18","wxapplibVersion":"3.2.5-17","updateTime":1716953932},{"version":"1.3.17","wxapplibVersion":"3.2.5-16","updateTime":1716794731},{"version":"1.3.16","wxapplibVersion":"3.2.5-14","updateTime":1716373900},{"version":"1.3.15","wxapplibVersion":"3.2.5-13","updateTime":1716288867},{"version":"1.3.14","wxapplibVersion":"3.2.5-11","updateTime":1715958162},{"version":"1.3.13","wxapplibVersion":"3.2.5-9","updateTime":1715926815},{"version":"1.3.12","wxapplibVersion":"3.2.5-6","updateTime":1715768854},{"version":"1.3.11","wxapplibVersion":"3.2.5-6","updateTime":1715583378},{"version":"1.3.10","wxapplibVersion":"3.2.5-6","updateTime":1715224706},{"version":"1.3.9","wxapplibVersion":"3.2.5-6","updateTime":1714993798},{"version":"1.3.8","wxapplibVersion":"3.2.5-6","updateTime":1714373472},{"version":"1.3.7","wxapplibVersion":"3.2.5-6","updateTime":1714117951},{"version":"1.3.6","wxapplibVersion":"3.2.5-6","updateTime":1713874135},{"version":"1.3.5","wxapplibVersion":"3.2.5-5","updateTime":1713439001},{"version":"1.3.4","wxapplibVersion":"3.2.5-4","updateTime":1713268893},{"version":"1.3.3","wxapplibVersion":"3.2.5-4","updateTime":1713172895},{"version":"1.3.2","wxapplibVersion":"3.2.5-4","updateTime":1712922315},{"version":"1.3.1","wxapplibVersion":"3.2.5-4","updateTime":1712734909},{"version":"1.3.0","wxapplibVersion":"3.2.5-3","updateTime":1712556421},{"version":"1.2.26","wxapplibVersion":"3.2.5-3","updateTime":1712031598},{"version":"1.2.25","wxapplibVersion":"3.2.5-2","updateTime":1711356067},{"version":"1.2.24","wxapplibVersion":"3.0.2-14","updateTime":1710849609},{"version":"1.2.23","wxapplibVersion":"3.0.2-14","updateTime":1710762154},{"version":"1.2.22","wxapplibVersion":"3.0.2-14","updateTime":1710220462},{"version":"1.2.21","wxapplibVersion":"3.0.2-14","updateTime":1710157545},{"version":"1.2.20","wxapplibVersion":"3.0.2-14","updateTime":1710140714},{"version":"1.2.19","wxapplibVersion":"3.0.2-14","updateTime":1709880431},{"version":"1.2.18","wxapplibVersion":"3.0.2-14","updateTime":1709357029},{"version":"1.2.17","wxapplibVersion":"3.0.2-12","updateTime":1709100552},{"version":"1.2.16","wxapplibVersion":"3.0.2-11","updateTime":1708568653},{"version":"1.2.16","wxapplibVersion":"3.0.2-11","updateTime":1708568343},{"version":"1.2.15","wxapplibVersion":"3.0.2-10","updateTime":1706671102},{"version":"1.2.14","wxapplibVersion":"3.0.2-9","updateTime":1705671449},{"version":"1.2.13","wxapplibVersion":"3.0.2-8","updateTime":1705305968},{"version":"1.2.12","wxapplibVersion":"3.0.2-6","updateTime":1704346790,"hidden":true},{"version":"1.2.11","wxapplibVersion":"3.0.2-3","updateTime":1703470893},{"version":"1.2.10","wxapplibVersion":"3.0.2-2","updateTime":1702981673},{"version":"1.2.9","wxapplibVersion":"3.0.2-1","updateTime":1702605684},{"version":"1.2.8","wxapplibVersion":"3.0.2-3","updateTime":1702434291},{"version":"1.2.7","wxapplibVersion":"3.0.2-1","updateTime":1702284267},{"version":"1.2.6","wxapplibVersion":"3.0.2-2","updateTime":1702003932},{"version":"1.2.5","wxapplibVersion":"3.0.1-2","updateTime":1701689841},{"version":"1.1.14","wxapplibVersion":"2.27.3-7","updateTime":1701325480},{"version":"1.1.13","wxapplibVersion":"2.27.3-7","updateTime":1701139418},{"version":"1.1.12","wxapplibVersion":"2.27.3-7","updateTime":1701078499},{"version":"1.1.11","wxapplibVersion":"2.27.3-6","updateTime":1700807925},{"version":"1.1.10","wxapplibVersion":"2.27.3-6","updateTime":1700485078},{"version":"1.1.9","wxapplibVersion":"2.27.3-6","updateTime":1700463275},{"version":"1.1.8","wxapplibVersion":"2.27.3-6","updateTime":1700233676},{"version":"1.1.7","wxapplibVersion":"2.27.3-6","updateTime":1700192880},{"version":"1.1.6","wxapplibVersion":"2.27.3-6","updateTime":1700045912},{"version":"1.1.5","wxapplibVersion":"2.27.3-6","updateTime":1700015184},{"version":"1.1.4","wxapplibVersion":"2.27.3-6","updateTime":1699603235},{"version":"1.1.3","wxapplibVersion":"2.27.3-4","updateTime":1698205860,"hidden":true},{"version":"1.1.2","wxapplibVersion":"2.27.3-4","updateTime":1698205860},{"version":"1.1.1","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.1.0","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.32","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.31","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.30","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.29","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.28","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.27","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.26","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.25","wxapplibVersion":"2.27.3-4","updateTime":1697442475445,"hidden":true},{"version":"1.0.24","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.23","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.22","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.21","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.20","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.19","wxapplibVersion":"2.27.3-4","updateTime":1697442475445,"hidden":true},{"version":"1.0.18","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.17","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.16","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.15","wxapplibVersion":"2.27.3-4","updateTime":1697442475445,"hidden":true},{"version":"1.0.14","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.13","wxapplibVersion":"2.27.3-4","updateTime":1697442475445,"hidden":true},{"version":"1.0.12","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.11","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.10","wxapplibVersion":"2.27.3-4","updateTime":1697442475445,"hidden":true},{"version":"1.0.9","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.8","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.7","wxapplibVersion":"2.27.3-4","updateTime":1697442475445,"hidden":true},{"version":"1.0.6","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.5","wxapplibVersion":"2.27.3-4","updateTime":1697442475445}]},"android":{"defaultVersion":"1.2.9","version":[{"version":"1.3.19","wxapplibVersion":"3.2.5-28","updateTime":1718628394},{"version":"1.3.18","wxapplibVersion":"3.2.5-25","updateTime":1718105495},{"version":"1.3.17","wxapplibVersion":"3.2.5-25","updateTime":1717658176},{"version":"1.3.16","wxapplibVersion":"3.2.5-24","updateTime":1717154044},{"version":"1.3.15","wxapplibVersion":"3.2.5-18","updateTime":1716969593},{"version":"1.3.14","wxapplibVersion":"3.2.5-14","updateTime":1716807766},{"version":"1.3.13","wxapplibVersion":"3.2.5-14","updateTime":1716358713},{"version":"1.3.12","wxapplibVersion":"3.2.5-13","updateTime":1716283831},{"version":"1.3.11","wxapplibVersion":"3.2.5-11","updateTime":1715959430},{"version":"1.3.10","wxapplibVersion":"3.2.5-6","updateTime":1715238257},{"version":"1.3.9","wxapplibVersion":"3.2.5-6","updateTime":1715064545},{"version":"1.3.8","wxapplibVersion":"3.2.5-6","updateTime":1714445145},{"version":"1.3.7","wxapplibVersion":"3.2.5-6","updateTime":1713925083},{"version":"1.3.6","wxapplibVersion":"3.2.5-4","updateTime":1713266654},{"version":"1.3.5","wxapplibVersion":"3.2.5-4","updateTime":1712918432},{"version":"1.3.4","wxapplibVersion":"3.2.5-3","updateTime":1712023966},{"version":"1.3.3","wxapplibVersion":"3.2.5-3","updateTime":1711630574},{"version":"1.3.2","wxapplibVersion":"3.2.5-3","updateTime":1711609253},{"version":"1.3.1","wxapplibVersion":"3.2.5-3","updateTime":1711520766},{"version":"1.3.0","wxapplibVersion":"3.2.5-3","updateTime":1711461108},{"version":"1.3.0","wxapplibVersion":"3.2.5-3","updateTime":1711461049},{"version":"1.2.21","wxapplibVersion":"3.2.5-2","updateTime":1711108563},{"version":"1.2.20","wxapplibVersion":"3.0.2-14","updateTime":1710853462},{"version":"1.2.19","wxapplibVersion":"3.0.2-14","updateTime":1710745270},{"version":"1.2.18","wxapplibVersion":"3.0.2-14","updateTime":1710143375},{"version":"1.2.17","wxapplibVersion":"3.0.2-13","updateTime":1709276411},{"version":"1.2.16","wxapplibVersion":"3.0.2-11","updateTime":1708651401},{"version":"1.2.15","wxapplibVersion":"3.0.2-11","updateTime":1708236721},{"version":"1.2.14","wxapplibVersion":"3.0.2-10","updateTime":1706519728},{"version":"1.2.13","wxapplibVersion":"3.0.2-10","updateTime":1706251775},{"version":"1.2.12","wxapplibVersion":"3.0.2-9","updateTime":1706008324},{"version":"1.2.11","wxapplibVersion":"3.0.2-9","updateTime":1705976461},{"version":"1.2.10","wxapplibVersion":"3.0.2-9","updateTime":1705554075},{"version":"1.2.9","wxapplibVersion":"3.0.2-8","updateTime":1705474861},{"version":"1.2.8","wxapplibVersion":"3.0.2-8","updateTime":1705049419},{"version":"1.2.7","wxapplibVersion":"3.0.2-7","updateTime":1704693789,"hidden":true},{"version":"1.2.6","wxapplibVersion":"3.0.2-6","updateTime":1704268803},{"version":"1.2.5","wxapplibVersion":"3.0.2-5","updateTime":1704179239},{"version":"1.2.4","wxapplibVersion":"3.0.2-4","updateTime":1703742968},{"version":"1.2.3","wxapplibVersion":"3.0.2-4","updateTime":1703583856},{"version":"1.2.2","wxapplibVersion":"3.0.2-3","updateTime":1703504440},{"version":"1.2.1","wxapplibVersion":"3.0.2-3","updateTime":1703145403},{"version":"1.2.0","wxapplibVersion":"3.0.2-1","updateTime":1702901534},{"version":"1.1.11","wxapplibVersion":"2.27.3-11","updateTime":1702539822},{"version":"1.1.10","wxapplibVersion":"2.27.3-11","updateTime":1702439601},{"version":"1.1.9","wxapplibVersion":"2.27.3-9","updateTime":1702020848},{"version":"1.1.8","wxapplibVersion":"2.27.3-8","updateTime":1701940452},{"version":"1.1.7","wxapplibVersion":"2.27.3-8","updateTime":1701776480},{"version":"1.1.6","wxapplibVersion":"2.27.3-8","updateTime":1701694106},{"version":"1.1.5","wxapplibVersion":"2.27.3-7","updateTime":1701337493},{"version":"1.1.4","wxapplibVersion":"2.27.3-6","updateTime":1700720268},{"version":"1.1.3","wxapplibVersion":"2.27.3-6","updateTime":1700120757},{"version":"1.1.2","wxapplibVersion":"2.27.3-5","updateTime":1699528629},{"version":"1.1.1","wxapplibVersion":"2.27.3-4","updateTime":1698134541},{"version":"1.1.0","wxapplibVersion":"2.27.3-4","updateTime":1698134541},{"version":"1.0.21","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.20","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.19","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.18","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.17","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.16","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.15","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.14","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.13","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.12","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.11","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.10","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.9","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.8","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.7","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.6","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.5","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.4","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.3","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.2","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.1","wxapplibVersion":"2.27.3-4","updateTime":1697442475445},{"version":"1.0.0","wxapplibVersion":"2.27.3-4","updateTime":1697442475445}]}}}' [图片]
06-20 - 项目分包了,主包大小1.85,总包大小3M,为什么总提示错误?
[图片]
2023-08-23 - 为什么开发者工具用苹果真机调试,不能输出打印日志,安卓手机真机调试可以?
开发者工具用苹果真机调试,不能输出打印日志,安卓手机真机调试可以 [图片] [图片][图片]
2023-05-17 - 有没有提供想浏览器的crypto.subtle.generateKey接口啊?
想前端生成rsa密钥对,但是用到网上的包冇使对性能不太好,所以有没有提供像浏览器的一样的对称加密算法加密算法https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey let keyPair = window.crypto.subtle.generateKey( { name: "RSA-OAEP", modulusLength: 4096, publicExponent: new Uint8Array([1, 0, 1]), hash: "SHA-256" }, true, ["encrypt", "decrypt"] );
2020-06-05 - 关于小程序nfc卡模拟中的wx.onHCEMessage(callback)
附上官方文档https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.getHCEState.html 根据官方文档的做法 我的code如下 [代码]console.log([代码][代码]'aa'[代码][代码])[代码][代码] [代码][代码]wx.getHCEState({[代码][代码] [代码][代码]success(res) {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'getHCEState'[代码] [代码]+ res.errCode,[代码][代码] [代码][代码]duration: 2000[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]const buffer = [代码][代码]new[代码] [代码]ArrayBuffer(1)[代码][代码] [代码][代码]const dataView = [代码][代码]new[代码] [代码]DataView(buffer)[代码][代码] [代码][代码]dataView.setUint8(0, 0)[代码][代码] [代码][代码]console.log(buffer)[代码][代码] [代码][代码]wx.startHCE({[代码][代码] [代码][代码]aid_list: [[代码][代码]'F223344556'[代码][代码]],[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码] [代码] [代码][代码]console.log([代码][代码]'startHCE'[代码][代码])[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'startHCE'[代码][代码],[代码][代码] [代码][代码]duration: 2000[代码][代码] [代码][代码]})[代码][代码] [代码][代码]wx.onHCEMessage([代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]'onHCEMessage'[代码][代码],res)[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'onHCEMessage'[代码][代码],[代码][代码] [代码][代码]duration: 2000[代码][代码] [代码][代码]})[代码][代码] [代码][代码]if[代码] [代码](res.messageType === 1) {[代码] [代码] [代码][代码]console.log([代码][代码]'res.messageType === 1'[代码][代码]);[代码] [代码] [代码][代码]wx.sendHCEMessage({[代码][代码] [代码][代码]data: buffer,[代码][代码] [代码][代码]success:(res)=>{[代码][代码] [代码][代码]console.log([代码][代码]'sendHCEMessage'[代码][代码]+res)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail:(res)=>{[代码][代码] [代码][代码]console.log([代码][代码]'sendHCEMessage失败'[代码] [代码]+ res)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]}[代码] [代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail(res) {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail(res) {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: res,[代码][代码] [代码][代码]duration: 2000[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码]以上代码执行结果如下 我把手机放到读卡器上了 没反应[图片] [代码]wx.onHCEMessage([代码][代码]function[代码][代码](res) { 这个函数一直不执行 没任何结果也不返回任何值 [代码] 请问这个是怎么模拟卡的
2018-11-21