123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- // pages/record/recorddetails/recorddetails.js
- const app = getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- id: 0,
- type: 0,
- info: '',
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.setData({id: options.id})
- this.setData({type: options.type})
- this.getinfo()
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- },
- openpreview(e){
- wx.previewImage({
- current: e.currentTarget.dataset.url, // 当前显示图片的http链接
- urls: e.currentTarget.dataset.urls || [] // 需要预览的图片http链接列表
- })
- },
- goedit(){
- wx.navigateTo({
- url: '/pages/sorting/add/add?fenid='+this.data.id,
- })
- },
- getinfo(){
- let that = this
- wx.showLoading()
- app.api.useApi(app.globalData.baseAppUrl + "api/admin/sorting/pack/InventoryDetails", {id:that.data.id}, "get").then(function (res) {
- wx.hideLoading()
- if(res.code==200){
- that.setData({info: res.message.data})
- }
- }).catch(function (err) {
- console.log(222);
- })
- },
- gorecorddetailsinfo(){
- // let id = e.currentTarget.dataset.id
- wx.navigateTo({
- url: '/pages/record/recorddetailsinfo/recorddetailsinfo?id='+this.data.id,
- })
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|