cm-seller-modal.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <view class="seller-card" v-if="sellerUserId !== 0">
  3. <view class="seller-card-mine" v-if="!modal" @click="modal=true"></view>
  4. <tui-modal class="sellerMode" @click="handleClick" @cancel="hideModal" :show="modal" custom>
  5. <view class="tui-modal-custom">
  6. <view class="close" @click="modal=false">
  7. <image src="https://static.caimei365.com/app/img/supplier-login/close.png" style="width: 100%;height: 100%;" mode=""></image>
  8. </view>
  9. <view class="card" :style="{backgroundImage: `url(${imgUrl})`, backgroundSize: '100% 100%'}">
  10. <view class="logo">
  11. <image src="https://static.caimei365.com/app/img/icon/logo-fanbai.png" mode="" class="titleImgUrl"></image>
  12. </view>
  13. <view class="card-contain">
  14. <view style="display: flex;">
  15. <view class="card-head">
  16. <image src="https://static.caimei365.com/app/img/icon/default-head.png" mode="" class="head"></image>
  17. </view>
  18. <view class="card-info">
  19. <view class="card-info-head">
  20. <view class="card-name">
  21. 未知
  22. </view>
  23. <view class="card-info-tab">
  24. 客户经理
  25. </view>
  26. </view>
  27. <view class="card-info-iphone">
  28. 158-8958-6633
  29. </view>
  30. </view>
  31. </view>
  32. <view class="card-qrcode">
  33. <view class="qrcode-message">
  34. <image :show-menu-by-longpress="true" src="" class="qrcode" mode=""></image>
  35. </view>
  36. <view class="tips">
  37. 长按或扫二维码
  38. 联系我
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </tui-modal>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. props: {
  50. sellerUserId: {
  51. type: Number,
  52. default: 0
  53. }
  54. },
  55. data() {
  56. return {
  57. modal: false,
  58. imgUrl: 'https://static.caimei365.com/app/img/icon/bg-card.png',
  59. }
  60. },
  61. mounted() {
  62. this.initData()
  63. },
  64. methods: {
  65. handleClick() {},
  66. hideModal() {
  67. this.modal = false
  68. },
  69. initData() {
  70. if(this.sellerUserId > 0) {
  71. this.modal = true
  72. }
  73. },
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .seller-card-mine {
  79. position: fixed;
  80. right: 20rpx;
  81. width: 80rpx;
  82. height: 80rpx;
  83. border: 1px solid;
  84. z-index: 99;
  85. bottom: 500rpx;
  86. border-radius: 50%;
  87. }
  88. .tui-modal-custom {
  89. .close {
  90. position: fixed;
  91. right: -20px;
  92. top: -200rpx;
  93. width: 60rpx;
  94. height: 60rpx;
  95. }
  96. }
  97. .card {
  98. position: fixed;
  99. left: -34rpx;
  100. top: -150%;
  101. width: 702rpx;
  102. height: 340rpx;
  103. background: #FF5B00;
  104. border-radius: 16rpx;
  105. opacity: 1;
  106. margin: 0 auto;
  107. box-sizing: border-box;
  108. padding: 16rpx 32rpx;
  109. .titleImgUrl {
  110. width: 241rpx;
  111. height: 80rpx;
  112. }
  113. .card-contain {
  114. display: flex;
  115. align-items: center;
  116. justify-content: space-between;
  117. .head {
  118. width: 128rpx;
  119. height: 128rpx;
  120. border-radius: 50%;
  121. object-fit: contain;
  122. }
  123. .card-info {
  124. height: 128rpx;
  125. margin-left: 30rpx;
  126. }
  127. .card-info-head {
  128. display: flex;
  129. align-items: center;
  130. margin-bottom: 13rpx;
  131. .card-name {
  132. color: #FFFFFF;
  133. font-size: 40rpx;
  134. font-weight: bold;
  135. }
  136. .card-info-tab {
  137. width: 88rpx;
  138. height: 31rpx;
  139. background-color: #FFBB00;
  140. color: #fff;
  141. font-size: 22rpx;
  142. padding: 0 8rpx;
  143. margin-left: 10rpx;
  144. }
  145. }
  146. .card-info-iphone {
  147. color: #FFFFFF;
  148. font-size: 28rpx;
  149. }
  150. .card-qrcode {
  151. .qrcode {
  152. width: 126rpx;
  153. height: 126rpx;
  154. object-fit: contain;
  155. margin-bottom: 6rpx;
  156. }
  157. .tips {
  158. font-size: 18rpx;
  159. color: #fff;
  160. text-align: center;
  161. width: 126rpx;
  162. line-height: 24rpx;
  163. }
  164. }
  165. }
  166. }
  167. </style>