mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2026-07-22 23:27:44 +00:00
v2.0.0
This commit is contained in:
parent
5cf8f30625
commit
ef3f9b2c15
@ -273,7 +273,19 @@ function runAssemble() {
|
||||
for (const name of fs.readdirSync(SHARED_DIR)) {
|
||||
copyTree(path.join(SHARED_DIR, name), path.join(sharedDest, name))
|
||||
}
|
||||
console.log('[assemble] shared -> assets/shared/')
|
||||
|
||||
// 生成 SFC 组件 wrapper:同时提供 named 和 default 导出
|
||||
// addon 的 Components() 插件生成 import { X } (命名),默认导入 import X from 也同样支持
|
||||
const { SFC_WRAPPERS } = require('./shared-external.cjs')
|
||||
for (const [fileName, exportName] of Object.entries(SFC_WRAPPERS)) {
|
||||
const wrapperPath = path.join(sharedDest, fileName)
|
||||
fs.writeFileSync(
|
||||
wrapperPath,
|
||||
`export { ${exportName} as default, ${exportName} } from './core-shared.js'\n`,
|
||||
'utf-8'
|
||||
)
|
||||
}
|
||||
console.log(`[assemble] shared -> assets/shared/ (${Object.keys(SFC_WRAPPERS).length} SFC wrappers generated)`)
|
||||
} else {
|
||||
console.warn('[assemble] missing dist/.shared — run build-shared first')
|
||||
}
|
||||
|
||||
@ -49,8 +49,8 @@ function writeEntries() {
|
||||
const utilsExports = []
|
||||
if (fs.existsSync(utilsDir)) {
|
||||
for (const f of fs.readdirSync(utilsDir)) {
|
||||
// common 和 request 单独处理,其余全量重导出
|
||||
if (f.endsWith('.ts') && f !== 'common.ts' && f !== 'request.ts' && f !== 'addon-loader.ts' && f !== 'addon-lang.ts') {
|
||||
// common, request, storage, config 单独处理,其余全量重导出
|
||||
if (f.endsWith('.ts') && f !== 'common.ts' && f !== 'request.ts' && f !== 'storage.ts' && f !== 'config.ts' && f !== 'test.ts' && f !== 'directives.ts' && f !== 'tianditu.ts' && f !== 'qqmap.ts' && f !== 'addon-loader.ts' && f !== 'addon-lang.ts') {
|
||||
const mod = f.replace('.ts', '')
|
||||
utilsExports.push(`export * from '../../src/utils/${mod}'`)
|
||||
}
|
||||
@ -60,8 +60,16 @@ function writeEntries() {
|
||||
ENTRY_CONTENT['core-shared'] = [
|
||||
"export * from '../../src/utils/common'",
|
||||
"import _request from '../../src/utils/request'",
|
||||
"import _storage from '../../src/utils/storage'",
|
||||
"import _config from '../../src/utils/config'",
|
||||
"import _test from '../../src/utils/test'",
|
||||
"export { _request as request }",
|
||||
"export { _storage as storage }",
|
||||
"export { _config as config }",
|
||||
"export { _test as test }",
|
||||
"export default _request",
|
||||
// qqmap 独立导出(与 tianditu 同名冲突,tianditu 由 addon 直接打包)
|
||||
"export * from '../../src/utils/qqmap'",
|
||||
...utilsExports,
|
||||
...apiExports,
|
||||
"export { default as UploadImage } from '../../src/components/upload-image/index.vue'",
|
||||
|
||||
@ -59,6 +59,10 @@ const IMPORT_MAP = {
|
||||
'@/lang': ADMIN_LANG_URL,
|
||||
'@/utils/common': CORE_SHARED_URL,
|
||||
'@/utils/request': CORE_SHARED_URL,
|
||||
'@/utils/storage': CORE_SHARED_URL,
|
||||
'@/utils/config': CORE_SHARED_URL,
|
||||
'@/utils/test': CORE_SHARED_URL,
|
||||
'@/utils/qqmap': CORE_SHARED_URL,
|
||||
'@/app/api/diy': CORE_SHARED_URL,
|
||||
'@/app/api/sys': CORE_SHARED_URL,
|
||||
'@/app/api/member': CORE_SHARED_URL,
|
||||
@ -69,6 +73,25 @@ const IMPORT_MAP = {
|
||||
'@/components/editor': CORE_SHARED_URL
|
||||
}
|
||||
|
||||
/** SFC 组件映射:不在 external 中处理,直接打进插件 bundle */
|
||||
const SFC_WRAPPERS = {}
|
||||
|
||||
/** 插件中 auto-import 的组件/模块,不 external,直接打进插件 */
|
||||
const PACK_INTO_ADDON = new Set([
|
||||
'utils/config', // export default → core-shared 的 export * 不会转发
|
||||
'utils/storage', // export default → core-shared 的 export * 不会转发
|
||||
'utils/tianditu' // 与 qqmap 同名导出冲突,由 addon 直接打包
|
||||
])
|
||||
|
||||
function isSfcBundleComponent(id) {
|
||||
const norm = id.replace(/\\/g, '/')
|
||||
for (const name of PACK_INTO_ADDON) {
|
||||
if (norm === `@/${name}` || norm.startsWith(`@/${name}/`)) return true
|
||||
if (norm.endsWith(`/${name}.ts`)) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/** 所有需要 external 化并映射到 core-shared 的核心路径 */
|
||||
const CORE_EXTERNAL_PATHS = Object.keys(IMPORT_MAP).filter(k => k.startsWith('@/'))
|
||||
|
||||
@ -87,12 +110,23 @@ function adminLangExternalPath() {
|
||||
|
||||
/** 核心应用模块路径是否应 external(不打进 addon 包) */
|
||||
function isCoreExternal(id) {
|
||||
const norm = id.replace(/\\/g, '/')
|
||||
// 先处理带 query 参数的情况(如 ?vue&type=script)
|
||||
const cleanId = id.split('?')[0]
|
||||
const norm = cleanId.replace(/\\/g, '/')
|
||||
// .vue 文件一律不 external(避免 default/named import 不匹配)
|
||||
if (/\.vue$/.test(norm) && (norm.includes('/src/') || norm.startsWith('@/'))) return false
|
||||
// @/components/ 下的组件一律不 external(unplugin-vue-components 解析的 import 可能不带 .vue 后缀)
|
||||
if (norm === '@/components' || norm.startsWith('@/components/')) return false
|
||||
// 已解析的 src/components/ 路径也一律不 external
|
||||
if (/\/src\/components\//.test(norm)) return false
|
||||
// utils/config 默认导出 → 不 external(core-shared 的 named export 不会转发 default)
|
||||
if (norm === '@/utils/config' || norm === '@/utils/config.ts' || norm.endsWith('/src/utils/config.ts')) return false
|
||||
if (isSfcBundleComponent(norm)) return false
|
||||
// 直接匹配 @/ 别名形式(Vite resolveId 前的 source)
|
||||
if (CORE_EXTERNAL_PATHS.some(p => norm === p || norm.startsWith(p + '/'))) return true
|
||||
// 匹配已解析的文件路径(如 /path/src/utils/common.ts)
|
||||
if (norm.includes('/src/') && !norm.includes('/src/addon/')) {
|
||||
return /\/src\/(utils|app|components)\//.test(norm)
|
||||
return /\/src\/(utils|app)\//.test(norm)
|
||||
}
|
||||
return false
|
||||
}
|
||||
@ -140,6 +174,8 @@ module.exports = {
|
||||
IMPORT_MAP,
|
||||
ADMIN_LANG_URL,
|
||||
CORE_SHARED_URL,
|
||||
SFC_WRAPPERS,
|
||||
isSfcBundleComponent,
|
||||
isSharedExternal,
|
||||
isAdminLangExternal,
|
||||
adminLangExternalPath,
|
||||
|
||||
@ -136,7 +136,6 @@
|
||||
<img src="@/app/assets/images/success_icon.png" alt="">
|
||||
</template>
|
||||
<template #extra>
|
||||
<div class="text-[16px] text-[#4F516D] mt-[-5px]" v-show="upgradeTask && upgradeTask.executed && !upgradeTask.executed.includes('cloudBuild')">{{ t('upgrade.upgradeCompleteTips') }}</div>
|
||||
<!-- <div class="text-[16px] text-[#9699B6] mt-[10px]">本次升级用时{{ formatUpgradeDuration }}</div> -->
|
||||
<div class="w-[750px]" v-if="upgradeTask.cloud_build_error">
|
||||
<el-alert class="!w-[750px] border-warning !border-[1px] !rounded-[0px] border-solid" type="warning" :closable="false">
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
<div class="flex items-start flex-1 w-0">
|
||||
<div class="w-[42px] h-[42px] bg-purple-100 rounded flex items-center justify-center mr-2 relative">
|
||||
<div class="w-full h-full overflow-hidden rounded">
|
||||
<el-image class="w-full h-full overflow-hidden rounded" :src="row.icon" fit="contain">
|
||||
<el-image class="w-full h-full overflow-hidden rounded" :src="img(row.icon)" fit="contain">
|
||||
<template #error>
|
||||
<div class="flex items-center w-full h-full">
|
||||
<img class="max-w-full max-h-full" src="@/app/assets/images/icon-addon-one.png" alt="" />
|
||||
@ -220,7 +220,7 @@
|
||||
<el-table-column :label="t('appName')" align="left" width="300">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center cursor-pointer relative left-[-10px]" @click="openDetail(row)">
|
||||
<el-image class="w-[54px] h-[54px] rounded-[5px]" :src="row.icon" fit="contain">
|
||||
<el-image class="w-[54px] h-[54px] rounded-[5px]" :src="img(row.icon)" fit="contain">
|
||||
<template #error>
|
||||
<div class="flex items-center w-full h-full rounded-[5px]">
|
||||
<img class="max-w-full max-h-full" src="@/app/assets/images/icon-addon-one.png" alt="" />
|
||||
@ -734,7 +734,7 @@
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<div class="w-[42px] h-[42px] rounded-[6px] flex items-center justify-center mr-[10px] overflow-hidden">
|
||||
<el-image class="w-full h-full" :src="detailAddon?.icon" fit="contain">
|
||||
<el-image class="w-full h-full" :src="img(detailAddon?.icon)" fit="contain">
|
||||
<template #error>
|
||||
<div class="flex items-center w-full h-full">
|
||||
<img class="max-w-full max-h-full" src="@/app/assets/images/icon-addon-one.png" alt="" />
|
||||
@ -938,7 +938,7 @@ import useUserStore from '@/stores/modules/user'
|
||||
import Upgrade from '@/app/components/upgrade/index.vue'
|
||||
import CloudBuild from '@/app/components/cloud-build/index.vue'
|
||||
import UpgradeLog from '@/app/components/upgrade-log/index.vue'
|
||||
import { deepClone } from '@/utils/common'
|
||||
import { deepClone, img } from '@/utils/common'
|
||||
|
||||
const tableRef = ref(null)
|
||||
const router = useRouter()
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<div class="w-full">
|
||||
<div class="flex">
|
||||
<div class="w-[60px] h-[60px] mr-[10px] rounded-md overflow-hidden">
|
||||
<el-image :src="item.icon" v-if="item.icon" class="w-full h-full" />
|
||||
<el-image :src="img(item.icon)" v-if="item.icon" class="w-full h-full" />
|
||||
<el-image v-else class="w-full h-full">
|
||||
<template #error>
|
||||
<div class="image-error">
|
||||
@ -58,7 +58,7 @@
|
||||
<div class="w-full">
|
||||
<div class="flex">
|
||||
<div class="w-[60px] h-[60px] mr-[10px] rounded-md overflow-hidden">
|
||||
<el-image :src="item.icon" v-if="item.icon" class="w-full h-full" />
|
||||
<el-image :src="img(item.icon)" v-if="item.icon" class="w-full h-full" />
|
||||
<el-image v-else class="w-full h-full">
|
||||
<template #error>
|
||||
<div class="image-error">
|
||||
@ -100,7 +100,7 @@ import { ArrowLeft } from '@element-plus/icons-vue'
|
||||
import { menuRefresh } from '@/app/api/sys'
|
||||
import { addSiteGroup, editSiteGroup, getSiteGroupInfo } from '@/app/api/site'
|
||||
import { getInstalledAddonList } from '@/app/api/addon'
|
||||
import { deepClone } from '@/utils/common'
|
||||
import { deepClone, img } from '@/utils/common'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
|
||||
const loading = ref(true)
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<upload-attachment type="video" ref="videoRef" @confirm="videoSelect" />
|
||||
<vue-ueditor-wrap v-model="content" :config="editorConfig"
|
||||
:editorDependencies="['ueditor.config.js', 'ueditor.all.js']" ref="editorRef"
|
||||
mode="observer"
|
||||
@ready="handleEditorReady"></vue-ueditor-wrap>
|
||||
</template>
|
||||
|
||||
@ -49,7 +50,8 @@ let editorEl = null
|
||||
const serverHeaders = {}
|
||||
serverHeaders[envConfig.VITE_REQUEST_HEADER_TOKEN_KEY] = getToken()
|
||||
serverHeaders[envConfig.VITE_REQUEST_HEADER_SITEID_KEY] = storage.get('siteId') || 0
|
||||
const baseUrl = envConfig.VITE_APP_BASE_URL.substr(-1) == '/' ? envConfig.VITE_APP_BASE_URL : `${envConfig.VITE_APP_BASE_URL}/`
|
||||
const appBaseUrl = envConfig.VITE_APP_BASE_URL || '/adminapi/'
|
||||
const baseUrl = appBaseUrl.endsWith('/') ? appBaseUrl : `${appBaseUrl}/`
|
||||
|
||||
const editorConfig = ref({
|
||||
debug: false,
|
||||
@ -89,7 +91,9 @@ const handleEditorReady = (editor) => {
|
||||
// console.log('扩展原型链', editor)
|
||||
editor.addListener('blur', () => {
|
||||
// console.log('失焦了')
|
||||
emit('handleBlur', editor.getContent()) // 把内容传出去
|
||||
const content = editor.getContent()
|
||||
emit('update:modelValue', content) // 确保 v-model 同步
|
||||
emit('handleBlur', content) // 把内容传出去
|
||||
})
|
||||
|
||||
// 全屏切换监听
|
||||
|
||||
@ -449,7 +449,8 @@ const upload = computed(() => {
|
||||
const headers: Record<string, any> = {}
|
||||
headers[envConfig.VITE_REQUEST_HEADER_TOKEN_KEY] = getToken()
|
||||
headers[envConfig.VITE_REQUEST_HEADER_SITEID_KEY] = storage.get('siteId') || 0
|
||||
const baseURL = envConfig.VITE_APP_BASE_URL.substr(-1) == '/' ? envConfig.VITE_APP_BASE_URL : `${envConfig.VITE_APP_BASE_URL}/`
|
||||
const apiBase = envConfig.VITE_APP_BASE_URL || ''
|
||||
const baseURL = apiBase.endsWith('/') ? apiBase : `${apiBase}/`
|
||||
|
||||
return {
|
||||
action: `${baseURL}sys/${prop.type}`,
|
||||
|
||||
@ -37,7 +37,7 @@ const value = computed({
|
||||
})
|
||||
|
||||
const upload: Record<string, any> = {
|
||||
action: `${envConfig.VITE_APP_BASE_URL}/${prop.api}`,
|
||||
action: `${envConfig.VITE_APP_BASE_URL || '/adminapi/'}${prop.api}`,
|
||||
showFileList: false,
|
||||
headers: {},
|
||||
accept: 'audio/*,.mp3,.wav,.ogg,.m4a,.flac,.aac,.wma',
|
||||
|
||||
@ -46,7 +46,8 @@ const upload = computed(() => {
|
||||
const headers: Record<string, any> = {}
|
||||
headers[envConfig.VITE_REQUEST_HEADER_TOKEN_KEY] = getToken()
|
||||
headers[envConfig.VITE_REQUEST_HEADER_SITEID_KEY] = storage.get('siteId') || 0
|
||||
const baseURL = envConfig.VITE_APP_BASE_URL.substr(-1) == '/' ? envConfig.VITE_APP_BASE_URL : `${envConfig.VITE_APP_BASE_URL}/`
|
||||
const appBaseUrl = envConfig.VITE_APP_BASE_URL || '/adminapi/'
|
||||
const baseURL = appBaseUrl.endsWith('/') ? appBaseUrl : `${appBaseUrl}/`
|
||||
|
||||
return {
|
||||
action: `${baseURL}${prop.api}`,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import axios from 'axios'
|
||||
import envConfig from '@/utils/config'
|
||||
|
||||
axios.defaults.baseURL = envConfig.VITE_APP_BASE_URL
|
||||
axios.defaults.baseURL = envConfig.VITE_APP_BASE_URL || '/adminapi/'
|
||||
|
||||
const service = axios.create({
|
||||
timeout: 40000,
|
||||
|
||||
@ -20,7 +20,6 @@ import { language } from '@/lang'
|
||||
async function run() {
|
||||
if (!import.meta.env.DEV) {
|
||||
await initAddonManifests()
|
||||
await language.preloadAddonLangs()
|
||||
}
|
||||
const app = createApp(App)
|
||||
app.use(pinia)
|
||||
@ -32,6 +31,12 @@ async function run() {
|
||||
app.use(VueUeditorWrap)
|
||||
useElementIcon(app)
|
||||
app.mount('#app')
|
||||
|
||||
// 插件语言包延迟加载:挂载后异步预加载,不阻塞首屏渲染
|
||||
// 路由守卫会按需补加载当前页面缺失的语言包
|
||||
if (!import.meta.env.DEV) {
|
||||
language.preloadAddonLangs()
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
@import "addon/higohome/iconfont.css";
|
||||
@import "addon/home_service/iconfont.css";
|
||||
@import "addon/o2o/iconfont.css";
|
||||
@import "addon/tourism/iconfont.css";
|
||||
|
||||
@ -156,6 +156,13 @@ export async function initAddonManifests(keys?: string[]) {
|
||||
if (res.ok) {
|
||||
const data = await res.json()
|
||||
addonKeys = Array.isArray(data.keys) ? data.keys : []
|
||||
// 读取合并后的 manifests(PHP 端已打包进 index.json),避免 N 次 manifest.json 请求
|
||||
const bundled = data.manifests as Record<string, AddonManifest> | undefined
|
||||
if (bundled) {
|
||||
for (const [k, m] of Object.entries(bundled)) {
|
||||
prodManifests[k] = m
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
addonKeys = []
|
||||
@ -163,6 +170,16 @@ export async function initAddonManifests(keys?: string[]) {
|
||||
}
|
||||
const verifiedKeys: string[] = []
|
||||
for (const key of addonKeys || []) {
|
||||
// 如果 manifest 已从 index.json 获取,直接验证
|
||||
if (prodManifests[key]) {
|
||||
if (await isAddonEntryAvailable(key)) {
|
||||
verifiedKeys.push(key)
|
||||
} else {
|
||||
delete prodManifests[key]
|
||||
}
|
||||
continue
|
||||
}
|
||||
// 兼容旧版:单独请求 manifest.json
|
||||
if (!(await isAddonEntryAvailable(key))) continue
|
||||
verifiedKeys.push(key)
|
||||
try {
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
// 优先读取外挂 window.__ENV__,部署后可直接修改,无需重编译
|
||||
const env = (typeof window !== 'undefined' ? (window as any).__ENV__ : null) || {}
|
||||
|
||||
// import.meta.env 在 lib 构建模式下可能不被替换,此处确保每一行都有硬编码兜底
|
||||
const APP_BASE_URL = env.VITE_APP_BASE_URL || import.meta.env.VITE_APP_BASE_URL || '/adminapi/'
|
||||
const IMG_DOMAIN = env.VITE_IMG_DOMAIN || import.meta.env.VITE_IMG_DOMAIN || ''
|
||||
const HEADER_TOKEN_KEY = env.VITE_REQUEST_HEADER_TOKEN_KEY || import.meta.env.VITE_REQUEST_HEADER_TOKEN_KEY || 'token'
|
||||
const HEADER_SITEID_KEY = env.VITE_REQUEST_HEADER_SITEID_KEY || import.meta.env.VITE_REQUEST_HEADER_SITEID_KEY || 'site-id'
|
||||
const DEFAULT_TITLE = env.VITE_DETAULT_TITLE || import.meta.env.VITE_DETAULT_TITLE || ''
|
||||
|
||||
export default {
|
||||
VITE_APP_BASE_URL: env.VITE_APP_BASE_URL || import.meta.env.VITE_APP_BASE_URL,
|
||||
VITE_IMG_DOMAIN: env.VITE_IMG_DOMAIN || import.meta.env.VITE_IMG_DOMAIN,
|
||||
VITE_REQUEST_HEADER_TOKEN_KEY: env.VITE_REQUEST_HEADER_TOKEN_KEY || import.meta.env.VITE_REQUEST_HEADER_TOKEN_KEY || 'token',
|
||||
VITE_REQUEST_HEADER_SITEID_KEY: env.VITE_REQUEST_HEADER_SITEID_KEY || import.meta.env.VITE_REQUEST_HEADER_SITEID_KEY || 'site-id',
|
||||
VITE_DETAULT_TITLE: env.VITE_DETAULT_TITLE || import.meta.env.VITE_DETAULT_TITLE || ''
|
||||
VITE_APP_BASE_URL: APP_BASE_URL,
|
||||
VITE_IMG_DOMAIN: IMG_DOMAIN,
|
||||
VITE_REQUEST_HEADER_TOKEN_KEY: HEADER_TOKEN_KEY,
|
||||
VITE_REQUEST_HEADER_SITEID_KEY: HEADER_SITEID_KEY,
|
||||
VITE_DETAULT_TITLE: DEFAULT_TITLE
|
||||
}
|
||||
|
||||
@ -47,8 +47,9 @@ class Request {
|
||||
private instance: AxiosInstance;
|
||||
|
||||
constructor() {
|
||||
const appBaseUrl = envConfig.VITE_APP_BASE_URL || '/adminapi/'
|
||||
this.instance = axios.create({
|
||||
baseURL: envConfig.VITE_APP_BASE_URL.substr(-1) == '/' ? envConfig.VITE_APP_BASE_URL : `${envConfig.VITE_APP_BASE_URL}/`,
|
||||
baseURL: appBaseUrl.endsWith('/') ? appBaseUrl : `${appBaseUrl}/`,
|
||||
timeout: 0,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@ -27,9 +27,49 @@ export default defineConfig({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
__VUE_OPTIONS_API__: true,
|
||||
__VUE_PROD_DEVTOOLS__: false,
|
||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
|
||||
// 显式注入 VITE_* 环境变量:lib 构建模式下 import.meta.env 替换可能不完整
|
||||
'import.meta.env.VITE_APP_BASE_URL': JSON.stringify('/adminapi/'),
|
||||
'import.meta.env.VITE_IMG_DOMAIN': JSON.stringify(''),
|
||||
'import.meta.env.VITE_REQUEST_HEADER_TOKEN_KEY': JSON.stringify('token'),
|
||||
'import.meta.env.VITE_REQUEST_HEADER_SITEID_KEY': JSON.stringify('site-id'),
|
||||
'import.meta.env.VITE_DETAULT_TITLE': JSON.stringify('')
|
||||
},
|
||||
plugins: [
|
||||
// 修复:addon 中 import X from '@/utils/storage' / '@/utils/config' 的 default import
|
||||
// 会被错误地 external 到 core-shared.js 的 default 导出(即 request 实例)。
|
||||
// core-shared 的 export * 不转发 default,因此需要改写为命名导入。
|
||||
{
|
||||
name: 'fix-addon-storage-config-default-import',
|
||||
enforce: 'pre',
|
||||
transform(code, id) {
|
||||
// 只在 addon 构建中使用(vite.config.addon.ts 专用),无需 id 过滤
|
||||
// import xxx from '@/utils/storage' → import { storage as xxx } from '@/utils/storage'
|
||||
const orig = code
|
||||
code = code.replace(
|
||||
/import\s+(\w+)\s+from\s+['"]@\/utils\/storage['"]/g,
|
||||
"import { storage as $1 } from '@/utils/storage'"
|
||||
)
|
||||
// import xxx from '@/utils/config' → import { config as xxx } from '@/utils/config'
|
||||
code = code.replace(
|
||||
/import\s+(\w+)\s+from\s+['"]@\/utils\/config['"]/g,
|
||||
"import { config as $1 } from '@/utils/config'"
|
||||
)
|
||||
// import xxx from '@/utils/test' → import { test as xxx } from '@/utils/test'
|
||||
code = code.replace(
|
||||
/import\s+(\w+)\s+from\s+['"]@\/utils\/test['"]/g,
|
||||
"import { test as $1 } from '@/utils/test'"
|
||||
)
|
||||
// 处理 export { default as ... } from '@/utils/storage|config|test'
|
||||
code = code.replace(
|
||||
/export\s+\{\s*default\s+as\s+(\w+)\s*\}\s+from\s+['"]@\/utils\/(storage|config|test)['"]/g,
|
||||
"export { $2 as $1 } from '@/utils/$2'"
|
||||
)
|
||||
if (code !== orig) {
|
||||
return { code, map: null }
|
||||
}
|
||||
}
|
||||
},
|
||||
stripElementPlusStylePlugin(),
|
||||
vue(),
|
||||
AutoImport({ resolvers: [elementPlusResolver] }),
|
||||
@ -42,7 +82,14 @@ export default defineConfig({
|
||||
const entry = bundle['index.js']
|
||||
const cssAsset = bundle['style.css']
|
||||
if (entry && entry.type === 'chunk' && cssAsset && cssAsset.type === 'asset') {
|
||||
const css = JSON.stringify(cssAsset.source)
|
||||
// 过滤掉第三方库中污染全局的选择器(如 Vditor 的 body, html 样式)
|
||||
let rawCss = (cssAsset.source as string).toString()
|
||||
// 移除以 body 或 html 开头且后面紧跟 { 或空格的选择器块(如 body{...})
|
||||
// 但不影响 .xxx__body, body.class, #body 等复合选择器
|
||||
rawCss = rawCss.replace(/(?:^|})\s*(?:body|html)\s*(?=\{)/g, (m) => m.startsWith('}') ? '}/* removed-global-' + m.substring(1).trim() + ' */' : '/* removed-global-' + m.trim() + ' */')
|
||||
// 移除逗号分隔的全局选择器中的 body/html(如 :root,body{...})
|
||||
rawCss = rawCss.replace(/,\s*(?:body|html)\s*(?=\{)/g, '/* removed-global */')
|
||||
const css = JSON.stringify(rawCss)
|
||||
entry.code = `(function(){var s=document.createElement('style');s.textContent=${css};s.setAttribute('data-addon-style','${addonKey}');document.head.insertBefore(s,document.head.firstChild)})();\n${entry.code}`
|
||||
delete bundle['style.css']
|
||||
}
|
||||
|
||||
@ -61,7 +61,9 @@ export default defineConfig({
|
||||
fileName: () => `${outName}.js`
|
||||
},
|
||||
rollupOptions: {
|
||||
external: sharedExternalForBuild(pkgKey)
|
||||
external: sharedExternalForBuild(pkgKey),
|
||||
// core-shared 是共享包,addon 依赖其全部导出,禁止 tree-shaking
|
||||
treeshake: pkgKey !== 'core-shared'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -123,10 +123,13 @@ class Generator extends BaseController
|
||||
*/
|
||||
public function del(int $id)
|
||||
{
|
||||
(new GenerateService())->del($id);
|
||||
$removeCode = $this->request->param('remove_code', 0);
|
||||
(new GenerateService())->del($id, (bool)$removeCode);
|
||||
return success('DELETE_SUCCESS');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 生成代码
|
||||
* @description 生成代码
|
||||
|
||||
@ -1237,7 +1237,7 @@ return [
|
||||
'router_path' => 'tools/update_cache',
|
||||
'view_path' => 'tools/updatecache',
|
||||
'methods' => 'post',
|
||||
'sort' => '108',
|
||||
'sort' => '97',
|
||||
'status' => '1',
|
||||
'is_show' => '1',
|
||||
],
|
||||
|
||||
@ -1281,7 +1281,7 @@ CREATE TABLE `weapp_version`
|
||||
`status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态',
|
||||
`update_time` int(11) NOT NULL DEFAULT 0,
|
||||
`fail_reason` text DEFAULT NULL,
|
||||
`task_key` varchar(20) NOT NULL DEFAULT '' COMMENT '上传任务key',
|
||||
`task_key` varchar(255) NOT NULL DEFAULT '' COMMENT '上传任务key',
|
||||
`from_type` VARCHAR(255) NOT NULL DEFAULT 'cloud_build',
|
||||
`auditid` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
|
||||
@ -59,6 +59,9 @@ class GenerateService extends BaseAdminService
|
||||
|
||||
$info = (new GenerateTable())->field($field)->where([['id', '=', $id]])->findOrEmpty()->toArray();
|
||||
|
||||
// 自动同步数据库表结构:合并实际字段与已存配置
|
||||
$this->syncTableColumns($id);
|
||||
|
||||
$info['table_column'] = (new GenerateColumn())->where([['table_id', '=', $id]])->select()->toArray();
|
||||
|
||||
$column = (new GenerateColumn())->where([['table_id', '=', $id],['is_delete','=',1]])->find();
|
||||
@ -364,10 +367,19 @@ class GenerateService extends BaseAdminService
|
||||
/**
|
||||
* 删除代码生成
|
||||
* @param int $id
|
||||
* @param bool $removeCode 是否同时删除已同步到项目中的生成代码文件
|
||||
* @return bool
|
||||
*/
|
||||
public function del(int $id)
|
||||
public function del(int $id, bool $removeCode = false)
|
||||
{
|
||||
if ($removeCode) {
|
||||
// 删除前先获取表信息,以确定需要清理的文件路径
|
||||
$table_info = (new GenerateTable())->where([['id', '=', $id]])->field('*')->findOrEmpty();
|
||||
if (!$table_info->isEmpty()) {
|
||||
$this->delSyncCode($id, $table_info->toArray());
|
||||
}
|
||||
}
|
||||
|
||||
Db::startTrans();
|
||||
try {
|
||||
(new GenerateTable())->where([['id', '=', $id]])->delete();
|
||||
@ -380,6 +392,97 @@ class GenerateService extends BaseAdminService
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除已同步到项目中的代码文件
|
||||
* @param int $id
|
||||
* @param array $tableInfo
|
||||
*/
|
||||
private function delSyncCode(int $id, array $tableInfo)
|
||||
{
|
||||
$tableInfo['fields'] = (new GenerateColumn())->where([['table_id', '=', $id]])->field('*')->select()->toArray();
|
||||
$generator = new Generate();
|
||||
// 传入 generate_type=4 表示删除模式,生成器根据此值决定删除文件而非创建
|
||||
$tableInfo['generate_type'] = 4;
|
||||
$generator->generate($tableInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动同步数据库表结构到列配置(在 info 接口中调用)
|
||||
* 新增数据库字段 / 删除已不存在的字段 / 更新类型注释
|
||||
* @param int $id
|
||||
*/
|
||||
private function syncTableColumns(int $id)
|
||||
{
|
||||
$table_info = (new GenerateTable())->where([['id', '=', $id]])->field('table_name')->findOrEmpty();
|
||||
if ($table_info->isEmpty()) return;
|
||||
|
||||
$table_name = $table_info['table_name'];
|
||||
try {
|
||||
$fields = Db::name($table_name)->getFields();
|
||||
} catch (\Exception $e) {
|
||||
return; // 表不存在则跳过
|
||||
}
|
||||
if (empty($fields)) return;
|
||||
|
||||
$existing_columns = (new GenerateColumn())->where([['table_id', '=', $id]])->column('*', 'column_name');
|
||||
$default_column = ['id', 'create_time', 'update_time', 'site_id', 'delete_time'];
|
||||
|
||||
foreach ($fields as $k => $v) {
|
||||
$required = 0;
|
||||
if ($v['notnull'] && !$v['primary'] && !in_array($v['name'], $default_column)) {
|
||||
$required = 1;
|
||||
}
|
||||
|
||||
$column_data = [
|
||||
'table_id' => $id,
|
||||
'column_name' => $v['name'],
|
||||
'column_comment' => $v['comment'],
|
||||
'column_type' => self::getDbFieldType($v['type']),
|
||||
'is_required' => $required,
|
||||
'is_pk' => $v['primary'] ? 1 : 0,
|
||||
'is_insert' => !in_array($v['name'], $default_column) ? 1 : 0,
|
||||
'is_update' => !in_array($v['name'], $default_column) ? 1 : 0,
|
||||
'is_lists' => !in_array($v['name'], $default_column) ? 1 : 0,
|
||||
'update_time' => time(),
|
||||
];
|
||||
|
||||
if (isset($existing_columns[$v['name']])) {
|
||||
// 已有字段:保留用户前端配置,仅更新基础信息
|
||||
$old = $existing_columns[$v['name']];
|
||||
$column_data['view_type'] = $old['view_type'] ?? 'input';
|
||||
$column_data['query_type'] = $old['query_type'] ?? '=';
|
||||
$column_data['dict_type'] = $old['dict_type'] ?? '';
|
||||
$column_data['model'] = $old['model'] ?? '';
|
||||
$column_data['label_key'] = $old['label_key'] ?? '';
|
||||
$column_data['value_key'] = $old['value_key'] ?? '';
|
||||
$column_data['is_search'] = $old['is_search'] ?? 0;
|
||||
$column_data['is_order'] = $old['is_order'] ?? 0;
|
||||
$column_data['is_delete'] = $old['is_delete'] ?? 0;
|
||||
$column_data['create_time'] = $old['create_time'];
|
||||
unset($existing_columns[$v['name']]);
|
||||
|
||||
(new GenerateColumn())->where([
|
||||
['table_id', '=', $id],
|
||||
['column_name', '=', $v['name']]
|
||||
])->save($column_data);
|
||||
} else {
|
||||
// 新字段
|
||||
$column_data['view_type'] = 'input';
|
||||
$column_data['query_type'] = '=';
|
||||
$column_data['create_time'] = time();
|
||||
(new GenerateColumn())->create($column_data);
|
||||
}
|
||||
}
|
||||
|
||||
// 移除数据库中已不存在的字段
|
||||
$removed = array_keys($existing_columns);
|
||||
if (!empty($removed)) {
|
||||
(new GenerateColumn())->where([['table_id', '=', $id]])
|
||||
->whereIn('column_name', $removed)
|
||||
->delete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成代码
|
||||
* @param array $params
|
||||
|
||||
@ -26,6 +26,8 @@ class AdminApiRouteGenerator extends BaseGenerator
|
||||
*/
|
||||
public function replaceText()
|
||||
{
|
||||
$routeContent = $this->getRoute();
|
||||
|
||||
$old = [
|
||||
'{ROUTE_GROUP_NAME}',
|
||||
'{CLASS_COMMENT}',
|
||||
@ -51,8 +53,8 @@ class AdminApiRouteGenerator extends BaseGenerator
|
||||
$this->moduleName,
|
||||
$this->getRouteName(),
|
||||
$this->getRoutePath(),
|
||||
$this->getWithRoute(),
|
||||
$this->getRoute(),
|
||||
$this->getWithRoute($routeContent),
|
||||
$routeContent,
|
||||
$this->getBegin(),
|
||||
$this->getEnd(),
|
||||
];
|
||||
@ -93,12 +95,13 @@ class AdminApiRouteGenerator extends BaseGenerator
|
||||
if(file_exists($file))
|
||||
{
|
||||
$content = file_get_contents($file);
|
||||
$code_begin = 'USER_CODE_BEGIN -- '.$this->getTableName() . PHP_EOL;
|
||||
$code_end = 'USER_CODE_END -- '.$this->getTableName() . PHP_EOL;
|
||||
if(strpos($content,$code_begin) !== false && strpos($content,$code_end) !== false)
|
||||
$code_begin = 'USER_CODE_BEGIN -- '.$this->getTableName();
|
||||
$code_end = 'USER_CODE_END -- '.$this->getTableName();
|
||||
// 使用 \r?\n 替代 PHP_EOL,兼容不同系统的换行符
|
||||
$pattern = '/\/\/\s+' . preg_quote($code_begin, '/') . '\r?\n[\S\s]+?\/\/\s+' . preg_quote($code_end, '/') . '\r?\n?/';
|
||||
if(preg_match($pattern, $content))
|
||||
{
|
||||
// 清除相应对应代码块
|
||||
$pattern = "/\/\/\s+{$code_begin}[\S\s]+{$code_end}?/";
|
||||
// 非贪婪匹配 [?] 精确清除当前代码块,避免跨块误删
|
||||
$route = preg_replace($pattern, '', $content);
|
||||
}else{
|
||||
$route = $content;
|
||||
@ -302,7 +305,7 @@ use app\adminapi\middleware\AdminLog;";
|
||||
* 远程下拉Route
|
||||
* @return string
|
||||
*/
|
||||
public function getWithRoute()
|
||||
public function getWithRoute(string $existingContent = '')
|
||||
{
|
||||
if(!empty($this->addonName))
|
||||
{
|
||||
@ -312,10 +315,19 @@ use app\adminapi\middleware\AdminLog;";
|
||||
}
|
||||
|
||||
$content = '';
|
||||
$exists = [];
|
||||
foreach ($this->tableColumn as $column) {
|
||||
if (!empty($column['model'])) {
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::snake(substr($column['model'],$str+1)) . '_all';
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $exists)) continue; // 单表内去重
|
||||
$exists[] = $modelName;
|
||||
$with = Str::snake($modelName) . '_all';
|
||||
// 跨表去重:检查已有路由文件中是否已定义该路由
|
||||
$routeLine = "Route::get('".$with."'";
|
||||
if (!empty($existingContent) && strpos($existingContent, $routeLine) !== false) {
|
||||
continue;
|
||||
}
|
||||
$content.= PHP_EOL.' Route::get('."'".$with."'".','."'".$route_path.'get'.Str::studly($with)."'".');'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,6 +156,7 @@ abstract class BaseGenerator
|
||||
|
||||
/**
|
||||
* 生成文件到模块或runtime目录
|
||||
* generate_type: 2=下载ZIP, 3=同步到项目, 4=删除已同步的文件
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
@ -169,18 +170,63 @@ abstract class BaseGenerator
|
||||
$paths[] = $this->getObjectOutDir() . $this->getFileName();
|
||||
// 生成到插件中
|
||||
if ($this->addonName && method_exists($this, 'getAddonObjectOutDir')) $paths[] = $this->getAddonObjectOutDir() . $this->getFileName();
|
||||
}else if($this->table['generate_type'] == 4){
|
||||
// 删除模式下:对已存在且包含 USER_CODE_BEGIN 标记的文件,移除对应代码块后保存
|
||||
// 对只包含生成代码的新建文件(如 .vue / .ts),直接删除
|
||||
$paths[] = $this->getObjectOutDir() . $this->getFileName();
|
||||
if ($this->addonName && method_exists($this, 'getAddonObjectOutDir')) $paths[] = $this->getAddonObjectOutDir() . $this->getFileName();
|
||||
}
|
||||
|
||||
// 写入内容
|
||||
// 写入内容或删除
|
||||
if(!empty($this->getFileName()))
|
||||
{
|
||||
foreach ($paths as $path) {
|
||||
file_put_contents($path, $this->text);
|
||||
if($this->table['generate_type'] == 4) {
|
||||
// 删除已同步的代码
|
||||
$this->removeGeneratedFile($path);
|
||||
} else {
|
||||
file_put_contents($path, $this->text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生成器产出的文件。
|
||||
* 如果文件仅包含 USER_CODE_BEGIN/END 代码块且无其他业务逻辑,则直接删除文件;
|
||||
* 否则仅移除 USER_CODE_BEGIN...USER_CODE_END 之间的代码块内容。
|
||||
*/
|
||||
protected function removeGeneratedFile(string $path)
|
||||
{
|
||||
if (!file_exists($path)) return;
|
||||
|
||||
$content = file_get_contents($path);
|
||||
$code_begin = 'USER_CODE_BEGIN -- ';
|
||||
$code_end = 'USER_CODE_END -- ';
|
||||
|
||||
if (strpos($content, $code_begin) === false || strpos($content, $code_end) === false) {
|
||||
// 没有标记 → 可能是独立生成的文件,直接删除
|
||||
@unlink($path);
|
||||
return;
|
||||
}
|
||||
|
||||
// 移除所有 USER_CODE_BEGIN...USER_CODE_END 代码块
|
||||
$pattern = '/\/\/\s+' . preg_quote($code_begin, '/') . '.*?\r?\n[\S\s]+?\/\/\s+' . preg_quote($code_end, '/') . '.*?\r?\n?/';
|
||||
$content = preg_replace($pattern, '', $content);
|
||||
|
||||
// 去除多余空行
|
||||
$content = preg_replace("/(\r?\n){3,}/", "\n\n", $content);
|
||||
$content = trim($content);
|
||||
|
||||
if ($content === '' || preg_match('/^<\?php\s*$/', $content)) {
|
||||
// 文件内容为空或只剩PHP开头标记 → 直接删除
|
||||
@unlink($path);
|
||||
} else {
|
||||
file_put_contents($path, $content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文件信息
|
||||
|
||||
@ -30,6 +30,7 @@ class WebApiGenerator extends BaseGenerator
|
||||
*/
|
||||
public function replaceText()
|
||||
{
|
||||
$existingContent = $this->getImport();
|
||||
|
||||
$old = [
|
||||
'{NOTES}',
|
||||
@ -55,9 +56,9 @@ class WebApiGenerator extends BaseGenerator
|
||||
$this->getUCaseClassName(),
|
||||
$this->moduleName,
|
||||
$this->getRouteGroupName(),
|
||||
$this->getImport(),
|
||||
$existingContent,
|
||||
$this->getBegin(),
|
||||
$this->getWithRouteApi(),
|
||||
$this->getWithRouteApi($existingContent),
|
||||
$this->getEnd(),
|
||||
];
|
||||
$vmPath = $this->getvmPath('web_api');
|
||||
@ -113,12 +114,13 @@ class WebApiGenerator extends BaseGenerator
|
||||
{
|
||||
|
||||
$content = file_get_contents($file);
|
||||
$code_begin = 'USER_CODE_BEGIN -- '.$this->getTableName() . PHP_EOL;
|
||||
$code_end = 'USER_CODE_END -- '.$this->getTableName() . PHP_EOL;
|
||||
if(strpos($content,$code_begin) !== false && strpos($content,$code_end) !== false)
|
||||
$code_begin = 'USER_CODE_BEGIN -- '.$this->getTableName();
|
||||
$code_end = 'USER_CODE_END -- '.$this->getTableName();
|
||||
// 使用 \r?\n 替代 PHP_EOL,兼容不同系统的换行符
|
||||
$pattern = '/\/\/\s+' . preg_quote($code_begin, '/') . '\r?\n[\S\s]+?\/\/\s+' . preg_quote($code_end, '/') . '\r?\n?/';
|
||||
if(preg_match($pattern, $content))
|
||||
{
|
||||
// 清除相应对应代码块
|
||||
$pattern = "/\/\/\s+{$code_begin}[\S\s]+{$code_end}?/";
|
||||
// 非贪婪匹配 [?] 精确清除当前代码块,避免跨块误删
|
||||
$import = preg_replace($pattern, '', $content);
|
||||
}else{
|
||||
$import = $content;
|
||||
@ -240,7 +242,7 @@ class WebApiGenerator extends BaseGenerator
|
||||
}
|
||||
}
|
||||
|
||||
public function getWithRouteApi()
|
||||
public function getWithRouteApi(string $existingContent = '')
|
||||
{
|
||||
if(!empty($this->addonName))
|
||||
{
|
||||
@ -256,11 +258,17 @@ class WebApiGenerator extends BaseGenerator
|
||||
$with[] = Str::snake(substr($column['model'],$str+1));
|
||||
}
|
||||
}
|
||||
$with = array_unique($with); // 单表内去重
|
||||
if(!empty($with))
|
||||
{
|
||||
foreach ($with as $value)
|
||||
{
|
||||
$content.= 'export function getWith'.Str::studly($value).'List(params: Record<string,any>){'.PHP_EOL." return request.get('".$moduleName.'/'.$value."_all', {params})".PHP_EOL.'}';
|
||||
// 跨表去重:检查已有文件内容中是否已定义该函数,避免不同表共用同一模块时重复生成
|
||||
$funcName = 'getWith'.Str::studly($value).'List';
|
||||
if (!empty($existingContent) && preg_match('/\b' . preg_quote($funcName, '/') . '\b/', $existingContent)) {
|
||||
continue;
|
||||
}
|
||||
$content.= 'export function '.$funcName.'(params: Record<string,any>){'.PHP_EOL." return request.get('".$moduleName.'/'.$value."_all', {params})".PHP_EOL.'}';
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
|
||||
@ -497,12 +497,15 @@ class WebEditGenerator extends BaseGenerator
|
||||
public function getDictList()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column)
|
||||
{
|
||||
if(empty($column['dict_type']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (in_array($column['dict_type'], $isExist)) continue; // 去重
|
||||
$isExist[] = $column['dict_type'];
|
||||
$content.= 'let '.$column['column_name'].'List = ref([])'.PHP_EOL.'const '.$column['column_name'].'DictList = async () => {'.PHP_EOL.$column['column_name'].'List.value = await (await useDictionary(' ."'".$column['dict_type']."'".')).data.dictionary'.PHP_EOL.'}'.PHP_EOL. $column['column_name'].'DictList();'.PHP_EOL;
|
||||
if ($column['view_type'] == 'radio' || $column['view_type'] == 'select') {
|
||||
$content .= 'watch(() => '.$column['column_name'].'List.value, () => { formData.'.$column['column_name'].' = '.$column['column_name'].'List.value[0].value })'.PHP_EOL;
|
||||
@ -524,6 +527,7 @@ class WebEditGenerator extends BaseGenerator
|
||||
{
|
||||
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column)
|
||||
{
|
||||
if(empty($column['model']))
|
||||
@ -531,7 +535,10 @@ class WebEditGenerator extends BaseGenerator
|
||||
continue;
|
||||
}
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::camel(substr($column['model'],$str+1));
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $isExist)) continue; // 去重
|
||||
$isExist[] = $modelName;
|
||||
$with = Str::camel($modelName);
|
||||
$content.= PHP_EOL.'const '. Str::camel($column['column_name']).'List = ref([] as any[])'.PHP_EOL;
|
||||
$content.= 'const set'.Str::studly($column['column_name']).'List = async () => {'.PHP_EOL.Str::camel($column['column_name']).'List.value = await (await getWith'.Str::studly($with).'List({})).data' .PHP_EOL.'}'
|
||||
.PHP_EOL.'set'.Str::studly($column['column_name']).'List()';
|
||||
@ -547,10 +554,14 @@ class WebEditGenerator extends BaseGenerator
|
||||
public function getEditWithApiPath()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column) {
|
||||
if (!empty($column['model'])) {
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::camel(substr($column['model'],$str+1));
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $isExist)) continue;
|
||||
$isExist[] = $modelName;
|
||||
$with = Str::camel($modelName);
|
||||
$content.= ' get'.Str::studly($with).'List,';
|
||||
}
|
||||
}
|
||||
@ -564,10 +575,14 @@ class WebEditGenerator extends BaseGenerator
|
||||
public function getWithApiPath()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column) {
|
||||
if (!empty($column['model'])) {
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::camel(substr($column['model'],$str+1));
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $isExist)) continue;
|
||||
$isExist[] = $modelName;
|
||||
$with = Str::camel($modelName);
|
||||
$content.= ', getWith'.Str::studly($with).'List';
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,12 +105,15 @@ class WebEditPageGenerator extends BaseGenerator
|
||||
public function getDictList()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column)
|
||||
{
|
||||
if(empty($column['dict_type']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (in_array($column['dict_type'], $isExist)) continue; // 去重
|
||||
$isExist[] = $column['dict_type'];
|
||||
$content.= 'let '.$column['column_name'].'List = ref([])'.PHP_EOL.'const '.$column['column_name'].'DictList = async () => {'.PHP_EOL.$column['column_name'].'List.value = await (await useDictionary(' ."'".$column['dict_type']."'".')).data.dictionary'.PHP_EOL.'}'.PHP_EOL. $column['column_name'].'DictList();'.PHP_EOL;
|
||||
if ($column['view_type'] == 'radio' || $column['view_type'] == 'select') {
|
||||
$content .= 'watch(() => '.$column['column_name'].'List.value, () => { formData.'.$column['column_name'].' = '.$column['column_name'].'List.value[0].value })'.PHP_EOL;
|
||||
@ -510,6 +513,7 @@ class WebEditPageGenerator extends BaseGenerator
|
||||
public function getModelData()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column)
|
||||
{
|
||||
if(empty($column['model']))
|
||||
@ -517,7 +521,10 @@ class WebEditPageGenerator extends BaseGenerator
|
||||
continue;
|
||||
}
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::camel(substr($column['model'],$str+1));
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $isExist)) continue; // 去重
|
||||
$isExist[] = $modelName;
|
||||
$with = Str::camel($modelName);
|
||||
$content.= PHP_EOL.'const '. Str::camel($column['column_name']).'List = ref([] as any[])'.PHP_EOL;
|
||||
$content.= 'const set'.Str::studly($column['column_name']).'List = async () => {'.PHP_EOL.Str::camel($column['column_name']).'List.value = await (await getWith'.Str::studly($with).'List({})).data' .PHP_EOL.'}'
|
||||
.PHP_EOL.'set'.Str::studly($column['column_name']).'List()';
|
||||
@ -533,10 +540,14 @@ class WebEditPageGenerator extends BaseGenerator
|
||||
public function getEditWithApiPath()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column) {
|
||||
if (!empty($column['model'])) {
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::camel(substr($column['model'],$str+1));
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $isExist)) continue; // 去重
|
||||
$isExist[] = $modelName;
|
||||
$with = Str::camel($modelName);
|
||||
$content.= ', getWith'.Str::studly($with).'List';
|
||||
}
|
||||
}
|
||||
|
||||
@ -521,12 +521,15 @@ class WebIndexGenerator extends BaseGenerator
|
||||
public function getDictList()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column)
|
||||
{
|
||||
if(empty($column['dict_type']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (in_array($column['dict_type'], $isExist)) continue; // 去重
|
||||
$isExist[] = $column['dict_type'];
|
||||
$content.= 'const '.$column['column_name'].'List = ref([] as any[])'.PHP_EOL.'const '.$column['column_name'].'DictList = async () => {'.PHP_EOL.$column['column_name'].'List.value = await (await useDictionary(' ."'".$column['dict_type']."'".')).data.dictionary'.PHP_EOL.'}'.PHP_EOL. $column['column_name'].'DictList();'.PHP_EOL;
|
||||
}
|
||||
|
||||
@ -544,10 +547,14 @@ class WebIndexGenerator extends BaseGenerator
|
||||
public function getWithApiPath()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column) {
|
||||
if (!empty($column['model'])) {
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::camel(substr($column['model'],$str+1));
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $isExist)) continue; // 去重
|
||||
$isExist[] = $modelName;
|
||||
$with = Str::camel($modelName);
|
||||
$content.= ', getWith'.Str::studly($with).'List';
|
||||
}
|
||||
}
|
||||
@ -561,6 +568,7 @@ class WebIndexGenerator extends BaseGenerator
|
||||
public function getModelData()
|
||||
{
|
||||
$content = '';
|
||||
$isExist = [];
|
||||
foreach ($this->tableColumn as $column)
|
||||
{
|
||||
if(empty($column['model']))
|
||||
@ -568,7 +576,10 @@ class WebIndexGenerator extends BaseGenerator
|
||||
continue;
|
||||
}
|
||||
$str = strripos($column['model'],'\\');
|
||||
$with = Str::camel(substr($column['model'],$str+1));
|
||||
$modelName = substr($column['model'], $str + 1);
|
||||
if (in_array($modelName, $isExist)) continue; // 去重
|
||||
$isExist[] = $modelName;
|
||||
$with = Str::camel($modelName);
|
||||
$content.= PHP_EOL.'const '. Str::camel($column['column_name']).'List = ref([])'.PHP_EOL;
|
||||
$content.= 'const set'.Str::studly($column['column_name']).'List = async () => {'.PHP_EOL.Str::camel($column['column_name']).'List.value = await (await getWith'.Str::studly($with).'List({})).data' .PHP_EOL.'}'
|
||||
.PHP_EOL.'set'.Str::studly($column['column_name']).'List()';
|
||||
|
||||
@ -534,6 +534,9 @@ class UpgradeService extends BaseAdminService
|
||||
$depend_service->writeArrayToJsonFile($admin_original, $this->root_path . $admin_package);
|
||||
$depend_service->writeArrayToJsonFile($web_original, $this->root_path . $web_package);
|
||||
$depend_service->writeArrayToJsonFile($uni_app_original, $this->root_path . $uniapp_package);
|
||||
|
||||
(new CoreAddonInstallService(''))->rebuildPublicAdminAddonIndexJson();
|
||||
(new CoreAddonInstallService(''))->rebuildPublicWapAddonIndexJson();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -684,6 +687,7 @@ class UpgradeService extends BaseAdminService
|
||||
*/
|
||||
public function cloudBuild()
|
||||
{
|
||||
return true;
|
||||
try {
|
||||
( new CoreCloudBuildService() )->cloudBuild();
|
||||
} catch (CommonException $e) {
|
||||
@ -701,6 +705,7 @@ class UpgradeService extends BaseAdminService
|
||||
*/
|
||||
public function gteCloudBuildLog()
|
||||
{
|
||||
return true;
|
||||
$log = ( new CoreCloudBuildService() )->getBuildLog();
|
||||
if (empty($log)) return true;
|
||||
|
||||
@ -856,7 +861,8 @@ class UpgradeService extends BaseAdminService
|
||||
];
|
||||
|
||||
$upgrade = [
|
||||
'product_key' => BaseNiucloudClient::PRODUCT
|
||||
'product_key' => BaseNiucloudClient::PRODUCT,
|
||||
'framework_version' => config('version.version')
|
||||
];
|
||||
$apps = [];
|
||||
if (!$addon) {
|
||||
|
||||
@ -251,7 +251,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
|
||||
* @return void
|
||||
*/
|
||||
public function downloadAddon(string $addon, string $version) {
|
||||
$action_token = (new CoreModuleService())->getActionToken('download', ['data' => ['app_key' => $addon, 'version' => $version, 'product_key' => BaseNiucloudClient::PRODUCT ]]);
|
||||
$action_token = (new CoreModuleService())->getActionToken('download', ['data' => ['app_key' => $addon, 'framework_version' => config('version.version'), 'version' => $version, 'product_key' => BaseNiucloudClient::PRODUCT ]]);
|
||||
|
||||
$query = [
|
||||
'authorize_code' => $this->auth_code,
|
||||
|
||||
@ -29,10 +29,11 @@ class CoreAddonDevelopBuildService extends BaseCoreService
|
||||
protected $addon;
|
||||
protected $build_path;
|
||||
|
||||
public function __construct()
|
||||
public function __construct($scene = 'build')
|
||||
{
|
||||
parent::__construct();
|
||||
$this->root_path = project_path();
|
||||
$this->scene = $scene;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -205,9 +206,10 @@ class CoreAddonDevelopBuildService extends BaseCoreService
|
||||
|
||||
public function adminDist() {
|
||||
$admin_path = str_replace('/', DIRECTORY_SEPARATOR, $this->root_path . 'admin/dist/assets/addons/' . $this->addon . '/');
|
||||
if (!is_dir($admin_path) || !is_readable($admin_path)) throw new CommonException("请先在admin目录下执行 npm run build:addon {$this->addon}命令编译插件admin端");
|
||||
|
||||
if (count(scandir($admin_path)) === 2) throw new CommonException("请先在admin目录下执行 npm run build:addon {$this->addon}命令编译插件admin端");
|
||||
if (!is_dir($admin_path) || !is_readable($admin_path) || count(scandir($admin_path)) === 2) {
|
||||
if ($this->scene = 'build') throw new CommonException("请先在admin目录下执行 npm run build:addon {$this->addon}命令编译插件admin端");
|
||||
return;
|
||||
}
|
||||
|
||||
$addon_admin_path = $this->addon_path . 'dist' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR;
|
||||
if (is_dir($addon_admin_path)) del_target_dir($addon_admin_path, true);
|
||||
@ -235,9 +237,10 @@ class CoreAddonDevelopBuildService extends BaseCoreService
|
||||
if (!is_dir($uniapp_path)) return true;
|
||||
|
||||
$uniapp_path = str_replace('/', DIRECTORY_SEPARATOR, $this->root_path . 'uni-app/dist/build/h5/assets/addons/' . $this->addon . '/');
|
||||
if (!is_dir($uniapp_path) || !is_readable($uniapp_path)) throw new CommonException("请先在uni-app目录下执行 npm run build:h5:addon {$this->addon}命令编译插件wap端");
|
||||
|
||||
if (count(scandir($uniapp_path)) === 2) throw new CommonException("请先在uni-app目录下执行 npm run build:h5:addon {$this->addon}命令编译插件wap端");
|
||||
if (!is_dir($uniapp_path) || !is_readable($uniapp_path) || count(scandir($uniapp_path)) === 2) {
|
||||
if ($this->scene = 'build') throw new CommonException("请先在uni-app目录下执行 npm run build:h5:addon {$this->addon}命令编译插件wap端");
|
||||
return;
|
||||
}
|
||||
|
||||
$addon_uniapp_path = $this->addon_path . 'dist' . DIRECTORY_SEPARATOR . 'wap' . DIRECTORY_SEPARATOR;
|
||||
if (is_dir($addon_uniapp_path)) del_target_dir($addon_uniapp_path, true);
|
||||
@ -249,9 +252,7 @@ class CoreAddonDevelopBuildService extends BaseCoreService
|
||||
if (!is_dir($uniapp_path)) return true;
|
||||
|
||||
$uniapp_path = str_replace('/', DIRECTORY_SEPARATOR, $this->root_path . 'uni-app/dist/mp-weixin-addons/' . $this->addon . '/');
|
||||
if (!is_dir($uniapp_path) || !is_readable($uniapp_path)) throw new CommonException("请先在uni-app目录下执行 npm run build:mp-weixin:addon {$this->addon}命令编译插件微信小程序");
|
||||
|
||||
if (count(scandir($uniapp_path)) === 2) throw new CommonException("请先在uni-app目录下执行 npm run build:mp-weixin:addon {$this->addon}命令编译插件微信小程序");
|
||||
if (!is_dir($uniapp_path) || !is_readable($uniapp_path) || count(scandir($uniapp_path)) === 2) return;
|
||||
|
||||
$addon_uniapp_path = $this->addon_path . 'dist' . DIRECTORY_SEPARATOR . 'mp-weixin' . DIRECTORY_SEPARATOR;
|
||||
if (is_dir($addon_uniapp_path)) del_target_dir($addon_uniapp_path, true);
|
||||
|
||||
@ -629,7 +629,7 @@ class CoreAddonInstallService extends CoreAddonBaseService
|
||||
if ($site_num) throw new CommonException('APP_NOT_ALLOW_UNINSTALL');
|
||||
}
|
||||
|
||||
(new CoreAddonDevelopBuildService())->build($this->addon);
|
||||
(new CoreAddonDevelopBuildService('uninstall'))->build($this->addon);
|
||||
|
||||
//执行插件卸载方法
|
||||
$class = "addon\\" . $this->addon . "\\" . 'Addon';
|
||||
@ -642,6 +642,9 @@ class CoreAddonInstallService extends CoreAddonBaseService
|
||||
if (!$this->uninstallSql()) throw new AddonException('ADDON_SQL_FAIL');
|
||||
if (!$this->uninstallDir()) throw new AddonException('ADDON_DIR_FAIL');
|
||||
|
||||
$this->rebuildPublicAdminAddonIndexJson();
|
||||
$this->rebuildPublicWapAddonIndexJson();
|
||||
|
||||
// 卸载菜单
|
||||
$this->uninstallMenu();
|
||||
|
||||
@ -789,16 +792,35 @@ class CoreAddonInstallService extends CoreAddonBaseService
|
||||
|
||||
// 扫描 addons 目录下的所有子目录作为插件 keys
|
||||
$keys = [];
|
||||
$manifests = [];
|
||||
if (is_dir($addons_dir)) {
|
||||
$keys = get_files_by_dir($addons_dir);
|
||||
// 合并各插件的 manifest.json 到 index.json,减少前端 N 次 HTTP 请求
|
||||
foreach ($keys as $key) {
|
||||
$manifest_file = $addons_dir . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . 'manifest.json';
|
||||
if (is_file($manifest_file)) {
|
||||
$manifest_data = $this->jsonFileToArray($manifest_file);
|
||||
if (!empty($manifest_data)) {
|
||||
$manifests[$key] = $manifest_data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 更新 keys
|
||||
// 更新 keys 和生成时间戳(强制浏览器刷新缓存)
|
||||
$index_data['keys'] = $keys;
|
||||
$index_data['manifests'] = $manifests;
|
||||
$index_data['generatedAt'] = time();
|
||||
|
||||
// 写入文件
|
||||
$this->writeArrayToJsonFile($index_data, $index_file);
|
||||
|
||||
// 同时更新 public/admin 下的 index.html 时间戳,触发页面级缓存刷新
|
||||
$indexHtml = public_path() . 'admin' . DIRECTORY_SEPARATOR . 'index.html';
|
||||
if (is_file($indexHtml)) {
|
||||
touch($indexHtml);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -816,16 +838,34 @@ class CoreAddonInstallService extends CoreAddonBaseService
|
||||
|
||||
// 扫描 addons 目录下的所有子目录作为插件 keys
|
||||
$keys = [];
|
||||
$manifests = [];
|
||||
if (is_dir($addons_dir)) {
|
||||
$keys = get_files_by_dir($addons_dir);
|
||||
foreach ($keys as $key) {
|
||||
$manifest_file = $addons_dir . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . 'manifest.json';
|
||||
if (is_file($manifest_file)) {
|
||||
$manifest_data = $this->jsonFileToArray($manifest_file);
|
||||
if (!empty($manifest_data)) {
|
||||
$manifests[$key] = $manifest_data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 更新 keys
|
||||
// 更新 keys 和生成时间戳(强制浏览器刷新缓存)
|
||||
$index_data['keys'] = $keys;
|
||||
$index_data['manifests'] = $manifests;
|
||||
$index_data['generatedAt'] = time();
|
||||
|
||||
// 写入文件
|
||||
$this->writeArrayToJsonFile($index_data, $index_file);
|
||||
|
||||
// 同时更新 public/wap 下的 index.html 时间戳,触发页面级缓存刷新
|
||||
$indexHtml = public_path() . 'wap' . DIRECTORY_SEPARATOR . 'index.html';
|
||||
if (is_file($indexHtml)) {
|
||||
touch($indexHtml);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -31,6 +31,35 @@ class CoreAddonService extends CoreAddonBaseService
|
||||
$this->model = new Addon();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将插件图标/封面拷贝到 public/addon/{key}/ 并返回公网 URL
|
||||
* 替代原来 image_to_base64 的做法,避免 base64 编码导致接口响应过大
|
||||
* @param string $sourcePath 源文件绝对路径
|
||||
* @param string $key 插件标识
|
||||
* @param string $type icon | cover
|
||||
* @return string 公网路径,如 /addon/shop/icon.png
|
||||
*/
|
||||
private function getAddonImagePublicUrl(string $sourcePath, string $key, string $type = 'icon'): string
|
||||
{
|
||||
$filename = $type === 'cover' ? 'cover.png' : 'icon.png';
|
||||
$targetDir = public_path() . 'addon' . DIRECTORY_SEPARATOR . $key;
|
||||
$targetFile = $targetDir . DIRECTORY_SEPARATOR . $filename;
|
||||
|
||||
if (is_file($targetFile)) {
|
||||
return "/addon/{$key}/{$filename}";
|
||||
}
|
||||
|
||||
if (is_file($sourcePath)) {
|
||||
if (!is_dir($targetDir)) {
|
||||
mkdir($targetDir, 0777, true);
|
||||
}
|
||||
copy($sourcePath, $targetFile);
|
||||
return "/addon/{$key}/{$filename}";
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getInitList()
|
||||
{
|
||||
return [
|
||||
@ -84,8 +113,8 @@ class CoreAddonService extends CoreAddonBaseService
|
||||
foreach ($files as $path) {
|
||||
$data = $this->getAddonConfig($path);
|
||||
if (isset($data['key'])) {
|
||||
$data['icon'] = is_file($data['icon']) ? image_to_base64($data['icon']) : '';
|
||||
$data['cover'] = is_file($data['cover']) ? image_to_base64($data['cover']) : '';
|
||||
$data['icon'] = $this->getAddonImagePublicUrl($data['icon'], $data['key'], 'icon');
|
||||
$data['cover'] = $this->getAddonImagePublicUrl($data['cover'], $data['key'], 'cover');
|
||||
$key = $data['key'];
|
||||
$data['install_info'] = $install_addon_list[$key] ?? [];
|
||||
$data['is_download'] = true;
|
||||
@ -230,7 +259,8 @@ class CoreAddonService extends CoreAddonBaseService
|
||||
$addon_list = $this->model->where([['status', '=', AddonDict::ON]])->append(['status_name'])->column('title, icon, key, desc, status, type, support_app', 'key');
|
||||
if (!empty($addon_list)) {
|
||||
foreach ($addon_list as &$data) {
|
||||
$data['icon'] = is_file($data['icon']) ? image_to_base64($data['icon']) : '';
|
||||
// DB 存储的相对路径 addon/{key}/icon.png 已在 public 下,直接返回公网 URL
|
||||
$data['icon'] = $this->getAddonImagePublicUrl(public_path() . $data['icon'], $data['key'], 'icon');
|
||||
}
|
||||
}
|
||||
return $addon_list;
|
||||
@ -253,8 +283,8 @@ class CoreAddonService extends CoreAddonBaseService
|
||||
if (isset($data['key'])) {
|
||||
$key = $data['key'];
|
||||
$data['install_info'] = $install_addon_list[$key] ?? [];
|
||||
$data['icon'] = is_file($data['icon']) ? image_to_base64($data['icon']) : '';
|
||||
$data['cover'] = is_file($data['cover']) ? image_to_base64($data['cover']) : '';
|
||||
$data['icon'] = $this->getAddonImagePublicUrl($data['icon'], $data['key'], 'icon');
|
||||
$data['cover'] = $this->getAddonImagePublicUrl($data['cover'], $data['key'], 'cover');
|
||||
$data['is_download'] = true;
|
||||
$data['type_name'] = empty($data['type']) ? '' : AddonDict::getType()[$data['type']] ?? '';
|
||||
$list[$key] = $data;
|
||||
@ -283,8 +313,8 @@ class CoreAddonService extends CoreAddonBaseService
|
||||
|
||||
$data = $core_addon_service->getAddonConfig($key);
|
||||
if (isset($data['key'])) {
|
||||
$data['icon'] = is_file($data['icon']) ? image_to_base64($data['icon']) : '';
|
||||
$data['cover'] = is_file($data['cover']) ? image_to_base64($data['cover']) : '';
|
||||
$data['icon'] = $this->getAddonImagePublicUrl($data['icon'], $data['key'], 'icon');
|
||||
$data['cover'] = $this->getAddonImagePublicUrl($data['cover'], $data['key'], 'cover');
|
||||
$data['type_name'] = empty($data['type']) ? '' : AddonDict::getType()[$data['type']] ?? '';
|
||||
}
|
||||
if (isset($data['support_app']) && !empty($data['support_app'])) {
|
||||
|
||||
@ -28,7 +28,8 @@ class CoreModuleService extends BaseNiucloudClient
|
||||
$params = [
|
||||
'code' => $this->code,
|
||||
'secret' => $this->secret,
|
||||
'product_key' => self::PRODUCT
|
||||
'product_key' => self::PRODUCT,
|
||||
'framework_version' => config('version.version')
|
||||
];
|
||||
return $this->httpGet('member_app_all', $params);
|
||||
}
|
||||
|
||||
@ -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');
|
||||
@ -131,7 +131,7 @@ class CoreWeappCloudService extends CoreCloudBaseService
|
||||
{
|
||||
$site_addon = $this->config[ 'addon' ];
|
||||
foreach ($site_addon as $addon) {
|
||||
$src = root_path() . 'addon' . DIRECTORY_SEPARATOR . $this->addon . DIRECTORY_SEPARATOR . 'dist' . DIRECTORY_SEPARATOR . 'mp-weixin' . DIRECTORY_SEPARATOR;
|
||||
$src = root_path() . 'addon' . DIRECTORY_SEPARATOR . $addon . DIRECTORY_SEPARATOR . 'dist' . DIRECTORY_SEPARATOR . 'mp-weixin' . DIRECTORY_SEPARATOR;
|
||||
if (!is_dir($src)) continue;
|
||||
|
||||
dir_copy($src, $dir . DIRECTORY_SEPARATOR . 'mp-addons' . DIRECTORY_SEPARATOR . $addon);
|
||||
|
||||
@ -1 +0,0 @@
|
||||
import{bE as o}from"./index-3c23140f.js";import"vue";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";import"vue-router";import"/admin/assets/shared/admin-lang.js";export{o as default};
|
||||
1
niucloud/public/admin/assets/App-f42eb577.js
Normal file
1
niucloud/public/admin/assets/App-f42eb577.js
Normal file
@ -0,0 +1 @@
|
||||
import{bE as o}from"./index-9941e00a.js";import"vue";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";import"vue-router";import"/admin/assets/shared/admin-lang.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
1
niucloud/public/admin/assets/Verify-44fa1232.js
Normal file
1
niucloud/public/admin/assets/Verify-44fa1232.js
Normal file
@ -0,0 +1 @@
|
||||
import z from"./VerifySlide-1e0d2d3b.js";import g from"./VerifyPoints-367391cc.js";import{toRefs as k,ref as c,computed as w,watchEffect as T,withDirectives as V,openBlock as m,createElementBlock as u,normalizeClass as y,createElementVNode as r,normalizeStyle as d,createTextVNode as B,createCommentVNode as v,createBlock as N,resolveDynamicComponent as C,vShow as j}from"vue";import{_ as E}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-23a18f92.js";import"./index-9941e00a.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";import"vue-router";import"/admin/assets/shared/admin-lang.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(s){const{captchaType:i,figure:e,arith:t,mode:a,vSpace:S,explain:f,imgSize:R,blockSize:W,barSize:A}=k(s),o=c(!1),n=c(void 0),l=c(void 0),p=c({}),h=w(()=>a.value=="pop"?o.value:!0),b=()=>{p.value.refresh&&p.value.refresh()},x=()=>{o.value=!1,b()},_=()=>{a.value=="pop"&&(o.value=!0)};return T(()=>{switch(i.value){case"blockPuzzle":n.value="2",l.value="VerifySlide";break;case"clickWord":n.value="",l.value="VerifyPoints";break}}),{clickShow:o,verifyType:n,componentType:l,instance:p,showBox:h,closeBox:x,show:_}}},P={key:0,class:"verifybox-top"},D=r("i",{class:"iconfont icon-close"},null,-1),q=[D];function I(s,i,e,t,a,S){return V((m(),u("div",{class:y(e.mode=="pop"?"mask":"")},[r("div",{class:y(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(m(),u("div",P,[B(" 请完成安全验证 "),r("span",{class:"verifybox-close",onClick:i[0]||(i[0]=(...f)=>t.closeBox&&t.closeBox(...f))},q)])):v("",!0),r("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(m(),N(C(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"])):v("",!0)],4)],6)],2)),[[j,t.showBox]])}const te=E(O,[["render",I]]);export{te as default};
|
||||
@ -1 +0,0 @@
|
||||
import z from"./VerifySlide-20cd7405.js";import g from"./VerifyPoints-0b93c695.js";import{toRefs as k,ref as c,computed as w,watchEffect as T,withDirectives as V,openBlock as m,createElementBlock as u,normalizeClass as y,createElementVNode as r,normalizeStyle as d,createTextVNode as B,createCommentVNode as v,createBlock as N,resolveDynamicComponent as C,vShow as j}from"vue";import{_ as E}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-18b72e3c.js";import"./index-3c23140f.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";import"vue-router";import"/admin/assets/shared/admin-lang.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(s){const{captchaType:i,figure:e,arith:t,mode:a,vSpace:S,explain:f,imgSize:R,blockSize:W,barSize:A}=k(s),o=c(!1),n=c(void 0),l=c(void 0),p=c({}),h=w(()=>a.value=="pop"?o.value:!0),b=()=>{p.value.refresh&&p.value.refresh()},x=()=>{o.value=!1,b()},_=()=>{a.value=="pop"&&(o.value=!0)};return T(()=>{switch(i.value){case"blockPuzzle":n.value="2",l.value="VerifySlide";break;case"clickWord":n.value="",l.value="VerifyPoints";break}}),{clickShow:o,verifyType:n,componentType:l,instance:p,showBox:h,closeBox:x,show:_}}},P={key:0,class:"verifybox-top"},D=r("i",{class:"iconfont icon-close"},null,-1),q=[D];function I(s,i,e,t,a,S){return V((m(),u("div",{class:y(e.mode=="pop"?"mask":"")},[r("div",{class:y(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(m(),u("div",P,[B(" 请完成安全验证 "),r("span",{class:"verifybox-close",onClick:i[0]||(i[0]=(...f)=>t.closeBox&&t.closeBox(...f))},q)])):v("",!0),r("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(m(),N(C(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"])):v("",!0)],4)],6)],2)),[[j,t.showBox]])}const te=E(O,[["render",I]]);export{te as default};
|
||||
@ -1 +0,0 @@
|
||||
import{r as K,a as V,b as F,c as G}from"./index-18b72e3c.js";import{toRefs as X,getCurrentInstance as Y,ref as o,reactive as v,onMounted as Q,openBlock as H,createElementBlock as I,createElementVNode as l,normalizeStyle as A,withDirectives as U,vShow as Z,Fragment as $,renderList as ee,toDisplayString as E,nextTick as te}from"vue";import{_ as ie}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-3c23140f.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";import"vue-router";import"/admin/assets/shared/admin-lang.js";const ae={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,g){const{mode:_,captchaType:e,vSpace:L,imgSize:R,barSize:c}=X(N),{proxy:n}=Y(),h=o(""),z=o(3),f=v([]),i=v([]),r=o(1),O=o(""),w=v([]),m=o(""),u=v({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=v([]),d=o(""),b=o(void 0),x=o(void 0),j=o(!0),C=o(!0),J=()=>{f.splice(0,f.length),i.splice(0,i.length),r.value=1,W(),te(()=>{const{imgHeight:a,imgWidth:t,barHeight:p,barWidth:s}=K(n);u.imgHeight=a,u.imgWidth=t,u.barHeight=p,u.barWidth=s,n.$parent.$emit("ready",n)})};Q(()=>{J(),n.$el.onselectstart=function(){return!1}});const S=o(null),q=a=>{if(i.push(k(S,a)),r.value==z.value){r.value=T(k(S,a));const t=M(i,u);i.length=0,i.push(...t),setTimeout(()=>{const p=h.value?V(m.value+"---"+JSON.stringify(i),h.value):m.value+"---"+JSON.stringify(i),s={captchaType:e.value,captcha_code:h.value?V(JSON.stringify(i),h.value):JSON.stringify(i),captcha_key:m.value};F(s).then(B=>{B.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,P()},1500),n.$parent.$emit("success",{captchaVerification:p})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{P()},700))})},400)}r.value<z.value&&(r.value=T(k(S,a)))},k=function(a,t){const p=t.offsetX,s=t.offsetY;return{x:p,y:s}},T=function(a){return y.push(Object.assign({},a)),r.value+1},P=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,f.splice(0,f.length),i.splice(0,i.length),r.value=1,W(),d.value="验证失败",j.value=!0};function W(){const a={captchaType:e.value};G(a).then(t=>{t.code==1?(O.value=t.data.originalImageBase64,m.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const M=function(a,t){return a.map(s=>{const B=Math.round(310*s.x/parseInt(t.imgWidth)),D=Math.round(155*s.y/parseInt(t.imgHeight));return{x:B,y:D}})};return{secretKey:h,checkNum:z,fontPos:f,checkPosArr:i,num:r,pointBackImgBase:O,pointTextList:w,backToken:m,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:J,canvas:S,canvasClick:q,getMousePos:k,createPoint:T,refresh:P,getPictrue:W,pointTransfrom:M}}},ne={style:{position:"relative"}},oe={class:"verify-img-out"},re=l("i",{class:"iconfont icon-refresh"},null,-1),se=[re],ce=["src"],le={class:"verify-msg"};function he(N,g,_,e,L,R){return H(),I("div",ne,[l("div",oe,[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"})},[U(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:g[0]||(g[0]=(...c)=>e.refresh&&e.refresh(...c))},se,512),[[Z,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:g[1]||(g[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"})},E(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,E(e.text),1)],4)])}const _e=ie(ae,[["render",he]]);export{_e as default};
|
||||
1
niucloud/public/admin/assets/VerifyPoints-367391cc.js
Normal file
1
niucloud/public/admin/assets/VerifyPoints-367391cc.js
Normal file
@ -0,0 +1 @@
|
||||
import{r as K,a as V,b as F,c as G}from"./index-23a18f92.js";import{toRefs as X,getCurrentInstance as Y,ref as o,reactive as v,onMounted as Q,openBlock as H,createElementBlock as I,createElementVNode as l,normalizeStyle as A,withDirectives as U,vShow as Z,Fragment as $,renderList as ee,toDisplayString as E,nextTick as te}from"vue";import{_ as ie}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-9941e00a.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";import"vue-router";import"/admin/assets/shared/admin-lang.js";const ae={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,g){const{mode:_,captchaType:e,vSpace:L,imgSize:R,barSize:c}=X(N),{proxy:n}=Y(),h=o(""),z=o(3),f=v([]),i=v([]),r=o(1),O=o(""),w=v([]),m=o(""),u=v({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=v([]),d=o(""),b=o(void 0),x=o(void 0),j=o(!0),C=o(!0),J=()=>{f.splice(0,f.length),i.splice(0,i.length),r.value=1,W(),te(()=>{const{imgHeight:a,imgWidth:t,barHeight:p,barWidth:s}=K(n);u.imgHeight=a,u.imgWidth=t,u.barHeight=p,u.barWidth=s,n.$parent.$emit("ready",n)})};Q(()=>{J(),n.$el.onselectstart=function(){return!1}});const S=o(null),q=a=>{if(i.push(k(S,a)),r.value==z.value){r.value=T(k(S,a));const t=M(i,u);i.length=0,i.push(...t),setTimeout(()=>{const p=h.value?V(m.value+"---"+JSON.stringify(i),h.value):m.value+"---"+JSON.stringify(i),s={captchaType:e.value,captcha_code:h.value?V(JSON.stringify(i),h.value):JSON.stringify(i),captcha_key:m.value};F(s).then(B=>{B.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,P()},1500),n.$parent.$emit("success",{captchaVerification:p})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{P()},700))})},400)}r.value<z.value&&(r.value=T(k(S,a)))},k=function(a,t){const p=t.offsetX,s=t.offsetY;return{x:p,y:s}},T=function(a){return y.push(Object.assign({},a)),r.value+1},P=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,f.splice(0,f.length),i.splice(0,i.length),r.value=1,W(),d.value="验证失败",j.value=!0};function W(){const a={captchaType:e.value};G(a).then(t=>{t.code==1?(O.value=t.data.originalImageBase64,m.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const M=function(a,t){return a.map(s=>{const B=Math.round(310*s.x/parseInt(t.imgWidth)),D=Math.round(155*s.y/parseInt(t.imgHeight));return{x:B,y:D}})};return{secretKey:h,checkNum:z,fontPos:f,checkPosArr:i,num:r,pointBackImgBase:O,pointTextList:w,backToken:m,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:J,canvas:S,canvasClick:q,getMousePos:k,createPoint:T,refresh:P,getPictrue:W,pointTransfrom:M}}},ne={style:{position:"relative"}},oe={class:"verify-img-out"},re=l("i",{class:"iconfont icon-refresh"},null,-1),se=[re],ce=["src"],le={class:"verify-msg"};function he(N,g,_,e,L,R){return H(),I("div",ne,[l("div",oe,[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"})},[U(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:g[0]||(g[0]=(...c)=>e.refresh&&e.refresh(...c))},se,512),[[Z,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:g[1]||(g[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"})},E(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,E(e.text),1)],4)])}const _e=ie(ae,[["render",he]]);export{_e as default};
|
||||
1
niucloud/public/admin/assets/VerifySlide-1e0d2d3b.js
Normal file
1
niucloud/public/admin/assets/VerifySlide-1e0d2d3b.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/access-10259a1a.js
Normal file
1
niucloud/public/admin/assets/access-10259a1a.js
Normal file
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/access-1abeddab.js
Normal file
1
niucloud/public/admin/assets/access-1abeddab.js
Normal file
@ -0,0 +1 @@
|
||||
import{ElTabPane as V,ElTabs as N,ElButton as S,ElStep as B,ElSteps as T,ElCol as j,ElImage as R,ElRow as q,ElCard as I}from"element-plus/es";import{defineComponent as $,ref as x,onMounted as D,openBlock as F,createElementBlock as M,createVNode as n,withCtx as s,createElementVNode as t,toDisplayString as l,unref as e,createTextVNode as f}from"vue";import{t as o}from"/admin/assets/shared/admin-lang.js";import{i as P}from"./index-9941e00a.js";import{g as Q}from"./aliapp-6b2768ef.js";import{useRoute as U,useRouter as z}from"vue-router";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";const G={class:"main-container"},H={class:"flex justify-between items-center"},J={class:"text-page-title"},K={class:"p-[20px]"},L={class:"panel-title !text-sm"},O={class:"text-[14px] font-[700]"},W={class:"text-[#999]"},X={class:"mt-[20px] mb-[40px] h-[32px]"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},ot=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),nt={class:"text-[14px] font-[700]"},lt={class:"text-[#999]"},at={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]"},Ct=$({__name:"access",setup(_t){const h=U(),d=z(),v=h.meta.title,_=x("/channel/aliapp"),p=x("");D(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,a)=>{const g=V,C=N,m=S,i=B,E=T,u=j,y=R,k=q,A=I;return F(),M("div",G,[n(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",H,[t("span",J,l(e(v)),1)]),n(C,{modelValue:_.value,"onUpdate:modelValue":a[0]||(a[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[n(g,{label:e(o)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",K,[t("h3",L,l(e(o)("weappInlet")),1),n(k,null,{default:s(()=>[n(u,{span:20},{default:s(()=>[n(E,{active:4,direction:"vertical"},{default:s(()=>[n(i,null,{title:s(()=>[t("p",O,l(e(o)("weappAttestation")),1)]),description:s(()=>[t("span",W,l(e(o)("weappAttest")),1),t("div",X,[n(m,{type:"primary",onClick:a[1]||(a[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[f(l(e(o)("clickAccess")),1)]),_:1})])]),_:1}),n(i,null,{title:s(()=>[t("p",Y,l(e(o)("weappSetting")),1)]),description:s(()=>[t("span",Z,l(e(o)("emplace")),1),t("div",tt,[n(m,{type:"primary",plain:"",onClick:a[2]||(a[2]=r=>e(d).push("/channel/aliapp/config"))},{default:s(()=>[f(l(e(o)("weappSettingBtn")),1)]),_:1})])]),_:1}),n(i,null,{title:s(()=>[t("p",et,l(e(o)("uploadVersion")),1)]),description:s(()=>[t("span",st,l(e(o)("releaseCourse")),1),ot]),_:1}),n(i,null,{title:s(()=>[t("p",nt,l(e(o)("completeAccess")),1)]),description:s(()=>[t("span",lt,l(e(o)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),n(u,{span:4},{default:s(()=>[t("div",at,[n(y,{class:"w-[180px] h-[180px]",src:p.value?e(P)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,l(p.value?e(o)("fileErr"):e(o)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,l(e(o)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ct as default};
|
||||
1
niucloud/public/admin/assets/access-4ff5573f.js
Normal file
1
niucloud/public/admin/assets/access-4ff5573f.js
Normal file
@ -0,0 +1 @@
|
||||
import{ElTabPane as q,ElTabs as $,ElButton as j,ElStep as R,ElSteps as U,ElCol as z,ElImage as F,ElRow as I,ElCard as L}from"element-plus/es";import{defineComponent as M,ref as u,onMounted as D,onUnmounted as G,openBlock as w,createElementBlock as y,createVNode as n,withCtx as o,createElementVNode as s,toDisplayString as a,unref as e,createTextVNode as r,Fragment as P,createBlock as Q}from"vue";import{t}from"/admin/assets/shared/admin-lang.js";import{a1 as H,i as J}from"./index-9941e00a.js";import{g as K}from"./wechat-afbd2b7e.js";import{a as O}from"./wxoplatform-4dd89425.js";import{useRoute as X,useRouter as Y}from"vue-router";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";const Z={class:"main-container"},ee={class:"flex justify-between items-center"},te={class:"text-page-title"},ne={class:"p-[20px]"},oe={class:"panel-title !text-sm"},se={class:"text-[14px] font-[700]"},ae={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]"},me={class:"mt-[20px] mb-[40px] h-[32px]"},de={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]"},Ne=M({__name:"access",setup(ve){const C=X(),_=Y(),k=C.meta.title,h=u("/channel/wechat"),m=u(""),f=u({}),v=u({}),g=async()=>{await K().then(({data:l})=>{f.value=l,m.value=l.qr_code})};D(async()=>{await g(),await H().then(({data:l})=>{v.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&g()})}),G(()=>{document.removeEventListener("visibilitychange",()=>{})});const E=l=>{window.open(l,"_blank")},A=l=>{_.push({path:h.value})},S=()=>{O().then(({data:l})=>{window.open(l)})};return(l,c)=>{const d=q,V=$,i=j,x=R,B=U,b=z,N=F,T=I,W=L;return w(),y("div",Z,[n(W,{class:"card !border-none",shadow:"never"},{default:o(()=>[s("div",ee,[s("span",te,a(e(k)),1)]),n(V,{modelValue:h.value,"onUpdate:modelValue":c[0]||(c[0]=p=>h.value=p),class:"my-[20px]",onTabChange:A},{default:o(()=>[n(d,{label:e(t)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),n(d,{label:e(t)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),n(d,{label:e(t)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),n(d,{label:e(t)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),s("div",ne,[s("h3",oe,a(e(t)("wechatInlet")),1),n(T,null,{default:o(()=>[n(b,{span:20},{default:o(()=>[n(B,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:o(()=>[n(x,null,{title:o(()=>[s("p",se,a(e(t)("wechatAttestation")),1)]),description:o(()=>[s("span",ae,a(e(t)("wechatAttestation1")),1),s("div",le,[n(i,{type:"primary",onClick:c[1]||(c[1]=p=>E("https://mp.weixin.qq.com/"))},{default:o(()=>[r(a(e(t)("clickAccess")),1)]),_:1})])]),_:1}),n(x,null,{title:o(()=>[s("p",ce,a(e(t)("wechatSetting")),1)]),description:o(()=>[s("span",ie,a(e(t)("wechatSetting1")),1),s("div",pe,[v.value.app_id&&v.value.app_secret?(w(),y(P,{key:0},[n(i,{type:"primary",onClick:c[2]||(c[2]=p=>e(_).push("/channel/wechat/config"))},{default:o(()=>[r(a(f.value.app_id?e(t)("seeConfig"):e(t)("clickSetting")),1)]),_:1}),n(i,{type:"primary",plain:"",onClick:S},{default:o(()=>[r(a(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWechat")),1)]),_:1})],64)):(w(),Q(i,{key:1,type:"primary",onClick:c[3]||(c[3]=p=>e(_).push("/channel/wechat/config"))},{default:o(()=>[r(a(e(t)("clickSetting")),1)]),_:1}))])]),_:1}),n(x,null,{title:o(()=>[s("p",re,a(e(t)("wechatAccess")),1)]),description:o(()=>[s("span",_e,a(e(t)("wechatAccess")),1),s("div",me,[n(i,{type:"primary",plain:"",onClick:c[4]||(c[4]=p=>e(_).push("/channel/wechat/course"))},{default:o(()=>[r(a(e(t)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),n(b,{span:4},{default:o(()=>[s("div",de,[n(N,{class:"w-[180px] h-[180px]",src:m.value?e(J)(m.value):""},{error:o(()=>[s("div",ue,[s("span",null,a(m.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),s("div",he,[s("p",fe,a(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ne as default};
|
||||
@ -1 +0,0 @@
|
||||
import{ElTabPane as q,ElTabs as $,ElButton as j,ElStep as R,ElSteps as U,ElCol as z,ElImage as F,ElRow as I,ElCard as L}from"element-plus/es";import{defineComponent as M,ref as u,onMounted as D,onUnmounted as G,openBlock as w,createElementBlock as y,createVNode as n,withCtx as o,createElementVNode as s,toDisplayString as a,unref as e,createTextVNode as r,Fragment as P,createBlock as Q}from"vue";import{t}from"/admin/assets/shared/admin-lang.js";import{a1 as H,i as J}from"./index-3c23140f.js";import{g as K}from"./wechat-edb042fd.js";import{a as O}from"./wxoplatform-4cb0d0a0.js";import{useRoute as X,useRouter as Y}from"vue-router";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";const Z={class:"main-container"},ee={class:"flex justify-between items-center"},te={class:"text-page-title"},ne={class:"p-[20px]"},oe={class:"panel-title !text-sm"},se={class:"text-[14px] font-[700]"},ae={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]"},me={class:"mt-[20px] mb-[40px] h-[32px]"},de={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]"},Ne=M({__name:"access",setup(ve){const C=X(),_=Y(),k=C.meta.title,h=u("/channel/wechat"),m=u(""),f=u({}),v=u({}),g=async()=>{await K().then(({data:l})=>{f.value=l,m.value=l.qr_code})};D(async()=>{await g(),await H().then(({data:l})=>{v.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&g()})}),G(()=>{document.removeEventListener("visibilitychange",()=>{})});const E=l=>{window.open(l,"_blank")},A=l=>{_.push({path:h.value})},S=()=>{O().then(({data:l})=>{window.open(l)})};return(l,c)=>{const d=q,V=$,i=j,x=R,B=U,b=z,N=F,T=I,W=L;return w(),y("div",Z,[n(W,{class:"card !border-none",shadow:"never"},{default:o(()=>[s("div",ee,[s("span",te,a(e(k)),1)]),n(V,{modelValue:h.value,"onUpdate:modelValue":c[0]||(c[0]=p=>h.value=p),class:"my-[20px]",onTabChange:A},{default:o(()=>[n(d,{label:e(t)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),n(d,{label:e(t)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),n(d,{label:e(t)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),n(d,{label:e(t)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),s("div",ne,[s("h3",oe,a(e(t)("wechatInlet")),1),n(T,null,{default:o(()=>[n(b,{span:20},{default:o(()=>[n(B,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:o(()=>[n(x,null,{title:o(()=>[s("p",se,a(e(t)("wechatAttestation")),1)]),description:o(()=>[s("span",ae,a(e(t)("wechatAttestation1")),1),s("div",le,[n(i,{type:"primary",onClick:c[1]||(c[1]=p=>E("https://mp.weixin.qq.com/"))},{default:o(()=>[r(a(e(t)("clickAccess")),1)]),_:1})])]),_:1}),n(x,null,{title:o(()=>[s("p",ce,a(e(t)("wechatSetting")),1)]),description:o(()=>[s("span",ie,a(e(t)("wechatSetting1")),1),s("div",pe,[v.value.app_id&&v.value.app_secret?(w(),y(P,{key:0},[n(i,{type:"primary",onClick:c[2]||(c[2]=p=>e(_).push("/channel/wechat/config"))},{default:o(()=>[r(a(f.value.app_id?e(t)("seeConfig"):e(t)("clickSetting")),1)]),_:1}),n(i,{type:"primary",plain:"",onClick:S},{default:o(()=>[r(a(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWechat")),1)]),_:1})],64)):(w(),Q(i,{key:1,type:"primary",onClick:c[3]||(c[3]=p=>e(_).push("/channel/wechat/config"))},{default:o(()=>[r(a(e(t)("clickSetting")),1)]),_:1}))])]),_:1}),n(x,null,{title:o(()=>[s("p",re,a(e(t)("wechatAccess")),1)]),description:o(()=>[s("span",_e,a(e(t)("wechatAccess")),1),s("div",me,[n(i,{type:"primary",plain:"",onClick:c[4]||(c[4]=p=>e(_).push("/channel/wechat/course"))},{default:o(()=>[r(a(e(t)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),n(b,{span:4},{default:o(()=>[s("div",de,[n(N,{class:"w-[180px] h-[180px]",src:m.value?e(J)(m.value):""},{error:o(()=>[s("div",ue,[s("span",null,a(m.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),s("div",he,[s("p",fe,a(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ne as default};
|
||||
1
niucloud/public/admin/assets/access-7c483f4f.js
Normal file
1
niucloud/public/admin/assets/access-7c483f4f.js
Normal file
@ -0,0 +1 @@
|
||||
import{ElTabPane as T,ElTabs as B,ElButton as M,ElStep as R,ElSteps as W,ElCol as $,ElRow as q,ElCard as A}from"element-plus/es";import{defineComponent as I,ref as c,onMounted as L,onUnmounted as U,openBlock as j,createElementBlock as D,createVNode as e,withCtx as t,createElementVNode as o,toDisplayString as a,unref as n,createTextVNode as u}from"vue";import{t as s}from"/admin/assets/shared/admin-lang.js";import{g as F}from"./wechat-afbd2b7e.js";import{a1 as G}from"./index-9941e00a.js";import{useRoute as P,useRouter as z}from"vue-router";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";const H={class:"main-container"},J={class:"flex justify-between items-center"},K={class:"text-page-title"},O={class:"p-[20px]"},Q={class:"panel-title !text-sm"},X={class:"text-[14px] font-[700]"},Y={class:"text-[#999]"},Z={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]"},ot={class:"mt-[20px] mb-[40px] h-[32px]"},vt=I({__name:"access",setup(st){const h=P(),r=z(),x=h.meta.title,_=c("/channel/app"),b=c(""),g=c({}),y=c({}),f=async()=>{await F().then(({data:l})=>{g.value=l,b.value=l.qr_code})};L(async()=>{await f(),await G().then(({data:l})=>{y.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&f()})}),U(()=>{document.removeEventListener("visibilitychange",()=>{})});const C=l=>{window.open(l,"_blank")},w=l=>{r.push({path:_.value})};return(l,i)=>{const v=T,E=B,m=M,d=R,k=W,V=$,S=q,N=A;return j(),D("div",H,[e(N,{class:"card !border-none",shadow:"never"},{default:t(()=>[o("div",J,[o("span",K,a(n(x)),1)]),e(E,{modelValue:_.value,"onUpdate:modelValue":i[0]||(i[0]=p=>_.value=p),class:"my-[20px]",onTabChange:w},{default:t(()=>[e(v,{label:n(s)("accessFlow"),name:"/channel/app"},null,8,["label"]),e(v,{label:n(s)("versionManage"),name:"/channel/app/version"},null,8,["label"])]),_:1},8,["modelValue"]),o("div",O,[o("h3",Q,a(n(s)("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(d,null,{title:t(()=>[o("p",X,a(n(s)("uniappApp")),1)]),description:t(()=>[o("span",Y,a(n(s)("appAttestation1")),1),o("div",Z,[e(m,{type:"primary",onClick:i[1]||(i[1]=p=>C("https://dcloud.io/"))},{default:t(()=>[u(a(n(s)("toCreate")),1)]),_:1})])]),_:1}),e(d,null,{title:t(()=>[o("p",tt,a(n(s)("appSetting")),1)]),description:t(()=>[o("div",et,[e(m,{type:"primary",onClick:i[2]||(i[2]=p=>n(r).push("/channel/app/config"))},{default:t(()=>[u(a(n(s)("settingInfo")),1)]),_:1})])]),_:1}),e(d,null,{title:t(()=>[o("p",nt,a(n(s)("versionManage")),1)]),description:t(()=>[o("div",ot,[e(m,{type:"primary",plain:"",onClick:i[3]||(i[3]=p=>n(r).push("/channel/app/version"))},{default:t(()=>[u(a(n(s)("releaseVersion")),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1})])]),_:1})])}}});export{vt as default};
|
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
import{ElTabPane as T,ElTabs as B,ElButton as M,ElStep as R,ElSteps as W,ElCol as $,ElRow as q,ElCard as A}from"element-plus/es";import{defineComponent as I,ref as c,onMounted as L,onUnmounted as U,openBlock as j,createElementBlock as D,createVNode as e,withCtx as t,createElementVNode as o,toDisplayString as a,unref as n,createTextVNode as u}from"vue";import{t as s}from"/admin/assets/shared/admin-lang.js";import{g as F}from"./wechat-edb042fd.js";import{a1 as G}from"./index-3c23140f.js";import{useRoute as P,useRouter as z}from"vue-router";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";const H={class:"main-container"},J={class:"flex justify-between items-center"},K={class:"text-page-title"},O={class:"p-[20px]"},Q={class:"panel-title !text-sm"},X={class:"text-[14px] font-[700]"},Y={class:"text-[#999]"},Z={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]"},ot={class:"mt-[20px] mb-[40px] h-[32px]"},vt=I({__name:"access",setup(st){const h=P(),r=z(),x=h.meta.title,_=c("/channel/app"),b=c(""),g=c({}),y=c({}),f=async()=>{await F().then(({data:l})=>{g.value=l,b.value=l.qr_code})};L(async()=>{await f(),await G().then(({data:l})=>{y.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&f()})}),U(()=>{document.removeEventListener("visibilitychange",()=>{})});const C=l=>{window.open(l,"_blank")},w=l=>{r.push({path:_.value})};return(l,i)=>{const v=T,E=B,m=M,d=R,k=W,V=$,S=q,N=A;return j(),D("div",H,[e(N,{class:"card !border-none",shadow:"never"},{default:t(()=>[o("div",J,[o("span",K,a(n(x)),1)]),e(E,{modelValue:_.value,"onUpdate:modelValue":i[0]||(i[0]=p=>_.value=p),class:"my-[20px]",onTabChange:w},{default:t(()=>[e(v,{label:n(s)("accessFlow"),name:"/channel/app"},null,8,["label"]),e(v,{label:n(s)("versionManage"),name:"/channel/app/version"},null,8,["label"])]),_:1},8,["modelValue"]),o("div",O,[o("h3",Q,a(n(s)("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(d,null,{title:t(()=>[o("p",X,a(n(s)("uniappApp")),1)]),description:t(()=>[o("span",Y,a(n(s)("appAttestation1")),1),o("div",Z,[e(m,{type:"primary",onClick:i[1]||(i[1]=p=>C("https://dcloud.io/"))},{default:t(()=>[u(a(n(s)("toCreate")),1)]),_:1})])]),_:1}),e(d,null,{title:t(()=>[o("p",tt,a(n(s)("appSetting")),1)]),description:t(()=>[o("div",et,[e(m,{type:"primary",onClick:i[2]||(i[2]=p=>n(r).push("/channel/app/config"))},{default:t(()=>[u(a(n(s)("settingInfo")),1)]),_:1})])]),_:1}),e(d,null,{title:t(()=>[o("p",nt,a(n(s)("versionManage")),1)]),description:t(()=>[o("div",ot,[e(m,{type:"primary",plain:"",onClick:i[3]||(i[3]=p=>n(r).push("/channel/app/version"))},{default:t(()=>[u(a(n(s)("releaseVersion")),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1})])]),_:1})])}}});export{vt as default};
|
||||
@ -1 +0,0 @@
|
||||
import{ElTabPane as V,ElTabs as N,ElButton as S,ElStep as B,ElSteps as T,ElCol as j,ElImage as R,ElRow as q,ElCard as I}from"element-plus/es";import{defineComponent as $,ref as x,onMounted as D,openBlock as F,createElementBlock as M,createVNode as n,withCtx as s,createElementVNode as t,toDisplayString as l,unref as e,createTextVNode as f}from"vue";import{t as o}from"/admin/assets/shared/admin-lang.js";import{i as P}from"./index-3c23140f.js";import{g as Q}from"./aliapp-82f23aba.js";import{useRoute as U,useRouter as z}from"vue-router";import"pinia";import"@element-plus/icons-vue";import"axios";import"/admin/assets/shared/admin-lang.js";const G={class:"main-container"},H={class:"flex justify-between items-center"},J={class:"text-page-title"},K={class:"p-[20px]"},L={class:"panel-title !text-sm"},O={class:"text-[14px] font-[700]"},W={class:"text-[#999]"},X={class:"mt-[20px] mb-[40px] h-[32px]"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},ot=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),nt={class:"text-[14px] font-[700]"},lt={class:"text-[#999]"},at={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]"},Ct=$({__name:"access",setup(_t){const h=U(),d=z(),v=h.meta.title,_=x("/channel/aliapp"),p=x("");D(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,a)=>{const g=V,C=N,m=S,i=B,E=T,u=j,y=R,k=q,A=I;return F(),M("div",G,[n(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",H,[t("span",J,l(e(v)),1)]),n(C,{modelValue:_.value,"onUpdate:modelValue":a[0]||(a[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[n(g,{label:e(o)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",K,[t("h3",L,l(e(o)("weappInlet")),1),n(k,null,{default:s(()=>[n(u,{span:20},{default:s(()=>[n(E,{active:4,direction:"vertical"},{default:s(()=>[n(i,null,{title:s(()=>[t("p",O,l(e(o)("weappAttestation")),1)]),description:s(()=>[t("span",W,l(e(o)("weappAttest")),1),t("div",X,[n(m,{type:"primary",onClick:a[1]||(a[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[f(l(e(o)("clickAccess")),1)]),_:1})])]),_:1}),n(i,null,{title:s(()=>[t("p",Y,l(e(o)("weappSetting")),1)]),description:s(()=>[t("span",Z,l(e(o)("emplace")),1),t("div",tt,[n(m,{type:"primary",plain:"",onClick:a[2]||(a[2]=r=>e(d).push("/channel/aliapp/config"))},{default:s(()=>[f(l(e(o)("weappSettingBtn")),1)]),_:1})])]),_:1}),n(i,null,{title:s(()=>[t("p",et,l(e(o)("uploadVersion")),1)]),description:s(()=>[t("span",st,l(e(o)("releaseCourse")),1),ot]),_:1}),n(i,null,{title:s(()=>[t("p",nt,l(e(o)("completeAccess")),1)]),description:s(()=>[t("span",lt,l(e(o)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),n(u,{span:4},{default:s(()=>[t("div",at,[n(y,{class:"w-[180px] h-[180px]",src:p.value?e(P)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,l(p.value?e(o)("fileErr"):e(o)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,l(e(o)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ct as default};
|
||||
1
niucloud/public/admin/assets/account-39d2e522.js
Normal file
1
niucloud/public/admin/assets/account-39d2e522.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/act-17a11a18.js
Normal file
1
niucloud/public/admin/assets/act-17a11a18.js
Normal file
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-9941e00a.js";function r(){return e.get("tk_cps/driver/list")}function c(){return e.get("tk_cps/asyncact",{showErrorMessage:!0,showSuccessMessage:!0})}function n(t){return e.get(`tk_cps/shareinfo/${t}`)}function a(t){return e.get(`tk_cps/saveimg/${t}`,{showErrorMessage:!0,showSuccessMessage:!0})}function u(t){return e.get("tk_cps/act",{params:t})}function o(t){return e.get(`tk_cps/act/${t}`)}export{u as a,n as b,c,o as d,r as g,a as s};
|
||||
@ -1 +0,0 @@
|
||||
import{r as e}from"./index-3c23140f.js";function r(){return e.get("tk_cps/driver/list")}function c(){return e.get("tk_cps/asyncact",{showErrorMessage:!0,showSuccessMessage:!0})}function n(t){return e.get(`tk_cps/shareinfo/${t}`)}function a(t){return e.get(`tk_cps/saveimg/${t}`,{showErrorMessage:!0,showSuccessMessage:!0})}function u(t){return e.get("tk_cps/act",{params:t})}function o(t){return e.get(`tk_cps/act/${t}`)}export{u as a,n as b,c,o as d,r as g,a as s};
|
||||
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/act-9c3ebe34.js
Normal file
1
niucloud/public/admin/assets/act-9c3ebe34.js
Normal file
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/act-edit-1c52f3d9.js
Normal file
1
niucloud/public/admin/assets/act-edit-1c52f3d9.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/act-link-afbe72bb.js
Normal file
1
niucloud/public/admin/assets/act-link-afbe72bb.js
Normal file
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
1
niucloud/public/admin/assets/act-select-5ba4d4a8.js
Normal file
1
niucloud/public/admin/assets/act-select-5ba4d4a8.js
Normal file
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/actitem-36138a4c.js
Normal file
1
niucloud/public/admin/assets/actitem-36138a4c.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/actitem-edit-1973dd65.js
Normal file
1
niucloud/public/admin/assets/actitem-edit-1973dd65.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
import{r as t}from"./index-3c23140f.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};
|
||||
@ -1 +0,0 @@
|
||||
import{r as t}from"./index-3c23140f.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};
|
||||
1
niucloud/public/admin/assets/active-420ee558.js
Normal file
1
niucloud/public/admin/assets/active-420ee558.js
Normal file
@ -0,0 +1 @@
|
||||
import{r as n}from"./index-9941e00a.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};
|
||||
@ -1 +0,0 @@
|
||||
import{r as n}from"./index-3c23140f.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};
|
||||
1
niucloud/public/admin/assets/active-a3a18b22.js
Normal file
1
niucloud/public/admin/assets/active-a3a18b22.js
Normal file
@ -0,0 +1 @@
|
||||
import{r as t}from"./index-9941e00a.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 r(e){return t.post("seckill/delete",e,{showSuccessMessage:!0})}function u(){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,u as e,n as f,a as g,i as h,l as i,r 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};
|
||||
1
niucloud/public/admin/assets/active-d4d8d74e.js
Normal file
1
niucloud/public/admin/assets/active-d4d8d74e.js
Normal file
@ -0,0 +1 @@
|
||||
import{r as t}from"./index-9941e00a.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};
|
||||
@ -0,0 +1 @@
|
||||
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-7445f8e6.js";import"vue";import"./goods_default-f475acf5.js";import"/admin/assets/shared/admin-lang.js";import"./active-420ee558.js";import"./index-9941e00a.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.js";export{o as default};
|
||||
@ -0,0 +1 @@
|
||||
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-2d249da7.js";import"vue";import"./goods_default-b611c81b.js";import"/admin/assets/shared/admin-lang.js";import"./active-e0462dc6.js";import"./index-9941e00a.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.js";export{o as default};
|
||||
@ -0,0 +1 @@
|
||||
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-8ec19c0d.js";import"vue";import"./goods_default-995568ac.js";import"/admin/assets/shared/admin-lang.js";import"./active-d4d8d74e.js";import"./index-9941e00a.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.js";export{o as default};
|
||||
@ -1 +0,0 @@
|
||||
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-15046414.js";import"vue";import"./goods_default-247a7f2b.js";import"/admin/assets/shared/admin-lang.js";import"./active-8d72cbfe.js";import"./index-3c23140f.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.js";export{o as default};
|
||||
@ -1 +0,0 @@
|
||||
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-9a873646.js";import"vue";import"./goods_default-995568ac.js";import"/admin/assets/shared/admin-lang.js";import"./active-01dad16b.js";import"./index-3c23140f.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.js";export{o as default};
|
||||
@ -1 +0,0 @@
|
||||
import{_ as o}from"./active-detail-popup.vue_vue_type_script_setup_true_lang-879f8009.js";import"vue";import"./goods_default-87959339.js";import"/admin/assets/shared/admin-lang.js";import"./active-05c515e6.js";import"./index-3c23140f.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.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
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
1
niucloud/public/admin/assets/active-e0462dc6.js
Normal file
1
niucloud/public/admin/assets/active-e0462dc6.js
Normal file
@ -0,0 +1 @@
|
||||
import{r as t}from"./index-9941e00a.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};
|
||||
@ -1 +0,0 @@
|
||||
import{r as t}from"./index-3c23140f.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 r(e){return t.post("seckill/delete",e,{showSuccessMessage:!0})}function u(){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,u as e,n as f,a as g,i as h,l as i,r 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};
|
||||
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/actorder-5909ae0b.js
Normal file
1
niucloud/public/admin/assets/actorder-5909ae0b.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/actorder-edit-fc3c612e.js
Normal file
1
niucloud/public/admin/assets/actorder-edit-fc3c612e.js
Normal file
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
1
niucloud/public/admin/assets/add-6cab4437.js
Normal file
1
niucloud/public/admin/assets/add-6cab4437.js
Normal file
File diff suppressed because one or more lines are too long
1
niucloud/public/admin/assets/add-9ecd7e33.js
Normal file
1
niucloud/public/admin/assets/add-9ecd7e33.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
import{_ as o}from"./add-address.vue_vue_type_script_setup_true_lang-e6009f5d.js";import"vue";import"/admin/assets/shared/admin-lang.js";import"./index-3c23140f.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.js";import"./member-650ac470.js";import"./cloneDeep-3ad32d58.js";import"./isArrayLike-2d9dc100.js";export{o as default};
|
||||
1
niucloud/public/admin/assets/add-address-95eb1074.js
Normal file
1
niucloud/public/admin/assets/add-address-95eb1074.js
Normal file
@ -0,0 +1 @@
|
||||
import{_ as o}from"./add-address.vue_vue_type_script_setup_true_lang-e994d4e7.js";import"vue";import"/admin/assets/shared/admin-lang.js";import"./index-9941e00a.js";import"pinia";import"@element-plus/icons-vue";import"axios";import"vue-router";import"/admin/assets/shared/admin-lang.js";import"./member-9021ba26.js";import"./cloneDeep-3ad32d58.js";import"./isArrayLike-2d9dc100.js";export{o as default};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user