| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- var app = getApp();
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- show: false,
- headUrl: '',
- includepoints: [],
- reportTempInputValue: '',
- reportDesc: '',
- reportInputFocus: false,
- openid: '',
- //1 跳转到测站选择列表,2 跳转到测站导航列表
- model: '1',
- projectList: []
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.data.openid = wx.getStorageSync('openid');
- var model = options.model;
- this.setData({
- model: model
- })
- this.getProjectList();
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- // this.getLocationReportList();
- console.log("orgid", this.data.orgId)
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- },
- getProjectList: function () {
- wx.showNavigationBarLoading()
- var that = this;
- var url = app.globalData.cloudBase + "/Wx/User/Project/" + this.data.openid;
- wx.request({
- url: url,
- method: 'GET',
- header: {
- "Content-Type": "json"
- },
- success: function (res) {
- wx.hideNavigationBarLoading();
- if (res.data.code === "0") {
- that.setData({
- projectList: res.data.data
- });
- }
- },
- fail: function (error) {
- wx.hideNavigationBarLoading();
- }
- })
- },
- checkProgHandle: function (e) {
- var projectId = e.currentTarget.dataset.projectid;
- if (this.data.model == '1') {
- wx.navigateTo({
- url: '/pages/rtu/rtuList/rtuSelectView?projectId=' + projectId
- });
- } else if (this.data.model == '2') {
- wx.navigateTo({
- url: '/pages/rtu/rtuNavigate/rtuNavigateListView?projectId=' + projectId
- });
- }
- }
- })
|