我正在尝试在用cordova开发的应用中放置横幅。该脚本将其他脚本添加到页面,并且其他脚本随附src =“ // ....” 在浏览器上进行测试时,默认情况下它将重定向到“ http:// ...”,但在android中,它将尝试查找“ file ///......”
这是我在HTML上添加的脚本,我只是在源代码的开头添加“ http:”,并且效果很好
SELECT c.name
, SUM(v.ad) AS `ad`
, SUM(v.ac) AS `ac`
FROM ( -- derive `ad` and `ac` in an inline view before we collapse rows
SELECT ee.employee
, ee.centre
, ( -- derived for each employee
SELECT SUM(d1.duration)
FROM time t1
JOIN dates d1
ON d1.time_id = t1.id
AND d1.date >= NOW() + INTERVAL -12 MONTH
WHERE d1.employee = t.employee
) AS `ad`
, ( -- derived for each employee
SELECT SUM(d2.cost)
FROM time t2
JOIN dates d2
ON d2.time_id = t2.id
AND d2.date >= NOW() + INTERVAL -12 MONTH
WHERE d2.employee = t.employee
) AS `ac`
FROM time t
JOIN employees ee
ON ee.employee = t.employee
WHERE ee.centre in (4792,4804,4834)
GROUP
BY ee.employee
, ee.centre
) v
LEFT
JOIN centres c
ON c.id = v.centre
GROUP
BY v.centre
, c.name
但是该脚本会将其他脚本广告投放到我无法控制的HTML中
var menuButton: UIBarButtonItem = UIBarButtonItem()
override func viewDidLoad() {
super.viewDidLoad()
// creating the refresh control object
menuButton = UIBarButtonItem.init(title: "Menu", style: .plain, target: self, action: nil)
并在android中使用,他试图在file:/// ...中找到src。
我该怎么做才能重定向到“ http://”插入的“ file:///”?