|
|
@@ -212,7 +212,7 @@ export class TaskService implements OnModuleInit {
|
|
|
return task
|
|
|
}
|
|
|
|
|
|
- getMessage(task: Task, taskItem: TaskItem) {
|
|
|
+ getMessage(task: Task) {
|
|
|
let message = task.message
|
|
|
if (!message) {
|
|
|
return ''
|
|
|
@@ -225,7 +225,9 @@ export class TaskService implements OnModuleInit {
|
|
|
// 内容混淆
|
|
|
if (task.confusion !== ConfusionType.NONE) {
|
|
|
const timestamp = Math.round(Date.now() / 1000)
|
|
|
- const confusionText = `${task.id}-${taskItem.id}-msg-${timestamp}`
|
|
|
+ // 六位随机数
|
|
|
+ const randomNumber = Math.floor(Math.random() * 1000000)
|
|
|
+ const confusionText = `${task.id}-${randomNumber}-msg-${timestamp}`
|
|
|
|
|
|
switch (task.confusion) {
|
|
|
case ConfusionType.HEAD:
|
|
|
@@ -819,14 +821,14 @@ export class TaskService implements OnModuleInit {
|
|
|
})(),
|
|
|
(async () => {
|
|
|
try {
|
|
|
- const panelRes = await panelInstance.get('account',{
|
|
|
+ const panelRes = await panelInstance.get('account', {
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
Accept: 'application/json',
|
|
|
'X-API-Key': 'wpJohESEZsjW1LtlyoGwZw53'
|
|
|
}
|
|
|
})
|
|
|
- if (panelRes.data){
|
|
|
+ if (panelRes.data) {
|
|
|
res.usapanel = panelRes.data.balance
|
|
|
}
|
|
|
} catch (e) {}
|
|
|
@@ -1335,7 +1337,7 @@ export class TaskService implements OnModuleInit {
|
|
|
devices.map(async (device, i) => {
|
|
|
const items = taskItems
|
|
|
.slice(i * 5, i * 5 + 5)
|
|
|
- .map((item) => ({ ...item, message: this.getMessage(task, item), img: task.img }))
|
|
|
+ .map((item) => ({ ...item, message: this.getMessage(task), img: task.img }))
|
|
|
if (items.length === 0) return
|
|
|
try {
|
|
|
const res: any = await this.eventsGateway.sendForResult(
|