# Invoices feature page
From the base library version {% version (2.16.1)%}, this feature page is deprecated and can be used directly with wx.chooseInvoice Implement corresponding functions;Clicking onfunctional-page-navigatorwill no longer enter the function page, but directly enter the invoice selection page.
file
The Invoices feature page is used to display a list of the user's invoices, and the user can select the ones within it.Supported since the base library version {% version ('2.14.1')%}.
# Call parameters
When the invoice function page uses functional-page-navigator to jump, the corresponding parameter name should be a fixed valuechooseInvoice, returns parameters same as wx.chooseInvoice .
Bindsuccess returns a parameter explaination:
| attribute | type | Introductions |
|---|---|---|
| invoiceInfo | String | The invoice information selected by the user, in the form of a JSON character string, contains three fields: card_id: the cardId of the selected invoice card, encrypt_code: the encrypted code of the selected invoice card, the reimbursable party can get the reimbursement invoice information through cardId and encryptCode, and app_id: the appId of the invoicer. |
# sample code
<!--plugin/components/hello-component.wxml-->
<functional-page-navigator
name="chooseInvoice"
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);
}
}
});