Commit c348a3b4 by 姜雷

Merge branch 'develop' into test

parents f355cd1e 5a1722e1
...@@ -64,6 +64,7 @@ export const AccountComponent = () => { ...@@ -64,6 +64,7 @@ export const AccountComponent = () => {
} }
console.log('in recharge'); console.log('in recharge');
let preAimiItem = filterBeanList.find(item => item.serviceId === '0'); let preAimiItem = filterBeanList.find(item => item.serviceId === '0');
let preAimi = preAimiItem ? preAimiItem.money : 0;
rechargeOrder({ rechargeOrder({
id: payConfigId, id: payConfigId,
customerId: userinfo.customerId, customerId: userinfo.customerId,
...@@ -102,13 +103,7 @@ export const AccountComponent = () => { ...@@ -102,13 +103,7 @@ export const AccountComponent = () => {
let aimiItem = beanAccount.find( let aimiItem = beanAccount.find(
item => item.serviceId === '0', item => item.serviceId === '0',
); );
if ( if (aimiItem && aimiItem.money === preAimi) {
aimiItem &&
aimiItem.money &&
preAimiItem &&
preAimiItem.money &&
aimiItem.money === preAimiItem.money
) {
Taro.showModal({ Taro.showModal({
title: '提示', title: '提示',
content: content:
...@@ -162,7 +157,9 @@ export const AccountComponent = () => { ...@@ -162,7 +157,9 @@ export const AccountComponent = () => {
<View className='Account-Card-label'> <View className='Account-Card-label'>
{creditInfo.showType == '1' ? '我的授信' : '我的保证金'} {creditInfo.showType == '1' ? '我的授信' : '我的保证金'}
</View> </View>
<View className='Account-Card-num'>{creditInfo.amount}</View> <View className='Account-Card-num'>
{creditInfo.amount.toFixed(2)}
</View>
</View> </View>
)} )}
</View> </View>
......
import Taro, { Component } from '@tarojs/taro'; import Taro, { Component, useEffect } from '@tarojs/taro';
import { ComponentClass } from 'react'; import { ComponentClass } from 'react';
import { View, Canvas, Image, Text } from '@tarojs/components'; import { View, Canvas, Image, Text } from '@tarojs/components';
...@@ -164,6 +164,12 @@ class BarCode extends Component { ...@@ -164,6 +164,12 @@ class BarCode extends Component {
state.orderState.waitPayOrderState, state.orderState.waitPayOrderState,
); );
useEffect(() => {
if (!payOrderState) {
this.drawBarCode();
}
}, [payOrderState]);
return ( return (
<View className='BarCode'> <View className='BarCode'>
<WaitPayOrderComponent /> <WaitPayOrderComponent />
...@@ -180,6 +186,7 @@ class BarCode extends Component { ...@@ -180,6 +186,7 @@ class BarCode extends Component {
src={RefreshIcon} src={RefreshIcon}
onClick={this.refreshCodeBar} onClick={this.refreshCodeBar}
/> />
{payOrderState ? null : (
<View className={`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`}> <View className={`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`}>
<Canvas <Canvas
className={`BarCodeCav ${showBig ? 'show' : ''}`} className={`BarCodeCav ${showBig ? 'show' : ''}`}
...@@ -190,6 +197,8 @@ class BarCode extends Component { ...@@ -190,6 +197,8 @@ class BarCode extends Component {
canvasId='BarCode' canvasId='BarCode'
/> />
</View> </View>
)}
<View className='toggleBtn' onClick={this.toggleBigBarCode}> <View className='toggleBtn' onClick={this.toggleBigBarCode}>
<Image <Image
className={`arricon ${showBig ? 'rever' : ''}`} className={`arricon ${showBig ? 'rever' : ''}`}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment