install-apk.uvue 865 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <!-- #ifdef APP -->
  3. <scroll-view style="flex: 1">
  4. <!-- #endif -->
  5. <view>
  6. <page-head :title="title"></page-head>
  7. <view class="uni-common-mt">
  8. <view class="uni-padding-wrap">
  9. <view class="uni-btn-v">
  10. <button type="primary" @tap="installApk">
  11. installApk
  12. </button>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <!-- #ifdef APP -->
  18. </scroll-view>
  19. <!-- #endif -->
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. title: 'installApk'
  26. }
  27. },
  28. onUnload: function () {
  29. },
  30. methods: {
  31. installApk: function () {
  32. uni.installApk({
  33. filePath: "/static/test-apk/test.apk",
  34. complete(res : any) {
  35. console.log(res);
  36. }
  37. })
  38. },
  39. }
  40. }
  41. </script>
  42. <style>
  43. </style>