1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"version":3,"file":"withdraw.js","sources":["../../../../../../src/modules/mall/commission/withdraw.vue","../../../../../../uniPage:/bW9kdWxlc1xtYWxsXGNvbW1pc3Npb25cd2l0aGRyYXcudnVl"],"sourcesContent":["<!-- 分佣提现 -->\r\n<template>\r\n <s-layout title=\"申请提现\" class=\"withdraw-wrap\" navbar=\"inner\">\r\n <view class=\"page-bg\"></view>\r\n <view\r\n class=\"wallet-num-box ss-flex ss-col-center ss-row-between\"\r\n :style=\"[\r\n {\r\n marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',\r\n paddingTop: Number(statusBarHeight + 108) + 'rpx',\r\n },\r\n ]\"\r\n >\r\n <view class=\"\">\r\n <view class=\"num-title\">可提现金额(元)</view>\r\n <view class=\"wallet-num\">{{ fen2yuan(state.brokerageInfo.brokeragePrice) }}</view>\r\n </view>\r\n <button\r\n class=\"ss-reset-button log-btn\"\r\n @tap=\"sheep.$router.go('/modules/mall/commission/wallet', { type: 2 })\"\r\n >\r\n 提现记录\r\n </button>\r\n </view>\r\n <!-- 提现输入卡片-->\r\n <view class=\"draw-card\">\r\n <view class=\"bank-box ss-flex ss-col-center ss-row-between ss-m-b-30\">\r\n <view class=\"name\">提现至</view>\r\n <view class=\"bank-list ss-flex ss-col-center\" @tap=\"onAccountSelect(true)\">\r\n <view v-if=\"!state.accountInfo.type\" class=\"empty-text\">请选择提现方式</view>\r\n <view v-if=\"state.accountInfo.type === '1'\" class=\"empty-text\">钱包余额</view>\r\n <view v-if=\"state.accountInfo.type === '2'\" class=\"empty-text\">银行卡转账</view>\r\n <view v-if=\"state.accountInfo.type === '3'\" class=\"empty-text\">微信零钱</view>\r\n <view v-if=\"state.accountInfo.type === '4'\" class=\"empty-text\">支付宝账户</view>\r\n <text class=\"cicon-forward\" />\r\n </view>\r\n </view>\r\n <!-- 提现金额 -->\r\n <view class=\"card-title\">提现金额</view>\r\n <view class=\"input-box ss-flex ss-col-center border-bottom\">\r\n <view class=\"unit\">¥</view>\r\n <uni-easyinput\r\n :inputBorder=\"false\"\r\n class=\"ss-flex-1 ss-p-l-10\"\r\n v-model=\"state.accountInfo.price\"\r\n type=\"number\"\r\n placeholder=\"请输入提现金额\"\r\n />\r\n </view>\r\n <!-- 提现账号 -->\r\n <view class=\"card-title\" v-show=\"['2', '3', '4'].includes(state.accountInfo.type)\">\r\n 提现账号\r\n </view>\r\n <view\r\n class=\"input-box ss-flex ss-col-center border-bottom\"\r\n v-show=\"['2', '3', '4'].includes(state.accountInfo.type)\"\r\n >\r\n <view class=\"unit\" />\r\n <uni-easyinput\r\n :inputBorder=\"false\"\r\n class=\"ss-flex-1 ss-p-l-10\"\r\n v-model=\"state.accountInfo.accountNo\"\r\n placeholder=\"请输入提现账号\"\r\n />\r\n </view>\r\n <!-- 收款码 -->\r\n <view class=\"card-title\" v-show=\"['3', '4'].includes(state.accountInfo.type)\">收款码</view>\r\n <view\r\n class=\"input-box ss-flex ss-col-center\"\r\n v-show=\"['3', '4'].includes(state.accountInfo.type)\"\r\n >\r\n <view class=\"unit\" />\r\n <view class=\"upload-img\">\r\n <s-uploader\r\n v-model:url=\"state.accountInfo.accountQrCodeUrl\"\r\n fileMediatype=\"image\"\r\n limit=\"1\"\r\n mode=\"grid\"\r\n :imageStyles=\"{ width: '168rpx', height: '168rpx' }\"\r\n />\r\n </view>\r\n </view>\r\n <!-- 持卡人姓名 -->\r\n <view class=\"card-title\" v-show=\"state.accountInfo.type === '2'\">持卡人</view>\r\n <view\r\n class=\"input-box ss-flex ss-col-center border-bottom\"\r\n v-show=\"state.accountInfo.type === '2'\"\r\n >\r\n <view class=\"unit\" />\r\n <uni-easyinput\r\n :inputBorder=\"false\"\r\n class=\"ss-flex-1 ss-p-l-10\"\r\n v-model=\"state.accountInfo.name\"\r\n placeholder=\"请输入持卡人姓名\"\r\n />\r\n </view>\r\n <!-- 提现银行 -->\r\n <view class=\"card-title\" v-show=\"state.accountInfo.type === '2'\">提现银行</view>\r\n <view\r\n class=\"input-box ss-flex ss-col-center border-bottom\"\r\n v-show=\"state.accountInfo.type === '2'\"\r\n >\r\n <view class=\"unit\" />\r\n <uni-easyinput\r\n :inputBorder=\"false\"\r\n class=\"ss-flex-1 ss-p-l-10\"\r\n v-model=\"state.accountInfo.bankName\"\r\n placeholder=\"请输入提现银行\"\r\n />\r\n </view>\r\n <!-- 开户地址 -->\r\n <view class=\"card-title\" v-show=\"state.accountInfo.type === '2'\">开户地址</view>\r\n <view\r\n class=\"input-box ss-flex ss-col-center border-bottom\"\r\n v-show=\"state.accountInfo.type === '2'\"\r\n >\r\n <view class=\"unit\" />\r\n <uni-easyinput\r\n :inputBorder=\"false\"\r\n class=\"ss-flex-1 ss-p-l-10\"\r\n v-model=\"state.accountInfo.bankAddress\"\r\n placeholder=\"请输入开户地址\"\r\n />\r\n </view>\r\n <button class=\"ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main\" @tap=\"onConfirm\">\r\n 确认提现\r\n </button>\r\n </view>\r\n\r\n <!-- 提现说明 -->\r\n <view class=\"draw-notice\">\r\n <view class=\"title ss-m-b-30\">提现说明</view>\r\n <view class=\"draw-list\">最低提现金额 {{ fen2yuan(state.minPrice) }} 元</view>\r\n <view class=\"draw-list\">\r\n 冻结佣金:\r\n <text>¥{{ fen2yuan(state.brokerageInfo.frozenPrice) }}</text>\r\n (每笔佣金的冻结期为 {{ state.frozenDays }} 天,到期后可提现)\r\n </view>\r\n </view>\r\n\r\n <!-- 选择提现账户 -->\r\n <account-type-select\r\n :show=\"state.accountSelect\"\r\n @close=\"onAccountSelect(false)\"\r\n round=\"10\"\r\n v-model=\"state.accountInfo\"\r\n :methods=\"state.withdrawTypes\"\r\n />\r\n </s-layout>\r\n</template>\r\n\r\n<script setup>\r\nimport { computed, reactive, onBeforeMount } from 'vue'\r\nimport sheep from '@/sheep'\r\nimport accountTypeSelect from './components/account-type-select.vue'\r\nimport { fen2yuan } from '@/sheep/hooks/useGoods'\r\nimport TradeConfigApi from '@/sheep/api/trade/config'\r\nimport BrokerageApi from '@/sheep/api/trade/brokerage'\r\n\r\nconst headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png')\r\nconst statusBarHeight = sheep.$platform.device.statusBarHeight * 2\r\n\r\nconst userStore = sheep.$store('user')\r\nconst userInfo = computed(() => userStore.userInfo)\r\nconst state = reactive({\r\n accountInfo: {\r\n // 提现表单\r\n type: undefined,\r\n accountNo: undefined,\r\n accountQrCodeUrl: undefined,\r\n name: undefined,\r\n bankName: undefined,\r\n bankAddress: undefined,\r\n },\r\n\r\n accountSelect: false,\r\n\r\n brokerageInfo: {}, // 分销信息\r\n\r\n frozenDays: 0, // 冻结天数\r\n minPrice: 0, // 最低提现金额\r\n withdrawTypes: [], // 提现方式\r\n})\r\n\r\n// 打开提现方式的弹窗\r\nconst onAccountSelect = (e) => {\r\n state.accountSelect = e\r\n}\r\n\r\n// 提交提现\r\nconst onConfirm = async () => {\r\n // 参数校验\r\n debugger\r\n if (\r\n !state.accountInfo.price ||\r\n state.accountInfo.price > state.brokerageInfo.price ||\r\n state.accountInfo.price <= 0\r\n ) {\r\n sheep.$helper.toast('请输入正确的提现金额')\r\n return\r\n }\r\n if (!state.accountInfo.type) {\r\n sheep.$helper.toast('请选择提现方式')\r\n return\r\n }\r\n // 提交请求\r\n const { code } = await BrokerageApi.createBrokerageWithdraw({\r\n ...state.accountInfo,\r\n price: state.accountInfo.price * 100,\r\n })\r\n if (code !== 0) {\r\n return\r\n }\r\n // 提示\r\n uni.showModal({\r\n title: '操作成功',\r\n content: '您的提现申请已成功提交',\r\n cancelText: '继续提现',\r\n confirmText: '查看记录',\r\n success: (res) => {\r\n if (res.confirm) {\r\n sheep.$router.go('/modules/mall/commission/wallet', { type: 2 })\r\n return\r\n }\r\n getBrokerageUser()\r\n state.accountInfo = {}\r\n },\r\n })\r\n}\r\n\r\n// 获得分销配置\r\nasync function getWithdrawRules() {\r\n const { code, data } = await TradeConfigApi.getTradeConfig()\r\n if (code !== 0) {\r\n return\r\n }\r\n if (data) {\r\n state.minPrice = data.brokerageWithdrawMinPrice || 0\r\n state.frozenDays = data.brokerageFrozenDays || 0\r\n state.withdrawTypes = data.brokerageWithdrawTypes\r\n }\r\n}\r\n\r\n// 获得分销信息\r\nasync function getBrokerageUser() {\r\n const { data, code } = await BrokerageApi.getBrokerageUser()\r\n if (code === 0) {\r\n state.brokerageInfo = data\r\n }\r\n}\r\n\r\nonBeforeMount(() => {\r\n getWithdrawRules()\r\n getBrokerageUser()\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n:deep() {\r\n .uni-input-input {\r\n font-family: OPPOSANS !important;\r\n }\r\n}\r\n\r\n.wallet-num-box {\r\n padding: 0 40rpx 80rpx;\r\n background: var(--ui-BG-Main) v-bind(headerBg) center/750rpx 100% no-repeat;\r\n border-radius: 0 0 5% 5%;\r\n\r\n .num-title {\r\n margin-bottom: 20rpx;\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n color: $white;\r\n }\r\n\r\n .wallet-num {\r\n font-family: OPPOSANS;\r\n font-size: 60rpx;\r\n font-weight: 500;\r\n color: $white;\r\n }\r\n\r\n .log-btn {\r\n width: 170rpx;\r\n height: 60rpx;\r\n padding: 0;\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n line-height: 60rpx;\r\n color: $white;\r\n border: 1rpx solid $white;\r\n border-radius: 30rpx;\r\n }\r\n}\r\n\r\n// 提现输入卡片\r\n.draw-card {\r\n position: relative;\r\n z-index: 3;\r\n box-sizing: border-box;\r\n width: 690rpx;\r\n min-height: 560rpx;\r\n padding: 30rpx;\r\n margin: -60rpx 30rpx 30rpx 30rpx;\r\n background-color: $white;\r\n border-radius: 20rpx;\r\n\r\n .card-title {\r\n margin-bottom: 30rpx;\r\n font-size: 30rpx;\r\n font-weight: 500;\r\n }\r\n\r\n .bank-box {\r\n .name {\r\n font-size: 28rpx;\r\n font-weight: 500;\r\n }\r\n\r\n .bank-list {\r\n .empty-text {\r\n font-size: 28rpx;\r\n font-weight: 400;\r\n color: $dark-9;\r\n }\r\n\r\n .cicon-forward {\r\n color: $dark-9;\r\n }\r\n }\r\n\r\n .input-box {\r\n width: 624rpx;\r\n height: 100rpx;\r\n margin-bottom: 40rpx;\r\n\r\n .unit {\r\n font-size: 48rpx;\r\n font-weight: 500;\r\n color: #333;\r\n }\r\n\r\n .uni-easyinput__placeholder-class {\r\n height: 36rpx;\r\n font-size: 30rpx;\r\n }\r\n\r\n :deep(.uni-easyinput__content-input) {\r\n font-size: 48rpx;\r\n }\r\n }\r\n\r\n .save-btn {\r\n width: 616rpx;\r\n height: 86rpx;\r\n margin-top: 80rpx;\r\n line-height: 86rpx;\r\n border-radius: 40rpx;\r\n }\r\n }\r\n\r\n .bind-box {\r\n .placeholder-text {\r\n font-size: 26rpx;\r\n color: $dark-9;\r\n }\r\n\r\n .add-btn {\r\n width: 100rpx;\r\n height: 50rpx;\r\n font-size: 22rpx;\r\n line-height: 50rpx;\r\n color: var(--ui-BG-Main);\r\n background-color: var(--ui-BG-Main-light);\r\n border-radius: 25rpx;\r\n }\r\n }\r\n\r\n .input-box {\r\n width: 624rpx;\r\n height: 100rpx;\r\n margin-bottom: 40rpx;\r\n\r\n .unit {\r\n font-size: 48rpx;\r\n font-weight: 500;\r\n color: #333;\r\n }\r\n\r\n .uni-easyinput__placeholder-class {\r\n font-size: 30rpx;\r\n }\r\n\r\n :deep(.uni-easyinput__content-input) {\r\n font-size: 48rpx;\r\n }\r\n }\r\n\r\n .save-btn {\r\n width: 616rpx;\r\n height: 86rpx;\r\n margin-top: 80rpx;\r\n line-height: 86rpx;\r\n border-radius: 40rpx;\r\n }\r\n}\r\n\r\n// 提现说明\r\n.draw-notice {\r\n box-sizing: border-box;\r\n width: 684rpx;\r\n padding: 30rpx;\r\n margin: 20rpx 32rpx 0 32rpx;\r\n background: #ffffff;\r\n border: 2rpx solid #fffaee;\r\n border-radius: 20rpx;\r\n\r\n .title {\r\n font-size: 30rpx;\r\n font-weight: 500;\r\n color: #333333;\r\n }\r\n\r\n .draw-list {\r\n font-size: 24rpx;\r\n line-height: 46rpx;\r\n color: #999999;\r\n }\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/App/Work/addr/acdr-ui/src/modules/mall/commission/withdraw.vue'\nwx.createPage(MiniProgramPage)"],"names":["sheep","computed","reactive","BrokerageApi","uni","TradeConfigApi","onBeforeMount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA,MAAA,oBAAA,MAAA;;;;;;;AAKA,UAAA,WAAAA,YAAA,MAAA,KAAA,IAAA,uCAAA;AACA,UAAA,kBAAAA,YAAAA,MAAA,UAAA,OAAA,kBAAA;AAEA,UAAA,YAAAA,YAAAA,MAAA,OAAA,MAAA;AACAC,kBAAAA,SAAA,MAAA,UAAA,QAAA;AACA,UAAA,QAAAC,cAAAA,SAAA;AAAA,MACA,aAAA;AAAA;AAAA,QAEA,MAAA;AAAA,QACA,WAAA;AAAA,QACA,kBAAA;AAAA,QACA,MAAA;AAAA,QACA,UAAA;AAAA,QACA,aAAA;AAAA,MACA;AAAA,MAEA,eAAA;AAAA,MAEA,eAAA,CAAA;AAAA;AAAA,MAEA,YAAA;AAAA;AAAA,MACA,UAAA;AAAA;AAAA,MACA,eAAA,CAAA;AAAA;AAAA,IACA,CAAA;AAGA,UAAA,kBAAA,CAAA,MAAA;AACA,YAAA,gBAAA;AAAA,IACA;AAGA,UAAA,YAAA,MAAA;AAEA;AACA,UACA,CAAA,MAAA,YAAA,SACA,MAAA,YAAA,QAAA,MAAA,cAAA,SACA,MAAA,YAAA,SAAA,GACA;AACAF,0BAAA,QAAA,MAAA,YAAA;AACA;AAAA,MACA;AACA,UAAA,CAAA,MAAA,YAAA,MAAA;AACAA,0BAAA,QAAA,MAAA,SAAA;AACA;AAAA,MACA;AAEA,YAAA,EAAA,KAAA,IAAA,MAAAG,0BAAAA,aAAA,wBAA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