down.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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. <!-- <wx-open-launch-weapp username="gh_9b86ebba08b0" path="pages/homeQX/index" >宜格服务小程序</wx-open-launch-weapp> -->
  26. <button class="btn" @click.stop="onWeChat()">
  27. <image src="/static/login/btn_03.png" mode="aspectFit" class="logo"></image>
  28. <text>宜格服务小程序</text>
  29. </button>
  30. </view>
  31. </view>
  32. </template>
  33. <!-- <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> -->
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. config: {
  39. back: true, //false是tolbar页面 是则不写
  40. title: '"宜格服务"懂宜昌,更懂你!',
  41. color: "#1A1A1A",
  42. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  43. backgroundColor: [1, "#fff"],
  44. statusBarFontColor: "#1A1A1A",
  45. },
  46. appInfo: null,
  47. showHint: false
  48. };
  49. },
  50. onLoad(options) {
  51. const ua = navigator.userAgent.toLowerCase()
  52. const isWeixin = ua.indexOf('micromessenger') != -1;
  53. this.showHint = isWeixin
  54. },
  55. methods: {
  56. getData(type) {
  57. this.$http.get("/app/version/newest", {
  58. type: type
  59. }).then((res) => {
  60. if (res && res.data && res.code == 200) {
  61. window.location.href = res.data.downloadLink
  62. } else {
  63. this.$mUtil.toast("暂无下载地址")
  64. }
  65. });
  66. },
  67. downLoad(type) {
  68. this.getData(type)
  69. // window.location.href = type == 1 ? this.appInfo.android_link : this.appInfo.ios_link;
  70. },
  71. onWeChat() {
  72. console.log("wx = " , wx)
  73. // wx.config({
  74. // // debug: true, // 调试时可开启
  75. // appId: '小程序 AppID', // <!-- replace -->
  76. // timestamp: 0, // 必填,填任意数字即可
  77. // nonceStr: 'nonceStr', // 必填,填任意非空字符串即可
  78. // signature: 'signature', // 必填,填任意非空字符串即可
  79. // jsApiList: ['chooseImage'], // 必填,随意一个接口即可
  80. // openTagList: ['wx-open-launch-weapp'], // 填入打开小程序的开放标签名
  81. // })
  82. },
  83. },
  84. };
  85. </script>
  86. <style>
  87. page {
  88. width: 750rpx;
  89. min-height: 100vh;
  90. overflow: hidden;
  91. }
  92. </style>
  93. <style lang='scss' scopd>
  94. * {
  95. padding: 0;
  96. margin: 0;
  97. }
  98. .view-alert {
  99. /* position: absolute;
  100. left: 0;
  101. top: 0;
  102. z-index: 9; */
  103. width: 750rpx;
  104. background: rgb(52, 52, 52);
  105. margin-left: 0px;
  106. margin-right: 0px;
  107. padding: 60rpx 30rpx 60rpx 60rpx;
  108. box-shadow: rgba(22, 22, 23, 0.62) 0px -10px 16px inset;
  109. display: flex;
  110. justify-content: space-between;
  111. align-items: stretch;
  112. box-sizing: border-box;
  113. .alert-text {
  114. flex: 1;
  115. color: #7f7e7e;
  116. font-weight: 400 !important;
  117. padding-right: 60rpx;
  118. line-height: 1.5;
  119. }
  120. .alert-arrow {
  121. flex-shrink: 0;
  122. width: 60rpx;
  123. height: 60rpx;
  124. margin-top: -30rpx;
  125. }
  126. }
  127. .bg {
  128. width: 100%;
  129. min-height: 100vh;
  130. background: url('../static/down/downBG.png') no-repeat top center;
  131. background-size: 100% 100%;
  132. padding-bottom: 118rpx;
  133. }
  134. .top-box {
  135. /* position: absolute;
  136. display: flex;
  137. width: 100%;
  138. align-items: center;
  139. justify-content: center;
  140. top: 400rpx;
  141. left: 50%;
  142. transform: translateX(-50%); */
  143. /* margin: 117rpx auto; */
  144. padding: 117rpx 74px 0 44rpx;
  145. width: 632rpx;
  146. .logo {
  147. width: 632rpx;
  148. height: 993rpx;
  149. }
  150. }
  151. .btn-row {
  152. display: flex;
  153. width: 100%;
  154. justify-content: space-around;
  155. flex-direction: column;
  156. align-items: center;
  157. /* position: fixed; */
  158. /*
  159. bottom: 400rpx;
  160. left: 50%;
  161. transform: translateX(-50%); */
  162. .btn {
  163. border-radius: 60rpx;
  164. width: 401rpx;
  165. height: 97rpx;
  166. background: linear-gradient(189deg, #a7f4ff 0%, #45e3ff 100%), #edf4fc;
  167. border-radius: 20rpx;
  168. margin-top: 49rpx;
  169. display: flex;
  170. align-items: center;
  171. /* justify-content: center; */
  172. font-family: AlimamaShuHeiTi, AlimamaShuHeiTi-Bold;
  173. font-weight: 700;
  174. color: #333333;
  175. padding: 0 34rpx 0 54rpx;
  176. image {
  177. flex-shrink: 0;
  178. width: 60rpx;
  179. height: 60rpx;
  180. /* margin-right: 10rpx; */
  181. }
  182. text {
  183. flex: 1;
  184. text-align: center;
  185. }
  186. }
  187. }
  188. </style>