forked from Gitlink/gitlink_help_center
Compare commits
54 Commits
Author | SHA1 | Date |
---|---|---|
|
f81174a73d | |
|
d0e0b4c7fa | |
|
3562a82689 | |
|
7320b27941 | |
![]() |
c43bd16131 | |
|
267ade6bec | |
|
a4b95a3a79 | |
|
f5812a2d01 | |
|
3cca79d4d4 | |
|
3f27d0bb65 | |
|
bcdd1c41bb | |
|
b9841619be | |
|
3d8cdd1481 | |
|
a9d54ea658 | |
|
db5a70a71a | |
|
ee03369f5f | |
|
3ce0cbb335 | |
|
c119b10105 | |
|
d232a7525d | |
![]() |
a965975e5d | |
|
9558e8804b | |
![]() |
ebc0c0bc0f | |
|
ebc8882037 | |
|
6c1553ae46 | |
|
00c9dee6b8 | |
|
058576c8d6 | |
![]() |
6db199d597 | |
|
b52c07c50b | |
|
ca0682dca6 | |
|
c21bf37b4e | |
|
e95c0c05c9 | |
|
f33ceb18d2 | |
|
a9dfb7450d | |
![]() |
df94519fc7 | |
|
c317f3e407 | |
|
180ab9e1bf | |
|
67a776683e | |
|
f5c16ccb03 | |
|
81b6ee9775 | |
|
c4e0f6e0b0 | |
|
85ff256e48 | |
|
1978df9534 | |
|
e996ec51a4 | |
|
8609718faa | |
|
0d56bfd78f | |
|
e7eb185492 | |
![]() |
48a2ac922d | |
|
7ddfa2c0e5 | |
|
b90cd28734 | |
|
9df19bd662 | |
|
85af403476 | |
|
b85d08f802 | |
|
8522ded936 | |
|
47be1b0e0f |
|
@ -4,7 +4,7 @@ LABEL maintainer="zhanglinhao <1260788704@qq.com>"
|
|||
|
||||
WORKDIR /gitlink_help_center
|
||||
COPY ./ /gitlink_help_center/
|
||||
|
||||
RUN yarn install
|
||||
RUN npm run build -- --locale zh-cn
|
||||
RUN npm run build
|
||||
|
||||
CMD ["npm", "run", "serve"]
|
|
@ -52,3 +52,6 @@ sidebar_position: 1
|
|||
|
||||

