first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead

View File

@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@@ -0,0 +1,19 @@
# hollandtest
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
{
"name": "hollandtest",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"axios": "^0.19.2",
"core-js": "^3.6.4",
"vant": "^2.8.2",
"vue": "^2.6.11",
"vue-router": "^3.1.6",
"vuex": "^3.1.3"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.3.0",
"@vue/cli-plugin-router": "~4.3.0",
"@vue/cli-plugin-vuex": "~4.3.0",
"@vue/cli-service": "~4.3.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"pug": "^2.0.4",
"pug-html-loader": "^1.1.5",
"pug-plain-loader": "^1.0.0",
"style-resources-loader": "^1.3.3",
"vue-template-compiler": "^2.6.11"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,17 @@
<template lang="pug">
#app
router-view
</template>
<style lang="less">
html,
body,
#app,
.home{
height: 100%;
}
.test{
height: 100%;
}
</style>

View File

@@ -0,0 +1,31 @@
.home{
img{
height: 251px;
width: 100%;
}
.home_conte{
position: absolute;
top: 25%;
margin-left: 50%;
left: -175px;
background-color: #ffffff;
height: 300px;
width: 350px;
border-radius: 10px;
box-shadow: 0px 1px 5px rgba(136, 136, 136, 0.52);
}
.context{
padding: 0px 10px;
margin-top: 25px;
font-size: 12px;
color: #4f4f4f;
}
.van-button{
border-radius: 5px;
width: 180px;
margin-left: 50%;
left: -90px;
margin-top: 20px;
box-shadow: 0px 2px 8px rgba(136, 136, 136, 0.7);
}
}

View File

@@ -0,0 +1,50 @@
.test{
img{
height: 251px;
width: 100%;
}
.home_conte{
position: absolute;
top: 25%;
margin-left: 50%;
left: -175px;
background-color: #ffffff;
height: 300px;
width: 350px;
border-radius: 10px;
box-shadow: 0px 1px 5px rgba(136, 136, 136, 0.52);
}
.context{
padding: 0px 10px;
margin-top: 25px;
font-size: 12px;
color: #4f4f4f;
}
.custom-indicator {
position: absolute;
right: 5px;
bottom: 5px;
padding: 2px 5px;
font-size: 12px;
background: rgba(0, 0, 0, 0.1);
}
.van-radio__icon{
margin-left: 10px;
}
p{
margin-bottom: 40px;
}
.van-radio-group{
width: 206px;
margin: 0 auto;
}
.van-radio{
margin-right: 23px;
background-color: #ece4e45e;
border-radius: 5px;
width: 80px;
height: 30px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,36 @@
<template lang="pug">
.lower
img(alt='Vue logo', src='/img/v2_qa5jzi.png')
.home_conte
.context
</template>
<script>
export default {
props: {
}
}
</script>
<style>
img{
height: 251px;
width: 100%;
}
.home_conte{
position: absolute;
top: 25%;
margin-left: 50%;
left: -175px;
background-color: #ffffff;
height: 300px;
width: 350px;
border-radius: 10px;
box-shadow: 0px 1px 5px rgba(136, 136, 136, 0.52);
}
</style>

View File

@@ -0,0 +1,11 @@
export default {
apiUrl:{
// devUrl: 'http://www.zyhelp.test/api/',
devUrl: 'http://www.zhiyuanhelp.com/index.php/api',
prodUrl: 'http://www.zhiyuanhelp.com/index.php/api',
list:{
myPaper: '/myPaper',
myPart: '/myPart'
}
}
}

View File

@@ -0,0 +1,86 @@
import axios from "axios";
import utils from "../utils"
import { Toast } from 'vant';
class Axios {
constructor() {
this.instance = axios.create({
baseURL: utils.getApiurl(),
timeout: 3000
});
this.interceptorsRequest();
this.interceptorsResponse();
}
/**
*
* @param params
* {
* url: '',
* data: {}
* }
* @returns {Promise<void>}
*/
async get(params) {
return await this.instance.get(params.url, {
params: params.data
})
}
async post(params) {
return this.instance({
method: 'post',
url: params.url,
data: params.data
});
}
// 添加请求拦截器
interceptorsRequest() {
this.instance.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
Toast.loading({
message: '正在加载...',
forbidClick: true,
});
return config;
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error);
});
}
// 添加响应拦截器
interceptorsResponse() {
this.instance.interceptors.response.use(function (response) {
// 对响应数据做点什么
Toast.clear();
return response
// switch (response.data.status) {
// case 200:
// return rsa.PublicKeyDecryption(response.data.result);
// break;
// case 500:
// Toast(response.data.message);
// setTimeout(()=> {
// location.href = "/#/login"
// },2100)
// break;
// case 404:
// Toast(response.data.message);
// break;
// }
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error);
});
}
}
export default new Axios();

