chutingting преди 1 година
родител
ревизия
8200692e68
променени са 3 файла, в които са добавени 13 реда и са изтрити 6 реда
  1. +1
    -1
      .env.development
  2. +4
    -0
      src/types/auto-imports.d.ts
  3. +8
    -5
      src/views/createVideo/index.vue

+ 1
- 1
.env.development Целия файл

@@ -8,5 +8,5 @@ VITE_APP_PORT = 3000
## VITE_APP_BASE_API = 'https://photo.metavatar.cc/C' ## VITE_APP_BASE_API = 'https://photo.metavatar.cc/C'
# VITE_APP_BASE_API = 'https://test.metavatar.cc/C' # VITE_APP_BASE_API = 'https://test.metavatar.cc/C'
# VITE_APP_BASE_API = 'https://phototest.metavatar.cc/C' # VITE_APP_BASE_API = 'https://phototest.metavatar.cc/C'
VITE_APP_BASE_API = 'https://mtest.metavatar.cc/C'
VITE_APP_BASE_API = 'https://m.metavatar.cc/C'



+ 4
- 0
src/types/auto-imports.d.ts Целия файл

@@ -2,6 +2,8 @@
export {} export {}
declare global { declare global {
const EffectScope: typeof import('vue')['EffectScope'] const EffectScope: typeof import('vue')['EffectScope']
const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const computed: typeof import('vue')['computed'] const computed: typeof import('vue')['computed']
@@ -268,6 +270,8 @@ import { UnwrapRef } from 'vue'
declare module 'vue' { declare module 'vue' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']> readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
readonly computed: UnwrapRef<typeof import('vue')['computed']> readonly computed: UnwrapRef<typeof import('vue')['computed']>


+ 8
- 5
src/views/createVideo/index.vue Целия файл

@@ -712,7 +712,7 @@
<el-button <el-button
type="primary" type="primary"
:disabled="sendLoading" :disabled="sendLoading"
@click="sendRequirement()"
@click="sendRequirement('send')"
color="#000" color="#000"
> >
<my-Loading-Icon2 v-if="sendLoading"></my-Loading-Icon2> <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 imageCompression from "browser-image-compression"; //压缩图片插件
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import cutImg from "@/components/cutImg.vue"; import cutImg from "@/components/cutImg.vue";
import { getUserPoinsApi } from '@/apis/my.js'
//#endregion ----------------------------------- //#endregion -----------------------------------


const route = useRoute(); const route = useRoute();
@@ -1792,9 +1793,10 @@ const problemContent = ref(""); //问题输入框内容
const answerContent = ref(""); //回答输入框内容 const answerContent = ref(""); //回答输入框内容
// 点击发送需求 // 点击发送需求
async function sendRequirement(tag) { 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( ElMessageBox.confirm(
'当前金币不足,是否去充值?', '当前金币不足,是否去充值?',
'提示', { '提示', {
@@ -1812,6 +1814,7 @@ async function sendRequirement(tag) {
}).catch(() => {}) }).catch(() => {})
return return
} }
}
// loading // loading
sendLoading.value = true; sendLoading.value = true;


@@ -1828,7 +1831,7 @@ async function sendRequirement(tag) {
}, },
]; ];
// 如果处于链接状态 // 如果处于链接状态
if (!tag) {
if (!tag || tag === 'send') {
// 金币扣除 // 金币扣除
ElMessageBox.confirm( ElMessageBox.confirm(
lanChange.value == "zh-cn" ? '需要扣一个金币,是否继续?' : 'Need to deduct a gold coin, do you want to continue?', lanChange.value == "zh-cn" ? '需要扣一个金币,是否继续?' : 'Need to deduct a gold coin, do you want to continue?',


Зареждане…
Отказ
Запис