Commit 953db527 by 清晨

8.27提交 判断banSmoke该门店是否能售卖香烟

parent daa61daf
......@@ -73,6 +73,11 @@ export default {
} else {
yield call(AsyncStorage.setItem, 'isInduction', '0');
}
if (data.data && data.data.banSmoke) {
yield call(AsyncStorage.setItem, 'banSmoke', '1');
} else {
yield call(AsyncStorage.setItem, 'banSmoke', '0');
}
if (action.key) {
yield call(AsyncStorage.setItem, 'KEY', action.key);
}
......
......@@ -97,11 +97,13 @@ const CounterMixins = ComposeComponent => {
const stype = await AsyncStorage.getItem('STYPE');
const qrHost = await AsyncStorage.getItem('QRHOST');
const isInduction = await AsyncStorage.getItem('isInduction');
const banSmoke = await AsyncStorage.getItem('banSmoke');
await this.setState({
qrHost,
stype,
isInduction: isInduction === '1',
human: human === '1',
banSmoke: banSmoke === '1',
});
};
......@@ -857,6 +859,12 @@ const CounterMixins = ComposeComponent => {
}
}
}
if (data.data.category && data.data.category.search('烟') !== -1) {
if (this.state.banSmoke) {
Speech.speak('云值守模式下不允许售卖香烟,请把香烟放回原位');
return;
}
}
let price = Number(data.data.price || data.data.prePrice);
if (data.code === 1 && price > 0 && !stopSpecial) {
if (!data.data.num) {
......
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