cherry reborn!
This commit is contained in:
parent
bfa67a2e25
commit
91af5d0685
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,4 +19,4 @@ yarn-error.log*
|
||||
*.sln
|
||||
*.sw?
|
||||
src/axios/fetch.js
|
||||
dist/
|
||||
dist
|
||||
|
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -9,4 +9,4 @@
|
||||
'font-size:12px;color:#999999;', (new Date).getFullYear());
|
||||
}
|
||||
catch (e) {
|
||||
}</script><script src="//at.alicdn.com/t/font_1630993_l8ge7m6darc.js"></script><link href="/css/chunk-0b39892e.f0f2b57c.css" rel="prefetch"><link href="/css/chunk-47054a92.266403eb.css" rel="prefetch"><link href="/css/chunk-48c8a9b6.336e2b50.css" rel="prefetch"><link href="/css/chunk-50318da4.0ded23c0.css" rel="prefetch"><link href="/css/chunk-60536306.1989a3e3.css" rel="prefetch"><link href="/css/chunk-68992484.db4bb3be.css" rel="prefetch"><link href="/css/chunk-b948d8ea.f2742bdf.css" rel="prefetch"><link href="/css/chunk-d8e8c53e.c459ae97.css" rel="prefetch"><link href="/js/chunk-0b39892e.f3941107.js" rel="prefetch"><link href="/js/chunk-47054a92.08cc0b31.js" rel="prefetch"><link href="/js/chunk-48c8a9b6.7c6dd5e4.js" rel="prefetch"><link href="/js/chunk-50318da4.fa769ba7.js" rel="prefetch"><link href="/js/chunk-60536306.315d1595.js" rel="prefetch"><link href="/js/chunk-68992484.51991eb0.js" rel="prefetch"><link href="/js/chunk-b948d8ea.e379daab.js" rel="prefetch"><link href="/js/chunk-d8e8c53e.0aa121db.js" rel="prefetch"><link href="/css/app.22388f63.css" rel="preload" as="style"><link href="/css/chunk-vendors.23c1f75a.css" rel="preload" as="style"><link href="/js/app.54265dcc.js" rel="modulepreload" as="script"><link href="/js/chunk-vendors.87fddfcf.js" rel="modulepreload" as="script"><link href="/css/chunk-vendors.23c1f75a.css" rel="stylesheet"><link href="/css/app.22388f63.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico"><link rel="icon" type="image/png" sizes="16x16" href="/favicon.ico"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#e54d42"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="Cherry"><link rel="apple-touch-icon" href="/favicon.ico"><link rel="mask-icon" href="/favicon.ico" color="#e54d42"><meta name="msapplication-TileImage" content="/favicon.ico"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but cust doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script type="module" src="/js/chunk-vendors.87fddfcf.js"></script><script type="module" src="/js/app.54265dcc.js"></script><script>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script src="/js/chunk-vendors-legacy.87fddfcf.js" nomodule></script><script src="/js/app-legacy.82595b57.js" nomodule></script></body></html>
|
||||
}</script><script src="//at.alicdn.com/t/font_1630993_l8ge7m6darc.js"></script><link href="/css/chunk-087e7bdc.78ed4051.css" rel="prefetch"><link href="/css/chunk-12ce693a.d4f55bfe.css" rel="prefetch"><link href="/css/chunk-208ba6f0.0ceb0ae3.css" rel="prefetch"><link href="/css/chunk-20a4acfd.ee5426c9.css" rel="prefetch"><link href="/css/chunk-452984ea.54d1eb07.css" rel="prefetch"><link href="/css/chunk-79895dbf.944073aa.css" rel="prefetch"><link href="/css/chunk-7b388ded.60b86910.css" rel="prefetch"><link href="/css/chunk-de5b02e4.9e01b52c.css" rel="prefetch"><link href="/js/chunk-087e7bdc.d185b05f.js" rel="prefetch"><link href="/js/chunk-12ce693a.2c99b1af.js" rel="prefetch"><link href="/js/chunk-208ba6f0.4806e291.js" rel="prefetch"><link href="/js/chunk-20a4acfd.687a76b1.js" rel="prefetch"><link href="/js/chunk-452984ea.96231f47.js" rel="prefetch"><link href="/js/chunk-79895dbf.d8e41022.js" rel="prefetch"><link href="/js/chunk-7b388ded.d855344c.js" rel="prefetch"><link href="/js/chunk-de5b02e4.5e0a54b1.js" rel="prefetch"><link href="/css/app.2c2f5006.css" rel="preload" as="style"><link href="/css/chunk-vendors.23c1f75a.css" rel="preload" as="style"><link href="/js/app.c457ad3d.js" rel="modulepreload" as="script"><link href="/js/chunk-vendors.759992b2.js" rel="modulepreload" as="script"><link href="/css/chunk-vendors.23c1f75a.css" rel="stylesheet"><link href="/css/app.2c2f5006.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico"><link rel="icon" type="image/png" sizes="16x16" href="/favicon.ico"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#e54d42"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="Cherry"><link rel="apple-touch-icon" href="/favicon.ico"><link rel="mask-icon" href="/favicon.ico" color="#e54d42"><meta name="msapplication-TileImage" content="/favicon.ico"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but cust doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script type="module" src="/js/chunk-vendors.759992b2.js"></script><script type="module" src="/js/app.c457ad3d.js"></script><script>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script src="/js/chunk-vendors-legacy.759992b2.js" nomodule></script><script src="/js/app-legacy.61661a60.js" nomodule></script></body></html>
|
2
dist/service-worker.js
vendored
2
dist/service-worker.js
vendored
@ -14,7 +14,7 @@
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.9174588a2580f23adc1fad0fa4fd03bc.js"
|
||||
"/precache-manifest.c4a80404a0ebbc914c1952be805be955.js"
|
||||
);
|
||||
|
||||
workbox.core.setCacheNameDetails({prefix: "cherry"});
|
||||
|
@ -12,6 +12,14 @@ export function login(data) {
|
||||
return api.post('/login', params)
|
||||
}
|
||||
|
||||
export function submitVC(data) {
|
||||
var sign = CryptoJS.MD5(JSON.stringify(data).replace(/\"/g,"'")).toString().toUpperCase();
|
||||
data.sign = sign
|
||||
let params = new URLSearchParams();
|
||||
params.append('data', JSON.stringify(data));
|
||||
return api.post('/submitVC', params)
|
||||
}
|
||||
|
||||
// 上传图片
|
||||
export function uploadPhoto(file) {
|
||||
let param = new FormData();
|
||||
|
@ -6,11 +6,11 @@ export const api = axios.create({
|
||||
// baseURL: window.location.origin + '/api/',
|
||||
//baseURL: 'https://cherry.lacus.site' + '/api/',
|
||||
//baseURL: 'http://127.0.0.1:5000/api',
|
||||
baseURL: 'http://127.0.0.1:7980/api',
|
||||
baseURL: 'http://localhost:7980/api',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Accept': 'application/json',
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
//'Content-Type': 'application/x-www-form-urlencoded',
|
||||
//'Accept': 'application/json',
|
||||
//'Access-Control-Allow-Origin': '*'
|
||||
},
|
||||
timeout: 600 * 1000
|
||||
})
|
||||
|
@ -34,6 +34,11 @@
|
||||
name="phone"
|
||||
v-model.trim="phone"
|
||||
/>
|
||||
<div class="label">验证码</div>
|
||||
<input
|
||||
name="phone"
|
||||
v-model.trim="vc"
|
||||
/>
|
||||
</div>
|
||||
<div class="submit-box">
|
||||
<div
|
||||
@ -71,6 +76,7 @@
|
||||
// @ is an alias to /src
|
||||
import { mapState, mapActions } from "vuex";
|
||||
import { login } from "@/axios/api.js";
|
||||
import { submitVC } from "@/axios/api.js";
|
||||
import { Loading } from "element-ui";
|
||||
import FooterSpace from "@/components/FooterSpace.vue";
|
||||
import { encryptMainCode } from "@/lib/aes.js";
|
||||
@ -86,6 +92,7 @@ export default {
|
||||
pwd: "",
|
||||
phone: "",
|
||||
errmsg: "",
|
||||
vc: "",
|
||||
net_error_dialog: false,
|
||||
net_error_dialog_content: ""
|
||||
};
|
||||
@ -119,12 +126,23 @@ export default {
|
||||
});
|
||||
this.manageRes(JSON.parse(JSON.stringify(test_info)), load);
|
||||
}
|
||||
else if (this.vc) {
|
||||
let data = {
|
||||
cid: this.cid,
|
||||
vc: this.vc
|
||||
};
|
||||
submitVC(data)
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
this.turnToHome()
|
||||
})
|
||||
}
|
||||
else if (this.cid && this.pwd) {
|
||||
// 两者信息都填写了
|
||||
let load = Loading.service({
|
||||
background: "rgba(236,245,255,.7)",
|
||||
target: document.querySelector(".login")
|
||||
});
|
||||
// let load = Loading.service({
|
||||
// background: "rgba(236,245,255,.7)",
|
||||
// target: document.querySelector(".login")
|
||||
// });
|
||||
let data = {
|
||||
cid: this.cid,
|
||||
pwd: this.pwd,
|
||||
@ -132,8 +150,8 @@ export default {
|
||||
};
|
||||
login(data)
|
||||
.then(res => {
|
||||
// console.log(res)
|
||||
this.manageRes(res.data, load);
|
||||
console.log(res)
|
||||
//this.manageRes(res.data, load);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
@ -162,7 +180,6 @@ export default {
|
||||
this.$message.error("请输入完整的账号密码");
|
||||
}
|
||||
},
|
||||
|
||||
// 处理服务器返回的数据
|
||||
manageRes (data, load) {
|
||||
// 登录成功
|
||||
|
@ -346,10 +346,10 @@ export default {
|
||||
this.$router.push("/game");
|
||||
},
|
||||
|
||||
// 跳转页面
|
||||
goTo(url) {
|
||||
this.$router.push(url);
|
||||
},
|
||||
// 跳转页面
|
||||
goTo(url) {
|
||||
this.$router.push(url);
|
||||
},
|
||||
|
||||
// 获取当前周
|
||||
getCurrentWeek() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user