对大家有帮助的问答会被标记为“推荐”,看完课程过来浏览一下别人提的问题,会帮你学得更全面
跨域设置成功以后不报跨域问题了,但是报乍得已被 CORS 策略阻止:对印前检查请求的响应未通过访问控制检查:它没有 HTTP 正常状态。查的方法都没有解决
#写法二 data=[] for i in roles: #把meun_list 排序一下 按照id排序 role_list=i.to_dict() #字典的排序 按照id 排序 role_list['meun_list'] = sorted(role_list['meun_list'], key=lambda x: x['id']) #把role_list['meun_list']里面的children也排序一下 用一个for循环之后再去排序 for role in role_list['meun_list']: role['children'] = sorted(role['children'], key=lambda x: x['id']) data.append(role_list) return {"status":200,"msg":"查询角色成功","data":data}
让子节点里面的 children 顺序不一样 跟着课堂老师敲 发现上一级别按照id排序好了 但是子节点里面还是没有达到想要的结果。
尝试的用for循环遍历一下 然后更深一步把meun_list里面的children也做了一个排序。
感觉有点问题哈,点击上传图片后不应该直接服务器上就有图片吧,用户还没点击添加商品呢,万一用户不想添加商品了,那这个服务器上存的不就是没用的图片吗?
有点问题,只在前端页面删除的话没啥用呀,后端已经保存了所有的图片
It seems like there is an error related to the algorithm "H5256" not being supported. The error message indicates that the algorithm is not recognized or implemented in the JWT library you are using.
You may need to check the JWT library documentation to see which algorithms are supported and choose one of the supported algorithms for encoding the token. Commonly used algorithms include "HS256" for HMAC with SHA-256, "RS256" for RSA with SHA-256, and "ES256" for ECDSA with SHA-256.
Make sure to update the algorithm parameter in your code to a supported algorithm to resolve this error.
这个算法不支持了
可以用Select V2 虚拟列表选择器吗
<el-form-item label="角色" :label-width="formLabelWidth" prop="role_id"> <el-select-v2 v-model="edit_form.role_id" :options="options" placeholder="请选择角色" size="small" /> </el-form-item>
let roles = ref([]) const options = Array.from(roles).map(item => ({ value: item.id, label: item.name, })) let edit_form = reactive({ id: null, name: null, email: null, phone: null, nick_name: null, role_id: null, }) //获取角色列表 const get_role_list = () => { api.get_roles().then(res => { roles = res.data.data console.log(Array.from(roles).map(item => item)); }) }
主要是我这么做之后是no data不知是哪里有问题呢
这个技术老师在帮我解决之后,后端测试和postman上面都可以成功,但是到浏览器上面的时候,因为是默认的get请求方式,所以就失败了,但是视频里面为什么就没问题
const { defineConfig } = require('@vue/cli-service')
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: {
plugins: [
AutoImport.default({
resolvers: [ElementPlusResolver()]
})
,
Components.default({
resolvers: [ElementPlusResolver()]
})
]
}
})