domApp.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="box">
  3. <view class="logo flex-line ">
  4. <image class="logoImg" src="../../static/img/domLogo.png" mode="aspectFit"></image>
  5. <view class="text">
  6. <view class="name">
  7. 绿津
  8. </view>
  9. <view class="content margin-t-20">
  10. 绿津智能电动车
  11. </view>
  12. </view>
  13. <view class="tipBox">
  14. <view class="rightO">
  15. </view>
  16. <view class="leftX">
  17. ×
  18. </view>
  19. </view>
  20. </view>
  21. <image class="img" src="../../static/img/bg.png" mode="widthFix"></image>
  22. <view class="bottom flex-line">
  23. <view class="buttom" @click="load">
  24. 立即下载
  25. </view>
  26. <view class="tip margin-t-20">
  27. 平价惠万民,智能行百里
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import {
  34. getAppBBH
  35. } from "@/api/index.js";
  36. export default {
  37. data() {
  38. return {
  39. };
  40. },
  41. onLoad() {
  42. },
  43. methods: {
  44. load(){
  45. const bo = uni.getStorageSync('weichatBrowser')||false;
  46. if(bo){
  47. uni.showModal({
  48. title: '错误',
  49. content: '无法在微信浏览器中下载请使用手机自带浏览器',
  50. showCancel: false,
  51. });
  52. return
  53. }
  54. uni.showLoading({
  55. title: '开始下载',
  56. mask: true
  57. });
  58. getAppBBH().then((res)=>{
  59. uni.hideLoading()
  60. let r = res.data;
  61. console.log(r);
  62. // 打开下载文件
  63. window.open(r.file_url.app_file)
  64. }).catch(()=>{
  65. uni.hideLoading()
  66. })
  67. }
  68. }
  69. };
  70. </script>
  71. <style lang="scss">
  72. .box {
  73. line-height: 0;
  74. height: 100vh;
  75. }
  76. .logo {
  77. margin: 0 auto;
  78. width: 700rpx;
  79. height: calc(100vh - 535rpx);
  80. .logoImg {
  81. width: 100%;
  82. }
  83. .tipBox {
  84. width: 700rpx;
  85. position: relative;
  86. .rightO {
  87. border: 1px solid #04aa6a;
  88. opacity: 0.8;
  89. width: 40rpx;
  90. height: 40rpx;
  91. border-radius: 100rpx;
  92. position: absolute;
  93. right: 0;
  94. top: -100rpx;
  95. }
  96. .leftX {
  97. color: #04aa6a;
  98. opacity: 0.8;
  99. position: absolute;
  100. left: 10rpx;
  101. top: 80rpx;
  102. }
  103. }
  104. }
  105. .img {
  106. width: 750rpx;
  107. height: 160rpx;
  108. }
  109. .bottom {
  110. width: 750rpx;
  111. height: 375rpx;
  112. background-color: #04aa6a;
  113. line-height: 1;
  114. .buttom {
  115. font-weight: bold;
  116. background-color: #FFFFFF;
  117. text-align: center;
  118. color: #04aa6a;
  119. padding: 20rpx;
  120. border-radius: 20rpx;
  121. width: 450rpx;
  122. margin: 0 auto;
  123. }
  124. .tip {
  125. color: #FFFFFF;
  126. font-size: 24rpx;
  127. }
  128. }
  129. .text {
  130. line-height: 1;
  131. color: #04aa6a;
  132. text-align: center;
  133. .name {
  134. font-size: 38rpx;
  135. font-weight: bold;
  136. }
  137. .content {
  138. font-size: 28rpx;
  139. opacity: 0.5;
  140. }
  141. }
  142. </style>