|
|
@@ -150,8 +150,8 @@ const utils = {
|
|
|
getQueryString(name, search) {
|
|
|
const str =
|
|
|
search ||
|
|
|
- window.location.search.substr(1) ||
|
|
|
- window.location.hash.split("?")[1];
|
|
|
+ window.location.hash.split("?")[1] ||
|
|
|
+ window.location.search.substr(1);
|
|
|
let result = querystring.parse(str)[name];
|
|
|
// 当有重复参数时querystring.parse返回的是数组
|
|
|
if (result instanceof Array) {
|
|
|
@@ -167,8 +167,8 @@ const utils = {
|
|
|
getAllQueryString(search) {
|
|
|
const str =
|
|
|
search ||
|
|
|
- window.location.search.substr(1) ||
|
|
|
- window.location.hash.split("?")[1];
|
|
|
+ window.location.hash.split("?")[1] ||
|
|
|
+ window.location.search.substr(1)
|
|
|
|
|
|
if (!str) {
|
|
|
return null
|
|
|
@@ -345,13 +345,24 @@ const utils = {
|
|
|
},
|
|
|
|
|
|
// 关闭支付页面工具函数
|
|
|
- closePayPage() {
|
|
|
+ closePayPage(uid) {
|
|
|
// 忘川伏魔录
|
|
|
const platform = this.getQueryString("platform");
|
|
|
+ const data = this.getQueryString("data");
|
|
|
if (platform == "wcfml") {
|
|
|
- window.location.href = $CONFIG.wcfmlPayUrl
|
|
|
+ window.location.href = `${$CONFIG.wcfmlCloseUrl}?uid=${uid}&data=${data}`
|
|
|
return
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ // 联系qq客服
|
|
|
+ onQQService() {
|
|
|
+ const { kfQQ } = _this.$CONFIG;
|
|
|
+ const urlMobil = `mqqwpa://im/chat?chat_type=wpa&uin=${kfQQ}&version=1&src_type=web&web_src=http:://wpa.b.qq.com`;
|
|
|
+ const urlPc = `http://wpa.qq.com/msgrd?v=3&uin=${kfQQ}&site=qq&menu=yes`;
|
|
|
+ const url = isPc ? urlPc : urlMobil;
|
|
|
+ window.open(url, "_brank");
|
|
|
}
|
|
|
+
|
|
|
};
|
|
|
export default utils;
|