Commit 099628d4 authored by Damon's avatar Damon

feat: 小程序进入后台记录图片日志

parent a6352607
...@@ -4,6 +4,8 @@ import { AnalysysAgent } from "@/utils/analysys_paas.js"; ...@@ -4,6 +4,8 @@ import { AnalysysAgent } from "@/utils/analysys_paas.js";
import util from "@/utils/util.js"; import util from "@/utils/util.js";
import login from "@/utils/login.js"; import login from "@/utils/login.js";
import upload from '@/components/upload/task.js' import upload from '@/components/upload/task.js'
import { ERROR } from "@/common/log.js"
export default { export default {
globalData: { globalData: {
// 开发环境 // 开发环境
...@@ -74,8 +76,6 @@ export default { ...@@ -74,8 +76,6 @@ export default {
this.getSystemInfo(); this.getSystemInfo();
// 系统自动登录::每次运行小程序重新获取用户信息 // 系统自动登录::每次运行小程序重新获取用户信息
await this.autoLogin(); await this.autoLogin();
//this.deleteTempImg()
}, },
onShow: function () { onShow: function () {
// 应用启动,或从后台进入前台显示 // 应用启动,或从后台进入前台显示
...@@ -85,6 +85,9 @@ export default { ...@@ -85,6 +85,9 @@ export default {
}, },
onHide: function () { onHide: function () {
// 应用从前台进入后台 // 应用从前台进入后台
if (this.uploadTask.length > 0) {
ERROR('onUnload', {task: this.uploadTask.length, mobile: this.vuex_user.mobile})
}
}, },
watch: { watch: {
uploadTask: function(newValue, oldValue) { uploadTask: function(newValue, oldValue) {
...@@ -92,18 +95,6 @@ export default { ...@@ -92,18 +95,6 @@ export default {
} }
}, },
methods: { methods: {
// 处理已上传完成的图片
deleteTempImg() {
const result = uni.getStorageSync('delImg')
if (result.length > 0) {
for (let i of result) {
uni.removeSavedFile({
filePath: i
})
}
uni.setStorageSync('delImg', [])
}
},
getSystemInfo() { getSystemInfo() {
try { try {
let a = this.$u.sys(); let a = this.$u.sys();
......
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