Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
7cf58ba5
Commit
7cf58ba5
authored
Apr 27, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
df8b3b3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
46 deletions
+46
-46
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+46
-46
No files found.
Edu.WebApi/Controllers/User/LoginController.cs
View file @
7cf58ba5
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment