123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- @using WeOnlineApp.Configuration
- @{
- Layout = "~/Views/Shared/Layout/_Layout.Play.cshtml";
- ViewBag.PageId = "start";
- ViewBag.Title = "输入邀请码";
- }
- <link href="~/Content/Css/input.min.css" rel="stylesheet" />
- <style>
- .code-box {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .code-title {
- margin-bottom: 30px;
- text-align: center;
- color: #008080;
- }
- </style>
- <div class="code-box">
- <div style="width: 50%;margin-top: -10%">
- <h4 class="code-title">请填写邀请码加入演练</h4>
- <div class="controls">
- <input type="text" id="code" class="float-label required" name="name" autocomplete="off">
- <label for="code"><i class="fa fa-edit"></i> 邀请码</label>
- </div>
- <div class="controls">
- <button type="button" onclick="Go()">加入演练</button>
- </div>
- </div>
- </div>
- @section scripts
- {
- <script>
- $(function() {
- InputFloatLabel(".float-label");
- });
- function Go() {
- var code = $('#code').val();
- if (code) {
- $.iwbAjax1({
- url: abp.appUrl +"campPlay/GetPlayByCode?code="+code,
- success: function (res) {
- if (res) {
- if (res.playState == @(CampPlayStateDefinition.New)) {
- window.location.href = "/play/run/" + code;
- } else {
- abp.message.warn("演练已开始,不能加入!");
- }
- } else {
- abp.message.warn("邀请码错误,未查询到演练!");
- }
- }
- });
- } else {
- abp.message.warn("请填写邀请码!");
- }
- }
- </script>
- }
|