Skip to content

Commit

Permalink
Merge branch 'dev' into feat/post
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazi7 committed Nov 30, 2024
2 parents ffae0b1 + 72e88ab commit e3c3572
Show file tree
Hide file tree
Showing 45 changed files with 1,570 additions and 780 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -14,7 +14,7 @@ jobs:

- name: 设置 Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 登录 Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -33,10 +33,10 @@ jobs:
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PASSWORD }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
docker pull lihazi/weilai
docker stop weilai || true
docker rm weilai || true
docker run -d --name weilai -p 80:80 lihazi/weilai
docker run -d --name weilai -p 80:80 lihazi/weilai
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
#lock-package
pnpm-lock.yaml
3 changes: 2 additions & 1 deletion .husky/_/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
npx lint-staged
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.29.1",
"husky": "^9.1.6",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"sass-embedded": "^1.80.3",
"shadcn-vue": "^0.11.0",
Expand Down
31 changes: 31 additions & 0 deletions src/assets/styles/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:root {
--background: hsl(0, 0%, 100%);
--foreground: hsl(222.2, 47.4%, 11.2%);
--muted: hsl(210, 40%, 96.1%);
--muted-foreground: hsl(215.4, 16.3%, 46.9%);
--card: hsl(0, 0%, 100%);
--card-foreground: hsl(222.2, 47.4%, 11.2%);
--popover: hsl(0, 0%, 100%);
--popover-foreground: hsl(222.2, 47.4%, 11.2%);
--border: hsl(214.3, 31.8%, 91.4%);
--input: hsl(214.3, 31.8%, 91.4%);
--primary: hsl(200deg, 60%, 94.1%);
--primary-foreground: hsl(200deg, 62.8%, 61%);
--secondary: hsl(240deg, 4.76%, 95.9%);
--secondary-foreground: hsl(206deg, 6.6%, 41.6%);
--accent: hsl(210, 40%, 96.1%);
--accent-foreground: hsl(222.2, 47.4%, 11.2%);
--destructive: hsl(0, 100%, 50%);
--destructive-foreground: hsl(210, 40%, 98%);
--ring: hsl(215, 20.2%, 65.1%);
--radius: 0.5rem;
}

* {
margin: 0;
padding: 0;
}

@tailwind base;
@tailwind components;
@tailwind utilities; /*# sourceMappingURL=index.css.map */
60 changes: 35 additions & 25 deletions src/assets/styles/recruitment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

$undertone: #647499;//浅灰 设置为非强调色

