Commit 2fcc14ad by 姜雷

修改有订单时条码页显示问题

parent 1afd9990
import Taro, { Component } from '@tarojs/taro';
import Taro, { Component, useEffect } from '@tarojs/taro';
import { ComponentClass } from 'react';
import { View, Canvas, Image, Text } from '@tarojs/components';
......@@ -164,6 +164,12 @@ class BarCode extends Component {
state.orderState.waitPayOrderState,
);
useEffect(() => {
if (!payOrderState) {
this.drawBarCode();
}
}, [payOrderState]);
return (
<View className='BarCode'>
<WaitPayOrderComponent />
......@@ -180,6 +186,7 @@ class BarCode extends Component {
src={RefreshIcon}
onClick={this.refreshCodeBar}
/>
{payOrderState ? null : (
<View className={`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`}>
<Canvas
className={`BarCodeCav ${showBig ? 'show' : ''}`}
......@@ -190,6 +197,8 @@ class BarCode extends Component {
canvasId='BarCode'
/>
</View>
)}
<View className='toggleBtn' onClick={this.toggleBigBarCode}>
<Image
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