diff --git a/api/pay/wallet.js b/api/pay/wallet.js index 33791bc3..9f57aed4 100644 --- a/api/pay/wallet.js +++ b/api/pay/wallet.js @@ -9,3 +9,13 @@ export function getPayWallet() { export function getWalletTransactionPage(data) { return request.get("app-api/pay/wallet-transaction/page", data); } + +// 获得钱包充值套餐列表 +export function getWalletRechargePackageList() { + return request.get("app-api/pay/wallet-recharge-package/list"); +} + +// 创建钱包充值记录(发起充值) +export function createWalletRecharge(data) { + return request.post("app-api/pay/wallet-recharge/create", data); +} diff --git a/api/trade/afterSale.js b/api/trade/afterSale.js index 88bb83ad..5749a9df 100644 --- a/api/trade/afterSale.js +++ b/api/trade/afterSale.js @@ -14,12 +14,6 @@ export function getAfterSalePage(data) { return request.get("app-api/trade/after-sale/page", data); } -export function getAfterSaleReasonList(way) { - return request.get("app-api/trade/after-sale/get-reason-list", { - way - }); -} - export function createAfterSale(data) { return request.post("app-api/trade/after-sale/create", data); } diff --git a/pages/users/goods_return/index.vue b/pages/users/goods_return/index.vue index 127973c8..c8f18712 100644 --- a/pages/users/goods_return/index.vue +++ b/pages/users/goods_return/index.vue @@ -79,6 +79,7 @@ import { mapGetters } from "vuex"; import * as TradeOrderApi from '@/api/trade/order.js'; import * as AfterSaleApi from '@/api/trade/afterSale.js'; + import * as TradeConfigApi from '@/api/trade/config.js'; export default { data() { return { @@ -94,6 +95,8 @@ reasonIndex: 0, // 选中 reasons 的位置 applyPicUrls: [], // 补充凭证图片 + + tradeConfig: {}, // 交易配置 }; }, computed: mapGetters(['isLogin']), @@ -113,23 +116,25 @@ toLogin(); return; } - if (!options.orderId || !options.orderItemId) { - return this.$util.Tips({ - title:'缺少订单id,无法退款' - },{ - tab: 3, - url:1 - }); - } - this.orderId = parseInt(options.orderId); - this.orderItemId = parseInt(options.orderItemId); - this.getOrderInfo(); - this.getRefundReason(); - }, + if (!options.orderId || !options.orderItemId) { + return this.$util.Tips({ + title:'缺少订单id,无法退款' + },{ + tab: 3, + url:1 + }); + } + this.orderId = parseInt(options.orderId); + this.orderItemId = parseInt(options.orderItemId); + this.getOrderInfo(); + this.getRefundReason(); + this.getTradeConfig(); + }, methods: { onLoadFun:function() { this.getOrderInfo(); this.getRefundReason(); + this.getTradeConfig(); }, /** * 获取订单详情 @@ -147,6 +152,7 @@ }); }) }, + /** * 更改售后方式 */ @@ -165,9 +171,11 @@ */ getRefundReason: function() { const way = this.getWay(); - AfterSaleApi.getAfterSaleReasonList(way).then(res => { - this.reasons = res.data; - }) + if (way === 10) { + this.reasons = this.tradeConfig.afterSaleRefundReasons || []; + } else { + this.reasons = this.tradeConfig.afterSaleReturnReasons || []; + } }, /** * 选择售后原因 @@ -175,6 +183,13 @@ bindPickerChange: function(e) { this.$set(this, 'reasonIndex', e.detail.value); }, + getTradeConfig: function () { + TradeConfigApi.getTradeConfig().then(res => { + this.tradeConfig = res.data || {}; + this.getRefundReason(); + }); + }, + /** * 删除图片 */ diff --git a/pages/users/user_payment/index.vue b/pages/users/user_payment/index.vue index d2850616..5b08e193 100644 --- a/pages/users/user_payment/index.vue +++ b/pages/users/user_payment/index.vue @@ -4,37 +4,43 @@ 我的余额 - ¥{{ userInfo.nowMoney || 0 }} + ¥{{ fen2yuan(wallet.balance || 0) }} {{item}} + - {{ item.price }} + {{ fen2yuan(item.payPrice) }} - 赠送:{{ item.giveMoney }} 元 + 赠送:{{ fen2yuan(item.bonusPrice) }} 元 - - + + 注意事项: - {{ item }} - + {{ item }} + - - + + + + + 提示: - 当前佣金为 ¥{{userInfo.brokeragePrice || 0}} + 当前佣金为 ¥{{ fen2yuan(spreadInfo.brokeragePrice || 0) }} 注意事项: @@ -42,60 +48,46 @@ {{ item }} - - + + - - -