tanghaolin
2022-07-27 fd4d1d9296ba620de15b47bd1d58383d46ecb626
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
var app = getApp();
var Constant = require('../../utils/constant.js');
Page({
  data: {
    webViewUrl: ''
  },
  onLoad: function (options) {
    // console.log(options,8)
    var stationName = options.name;
    if(stationName){
      wx.setNavigationBarTitle({
        title: stationName
      });
    }
 
    var userInfo = app.globalData.userInfo;
    //console.log('登录之后的用户信息', userInfo)
    if (userInfo == null) {
      wx.redirectTo({
        url: '/login/login/index',
      })
      return;
    }  
 
    var stationID = options.id;
    if (stationID == null) {
      stationID = 3;
    }
    // console.log(stationID,userInfo.CorpID)
    var url = 'https://www.beng35.com/BIM/miniProgram/stationsimple.html?id=' + stationID + '&corpid='+ options.corpID + "&V=20220704";
    console.log(url,31)
    this.setData({
      webViewUrl: url
    });
    console.log(this.data.webViewUrl,35)
 
  },
  loadMessage: function (e) {
    //console.log(e, '加载返回的消息')
  },
  loadSuccesss: function (e) {
    console.log(e, '加载成功')
  },
  loadError: function (e) {
    console.log(e, '加载失败')
  },
  onReady: function () {},
  onShow: function () {},
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {},
  onReachBottom: function () {},
  onShareAppMessage: function () {
    return Constant.Share;
  }
})