You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.0 KiB
63 lines
1.0 KiB
var app = getApp();
|
|
var netUtil = require("../../utils/requestUtil.js"); //require引入
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
id: '',
|
|
data: null,
|
|
StatusBar: app.globalData.StatusBar,
|
|
CustomBar: app.globalData.CustomBar
|
|
},
|
|
|
|
addTenant: function (e) {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
this.setData({
|
|
id: options.id
|
|
})
|
|
},
|
|
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
this.getDetail();
|
|
},
|
|
|
|
//获取数据详情
|
|
getDetail: function () {
|
|
var self = this;
|
|
var url = app.globalData.requestUrl + 'index/question/view/' + this.data.id;
|
|
netUtil.sendGet(url)
|
|
.then((res) => {
|
|
console.log(res)
|
|
this.setData({
|
|
data: res.data.data
|
|
})
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage: function () {
|
|
|
|
},
|
|
|
|
})
|