userTuiMoney.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <template>
  2. <view >
  3. <view class="header">
  4. <view class="promoterHeader">
  5. <image class="bg" src="/static/images/transparent.png" />
  6. <view class="headerCon acea-row row-between-wrapper">
  7. <view>
  8. <view class="name">可提现金额</view>
  9. <view>
  10. <text class="num">{{nowMoney}}</text>
  11. <text>元</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="form-box">
  18. <view class="form-item">
  19. <text class="label">提现金额</text>
  20. <input type="number" v-model="form.extractPrice" maxlength="10" placeholder="请输入提现金额" class="form-input" />
  21. </view>
  22. </view>
  23. <view class="btn-box">
  24. <view class="sub-btn" @click="submit()">提交</view>
  25. </view>
  26. <view class="tips">
  27. <view>冻结佣金:{{brokeragePrice}}元</view>
  28. <view>提现规则</view>
  29. <view>1.订单支付即产生佣金;</view>
  30. <view>2.订单签收7天后,佣金解冻为可提现佣金;</view>
  31. <view>3.每次提现金额需不低于100元;</view>
  32. <view>4.目前仅支持微信提现,银行卡提现开发中,尽请期待!</view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import {getUserInfo,doExtract} from '@/api/user'
  38. export default {
  39. name: "tuiMoney",
  40. data: function () {
  41. return {
  42. nowMoney:0,
  43. brokeragePrice:0,
  44. form:{
  45. extractPrice:0,
  46. }
  47. };
  48. },
  49. mounted: function () {
  50. this.getUserInfo();
  51. },
  52. methods: {
  53. submit(){
  54. var data={extractPrice:this.form.extractPrice}
  55. doExtract(data).then(
  56. res => {
  57. if(res.code==200){
  58. uni.showToast({
  59. icon:'none',
  60. title: res.msg,
  61. });
  62. this.getUserInfo();
  63. }else{
  64. uni.showToast({
  65. icon:'none',
  66. title: res.msg,
  67. });
  68. }
  69. },
  70. rej => {}
  71. );
  72. },
  73. getUserInfo(){
  74. getUserInfo().then(
  75. res => {
  76. if(res.code==200){
  77. if(res.user!=null){
  78. this.nowMoney=res.user.nowMoney;
  79. this.brokeragePrice=res.user.brokeragePrice;
  80. }
  81. else{
  82. this.utils.loginOut();
  83. }
  84. }else{
  85. uni.showToast({
  86. icon:'none',
  87. title: "请求失败",
  88. });
  89. }
  90. },
  91. rej => {}
  92. );
  93. },
  94. }
  95. };
  96. </script>
  97. <style lang="less">
  98. /*所有推广头部样式*/
  99. .promoterHeader {
  100. width: 100%;
  101. height: 2.2 * 100rpx;
  102. background-color: #018C39;
  103. position: relative;
  104. .bg{
  105. width: 100%;
  106. height: 100%;
  107. position: absolute;
  108. top: 0;
  109. left: 0;
  110. }
  111. }
  112. .promoterHeader .headerCon {
  113. height: 100%;
  114. padding: 0 0.88 * 100rpx 0 0.88 * 100rpx;
  115. font-size: 0.28 * 100rpx;
  116. color: #fff;
  117. background-repeat: no-repeat;
  118. background-size: 100% 100%;
  119. }
  120. .promoterHeader .headerCon .name {
  121. margin-bottom: 0.02 * 100rpx;
  122. }
  123. .promoterHeader .headerCon .num {
  124. font-size: 0.5 * 100rpx;
  125. }
  126. .promoterHeader .headerCon .iconfont {
  127. font-size: 1.25 * 100rpx;
  128. }
  129. .form-box{
  130. padding: 0 30upx;
  131. background: #FFFFFF;
  132. .form-item{
  133. padding: 30upx 0;
  134. display: flex;
  135. align-items: flex-start;
  136. border-bottom: 1px solid #F1F1F1;
  137. &:last-child{
  138. border-bottom: none;
  139. }
  140. .label{
  141. width: 150upx;
  142. text-align: left;
  143. font-size: 30upx;
  144. line-height: 44upx;
  145. font-family: PingFang SC;
  146. font-weight: 500;
  147. color: #222222;
  148. flex-shrink: 0;
  149. }
  150. input{
  151. text-align: left;
  152. }
  153. .form-input{
  154. font-size: 30upx;
  155. font-family: PingFang SC;
  156. font-weight: 500;
  157. color: #111111;
  158. text-align: left;
  159. }
  160. .form-textarea{
  161. font-size: 30upx;
  162. color: #111111;
  163. height: 100upx;
  164. padding: 4upx 0;
  165. }
  166. .birth-picker {
  167. flex: 1;
  168. display: flex;
  169. align-items: center;
  170. .right-box{
  171. width: 100%;
  172. display: flex;
  173. align-items: center;
  174. .input-box{
  175. width: 470upx;
  176. }
  177. .arrow{
  178. width: 13upx;
  179. height: 23upx;
  180. margin-left: 20upx;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. .btn-box{
  187. margin-top: 30rpx;
  188. height: 120upx;
  189. padding: 0 30upx;
  190. display: flex;
  191. align-items: center;
  192. justify-content: center;
  193. .sub-btn{
  194. width: 100%;
  195. height: 88upx;
  196. line-height: 88upx;
  197. text-align: center;
  198. font-size: 30upx;
  199. font-family: PingFang SC;
  200. font-weight: bold;
  201. color: #FFFFFF;
  202. background: #018C39;
  203. border-radius: 44upx;
  204. }
  205. }
  206. .tips{
  207. padding: 0 30upx;
  208. font-size: 28upx;
  209. font-family: PingFang SC;
  210. font-weight: 400;
  211. color: #A9AFB8;
  212. line-height: 48upx;
  213. }
  214. </style>