Commit b3f4d622 by 黄日华

增加收银台系统卡顿检测反馈

parent 79c4880d
......@@ -10,7 +10,7 @@ export default {
return data;
},
*talkCall(action, {call}) {
const {data} = yield call(api.talkCall);
const {data} = yield call(api.talkCall, action);
return data;
},
*talkLeave(action, {call}) {
......
......@@ -802,7 +802,16 @@ const CounterMixins = ComposeComponent => {
if (barcode) {
const goods = this.goodsMap[barcode];
if (!goods) {
Toast.loading('正在查询商品');
this.timeout = Date.now();
Toast.loading('正在查询商品', 3, () => {
const timeDiff = Date.now() - this.timeout;
if (timeDiff > 2500) {
this.props.dispatch({
type: 'agora/talkCall',
isBug: 1,
});
}
});
}
this.setDelay();
let {goodsArr} = this.state;
......
import axios from 'axios';
import qs from 'qs';
export function agora() {
return axios.post('/store/agora/token');
}
export function talkCall() {
return axios.post('/store/agora/call');
export function talkCall({isBug}) {
return axios.post('/store/agora/call', qs.stringify({isBug}));
}
export function talkLeave() {
......
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