index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <template>
  2. <view class="cash-content" :style="{'--status-bar-': statusBarHeight}">
  3. <view class="cash-content-info">
  4. <!-- 头部主要内容 开始 -->
  5. <view class="cash-content-header">
  6. <customNavbar
  7. title="余额提现"
  8. bgColor="rgba(0,0,0,0)"
  9. :customNavbarInfo="{}"
  10. :contentStyle="{}"
  11. :leftStyle="{color: '#fff'}"
  12. ></customNavbar>
  13. <!-- 余额 开始 -->
  14. <view class="cash-content-money">
  15. <text>可提现余额(元)</text>
  16. <view class="cash-content-money-num">
  17. <text>
  18. <text class="inspage-userinfo-util">¥</text>
  19. <u-count-to :decimals="2" :startVal="0" :endVal="monry" color="#fff" />
  20. <text class="balance-userinfo-util">元</text>
  21. </text>
  22. </view>
  23. </view>
  24. <!-- 余额 结束 -->
  25. <!-- 提现 开始 -->
  26. <view class="cash-content-cash">
  27. <view class="cash-content-cash-box">
  28. <text>提现金额</text>
  29. <view class="cash-content-cash-money">
  30. <text class="cash-content-cash-money-icon">¥</text>
  31. <view class="cash-content-cash-input">
  32. <u--input
  33. placeholder="请输入内容"
  34. border="none"
  35. clearable
  36. v-model="moneyValue"
  37. ></u--input>
  38. </view>
  39. <text class="cash-content-cash-money-all" @click="cashAll()">全部提现</text>
  40. </view>
  41. <view class="cash-content-cash-card">
  42. <u-cell-group :border="false">
  43. <u-cell
  44. :border="false"
  45. title="个人设置"
  46. isLink
  47. :value="'中国银行'"
  48. @click="openPopup()"
  49. ></u-cell>
  50. </u-cell-group>
  51. </view>
  52. <view class="cash-content-cash-submit">
  53. <view>提现</view>
  54. </view>
  55. </view>
  56. </view>
  57. <!-- 提现 结束 -->
  58. <!-- 选择银行卡 -->
  59. <u-picker
  60. :show="show"
  61. keyName="label"
  62. :columns="columns"
  63. @cancel="cancelPicker"
  64. @confirm="confirmPicker"
  65. ></u-picker>
  66. </view>
  67. <!-- 头部主要内容 结束 -->
  68. </view>
  69. </view>
  70. </template>
  71. <script>
  72. import { navigateTo } from "@/utils/util.js"
  73. export default {
  74. data() {
  75. return {
  76. title: '这是我的',
  77. statusBarHeight: 0, // 状态栏安全距离
  78. monry: 123456.789,
  79. moneyValue: null,
  80. tool: [ // 我的工具
  81. { title: "支付设置",icon: this.$commonConfig.staticUrl + 'balance/zhifu.png', url: '/pages/invitationStatistics/index' },
  82. { title: "余额提现",icon: this.$commonConfig.staticUrl + 'balance/mingxi.png', url: '/pages/balance/index' },
  83. ],
  84. show: false,
  85. columns: [
  86. [{
  87. label: '雪月夜',
  88. // 其他属性值
  89. id: 2021
  90. // ...
  91. }, {
  92. label: '冷夜雨',
  93. id: 804
  94. }]
  95. ]
  96. }
  97. },
  98. onLoad() {
  99. },
  100. onShow() {
  101. this.statusBarHeight = getApp().globalData.statusBarHeight
  102. },
  103. methods: {
  104. /**
  105. * @author ygh
  106. * @data 2023-12-20
  107. */
  108. navigateToFun(){
  109. navigateTo('/pages/cash/index')
  110. },
  111. /**
  112. * 数字显示格式化
  113. *
  114. */
  115. numFormat(num=0) {
  116. if(num<100000) {
  117. return num
  118. }else if(num>100000){
  119. return (num/10000).toFixed(2)
  120. }
  121. },
  122. /** 全部提现 */
  123. cashAll() {
  124. this.moneyValue = this.monry
  125. },
  126. /**
  127. * 打开选择器
  128. */
  129. openPopup() {
  130. this.show = true
  131. },
  132. /** 取消选择器 */
  133. cancelPicker() {
  134. this.show = false
  135. },
  136. /** 确认选择器 */
  137. confirmPicker() {
  138. this.show = false
  139. },
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .cash-content {
  145. display: flex;
  146. flex-direction: column;
  147. align-items: center;
  148. justify-content: center;
  149. --header-h: 580rpx;
  150. .cash-content-info {
  151. width: 100%;
  152. box-sizing: border-box;
  153. }
  154. }
  155. /** 头部主要内容 开始 */
  156. .cash-content-header {
  157. width: 100%;
  158. height: var(--header-h);
  159. box-sizing: border-box;
  160. background: var(--gd-bgm-lg-color);
  161. position: relative;
  162. ::v-deep .u-search {
  163. padding: 0 30rpx !important;
  164. }
  165. ::v-deep .u-search__action {
  166. color: #fff !important;
  167. }
  168. /** 余额 开始 */
  169. .cash-content-money {
  170. width: 100%;
  171. box-sizing: border-box;
  172. margin-top: 50rpx;
  173. padding-left: 66rpx;
  174. color: #fff;
  175. >text {
  176. font-size: 24rpx;
  177. }
  178. .cash-content-money-num {
  179. display: flex;
  180. justify-content: center;
  181. align-items: flex-start;
  182. flex-direction: column;
  183. margin-top: 24rpx;
  184. > text:nth-child(1) {
  185. .balance-userinfo-util {
  186. font-size: 24rpx;
  187. margin-left: 5rpx;
  188. }
  189. ::v-deep .u-count-num {
  190. font-weight: bold !important;
  191. font-size: 48rpx !important;
  192. }
  193. }
  194. > text:nth-child(2) {
  195. margin-top: 20rpx;
  196. font-size: 24rpx;
  197. }
  198. }
  199. }
  200. /** 余额 结束 */
  201. /** 提现 开始 */
  202. .cash-content-cash {
  203. width: 100%;
  204. box-sizing: border-box;
  205. position: absolute;
  206. top: 100%;
  207. transform: translateY(-50%);
  208. padding: 0 12rpx;
  209. .cash-content-cash-box {
  210. width: 100%;
  211. height: 100%;
  212. background-color: #fff;
  213. box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(221,221,221,0.5);
  214. border-radius: 20rpx;
  215. box-sizing: border-box;
  216. padding: 34rpx 30rpx 38rpx;
  217. >text {
  218. font-size: 28rpx;
  219. color: #363636;
  220. }
  221. .cash-content-cash-money {
  222. width: 100%;
  223. display: flex;
  224. align-items: center;
  225. padding: 40rpx 0 20rpx;
  226. border-bottom: 2rpx solid #EEEEEE;
  227. ::v-deep .u-cell__body {
  228. padding: 20rpx 0 !important;
  229. }
  230. .cash-content-cash-input {
  231. width: 100%;
  232. padding: 0 10rpx;
  233. }
  234. >text {
  235. flex-shrink: 0;
  236. flex-wrap: nowrap;
  237. white-space: nowrap;
  238. }
  239. .cash-content-cash-money-icon {
  240. font-size: 32rpx;
  241. }
  242. .cash-content-cash-money-all {
  243. color: var(--gd-but-color);
  244. font-size: 24rpx;
  245. cursor: pointer;
  246. }
  247. }
  248. .cash-content-cash-card {
  249. width: 100%;
  250. ::v-deep .u-cell__body {
  251. padding: 20rpx 0 !important;
  252. }
  253. }
  254. .cash-content-cash-submit {
  255. width: 100%;
  256. height: 92rpx;
  257. display: flex;
  258. align-items: center;
  259. justify-content: center;
  260. box-sizing: border-box;
  261. padding: 0 80rpx 0;
  262. margin-top: 70rpx;
  263. >view {
  264. width: 100%;
  265. height: 100%;
  266. border-radius: 46rpx;
  267. color: #fff;
  268. background-color: var(--gd-but-color);
  269. font-size: 28rpx;
  270. font-family: SourceHanSansCN, SourceHanSansCN;
  271. display: flex;
  272. align-items: center;
  273. justify-content: center;
  274. }
  275. }
  276. }
  277. }
  278. /** 提现 结束 */
  279. }
  280. /** 头部主要内容 结束 **/
  281. </style>