AI编程问答网

  • 大家的提问
  • 我的提问
生成vue3项目
用户430065109
09月02日
|
浏览 10
后端
前端

[]

复制
分享
likeadmin安全配置,怎么做好安全处理,防止渗透
用户569795353
09月01日
|
浏览 11

[]

复制
分享
likeshop开源版,选省市区以后,需要再能选学校、年级、班级,然后填写学生姓名、家长姓名、家长联系方式。学校、年级、班级这三个信息前台不允许添加,只能在后台添加。
用户718633815
08月29日
|
浏览 29

[]

复制
分享
如何快速实现多端适配
用户028982121
08月25日
|
浏览 34
Java

[]

复制
分享
这个在知识库有数据上传以后发现,后端或者说消息队列,一直没给这组数据学习也就是向量化,前台一直显示未等待学习,找半天也不知道这数据有没有推上去并且开始学习向量化什么原因
用户478057543
08月20日
|
浏览 38

[]

复制
分享
export function useDictOptions<T = any>(options: Options) { const optionsData: any = reactive({}) const optionsKey = Object.keys(options) const apiLists = optionsKey.map((key) => { const value = options[key] optionsData[key] = [] return () => value.api(toRaw(value.params) || {}) }) const refresh = async () => { const res = await Promise.allSettled<Promise<any>>(apiLists.map((api) => api())) res.forEach((item, index) => { const key = optionsKey[index] if (item.status == 'fulfilled') { const { transformData } = options[key] const data = transformData ? transformData(item.value) : item.value optionsData[key] = data } }) } refresh() return { optionsData: optionsData as T, refresh } }
用户493773632
08月20日
|
浏览 34
前端

[]

复制
分享
export function useDictOptions<T = any>(options: Options) { const optionsData: any = reactive({}) const optionsKey = Object.keys(options) const apiLists = optionsKey.map((key) => { const value = options[key] optionsData[key] = [] return () => value.api(toRaw(value.params) || {}) }) const refresh = async () => { const res = await Promise.allSettled<Promise<any>>(apiLists.map((api) => api())) res.forEach((item, index) => { const key = optionsKey[index] if (item.status == 'fulfilled') { const { transformData } = options[key] const data = transformData ? transformData(item.value) : item.value optionsData[key] = data } }) } refresh() return { optionsData: optionsData as T, refresh } }
用户493773632
08月20日
|
浏览 29
开发编程

[]

复制
分享
export function useDictOptions<T = any>(options: Options) { const optionsData: any = reactive({}) const optionsKey = Object.keys(options) const apiLists = optionsKey.map((key) => { const value = options[key] optionsData[key] = [] return () => value.api(toRaw(value.params) || {}) }) const refresh = async () => { const res = await Promise.allSettled<Promise<any>>(apiLists.map((api) => api())) res.forEach((item, index) => { const key = optionsKey[index] if (item.status == 'fulfilled') { const { transformData } = options[key] const data = transformData ? transformData(item.value) : item.value optionsData[key] = data } }) } refresh() return { optionsData: optionsData as T, refresh } }
用户493773632
08月20日
|
浏览 32

[]

复制
分享
PHP 怎么判断 http 或者 https 的。
用户602593673
08月19日
|
浏览 37

[]

复制
分享
PHP 可以通过判断 `$_SERVER['HTTPS']` 变量来判断当前请求是否使用了 HTTPS 协议。该变量在使用 HTTPS 时会被设置为 'on',而在使用 HTTP 时会被设置为 undefined。 以下是一个示例代码,用于判断当前请求是否使用了 HTTPS: ```php <?php if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') { // 当前请求使用了 HTTPS echo "当前请求使用了 HTTPS 协议"; } else { // 当前请求使用了 HTTP echo "当前请求使用了 HTTP 协议"; } ?> ``` 这段代码会输出 "当前请求使用了 HTTPS 协议" 或者 "当前请求使用了 HTTP 协议",具体取决于当前请求的协议。 通过判断当前请求的协议,你可以在 PHP 中做出相应的处理,例如,在使用了 HTTPS 的情况下,为网页输出一个安全性标志或者自动跳转到 HTTPS 站点。
用户602593673
08月19日
|
浏览 40

[]

复制
分享