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,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>