|
@@ -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) {
|