Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sufansufan authored Nov 21, 2018
1 parent a47e99b commit 25c6fdc
Show file tree
Hide file tree
Showing 86 changed files with 27,166 additions and 0 deletions.
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: ["@vue/app"],
plugins: [
[
"component",
{
libraryName: "element-ui",
styleLibraryName: "theme-chalk"
}
]
]
};
16 changes: 16 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
moduleFileExtensions: ["js", "jsx", "json", "vue"],
transform: {
"^.+\\.vue$": "vue-jest",
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$":
"jest-transform-stub",
"^.+\\.jsx?$": "babel-jest"
},
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1"
},
snapshotSerializers: ["jest-serializer-vue"],
testMatch: [
"<rootDir>/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx))"
]
};
17,269 changes: 17,269 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "tiku-project",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve --open",
"build": "vue-cli-service build --modern",
"lint": "vue-cli-service lint --fix",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"axios": "^0.18.0",
"element-ui": "^2.4.3",
"js-cookie": "^2.2.0",
"jsencrypt": "^3.0.0-rc.1",
"katex": "^0.10.0-beta",
"mavon-editor": "^2.6.13",
"vue": "^2.5.16",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-persist": "^1.4.3"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0-rc.3",
"@vue/cli-plugin-eslint": "^3.0.0-rc.3",
"@vue/cli-plugin-unit-jest": "^3.0.0-rc.3",
"@vue/cli-service": "^3.0.0-rc.3",
"@vue/eslint-config-prettier": "^3.0.0-rc.3",
"@vue/test-utils": "^1.0.0-beta.20",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.2.0",
"babel-plugin-component": "^1.1.1",
"babel-polyfill": "^6.26.0",
"compression-webpack-plugin": "^1.1.11",
"mini-css-extract-plugin": "^0.4.1",
"mockjs": "^1.0.1-beta3",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.3",
"vue-template-compiler": "^2.5.16"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
Binary file added public/favicon.ico
Binary file not shown.
28 changes: 28 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>tiku-project</title>
<link rel="stylesheet" href="//at.alicdn.com/t/font_729542_pcbv3a6itko.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.9.0/github-markdown.css">
<!-- <script src="//cdn.bootcss.com/vue/2.5.16/vue.min.js" async></script>
<script src="//cdn.bootcss.com/vue-router/3.0.1/vue-router.min.js" async></script>
<script src="//cdn.bootcss.com/vuex/3.0.1/vuex.min.js" async></script>
<script src="//cdn.bootcss.com/axios/0.18.0/axios.min.js" async></script>
<script src="//unpkg.com/[email protected]/lib/index.js" async></script> -->
</head>

<body>
<noscript>
<strong>您的浏览器暂不支持JavaScript</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>

</html>
13 changes: 13 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div id="app">
<router-view/>
</div>
</template>

<style lang="scss">
@import "./assets/css/theme-default.scss"; // 默认主题文件
#app {
width: 100vw;
height: 100vh;
}
</style>
22 changes: 22 additions & 0 deletions src/api/user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Vue from "vue";
import axios from "@/config/axios.config";
import { JSEncrypt } from "jsencrypt";
import config from "@/config";

const encryptor = new JSEncrypt();
encryptor.setPublicKey(config.publicKey);

export const login = ({ loginNameOrUserPhone, password }) => {
const data = { loginNameOrUserPhone, password, requestType: 1 };
return axios.post(Vue.prototype.reqLink.userLogin, data);
};

export const checkLogin = ({ key }) => {
const res = encryptor.decrypt(key).split(";");
const data = { userId: res[0], noncestr: res[2] };
return axios.post(Vue.prototype.reqLink.authenCheck, data);
};

export const getUserInfo = ({ token }) => {
return axios.post(Vue.prototype.reqLink.getUserLoginInfo, { token });
};
10 changes: 10 additions & 0 deletions src/assets/css/base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// LOGO背景色
$logoBgColor: #42c6b1;
// element 主体色
$eleColor: #2fb48a;
// 文字主体色
$gloFontColor: $eleColor !important;
$gloFontSize: 14px !important;
$cccc: #ccc !important;
//边框主题色
$borderColor: #ebebeb;
Loading

0 comments on commit 25c6fdc

Please sign in to comment.