类似于H5中window.location,Nuke提供的Location包含了protocol、hostname、host、origin、pathname和search等属性。
'use strict';
import {mount} from 'nuke-mounter';
import {createElement, Component} from 'weex-rx';
import {View, Text, Modal} from 'nuke';
import QN from 'QAP-SDK';
import Util from 'nuke-core';
const Location = Util.Location;
class Demo extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<View>
<Text>
{JSON.stringify(Location)}
</Text>
</View>
);
}
}
mount(<Demo />, 'body');
export default Demo;