Vue.component("pay-method-selector", { mounted: function () { this.$emit("change", this.currentMethodCode) let that = this Tea.action("/finance/methodOptions") .success(function (resp) { that.isLoading = false that.balance = resp.data.balance that.methods = resp.data.methods that.canPay = resp.data.enablePay }) .post() }, data: function () { return { isLoading: true, canPay: true, balance: 0, methods: [], currentMethodCode: "@balance" } }, methods: { selectMethod: function (method) { this.currentMethodCode = method.code this.$emit("change", method.code) } }, template: `
余额支付 ({{balance}}元)

使用余额支付

{{method.name}}

{{method.description}}

暂时不支持线上支付,请联系客服购买。
` })