1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <div id="app">
- <router-view />
- </div>
- </template>
- <script>
- export default {
- data(){
- return {}
- },
- created() {
- const href = window.location.href;
- // 路由
- // const route = href.split("?")[0];
- // 参数处理
- let params = href.split("?")[1];
- if (!params) {
- // 参数有问题
- return false;
- }
- params = decodeURIComponent(params);
- // params = "categoryId=NTXT&ProjectID=5&BuildingID=1&FloorID=1"; // mock 参数
- const paramsArr = params.split("&");
- const obj = {};
- paramsArr.map(item => {
- const arr = item.split("=");
- obj[arr[0]] = arr[1];
- });
- this.urlMsg = obj;
- this.$store.commit("SETSSOTOKEN", this.urlMsg.token);
- }
- }
- </script>
- <style lang="less">
- #app {
- width: 100%;
- height: 100%;
- }
- html {
- margin: 0;
- width: 100%;
- height: 100%;
- }
- body {
- margin: 0;
- width: 100%;
- height: 100%
- }
- canvas:focus{
- outline: none;
- }
- </style>
|