|
|
@@ -380,13 +380,18 @@ function handleFlowManagement() {
|
|
|
if (!rspData) {
|
|
|
return;
|
|
|
}
|
|
|
- let regex = /\(\{timeNum:-?\d+,timeType:"AM"\}\)/g;
|
|
|
- let newValue = '({timeNum:120,timeType:"AM"})';
|
|
|
- let outputString = rspData.replace(regex, newValue);
|
|
|
- regex = /\(\{timeNum:-?\d+,timeType:"PM"\}\)/g;
|
|
|
- newValue = '({timeNum:120,timeType:"PM"})';
|
|
|
- outputString = outputString.replace(regex, newValue);
|
|
|
- gRetBody = outputString;
|
|
|
+ let outputString = rspData;
|
|
|
+ if (outputString.indexOf('timeType:"AM"') != -1) {
|
|
|
+ let regex = /\(\{timeNum:-?\d+,timeType:"AM"\}\)/g;
|
|
|
+ let newValue = '({timeNum:120,timeType:"AM"})';
|
|
|
+ outputString = outputString.replace(regex, newValue);
|
|
|
+ gRetBody = outputString;
|
|
|
+ } else if (outputString.indexOf('timeType:"PM"') != -1) {
|
|
|
+ let regex = /\(\{timeNum:-?\d+,timeType:"PM"\}\)/g;
|
|
|
+ let newValue = '({timeNum:120,timeType:"PM"})';
|
|
|
+ outputString = outputString.replace(regex, newValue);
|
|
|
+ gRetBody = outputString;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function handleGrabCoupon() {
|