|
- // package_B/pages/feedbackDetail/index.js
- Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- dataSource: {},
- statusList: [
- {title: '待处理', color: '#F34747'},
- {title: '待处理', color: '#F34747'},
- {title: '已处理', color: '#477DF3'},
- {title: '已处理', color: '#477DF3'}
- ]
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- if(options.data) {
- let dataSource = this.data.dataSource
- dataSource = JSON.parse(options.data)
- this.setData({dataSource})
- let imageList = dataSource.feedbackUrl.split(',')
- let handleImgList = []
- if(dataSource.handleUrl) {
- handleImgList = dataSource.handleUrl.split(',')
- }
- this.setData({imageList,handleImgList})
- }
- },
-
- showImgPreview(e) {
- let current = e.currentTarget.dataset.current
- let type = e.currentTarget.dataset.type
- let urls = this.data[type]
- wx.previewImage({
- urls: urls,
- current:current
- })
- }
- })
|