小程序充值默认选中微信支付
This commit is contained in:
parent
6b0308e070
commit
b505e9db4b
|
|
@ -30,11 +30,19 @@ export default OakComponent({
|
|||
},
|
||||
lifetimes: {
|
||||
ready() {
|
||||
const { depositMinCent } = this.props;
|
||||
const { depositMinCent, channel, onSetChannel } = this.props;
|
||||
if (depositMinCent) {
|
||||
this.onPriceChange(ToYuan(depositMinCent), true);
|
||||
}
|
||||
}
|
||||
if (!channel && process.env.OAK_PLATFORM === 'wechatMp') {
|
||||
//小程序环境下默认选择微信支付
|
||||
const { payChannels } = this.state;
|
||||
const wpProduct = payChannels?.find((ele) => ele.entity === 'wpProduct');
|
||||
if (wpProduct) {
|
||||
onSetChannel && onSetChannel(wpProduct);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
listeners: {
|
||||
price() {
|
||||
|
|
|
|||
|
|
@ -33,11 +33,19 @@ export default OakComponent({
|
|||
},
|
||||
lifetimes: {
|
||||
ready() {
|
||||
const { depositMinCent } = this.props;
|
||||
const { depositMinCent, channel, onSetChannel } = this.props;
|
||||
if (depositMinCent) {
|
||||
this.onPriceChange(ToYuan(depositMinCent), true);
|
||||
}
|
||||
}
|
||||
if (!channel && process.env.OAK_PLATFORM === 'wechatMp') {
|
||||
//小程序环境下默认选择微信支付
|
||||
const { payChannels } = this.state;
|
||||
const wpProduct = payChannels?.find((ele: PayChannel) => ele.entity === 'wpProduct');
|
||||
if (wpProduct) {
|
||||
onSetChannel && onSetChannel(wpProduct);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
listeners: {
|
||||
price() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue