index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view :style="viewColor">
  3. <view class="guaranee_tel">
  4. <view class="popup" :class="{ on: isGuarantee }">
  5. <view class="title">保障说明<text class="iconfont icon-guanbi" @click="close"></text></view>
  6. <view v-if="guarantee.length" class="content">
  7. <view v-for="(item,index) in guarantee" class="item">
  8. <view class="name"><image :src='item.image' class="image"></image>{{item.guarantee_name}}</view>
  9. <view class="info" style="white-space: pre-line;">{{item.guarantee_info}}</view>
  10. </view>
  11. </view>
  12. <button @tap="close">确定</button>
  13. </view>
  14. <view class="popup" :class="{ on: isShipping }">
  15. <view class="title">运费说明<text class="iconfont icon-guanbi" @click="close"></text></view>
  16. <view class="content" style="white-space: pre-line;">
  17. {{shipping}}
  18. </view>
  19. <button @tap="close">确定</button>
  20. </view>
  21. </view>
  22. <view class='mask' catchtouchmove="true" :hidden='showMask==false' @tap='close'></view>
  23. </view>
  24. </template>
  25. <script>
  26. // +----------------------------------------------------------------------
  27. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  28. // +----------------------------------------------------------------------
  29. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  30. // +----------------------------------------------------------------------
  31. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  32. // +----------------------------------------------------------------------
  33. // | Author: CRMEB Team <admin@crmeb.com>
  34. // +----------------------------------------------------------------------
  35. import { mapGetters } from "vuex";
  36. export default {
  37. props: {
  38. shipping: {
  39. type: String,
  40. },
  41. guarantee: {
  42. type: Array,
  43. }
  44. },
  45. computed: mapGetters(['viewColor']),
  46. data() {
  47. return {
  48. isShipping: false,
  49. isGuarantee: false,
  50. showMask: false,
  51. }
  52. },
  53. watch: {
  54. },
  55. onLoad(option) {
  56. },
  57. onShow(){
  58. },
  59. methods: {
  60. showShippingTel() {
  61. this.isShipping = true;
  62. this.showMask = true;
  63. },
  64. showGuaranteeTel() {
  65. this.isGuarantee = true;
  66. this.showMask = true;
  67. },
  68. close: function() {
  69. this.isShipping = false;
  70. this.isGuarantee = false;
  71. this.showMask = false;
  72. }
  73. }
  74. }
  75. </script>
  76. <style scoped lang="scss">
  77. .guaranee_tel{
  78. position: fixed;
  79. bottom: 0;
  80. width: 100%;
  81. left: 0;
  82. background-color: #fff;
  83. z-index: 300;
  84. border-radius: 16rpx 16rpx 0 0;
  85. padding-bottom: 20rpx;
  86. transform: translate3d(0, 100%, 0);
  87. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  88. }
  89. .guaranee_tel.on {
  90. transform: translate3d(0, 0, 0);
  91. }
  92. .guaranee_tel .title {
  93. font-size: 32rpx;
  94. font-weight: bold;
  95. text-align: center;
  96. height: 123rpx;
  97. line-height: 123rpx;
  98. position: relative;
  99. }
  100. .guaranee_tel .title .iconfont {
  101. position: absolute;
  102. right: 30rpx;
  103. color: #8a8a8a;
  104. font-size: 35rpx;
  105. }
  106. .popup {
  107. position: fixed;
  108. bottom: 0;
  109. left: 0;
  110. z-index: 99;
  111. width: 100%;
  112. padding-bottom: 40rpx;
  113. border-top-left-radius: 16rpx;
  114. border-top-right-radius: 16rpx;
  115. background-color: #F5F5F5;
  116. overflow: hidden;
  117. transform: translateY(100%);
  118. transition: 0.3s;
  119. }
  120. .popup.on {
  121. transform: translateY(0);
  122. }
  123. .popup .title {
  124. position: relative;
  125. height: 137rpx;
  126. font-size: 32rpx;
  127. line-height: 137rpx;
  128. text-align: center;
  129. }
  130. .popup scroll-view {
  131. height: 466rpx;
  132. padding-right: 30rpx;
  133. padding-left: 30rpx;
  134. box-sizing: border-box;
  135. }
  136. .popup .icon-guanbi {
  137. position: absolute;
  138. top: 50%;
  139. right: 30rpx;
  140. z-index: 2;
  141. transform: translateY(-50%);
  142. font-size: 30rpx;
  143. color: #707070;
  144. cursor: pointer;
  145. }
  146. .popup .content{
  147. padding: 0 50rpx;
  148. color: #999999;
  149. max-height: 800rpx;
  150. overflow-y: scroll;
  151. .item{
  152. margin-bottom: 70rpx;
  153. }
  154. .image{
  155. width: 30rpx;
  156. height: 30rpx;
  157. margin-right: 20rpx;
  158. position: relative;
  159. top: 4rpx;
  160. }
  161. .name{
  162. color: #282828;
  163. flex: 1;
  164. overflow: hidden;
  165. white-space: nowrap;
  166. text-overflow: ellipsis;
  167. }
  168. .info{
  169. margin-top: 15rpx;
  170. }
  171. }
  172. .popup button {
  173. height: 86rpx;
  174. border-radius: 43rpx;
  175. margin-right: 30rpx;
  176. margin-left: 30rpx;
  177. background-image: linear-gradient(to right, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);;
  178. font-size: 30rpx;
  179. line-height: 86rpx;
  180. color: #FFFFFF;
  181. margin-top: 80rpx;
  182. }
  183. .popup .text .acea-row {
  184. display: inline-flex;
  185. max-width: 100%;
  186. }
  187. .popup .label {
  188. width: 56rpx;
  189. height: 28rpx;
  190. border: 1px solid #E93323;
  191. margin-left: 18rpx;
  192. font-size: 20rpx;
  193. line-height: 26rpx;
  194. text-align: center;
  195. color: #E93323;
  196. }
  197. .popup .type {
  198. width: 124rpx;
  199. height: 42rpx;
  200. margin-top: 14rpx;
  201. background-color: #FCF0E0;
  202. font-size: 24rpx;
  203. line-height: 42rpx;
  204. text-align: center;
  205. color: #D67300;
  206. }
  207. .popup .type.special {
  208. background-color: #FDE9E7;
  209. color: #E93323;
  210. }
  211. </style>