share_02.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="content" id="share-content" :rise-fall="stocksColor">
  3. <view :class="['share-top' , $setColor(shareVal.profits)]">
  4. <text class="share-currency">{{ shareVal.symbol }}</text>
  5. <text class="share-ratio color">{{ $getChange(shareVal , 1) }}%</text>
  6. <!-- <text class="share-ratio color">{{ shareVal.fact_profits }}%</text> -->
  7. </view>
  8. <view :class="['share-footer' , $setColor(shareVal.profits)]">
  9. <view class="footer-code">
  10. <slot name="qrcode"></slot>
  11. </view>
  12. <view class="footer-content">
  13. <view class="footer-name ">
  14. <text class="name-text">我在币王</text>
  15. <view class="name-box bdColor">
  16. <text class="color">{{ $setColor(shareVal.profits , true) ? '开多盈利了' : '开多亏损了' }}</text>
  17. <text class="color iconfont">&#xe622;</text>
  18. </view>
  19. </view>
  20. <view class="footer-price">
  21. <text>平仓价格</text>
  22. <text class="price">{{ shareVal.origin_price }}</text>
  23. </view>
  24. <view class="footer-price">
  25. <text>开仓均价</text>
  26. <text class="price">{{ shareVal.price }}</text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import {
  34. mapGetters
  35. } from 'vuex'
  36. export default {
  37. props: {
  38. shareVal: {
  39. type: Object,
  40. default: () => {
  41. return {}
  42. }
  43. }
  44. },
  45. computed: {
  46. ...mapGetters([
  47. "stocksColor",
  48. ])
  49. },
  50. data() {
  51. return {
  52. };
  53. },
  54. mounted() {
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .content {
  60. flex-shrink: 0;
  61. width: 100%;
  62. height: 100%;
  63. background: url("@/static/share/img_04.png") no-repeat center center;
  64. background-size: 100% 100%;
  65. position: relative;
  66. .share-top {
  67. position: absolute;
  68. top: 300rpx;
  69. left: 150rpx;
  70. padding: 20rpx 0 0 20rpx;
  71. display: flex;
  72. flex-direction: column;
  73. justify-content: center;
  74. font-family: Bahnschrift, Bahnschrift-Bold;
  75. font-weight: 700;
  76. .share-currency {
  77. font-size: 48rpx;
  78. color: #030102;
  79. }
  80. .share-ratio {
  81. font-size: 68rpx;
  82. color: #ef3c59;
  83. }
  84. }
  85. .share-footer {
  86. position: absolute;
  87. left: 50%;
  88. bottom: 100rpx;
  89. width: 470rpx;
  90. height: 160rpx;
  91. transform: translateX(-50%);
  92. display: flex;
  93. padding: 10rpx 0 0 10rpx;
  94. .footer-code {
  95. width: 140rpx;
  96. height: 140rpx;
  97. padding: 5rpx;
  98. }
  99. .footer-content {
  100. display: flex;
  101. flex-direction: column;
  102. .footer-name {
  103. display: flex;
  104. align-items: center;
  105. .name-text {
  106. font-size: 28rpx;
  107. font-family: PingFang SC, PingFang SC-Regular;
  108. font-weight: 400;
  109. color: #030303;
  110. }
  111. .name-box {
  112. margin-left: 26rpx;
  113. font-size: 22rpx;
  114. font-family: PingFang SC, PingFang SC-Regular;
  115. font-weight: 400;
  116. color: #ef3c59;
  117. min-width: 139rpx;
  118. padding: 0 10rpx;
  119. height: 40rpx;
  120. border: 1rpx solid #ef3c59;
  121. border-radius: 8rpx;
  122. display: flex;
  123. align-items: center;
  124. .iconfont {
  125. font-size: 18rpx;
  126. transform: rotate(90deg);
  127. }
  128. }
  129. }
  130. .footer-price {
  131. font-size: 15rpx;
  132. font-family: PingFang SC, PingFang SC-Regular;
  133. font-weight: 400;
  134. color: #A5A3A4;
  135. padding-top: 10rpx;
  136. .price {
  137. color: #242424;
  138. padding-left: 5px;
  139. }
  140. }
  141. }
  142. // .<view class="footer-code">
  143. // <slot name="qrcode"></slot>
  144. // </view>{}
  145. // <view class="footer-content">
  146. // <view class="footer-name">
  147. // <text class="name-text">我在币王</text>
  148. // <view class="name-box">
  149. // <text>开多亏损了</text>
  150. // <text class="iconfont">&#xe622;</text>
  151. // </view>
  152. // </view>
  153. // <view class="">
  154. // <text>平仓价格</text>
  155. // <text>28387.1</text>
  156. // </view>
  157. // <view class="">
  158. // <text>开仓均价</text>
  159. // <text>28387.1</text>
  160. // </view>
  161. // </view>
  162. }
  163. }
  164. </style>