customer.js 468 B

12345678910111213141516171819
  1. ;(function () {
  2. function getCustomerData(type, filed) {
  3. if (!window.hasOwnProperty('setting')) return null
  4. if (filed === undefined) return window.setting[type]
  5. else return !!window.setting[type] ? window.setting[type][filed] : null
  6. }
  7. function getCustomerTitle(type) {
  8. return getCustomerData(type, 'title')
  9. }
  10. function getCustomerDir(type) {
  11. return getCustomerData(type, 'tmpdir')
  12. }
  13. window.OACustomer = {
  14. getCustomerTitle,
  15. getCustomerDir,
  16. }
  17. })()