wallet.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <template>
  2. <view class="content">
  3. <view style="background: #FFFFFF;">
  4. <view class="view1" style="text-align: center;">
  5. <view class="view_top">
  6. <view class="view_name">总资产(元)</view>
  7. <view style="font-size: 29px;">{{ money }}<text
  8. style="font-size: 31rpx;margin-left: 15rpx;">元</text></view>
  9. <!-- <view class="margin-top padding-top">累计提现金额:{{ totalMoney }}元</view> -->
  10. </view>
  11. </view>
  12. <view class="view2-views">
  13. <view class="view2_box">
  14. <view class="name">账户余额(元)</view>
  15. <view class="money">{{money}}</view>
  16. </view>
  17. <view class="btn" @tap="getOut">提现</view>
  18. </view>
  19. </view>
  20. <view class="view2">
  21. <view class="view2-view" @tap="moneyList">
  22. <image src="https://api.shengqianxiong.com.cn/img/20201118/22f17a68dc7446d6bef8e0a7a6cbac55.png"
  23. class="view2-view-image"></image>
  24. <view class="view2-view1">
  25. <view class="view2-view-text">钱包明细</view>
  26. <image
  27. src="https://api.shengqianxiong.com.cn/file/uploadPath/2021/10/08/9a7ea5f18fae76c2f9c9d5b3e8323f4e.png"
  28. class="view2-view-image-right"></image>
  29. </view>
  30. </view>
  31. <!-- <view class="view2-view" @click="goZhifuBao">
  32. <image src="https://api.shengqianxiong.com.cn/img/20201118/86efb280c3d2416e86e7b1900bbe17ff.png"
  33. class="view2-view-image"></image>
  34. <view class="view2-view1">
  35. <view class="view2-view-text">提现账号</view>
  36. <image
  37. src="https://api.shengqianxiong.com.cn/file/uploadPath/2021/10/08/9a7ea5f18fae76c2f9c9d5b3e8323f4e.png"
  38. class="view2-view-image-right"></image>
  39. </view>
  40. </view> -->
  41. <view class="view2-view" @tap="list">
  42. <image src="https://api.shengqianxiong.com.cn/img/20201118/5ce91ac860334fc9ac09c977467607cd.png"
  43. class="view2-view-image"></image>
  44. <view class="view2-view1">
  45. <view class="view2-view-text">提现记录</view>
  46. <image
  47. src="https://api.shengqianxiong.com.cn/file/uploadPath/2021/10/08/9a7ea5f18fae76c2f9c9d5b3e8323f4e.png"
  48. class="view2-view-image-right"></image>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. money: '0.00',
  59. zhifubao: '',
  60. walletmoney: '0.00',
  61. totalMoney: '0.00',
  62. zhifubaoName: '',
  63. }
  64. },
  65. onLoad() {
  66. this.getwalletMoney();
  67. },
  68. onShow: function(e) {
  69. // this.getMoney();
  70. this.getwalletMoney();
  71. },
  72. methods: {
  73. ketixian() {
  74. uni.showModal({
  75. showCancel: false,
  76. confirmColor: '#e10a07',
  77. title: '可提现金额说明',
  78. content: '可提现金额是我们通过在商城中购买商品后返利的佣金,这个金额是可提现的'
  79. });
  80. },
  81. leijitixian() {
  82. uni.showModal({
  83. showCancel: false,
  84. confirmColor: '#e10a07',
  85. title: '累计提现金额说明',
  86. content: '累计提现金额是我们过往提现成功金额的总计'
  87. });
  88. },
  89. moneyList() {
  90. uni.navigateTo({
  91. url: '/my/other/cashList'
  92. })
  93. },
  94. list() {
  95. uni.navigateTo({
  96. url: '/my/other/moneydetail'
  97. })
  98. },
  99. goZhifuBao() {
  100. uni.navigateTo({
  101. url: "/my/other/zhifubao"
  102. })
  103. },
  104. //获取账户余额
  105. getwalletMoney() {
  106. this.$Request.getT('/shop/shopmoney/selectShopMoney').then(res => {
  107. if (res.code == 0) {
  108. this.money = res.data.money;
  109. }
  110. uni.hideLoading();
  111. });
  112. },
  113. // getMoney() {
  114. // let that = this;
  115. // let token = this.$queue.getData("token");
  116. // let userId = this.$queue.getData("userId");
  117. // if (token) {
  118. // //this.$queue.showLoading("加载中...");
  119. // //可以提现金额查询预估收入查询
  120. // this.$Request.getT("/cash/money/" + userId).then(res => {
  121. // if (res.status === 0 && res.data) {
  122. // // that.money = parseFloat(res.data).toFixed(2);
  123. // } else if (res.status === -102) {
  124. // this.$queue.showToast(res.msg);
  125. // this.$queue.logout();
  126. // uni.navigateTo({
  127. // url: '/pages/member/register'
  128. // });
  129. // } else {
  130. // // that.money = '0.00';
  131. // //this.$queue.showToast(res.msg);
  132. // }
  133. // });
  134. // this.$Request.getT("/cash/userinfo/" + userId).then(res => {
  135. // if (res.status === 0 && res.data) {
  136. // that.zhifubao = res.data.zhifubao;
  137. // that.zhifubaoName = res.data.zhifubaoName;
  138. // }
  139. // uni.hideLoading();
  140. // });
  141. // //总的提现记录
  142. // this.$Request.getT("/cash/countByRelationId/" + this.$queue.getData("relation_id")).then(res => {
  143. // if (res.status === 0 && res.data) {
  144. // that.totalMoney = parseFloat(res.data).toFixed(2);
  145. // } else {
  146. // that.totalMoney = '0.00';
  147. // }
  148. // });
  149. // }
  150. // },
  151. getOut() {
  152. uni.navigateTo({
  153. url: '/my/other/cashDetail'
  154. });
  155. },
  156. },
  157. }
  158. </script>
  159. <style lang='less'>
  160. /* @import "../../static/css/index.css"; */
  161. .view_top {
  162. padding: 35rpx 55rpx;
  163. }
  164. .view_name {
  165. font-size: 32rpx;
  166. letter-spacing: 2rpx;
  167. font-family: serif;
  168. margin-bottom: 10rpx;
  169. }
  170. .view1 {
  171. width: 90%;
  172. margin: 0 auto;
  173. height: 320rpx;
  174. border-radius: 16upx;
  175. /* color: #FFFFFF; */
  176. background: linear-gradient(to right, #FCB202 0, #FCD202 100%);
  177. }
  178. .view2 {
  179. background-color: #ffffff;
  180. margin-top: 15rpx;
  181. }
  182. .name {
  183. font-size: 28rpx;
  184. }
  185. .money {
  186. margin-top: 12rpx;
  187. font-size: 48rpx;
  188. }
  189. .btn {
  190. background: #FCD202;
  191. /* color: white; */
  192. text-align: center;
  193. width: 24%;
  194. padding: 16rpx 0rpx;
  195. border-radius: 6rpx;
  196. }
  197. .view2-view {
  198. display: flex;
  199. width: 100%;
  200. height: 110rpx;
  201. align-items: center;
  202. }
  203. .view2-views {
  204. display: flex;
  205. width: 90%;
  206. margin: 0 auto;
  207. height: 140rpx;
  208. align-items: center;
  209. justify-content: space-between;
  210. margin-top: 30rpx;
  211. }
  212. .view2-view1 {
  213. display: flex;
  214. flex-direction: row;
  215. width: 90%;
  216. align-items: center;
  217. }
  218. .view2-view-image {
  219. margin-left: 40upx;
  220. width: 50upx;
  221. height: 50upx;
  222. }
  223. .view2-view-text {
  224. font-size: 14px;
  225. color: #000000;
  226. margin-left: 40upx;
  227. width: 80%;
  228. }
  229. .view2-view-image-right {
  230. width: 19rpx;
  231. height: 31rpx;
  232. margin-left: 30rpx;
  233. }
  234. </style>