yjchange.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <template>
  2. <view class="content">
  3. <!-- <uni-notice-bar single="true" text="实际到账98%"></uni-notice-bar> -->
  4. <view class="content-money">
  5. <view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
  6. <view class="buttom">
  7. <view class="icon">{{ userInfo.brokerage_price | getMoneyStyle }}</view>
  8. <text class="text">可转账奖金</text>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="row-box margin-t-20">
  13. <view class="title">转账奖金(¥)</view>
  14. <view class="row">
  15. <input class="input" type="number" v-model="withdrawal" placeholder="请输入转账奖金"
  16. placeholder-class="placeholder" />
  17. <view class="buttom" @click="withdrawal = userInfo.brokerage_price">全部转账</view>
  18. </view>
  19. </view>
  20. <view class="row-box margin-t-20">
  21. <view class="title">用户ID</view>
  22. <view class="row">
  23. <input class="input" type="number" v-model="uid" placeholder="请填写转账到的用户ID"
  24. placeholder-class="placeholder" />
  25. </view>
  26. </view>
  27. <button class="add-btn up" @click="confirm">提交申请</button>
  28. <!-- <button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button> -->
  29. </view>
  30. </template>
  31. <script>
  32. import {
  33. getMoneyStyle
  34. } from '@/utils/rocessor.js';
  35. import {
  36. trade
  37. } from '@/api/new.js';
  38. import {
  39. getUserInfo
  40. } from '@/api/user.js';
  41. import {
  42. mapState,
  43. mapMutations
  44. } from 'vuex';
  45. import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
  46. export default {
  47. filters: {
  48. getMoneyStyle
  49. },
  50. components: {
  51. uniNoticeBar
  52. },
  53. computed: {
  54. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  55. },
  56. data() {
  57. return {
  58. type: 'bank', //提现方式
  59. money: '0.00', //可提现金额
  60. freeze: '0.0', //冻结金额
  61. withdrawal:'',
  62. uid: '', //提现金额
  63. };
  64. },
  65. onLoad(options) {},
  66. methods: {
  67. ...mapMutations('user', ['setUserInfo']),
  68. // 跳转
  69. navTo(url) {
  70. uni.navigateTo({
  71. url: url
  72. });
  73. },
  74. // 提交
  75. confirm() {
  76. let obj = this
  77. let data = {
  78. num: this.withdrawal, //金额
  79. to_uid: this.uid //0佣金1余额
  80. };
  81. trade(data)
  82. .then(e => {
  83. getUserInfo({})
  84. .then(({
  85. data
  86. }) => {
  87. this.setUserInfo(data);
  88. })
  89. .catch(e => {
  90. console.log(e);
  91. });
  92. uni.showToast({
  93. title: '申请成功!',
  94. duration: 2000,
  95. position: 'top'
  96. });
  97. })
  98. .catch(e => {
  99. console.log();
  100. });
  101. }
  102. }
  103. };
  104. </script>
  105. <style lang="scss">
  106. page {
  107. height: 100%;
  108. }
  109. .content-money {
  110. padding: 30rpx 0;
  111. background: #ffffff;
  112. }
  113. .flex {
  114. background-color: #ffffff;
  115. text-align: center;
  116. margin: 0 30rpx;
  117. border-radius: $border-radius-sm;
  118. .buttom {
  119. font-size: $font-lg;
  120. width: 50%;
  121. }
  122. .interval {
  123. width: 2px;
  124. height: 60rpx;
  125. background-color: #eeeeee;
  126. }
  127. .icon {
  128. background-size: 100%;
  129. font-size: 42rpx;
  130. color: $font-color-dark;
  131. font-weight: bold;
  132. background-repeat: no-repeat;
  133. background-position: center;
  134. }
  135. .text {
  136. color: $font-color-light;
  137. }
  138. }
  139. .row-box {
  140. padding: 20rpx 30rpx;
  141. background: #fff;
  142. .title {
  143. font-size: $font-base + 2rpx;
  144. color: $font-color-dark;
  145. }
  146. .row {
  147. display: flex;
  148. align-items: center;
  149. position: relative;
  150. height: 80rpx;
  151. .tit {
  152. flex-shrink: 0;
  153. width: 40rpx;
  154. font-size: 30rpx;
  155. color: $font-color-dark;
  156. }
  157. .input {
  158. flex: 1;
  159. font-size: 30rpx;
  160. color: $font-color-dark;
  161. }
  162. .iconlocation {
  163. font-size: 36rpx;
  164. color: $font-color-light;
  165. }
  166. .buttom {
  167. font-size: $font-base;
  168. }
  169. }
  170. }
  171. .add-btn {
  172. background: linear-gradient(-90deg, #FAC545, #FFE000);
  173. border-radius: 10px;
  174. width: 690rpx;
  175. height: 80rpx;
  176. margin: 0 auto;
  177. margin-top: 30rpx;
  178. font-size: $font-lg;
  179. border-radius: 10rpx;
  180. color: #6B4216;
  181. &.up {
  182. background-color: $base-color;
  183. color: #fff;
  184. }
  185. }
  186. .list {
  187. padding-left: 30rpx;
  188. margin-top: 30rpx;
  189. background-color: #ffffff;
  190. .box {
  191. display: flex;
  192. align-items: center;
  193. width: 100%;
  194. height: 120rpx;
  195. border-bottom: 1px solid $border-color-light;
  196. .icon {
  197. font-size: 48rpx;
  198. padding-right: 20rpx;
  199. .icon-img {
  200. height: 50rpx;
  201. width: 50rpx;
  202. }
  203. }
  204. .iconweixin1 {
  205. color: #18bf16;
  206. }
  207. .iconzhifubao {
  208. color: #08aaec;
  209. }
  210. .title-box {
  211. flex-grow: 1;
  212. text-align: left;
  213. .title {
  214. font-size: $font-base + 2rpx;
  215. color: $font-color-base;
  216. }
  217. .node {
  218. font-size: $font-sm;
  219. color: $font-color-light;
  220. }
  221. }
  222. }
  223. }
  224. /deep/ .uni-radio-input {
  225. width: 45rpx;
  226. height: 45rpx;
  227. }
  228. .row {
  229. display: flex;
  230. align-items: center;
  231. position: relative;
  232. padding: 0 30upx;
  233. height: 110upx;
  234. background: #fff;
  235. .tit {
  236. flex-shrink: 0;
  237. width: 250upx;
  238. font-size: 30upx;
  239. color: $font-color-dark;
  240. }
  241. .input {
  242. flex: 1;
  243. font-size: 30upx;
  244. color: $font-color-dark;
  245. }
  246. .iconlocation {
  247. font-size: 36upx;
  248. color: $font-color-light;
  249. }
  250. }
  251. .tip {
  252. padding: 20rpx;
  253. color: #FD3B39;
  254. }
  255. </style>