|
|
@@ -1,4 +1,4 @@
|
|
|
-var baseUrl = "http://192.168.3.20/api/";
|
|
|
+var baseUrl = "http://twong.h/api/";
|
|
|
|
|
|
function get(api, data, callback) {
|
|
|
http.ajax({
|
|
|
@@ -48,14 +48,16 @@ function getKey(callback) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function show(text) {
|
|
|
- var dialog = document.getElementById("dialog");
|
|
|
- dialog.style.display = "block";
|
|
|
- document.getElementById("tips").innerHTML = text;
|
|
|
-
|
|
|
- setTimeout(function() {
|
|
|
- dialog.style.display = "none";
|
|
|
- }, 1500);
|
|
|
+function show(text, callback) {
|
|
|
+ var d = dialog({
|
|
|
+ content: text,
|
|
|
+ skin: "dialog-content"
|
|
|
+ });
|
|
|
+ d.show();
|
|
|
+ setTimeout(function () {
|
|
|
+ d.close().remove();
|
|
|
+ if(callback != null) callback();
|
|
|
+ }, 2000);
|
|
|
}
|
|
|
|
|
|
function verify(phone) {
|
|
|
@@ -96,8 +98,9 @@ function register(phone, passwd, code) {
|
|
|
post("register", data, function(result) {
|
|
|
console.log(result);
|
|
|
if (result.status === 200) {
|
|
|
- show("注册成功!");
|
|
|
- document.location.href = "/test";
|
|
|
+ show("注册成功!<br />正在跳转,请稍后...", function () {
|
|
|
+ document.location.href = "http://localhost:8080/#/login";
|
|
|
+ });
|
|
|
} else {
|
|
|
show(result.msg);
|
|
|
}
|