|
@@ -5,9 +5,9 @@ Component({
|
|
|
* 组件的属性列表
|
|
|
*/
|
|
|
properties: {
|
|
|
- bindData:{
|
|
|
- value:{},
|
|
|
- type:Object
|
|
|
+ bindData: {
|
|
|
+ value: {},
|
|
|
+ type: Object
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -17,8 +17,8 @@ Component({
|
|
|
data: {
|
|
|
|
|
|
},
|
|
|
- lifetimes:{
|
|
|
- attached () {
|
|
|
+ lifetimes: {
|
|
|
+ attached() {
|
|
|
setTimeout(() => {
|
|
|
this.fileData()
|
|
|
}, 1000);
|
|
@@ -28,18 +28,20 @@ Component({
|
|
|
* 组件的方法列表
|
|
|
*/
|
|
|
methods: {
|
|
|
- async fileData () {
|
|
|
+ async fileData() {
|
|
|
let page = getCurrentPages()[getCurrentPages().length - 1]
|
|
|
- const res = await api._post({
|
|
|
- "classname": "system.attachment.Attachment",
|
|
|
- "method": "queryFileLink",
|
|
|
- "content": page.data.bindSignNameData
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- originFiles:res.data
|
|
|
- })
|
|
|
+ if (page.data.bindSignNameData) {
|
|
|
+ const res = await api._post({
|
|
|
+ "classname": "system.attachment.Attachment",
|
|
|
+ "method": "queryFileLink",
|
|
|
+ "content": page.data.bindSignNameData
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ originFiles: res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
- async deleteFile (data) {
|
|
|
+ async deleteFile(data) {
|
|
|
let item = data.detail.file
|
|
|
const res = await api._post({
|
|
|
"classname": "system.attachment.Attachment",
|
|
@@ -51,11 +53,11 @@ Component({
|
|
|
this.fileData()
|
|
|
},
|
|
|
// 签字
|
|
|
- signName () {
|
|
|
+ signName() {
|
|
|
|
|
|
wx.navigateTo({
|
|
|
url: '/Eservice/signName/index?id=' + this.data.bindData.ownerid,
|
|
|
})
|
|
|
},
|
|
|
}
|
|
|
-})
|
|
|
+})
|