1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
getQueryString (name, params) { var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i') var r = params.match(reg) if (r != null) { return decodeURIComponent(r[2]) } return null }, onLoad (options) { let that = this if (options.scene) { var scene = decodeURIComponent(options.scene) var id = this.getQueryString('id', scene) if (id) { that.actid = id } } else { if (options.id) { that.actid = options.id } } }
|