View File

@@ -0,0 +1,23 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from './http'
import config from './config'
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);
Vue.prototype.$http = axios
Vue.prototype.$config = config
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')

View File

@@ -0,0 +1,23 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Home',
component: () => import(/* webpackChunkName: "Home" */ '../views/Home.vue')
},
{
path: '/Test',
name: 'Test',
component: () => import(/* webpackChunkName: "Test" */ '../views/Test.vue')
}
]
const router = new VueRouter({
routes
})
export default router

View File

@@ -0,0 +1,15 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
},
mutations: {
},
actions: {
},
modules: {
}
})

View File

@@ -0,0 +1,61 @@
import config from "../config"
import { Toast } from 'vant';
class Utils {
getApiurl () {
if (process.env.NODE_ENV === 'production') {
return config.apiUrl.prodUrl
} else {
return config.apiUrl.devUrl
}
}
/**
* 校验用户名是否合法
*/
checkUserName(username) {
if (!(username.length >= 6 && username.length < 20)) {
Toast({
message: '用户名长度应该6~20位'
});
return false
}
return true
}
/**
* 校验用户密码是否合法
* @param pwd
* @returns {boolean}
*/
checkUserPassword(pwd) {
if (!(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/.test(pwd))) {
Toast({
message: '密码8~16位至少含1个大写字母1个小写字母1个数字'
});
return false
}
return true
}
/**
* 本地保存数据的方法
* @param key 名字
* @param value 值
* @constructor
*/
SetlocalStorage(key,value) {
typeof value == "string" || value == "number"
? localStorage.setItem('shop_' + key, value)
: localStorage.setItem('shop_' + key, JSON.stringify(value))
}
}
export default new Utils();

View File

@@ -0,0 +1,40 @@
<template lang="pug">
.home
img(alt='Vue logo', src='/img/v2_qa5jzi.png')
.home_conte
.context
p 1.请在心态平和且时间充足的情况下才开始答题
p 2.本问卷所有问题都取自人们的日常生活而您的回答只是表明您通常是如何看待和处理事物的所有问题都是反映何种工作氛围和环境适合您无所谓对错更无好坏之分
p 3.本测试分为四部分工60题请根据自己的实际情况在带有颜色的框内选择
p 4.每道题都要作答尽管有些题目不适合您同时测验中有测谎的题目如果发现您没有诚实回答整个问卷作废
van-button(squar='', type='info', color="#ff281e" @click="$router.push({path:'/Test'})") 开始测试
</template>
<script>
export default {
data() {
return {
}
},
created() {
this.myPart()
},
methods: {
async myPart() {
let res = await this.$http.get({
url: this.$config.apiUrl.list.myPart,
data: {}
});
console.log(res);
}
}
}
</script>
<style scoped lang="less">
@import "~@less/Home.less";
</style>

View File

@@ -0,0 +1,31 @@
<template lang="pug">
.test
img(alt='Vue logo', src='../../public/img/v2_qa5jzi.png')
.home_conte
.context
p 1.我喜欢把一件事情做完后再做另一件事
van-radio-group(v-model='radio', direction='horizontal')
van-radio(name='1') A:
van-radio(name='2') B:
</template>
<script>
export default {
data () {
return{
}
},
created() {
},
methods: {
}
}
</script>
<style scoped lang="less">
@import "~@less/Test.less";
</style>

View File

@@ -0,0 +1,39 @@
const path = require("path");
module.exports = {
publicPath: './',
chainWebpack: config => {
config.module.rule('pug')
.test(/\.pug$/)
.use('pug-html-loader')
.loader('pug-html-loader')
.end();
config.resolve.alias
.set('@c',resolve('src/components'))
.set('@img',resolve('src/assets/img'))
.set('@less',resolve('src/assets/less/page'));
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => addStyleResource(config.module.rule('less').oneOf(type)))
}
}
function addStyleResource (rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/assets/less/index.less'),
],
})
}
function resolve(dir) {
return path.join(__dirname, dir);
}