宜轩到家/服务到家第三版,换个颜色
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.

266 lines
5.8 KiB

8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
  1. <template>
  2. <view class="content">
  3. <mNavbar title="分销代理" :leftClick="leftClick" />
  4. <view class="banner" />
  5. <view class="b-relative center font-m">
  6. <image src="/static/ms/1120.jpg" />
  7. <view class="title" style="position: absolute; top: 40rpx; left: 40rpx">
  8. <view style="line-height: 40rpx; font-size: 28rpx">账号余额</view>
  9. <view style="line-height: 60rpx; font-size: 40rpx">{{ belece.money }}</view>
  10. </view>
  11. <view class="font-menu flex flex-sb">
  12. <view @click="toRunningWater(0)">充值记录</view>
  13. <view @click="toRunningWater(1)">提现记录</view>
  14. <view @click="toRunningWater(2)">下单记录</view>
  15. <view @click="toRunningWater(3)">佣金记录</view>
  16. </view>
  17. </view>
  18. <view class="from-body">
  19. <view>我要提现</view>
  20. <view class="from-line">
  21. <input placeholder="请输入提现金额" v-model="form.price"/>
  22. </view>
  23. <!-- <view class="from-line">
  24. <input placeholder="请输入姓名" v-model="form.name"/>
  25. </view> -->
  26. <!-- <view class="from-line">
  27. <input placeholder="请输入电话" v-model="form.phone"/>
  28. </view> -->
  29. <view class="from-line">
  30. <input placeholder="请输入开户行" v-model="form.bank"/>
  31. </view>
  32. <view class="from-line">
  33. <input placeholder="请输入银行卡卡号" v-model="form.card"/>
  34. </view>
  35. <!-- <view class="mt56">提现说明</view> -->
  36. <view style="line-height: 45rpx; font-size: 24rpx;color: #666666;"
  37. v-html="notice">
  38. </view>
  39. <!-- <p>1本次提现必须通过银行卡提现暂不支持其他途径</p>
  40. <p>2如若遇到24小时提现未到账请联系客服</p> -->
  41. </view>
  42. <view class="b-fiexd">
  43. <view class="button-submit"
  44. @click="submit">提交</view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import mNavbar from '../../components/base/m-navbar.vue'
  50. export default {
  51. components: {
  52. mNavbar,
  53. },
  54. data() {
  55. return {
  56. config : [],
  57. notice : '',
  58. form : {
  59. type : 1
  60. },
  61. userInfo : {},
  62. belece : {}
  63. }
  64. },
  65. onShow() {
  66. this.getUserInfo()
  67. this.getConfig()
  68. },
  69. methods: {
  70. getUserInfo() {
  71. this.$api('giveTenInfo', {}, res => {
  72. if (res.code == 200) {
  73. this.userInfo = res.result.msgTen;
  74. this.belece = res.result.belece;
  75. }
  76. })
  77. },
  78. leftClick() { //返回个人中心
  79. uni.switchTab({
  80. url: '/pages/index/center'
  81. })
  82. },
  83. getConfig() {
  84. this.vid = uni.getStorageSync("ivcode");
  85. this.$api('getConfig', {} ,res => {
  86. if(res.code == 200){
  87. res.result.forEach(n => {
  88. if(n.keyValue == 'withdraw'){
  89. this.notice = n.content
  90. }
  91. })
  92. this.config = res.result
  93. }
  94. })
  95. },
  96. submit(){ //立即提现
  97. let isOk = this.parameterVerification();
  98. if(isOk && !isOk.auth){
  99. return uni.showToast({
  100. title : isOk.title,
  101. icon : 'none'
  102. })
  103. }
  104. this.$api('giveWithdrawal', this.form, res => {
  105. if (res.code == 200) {
  106. uni.showToast({
  107. title: '提现成功',
  108. icon: 'none'
  109. })
  110. setTimeout(uni.navigateBack, 1000, -1)
  111. }
  112. })
  113. },
  114. parameterVerification(){ //验证用户参数合法性
  115. let { price , bank , card, phone } = this.form
  116. // if(!phone){
  117. // return { title : '请填写联系电话' , auth : false }
  118. // }
  119. if(!price){
  120. return { title : '请填写提现金额' , auth : false }
  121. }else if(price <= 0){
  122. return { title : '提现金额必须大于0' , auth : false }
  123. }else if(price > this.belece.money){
  124. return { title : '提现金额大于余额' , auth : false }
  125. }else if(bank.trim() == ''){
  126. return { title : '请填写开户行' , auth : false }
  127. }else if(card.trim() == ''){
  128. return { title : '请填写卡号' , auth : false }
  129. }
  130. return { title : '验证通过' , auth : true }
  131. },
  132. toRunningWater(status) { //跳转流水页面
  133. uni.navigateTo({
  134. url: `/pages/mine/runningWater?status=${status}`
  135. })
  136. }
  137. }
  138. }
  139. </script>
  140. <style scoped lang="scss">
  141. body {
  142. background-color: #fff;
  143. }
  144. .banner {
  145. width: 100vw;
  146. height: 256rpx;
  147. background: rgba($uni-color, 0.2);
  148. }
  149. .center {
  150. width: 710rpx;
  151. height: 316rpx;
  152. margin: -204rpx auto 0;
  153. }
  154. .center image {
  155. width: 710rpx;
  156. height: 316rpx;
  157. border-radius: 12rpx;
  158. }
  159. .font-m {
  160. font-family: PingFang SC, PingFang SC-Bold;
  161. font-weight: 700;
  162. text-align: left;
  163. color: #ffffff;
  164. text-shadow: 0 4rpx 6rpx 0 rgba($uni-color, 0.81);
  165. }
  166. .font-menu {
  167. font-size: 24rpx;
  168. font-family: PingFang SC, PingFang SC-Regular;
  169. font-weight: 500;
  170. text-align: center;
  171. color: #ffffff;
  172. line-height: 24rpx;
  173. width: 710rpx;
  174. position: absolute;
  175. left: 0;
  176. bottom: 25rpx;
  177. }
  178. .font-menu view {
  179. width: calc(100% / 4);
  180. border-right: 1rpx solid #fff;
  181. }
  182. .item-line input {
  183. width: 456rpx;
  184. height: 60rpx;
  185. line-height: 60rpx;
  186. background: #f5f5f5;
  187. border-radius: 12rpx;
  188. font-size: 24rpx;
  189. font-family: PingFang SC, PingFang SC-Medium;
  190. font-weight: 500;
  191. text-align: left;
  192. color: #939393;
  193. padding: 0 20rpx;
  194. }
  195. .from-body {
  196. padding: 40rpx 20rpx;
  197. font-size: 28rpx;
  198. font-family: PingFang SC, PingFang SC-Bold;
  199. font-weight: 700;
  200. text-align: left;
  201. color: #333333;
  202. line-height: 40px;
  203. padding-bottom: 160rpx;
  204. }
  205. .from-line {
  206. margin-top: 40rpx;
  207. }
  208. .from-body input {
  209. width: 612rpx;
  210. height: 90rpx;
  211. line-height: 90rpx;
  212. background: #f5f5f5;
  213. border-radius: 46rpx;
  214. padding: 0 50rpx;
  215. font-size: 28rpx;
  216. font-family: PingFang SC, PingFang SC-Regular;
  217. font-weight: 400;
  218. text-align: left;
  219. color: #333;
  220. }
  221. .button-submit {
  222. width: 596rpx;
  223. height: 90rpx;
  224. line-height: 90rpx;
  225. background: $uni-bg-color;
  226. color: $uni-color;
  227. border-radius: 46rpx;
  228. margin: 20rpx auto;
  229. font-size: 28rpx;
  230. font-family: PingFang SC, PingFang SC-Regular;
  231. font-weight: 400;
  232. text-align: center;
  233. }
  234. </style>