fix:去除static以及js文件
This commit is contained in:
parent
9073fd9180
commit
44a175aa66
|
@ -1,28 +0,0 @@
|
||||||
/**
|
|
||||||
* 获取路径参数
|
|
||||||
* @returns {{}}
|
|
||||||
*/
|
|
||||||
function getQueryString() {
|
|
||||||
let qs = location.search.substring(1), // 获取url中"?"符后的字串
|
|
||||||
args = {}, // 保存参数数据的对象
|
|
||||||
items = qs.length ? qs.split("&") : [], // 取得每一个参数项,
|
|
||||||
item = null,
|
|
||||||
len = items.length;
|
|
||||||
|
|
||||||
for(let i = 0; i < len; i++) {
|
|
||||||
item = items[i].split("=");
|
|
||||||
let name = decodeURIComponent(item[0]),
|
|
||||||
value = decodeURIComponent(item[1]);
|
|
||||||
if(name) {
|
|
||||||
args[name] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return args;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 前往首页
|
|
||||||
*/
|
|
||||||
function loginToIndexFn(loginToIndex=getQueryString()["loginToIndex"]){
|
|
||||||
window.location.assign(loginToIndex);
|
|
||||||
}
|
|
|
@ -1,88 +0,0 @@
|
||||||
/**
|
|
||||||
* 获取路径参数
|
|
||||||
*/
|
|
||||||
let myLoginToIndex = "";
|
|
||||||
let registerBind = "";
|
|
||||||
let bindExisting = "";
|
|
||||||
try {
|
|
||||||
let queryString = getQueryString();
|
|
||||||
myLoginToIndex = queryString["loginToIndex"]
|
|
||||||
registerBind = queryString["registerBind"]
|
|
||||||
bindExisting = queryString['bindExisting']
|
|
||||||
} catch (ignore){}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册并绑定
|
|
||||||
*/
|
|
||||||
function registerAndBind(){
|
|
||||||
let email = $("#email").val();
|
|
||||||
$.ajax({
|
|
||||||
url: registerBind,
|
|
||||||
type: 'POST',
|
|
||||||
data: {
|
|
||||||
email: email
|
|
||||||
},
|
|
||||||
success: function (result){
|
|
||||||
if ( result.code === 200 ){
|
|
||||||
window.location.assign(myLoginToIndex);
|
|
||||||
}else {
|
|
||||||
alert(result.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 点击展示或者隐藏绑定输入框
|
|
||||||
*/
|
|
||||||
function show(){
|
|
||||||
let bindChange = document.getElementById("bind");
|
|
||||||
let computedStyle = window.getComputedStyle(bindChange);
|
|
||||||
let displayValue = computedStyle.getPropertyValue("display");
|
|
||||||
let beginValue = displayValue;
|
|
||||||
displayValue = displayValue === "none" ? "block" : "none";
|
|
||||||
$("#bind").css("display", displayValue);
|
|
||||||
$("#register-email").css("display", "none");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 点击展示输入注册邮箱的输入框
|
|
||||||
*/
|
|
||||||
function registerAndBindShow() {
|
|
||||||
let bindChange = document.getElementById("register-email");
|
|
||||||
let computedStyle = window.getComputedStyle(bindChange);
|
|
||||||
let displayValue = computedStyle.getPropertyValue("display");
|
|
||||||
let beginValue = displayValue;
|
|
||||||
displayValue = displayValue === "none" ? "block" : "none";
|
|
||||||
// computedStyle.setProperty("display", displayValue)
|
|
||||||
$("#bind").css("display", "none");
|
|
||||||
$("#register-email").css("display", displayValue);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定已经注册了的账号
|
|
||||||
*/
|
|
||||||
function bindExistingAccount(){
|
|
||||||
let username = document.getElementById("username").value;
|
|
||||||
let password = document.getElementById("password").value;
|
|
||||||
if ( username === "" || password === ""){
|
|
||||||
alert("用户名或者密码未进行输入");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
url: bindExisting,
|
|
||||||
type: 'POST',
|
|
||||||
data: {
|
|
||||||
account: username,
|
|
||||||
password: password
|
|
||||||
},
|
|
||||||
success: function (result){
|
|
||||||
if ( result.code === 200 ){
|
|
||||||
window.location.assign(myLoginToIndex);
|
|
||||||
}else {
|
|
||||||
alert(result.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue