down.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. methods: {
  36. getData(type) {
  37. this.$http.get("/app/version/newest", {
  38. type: type
  39. }).then((res) => {
  40. if (res && res.data && res.code == 200) {
  41. window.location.href = res.data.downloadLink
  42. } else {
  43. this.$mUtil.toast("暂无下载地址")
  44. }
  45. });
  46. },
  47. downLoad(type) {
  48. this.getData(type)
  49. // window.location.href = type == 1 ? this.appInfo.android_link : this.appInfo.ios_link;
  50. },
  51. },
  52. };
  53. </script>
  54. <style>
  55. page {
  56. width: 100%;
  57. height: 100%;
  58. }
  59. </style>
  60. <style lang='scss' scopd>
  61. .bg {
  62. width: 100%;
  63. height: 100%;
  64. background: url('../static/bg.png') no-repeat;
  65. background-size: 100% 100%;
  66. }
  67. .top-box {
  68. position: absolute;
  69. display: flex;
  70. width: 100%;
  71. align-items: center;
  72. justify-content: center;
  73. top: 400rpx;
  74. left: 50%;
  75. transform: translateX(-50%);
  76. .logo {
  77. width: 186rpx;
  78. height: 186rpx;
  79. }
  80. }
  81. .btn-row {
  82. position: fixed;
  83. display: flex;
  84. width: 100%;
  85. justify-content: space-around;
  86. flex-direction: column;
  87. align-items: center;
  88. bottom: 400rpx;
  89. left: 50%;
  90. transform: translateX(-50%);
  91. .btn {
  92. border-radius: 60rpx;
  93. width: 80%;
  94. background: #E6E6E6;
  95. color: #30AFB5;
  96. margin-top: 30rpx;
  97. display: flex;
  98. align-items: center;
  99. justify-content: center;
  100. image {
  101. width: 40rpx;
  102. height: 40rpx;
  103. margin-right: 10rpx;
  104. }
  105. }
  106. }
  107. </style>