down.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <view class="page">
  3. <view class="header">
  4. <view class="left">
  5. <!-- <image class="img" mode="widthFix" src="../../static/login/close.png"></image> -->
  6. </view>
  7. </view>
  8. <view class="tbody">
  9. <image style="margin-top: 50rpx;height: 120rpx;" src="../../static/me/img_checkMark.png" mode="heightFix" />
  10. <text style="margin-top: 68rpx;color:#FFFFFF;font-size: 28rpx;">下载APP,遇见更好的TA!</text>
  11. <text class="btn_submit" @click="toDown">下载APP</text>
  12. </view>
  13. <view class="pop_mask" v-if="show_mask">
  14. <view class="body">
  15. <image class="clickT" src="http://c.yujianmate.com/images/v1/wx_mask.png" mode="widthFix" />
  16. </view>
  17. </view>
  18. <view class="blankHeight"></view>
  19. <!-- 提示框 -->
  20. <DialogBox ref="DialogBox"></DialogBox>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. components: {},
  26. data() {
  27. return {
  28. title: '',
  29. show_mask: false,
  30. }
  31. },
  32. onLoad(params) {
  33. this.ycode = params.ycode || '999999';
  34. },
  35. onShow() {},
  36. methods: {
  37. onBack() {},
  38. toDown() {
  39. var browser = {
  40. versions: function() {
  41. var u = navigator.userAgent,
  42. app = navigator.appVersion;
  43. return { //移动终端浏览器版本信息
  44. trident: u.indexOf('Trident') > -1, //IE内核
  45. presto: u.indexOf('Presto') > -1, //opera内核
  46. webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
  47. gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
  48. mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
  49. ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
  50. android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
  51. iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
  52. iPad: u.indexOf('iPad') > -1, //是否iPad
  53. webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
  54. };
  55. }(),
  56. language: (navigator.browserLanguage || navigator.language).toLowerCase()
  57. };
  58. if (this.is_show_mask()) {
  59. this.show_mask = true;
  60. } else {
  61. if (browser.versions.mobile && browser.versions.ios) {
  62. location.href = "https://e.yujianmate.com/web/";
  63. } else {
  64. location.href = "https://e.yujianmate.com/app/web3.0.apk";
  65. }
  66. }
  67. },
  68. is_show_mask() {
  69. var ua = navigator.userAgent.toLowerCase();
  70. if (ua.match(/MicroMessenger/i) == "micromessenger") {
  71. return true;
  72. } else if ((/(iPhone|iPad|iPod|iOS)/i.test(ua) && /\sQQ/i.test(ua)) || (/(Android)/i.test(ua) &&
  73. /MQQBrowser/i.test(ua) && /\sQQ/i.test((ua).split('MQQBrowser')))) {
  74. return true;
  75. }
  76. return false;
  77. }
  78. }
  79. }
  80. </script>
  81. <style scoped lang="scss">
  82. @import 'down.scss';
  83. </style>