index.ts 427 B

123456789101112
  1. import { common } from '../../../utils';
  2. export const useIsToAuthPage = () => {
  3. // 判断小程序登录返回的wechatOpenid是否为null,null没有关注公众号,需要跳转授权页面进行授权处理
  4. if (uni.getStorageSync('wechatOpenid') === null && getApp().globalData.officialAuthOn) {
  5. common.goToUrl(`/pages/st1/business/h5/h5?type=0`, {
  6. skipWay: 'redirectTo',
  7. });
  8. return true;
  9. }
  10. return false;
  11. };