敢为人鲜小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

253 lines
4.5 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="page">
  3. <!-- 导航栏 -->
  4. <navbar title="提现" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
  5. <!-- 佣金信息 -->
  6. <view class="b-relative center font-m">
  7. <image :src="configList.tx_image" mode="aspectFill" />
  8. <view class="user-money">
  9. <view class="title">总佣金</view>
  10. <view class="money">{{ riceInfo.canWithdraw}}</view>
  11. </view>
  12. <view class="operation">
  13. <view @click="toRunningWater" class="operation-item">
  14. 余额记录
  15. </view>
  16. |
  17. <view @click="toRunningWater" class="operation-item">
  18. 提现记录
  19. </view>
  20. |
  21. <view @click="toRunningWater" class="operation-item">
  22. 佣金记录
  23. </view>
  24. </view>
  25. </view>
  26. <!-- 我要提现 -->
  27. <view class="from-body">
  28. <view class="title">我要提现</view>
  29. <view class="money-form">
  30. <view class="unit">
  31. </view>
  32. <uv-input type="number" placeholder="请输入提现金额" border="surround" v-model.number="form.money"></uv-input>
  33. </view>
  34. </view>
  35. <!-- 提现说明 -->
  36. <view class="withdrawal-statement">
  37. <view class="title">提现说明</view>
  38. <view v-html="configList.recharge_instructions" class="withdrawal-statement" style="color: #666666;"></view>
  39. </view>
  40. <view class="recharge">
  41. <view @click="withdraw" class="btn">
  42. 立即提现
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import mixinsList from '@/mixins/list.js'
  49. import {
  50. mapState
  51. } from 'vuex'
  52. export default {
  53. mixins: [mixinsList],
  54. computed: {
  55. ...mapState(['userInfo', 'riceInfo']),
  56. },
  57. data() {
  58. return {
  59. form: {
  60. money: ''
  61. },
  62. }
  63. },
  64. onShow() {},
  65. methods: {
  66. withdraw() { //立即提现
  67. if (this.form.money < 300) {
  68. return uni.showToast({
  69. title: '未满300元不可提现哦!',
  70. icon: 'none'
  71. })
  72. }
  73. let isOk = this.parameterVerification();
  74. if (isOk && !isOk.auth) {
  75. return uni.showToast({
  76. title: isOk.title,
  77. icon: 'none'
  78. })
  79. }
  80. this.$api('recharge', this.form, res => {
  81. if (res.code == 200) {
  82. uni.showToast({
  83. title: '提现成功',
  84. icon: 'none'
  85. })
  86. this.getUserInfo()
  87. }
  88. })
  89. },
  90. parameterVerification() { //验证用户参数合法性
  91. let {
  92. money
  93. } = this.form
  94. if (!money) {
  95. return {
  96. title: '请填写提现金额',
  97. auth: false
  98. }
  99. }
  100. return {
  101. title: '验证通过',
  102. auth: true
  103. }
  104. },
  105. toRunningWater() {
  106. uni.navigateTo({
  107. url: "/pages_order/mine/runningWater"
  108. })
  109. }
  110. }
  111. }
  112. </script>
  113. <style scoped lang="scss">
  114. .page {
  115. // 佣金信息
  116. .center {
  117. position: relative;
  118. width: 710rpx;
  119. height: 316rpx;
  120. margin: 20rpx auto;
  121. }
  122. .center image {
  123. position: absolute;
  124. left: 0;
  125. top: 0;
  126. width: 710rpx;
  127. height: 316rpx;
  128. border-radius: 12rpx;
  129. }
  130. .center .user-money {
  131. position: absolute;
  132. top: 50%;
  133. transform: translateY(-50%);
  134. z-index: 9;
  135. color: white;
  136. padding-left: 50rpx;
  137. box-sizing: border-box;
  138. .title {
  139. font-size: 36rpx;
  140. }
  141. .money {
  142. font-size: 40rpx;
  143. }
  144. }
  145. .operation {
  146. position: absolute;
  147. bottom: 20rpx;
  148. left: 0rpx;
  149. width: 100%;
  150. display: flex;
  151. justify-content: center;
  152. color: white;
  153. .operation-item {
  154. margin: 0rpx 20rpx;
  155. }
  156. }
  157. // 我要提现
  158. .from-body {
  159. padding: 40rpx 20rpx;
  160. font-size: 28rpx;
  161. text-align: left;
  162. color: #333333;
  163. }
  164. .from-body .title {
  165. font-size: 36rpx;
  166. }
  167. .money-form {
  168. display: flex;
  169. flex-wrap: wrap;
  170. align-items: center;
  171. background: #ebebeb;
  172. border-radius: 10rpx;
  173. margin-top: 20rpx;
  174. }
  175. .money-form .unit {
  176. display: flex;
  177. justify-content: flex-end;
  178. color: $uni-color;
  179. width: 60rpx;
  180. }
  181. &::v-deep .uv-border {
  182. border: none;
  183. }
  184. .money {
  185. margin: 20rpx 0rpx;
  186. }
  187. // 提现说明
  188. .withdrawal-statement {
  189. padding: 0rpx 20rpx;
  190. box-sizing: border-box;
  191. .title {
  192. font-size: 36rpx;
  193. margin-bottom: 20rpx;
  194. }
  195. }
  196. .recharge {
  197. position: fixed;
  198. display: flex;
  199. justify-content: center;
  200. align-items: center;
  201. left: 0;
  202. bottom: 0;
  203. width: 750rpx;
  204. height: 100rpx;
  205. background: white;
  206. }
  207. .recharge .btn {
  208. width: 85%;
  209. height: 80rpx;
  210. border-radius: 40rpx;
  211. color: white;
  212. text-align: center;
  213. line-height: 80rpx;
  214. font-size: 28rpx;
  215. background: $uni-color;
  216. }
  217. @media all and (min-width: 961px) {
  218. .recharge {
  219. left: 50% !important;
  220. transform: translateX(-50%);
  221. }
  222. }
  223. }
  224. </style>