hint.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <uni-popup ref="hintRef" :isMaskClick='true' type="center" border-radius="10px 10px 0 0"
  3. maskBackgroundColor='rgba(0, 0, 0, 0.1)'>
  4. <view class="hint-box">
  5. <view class="hint-title">服务声明</view>
  6. <view class="hint-val">
  7. 尊敬的市民朋友,您好!【武汉公安政务服务地图】正在试运行中,如有任何疑问和建议,欢迎致电武汉公安政务服务专线027-85395115。
  8. </view>
  9. <view class="hint-btns" @click.stop="onClose()">
  10. <view class="hint-btn">关闭</view>
  11. </view>
  12. </view>
  13. </uni-popup>
  14. </template>
  15. <script>
  16. import { PhoneCall } from "@/utils/tool.js";
  17. export default {
  18. data() {
  19. return {
  20. hintList: []
  21. }
  22. },
  23. created() {
  24. },
  25. mounted() {
  26. this.cheackShow();
  27. },
  28. methods: {
  29. cheackShow() {
  30. try {
  31. const a = uni.getStorageSync('showHint');
  32. if (!a) {
  33. this.open()
  34. }
  35. } catch (e) {
  36. this.open()
  37. }
  38. },
  39. open() {
  40. this.$refs.hintRef.open()
  41. try {
  42. uni.setStorageSync('showHint', true);
  43. } catch (e) {
  44. // error
  45. }
  46. },
  47. onPhoneCall(phone) {
  48. PhoneCall(phone).then(res => {
  49. this.onClose()
  50. })
  51. },
  52. onClose() {
  53. this.$refs.hintRef.close()
  54. this.hintList = [];
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .uni-popup {
  61. z-index: 1002;
  62. .hint-box {
  63. width: 80vw;
  64. min-height: 30vh;
  65. height: auto;
  66. max-height: 70vh;
  67. background-color: #fff;
  68. border-radius: 20rpx;
  69. display: flex;
  70. flex-direction: column;
  71. // justify-content: center;
  72. align-items: center;
  73. justify-content: space-between;
  74. .hint-title {
  75. font-size: 36rpx;
  76. padding: 20rpx 0;
  77. }
  78. .hint-val {
  79. height: 1px;
  80. flex: 1;
  81. padding: 20rpx 30rpx;
  82. color: #6F6F6F;
  83. }
  84. .hint-btns {
  85. padding: 20rpx 0;
  86. .hint-btn {
  87. width: 260rpx;
  88. height: 80rpx;
  89. display: flex;
  90. justify-content: center;
  91. align-items: center;
  92. color: #fff;
  93. border-radius: 10rpx;
  94. background-color: #3291F8;
  95. }
  96. }
  97. }
  98. }
  99. </style>