let userid = "2a7cbdee-9391-cd8b-cd8d-7cc78e88e9bf"; let username = "潘明"; let oatoken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyYTdjYmRlZS05MzkxLWNkOGItY2Q4ZC03Y2M3OGU4OGU5YmYiLCJjbGllbnRpZCI6ImFuZHJvaWRjbGllbnQiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIFJlZmluZUFQSSIsImV4cCI6MTY5MzcwMDg3MCwiY29uZmlnIjoiMjAyMC0yMDk5In0.y676CAVOX2P1EmwxXGN8QW7ihfZUsNXfxpNRVmCT-P0"; let avatar = "http://10.233.22.205:8088/fs/avatar/show/2a7cbdee-9391-cd8b-cd8d-7cc78e88e9bf"; let maintoken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4YTY5OTY2NDg3NDllMzRiMDE4N2IwYzk1YmU2NzNiYyIsImFwcE5hbWUiOiLlubPlj7Dpl6jmiLflkI7lj7DnrqHnkIYiLCJhcHBDb2RlIjoiemh6ZnpscHQiLCJ0eXBlIjoiVVNFUl9QQVNTV09SRCIsInVzZXJOYW1lIjoi5r2Y5piOIiwidXNlcklkIjoiOGE2OTk2NjQ4NzQ5ZTM0YjAxODdiMGM5NWJlNjczYmMiLCJzZWNyZXRMZXZlbCI6MCwicmFuZG9tIjoiTEMwMmlBIiwibG9naW5OYW1lIjoicGFubWluZyIsImFwcElkIjoiOGE2OTk2NjQ4NmU0ODQ3ODAxODZlZDI4YWUxNTA0NzYiLCJEc3BUb2tlbiI6ImNhNDM4OGI3NTU5OTQ1NGNlYjU2NjM4OGVkNDU4M2ZhZDExZmY3MzY4ODhhNmMwMmNmZWI1YjdkYmM0ZDJkZWM4Mzk2ZWRkM2JhNmE5Yzk2IiwiZXhwIjoxNjkwMTA0Mzg4LCJpYXQiOjE2OTAxMDA3ODh9.As_kz7yCOVprvHtG0FwyipyVX2ojisToy59DVgRey9c" // let userid = ""; // let username = ""; // let oatoken = ""; // let avatar = "" window.addEventListener("flutterInAppWebViewPlatformReady", function () { window.flutter_inappwebview .callHandler("getuserinfo", "") .then(function (res) { userid = res.username; username = res.name; oatoken = res.oatoken; avatar = res.avatar; }) }); console.log(oatoken) setTimeout(function () { let indexVue = new Vue({ el: "#indexBox", data: { apiurl: apiurl,//基础的页面请求地址 userId: userid, //用户id userName: username, //用户中文名 token: oatoken, avatar: avatar, maintoken: maintoken }, methods: { selectFunc: (index) => { if (_this.token != "" && _this.token != undefined && _this.token != null) { if (index == 1) { location.href = "tpl/shouwenbg/list.html"; } if (index == 2) { location.href = "tpl/fawenbg/list.html"; } if (index == 3) { location.href = "tpl/fawendw/list.html"; } if (index == 4) { location.href = "tpl/shixiangdb/list.html"; } if (index == 5) { location.href = "tpl/wenjianshow/list.html"; } if (index == 6) { location.href = "tpl/tongzhibg/list.html"; } if (index == 7) { location.href = "http://10.233.22.218/jyzzjzdt/#/outSearchData?token=" + _this.maintoken; } if (index == 8) { location.href = "http://10.233.22.220/stockAPictureCollect?token=" + _this.maintoken; } if (index == 9) { location.href = "http://10.233.22.220/stockAPictureCollect?token=" + _this.maintoken; } if (index == 10) { location.href = "http://10.233.22.220/stockAPictureCollect?token=" + _this.maintoken; } if (index == 11) { location.href = "http://10.233.22.220/stockAPictureCollect?token=" + _this.maintoken; } if (index == 12) { location.href = "tpl/kaoqin/index.html"; } if (index == 13) { location.href = "tpl/jiaban/index.html"; } if (index == 14) { location.href = "http://10.233.22.204:8088/glworkweb/tpl/deskunit/sqgs.html?type=phone&token=" + _this.token; } if (index == 15) { location.href = "http://10.233.22.204:8088/glworkweb/tpl/deskunit/szjc.html?type=phone&token=" + _this.token; } if (index == 16) { location.href = "http://10.233.22.204:8088/glworkweb/tpl/deskunit/shjd.html?token=" + _this.token; } if (index == 17) { location.href = "http://10.233.22.204:8088/glworkweb/tpl/deskunit/bjtx.html?token=" + _this.token; } if (index == 18) { location.href = "http://10.233.22.204:8088/glworkweb/tpl/deskunit/gcsy.html?type=phone&token=" + _this.token; } if (index == 19) { location.href = "tpl/huiyishibg/list.html"; } } else { _this.$nextTick(() => { $.toast.prototype.defaults.duration = 1000; $.toast("暂无授权", 'cancel', function () { }); }) } } }, created: function () { _this = this; localStorage.setItem("mobile-token", _this.token); localStorage.setItem("mobile-userName", _this.userName); localStorage.setItem("mobile-userId", _this.userId); localStorage.setItem("mobile-avatar", _this.avatar); } , mounted: function () { } }) }, 500)