index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="balance-content" :style="{'--status-bar-': statusBarHeight}">
  3. <view class="balance-content-info">
  4. <!-- 头部主要内容 开始 -->
  5. <view class="balance-content-header">
  6. <customNavbar
  7. title="余额提现"
  8. bgColor="#fff"
  9. :contentStyle="{color: '#000'}"
  10. ></customNavbar>
  11. </view>
  12. <!-- 头部主要内容 结束 -->
  13. <!-- userInfo内容 开始 -->
  14. <view class="balance-content-userinfo">
  15. <view class="balance-content-userinfo-box">
  16. <view class="balance-userinfo-info">
  17. <view class="balance-userinfo-title"><text>张飞烤地瓜旅行社</text></view>
  18. <view class="balance-userinfo-count">
  19. <!-- 余额 -->
  20. <view
  21. class="balance-userinfo-money"
  22. >
  23. <text>
  24. <text class="inspage-userinfo-util">¥</text>
  25. <u-count-to :decimals="2" :startVal="0" :endVal="monry" color="#fff" />
  26. <text class="balance-userinfo-util">元</text>
  27. </text>
  28. <text>我的余额(元)</text>
  29. </view>
  30. <!-- 去提现 -->
  31. <view class="balance-userinfo-cash">
  32. <view @click="navigateToFun({url: '/pages/balance/index'})">去提现</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="balance-userinfo-tool">
  37. <view
  38. v-for="(item,index) in tool"
  39. :key="index"
  40. @click="navigateToFun(item)"
  41. >
  42. <image :class="['',index != 1 ?'balance-userinfo-tool-icon':'balance-userinfo-tool-icon1']" :src="item.icon"></image>
  43. <text>{{item.title}}</text>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- userInfo内容 结束 -->
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import { navigateTo } from "@/utils/util.js"
  54. export default {
  55. data() {
  56. return {
  57. title: '这是我的',
  58. statusBarHeight: 0, // 状态栏安全距离
  59. monry: 123456.789,
  60. tool: [ // 我的工具
  61. { title: "支付设置",icon: this.$commonConfig.staticUrl + 'balance/zhifu.png', url: '/pages/invitationStatistics/index' },
  62. { title: "收支明细",icon: this.$commonConfig.staticUrl + 'balance/mingxi.png', url: '/pages/consume/index' },
  63. ]
  64. }
  65. },
  66. onLoad() {
  67. },
  68. onShow() {
  69. this.statusBarHeight = getApp().globalData.statusBarHeight
  70. },
  71. methods: {
  72. /**
  73. * @author ygh
  74. * @data 2023-12-20
  75. */
  76. navigateToFun(item){
  77. navigateTo(item.url)
  78. },
  79. /**
  80. * 数字显示格式化
  81. *
  82. */
  83. numFormat(num=0) {
  84. if(num<100000) {
  85. return num
  86. }else if(num>100000){
  87. return (num/10000).toFixed(2)
  88. }
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .balance-content {
  95. display: flex;
  96. flex-direction: column;
  97. align-items: center;
  98. justify-content: center;
  99. --header-h: 90rpx;
  100. .balance-content-info {
  101. width: 100%;
  102. box-sizing: border-box;
  103. }
  104. }
  105. /** 头部主要内容 开始 */
  106. .balance-content-header {
  107. width: 100%;
  108. height: var(--header-h);
  109. box-sizing: border-box;
  110. ::v-deep .u-search {
  111. padding: 0 30rpx !important;
  112. }
  113. ::v-deep .u-search__action {
  114. color: #fff !important;
  115. }
  116. }
  117. /** 头部主要内容 结束 **/
  118. /** userInfo内容 开始 */
  119. .balance-content-userinfo {
  120. width: 100%;
  121. padding: 24rpx 40rpx 0;
  122. box-sizing: border-box;
  123. .balance-content-userinfo-box {
  124. width: 100%;
  125. background: #F3F8FF;
  126. border-radius: 0rpx 0rpx 24rpx 24rpx;
  127. border-radius: 20rpx;
  128. box-sizing: border-box;
  129. .balance-userinfo-info {
  130. width: 100%;
  131. height: 320rpx;
  132. box-sizing: border-box;
  133. background: linear-gradient(to bottom, rgba(238, 12, 12, 1) 0%, rgba(243, 157, 159, 1) 100%);
  134. border-radius: 20rpx;
  135. box-shadow: 0rpx 0 20rpx 2rpx rgba(205, 205, 205, 0.50);
  136. display: flex;
  137. flex-direction: column;
  138. align-items: flex-start;
  139. justify-content: space-between;
  140. color: #fff;
  141. font-size: 28rpx;
  142. font-family: SourceHanSansCN, SourceHanSansCN;
  143. padding: 46rpx;
  144. .balance-userinfo-title {
  145. display: flex;
  146. width: 100%;
  147. box-sizing: border-box;
  148. }
  149. .balance-userinfo-count {
  150. width: 100%;
  151. display: flex;
  152. box-sizing: border-box;
  153. align-items: center;
  154. justify-content: space-between;
  155. .balance-userinfo-money {
  156. display: flex;
  157. justify-content: center;
  158. align-items: flex-start;
  159. flex-direction: column;
  160. > text:nth-child(1) {
  161. .balance-userinfo-util {
  162. font-size: 24rpx;
  163. margin-left: 5rpx;
  164. }
  165. ::v-deep .u-count-num {
  166. font-weight: bold !important;
  167. font-size: 48rpx !important;
  168. }
  169. }
  170. > text:nth-child(2) {
  171. margin-top: 20rpx;
  172. font-size: 24rpx;
  173. }
  174. }
  175. .balance-userinfo-cash {
  176. width: 144rpx;
  177. height: 50rpx;
  178. flex-shrink: 0;
  179. >view {
  180. width: 100%;
  181. height: 100%;
  182. display: flex;
  183. justify-content: center;
  184. align-items: center;
  185. background: #FFFFFF;
  186. border-radius: 24rpx;
  187. font-size: 24rpx;
  188. font-family: SourceHanSansCN, SourceHanSansCN;
  189. font-weight: 550;
  190. color: #EE1818;
  191. }
  192. }
  193. }
  194. }
  195. .balance-userinfo-tool {
  196. width: 100%;
  197. box-sizing: border-box;
  198. padding: 22rpx 0;
  199. display: flex;
  200. >view {
  201. flex: 1;
  202. display: flex;
  203. align-items: center;
  204. justify-content: center;
  205. color: rgba(78, 78, 78, 1);
  206. .balance-userinfo-tool-icon {
  207. width: 34rpx;
  208. height: 30rpx;
  209. }
  210. .balance-userinfo-tool-icon1 {
  211. width: 32rpx;
  212. height: 32rpx;
  213. }
  214. text {
  215. margin-left: 10rpx;
  216. font-size: 24rpx;
  217. }
  218. }
  219. }
  220. }
  221. }
  222. /** userInfo内容 结束 **/
  223. </style>