preCheck.js 560 B

123456789101112131415161718
  1. // import platform from './platform.js'
  2. // import {getWxUserInfo} from "./wxAuth";
  3. // if (platform() === 'H5') {
  4. // const getWxQuery = (name) => {
  5. // const url = window.location.href;
  6. // const reg = /code=([^&]*)/;
  7. // const arr = url.match(reg);
  8. // return arr ? arr[1] : null;
  9. // }
  10. // const code = getWxQuery('code')
  11. // console.log('code',code)
  12. // if(!code){
  13. // if (!uni.getStorageSync('token')) {
  14. // console.log('preCheck-login')
  15. // getWxUserInfo()
  16. // }
  17. // }
  18. // }