This commit is contained in:
clay 2022-01-25 22:31:42 +08:00
parent 575300a4cf
commit 1d70fefc93
3 changed files with 31 additions and 31 deletions

View File

@ -1,17 +1,17 @@
window.app = { window.app = {
/* 开发环境 */ /* 开发环境 */
// serverUrl: "http://localhost:8088", // 接口服务接口地址 serverUrl: "http://localhost:8088", // 接口服务接口地址
// paymentServerUrl: "http://192.168.1.3:8089", // 支付中心服务地址 paymentServerUrl: "http://192.168.1.3:8089", // 支付中心服务地址
// shopServerUrl: "http://localhost:8080/foodie-shop/", // 门户网站地址 shopServerUrl: "http://localhost:8080/foodie-shop/", // 门户网站地址
// centerServerUrl: "http://localhost:8080/foodie-center/", // 用户中心地址 centerServerUrl: "http://localhost:8080/foodie-center/", // 用户中心地址
// cookieDomain: "", // cookie 域 cookieDomain: "", // cookie 域
/* 生产环境 */ /* 生产环境 */
serverUrl: "http://api.z.mukewang.com:8088/foodie-dev-api", // 接口服务接口地址 //serverUrl: "http://api.z.mukewang.com:8088/foodie-dev-api", // 接口服务接口地址
paymentServerUrl: "http://payment.t.mukewang.com/foodie-payment", // 支付中心服务地址 //paymentServerUrl: "http://payment.t.mukewang.com/foodie-payment", // 支付中心服务地址
shopServerUrl: "http://shop.z.mukewang.com:8080/foodie-shop/", // 门户网站地址 //shopServerUrl: "http://shop.z.mukewang.com:8080/foodie-shop/", // 门户网站地址
centerServerUrl: "http://center.z.mukewang.com:8080/foodie-center/", // 用户中心地址 //centerServerUrl: "http://center.z.mukewang.com:8080/foodie-center/", // 用户中心地址
cookieDomain: ".z.mukewang.com;", // cookie 域 //cookieDomain: ".z.mukewang.com;", // cookie 域
ctx: "/foodie-shop", ctx: "/foodie-shop",
@ -35,7 +35,7 @@ window.app = {
setCookie: function(name, value) { setCookie: function(name, value) {
var Days = 365; var Days = 365;
var exp = new Date(); var exp = new Date();
exp.setTime(exp.getTime() + Days*24*60*60*1000); exp.setTime(exp.getTime() + Days*24*60*60*1000);
var cookieContent = name + "="+ encodeURIComponent (value) + ";path=/;"; var cookieContent = name + "="+ encodeURIComponent (value) + ";path=/;";
if (this.cookieDomain != null && this.cookieDomain != undefined && this.cookieDomain != '') { if (this.cookieDomain != null && this.cookieDomain != undefined && this.cookieDomain != '') {
@ -99,7 +99,7 @@ window.app = {
// 删除主图在数组中的位置 // 删除主图在数组中的位置
foodieShopcart.splice(i, 1, tmpItem); foodieShopcart.splice(i, 1, tmpItem);
} }
} }
if (!isHavingItem) { if (!isHavingItem) {
foodieShopcart.push(pendingItem); foodieShopcart.push(pendingItem);
} }

View File

@ -87,7 +87,7 @@
returnUrl: "" returnUrl: ""
}, },
created() { created() {
// 登录成功后会跳原来页面 // 登录成功后会跳原来页面
var returnUrl = app.getUrlParam("returnUrl"); var returnUrl = app.getUrlParam("returnUrl");
if (returnUrl != null && returnUrl != undefined && returnUrl != '') { if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
@ -97,7 +97,7 @@
methods: { methods: {
getRequest() { getRequest() {
}, },
postRequest() { postRequest() {
}, },
doLogin() { doLogin() {
@ -130,7 +130,7 @@
var user = res.data; var user = res.data;
// console.log(user); // console.log(user);
// window.location.href = app.ctx + "/index.html"; //window.location.href = app.ctx + "/index.html";
if (returnUrl != null && returnUrl != undefined && returnUrl != '') { if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
window.location.href = returnUrl; window.location.href = returnUrl;
} else { } else {
@ -148,4 +148,4 @@
</script> </script>
</body> </body>
</html> </html>

View File

@ -10,7 +10,7 @@
<meta http-equiv="Cache-Control" content="no-siteapp" /> <meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="shortcut icon" href="img/foodie.ico"/> <link rel="shortcut icon" href="img/foodie.ico"/>
<link rel="stylesheet" href="AmazeUI-2.4.2/assets/css/amazeui.min.css" /> <link rel="stylesheet" href="AmazeUI-2.4.2/assets/css/amazeui.min.css" />
<link href="css/dlstyle.css" rel="stylesheet" type="text/css"> <link href="css/dlstyle.css" rel="stylesheet" type="text/css">
<script src="AmazeUI-2.4.2/assets/js/jquery.min.js"></script> <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-tabs-bd" id="regist">
<div class="am-tab-panel am-active"> <div class="am-tab-panel am-active">
<form method="post"> <form method="post">
<div class="user-email"> <div class="user-email">
<label for="username"><i class="am-icon-envelope-o"></i></label> <label for="username"><i class="am-icon-envelope-o"></i></label>
<input id="username" v-model="username" placeholder="请输入用户名"> <input id="username" v-model="username" placeholder="请输入用户名">
</div> </div>
<div v-show="errUsernameIsShow" style="padding: 10px;font-size: 12px;color: red;"> <div v-show="errUsernameIsShow" style="padding: 10px;font-size: 12px;color: red;">
{{errUsername}} {{errUsername}}
</div> </div>
<div class="user-pass"> <div class="user-pass">
<label for="password"><i class="am-icon-lock"></i></label> <label for="password"><i class="am-icon-lock"></i></label>
<input type="password" id="password" v-model="password" placeholder="设置密码"> <input type="password" id="password" v-model="password" placeholder="设置密码">
</div> </div>
<div class="user-pass"> <div class="user-pass">
<label for="confirmPassword"><i class="am-icon-lock"></i></label> <label for="confirmPassword"><i class="am-icon-lock"></i></label>
<input type="password" id="confirmPassword" v-model="confirmPassword" placeholder="确认密码"> <input type="password" id="confirmPassword" v-model="confirmPassword" placeholder="确认密码">
</div> </div>
<div class="login-links"> <div class="login-links">
<a :href="'login.html?returnUrl=' + returnUrl" class="am-fr">已有账号?去登录</a> <a :href="'login.html?returnUrl=' + returnUrl" class="am-fr">已有账号?去登录</a>
<br /> <br />
@ -95,7 +95,7 @@
</p> </p>
</div> </div>
</div> </div>
<script type="text/javascript " src="js/app.js"></script> <script type="text/javascript " src="js/app.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var index = new Vue({ var index = new Vue({
@ -140,7 +140,7 @@
methods: { methods: {
getRequest() { getRequest() {
}, },
postRequest() { postRequest() {
}, },
// usernameIsExist() { // usernameIsExist() {
// console.log(this.username); // console.log(this.username);
@ -181,14 +181,14 @@
if (res.data.status == 200) { if (res.data.status == 200) {
var user = res.data; var user = res.data;
// console.log(user); // console.log(user);
// window.location.href = app.ctx + "/index.html"; window.location.href = app.ctx + "/index.html";
// window.location.href = "index.html"; //window.location.href = "index.html";
if (returnUrl != null && returnUrl != undefined && returnUrl != '') { //if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
window.location.href = returnUrl; // window.location.href = returnUrl;
} else { //} else {
window.location.href = "index.html"; // window.location.href = "index.html";
} //}
} else if (res.data.status == 500) { } else if (res.data.status == 500) {
alert(res.data.msg); alert(res.data.msg);
@ -201,4 +201,4 @@
</script> </script>
</body> </body>
</html> </html>