x***@tops001.com
x***@tops001.com
  • 发布:2016-06-28 10:40
  • 更新:2016-06-29 17:11
  • 阅读:2103

手机预览提示Uncaught ReferenceError: plus is not defined at js/mui.min.js:8

分类:MUI

我新建一个移动APP项目,想测试在真机上运行效果,但是在真机上并没有出现我加载的数据,在HBuilder的“边改边看模式”都是可以看见调用接口显示的数据,真机运行在控制台看见报错下面这个错误:Uncaught ReferenceError: plus is not defined at js/mui.min.js:8


连接真机运行,一样还是报这样的错误,
请教大神为什么了????

2016-06-28 10:40 负责人:无 分享
已邀请:
BoredApe
  • x***@tops001.com (作者)

    if (mui.os.plus) {  
    mui.plusReady(function () {
    setTimeout(function () {
    mui('#pullrefresh').pullRefresh().pullupLoading();
    mui('#pullrefresh2').pullRefresh().pullupLoading();
    }, 1000);

    });
    } else {
    mui.ready(function () {
    mui('#pullrefresh').pullRefresh().pullupLoading();
    mui('#pullrefresh2').pullRefresh().pullupLoading();
    });
    }

    我这里是上拉刷新,这里也如demo例子中一样,在plusready的回调事件里调用plus api,但是这样还是在控制台有报错啊???

    2016-06-29 16:32

  • x***@tops001.com (作者)

    我在问题附上了一张图片,这样的错是为什么?

    2016-06-29 17:14

该问题目前已经被锁定, 无法添加新回复

  • 标题 / 粗斜体
  • 代码片段
  • 超链接 / 图片 / 视频
  • 列表 / 引用

文章内容较多时,可以用标题分段 :

## 大标题 
### 小标题

斜体 / 粗体 :

**粗体** 
*斜体*
***粗斜体***

代码片段 :

``` javascript
代码片段
```

超链接 :

[链接文字](链接地址) 例: [百度](http://www.baidu.com)

图片 :

![图片说明](图片地址) 例: ![百度logo](http://www.baidu.com/img/bdlogo.gif)

视频 :

!![视频说明](视频地址) 例: !![优酷视频](http://youku.com)

有序列表 :

1. 123
2. 123
3. 123

无序列表 :

- 123
- 123
- 123

引用 : ( 双回车后结束引用 )

> 引用内容
引用内容
引用内容