浏览代码

Merge branch 'dev' into x_l_remak

谢杰标 2 年之前
父节点
当前提交
6bbe8f558d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      utils/authority.js

+ 2 - 1
utils/authority.js

@@ -2,7 +2,7 @@ import store from "@/store/index.js";
 import api from "@/common/api.js";
 import { isWeixin, modalComfirm } from "./shared";
 import { getQueryString } from "../common/navTo";
-export function getCode(url = window.location.href) {
+export function getCode(url) {
   return new Promise((resolve, reject) => {
     // #ifdef H5
     if (location.search.includes("code")) {
@@ -12,6 +12,7 @@ export function getCode(url = window.location.href) {
     } else {
       // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=https://api.xyyxt.net/pages2/order/confirm_pay 去获取code,授权后就会把code带上然后访问域名
       // ?fromCart=&code=061F5a1w3aolh03SLe1w3sMsCF4F5a16&state=STATE
+      url = url || window.location.href;
       if (process.env.NODE_ENV !== "development") {
         // 跳自己授权
         if (store.getters.config.gzhSelfLicense) {