|
@@ -28,6 +28,7 @@ import { ref, unref } from 'vue';
|
|
import { showToast } from 'vant';
|
|
import { showToast } from 'vant';
|
|
import { commentApi } from '/@/api';
|
|
import { commentApi } from '/@/api';
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
|
+import { showSuccessToast } from 'vant';
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const { id } = unref(router.currentRoute)?.params;
|
|
const { id } = unref(router.currentRoute)?.params;
|
|
const evaluate = ref({
|
|
const evaluate = ref({
|
|
@@ -45,6 +46,14 @@ async function handlComment() {
|
|
starRank,
|
|
starRank,
|
|
});
|
|
});
|
|
console.log('evaluate', res);
|
|
console.log('evaluate', res);
|
|
|
|
+ showSuccessToast({
|
|
|
|
+ message:'评论成功',
|
|
|
|
+ iconSize: 35,
|
|
|
|
+ duration: 1000,
|
|
|
|
+ });
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ router.go(-1);
|
|
|
|
+ }, 200);
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss" >
|
|
<style lang="scss" >
|