纸通宝SAAS仓库
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.
 

42 lines
995 B

// pages/message/detail/index.js
import Scene from '../../index/scene'
const math = require('../../../utils/math')
const app = getApp()
Scene({
/**
* 页面的初始数据
*/
data: {
fheight: app.globalData.fragmentHeight,
src: null,
height: 1200
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if(!options.src){
wx.navigateBack()
return
}
wx.showLoading({ title: '处理中', mask: true })
this.setData({
fheight: app.globalData.fragmentHeight,
StatusBar: app.globalData.StatusBar || 40,
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60),
src: options.src
})
},
onImageLoad: function({detail}){
if(detail && detail.width){
var radio = math.divide(detail.width, 750)
var height = parseInt(math.divide(detail.height, radio))
this.setData({ height })
}
wx.hideLoading()
},
backPage() {
wx.navigateBack()
}
})