*{
margin: 0;
padding: 0;

}
// 复选框样式
.checkbox {
position: relative;
Expand Down Expand Up @@ -36,10 +40,8 @@
.btn-style {
width: 100px;
height: 40px;
background-color: var(--primary);
cursor: pointer;
border: var(--border) 1px solid;

&:hover,
&:active {
color: var(--primary-foreground);
Expand All @@ -48,11 +50,18 @@
}


// 长虚线边框样式
.long-dashed-border {
border-radius: var(--radius);
border: 1px solid transparent;
background: linear-gradient(white,white) padding-box,
repeating-linear-gradient(-45deg,var(--border) 0,var(--border) 0.5em,white 0,white 0.75em);
}


//后台样式
.content {
padding: 20px;
width: 100%;
background-color: var(--background);
position: relative;
}
Expand All @@ -65,11 +74,19 @@
align-items: center;
position: relative;
gap: 20px;

min-width: 920px;
.search-input {
position: absolute;
right: 0;
position: relative;
display: inline-flex;
align-items: center;
gap: 10px;
width: 300px;
height: 40px;
@media screen and (max-width: 1300px) {
display: none;
}
}

}

.reset {
Expand All @@ -90,7 +107,6 @@
justify-content: flex-start;
align-items: center;
gap: 20px;

.toggle-button {
width: 100px;
height: 40px;
Expand All @@ -99,22 +115,13 @@

.handle-btns {
position: absolute;
right: 0;
right: 20px;
display: flex;
gap: 20px;

.handle-btn {
width: 100px;
height: 40px;
background-color: var(--primary);
cursor: pointer;
border: var(--border) 1px solid;

&:hover,
&:active {
color: var(--primary-foreground);
border: var(--primary-foreground) 1px solid;
}
@media screen and (max-width: 1300px) {
position: relative;
right: 0;
margin-left: 40px;
}
}
}
Expand All @@ -129,6 +136,7 @@
//卡片展示
.main-content-show{
display: flex;
padding: 20px;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
Expand All @@ -139,21 +147,23 @@
position: relative;
top: 20px;
gap: 20px;

@extend .long-dashed-border;
}


//滚动条样式
/* 定义滚动条的轨道样式 */
::-webkit-scrollbar {
width: 2px; /* 滚动条轨道的宽度 */
width: 1px; /* 滚动条轨道的宽度 */
}

/* 定义滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color:var(--accent); /* 滑块的颜色 */
background-color:skyblue; /* 滑块的颜色 */
border-radius: 2px; /* 滑块的圆角 */
}

/* 定义滚动条的轨道样式(当滑块处于悬停状态时) */
::-webkit-scrollbar-track {
background: #f1f1f1; /* 轨道的颜色 */
background: var(--background); /* 轨道的颜色 */
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select'
import { useAlert } from '@/composables/alert'
const useApplicationStore = applicationStore()
useApplicationStore.isGetCode()
const { showAlert } = useAlert()
interface Data {
data: ApplicationFrom;
Expand All @@ -43,12 +44,12 @@ const { getClass, classListData, getCode, sentStuInfo } = UseApplication()
getClass()
const stuInform = ref<ApplicationFrom>({
clazz: '',
clazz: '计科241',
code: '',
email: '',
name: '',
qqNumber: '',
sex: '',
sex: '',
studentId: '',
file: null as unknown as File
})
Expand Down Expand Up @@ -85,6 +86,39 @@ const applicationGetCode = (email: string) => {
function submitForm() {
console.log(stuInform);
// const infoInput = document.getElementsByTagName("input");
// for (let i = 0; i < infoInput.length; i++) {
// if (infoInput[i].value === "") {
// infoInput[i].className += ' noWrite'
// }
// }
// stuInform.forEach((input) => {
// });
let isValid = true;
// 判断输入框是否为空,并添加 'noWrite' 类
const inputs = document.querySelectorAll('input, select');
inputs.forEach((input) => {
const element = input as HTMLInputElement;
if (!element.value && element.type !== 'file') {
element.classList.add('noWrite');
isValid = false;
element.addEventListener('focusin', function (event) {
element.classList.remove('noWrite');
})
} else {
element.classList.remove('noWrite');
}
});
if (!isValid) {
showAlert('请填写所有必填项', 'waring');
return;
}
if (stuInform.value.file == null) {
showAlert('请上传您的简介', 'waring');
return;
}
const formData = new FormData();
formData.append('clazz', stuInform.value.clazz);
formData.append('code', stuInform.value.code);
Expand All @@ -94,8 +128,7 @@ function submitForm() {
formData.append('sex', stuInform.value.sex);
formData.append('studentId', stuInform.value.studentId);
formData.append('file', stuInform.value.file);
sentStuInfo(formData).then((res) => {
})
sentStuInfo(formData)
}
</script>

Expand Down Expand Up @@ -186,8 +219,36 @@ function submitForm() {
</Card>
</div>
</template>
<style scoped>
<style scoped lang="scss">
.recruitment-form {
margin-top: 50px;
.noWrite {
animation: slideIn 0.4s ease-in-out 1;
border-color: rgb(255, 96, 96);
background-color: #fbeceb;
}
}
@keyframes slideIn {
0% {
transform: translateX(0);
}
25% {
transform: translateX(-10px);
}
50% {
transform: translateX(10px);
}
75% {
transform: translateX(-10px);
}
100% {
transform: translateX(0);
}
}
</style>
File renamed without changes.
15 changes: 0 additions & 15 deletions src/components/community/tag/TagHeader.vue

This file was deleted.

Loading

0 comments on commit e3c3572

Please sign in to comment.