down.vue 5.3 KB

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