[已解决]Uni-app请求报错[Vue warn]: Duplicate keys detected: ‘1‘. This may cause an update error.

执行操作:点击全部代办后,数据冗余,控制台报错

估计原因:onLoad中加载的方法和点击事件的方法重复

报错信息:

[已解决]Uni-app请求报错[Vue warn]: Duplicate keys detected: ‘1‘. This may cause an update error._第1张图片

1.运行页面

[已解决]Uni-app请求报错[Vue warn]: Duplicate keys detected: ‘1‘. This may cause an update error._第2张图片

2.uni-app代码

[已解决]Uni-app请求报错[Vue warn]: Duplicate keys detected: ‘1‘. This may cause an update error._第3张图片

[已解决]Uni-app请求报错[Vue warn]: Duplicate keys detected: ‘1‘. This may cause an update error._第4张图片 [已解决]Uni-app请求报错[Vue warn]: Duplicate keys detected: ‘1‘. This may cause an update error._第5张图片

3.解决方法:每次执行请求方法前,初始化数据

[已解决]Uni-app请求报错[Vue warn]: Duplicate keys detected: ‘1‘. This may cause an update error._第6张图片

你可能感兴趣的:(前后端分离,vue.js,uni-app,前端)