s-wallet-card.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <!-- 装修用户组件:用户资产 -->
  2. <template>
  3. <view>
  4. <view class="progress-box" @tap="state.showProtocol = true">
  5. <view class="progress-container">
  6. <view class="progress-bar" :style="{ width: progressWidth + '%' }">
  7. <text class="progress-text">身价:36级别 </text>
  8. </view>
  9. </view>
  10. </view>
  11. <!-- <view class="ss-wallet-menu-wrap ss-flex ss-col-center">
  12. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center">
  13. <view class="value-box ">
  14. <view class="value-text ">看点</view>
  15. </view>
  16. <view class="menu-title ss-m-t-15">*888</view>
  17. <view class="menu-title ss-m-t-15">看广告做任务得收益</view>
  18. </view>
  19. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
  20. @tap="sheep.$router.go('/pages/user/wallet/score')">
  21. <view class="value-box ">
  22. <view class="value-text">积分</view>
  23. </view>
  24. <view class="menu-title ss-m-t-15">#{{ userInfo.point || 0 }}</view>
  25. <view class="menu-title ss-m-t-15">=数字人民币:7263</view>
  26. 注释 <view class="menu-title ss-m-t-15">=NFR(数字资产):87263</view>
  27. <view class="menu-mini-title ss-m-t-15">[按32小时市场均值实时换算]</view>
  28. </view>
  29. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
  30. @tap="sheep.$router.go('/pages/user/wallet/team')">
  31. <view class="value-box ">
  32. <view class="value-text">团队</view>
  33. </view>
  34. <view class="menu-title ss-m-t-15">88人</view>
  35. <view class="menu-title ss-m-t-15">直推人今日贡献#92</view>
  36. <view class="menu-title ss-m-t-15">直推人总贡献值#7692</view>
  37. </view>
  38. <view class="menu-item ss-flex-col ss-col-center menu-wallet">
  39. <view class="value-box ">
  40. <view class="value-text">NFR</view>
  41. </view>
  42. <view class="menu-title ss-m-t-15">8734枚</view>
  43. <view class="menu-title ss-m-t-15">历史转换数量</view>
  44. <view class="menu-title ss-m-t-15">点击跳转查看行情</view>
  45. </view>
  46. </view> -->
  47. <view class="ss-wallet-menu-wrap ss-flex ss-col-center">
  48. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
  49. @tap="sheep.$router.go('/pages/user/wallet/score')">
  50. <view class="value-box ">
  51. <view class="value-text">积分</view>
  52. </view>
  53. <view class="menu-title ss-m-t-15">#{{ userInfo.point || 0 }}</view>
  54. <view class=" ss-m-t-15">历史总积分:87263</view>
  55. <view class=" ss-m-t-15">待确权积分:63</view>
  56. </view>
  57. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
  58. @tap="sheep.$router.go('/pages/user/wallet/team')">
  59. <view class="value-box ">
  60. <view class="value-text">团队</view>
  61. </view>
  62. <view class="menu-title ss-m-t-15">88人</view>
  63. <view class="ss-m-t-15">团队今日贡献#92</view>
  64. <view class="ss-m-t-15">团队总贡献值#7692</view>
  65. </view>
  66. </view>
  67. <!-- 积分确权 -->
  68. <su-popup :show="state.showProtocol" type="center" round="10" :isMaskClick="false" showClose @close="close">
  69. <view class="head-nav">
  70. <view :class="state.navIndex==0?'activite':''" class="ss-m-l-20" @click="checkIndex(0)">
  71. 身价产生规则
  72. </view>
  73. <view :class="state.navIndex==1?'activite':''" class="ss-m-l-20" @click="checkIndex(1)">
  74. 身价权益
  75. </view>
  76. </view>
  77. <scroll-view class="scroll-view_H" scroll-y="true">
  78. <richtext title="身价产生规则" v-if="state.navIndex==0" type='tab' />
  79. <richtext title="身价权益" v-if="state.navIndex==1" type='tab' />
  80. </scroll-view>
  81. </su-popup>
  82. </view>
  83. </template>
  84. <script setup>
  85. /**
  86. * 装修组件 - 订单菜单组
  87. */
  88. import {
  89. computed,
  90. reactive
  91. } from 'vue';
  92. import sheep from '@/sheep';
  93. import {
  94. fen2yuan
  95. } from '../../hooks/useGoods';
  96. import richtext from '@/pages/public/richtext'
  97. const progressWidth = 90
  98. const state = reactive({
  99. showProtocol: false,
  100. navIndex: 0
  101. })
  102. const userWallet = computed(() => sheep.$store('user').userWallet);
  103. const userInfo = computed(() => sheep.$store('user').userInfo);
  104. const numData = computed(() => sheep.$store('user').numData);
  105. // 查看协议
  106. function onProtocol(title) {
  107. sheep.$router.go('/pages/public/richtext', {
  108. title,
  109. });
  110. }
  111. const close = () => {
  112. state.showProtocol = false
  113. }
  114. function checkIndex(index) {
  115. state.navIndex = index;
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .head-nav {
  120. margin: 20rpx auto;
  121. display: flex;
  122. align-items: center;
  123. color: #CCCCCC;
  124. }
  125. .activite {
  126. box-sizing: border-box;
  127. color: rgb(14, 147, 46);
  128. border-bottom: 4rpx solid rgb(14, 147, 46);
  129. }
  130. .head-nav>view {
  131. padding-bottom: 10rpx;
  132. }
  133. .content {
  134. /* background: #008000; */
  135. height: 100%;
  136. }
  137. .scroll-view_H {
  138. width: 600rpx;
  139. height: 700rpx;
  140. padding: 20rpx;
  141. }
  142. .progress-box {
  143. padding: 40rpx 40rpx 0;
  144. }
  145. /* 进度条容器 */
  146. .progress-container {
  147. width: 100%;
  148. /* 全宽 */
  149. height: 40rpx;
  150. /* 高度 */
  151. background-color: #e0e0e0;
  152. /* 背景色 */
  153. border-radius: 20rpx;
  154. /* 圆角 */
  155. position: relative;
  156. /* 相对定位,用于文本定位 */
  157. }
  158. /* 进度条 */
  159. .progress-bar {
  160. height: 100%;
  161. background: rgb(14, 147, 46);
  162. /* 渐变色 */
  163. border-radius: 20rpx;
  164. /* 圆角 */
  165. position: relative;
  166. /* 相对定位,用于文本定位 */
  167. display: flex;
  168. /* 开启 Flex 布局 */
  169. align-items: center;
  170. /* 垂直居中 */
  171. justify-content: center;
  172. /* 水平居中 */
  173. }
  174. /* 进度文本 */
  175. .progress-text {
  176. color: white;
  177. /* 文本颜色 */
  178. font-size: 14px;
  179. /* 字体大小 */
  180. }
  181. .ss-wallet-menu-wrap {
  182. flex-wrap: wrap;
  183. height: auto;
  184. padding: 40rpx;
  185. .menu-wallet {
  186. width: 144rpx;
  187. }
  188. // .menu-item:nth-child(1),
  189. // .menu-item:nth-child(2) {
  190. // border-bottom: 4rpx solid #f6f6f6;
  191. // }
  192. .menu-item:nth-child(odd) {
  193. border-right: 4rpx solid #f6f6f6;
  194. }
  195. .menu-item {
  196. height: 300rpx;
  197. flex: 0 0 50%;
  198. /* flex-grow: 0, flex-shrink: 0, flex-basis: 50% */
  199. box-sizing: border-box;
  200. padding: 20rpx;
  201. /* 确保 padding 和 border 不会使元素宽度超过 50% */
  202. /* 可选,为了视觉效果 */
  203. .menu-title {
  204. font-size: 34rpx;
  205. line-height: 34rpx;
  206. color: #333333;
  207. }
  208. /* 可选,为了视觉效果 */
  209. .menu-mini-title {
  210. font-size: 20rpx;
  211. line-height: 20rpx;
  212. color: #333333;
  213. }
  214. .item-icon {
  215. width: 44rpx;
  216. height: 44rpx;
  217. }
  218. .value-box {
  219. width: 100rpx;
  220. height: 100rpx;
  221. line-height: 100rpx;
  222. text-align: center;
  223. border-radius: 50%;
  224. border: 2px solid #f6f6f6;
  225. .value-text {
  226. font-size: 28rpx;
  227. color: #000000;
  228. line-height: 100rpx;
  229. vertical-align: text-bottom;
  230. font-family: OPPOSANS;
  231. }
  232. .unit-text {
  233. font-size: 24rpx;
  234. color: #343434;
  235. line-height: 24rpx;
  236. }
  237. }
  238. }
  239. }
  240. </style>