12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- // components/signName/index.js
- import api from '../../api/api'
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- bindData:{
- value:{},
- type:Object
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- lifetimes:{
- attached () {
- setTimeout(() => {
- this.fileData()
- }, 1000);
- }
- },
- /**
- * 组件的方法列表
- */
- methods: {
- 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
- })
- },
- async deleteFile (data) {
- let item = data.detail.file
- const res = await api._post({
- "classname": "system.attachment.Attachment",
- "method": "deleteFileLink",
- "content": {
- "linksids": [item.linksid]
- }
- })
- this.fileData()
- },
- // 签字
- signName () {
- wx.navigateTo({
- url: '/pages/signName/index?id=' + this.data.bindData.ownerid,
- })
- },
- }
- })
|