index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <!-- 保障声明 -->
  3. <view>
  4. <view class="ensure" :class="ensureInfo.show === true ? 'on' : ''">
  5. <view class="title">保障声明<text class="iconfont icon-guanbi5" @click="closeEnsure"></text></view>
  6. <view class="list">
  7. <view class="item acea-row" v-for="(item,index) in ensureInfo.ensure" :key="index">
  8. <view class="pictrue">
  9. <image :src="item.image"></image>
  10. </view>
  11. <view class="text">
  12. <view class="name">{{item.name}}</view>
  13. <view>{{item.desc}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="bnt" @click="closeEnsure">完成</view>
  18. <slot name="bottom"></slot>
  19. </view>
  20. <view class="mask" @touchmove.prevent :hidden="ensureInfo.show === false" @click="closeEnsure"></view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. props: {
  26. ensureInfo: {
  27. type: Object,
  28. default: () => {}
  29. },
  30. },
  31. data() {
  32. return {};
  33. },
  34. mounted() {},
  35. methods: {
  36. closeEnsure(){
  37. this.$emit('myevent');
  38. }
  39. }
  40. }
  41. </script>
  42. <style scoped lang="scss">
  43. .ensure{
  44. position: fixed;
  45. bottom: 0;
  46. width: 100%;
  47. left: 0;
  48. background-color: #fff;
  49. z-index: 280;
  50. border-radius: 16rpx 16rpx 0 0;
  51. transform: translate3d(0, 100%, 0);
  52. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  53. padding-bottom: 22rpx;
  54. padding-bottom: calc(22rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  55. padding-bottom: calc(22rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  56. .title{
  57. font-size: 32rpx;
  58. color: #282828;
  59. text-align: center;
  60. margin: 38rpx 0 36rpx 0;
  61. position: relative;
  62. .iconfont{
  63. position: absolute;
  64. right: 30rpx;
  65. top:0;
  66. font-size: 36rpx;
  67. }
  68. }
  69. .list{
  70. height: 750rpx;
  71. margin: 0 30rpx;
  72. overflow-x: hidden;
  73. overflow-y: auto;
  74. .item{
  75. margin-bottom: 52rpx;
  76. .pictrue{
  77. width: 36rpx;
  78. height: 36rpx;
  79. border-radius: 50%;
  80. margin-right: 30rpx;
  81. image{
  82. width: 100%;
  83. height: 100%;
  84. border-radius: 50%;
  85. }
  86. }
  87. .text{
  88. width: 618rpx;
  89. color: #999999;
  90. font-size: 28rpx;
  91. .name{
  92. color: #333333;
  93. font-weight: bold;
  94. margin-bottom: 20rpx;
  95. }
  96. }
  97. }
  98. }
  99. .bnt{
  100. width: 690rpx;
  101. height: 86rpx;
  102. text-align: center;
  103. line-height: 86rpx;
  104. border-radius: 43rpx;
  105. background-color: var(--view-theme);
  106. font-size: 30rpx;
  107. color: #fff;
  108. margin: 0 auto;
  109. }
  110. }
  111. .ensure.on{
  112. transform: translate3d(0, 0, 0);
  113. }
  114. </style>