This commit is contained in:
parent
575300a4cf
commit
1d70fefc93
24
js/app.js
24
js/app.js
|
|
@ -1,17 +1,17 @@
|
|||
window.app = {
|
||||
/* 开发环境 */
|
||||
// serverUrl: "http://localhost:8088", // 接口服务接口地址
|
||||
// paymentServerUrl: "http://192.168.1.3:8089", // 支付中心服务地址
|
||||
// shopServerUrl: "http://localhost:8080/foodie-shop/", // 门户网站地址
|
||||
// centerServerUrl: "http://localhost:8080/foodie-center/", // 用户中心地址
|
||||
// cookieDomain: "", // cookie 域
|
||||
serverUrl: "http://localhost:8088", // 接口服务接口地址
|
||||
paymentServerUrl: "http://192.168.1.3:8089", // 支付中心服务地址
|
||||
shopServerUrl: "http://localhost:8080/foodie-shop/", // 门户网站地址
|
||||
centerServerUrl: "http://localhost:8080/foodie-center/", // 用户中心地址
|
||||
cookieDomain: "", // cookie 域
|
||||
|
||||
/* 生产环境 */
|
||||
serverUrl: "http://api.z.mukewang.com:8088/foodie-dev-api", // 接口服务接口地址
|
||||
paymentServerUrl: "http://payment.t.mukewang.com/foodie-payment", // 支付中心服务地址
|
||||
shopServerUrl: "http://shop.z.mukewang.com:8080/foodie-shop/", // 门户网站地址
|
||||
centerServerUrl: "http://center.z.mukewang.com:8080/foodie-center/", // 用户中心地址
|
||||
cookieDomain: ".z.mukewang.com;", // cookie 域
|
||||
//serverUrl: "http://api.z.mukewang.com:8088/foodie-dev-api", // 接口服务接口地址
|
||||
//paymentServerUrl: "http://payment.t.mukewang.com/foodie-payment", // 支付中心服务地址
|
||||
//shopServerUrl: "http://shop.z.mukewang.com:8080/foodie-shop/", // 门户网站地址
|
||||
//centerServerUrl: "http://center.z.mukewang.com:8080/foodie-center/", // 用户中心地址
|
||||
//cookieDomain: ".z.mukewang.com;", // cookie 域
|
||||
|
||||
ctx: "/foodie-shop",
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ window.app = {
|
|||
|
||||
setCookie: function(name, value) {
|
||||
var Days = 365;
|
||||
var exp = new Date();
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() + Days*24*60*60*1000);
|
||||
var cookieContent = name + "="+ encodeURIComponent (value) + ";path=/;";
|
||||
if (this.cookieDomain != null && this.cookieDomain != undefined && this.cookieDomain != '') {
|
||||
|
|
@ -99,7 +99,7 @@ window.app = {
|
|||
// 删除主图在数组中的位置
|
||||
foodieShopcart.splice(i, 1, tmpItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isHavingItem) {
|
||||
foodieShopcart.push(pendingItem);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
returnUrl: ""
|
||||
},
|
||||
created() {
|
||||
|
||||
|
||||
// 登录成功后会跳原来页面
|
||||
var returnUrl = app.getUrlParam("returnUrl");
|
||||
if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
methods: {
|
||||
getRequest() {
|
||||
},
|
||||
postRequest() {
|
||||
postRequest() {
|
||||
},
|
||||
doLogin() {
|
||||
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
var user = res.data;
|
||||
// console.log(user);
|
||||
|
||||
// window.location.href = app.ctx + "/index.html";
|
||||
//window.location.href = app.ctx + "/index.html";
|
||||
if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
|
||||
window.location.href = returnUrl;
|
||||
} else {
|
||||
|
|
@ -148,4 +148,4 @@
|
|||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
||||
|
||||
<link rel="shortcut icon" href="img/foodie.ico"/>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="AmazeUI-2.4.2/assets/css/amazeui.min.css" />
|
||||
<link href="css/dlstyle.css" rel="stylesheet" type="text/css">
|
||||
<script src="AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
|
||||
|
|
@ -42,23 +42,23 @@
|
|||
<div class="am-tabs-bd" id="regist">
|
||||
<div class="am-tab-panel am-active">
|
||||
<form method="post">
|
||||
|
||||
|
||||
<div class="user-email">
|
||||
<label for="username"><i class="am-icon-envelope-o"></i></label>
|
||||
<input id="username" v-model="username" placeholder="请输入用户名">
|
||||
</div>
|
||||
<div v-show="errUsernameIsShow" style="padding: 10px;font-size: 12px;color: red;">
|
||||
{{errUsername}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-pass">
|
||||
<label for="password"><i class="am-icon-lock"></i></label>
|
||||
<input type="password" id="password" v-model="password" placeholder="设置密码">
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-pass">
|
||||
<label for="confirmPassword"><i class="am-icon-lock"></i></label>
|
||||
<input type="password" id="confirmPassword" v-model="confirmPassword" placeholder="确认密码">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="login-links">
|
||||
<a :href="'login.html?returnUrl=' + returnUrl" class="am-fr">已有账号?去登录</a>
|
||||
<br />
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript " src="js/app.js"></script>
|
||||
<script type="text/javascript">
|
||||
var index = new Vue({
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
methods: {
|
||||
getRequest() {
|
||||
},
|
||||
postRequest() {
|
||||
postRequest() {
|
||||
},
|
||||
// usernameIsExist() {
|
||||
// console.log(this.username);
|
||||
|
|
@ -181,14 +181,14 @@
|
|||
if (res.data.status == 200) {
|
||||
var user = res.data;
|
||||
// console.log(user);
|
||||
// window.location.href = app.ctx + "/index.html";
|
||||
// window.location.href = "index.html";
|
||||
window.location.href = app.ctx + "/index.html";
|
||||
//window.location.href = "index.html";
|
||||
|
||||
if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
|
||||
window.location.href = returnUrl;
|
||||
} else {
|
||||
window.location.href = "index.html";
|
||||
}
|
||||
//if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
|
||||
// window.location.href = returnUrl;
|
||||
//} else {
|
||||
// window.location.href = "index.html";
|
||||
//}
|
||||
|
||||
} else if (res.data.status == 500) {
|
||||
alert(res.data.msg);
|
||||
|
|
@ -201,4 +201,4 @@
|
|||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue