fix
This commit is contained in:
parent
d31edfef76
commit
f2b2fc5ea6
|
@ -1,4 +1,5 @@
|
|||
const config = {
|
||||
release: true,
|
||||
storagePrefix: "worker_",
|
||||
appId: "wx2401c65b68a6c9b5",
|
||||
root: "https://www.anzhuangxiong.com/api.php"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import $storage from '@/core/storage'
|
||||
import $config from '@/core/config'
|
||||
|
||||
function time() {
|
||||
return parseInt(Math.round(new Date() / 1000));
|
||||
|
@ -262,6 +263,12 @@ function callPhone(phoneNumber) {
|
|||
});
|
||||
}
|
||||
|
||||
function modelExceptionHandler(exception) {
|
||||
if (!$config.release) {
|
||||
toast(exception);
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
time,
|
||||
datetime,
|
||||
|
@ -277,4 +284,5 @@ export default {
|
|||
formatNumber,
|
||||
chooseImage,
|
||||
callPhone,
|
||||
modelExceptionHandler,
|
||||
}
|
||||
|
|
|
@ -45,7 +45,9 @@ export default {
|
|||
return resolve(list);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -117,7 +119,9 @@ export default {
|
|||
return resolve(order);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -130,7 +134,9 @@ export default {
|
|||
return resolve(response.msg);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,9 @@ export default {
|
|||
return resolve(list);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -160,7 +162,9 @@ export default {
|
|||
return resolve(order);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -173,7 +177,9 @@ export default {
|
|||
return resolve(response);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -186,7 +192,9 @@ export default {
|
|||
return resolve(response);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -199,7 +207,9 @@ export default {
|
|||
return resolve(response);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,9 @@ export default {
|
|||
return resolve(response.data);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -149,7 +151,9 @@ export default {
|
|||
});
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,9 @@ export default {
|
|||
}).then((response) => {
|
||||
prototype.$storage.set("open_id", response.data.openid);
|
||||
return resolve(response.data);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
@ -66,7 +68,9 @@ export default {
|
|||
} else {
|
||||
return reject(response.msg);
|
||||
}
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -123,7 +127,9 @@ export default {
|
|||
} else {
|
||||
return reject(response.msg);
|
||||
}
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -156,7 +162,9 @@ export default {
|
|||
} else {
|
||||
return reject(response.msg);
|
||||
}
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -185,7 +193,9 @@ export default {
|
|||
} else {
|
||||
return reject(response.msg);
|
||||
}
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -206,7 +216,9 @@ export default {
|
|||
return resolve(response.msg);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -222,7 +234,9 @@ export default {
|
|||
return resolve(response.msg);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -251,7 +265,9 @@ export default {
|
|||
return resolve(response);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -266,7 +282,9 @@ export default {
|
|||
return resolve(response.data);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -281,7 +299,9 @@ export default {
|
|||
return resolve();
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
appraise: {
|
||||
|
@ -294,7 +314,9 @@ export default {
|
|||
return resolve(response.data);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
list(data) {
|
||||
|
@ -322,7 +344,9 @@ export default {
|
|||
return resolve(list);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -346,7 +370,9 @@ export default {
|
|||
return resolve(list);
|
||||
}
|
||||
return reject(response.msg);
|
||||
}).catch(e => { });
|
||||
}).catch(e => {
|
||||
prototype.$utils.modelExceptionHandler(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue