MCPcopy Create free account
hub / github.com/circircir-circle/human_exist_device / renderUrl

Method renderUrl

mini_program/common/Tools.js:661–674  ·  view source on GitHub ↗
(url, defaultUrl)

Source from the content-addressed store, hash-verified

659
660
661 renderUrl(url, defaultUrl) {
662 if (!url || url == "") {
663 url = defaultUrl;
664 }
665 if (url.indexOf("__weui-popup") > 0 || url.startsWith("tel:") || url.startsWith("http://") || url
666 .startsWith(
667 "https://")) {
668 return url;
669 }
670 if (url.indexOf("/pages/" + url) != 0) {
671 url = "/pages/" + url;
672 }
673 return url;
674 }
675
676 renderImage(path) {
677 if (!path) return ''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected