正在显示
100 个修改的文件
包含
285 行增加
和
0 行删除
.browserslistrc
0 → 100644
.editorconfig
0 → 100644
.eslintrc.js
0 → 100644
1 | +module.exports = { | ||
2 | + root: true, | ||
3 | + env: { | ||
4 | + node: true | ||
5 | + }, | ||
6 | + extends: [ | ||
7 | + 'plugin:vue/essential', | ||
8 | + // '@vue/standard' | ||
9 | + ], | ||
10 | + parserOptions: { | ||
11 | + parser: 'babel-eslint' | ||
12 | + }, | ||
13 | + rules: { | ||
14 | + "space-before-function-paren": 0, | ||
15 | + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
16 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' | ||
17 | + }, | ||
18 | + globals: { | ||
19 | + wx: true | ||
20 | + }, | ||
21 | +} |
.gitignore
0 → 100644
babel.config.js
0 → 100644
package-lock.json
0 → 100644
此 diff 太大无法显示。
package.json
0 → 100644
1 | +{ | ||
2 | + "name": "koudaishangcheng-pc", | ||
3 | + "version": "0.1.0", | ||
4 | + "private": true, | ||
5 | + "scripts": { | ||
6 | + "serve": "vue-cli-service serve", | ||
7 | + "build": "vue-cli-service build", | ||
8 | + "lint": "eslint --fix --ext .js,.vue src" | ||
9 | + }, | ||
10 | + "dependencies": { | ||
11 | + "axios": "^0.19.2", | ||
12 | + "bignumber.js": "^9.0.0", | ||
13 | + "core-js": "^3.6.4", | ||
14 | + "element-ui": "^2.13.0", | ||
15 | + "js-base64": "^3.5.2", | ||
16 | + "json-bigint": "^0.3.0", | ||
17 | + "qrcode2": "^1.2.3", | ||
18 | + "qrcodejs2": "0.0.2", | ||
19 | + "swiper": "^5.3.7", | ||
20 | + "vue": "^2.6.11", | ||
21 | + "vue-awesome-swiper": "^4.1.0", | ||
22 | + "vue-clipboard2": "^0.3.1", | ||
23 | + "vue-cropper": "^0.5.5", | ||
24 | + "vue-lazyload": "^1.3.3", | ||
25 | + "vue-quill-editor": "^3.0.6", | ||
26 | + "vue-router": "^3.0.7", | ||
27 | + "vue-video-player": "^5.0.2" | ||
28 | + }, | ||
29 | + "devDependencies": { | ||
30 | + "@vue/cli-plugin-babel": "^4.3.0", | ||
31 | + "@vue/cli-plugin-eslint": "^4.3.0", | ||
32 | + "@vue/cli-service": "^4.3.0", | ||
33 | + "@vue/eslint-config-standard": "^5.1.2", | ||
34 | + "babel-eslint": "^10.1.0", | ||
35 | + "babel-polyfill": "^6.26.0", | ||
36 | + "compression-webpack-plugin": "^6.0.3", | ||
37 | + "eslint": "^6.7.2", | ||
38 | + "eslint-plugin-import": "^2.20.2", | ||
39 | + "eslint-plugin-node": "^11.1.0", | ||
40 | + "eslint-plugin-promise": "^4.2.1", | ||
41 | + "eslint-plugin-standard": "^4.0.0", | ||
42 | + "eslint-plugin-vue": "^6.2.2", | ||
43 | + "less": "^3.0.4", | ||
44 | + "less-loader": "^5.0.0", | ||
45 | + "lint-staged": "^9.5.0", | ||
46 | + "vue-template-compiler": "^2.6.11", | ||
47 | + "vuex": "^3.4.0", | ||
48 | + "weixin-js-sdk": "^1.6.0" | ||
49 | + }, | ||
50 | + "gitHooks": { | ||
51 | + "pre-commit": "lint-staged" | ||
52 | + }, | ||
53 | + "lint-staged": { | ||
54 | + "*.{js,jsx,vue}": [ | ||
55 | + "vue-cli-service lint", | ||
56 | + "git add" | ||
57 | + ] | ||
58 | + } | ||
59 | +} |
public/index.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | + | ||
4 | +<head> | ||
5 | + <meta charset="utf-8"> | ||
6 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
7 | + <meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
8 | + <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> --> | ||
9 | + <link rel="icon" href="<%= BASE_URL %>logo.png"> | ||
10 | + <title>口袋宇宙,专注英文教育的内容提供商</title> | ||
11 | + <!-- <title><%= htmlWebpackPlugin.options.title %></title> --> | ||
12 | + | ||
13 | +</head> | ||
14 | + | ||
15 | +<body> | ||
16 | + | ||
17 | + <noscript> | ||
18 | + <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. | ||
19 | + Please enable it to continue.</strong> | ||
20 | + </noscript> | ||
21 | + <div id="app"></div> | ||
22 | + <!-- built files will be auto injected --> | ||
23 | +</body> | ||
24 | + <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script> | ||
25 | + | ||
26 | + | ||
27 | +</html> |
public/logo.png
0 → 100644
531.5 KB
src/App.vue
0 → 100644
1 | +<template> | ||
2 | + <div id="app"> | ||
3 | + <!-- <keep-alive> | ||
4 | + <router-view v-if="isRouterAlive"></router-view> | ||
5 | + </keep-alive>--> | ||
6 | + <keep-alive> | ||
7 | + <router-view v-if="$route.meta.keepAlive"></router-view> | ||
8 | + </keep-alive> | ||
9 | + <router-view v-if="!$route.meta.keepAlive"></router-view> | ||
10 | + </div> | ||
11 | +</template> | ||
12 | + | ||
13 | +<script> | ||
14 | +export default { | ||
15 | + provide() { | ||
16 | + return { | ||
17 | + reload: this.reload | ||
18 | + }; | ||
19 | + }, | ||
20 | + data() { | ||
21 | + return { | ||
22 | + isRouterAlive: true, | ||
23 | + }; | ||
24 | + }, | ||
25 | + meta: { | ||
26 | + keepAlive: true, | ||
27 | + }, | ||
28 | + created() { | ||
29 | + this.IsPC() | ||
30 | + var store = require('../src/store') | ||
31 | + //在页面加载时读取sessionStorage里的状态信息 | ||
32 | + if (sessionStorage.getItem("store")) { | ||
33 | + // this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem("store")))) | ||
34 | + } | ||
35 | + // //在页面刷新时将vuex里的信息保存到sessionStorage里 | ||
36 | + window.addEventListener("beforeunload", () => { | ||
37 | + // sessionStorage.setItem("store", JSON.stringify(this.$store.state)) | ||
38 | + }) | ||
39 | + }, | ||
40 | + | ||
41 | + mounted: function () { | ||
42 | + | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + methods: { | ||
47 | + IsPC() { | ||
48 | + var userAgentInfo = navigator.userAgent; | ||
49 | + var Agents = ["Android", "iPhone", | ||
50 | + "SymbianOS", "Windows Phone", | ||
51 | + "iPad", "iPod"]; | ||
52 | + var flag = false; | ||
53 | + for (var v = 0; v < Agents.length; v++) { | ||
54 | + if (userAgentInfo.indexOf(Agents[v]) != -1) { | ||
55 | + // window.location.href = 'https://m.glaforteachers.com/' | ||
56 | + flag = true; | ||
57 | + // break; | ||
58 | + } | ||
59 | + } | ||
60 | + if (flag) { | ||
61 | + window.location.href = 'https://m.glaforteachers.com/' | ||
62 | + } | ||
63 | + return flag; | ||
64 | + | ||
65 | + }, | ||
66 | + saveState() { | ||
67 | + localStorage.setItem('KEY', JSON.stringify(this.$store.state.KEY)) | ||
68 | + }, | ||
69 | + reload() { | ||
70 | + this.isRouterAlive = false; | ||
71 | + this.$nextTick(function () { | ||
72 | + this.isRouterAlive = true; | ||
73 | + }); | ||
74 | + }, | ||
75 | + } | ||
76 | +}; | ||
77 | +</script> | ||
78 | + | ||
79 | +<style> | ||
80 | +#app { | ||
81 | + font-family: PingFang SC; | ||
82 | + -webkit-font-smoothing: antialiased; | ||
83 | + -moz-osx-font-smoothing: grayscale; | ||
84 | + color: #0d1e2e; | ||
85 | + overflow-y: hidden; | ||
86 | + background-color: #fbf8fb; | ||
87 | +} | ||
88 | +.cropper-view-box img { | ||
89 | + display: none !important; | ||
90 | +} | ||
91 | +</style> |
src/api/index.js
0 → 100644
1 | +// 导出一个配置好的axios提供给main挂载 | ||
2 | +import axios from 'axios' | ||
3 | +import Vue from 'vue' | ||
4 | +import local from '@/utils/local' | ||
5 | +import router from '@/router' | ||
6 | +import JSONBIG from 'json-bigint' | ||
7 | + | ||
8 | +Vue.use(router) | ||
9 | +axios.defaults.baseURL = 'https://glaforteachers.com/'; | ||
10 | +axios.defaults.transformResponse = [(data) => { | ||
11 | + try { | ||
12 | + return JSONBIG.parse(data) | ||
13 | + } catch (e) { | ||
14 | + return data | ||
15 | + } | ||
16 | +}] | ||
17 | + | ||
18 | +// 请求拦截器 | ||
19 | +axios.interceptors.request.use(config => { | ||
20 | + // 1. 获取token | ||
21 | + const user = local.getUser() || {} // 这里得到的是一个字符串 是token 的字符串 | ||
22 | + // console.log("user", user) | ||
23 | + config.headers.Authorization = `Bearer ${user}` | ||
24 | + config.headers.token = user | ||
25 | + return config; | ||
26 | +}, err => { | ||
27 | + return Promise.reject(err) | ||
28 | +}) | ||
29 | +// 响应拦截器 | ||
30 | +axios.interceptors.response.use(res => { | ||
31 | + if (res.data.code == 1) { | ||
32 | + return Promise.resolve(res); | ||
33 | + } else { | ||
34 | + return Promise.reject(res); | ||
35 | + } | ||
36 | +}, err => { | ||
37 | + console.log(err); | ||
38 | + const status = err.response.status | ||
39 | + // 2. 判断401 | ||
40 | + console.log(status); | ||
41 | + if (status === 401) { | ||
42 | + // this.$message.error('该页面登录后才可访问') | ||
43 | + } else if (status === 404) { | ||
44 | + router.push('/404') | ||
45 | + } else if (err.response.code === 0) { | ||
46 | + return router.replace('/404') | ||
47 | + } | ||
48 | + return Promise.reject(err) | ||
49 | +}) | ||
50 | + | ||
51 | +export default axios |
src/assets/image/Hot_1.png
0 → 100644
1.1 MB
src/assets/image/NoPat-small_img.png
0 → 100644
8.4 KB
src/assets/image/NoPath - 5G(3).png
0 → 100644
703.3 KB
src/assets/image/NoPath - bj (247).png
0 → 100644
1.5 KB
src/assets/image/NoPath -(201).png
0 → 100644
242.3 KB
src/assets/image/NoPath -head (228).png
0 → 100644
8.1 KB
src/assets/image/NoPath -head(333).png
0 → 100644
9.6 KB
src/assets/image/NoPath -lunbo.png
0 → 100644
765.4 KB
src/assets/image/NoPath -store (2).png
0 → 100644
60.5 KB
src/assets/image/NoPath-big_img.png
0 → 100644
161.5 KB
src/assets/image/NoPath-center_img.png
0 → 100644
84.4 KB
src/assets/image/NoPath_img.png
0 → 100644
1.1 MB
src/assets/image/account.png
0 → 100644
682 字节
src/assets/image/aicon_1.png
0 → 100644
3.0 KB
src/assets/image/aicon_2.png
0 → 100644
2.5 KB
src/assets/image/aicon_3.png
0 → 100644
3.4 KB
src/assets/image/arrow.png
0 → 100644
737 字节
src/assets/image/arrowLeft.png
0 → 100644
2.5 KB
src/assets/image/arrowRight.png
0 → 100644
3.0 KB
src/assets/image/ash.png
0 → 100644
1.0 KB
src/assets/image/biaoqian_icon_1@2x.png
0 → 100644
690 字节
src/assets/image/biaoqian_icon_2@2x.png
0 → 100644
747 字节
src/assets/image/biaoqian_icon_3@2x.png
0 → 100644
717 字节
src/assets/image/biaoqian_icon_4@2x.png
0 → 100644
655 字节
src/assets/image/biaoqian_icon_5@2x.png
0 → 100644
1.4 KB
src/assets/image/biaoqian_icon_6@2x.png
0 → 100644
1.4 KB
src/assets/image/biaoqian_icon_7@2x.png
0 → 100644
1.3 KB
src/assets/image/biaoqian_icon_8@2x.png
0 → 100644
1.6 KB
src/assets/image/camera.png
0 → 100644
1.5 KB
src/assets/image/change.png
0 → 100644
666 字节
src/assets/image/changefang.png
0 → 100644
3.6 KB
src/assets/image/cion_guoqi.png
0 → 100644
3.8 KB
src/assets/image/cion_guoqi@2x.png
0 → 100644
8.6 KB
src/assets/image/codes.png
0 → 100644
2.4 KB
src/assets/image/collect.png
0 → 100644
1.0 KB
src/assets/image/coupon.png
0 → 100644
1.5 KB
src/assets/image/data81.png
0 → 100644
555 字节
src/assets/image/data82.png
0 → 100644
659 字节
src/assets/image/data83.png
0 → 100644
749 字节
src/assets/image/data84.png
0 → 100644
596 字节
src/assets/image/data85.png
0 → 100644
608 字节
src/assets/image/data86.png
0 → 100644
591 字节
src/assets/image/data87.png
0 → 100644
769 字节
src/assets/image/data88.png
0 → 100644
648 字节
src/assets/image/data89.png
0 → 100644
936 字节
src/assets/image/data90.png
0 → 100644
1.2 KB
src/assets/image/downsanjiao.png
0 → 100644
502 字节
src/assets/image/edit.png
0 → 100644
738 字节
src/assets/image/emails1.png
0 → 100644
1.0 KB
src/assets/image/emptycart.png
0 → 100644
594.8 KB
src/assets/image/eye.png
0 → 100644
1.2 KB
src/assets/image/fang.png
0 → 100644
3.0 KB
src/assets/image/feel3.png
0 → 100644
1.0 KB
src/assets/image/feel4.png
0 → 100644
1.0 KB
src/assets/image/fly5396.png
0 → 100644
2.5 KB
src/assets/image/fresh.png
0 → 100644
627 字节
src/assets/image/icon_1.png
0 → 100644
10.6 KB
src/assets/image/icon_2.png
0 → 100644
3.3 KB
src/assets/image/icon_21@2x.png
0 → 100644
1.4 KB
src/assets/image/icon_3.png
0 → 100644
4.8 KB
src/assets/image/icon_4.png
0 → 100644
7.1 KB
src/assets/image/icon_5.png
0 → 100644
4.1 KB
src/assets/image/icon_50@2x.png
0 → 100644
1.9 KB
src/assets/image/icon_55@2x.png
0 → 100644
876 字节
src/assets/image/icon_wechat.png
0 → 100644
5.4 KB
src/assets/image/img404.png
0 → 100644
82.4 KB
src/assets/image/img_404.png
0 → 100644
63.2 KB
src/assets/image/img_bg.png
0 → 100644
5.0 KB
src/assets/image/img_jijiangguoqi.png
0 → 100644
10.4 KB
src/assets/image/img_report.png
0 → 100644
52.7 KB
src/assets/image/index_tab_l.png
0 → 100644
1.3 KB
src/assets/image/index_tab_r.png
0 → 100644
1.3 KB
src/assets/image/logo.png
0 → 100644
26.0 KB
src/assets/image/logo123.png
0 → 100644
152.5 KB
src/assets/image/logoimg.png
0 → 100644
7.9 KB
src/assets/image/look.png
0 → 100644
1.2 KB
src/assets/image/order03.png
0 → 100644
805 字节
src/assets/image/order2.png
0 → 100644
1.0 KB
src/assets/image/pay.png
0 → 100644
646 字节
src/assets/image/pic_ai.png
0 → 100644
13.4 KB
src/assets/image/pic——aihead.png
0 → 100644
6.5 KB
src/assets/image/play.png
0 → 100644
6.5 KB
src/assets/image/purse.png
0 → 100644
551 字节
src/assets/image/quit.png
0 → 100644
655 字节
src/assets/image/quit_white.png
0 → 100644
597 字节
src/assets/image/recommend.png
0 → 100644
2.1 KB
src/assets/image/search-3.png
0 → 100644
865 字节
src/assets/image/set (1)@2x.png
0 → 100644
1.9 KB
src/assets/image/set (2).png
0 → 100644
437 字节
-
请 注册 或 登录 后发表评论