测试插件

This commit is contained in:
陶林 2023-09-12 08:46:09 +08:00
parent f8999ef0be
commit a7f0c20b6f
3 changed files with 25 additions and 1 deletions

7
package-lock.json generated
View File

@ -34,6 +34,7 @@
"cordova-plugin-screen-orientation": "^3.0.2", "cordova-plugin-screen-orientation": "^3.0.2",
"cordova-plugin-splashscreen": "^6.0.1", "cordova-plugin-splashscreen": "^6.0.1",
"cordova-plugin-statusbar": "^3.0.0", "cordova-plugin-statusbar": "^3.0.0",
"cordova-plugin-test-tl": "^1.1.11",
"cordova-plugin-vibration": "^3.1.1", "cordova-plugin-vibration": "^3.1.1",
"es6-promise-plugin": "^4.2.2", "es6-promise-plugin": "^4.2.2",
"phonegap-plugin-barcodescanner-fix": "^8.1.1", "phonegap-plugin-barcodescanner-fix": "^8.1.1",
@ -1552,6 +1553,12 @@
} }
} }
}, },
"node_modules/cordova-plugin-test-tl": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/cordova-plugin-test-tl/-/cordova-plugin-test-tl-1.1.11.tgz",
"integrity": "sha512-fMgwI2iucwhrWoRTfwd0sEIAJejLPmMDgCG6U6Msgy9p3U1Px//QhXGny93e1+SZZd2EBBoVyCJsQ+3lpLkNrA==",
"dev": true
},
"node_modules/cordova-plugin-vibration": { "node_modules/cordova-plugin-vibration": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-vibration/-/cordova-plugin-vibration-3.1.1.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-vibration/-/cordova-plugin-vibration-3.1.1.tgz",

View File

@ -36,6 +36,7 @@
"cordova-plugin-screen-orientation": "^3.0.2", "cordova-plugin-screen-orientation": "^3.0.2",
"cordova-plugin-splashscreen": "^6.0.1", "cordova-plugin-splashscreen": "^6.0.1",
"cordova-plugin-statusbar": "^3.0.0", "cordova-plugin-statusbar": "^3.0.0",
"cordova-plugin-test-tl": "^1.1.11",
"cordova-plugin-vibration": "^3.1.1", "cordova-plugin-vibration": "^3.1.1",
"es6-promise-plugin": "^4.2.2", "es6-promise-plugin": "^4.2.2",
"phonegap-plugin-barcodescanner-fix": "^8.1.1", "phonegap-plugin-barcodescanner-fix": "^8.1.1",
@ -73,7 +74,9 @@
}, },
"cordova-plugin-file-transfer-jsg": {}, "cordova-plugin-file-transfer-jsg": {},
"cordova-plugin-app-version": {}, "cordova-plugin-app-version": {},
"cordova-plugin-file-opener2": {} "cordova-plugin-file-opener2": {},
"cordova-plugin-test-tl": {},
"cordova-plugin-file-transfer": {}
} }
}, },
"dependencies": { "dependencies": {

View File

@ -26,6 +26,7 @@
<el-button @click="docPrint">文件打印</el-button> <el-button @click="docPrint">文件打印</el-button>
<el-button @click="versionCheck">版本升级</el-button> <el-button @click="versionCheck">版本升级</el-button>
<el-button @click="installAPK" type="danger">安装apk</el-button> <el-button @click="installAPK" type="danger">安装apk</el-button>
<el-button @click="customPlugin">自定义插件</el-button>
</div> </div>
</body> </body>
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
@ -40,6 +41,19 @@
}, 600); }, 600);
}, },
methods: { methods: {
customPlugin() {
console.log(cordovaTest);
cordovaTest.coolMethod(
"param",
(res) => {
console.log(res);
this.$message.success(res);
},
(e) => {
this.$message.error(e);
}
);
},
installAPK() { installAPK() {
let url = "http://3000.taoya.art/app.apk"; let url = "http://3000.taoya.art/app.apk";
var filename = url.split("/").pop(); var filename = url.split("/").pop();