|
@@ -50,13 +50,15 @@ function hiddenTips2() {
|
|
|
function updateJump2() {
|
|
|
$('#tipsType').hide()
|
|
|
// location.replace('/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=v')
|
|
|
- $.ajax({
|
|
|
- url: '/publicapply/free/oneProvinceSet',
|
|
|
- type: 'POST',
|
|
|
- success: function (res) {
|
|
|
- location.href = '/jyapp/vipsubscribe/toSubVipSetPage'
|
|
|
- }
|
|
|
- })
|
|
|
+ location.href = '/jyapp/areaPack/page/set_area'
|
|
|
+ // $.ajax({
|
|
|
+ // url: '/publicapply/free/oneProvinceSet',
|
|
|
+ // type: 'POST',
|
|
|
+ // success: function (res) {
|
|
|
+ // sessionStorage.setItem('needPlayClick', 'true')
|
|
|
+ // location.href = '/jyapp/areaPack/page/set_area'
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}
|
|
|
var vOneKeySubComponent = new Vue({
|
|
|
delimiters: ['${', '}'],
|
|
@@ -370,7 +372,7 @@ var SuperSearch = {
|
|
|
if (isReload) {
|
|
|
this.resetPage(isFocus);
|
|
|
if (sessionStorage && history && isPushHistory) {
|
|
|
- history.pushState({}, "supersearch", "/jyapp/jylab/mainSearch#");
|
|
|
+ history.pushState({type: 'supersearch'}, "supersearch", "/jyapp/jylab/mainSearch#");
|
|
|
}
|
|
|
}
|
|
|
if (this.initFlag) {
|
|
@@ -554,6 +556,7 @@ var SuperSearch = {
|
|
|
$.ajax({
|
|
|
url: '/publicapply/free/subscribe',
|
|
|
type: 'post',
|
|
|
+ async: false,
|
|
|
success: function (res) {
|
|
|
if (res.error_code === 0 && res.data) {
|
|
|
try {
|
|
@@ -566,6 +569,36 @@ var SuperSearch = {
|
|
|
},
|
|
|
})
|
|
|
|
|
|
+ function ajaxAddSubKey () {
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: "/jyapp/member/swordfish/ajaxReq",
|
|
|
+ data: {keys: SuperSearch.s_words, reqType: "subscribe"},
|
|
|
+ dataType: "json",
|
|
|
+ async: false,
|
|
|
+ success: function (r) {
|
|
|
+ if (r.flag == "y") {
|
|
|
+ rFlag = true;
|
|
|
+ } else if (r.flag == "o") {
|
|
|
+ EasyAlert.show("您已经超过订阅<br>关键字上限");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ rFlag = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (rFlag) {
|
|
|
+ SuperSearch.setSessionStorage();
|
|
|
+ var goHref = "/jyapp/vipsubscribe/toSetKeyWordPage";
|
|
|
+ if (!isSelectArea) {
|
|
|
+ goHref = "/jyapp/vipsubscribe/toSubVipSetPage";
|
|
|
+ }
|
|
|
+ setTimeout(function () {
|
|
|
+ window.location.href = goHref
|
|
|
+ }, 100);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// S-直接订阅
|
|
|
$("#supersearchPage #zjdy").on("tap", function (even) {
|
|
|
if (userId == "" || userId == null) {
|
|
@@ -608,43 +641,37 @@ var SuperSearch = {
|
|
|
if (nowKeyLength >= 10) {
|
|
|
return EasyAlert.show("您已经超过订阅<br>关键字上限");
|
|
|
} else {
|
|
|
+ // 新用户,且没有地区,不提示,去选择地区
|
|
|
+ // 新用户,有地区,去添加并到关键词页面
|
|
|
+ // 老用户,没有地区,提示,去选择地区
|
|
|
if (isSelectArea) {
|
|
|
- // 执行下方原有逻辑
|
|
|
- } else if (isOldUser) {
|
|
|
+ // 执行下方原有逻辑到关键词页面
|
|
|
+ } else {
|
|
|
+ if (!isOldUser) {
|
|
|
+ return updateJump2()
|
|
|
+ }
|
|
|
return $('#tipsType').show()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $.ajax({
|
|
|
- type: "post",
|
|
|
- url: "/jyapp/member/swordfish/ajaxReq",
|
|
|
- data: {keys: SuperSearch.s_words, reqType: "subscribe"},
|
|
|
- dataType: "json",
|
|
|
- async: false,
|
|
|
- success: function (r) {
|
|
|
- if (r.flag == "y") {
|
|
|
- rFlag = true;
|
|
|
- } else if (r.flag == "o") {
|
|
|
- EasyAlert.show("您已经超过订阅<br>关键字上限");
|
|
|
- }
|
|
|
- },
|
|
|
- error: function () {
|
|
|
- rFlag = true;
|
|
|
- }
|
|
|
- });
|
|
|
- if (rFlag) {
|
|
|
- SuperSearch.setSessionStorage();
|
|
|
- var goHref = "/jyapp/vipsubscribe/toSetKeyWordPage";
|
|
|
- if (!isSelectArea) {
|
|
|
- goHref = "/jyapp/vipsubscribe/toSubVipSetPage";
|
|
|
- }
|
|
|
- setTimeout(function () {
|
|
|
- window.location.href = goHref
|
|
|
- }, 100);
|
|
|
- }
|
|
|
+ ajaxAddSubKey()
|
|
|
}
|
|
|
});
|
|
|
// E-直接订阅
|
|
|
+ if (sessionStorage.getItem('needPlayClick') === 'true') {
|
|
|
+ sessionStorage.setItem('needPlayClick', 'fix')
|
|
|
+ setTimeout(function () {
|
|
|
+ ajaxAddSubKey()
|
|
|
+ }, 700)
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sessionStorage.getItem('needPlayClick') === 'fix' && SuperSearch.isMyPage) {
|
|
|
+ if (!(history.state && history.state.type == 'supersearch')) {
|
|
|
+ console.log('fix hash')
|
|
|
+ sessionStorage.setItem('needPlayClick', 'hash')
|
|
|
+ history.pushState({type: 'supersearch'}, "supersearch", "/jyapp/jylab/mainSearch#");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
getKeyUserInfo()
|
|
@@ -3226,7 +3253,7 @@ var EntSearch = {
|
|
|
if (isReload) {
|
|
|
this.resetPage(isFocus);
|
|
|
if (sessionStorage && history && isPushHistory) {
|
|
|
- history.pushState({}, "entsesearch", "/jyapp/jylab/mainSearch#");
|
|
|
+ history.pushState({type: 'entsesearch'}, "entsesearch", "/jyapp/jylab/mainSearch#");
|
|
|
}
|
|
|
}
|
|
|
if (this.initFlag) {
|
|
@@ -4357,4 +4384,4 @@ window.onload = function(){
|
|
|
if(ActiveTipFlag){
|
|
|
ActiveTip = new Active_Tip();
|
|
|
}
|
|
|
-}
|
|
|
+}
|