down.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="content">
  3. <image src="../../static/icon/logo1.png" mode="" class="logo"></image>
  4. <view class="btn" @click="downapp">
  5. APP 下载
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import { getVersion } from '@/api/index.js'
  11. export default {
  12. data() {
  13. return {
  14. appDown: 'https://hdxy.zjxiyi888.cn/static/app/xy.apk'
  15. }
  16. },
  17. onShow() {
  18. this.getVersion()
  19. },
  20. methods: {
  21. downapp() {
  22. window.open(this.appDown)
  23. },
  24. getVersion() {
  25. getVersion().then(res => {
  26. // console.log(res.data.app_down);
  27. this.appDown = res.data.app_down
  28. })
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. page {
  35. // background: linear-gradient(to bottom,#3a79f7 10%,#fff 50%,#fff,#fff 60%,#3a79f7);
  36. height: auto;
  37. min-height: 100%;
  38. background-color: #FFFFFF;
  39. }
  40. .content {
  41. position: absolute;
  42. height: 100%;
  43. width: 100%;
  44. display: flex;
  45. flex-direction: column;
  46. align-items: center;
  47. justify-content: center;
  48. }
  49. .logo {
  50. width: 314rpx;
  51. height: 300rpx;
  52. }
  53. .btn {
  54. width: 300rpx;
  55. line-height: 70rpx;
  56. background: #FFFFFF;
  57. border-radius: 10rpx;
  58. margin-top: 50rpx;
  59. text-align: center;
  60. background-color: $base-color;
  61. color: #fff;
  62. margin-top: 300rpx;
  63. }
  64. </style>