1
0

platform-utils.js 270 B

1234567891011121314
  1. function getWxApi() {
  2. return typeof wx === 'undefined' ? {} : wx
  3. }
  4. function isCancelError(error) {
  5. const message = String(error && (error.errMsg || error.message || error) || '')
  6. return /cancel/i.test(message)
  7. }
  8. module.exports = {
  9. getWxApi,
  10. isCancelError
  11. }