智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/29/29108a41e204d49d1b9cdb31166...

49 lines
743 B

import {
parseQuery
} from 'uni-shared'
import {
invoke
} from '../../bridge'
import {
preloadWebview,
closePreloadWebview
} from '../../framework/page'
export function unPreloadPage ({
url
}) {
const webview = closePreloadWebview({
url
})
if (webview) {
return {
id: webview.id,
url,
errMsg: 'unPreloadPage:ok'
}
}
return {
url,
errMsg: 'unPreloadPage:fail not found'
}
}
export function preloadPage ({
url
}, callbackId) {
const urls = url.split('?')
const path = urls[0]
const query = parseQuery(urls[1] || '')
const webview = preloadWebview({
url,
path,
query
})
invoke(callbackId, {
id: webview.id,
url,
errMsg: 'preloadPage:ok'
})
}