|
@@ -58,7 +58,74 @@ function updateJump2() {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+var vOneKeySubComponent = new Vue({
|
|
|
+ delimiters: ['${', '}'],
|
|
|
+ el: '#oneKeySubCom',
|
|
|
+ data: {
|
|
|
+ subDialog: false,
|
|
|
+ showAreaPicker: false,
|
|
|
+ sub: {
|
|
|
+ showArea: true,
|
|
|
+ keyWords: '',
|
|
|
+ region: '',
|
|
|
+ remindChecd: false
|
|
|
+ },
|
|
|
+ regionData: [
|
|
|
+ '安徽','澳门','北京','重庆','福建','广东','广西','贵州','甘肃','河北','湖北','黑龙江','海南','河南','湖南','吉林','江苏','江西','辽宁','内蒙古','宁夏',
|
|
|
+ '青海','山西','陕西','上海','山东','四川','天津','台湾','西藏','新疆','香港','云南','浙江'
|
|
|
+ ],
|
|
|
+ freeSubArea: false
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ subDisabled: function () {
|
|
|
+ if (this.sub.showArea) {
|
|
|
+ return !this.sub.region
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onConfirm: function() {
|
|
|
+ // console.log(this.$refs.subAreaPicker.getValues(), '333');
|
|
|
+ var value = this.$refs.subAreaPicker.getValues()
|
|
|
+ this.sub.region = value[0];
|
|
|
+ this.showAreaPicker = false;
|
|
|
+ },
|
|
|
+ // 一键订阅、暂不订阅
|
|
|
+ oneKeySub: function(type) {
|
|
|
+ var _this = this
|
|
|
+ var data = type ? {
|
|
|
+ isNoSubscribe: 'Y', // 一键订阅
|
|
|
+ subsequentPrompt: _this.sub.remindChecd ? 'Y' : 'N',
|
|
|
+ key: _this.sub.keyWords,
|
|
|
+ area: _this.sub.region
|
|
|
+ } : {
|
|
|
+ isNoSubscribe: 'N', // 暂不订阅
|
|
|
+ subsequentPrompt: _this.sub.remindChecd ? 'Y' : 'N'
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url: '/bigmember/subscribe/freeUser/subscribeSearch',
|
|
|
+ data: data,
|
|
|
+ success: function(r){
|
|
|
+ if (r.data && r.data.status) {
|
|
|
+ if (type) { // 选择的一键订阅
|
|
|
+ _this.subDialog = false
|
|
|
+ _this.successDialog = true
|
|
|
+ _this.$toast('订阅关键词成功')
|
|
|
+ } else { // 选择的暂不订阅
|
|
|
+ _this.subDialog = false
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // console.log('一键订阅失败', r.error_code);
|
|
|
+ _this.subDialog = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+})
|
|
|
$(function () {
|
|
|
// var vConsole = new VConsole();
|
|
|
if (mySysIsIos()) {//ios登陆后页面不刷新;导致重复登陆
|
|
@@ -1154,6 +1221,26 @@ var SuperSearch = {
|
|
|
SuperSearch.noMoreData();
|
|
|
$(".loading_").hide();
|
|
|
return;
|
|
|
+ } else {
|
|
|
+ // 免费用户是否弹出一键订阅弹框
|
|
|
+ var _this = this
|
|
|
+ $.ajax({
|
|
|
+ type:'get',
|
|
|
+ url:'/bigmember/subscribe/freeUser/searchSubscribe',
|
|
|
+ success: function(r){
|
|
|
+ if (r.data) {
|
|
|
+ vOneKeySubComponent.sub.showArea = r.data.areaSet
|
|
|
+ vOneKeySubComponent.freeSubArea = r.data.freeArea
|
|
|
+ vOneKeySubComponent.sub.keyWords = SuperSearch.s_words
|
|
|
+ // console.log(SuperSearch.s_words, vOneKeySubComponent, 'SuperSearch.s_words');
|
|
|
+ if (r.data.prompt) {
|
|
|
+ vOneKeySubComponent.subDialog = true
|
|
|
+ } else {
|
|
|
+ vOneKeySubComponent.subDialog = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
var html = SuperSearch.getHtml(data["list"], SuperSearch.reqParam["pageNum"]);
|
|
|
// 每次数据插入,必须重置
|