invoice.js 1007 Bytes
// 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();
              }
            }
          })
        },
      })
    },
  }
})