在线预览打开的是空白页

3***@qq.com
- 发布:2017-11-22 09:49
- 更新:2018-10-11 17:38
- 阅读:3609
mui在线预览pdf
分类:MUI
1 个回复
g***@sina.com
js文件上传不了
import PahoMQTT from '@/common/js/paho-mqtt-min.js'
let client = new PahoMQTT.Client("mqtt.syniot.cn", 443, 'wx_' + Math.random().toString(16).substr(2, 8))
client.connect({
//timeout: 4000,
useSSL: true,
userName: "syniot",
password: "syniot",
cleanSession: true,
keepAliveInterval: 5,
reconnect: true,
mqttVersion: 4,
onSuccess: function() {
console.log('connected123')
setInterval(function() {
uni.showToast({
title: 'connected'
})
}, 2000)
复制代码
//监听关闭 client.onConnectionLost = function(responseObject) { if (responseObject.errorCode !== 0) { console.log("onConnectionLost:" + responseObject.errorMessage); } } }, onFailure: function(err) { console.log(JSON.stringify(err)) console.log('连接失败111') setInterval(function() { uni.showToast({ title: '连接失败', icon: 'none' }) }, 5000) } })