Compare commits

...

3 Commits

Author SHA1 Message Date
wangchen14709853322
67e7669694 Create readme.md 2026-06-06 19:15:55 +08:00
wangchen14709853322
9f683839e6 1.2.4
新增 云编译排队机制
优化 授权域名校验忽略站点域名
修复 会员注册事件存在异常会导致会员码未生成的问题
2026-06-06 11:18:46 +08:00
wangchen147
44805a4a1f 处理编译内存溢出 2026-05-09 16:38:27 +08:00
3860 changed files with 6216 additions and 1343 deletions

View File

@ -1,13 +1,11 @@
# api请求地址
VITE_APP_BASE_URL='/adminapi/'
# 图片服务器地址
VITE_IMG_DOMAIN=''
# 图片服务器地址VITE_IMG_DOMAIN='https://cs-home-service.site.niucloud.com/'
# 请求时header中token的参数名
VITE_REQUEST_HEADER_TOKEN_KEY='token'
# 请求时header中站点的参数名
VITE_REQUEST_HEADER_SITEID_KEY='site-id'
VITE_REQUEST_HEADER_SITEID_KEY='site-id'

View File

@ -1,11 +1,9 @@
# api请求地址
VITE_APP_BASE_URL='/adminapi/'
# 图片服务器地址
VITE_IMG_DOMAIN=''
# 图片服务器地址VITE_IMG_DOMAIN='https://cs-home-service.site.niucloud.com/'
# 请求时header中token的参数名
VITE_REQUEST_HEADER_TOKEN_KEY='token'

23
admin/components.d.ts vendored
View File

