3、proto使用

一、原版
1、PBInterfaceChangeLog(interfaceId,content required) --> void
有id,content不能为空

export function interfaceChangeLogAdd (interfaceId, content) {
  const pbReq = proto.create('fw.PBInterfaceChangeLog', { interfaceId: +interfaceId, content })
  return request('apiDocumentInterfaceChangeLogAdd', pbReq)
}
        interfaceChangeLogAdd(this.selectedId, this.form.content)
          .then((res) => {
            console.log(res)
          }).catch((err) => {
            console.log(err)
          })

2、只传id,PBIntValue(interfaceId) --> void

export function interfaceDeprecated (interfaceId) {
  const pbReq = proto.create('framework.PBIntValue', { value: +interfaceId })
  return request('apiDocumentInterfaceDeprecated', pbReq)
}
        interfaceDeprecated(id)
          .then(() => {
            console.log('成功弃用')
          }).catch((err) => {
            console.log(err)
          })

二、新版
1、PBRenewalSendNotifyReq(renewalId,contacts required) --> void

customerApi.sendNotifyReq = (id, contacts) => {
  const pbReq = proto.create('fw.PBRenewalSendNotifyReq', { renewalId: Number(id), contacts })
  return request('renewalSendNotify', pbReq)
}
        return customerApi.getCustomerContactList(this.selectedRow.customer.user.id).then((res) => {
          this.contacts = res.contacts
        }).catch(this.errorHandler)
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 书籍:《见识》 字数:790 很多人都说自己有选择困难症。 一位女士给我讲了她买裤子的经历。服务员拿给她两条裤子,...
    宋日红阅读 3,180评论 0 2
  • 李白正乘着竹筏前往参观敬亭山,他挎着剑摇着扇,刚回了一封杜甫的信。 “信使啊!再不快点我和子美就要老了。” 李白感...
    我没尴尬过阅读 1,585评论 0 1
  • 秋风 煽动起冰冷的火焰 狠命的燃烧 叶子在燃烧中 无助的哭泣 太阳缩回了双手 漠然着一切 所有都委屈的迎合 等待严...
    童心_8c86阅读 3,157评论 26 37
  • 徘徊在感情与陌生的十字路口,我不能抉择自己,放弃不了那份感情,但又不能不面对现实,在感情的漩涡里我迷失了自己...
    佩文阅读 3,056评论 2 2

友情链接更多精彩内容