觉醒时刻
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.5 KiB

1 week ago
import User from "../../../FrameWork/User/User";
import TaskManager, { MainTaskIdEnum } from "../../JuQingChat/TaskManager";
export default class MaoYiFenHongManager {
public static MaoYiFenHongConfig = [
{dingDanIndex:1,moneyArr:[150000,180000,220000,260000,300000]},
{dingDanIndex:2,moneyArr:[600000,825000,900000,975000,1050000]},
{dingDanIndex:3,moneyArr:[800000,1200000,1600000,2000000,2400000]},
{dingDanIndex:4,moneyArr:[6000000,7500000,9000000,10500000,12000000]},
{dingDanIndex:5,moneyArr:[60000000,70000000,80000000,90000000,100000000]},
{dingDanIndex:6,moneyArr:[120000000,144000000,160000000,176000000,192000000]},
{dingDanIndex:7,moneyArr:[450000000,540000000,600000000,660000000,720000000]},
{dingDanIndex:8,moneyArr:[800000000,1140000000,1480000000,1820000000,2040000000]},
{dingDanIndex:9,moneyArr:[5000000000,6500000000,8000000000,9500000000,11500000000]},
{dingDanIndex:10,moneyArr:[15000000000,17000000000,19000000000,23000000000,26000000000]},
{dingDanIndex:11,moneyArr:[35000000000,37000000000,40000000000,43000000000,45000000000]},
]
public static getConfigByDingDanIndex(index) {
for (let i = 0; i < this.MaoYiFenHongConfig.length; i++) {
if (index == this.MaoYiFenHongConfig[i].dingDanIndex) {
return this.MaoYiFenHongConfig[i]
}
}
}
public static checkIsShowMaoYiFenHong() {
// let mainTaskInfo: any = TaskManager.getCurUnLockMainTaskInfo()
// let mainId = mainTaskInfo.Id
let isShow = false
//第x张订单
let daoYeIndex = User.getDaoyeIndex()
//指定任务且无订单状态且剩余次数>0时显示
for(let i=0;i<this.MaoYiFenHongConfig.length;i++){
if(daoYeIndex == this.MaoYiFenHongConfig[i].dingDanIndex){
let daoYeList = User.getDaoyeGoodList()
if (daoYeList.length <= 0 && User.getMaoYiFenHongTimes() > 0) {
isShow = true
}
break
}
}
return isShow
}
// public static checkIsZhiDingTask(){
// let mainTaskInfo: any = TaskManager.getCurUnLockMainTaskInfo()
// let mainId = mainTaskInfo.Id
// for(let i=0;i<this.MaoYiFenHongConfig.length;i++){
// if(mainId == this.MaoYiFenHongConfig[i].taskId){
// return true
// }
// }
// return false
// }
}