|
||||
|
||||
### 现在尝试
|
||||
https://www.gitlink.org.cn/settings/mysite
|
||||
|
||||
|
|
|
@ -22,4 +22,4 @@ TortoiseGit下载地址:https://download.tortoisegit.org/tgit/
|
|||
<br/>
|
||||
<br/>
|
||||
- **提交者**:wuyifan
|
||||
- **日期**:2024.5.27
|
||||
- **日期**:2024.5.30
|
|
@ -56,7 +56,26 @@ module.exports = {
|
|||
type: 'doc',
|
||||
docId: 'intro',
|
||||
position: 'left',
|
||||
label: '帮助中心'
|
||||
label: '帮助中心',
|
||||
to:'/'
|
||||
},
|
||||
{
|
||||
label: '更多开源',
|
||||
position: 'right',
|
||||
items: [
|
||||
{
|
||||
label: 'GitHub',
|
||||
to: 'https://github.com/',
|
||||
},
|
||||
{
|
||||
label: 'Gitee',
|
||||
to: 'https://gitee.com/',
|
||||
},
|
||||
{
|
||||
label: 'Gitlab',
|
||||
to: 'https://about.gitlab.com',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/boxyhq',
|
||||
|
@ -111,6 +130,10 @@ module.exports = {
|
|||
label: '服务协议',
|
||||
to: 'https://forum.trustie.net/forums/5029/detail',
|
||||
},
|
||||
{
|
||||
label:'意见反馈',
|
||||
to:'http://120.27.216.107:80/Feedback'
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
|
@ -0,0 +1,24 @@
|
|||
# gitlink
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "gitlink",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.7.2",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.7.4",
|
||||
"router": "^1.3.8",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead",
|
||||
"not ie 11"
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<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>
|
|
@ -0,0 +1,20 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
|
@ -0,0 +1,132 @@
|
|||
<template>
|
||||
<div class="top-right-button">
|
||||
<el-button type="primary" @click="returnList()">返回</el-button>
|
||||
</div>
|
||||
<div class="user-feedback">
|
||||
<!-- 输入评价 -->
|
||||
<div class="feedback-input">
|
||||
<h2>评论</h2>
|
||||
<form @submit.prevent="send"> <!-- 阻止表单默认提交行为 -->
|
||||
<textarea id="text" v-model.trim="evaluation.text" rows="4" cols="50"></textarea>
|
||||
<br>
|
||||
<label for="contact">联系方式(选填):</label>
|
||||
<input type="text" id="contact" v-model="evaluation.contact">
|
||||
<br>
|
||||
<button type="submit">发布评价</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<el-space direction="vertical">
|
||||
<el-row>
|
||||
<el-text>留下您的评价</el-text>
|
||||
<el-rate class="ml-1"
|
||||
v-model="evaluation.score"
|
||||
:texts="['oops', 'disappointed', 'normal', 'good', 'great']"
|
||||
show-text
|
||||
@change="handleRateChange"
|
||||
clearable />
|
||||
</el-row>
|
||||
</el-space>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
evaluation: {
|
||||
score: '',
|
||||
text: '',
|
||||
contact: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
send() {
|
||||
axios.post('http://192.168.234.35:8080/addEvaluation', {
|
||||
score: this.evaluation.score,
|
||||
text: this.evaluation.text,
|
||||
contact: this.evaluation.contact,
|
||||
}, {
|
||||
withCredentials: true,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}).then(response => {
|
||||
if (response.data == 1) {
|
||||
console.log('评价发送成功');
|
||||
this.evaluation.text = '';
|
||||
this.evaluation.score = '';
|
||||
this.evaluation.contact = '';
|
||||
alert("发布成功");
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('评价发送失败', error);
|
||||
});
|
||||
},
|
||||
handleRateChange(score) {
|
||||
this.evaluation.score = score; // 更新星级值
|
||||
},
|
||||
returnList(){
|
||||
this.$router.push('/evalueationList')
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.user-feedback {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.feedback-input {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
font-size: 16px;
|
||||
border: 1px solid #28a7a3;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 20px;
|
||||
padding: 8px 16px;
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background-color: #007bff;
|
||||
color: #003f3f;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.submitted-feedback {
|
||||
border-top: 1px solid #a6cfee;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.feedback-item {
|
||||
background-color: #abd4ee;
|
||||
border: 1px solid #c2f1fb;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.top-right-button {
|
||||
/* 绝对定位到右上角 */
|
||||
position: absolute;
|
||||
top: 1px; /* 根据需要调整 */
|
||||
left: 10px; /* 根据需要调整 */
|
||||
}
|
||||
|
||||
.feedback-item p {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,91 @@
|
|||
<template>
|
||||
<div>
|
||||
<h2>评论列表</h2>
|
||||
<div
|
||||
v-for="comment in comments"
|
||||
:key="comment.text"
|
||||
class="comment-item"
|
||||
>
|
||||
<p>{{ comment.text }}</p>
|
||||
<!-- <p>评分: {{ comment.score }}</p> -->
|
||||
</div>
|
||||
|
||||
<div class="post-comment-button-container">
|
||||
<button class='post-comment-button' @click="navigateToPostCommentPage">发表评论</button> <!-- 移除括号,因为这里不是调用方法 -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'; // 移除ref和onMounted,因为它们在这个例子中未使用
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
comments: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
navigateToPostCommentPage() {
|
||||
this.$router.push('/Feedback');
|
||||
},
|
||||
},
|
||||
async created() { // 注意这里移除了created前的async关键字,因为created是生命周期钩子,不是方法
|
||||
try {
|
||||
const response = await axios.get(`http://192.168.234.35:8080/evaluationList`);
|
||||
this.comments = response.data;
|
||||
} catch (error) {
|
||||
console.error('Error fetching comments:', error);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.user-feedback {
|
||||
/* 添加一个最大宽度或容器样式 */
|
||||
max-width: 800px;
|
||||
margin: 0 auto; /* 水平居中 */
|
||||
padding: 20px; /* 添加外边距 */
|
||||
}
|
||||
.comment-item {
|
||||
border: 1px solid #ddd; /* 添加边框 */
|
||||
padding: 10px; /* 添加内边距 */
|
||||
margin-bottom: 10px; /* 添加下边距,以分隔评论 */
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f5f5f5; /* 添加背景色 */
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
|
||||
border-radius: 5px; /* 添加圆角 */
|
||||
}
|
||||
.comment-item p {
|
||||
/* 可以添加字体样式,如字体大小、颜色等 */
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
.post-comment-button-container {
|
||||
position: fixed;
|
||||
bottom: 20px; /* 距离页面底部的距离 */
|
||||
right: 20px; /* 距离页面右侧的距离,可以根据需要调整 */
|
||||
z-index: 999; /* 确保按钮在其他内容之上 */
|
||||
display: flex;
|
||||
justify-content: center; /* 水平居中按钮 */
|
||||
align-items: center; /* 垂直居中按钮(如果按钮容器是flex容器) */
|
||||
transition: bottom 0.3s ease;
|
||||
}
|
||||
|
||||
.post-comment-button {
|
||||
padding: 10px 20px;
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease; /* 添加背景色过渡效果 */
|
||||
}
|
||||
.post-comment-button:hover{
|
||||
background-color: #55ff00;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,10 @@
|
|||
import { createApp } from 'vue'
|
||||
import router from './router';
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/theme-chalk/index.css';
|
||||
import App from './App.vue'
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(ElementPlus)
|
||||
app.use(router)
|
||||
app.mount('#app')
|
|
@ -0,0 +1,16 @@
|
|||
import { createWebHistory, createRouter } from 'vue-router';
|
||||
import UserFeedback from '../components/UserFeedback.vue'
|
||||
import evalueationList from '../components/evalueationList.vue'
|
||||
|
||||
const routes = [
|
||||
{ path: '/', redirect: '/evalueationList' }, // 重定向到/login路径
|
||||
{ path: '/Feedback', component: UserFeedback },
|
||||
{ path: '/evalueationList', component: evalueationList },
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes
|
||||
});
|
||||
|
||||
export default router;
|
|
@ -0,0 +1,4 @@
|
|||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|
Loading…
Reference in New Issue