原因:浏览器阻止了第三方的 Cookie 导致了页面接口一直调不通 备注:建议在Chrome 浏览器中开发项目 解决步骤: (1)打开chrome菜单并进入‘设置’ (2)滑到最下面展开高级 (3)进入‘内容设置’ -> 进入 Cookie (4)关闭‘阻止第三方 Cookie’
关闭‘阻止第三方 Cookie’ 的图片
原因:如果擅自修改了 router js 中的 mode 属性,则会引起该问题, 必须使用 mode 的默认属性 hash 解决:router.js 中mode 属性不要设置 (默认项目代码就是没设置的)
报错截图:
正确写法如下:
// 温度设置 computed windSelstateVal: { get: function () { return this.$store.state.publicInfo.attr.targetTemperature; }, set: function (val) { // this.$store.state.publicInfo.attr.targetTemperature = val; this.$store.dispatch('setDeviceStatus', { targetTemperature: val }) } }, } // 在html 中的 push-button 使用 v-model 使用该值 <push-button v-model="attr.val1" v-model="windSelstateVal" ></push-button>
// 加上这么一段css代码就可以了 // 使用 px 转 vm 功能的副作用 问题:content会引起部分浏览器下,图片不会显示 所以要加该样式 img{ content: initial !important; }
因设备列表接口有所变动,故需要厂商开发同学,手动改一下
// 在 build 下的 webpack.dev.conf.js 中找到 listUrl 替换一下即可 const listUrl = `https://ailabs-iot.aligenie.com/2364/1.0.11/dist/index.html#/?debugUrl=${url}`;
更新配置
// 在 build 下的 webpack.dev.conf.js 中找到 listUrl 替换一下即可 const listUrl = `https://ailabs-iot.aligenie.com/2364/1.0.12/dist/index.html#/?debugUrl=${url}`; 替换完成以后,重新跑一下项目 npm run dev
注:解决子设备在列表中不展示的问题
// 在项目中找到 build -> webpack.dev.conf.js , 在按下图中修改链接 // 最新设备列表链接如下: const listUrl = `https://ailabs-iot.aligenie.com/2364/1.0.14/dist/index.html#/?_ali_share_button_=false&debugUrl=${url}`