新增日志

This commit is contained in:
2025-11-11 15:13:03 +08:00
parent 7b13a6784e
commit a2da6cc21a
4 changed files with 22 additions and 14 deletions

View File

@@ -4,8 +4,8 @@ VUE_APP_BASE_LOCAL=http://127.0.0.1:34567/
# VUE_APP_BASE_LOCAL=http://192.168.1.209:34567/
# 业务后端(开发用内网地址)
VUE_APP_BASE_REMOTE=https://crawlclient.api.yolozs.com
# VUE_APP_BASE_REMOTE=http://192.168.1.144:8101/
# VUE_APP_BASE_REMOTE=https://crawlclient.api.yolozs.com
VUE_APP_BASE_REMOTE=http://192.168.1.144:8101/
# AI 服务
VUE_APP_BASE_SPECIAL=https://ai.yolozs.com

View File

@@ -155,7 +155,7 @@
<el-switch :disabled="!userdata.aiReplay" style="margin-right: 20px;" v-model="auto" />
</el-tooltip>
<el-button @click="onClose">取消</el-button>
<el-button type="primary" :disabled="!canConfirm" @click="onConfirm">确定</el-button>
<el-button type="primary" @click="onConfirm">确定</el-button>
</div>
</div>
</template>
@@ -345,7 +345,7 @@ const getLangLabel = (v) => (languageOptions.value.find((x) => x.value === v)?.l
/** 计算属性 */
const canTranslate = computed(() => sentences.length > 0 && selectedLangs.value.length > 0)
const isAnyLoading = computed(() => Object.values(loadingLangs).some(Boolean))
const canConfirm = computed(() => !!activeTab.value && !!(translations[activeTab.value] || []).length)
// const canConfirm = computed(() => !!activeTab.value && !!(translations[activeTab.value] || []).length)
/**
* 方法 - 源文本
@@ -500,7 +500,7 @@ watch([sentences, selectedLangs, translations, activeTab], () => {
}, { deep: true })
async function onConfirm() {
if (!activeTab.value) return
// if (!activeTab.value) return
// 如果关闭了翻译功能,则先提示
if (!isTranslation.value) {

View File

@@ -79,7 +79,7 @@ import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/stores/
import { ElLoading, ElMessage } from 'element-plus';
import { passToken } from '@/api/ios';
let version = ref('2.8.0');
let version = ref('2.9.1');
onMounted(() => {

View File

@@ -59,11 +59,11 @@
</div>
<img v-if="isWifi" style="position: absolute; right: 20px; top: 10px; height: 30px;" src="@/assets/wifi.png"></img>
<MultiLineInputDialog v-model:visible="showDialog" :initialText='initialTextStr' :title="dialogTitle"
:index="selectedDevice" @confirm="onDialogConfirm" @cancel="stopAll(2000)" />
:index="selectedDevice" @confirm="onDialogConfirm" @cancel="stopAll(2000, 'click')" />
<HostListManagerDialog v-model:visible="showHostDlg" @save="onHostSaved" @invitType="invitTypeFun" />
<TranslationDialog v-model="showtransDlg" :type="transDlgType" :translateFn="doTranslate"
storage-key-prefix="demo-translation" @confirm="onConfirm" @cancel="stopAll(2000)" />
storage-key-prefix="demo-translation" @confirm="onConfirm" @cancel="stopAll(2000, 'click')" />
</div>
<!-- <AgentGuildDialog v-model="showMyInfo" :model="formInit" @save="handleSave" /> -->
<AgentGuildDialog v-model="showMyInfo" :model="{
@@ -418,7 +418,7 @@ const buttons = [
// },
{
label: '全部停止',
onClick: () => stopAll(2000),
onClick: () => stopAll(2000, 'click'),
show: () => true,
img: {
normal: new URL('@/assets/video/leftBtn8.png', import.meta.url).href,
@@ -895,7 +895,7 @@ function getMesList(deviceId) {
})
}
async function stopAll(time) {
async function stopAll(time, type) {
stopLoading = ElLoading.service({
lock: true,
text: '停止中',
@@ -904,6 +904,12 @@ async function stopAll(time) {
// 🔒 先强制关闭所有提示弹窗
ElMessageBox.close();
if (type == 'click') {
// 关闭调度定时器
clearInterval(scheduleTimer)
scheduleTimer = null
}
scheduleEnabled.value = false;
runType.value = '';
@@ -1102,12 +1108,12 @@ onMounted(async () => {
}
// 非 start正常入缓冲 → 防抖批量 addTempAnchorData
const country = data && data.country != null ? data.country : ''
const text = data && (data.hostsId != null ? data.hostsId : data.text)
const country = data && data.country != null ? data.country : data.region
const text = data && (data.hostsId != null ? data.hostsId : data.displayId)
const invitationType = data && (data.invitationType != null ? data.invitationType : '')
const id = data && data.id != null ? data.id : ''
if (!text) return
// console.log(text)
batch.push({ country, text, invitationType, id })
scheduleFlush((items) => {
@@ -1460,6 +1466,7 @@ function withTimeout(p, ms) {
}
function startScheduleLoop() {
lastInterruptTs = Date.now()
localStorage.setItem('INT_LAST_TS', String(lastInterruptTs))
// 先按当前 index 跑一次,保持“即刻对齐”
@@ -1523,8 +1530,9 @@ function startScheduleLoop() {
// —— 正常片段轮换(你原有的逻辑) ——
const now = Date.now()
const cur = schedulePlan[scheduleState.index]
const cur = JSON.parse(localStorage.getItem('SCHEDULE_PLAN'))[scheduleState.index]
const elapsed = now - scheduleState.startTime
console.log('已调度', elapsed / 1000, '秒', cur.duration / 1000 + '秒后调度', printCurrentTime())
if (elapsed >= cur.duration) {
scheduleState.index = (scheduleState.index + 1) % schedulePlan.length