WxTips.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <div class="wx_tips clear" @click="close">
  3. <div class="bg"></div>
  4. <div class="tips_box">
  5. <div class="clear">
  6. <div class="tips">
  7. 请在菜单中选择浏览器打开,<br />
  8. 以完成支付 <br />
  9. <span> 点击任意位置关闭该提示</span>
  10. </div>
  11. <img class="arrows" src="@/assets/image/arrows.png" alt="" />
  12. </div>
  13. <img
  14. class="tip_img ios"
  15. v-if="isIos"
  16. src="@/assets/image/ios_wx_tips.png"
  17. alt=""
  18. />
  19. <img
  20. class="tip_img android"
  21. v-else
  22. src="@/assets/image/android_wx_tips.png"
  23. alt=""
  24. />
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. import { mapActions } from "vuex";
  30. export default {
  31. name: "WxTips",
  32. components: {},
  33. data() {
  34. return {
  35. isIos: this.$utils.isiOS(),
  36. };
  37. },
  38. computed: {},
  39. watch: {},
  40. created() {},
  41. mounted() {},
  42. methods: {
  43. ...mapActions(["wxTipsAction"]),
  44. close() {
  45. this.wxTipsAction(false);
  46. },
  47. },
  48. };
  49. </script>
  50. <style lang='less' scoped>
  51. .wx_tips {
  52. .bg {
  53. position: fixed;
  54. top: 0;
  55. left: 0;
  56. right: 0;
  57. bottom: 0;
  58. background-color: #f4f3f8;
  59. }
  60. .tips_box {
  61. position: relative;
  62. z-index: 10;
  63. }
  64. .tips {
  65. line-height: 70 / @rem;
  66. margin-right: 90 / @rem;
  67. margin-top: 120 / @rem;
  68. float: right;
  69. text-align: left;
  70. color: #3b3b3d;
  71. span {
  72. font-size: 40 / @rem;
  73. color: #ca0000;
  74. }
  75. }
  76. .arrows {
  77. width: 90 / @rem;
  78. position: absolute;
  79. right: 20 / @rem;
  80. top: 20 / @rem;
  81. }
  82. .tip_img {
  83. width: 300 / @rem;
  84. }
  85. .android {
  86. width: 320 / @rem;
  87. }
  88. }
  89. // 横屏
  90. @media screen and (orientation: landscape),
  91. /**竖屏 */ all and (orientation: portrait) and (min-width: 600px) and (min-height: 800px),
  92. /**ipad */ all and (min-device-aspect-ratio: 3/4) and (max-device-aspect-ratio: 4/3),
  93. all and (device-aspect-ratio: 4/3) {
  94. .wx_tips {
  95. .tips {
  96. line-height: 35 / @rem;
  97. margin-right: 45 / @rem;
  98. margin-top: 60 / @rem;
  99. span {
  100. font-size: 20 / @rem;
  101. }
  102. }
  103. .arrows {
  104. width: 45 / @rem;
  105. right: 20 / @rem;
  106. top: 10 / @rem;
  107. }
  108. .tip_img {
  109. width: 150 / @rem;
  110. }
  111. .android {
  112. width: 160 / @rem;
  113. }
  114. }
  115. }
  116. </style>