我的页面,首页来款项目
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import UserApi from '../../assets/js/http/userApi'
|
||||
import { previewFile, sliceFileTypeByFileName } from '../../assets/js/preview'
|
||||
Page({
|
||||
|
||||
/**
|
||||
@@ -16,14 +17,25 @@ Page({
|
||||
pageSize: this.data.pageSize
|
||||
}
|
||||
UserApi.dataList(params).then(res=>{
|
||||
if(res.success){
|
||||
if(res.success && res.result.records && res.result.records.length){
|
||||
console.log(res.result.records)
|
||||
this.setData({
|
||||
list: res.result.records
|
||||
list: [...this.data.list, ...res.result.records]
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 预览
|
||||
previewFile(e) {
|
||||
const fileObj = e.currentTarget.dataset.file
|
||||
let fileType = sliceFileTypeByFileName(fileObj.fileName)
|
||||
// 文件类型不是docx,doc,pdf时,已邮件形式发送到参会人的邮箱
|
||||
if(fileType !== 'docx' && fileType !== 'doc' && fileType !== 'pdf') {
|
||||
|
||||
}else {
|
||||
previewFile(fileObj.filId, fileObj.fileName)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
@@ -38,4 +50,4 @@ Page({
|
||||
this.data.pageNo++
|
||||
this.loadData()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user