邃芒智像大屏项目
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

97 satır
2.0 KiB

  1. <template>
  2. <view class="page">
  3. <image src="../../assets/img/homeImg.jpg" mode="scaleToFill" />
  4. <view class="bottomBox">
  5. <view class="orangeBtn" @click="toChooseStyle">拍摄数码写真</view>
  6. <view class="IMEI" @click="Imei">i</view>
  7. </view>
  8. </view>
  9. </template>
  10. <script setup>
  11. //#region 导入
  12. import { ref } from "vue";
  13. //#endregion ----------------------------------
  14. function toChooseStyle() {
  15. uni.navigateTo({ url: "/pages/chooseStyle/index" });
  16. }
  17. //#region 初始化
  18. //#endregion ----------------------------------
  19. //#region getImei
  20. function Imei() {
  21. try {
  22. const IMEI = window.webview.raiseEvent("getIMEI", "test_params");
  23. // window.webview.raiseEvent("getSerial", "test_params");
  24. // window.webview.raiseEvent("getTestStr", "test_params");
  25. // const IMEI = window.android.getIMEI();
  26. // const IMEI = window.android.getSerial();
  27. // const IMEI = window.android.getTestStr();
  28. uni.showToast({
  29. title: IMEI,
  30. icon: "success",
  31. });
  32. } catch (error) {
  33. uni.showToast({
  34. title: "Error",
  35. icon: "error",
  36. });
  37. }
  38. // cordova.exec(
  39. // function (imei) {
  40. // console.log("IMEI:", imei);
  41. // },
  42. // function (error) {
  43. // console.error("Failed to get IMEI:", error);
  44. // },
  45. // "MyPlugin",
  46. // "getIMEI",
  47. // []
  48. // );
  49. }
  50. //#endregion ----------------------------------
  51. //#region 登录
  52. //#endregion ----------------------------------
  53. </script>
  54. <style lang="scss" scoped>
  55. .page {
  56. padding: 0;
  57. position: relative;
  58. width: 100vw;
  59. height: 100vh;
  60. image {
  61. position: absolute;
  62. width: 100%;
  63. height: 100%;
  64. }
  65. .bottomBox {
  66. position: absolute;
  67. bottom: 0;
  68. display: flex;
  69. flex-direction: column;
  70. align-items: center;
  71. padding: 100rpx 0;
  72. width: 100%;
  73. height: 300rpx;
  74. background-color: rgba($color: #000000, $alpha: 0.5);
  75. .IMEI {
  76. position: absolute;
  77. bottom: 20rpx;
  78. right: 20rpx;
  79. width: 40rpx;
  80. height: 40rpx;
  81. line-height: 40rpx;
  82. text-align: center;
  83. }
  84. }
  85. }
  86. </style>