@ -17,30 +17,20 @@ declare module '@vue/runtime-core' {
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
ElCalendar: typeof import('element-plus/es')['ElCalendar']
ElCard: typeof import('element-plus/es')['ElCard']
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
ElCheckTag: typeof import('element-plus/es')['ElCheckTag']
ElCol: typeof import('element-plus/es')['ElCol']
ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
@ -48,28 +38,19 @@ declare module '@vue/runtime-core' {
ElImage: typeof import('element-plus/es')['ElImage']
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElOptionGroup: typeof import('element-plus/es')['ElOptionGroup']
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRate: typeof import('element-plus/es')['ElRate']
ElResult: typeof import('element-plus/es')['ElResult']
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
ElSlider: typeof import('element-plus/es')['ElSlider']
ElStatistic: typeof import('element-plus/es')['ElStatistic']
ElStep: typeof import('element-plus/es')['ElStep']
ElSteps: typeof import('element-plus/es')['ElSteps']
@ -82,11 +63,7 @@ declare module '@vue/runtime-core' {
ElTag: typeof import('element-plus/es')['ElTag']
ElTimeline: typeof import('element-plus/es')['ElTimeline']
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
ElTimeSelect: typeof import('element-plus/es')['ElTimeSelect']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
ElUpload: typeof import('element-plus/es')['ElUpload']
ExportSure: typeof import('./src/components/export-sure/index.vue')['default']
HeatMap: typeof import('./src/components/heat-map/index.vue')['default']

View File

@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 && vite build && node publish.cjs",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build && node publish.cjs",
"preview": "vite preview"
},
"dependencies": {

View File

@ -1,36 +1,90 @@
import axios from 'axios'
import request from '@/utils/request'
import storage from '@/utils/storage'
/**
*
*/
export function cloudBuild(params: Record<string, any> = {}) {
return request.post('niucloud/build', params)
export const CLOUD_COMPILE_BASE_URL = 'http://go.site.niucloud.com'
function createCloudCompileRequest() {
const instance = axios.create({
baseURL: CLOUD_COMPILE_BASE_URL,
timeout: 0,
headers: {
'lang': storage.get('lang') ?? 'zh-cn'
}
})
instance.interceptors.request.use(
(config) => {
const token = storage.get('token')
if (token) {
config.headers['token'] = token
}
return config
},
(err) => {
return Promise.reject(err)
}
)
instance.interceptors.response.use(
(response) => {
return response.data
},
(err) => {
return Promise.reject(err)
}
)
return instance
}
const cloudCompileRequest = createCloudCompileRequest()
export function cloudBuild() {
return request.post('niucloud/build')
}
/**
*
*/
export function getCloudBuildTask() {
return request.get('niucloud/build')
}
/**
*
*/
export function getCloudBuildLog() {
return request.get('niucloud/build/log')
}
/**
*
*/
export function clearCloudBuildTask() {
return request.post('niucloud/build/clear')
return request.post('niucloud/build/clear', {}, { showErrorMessage: false, showSuccessMessage: false })
}
/**
*
*/
export function preBuildCheck() {
return request.get('niucloud/build/check', { showErrorMessage: false })
return request.get('niucloud/build/check')
}
export function getCloudBuildQueuePosition(taskId: string) {
return cloudCompileRequest.get('/cloud/queue_position', { params: { task_id: taskId } })
}
export function getCloudBuildSseUrl(taskId: string): string {
return `${CLOUD_COMPILE_BASE_URL}/cloud/sse?task_id=${taskId}`
}
export function getCloudCompileLocalUrl() {
return request.get('niucloud/build/get_local_url')
}
export function setCloudCompileLocalUrl(url: string) {
return request.post('niucloud/build/set_local_url', { url })
}
export function startServerDownload(taskId: string, downloadUrl: string, authorizeCode: string, timestamp: string) {
return request.post('niucloud/build/start_server_download', {
task_id: taskId,
download_url: downloadUrl,
authorize_code: authorizeCode,
timestamp
})
}
export function getSseBuildLog(taskId: string) {
return request.get('niucloud/build/get_sse_build_log', { params: { task_id: taskId } })
}

View File

@ -77,6 +77,15 @@ export function getWeappUploadLog(key: string) {
return request.get(`weapp/upload/${ key }`)
}
/**
*
* @param key
* @returns
*/
export function fetchWeappUploadLog(key: string) {
return request.get(`weapp/upload_log/${ key }`)
}
/***************************************************** 管理端 ****************************************************/
/**

View File

@ -167,7 +167,7 @@
<script lang="ts" setup>
import { ref, watch, computed } from 'vue'
import { t } from '@/lang'
import { getCloudBuildLog, getCloudBuildTask, cloudBuild, clearCloudBuildTask, preBuildCheck } from '@/app/api/cloud'
import { getCloudBuildLog, getCloudBuildTask, cloudBuild, clearCloudBuildTask, preBuildCheck, getCloudBuildQueuePosition, getCloudBuildSseUrl, CLOUD_COMPILE_BASE_URL, startServerDownload, getSseBuildLog } from '@/app/api/cloud'
import { getInstalledAddonList } from '@/app/api/addon'
import { Terminal, TerminalFlash } from 'vue-web-terminal'
import 'vue-web-terminal/lib/theme/dark.css'
@ -196,8 +196,277 @@ const handleSelectionChange = (rows) => {
}
let cloudBuildLog = []
let eventSource: EventSource | null = null
interface SSEMessage {
type: string
task_id?: string
percent?: number
action?: string
msg?: string
code?: string
time?: string
download_url?: string
download_percent?: number
downloaded_bytes?: number
total_bytes?: number
authorize_code?: string
timestamp?: string
}
const connectSSE = (taskId: string) => {
if (eventSource) {
eventSource.close()
}
const url = getCloudBuildSseUrl(taskId)
eventSource = new EventSource(url)
eventSource.onopen = () => {
console.log('SSE connected')
}
eventSource.onmessage = (event) => {
try {
const data: SSEMessage = JSON.parse(event.data)
handleSSEMessage(data)
} catch (e) {
console.error('SSE parse error:', e)
}
}
eventSource.addEventListener('progress', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('SSE progress parse error:', e)
}
})
eventSource.addEventListener('complete', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('SSE complete parse error:', e)
}
})
eventSource.addEventListener('failed', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('SSE failed parse error:', e)
}
})
eventSource.addEventListener('heartbeat', () => {
console.log('SSE heartbeat')
})
eventSource.addEventListener('download_start', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('SSE download_start parse error:', e)
}
})
eventSource.addEventListener('download_progress', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('SSE download_progress parse error:', e)
}
})
eventSource.addEventListener('download_complete', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('SSE download_complete parse error:', e)
}
})
eventSource.onerror = (error) => {
console.error('SSE error:', error)
setTimeout(() => {
if (showDialog.value && cloudBuildTask.value) {
getCloudBuildLogFn()
}
}, 5000)
}
}
const handleSSEMessage = (data: SSEMessage) => {
if (!showDialog.value) return
if (data.type === 'progress' && data.action) {
if (!cloudBuildLog.includes(data.action)) {
if (cloudBuildLog.length === 0) {
const storedTime = localStorage.getItem('cloud_build_start_time')
if (storedTime) {
buildStartTime.value = Number(storedTime)
} else {
const now = Date.now()
buildStartTime.value = now
localStorage.setItem('cloud_build_start_time', String(now))
}
buildDuration.value = Math.floor((Date.now() - buildStartTime.value) / 1000)
buildTimer && clearInterval(buildTimer)
buildTimer = setInterval(() => {
if (buildStartTime.value) {
buildDuration.value = Math.floor((Date.now() - buildStartTime.value) / 1000)
}
}, 1000)
terminalRef.value.execute('clear')
terminalRef.value.execute('开始编译')
}
if (data.action.indexOf('云编译任务正在排队') != -1) {
cloudQueue = data.action
cloudBuildLog.push(data.action)
return
} else {
cloudQueue = null
}
terminalRef.value.pushMessage({ content: `${data.action}` })
cloudBuildLog.push(data.action)
if (data.code === '0' && data.msg) {
errorAnalysis.value = {}
errorInfo.value = data.msg
terminalRef.value.pushMessage({ content: data.msg, class: 'error' })
timeloading.value = false
active.value = 'error'
terminalRef.value.execute('clear')
clearCloudBuildTask()
buildTimer && clearInterval(buildTimer)
buildTimer = null
localStorage.removeItem('cloud_build_start_time')
localStorage.removeItem('cloud_build_task')
closeSSE()
}
}
} else if (data.type === 'complete') {
terminalRef.value.pushMessage({ content: '编译完成' })
} else if (data.type === 'failed') {
errorInfo.value = data.msg || '编译失败'
active.value = 'error'
terminalRef.value.execute('clear')
clearCloudBuildTask()
buildTimer && clearInterval(buildTimer)
buildTimer = null
localStorage.removeItem('cloud_build_start_time')
localStorage.removeItem('cloud_build_task')
closeSSE()
} else if (data.type === 'download_start') {
if (data.action && !cloudBuildLog.includes(data.action)) {
terminalRef.value.pushMessage({ content: data.action })
cloudBuildLog.push(data.action)
}
} else if (data.type === 'download_progress') {
const percent = data.download_percent || 0
const downloaded = data.downloaded_bytes || 0
const total = data.total_bytes || 0
const downloadedMB = (downloaded / 1024 / 1024).toFixed(2)
const totalMB = (total / 1024 / 1024).toFixed(2)
terminalRef.value.pushMessage({ content: `下载进度: ${percent}% (${downloadedMB}MB / ${totalMB}MB)` })
} else if (data.type === 'download_complete') {
if (data.action && !cloudBuildLog.includes(data.action)) {
terminalRef.value.pushMessage({ content: data.action })
cloudBuildLog.push(data.action)
}
if (data.download_url && data.task_id) {
startServerDownloadFn(data.task_id, data.download_url, data.authorize_code, data.timestamp)
}
}
}
let downloadPollingTimer: number | null = null
const startServerDownloadFn = async (taskId: string, downloadUrl: string, authorizeCode: string, timestamp: string) => {
try {
terminalRef.value.pushMessage({ content: '正在启动后台下载...' })
const parseUrl = new URL(downloadUrl, CLOUD_COMPILE_BASE_URL)
const authorize_code = parseUrl.searchParams.get('authorize_code') || authorizeCode || ''
const ts = parseUrl.searchParams.get('timestamp') || timestamp || ''
await startServerDownload(taskId, downloadUrl, authorize_code, ts)
downloadPollingTimer = setTimeout(async () => {
if (!downloadPollingTimer) return
try {
const res = await getSseBuildLog(taskId)
if (res.code === 1) {
const { status, percent, msg } = res.data
if (status === 'downloading') {
terminalRef.value.pushMessage({ content: `下载进度: ${percent}% - ${msg}` })
} else if (status === 'unzipping') {
terminalRef.value.pushMessage({ content: msg })
} else if (status === 'completed') {
terminalRef.value.pushMessage({ content: '部署完成!' })
downloadPollingTimer && clearInterval(downloadPollingTimer)
downloadPollingTimer = null
active.value = 'complete'
timeloading.value = false
terminalRef.value.execute('clear')
clearCloudBuildTask()
buildTimer && clearInterval(buildTimer)
buildTimer = null
localStorage.removeItem('cloud_build_start_time')
localStorage.removeItem('cloud_build_task')
closeSSE()
ElMessage.success('编译部署完成')
} else if (status === 'error') {
terminalRef.value.pushMessage({ content: `错误: ${msg}`, class: 'error' })
downloadPollingTimer && clearInterval(downloadPollingTimer)
downloadPollingTimer = null
errorInfo.value = msg
active.value = 'error'
timeloading.value = false
clearCloudBuildTask()
closeSSE()
}
} else {
terminalRef.value.pushMessage({ content: '获取下载进度失败', class: 'error' })
downloadPollingTimer && clearInterval(downloadPollingTimer)
downloadPollingTimer = null
}
} catch (e) {
console.error('Polling error:', e)
}
}, 2000)
} catch (error) {
console.error('启动后台下载失败:', error)
terminalRef.value.pushMessage({ content: '启动后台下载失败', class: 'error' })
errorInfo.value = '启动后台下载失败'
active.value = 'error'
}
}
const closeSSE = () => {
if (eventSource) {
eventSource.close()
eventSource = null
}
if (downloadPollingTimer) {
clearInterval(downloadPollingTimer)
downloadPollingTimer = null
}
}
//
const buildStartTime = ref<number | null>(null)
const buildDuration = ref<number>(0)
let buildTimer: number | null = null
@ -272,10 +541,17 @@ const getCloudBuildLogFn = () => {
data[0].forEach(item => {
if (!cloudBuildLog.includes(item.action)) {
if (item.action.indexOf('云编译任务正在排队') != -1) {
cloudQueue = item.action
cloudBuildLog.push(item.action)
return
} else {
cloudQueue = null
}
terminalRef.value.pushMessage({ content: `${item.action}` })
cloudBuildLog.push(item.action)
if (item.code == 0) {
if (item.code === '0') {
errorAnalysis.value = res.data.error_analysis || {}
error = item.msg
terminalRef.value.pushMessage({ content: item.msg, class: 'error' })
@ -305,7 +581,7 @@ const getCloudBuildLogFn = () => {
setTimeout(() => {
getCloudBuildLogFn()
}, 2000)
}, 5000)
}).catch()
}
@ -342,10 +618,17 @@ const open = async () => {
loading.value = true
active.value = 'build'
closeType.value = 'normal'
cloudBuildLog = []
if (cloudBuildTask.value) {
showDialog.value = true
loading.value = false
getCloudBuildLogFn()
const taskId = (cloudBuildTask.value as any).task_id
if (taskId) {
connectSSE(taskId)
} else {
getCloudBuildLogFn()
}
return
}
@ -355,7 +638,12 @@ const open = async () => {
loading.value = false
cloudBuildTask.value = data
showDialog.value = true
getCloudBuildLogFn()
const taskId = data.task_id
if (taskId) {
connectSSE(taskId)
} else {
getCloudBuildLogFn()
}
}).catch(() => {
showDialog.value = false
loading.value = false
@ -399,15 +687,19 @@ const againBuild = () => {
return
}
loading.value = true
cloudBuild({
addon: selectAddon.value
}).then(({ data }) => {
cloudBuildLog = []
cloudBuild().then(({ data }) => {
active.value = 'build'
loading.value = false
cloudBuildTask.value = data
showDialog.value = true
localStorage.removeItem('cloud_build_start_time')
getCloudBuildLogFn()
const taskId = data.task_id
if (taskId) {
connectSSE(taskId)
} else {
getCloudBuildLogFn()
}
}).catch(() => {
showDialog.value = false
loading.value = false
@ -422,13 +714,19 @@ const selectable = (row: any) => {
* 升级进度动画
*/
let flashInterval: null | number = null
const terminalFlash = new TerminalFlash()
let terminalFlash = null
let cloudQueue = null
const onExecCmd = (key, command, success, failed, name) => {
if (command == '开始编译') {
terminalFlash = new TerminalFlash()
success(terminalFlash)
const frames = makeIterator(['/', '——', '\\', '|'])
flashInterval = setInterval(() => {
terminalFlash.flush('> ' + frames.next().value)
if (cloudQueue) {
terminalFlash.flush(cloudQueue + '<br>> ' + frames.next().value)
} else {
terminalFlash.flush('> ' + frames.next().value)
}
}, 150)
}
}
@ -446,6 +744,7 @@ const makeIterator = (array: string[]) => {
}
const dialogClose = (done: () => {}) => {
closeSSE()
if (active.value == 'build' && cloudBuildTask.value && closeType.value == 'normal') {
ElMessageBox.confirm(
t('cloudbuild.showDialogCloseTips'),
@ -471,6 +770,7 @@ const dialogClose = (done: () => {}) => {
}
const dialogCancel = () => {
closeSSE()
if (active.value == 'build' && cloudBuildTask.value && closeType.value == 'normal') {
ElMessageBox.confirm(
t('cloudbuild.showDialogCloseTips'),
@ -501,10 +801,12 @@ const cloudBuildCheckDirFn = () => {
watch(() => showDialog.value, () => {
if (!showDialog.value) {
closeSSE()
cloudBuildTask.value = null
active.value = 'build'
cloudBuildLog = []
flashInterval && clearInterval(flashInterval)
terminalFlash && terminalFlash.finish()
buildTimer && clearInterval(buildTimer)
buildStartTime.value = null
buildDuration.value = 0

View File

@ -356,8 +356,14 @@ const getUpgradeTaskFn = () => {
data.log.forEach((item) => {
if (!upgradeLog.includes(item)) {
terminalRef.value.pushMessage({ content: `${item}` })
upgradeLog.push(item)
if (item.indexOf('云编译任务正在排队') != -1) {
cloudQueue = item
upgradeLog.push(item)
} else {
cloudQueue = null
terminalRef.value.pushMessage({ content: `${item}` })
upgradeLog.push(item)
}
}
})
//
@ -627,12 +633,18 @@ const open = (addonKey: string = '', callback = null, otherData: any = {}) => {
*/
let flashInterval: any = null
const terminalFlash = new TerminalFlash()
let cloudQueue = null
const onExecCmd = (key, command, success, failed, name) => {
if (command == '开始升级') {
success(terminalFlash)
const frames = makeIterator(['/', '——', '\\', '|'])
flashInterval = setInterval(() => {
terminalFlash.flush('> ' + frames.next().value)
if (cloudQueue) {
terminalFlash.flush(cloudQueue + '<br>> ' + frames.next().value)
} else {
terminalFlash.flush('> ' + frames.next().value)
}
}, 150)
}
}

View File

@ -0,0 +1,441 @@
<template>
<el-dialog v-model="showDialog" title="小程序上传" width="850px" :close-on-click-modal="false" :close-on-press-escape="false" :before-close="dialogClose">
<div v-show="active == 'upload'" class="h-[50vh]" v-loading="loading">
<div class="h-[45vh]" v-show="cloudBuildTask">
<terminal ref="terminalRef" :name="`weappupload-${terminalId}`" context="" :init-log="null" :show-header="false" :show-log-time="true" @exec-cmd="onExecCmd"/>
</div>
<div class="flex justify-end mt-[20px]" v-show="cloudBuildTask">
<el-button @click="dialogCancel()">取消</el-button>
<el-button type="primary" :loading="timeloading" class="!w-[140px]" v-if="!errorInfo">已用时 {{ formattedDuration }}</el-button>
<el-button type="primary" @click="active = 'error'" v-if="errorInfo">下一步</el-button>
</div>
</div>
<div v-show="active == 'complete'">
<div class="h-[50vh] flex flex-col">
<div class="flex-1 h-0 flex justify-center items-center flex-col">
<el-result icon="success" title="上传成功">
<template #sub-title>
<p class="text-[16px]">小程序上传成功耗时 {{ formattedDuration }}</p>
</template>
<template #extra>
<el-button type="primary" @click="handleComplete">完成</el-button>
</template>
</el-result>
</div>
</div>
</div>
<div v-show="active == 'error'">
<div class="h-[50vh] flex flex-col">
<div class="flex-1 h-0 flex justify-center items-center flex-col">
<el-result icon="error" title="上传失败">
<template #extra>
<p class="text-[14px] text-red-500 mb-[10px]" v-if="errorInfo">错误信息: {{ errorInfo }}</p>
<el-button type="primary" @click="handleErrorNextStep">下一步</el-button>
</template>
</el-result>
</div>
</div>
</div>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, nextTick, onUnmounted, computed } from 'vue'
import { t } from '@/lang'
import { getWeappUploadLog, fetchWeappUploadLog } from '@/app/api/weapp'
import { CLOUD_COMPILE_BASE_URL } from '@/app/api/cloud'
import { Terminal } from 'vue-web-terminal'
import 'vue-web-terminal/lib/theme/dark.css'
import { ElMessageBox, ElMessage } from 'element-plus'
const showDialog = ref(false)
const terminalId = ref(Date.now())
const cloudBuildTask = ref<any>(null)
const active = ref('upload')
const loading = ref(false)
const terminalRef = ref(null)
const errorInfo = ref('')
const timeloading = ref(false)
const errorAnalysis = ref({})
let uploadLog: any[] = []
let eventSource: EventSource | null = null
const uploadStartTime = ref<number | null>(null)
const uploadDuration = ref(0)
let durationTimer: number | null = null
interface TerminalMessage {
content: string
class?: string
}
let messageQueue: TerminalMessage[] = []
let messageQueueTimer: number | null = null
const MESSAGE_FLUSH_INTERVAL = 300
const flushMessageQueue = () => {
if (!terminalRef.value || messageQueue.length === 0) return
while (messageQueue.length > 0) {
const msg = messageQueue.shift()
if (msg) {
terminalRef.value.pushMessage(msg)
}
}
}
const queueMessage = (content: string, className?: string) => {
messageQueue.push({ content, class: className })
if (messageQueueTimer === null) {
messageQueueTimer = window.setTimeout(() => {
flushMessageQueue()
messageQueueTimer = null
}, MESSAGE_FLUSH_INTERVAL)
}
}
const clearMessageQueue = () => {
messageQueue = []
if (messageQueueTimer !== null) {
clearTimeout(messageQueueTimer)
messageQueueTimer = null
}
}
const formattedDuration = computed(() => {
const seconds = uploadDuration.value
const mins = Math.floor(seconds / 60)
const secs = seconds % 60
return mins > 0 ? `${mins}${secs}` : `${secs}`
})
const onExecCmd = (cmd: string) => {
}
const getWeappSseUrl = (taskId: string): string => {
return `${CLOUD_COMPILE_BASE_URL}/cloud/weapp_sse?task_id=${taskId}`
}
interface SSEMessage {
type: string
task_id?: string
percent?: number
action?: string
msg?: string
code?: string
time?: string
}
const connectSSE = (taskId: string) => {
if (eventSource) {
eventSource.close()
}
const url = getWeappSseUrl(taskId)
eventSource = new EventSource(url)
eventSource.onopen = () => {
console.log('Weapp SSE connected')
}
eventSource.onmessage = (event) => {
try {
const data: SSEMessage = JSON.parse(event.data)
handleSSEMessage(data)
} catch (e) {
console.error('Weapp SSE parse error:', e)
}
}
eventSource.addEventListener('progress', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('Weapp SSE progress parse error:', e)
}
})
eventSource.addEventListener('complete', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('Weapp SSE complete parse error:', e)
}
})
eventSource.addEventListener('failed', (event) => {
try {
const data: SSEMessage = JSON.parse((event as MessageEvent).data)
handleSSEMessage(data)
} catch (e) {
console.error('Weapp SSE failed parse error:', e)
}
})
eventSource.onerror = (error) => {
console.error('Weapp SSE error:', error)
closeSSE()
}
}
const closeSSE = () => {
if (eventSource) {
eventSource.close()
eventSource = null
}
clearMessageQueue()
}
const earlyLogCheck = (taskKey: string): Promise<boolean> => {
return new Promise((resolve) => {
fetchWeappUploadLog(taskKey).then(res => {
const data = (res.data && res.data.data) ? res.data.data : []
if (data[0] && data[0].length) {
const last = data[0][data[0].length - 1]
if (last.code == 1 && last.percent == 100) {
resolve(true)
return
}
if (last.code == 0) {
resolve(true)
return
}
}
resolve(false)
}).catch(() => {
resolve(false)
})
})
}
const handleSSEMessage = (data: SSEMessage) => {
if (!showDialog.value) return
if (data.type === 'progress' && data.action) {
if (!uploadLog.includes(data.action)) {
if (uploadLog.length === 0) {
const now = Date.now()
uploadStartTime.value = now
uploadDuration.value = 0
durationTimer && clearInterval(durationTimer)
durationTimer = setInterval(() => {
if (uploadStartTime.value) {
uploadDuration.value = Math.floor((Date.now() - uploadStartTime.value) / 1000)
}
}, 1000)
nextTick(() => {
if (terminalRef.value) {
terminalRef.value.execute('clear')
terminalRef.value.execute('开始上传')
}
})
}
queueMessage(`${data.action}`)
uploadLog.push(data.action)
if (data.code === '0') {
errorInfo.value = data.msg || '上传失败'
timeloading.value = false
active.value = 'error'
nextTick(() => {
if (terminalRef.value) {
terminalRef.value.execute('clear')
}
})
closeSSE()
uploadDurationTimerClear()
if (props.onError) {
props.onError()
}
return
}
if (data.code === '1' && data.percent === 100) {
nextTick(() => {
if (terminalRef.value) {
terminalRef.value.execute('clear')
}
})
queueMessage('上传完成')
timeloading.value = false
active.value = 'complete'
closeSSE()
uploadDurationTimerClear()
ElMessage.success('上传成功')
if (props.onSuccess) {
props.onSuccess()
}
return
}
}
} else if (data.type === 'complete') {
getWeappUploadLog(data.task_id)
queueMessage('上传完成')
timeloading.value = false
active.value = 'complete'
closeSSE()
uploadDurationTimerClear()
ElMessage.success('上传成功')
if (props.onSuccess) {
props.onSuccess()
}
} else if (data.type === 'failed') {
errorInfo.value = data.msg || '上传失败'
timeloading.value = false
active.value = 'error'
nextTick(() => {
if (terminalRef.value) {
terminalRef.value.execute('clear')
}
})
closeSSE()
uploadDurationTimerClear()
if (props.onError) {
props.onError()
}
}
}
const uploadDurationTimerClear = () => {
if (durationTimer) {
clearInterval(durationTimer)
durationTimer = null
}
uploadStartTime.value = null
}
const dialogClose = (done: () => void) => {
closeSSE()
uploadDurationTimerClear()
if (active.value == 'upload' && cloudBuildTask.value) {
ElMessageBox.confirm(
'确定要关闭上传窗口吗?关闭后将停止当前上传任务',
'提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
done()
}).catch(() => { })
} else {
done()
}
}
const dialogCancel = () => {
showDialog.value = false
}
const handleComplete = () => {
showDialog.value = false
if (props.onSuccess) {
props.onSuccess()
}
}
const handleErrorNextStep = () => {
showDialog.value = false
if (props.onError) {
props.onError()
}
}
const props = defineProps<{
onSuccess?: () => void
onError?: () => void
}>()
const open = async (taskKey: string, task?: any) => {
loading.value = true
active.value = 'upload'
uploadLog = []
clearMessageQueue()
errorInfo.value = ''
errorAnalysis.value = {}
timeloading.value = true
terminalId.value = Date.now()
const taskData = task || cloudBuildTask.value
if (taskData) {
cloudBuildTask.value = taskData
if (taskData.status == 0) {
loading.value = false
const isCompleted = await earlyLogCheck(taskData.task_key)
if (isCompleted) {
closeSSE()
getWeappUploadLog(taskData.task_key)
showDialog.value = true
active.value = 'complete'
loading.value = false
uploadDuration.value = taskData.update_time - taskData.create_time
nextTick(() => {
if (terminalRef.value) {
terminalRef.value.execute('clear')
terminalRef.value.execute('上传完成')
}
})
return
}
showDialog.value = true
connectSSE(taskData.task_key)
} else if (taskData.status == 1) {
active.value = 'complete'
loading.value = false
uploadDuration.value = taskData.update_time - taskData.create_time
showDialog.value = true
nextTick(() => {
if (terminalRef.value) {
terminalRef.value.execute('clear')
terminalRef.value.execute('上传完成')
}
})
if (props.onSuccess) {
props.onSuccess()
}
} else if (taskData.status == -1 || taskData.status == -2) {
active.value = 'error'
loading.value = false
errorInfo.value = taskData.fail_reason || '上传失败'
showDialog.value = true
nextTick(() => {
if (terminalRef.value) {
terminalRef.value.execute('clear')
terminalRef.value.execute('上传失败')
}
})
if (props.onError) {
props.onError()
}
} else {
loading.value = false
showDialog.value = true
connectSSE(taskData.task_key)
}
} else {
loading.value = false
}
}
const setTask = (task: any) => {
cloudBuildTask.value = task
}
onUnmounted(() => {
closeSSE()
uploadDurationTimerClear()
})
defineExpose({
open,
setTask,
cloudBuildTask,
loading,
showDialog
})
</script>

View File

@ -46,5 +46,28 @@
"uploadWeapp": "上传小程序",
"undoAudit" : "撤回审核",
"undoAuditTips" : "撤回代码审核,单个账号每天审核撤回次数最多不超过 5 次每天的额度从0点开始生效一个月不超过 10 次。是否要继续撤回?",
"helpInfo": "查看帮助"
"helpInfo": "查看帮助",
"weappUpload": {
"title": "小程序上传",
"noTask": "暂无上传任务",
"uploadFailed": "上传失败",
"uploadSuccess": "上传成功",
"uploadSuccessDesc": "小程序上传成功,耗时",
"usedTime": "已用时",
"startUpload": "开始上传",
"uploadComplete": "上传完成",
"dialogCloseTips": "确定要关闭上传窗口吗?关闭后将停止当前上传任务",
"errorInfo": "错误信息",
"errorAnalysis": "错误分析",
"complete": "完成",
"return": "返回",
"nextStep": "下一步",
"waitingUpload": "等待上传任务...",
"minute": "分",
"second": "秒",
"dot": ".",
"defaultDesc": "默认为列表版本号递增自定义则为手动输入版本号进行上传首位必须大于1"
},
"minute": "分",
"second": "秒"
}

View File

@ -110,11 +110,11 @@
<el-form-item prop="code1">
<el-input v-model.number="form.code1" class="!w-[70px]" :placeholder="t('codePlaceholder')" />
</el-form-item>
<span class="mx-[10px]">.</span>
<span class="mx-[10px]">{{ t('weappUpload.dot') }}</span>
<el-form-item prop="code2">
<el-input v-model.number="form.code2" class="!w-[70px]" :placeholder="t('codePlaceholder')" />
</el-form-item>
<span class="mx-[10px]">.</span>
<span class="mx-[10px]">{{ t('weappUpload.dot') }}</span>
<el-form-item prop="code3">
<el-input v-model.number="form.code3" class="!w-[70px]" :placeholder="t('codePlaceholder')" />
</el-form-item>
@ -155,6 +155,8 @@
</template>
</el-dialog>
</div>
<component :is="WeappUpload" ref="weappUploadRef" @success="getWeappVersionListFn" @error="getWeappVersionListFn" />
</template>
<script lang="ts" setup>
@ -168,12 +170,17 @@ import { ElMessageBox } from 'element-plus'
import { AnyObject } from '@/types/global'
import Storage from '@/utils/storage'
import { siteWeappCommit, undoAudit } from "@/app/api/wxoplatform";
import WeappUpload from '@/app/components/weappupload/index.vue'
// 使
const WeappUploadComponent = WeappUpload
const route = useRoute()
const router = useRouter()
const pageName = route.meta.title
const dialogVisible = ref(false)
const loading = ref(true)
const weappUploadRef = ref<any>(null)
const weappTableData:{
page: number,
limit: number,
@ -286,19 +293,24 @@ const formRules = reactive({
/**
* 获取版本列表
*/
const getWeappVersionListFn = (page: number = 1) => {
const getWeappVersionListFn = (page?: number) => {
weappTableData.loading = true
weappTableData.page = page
if (page) weappTableData.page = page
getWeappVersionList({
return getWeappVersionList({
page: weappTableData.page,
limit: weappTableData.limit
}).then(res => {
weappTableData.loading = false
weappTableData.data = res.data.data
weappTableData.total = res.data.total
if (page == 1 && weappTableData.data.length && weappTableData.data[0].status == 0) getWeappUploadLogFn(weappTableData.data[0].task_key)
weappTableData.version_info = res.data.version_info
const uploadingTask = res.data.data.find((d: any) => d.status == 0)
if (uploadingTask && weappUploadRef.value) {
weappUploadRef.value.setTask(uploadingTask)
weappUploadRef.value.open(uploadingTask.task_key, uploadingTask)
}
}).catch(() => {
weappTableData.loading = false
})
@ -367,15 +379,35 @@ const insert = () => {
return
}
if (uploading.value) return
if (uploading.value) {
const ref = weappUploadRef.value
if (ref && ref.cloudBuildTask && ref.cloudBuildTask.task_key) {
ref.open(ref.cloudBuildTask.task_key, ref.cloudBuildTask)
} else if (ref) {
ref.showDialog = true
}
return
}
uploading.value = true
previewContent.value = ''
setWeappVersion(form.value).then(res => {
getWeappVersionListFn()
getWeappPreviewImage()
uploading.value = false
const versionId = res.data
getWeappVersionListFn().then(() => {
const item = weappTableData.data.find((d: any) => d.id === versionId)
if (item && item.task_key) {
const ref = weappUploadRef.value
if (ref) {
ref.open(item.task_key, item)
}
}
getWeappPreviewImage()
uploading.value = false
}).catch(() => {
uploading.value = false
})
}).catch(() => {
uploading.value = false
})
@ -388,6 +420,7 @@ const localInsert = () => {
}
const previewContent = ref('')
const getWeappPreviewImage = () => {
if (!authCode.value) return
getWeappPreview().then(res => {
@ -395,21 +428,55 @@ const getWeappPreviewImage = () => {
}).catch()
}
const currentUploadKey = ref<string | null>(null)
const uploadPollingCount = ref(0)
const maxPollingCount = 150
const getWeappUploadLogFn = (key: string) => {
if (!key) return
if (currentUploadKey.value !== key) {
currentUploadKey.value = key
uploadPollingCount.value = 0
}
uploadPollingCount.value++
if (uploadPollingCount.value > maxPollingCount) {
currentUploadKey.value = null
uploadPollingCount.value = 0
uploading.value = false
return
}
getWeappUploadLog(key).then(res => {
const data = res.data.data ?? []
if (currentUploadKey.value !== key) return
const data = (res.data && res.data.data) ? res.data.data : []
if (data[0] && data[0].length) {
const last = data[0][data[0].length - 1]
if (last.code == 0) {
currentUploadKey.value = null
uploadPollingCount.value = 0
getWeappVersionListFn()
return
}
if (last.code == 1 && last.percent == 100) {
currentUploadKey.value = null
uploadPollingCount.value = 0
getWeappVersionListFn()
getWeappPreviewImage()
!Storage.get('weappUploadTipsLock') && (uploadSuccessShowDialog.value = true)
return
}
}
if (currentUploadKey.value === key) {
setTimeout(() => {
getWeappUploadLogFn(key)
}, 2000)
}
}).catch(() => {
if (currentUploadKey.value === key) {
setTimeout(() => {
getWeappUploadLogFn(key)
}, 2000)

View File

@ -1245,12 +1245,18 @@ const installCheckResult = ref({})
let flashInterval = null
const terminalFlash = new TerminalFlash()
let cloudQueue = null
const onExecCmd = (key, command, success, failed, name) => {
if (command == '开始安装插件') {
success(terminalFlash)
const frames = makeIterator(['/', '——', '\\', '|'])
flashInterval = setInterval(() => {
terminalFlash.flush('> ' + frames.next().value)
if (cloudQueue) {
terminalFlash.flush(cloudQueue + '<br>> ' + frames.next().value)
} else {
terminalFlash.flush('> ' + frames.next().value)
}
}, 150)
}
}
@ -1342,7 +1348,7 @@ const getInstallTask = (first: boolean = true) => {
}
setTimeout(() => {
getInstallTask(false)
}, 2000)
}, 5000)
} else {
if (!first) {
installStep.value = 2
@ -1488,6 +1494,13 @@ const getCloudInstallLog = () => {
if (data[0] && data[0].length && installShowDialog.value == true) {
data[0].forEach((item) => {
if (!installLog.includes(item.action)) {
if (item.action.indexOf('云编译任务正在排队') != -1) {
cloudQueue = item.action
installLog.push(item.action)
return
} else {
cloudQueue = null
}
terminalRef.value.pushMessage({ content: `${item.action}` })
installLog.push(item.action)

View File

@ -87,7 +87,7 @@
<el-table-column :label="t('siteInfo')" width="300" align="left">
<template #default="{ row }">
<div class="flex items-center">
<img class="w-[54px] h-[54px] mr-[10px] rounded-[4px]" v-if="row.logo" :src="img(row.logo)" alt="">
<img class="w-[54px] h-[54px] mr-[10px] rounded-[4px]" v-if="row.icon" :src="img(row.icon)" alt="">
<img class="w-[54px] h-[54px] mr-[10px] rounded-[4px]" v-else src="@/app/assets/images/site_default.png" alt="">
<div class="flex flex-col">
<span>{{ row.site_name || '' }}</span>

View File

@ -14,67 +14,67 @@
<el-button class="w-[98px] !h-[36px]" type="primary" @click="handleCloudBuild" :loading="cloudBuildRef?.loading">云编译</el-button>
</div>
</div>
<!-- <div class="panel-title bg-[#F4F5F7] border-[#E6E6E6] border-solid border-b-[1px] h-[40px] flex items-center p-[10px]">-->
<!-- <span class="text-[16px] font-500 text-[#1D1F3A]">云编译</span>-->
<!-- <span class="text-[12px] text-[#9699B6] ml-[10px]">云编译不需要本地安装node环境即可进行针对使用者方便快捷</span>-->
<!-- </div>-->
<!-- <div class="mt-[20px] flex mb-[14px] items-center">-->
<!-- <span class="flex ml-[20px] font-500 text-[16px] items-center text-[#1D1F3A]">-->
<!-- &lt;!&ndash; <i class="w-[3px] h-[12px] bg-primary mr-[6px] block"></i> &ndash;&gt;-->
<!-- 温馨提示-->
<!-- </span>-->
<!-- <span class="text-[12px] text-[#9699B6] ml-[10px]"> 以下情况可以进行云编译</span>-->
<!-- </div>-->
<div class="panel-title bg-[#F4F5F7] border-[#E6E6E6] border-solid border-b-[1px] h-[40px] flex items-center p-[10px]">
<span class="text-[16px] font-500 text-[#1D1F3A]">云编译</span>
<span class="text-[12px] text-[#9699B6] ml-[10px]">云编译不需要本地安装node环境即可进行针对使用者方便快捷</span>
</div>
<div class="mt-[20px] flex mb-[14px] items-center">
<span class="flex ml-[20px] font-500 text-[16px] items-center text-[#1D1F3A]">
<!-- <i class="w-[3px] h-[12px] bg-primary mr-[6px] block"></i> -->
温馨提示
</span>
<span class="text-[12px] text-[#9699B6] ml-[10px]"> 以下情况可以进行云编译</span>
</div>
<!-- &lt;!&ndash; <div class="text-[14px] text-[#606266] ml-[13px] mb-[18px]">云编译不需要本地安装node环境即可进行针对使用者方便快捷</div> &ndash;&gt;-->
<!-- <div class="ml-[40px] text-[14px] text-[#4F516D] mb-[18px]">1系统或插件每次安装或升级完成后需要云编译</div>-->
<!-- <div class="ml-[40px] text-[14px] text-[#4F516D] mb-[18px]">2开发者编写完前端代码之后可以使用云编译进行源码编译</div>-->
<!-- <div class="ml-[40px] text-[14px] text-[#4F516D] mb-[18px]">3由于云编译不是针对某个插件进行编译而是系统整体编译因此如果同时需要安装多个插件时往往需要安装到最后一个插件才整体进行云编译</div>-->
<!-- <div class="mt-[21px] flex mb-[21px] text-[16px] text-[#1D1F3A] font-500 items-center">-->
<!-- <span class="flex ml-[20px] items-center">-->
<!-- &lt;!&ndash; <i class="w-[3px] h-[12px] bg-primary mr-[6px] block"></i> &ndash;&gt;-->
<!-- 云编译流程-->
<!-- </span>-->
<!-- </div>-->
<!-- <div class="ml-[40px]">-->
<!-- <el-timeline>-->
<!-- <el-timeline-item :hollow="true">-->
<!-- &lt;!&ndash; <template #dot>-->
<!-- <div class="w-[15px] h-[15px] bg-primary rounded-[50%] text-[9px] text-[#fff] flex items-center justify-center">1</div>-->
<!-- </template> &ndash;&gt;-->
<!-- <div class="text-[16px] text-[#1D1F3A]">编译admin代码</div>-->
<!-- <div class="p-[10px] bg-[#F9F9FB] mt-[10px] text-[#4F516D] text-[14px] w-[1085px] border-[#F1F1F8] border-solid border-[1px] h-[40px] flex items-center rounded-[4px]">-->
<!-- <span>云编译会将admin端的vue代码编译为对应的html文件同时将生成的代码下载到系统 niucloud 下的</span>-->
<!-- <span class="text-[#F09000] mx-[3px] font-bold">public/admin</span>-->
<!-- <span>目录中后台的访问路径将变为</span>-->
<!-- <span class="text-primary ml-[3px] font-500">https:///admin</span>-->
<!-- </div>-->
<!-- </el-timeline-item>-->
<!-- <el-timeline-item :hollow="true">-->
<!-- <div class="text-[16px] text-[#1D1F3A]">编译uniapp代码</div>-->
<!-- <div class="p-[10px] bg-[#F9F9FB] mt-[10px] text-[#4F516D] text-[14px] w-[1085px] border-[#F1F1F8] border-solid border-[1px] h-[40px] flex items-center rounded-[4px]">-->
<!-- <span>云编译会将uniapp端的vue代码编译为对应的html文件同时将生成的代码下载到系统 niucloud下的</span>-->
<!-- <span class="text-[#F09000] mx-[3px] font-bold">public/wap</span>-->
<!-- <span>目录中这样手机端网页的访问路径将变为</span>-->
<!-- <span class="text-primary ml-[3px] font-500"> https:///wap</span>-->
<!-- </div>-->
<!-- </el-timeline-item>-->
<!-- <el-timeline-item :hollow="true">-->
<!-- <div class="text-[16px] text-[#1D1F3A]">编译web代码</div>-->
<!-- <div class="p-[10px] bg-[#F9F9FB] mt-[10px] text-[#4F516D] text-[14px] w-[1085px] border-[#F1F1F8] border-solid border-[1px] h-[40px] flex items-center rounded-[4px]">-->
<!-- <span>云编译会将web端的vue代码编译为对应的html文件同时将生成的代码下载到系统 niucloud下的</span>-->
<!-- <span class="text-[#F09000] mx-[3px] font-bold">public/web</span>-->
<!-- <span>目录中这样电脑端网页的访问路径将变为</span>-->
<!-- <span class="text-primary ml-[3px] font-500"> https:///web</span>-->
<!-- </div>-->
<!-- </el-timeline-item>-->
<!-- </el-timeline>-->
<!-- </div>-->
<!-- <div class="text-[14px] text-[#606266] ml-[13px] mb-[18px]">云编译不需要本地安装node环境即可进行针对使用者方便快捷</div> -->
<div class="ml-[40px] text-[14px] text-[#4F516D] mb-[18px]">1系统或插件每次安装或升级完成后需要云编译</div>
<div class="ml-[40px] text-[14px] text-[#4F516D] mb-[18px]">2开发者编写完前端代码之后可以使用云编译进行源码编译</div>
<div class="ml-[40px] text-[14px] text-[#4F516D] mb-[18px]">3由于云编译不是针对某个插件进行编译而是系统整体编译因此如果同时需要安装多个插件时往往需要安装到最后一个插件才整体进行云编译</div>
<div class="mt-[21px] flex mb-[21px] text-[16px] text-[#1D1F3A] font-500 items-center">
<span class="flex ml-[20px] items-center">
<!-- <i class="w-[3px] h-[12px] bg-primary mr-[6px] block"></i> -->
云编译流程
</span>
</div>
<div class="ml-[40px]">
<el-timeline>
<el-timeline-item :hollow="true">
<!-- <template #dot>
<div class="w-[15px] h-[15px] bg-primary rounded-[50%] text-[9px] text-[#fff] flex items-center justify-center">1</div>
</template> -->
<div class="text-[16px] text-[#1D1F3A]">编译admin代码</div>
<div class="p-[10px] bg-[#F9F9FB] mt-[10px] text-[#4F516D] text-[14px] w-[1085px] border-[#F1F1F8] border-solid border-[1px] h-[40px] flex items-center rounded-[4px]">
<span>云编译会将admin端的vue代码编译为对应的html文件同时将生成的代码下载到系统 niucloud 下的</span>
<span class="text-[#F09000] mx-[3px] font-bold">public/admin</span>
<span>目录中后台的访问路径将变为</span>
<span class="text-primary ml-[3px] font-500">https:///admin</span>
</div>
</el-timeline-item>
<el-timeline-item :hollow="true">
<div class="text-[16px] text-[#1D1F3A]">编译uniapp代码</div>
<div class="p-[10px] bg-[#F9F9FB] mt-[10px] text-[#4F516D] text-[14px] w-[1085px] border-[#F1F1F8] border-solid border-[1px] h-[40px] flex items-center rounded-[4px]">
<span>云编译会将uniapp端的vue代码编译为对应的html文件同时将生成的代码下载到系统 niucloud下的</span>
<span class="text-[#F09000] mx-[3px] font-bold">public/wap</span>
<span>目录中这样手机端网页的访问路径将变为</span>
<span class="text-primary ml-[3px] font-500"> https:///wap</span>
</div>
</el-timeline-item>
<el-timeline-item :hollow="true">
<div class="text-[16px] text-[#1D1F3A]">编译web代码</div>
<div class="p-[10px] bg-[#F9F9FB] mt-[10px] text-[#4F516D] text-[14px] w-[1085px] border-[#F1F1F8] border-solid border-[1px] h-[40px] flex items-center rounded-[4px]">
<span>云编译会将web端的vue代码编译为对应的html文件同时将生成的代码下载到系统 niucloud下的</span>
<span class="text-[#F09000] mx-[3px] font-bold">public/web</span>
<span>目录中这样电脑端网页的访问路径将变为</span>
<span class="text-primary ml-[3px] font-500"> https:///web</span>
</div>
</el-timeline-item>
</el-timeline>
</div>
</div>
<div class="mt-[10px]">
<div class="panel-title bg-[#F4F5F7] border-[#E6E6E6] border-solid border-b-[1px] h-[40px] flex items-center p-[10px]">
<span class="text-[16px] font-500 text-[#1D1F3A]">第三方云编译</span>
<!-- <el-switch v-model="isCloudCompilation" :active-value="1" :inactive-value="0" class="ml-[10px]" @change="confirm" />-->
<el-switch v-model="isCloudCompilation" :active-value="1" :inactive-value="0" class="ml-[10px]" @change="confirm" />
<span class="ml-[10px] text-[#9699B6] text-[12px]">自己搭建第三方云编译服务器无需等待</span>
</div>
<div class="mt-[20px] flex mb-[14px] text-[16px] items-center text-[#1D1F3A]">

View File

@ -94,6 +94,7 @@ class Cloud extends BaseAdminController
public function setLocalCloudCompileConfig()
{
$data = $this->request->params([
[ 'is_open', 0],
[ 'url', '' ],
]);
return success('SUCCESS',(new NiucloudService())->setLocalCloudCompileConfig($data));
@ -108,4 +109,36 @@ class Cloud extends BaseAdminController
{
return success('SUCCESS',(new NiucloudService())->getLocalCloudCompileConfig());
}
/**
* 启动后台下载SSE编译完成后调用
* @description 启动后台下载
* @return \think\Response
*/
public function startServerDownload()
{
$data = $this->request->params([
[ 'task_id', '' ],
[ 'download_url', '' ],
[ 'authorize_code', '' ],
[ 'timestamp', '' ],
]);
return success('操作成功', (new CoreCloudBuildService())->startServerDownload(
$data['task_id'],
$data['download_url'],
$data['authorize_code'],
$data['timestamp']
));
}
/**
* 获取后台下载进度
* @description 获取后台下载进度
* @return \think\Response
*/
public function getSseBuildLog()
{
$taskId = $this->request->param('task_id', '');
return success('操作成功', (new CoreCloudBuildService())->getSseBuildLog($taskId));
}
}

View File

@ -89,4 +89,13 @@ class Version extends BaseAdminController
public function uploadLog(string $key) {
return success(data: (new WeappVersionService())->getUploadLog($key));
}
/**
* 直接获取小程序上传日志(不更新状态)
* @param string $key
* @return Response
*/
public function getUploadLogOnly(string $key) {
return success(data: (new WeappVersionService())->getUploadLogOnly($key));
}
}

View File

@ -61,6 +61,10 @@ Route::group('niucloud', function() {
Route::post('build/set_local_url', 'niucloud.Cloud/setLocalCloudCompileConfig');
//获取本地服务器地址
Route::get('build/get_local_url', 'niucloud.Cloud/getLocalCloudCompileConfig');
//启动后台下载SSE编译完成后
Route::post('build/start_server_download', 'niucloud.Cloud/startServerDownload');
//获取后台下载进度
Route::get('build/get_sse_build_log', 'niucloud.Cloud/getSseBuildLog');
})->middleware([
AdminCheckToken::class,
AdminCheckRole::class,

View File

@ -44,8 +44,10 @@ Route::group('weapp', function() {
Route::get('version', 'weapp.Version/lists');
//获取预览码
Route::get('preview', 'weapp.Version/preview');
//获取小程序上传日志
//获取小程序上传日志(会更新状态)
Route::get('upload/:key', 'weapp.Version/uploadLog');
//直接获取小程序上传日志(不更新状态)
Route::get('upload_log/:key', 'weapp.Version/getUploadLogOnly');

View File

@ -121,6 +121,11 @@ class AuthService extends BaseAdminService
$site_address = $authinfo['site_address'] ?? '';
$domain = request()->domain();
// 如果是站点域名不进行验证
$site_id = (new CoreSiteService())->getSiteIdByDomain($domain);
if (!empty($site_id)) return;
if (!empty($site_address) && strpos($domain, $site_address) !== false) return;
throw new CommonException("授权域名校验失败!请确保当前访问域名与授权码绑定的域名一致");

View File

@ -96,10 +96,9 @@ class NiucloudService extends BaseAdminService
* @return \app\model\sys\SysConfig|bool|\think\Model
*/
public function setLocalCloudCompileConfig($data){
$data = [
'baseUri' => $data['url'],
'isOpen' => 1,
'isOpen' => $data['is_open'],
];
return $this->core_config_service->setConfig(0,'LOCAL_CLOUD_COMPILE_CONFIG', $data);
}
@ -113,7 +112,7 @@ class NiucloudService extends BaseAdminService
$config = $this->core_config_service->getConfig(0,'LOCAL_CLOUD_COMPILE_CONFIG')['value'] ?? [];
return [
'baseUri' => $config['baseUri'] ?? '',
'isOpen' => 1,
'isOpen' => $config['isOpen'] ?? 0,
];
}

View File

@ -141,17 +141,30 @@ class WeappVersionService extends BaseAdminService
if (isset($build_log['data']) && isset($build_log['data'][0]) && is_array($build_log['data'][0])) {
$last = end($build_log['data'][0]);
file_put_contents(runtime_path() . 'debug_log.txt', date('Y-m-d H:i:s') . " | key: $key | last_code: {$last['code']} | last_percent: {$last['percent']}\n", FILE_APPEND);
if ($last['code'] == 0) {
(new WeappVersion())->update(['status' => CloudDict::APPLET_UPLOAD_FAIL, 'fail_reason' => $last['msg'] ?? '', 'update_time' => time()], ['task_key' => $key]);
$res = (new WeappVersion())->where(['task_key' => $key])->update(['status' => CloudDict::APPLET_UPLOAD_FAIL, 'fail_reason' => $last['msg'] ?? '', 'update_time' => time()]);
file_put_contents(runtime_path() . 'debug_log.txt', date('Y-m-d H:i:s') . " | fail update result: $res\n", FILE_APPEND);
return $build_log;
}
if ($last['percent'] == 100) {
(new WeappVersion())->update(['status' => CloudDict::APPLET_UPLOAD_SUCCESS, 'update_time' => time()], ['task_key' => $key]);
$res = (new WeappVersion())->where(['task_key' => $key])->update(['status' => CloudDict::APPLET_UPLOAD_SUCCESS, 'update_time' => time()]);
file_put_contents(runtime_path() . 'debug_log.txt', date('Y-m-d H:i:s') . " | success update result: $res\n", FILE_APPEND);
}
}
return $build_log;
}
/**
* 直接获取小程序上传日志(不更新状态)
* @param string $key
* @return null
*/
public function getUploadLogOnly(string $key)
{
return (new CoreWeappCloudService())->getWeappCompileLog($key);
}
/**
* 获取小程序上传日志
* @param string $key

View File

@ -23,6 +23,7 @@ use core\exception\AuthException;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\facade\Log;
/**
* 登录服务层
@ -78,8 +79,14 @@ class RegisterService extends BaseApiService
}
$member_id = ( new MemberService() )->add($data);
$data[ 'member_id' ] = $member_id;
event('MemberRegister', $data);
SetMemberNoJob::dispatch([ 'site_id' => $this->site_id, 'member_id' => $member_id ]);
try {
event('MemberRegister', $data);
} catch (\Exception $e) {
Log::write('MemberRegister event error');
Log::write($e->getTrace());
}
}
$member_info = $member_service->findMemberInfo([ 'member_id' => $member_id, 'site_id' => $this->site_id ]);
if ($member_info->isEmpty()) throw new AuthException('MEMBER_NOT_EXIST');//账号不存在

View File

@ -17,6 +17,7 @@ use core\exception\CommonException;
use core\util\niucloud\BaseNiucloudClient;
use core\util\niucloud\CloudService;
use think\facade\Cache;
use think\facade\Log;
/**
*/
@ -86,7 +87,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
'authorize_code' => $this->auth_code,
'timestamp' => $install_task['timestamp']
];
$response = (new CloudService())->httpPost('cloud/build?' . http_build_query($query), [
$response = (new CloudService(true))->httpPost('cloud/build?' . http_build_query($query), [
'multipart' => [
[
'name' => 'file',
@ -122,11 +123,11 @@ class CoreAddonCloudService extends CoreCloudBaseService
'authorize_code' => $this->auth_code,
'timestamp' => $install_task['timestamp']
];
$build_log = (new CloudService())->httpGet('cloud/get_build_logs?' . http_build_query($query));
$build_log = (new CloudService(true))->httpGet('cloud/get_build_logs?' . http_build_query($query));
if (isset($build_log['data']) && isset($build_log['data'][0]) && is_array($build_log['data'][0])) {
$last = end($build_log['data'][0]);
if ($last['percent'] == 100 && $last['code'] == 0) {
if ((int) $last['code'] == 0) {
(new CoreAddonInstallService($addon))->installExceptionHandle();
$install_task['error'] = 'ADDON_INSTALL_FAIL';
Cache::set('install_task', $install_task, 10);
@ -162,8 +163,8 @@ class CoreAddonCloudService extends CoreCloudBaseService
$cache = Cache::get('build_success_' . $addon);
if (is_null($cache)) {
$response = (new CloudService())->request('HEAD','cloud/build_download?' . http_build_query($query), [
if (is_null($cache) || !isset($cache[ 'index' ])) {
$response = (new CloudService(true))->request('HEAD','cloud/build_download?' . http_build_query($query), [
'headers' => ['Range' => 'bytes=0-']
]);
$length = $response->getHeader('Content-range');
@ -187,7 +188,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
$end = ($cache['index'] + 1) * $chunk_size;
$end = min($end, $cache['length']);
$response = (new CloudService())->request('GET','cloud/build_download?' . http_build_query($query), [
$response = (new CloudService(true))->request('GET','cloud/build_download?' . http_build_query($query), [
'headers' => ['Range' => "bytes={$start}-{$end}"]
]);
fwrite($zip_resource, $response->getBody());
@ -225,10 +226,18 @@ class CoreAddonCloudService extends CoreCloudBaseService
Cache::set('build_success_' . $addon, null);
} else {
Cache::set('build_success_' . $addon, null);
// 调用插件安装异常处理
(new CoreAddonInstallService($addon))->installExceptionHandle();
throw new CommonException('Zip decompression failed');
if (!isset($cache[ 'retry' ])) {
unlink($zip_file);
$cache['retry'] = 1;
unset($cache['index']);
Cache::set('build_success_' . $addon, $cache);
$log[] = [ 'code' => 1, 'msg' => '编译包解压失败,尝试重新下载', 'action' => '编译包解压失败,尝试重新下载', 'percent' => '100' ];
} else {
Cache::set('build_success_' . $addon, null);
// 调用插件安装异常处理
(new CoreAddonInstallService($addon))->installExceptionHandle();
throw new CommonException('Zip decompression failed');
}
}
}
}
@ -251,7 +260,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
'token' => $action_token['data']['token'] ?? ''
];
// 获取文件大小
$response = (new CloudService())->request('HEAD','cloud/download?' . http_build_query($query), [
$response = (new CloudService(false, 'http://oss.niucloud.com/'))->request('HEAD','cloud/download?' . http_build_query($query), [
'headers' => ['Range' => 'bytes=0-']
]);
$length = $response->getHeader('Content-range');
@ -263,7 +272,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
$zip_file = $temp_dir . $addon . '.zip';
$zip_resource = fopen($zip_file, 'w');
$response = (new CloudService())->request('GET','cloud/download?' . http_build_query($query), [
$response = (new CloudService(false, 'http://oss.niucloud.com/'))->request('GET','cloud/download?' . http_build_query($query), [
'headers' => ['Range' => "bytes=0-{$length}"]
]);
fwrite($zip_resource, $response->getBody());
@ -286,7 +295,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
'token' => $action_token['data']['token'] ?? ''
];
// 获取文件大小
$response = (new CloudService())->httpGet('cloud/upgrade?' . http_build_query($query));
$response = (new CloudService(false, 'http://oss.niucloud.com/'))->httpGet('cloud/upgrade?' . http_build_query($query));
$response['token'] = $query['token'];
return $response;
}
@ -309,7 +318,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
$chunk_size = 1 * 1024 * 1024;
if ($index == -1) {
$response = (new CloudService())->request('HEAD','cloud/upgrade/download?' . http_build_query($query), [
$response = (new CloudService(false, 'http://oss.niucloud.com/'))->request('HEAD','cloud/upgrade/download?' . http_build_query($query), [
'headers' => ['Range' => 'bytes=0-']
]);
$length = $response->getHeader('Content-range');
@ -327,7 +336,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
$end = ($index + 1) * $chunk_size;
$end = min($end, $length);
$response = (new CloudService())->request('GET','cloud/upgrade/download?' . http_build_query($query), [
$response = (new CloudService(false, 'http://oss.niucloud.com/'))->request('GET','cloud/upgrade/download?' . http_build_query($query), [
'headers' => ['Range' => "bytes={$start}-{$end}"]
]);
fwrite($zip_resource, $response->getBody());

View File

@ -107,9 +107,6 @@ class CoreCloudBuildService extends BaseCoreService
// 是否通过校验
$data[ 'is_pass' ] = !in_array(false, $check_res);
// 校验云编译服务
(new CloudService())->checkLocal();
return $data;
}
@ -199,10 +196,11 @@ class CoreCloudBuildService extends BaseCoreService
$this->build_task = [
'task_key' => $task_key,
'timestamp' => $query[ 'timestamp' ],
'checkLocal' => $param['checkLocal']
'checkLocal' => $param['checkLocal'],
'task_id' => $response['data']['task_id'] ?? '',
'auth_code' => $this->auth_code
];
Cache::set($this->cache_key, $this->build_task);
return $this->build_task;
}
@ -402,6 +400,18 @@ class CoreCloudBuildService extends BaseCoreService
public function clearTask()
{
if (!$this->build_task) return;
if (isset($this->build_task['task_id']) && !empty($this->build_task['task_id'])) {
try {
( new CloudService($this->build_task['checkLocal'] ?? false) )->httpPost('cloud/cancel', [
'json' => [
'task_id' => $this->build_task['task_id']
]
]);
} catch (\Throwable $e) {
}
}
$temp_dir = runtime_path() . 'backup' . DIRECTORY_SEPARATOR . 'cloud_build' . DIRECTORY_SEPARATOR . $this->build_task[ 'task_key' ] . DIRECTORY_SEPARATOR;
@del_target_dir($temp_dir, true);
Cache::set($this->cache_key, null);
@ -416,4 +426,250 @@ class CoreCloudBuildService extends BaseCoreService
{
return root_path() . 'addon' . DIRECTORY_SEPARATOR . $addon . DIRECTORY_SEPARATOR . 'package' . DIRECTORY_SEPARATOR;
}
/**
* SSE编译完成后PHP后台执行下载解压部署
* @param string $taskId 任务ID
* @param string $downloadUrl 下载链接
* @param string $authorizeCode 授权码
* @param string $timestamp 时间戳
* @return array
*/
public function startServerDownload(string $taskId, string $downloadUrl, string $authorizeCode, string $timestamp)
{
$taskKey = 'sse_build_' . $taskId;
$tempDir = runtime_path() . 'backup' . DIRECTORY_SEPARATOR . 'cloud_build' . DIRECTORY_SEPARATOR . $taskKey . DIRECTORY_SEPARATOR;
if (!is_dir($tempDir)) {
mkdir($tempDir, 0755, true);
}
$downloadInfo = [
'task_id' => $taskId,
'task_key' => $taskKey,
'download_url' => $downloadUrl,
'authorize_code' => $authorizeCode,
'timestamp' => $timestamp,
'temp_dir' => $tempDir,
'zip_file' => $tempDir . 'download.zip',
'chunk_size' => 1 * 1024 * 1024,
'status' => 'downloading',
'msg' => '准备下载...'
];
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return ['code' => 1, 'msg' => '初始化成功', 'data' => [
'task_key' => $taskKey,
'cache_key' => 'cloud_build_' . $taskKey,
'cache_exists' => Cache::has('cloud_build_' . $taskKey)
]];
}
/**
* 获取SSE编译后续操作的进度参考 buildSuccess 逻辑)
* @param string $taskId 任务ID
* @return array
*/
public function getSseBuildLog(string $taskId)
{
$taskKey = 'sse_build_' . $taskId;
$cacheKey = 'cloud_build_' . $taskKey;
$hasBefore = Cache::has($cacheKey);
$downloadInfo = Cache::get($cacheKey);
if (empty($downloadInfo)) {
return ['code' => 0, 'msg' => '任务不存在或已过期', 'status' => 'error', 'debug' => [
'task_id' => $taskId,
'task_key' => $taskKey,
'cache_key' => $cacheKey,
'cache_has_before' => $hasBefore
]];
}
$query = [
'authorize_code' => $downloadInfo['authorize_code'],
'timestamp' => $downloadInfo['timestamp']
];
try {
if (!isset($downloadInfo['index'])) {
$response = ( new CloudService(true) )->request('HEAD', 'cloud/build_download?' . http_build_query($query), [
'headers' => ['Range' => 'bytes=0-']
]);
$contentRange = $response->getHeader('Content-range');
$length = (int) explode("/", $contentRange[0])[1];
$chunkSize = $downloadInfo['chunk_size'];
$step = (int) ceil($length / $chunkSize);
$downloadInfo['index'] = 0;
$downloadInfo['length'] = $length;
$downloadInfo['step'] = $step;
$downloadInfo['downloaded_bytes'] = 0;
$downloadInfo['percent'] = 0;
$downloadInfo['msg'] = '开始下载...';
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return [
'code' => 1,
'status' => 'downloading',
'percent' => 0,
'downloaded_bytes' => 0,
'total_bytes' => $length,
'msg' => '开始下载...'
];
} else {
$zipFile = $downloadInfo['zip_file'];
$zipResource = fopen($zipFile, 'a');
if (($downloadInfo['index'] + 1) <= $downloadInfo['step']) {
$start = $downloadInfo['index'] * $downloadInfo['chunk_size'];
$end = ($downloadInfo['index'] + 1) * $downloadInfo['chunk_size'];
$end = min($end, $downloadInfo['length']);
$expectedBytes = $end - $start;
$response = ( new CloudService(true) )->request('GET', 'cloud/build_download?' . http_build_query($query), [
'headers' => ['Range' => "bytes={$start}-{$end}"]
]);
$body = $response->getBody();
$actualBytes = strlen($body);
$contentRange = $response->getHeader('Content-Range');
$contentRangeStr = is_array($contentRange) ? ($contentRange[0] ?? '') : $contentRange;
if ($actualBytes != $expectedBytes) {
$downloadInfo['downloaded_bytes'] = filesize($zipFile);
$downloadInfo['msg'] = "分片{$downloadInfo['index']}大小不符: 期望{$expectedBytes}, 实际{$actualBytes}";
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return [
'code' => 1,
'status' => 'downloading',
'percent' => $downloadInfo['percent'],
'downloaded_bytes' => $downloadInfo['downloaded_bytes'],
'total_bytes' => $downloadInfo['length'],
'msg' => $downloadInfo['msg'],
'debug' => [
'chunk_index' => $downloadInfo['index'],
'expected_bytes' => $expectedBytes,
'actual_bytes' => $actualBytes,
'content_range' => $contentRangeStr
]
];
}
fwrite($zipResource, $body);
fclose($zipResource);
$downloadInfo['index'] += 1;
$downloadInfo['downloaded_bytes'] = filesize($zipFile);
$downloadInfo['percent'] = round($downloadInfo['index'] / $downloadInfo['step'] * 100);
$downloadInfo['msg'] = '编译包下载中,已下载' . $downloadInfo['percent'] . '%';
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return [
'code' => 1,
'status' => 'downloading',
'percent' => $downloadInfo['percent'],
'downloaded_bytes' => $downloadInfo['downloaded_bytes'],
'total_bytes' => $downloadInfo['length'],
'msg' => $downloadInfo['msg']
];
} else {
fclose($zipResource);
$zip = new \ZipArchive();
$zipOpenResult = $zip->open($zipFile);
if ($zipOpenResult === true) {
$extractDir = $downloadInfo['temp_dir'] . 'download' . DIRECTORY_SEPARATOR;
dir_mkdir($extractDir);
$zipContents = [];
for ($i = 0; $i < $zip->numFiles; $i++) {
$zipContents[] = $zip->getNameIndex($i);
}
$zip->extractTo($extractDir);
$zip->close();
$downloadInfo['msg'] = '解压成功,文件数:' . count($zipContents);
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
$tempDir = $downloadInfo['temp_dir'];
if (is_dir($tempDir . 'download' . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR . 'admin')) {
@del_target_dir(public_path() . 'admin', true);
}
if (is_dir($tempDir . 'download' . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR . 'web')) {
@del_target_dir(public_path() . 'web', true);
}
if (is_dir($tempDir . 'download' . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR . 'wap')) {
@del_target_dir(public_path() . 'wap', true);
}
$excludeFiles = ['favicon.ico', 'niucloud.ico'];
dir_copy($tempDir . 'download', root_path(), exclude_files: $excludeFiles);
$this->buildResultAnalysis('success');
$downloadInfo['status'] = 'completed';
$downloadInfo['percent'] = 100;
$downloadInfo['msg'] = '部署完成';
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return [
'code' => 1,
'status' => 'completed',
'percent' => 100,
'downloaded_bytes' => $downloadInfo['downloaded_bytes'],
'total_bytes' => $downloadInfo['length'],
'msg' => '部署完成'
];
} else {
if (!isset($downloadInfo['retry'])) {
unlink($zipFile);
$downloadInfo['retry'] = 1;
unset($downloadInfo['index']);
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return [
'code' => 1,
'status' => 'downloading',
'percent' => 0,
'downloaded_bytes' => 0,
'total_bytes' => $downloadInfo['length'] ?? 0,
'msg' => '编译包解压失败,尝试重新下载',
'debug' => [
'zip_file' => $zipFile,
'zip_size' => file_exists($zipFile) ? filesize($zipFile) : 'not exists',
'zip_open_result' => $zipOpenResult,
'extract_dir' => $downloadInfo['temp_dir'] . 'download' . DIRECTORY_SEPARATOR,
'temp_dir' => $downloadInfo['temp_dir']
]
];
} else {
$downloadInfo['status'] = 'error';
$downloadInfo['msg'] = '编译包解压失败';
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return [
'code' => 0,
'status' => 'error',
'percent' => $downloadInfo['percent'] ?? 0,
'msg' => '编译包解压失败'
];
}
}
}
}
} catch (\Exception $e) {
$downloadInfo['status'] = 'error';
$downloadInfo['msg'] = $e->getMessage();
Cache::set('cloud_build_' . $taskKey, $downloadInfo, 7200);
return ['code' => 0, 'msg' => $e->getMessage(), 'status' => 'error'];
}
}
}

View File

@ -64,7 +64,7 @@ class CoreWeappCloudService extends CoreCloudBaseService
*/
public function uploadWeapp(array $data)
{
if (strpos($this->config[ 'base_url' ], 'https://') === false) throw new CommonException('CURR_SITE_IS_NOT_OPEN_SSL');
// if (strpos($this->config[ 'base_url' ], 'https://') === false) throw new CommonException('CURR_SITE_IS_NOT_OPEN_SSL');
$this->site_id = $data[ 'site_id' ] ?? 0;
if (empty($this->config[ 'app_id' ])) throw new CommonException('WEAPP_APPID_EMPTY');
@ -126,7 +126,8 @@ class CoreWeappCloudService extends CoreCloudBaseService
if (isset($response[ 'code' ]) && $response[ 'code' ] == 0) throw new CommonException($response[ 'msg' ]);
return [ 'key' => $query[ 'timestamp' ] ];
$task_id = $response[ 'data' ][ 'task_id' ] ?? $query[ 'timestamp' ];
return [ 'key' => $task_id ];
}
/**
@ -306,14 +307,13 @@ class CoreWeappCloudService extends CoreCloudBaseService
/**
* 获取小程序编译日志
* @param string $timestamp
* @param string $taskId 任务ID (格式: authorize_code_timestamp)
* @return \Psr\Http\Message\ResponseInterface
*/
public function getWeappCompileLog(string $timestamp)
public function getWeappCompileLog(string $taskId)
{
$query = [
'authorize_code' => $this->auth_code,
'timestamp' => $timestamp
'task_id' => $taskId
];
return ( new CloudService(true) )->httpGet('cloud/get_weapp_logs?' . http_build_query($query));
}

View File

@ -0,0 +1,2 @@
ALTER TABLE weapp_version
CHANGE COLUMN task_key task_key varchar(255) NOT NULL DEFAULT '' COMMENT '上传任务key';

View File

@ -1,6 +1,6 @@
<?php
return [
'version' => '1.2.3',
'code' => '202605060001'
'version' => '1.2.4',
'code' => '202606060001'
];

View File

@ -15,12 +15,12 @@ class CloudService
{
use HasHttpRequests;
private $baseUri = 'http://oss.niucloud.com/';
private $baseUri = 'http://go.site.niucloud.com/';
public $is_connected = false;
public function __construct($checkLocal = false, $local_cloud_compile = '') {
$this->baseUri = 'http://' . gethostbyname('oss.niucloud.com') . ':8000/';
if (!empty($local_cloud_compile)) $this->baseUri = $local_cloud_compile;
if ($checkLocal) $this->is_connected = $this->checkLocal($local_cloud_compile);
}
@ -31,9 +31,10 @@ class CloudService
$baseUri = $local_cloud_compile;
} else {
$local_cloud_compile_config = (new CoreConfigService())->getConfig(0, 'LOCAL_CLOUD_COMPILE_CONFIG')['value'] ?? [];
$baseUri = $local_cloud_compile_config['baseUri'] ?? '';
if (empty($baseUri)){
throw new CommonException('CONNECT_FAIL', 601);
$isOpen = $local_cloud_compile_config['isOpen'] ?? 1;
if ($isOpen){
$baseUri = $local_cloud_compile_config['baseUri'] ?? '';
}
}
@ -45,7 +46,6 @@ class CloudService
$is_connected = true;
}
} catch (\Throwable $e) {
throw new CommonException('CONNECT_FAIL', 601);
}
return $is_connected;
}

View File

@ -1,4 +1,4 @@
/.htaccess
upload
nginx.htaccess
.htaccess
.htaccess

View File

@ -0,0 +1 @@
import{d as l,r as d,u as i,o as p,c as m,a as t,b as u,e as x,w as v,f,E as h,p as b,g as I,h as g,i as S,t as w}from"./index-8eead49b.js";/* empty css */import{_ as B}from"./error-54aee623.js";import{_ as k}from"./_plugin-vue_export-helper-c27b6911.js";const o=e=>(b("data-v-4f4088b5"),e=e(),I(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[240px]",src:B})],-1)),N={class:"text-left ml-[100px]"},V=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误",-1)),R=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"},"哎呀,出错了!您访问的页面不存在...",-1)),U=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"},"尝试检查URL的错误然后点击浏览器刷新按钮。",-1)),$={class:"mt-[40px]"},D=l({__name:"404",setup(e){let s=null;const a=d(5),c=i();return s=setInterval(()=>{a.value===0?(clearInterval(s),c.go(-1)):a.value--},1e3),p(()=>{s&&clearInterval(s)}),(_,n)=>{const r=h;return g(),m("div",y,[t("div",C,[u(_.$slots,"content",{},()=>[E],!0),t("div",N,[V,R,U,t("div",$,[x(r,{class:"bottom",onClick:n[0]||(n[0]=L=>f(c).go(-1))},{default:v(()=>[S(w(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const A=k(D,[["__scopeId","data-v-4f4088b5"]]);export{A as default};

View File

@ -1 +0,0 @@
import{d as l,r as d,u as i,o as p,c as u,a as t,b as m,e as x,w as v,f,E as h,p as b,g,h as I,i as w,t as S}from"./index-9c445bb6.js";/* empty css */import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";const k=""+new URL("error-ab7e4004.png",import.meta.url).href,o=e=>(b("data-v-4f4088b5"),e=e(),g(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[240px]",src:k})],-1)),N={class:"text-left ml-[100px]"},R=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误",-1)),U=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"},"哎呀,出错了!您访问的页面不存在...",-1)),V=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"},"尝试检查URL的错误然后点击浏览器刷新按钮。",-1)),L={class:"mt-[40px]"},$=l({__name:"404",setup(e){let s=null;const a=d(5),n=i();return s=setInterval(()=>{a.value===0?(clearInterval(s),n.go(-1)):a.value--},1e3),p(()=>{s&&clearInterval(s)}),(r,c)=>{const _=h;return I(),u("div",y,[t("div",C,[m(r.$slots,"content",{},()=>[E],!0),t("div",N,[R,U,V,t("div",L,[x(_,{class:"bottom",onClick:c[0]||(c[0]=D=>f(n).go(-1))},{default:v(()=>[w(S(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const z=B($,[["__scopeId","data-v-4f4088b5"]]);export{z as default};

View File

@ -1 +0,0 @@
import{dD as f}from"./index-9c445bb6.js";export{f as default};

View File

@ -0,0 +1 @@
import{dY as f}from"./index-8eead49b.js";export{f as default};

View File

@ -0,0 +1 @@
.upload-demo[data-v-d439b536]{width:100%;border:1px dashed #dcdcdc;border-radius:6px;padding:20px;text-align:center}.copy-icon[data-v-d439b536]{cursor:pointer;margin-left:8px;color:#606266;font-size:18px}.copy-icon[data-v-d439b536]:hover{color:#409eff}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import z from"./VerifySlide-02eb59d1.js";import g from"./VerifyPoints-e2bb084a.js";import{P as k,r as o,m as w,bc as T,Y as V,Z as B,h as p,c as u,a as c,i as N,C as y,y as d,v as C,bb as P,x as v}from"./index-8eead49b.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-b4a6dc9f.js";const O={name:"Vue2Verify",components:{VerifySlide:z,VerifyPoints:g},props:{captchaType:{type:String,required:!0},figure:{type:Number},arith:{type:Number},mode:{type:String,default:"pop"},vSpace:{type:Number},explain:{type:String},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},blockSize:{type:Object},barSize:{type:Object}},setup(m){const{captchaType:i,figure:e,arith:t,mode:n,vSpace:h,explain:f,imgSize:R,blockSize:W,barSize:Y}=k(m),a=o(!1),r=o(void 0),s=o(void 0),l=o({}),S=w(()=>n.value=="pop"?a.value:!0),b=()=>{l.value.refresh&&l.value.refresh()},x=()=>{a.value=!1,b()},_=()=>{n.value=="pop"&&(a.value=!0)};return T(()=>{switch(i.value){case"blockPuzzle":r.value="2",s.value="VerifySlide";break;case"clickWord":r.value="",s.value="VerifyPoints";break}}),{clickShow:a,verifyType:r,componentType:s,instance:l,showBox:S,closeBox:x,show:_}}},D={key:0,class:"verifybox-top"},E=c("i",{class:"iconfont icon-close"},null,-1),q=[E];function I(m,i,e,t,n,h){return V((p(),u("div",{class:v(e.mode=="pop"?"mask":"")},[c("div",{class:v(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(p(),u("div",D,[N(" 请完成安全验证 "),c("span",{class:"verifybox-close",onClick:i[0]||(i[0]=(...f)=>t.closeBox&&t.closeBox(...f))},q)])):y("",!0),c("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(p(),C(P(t.componentType),{key:0,captchaType:e.captchaType,type:t.verifyType,figure:e.figure,arith:e.arith,mode:e.mode,vSpace:e.vSpace,explain:e.explain,imgSize:e.imgSize,blockSize:e.blockSize,barSize:e.barSize,ref:"instance"},null,8,["captchaType","type","figure","arith","mode","vSpace","explain","imgSize","blockSize","barSize"])):y("",!0)],4)],6)],2)),[[B,t.showBox]])}const J=j(O,[["render",I]]);export{J as default};

View File

@ -1 +0,0 @@
import z from"./VerifySlide-81048fa6.js";import g from"./VerifyPoints-8c6fc7b1.js";import{P as k,r as o,m as w,bb as T,Y as V,Z as B,h as p,c as u,a as c,i as N,C as y,y as d,v as C,bc as P,x as v}from"./index-9c445bb6.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-47d400bc.js";const O={name:"Vue2Verify",components:{VerifySlide:z,VerifyPoints:g},props:{captchaType:{type:String,required:!0},figure:{type:Number},arith:{type:Number},mode:{type:String,default:"pop"},vSpace:{type:Number},explain:{type:String},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},blockSize:{type:Object},barSize:{type:Object}},setup(m){const{captchaType:i,figure:e,arith:t,mode:n,vSpace:h,explain:f,imgSize:R,blockSize:W,barSize:Y}=k(m),a=o(!1),r=o(void 0),s=o(void 0),l=o({}),S=w(()=>n.value=="pop"?a.value:!0),b=()=>{l.value.refresh&&l.value.refresh()},x=()=>{a.value=!1,b()},_=()=>{n.value=="pop"&&(a.value=!0)};return T(()=>{switch(i.value){case"blockPuzzle":r.value="2",s.value="VerifySlide";break;case"clickWord":r.value="",s.value="VerifyPoints";break}}),{clickShow:a,verifyType:r,componentType:s,instance:l,showBox:S,closeBox:x,show:_}}},D={key:0,class:"verifybox-top"},E=c("i",{class:"iconfont icon-close"},null,-1),q=[E];function I(m,i,e,t,n,h){return V((p(),u("div",{class:v(e.mode=="pop"?"mask":"")},[c("div",{class:v(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(p(),u("div",D,[N(" 请完成安全验证 "),c("span",{class:"verifybox-close",onClick:i[0]||(i[0]=(...f)=>t.closeBox&&t.closeBox(...f))},q)])):y("",!0),c("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(p(),C(P(t.componentType),{key:0,captchaType:e.captchaType,type:t.verifyType,figure:e.figure,arith:e.arith,mode:e.mode,vSpace:e.vSpace,explain:e.explain,imgSize:e.imgSize,blockSize:e.blockSize,barSize:e.barSize,ref:"instance"},null,8,["captchaType","type","figure","arith","mode","vSpace","explain","imgSize","blockSize","barSize"])):y("",!0)],4)],6)],2)),[[B,t.showBox]])}const J=j(O,[["render",I]]);export{J as default};

View File

@ -1 +0,0 @@
import{r as F,a as M,b as K,c as Y}from"./index-47d400bc.js";import{P as Z,bd as G,r as s,q as m,aZ as X,h as H,c as I,a as l,y as A,Y as Q,Z as U,F as $,V as ee,t as q,ax as te}from"./index-9c445bb6.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";const ie={name:"VerifyPoints",props:{mode:{type:String,default:"fixed"},captchaType:{type:String},vSpace:{type:Number,default:5},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},barSize:{type:Object,default(){return{width:"310px",height:"40px"}}}},setup(N,f){const{mode:_,captchaType:e,vSpace:L,imgSize:R,barSize:c}=Z(N),{proxy:n}=G(),h=s(""),z=s(3),p=m([]),a=m([]),o=s(1),O=s(""),w=m([]),v=s(""),u=m({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=m([]),d=s(""),b=s(void 0),x=s(void 0),j=s(!0),C=s(!0),V=()=>{p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),te(()=>{const{imgHeight:i,imgWidth:t,barHeight:g,barWidth:r}=F(n);u.imgHeight=i,u.imgWidth=t,u.barHeight=g,u.barWidth=r,n.$parent.$emit("ready",n)})};X(()=>{V(),n.$el.onselectstart=function(){return!1}});const S=s(null),D=i=>{if(a.push(k(S,i)),o.value==z.value){o.value=P(k(S,i));const t=J(a,u);a.length=0,a.push(...t),setTimeout(()=>{const g=h.value?M(v.value+"---"+JSON.stringify(a),h.value):v.value+"---"+JSON.stringify(a),r={captchaType:e.value,captcha_code:h.value?M(JSON.stringify(a),h.value):JSON.stringify(a),captcha_key:v.value};K(r).then(W=>{W.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,T()},1500),n.$parent.$emit("success",{captchaVerification:g})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{T()},700))})},400)}o.value<z.value&&(o.value=P(k(S,i)))},k=function(i,t){const g=t.offsetX,r=t.offsetY;return{x:g,y:r}},P=function(i){return y.push(Object.assign({},i)),o.value+1},T=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),d.value="验证失败",j.value=!0};function B(){const i={captchaType:e.value};Y(i).then(t=>{t.code==1?(O.value=t.data.originalImageBase64,v.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const J=function(i,t){return i.map(r=>{const W=Math.round(310*r.x/parseInt(t.imgWidth)),E=Math.round(155*r.y/parseInt(t.imgHeight));return{x:W,y:E}})};return{secretKey:h,checkNum:z,fontPos:p,checkPosArr:a,num:o,pointBackImgBase:O,pointTextList:w,backToken:v,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:V,canvas:S,canvasClick:D,getMousePos:k,createPoint:P,refresh:T,getPictrue:B,pointTransfrom:J}}},ne={style:{position:"relative"}},se={class:"verify-img-out"},oe=l("i",{class:"iconfont icon-refresh"},null,-1),re=[oe],ce=["src"],le={class:"verify-msg"};function he(N,f,_,e,L,R){return H(),I("div",ne,[l("div",se,[l("div",{class:"verify-img-panel",style:A({width:e.setSize.imgWidth,height:e.setSize.imgHeight,"background-size":e.setSize.imgWidth+" "+e.setSize.imgHeight,"margin-bottom":_.vSpace+"px"})},[Q(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:f[0]||(f[0]=(...c)=>e.refresh&&e.refresh(...c))},re,512),[[U,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:f[1]||(f[1]=c=>e.bindingClick?e.canvasClick(c):void 0)},null,8,ce),(H(!0),I($,null,ee(e.tempPoints,(c,n)=>(H(),I("div",{key:n,class:"point-area",style:A({"background-color":"#1abd6c",color:"#fff","z-index":9999,width:"20px",height:"20px","text-align":"center","line-height":"20px","border-radius":"50%",position:"absolute",top:parseInt(c.y-10)+"px",left:parseInt(c.x-10)+"px"})},q(n+1),5))),128))],4)]),l("div",{class:"verify-bar-area",style:A({width:e.setSize.imgWidth,color:this.barAreaColor,"border-color":this.barAreaBorderColor,"line-height":this.barSize.height})},[l("span",le,q(e.text),1)],4)])}const fe=ae(ie,[["render",he]]);export{fe as default};

View File

@ -0,0 +1 @@
import{r as F,a as M,b as K,c as Y}from"./index-b4a6dc9f.js";import{P as Z,bd as G,r as s,q as m,aZ as X,h as H,c as I,a as l,y as A,Y as Q,Z as U,F as $,V as ee,t as q,ax as te}from"./index-8eead49b.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";const ie={name:"VerifyPoints",props:{mode:{type:String,default:"fixed"},captchaType:{type:String},vSpace:{type:Number,default:5},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},barSize:{type:Object,default(){return{width:"310px",height:"40px"}}}},setup(N,f){const{mode:_,captchaType:e,vSpace:L,imgSize:R,barSize:c}=Z(N),{proxy:n}=G(),h=s(""),z=s(3),p=m([]),a=m([]),o=s(1),O=s(""),w=m([]),v=s(""),u=m({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=m([]),d=s(""),b=s(void 0),x=s(void 0),j=s(!0),C=s(!0),V=()=>{p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),te(()=>{const{imgHeight:i,imgWidth:t,barHeight:g,barWidth:r}=F(n);u.imgHeight=i,u.imgWidth=t,u.barHeight=g,u.barWidth=r,n.$parent.$emit("ready",n)})};X(()=>{V(),n.$el.onselectstart=function(){return!1}});const S=s(null),D=i=>{if(a.push(k(S,i)),o.value==z.value){o.value=P(k(S,i));const t=J(a,u);a.length=0,a.push(...t),setTimeout(()=>{const g=h.value?M(v.value+"---"+JSON.stringify(a),h.value):v.value+"---"+JSON.stringify(a),r={captchaType:e.value,captcha_code:h.value?M(JSON.stringify(a),h.value):JSON.stringify(a),captcha_key:v.value};K(r).then(W=>{W.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,T()},1500),n.$parent.$emit("success",{captchaVerification:g})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{T()},700))})},400)}o.value<z.value&&(o.value=P(k(S,i)))},k=function(i,t){const g=t.offsetX,r=t.offsetY;return{x:g,y:r}},P=function(i){return y.push(Object.assign({},i)),o.value+1},T=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),d.value="验证失败",j.value=!0};function B(){const i={captchaType:e.value};Y(i).then(t=>{t.code==1?(O.value=t.data.originalImageBase64,v.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const J=function(i,t){return i.map(r=>{const W=Math.round(310*r.x/parseInt(t.imgWidth)),E=Math.round(155*r.y/parseInt(t.imgHeight));return{x:W,y:E}})};return{secretKey:h,checkNum:z,fontPos:p,checkPosArr:a,num:o,pointBackImgBase:O,pointTextList:w,backToken:v,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:V,canvas:S,canvasClick:D,getMousePos:k,createPoint:P,refresh:T,getPictrue:B,pointTransfrom:J}}},ne={style:{position:"relative"}},se={class:"verify-img-out"},oe=l("i",{class:"iconfont icon-refresh"},null,-1),re=[oe],ce=["src"],le={class:"verify-msg"};function he(N,f,_,e,L,R){return H(),I("div",ne,[l("div",se,[l("div",{class:"verify-img-panel",style:A({width:e.setSize.imgWidth,height:e.setSize.imgHeight,"background-size":e.setSize.imgWidth+" "+e.setSize.imgHeight,"margin-bottom":_.vSpace+"px"})},[Q(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:f[0]||(f[0]=(...c)=>e.refresh&&e.refresh(...c))},re,512),[[U,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:f[1]||(f[1]=c=>e.bindingClick?e.canvasClick(c):void 0)},null,8,ce),(H(!0),I($,null,ee(e.tempPoints,(c,n)=>(H(),I("div",{key:n,class:"point-area",style:A({"background-color":"#1abd6c",color:"#fff","z-index":9999,width:"20px",height:"20px","text-align":"center","line-height":"20px","border-radius":"50%",position:"absolute",top:parseInt(c.y-10)+"px",left:parseInt(c.x-10)+"px"})},q(n+1),5))),128))],4)]),l("div",{class:"verify-bar-area",style:A({width:e.setSize.imgWidth,color:this.barAreaColor,"border-color":this.barAreaBorderColor,"line-height":this.barSize.height})},[l("span",le,q(e.text),1)],4)])}const fe=ae(ie,[["render",he]]);export{fe as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{d as $,k as q,u as j,r as u,aZ as F,b6 as I,o as R,h as w,c as y,e as a,w as s,a as n,t as o,f as e,s as t,i as r,F as U,v as z,B as L,aH as M,aI as D,E as G,a_ as H,a$ as K,b0 as P,K as Q,b1 as Z,a8 as J}from"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as O}from"./wechat-cb4e6ea9.js";import{a as X}from"./wxoplatform-105b4bfa.js";const Y={class:"main-container"},ee={class:"flex justify-between items-center"},te={class:"text-page-title"},ae={class:"p-[20px]"},se={class:"panel-title !text-sm"},ne={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"text-[14px] font-[700]"},ie={class:"text-[#999]"},pe={class:"mt-[20px] mb-[40px] h-[32px]"},re={class:"text-[14px] font-[700]"},_e={class:"text-[#999]"},de={class:"mt-[20px] mb-[40px] h-[32px]"},me={class:"flex justify-center"},ue={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},he={class:"mt-[22px] text-center"},fe={class:"text-[12px]"},Be=$({__name:"access",setup(ve){const k=q(),_=j(),C=k.meta.title,h=u("/channel/wechat"),d=u(""),f=u({}),v=u({}),b=async()=>{await O().then(({data:l})=>{f.value=l,d.value=l.qr_code})};F(async()=>{await b(),await I().then(({data:l})=>{v.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&b()})}),R(()=>{document.removeEventListener("visibilitychange",()=>{})});const E=l=>{window.open(l,"_blank")},A=l=>{_.push({path:h.value})},S=()=>{X().then(({data:l})=>{window.open(l)})};return(l,c)=>{const m=M,B=D,i=G,x=H,V=K,g=P,N=Q,T=Z,W=J;return w(),y("div",Y,[a(W,{class:"card !border-none",shadow:"never"},{default:s(()=>[n("div",ee,[n("span",te,o(e(C)),1)]),a(B,{modelValue:h.value,"onUpdate:modelValue":c[0]||(c[0]=p=>h.value=p),class:"my-[20px]",onTabChange:A},{default:s(()=>[a(m,{label:e(t)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),a(m,{label:e(t)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),a(m,{label:e(t)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),a(m,{label:e(t)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),n("div",ae,[n("h3",se,o(e(t)("wechatInlet")),1),a(T,null,{default:s(()=>[a(g,{span:20},{default:s(()=>[a(V,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:s(()=>[a(x,null,{title:s(()=>[n("p",ne,o(e(t)("wechatAttestation")),1)]),description:s(()=>[n("span",oe,o(e(t)("wechatAttestation1")),1),n("div",le,[a(i,{type:"primary",onClick:c[1]||(c[1]=p=>E("https://mp.weixin.qq.com/"))},{default:s(()=>[r(o(e(t)("clickAccess")),1)]),_:1})])]),_:1}),a(x,null,{title:s(()=>[n("p",ce,o(e(t)("wechatSetting")),1)]),description:s(()=>[n("span",ie,o(e(t)("wechatSetting1")),1),n("div",pe,[v.value.app_id&&v.value.app_secret?(w(),y(U,{key:0},[a(i,{type:"primary",onClick:c[2]||(c[2]=p=>e(_).push("/channel/wechat/config"))},{default:s(()=>[r(o(f.value.app_id?e(t)("seeConfig"):e(t)("clickSetting")),1)]),_:1}),a(i,{type:"primary",plain:"",onClick:S},{default:s(()=>[r(o(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWechat")),1)]),_:1})],64)):(w(),z(i,{key:1,type:"primary",onClick:c[3]||(c[3]=p=>e(_).push("/channel/wechat/config"))},{default:s(()=>[r(o(e(t)("clickSetting")),1)]),_:1}))])]),_:1}),a(x,null,{title:s(()=>[n("p",re,o(e(t)("wechatAccess")),1)]),description:s(()=>[n("span",_e,o(e(t)("wechatAccess")),1),n("div",de,[a(i,{type:"primary",plain:"",onClick:c[4]||(c[4]=p=>e(_).push("/channel/wechat/course"))},{default:s(()=>[r(o(e(t)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),a(g,{span:4},{default:s(()=>[n("div",me,[a(N,{class:"w-[180px] h-[180px]",src:d.value?e(L)(d.value):""},{error:s(()=>[n("div",ue,[n("span",null,o(d.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),n("div",he,[n("p",fe,o(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Be as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{d as V,k as B,u as N,r as x,aZ as S,h as T,c as j,e as o,w as s,a as t,t as n,f as e,s as a,i as h,B as I,aH as R,aI as $,E as q,a_ as D,a$ as F,b0 as H,K,b1 as M,a8 as P}from"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as Q}from"./aliapp-72a6151f.js";const U={class:"main-container"},Z={class:"flex justify-between items-center"},z={class:"text-page-title"},G={class:"p-[20px]"},J={class:"panel-title !text-sm"},L={class:"text-[14px] font-[700]"},O={class:"text-[#999]"},W={class:"mt-[20px] mb-[40px] h-[32px]"},X={class:"text-[14px] font-[700]"},Y={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},at=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),ot={class:"text-[14px] font-[700]"},nt={class:"text-[#999]"},lt={class:"flex justify-center"},ct={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pt={class:"mt-[22px] text-center"},it={class:"text-[12px]"},bt=V({__name:"access",setup(_t){const f=B(),d=N(),v=f.meta.title,_=x("/channel/aliapp"),p=x("");S(async()=>{const c=await Q();p.value=c.data.qr_code});const w=c=>{window.open(c,"_blank")},b=c=>{d.push({path:_.value})};return(c,l)=>{const g=R,C=$,m=q,i=D,E=F,u=H,y=K,k=M,A=P;return T(),j("div",U,[o(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",Z,[t("span",z,n(e(v)),1)]),o(C,{modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[o(g,{label:e(a)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",G,[t("h3",J,n(e(a)("weappInlet")),1),o(k,null,{default:s(()=>[o(u,{span:20},{default:s(()=>[o(E,{active:4,direction:"vertical"},{default:s(()=>[o(i,null,{title:s(()=>[t("p",L,n(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",O,n(e(a)("weappAttest")),1),t("div",W,[o(m,{type:"primary",onClick:l[1]||(l[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[h(n(e(a)("clickAccess")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",X,n(e(a)("weappSetting")),1)]),description:s(()=>[t("span",Y,n(e(a)("emplace")),1),t("div",tt,[o(m,{type:"primary",plain:"",onClick:l[2]||(l[2]=r=>e(d).push("/channel/aliapp/config"))},{default:s(()=>[h(n(e(a)("weappSettingBtn")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",et,n(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",st,n(e(a)("releaseCourse")),1),at]),_:1}),o(i,null,{title:s(()=>[t("p",ot,n(e(a)("completeAccess")),1)]),description:s(()=>[t("span",nt,n(e(a)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),o(u,{span:4},{default:s(()=>[t("div",lt,[o(y,{class:"w-[180px] h-[180px]",src:p.value?e(I)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,n(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,n(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{bt as default};

View File

@ -0,0 +1 @@
import{d as B,k as T,u as $,r as c,aZ as I,b6 as M,o as R,h as W,c as q,e,w as t,a as s,t as o,f as n,s as a,i as u,aH as A,aI as L,E as U,a_ as j,a$ as D,b0 as F,b1 as G,a8 as H}from"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as P}from"./wechat-cb4e6ea9.js";const Z={class:"main-container"},z={class:"flex justify-between items-center"},J={class:"text-page-title"},K={class:"p-[20px]"},O={class:"panel-title !text-sm"},Q={class:"text-[14px] font-[700]"},X={class:"text-[#999]"},Y={class:"mt-[20px] mb-[40px] h-[32px]"},tt={class:"text-[14px] font-[700]"},et={class:"mt-[20px] mb-[40px] h-[32px]"},nt={class:"text-[14px] font-[700]"},st={class:"mt-[20px] mb-[40px] h-[32px]"},dt=B({__name:"access",setup(at){const f=T(),_=$(),x=f.meta.title,r=c("/channel/app"),b=c(""),g=c({}),w=c({}),h=async()=>{await P().then(({data:l})=>{g.value=l,b.value=l.qr_code})};I(async()=>{await h(),await M().then(({data:l})=>{w.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&h()})}),R(()=>{document.removeEventListener("visibilitychange",()=>{})});const y=l=>{window.open(l,"_blank")},C=l=>{_.push({path:r.value})};return(l,i)=>{const v=A,E=L,d=U,m=j,k=D,V=F,S=G,N=H;return W(),q("div",Z,[e(N,{class:"card !border-none",shadow:"never"},{default:t(()=>[s("div",z,[s("span",J,o(n(x)),1)]),e(E,{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=p=>r.value=p),class:"my-[20px]",onTabChange:C},{default:t(()=>[e(v,{label:n(a)("accessFlow"),name:"/channel/app"},null,8,["label"]),e(v,{label:n(a)("versionManage"),name:"/channel/app/version"},null,8,["label"])]),_:1},8,["modelValue"]),s("div",K,[s("h3",O,o(n(a)("appInlet")),1),e(S,null,{default:t(()=>[e(V,{span:20},{default:t(()=>[e(k,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:t(()=>[e(m,null,{title:t(()=>[s("p",Q,o(n(a)("uniappApp")),1)]),description:t(()=>[s("span",X,o(n(a)("appAttestation1")),1),s("div",Y,[e(d,{type:"primary",onClick:i[1]||(i[1]=p=>y("https://dcloud.io/"))},{default:t(()=>[u(o(n(a)("toCreate")),1)]),_:1})])]),_:1}),e(m,null,{title:t(()=>[s("p",tt,o(n(a)("appSetting")),1)]),description:t(()=>[s("div",et,[e(d,{type:"primary",onClick:i[2]||(i[2]=p=>n(_).push("/channel/app/config"))},{default:t(()=>[u(o(n(a)("settingInfo")),1)]),_:1})])]),_:1}),e(m,null,{title:t(()=>[s("p",nt,o(n(a)("versionManage")),1)]),description:t(()=>[s("div",st,[e(d,{type:"primary",plain:"",onClick:i[3]||(i[3]=p=>n(_).push("/channel/app/version"))},{default:t(()=>[u(o(n(a)("releaseVersion")),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1})])]),_:1})])}}});export{dt as default};

View File

@ -1 +0,0 @@
import{d as B,k as T,u as $,r as c,aZ as I,b6 as M,o as R,h as W,c as q,e,w as t,a as s,t as o,f as n,s as a,i as u,aH as A,aI as L,E as U,a_ as j,a$ as D,b0 as F,b1 as G,a8 as H}from"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as P}from"./wechat-7dace022.js";const Z={class:"main-container"},z={class:"flex justify-between items-center"},J={class:"text-page-title"},K={class:"p-[20px]"},O={class:"panel-title !text-sm"},Q={class:"text-[14px] font-[700]"},X={class:"text-[#999]"},Y={class:"mt-[20px] mb-[40px] h-[32px]"},tt={class:"text-[14px] font-[700]"},et={class:"mt-[20px] mb-[40px] h-[32px]"},nt={class:"text-[14px] font-[700]"},st={class:"mt-[20px] mb-[40px] h-[32px]"},dt=B({__name:"access",setup(at){const f=T(),_=$(),x=f.meta.title,r=c("/channel/app"),b=c(""),g=c({}),w=c({}),h=async()=>{await P().then(({data:l})=>{g.value=l,b.value=l.qr_code})};I(async()=>{await h(),await M().then(({data:l})=>{w.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&h()})}),R(()=>{document.removeEventListener("visibilitychange",()=>{})});const y=l=>{window.open(l,"_blank")},C=l=>{_.push({path:r.value})};return(l,i)=>{const v=A,E=L,d=U,m=j,k=D,V=F,S=G,N=H;return W(),q("div",Z,[e(N,{class:"card !border-none",shadow:"never"},{default:t(()=>[s("div",z,[s("span",J,o(n(x)),1)]),e(E,{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=p=>r.value=p),class:"my-[20px]",onTabChange:C},{default:t(()=>[e(v,{label:n(a)("accessFlow"),name:"/channel/app"},null,8,["label"]),e(v,{label:n(a)("versionManage"),name:"/channel/app/version"},null,8,["label"])]),_:1},8,["modelValue"]),s("div",K,[s("h3",O,o(n(a)("appInlet")),1),e(S,null,{default:t(()=>[e(V,{span:20},{default:t(()=>[e(k,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:t(()=>[e(m,null,{title:t(()=>[s("p",Q,o(n(a)("uniappApp")),1)]),description:t(()=>[s("span",X,o(n(a)("appAttestation1")),1),s("div",Y,[e(d,{type:"primary",onClick:i[1]||(i[1]=p=>y("https://dcloud.io/"))},{default:t(()=>[u(o(n(a)("toCreate")),1)]),_:1})])]),_:1}),e(m,null,{title:t(()=>[s("p",tt,o(n(a)("appSetting")),1)]),description:t(()=>[s("div",et,[e(d,{type:"primary",onClick:i[2]||(i[2]=p=>n(_).push("/channel/app/config"))},{default:t(()=>[u(o(n(a)("settingInfo")),1)]),_:1})])]),_:1}),e(m,null,{title:t(()=>[s("p",nt,o(n(a)("versionManage")),1)]),description:t(()=>[s("div",st,[e(d,{type:"primary",plain:"",onClick:i[3]||(i[3]=p=>n(_).push("/channel/app/version"))},{default:t(()=>[u(o(n(a)("releaseVersion")),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1})])]),_:1})])}}});export{dt as default};

View File

@ -1 +0,0 @@
import{d as V,k as B,u as N,r as x,aZ as S,h as T,c as j,e as o,w as s,a as t,t as n,f as e,s as a,i as h,B as I,aH as R,aI as $,E as q,a_ as D,a$ as F,b0 as H,K,b1 as M,a8 as P}from"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as Q}from"./aliapp-a7785a47.js";const U={class:"main-container"},Z={class:"flex justify-between items-center"},z={class:"text-page-title"},G={class:"p-[20px]"},J={class:"panel-title !text-sm"},L={class:"text-[14px] font-[700]"},O={class:"text-[#999]"},W={class:"mt-[20px] mb-[40px] h-[32px]"},X={class:"text-[14px] font-[700]"},Y={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},at=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),ot={class:"text-[14px] font-[700]"},nt={class:"text-[#999]"},lt={class:"flex justify-center"},ct={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pt={class:"mt-[22px] text-center"},it={class:"text-[12px]"},bt=V({__name:"access",setup(_t){const f=B(),d=N(),v=f.meta.title,_=x("/channel/aliapp"),p=x("");S(async()=>{const c=await Q();p.value=c.data.qr_code});const w=c=>{window.open(c,"_blank")},b=c=>{d.push({path:_.value})};return(c,l)=>{const g=R,C=$,m=q,i=D,E=F,u=H,y=K,k=M,A=P;return T(),j("div",U,[o(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",Z,[t("span",z,n(e(v)),1)]),o(C,{modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[o(g,{label:e(a)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",G,[t("h3",J,n(e(a)("weappInlet")),1),o(k,null,{default:s(()=>[o(u,{span:20},{default:s(()=>[o(E,{active:4,direction:"vertical"},{default:s(()=>[o(i,null,{title:s(()=>[t("p",L,n(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",O,n(e(a)("weappAttest")),1),t("div",W,[o(m,{type:"primary",onClick:l[1]||(l[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[h(n(e(a)("clickAccess")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",X,n(e(a)("weappSetting")),1)]),description:s(()=>[t("span",Y,n(e(a)("emplace")),1),t("div",tt,[o(m,{type:"primary",plain:"",onClick:l[2]||(l[2]=r=>e(d).push("/channel/aliapp/config"))},{default:s(()=>[h(n(e(a)("weappSettingBtn")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",et,n(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",st,n(e(a)("releaseCourse")),1),at]),_:1}),o(i,null,{title:s(()=>[t("p",ot,n(e(a)("completeAccess")),1)]),description:s(()=>[t("span",nt,n(e(a)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),o(u,{span:4},{default:s(()=>[t("div",lt,[o(y,{class:"w-[180px] h-[180px]",src:p.value?e(I)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,n(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,n(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{bt as default};

View File

@ -1 +0,0 @@
import{d as $,k as q,u as j,r as u,aZ as F,b6 as I,o as R,h as w,c as y,e as a,w as s,a as n,t as o,f as e,s as t,i as r,F as U,v as z,B as L,aH as M,aI as D,E as G,a_ as H,a$ as K,b0 as P,K as Q,b1 as Z,a8 as J}from"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as O}from"./wechat-7dace022.js";import{a as X}from"./wxoplatform-2ed6c17b.js";const Y={class:"main-container"},ee={class:"flex justify-between items-center"},te={class:"text-page-title"},ae={class:"p-[20px]"},se={class:"panel-title !text-sm"},ne={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"text-[14px] font-[700]"},ie={class:"text-[#999]"},pe={class:"mt-[20px] mb-[40px] h-[32px]"},re={class:"text-[14px] font-[700]"},_e={class:"text-[#999]"},de={class:"mt-[20px] mb-[40px] h-[32px]"},me={class:"flex justify-center"},ue={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},he={class:"mt-[22px] text-center"},fe={class:"text-[12px]"},Be=$({__name:"access",setup(ve){const k=q(),_=j(),C=k.meta.title,h=u("/channel/wechat"),d=u(""),f=u({}),v=u({}),b=async()=>{await O().then(({data:l})=>{f.value=l,d.value=l.qr_code})};F(async()=>{await b(),await I().then(({data:l})=>{v.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&b()})}),R(()=>{document.removeEventListener("visibilitychange",()=>{})});const E=l=>{window.open(l,"_blank")},A=l=>{_.push({path:h.value})},S=()=>{X().then(({data:l})=>{window.open(l)})};return(l,c)=>{const m=M,B=D,i=G,x=H,V=K,g=P,N=Q,T=Z,W=J;return w(),y("div",Y,[a(W,{class:"card !border-none",shadow:"never"},{default:s(()=>[n("div",ee,[n("span",te,o(e(C)),1)]),a(B,{modelValue:h.value,"onUpdate:modelValue":c[0]||(c[0]=p=>h.value=p),class:"my-[20px]",onTabChange:A},{default:s(()=>[a(m,{label:e(t)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),a(m,{label:e(t)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),a(m,{label:e(t)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),a(m,{label:e(t)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),n("div",ae,[n("h3",se,o(e(t)("wechatInlet")),1),a(T,null,{default:s(()=>[a(g,{span:20},{default:s(()=>[a(V,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:s(()=>[a(x,null,{title:s(()=>[n("p",ne,o(e(t)("wechatAttestation")),1)]),description:s(()=>[n("span",oe,o(e(t)("wechatAttestation1")),1),n("div",le,[a(i,{type:"primary",onClick:c[1]||(c[1]=p=>E("https://mp.weixin.qq.com/"))},{default:s(()=>[r(o(e(t)("clickAccess")),1)]),_:1})])]),_:1}),a(x,null,{title:s(()=>[n("p",ce,o(e(t)("wechatSetting")),1)]),description:s(()=>[n("span",ie,o(e(t)("wechatSetting1")),1),n("div",pe,[v.value.app_id&&v.value.app_secret?(w(),y(U,{key:0},[a(i,{type:"primary",onClick:c[2]||(c[2]=p=>e(_).push("/channel/wechat/config"))},{default:s(()=>[r(o(f.value.app_id?e(t)("seeConfig"):e(t)("clickSetting")),1)]),_:1}),a(i,{type:"primary",plain:"",onClick:S},{default:s(()=>[r(o(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWechat")),1)]),_:1})],64)):(w(),z(i,{key:1,type:"primary",onClick:c[3]||(c[3]=p=>e(_).push("/channel/wechat/config"))},{default:s(()=>[r(o(e(t)("clickSetting")),1)]),_:1}))])]),_:1}),a(x,null,{title:s(()=>[n("p",re,o(e(t)("wechatAccess")),1)]),description:s(()=>[n("span",_e,o(e(t)("wechatAccess")),1),n("div",de,[a(i,{type:"primary",plain:"",onClick:c[4]||(c[4]=p=>e(_).push("/channel/wechat/course"))},{default:s(()=>[r(o(e(t)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),a(g,{span:4},{default:s(()=>[n("div",me,[a(N,{class:"w-[180px] h-[180px]",src:d.value?e(L)(d.value):""},{error:s(()=>[n("div",ue,[n("span",null,o(d.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),n("div",he,[n("p",fe,o(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Be as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{b5 as t}from"./index-8eead49b.js";function r(e){return t.get("relay/pages",{params:e})}function o(){return t.get("relay/init")}function n(e){return t.get("diy/list",{params:e})}function u(e){return t.post("relay/batch_set",e,{showSuccessMessage:!0})}function l(e){return t.post("relay/add",e,{showSuccessMessage:!0})}function c(e){return t.put(`relay/edit/${e.id}`,e,{showSuccessMessage:!0})}function y(e){return t.get(`relay/detail/${e}`)}function i(){return t.get("relay/share")}function g(e){return t.put(`relay/close/${e}`,{showSuccessMessage:!0})}function d(e){return t.delete(`relay/delete/${e}`,{showSuccessMessage:!0})}function f(){return t.get("relay/goods_of_select_source")}function R(e,a){return t.get(`relay/goods_of_select/${e}`,{params:a})}function h(e){return t.get("relay/stat/total",{params:e})}function S(e){return t.get("relay/stat/day",{params:e})}function p(e){return t.get("relay/stat/hour",{params:e})}function w(e){return t.get("relay/stat/channel",{params:e})}function M(e){return t.get("relay/diy/goods",{params:e})}function _(e){return t.get("relay/receive_list",{params:e})}function m(e){return t.post("relay/code/import",e,{showSuccessMessage:!0})}function C(e){return t.post("relay/code/delete",e,{showSuccessMessage:!0})}function $(e){return t.post("relay/code/clear",e,{showSuccessMessage:!0})}export{y as a,_ as b,$ as c,m as d,u as e,n as f,M as g,f as h,R as i,i as j,o as k,c as l,l as m,r as n,d as o,g as p,S as q,C as r,w as s,h as t,p as u};

View File

@ -0,0 +1 @@
import{b5 as t}from"./index-8eead49b.js";function s(e){return t.get("friend_help/pages",{params:e})}function i(){return t.get("friend_help/init")}function o(e){return t.get("diy/list",{params:e})}function d(e){return t.post("friend_help/batch_set",e,{showSuccessMessage:!0})}function u(e){return t.post("friend_help/add",e,{showSuccessMessage:!0})}function l(e){return t.put(`friend_help/edit/${e.id}`,e,{showSuccessMessage:!0})}function a(e){return t.get(`friend_help/detail/${e}`)}function c(){return t.get("friend_help/share")}function p(e){return t.put(`friend_help/close/${e}`,{showSuccessMessage:!0})}function f(e){return t.delete(`friend_help/delete/${e}`,{showSuccessMessage:!0})}function g(){return t.get("friend_help/goods_of_select_source")}function h(e,n){return t.get(`friend_help/goods_of_select/${e}`,{params:n})}function _(e){return t.get("friend_help/stat/total",{params:e})}function H(e){return t.get("friend_help/stat/day",{params:e})}function F(e){return t.get("friend_help/stat/hour",{params:e})}function S(e){return t.get("friend_help/stat/channel",{params:e})}function w(e){return t.get("friend_help/diy/goods",{params:e})}function M(e){return t.get("friend_help/receive_list",{params:e})}function m(e){return t.post("friend_help/code/import",e,{showSuccessMessage:!0})}function y(e){return t.post("friend_help/code/delete",e,{showSuccessMessage:!0})}function C(e){return t.post("friend_help/code/clear",e,{showSuccessMessage:!0})}export{a,o as b,M as c,C as d,m as e,y as f,w as g,d as h,g as i,h as j,c as k,i as l,l as m,u as n,s as o,f as p,p as q,H as r,S as s,_ as t,F as u};

View File

@ -0,0 +1 @@
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-6b999cc5.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./goods_default-247a7f2b.js";import"./active-a803f547.js";export{o as default};

View File

@ -0,0 +1 @@
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-5aee9bbd.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./goods_default-995568ac.js";import"./active-f3a52d93.js";export{o as default};

View File

@ -0,0 +1 @@
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-20981cd7.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./goods_default-664bb559.js";import"./active-132d6527.js";export{o as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{b5 as t}from"./index-8eead49b.js";function l(e){return t.get("seckill/lists",{params:e})}function c(e){return t.get(`seckill/info/${e}`)}function i(e){return t.post("seckill/add",e,{showSuccessMessage:!0})}function o(e){return t.post("seckill/close",e,{showSuccessMessage:!0})}function n(e){return t.put(`seckill/edit/${e.id}`,e,{showSuccessMessage:!0})}function u(e){return t.post("seckill/delete",e,{showSuccessMessage:!0})}function r(){return t.get("seckill/init")}function a(){return t.get("seckill/select")}function k(e){return t.get("seckill/stat/total",{params:e})}function g(e){return t.get("seckill/stat/day",{params:e})}function S(e){return t.get("seckill/stat/hour",{params:e})}function d(e){return t.get("seckill/stat/channel",{params:e})}function f(e){return t.get("seckill/time/select",{params:e})}function h(e){return t.get("seckill/activeGoods/select",{params:e})}function p(e){return t.get("seckill/goods/receive_list",{params:e})}function w(e){return t.post("seckill/goods/code/import",e,{showSuccessMessage:!0})}function M(e){return t.post("seckill/goods/code/delete",e,{showSuccessMessage:!0})}function m(e){return t.post("seckill/goods/code/clear",e,{showSuccessMessage:!0})}export{p as a,m as b,w as c,c as d,r as e,n as f,a as g,i as h,l as i,u as j,o as k,g as l,d as m,f as n,h as o,k as p,S as q,M as s};

View File

@ -0,0 +1 @@
import{b5 as n}from"./index-8eead49b.js";function a(t){return n.get("pintuan/pages",{params:t})}function s(){return n.get("pintuan/init")}function i(t){return n.get("diy/list",{params:t})}function o(t){return n.post("pintuan/batch_set",t,{showSuccessMessage:!0})}function r(t){return n.post("pintuan/add",t,{showSuccessMessage:!0})}function c(t){return n.put(`pintuan/edit/${t.id}`,t,{showSuccessMessage:!0})}function g(t){return n.get(`pintuan/detail/${t}`)}function p(){return n.get("pintuan/share")}function d(t){return n.put(`pintuan/close/${t}`,{showSuccessMessage:!0})}function f(t){return n.delete(`pintuan/delete/${t}`,{showSuccessMessage:!0})}function l(){return n.get("pintuan/goods_of_select_source")}function h(t,e){return n.get(`pintuan/goods_of_select/${t}`,{params:e})}function P(t){return n.get("pintuan/stat/total",{params:t})}function S(t){return n.get("pintuan/stat/day",{params:t})}function w(t){return n.get("pintuan/stat/hour",{params:t})}function M(t){return n.get("pintuan/stat/channel",{params:t})}function _(t){return n.get("pintuan/diy/goods",{params:t})}function m(t){return n.get("pintuan/receive_list",{params:t})}function y(t){return n.post("pintuan/code/import",t,{showSuccessMessage:!0})}function C(t){return n.post("pintuan/code/delete",t,{showSuccessMessage:!0})}function $(t){return n.post("pintuan/code/clear",t,{showSuccessMessage:!0})}export{g as a,i as b,m as c,$ as d,y as e,o as f,_ as g,l as h,h as i,p as j,s as k,c as l,r as m,a as n,f as o,C as p,d as q,S as r,M as s,P as t,w as u};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
const e="活动名称",t="请输入活动名称",l="活动规则说明",c="请输入活动规则说明",a="活动开始时间",s="请输入活动开始时间",o="活动结束时间",i="请输入活动结束时间",r="排序",d="请输入排序",n="活动状态",m="创建时间",k="请输入创建时间",T="更新时间",h="请输入更新时间",P="添加秒杀活动",p="编辑秒杀活动",u="确定要删除该数据吗?",D="请选择开始时间",N="请选择结束时间",R={seckillName:e,seckillNamePlaceholder:t,seckillRemark:l,seckillRemarkPlaceholder:c,startTime:a,startTimePlaceholder:s,endTime:o,endTimePlaceholder:i,sort:r,sortPlaceholder:d,status:n,createTime:m,createTimePlaceholder:k,updateTime:T,updateTimePlaceholder:h,addSeckill:P,updateSeckill:p,seckillDeleteTips:u,startDate:D,endDate:N};export{P as addSeckill,m as createTime,k as createTimePlaceholder,R as default,N as endDate,o as endTime,i as endTimePlaceholder,u as seckillDeleteTips,e as seckillName,t as seckillNamePlaceholder,l as seckillRemark,c as seckillRemarkPlaceholder,r as sort,d as sortPlaceholder,D as startDate,a as startTime,s as startTimePlaceholder,n as status,p as updateSeckill,T as updateTime,h as updateTimePlaceholder};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
input[data-v-88eb0e7f]::-webkit-outer-spin-button,input[data-v-88eb0e7f]::-webkit-inner-spin-button{-webkit-appearance:none!important;-moz-appearance:none!important;-o-appearance:none!important;appearance:none!important;margin:0}input[type=number][data-v-88eb0e7f]{-webkit-appearance:textfield;-moz-appearance:textfield;-o-appearance:textfield;appearance:textfield}.sku-form-item-wrap[data-v-88eb0e7f] .el-form-item__content{margin-left:0!important}.sku_list[data-v-88eb0e7f] .cell{overflow:initial!important}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
#AddressMap[data-v-4566f2d4]{border:1px solid #e4e4e4;border-radius:4px}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as o}from"./add-address.vue_vue_type_script_setup_true_lang-aadfa2f5.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import"./member-9b1f7f51.js";export{o as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.member-table[data-v-3e94f3c8] .cell{padding:0 12px!important}#TxMap[data-v-3e94f3c8]{border:1px solid #e4e4e4;border-radius:4px}.dialog-footer[data-v-3e94f3c8]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.input-width[data-v-3e94f3c8]{width:500px}.fixed-footer-wrap .fixed-footer[data-v-3e94f3c8]{z-index:1999!important}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.spec-wrap[data-v-f9075805]{flex:1}.spec-wrap .spec-edit-list .spec-item[data-v-f9075805]{background:#f7f7f7;padding:20px;margin-bottom:20px;position:relative;border-radius:6px}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap[data-v-f9075805]{padding:25px 30px 0;position:relative}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul[data-v-f9075805]{display:flex;flex-wrap:wrap;flex:1;align-items:baseline}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li[data-v-f9075805]{margin:0 10px 10px 0;position:relative}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li .input-width[data-v-f9075805]{width:200px}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li .icon[data-v-f9075805]{width:32px;padding:0;display:none;position:absolute;top:-12px;right:-20px;cursor:pointer}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li:hover .icon[data-v-f9075805]{display:block}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap .add-spec-value[data-v-f9075805]{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap .box[data-v-f9075805]{position:absolute;top:0;left:10px;width:20px;height:40px;border:1px solid #b8b9bd;border-top:none;border-right:none}.spec-wrap .spec-edit-list .spec-item .del-spec[data-v-f9075805]{border:none;position:absolute;top:10px;right:10px;display:none;cursor:pointer}.spec-wrap .spec-edit-list .spec-item:hover .del-spec[data-v-f9075805]{display:block}.el-input__suffix[data-v-f9075805]{cursor:pointer}.el-table__row[data-v-f9075805]:focus{outline:none!important}.add-spec[data-v-f9075805]{margin-bottom:16px}.batch-operation-sku[data-v-f9075805]{display:flex;margin-bottom:16px;background-color:#fff;flex-wrap:nowrap;align-items:center}.batch-operation-sku label[data-v-f9075805]{font-size:14px;margin-right:10px}.batch-operation-sku .set-spec-select[data-v-f9075805]{margin-right:10px;max-width:130px}.batch-operation-sku .set-input[data-v-f9075805]{max-width:130px;min-width:60px;margin-right:10px}.editor-width[data-v-f9075805]{width:990px}.sku-table[data-v-f9075805] :focus{outline:none}.sku-form-item-wrap[data-v-f9075805] .el-form-item__content{margin-left:0!important}.sku-table[data-v-f9075805] .el-table__cell .cell{overflow:initial!important}.fixed-footer[data-v-f9075805]{z-index:4}.edui-default .edui-editor{z-index:1!important}.el-cascader__tags.is-validate{right:30px!important}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.spec-wrap[data-v-80bd9974]{flex:1}.spec-wrap .spec-edit-list .spec-item[data-v-80bd9974]{background:#f7f7f7;padding:20px;margin-bottom:20px;position:relative;border-radius:6px}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap[data-v-80bd9974]{padding:25px 30px 0;position:relative}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul[data-v-80bd9974]{display:flex;flex-wrap:wrap;flex:1;align-items:baseline}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li[data-v-80bd9974]{margin:0 10px 10px 0;position:relative}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li .input-width[data-v-80bd9974]{width:200px}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li .icon[data-v-80bd9974]{width:32px;padding:0;display:none;position:absolute;top:-12px;right:-20px;cursor:pointer}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li:hover .icon[data-v-80bd9974]{display:block}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap .add-spec-value[data-v-80bd9974]{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap .box[data-v-80bd9974]{position:absolute;top:0;left:10px;width:20px;height:40px;border:1px solid #b8b9bd;border-top:none;border-right:none}.spec-wrap .spec-edit-list .spec-item .del-spec[data-v-80bd9974]{border:none;position:absolute;top:10px;right:10px;display:none;cursor:pointer}.spec-wrap .spec-edit-list .spec-item:hover .del-spec[data-v-80bd9974]{display:block}.el-input__suffix[data-v-80bd9974]{cursor:pointer}.el-table__row[data-v-80bd9974]:focus{outline:none!important}.add-spec[data-v-80bd9974]{margin-bottom:16px}.batch-operation-sku[data-v-80bd9974]{display:flex;margin-bottom:16px;background-color:#fff;flex-wrap:nowrap;align-items:center}.batch-operation-sku label[data-v-80bd9974]{font-size:14px;margin-right:10px}.batch-operation-sku .set-spec-select[data-v-80bd9974]{margin-right:10px;max-width:130px}.batch-operation-sku .set-input[data-v-80bd9974]{max-width:130px;min-width:60px;margin-right:10px}.editor-width[data-v-80bd9974]{width:990px}.sku-table[data-v-80bd9974] :focus{outline:none}.sku-form-item-wrap[data-v-80bd9974] .el-form-item__content{margin-left:0!important}.sku-table[data-v-80bd9974] .el-table__cell .cell{overflow:initial!important}.fixed-footer[data-v-80bd9974]{z-index:4}.edui-default .edui-editor{z-index:1!important}.el-cascader__tags.is-validate{right:30px!important}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.spec-wrap[data-v-b423242d]{flex:1}.spec-wrap .spec-edit-list .spec-item[data-v-b423242d]{background:#f7f7f7;padding:20px;margin-bottom:20px;position:relative;border-radius:6px}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap[data-v-b423242d]{padding:25px 30px 0;position:relative}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul[data-v-b423242d]{display:flex;flex-wrap:wrap;flex:1;align-items:baseline}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li[data-v-b423242d]{margin:0 10px 10px 0;position:relative}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li .input-width[data-v-b423242d]{width:200px}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li .icon[data-v-b423242d]{width:32px;padding:0;display:none;position:absolute;top:-12px;right:-20px;cursor:pointer}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap ul li:hover .icon[data-v-b423242d]{display:block}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap .add-spec-value[data-v-b423242d]{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.spec-wrap .spec-edit-list .spec-item .spec-value-wrap .box[data-v-b423242d]{position:absolute;top:0;left:10px;width:20px;height:40px;border:1px solid #b8b9bd;border-top:none;border-right:none}.spec-wrap .spec-edit-list .spec-item .del-spec[data-v-b423242d]{border:none;position:absolute;top:10px;right:10px;display:none;cursor:pointer}.spec-wrap .spec-edit-list .spec-item:hover .del-spec[data-v-b423242d]{display:block}.el-input__suffix[data-v-b423242d]{cursor:pointer}.el-table__row[data-v-b423242d]:focus{outline:none!important}.add-spec[data-v-b423242d]{margin-bottom:16px}.batch-operation-sku[data-v-b423242d]{display:flex;margin-bottom:16px;background-color:#fff;flex-wrap:nowrap;align-items:center}.batch-operation-sku label[data-v-b423242d]{font-size:14px;margin-right:10px}.batch-operation-sku .set-spec-select[data-v-b423242d]{margin-right:10px;max-width:130px}.batch-operation-sku .set-input[data-v-b423242d]{max-width:130px;min-width:60px;margin-right:10px}.editor-width[data-v-b423242d]{width:990px}.sku-table[data-v-b423242d] :focus{outline:none}.sku-form-item-wrap[data-v-b423242d] .el-form-item__content{margin-left:0!important}.sku-table[data-v-b423242d] .el-table__cell .cell{overflow:initial!important}.fixed-footer[data-v-b423242d]{z-index:4}.edui-default .edui-editor{z-index:1!important}.el-cascader__tags.is-validate{right:30px!important}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as o}from"./add-member.vue_vue_type_script_setup_true_lang-1bc15965.js";import"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./member-0fb4c483.js";export{o as default};

View File

@ -0,0 +1 @@
import{_ as o}from"./add-member.vue_vue_type_script_setup_true_lang-d9484a2a.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./member-9b1f7f51.js";export{o as default};

View File

@ -1 +0,0 @@
import{d as I,r as m,q as L,m as R,s as o,h as N,v as M,w as d,a as j,e as s,i as k,t as C,f as t,Y as z,bY as A,L as O,M as T,N as Y,E as K,U as S,a2 as Z}from"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{p as G,z as J,A as Q}from"./member-0fb4c483.js";const W={class:"dialog-footer"},me=I({__name:"add-member",emits:["complete"],setup(X,{expose:$,emit:x}){const p=m(!1),i=m(!1),f=m(!1);let b="",c="";const w=m(!0),v=m(!0),g=m(!0),_={member_id:"",nickname:"",member_no:"",init_member_no:"",mobile:"",password:"",password_copy:""},r=L({..._}),y=m(),P=R(()=>({member_no:[{required:!0,message:o("memberNoPlaceholder"),trigger:"blur"},{validator:B,trigger:"blur"}],mobile:[{required:!0,message:o("mobilePlaceholder"),trigger:"blur"},{validator:D,trigger:"blur"}],password:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"}],password_copy:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"},{validator:E,trigger:"blur"}]})),D=(n,e,a)=>{e&&!/^1[3-9]\d{9}$/.test(e)?a(new Error(o("mobileHint"))):a()},E=(n,e,a)=>{e!=r.password?a(o("doubleCipherHint")):a()},B=(n,e,a)=>{e&&!/^[0-9a-zA-Z]*$/g.test(e)?a(new Error(o("memberNoHint"))):a()},U=async()=>{await J().then(n=>{c=n.data}).catch(()=>{})},q=async n=>{if(i.value||!n)return;const e=Q;await n.validate(async a=>{if(a){if(i.value=!0,f.value)return;f.value=!0,e(r).then(V=>{i.value=!1,f.value=!1,p.value=!1,x("complete")}).catch(()=>{i.value=!1,f.value=!1})}})};return $({showDialog:p,setFormData:async(n=null)=>{if(i.value=!0,Object.assign(r,_),b=o("addMember"),n){b=o("updateMember");const e=await(await G(n.member_id)).data;e&&Object.keys(r).forEach(a=>{e[a]!=null&&(r[a]=e[a])})}else await U(),r.member_no=c,r.init_member_no=c;i.value=!1}}),(n,e)=>{const a=O,u=T,V=Y,h=K,F=S,H=Z;return N(),M(F,{modelValue:p.value,"onUpdate:modelValue":e[14]||(e[14]=l=>p.value=l),title:t(b),width:"500px","destroy-on-close":!0},{footer:d(()=>[j("span",W,[s(h,{onClick:e[12]||(e[12]=l=>p.value=!1)},{default:d(()=>[k(C(t(o)("cancel")),1)]),_:1}),s(h,{type:"primary",loading:i.value,onClick:e[13]||(e[13]=l=>q(y.value))},{default:d(()=>[k(C(t(o)("confirm")),1)]),_:1},8,["loading"])])]),default:d(()=>[z((N(),M(V,{model:r,"label-width":"90px",ref_key:"formRef",ref:y,rules:t(P),class:"page-form"},{default:d(()=>[s(u,{label:t(o)("memberNo"),prop:"member_no"},{default:d(()=>[s(a,{modelValue:r.member_no,"onUpdate:modelValue":e[0]||(e[0]=l=>r.member_no=l),modelModifiers:{trim:!0},clearable:"",maxlength:"20",placeholder:t(o)("memberNoPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("mobile"),prop:"mobile"},{default:d(()=>[s(a,{modelValue:r.mobile,"onUpdate:modelValue":e[1]||(e[1]=l=>r.mobile=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("mobilePlaceholder"),maxlength:"11",onKeyup:e[2]||(e[2]=l=>t(A)(l)),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("nickname")},{default:d(()=>[s(a,{modelValue:r.nickname,"onUpdate:modelValue":e[3]||(e[3]=l=>r.nickname=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("nickNamePlaceholder"),class:"input-width",maxlength:"10","show-word-limit":"",readonly:w.value,onClick:e[4]||(e[4]=l=>w.value=!1),onBlur:e[5]||(e[5]=l=>w.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("password"),prop:"password"},{default:d(()=>[s(a,{modelValue:r.password,"onUpdate:modelValue":e[6]||(e[6]=l=>r.password=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:v.value,onClick:e[7]||(e[7]=l=>v.value=!1),onBlur:e[8]||(e[8]=l=>v.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("passwordCopy"),prop:"password_copy"},{default:d(()=>[s(a,{modelValue:r.password_copy,"onUpdate:modelValue":e[9]||(e[9]=l=>r.password_copy=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:g.value,onClick:e[10]||(e[10]=l=>g.value=!1),onBlur:e[11]||(e[11]=l=>g.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[H,i.value]])]),_:1},8,["modelValue","title"])}}});export{me as _};

View File

@ -0,0 +1 @@
import{d as I,r as m,q as L,m as R,s as o,h as N,v as M,w as d,a as j,e as s,i as k,t as C,f as t,Y as z,b_ as A,L as O,M as T,N as K,E as S,U as Y,a2 as Z}from"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{p as G,z as J,A as Q}from"./member-9b1f7f51.js";const W={class:"dialog-footer"},me=I({__name:"add-member",emits:["complete"],setup(X,{expose:$,emit:x}){const p=m(!1),i=m(!1),f=m(!1);let b="",c="";const w=m(!0),v=m(!0),g=m(!0),_={member_id:"",nickname:"",member_no:"",init_member_no:"",mobile:"",password:"",password_copy:""},r=L({..._}),y=m(),P=R(()=>({member_no:[{required:!0,message:o("memberNoPlaceholder"),trigger:"blur"},{validator:B,trigger:"blur"}],mobile:[{required:!0,message:o("mobilePlaceholder"),trigger:"blur"},{validator:D,trigger:"blur"}],password:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"}],password_copy:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"},{validator:E,trigger:"blur"}]})),D=(n,e,a)=>{e&&!/^1[3-9]\d{9}$/.test(e)?a(new Error(o("mobileHint"))):a()},E=(n,e,a)=>{e!=r.password?a(o("doubleCipherHint")):a()},B=(n,e,a)=>{e&&!/^[0-9a-zA-Z]*$/g.test(e)?a(new Error(o("memberNoHint"))):a()},U=async()=>{await J().then(n=>{c=n.data}).catch(()=>{})},q=async n=>{if(i.value||!n)return;const e=Q;await n.validate(async a=>{if(a){if(i.value=!0,f.value)return;f.value=!0,e(r).then(V=>{i.value=!1,f.value=!1,p.value=!1,x("complete")}).catch(()=>{i.value=!1,f.value=!1})}})};return $({showDialog:p,setFormData:async(n=null)=>{if(i.value=!0,Object.assign(r,_),b=o("addMember"),n){b=o("updateMember");const e=await(await G(n.member_id)).data;e&&Object.keys(r).forEach(a=>{e[a]!=null&&(r[a]=e[a])})}else await U(),r.member_no=c,r.init_member_no=c;i.value=!1}}),(n,e)=>{const a=O,u=T,V=K,h=S,F=Y,H=Z;return N(),M(F,{modelValue:p.value,"onUpdate:modelValue":e[14]||(e[14]=l=>p.value=l),title:t(b),width:"500px","destroy-on-close":!0},{footer:d(()=>[j("span",W,[s(h,{onClick:e[12]||(e[12]=l=>p.value=!1)},{default:d(()=>[k(C(t(o)("cancel")),1)]),_:1}),s(h,{type:"primary",loading:i.value,onClick:e[13]||(e[13]=l=>q(y.value))},{default:d(()=>[k(C(t(o)("confirm")),1)]),_:1},8,["loading"])])]),default:d(()=>[z((N(),M(V,{model:r,"label-width":"90px",ref_key:"formRef",ref:y,rules:t(P),class:"page-form"},{default:d(()=>[s(u,{label:t(o)("memberNo"),prop:"member_no"},{default:d(()=>[s(a,{modelValue:r.member_no,"onUpdate:modelValue":e[0]||(e[0]=l=>r.member_no=l),modelModifiers:{trim:!0},clearable:"",maxlength:"20",placeholder:t(o)("memberNoPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("mobile"),prop:"mobile"},{default:d(()=>[s(a,{modelValue:r.mobile,"onUpdate:modelValue":e[1]||(e[1]=l=>r.mobile=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("mobilePlaceholder"),maxlength:"11",onKeyup:e[2]||(e[2]=l=>t(A)(l)),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("nickname")},{default:d(()=>[s(a,{modelValue:r.nickname,"onUpdate:modelValue":e[3]||(e[3]=l=>r.nickname=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("nickNamePlaceholder"),class:"input-width",maxlength:"10","show-word-limit":"",readonly:w.value,onClick:e[4]||(e[4]=l=>w.value=!1),onBlur:e[5]||(e[5]=l=>w.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("password"),prop:"password"},{default:d(()=>[s(a,{modelValue:r.password,"onUpdate:modelValue":e[6]||(e[6]=l=>r.password=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:v.value,onClick:e[7]||(e[7]=l=>v.value=!1),onBlur:e[8]||(e[8]=l=>v.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("passwordCopy"),prop:"password_copy"},{default:d(()=>[s(a,{modelValue:r.password_copy,"onUpdate:modelValue":e[9]||(e[9]=l=>r.password_copy=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:g.value,onClick:e[10]||(e[10]=l=>g.value=!1),onBlur:e[11]||(e[11]=l=>g.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[H,i.value]])]),_:1},8,["modelValue","title"])}}});export{me as _};

View File

@ -0,0 +1 @@
import{_ as o}from"./add-reserve.vue_vue_type_script_setup_true_lang-ce3450d6.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import"./vipcard-3a4e22ff.js";export{o as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as o}from"./add-table.vue_vue_type_script_setup_true_lang-62bcb74b.js";import"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./tools-4c0eb235.js";export{o as default};

View File

@ -0,0 +1 @@
import{_ as o}from"./add-table.vue_vue_type_script_setup_true_lang-61d11aef.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./tools-13037a78.js";export{o as default};

View File

@ -0,0 +1 @@
import{d as L,u as N,r as c,q as k,m as E,h as p,v as _,w as o,a as b,Y as x,f as t,t as f,s as n,e as d,i as B,aj as z,L as U,E as q,ak as F,U as P,a2 as j}from"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{k as G,l as I}from"./tools-13037a78.js";const le=L({__name:"add-table",setup(M,{expose:h}){const g=N(),m=c(!1),s=c(""),e=k({loading:!0,data:[],searchParam:{table_name:"",table_content:""}}),v=E(()=>e.data.filter(a=>!s.value||a.Name.toLowerCase().includes(s.value.toLowerCase())||a.Comment.toLowerCase().includes(s.value.toLowerCase()))),u=()=>{e.loading=!0,G().then(a=>{e.loading=!1,e.data=a.data}).catch(()=>{e.loading=!1})};u();const w=a=>{const l=a.Name;e.loading=!0,I({table_name:l}).then(i=>{e.loading=!1,m.value=!1,g.push({path:"/tools/code/edit",query:{id:i.data.id}})}).catch(()=>{e.loading=!1})};return h({showDialog:m,setFormData:async(a=null)=>{u()}}),(a,l)=>{const i=z,C=U,D=q,V=F,y=P,T=j;return p(),_(y,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=r=>m.value=r),title:t(n)("addCode"),width:"800px","destroy-on-close":!0},{default:o(()=>[b("div",null,[x((p(),_(V,{data:t(v),size:"large",height:"400"},{empty:o(()=>[b("span",null,f(e.loading?"":t(n)("emptyData")),1)]),default:o(()=>[d(i,{prop:"Name",label:t(n)("tableName"),"min-width":"150"},null,8,["label"]),d(i,{prop:"Comment",label:t(n)("tableComment"),"min-width":"120"},null,8,["label"]),d(i,{align:"right","min-width":"150"},{header:o(()=>[d(C,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=r=>s.value=r),modelModifiers:{trim:!0},size:"small",placeholder:t(n)("searchPlaceholder")},null,8,["modelValue","placeholder"])]),default:o(r=>[d(D,{size:"small",type:"primary",onClick:S=>w(r.row)},{default:o(()=>[B(f(t(n)("addBtn")),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,e.loading]])])]),_:1},8,["modelValue","title"])}}});export{le as _};

View File

@ -1 +0,0 @@
import{d as L,u as N,r as c,q as k,m as E,h as p,v as _,w as o,a as b,Y as x,f as t,t as f,s as n,e as d,i as B,aj as z,L as U,E as q,ak as F,U as P,a2 as j}from"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{k as G,l as I}from"./tools-4c0eb235.js";const le=L({__name:"add-table",setup(M,{expose:h}){const g=N(),m=c(!1),s=c(""),e=k({loading:!0,data:[],searchParam:{table_name:"",table_content:""}}),v=E(()=>e.data.filter(a=>!s.value||a.Name.toLowerCase().includes(s.value.toLowerCase())||a.Comment.toLowerCase().includes(s.value.toLowerCase()))),u=()=>{e.loading=!0,G().then(a=>{e.loading=!1,e.data=a.data}).catch(()=>{e.loading=!1})};u();const w=a=>{const l=a.Name;e.loading=!0,I({table_name:l}).then(i=>{e.loading=!1,m.value=!1,g.push({path:"/tools/code/edit",query:{id:i.data.id}})}).catch(()=>{e.loading=!1})};return h({showDialog:m,setFormData:async(a=null)=>{u()}}),(a,l)=>{const i=z,C=U,D=q,V=F,y=P,T=j;return p(),_(y,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=r=>m.value=r),title:t(n)("addCode"),width:"800px","destroy-on-close":!0},{default:o(()=>[b("div",null,[x((p(),_(V,{data:t(v),size:"large",height:"400"},{empty:o(()=>[b("span",null,f(e.loading?"":t(n)("emptyData")),1)]),default:o(()=>[d(i,{prop:"Name",label:t(n)("tableName"),"min-width":"150"},null,8,["label"]),d(i,{prop:"Comment",label:t(n)("tableComment"),"min-width":"120"},null,8,["label"]),d(i,{align:"right","min-width":"150"},{header:o(()=>[d(C,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=r=>s.value=r),modelModifiers:{trim:!0},size:"small",placeholder:t(n)("searchPlaceholder")},null,8,["modelValue","placeholder"])]),default:o(r=>[d(D,{size:"small",type:"primary",onClick:S=>w(r.row)},{default:o(()=>[B(f(t(n)("addBtn")),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,e.loading]])])]),_:1},8,["modelValue","title"])}}});export{le as _};

View File

@ -0,0 +1 @@
import{_ as o}from"./add-technician.vue_vue_type_script_setup_true_lang-03b4c5f6.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-10900d66.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-21da2491.js";import"./attachment-f8f01a48.js";import"./index.vue_vue_type_script_setup_true_lang-a8e26176.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-dbcb3737.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-0ef61f23.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./sortable.esm-be94e56d.js";import"./vipcard-3a4e22ff.js";export{o as default};

View File

@ -0,0 +1 @@
import{d as N,r as p,q as T,m as B,s as o,h as V,v,w as n,a as C,e as i,i as c,t as f,f as t,Y as k,b_ as y,L as q,M,N as R,E as $,U as j,a2 as I}from"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import K from"./index-10900d66.js";import"./el-form-item-4ed993c7.js";/* empty css */import{a3 as L,a4 as O}from"./vipcard-3a4e22ff.js";const S={class:"dialog-footer"},ae=N({__name:"add-technician",emits:["complete"],setup(Y,{expose:w,emit:x}){const u=p(!1),s=p(!1),b={id:"",name:"",mobile:"",seniority:"0",number:"",position:"",headimg:""},l=T({...b}),g=p(),D=B(()=>({name:[{required:!0,message:o("namePlaceholder"),trigger:"blur"}],mobile:[{required:!0,message:o("mobilePlaceholder"),trigger:"blur"},{trigger:"blur",validator:(d,e,r)=>{e&&!/^1[3-9]\d{9}$/.test(e)&&r(new Error(o("mobileNumberFormatTips"))),r()}}]})),U=async d=>{if(s.value||!d)return;const e=l.id?L:O;await d.validate(async r=>{r&&(s.value=!0,e(l).then(_=>{s.value=!1,u.value=!1,x("complete")}).catch(()=>{s.value=!1}))})};return w({showDialog:u,setFormData:async(d=null)=>{Object.assign(l,b),d&&d&&Object.keys(l).forEach(e=>{d[e]!=null&&(l[e]=d[e])}),s.value=!1}}),(d,e)=>{const r=q,m=M,_=K,E=R,h=$,P=j,F=I;return V(),v(P,{modelValue:u.value,"onUpdate:modelValue":e[10]||(e[10]=a=>u.value=a),title:l.id?t(o)("updateTechnician"):t(o)("addTechnician"),width:"500px","destroy-on-close":!0},{footer:n(()=>[C("span",S,[i(h,{onClick:e[8]||(e[8]=a=>u.value=!1)},{default:n(()=>[c(f(t(o)("cancel")),1)]),_:1}),i(h,{type:"primary",loading:s.value,onClick:e[9]||(e[9]=a=>U(g.value))},{default:n(()=>[c(f(t(o)("confirm")),1)]),_:1},8,["loading"])])]),default:n(()=>[k((V(),v(E,{model:l,"label-width":"90px",ref_key:"formRef",ref:g,rules:t(D),class:"page-form"},{default:n(()=>[i(m,{label:t(o)("name"),prop:"name"},{default:n(()=>[i(r,{maxlength:"20","show-word-limit":"",modelValue:l.name,"onUpdate:modelValue":e[0]||(e[0]=a=>l.name=a),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("namePlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),i(m,{label:t(o)("headimg")},{default:n(()=>[i(_,{modelValue:l.headimg,"onUpdate:modelValue":e[1]||(e[1]=a=>l.headimg=a)},null,8,["modelValue"])]),_:1},8,["label"]),i(m,{label:t(o)("mobile"),prop:"mobile"},{default:n(()=>[i(r,{modelValue:l.mobile,"onUpdate:modelValue":e[2]||(e[2]=a=>l.mobile=a),modelModifiers:{trim:!0},clearable:"",maxlength:"11",placeholder:t(o)("mobilePlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),i(m,{label:t(o)("seniority"),prop:""},{default:n(()=>[i(r,{modelValue:l.seniority,"onUpdate:modelValue":e[3]||(e[3]=a=>l.seniority=a),clearable:"",placeholder:t(o)("seniorityPlaceholder"),class:"input-width",onKeyup:e[4]||(e[4]=a=>t(y)(a)),maxlength:"2"},{append:n(()=>[c(f(t(o)("year")),1)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),i(m,{label:t(o)("number"),prop:""},{default:n(()=>[i(r,{modelValue:l.number,"onUpdate:modelValue":e[5]||(e[5]=a=>l.number=a),clearable:"",placeholder:t(o)("numberPlaceholder"),class:"input-width",onKeyup:e[6]||(e[6]=a=>t(y)(a))},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),i(m,{label:t(o)("position"),prop:""},{default:n(()=>[i(r,{modelValue:l.position,"onUpdate:modelValue":e[7]||(e[7]=a=>l.position=a),clearable:"",placeholder:t(o)("positionPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[F,s.value]])]),_:1},8,["modelValue","title"])}}});export{ae as _};

View File

@ -1 +0,0 @@
import{_ as e}from"./add-theme.vue_vue_type_script_setup_true_lang-dd6bd7a8.js";const o=Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));export{o as _};

View File

@ -0,0 +1 @@
import{_ as e}from"./add-theme.vue_vue_type_script_setup_true_lang-84a078ba.js";const o=Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));export{o as _};

View File

@ -0,0 +1 @@
import{d as D,r as d,q as h,m as q,h as B,v as N,w as n,a as R,e as o,i as v,f as _,a5 as F,L as O,M as $,bJ as j,N as A,E as I,U as S}from"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as T}from"./diy-172314a6.js";const z={class:"dialog-footer"},X=D({__name:"add-theme",emits:["confirm"],setup(J,{expose:g,emit:y}){const V=T(),s=d(!1),i=d(!1),b={title:"",label:"",value:"",tip:""};let f=[];const m=d(""),l=h({...b}),k=r=>{f=r.key,m.value="";for(const e in l)l[e]="";r.data&&Object.keys(r.data).length&&(m.value="edit",Object.keys(l).forEach((e,t)=>{l[e]=r.data[e]?r.data[e]:""})),s.value=!0},p=d(),x=q(()=>({title:[{required:!0,message:"请输入颜色名称",trigger:"blur"}],value:[{required:!0,validator:(r,e,t)=>{e?t():t("请输入颜色value值")},trigger:["blur","change"]}],label:[{required:!0,message:"请输入颜色key值",trigger:"blur"},{validator:(r,e,t)=>{const u=/^[a-zA-Z0-9-]+$/;f.indexOf(e)!=-1&&t("新增颜色key值与已存在颜色key值命名重复请修改命名"),u.test(e)?t():t("颜色key值只能输入字母、数字和连字符")},trigger:"blur"}]})),w=async r=>{var e;i.value||await((e=p.value)==null?void 0:e.validate(async t=>{i.value||(i.value=!0,t&&(i.value=!1,y("confirm",F(l)),s.value=!1))}))};return g({dialogThemeVisible:s,open:k}),(r,e)=>{const t=O,u=$,E=j,C=A,c=I,U=S;return B(),N(U,{modelValue:s.value,"onUpdate:modelValue":e[6]||(e[6]=a=>s.value=a),title:"新增颜色",width:"550px","align-center":""},{footer:n(()=>[R("div",z,[o(c,{onClick:e[4]||(e[4]=a=>s.value=!1)},{default:n(()=>[v("取消")]),_:1}),o(c,{type:"primary",onClick:e[5]||(e[5]=a=>w(p.value))},{default:n(()=>[v("保存")]),_:1})])]),default:n(()=>[o(C,{model:l,"label-width":"120px",ref_key:"formRef",ref:p,rules:_(x)},{default:n(()=>[o(u,{label:"名字",prop:"title"},{default:n(()=>[o(t,{modelValue:l.title,"onUpdate:modelValue":e[0]||(e[0]=a=>l.title=a),class:"!w-[250px]",maxlength:"7",placeholder:"请输入颜色名称"},null,8,["modelValue"])]),_:1}),o(u,{label:"颜色key值",prop:"label"},{default:n(()=>[o(t,{modelValue:l.label,"onUpdate:modelValue":e[1]||(e[1]=a=>l.label=a),class:"!w-[250px]",maxlength:"20",disabled:m.value=="edit",placeholder:"请输入颜色key值"},null,8,["modelValue","disabled"])]),_:1}),o(u,{label:"颜色value值",prop:"value"},{default:n(()=>[o(E,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=a=>l.value=a),"show-alpha":"",predefine:_(V).predefineColors},null,8,["modelValue","predefine"])]),_:1}),o(u,{label:"颜色提示"},{default:n(()=>[o(t,{modelValue:l.tip,"onUpdate:modelValue":e[3]||(e[3]=a=>l.tip=a),class:"!w-[250px]",placeholder:"请输入颜色提示"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}});export{X as _};

View File

@ -1 +0,0 @@
import{d as D,r as d,q as h,m as q,h as B,v as N,w as n,a as R,e as o,i as v,f as _,a5 as F,L as O,M as $,bJ as j,N as A,E as I,U as S}from"./index-9c445bb6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as T}from"./diy-fc54c488.js";const z={class:"dialog-footer"},X=D({__name:"add-theme",emits:["confirm"],setup(J,{expose:g,emit:y}){const V=T(),s=d(!1),i=d(!1),b={title:"",label:"",value:"",tip:""};let f=[];const m=d(""),l=h({...b}),k=r=>{f=r.key,m.value="";for(const e in l)l[e]="";r.data&&Object.keys(r.data).length&&(m.value="edit",Object.keys(l).forEach((e,t)=>{l[e]=r.data[e]?r.data[e]:""})),s.value=!0},p=d(),x=q(()=>({title:[{required:!0,message:"请输入颜色名称",trigger:"blur"}],value:[{required:!0,validator:(r,e,t)=>{e?t():t("请输入颜色value值")},trigger:["blur","change"]}],label:[{required:!0,message:"请输入颜色key值",trigger:"blur"},{validator:(r,e,t)=>{const u=/^[a-zA-Z0-9-]+$/;f.indexOf(e)!=-1&&t("新增颜色key值与已存在颜色key值命名重复请修改命名"),u.test(e)?t():t("颜色key值只能输入字母、数字和连字符")},trigger:"blur"}]})),w=async r=>{var e;i.value||await((e=p.value)==null?void 0:e.validate(async t=>{i.value||(i.value=!0,t&&(i.value=!1,y("confirm",F(l)),s.value=!1))}))};return g({dialogThemeVisible:s,open:k}),(r,e)=>{const t=O,u=$,E=j,C=A,c=I,U=S;return B(),N(U,{modelValue:s.value,"onUpdate:modelValue":e[6]||(e[6]=a=>s.value=a),title:"新增颜色",width:"550px","align-center":""},{footer:n(()=>[R("div",z,[o(c,{onClick:e[4]||(e[4]=a=>s.value=!1)},{default:n(()=>[v("取消")]),_:1}),o(c,{type:"primary",onClick:e[5]||(e[5]=a=>w(p.value))},{default:n(()=>[v("保存")]),_:1})])]),default:n(()=>[o(C,{model:l,"label-width":"120px",ref_key:"formRef",ref:p,rules:_(x)},{default:n(()=>[o(u,{label:"名字",prop:"title"},{default:n(()=>[o(t,{modelValue:l.title,"onUpdate:modelValue":e[0]||(e[0]=a=>l.title=a),class:"!w-[250px]",maxlength:"7",placeholder:"请输入颜色名称"},null,8,["modelValue"])]),_:1}),o(u,{label:"颜色key值",prop:"label"},{default:n(()=>[o(t,{modelValue:l.label,"onUpdate:modelValue":e[1]||(e[1]=a=>l.label=a),class:"!w-[250px]",maxlength:"20",disabled:m.value=="edit",placeholder:"请输入颜色key值"},null,8,["modelValue","disabled"])]),_:1}),o(u,{label:"颜色value值",prop:"value"},{default:n(()=>[o(E,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=a=>l.value=a),"show-alpha":"",predefine:_(V).predefineColors},null,8,["modelValue","predefine"])]),_:1}),o(u,{label:"颜色提示"},{default:n(()=>[o(t,{modelValue:l.tip,"onUpdate:modelValue":e[3]||(e[3]=a=>l.tip=a),class:"!w-[250px]",placeholder:"请输入颜色提示"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}});export{X as _};

View File

@ -0,0 +1 @@
import{b5 as t}from"./index-8eead49b.js";function o(n){return t.get("addon/local",n)}function a(n){return t.post(`addon/install/${n.addon}`,n)}function s(n){return t.post(`addon/cloudinstall/${n.addon}`,n,{showErrorMessage:!1})}function d(n){return t.post(`addon/uninstall/${n.addon}`,n,{showSuccessMessage:!0})}function l(n){return t.get(`addon/install/check/${n}`)}function u(){return t.get("addon/installtask")}function i(n){return t.get(`addon/cloudinstall/${n}`)}function r(n){return t.get(`addon/uninstall/check/${n}`)}function c(n){return t.put(`addon/install/cancel/${n}`,{},{showErrorMessage:!1})}function g(){return t.get("addon/list/install")}function f(){return t.get("home/site/group/app_list")}function p(){return t.get("addon/init")}function A(){return t.get("app/index")}function h(){return t.get("index/adv_list")}export{g as a,A as b,h as c,p as d,o as e,u as f,f as g,s as h,a as i,i as j,r as k,c as l,l as p,d as u};

View File

@ -1 +0,0 @@
import{b5 as t}from"./index-9c445bb6.js";function o(n){return t.get("addon/local",n)}function a(n){return t.post(`addon/install/${n.addon}`,n)}function s(n){return t.post(`addon/cloudinstall/${n.addon}`,n,{showErrorMessage:!1})}function d(n){return t.post(`addon/uninstall/${n.addon}`,n,{showSuccessMessage:!0})}function l(n){return t.get(`addon/install/check/${n}`)}function u(){return t.get("addon/installtask")}function i(n){return t.get(`addon/cloudinstall/${n}`)}function r(n){return t.get(`addon/uninstall/check/${n}`)}function c(n){return t.put(`addon/install/cancel/${n}`,{},{showErrorMessage:!1})}function g(){return t.get("addon/list/install")}function f(){return t.get("home/site/group/app_list")}function p(){return t.get("addon/init")}function A(){return t.get("app/index")}function h(){return t.get("index/adv_list")}export{g as a,A as b,h as c,p as d,o as e,u as f,f as g,s as h,a as i,i as j,r as k,c as l,l as p,d as u};

View File

@ -0,0 +1 @@
import{_ as o}from"./address-list.vue_vue_type_script_setup_true_lang-874b8d29.js";import"./index-8eead49b.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import"./member-9b1f7f51.js";export{o as default};

Some files were not shown because too many files have changed in this diff Show More