// package_A/pages/riverDetail/index.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        dataSource: {},
        messageList: [
            {label: '河道名称', value: 'name', unit: ''},
            {label: '责任河长', value: 'streamAdminName', unit: ''},
            {label: '联系电话', value: 'mobile', unit: ''},
            {label: '河道区域', value: 'cityArea', unit: ''},
            {label: '河道长度', value: 'length', unit: '公里'},
            {label: '起讫位置', value: 'location', unit: ''}
            // {label: '河道简介', value: 'note', unit: ''}
        ]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        if(options.data) {
            let dataSource = this.data.dataSource
            dataSource = JSON.parse(options.data)
            this.setData({dataSource})
        }
    },
    showPreviewImage(e){
        let url = e.currentTarget.dataset.path
        wx.previewImage({
          urls: [url],
        })
    }
    
})