微信小程序
发票抬头功能页
# 发票抬头功能页
从基础库版本 2.16.1 起,该功能页已经废弃,可以直接使用 wx.chooseInvoiceTitle
实现对应的功能;点击 functional-page-navigator
也将不再进入功能页,直接进入发票抬头选择页。
文档
发票抬头功能页用于展示用户的发票抬头列表,用户可以选择其中的发票抬头。自基础库版本 2.14.1 开始支持。
# 调用参数
发票抬头功能页使用 functional-page-navigator 进行跳转时,对应的参数 name 应为固定值 chooseInvoiceTitle
,返回参数与 wx.chooseInvoiceTitle 相同。
bindsuccess 返回参数说明:
res.type 的合法值
# 示例代码
<!--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);
}
}
});