utils.js 426 B

1234567891011121314151617181920
  1. import { sourceMap } from '@/data'
  2. export function isDOMElement(obj) {
  3. return obj && typeof obj === 'object' && obj.nodeType === 1
  4. }
  5. export function getSourceInfo(source) {
  6. const t = sourceMap[source]
  7. return t || {}
  8. }
  9. export function mobileCustomPage(platform) {
  10. const map = {
  11. app: '/jyapp/free/customer',
  12. h5: '/jyapp/free/customer',
  13. wx: '/big/wx/page/customer'
  14. }
  15. return map[platform] || map.app
  16. }