浏览代码

edit

ctt_dev
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://test.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 {}
declare global {
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 autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const computed: typeof import('vue')['computed']
@@ -268,6 +270,8 @@ import { UnwrapRef } from 'vue'
declare module 'vue' {
interface ComponentCustomProperties {
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 autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
readonly computed: UnwrapRef<typeof import('vue')['computed']>


+ 8
- 5
src/views/createVideo/index.vue 查看文件

@@ -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?',


正在加载...
取消
保存