fix: 添加红点及玩家发奖
This commit is contained in:
parent
36b15af077
commit
eed6dd1b8f
@ -3,6 +3,7 @@ import { ReqReceive, ResReceive } from '../../../shared/protocols/event/payForDi
|
|||||||
import { playerCanReceive } from './ApiCanReceive';
|
import { playerCanReceive } from './ApiCanReceive';
|
||||||
import { PublicShared } from "../../../shared/public/public";
|
import { PublicShared } from "../../../shared/public/public";
|
||||||
import { ChatFun } from "../../../public/chat";
|
import { ChatFun } from "../../../public/chat";
|
||||||
|
import { PlayerFun } from "../../../public/player";
|
||||||
|
|
||||||
type diamondWeightGroup = {
|
type diamondWeightGroup = {
|
||||||
weight: number;
|
weight: number;
|
||||||
@ -82,6 +83,7 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
|
|||||||
// 更新成功
|
// 更新成功
|
||||||
if (updateResult.modifiedCount) {
|
if (updateResult.modifiedCount) {
|
||||||
const showOff = gotAmount >= activityData['groupConf']['base']['loglimit'];
|
const showOff = gotAmount >= activityData['groupConf']['base']['loglimit'];
|
||||||
|
await PlayerFun.sendPrize(call, [{ 'a': 'attr', 't': 'rmbmoney', 'n': gotAmount }]);
|
||||||
// 请求返回
|
// 请求返回
|
||||||
call.succ({
|
call.succ({
|
||||||
amount: gotAmount,
|
amount: gotAmount,
|
||||||
|
@ -15,11 +15,12 @@ import {md_redPoint} from '../gongyu/mingdao/ApiOpen';
|
|||||||
import {HongDianFun, HuoDongHongDianFun} from "./fun";
|
import {HongDianFun, HuoDongHongDianFun} from "./fun";
|
||||||
import {FunWeiXiuChang} from "../../public/weixiuchang";
|
import {FunWeiXiuChang} from "../../public/weixiuchang";
|
||||||
import {getShouChongRedPoint} from "../event/shouchong/ApiReceive";
|
import {getShouChongRedPoint} from "../event/shouchong/ApiReceive";
|
||||||
|
import { playerCanReceive } from '../event/payForDiamond/ApiCanReceive';
|
||||||
|
|
||||||
const defaultKeys: hongdianKey[] = ['jiuba', 'jiaotang', 'shouchong', 'clslhd', 'dixiaqianzhuanghd', 'gonghuihd', 'hbzbhd', 'jjchd', 'taskhd',
|
const defaultKeys: hongdianKey[] = ['jiuba', 'jiaotang', 'shouchong', 'clslhd', 'dixiaqianzhuanghd', 'gonghuihd', 'hbzbhd', 'jjchd', 'taskhd',
|
||||||
'xstaskhd', 'lingzhulaixihd', 'dxlthd', 'wzcjhd', 'slzdhd', 'qjzzdhd', 'kuangdonghd', 'qiandaohd', 'kaifukuanghuanhd', 'jijinhd', 'zhuishalinghd',
|
'xstaskhd', 'lingzhulaixihd', 'dxlthd', 'wzcjhd', 'slzdhd', 'qjzzdhd', 'kuangdonghd', 'qiandaohd', 'kaifukuanghuanhd', 'jijinhd', 'zhuishalinghd',
|
||||||
'yibaichouhd', 'huobanzhaomuhd', 'qirileichonghd', 'jierihd', 'kbzzhd', 'wzryhd', 'yuedujijin', 'mingdao', 'patahd',
|
'yibaichouhd', 'huobanzhaomuhd', 'qirileichonghd', 'jierihd', 'kbzzhd', 'wzryhd', 'yuedujijin', 'mingdao', 'patahd',
|
||||||
'heishihd', 'huodonghd', 'renown', 'weixiuchang', 'kaifujingsai', 'zhoumolibao'];
|
'heishihd', 'huodonghd', 'renown', 'weixiuchang', 'kaifujingsai', 'zhoumolibao', 'payForDiamond'];
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqGet, ResGet>) {
|
export default async function (call: ApiCall<ReqGet, ResGet>) {
|
||||||
|
|
||||||
@ -163,6 +164,10 @@ export default async function (call: ApiCall<ReqGet, ResGet>) {
|
|||||||
case 'zhoumolibao':
|
case 'zhoumolibao':
|
||||||
res[key] = await HongDianFun.zhoumolibao(call);
|
res[key] = await HongDianFun.zhoumolibao(call);
|
||||||
break;
|
break;
|
||||||
|
case 'payForDiamond':
|
||||||
|
const receiveResult = await playerCanReceive(call);
|
||||||
|
res[key] = { show: receiveResult && receiveResult.result };
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,8 @@ export type hongdianKey =
|
|||||||
| 'heishiMrjx'
|
| 'heishiMrjx'
|
||||||
| 'weixiuchang'
|
| 'weixiuchang'
|
||||||
| 'kaifujingsai'
|
| 'kaifujingsai'
|
||||||
| 'zhoumolibao';
|
| 'zhoumolibao'
|
||||||
|
| 'payForDiamond';
|
||||||
|
|
||||||
|
|
||||||
export type hongdianVal = {
|
export type hongdianVal = {
|
||||||
|
@ -14969,6 +14969,13 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "zhoumolibao"
|
"literal": "zhoumolibao"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 37,
|
||||||
|
"type": {
|
||||||
|
"type": "Literal",
|
||||||
|
"literal": "payForDiamond"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user