commitdevelopee7d59566a
Author: zcx <1078327420@qq.com> Date: Wed May 15 10:18:52 2024 +0800 修改上传文件结构 commitc143d66957
Author: zcx <1078327420@qq.com> Date: Wed May 15 10:12:58 2024 +0800 1 commitd4b226f46c
Author: zcx <1078327420@qq.com> Date: Wed May 15 09:39:59 2024 +0800 1 commit18119839d9
Author: zcx <1078327420@qq.com> Date: Wed May 15 09:08:06 2024 +0800 修改 commit4ca319060a
Author: zcx <1078327420@qq.com> Date: Sun May 12 21:41:25 2024 +0800 1 commit420c9925aa
Author: zcx <1078327420@qq.com> Date: Sun May 12 21:00:08 2024 +0800 修改文件结构 commitdece352494
Author: zcx <1078327420@qq.com> Date: Sun May 12 19:47:44 2024 +0800 1 commitc4de9ccc45
Author: zcx <1078327420@qq.com> Date: Sun May 12 19:36:07 2024 +0800 1 commit05aefb2d55
Author: zcx <1078327420@qq.com> Date: Sun May 12 19:28:09 2024 +0800 1 commit2991a0288e
Author: zcx <1078327420@qq.com> Date: Sun May 12 19:24:16 2024 +0800 1 commitf0a01dc52a
Author: zcx <1078327420@qq.com> Date: Sun May 12 19:14:07 2024 +0800 1 commit103b91481d
Merge:3f241a6
d73c814
Author: zcx <1078327420@qq.com> Date: Sat May 11 16:10:15 2024 +0800 Merge branch 'develop' of https://bdgit.educoder.net/mwxbgi697/softegg into 曾晨曦_branch # Conflicts: # src/前端/walktofree/src/components/new_file.vue # src/前端/walktofree/src/main.js # src/前端/walktofree/src/pages/Communication.vue # src/前端/walktofree/src/pages/Login.vue # src/前端/walktofree/src/pages/Pay.vue # src/前端/walktofree/src/pages/Register.vue # src/前端/walktofree/src/pages/SecurityVerification.vue # src/前端/walktofree/src/pages/addDemand.vue # src/前端/walktofree/src/pages/mine.vue # src/前端/walktofree/src/router/index.js
parent
7d34478c1d
commit
a0642f1797
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>任务列表</h1>
|
||||
<div v-for="task in tasks" :key="task.id" class="task-item">
|
||||
<div>{{ task.title }}</div>
|
||||
<div>{{ task.description }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tasks: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.fetchTasks();
|
||||
},
|
||||
methods: {
|
||||
async fetchTasks() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/tasks');
|
||||
const data = await response.json();
|
||||
this.tasks = data;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.task-item {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div class="user-feedback">
|
||||
<!-- 输入评价 -->
|
||||
<div class="feedback-input">
|
||||
<h2>写下你的评价吧</h2>
|
||||
<form>
|
||||
<textarea id="ebody" v-model.trim="ebody" rows="4" cols="50" placeholder="在这里输入您的评价"></textarea>
|
||||
<button type="submit" @click="send">发布评价</button>
|
||||
</form>
|
||||
</div>
|
||||
<el-space direction="vertical">
|
||||
<el-row>
|
||||
<el-text>星级评价</el-text>
|
||||
<el-rate class="ml-1"
|
||||
v-model="satisfaction"
|
||||
: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 {
|
||||
user: {},
|
||||
eid: '',
|
||||
ebody: '',
|
||||
satisfaction:'',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
send() {
|
||||
axios.post('http://106.52.218.118:12607/evaluate/addEvaluation', {
|
||||
eid : 1,
|
||||
satisfaction :this.satisfaction,
|
||||
ebody :this.ebody,
|
||||
}, {
|
||||
// 配置跨域请求时携带 cookie
|
||||
withCredentials: true,
|
||||
// 设置请求头部为 JSON 格式
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
handleRateChange(){
|
||||
this.satisfaction = satisfaction; // 更新星级值
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.user-feedback {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.feedback-input {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
font-size: 16px;
|
||||
border: 1px solid #28a7a3;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
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;
|
||||
}
|
||||
|
||||
.feedback-item p {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue