随笔 - 2649  文章 - 2452  评论 - 0  阅读 - 86351

发票抬头功能页

发票抬头功能页

从基础库版本 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   AtlasLapetos  阅读(15)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示