|
@@ -81,6 +81,7 @@ import { http } from '@/utils/request'
|
|
import avatar from '@/assets/img/avatar@2x.png'
|
|
import avatar from '@/assets/img/avatar@2x.png'
|
|
import UiConfirm from '@/components/dialog/Confirm.vue'
|
|
import UiConfirm from '@/components/dialog/Confirm.vue'
|
|
import i18n from '@/i18n'
|
|
import i18n from '@/i18n'
|
|
|
|
+import browser from '@/utils/browser'
|
|
import UiInput from '../../form/Input.vue'
|
|
import UiInput from '../../form/Input.vue'
|
|
const { t } = i18n.global
|
|
const { t } = i18n.global
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -99,7 +100,7 @@ const replyInfo = ref(null)
|
|
const tipsType = ref('warn')
|
|
const tipsType = ref('warn')
|
|
const showTips = ref(null)
|
|
const showTips = ref(null)
|
|
const slider = ref(null)
|
|
const slider = ref(null)
|
|
-
|
|
|
|
|
|
+const projectId = browser.valueFromUrl('projectId') || 1
|
|
const handlerReply = (data, index) => {
|
|
const handlerReply = (data, index) => {
|
|
inputText.value = ''
|
|
inputText.value = ''
|
|
let name = data.nickName ? data.nickName : t('tag.unkownUser')
|
|
let name = data.nickName ? data.nickName : t('tag.unkownUser')
|
|
@@ -142,7 +143,7 @@ const hanlderSubmit = () => {
|
|
|
|
|
|
if (canPut) {
|
|
if (canPut) {
|
|
canPut = false
|
|
canPut = false
|
|
- http.post(`smart-site/comment/reply`, params)
|
|
|
|
|
|
+ http.post(`smart-site/comment/reply/${projectId}`, params)
|
|
.then(response => {
|
|
.then(response => {
|
|
if (response.success) {
|
|
if (response.success) {
|
|
getAllComments()
|
|
getAllComments()
|
|
@@ -189,7 +190,7 @@ const getAllComments = () => {
|
|
}
|
|
}
|
|
const handlerDel = status => {
|
|
const handlerDel = status => {
|
|
if (status == 'ok') {
|
|
if (status == 'ok') {
|
|
- http.post(`smart-site/comment/del`, { commentId: delComfirm.value.commentId }).then(response => {
|
|
|
|
|
|
+ http.post(`smart-site/comment/del${projectId}`, { commentId: delComfirm.value.commentId }).then(response => {
|
|
if (response.success) {
|
|
if (response.success) {
|
|
// if (!delComfirm.value.parentIndex) {
|
|
// if (!delComfirm.value.parentIndex) {
|
|
// commentList.value.splice(delComfirm.value.index, 1)
|
|
// commentList.value.splice(delComfirm.value.index, 1)
|