AI编程问答网
AI编程问答网
- 大家的提问
- 我的提问
likeshop开源版,选省市区以后,需要再能选学校、年级、班级,然后填写学生姓名、家长姓名、家长联系方式。学校、年级、班级这三个信息前台不允许添加,只能在后台添加。

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

用户478057543
08月20日 14:09
|
浏览 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日 12:25
|
浏览 26
前端
复制
分享
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日 12:24
|
浏览 23
开发编程
复制
分享
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日 12:24
|
浏览 25
复制
分享
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日 10:18
|
浏览 35
复制
分享