down.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="bg">
  3. <!-- <navbar backColor="#fff" :config="config"></navbar> -->
  4. <!-- v-if="showHint" -->
  5. <view class="view-alert" v-if="showHint">
  6. <view class="alert-text">
  7. 点击右上角按钮,然后在弹出的菜单中,点击在浏览器中打开,即可下载安装
  8. </view>
  9. <image class="alert-arrow" src="../static/alert-arrow.png" mode="aspectFit"></image>
  10. </view>
  11. <view class="top-box">
  12. <image src="/static/down/downApps.png" mode="aspectFit" class="logo"></image>
  13. </view>
  14. <view class="btn-row">
  15. <button class="btn" @click="downLoad(0)">
  16. <image src="/static/login/btn_01.png" mode="aspectFit" class="logo"></image>
  17. <text>安卓下载</text>
  18. </button>
  19. <button class="btn" @click="downLoad(1)">
  20. <image src="/static/login/btn_02.png" mode="aspectFit" class="logo"></image>
  21. <text>IOS下载</text>
  22. </button>
  23. <!-- <view class="" style="width: 100%; height: 30rpx;">
  24. </view> -->
  25. <button class="btn pdr0" @click.stop="onWeChat()">
  26. <image src="/static/login/btn_03.png" mode="aspectFit" class="logo"></image>
  27. <text>宜格服务小程序</text>
  28. </button>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data() {
  35. return {
  36. config: {
  37. back: true, //false是tolbar页面 是则不写
  38. title: '"宜格服务"懂宜昌,更懂你!',
  39. color: "#1A1A1A",
  40. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  41. backgroundColor: [1, "#fff"],
  42. statusBarFontColor: "#1A1A1A",
  43. },
  44. appInfo: null,
  45. showHint: false
  46. };
  47. },
  48. onLoad(options) {
  49. // const ua = navigator.userAgent.toLowerCase()
  50. // const isWeixin = ua.indexOf('micromessenger') != -1;
  51. // this.showHint = isWeixin
  52. },
  53. methods: {
  54. getData(type) {
  55. this.$http.get("/app/version/newest", {
  56. type: type
  57. }).then((res) => {
  58. if (res && res.data && res.code == 200) {
  59. window.location.href = res.data.downloadLink
  60. } else {
  61. this.$mUtil.toast("暂无下载地址")
  62. }
  63. });
  64. },
  65. downLoad(type) {
  66. const ua = navigator.userAgent.toLowerCase()
  67. const isWeixin = ua.indexOf('micromessenger') != -1;
  68. if(isWeixin){
  69. this.showHint = isWeixin;
  70. uni.pageScrollTo({
  71. scrollTop:0
  72. })
  73. }else{
  74. this.getData(type)
  75. }
  76. },
  77. onWeChat() {
  78. location.href='weixin://dl/business/?appid=wxe67b047223bd1446&path=pages/homeQX/index'
  79. },
  80. },
  81. };
  82. </script>
  83. <style>
  84. page {
  85. width: 750rpx;
  86. min-height: 100vh;
  87. overflow: hidden;
  88. }
  89. </style>
  90. <style lang='scss' scopd>
  91. * {
  92. padding: 0;
  93. margin: 0;
  94. }
  95. .view-alert {
  96. /* position: absolute;
  97. left: 0;
  98. top: 0;
  99. z-index: 9; */
  100. width: 750rpx;
  101. background: rgb(52, 52, 52);
  102. margin-left: 0px;
  103. margin-right: 0px;
  104. padding: 60rpx 30rpx 60rpx 60rpx;
  105. box-shadow: rgba(22, 22, 23, 0.62) 0px -10px 16px inset;
  106. display: flex;
  107. justify-content: space-between;
  108. align-items: stretch;
  109. box-sizing: border-box;
  110. .alert-text {
  111. flex: 1;
  112. color: #7f7e7e;
  113. font-weight: 400 !important;
  114. padding-right: 60rpx;
  115. line-height: 1.5;
  116. }
  117. .alert-arrow {
  118. flex-shrink: 0;
  119. width: 60rpx;
  120. height: 60rpx;
  121. margin-top: -30rpx;
  122. }
  123. }
  124. .bg {
  125. width: 100%;
  126. min-height: 100vh;
  127. background: url('../static/down/downBG.png') no-repeat top center;
  128. background-size: 100% 100%;
  129. padding-bottom: 118rpx;
  130. }
  131. .top-box {
  132. /* position: absolute;
  133. display: flex;
  134. width: 100%;
  135. align-items: center;
  136. justify-content: center;
  137. top: 400rpx;
  138. left: 50%;
  139. transform: translateX(-50%); */
  140. /* margin: 117rpx auto; */
  141. padding: 117rpx 74px 0 44rpx;
  142. width: 632rpx;
  143. .logo {
  144. width: 632rpx;
  145. height: 993rpx;
  146. }
  147. }
  148. .btn-row {
  149. display: flex;
  150. width: 100%;
  151. justify-content: space-around;
  152. flex-direction: column;
  153. align-items: center;
  154. /* position: fixed; */
  155. /*
  156. bottom: 400rpx;
  157. left: 50%;
  158. transform: translateX(-50%); */
  159. .btn {
  160. border-radius: 60rpx;
  161. width: 401rpx;
  162. height: 97rpx;
  163. background: linear-gradient(189deg, #a7f4ff 0%, #45e3ff 100%), #edf4fc;
  164. border-radius: 20rpx;
  165. margin-top: 49rpx;
  166. display: flex;
  167. align-items: center;
  168. /* justify-content: center; */
  169. font-family: AlimamaShuHeiTi, AlimamaShuHeiTi-Bold;
  170. font-weight: 700;
  171. color: #333333;
  172. padding: 0 34rpx 0 54rpx;
  173. image {
  174. flex-shrink: 0;
  175. width: 60rpx;
  176. height: 60rpx;
  177. /* margin-right: 10rpx; */
  178. }
  179. text {
  180. flex: 1;
  181. text-align: center;
  182. }
  183. }
  184. }
  185. .pdr0{
  186. padding-right: 0 !important;
  187. }
  188. </style>