├── untils
├── index.js
└── constant.js
├── index.js
├── public
├── img
│ ├── ava.jpg
│ ├── user.png
│ ├── footer.png
│ ├── loading.gif
│ ├── favicon16.ico
│ ├── favicon32.ico
│ ├── login-bg2.png
│ ├── login-bg3.png
│ ├── background.png
│ ├── contribution.png
│ ├── left-header.png
│ ├── right-header.png
│ ├── user-bottom.png
│ ├── login-background.png
│ ├── title-background.png
│ ├── user-background.png
│ ├── juejin_analyze_user-bottom.png
│ ├── pull.svg
│ └── github.svg
├── js
│ ├── resize.js
│ ├── index.js
│ ├── axios.min.js
│ └── Vue.min.js
├── css
│ └── index.css
└── index.html
├── .gitignore
├── pm2.json
├── mongodb
├── searchSchema.js
├── config.js
├── schema.js
└── model.js
├── config
├── superagent.js
└── koa.js
├── package.json
├── README.md
└── controller
└── index.js
/untils/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | require("./config/koa")
2 |
--------------------------------------------------------------------------------
/public/img/ava.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/ava.jpg
--------------------------------------------------------------------------------
/public/img/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/user.png
--------------------------------------------------------------------------------
/public/img/footer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/footer.png
--------------------------------------------------------------------------------
/public/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/loading.gif
--------------------------------------------------------------------------------
/public/img/favicon16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/favicon16.ico
--------------------------------------------------------------------------------
/public/img/favicon32.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/favicon32.ico
--------------------------------------------------------------------------------
/public/img/login-bg2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/login-bg2.png
--------------------------------------------------------------------------------
/public/img/login-bg3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/login-bg3.png
--------------------------------------------------------------------------------
/public/img/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/background.png
--------------------------------------------------------------------------------
/public/img/contribution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/contribution.png
--------------------------------------------------------------------------------
/public/img/left-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/left-header.png
--------------------------------------------------------------------------------
/public/img/right-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/right-header.png
--------------------------------------------------------------------------------
/public/img/user-bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/user-bottom.png
--------------------------------------------------------------------------------
/public/img/login-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/login-background.png
--------------------------------------------------------------------------------
/public/img/title-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/title-background.png
--------------------------------------------------------------------------------
/public/img/user-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/user-background.png
--------------------------------------------------------------------------------
/public/img/juejin_analyze_user-bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leochen-g/juejinAnalyze/HEAD/public/img/juejin_analyze_user-bottom.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.vscode
2 | */.settings
3 | */target
4 | *target
5 | */.settings
6 | */target
7 | *.project
8 | *.classpath
9 | *.idea
10 | *.iml
11 | *.DS_Store
12 | /build/
13 | /bin/
14 | *node_modules
15 | */log
16 | .env
17 | *.memory-card.json
18 |
--------------------------------------------------------------------------------
/pm2.json:
--------------------------------------------------------------------------------
1 | {
2 | "apps": [
3 | {
4 | "name": "juejinAnalyze",
5 | "cwd": "./",
6 | "script": "./index.js",
7 | "log_date_format": "YYYY-MM-DD HH:mm Z",
8 | "error_file": "./log/app-err.log",
9 | "out_file": "./log/app-out.log",
10 | "pid_file": "./log/node.pid",
11 | "instances": 1,
12 | "min_uptime": "60s",
13 | "max_restarts": 30,
14 | "watch": false
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/mongodb/searchSchema.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('./config')
2 | const Schema = mongoose.Schema
3 |
4 | // 掘金用户查询表: 记录已经查询过的用户,防止重复爬取数据,同时记录爬取状态
5 | let JueJinSearch = new Schema({
6 | uid: {type:String,unique:true,index: true,}, // 用户Id
7 | follower: Boolean, // 是否查询过粉丝
8 | followees: Boolean, // 是否查询过关注用户
9 | followerSpider: String, // 粉丝爬取状态 success 爬取完成 loading 爬取中 none 未爬取
10 | followeesSpider: String // 关注用户爬取状态 success 爬取完成 loading 爬取中 none 未爬取
11 | })
12 |
13 | module.exports = mongoose.model('JueJinSearch', JueJinSearch)
14 |
--------------------------------------------------------------------------------
/config/superagent.js:
--------------------------------------------------------------------------------
1 | const superagent = require('superagent')
2 |
3 | request = ({url, method, params, data, cookies}) => {
4 | return new Promise((resolve, reject) => {
5 | superagent(method, url)
6 | .query(params)
7 | .send(data)
8 | .set('Content-Type', 'application/x-www-form-urlencoded')
9 | .set('Cookie', cookies)
10 | .end((err, res) => {
11 | if (err) reject(err)
12 | resolve(res)
13 | })
14 | })
15 | }
16 |
17 | module.exports = {request}
18 |
--------------------------------------------------------------------------------
/public/img/pull.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mongodb/config.js:
--------------------------------------------------------------------------------
1 | const mongoose = require("mongoose")
2 |
3 | const db_url = 'mongodb://localhost:27017/juejinAnalyze'
4 | mongoose.connect(db_url, { useNewUrlParser: true ,useCreateIndex:true})
5 |
6 | //连接成功
7 | mongoose.connection.on('connect', () => {
8 | console.log("Mongoose connection open to " + db_url)
9 | })
10 |
11 | //连接异常
12 | mongoose.connection.on('error', (err) => {
13 | console.log("Mongoose connection erro " + err);
14 | });
15 |
16 | //连接断开
17 | mongoose.connection.on('disconnected', () => {
18 | console.log("Mongoose connection disconnected ");
19 | });
20 |
21 | module.exports = mongoose
22 |
--------------------------------------------------------------------------------
/public/js/resize.js:
--------------------------------------------------------------------------------
1 | /*****脚本*****/
2 | //不支持safari
3 |
4 | /*宽度100%缩放 - 整屏*/ //缩放的DIV上CSS要加上transform-origin:top left;
5 | function widthFull(shell) {
6 | console.log('i')
7 | var arr = shell.constructor === Array ? shell : [shell];
8 | document.getElementById("main").css({
9 | overflow: "hidden"
10 | });
11 | window.resize(function() {
12 | var i = 0,
13 | $width = $(window).width(),
14 | $height = $(window).height();
15 | for (; i < arr.length; i++) {
16 | var wRate = $width / ($(arr[i]).width());
17 | var hRate = $height / ($(arr[i]).height());
18 | $(arr[i]).css({
19 | transform: "scale(" + wRate + "," + hRate + ")"
20 | });
21 | }
22 | }).trigger('resize');
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "juejinanalyze",
3 | "version": "1.0.0",
4 | "description": "用户掘金粉丝及关注用户数据多维度分析工具",
5 | "keywords": [
6 | "koa",
7 | "mongodb",
8 | "superagent",
9 | "mongoose",
10 | "掘金",
11 | "爬虫",
12 | "数据分析"
13 | ],
14 | "main": "index.js",
15 | "scripts": {
16 | "dev": "nodemon index.js",
17 | "start": "node index.js",
18 | "test": "echo \"Error: no test specified\" && exit 1"
19 | },
20 | "author": "Leo_chen",
21 | "license": "MIT",
22 | "dependencies": {
23 | "koa": "^2.7.0",
24 | "koa-bodyparser": "^4.2.1",
25 | "koa-router": "^7.4.0",
26 | "koa-static": "^5.0.0",
27 | "mongoose": "^5.5.6",
28 | "superagent": "^5.0.5"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/untils/constant.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | get_user_info: 'https://api.juejin.cn/user_api/v1/user/get',
3 | get_follow_list: 'https://api.juejin.cn/user_api/v1/follow/followers',
4 | get_followee_list: 'https://api.juejin.cn/user_api/v1/follow/followees',
5 | cols: 'viewedEntriesCount|role|totalCollectionsCount|allowNotification|subscribedTagsCount|appliedEditorAt|email|followersCount|postedEntriesCount|latestCollectionUserNotification|commentedEntriesCount|weeklyEmail|collectedEntriesCount|postedPostsCount|username|latestLoginedInAt|totalHotIndex|blogAddress|selfDescription|latestCheckedNotificationAt|emailVerified|totalCommentsCount|installation|blacklist|weiboId|mobilePhoneNumber|apply|followeesCount|deviceType|editorType|jobTitle|company|latestVoteLikeUserNotification|authData|avatarLarge|mobilePhoneVerified|objectId|createdAt|updatedAt',
6 | src: 'web'
7 | }
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 个人掘金粉丝及关注者数据分析
2 |
3 | ## 主要功能
4 |
5 | * 根据用户ID获取用户的粉丝或关注的用户数据
6 | * 分析粉丝或关注用户,发布文章、文章获赞、文章阅读数、粉丝数、掘力值TOP10
7 | * 分析粉丝或关注用户等级分布
8 | * 个人成就面板
9 | * 更多分析功能后续开发中...(期待你的建议)
10 |
11 | ## 在线版体验
12 |
13 | > uid: 浏览器地址可查看用户id
14 | >
15 | >sessionid: 登录后F12打开控制台,查看接口请求的cookie中有sessionid
16 |
17 |
18 | [http://juejinfan.xkboke.com/](http://juejinfan.xkboke.com/)
19 |
20 | ## 截图
21 | 
22 |
23 |
24 | 
25 |
26 | ## 安装
27 |
28 | 前提要安装好mongodb,并且是默认端口。如果端口已更改请在`/monogodb/config.js`中修改端口号
29 |
30 | ```
31 | git clone https://github.com/gengchen528/juejinAnalyze.git
32 | cd juejinAnalyze
33 | npm install
34 | npm run start
35 |
36 | ```
37 | 如果执行`npm run dev`,请全局安装`nodemon`,如果使用pm2,请全局安装`pm2`
38 |
--------------------------------------------------------------------------------
/mongodb/schema.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('./config')
2 | const Schema = mongoose.Schema
3 |
4 | let jueJinUser = new Schema({
5 | uid: {type:String,unique:true,index: true,}, // 用户Id
6 | username: String, // 用户名
7 | avatarLarge: String, // 头像
8 | jobTitle: String, // 职位
9 | company: String, // 公司
10 | createdAt: Date, // 账号注册时间
11 |
12 | rankIndex: Number, // 排名,级别
13 | juejinPower: Number, // 掘力值
14 | postedPostsCount: Number, // 发布文章数
15 | totalCollectionsCount: Number, // 获得点赞数
16 | totalViewsCount: Number, // 文章被阅读数
17 |
18 | subscribedTagsCount: Number, // 关注标签数
19 | collectionSetCount: Number, // 收藏集数
20 |
21 | likedPinCount: Number, // 点赞的沸点数
22 | collectedEntriesCount: Number, // 点赞的文章数
23 | pinCount: Number, // 发布沸点数
24 |
25 |
26 | purchasedBookletCount: Number, // 购买小册数
27 | bookletCount: Number, // 撰写小册数
28 |
29 | followeesCount: Number, // 关注了多少人
30 | followersCount: Number, // 关注者
31 |
32 | level: Number, // 等级
33 |
34 | commentCount: Number, // 评论数
35 | viewedArticleCount: Number, // 浏览文章数
36 |
37 | followees: {type:Array,default: []}, // 存放你关注的列表
38 | follower: {type:Array,default: []} // 存放关注你的列表
39 | })
40 |
41 | module.exports = mongoose.model('JueJinUser', jueJinUser)
42 |
--------------------------------------------------------------------------------
/public/img/github.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/config/koa.js:
--------------------------------------------------------------------------------
1 | const Koa = require("koa")
2 | const Router = require("koa-router")
3 | const path = require('path')
4 | const bodyParser = require('koa-bodyparser')
5 | const koaStatic = require('koa-static')
6 | const ctrl = require("../controller/index")
7 | const app = new Koa()
8 | const router = new Router()
9 | const publicPath = '../public'
10 | app.use(bodyParser())
11 | app.use(koaStatic(
12 | path.join(__dirname, publicPath)
13 | ))
14 | router.post('/api/getUserFlower', async(ctx, next) => { // 爬取并写入关注者信息
15 | let body = ctx.request.body;
16 | let res = await ctrl.spiderFlowerList(body);
17 | ctx.response.status = 200;
18 | ctx.body = { code: 200, msg: "ok", data: res.data }
19 | next()
20 | })
21 |
22 | router.post('/api/getUserFlowees', async(ctx, next) => { // 爬取并写入关注信息
23 | let body = ctx.request.body;
24 | let res = await ctrl.spiderFloweesList(body);
25 | ctx.response.status = 200;
26 | ctx.body = { code: 200, msg: "ok", data: res.data }
27 | next()
28 | })
29 |
30 | router.post('/api/getSpiderStatus', async(ctx, next) => { // 获取爬取状态
31 | let body = ctx.request.body;
32 | let res = await ctrl.spiderStatus(body);
33 | ctx.response.status = 200;
34 | ctx.body = { code: 200, msg: "ok", data: res.data }
35 | next()
36 | })
37 |
38 | router.post('/api/getCurrentUserInfo', async(ctx, next) => { // 获取当前用的基本信息
39 | let body = ctx.request.body;
40 | let res = await ctrl.getUserInfo(body)
41 | ctx.response.status = 200;
42 | ctx.body = { code: 200, msg: "ok", data: res }
43 | next()
44 | })
45 | router.post('/api/getAnalyzeData', async(ctx, next) => { // 获取你的关注者分析数据
46 | let body = ctx.request.body;
47 | let res = await ctrl.getAnalyze(body)
48 | ctx.response.status = 200;
49 | ctx.body = { code: 200, msg: "ok", data: res }
50 | next()
51 | })
52 |
53 | const handler = async(ctx, next) => {
54 | try {
55 | await next();
56 | } catch (err) {
57 | console.log('服务器错误',err)
58 | ctx.respose.status = 500;
59 | ctx.response.type = 'html';
60 | ctx.response.body = '
出错啦
';
61 | ctx.app.emit('error', err, ctx);
62 | }
63 | }
64 |
65 | app.use(handler)
66 | app.on('error', (err) => {
67 | console.error('server error:', err)
68 | })
69 |
70 | app.use(router.routes())
71 | app.use(router.allowedMethods())
72 | app.listen(9081, () => {
73 | console.log('juejinAnalyze is starting at port 9081')
74 | console.log('please Preview at http://localhost:9081')
75 | })
76 |
--------------------------------------------------------------------------------
/mongodb/model.js:
--------------------------------------------------------------------------------
1 | const JueJinUser = require('./schema')
2 | const JueJinSearch = require('./searchSchema')
3 | module.exports = {
4 | search: { // 用户查询状态
5 | findOrInsert: (conditions) => { // 添加新查询用户信息
6 | return new Promise((resolve, reject) => {
7 | JueJinSearch.findOne({uid: conditions.uid}, (err, doc) => {
8 | if (err) return reject(err)
9 | if (doc){
10 | return resolve(doc)
11 | }else {
12 | let data = {
13 | uid: conditions.uid,
14 | follower: false,
15 | followees: false,
16 | followerSpider: 'none',
17 | followeesSpider: 'none'
18 | }
19 | JueJinSearch.updateOne({"uid": conditions.uid}, data, {"upsert": true}, async (err, doc) => {
20 | if (err) return reject(err)
21 | let user = await JueJinSearch.findOne({uid: conditions.uid})
22 | return resolve(user)
23 | })
24 | }
25 | })
26 | })
27 | },
28 | update: (conditions) => { // 更新查询的状态
29 | return new Promise((resolve, reject) => {
30 | let set = {}
31 | set[conditions.key] = conditions.value
32 | console.log('更新值',conditions.key,conditions.value)
33 | JueJinSearch.updateOne({uid: conditions.uid}, {'$set': set}, (err, doc) => {
34 | if (err) return reject(err)
35 | return resolve(doc)
36 | })
37 | })
38 | },
39 | getSpiderStatus: (conditions) => {
40 | return new Promise((resolve, reject) => {
41 | JueJinSearch.findOne({uid: conditions.uid}, (err, doc) => {
42 | if (err) return reject(err)
43 | return resolve(doc)
44 | })
45 | })
46 | }
47 | },
48 | user: {
49 | insert: (conditions) => { // 添加新用户信息
50 | return new Promise((resolve, reject) => {
51 | JueJinUser.updateOne({"uid": conditions.uid}, conditions, {"upsert": true}, (err, doc) => {
52 | if (err) return reject(err)
53 | return resolve(doc)
54 | })
55 | })
56 | },
57 | getUserInfo: (conditions) => { // 获取用户的基本信息
58 | return new Promise((resolve, reject) => {
59 | JueJinUser.findOne({uid: conditions.uid}, {followees: 0,follower:0}, (err, doc) => {
60 | if (err) return reject(err)
61 | return resolve(doc)
62 | })
63 | })
64 | },
65 | },
66 | followees:{
67 | updatefollowees: (conditions) => { // 更新你关注用户的列表
68 | return new Promise((resolve, reject) => {
69 | JueJinUser.updateOne({uid: conditions.uid}, {'$addToSet': {followees: conditions.followUid}}, (err, doc) => {
70 | if (err) return reject(err)
71 | return resolve(doc)
72 | })
73 | })
74 | }
75 | },
76 | follower: {
77 | updatefollower: (conditions)=>{ // 更新关注你的用户的列表
78 | return new Promise((resolve, reject) => {
79 | JueJinUser.updateOne({uid: conditions.uid}, {'$addToSet': {follower: conditions.followUid}}, (err, doc) => {
80 | if (err) return reject(err)
81 | return resolve(doc)
82 | })
83 | })
84 | }
85 | },
86 | analyze:{
87 | getTopUser: (conditions, param) => { // 获取各项指标前10用户
88 | return new Promise((resolve, reject) => {
89 | let findOption = {}
90 | let sort = {}
91 | if(conditions.type === 'follower'){
92 | findOption = {followees: {$elemMatch: {$eq: conditions.uid}}}
93 | }else if(conditions.type === 'followees'){
94 | findOption = {follower: {$elemMatch: {$eq: conditions.uid}}}
95 | }
96 | sort[param] = '-1'
97 | JueJinUser.find(findOption).select('-followees -follower').sort(sort).limit(conditions.top).exec((err, doc) => {
98 | if (err) return reject(err)
99 | return resolve(doc)
100 | })
101 | })
102 | },
103 | getLevelDistribution: (conditions) => { // 获取等级分布
104 | return new Promise((resolve, reject) => {
105 | let match = {}
106 | if(conditions.type==='follower'){
107 | match = {
108 | followees: {$elemMatch: {$eq: conditions.uid}}
109 | }
110 | }else if(conditions.type==='followees'){
111 | match = {
112 | follower: {$elemMatch: {$eq: conditions.uid}}
113 | }
114 | }
115 | JueJinUser.aggregate([
116 | {
117 | $match: match
118 | },
119 | {
120 | $group: {_id: '$level', total: {$sum: 1}}
121 | }
122 | ]).sort({'total': -1}).exec((err, doc) => {
123 | if (err) return reject(err)
124 | return resolve(doc)
125 | })
126 | })
127 | }
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/public/js/index.js:
--------------------------------------------------------------------------------
1 | window.onload = function () {
2 | var vm = new Vue({
3 | el: '#main',
4 | data: {
5 | hasAuth: false,
6 | loading: false,
7 | loadingTips: '数据正在分析中...',
8 | cycleNumber: 0,
9 | uid: '',
10 | token: '' || localStorage.getItem('token'),
11 | userInfo: {
12 | joinDay: ''
13 | },
14 | selected: 'postedPostsCount',
15 | screenWidth: window.innerWidth,
16 | screenHeight: window.innerHeight,
17 | mainWidth: '',
18 | mainHeight: '',
19 | type: '',
20 | analyzeData: '',
21 | timer: false
22 | },
23 | computed: {
24 | transForm: function () {
25 | let _this = this
26 | let wRate = _this.screenWidth / _this.mainWidth;
27 | let hRate = _this.screenHeight / _this.mainHeight;
28 | return "scale(" + wRate + "," + hRate + ")"
29 | }
30 | },
31 | mounted() {
32 | "use strict";
33 | let _this = this
34 | _this.mainWidth = _this.$refs.main.offsetWidth
35 | _this.mainHeight = _this.$refs.main.offsetHeight
36 | console.log(_this.screenWidth,_this.screenHeight)
37 | window.onresize = () => {
38 | return (() => {
39 | _this.screenWidth = window.innerWidth
40 | _this.screenHeight = window.innerHeight
41 | })()
42 | }
43 |
44 | },
45 | watch: {
46 | screenWidth(val) {
47 | if (!this.timer) {
48 | this.screenWidth = val
49 | this.timer = true
50 | let that = this
51 | setTimeout(function () {
52 | that.timer = false
53 | console.log('223')
54 | }, 400)
55 | }
56 | },
57 | screenHeight(val) {
58 | if (!this.timer) {
59 | this.screenHeight = val
60 | this.timer = true
61 | let that = this
62 | setTimeout(function () {
63 | that.timer = false
64 | }, 400)
65 | }
66 | }
67 | },
68 | methods: {
69 | initBar(obj) {
70 | let options = {
71 | tooltip: {
72 | trigger: 'axis',
73 | axisPointer: {
74 | type: 'shadow'
75 | }
76 | },
77 | grid: {
78 | top: 0,
79 | left: '3%',
80 | right: '4%',
81 | bottom: '3%',
82 | containLabel: true
83 | },
84 | xAxis: {
85 | type: 'value',
86 | axisLine: {show: false},
87 | axisTick: {show: false},
88 | splitLine: {show: false},
89 | axisLabel: {show: false}
90 | },
91 | yAxis: {
92 | axisTick: {show: false},
93 | axisLine: {show: false},
94 | axisLabel: {
95 | color: '#bebec1'
96 | },
97 | type: 'category',
98 | data: obj.name
99 | },
100 | series: [
101 | {
102 | name: obj.title,
103 | type: 'bar',
104 | barCategoryGap: '60%',/*多个并排柱子设置柱子之间的间距*/
105 | itemStyle: {
106 | normal: {
107 | color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
108 | offset: 0,
109 | color: "#7052f4" // 0% 处的颜色
110 | }, {
111 | offset: 0.5,
112 | color: "#3881fa" // 50% 处的颜色
113 | }, {
114 | offset: 1,
115 | color: "#00b0ff" // 100% 处的颜色
116 | }], false)
117 | }
118 | },
119 | label: {
120 | normal: {
121 | show: false,
122 | position: 'inside',
123 | color: '#ffffff'
124 | }
125 | },
126 | data: obj.value
127 | }
128 | ]
129 | }
130 | var ele = document.getElementById('user-top-chart');//获取渲染图表的节点
131 | var myChart = echarts.init(ele);//初始化一个图表实例
132 | myChart.setOption(options);//给这个实例设置配置文件
133 | },
134 | initPie(obj) {
135 | let options = {
136 | tooltip: {
137 | trigger: 'item',
138 | formatter: "{b} : {c} ({d}%)"
139 | },
140 | legend: {
141 | textStyle: {
142 | color: '#ffffff',
143 | },
144 | top: 10,
145 | right: 0,
146 | type: 'scroll',
147 | orient: 'vertical',
148 | data: obj.data,
149 | pageTextStyle: {
150 | color: '#ffffff'
151 | },
152 | formatter: function (name) {
153 | let count = 0
154 | for (let j of obj.data){
155 | count = count +j.value
156 | }
157 | for (let i of obj.data) {
158 | if (i.name === name)
159 | return name +' '+ ((i.value/count) * 100).toFixed(2)+ '%'
160 | }
161 | }
162 | },
163 | color: ['#207fff','#00b0ff', '#5ddd9c', '#e7e666', '#ffc853', '#f77d4c'],
164 | series: [
165 | {
166 | type: 'pie',
167 | center: ['30%', '50%'],
168 | label: {
169 | normal: {
170 | show: false
171 | },
172 | },
173 | data: obj.data
174 | }
175 | ]
176 | }
177 | var ele = document.getElementById('user-level-chart');//获取渲染图表的节点
178 | var myChart = echarts.init(ele);//初始化一个图表实例
179 | myChart.setOption(options);//给这个实例设置配置文件
180 | },
181 | spiderFollower(type) {
182 | let _this = this
183 | let reg = /^[0-9]+$/
184 | if(!_this.uid || !_this.token){
185 | alert('请输入uid和token值')
186 | return false
187 | }else if(!reg.test(_this.uid)||_this.uid.length<15){
188 | alert('请输入正确的用户ID,可在掘金->我的主页->浏览器地址栏看到')
189 | return false
190 | }
191 | _this.loading = true
192 | _this.type = type
193 | let data = {
194 | uid: _this.uid,
195 | token: _this.token
196 | }
197 | let url = type==='follower'?'/api/getUserFlower':'/api/getUserFlowees'
198 | axios.post(url,data).then(res => {
199 | if(res.data.code === 200){
200 | localStorage.setItem('token', _this.token)
201 | if(res.data.data==='success'){
202 | _this.getUserInfo()
203 | _this.getAnalyzeData()
204 | _this.hasAuth = true
205 | _this.loading = false
206 | }else {
207 | setTimeout(function () {
208 | _this.getSpiderStatus()
209 | }, 5000)
210 | }
211 | }else {
212 | alert(res.data.msg)
213 | _this.hasAuth = false
214 | _this.loading = false
215 | }
216 | })
217 | },
218 | getSpiderStatus() {
219 | let _this = this
220 | let data = {
221 | uid: _this.uid,
222 | type: _this.type
223 | }
224 | axios.post('/api/getSpiderStatus', data).then(res=>{
225 | if(res.data.data){
226 | _this.loading = false
227 | _this.hasAuth = true
228 | _this.getUserInfo()
229 | _this.getAnalyzeData()
230 | _this.cycleNumber = 0
231 | _this.loadingTips = '数据正在分析中...'
232 | }else {
233 | setTimeout(function () {
234 | _this.cycleNumber = _this.cycleNumber+1
235 | if(_this.cycleNumber >= 3&&_this.cycleNumber<5 ){
236 | _this.loadingTips = '看起来你的人缘很好,数据太多了,正在努力分析中..'
237 | }else if(_this.cycleNumber >= 5&&_this.cycleNumber<8){
238 | _this.loadingTips = '你的人缘爆棚啊!服务器全力分析中,您耐心等待一下..'
239 | }else if(_this.cycleNumber >= 8&&_this.cycleNumber<15){
240 | _this.loadingTips = '大佬驾到!服务器马力加大,请您先喝杯茶再来看看..'
241 | }else if(_this.cycleNumber >= 20){
242 | _this.loadingTips = '不用说了,你是不是掘金内部小编...'
243 | }
244 | _this.getSpiderStatus()
245 | },10000)
246 | }
247 | })
248 | },
249 | getUserInfo() {
250 | let _this = this
251 | let data = {
252 | uid: _this.uid,
253 | token: _this.token,
254 | }
255 | axios.post('/api/getCurrentUserInfo', data).then(res => {
256 | if (res.data.code === 200) {
257 | _this.userInfo = res.data.data
258 | _this.userInfo.joinDay = _this.getJoinDay(res.data.data.createdAt)
259 | } else {
260 | alert(res.data.msg)
261 | }
262 | })
263 | },
264 | getAnalyzeData() {
265 | let _this = this
266 | let data = {
267 | uid: _this.uid,
268 | top: 10,
269 | type: _this.type
270 | }
271 | axios.post('/api/getAnalyzeData', data).then(res => {
272 | if (res.data.code === 200) {
273 | _this.analyzeData = res.data.data
274 | let obj = _this.dealData(_this.analyzeData['postedPostsCount'], 'postedPostsCount')
275 | let pie = _this.dealPieData(_this.analyzeData.level)
276 | _this.initBar(obj)
277 | _this.initPie(pie)
278 | } else {
279 | alert(res.data.msg)
280 | }
281 | })
282 | },
283 | backLogin () {
284 | this.hasAuth = false
285 | },
286 | getJoinDay(time) {
287 | var s1 = time
288 | s1 = new Date(s1);
289 | s2 = new Date();//当前日期:2017-04-24
290 | var days = s2.getTime() - s1.getTime();
291 | return parseInt(days / (1000 * 60 * 60 * 24));
292 | },
293 | changeTop() {
294 | console.log('change', this.selected)
295 | let obj = this.dealData(this.analyzeData[this.selected], this.selected)
296 | this.initBar(obj)
297 | },
298 | dealPieData(arr) {
299 | let list = {
300 | data: [],
301 | name: []
302 | }
303 | for (let i of arr) {
304 | let obj = {}
305 | obj.name = 'LV' + i._id
306 | obj.icon = 'circle'
307 | obj.value = i.total
308 | list.name.push(obj.name)
309 | list.data.push(obj)
310 | }
311 | return list
312 | },
313 | dealData(arr, type) {
314 | let map = {
315 | postedPostsCount: '发布文章',
316 | juejinPower: '掘力值',
317 | totalCollectionsCount: '获得点赞',
318 | totalViewsCount: '文章被阅读',
319 | followersCount: '粉丝数',
320 | }
321 | let obj = {
322 | name: [],
323 | value: [],
324 | title: map[type]
325 | }
326 | for (let i of arr) {
327 | obj.name.push(i.username)
328 | obj.value.push(i[type])
329 | }
330 | obj.name = obj.name.reverse()
331 | obj.value = obj.value.reverse()
332 | return obj
333 | }
334 | }
335 | })
336 | }
337 |
--------------------------------------------------------------------------------
/controller/index.js:
--------------------------------------------------------------------------------
1 | const {request} = require("../config/superagent")
2 | const constant = require("../untils/constant")
3 | const model = require("../mongodb/model")
4 |
5 | function getLastTime(arr) {
6 | let obj = arr.pop()
7 | return obj.createdAtString
8 | }
9 |
10 | async function delay(ms) {
11 | return new Promise((resolve) => setTimeout(resolve, ms))
12 | }
13 |
14 | // 爬取用户信息并插入到mongodb
15 | // @ids 用户id @token token @tid 关注者用户id
16 | async function spiderUserInfoAndInsert(ids, token, tid, type) {
17 | let url = constant.get_user_info
18 | let params = {
19 | token: token,
20 | user_id: ids
21 | }
22 | try {
23 | let data = await request({url, method: 'GET', params, cookies: `sessionid=${token}`})
24 | let json = JSON.parse(data.text)
25 | let userInfo = json.data
26 | let insertData = {
27 | uid: userInfo.user_id,
28 | username: userInfo.user_name,
29 | avatarLarge: userInfo.avatar_large,
30 | jobTitle: userInfo.job_title,
31 | company: userInfo.company,
32 | createdAt: parseInt(`${userInfo.register_time}000`),
33 | rankIndex: userInfo.rank_index, // 排名,级别
34 | juejinPower: userInfo.power, // 掘力值
35 | postedPostsCount: userInfo.post_article_count, // 发布文章数
36 | totalCollectionsCount: userInfo.got_digg_count, // 获得点赞数
37 | totalViewsCount: userInfo.got_view_count, // 文章被阅读数
38 | subscribedTagsCount: userInfo.subscribe_tag_count, // 关注标签数
39 | collectionSetCount: userInfo.collect_set_count, // 收藏集数
40 | likedPinCount: userInfo.digg_shortmsg_count, // 点赞的沸点数
41 | collectedEntriesCount: userInfo.digg_article_count, // 点赞的文章数
42 | pinCount: userInfo.post_shortmsg_count, // 发布沸点数
43 | purchasedBookletCount: userInfo.buy_booklet_count, // 购买小册数
44 | bookletCount: userInfo.booklet_count, // 撰写小册数
45 | followeesCount: userInfo.followee_count, // 关注了多少人
46 | followersCount: userInfo.follower_count, // 关注者
47 | level: userInfo.level, // 等级
48 | commentCount: userInfo.comment_count, // 评论数
49 | viewedArticleCount: userInfo.view_article_count, // 浏览文章数
50 | }
51 | await model.user.insert(insertData)
52 | if (ids !== tid) {
53 | if (type === 'followees') {
54 | updatefollower(ids, tid) // 更新关注你的用户列表
55 | updatefollowees(tid, ids) // 更新你关注用户的列表
56 | } else {
57 | updatefollower(tid, ids) // 更新关注你的用户列表
58 | updatefollowees(ids, tid) // 更新你关注用户的列表
59 | }
60 | }
61 | return 'ok'
62 | } catch (e) {
63 | console.log('用户信息获取失败', ids, e,)
64 | }
65 | }
66 |
67 | // 更新用户的关注列表
68 | // @uId 用户id @tId 关注的用户Id
69 | async function updatefollowees(uId, tId) {
70 | let data = {
71 | uid: uId,
72 | followUid: tId
73 | }
74 | model.followees.updatefollowees(data)
75 | }
76 |
77 | // 更新用户的被关注列表
78 | // @uId 关注的用户id @tId 被关注的用户Id
79 | async function updatefollower(uId, tId) {
80 | let data = {
81 | uid: uId,
82 | followUid: tId
83 | }
84 | model.follower.updatefollower(data)
85 | }
86 |
87 | // 爬取用户的粉丝列表
88 | // @uid 用户的id @token token @cursor 分页开始
89 | async function getFollower(uid, token, cursor = 0) {
90 | let params = {
91 | user_id: uid,
92 | cursor,
93 | limit: 99
94 | }
95 | try {
96 | let url = constant.get_follow_list
97 | let data = await request({url, method: 'GET', params, cookies: `sessionid=${token}`})
98 | let json = JSON.parse(data.text)
99 | let followList = json.data.data
100 | for (let i = 0; i < followList.length; i++) {
101 | const item = followList[i]
102 | await spiderUserInfoAndInsert(item.user_id, token, uid, 'follower')
103 | await delay(200)
104 | }
105 | if (followList && followList.length === 99) { // 获取的数据长度为20继续爬取
106 | await getFollower(uid, token, cursor + 99)
107 | } else {
108 | await updateSpider(uid, 'follower', true) // 设置已经爬取标志
109 | setTimeout(async function () {
110 | let result = await updateSpider(uid, 'followerSpider', 'success') // 更新爬取状态为success
111 | console.log('爬取粉丝完成', result)
112 | }, 2000)
113 |
114 | }
115 | } catch (err) {
116 | console.log('获取粉丝列表失败', err)
117 | return {data: err}
118 | }
119 | }
120 |
121 | // 更新爬取状态与结果
122 | // @uid 用户id @key 更新的字段 @value 更新的值
123 | async function updateSpider(uid, key, value) {
124 | let condition = {
125 | uid: uid,
126 | key: key,
127 | value: value
128 | }
129 | model.search.update(condition)
130 | }
131 |
132 | // 爬取你关注的列表
133 | // @uid 用户的id @token token @cursor 分页开始
134 | async function getFollowee(uid, token, cursor = 0) {
135 | let params = {
136 | user_id: uid,
137 | cursor,
138 | limit: 99
139 | }
140 | try {
141 | let url = constant.get_followee_list
142 | let data = await request({url, method: 'GET', params, cookies: `sessionid=${token}`})
143 | let json = JSON.parse(data.text)
144 | let followList = json.data.data
145 | for (let i = 0; i < followList.length; i++) {
146 | const item = followList[i]
147 | await spiderUserInfoAndInsert(item.user_id, token, uid, 'followees')
148 | await delay(200)
149 | }
150 | if (followList.length === 99) {
151 | await getFollowee(uid, token, cursor + 99)
152 | } else {
153 | await updateSpider(uid, 'followees', true) // 设置已经爬取标志
154 | setTimeout(async function () {
155 | let result = await updateSpider(uid, 'followeesSpider', 'success') // 更新爬取状态为loading
156 | console.log('爬取关注的人完成', result)
157 | }, 2000)
158 |
159 | }
160 | } catch (err) {
161 | console.log('获取关注者列表失败', err)
162 | return {data: err}
163 | }
164 | }
165 |
166 | // 用户数据分析
167 | // @uid 用户id @top 可配置选取前多少名 @type 获取数据类型:粉丝 follower 关注的人 followees
168 | async function getTopData(uid, top, type) {
169 | let data = {
170 | uid: uid,
171 | top: parseInt(top),
172 | type: type
173 | }
174 | try {
175 | let article = model.analyze.getTopUser(data, 'postedPostsCount')
176 | let juejinPower = model.analyze.getTopUser(data, 'juejinPower')
177 | let liked = model.analyze.getTopUser(data, 'totalCollectionsCount')
178 | let views = model.analyze.getTopUser(data, 'totalViewsCount')
179 | let follower = model.analyze.getTopUser(data, 'followersCount')
180 | let level = model.analyze.getLevelDistribution(data)
181 | let obj = {
182 | postedPostsCount: await article,
183 | juejinPower: await juejinPower,
184 | totalCollectionsCount: await liked,
185 | totalViewsCount: await views,
186 | followersCount: await follower,
187 | level: await level
188 | }
189 | return obj
190 | } catch (err) {
191 | console.log('err', err)
192 | return err
193 | }
194 | }
195 |
196 | module.exports = {
197 | spiderFlowerList: async (body) => { // 获取用户的关注者列表
198 | let uid = body.uid
199 | let token = body.token
200 | let searchStatus = await model.search.findOrInsert({uid: uid})
201 | if (searchStatus.followerSpider == 'success') {
202 | return {data: 'success'}
203 | } else if (searchStatus.followerSpider == 'loading') {
204 | return {data: 'loading'}
205 | } else if (searchStatus.followerSpider == 'none') {
206 | await updateSpider(uid, 'followerSpider', 'loading') // 更新爬取状态为loading
207 | spiderUserInfoAndInsert(uid, token, uid) // 把自己的信息也插入mongodb
208 | getFollower(uid, token)
209 | return {data: 'none'}
210 | }
211 | },
212 | spiderFloweesList: async (body) => { // 获取用户的关注列表
213 | let uid = body.uid
214 | let token = body.token
215 | let searchStatus = await model.search.findOrInsert({uid: uid})
216 | if (searchStatus.followeesSpider == 'success') {
217 | return {data: 'success'}
218 | } else if (searchStatus.followeesSpider == 'loading') {
219 | return {data: 'loading'}
220 | } else if (searchStatus.followeesSpider == 'none') {
221 | await updateSpider(uid, 'followeesSpider', 'loading') // 更新爬取状态为loading
222 | spiderUserInfoAndInsert(uid, token, uid) // 把自己的信息也插入mongodb
223 | getFollowee(uid, token)
224 | return {data: 'none'}
225 | }
226 | },
227 | spiderStatus: async (body) => {
228 | let uid = body.uid
229 | let type = body.type + 'Spider'
230 | let spiderStatus = await model.search.getSpiderStatus({uid: uid, type: type})
231 | if (spiderStatus[type] === 'loading' || spiderStatus[type] === 'none') {
232 | return {data: false}
233 | } else if (spiderStatus[type] === 'success') {
234 | return {data: true}
235 | }
236 | },
237 | getUserInfo: async (body) => { // 获取当前用户基本信息
238 | let uid = body.uid
239 | let data = {
240 | uid: uid
241 | }
242 | let result = await model.user.getUserInfo(data)
243 | return result
244 | },
245 | getAnalyze: async (body) => { // 获取关注者数据分析
246 | let uid = body.uid
247 | let top = body.top
248 | let type = body.type
249 | let res = await getTopData(uid, top, type)
250 | return res
251 | }
252 | }
253 |
--------------------------------------------------------------------------------
/public/css/index.css:
--------------------------------------------------------------------------------
1 | html,
2 | body,
3 | header,
4 | section,
5 | article,
6 | footer,
7 | nav,
8 | button,
9 | div,
10 | dl,
11 | dt,
12 | dd,
13 | ul,
14 | ol,
15 | li,
16 | h1,
17 | h2,
18 | h3,
19 | h4,
20 | h5,
21 | h6,
22 | form,
23 | fieldset,
24 | input,
25 | blockquote,
26 | textarea,
27 | p,
28 | tr,
29 | th,
30 | td,
31 | object,
32 | table,
33 | figure,
34 | figcaption
35 | {
36 | margin: 0;
37 | padding: 0;
38 | }
39 |
40 | body
41 | {
42 | font-family: 'Microsoft YaHei', 'SimSun', sans-serif;
43 | font-size: 100%;
44 | height: 100%;
45 | color: #fff;
46 | box-sizing: border-box;
47 | }
48 | #main{
49 | width: 1366px;
50 | height: 768px;
51 | overflow: hidden;
52 | position: relative;
53 | transform-origin: top left;
54 | background-size: 100% 100%;
55 | }
56 | .login{
57 | background: url("http://image.bloggeng.com/juejin_analyze_login-background.png") no-repeat scroll;
58 | height:768px;
59 | overflow: hidden;
60 | display: flex;
61 | justify-content: center;
62 | align-items: center;
63 | }
64 | .login-title{
65 | position: absolute;
66 | font-size: 26px;
67 | font-weight: bold;
68 | left: 200px;
69 | top: -100px
70 | }
71 | .login-form{
72 | width: 670px;
73 | height: 320px;
74 | margin: 0 auto;
75 | position: relative;
76 | }
77 | .login-item{
78 | width: 490px;
79 | margin: 30px auto;
80 | }
81 | .login-item span{
82 | display: inline-block;
83 | font-size: 24px;
84 | color: #1c6bfd;
85 | width: 120px;
86 | }
87 | .login-btn{
88 | width: 476px;
89 | margin: 30px auto;
90 | }
91 | .login-btn button{
92 | width: 150px;
93 | text-align: center;
94 | padding: 10px 0;
95 | font-size: 14px;
96 | color: #ffffff;
97 | background-color: #1c6bfd;
98 | margin-right: 52px;
99 | margin-left: 100px;
100 | border: none;
101 | cursor: pointer;
102 | }
103 | .login-btn button:last-child{
104 | margin-right: 0;
105 | margin-left: 0
106 | }
107 | .login-input{
108 | width: 330px;
109 | height: 60px;
110 | font-size: 20px;
111 | background-color: #00071e;
112 | border: solid 1px #142766;
113 | opacity: 0.7;
114 | color: #ffffff;
115 | padding: 0 10px;
116 | }
117 | .loading{
118 | background-color: rgba(0, 0, 0, 0.7);
119 | width: 100%;
120 | height: 1080px;
121 | overflow: hidden;
122 | position: absolute;
123 | top: 0;
124 | left: 0;
125 | z-index: 10;
126 | text-align: center;
127 | padding-top: 20%;
128 | }
129 | .loading img{
130 | width: 100px;
131 | height: 100px;
132 | }
133 | .main{
134 | background: url("http://image.bloggeng.com/juejin_analyze_background.png") no-repeat scroll;
135 | width: 1366px;
136 | height: 768px;
137 | overflow: hidden;
138 | position: relative;
139 | transform-origin: top left;
140 | background-size: 100% 100%;
141 | }
142 | .header{
143 | display: flex;
144 | justify-content: space-between;
145 | }
146 | .header-img{
147 | margin-top: 10px;
148 | }
149 | .title{
150 | background: url("../img/title-background.png") no-repeat scroll;
151 | width: 542px;
152 | height: 78px;
153 | line-height: 57px;
154 | text-align: center;
155 | position: absolute;
156 | top: 10px;
157 | left: 413px;
158 | display: flex;
159 | justify-content: center;
160 | }
161 | .header-back{
162 | font-size: 14px;
163 | color: #d6d6d6;
164 | position: absolute;
165 | left: 20px;
166 | top: 33px;
167 | cursor: pointer;
168 | }
169 | .header-time{
170 | font-size: 16px;
171 | position: absolute;
172 | left: 263px;
173 | top: 33px;
174 | }
175 | .user-avatar{
176 | padding-top: 10px;
177 | padding-right: 10px;
178 | }
179 | .user-avatar img{
180 | width: 28px;
181 | height: 28px;
182 | border-radius: 28px;
183 | }
184 | .user-title{
185 | font-size: 18px;
186 | }
187 | .content{
188 | display: flex;
189 | justify-content: space-between;
190 | padding: 40px 56px 0 93px;
191 | }
192 | .left{
193 | width: 265px;
194 | }
195 | .user-info{
196 | position: relative;
197 | border: 1px solid #4574d6;
198 | box-shadow: inset 0 0 60px 0 rgba(1, 9, 96, 0.5);
199 | padding: 16px 20px;
200 | margin-bottom: 22px;
201 | }
202 | .user-info-title{
203 | text-align: center;
204 | font-size: 16px;
205 | color: #6bdcff;
206 | margin-bottom: 15px;
207 | }
208 | .angle{
209 | position: absolute;
210 | width: 22px;
211 | height: 22px;
212 | border: 2px solid #00fcf9;
213 | }
214 | .angle-left-top{
215 | left: -1px;
216 | top: -1px;
217 | border-right: none;
218 | border-bottom: none;
219 | }
220 | .angle-right-top{
221 | right: -1px;
222 | top: -1px;
223 | border-left: none;
224 | border-bottom: none;
225 | }
226 | .angle-right-bottom{
227 | right: -1px;
228 | bottom: -1px;
229 | border-left: none;
230 | border-top: none;
231 | }
232 | .angle-left-bottom{
233 | left: -1px;
234 | bottom: -1px;
235 | border-right: none;
236 | border-top: none;
237 | }
238 | .center{
239 | width: 530px;
240 | }
241 | .right{
242 | width: 340px;
243 | }
244 | .user-info-key{
245 | width: 97px;
246 | height: 19px;
247 | border: 1px solid #2c5987;
248 | margin-right: 6px;
249 | margin-bottom: 6px;
250 | text-align: right;
251 | font-size: 12px;
252 | padding: 0 16px;
253 | }
254 | .user-info-value{
255 | width: 125px;
256 | height: 19px;
257 | border: 1px solid #2c5987;
258 | margin-bottom: 6px;
259 | text-align: left;
260 | font-size: 12px;
261 | padding: 0 14px;
262 | }
263 | .user-charm{
264 | position: relative;
265 | border: 1px solid #4574d6;
266 | box-shadow: inset 0 0 60px 0 rgba(1, 9, 96, 0.5);
267 | padding: 22px 20px;
268 | margin-bottom: 29px;
269 | }
270 | .user-charm-item {
271 | border: solid 1px #ffae01;
272 | margin-bottom: 17px;
273 | height: 33px;
274 | display: flex;
275 | justify-content: space-between;
276 | padding: 0 24px;
277 | line-height: 33px;
278 | }
279 | .user-charm-item:last-child{
280 | margin-bottom: 0;
281 | }
282 | .user-charm-title{
283 | height: 12px;
284 | font-size: 12px;
285 | }
286 | .jue-power{
287 | font-size: 16px;
288 | color: #ffa201;
289 | }
290 | .user-contribution{
291 | display: flex;
292 | justify-content: space-between;
293 | padding: 0 16px;
294 | }
295 | @-webkit-keyframes rotation {
296 | from {
297 | -webkit-transform: rotate(0deg);
298 | }
299 | to {
300 | -webkit-transform: rotate(360deg);
301 | }
302 | }
303 |
304 | .user-contribution-circle{
305 | background-image: url("../img/contribution.png");
306 | background-size: 100% 100%;
307 | width: 90px;
308 | height: 80px;
309 | border-radius: 90px;
310 | text-align: center;
311 | padding-top: 9px;
312 | -webkit-transform: rotate(360deg);
313 | animation: rotation 8s linear infinite;
314 | -moz-animation: rotation 8s linear infinite;
315 | -webkit-animation: rotation 8s linear infinite;
316 | -o-animation: rotation 8s linear infinite;
317 | position: relative;
318 | }
319 |
320 | .user-contribution-item{
321 | width: 80px;
322 | height: 80px;
323 | border-radius: 80px;
324 | text-align: center;
325 | line-height: 80px;
326 | font-size: 26px;
327 | margin-left: 5px;
328 | position: absolute;
329 | top: 4px;
330 | left: 0;
331 | z-index: 2;
332 | }
333 | .user-contribution-bottom{
334 | margin-top: 10px;
335 | width: 90px;
336 | text-align: center;
337 | font-size: 14px;
338 | color: #6bdcff;
339 | }
340 | .footer{
341 | background: url("../img/footer.png") no-repeat scroll;
342 | background-size: 100% 100%;
343 | width: 1366px;
344 | height: 176px;
345 | position: absolute;
346 | bottom: 0;
347 | opacity: 0.59;
348 | }
349 | .user-img{
350 | background: url("../img/user-background.png") no-repeat scroll;
351 | background-size: 617px 439px;
352 | background-position: -15px 59px;
353 | width: 607px;
354 | height: 606px;
355 | text-align: center;
356 | position: relative;
357 | z-index: 2;
358 | }
359 | .user{
360 | position: relative;
361 | top:15px;
362 | z-index: 3;
363 | }
364 | .user-bottom{
365 | position: relative;
366 | z-index: 1;
367 | bottom: 155px;
368 | }
369 | .user-top{
370 | position: relative;
371 | border: 1px solid #4574d6;
372 | box-shadow: inset 0 0 60px 0 rgba(1, 9, 96, 0.5);
373 | padding: 22px 20px;
374 | margin-bottom: 29px;
375 | }
376 | .user-top-select{
377 | width: 225px;
378 | margin: 0 auto 15px auto;
379 | }
380 | .user-top-select select{
381 | width: 100%;
382 | height: 33px;
383 | padding: 0 14px;
384 | font-size: 16px;
385 | background-color: #06377a;
386 | border: 1px solid #17509b;
387 | color: #6bdcff;
388 | border-radius: 0;
389 | appearance: none;
390 | -webkit-appearance: none; /*去除chrome浏览器的默认下拉图片*/
391 | -moz-appearance: none; /*去除Firefox浏览器的默认下拉图片*/
392 | background: url("../img/pull.svg") no-repeat right center;
393 | }
394 | .user-top-select select:focus{
395 | outline: none;
396 | }
397 | #user-top-chart{
398 | height: 240px;
399 | width: 300px;
400 | }
401 | .user-level{
402 | position: relative;
403 | z-index: 3;
404 | border: 1px solid #4574d6;
405 | box-shadow: inset 0 0 60px 0 rgba(1, 9, 96, 0.5);
406 | padding: 22px 20px;
407 | }
408 | .user-level-title{
409 | width: 100%;
410 | text-align: center;
411 | font-size: 16px;
412 | color: #6bdcff;
413 | }
414 | #user-level-chart{
415 | height: 129px;
416 | width: 300px;
417 | }
418 | .user-level-val{
419 | position: absolute;
420 | color: #032760;
421 | top: 169px;
422 | right: 270px;
423 | z-index: 4;
424 | }
425 | .person-info{
426 | z-index: 12;
427 | position: absolute;
428 | right: 40px;
429 | height: 30px;
430 | top: 30px;
431 | display: flex;
432 | justify-content: flex-start;
433 | align-items: center;
434 | }
435 | .person-info-item a{
436 | color: #0750fe;
437 | font-size: 20px;
438 | text-decoration: none;
439 | }
440 | .person-info-item img{
441 | margin-left: 15px;
442 | width: 30px;
443 | height: 30px;
444 | }
445 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 个人掘金粉丝及关注者数据分析
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
21 |
22 |
23 |
43 |
44 |

45 |
{{loadingTips}}
46 |
47 |
48 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
个人成就
69 |
70 |
71 | | 昵称: |
72 | {{userInfo.username}} |
73 |
74 |
75 | | 职位: |
76 | {{userInfo.jobTitle}} |
77 |
78 |
79 | | 获得点赞: |
80 | {{userInfo.totalCollectionsCount}}
82 | |
83 |
84 |
85 | | 获得阅读: |
86 | {{userInfo.totalViewsCount}} |
88 |
89 |
90 | | 点赞文章: |
91 | {{userInfo.collectedEntriesCount}} |
92 |
93 |
94 | | 点赞沸点: |
95 | {{userInfo.likedPinCount?userInfo.likedPinCount:0}} |
96 |
97 |
98 | | 关注了: |
99 | {{userInfo.followeesCount}} |
100 |
101 |
102 | | 关注标签: |
103 | {{userInfo.subscribedTagsCount}} |
104 |
105 |
106 | | 收藏集: |
107 | {{userInfo.collectionSetCount}} |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
掘力值 |
120 |
{{userInfo.juejinPower}}
121 |
122 |
123 |
粉丝数 |
125 |
{{userInfo.followersCount}}
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 | {{userInfo.postedPostsCount?userInfo.postedPostsCount:0}}
134 |
135 |
发布文章
136 |
137 |
138 |
139 |
140 |
141 | {{userInfo.pinCount?userInfo.pinCount:0}}
142 |
143 |
发布沸点
144 |
145 |
146 |
147 |
148 |
149 |

150 |
LV{{userInfo.level}}
151 |

152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
164 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
LV等级占比
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
--------------------------------------------------------------------------------
/public/js/axios.min.js:
--------------------------------------------------------------------------------
1 | /* axios v0.18.0 | (c) 2018 by Matt Zabriskie */
2 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n
6 | * @license MIT
7 | */
8 | e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])});
9 | //# sourceMappingURL=axios.min.map
10 |
--------------------------------------------------------------------------------
/public/js/Vue.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Vue.js v2.6.10
3 | * (c) 2014-2019 Evan You
4 | * Released under the MIT License.
5 | */
6 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;idocument.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;onon&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;iparseInt(this.max)&&On(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ae,extend:A,mergeOptions:De,defineReactive:xe},e.set=ke,e.delete=Ae,e.nextTick=Ye,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),M.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,A(e.options.components,Tn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),Cn(e),function(e){M.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:te}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Tt}),wn.version="2.6.10";var En=p("style,class"),Nn=p("input,textarea,option,select,progress"),jn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Dn=p("contenteditable,draggable,spellcheck"),Ln=p("events,caret,typing,plaintext-only"),Mn=function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Ln(t)?t:"true"},In=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",Pn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return Pn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Un(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Un(t,r.data));return function(e,t){if(n(e)||n(t))return zn(e,Vn(t));return""}(t.staticClass,t.class)}function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function zn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i-1?hr(e,t,n):In(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Dn(t)?e.setAttribute(t,Mn(t,n)):Pn(t)?Hn(n)?e.removeAttributeNS(Fn,Rn(t)):e.setAttributeNS(Fn,t,n):hr(e,t,n)}function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:dr,update:dr};function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=Bn(r),c=i._transitionClasses;n(c)&&(s=zn(s,Vn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var gr,_r,br,$r,wr,Cr,xr={create:yr,update:yr},kr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&kr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r-1?{exp:e.slice(0,$r),key:'"'+e.slice($r+1)+'"'}:{exp:e,key:null};_r=e,$r=wr=Cr=0;for(;!zr();)Vr(br=Ur())?Jr(br):91===br&&Kr(br);return{exp:e.slice(0,wr),key:e.slice(wr+1,Cr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Ur(){return _r.charCodeAt(++$r)}function zr(){return $r>=gr}function Vr(e){return 34===e||39===e}function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91===e&&t++,93===e&&t--,0===t){Cr=$r;break}}function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}var qr,Wr="__r",Zr="__c";function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,arguments)&&Qr(e,i,n,r)}}var Xr=Ve&&!(X&&Number(X[1])<=53);function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}qr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};qr=r.elm,function(e){if(n(e[Wr])){var t=q?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}n(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}(i),rt(i,o,Yr,Qr,Gr,r.context),qr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=A({},c)),s)i in c||(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=o;var u=t(o)?"":String(o);ii(a,u)&&(a.value=u)}else if("innerHTML"===i&&qn(a.tagName)&&t(a.innerHTML)){(ti=ti||document.createElement("div")).innerHTML="";for(var l=ti.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(o!==s[i])try{a[i]=o}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return f(r)!==f(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var oi={create:ri,update:ri},ai=g(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}var ui,li=/^--/,fi=/\s*!important$/,pi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(C(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(yi).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A(t,$i(e.name||"v")),A(t,e),t}return"string"==typeof e?$i(e):void 0}}var $i=g(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),wi=z&&!W,Ci="transition",xi="animation",ki="transition",Ai="transitionend",Oi="animation",Si="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ki="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Oi="WebkitAnimation",Si="webkitAnimationEnd"));var Ti=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ei(e){Ti(function(){Ti(e)})}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ci?Ai:Si,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ci,l=a,f=o.length):t===xi?u>0&&(n=xi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ci:xi:null)?n===Ci?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ci&&Li.test(r[ki+"Property"])}}function Ii(e,t){for(;e.length1}function Ui(e,t){!0!==t.data.show&&Pi(t)}var zi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;ov?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(0,r,p,v)}(p,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,o)):n(h)?$(0,h,0,h.length-1):n(e.text)&&u.setTextContent(p,""):e.text!==i.text&&u.setTextContent(p,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o-1,a.selected!==o&&(a.selected=o);else if(N(Wi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function qi(e,t){return t.every(function(t){return!N(t,e)})}function Wi(e){return"_value"in e?e._value:e.value}function Zi(e){e.target.composing=!0}function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Yi(e.componentInstance._vnode)}var Qi={model:Vi,show:{bind:function(e,t,n){var r=t.value,i=(n=Yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Pi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Yi(n)).data&&n.data.transition?(n.data.show=!0,r?Pi(n,function(){e.style.display=e.__vOriginalDisplay}):Ri(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},eo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?to(zt(t.children)):e}function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var io=function(e){return e.tag||Ut(e)},oo=function(e){return"show"===e.name},ao={name:"transition",props:eo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=to(o);if(!a)return o;if(this._leaving)return ro(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=no(this),u=this._vnode,l=to(u);if(a.data.directives&&a.data.directives.some(oo)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Ut(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,it(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),ro(e,o);if("in-out"===r){if(Ut(a))return u;var p,d=function(){p()};it(c,"afterEnter",d),it(c,"enterCancelled",d),it(f,"delayLeave",function(e){p=e})}}return o}}},so=A({tag:String,moveClass:String},eo);function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var fo={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},A(wn.options.directives,Qi),A(wn.options.components,fo),wn.prototype.__patch__=z?zi:S,wn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),Yt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,S,{before:function(){e._isMounted&&!e._isDestroyed&&Yt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Yt(e,"mounted")),e}(this,e=e&&z?Yn(e):void 0,t)},z&&setTimeout(function(){F.devtools&&ne&&ne.emit("init",wn)},0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,ho=g(function(e){var t=e[0].replace(vo,"\\$&"),n=e[1].replace(vo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var mo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var yo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},_o=function(e){return(yo=yo||document.createElement("div")).innerHTML=e,yo.textContent},bo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),$o=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Co=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+P.source+"]*",Ao="((?:"+ko+"\\:)?"+ko+")",Oo=new RegExp("^<"+Ao),So=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Ao+"[^>]*>"),Eo=/^]+>/i,No=/^",""":'"',"&":"&","
":"\n"," ":"\t","'":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Po=p("pre,textarea",!0),Ro=function(e,t){return e&&Po(e)&&"\n"===t[0]};function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[e]})}var Bo,Uo,zo,Vo,Ko,Jo,qo,Wo,Zo=/^@|^v-on:/,Go=/^v-|^@|^:/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Yo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,ea=/^\[.*\]$/,ta=/:(.*)$/,na=/^:|^\.|^v-bind:/,ra=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,oa=/[\r\n]/,aa=/\s+/g,sa=g(_o),ca="_empty_";function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t.getTagNamespace||T;t.isReservedTag;zo=Tr(t.modules,"transformNode"),Vo=Tr(t.modules,"preTransformNode"),Ko=Tr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function u(e){if(l(e),s||e.processed||(e=fa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(u=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&u.if&&da(u,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,u;e.children=e.children.filter(function(e){return!e.slotScope}),l(e),e.pre&&(s=!1),Jo(e.tag)&&(c=!1);for(var f=0;f]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,Do(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Ro(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(No.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(jo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Eo);if(m){C(m[0].length);continue}var y=e.match(To);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),Ro(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(To.test($)||Oo.test($)||No.test($)||jo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d)}d<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(Oo);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(So))&&(r=e.match(xo)||e.match(Co));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,l,f){var p=r&&r.ns||Wo(e);q&&"svg"===p&&(o=function(e){for(var t=[],n=0;nc&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=Ar(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Br(t,l);c&&(f="if($event.target.composing)return;"+f),Er(e,"value","("+t+")"),Mr(e,u,f,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:jn,canBeLeftOpenTag:$o,isReservedTag:Wn,getTagNamespace:Zn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ba)},xa=g(function(e){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||d(e.tag)||!wa(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every($a)))}(t);if(1===t.type){if(!wa(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n|^function\s*(?:[\w$]+)?\s*\(/,Oa=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Na=function(e){return"if("+e+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Na("$event.target !== $event.currentTarget"),ctrl:Na("!$event.ctrlKey"),shift:Na("!$event.shiftKey"),alt:Na("!$event.altKey"),meta:Na("!$event.metaKey"),left:Na("'button' in $event && $event.button !== 0"),middle:Na("'button' in $event && $event.button !== 1"),right:Na("'button' in $event && $event.button !== 2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=La(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return La(e)}).join(",")+"]";var t=Sa.test(e.value),n=Aa.test(e.value),r=Sa.test(e.value.replace(Oa,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ja[s])o+=ja[s],Ta[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Na(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ma).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=Ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},Fa=function(e){this.options=e,this.warn=e.warn||Sr,this.transforms=Tr(e.modules,"transformCode"),this.dataGenFns=Tr(e.modules,"genData"),this.directives=A(A({},Ia),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?Ra(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ha(e,t);if(e.once&&!e.onceProcessed)return Ba(e,t);if(e.for&&!e.forProcessed)return za(e,t);if(e.if&&!e.ifProcessed)return Ua(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:b(e.name),value:e.value,dynamic:e.dynamic}})):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Va(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Va(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ua(e,t,Ja,"null");if(e.for&&!e.forProcessed)return za(e,t,Ja);var r=e.slotScope===ca?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ra(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ra)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r':'',ts.innerHTML.indexOf("
")>0}var os=!!z&&is(!1),as=!!z&&is(!0),ss=g(function(e){var t=Yn(e);return t&&t.innerHTML}),cs=wn.prototype.$mount;return wn.prototype.$mount=function(e,t){if((e=e&&Yn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ss(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=rs(r,{outputSourceRange:!1,shouldDecodeNewlines:os,shouldDecodeNewlinesForHref:as,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return cs.call(this,e,t)},wn.compile=rs,wn});
7 |
--------------------------------------------------------------------------------