forked from amzik/officemanage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
office.html
187 lines (162 loc) · 8.47 KB
/
office.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo $page_config['title']; ?></title>
<link rel="stylesheet" href="https://cdn.staticfile.org/mdui/0.4.3/css/mdui.min.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/fullPage.js/3.0.8/fullpage.min.css">
<link rel="shortcut icon" type="image/x-icon" href="https://blobs.officehome.msocdn.com/images/content/images/favicon-8f211ea639.ico" />
<style>
.intro {
background: url('https://i.loli.net/2020/01/25/KEScJXCBfAzaIjW.png') no-repeat;
background-size: cover
}
.create-wait {
display: none;
position: absolute;
z-index: 999;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
top: 0
}
.create-wait .mdui-valign {
width: 100%;
height: 100vh;
}
@media screen and (max-width: 600px) {
.screen {
display: none
}
.mdui-toolbar>img {
margin: auto
}
.hero>.mdui-typo-display-3 {
font-size: 27px
}
.hero>.mdui-typo-title-opacity {
font-size: 15px
}
}
</style>
</head>
<body>
<div id="fullpage">
<div class="section intro">
<div class="mdui-appbar mdui-appbar-fixed mdui-color-white">
<div class="mdui-toolbar" style="width: 85%; margin: auto">
<img class="mdui-img-fluid" src="https://i.loli.net/2020/04/21/ST9ru5mwVqUXnKO.png" alt="">
<span class="mdui-typo-display-1 screen">|</span>
<span class="mdui-typo-title screen"><?php echo $page_config['logotitle']; ?></span>
<div class="mdui-toolbar-spacer screen"></div>
</div>
</div>
<div class="mdui-text-color-white-text" align="center" style="width: 70%;margin: auto">
<h1 style="font-size: 40px;font-weight: 500"><?php echo $page_config['title']; ?></h1>
<h1 style="font-size: 40px;font-weight: 500"><?php echo $page_config['line1']; ?></h1>
<h1 style="font-size: 30px;font-weight: 500"><?php echo $page_config['line2']; ?></h1>
<h1 style="font-size: 30px;font-weight: 500"><?php echo $page_config['line3']; ?></h1>
<br><br><br><br>
<a href="#form"><button class="mdui-btn mdui-ripple mdui-color-red mdui-m-a-2" style="width: 140px;height: 50px">立即获取</button></a>
<a href="https://www.office.com/login"><button class="mdui-m-a-2 mdui-btn mdui-ripple mdui-color-white" style="width: 140px;height: 50px">登录</button></a>
</div>
</div>
<div class="section form">
<div class="create-wait">
<div class="mdui-valign">
<div class="mdui-spinner mdui-spinner-colorful mdui-center"></div>
</div>
</div>
<div class="mdui-container">
<div class="mdui-row">
<h2 style="font-size: 40px;font-weight: 500" id="aform">微软全局子号自助开通</h2>
<form id="aform">
<div class="mdui-textfield mdui-textfield-floating-label">
<label class="mdui-textfield-label">姓/Lastname *</label>
<input class="mdui-textfield-input" type="text" name="lastname" pattern="[A-z0-9]{1,10}" required>
<div class="mdui-textfield-error">英文/拼音</div>
</div>
<div class="mdui-textfield mdui-textfield-floating-label">
<label class="mdui-textfield-label">名/Firstname *</label>
<input class="mdui-textfield-input" type="text" name="firstname" pattern="[A-z0-9]{1,10}" required>
<div class="mdui-textfield-error">英文/拼音</div>
</div>
<div class="mdui-textfield mdui-textfield-floating-label">
<label class="mdui-textfield-label">邮箱前缀 *</label>
<input class="mdui-textfield-input" type="text" name="username" pattern="[A-z0-9]{1,50}" required>
<div class="mdui-textfield-error">@ 前面的字符,允许字母/数字</div>
</div>
<?php if($is_invitation_code){ ?>
<div class="mdui-textfield mdui-textfield-floating-label">
<label class="mdui-textfield-label">邀请码</label>
<input class="mdui-textfield-input" type="text" name="invitation_code" pattern="[0-9]{1,50}" required id="invitation_code">
<div class="mdui-textfield-error">请输入邀请码</div>
</div>
<?php } ?>
<input type="submit" class="mdui-btn mdui-ripple mdui-color-yellow" value="提交">
<div style="margin-top: 20px; color: gray">* 提交后账户信息将显示在网页上,请勿刷新</div>
</form>
<div class="ainfo" style="display: none">
<h2 style="font-size: 30px;font-weight: 500">微软全局子号创建成功!</h2>
<label class="mdui-textfield-label">邮箱</label>
<input class="mdui-textfield-input cremail" type="text" value="">
<label class="mdui-textfield-label">初始密码</label>
<input class="mdui-textfield-input crpass" type="text" value="">
<a href="https://www.office.com/login" target="_blank"><button class="mdui-m-t-4 mdui-btn mdui-ripple mdui-color-red" style="width: 140px;height: 50px">前往登录</button></a>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/mdui/0.4.3/js/mdui.min.js"></script>
<script src="https://cdn.staticfile.org/fullPage.js/3.0.8/vendors/scrolloverflow.min.js"></script>
<script src="https://cdn.staticfile.org/fullPage.js/3.0.8/fullpage.min.js"></script>
<script>
$(document).ready(function() {
$('#fullpage').fullpage({
anchors: ['intro', 'form'],
scrollOverflow: true,
verticalCentered: true
});
});
</script>
<script>
$('form').submit(function(e) {
e.preventDefault();
mdui.dialog({
title: '创建账号',
content: '点击确认后开始创建账号,请耐心等待,勿刷新网页',
buttons: [{
text: '取消'
}, {
text: '确认',
onClick: function(inst) {
$('.create-wait').show();
var data = {
lastname:e.target['lastname'].value.trim(),
firstname:e.target['firstname'].value.trim(),
username:e.target['username'].value.trim(),
invitation_code:$('#invitation_code').val(),
};
$.post('',data,function(res){
$('.create-wait').hide();
if(res.code == 0){
console.log(res.data);
$('.cremail').val(res.data.email);
$('.crpass').val(res.data.password);
$('form').hide();
$('.mdui-row>h2').hide();
$('.ainfo').show();
}else{
mdui.alert(res.msg);
}
},'json');
}
}]
});
});
</script>
</body>
</html>