invoice.js
1007 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// component/menu/addDelete.js
import util from '../../utils/util';
import App from '../../utils/api';
Component({
/**
* 组件的属性列表
*/
properties: {
filePath:String,
},
/**
* 组件的初始数据
*/
data: {
},
attached(){
},
ready () {
},
detached(){
},
/**
* 组件的方法列表
*/
methods: {
Invoice(){
wx.chooseInvoiceTitle({
success:(res)=>{
console.log('wx.chooseInvoiceTitle',res)
this.triggerEvent('event',res)
},
fail:(efail)=>{
console.log('wx.chooseInvoiceTitle',efail)
wx.showModal({
title: '授权提示',
content: '您拒绝了获取发票抬头,请点击确定打开授权',
confirmColor: '#199095',
cancelColor: '#999',
success: function (res) {
if (res.confirm) {
util.setting();
}
}
})
},
})
},
}
})