down.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="bg">
  3. <!-- <navbar backColor="#fff" :config="config"></navbar> -->
  4. <view class="top-box">
  5. <image src="/static/login/logo.png" mode="" class="logo"></image>
  6. </view>
  7. <view class="btn-row">
  8. <button class="btn" @click="downLoad(0)">
  9. <image src="/static/login/android.png" mode="" class="logo"></image>
  10. 安卓下载
  11. </button>
  12. <button class="btn" @click="downLoad(1)">
  13. <image src="/static/login/ios.png" mode="" class="logo"></image>
  14. IOS下载
  15. </button>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. config: {
  24. back: true, //false是tolbar页面 是则不写
  25. title: "下载",
  26. color: "#1A1A1A",
  27. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  28. backgroundColor: [1, "#fff"],
  29. statusBarFontColor: "#1A1A1A",
  30. },
  31. appInfo: null,
  32. };
  33. },
  34. onLoad(options) {
  35. // this.getData();
  36. },
  37. methods: {
  38. getData(type) {
  39. this.$http.get("/app/version/newest", {
  40. type: type
  41. }).then((res) => {
  42. if (res && res.data && res.code == 200) {
  43. window.location.href = res.data.downloadLink
  44. } else {
  45. this.$mUtil.toast("暂无下载地址")
  46. }
  47. });
  48. },
  49. downLoad(type) {
  50. this.getData(type)
  51. // window.location.href = type == 1 ? this.appInfo.android_link : this.appInfo.ios_link;
  52. },
  53. },
  54. };
  55. </script>
  56. <style>
  57. page {
  58. width: 100%;
  59. height: 100%;
  60. }
  61. </style>
  62. <style lang='scss' scopd>
  63. .bg {
  64. width: 100%;
  65. height: 100%;
  66. background: url('../static/bg.png') no-repeat;
  67. background-size: 100% 100%;
  68. }
  69. .top-box {
  70. position: absolute;
  71. display: flex;
  72. width: 100%;
  73. align-items: center;
  74. justify-content: center;
  75. top: 400rpx;
  76. left: 50%;
  77. transform: translateX(-50%);
  78. .logo {
  79. width: 186rpx;
  80. height: 186rpx;
  81. }
  82. }
  83. .btn-row {
  84. position: fixed;
  85. display: flex;
  86. width: 100%;
  87. justify-content: space-around;
  88. flex-direction: column;
  89. align-items: center;
  90. bottom: 400rpx;
  91. left: 50%;
  92. transform: translateX(-50%);
  93. .btn {
  94. border-radius: 60rpx;
  95. width: 80%;
  96. background: #E6E6E6;
  97. color: #30AFB5;
  98. margin-top: 30rpx;
  99. display: flex;
  100. align-items: center;
  101. justify-content: center;
  102. image {
  103. width: 40rpx;
  104. height: 40rpx;
  105. margin-right: 10rpx;
  106. }
  107. }
  108. }
  109. </style>