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