Commit 7cf58ba5 authored by 黄奎's avatar 黄奎

页面修改

parent df8b3b3e
......@@ -198,52 +198,52 @@ namespace Edu.WebApi.Controllers.User
uploadConfig?.UploadDomain
};
}
if (Common.Config.IsPushMessage==1)
{
for (var i = 0; i < 10; i++)
{
Random rd = new Random();
int num = rd.Next(0, 1000);
Common.Message.PushMessageModel model = new Common.Message.PushMessageModel()
{
CategoryId = 0,
Content = DateTime.Now.ToString("yyyyMMdd HH:mm:ss fff") + "推送内容" + i.ToString(),
CoverImg = "",
CreateByName = userInfo.AccountName,
JumpUrl = "",
ReceiveId = userInfo.Id.ToString(),
SendTime = DateTime.Now,
SendType = 0,
Title = DateTime.Now.ToString("yyyyMMdd HH:mm:ss fff") + "推送标题" + i.ToString(),
};
//手机推送
if (num % 4 == 1)
{
model.Platform = 1;
}
//Web推送
else if (num % 4 == 2)
{
model.Platform = 2;
model.ReceiveId = userInfo.Id.ToString();
}
//短信推送
else if (num % 4 == 3)
{
model.Platform = 3;
model.MsgTemplateCode = "短信模板代码";
model.MsgSign = "签名";
model.ReceiveId = "13551126755";
}
//邮件推送
else
{
model.Platform = 4;
model.ReceiveId = "1006186972@qq.com";
}
Common.Message.MessageHelper.SendMessage(model);
}
}
//if (Common.Config.IsPushMessage==1)
//{
// for (var i = 0; i < 10; i++)
// {
// Random rd = new Random();
// int num = rd.Next(0, 1000);
// Common.Message.PushMessageModel model = new Common.Message.PushMessageModel()
// {
// CategoryId = 0,
// Content = DateTime.Now.ToString("yyyyMMdd HH:mm:ss fff") + "推送内容" + i.ToString(),
// CoverImg = "",
// CreateByName = userInfo.AccountName,
// JumpUrl = "",
// ReceiveId = userInfo.Id.ToString(),
// SendTime = DateTime.Now,
// SendType = 0,
// Title = DateTime.Now.ToString("yyyyMMdd HH:mm:ss fff") + "推送标题" + i.ToString(),
// };
// //手机推送
// if (num % 4 == 1)
// {
// model.Platform = 1;
// }
// //Web推送
// else if (num % 4 == 2)
// {
// model.Platform = 2;
// model.ReceiveId = userInfo.Id.ToString();
// }
// //短信推送
// else if (num % 4 == 3)
// {
// model.Platform = 3;
// model.MsgTemplateCode = "短信模板代码";
// model.MsgSign = "签名";
// model.ReceiveId = "13551126755";
// }
// //邮件推送
// else
// {
// model.Platform = 4;
// model.ReceiveId = "1006186972@qq.com";
// }
// Common.Message.MessageHelper.SendMessage(model);
// }
//}
return ApiResult.Success(data: userInfo);
}
......
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