fortuneInfo.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <view class="fortune_info_box pt10">
  3. <view class="fortune_info flx-justify-between pl30 pr30">
  4. <view class="fortune_info_left flx-align-center">
  5. <view class="fortune_info_l_l">
  6. <view class="fortune_info_l_l_image">
  7. <up-avatar :src="iconAvatar" size="143.25rpx"></up-avatar>
  8. <!-- <view class="info_l_l_image_icon"></view> -->
  9. </view>
  10. <view class="fortune_info_l_l_but">切换</view>
  11. </view>
  12. <view class="ml30 fortune_info_l_r">
  13. <view class="fortune_info_l_r_t">天秤座</view>
  14. <view class="fortune_info_l_r_b">9.23 - 10.23</view>
  15. </view>
  16. </view>
  17. <view class="fortune_info_right">
  18. <view class="fortune_info_r_t">今日运势</view>
  19. <view class="fortune_info_r_b">76</view>
  20. </view>
  21. </view>
  22. <view class="fortune_info_list pb10">
  23. <view class="fortune_info_item">
  24. <view class="fortune_info_item_box">
  25. <text class="fortune_info_item_box_text">金星</text>
  26. </view>
  27. <text class="fortune_info_text">守护星系</text>
  28. </view>
  29. <view class="fortune_info_item">
  30. <view class="fortune_info_item_box">
  31. <text class="fortune_info_item_box_text">珊瑚<br/>琥珀</text>
  32. </view>
  33. <text class="fortune_info_text">适配珠宝</text>
  34. </view>
  35. <view class="fortune_info_item">
  36. <view class="fortune_info_item_box">
  37. <text class="fortune_info_item_box_text">5</text>
  38. </view>
  39. <text class="fortune_info_text">幸运数字</text>
  40. </view>
  41. <view class="fortune_info_item">
  42. <view class="fortune_info_item_box">
  43. <view class="item_box_icon"></view>
  44. <text class="fortune_info_item_box_text">红色</text>
  45. </view>
  46. <text class="fortune_info_text">幸运颜色</text>
  47. </view>
  48. <view class="fortune_info_item">
  49. <view class="fortune_info_item_box">
  50. <text class="fortune_info_item_box_text">处女座</text>
  51. </view>
  52. <text class="fortune_info_text">速配星座</text>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script setup>
  58. import {
  59. ref,
  60. onMounted
  61. } from 'vue';
  62. import {
  63. onShow
  64. } from "@dcloudio/uni-app";
  65. // 引入组件
  66. const iconAvatar = 'https://img.js.design/assets/img/65b211c3cdb6ea326421fd30.png#1f90f33c2d7b53402d0afbebb090d9b4'
  67. // 定义变量内容
  68. // 生命中期
  69. onMounted(() => {
  70. console.log('onMounted生命周期')
  71. })
  72. </script>
  73. <style lang="scss" scoped>
  74. @import '@/static/css/common.scss';
  75. .fortune_info_box {
  76. .fortune_info {
  77. .fortune_info_left {
  78. .fortune_info_l_l {
  79. position: relative;
  80. .fortune_info_l_l_image {
  81. border-radius: 50%;
  82. width: 143.25rpx;
  83. height: 143.01rpx;
  84. background-color: $active-color;
  85. position: relative;
  86. &::before,
  87. &::after {
  88. content: '';
  89. position: absolute;
  90. border-radius: 50%;
  91. }
  92. &::after {
  93. top: -4rpx;
  94. left: -4rpx;
  95. border: 4rpx solid #6BA9FE;
  96. width: 100%;
  97. height: 100%;
  98. }
  99. &::before {
  100. top: -8rpx;
  101. left: -8rpx;
  102. border: 4rpx solid #973BFE;
  103. width: calc(100% + 8rpx);
  104. height: calc(100% + 8rpx);
  105. }
  106. .info_l_l_image_icon {
  107. background-size: 100% 100%;
  108. position: absolute;
  109. top: 50%;
  110. left: 50%;
  111. transform: translate(-50%, -50%);
  112. }
  113. }
  114. .fortune_info_l_l_but {
  115. position: absolute;
  116. bottom: -15rpx;
  117. left: 50%;
  118. transform: translateX(-50%);
  119. background-color: #000;
  120. color: #fff;
  121. border-radius: 50rpx;
  122. width: 70rpx;
  123. height: 40rpx;
  124. line-height: 40rpx;
  125. font-size: 22rpx;
  126. text-align: center;
  127. }
  128. }
  129. .fortune_info_l_r {
  130. .fortune_info_l_r_t {
  131. font-size: 32rpx;
  132. font-weight: 600;
  133. color: rgba(0, 0, 0, 1);
  134. }
  135. .fortune_info_l_r_b {
  136. font-size: 24rpx;
  137. color: rgba(0, 0, 0, 1);
  138. margin-top: 10rpx;
  139. }
  140. }
  141. }
  142. .fortune_info_right {
  143. display: flex;
  144. flex-direction: column;
  145. justify-content: center;
  146. align-items: center;
  147. margin-right: 30rpx;
  148. .fortune_info_r_t {
  149. font-size: 20rpx;
  150. color: rgba(0, 0, 0, 1);
  151. }
  152. .fortune_info_r_b {
  153. font-size: 48rpx;
  154. font-weight: 400;
  155. letter-spacing: 0rpx;
  156. line-height: 63.64rpx;
  157. color: rgba(0, 0, 0, 1);
  158. }
  159. }
  160. }
  161. .fortune_info_list{
  162. display: flex;
  163. align-items: center;
  164. justify-content: space-between;
  165. padding: 0 60rpx;
  166. box-sizing: border-box;
  167. margin-top: 60rpx;
  168. .fortune_info_item{
  169. width: calc(100% / 5);
  170. display: flex;
  171. align-items: center;
  172. justify-content: center;
  173. flex-direction: column;
  174. .fortune_info_item_box{
  175. width: 116rpx;
  176. height: 116rpx;
  177. border-radius: 40rpx;
  178. background: rgba(255, 255, 255, 0.47);
  179. border: 2rpx solid rgba(175, 242, 253, 1);
  180. display: flex;
  181. align-items: center;
  182. justify-content: center;
  183. flex-direction: column;
  184. .item_box_icon{
  185. width: 60%;
  186. height: 10rpx;
  187. border-radius: 50rpx;
  188. background-color: red;
  189. margin-bottom: 10rpx;
  190. }
  191. .fortune_info_item_box_text{
  192. font-size: 28rpx;
  193. font-weight: 500;
  194. letter-spacing: 0rpx;
  195. line-height: 37.12rpx;
  196. color: rgba(122, 221, 230, 1);
  197. }
  198. }
  199. .fortune_info_text{
  200. width: 100%;
  201. font-size: 24rpx;
  202. margin-top: 4rpx;
  203. text-align: center;
  204. color: rgba(145, 145, 145, 1);
  205. }
  206. }
  207. }
  208. }
  209. </style>