Unity3d IIS部署报错

Unity 中发布可以正常访问,但是发布到IIS就会出现错误提示

其实很简单我们让WebGL.linkerTarget开启WebAssembly

File -> Build Setting -> Player Setting –>Player 开启 Decompression Fallback

img_20211105134849

`The value of the ‘Access-Control-Allow-Origin‘ header in the response must not be the wildcard

详细错误信息 Access to XMLHttpRequest at ‘http://localhost:7894/Login’ from origin ‘http://localhost:8080′ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.


 

前端可以删除

// axios.defaults.withCredentials = true

 

或者后端可以加上

Access-Control-Allow-Credentials = true //允许携带验证信息

Element implicitly has an ‘any’ type because index expression is not of type ‘number’

就是上面的代码报的错:

解决:

给个any类型就行

[x as any]

vue数组更新不渲染页面

原因:

由于 JavaScript 的限制,Vue 不能检测以下变动的数组:

  1. 当你利用索引直接设置一个项时,例如:vm.items[indexOfItem] = newValue
  2. 当你修改数组的长度时,例如:vm.items.length = newLength

read more »

文件下载js-file-download

我这里是一个pdf文件,在页面按钮点击后希望实现文件下载功能,而不是在页面打开pdf预览

有一个插件很好https://github.com/kennethjiang/js-file-download read more »

vue 全局过滤器

我是用vue-cli创建的项目

首先我们创建src/filters/index.vue,用于存放filter方法 read more »

vue中v-html的内容替换和事件绑定

我们现在要处理一种情况,后台输出了一些html数据,但是希望将audio默认的标签,换成一个喇叭图片,类似百度翻译的发音图标。并能够播放音频

20210504200101 read more »

1 / 11 12345...10...尾页