优化修改
This commit is contained in:
parent
934abd11a4
commit
81d282bb1d
8
app.vue
8
app.vue
@ -399,7 +399,6 @@
|
||||
|
||||
<!-- 第二步 -->
|
||||
<div class="issue-form" v-else @click.stop>
|
||||
<!-- <img class="issue-bj" src="./img/issue-bj.svg" /> -->
|
||||
<div class="issue-bj">
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="727px" height="526px" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
@ -506,7 +505,7 @@ import axios from "axios"
|
||||
export default {
|
||||
name: "#answer-app",
|
||||
async setup() {
|
||||
const author = "0803d96d8d50aa0cda2cf1678d828179"
|
||||
const author = "45dc0464f1c1d77cabdf93c1c79b1045"
|
||||
const $ajax = (url, data) => {
|
||||
url = url.indexOf("//") > -1 ? url : baseURL + url
|
||||
return new Promise(function (resolve, reject) {
|
||||
@ -1678,9 +1677,11 @@ export default {
|
||||
// 上传图片 获取图片url
|
||||
const uploadImg = base64 => {
|
||||
return new Promise((resolve, reject) => {
|
||||
detailLoading.value = true
|
||||
$ajax("/api/common/upload", {
|
||||
data: base64,
|
||||
}).then(res => {
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code != 200) {
|
||||
handleMsg("error", res.message || "上传失败")
|
||||
return
|
||||
@ -1688,6 +1689,7 @@ export default {
|
||||
let data = res.data
|
||||
resolve(data)
|
||||
})
|
||||
.finally(() => (detailLoading.value = false))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -261,6 +261,9 @@ const getComment = () => {
|
||||
})
|
||||
}
|
||||
|
||||
let picture = ref({})
|
||||
|
||||
|
||||
// 监听 detailsToken 的变化
|
||||
watch(
|
||||
detailsToken,
|
||||
@ -268,13 +271,13 @@ watch(
|
||||
if (newValue !== oldValue) {
|
||||
commentPage.value = 1
|
||||
commentList.value = []
|
||||
picture.value = {}
|
||||
getComment()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
let picture = ref({})
|
||||
|
||||
const maxSize = 20 * 1024 * 1024 // 20MB
|
||||
|
||||
@ -324,7 +327,11 @@ const emojiData = ["😀", "😁", "😆", "😅", "😂", "😉", "😍", "🥰
|
||||
const openEmoji = (index, i) => {
|
||||
if (i != undefined) commentList.value[index].child[i]["emojiState"] = true
|
||||
else if (index != undefined) commentList.value[index]["emojiState"] = true
|
||||
else emojiState.value = true
|
||||
else {
|
||||
closeEmoji()
|
||||
closeAnswerCommentsChild()
|
||||
emojiState.value = true
|
||||
}
|
||||
|
||||
emojiMaskState.value = true
|
||||
}
|
||||
@ -352,11 +359,9 @@ defineExpose({
|
||||
const selectEmoji = (key, index, i) => {
|
||||
closeEmoji()
|
||||
if (i != undefined) {
|
||||
// const commentInput = document.querySelector(".comments-box .input-textarea")
|
||||
if (!commentList.value[index]["child"][i]["commentInput"]) commentList.value[index]["child"][i]["commentInput"] = ""
|
||||
commentList.value[index]["child"][i]["commentInput"] += key
|
||||
} else if (index != undefined) {
|
||||
// const commentInput = document.querySelector(".comments-box .input-textarea")
|
||||
if (!commentList.value[index]["commentInput"]) commentList.value[index]["commentInput"] = ""
|
||||
commentList.value[index]["commentInput"] += key
|
||||
} else {
|
||||
@ -431,8 +436,6 @@ const submitAnswerComments = (index, i) => {
|
||||
image = picture.value
|
||||
}
|
||||
|
||||
console.log("content", content, "1111", commentList.value[index])
|
||||
|
||||
$ajax("/api/comment/submit", {
|
||||
content,
|
||||
token,
|
||||
|
@ -1348,6 +1348,7 @@ a {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
}
|
||||
#answer-app .main .details-area-box .details-box .comments-box .comments-item .comments-content .comments-text {
|
||||
font-size: 14px;
|
||||
|
@ -1635,6 +1635,7 @@ a {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user