12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- let userid = "2a7cbdee-9391-cd8b-cd8d-7cc78e88e9bf";
- let username = "潘明";
- let oatoken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyYTdjYmRlZS05MzkxLWNkOGItY2Q4ZC03Y2M3OGU4OGU5YmYiLCJjbGllbnRpZCI6ImFuZHJvaWRjbGllbnQiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIFJlZmluZUFQSSIsImV4cCI6MTY4NTgxNTIwMSwiY29uZmlnIjoiMjAyMC0yMDk5In0.ws-CyJ-qS-8A4cQg4wGLnshNzO0YgR-tsG2TB-owmuc";
- // let userid = "";
- // let username = "";
- // let oatoken = "";
- window.addEventListener("flutterInAppWebViewPlatformReady", function () {
- window.flutter_inappwebview
- .callHandler("getuserinfo", "")
- .then(function (res) {
- userid = res.username;
- username = res.name;
- oatoken = res.oatoken;
- })
- });
- console.log(oatoken)
- setTimeout(function () {
- let indexVue = new Vue({
- el: "#indexBox",
- data: {
- apiurl: apiurl,//基础的页面请求地址
- userId: userid, //用户id
- userName: username, //用户中文名
- token: oatoken,
- nowFunc: "fun1",
- nowFuncList: []
- },
- methods: {
- selectFunc: (index) => {
- if (_this.token != "" && _this.token != undefined && _this.token != null) {
- } else {
- _this.$nextTick(() => {
- $.toast.prototype.defaults.duration = 1000;
- $.toast("暂无授权", 'cancel', function () {
- });
- })
- }
- },
- changeFunc: (fun) => {
- _this.nowFunc = fun;
- if (fun == "fun1") {
- _this.nowFuncList = [{
- "name": "会议申请",
- "img": "AFrontEnd/img/funcHYSSQ.png",
- }, {
- "name": "车辆申请",
- "img": "AFrontEnd/img/funcCLPQ.png",
- }, {
- "name": "请假申请",
- "img": "AFrontEnd/img/funcQJGL.png",
- }, {
- "name": "办公用品",
- "img": "AFrontEnd/img/funcBGYPSQ.png",
- }]
- } else if (fun == "fun2") {
- _this.nowFuncList = [{
- "name": "信访管理",
- "img": "AFrontEnd/img/funcXFBL.png",
- }]
- } else if (fun == "fun3") {
- _this.nowFuncList = [{
- "name": "发布管理",
- "img": "AFrontEnd/img/funcWZXXFB.png",
- }]
- }
- }
- },
- created: function () {
- _this = this;
- localStorage.setItem("mobile-token", _this.token);
- localStorage.setItem("mobile-userName", _this.userName);
- localStorage.setItem("mobile-userId", _this.userId);
- }
- ,
- mounted: function () {
- _this.nowFuncList = [{
- "name": "会议申请",
- "img": "AFrontEnd/img/funcHYSSQ.png",
- }, {
- "name": "车辆申请",
- "img": "AFrontEnd/img/funcCLPQ.png",
- }, {
- "name": "请假申请",
- "img": "AFrontEnd/img/funcQJGL.png",
- }, {
- "name": "办公用品",
- "img": "AFrontEnd/img/funcBGYPSQ.png",
- }]
- }
- })
- }, 100)
|