appPromoPage.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="page">
  3. <view class="header dis a-end">
  4. <image class="logo mr-2" src="/static/image/my/logo.png" mode=""></image>
  5. <view class="dis f-c a-start title">
  6. <text>晋掌柜</text>
  7. <text>高效、智能车险工具,让车险交易更简单</text>
  8. </view>
  9. </view>
  10. <!-- 宣传图 -->
  11. <view class="showimg dis f-c a-c">
  12. <image class="img1" src="/static/image/registr/Mask1@2x.png" mode=""></image>
  13. <image class="img2 mt-5" src="/static/image/registr/Mask2.png" mode=""></image>
  14. </view>
  15. <!-- 底部下载按钮 -->
  16. <view class="btn dis a-c j-c " @tap="downloadApp('android')">
  17. 立即下载
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. }
  26. },
  27. onShow() {
  28. },
  29. onLoad() {
  30. },
  31. methods: {
  32. // 判断是不是微信
  33. async weixinTip(ele) {
  34. var ua = navigator.userAgent;
  35. var isWeixin = !!/MicroMessenger/i.test(ua);
  36. if (isWeixin) {
  37. ele.onclick = function(e) {
  38. window.event ? window.event.returnValue = false : e.preventDefault();
  39. document.getElementById('weixin-tip').style.display = 'block';
  40. }
  41. } else {
  42. let apkquote = await this.$http.get('/version/getMaxVersion', {
  43. appid: "__UNI__05D695B",
  44. packageType: "apk",
  45. });
  46. if (apkquote.code == '200') {
  47. window.open(apkquote.data.path);
  48. } else {
  49. uni.showToast({
  50. title: apkquote.msg,
  51. icon: 'none'
  52. });
  53. }
  54. }
  55. },
  56. downloadApp(typeId) {
  57. var btn = document.getElementById(typeId);
  58. this.weixinTip(btn);
  59. },
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .page {
  65. height: 100vh;
  66. background-image: url('../../static/image/registr/bg.png');
  67. background-size: 100% 100%;
  68. }
  69. // 头部样式
  70. .header {
  71. width: 100%;
  72. padding: 50rpx 35rpx 35rpx;
  73. box-sizing: border-box;
  74. .logo {
  75. width: 120rpx;
  76. height: 120rpx;
  77. }
  78. .title {
  79. margin-bottom: 8rpx;
  80. text:first-child {
  81. font-size: 36rpx;
  82. color: #333;
  83. font-weight: bold;
  84. margin-bottom: 12rpx;
  85. }
  86. text:last-child {
  87. font-size: 30rpx;
  88. color: #333;
  89. }
  90. }
  91. }
  92. // 宣传图页面居中
  93. .showimg {
  94. position: absolute;
  95. width: 100%;
  96. top: 50%;
  97. left: 50%;
  98. transform: translate(-50%, -50%);
  99. .img1 {
  100. width: 100%;
  101. height: 214rpx;
  102. }
  103. .img2 {
  104. width: 660rpx;
  105. height: 686rpx;
  106. }
  107. }
  108. .btn {
  109. position: absolute;
  110. bottom: 70rpx;
  111. left: 0;
  112. right: 0;
  113. margin: 0 60rpx;
  114. height: 88rpx;
  115. background: #FDE935;
  116. border-radius: 58rpx 58rpx 58rpx 58rpx;
  117. font-size: 36rpx;
  118. color: #1F1F1F;
  119. font-weight: bold;
  120. }
  121. </style>