├── web ├── src │ ├── style │ │ └── main.js │ ├── assets │ │ └── Logo.png │ ├── App.vue │ ├── main.js │ ├── static │ │ └── userlogin.css │ ├── router │ │ └── index.js │ └── components │ │ ├── Login.vue │ │ ├── EvaluationBrowse.vue │ │ ├── index.vue │ │ ├── EvaluationList.vue │ │ ├── RetrievePassword.vue │ │ └── Registered.vue ├── config │ ├── prod.env.js │ ├── dev.env.js │ └── index.js ├── build │ ├── logo.png │ ├── vue-loader.conf.js │ ├── build.js │ ├── check-versions.js │ ├── webpack.base.conf.js │ ├── utils.js │ ├── webpack.dev.conf.js │ └── webpack.prod.conf.js ├── dist │ ├── static │ │ ├── fonts │ │ │ ├── element-icons.535877f.woff │ │ │ └── element-icons.732389d.ttf │ │ └── js │ │ │ ├── manifest.2ae2e69a05c33dfc65f8.js │ │ │ ├── manifest.2ae2e69a05c33dfc65f8.js.map │ │ │ └── app.7fe5bf07b9ef3c51e42c.js │ └── index.html ├── README.md ├── package.json └── index.html ├── Web Server ├── target │ └── classes │ │ ├── com │ │ └── example │ │ │ └── project │ │ │ ├── pojo │ │ │ ├── User.class │ │ │ ├── Resdata.class │ │ │ └── Evaluation.class │ │ │ ├── jwt │ │ │ └── JwtUtil.class │ │ │ ├── mapper │ │ │ ├── UserMapper.class │ │ │ └── EvaluationMapper.class │ │ │ ├── ProjectApplication.class │ │ │ ├── serivce │ │ │ ├── UserService.class │ │ │ ├── EvaluationService.class │ │ │ └── impl │ │ │ │ ├── UserServiceImpl.class │ │ │ │ └── EvaluationServiceImpl.class │ │ │ └── Controller │ │ │ ├── UserController.class │ │ │ └── EvaluationController.class │ │ ├── application.properties │ │ └── application.yml ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.properties │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── project │ │ │ ├── ProjectApplication.java │ │ │ ├── serivce │ │ │ ├── EvaluationService.java │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ │ ├── EvaluationServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ │ ├── mapper │ │ │ ├── EvaluationMapper.java │ │ │ └── UserMapper.java │ │ │ ├── pojo │ │ │ ├── Resdata.java │ │ │ ├── Evaluation.java │ │ │ └── User.java │ │ │ ├── Controller │ │ │ ├── EvaluationController.java │ │ │ └── UserController.java │ │ │ └── jwt │ │ │ └── JwtUtil.java │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── project │ │ └── ProjectApplicationTests.java ├── HELP.md ├── pom.xml ├── mvnw.cmd ├── mvnw └── project.iml ├── system info.txt ├── README.md ├── evaluation.sql └── user.sql /web/src/style/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /web/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/web/build/logo.png -------------------------------------------------------------------------------- /web/src/assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/web/src/assets/Logo.png -------------------------------------------------------------------------------- /web/dist/static/fonts/element-icons.535877f.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/web/dist/static/fonts/element-icons.535877f.woff -------------------------------------------------------------------------------- /web/dist/static/fonts/element-icons.732389d.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/web/dist/static/fonts/element-icons.732389d.ttf -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/pojo/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/pojo/User.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/jwt/JwtUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/jwt/JwtUtil.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/pojo/Resdata.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/pojo/Resdata.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/mapper/UserMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/mapper/UserMapper.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/pojo/Evaluation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/pojo/Evaluation.class -------------------------------------------------------------------------------- /web/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/ProjectApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/ProjectApplication.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/serivce/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/serivce/UserService.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/mapper/EvaluationMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/mapper/EvaluationMapper.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/Controller/UserController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/Controller/UserController.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/serivce/EvaluationService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/serivce/EvaluationService.class -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/serivce/impl/UserServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/serivce/impl/UserServiceImpl.class -------------------------------------------------------------------------------- /Web Server/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | 2 | spring.mail.username=2209513284@qq.com 3 | spring.mail.password=nwrasmsixcebdjcd 4 | spring.mail.host=smtp.qq.com 5 | #qq???????? 6 | spring.mail.properties.mail.smtl.ssl.enable=true -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/Controller/EvaluationController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/Controller/EvaluationController.class -------------------------------------------------------------------------------- /Web Server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | spring.mail.username=2209513284@qq.com 3 | spring.mail.password=nwrasmsixcebdjcd 4 | spring.mail.host=smtp.qq.com 5 | #qq???????? 6 | spring.mail.properties.mail.smtl.ssl.enable=true -------------------------------------------------------------------------------- /Web Server/target/classes/com/example/project/serivce/impl/EvaluationServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaZuiZui/project_managemene_System/HEAD/Web Server/target/classes/com/example/project/serivce/impl/EvaluationServiceImpl.class -------------------------------------------------------------------------------- /system info.txt: -------------------------------------------------------------------------------- 1 | https://www.navicat.com/en/what-is-navicat-for-mongodb 2 | https://code.visualstudio.com/ 3 | https://nodejs.org/en/ 4 | https://www.jetbrains.com/idea/ jdk 选择1.8 5 | https://typora.io/ 6 | 7 | npm run dev 8 | 9 | java -jar index-0.0.1-SNAPSHOT.jar 10 | -------------------------------------------------------------------------------- /web/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # project_managemene_System 2 | 此项目停止维护,可能css 文件会缺少 3 | springboot+vue开发的项目管理系统,主要内容有开发一个安全的网络表单允许客户在注册应用。 他们必须注册电子邮件地址、密码、姓名和联系方式电话号码。用户的详细信息应该存储在一个数据库,安全登录功能,密码管理功能提供密码力量建议和找回密码。实施“请求评估”网页,只有登录才能访问用户。 这个网页应该有一个要输入的评论框在细节中对象及其请求,以及下拉框的首选方法之间的联系电话还是邮件。扩展“请求评估”允许文件的页面 上传一张照片物体。实施一个显示一个页面评估清单要求。 这一页应该只可见给管理员角色. 4 | -------------------------------------------------------------------------------- /Web Server/src/test/java/com/example/project/ProjectApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.project; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ProjectApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /web/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App' 3 | import router from './router' 4 | import ElementUI from 'element-ui'; 5 | import 'element-ui/lib/theme-chalk/index.css'; 6 | import Axios from 'axios'; 7 | 8 | Vue.prototype.$axios = Axios; 9 | Vue.use(ElementUI); 10 | 11 | 12 | new Vue({ 13 | el: '#app', 14 | router, 15 | render: h => h(App), 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /Web Server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | spring: 4 | datasource: 5 | type: com.alibaba.druid.pool.DruidDataSource 6 | driver-class-name: com.mysql.jdbc.Driver 7 | url: jdbc:mysql://127.0.0.1:3306/G6077_ys399?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8 8 | username: root 9 | password: admin 10 | mybatis-plus: 11 | configuration: 12 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 13 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/ProjectApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.project; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * project startup class 8 | */ 9 | @SpringBootApplication 10 | public class ProjectApplication { 11 | public static void main(String[] args) { 12 | SpringApplication.run(ProjectApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Web Server/target/classes/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | spring: 4 | datasource: 5 | type: com.alibaba.druid.pool.DruidDataSource 6 | driver-class-name: com.mysql.jdbc.Driver 7 | url: jdbc:mysql://krier.uscs.susx.ac.uk:3306/G6077_ys399?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8 8 | username: ys399 9 | password: Mysql_516885 10 | mybatis-plus: 11 | configuration: 12 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 13 | -------------------------------------------------------------------------------- /web/README.md: -------------------------------------------------------------------------------- 1 | # dazui 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | ``` 20 | 21 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 22 | -------------------------------------------------------------------------------- /web/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/serivce/EvaluationService.java: -------------------------------------------------------------------------------- 1 | package com.example.project.serivce; 2 | 3 | import com.example.project.pojo.Evaluation; 4 | import org.springframework.stereotype.Service; 5 | import org.springframework.web.bind.annotation.PostMapping; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | 8 | @Service 9 | public interface EvaluationService { 10 | /** 11 | * Add eva Reviews 12 | * @param evaluation 13 | * @return 14 | */ 15 | public String addUserReviews(@RequestBody Evaluation evaluation); 16 | 17 | /** 18 | * get all data 19 | */ 20 | @PostMapping ("/user/getAllDate") 21 | public String getAllDate(); 22 | } 23 | -------------------------------------------------------------------------------- /web/dist/static/js/manifest.2ae2e69a05c33dfc65f8.js: -------------------------------------------------------------------------------- 1 | !function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a getAllDate(); 23 | 24 | @Select("select *from evaluation where username = #{username} ") 25 | public ArrayList getlistByUsername(@Param("username")String username); 26 | } 27 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/pojo/Resdata.java: -------------------------------------------------------------------------------- 1 | package com.example.project.pojo; 2 | 3 | /** 4 | * 5 | */ 6 | public class Resdata { 7 | private int id; 8 | private String code; 9 | private String jwt; 10 | 11 | @Override 12 | public String toString() { 13 | return "Resdata{" + 14 | "id=" + id + 15 | ", code='" + code + '\'' + 16 | ", jwt='" + jwt + '\'' + 17 | '}'; 18 | } 19 | 20 | public int getId() { 21 | return id; 22 | } 23 | 24 | public void setId(int id) { 25 | this.id = id; 26 | } 27 | 28 | public String getCode() { 29 | return code; 30 | } 31 | 32 | public void setCode(String code) { 33 | this.code = code; 34 | } 35 | 36 | public String getJwt() { 37 | return jwt; 38 | } 39 | 40 | public void setJwt(String jwt) { 41 | this.jwt = jwt; 42 | } 43 | 44 | public Resdata() { 45 | } 46 | 47 | public Resdata(int id, String code, String jwt) { 48 | this.id = id; 49 | this.code = code; 50 | this.jwt = jwt; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/serivce/UserService.java: -------------------------------------------------------------------------------- 1 | package com.example.project.serivce; 2 | 3 | import com.example.project.pojo.User; 4 | import org.springframework.stereotype.Service; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestParam; 8 | 9 | /** 10 | * User servcie 11 | */ 12 | @Service 13 | public interface UserService { 14 | 15 | /** 16 | * Check if the user is logged in 17 | * @param token 18 | * @return 19 | */ 20 | @GetMapping("/user/p/checkinsin") 21 | public String checkinsin(@RequestParam("token")String token); 22 | 23 | /** 24 | * user Login 25 | * @param user 26 | * @return String.class 27 | */ 28 | public String userLogin(User user,@RequestParam("select")String select); 29 | 30 | /** 31 | * User registration 32 | * @param user 33 | * @return 34 | */ 35 | public String userRegistration( User user); 36 | 37 | /** 38 | * Retrieve password 39 | * @param user 40 | * @return 41 | */ 42 | public String retrievepassword(@RequestBody User user); 43 | } 44 | -------------------------------------------------------------------------------- /web/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router'; 3 | import Login from '../components/Login'; 4 | import Registered from '../components/Registered' 5 | import retrievepassword from '../components/RetrievePassword' 6 | 7 | import index from '../components/index' 8 | import adminindex from '../components/EvaluationBrowse' 9 | import uevluationlist from '../components/EvaluationList' 10 | 11 | Vue.use(Router); 12 | 13 | export default new Router({ 14 | mode: 'history', 15 | routes:[ 16 | { 17 | path: '/pu/user/EvaluationList', 18 | component: uevluationlist, 19 | }, 20 | { 21 | path: '/pu/user/retrievepassword', 22 | component: retrievepassword, 23 | }, 24 | { 25 | path: '/', 26 | component: index, 27 | }, 28 | { 29 | path: '/admin', 30 | component: adminindex, 31 | }, 32 | //login 33 | { 34 | path: '/pu/user/login', 35 | component: Login, 36 | }, 37 | //register 38 | { 39 | path: '/pu/user/registered', 40 | component: Registered, 41 | } 42 | ] 43 | }) -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/Controller/EvaluationController.java: -------------------------------------------------------------------------------- 1 | package com.example.project.Controller; 2 | 3 | import com.example.project.pojo.Evaluation; 4 | import com.example.project.serivce.impl.EvaluationServiceImpl; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.*; 7 | 8 | /** 9 | * Evaluation Controller 10 | */ 11 | @CrossOrigin 12 | @RestController 13 | public class EvaluationController { 14 | @Autowired 15 | private EvaluationServiceImpl evaluationService; 16 | 17 | @GetMapping("/user/getlist") 18 | public String getEvaList(@RequestParam("token") String token){ 19 | System.out.println("asd"); 20 | return evaluationService.getEvaList(token); 21 | } 22 | 23 | /** 24 | * Add User Reviews 25 | * @param evaluation 26 | * @return 27 | */ 28 | @PostMapping("/user/addReviews") 29 | public String AddUserReviews(@RequestBody Evaluation evaluation){ 30 | 31 | return evaluationService.addUserReviews(evaluation); 32 | } 33 | 34 | /** 35 | * get all data 36 | */ 37 | @PostMapping ("/admin/getAllDate") 38 | public String getAllDate(){ 39 | return evaluationService.getAllDate(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /web/build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /web/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /web/dist/index.html: -------------------------------------------------------------------------------- 1 | index
-------------------------------------------------------------------------------- /evaluation.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat Premium Data Transfer 3 | 4 | Source Server : 101.35.95.141 5 | Source Server Type : MySQL 6 | Source Server Version : 50562 7 | Source Host : 101.35.95.141:3306 8 | Source Schema : project1 9 | 10 | Target Server Type : MySQL 11 | Target Server Version : 50562 12 | File Encoding : 65001 13 | 14 | Date: 29/11/2021 10:12:00 15 | */ 16 | 17 | SET NAMES utf8mb4; 18 | SET FOREIGN_KEY_CHECKS = 0; 19 | 20 | -- ---------------------------- 21 | -- Table structure for evaluation 22 | -- ---------------------------- 23 | DROP TABLE IF EXISTS `evaluation`; 24 | CREATE TABLE `evaluation` ( 25 | `id` int(9) NOT NULL AUTO_INCREMENT, 26 | `evaluationtext` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, 27 | `username` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 28 | `imaurl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 29 | PRIMARY KEY (`id`) USING BTREE 30 | ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; 31 | 32 | -- ---------------------------- 33 | -- Records of evaluation 34 | -- ---------------------------- 35 | INSERT INTO `evaluation` VALUES (1, '啊实打实的', 'y51288033@outlook.com', NULL); 36 | INSERT INTO `evaluation` VALUES (2, 'asdsadasdas', '51288033@outlook.com', '222.png'); 37 | INSERT INTO `evaluation` VALUES (3, 'TEST111122334556', '51288033@qq.com', '1999.png'); 38 | INSERT INTO `evaluation` VALUES (4, '1112233', '220951@qq.com', '222222222.png'); 39 | INSERT INTO `evaluation` VALUES (5, '111121132123', '220951@qq.com', NULL); 40 | 41 | SET FOREIGN_KEY_CHECKS = 1; 42 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/pojo/Evaluation.java: -------------------------------------------------------------------------------- 1 | package com.example.project.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Evaluation implements Serializable { 6 | private int id; 7 | private String evaluationtext; 8 | private String username; 9 | private String imaurl; 10 | 11 | @Override 12 | public String toString() { 13 | return "Evaluation{" + 14 | "id=" + id + 15 | ", evaluationtext='" + evaluationtext + '\'' + 16 | ", username='" + username + '\'' + 17 | ", imaurl='" + imaurl + '\'' + 18 | '}'; 19 | } 20 | 21 | public int getId() { 22 | return id; 23 | } 24 | 25 | public void setId(int id) { 26 | this.id = id; 27 | } 28 | 29 | public String getEvaluationtext() { 30 | return evaluationtext; 31 | } 32 | 33 | public void setEvaluationtext(String evaluationtext) { 34 | this.evaluationtext = evaluationtext; 35 | } 36 | 37 | public String getUsername() { 38 | return username; 39 | } 40 | 41 | public void setUsername(String username) { 42 | this.username = username; 43 | } 44 | 45 | public String getImaurl() { 46 | return imaurl; 47 | } 48 | 49 | public void setImaurl(String imaurl) { 50 | this.imaurl = imaurl; 51 | } 52 | 53 | public Evaluation() { 54 | } 55 | 56 | public Evaluation(int id, String evaluationtext, String username, String imaurl) { 57 | this.id = id; 58 | this.evaluationtext = evaluationtext; 59 | this.username = username; 60 | this.imaurl = imaurl; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dazui", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "DaZuiZui ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "axios": "^0.21.0", 14 | "element-ui": "^2.13.2", 15 | "vue": "^2.5.2" 16 | }, 17 | "devDependencies": { 18 | "autoprefixer": "^7.1.2", 19 | "babel-core": "^6.22.1", 20 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 21 | "babel-loader": "^7.1.1", 22 | "babel-plugin-syntax-jsx": "^6.18.0", 23 | "babel-plugin-transform-runtime": "^6.22.0", 24 | "babel-plugin-transform-vue-jsx": "^3.5.0", 25 | "babel-preset-env": "^1.3.2", 26 | "babel-preset-stage-2": "^6.22.0", 27 | "chalk": "^2.0.1", 28 | "copy-webpack-plugin": "^4.0.1", 29 | "css-loader": "^0.28.0", 30 | "extract-text-webpack-plugin": "^3.0.0", 31 | "file-loader": "^1.1.4", 32 | "friendly-errors-webpack-plugin": "^1.6.1", 33 | "html-webpack-plugin": "^2.30.1", 34 | "node-notifier": "^5.1.2", 35 | "node-sass": "^4.14.1", 36 | "optimize-css-assets-webpack-plugin": "^3.2.0", 37 | "ora": "^1.2.0", 38 | "portfinder": "^1.0.13", 39 | "postcss-import": "^11.0.0", 40 | "postcss-loader": "^2.0.8", 41 | "postcss-url": "^7.2.1", 42 | "rimraf": "^2.6.0", 43 | "sass-loader": "^10.0.4", 44 | "semver": "^5.3.0", 45 | "shelljs": "^0.7.6", 46 | "uglifyjs-webpack-plugin": "^1.1.1", 47 | "url-loader": "^0.5.8", 48 | "vue-loader": "^13.3.0", 49 | "vue-router": "^3.4.7", 50 | "vue-style-loader": "^3.0.1", 51 | "vue-template-compiler": "^2.5.2", 52 | "webpack": "^3.6.0", 53 | "webpack-bundle-analyzer": "^2.9.0", 54 | "webpack-dev-server": "^2.9.1", 55 | "webpack-merge": "^4.1.0" 56 | }, 57 | "engines": { 58 | "node": ">= 6.0.0", 59 | "npm": ">= 3.0.0" 60 | }, 61 | "browserslist": [ 62 | "> 1%", 63 | "last 2 versions", 64 | "not ie <= 8" 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.project.mapper; 2 | 3 | import com.example.project.pojo.User; 4 | import org.apache.ibatis.annotations.*; 5 | 6 | /** 7 | * user mapper 8 | */ 9 | @Mapper 10 | public interface UserMapper { 11 | /** 12 | * Check if the username is already registered 13 | * @param username 14 | * @return 15 | */ 16 | @Select("select *from user where username = #{username} or phoneNumber = #{phoneNumber}") 17 | public User checkIfTheUsernameIsAlreadyRegistered(@Param("username")String username,@Param("phoneNumber")String phoneNumber); 18 | 19 | /** 20 | * @param username 21 | * @return 22 | */ 23 | @Select("select *from user where username = #{username}") 24 | public User QueryUserbyUsername(@Param("username")String username); 25 | 26 | /** 27 | * @param phoneNumber 28 | * @return 29 | */ 30 | @Select("select *from user where phoneNumber = #{phoneNumber}") 31 | public User QueryUserbyphoneNumber(@Param("phoneNumber")String phoneNumber); 32 | 33 | /** 34 | * register a user 35 | * @param user 36 | */ 37 | @Insert({"insert into user value(null,#{user.username},#{user.password},#{user.name},#{user.email},#{user.phoneNumber},'user')"}) 38 | public void registerauser(@Param("user")User user); 39 | 40 | /** 41 | * 42 | * @param user 43 | * @return 44 | */ 45 | @Select("select *from user where username = #{username} and password = #{password}") 46 | public User QueryUsersByUsernameAndPassword(User user); 47 | 48 | @Select("select *from user where phoneNumber = #{phoneNumber} and password = #{password}") 49 | public User QueryUsersByPhonenumberAndPassword(User user); 50 | 51 | @Select("select *from user where username = #{username} and email = #{email} and phoneNumber = #{phoneNumber}") 52 | public User QueryUsersByUsernameAdnPhoneNumberAndEmail(User user); 53 | 54 | @Update("update user set password = #{password} where username = #{username}") 55 | public void UpdateUserPassword(User user); 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /user.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat Premium Data Transfer 3 | 4 | Source Server : 101.35.95.141 5 | Source Server Type : MySQL 6 | Source Server Version : 50562 7 | Source Host : 101.35.95.141:3306 8 | Source Schema : project1 9 | 10 | Target Server Type : MySQL 11 | Target Server Version : 50562 12 | File Encoding : 65001 13 | 14 | Date: 29/11/2021 10:12:41 15 | */ 16 | 17 | SET NAMES utf8mb4; 18 | SET FOREIGN_KEY_CHECKS = 0; 19 | 20 | -- ---------------------------- 21 | -- Table structure for user 22 | -- ---------------------------- 23 | DROP TABLE IF EXISTS `user`; 24 | CREATE TABLE `user` ( 25 | `id` int(11) NOT NULL AUTO_INCREMENT, 26 | `username` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 27 | `password` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 28 | `name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 29 | `email` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 30 | `phoneNumber` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 31 | `role` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 32 | PRIMARY KEY (`id`) USING BTREE 33 | ) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; 34 | 35 | -- ---------------------------- 36 | -- Records of user 37 | -- ---------------------------- 38 | INSERT INTO `user` VALUES (11, 'y51288033', 'wasd123', 'y5128803', 'wasd@qq.com', '123', 'user'); 39 | INSERT INTO `user` VALUES (12, 'root', 'admin', 'wasd', 'root', '10086', 'admin'); 40 | INSERT INTO `user` VALUES (13, '51288033@outlook.com', 'wasd123', 'demo', '51288033@outlook.com', '1111111', 'user'); 41 | INSERT INTO `user` VALUES (14, '51288033@qq.com', 'wasd123..WASD^', 'TEST1', '51288033@qq.com', '1008611', 'user'); 42 | INSERT INTO `user` VALUES (15, '10086@qq.com', 'WASD123..wasd^', 'y5128803', '10086@qq.com', '100861199', 'user'); 43 | INSERT INTO `user` VALUES (16, '220951@qq.com', 'wasd123wasd', 'test1', '220951@qq.com', '220951', 'user'); 44 | 45 | SET FOREIGN_KEY_CHECKS = 1; 46 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/serivce/impl/EvaluationServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.project.serivce.impl; 2 | 3 | import com.alibaba.fastjson.JSONArray; 4 | import com.example.project.jwt.JwtUtil; 5 | import com.example.project.mapper.EvaluationMapper; 6 | import com.example.project.mapper.UserMapper; 7 | import com.example.project.pojo.Evaluation; 8 | import com.example.project.pojo.User; 9 | import com.example.project.serivce.EvaluationService; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.web.bind.annotation.GetMapping; 13 | import org.springframework.web.bind.annotation.PostMapping; 14 | import org.springframework.web.bind.annotation.RequestBody; 15 | import org.springframework.web.bind.annotation.RequestParam; 16 | 17 | import java.util.ArrayList; 18 | 19 | @Service 20 | public class EvaluationServiceImpl implements EvaluationService { 21 | @Autowired 22 | private EvaluationMapper evaluationMapper; 23 | @Autowired 24 | private UserMapper userMapperl; 25 | 26 | public String getEvaList(@RequestParam("token") String token){ 27 | String username = JwtUtil.analysisJWT(token); 28 | if (username.indexOf("@") < 0){ 29 | User user = userMapperl.QueryUserbyphoneNumber(username); 30 | username = user.getUsername(); 31 | } 32 | ArrayList evaluations = evaluationMapper.getlistByUsername(username); 33 | System.out.println("asd"); 34 | return JSONArray.toJSONString(evaluations); 35 | } 36 | 37 | /** 38 | * Add User Reviews 39 | * @param evaluation 40 | * @return 41 | */ 42 | @Override 43 | public String addUserReviews(@RequestBody Evaluation evaluation){ 44 | if (evaluation != null) { 45 | evaluationMapper.addUserReviews(evaluation); 46 | } 47 | return "添加成功"; 48 | } 49 | 50 | /** 51 | * get all data 52 | */ 53 | @Override 54 | public String getAllDate() { 55 | return JSONArray.toJSONString(evaluationMapper.getAllDate()); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/jwt/JwtUtil.java: -------------------------------------------------------------------------------- 1 | package com.example.project.jwt; 2 | 3 | 4 | import com.example.project.pojo.User; 5 | import io.jsonwebtoken.Claims; 6 | import io.jsonwebtoken.JwtBuilder; 7 | import io.jsonwebtoken.Jwts; 8 | import io.jsonwebtoken.SignatureAlgorithm; 9 | 10 | import java.util.Date; 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | /** 15 | * This tool class is responsible for generating and parsing JWT 16 | */ 17 | public class JwtUtil { 18 | /** 19 | * the key needed to generate or parse the token 20 | */ 21 | private final static String JWTKey = "kehu1"; 22 | 23 | /** 24 | * Generate ciphertext 25 | * @return 26 | */ 27 | public static String createJWT(User user){ 28 | //Build jwt token 29 | JwtBuilder builder = Jwts.builder(); 30 | builder.setIssuer("kehu1"); //Issuer 31 | builder.setIssuedAt(new Date()); //Issuing time 32 | builder.setSubject("kehu1"); //theme 33 | builder.setExpiration(new Date(System.currentTimeMillis()+3600000*10)); //Expiration time is set to 360000 seconds 34 | 35 | //Custom information Custom load 36 | Map map = new HashMap<>(); 37 | map.put("username",user.getUsername()); 38 | builder.addClaims(map); //Add load 39 | 40 | builder.signWith(SignatureAlgorithm.HS256,JWTKey); //1. Algorithm 2. Key 41 | //Generate ciphertext 42 | String jstString = builder.compact(); 43 | return jstString; 44 | } 45 | 46 | /** 47 | * Resolve key 48 | * @param token Pass in the token and get the login username from the data parsed by the token 49 | * @return 50 | */ 51 | public static String analysisJWT(String token){ 52 | Claims body = Jwts.parser() 53 | //Key 54 | .setSigningKey(JWTKey) 55 | //The token to be parsed 56 | .parseClaimsJws(token) 57 | //Get the parsed data 58 | .getBody(); 59 | System.out.println(body.get("username")); 60 | return (String) body.get("username"); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /web/config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../dist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../dist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: '/', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /web/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | 12 | 13 | module.exports = { 14 | context: path.resolve(__dirname, '../'), 15 | entry: { 16 | app: './src/main.js' 17 | }, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: '[name].js', 21 | publicPath: process.env.NODE_ENV === 'production' 22 | ? config.build.assetsPublicPath 23 | : config.dev.assetsPublicPath 24 | }, 25 | resolve: { 26 | extensions: ['.js', '.vue', '.json'], 27 | alias: { 28 | '@': resolve('src'), 29 | } 30 | }, 31 | module: { 32 | rules: [ 33 | { 34 | test: /\.vue$/, 35 | loader: 'vue-loader', 36 | options: vueLoaderConfig 37 | }, 38 | { 39 | test: /\.js$/, 40 | loader: 'babel-loader', 41 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 42 | }, 43 | { 44 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 45 | loader: 'url-loader', 46 | options: { 47 | limit: 10000, 48 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 49 | } 50 | }, 51 | { 52 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 53 | loader: 'url-loader', 54 | options: { 55 | limit: 10000, 56 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 57 | } 58 | }, 59 | { 60 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 61 | loader: 'url-loader', 62 | options: { 63 | limit: 10000, 64 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 65 | } 66 | } 67 | ] 68 | }, 69 | node: { 70 | // prevent webpack from injecting useless setImmediate polyfill because Vue 71 | // source contains it (although only uses it if it's native). 72 | setImmediate: false, 73 | // prevent webpack from injecting mocks to Node native modules 74 | // that does not make sense for the client 75 | dgram: 'empty', 76 | fs: 'empty', 77 | net: 'empty', 78 | tls: 'empty', 79 | child_process: 'empty' 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Lovejoy 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/pojo/User.java: -------------------------------------------------------------------------------- 1 | package com.example.project.pojo; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * 10 | */ 11 | public class User implements Serializable { 12 | //id 13 | @TableId(type = IdType.AUTO) 14 | private int id; 15 | private String username; 16 | private String password; 17 | private String name; 18 | private String email; 19 | private String phoneNumber; 20 | private String role; 21 | 22 | @Override 23 | public String toString() { 24 | return "User{" + 25 | "id=" + id + 26 | ", username='" + username + '\'' + 27 | ", password='" + password + '\'' + 28 | ", name='" + name + '\'' + 29 | ", email='" + email + '\'' + 30 | ", phoneNumber='" + phoneNumber + '\'' + 31 | ", role='" + role + '\'' + 32 | '}'; 33 | } 34 | 35 | public int getId() { 36 | return id; 37 | } 38 | 39 | public void setId(int id) { 40 | this.id = id; 41 | } 42 | 43 | public String getUsername() { 44 | return username; 45 | } 46 | 47 | public void setUsername(String username) { 48 | this.username = username; 49 | } 50 | 51 | public String getPassword() { 52 | return password; 53 | } 54 | 55 | public void setPassword(String password) { 56 | this.password = password; 57 | } 58 | 59 | public String getName() { 60 | return name; 61 | } 62 | 63 | public void setName(String name) { 64 | this.name = name; 65 | } 66 | 67 | public String getEmail() { 68 | return email; 69 | } 70 | 71 | public void setEmail(String email) { 72 | this.email = email; 73 | } 74 | 75 | public String getPhoneNumber() { 76 | return phoneNumber; 77 | } 78 | 79 | public void setPhoneNumber(String phoneNumber) { 80 | this.phoneNumber = phoneNumber; 81 | } 82 | 83 | public String getRole() { 84 | return role; 85 | } 86 | 87 | public void setRole(String role) { 88 | this.role = role; 89 | } 90 | 91 | public User() { 92 | } 93 | 94 | public User(int id, String username, String password, String name, String email, String phoneNumber, String role) { 95 | this.id = id; 96 | this.username = username; 97 | this.password = password; 98 | this.name = name; 99 | this.email = email; 100 | this.phoneNumber = phoneNumber; 101 | this.role = role; 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /web/build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass'), 64 | stylus: generateLoaders('stylus'), 65 | styl: generateLoaders('stylus') 66 | } 67 | } 68 | 69 | // Generate loaders for standalone style files (outside of .vue) 70 | exports.styleLoaders = function (options) { 71 | const output = [] 72 | const loaders = exports.cssLoaders(options) 73 | 74 | for (const extension in loaders) { 75 | const loader = loaders[extension] 76 | output.push({ 77 | test: new RegExp('\\.' + extension + '$'), 78 | use: loader 79 | }) 80 | } 81 | 82 | return output 83 | } 84 | 85 | exports.createNotifierCallback = () => { 86 | const notifier = require('node-notifier') 87 | 88 | return (severity, errors) => { 89 | if (severity !== 'error') return 90 | 91 | const error = errors[0] 92 | const filename = error.file && error.file.split('!').pop() 93 | 94 | notifier.notify({ 95 | title: packageConfig.name, 96 | message: severity + ': ' + error.name, 97 | subtitle: filename || '', 98 | icon: path.join(__dirname, 'logo.png') 99 | }) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /web/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true 59 | }), 60 | // copy custom static assets 61 | new CopyWebpackPlugin([ 62 | { 63 | from: path.resolve(__dirname, '../static'), 64 | to: config.dev.assetsSubDirectory, 65 | ignore: ['.*'] 66 | } 67 | ]) 68 | ] 69 | }) 70 | 71 | module.exports = new Promise((resolve, reject) => { 72 | portfinder.basePort = process.env.PORT || config.dev.port 73 | portfinder.getPort((err, port) => { 74 | if (err) { 75 | reject(err) 76 | } else { 77 | // publish the new Port, necessary for e2e tests 78 | process.env.PORT = port 79 | // add port to devServer config 80 | devWebpackConfig.devServer.port = port 81 | 82 | // Add FriendlyErrorsPlugin 83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 84 | compilationSuccessInfo: { 85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 86 | }, 87 | onErrors: config.dev.notifyOnErrors 88 | ? utils.createNotifierCallback() 89 | : undefined 90 | })) 91 | 92 | resolve(devWebpackConfig) 93 | } 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /Web Server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.1.RELEASE 9 | 10 | 11 | com.xxxx 12 | index 13 | 0.0.1-SNAPSHOT 14 | index 15 | Demo project for Spring Boot 16 | 17 | 1.8 18 | 19 | 20 | 21 | 22 | 23 | 24 | com.alibaba 25 | fastjson 26 | 1.2.72 27 | 28 | 29 | 30 | 31 | 32 | com.baomidou 33 | mybatis-plus-boot-starter 34 | 3.0.5 35 | 36 | 37 | com.alibaba 38 | druid 39 | 1.1.22 40 | 41 | 42 | 43 | 44 | mysql 45 | mysql-connector-java 46 | 5.1.6 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-starter-jdbc 51 | 52 | 53 | 54 | 55 | org.springframework.boot 56 | spring-boot-starter-web 57 | 58 | 59 | 60 | 61 | io.jsonwebtoken 62 | jjwt 63 | 0.9.1 64 | 65 | 66 | 67 | 68 | com.alibaba 69 | fastjson 70 | 1.2.72 71 | 72 | 73 | 74 | com.aliyun.oss 75 | aliyun-sdk-oss 76 | 3.10.2 77 | 78 | 79 | org.springframework.boot 80 | spring-boot-starter-test 81 | test 82 | 83 | 84 | org.junit.vintage 85 | junit-vintage-engine 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | org.springframework.boot 96 | spring-boot-maven-plugin 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/Controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.example.project.Controller; 2 | 3 | import com.aliyun.oss.OSS; 4 | import com.aliyun.oss.OSSClientBuilder; 5 | import com.aliyun.oss.model.PutObjectRequest; 6 | import com.example.project.pojo.User; 7 | import com.example.project.serivce.UserService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.*; 10 | import org.springframework.web.multipart.MultipartFile; 11 | import org.springframework.web.multipart.MultipartHttpServletRequest; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.io.ByteArrayInputStream; 15 | 16 | /** 17 | * User controller 18 | */ 19 | @CrossOrigin 20 | @RestController 21 | public class UserController { 22 | @Autowired 23 | private UserService userService; 24 | 25 | 26 | private static String endpoint = "oss-cn-beijing.aliyuncs.com"; 27 | private static String accessKeyId = "LTAI5tFfSmSBqN2cJ2WjU8QH"; 28 | private static String accessKeySecret = "OrXryk2Q7qcx307HN8dfttkqeVhChP"; 29 | String bucktName = "bxxt-lzj"; 30 | 31 | /** 32 | * 33 | * @param token 34 | * @return 35 | */ 36 | @GetMapping("/user/p/checkinsin") 37 | public String checkinsin(@RequestParam("token")String token){ 38 | return userService.checkinsin(token); 39 | } 40 | 41 | /** 42 | * 43 | * @param request 44 | * @return 45 | * @throws Exception 46 | */ 47 | @RequestMapping("/user/uploadFile") 48 | public String uploadFile(HttpServletRequest request) throws Exception { 49 | if (request != null){ 50 | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; 51 | 52 | //files对应前端的key 53 | MultipartFile multipartFile = multipartRequest.getFile("file"); 54 | multipartFile.getBytes();//得到文件的二进制流 55 | 56 | // 创建OSSClient实例。 57 | OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); 58 | 59 | /** 60 | * 查询文件是否存在 61 | **/ 62 | // 填写Bucket名称和Object完整路径。Object完整路径中不能包含Bucket名称。 63 | boolean found = false; 64 | found = ossClient.doesObjectExist("privateproject", "public/"+multipartFile.getOriginalFilename()); 65 | System.out.println(found); 66 | if (found){ 67 | throw new Exception("介绍图片已经存在"); 68 | }else { 69 | //将图片上传到oss 70 | PutObjectRequest putObjectRequest = new PutObjectRequest("privateproject","public/"+multipartFile.getOriginalFilename(), new ByteArrayInputStream(multipartFile.getBytes())); 71 | 72 | // 上传字符串。 73 | ossClient.putObject(putObjectRequest); 74 | System.out.println("上传成功"); 75 | } 76 | 77 | // 关闭OSSClient。 78 | ossClient.shutdown(); 79 | } 80 | 81 | return null; 82 | } 83 | 84 | /** 85 | * User registration 86 | * @param user 87 | * @return 88 | */ 89 | @PostMapping("/user/p/userregister") 90 | public String userRegistration(@RequestBody User user){ 91 | return userService.userRegistration(user); 92 | } 93 | 94 | /** 95 | * userlogin 96 | * @param user 97 | * @return 98 | */ 99 | @PostMapping("/user/p/login") 100 | public String userLogin(@RequestBody User user,@RequestParam("select")String select){ 101 | return userService.userLogin(user,select); 102 | } 103 | 104 | /** 105 | * Retrieve password 106 | * @param user 107 | * @return 108 | */ 109 | @RequestMapping("/user/p/retrievepassword") 110 | public String retrievepassword(@RequestBody User user){ 111 | return userService.retrievepassword(user); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /web/src/components/Login.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 34 | 85 | 86 | 90 | -------------------------------------------------------------------------------- /Web Server/src/main/java/com/example/project/serivce/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.project.serivce.impl; 2 | 3 | import com.alibaba.fastjson.JSONArray; 4 | import com.example.project.jwt.JwtUtil; 5 | import com.example.project.mapper.UserMapper; 6 | import com.example.project.pojo.Resdata; 7 | import com.example.project.pojo.User; 8 | import com.example.project.serivce.UserService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | /** 14 | * User service 15 | */ 16 | @Service 17 | public class UserServiceImpl implements UserService { 18 | 19 | @Autowired 20 | private UserMapper userMapper; 21 | 22 | /** 23 | * Retrieve password 24 | * @param user 25 | * @return 26 | */ 27 | @Override 28 | public String retrievepassword(@RequestBody User user){ 29 | if (user != null){ 30 | User user1 = userMapper.QueryUsersByUsernameAdnPhoneNumberAndEmail(user); 31 | if ( 32 | user1.getUsername().equals(user.getUsername()) && 33 | user1.getEmail().equals(user.getEmail()) && 34 | user1.getPhoneNumber().equals(user.getPhoneNumber())){ 35 | 36 | //Update password 37 | userMapper.UpdateUserPassword(user); 38 | 39 | return "0x0001"; 40 | }else{ 41 | return "0x0000"; 42 | } 43 | } 44 | return "0x0000"; 45 | } 46 | 47 | /** 48 | * User registration 49 | * @param user 50 | * @return 51 | */ 52 | @Override 53 | public String userRegistration( User user) { 54 | System.err.println(user); 55 | //Non-empty judgment 56 | if (user != null) { 57 | //check if the username is already registered 58 | User users = userMapper.checkIfTheUsernameIsAlreadyRegistered(user.getUsername(),user.getPhoneNumber()); 59 | 60 | if (users == null){ 61 | //Write data to mysql 62 | userMapper.registerauser(user); 63 | return "0x0001"; 64 | } 65 | } 66 | return "0x0002"; 67 | } 68 | 69 | 70 | /** 71 | *Check if the user is logged in 72 | * @param token 73 | * @return 74 | */ 75 | @Override 76 | public String checkinsin(String token) { 77 | String username = JwtUtil.analysisJWT(token); 78 | User user = userMapper.QueryUserbyUsername(username); 79 | if (user == null){ 80 | user = userMapper.QueryUserbyphoneNumber(username); 81 | } 82 | System.err.println(user.getRole()); 83 | return JSONArray.toJSONString(user); 84 | } 85 | 86 | /** 87 | * user Login 88 | * @param user 89 | * @return String.class 90 | */ 91 | @Override 92 | public String userLogin(User user,String select){ 93 | System.err.println(user); 94 | Resdata resdata = new Resdata(); 95 | //Non-empty judgment 96 | if (user!=null){ 97 | User user1; 98 | 99 | if (select.equals("2")){ 100 | user.setPhoneNumber(user.getUsername()); 101 | user1 = userMapper.QueryUsersByPhonenumberAndPassword(user); 102 | if (user1.getPhoneNumber().equals(user.getPhoneNumber()) && user1.getPassword().equals(user.getPassword())){ 103 | resdata.setCode("0x0000"); 104 | //Generate jwt 105 | resdata.setJwt(JwtUtil.createJWT(user)); 106 | return JSONArray.toJSONString(resdata); 107 | }else{ 108 | resdata.setCode("0x0001"); 109 | return JSONArray.toJSONString(resdata); 110 | } 111 | 112 | }else { 113 | user1 = userMapper.QueryUsersByUsernameAndPassword(user); 114 | if (user1 != null &&user1.getUsername().equals(user.getUsername()) && user1.getPassword().equals(user.getPassword())){ 115 | resdata.setCode("0x0000"); 116 | //Generate jwt 117 | resdata.setJwt(JwtUtil.createJWT(user)); 118 | return JSONArray.toJSONString(resdata); 119 | }else{ 120 | resdata.setCode("0x0001"); 121 | return JSONArray.toJSONString(resdata); 122 | } 123 | } 124 | } 125 | return JSONArray.toJSONString(resdata); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /web/dist/static/js/manifest.2ae2e69a05c33dfc65f8.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap 3f133cd040d3f20702da"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3f133cd040d3f20702da"],"sourceRoot":""} -------------------------------------------------------------------------------- /web/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = require('../config/prod.env') 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | 67 | inject: true, 68 | minify: { 69 | removeComments: true, 70 | collapseWhitespace: true, 71 | removeAttributeQuotes: true 72 | // more options: 73 | // https://github.com/kangax/html-minifier#options-quick-reference 74 | }, 75 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 76 | chunksSortMode: 'dependency' 77 | }), 78 | // keep module.id stable when vendor modules does not change 79 | new webpack.HashedModuleIdsPlugin(), 80 | // enable scope hoisting 81 | new webpack.optimize.ModuleConcatenationPlugin(), 82 | // split vendor js into its own file 83 | new webpack.optimize.CommonsChunkPlugin({ 84 | name: 'vendor', 85 | minChunks (module) { 86 | // any required modules inside node_modules are extracted to vendor 87 | return ( 88 | module.resource && 89 | /\.js$/.test(module.resource) && 90 | module.resource.indexOf( 91 | path.join(__dirname, '../node_modules') 92 | ) === 0 93 | ) 94 | } 95 | }), 96 | // extract webpack runtime and module manifest to its own file in order to 97 | // prevent vendor hash from being updated whenever app bundle is updated 98 | new webpack.optimize.CommonsChunkPlugin({ 99 | name: 'manifest', 100 | minChunks: Infinity 101 | }), 102 | // This instance extracts shared chunks from code splitted chunks and bundles them 103 | // in a separate chunk, similar to the vendor chunk 104 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 105 | new webpack.optimize.CommonsChunkPlugin({ 106 | name: 'app', 107 | async: 'vendor-async', 108 | children: true, 109 | minChunks: 3 110 | }), 111 | 112 | // copy custom static assets 113 | new CopyWebpackPlugin([ 114 | { 115 | from: path.resolve(__dirname, '../static'), 116 | to: config.build.assetsSubDirectory, 117 | ignore: ['.*'] 118 | } 119 | ]) 120 | ] 121 | }) 122 | 123 | if (config.build.productionGzip) { 124 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 125 | 126 | webpackConfig.plugins.push( 127 | new CompressionWebpackPlugin({ 128 | asset: '[path].gz[query]', 129 | algorithm: 'gzip', 130 | test: new RegExp( 131 | '\\.(' + 132 | config.build.productionGzipExtensions.join('|') + 133 | ')$' 134 | ), 135 | threshold: 10240, 136 | minRatio: 0.8 137 | }) 138 | ) 139 | } 140 | 141 | if (config.build.bundleAnalyzerReport) { 142 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 143 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 144 | } 145 | 146 | module.exports = webpackConfig 147 | -------------------------------------------------------------------------------- /web/src/components/EvaluationBrowse.vue: -------------------------------------------------------------------------------- 1 | 67 | 68 | 85 | 86 | -------------------------------------------------------------------------------- /web/src/components/index.vue: -------------------------------------------------------------------------------- 1 | 75 | 76 | 93 | 94 | -------------------------------------------------------------------------------- /Web Server/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /web/src/components/EvaluationList.vue: -------------------------------------------------------------------------------- 1 | 84 | 85 | 102 | 103 | -------------------------------------------------------------------------------- /web/src/components/RetrievePassword.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 167 | 168 | 169 | 173 | -------------------------------------------------------------------------------- /web/src/components/Registered.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 182 | 183 | 184 | 188 | -------------------------------------------------------------------------------- /Web Server/mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Mingw, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | fi 118 | 119 | if [ -z "$JAVA_HOME" ]; then 120 | javaExecutable="`which javac`" 121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 122 | # readlink(1) is not available as standard on Solaris 10. 123 | readLink=`which readlink` 124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 125 | if $darwin ; then 126 | javaHome="`dirname \"$javaExecutable\"`" 127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 128 | else 129 | javaExecutable="`readlink -f \"$javaExecutable\"`" 130 | fi 131 | javaHome="`dirname \"$javaExecutable\"`" 132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 133 | JAVA_HOME="$javaHome" 134 | export JAVA_HOME 135 | fi 136 | fi 137 | fi 138 | 139 | if [ -z "$JAVACMD" ] ; then 140 | if [ -n "$JAVA_HOME" ] ; then 141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 142 | # IBM's JDK on AIX uses strange locations for the executables 143 | JAVACMD="$JAVA_HOME/jre/sh/java" 144 | else 145 | JAVACMD="$JAVA_HOME/bin/java" 146 | fi 147 | else 148 | JAVACMD="`which java`" 149 | fi 150 | fi 151 | 152 | if [ ! -x "$JAVACMD" ] ; then 153 | echo "Error: JAVA_HOME is not defined correctly." >&2 154 | echo " We cannot execute $JAVACMD" >&2 155 | exit 1 156 | fi 157 | 158 | if [ -z "$JAVA_HOME" ] ; then 159 | echo "Warning: JAVA_HOME environment variable is not set." 160 | fi 161 | 162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 163 | 164 | # traverses directory structure from process work directory to filesystem root 165 | # first directory with .mvn subdirectory is considered project base directory 166 | find_maven_basedir() { 167 | 168 | if [ -z "$1" ] 169 | then 170 | echo "Path not specified to find_maven_basedir" 171 | return 1 172 | fi 173 | 174 | basedir="$1" 175 | wdir="$1" 176 | while [ "$wdir" != '/' ] ; do 177 | if [ -d "$wdir"/.mvn ] ; then 178 | basedir=$wdir 179 | break 180 | fi 181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 182 | if [ -d "${wdir}" ]; then 183 | wdir=`cd "$wdir/.."; pwd` 184 | fi 185 | # end of workaround 186 | done 187 | echo "${basedir}" 188 | } 189 | 190 | # concatenates all lines of a file 191 | concat_lines() { 192 | if [ -f "$1" ]; then 193 | echo "$(tr -s '\n' ' ' < "$1")" 194 | fi 195 | } 196 | 197 | BASE_DIR=`find_maven_basedir "$(pwd)"` 198 | if [ -z "$BASE_DIR" ]; then 199 | exit 1; 200 | fi 201 | 202 | ########################################################################################## 203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 204 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 205 | ########################################################################################## 206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 207 | if [ "$MVNW_VERBOSE" = true ]; then 208 | echo "Found .mvn/wrapper/maven-wrapper.jar" 209 | fi 210 | else 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 213 | fi 214 | if [ -n "$MVNW_REPOURL" ]; then 215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 216 | else 217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 218 | fi 219 | while IFS="=" read key value; do 220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 221 | esac 222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 223 | if [ "$MVNW_VERBOSE" = true ]; then 224 | echo "Downloading from: $jarUrl" 225 | fi 226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 227 | if $cygwin; then 228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 229 | fi 230 | 231 | if command -v wget > /dev/null; then 232 | if [ "$MVNW_VERBOSE" = true ]; then 233 | echo "Found wget ... using wget" 234 | fi 235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 236 | wget "$jarUrl" -O "$wrapperJarPath" 237 | else 238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" 239 | fi 240 | elif command -v curl > /dev/null; then 241 | if [ "$MVNW_VERBOSE" = true ]; then 242 | echo "Found curl ... using curl" 243 | fi 244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 245 | curl -o "$wrapperJarPath" "$jarUrl" -f 246 | else 247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 248 | fi 249 | 250 | else 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo "Falling back to using Java to download" 253 | fi 254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 255 | # For Cygwin, switch paths to Windows format before running javac 256 | if $cygwin; then 257 | javaClass=`cygpath --path --windows "$javaClass"` 258 | fi 259 | if [ -e "$javaClass" ]; then 260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 261 | if [ "$MVNW_VERBOSE" = true ]; then 262 | echo " - Compiling MavenWrapperDownloader.java ..." 263 | fi 264 | # Compiling the Java class 265 | ("$JAVA_HOME/bin/javac" "$javaClass") 266 | fi 267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 268 | # Running the downloader 269 | if [ "$MVNW_VERBOSE" = true ]; then 270 | echo " - Running MavenWrapperDownloader.java ..." 271 | fi 272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 273 | fi 274 | fi 275 | fi 276 | fi 277 | ########################################################################################## 278 | # End of extension 279 | ########################################################################################## 280 | 281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 282 | if [ "$MVNW_VERBOSE" = true ]; then 283 | echo $MAVEN_PROJECTBASEDIR 284 | fi 285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 286 | 287 | # For Cygwin, switch paths to Windows format before running java 288 | if $cygwin; then 289 | [ -n "$M2_HOME" ] && 290 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 291 | [ -n "$JAVA_HOME" ] && 292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 293 | [ -n "$CLASSPATH" ] && 294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 295 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 297 | fi 298 | 299 | # Provide a "standardized" way to retrieve the CLI args that will 300 | # work with both Windows and non-Windows executions. 301 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 302 | export MAVEN_CMD_LINE_ARGS 303 | 304 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 305 | 306 | exec "$JAVACMD" \ 307 | $MAVEN_OPTS \ 308 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 309 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 310 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 311 | -------------------------------------------------------------------------------- /Web Server/project.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /web/dist/static/js/app.7fe5bf07b9ef3c51e42c.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1],{"28cj":function(t,e){},Cgr0:function(t,e){},LI7b:function(t,e){},NHnr:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("/5sW"),r={name:"login",data:function(){return{formbutton:!1,select:"1",user:{username:null,password:null,ip:"",state:""}}},mounted:function(){},methods:{submit:function(){this.formbutton=!0,this.$axios.post("http://127.0.0.1:8081/user/p/login?select="+this.select,this.user).then(function(t){switch(t.data.code){case"0x0000":setCookie("token",t.data.jwt),alert("sign in suceesfully!"),window.location.href="http://127.0.0.1:8080/";break;case"0x0001":alert("Incorrect account or password"),window.location.href="http://127.0.0.1:8080/pu/user/login"}}).catch(function(t){alert("Server is busy, trying later"),window.location.href="http://127.0.0.1:8080/pu/user/login"})}}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticStyle:{width:"500px"}},[a("div",{staticClass:"main animated zoomIn"},[a("form",{on:{submit:function(e){return e.preventDefault(),t.submit()}}},[a("img",{staticClass:"mb-4",attrs:{src:"https://privateproject.oss-cn-hangzhou.aliyuncs.com/20211120/use.png",alt:"",width:"250",height:"250"}}),t._v(" "),a("h1",{staticClass:"h3 mb-3 font-weight-normal"}),t._v(" "),a("label",{staticClass:"sr-only"},[t._v("Username")]),t._v(" "),a("div",{staticStyle:{"margin-top":"15px"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"Please enter content"},model:{value:t.user.username,callback:function(e){t.$set(t.user,"username",e)},expression:"user.username"}},[a("el-select",{attrs:{slot:"prepend",placeholder:"pls chose"},slot:"prepend",model:{value:t.select,callback:function(e){t.select=e},expression:"select"}},[a("el-option",{attrs:{label:"Email",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"phonenumber",value:"2"}})],1)],1)],1),t._v(" "),a("label",{staticClass:"sr-only"},[t._v("Password")]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.user.password,expression:"user.password"}],staticClass:"form-control",attrs:{type:"password",placeholder:"password",required:"",id:"password",name:"password"},domProps:{value:t.user.password},on:{input:function(e){e.target.composing||t.$set(t.user,"password",e.target.value)}}}),t._v(" "),a("button",{staticClass:"btn btn-lg btn-primary btn-block",staticStyle:{width:"300px",height:"50px"},attrs:{type:"submit",id:"sub",hidden:t.formbutton}},[t._v("login")]),t._v(" "),a("button",{staticClass:"btn btn-primary",staticStyle:{width:"300px",height:"50px"},attrs:{type:"button",disabled:"",hidden:!t.formbutton}},[a("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}),t._v("\n Signing in, please wait......\n ")]),t._v("\n No account yet?"),a("a",{attrs:{href:"http://127.0.0.1:8080/pu/user/registered"}},[t._v("Click me to register")]),t._v(" "),a("br"),t._v("\n forget the password?"),a("a",{attrs:{href:"http://127.0.0.1:8080/pu/user/retrievepassword"}},[t._v("Click to retrieve my password")])])])])])},staticRenderFns:[]};var o=a("VU/8")(r,i,!1,function(t){a("h2ZK")},"data-v-74af305c",null).exports,n={name:"App",components:{Login:o}},l={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]},u=a("VU/8")(n,l,!1,null,null,null).exports,d=a("/ocq"),c=a("mtWM"),p=a.n(c),m={name:"registered",data:function(){return{userdata:{username:null,password:null,eqpassword:null,name:null,email:null,phoneNumber:null},userdataerror:{eqpassworderror1:null,usernameerror:null,passworderror:null,eqpassworderror:null,nameerror:null,emailerror:null,phoneNumbererror:null},userformif:!0,formbutton:!1}},methods:{getFullname:function(){var t=this.userdata.password,e=/[!@#$%^&*()_?<>{}]{1}/,a=/([a-zA-Z0-9!@#$%^&*()_?<>{}]){4,30}/,s=/[a-zA-Z]+/,r=/[0-9]+/;e.test(t)&&a.test(t)&&s.test(t)&&r.test(t)?this.userdataerror.passworderror="":e.test(t)?a.test(t)?s.test(t)?r.test(t)||(this.userdataerror.passworderror="Need to contain numbers"):this.userdataerror.passworderror="Must contain letters":this.userdataerror.passworderror="Length is 4-30 bits":this.userdataerror.passworderror="Must contain a special character"},submit:function(){alert("login"),this.userformif=!0,this.userdata.username=this.userdata.email,this.userdata.eqpassword!=this.userdata.password||null==this.userdata.password||null==this.userdata.eqpassword||this.userdata.eqpassword.length<6||this.userdata.eqpassword.length>30?(this.userdata.eqpassword,this.userdata.password,this.userdataerror.eqpassworderror1=" ",this.userformif=!1):(this.userdataerror.eqpassworderror="",this.userdataerror.eqpassworderror1=""),null==this.userdata.name?this.userformif=!1:this.userdata.name.length<2||this.userdata.name.length>30?this.userformif=!1:this.userdataerror.nameerror="";/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,25}$/.test(this.userdata.email)&&null!=this.userdata.email?this.userdataerror.emailerror="":this.userformif=!1,null==this.userdata.phoneNumber?this.userformif=!1:this.userdata.phoneNumber.length<2||this.userdata.phoneNumber.length>30?this.userformif=!1:this.userdataerror.phoneNumbererror="",this.userformif?(this.userdata.username=this.userdata.email,this.formbutton=!0,this.$axios.post("http://127.0.0.1:8081/user/p/userregister",this.userdata).then(function(t){"0x0001"==t.data?(alert("Congratulations on your successful registration, go to login!"),window.location.href="http://127.0.0.1:8080/pu/user/login"):(alert("Your account has been registered by someone else"),vm.formbutton=!1)})):alert("Your information is incorrectly entered")}}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"animated zoomIn",staticStyle:{margin:"auto",width:"600px"},attrs:{id:"enrolldate"}},[t._m(0),t._v(" "),a("form",{on:{submit:function(e){return e.preventDefault(),t.submit()}}},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:"email"}},[t._v("Email")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"14px"}},[t._v(t._s(this.userdataerror.emailerror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.email,expression:"userdata.email"}],staticClass:"form-control",attrs:{type:"email",id:"email",name:"email"},domProps:{value:t.userdata.email},on:{input:function(e){e.target.composing||t.$set(t.userdata,"email",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row"},[a("div",{staticClass:"form-group col-md-6"},[a("label",{attrs:{for:"password"}},[t._v("password")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"12px"}},[t._v(t._s(this.userdataerror.passworderror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.password,expression:"userdata.password"}],staticClass:"form-control",attrs:{type:"password",id:"password",name:"password"},domProps:{value:t.userdata.password},on:{keyup:t.getFullname,input:function(e){e.target.composing||t.$set(t.userdata,"password",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-group col-md-6"},[a("label",{attrs:{for:"erpassword"}},[t._v("Confirm Password")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"14px"}},[t._v(t._s(this.userdataerror.eqpassworderror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.eqpassword,expression:"userdata.eqpassword"}],staticClass:"form-control",attrs:{type:"password",id:"erpassword",name:"eqpassword"},domProps:{value:t.userdata.eqpassword},on:{keyup:t.getFullname,input:function(e){e.target.composing||t.$set(t.userdata,"eqpassword",e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:"name"}},[t._v("name")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"14px"}},[t._v(t._s(t.userdataerror.nameerror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.name,expression:"userdata.name"}],staticClass:"form-control",attrs:{type:"text",id:"name",name:"name"},domProps:{value:t.userdata.name},on:{input:function(e){e.target.composing||t.$set(t.userdata,"name",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:"username"}},[t._v("phone number")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"14px"}},[t._v(t._s(t.userdataerror.phoneNumbererror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.phoneNumber,expression:"userdata.phoneNumber"}],staticClass:"form-control",attrs:{type:"text",id:"phoneNumber",name:"phoneNumber"},domProps:{value:t.userdata.phoneNumber},on:{input:function(e){e.target.composing||t.$set(t.userdata,"phoneNumber",e.target.value)}}})]),t._v(" "),a("button",{staticClass:"btn btn-lg btn-primary btn-block",staticStyle:{width:"600px",height:"50px"},attrs:{type:"submit",id:"sub",hidden:t.formbutton}},[t._v(" register")]),t._v(" "),a("button",{staticClass:"btn btn-primary",staticStyle:{width:"600px",height:"50px"},attrs:{type:"button",disabled:"",hidden:!t.formbutton}},[a("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}),t._v("\n Registering, please wait......\n ")]),t._v(" "),t._m(1)]),t._v(" "),a("div",{staticStyle:{margin:"auto",width:"204px"}})])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticStyle:{margin:"auto",width:"250px"}},[e("img",{staticClass:"mb-4",attrs:{src:"https://privateproject.oss-cn-hangzhou.aliyuncs.com/20211120/use.png",alt:"https://privateproject.oss-cn-hangzhou.aliyuncs.com/20211120/use.png",width:"250",height:"250"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticStyle:{margin:"auto",width:"280px"}},[this._v("\n I already have an account"),e("a",{attrs:{href:"http://127.0.0.1:8080/pu/user/login"}},[this._v("Go to login")])])}]};var v=a("VU/8")(m,h,!1,function(t){a("LI7b")},"data-v-3fab7cbd",null).exports,f={name:"registered",data:function(){return{userdata:{username:null,password:null,eqpassword:null,name:null,email:null,phoneNumber:null},userdataerror:{eqpassworderror1:null,usernameerror:null,passworderror:null,eqpassworderror:null,nameerror:null,emailerror:null,phoneNumbererror:null},userformif:!0,formbutton:!1}},methods:{getFullname:function(){var t=this.userdata.password,e=/[!@#$%^&*()_?<>{}]{1}/,a=/([a-zA-Z0-9!@#$%^&*()_?<>{}]){4,30}/,s=/[a-zA-Z]+/,r=/[0-9]+/;e.test(t)&&a.test(t)&&s.test(t)&&r.test(t)?this.userdataerror.passworderror="":e.test(t)?a.test(t)?s.test(t)?r.test(t)||(this.userdataerror.passworderror="Need to contain numbers"):this.userdataerror.passworderror="Must contain letters":this.userdataerror.passworderror="Length is 4-30 bits":this.userdataerror.passworderror="Must contain a special character"},submit:function(){this.userformif=!0,this.userdata.username=this.userdata.email,this.userdata.eqpassword!=this.userdata.password||null==this.userdata.password||null==this.userdata.eqpassword||this.userdata.eqpassword.length<6||this.userdata.eqpassword.length>30?(this.userdata.eqpassword,this.userdata.password,this.userdataerror.eqpassworderror1=" ",this.userformif=!1):(this.userdataerror.eqpassworderror="",this.userdataerror.eqpassworderror1="");/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,25}$/.test(this.userdata.email)&&null!=this.userdata.email?this.userdataerror.emailerror="":this.userformif=!1,null==this.userdata.phoneNumber?this.userformif=!1:this.userdata.phoneNumber.length<2||this.userdata.phoneNumber.length>30?this.userformif=!1:this.userdataerror.phoneNumbererror="",this.userformif?(this.formbutton=!0,this.$axios.post("http://127.0.0.1:8081/user/p/retrievepassword",this.userdata).then(function(t){"0x0001"==t.data?(alert("Successfully modified, go to login!"),window.location.href="http://127.0.0.1:8080/pu/user/login"):(alert("Sorry, we cannot prove that you are the owner of this account"),vm.formbutton=!1)})):alert("Your information is incorrectly entered")}}},g={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"animated zoomIn",staticStyle:{margin:"auto",width:"600px"},attrs:{id:"enrolldate"}},[t._m(0),t._v(" "),a("form",{on:{submit:function(e){return e.preventDefault(),t.submit()}}},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:"email"}},[t._v("Email used when registering")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"14px"}},[t._v(t._s(this.userdataerror.emailerror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.email,expression:"userdata.email"}],staticClass:"form-control",attrs:{type:"email",id:"email",name:"email"},domProps:{value:t.userdata.email},on:{input:function(e){e.target.composing||t.$set(t.userdata,"email",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:"username"}},[t._v("phoneNumber used when registering")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"14px"}},[t._v(t._s(t.userdataerror.phoneNumbererror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.phoneNumber,expression:"userdata.phoneNumber"}],staticClass:"form-control",attrs:{type:"text",id:"phoneNumber",name:"phoneNumber"},domProps:{value:t.userdata.phoneNumber},on:{input:function(e){e.target.composing||t.$set(t.userdata,"phoneNumber",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-row"},[a("div",{staticClass:"form-group col-md-6"},[a("label",{attrs:{for:"password"}},[t._v("new password")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"12px"}},[t._v(t._s(this.userdataerror.passworderror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.password,expression:"userdata.password"}],staticClass:"form-control",attrs:{type:"password",id:"password",name:"password"},domProps:{value:t.userdata.password},on:{keyup:t.getFullname,input:function(e){e.target.composing||t.$set(t.userdata,"password",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"form-group col-md-6"},[a("label",{attrs:{for:"erpassword"}},[t._v("Confirm Password")]),t._v(" "),a("span",{staticStyle:{color:"#FF0000","font-size":"14px"}},[t._v(t._s(this.userdataerror.eqpassworderror))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userdata.eqpassword,expression:"userdata.eqpassword"}],staticClass:"form-control",attrs:{type:"password",id:"erpassword",name:"eqpassword"},domProps:{value:t.userdata.eqpassword},on:{keyup:t.getFullname,input:function(e){e.target.composing||t.$set(t.userdata,"eqpassword",e.target.value)}}})])]),t._v(" "),a("button",{staticClass:"btn btn-lg btn-primary btn-block",staticStyle:{width:"600px",height:"50px"},attrs:{type:"submit",id:"sub",hidden:t.formbutton}},[t._v(" change Password")]),t._v(" "),a("button",{staticClass:"btn btn-primary",staticStyle:{width:"600px",height:"50px"},attrs:{type:"button",disabled:"",hidden:!t.formbutton}},[a("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}),t._v("\n Revising, please wait......\n ")]),t._v(" "),t._m(1)]),t._v(" "),a("div",{staticStyle:{margin:"auto",width:"204px"}})])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticStyle:{margin:"auto",width:"250px"}},[e("img",{staticClass:"mb-4",attrs:{src:"https://privateproject.oss-cn-hangzhou.aliyuncs.com/20211120/use.png",alt:"https://privateproject.oss-cn-hangzhou.aliyuncs.com/20211120/use.png",width:"250",height:"250"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticStyle:{margin:"auto",width:"280px"}},[this._v("\n I already have an account"),e("a",{attrs:{href:"http://127.0.0.1:8080/pu/user/login"}},[this._v("Go to login")])])}]};var w=a("VU/8")(f,g,!1,function(t){a("OI7O")},"data-v-05085d7a",null).exports,_={data:function(){return{desc:"aSDD",evaluation:{imaurl:null,username:null,evaluationtext:null},user:null}},methods:{submitdata:function(){alert("123"),this.$axios.post("http://127.0.0.1:8081/user/addReviews",this.evaluation).then(function(t){alert(t.data),window.location.href="http://127.0.0.1:8080/"})},checkinsin:function(){var t=this;this.token=getCookie("token"),this.$axios.get("http://127.0.0.1:8081/user/p/checkinsin?token="+this.token).then(function(e){null!=e.data.errorinformation&&null==e.data.username?alert("You have not logged in or your login verification has expired, the system will redirect you to the login page"):(t.user=e.data,"admin"==t.user.role&&(alert("Check that you are an administrator and think you are redirected to the management page"),window.location.href="http://127.0.0.1:8080/admin"),t.evaluation.username=e.data.username)}).catch(function(t){alert("Please log in again"),window.location.href="http://127.0.0.1:8080/pu/user/login"})},test1:function(t,e,a){this.evaluation.imaurl=e.name},error:function(){alert("The picture nickname needs to be changed")}},mounted:function(){this.checkinsin()}},b={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"header"}),t._v(" "),t._m(0),t._v(" "),a("div",{staticClass:"doc-container",staticStyle:{background:"url('http://userupfile.oss-cn-hangzhou.aliyuncs.com/public/root/IMG/WelcomeImage/Welcome.jpg')"},attrs:{id:"blogindexarticle"}},[a("div",{staticClass:"container-fixed"},[a("div",{staticClass:"container-fixed",staticStyle:{width:"68%"}},[a("div",{staticClass:"col-content",staticStyle:{width:"100%"}},[a("article",{staticClass:"article-list bloglist",attrs:{id:"LAY_bloglist"}},[a("div",[a("section",{staticClass:"article-item zoomIn article",staticStyle:{"border-radius":"5px"}},[t._m(1),t._v(" "),a("p",[t._v("upload picture")]),t._v(" "),a("el-upload",{staticClass:"upload-demo",attrs:{drag:"","on-progress":t.test1,"on-error":t.error,action:"http://127.0.0.1:8081/user/uploadFile",multiple:""}},[a("i",{staticClass:"el-icon-upload"}),t._v(" "),a("div",{staticClass:"el-upload__text"},[t._v("Drag the file here, or"),a("em",[t._v("Click upload")])]),t._v(" "),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("Only jpg/png files can be uploaded, and no more than 500kb")])]),t._v(" "),a("el-input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"请输入内容"},model:{value:t.evaluation.evaluationtext,callback:function(e){t.$set(t.evaluation,"evaluationtext",e)},expression:"evaluation.evaluationtext"}}),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitdata()}}},[t._v(" submit")])],1)])])])])])]),t._v(" "),t._m(2)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("header",{staticClass:"gird-header"},[e("div",{staticClass:"header-fixed"},[e("div",{staticClass:"header-inner"},[e("nav",{staticClass:"nav",attrs:{id:"nav"}},[e("ul",[e("li",[e("a",{attrs:{href:"index.html"}},[this._v("index")])])])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h5",{staticClass:"title"},[e("a",{attrs:{href:"#"}},[this._v("Evaluation")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("footer",{staticClass:"grid-footer"},[e("div",{staticClass:"footer-fixed"},[e("div",{staticClass:"copyright"},[e("div",{staticClass:"info"},[e("p",{staticClass:"mt05"},[this._v("\n Copyright 2021\n ")])])])])])}]};var y=a("VU/8")(_,b,!1,function(t){a("28cj")},null,null).exports,C={data:function(){return{desc:"aSDD",evaluation:{imaurl:null,username:null,evaluationtext:null},user:null,evaluationlist:null}},methods:{submitdata:function(){alert("123"),this.$axios.post("http://127.0.0.1:8081/user/addReviews",this.evaluation).then(function(t){alert(t.data)})},checkinsin:function(){var t=this;this.token=getCookie("token"),this.$axios.get("http://127.0.0.1:8081/user/p/checkinsin?token="+this.token).then(function(e){null!=e.data.errorinformation&&null==e.data.username?alert("You have not logged in or your login verification has expired, the system will redirect you to the login page"):(t.user=e.data,"admin"!=t.user.role&&(alert("You are not an administrator, do not have permission to browse this page"),window.location.href="127.0.0.1:8081"),t.evaluation.username=e.data.username)}).catch(function(t){alert("pls change the picture nickname")})},test1:function(t,e,a){this.evaluation.imaurl=e.name},getdata:function(){var t=this;this.$axios.post("http://127.0.0.1:8081/admin/getAllDate").then(function(e){t.evaluationlist=e.data})}},mounted:function(){this.checkinsin(),this.getdata()}},x={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"header"}),t._v(" "),t._m(0),t._v(" "),a("div",{staticClass:"doc-container",staticStyle:{background:"url('http://userupfile.oss-cn-hangzhou.aliyuncs.com/public/root/IMG/WelcomeImage/Welcome.jpg')"},attrs:{id:"blogindexarticle"}},[a("div",{staticClass:"container-fixed"},[a("div",{staticClass:"container-fixed",staticStyle:{width:"68%"}},[a("div",{staticClass:"col-content",staticStyle:{width:"100%"}},[a("article",{staticClass:"article-list bloglist",attrs:{id:"LAY_bloglist"}},t._l(t.evaluationlist,function(e,s){return a("div",{key:s},[a("section",{staticClass:"article-item zoomIn article",staticStyle:{"border-radius":"5px"}},[a("h5",{staticClass:"title"},[a("a",{attrs:{href:"#"}},[t._v(t._s(e.username)+" evaluation")])]),t._v(" "),a("div",{staticClass:"content"},[null==e.imaurl?a("div",[t._m(1,!0)]):a("div",[a("a",{staticClass:"cover img-light",attrs:{href:"#"}},[a("img",{attrs:{src:"https://privateproject.oss-cn-hangzhou.aliyuncs.com/public/"+e.imaurl}})])]),t._v("\n \n "+t._s(e.evaluationtext)+"\n ")])])])}),0)])])])]),t._v(" "),t._m(2)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("header",{staticClass:"gird-header"},[e("div",{staticClass:"header-fixed"},[e("div",{staticClass:"header-inner"},[e("nav",{staticClass:"nav",attrs:{id:"nav"}},[e("ul",[e("li",[e("a",{attrs:{href:"/"}},[this._v("admin")])])])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"cover img-light",attrs:{href:"#"}},[e("img",{attrs:{src:"https://privateproject.oss-cn-hangzhou.aliyuncs.com/20211120/use.png"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("footer",{staticClass:"grid-footer"},[e("div",{staticClass:"footer-fixed"},[e("div",{staticClass:"copyright"},[e("div",{staticClass:"info"},[e("p",{staticClass:"mt05"},[this._v("\n Copyright 2021\n ")])])])])])}]};var $=a("VU/8")(C,x,!1,function(t){a("Cgr0")},null,null).exports;s.default.use(d.a);var k=new d.a({mode:"history",routes:[{path:"/pu/user/retrievepassword",component:w},{path:"/",component:y},{path:"/admin",component:$},{path:"/pu/user/login",component:o},{path:"/pu/user/registered",component:v}]}),N=a("zL8q"),S=a.n(N);a("tvR6");s.default.prototype.$axios=p.a,s.default.use(S.a),new s.default({el:"#app",router:k,render:function(t){return t(u)}})},OI7O:function(t,e){},h2ZK:function(t,e){},tvR6:function(t,e){}},["NHnr"]); 2 | //# sourceMappingURL=app.7fe5bf07b9ef3c51e42c.js.map --------------------------------------------------------------------------------