app-permissions-auth.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view v-if='isShow' class="permissions show bt">
  3. <view class="permissions-bg"></view>
  4. <view class="permissions-pic main-center">
  5. <view class="info-model cross-center dir-top-nowrap">
  6. <view class="order-title">提示</view>
  7. <view class="info-box dir-left-nowrap cross-center">
  8. {{text}}
  9. </view>
  10. <view class="info-end dir-left-nowrap cross-center">
  11. <view @click='cancel' class="box-grow-1 main-center cross-center">取消</view>
  12. <view class="box-grow-0 info-line"></view>
  13. <view class="box-grow-1 red main-center cross-center">
  14. <button @click='cancel' open-type="openSetting" class="btn">去设置</button>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'app-permissions-auth',
  24. data() {
  25. return {}
  26. },
  27. props: {
  28. isShow: {
  29. type: Boolean,
  30. default: false,
  31. },
  32. text: {
  33. type: String,
  34. default: '请在设置中打开相应权限',
  35. }
  36. },
  37. methods: {
  38. cancel() {
  39. this.$emit('cancel', false);
  40. },
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .permissions {
  46. position: fixed;
  47. left: 0;
  48. top: 0;
  49. width: 100%;
  50. height: 100%;
  51. z-index: 1000;
  52. transition: 200ms;
  53. }
  54. .permissions.show {
  55. visibility: visible;
  56. opacity: 1;
  57. }
  58. .permissions.bt {
  59. -webkit-animation-name: fadeIn; /*动画名称*/
  60. -webkit-animation-duration: 0.25s; /*动画持续时间*/
  61. -webkit-animation-iteration-count: 1; /*动画次数*/
  62. -webkit-animation-delay: 0s; /*延迟时间*/
  63. }
  64. .permissions .permissions-bg {
  65. background: rgba(0, 0, 0, 0.8);
  66. position: fixed;
  67. left: 0;
  68. top: 0;
  69. width: 100%;
  70. height: 100%;
  71. z-index: 1;
  72. }
  73. .permissions .permissions-pic {
  74. position: fixed;
  75. left: 0;
  76. top: #{188rpx};
  77. width: 100%;
  78. height: 100%;
  79. z-index: 1;
  80. }
  81. .permissions .permissions-close image {
  82. width: #{50rpx};
  83. height: #{50rpx};
  84. margin-top: #{50rpx};
  85. }
  86. .permissions .info-model {
  87. height: #{360rpx};
  88. width: #{620rpx};
  89. background: #fff;
  90. border-radius: #{16rpx};
  91. }
  92. .permissions .order-title {
  93. margin: #{48rpx} 0
  94. }
  95. .permissions .place {
  96. color: #cdcdcd
  97. }
  98. .permissions .info-box {
  99. height: #{88rpx};
  100. margin-bottom: #{48rpx};
  101. padding: 0 60rpx;
  102. }
  103. .permissions .info-input {
  104. font-size: #{32rpx};
  105. color: #353535;
  106. }
  107. .permissions .info-line {
  108. height: #{32rpx} !important;
  109. width: 1px !important;
  110. background: #e2e2e2;
  111. }
  112. .permissions .info-end {
  113. color: #666666;
  114. height: #{88rpx};
  115. font-size: #{32rpx};
  116. border-top: #{1rpx} solid #e2e2e2;
  117. width: 100%;
  118. }
  119. .permissions .info-end view {
  120. height: 100%;
  121. width: 100%;
  122. }
  123. button::after {
  124. border: none;
  125. content: '';
  126. }
  127. .btn {
  128. border: none;
  129. padding: 0;
  130. background-color: #fff;
  131. font-size: 32#{rpx};
  132. color: $uni-general-color-one;
  133. }
  134. </style>