Commit 96591f73 by 姜雷

添加说明文字

parent 23fddec7
...@@ -73,4 +73,8 @@ page { ...@@ -73,4 +73,8 @@ page {
transform: rotate(180deg); transform: rotate(180deg);
} }
} }
.warnning {
margin: 80px 20px 0;
color: #f10000;
}
} }
...@@ -200,9 +200,13 @@ class BarCode extends Component { ...@@ -200,9 +200,13 @@ class BarCode extends Component {
} }
drawBarCode() { drawBarCode() {
const { userinfo } = this.props; const { userinfo } = this.props;
let idBar = userinfo.idBar.substring(0, userinfo.idBar.length - 2) + '04'; if (userinfo.idBar && userinfo.idBar.length > 2) {
wxbarcode.barcode('BarCode', idBar, 646, 188); let idBar = userinfo.idBar.substring(0, userinfo.idBar.length - 2) + '04';
wxbarcode.barcode('BarCodeBig', idBar, 700, 364); wxbarcode.barcode('BarCode', idBar, 646, 188);
wxbarcode.barcode('BarCodeBig', idBar, 700, 364);
} else {
this.refreshCodeBar();
}
} }
toggleBigBarCode() { toggleBigBarCode() {
...@@ -277,6 +281,10 @@ class BarCode extends Component { ...@@ -277,6 +281,10 @@ class BarCode extends Component {
/> />
</View> </View>
</View> </View>
<View className='warnning'>
如扫描条码终端无响应,请刷新条码后重试!
</View>
</View> </View>
); );
} }
......
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