12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- let userid = "2a7cbdee-9391-cd8b-cd8d-7cc78e88e9bf";
- let username = "潘明";
- let oatoken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyYTdjYmRlZS05MzkxLWNkOGItY2Q4ZC03Y2M3OGU4OGU5YmYiLCJjbGllbnRpZCI6ImFuZHJvaWRjbGllbnQiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIFJlZmluZUFQSSIsImV4cCI6MTY4NTgxNTIwMSwiY29uZmlnIjoiMjAyMC0yMDk5In0.ws-CyJ-qS-8A4cQg4wGLnshNzO0YgR-tsG2TB-owmuc";
- let avatar = "http://10.233.22.205:8088/fs/avatar/show/2a7cbdee-9391-cd8b-cd8d-7cc78e88e9bf";
- let maintoken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJVMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwOSIsImFwcE5hbWUiOiJPQeWKnuWFrOeuoeeQhiIsImFwcENvZGUiOiJvYWJnZ2wiLCJ0eXBlIjoiVVNFUl9QQVNTV09SRCIsInVzZXJOYW1lIjoi6LaF57qn566h55CG5ZGYIiwidXNlcklkIjoiVTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDkiLCJzZWNyZXRMZXZlbCI6MCwicmFuZG9tIjoiNjllV0ZYIiwibG9naW5OYW1lIjoidGVzdCIsImFwcElkIjoiOGE1MDJjOGU4NWY2MWQ2YjAxODYyYWJkNzg3MjI1M2EiLCJEc3BUb2tlbiI6ImU4YmZhMjBmYTA5Njg1MjJiODkyZTUxODQ1MjdlNDA0NDk0ZThiMzY2ZGQ5YTQ1NmI3NjI4YjIyMTdlZWMyNjYiLCJleHAiOjE2ODUwODk1OTMsImlhdCI6MTY4NTA4NTk5M30.d1DizLEusr8eEw1wHU1JXTBzYMORe0cIFvAVBvDszfY"
- // 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;
- }
- } 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)
|