发票抬头功能页

发票抬头功能页

从基础库版本 2.16.1 起,该功能页已经废弃,可以直接使用 wx.chooseInvoiceTitle 实现对应的功能;点击 functional-page-navigator 也将不再进入功能页,直接进入发票抬头选择页。

文档

发票抬头功能页用于展示用户的发票抬头列表,用户可以选择其中的发票抬头。自基础库版本 2.14.1 开始支持。

调用参数

发票抬头功能页使用 functional-page-navigator 进行跳转时,对应的参数 name 应为固定值 chooseInvoiceTitle ,返回参数与 wx.chooseInvoiceTitle 相同。

bindsuccess 返回参数说明:

属性类型说明
typestring抬头类型
titlestring抬头名称
taxNumberstring抬头税号
companyAddressstring单位地址
telephonestring手机号码
bankNamestring银行名称
bankAccountstring银行账号
errMsgstring错误信息

res.type 的合法值

说明最低版本
0单位
1个人

示例代码

<!--plugin/components/hello-component.wxml-->
  <functional-page-navigator
    name="chooseInvoiceTitle"
    version="develop"
    bind:success="onSuccess"
    bind:fail="onFail"
  >
    <button>选择发票抬头</button>
  </functional-page-navigator>
// plugin/components/hello-component.js
Component({
  methods: {
    onSuccess: function (res) {
      console.log(res.detail);
    },
    onFail: function (res) {
      console.log(res);
    }
  }
});
posted on 2024-12-24 09:43  AtlasLapetos  阅读(19)  评论(0)    收藏  举报