|
|
@@ -712,7 +712,7 @@ |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
:disabled="sendLoading" |
|
|
|
@click="sendRequirement()" |
|
|
|
@click="sendRequirement('send')" |
|
|
|
color="#000" |
|
|
|
> |
|
|
|
<my-Loading-Icon2 v-if="sendLoading"></my-Loading-Icon2> |
|
|
@@ -778,6 +778,7 @@ import Recorder from "js-audio-recorder"; //mp3插件 |
|
|
|
import imageCompression from "browser-image-compression"; //压缩图片插件 |
|
|
|
import { useRoute, useRouter } from "vue-router"; |
|
|
|
import cutImg from "@/components/cutImg.vue"; |
|
|
|
import { getUserPoinsApi } from '@/apis/my.js' |
|
|
|
//#endregion ----------------------------------- |
|
|
|
|
|
|
|
const route = useRoute(); |
|
|
@@ -1792,9 +1793,10 @@ const problemContent = ref(""); //问题输入框内容 |
|
|
|
const answerContent = ref(""); //回答输入框内容 |
|
|
|
// 点击发送需求 |
|
|
|
async function sendRequirement(tag) { |
|
|
|
|
|
|
|
let userPoinsVal = localStorage.getItem('userPoinsVal') // 当前币值 |
|
|
|
if (Number(userPoinsVal) <= 0){ |
|
|
|
if (tag === 'send') { |
|
|
|
let userPoins = await getUserPoinsApi() |
|
|
|
// let userPoinsVal = localStorage.getItem('userPoinsVal') // 当前币值 |
|
|
|
if (userPoins.code == 200 && Number(userPoins.data) <= 0){ |
|
|
|
ElMessageBox.confirm( |
|
|
|
'当前金币不足,是否去充值?', |
|
|
|
'提示', { |
|
|
@@ -1812,6 +1814,7 @@ async function sendRequirement(tag) { |
|
|
|
}).catch(() => {}) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// loading |
|
|
|
sendLoading.value = true; |
|
|
|
|
|
|
@@ -1828,7 +1831,7 @@ async function sendRequirement(tag) { |
|
|
|
}, |
|
|
|
]; |
|
|
|
// 如果处于链接状态 |
|
|
|
if (!tag) { |
|
|
|
if (!tag || tag === 'send') { |
|
|
|
// 金币扣除 |
|
|
|
ElMessageBox.confirm( |
|
|
|
lanChange.value == "zh-cn" ? '需要扣一个金币,是否继续?' : 'Need to deduct a gold coin, do you want to continue?', |
|
|
|