1.1 解决android支付问题 在支付界面改变url

关于单页面微信支付目录配置问题

1.2 初始化的时候改变首页url  这个解决ios的支付问题

关于单页面微信支付目录配置问题

angular解决方案

constructor(private httpService: HttpService, private router: Router, private location: Location, private activatedRoute: ActivatedRoute ) { 
    // 替换url但不触发刷新,解决支付目录的问题
    this.router.events
      .subscribe((e: any) => {
        if (e instanceof NavigationEnd) {
          if (window.location.href.indexOf('?#') < 0) {
            const productId = localStorage.getItem("productId");
            window.history.pushState(null, null, `?#/index?id=${productId}`);
          };
        }
      })
  }

 

相关文章:

  • 2022-01-01
  • 2021-04-13
  • 2021-07-14
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2021-12-13
  • 2021-11-28
相关资源
相似解决方案