Commit 7257ef82 by 胡悦

修改埋点和修改状态的id

1 parent 5e26af77
......@@ -175,14 +175,14 @@ export default {
const res = await uni.$api.commonApi.updateMessageStatus({
idList
})
this.backPage()
// this.backPage()
// if (res) {
// this.backPage()
// } else {
// console.log('接口返回结果为空,可能存在问题')
// }
} catch (error) {
this.backPage()
// this.backPage()
console.error('更新消息状态时出现错误:', error)
} finally {
this.isProcessing = false; // 处理完成,将标志位设为 false
......
......@@ -28,7 +28,7 @@
</template>
<script>
let timer = null
let countTimer = 3
let countTimer = 1
import dayjs from 'dayjs'
export default {
name: 'MessageDetail',
......@@ -84,8 +84,8 @@ export default {
animationDuration: 100
})
},
async backPage(ids) {
let idList = ids
async backPage(scriptId = null, ids = null) {
let idList = scriptId
if (!idList) {
idList = [this.messageInfo.scriptId];
}
......@@ -95,7 +95,7 @@ export default {
startTime: this.enterTime,
endTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
})
this.back(idList)
this.back(ids)
// if (type == 'read') this.$emit("backHome")
// else if (type == 'view') this.back('MessageList', {firstIndex: 1})
// this.back('MessageList', {firstIndex: 1, tagIndex: this.tagIndex})
......@@ -115,25 +115,29 @@ export default {
async handleCompleted() {
if (this.isProcessing) return;
console.log(this.countFlag)
let scriptId = null
if (this.countFlag) {
try {
this.isProcessing = true;
let idList
idList = [this.messageInfo.scriptId];
idList = [this.messageInfo.id];
scriptId = [this.messageInfo.scriptId]
// this.back(idList)
// 接口调用
const res = await uni.$api.commonApi.updateMessageStatus({
idList
})
if (res) {
this.backPage(idList)
} else {
console.log('接口返回结果为空,可能存在问题')
}
// if (res) {
this.backPage(scriptId, idList)
// } else {
// console.log('接口返回结果为空,可能存在问题')
// }
} catch (error) {
this.backPage()
console.error('更新消息状态时出现错误:', error)
} finally {
this.isProcessing = false; // 处理完成,将标志位设为 false
}
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!