Commit 3cb25454 by 前端

日志优化

1 parent b6fe1123
...@@ -4,20 +4,16 @@ ...@@ -4,20 +4,16 @@
"version" : "0.0", "version" : "0.0",
"configurations" : [ "configurations" : [
{ {
"app-plus" : "app-plus" : {
{
"launchtype" : "remote" "launchtype" : "remote"
}, },
"default" : "default" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"h5" : "h5" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-weixin" : "mp-weixin" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"provider" : "aliyun", "provider" : "aliyun",
......
...@@ -23,7 +23,7 @@ Vue.component("wnCanvas", wnCanvas); ...@@ -23,7 +23,7 @@ Vue.component("wnCanvas", wnCanvas);
Vue.component("UpdateBox", UpdateBox); Vue.component("UpdateBox", UpdateBox);
uni.$api = api; uni.$api = api;
uni.$storage = new Storage(); uni.$storage = new Storage();
uni.$throttle = utils.throttle uni.$throttle = utils.throttle;
Vue.config.productionTip = false; Vue.config.productionTip = false;
App.mpType = "app"; App.mpType = "app";
Vue.prototype.$ossDomain = config.OSS_DOMAIN; Vue.prototype.$ossDomain = config.OSS_DOMAIN;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "展业助手", "name" : "展业助手",
"appid" : "__UNI__D3BD3DF", "appid" : "__UNI__D3BD3DF",
"description" : "", "description" : "",
"versionName" : "1.2.0", "versionName" : "1.4.1",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
......
...@@ -67,11 +67,13 @@ export default { ...@@ -67,11 +67,13 @@ export default {
this.stopAudio(); this.stopAudio();
this.setReceptionStatus(0); this.setReceptionStatus(0);
this.setAudioInfo({ endReasonType: 1 }); this.setAudioInfo({ endReasonType: 1 });
this.$refs.tipBox?.close(); if (this.$refs.tipBox) {
this.$refs.tipBox.close();
let { sceneType } = uni.$storage.get("userInfo"); let { sceneType } = uni.$storage.get("userInfo");
uni.reLaunch({ uni.reLaunch({
url: sceneType == 0 ? "/pages/home/home" : "/pages/boutique/index", url: sceneType == 0 ? "/pages/home/home" : "/pages/boutique/index",
}); });
}
}, },
//结束提示 //结束提示
tipConfirm() { tipConfirm() {
...@@ -210,7 +212,7 @@ export default { ...@@ -210,7 +212,7 @@ export default {
this.$store.state.user.customerInfo; this.$store.state.user.customerInfo;
const { name } = uni.$storage.get("userInfo"); const { name } = uni.$storage.get("userInfo");
this.$sendSentry( this.$sendSentry(
`上传文件失败:手机号-${phoneNumber} 姓名-${customerName} 销售-${staffName} 车型-${carModel} 员工-${name},失败原因-${result}` `重试多次失败:手机号-${phoneNumber} 姓名-${customerName} 销售-${staffName} 车型-${carModel} 员工-${name},失败原因-${result}`
); );
// this.handleErrorFile(res.tempFilePath, UPLOAD_STATUS.fail); // this.handleErrorFile(res.tempFilePath, UPLOAD_STATUS.fail);
...@@ -287,6 +289,9 @@ export default { ...@@ -287,6 +289,9 @@ export default {
// 上传成功 // 上传成功
return result; return result;
} catch (error) { } catch (error) {
if (attempt == 0) {
this.$sendSentry(`第一次上传失败:文件${tempFilePath}`);
}
errorMsg = error; errorMsg = error;
attempt++; attempt++;
// 等待一段时间后重试 // 等待一段时间后重试
...@@ -344,7 +349,7 @@ export default { ...@@ -344,7 +349,7 @@ export default {
}, 1500), }, 1500),
//监听点击事件 //监听点击事件
initTime() { initTime() {
if (!this.audioInfo.audioStatus == "start") return; if (this.audioInfo.audioStatus != "start") return;
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.times++; this.times++;
if (this.times >= this.timeout) { if (this.times >= this.timeout) {
......
...@@ -54,7 +54,20 @@ const uploadFile = function (filePath) { ...@@ -54,7 +54,20 @@ const uploadFile = function (filePath) {
success: function (res) { success: function (res) {
console.log(res, 444); console.log(res, 444);
if (res.statusCode != 200) { if (res.statusCode != 200) {
reject(new Error("上传错误:" + JSON.stringify(res))); reject(
new Error(
"上传错误:" +
JSON.stringify({
statusCode: res.statusCode,
filePath,
key: aliyunFileKey,
policy: policyBase64,
OSSAccessKeyId: lsaccessKeyId,
signature: signature,
"x-oss-security-token": securityToken,
})
)
);
} else { } else {
uni.removeSavedFile({ uni.removeSavedFile({
filePath, filePath,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!