Squashed commit of the following:

commit 97f19cd357
Author: zcx <1078327420@qq.com>
Date:   Thu May 16 17:05:07 2024 +0800

    1

commit ee7d59566a
Author: zcx <1078327420@qq.com>
Date:   Wed May 15 10:18:52 2024 +0800

    修改上传文件结构

commit c143d66957
Author: zcx <1078327420@qq.com>
Date:   Wed May 15 10:12:58 2024 +0800

    1

commit d4b226f46c
Author: zcx <1078327420@qq.com>
Date:   Wed May 15 09:39:59 2024 +0800

    1

commit 18119839d9
Author: zcx <1078327420@qq.com>
Date:   Wed May 15 09:08:06 2024 +0800

    修改

commit 4ca319060a
Author: zcx <1078327420@qq.com>
Date:   Sun May 12 21:41:25 2024 +0800

    1

commit 420c9925aa
Author: zcx <1078327420@qq.com>
Date:   Sun May 12 21:00:08 2024 +0800

    修改文件结构

commit dece352494
Author: zcx <1078327420@qq.com>
Date:   Sun May 12 19:47:44 2024 +0800

    1

commit c4de9ccc45
Author: zcx <1078327420@qq.com>
Date:   Sun May 12 19:36:07 2024 +0800

    1

commit 05aefb2d55
Author: zcx <1078327420@qq.com>
Date:   Sun May 12 19:28:09 2024 +0800

    1

commit 2991a0288e
Author: zcx <1078327420@qq.com>
Date:   Sun May 12 19:24:16 2024 +0800

    1

commit f0a01dc52a
Author: zcx <1078327420@qq.com>
Date:   Sun May 12 19:14:07 2024 +0800

    1

commit 103b91481d
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/api/auth.js
#	src/前端/walktofree/src/components/NavigationBar.vue
#	src/前端/walktofree/src/main.js
#	src/前端/walktofree/src/pages/Evaluation.vue
#	src/前端/walktofree/src/pages/HomePage.vue
#	src/前端/walktofree/src/pages/Login.vue
#	src/前端/walktofree/src/pages/Register.vue
#	src/前端/walktofree/src/pages/addDemand.vue
#	src/前端/walktofree/src/pages/mine.vue
#	src/前端/walktofree/src/router/index.js
develop
zcx 1 year ago
parent 0f844484d9
commit 123fb36b7a

@ -14,10 +14,12 @@
</div>
</div>
</div>
<div><NavigationBar /></div>
</template>
<script>
import axios from 'axios';
import NavigationBar from '../components/NavigationBar.vue';
export default {
data() {
@ -26,6 +28,9 @@ export default {
newMessage: '',
};
},
components: {
NavigationBar
},
methods: {
async fetchMessages() {
try {

@ -0,0 +1,121 @@
<template>
<div class="user-feedback">
<!-- 输入评价 -->
<div class="feedback-input">
<h2>修改你的评价</h2>
<form>
<textarea id="ebody" v-model.trim="evaluation.ebody" rows="4" cols="50"></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="evaluation.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 {
ebody: '',
satisfaction:'',
ct:'',
eid: 1, // eid
evaluation: {}, //
};
},
methods: {
send() {
axios.post('http://106.52.218.118:8081/evaluate/editEvaluation', {
eid: this.eid, // eid
satisfaction: this.evaluation.satisfaction,
ct:this.evaluation.ct,
ebody: this.evaluation.ebody,
}, {
withCredentials: true,
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
//
console.log('评价发送成功');
}).catch(error => {
//
console.error('评价发送失败', error);
});
},
fetchEvaluation() {
axios.get(`http://106.52.218.118:8081/evaluate/getEvaluation?eid=${this.eid}`)
.then(response => {
this.evaluation = response.data;// evaluation
})
.catch(error => {
console.error('获取评价信息失败', error);
});
},
handleRateChange(satisfaction) {
this.evaluation.satisfaction = satisfaction; //
}
},
mounted() {
this.fetchEvaluation(); // fetchEvaluation
}
};
</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>

@ -0,0 +1,11 @@
<script setup>
</script>
<template>
</template>
<style scoped>
</style>

@ -0,0 +1,47 @@
<template>
<el-button @click="add">Add Item</el-button>
<el-button @click="onDelete">Delete Item</el-button>
<el-scrollbar max-height="800px">
<p v-for="item in count" :key="item" class="scrollbar-demo-item">
{{ item }}
</p>
<p v-for="review in reviews" :key="review.id" class="scrollbar-demo-item">
{{ review.content }}
</p>
</el-scrollbar>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const count = ref(3)
const reviews = ref([
{ id: 1, content: 'Great product!' },
{ id: 2, content: 'Fast shipping!' },
{ id: 3, content: 'Excellent customer service!' }
])
const add = () => {
count.value++
}
const onDelete = () => {
if (count.value > 0) {
count.value--
}
}
</script>
<style scoped>
.scrollbar-demo-item {
display: flex;
align-items: center;
justify-content: center;
height: 50px;
margin: 10px;
text-align: center;
border-radius: 4px;
background: var(--el-color-primary-light-9);
color: var(--el-color-primary);
}
</style>
Loading…
Cancel
Save