|
@@ -525,6 +525,9 @@
|
|
|
</style>
|
|
|
</head>
|
|
|
<body class="p13">
|
|
|
+ <div id="jyKeepComponent">
|
|
|
+ <keep-component ref="vKeepComponent" @on-change-keep="changeKeepStatus" :bid="nowOpenBid" :first="false"></keep-component>
|
|
|
+ </div>
|
|
|
<div class="_header collection" id="select-meau">
|
|
|
<div class="wx_header">
|
|
|
<div class="wx_header_left">
|
|
@@ -580,8 +583,8 @@
|
|
|
</div>
|
|
|
</div> -->
|
|
|
<van-dropdown-menu style="width: auto;overflow-x: auto;">
|
|
|
- <van-dropdown-item :title="timeText" ref="dateItem">
|
|
|
- <date-component @cancel="cancel" @confirm="confirm" />
|
|
|
+ <van-dropdown-item :title="tagText.timeText" ref="dateItem">
|
|
|
+ <date-component ref="datecom" @cancel="cancel" @confirm="confirm" :selectdate="selectDate"/>
|
|
|
</van-dropdown-item>
|
|
|
<van-dropdown-item ref="areaItem">
|
|
|
<template #title>
|
|
@@ -591,7 +594,7 @@
|
|
|
<span class="root_open">开通</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
- <area-component v-if="screenShow" @cancel="cancel" @confirm="confirm"></area-component>
|
|
|
+ <area-component v-if="screenShow" @cancel="cancel" @confirm="confirm" :selectarealist="selectAreaList"></area-component>
|
|
|
<root-component v-if="!screenShow" @cancel="cancel" @confirm="confirm"></root-component>
|
|
|
</van-dropdown-item>
|
|
|
<van-dropdown-item ref="industryItem">
|
|
@@ -602,7 +605,7 @@
|
|
|
<span class="root_open">开通</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
- <industry-component v-if="screenShow" @cancel="cancel" @confirm="confirm"></industry-component>
|
|
|
+ <industry-component v-if="screenShow" @cancel="cancel" @confirm="confirm" :selectindustrylist="selectIndustryList"></industry-component>
|
|
|
<root-component v-if="!screenShow" @cancel="cancel" @confirm="confirm"></root-component>
|
|
|
</van-dropdown-item>
|
|
|
<van-dropdown-item ref="cateItem">
|
|
@@ -613,7 +616,7 @@
|
|
|
<span class="root_open">开通</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
- <cate-component @cancel="cancel" v-if="screenShow" @confirm="confirm"></cate-component>
|
|
|
+ <cate-component @cancel="cancel" v-if="screenShow" @confirm="confirm" :selectcatelist="selectCateList"></cate-component>
|
|
|
<root-component v-if="!screenShow" @cancel="cancel" @confirm="confirm"></root-component>
|
|
|
</van-dropdown-item>
|
|
|
<van-dropdown-item title="关键词" ref="keywordItem">
|
|
@@ -624,7 +627,7 @@
|
|
|
<span class="root_open">开通</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
- <keyword-component @cancel="cancel" v-if="screenShow" @confirm="confirm"></keyword-component>
|
|
|
+ <keyword-component @cancel="cancel" v-if="screenShow" @confirm="confirm" :selectkeywordlist="selectKeyWordList"></keyword-component>
|
|
|
<root-component v-if="!screenShow" @cancel="cancel" @confirm="confirm"></root-component>
|
|
|
</van-dropdown-item>
|
|
|
<van-dropdown-item title="公告类型" ref="noticeItem">
|
|
@@ -635,7 +638,7 @@
|
|
|
<span class="root_open">开通</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
- <notice-component @cancel="cancel" v-if="screenShow" @confirm="confirm"></notice-component>
|
|
|
+ <notice-component @cancel="cancel" v-if="screenShow" @confirm="confirm" :selectnoticelist="selectNoticeList"></notice-component>
|
|
|
<root-component v-if="!screenShow" @cancel="cancel" @confirm="confirm"></root-component>
|
|
|
</van-dropdown-item>
|
|
|
</van-dropdown-menu>
|
|
@@ -785,6 +788,7 @@
|
|
|
<script src='{{Msg "seo" "cdn"}}/common-module/collection/js/cate-mobile.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script src='{{Msg "seo" "cdn"}}/common-module/collection/js/keyword-mobile.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script src='{{Msg "seo" "cdn"}}/common-module/collection/js/notice-mobile.js?v={{Msg "seo" "version"}}'></script>
|
|
|
+<script src='{{Msg "seo" "cdn"}}/common-module/keep-tags/keep-tags-template.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/historypush.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/mapArea.js?v={{Msg "seo" "version"}}'></script>
|
|
@@ -944,18 +948,6 @@
|
|
|
day = day < 10 ? '0' + day : day;
|
|
|
return year + '-' + month + '-' + day;
|
|
|
})();
|
|
|
-
|
|
|
- // 判断是否是大会员
|
|
|
- $.ajax({
|
|
|
- url: '/publicapply/bidcoll/power',
|
|
|
- type: 'POST',
|
|
|
- success: function(res) {
|
|
|
- if(res.data.member) {
|
|
|
- $(".switch").addClass("only-member");
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
//初始化数据
|
|
|
function initpage() {
|
|
|
if (sessionStorage && sessionStorage.historypushScrollTop && sessionStorage.historypushDataCache) {
|
|
@@ -1431,49 +1423,82 @@
|
|
|
$('.collec_star').eq(item).find('.weishoucang').show()
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
|
|
|
- // 收藏或取消收藏
|
|
|
- $(document).off('click').on('click','.collec_star', function(e){
|
|
|
+ // 收藏或取消收藏
|
|
|
+ $('.collec_star').on('click', function(e){
|
|
|
const _this = this
|
|
|
e.stopPropagation()
|
|
|
const id = $(this).attr('data-id')
|
|
|
const paramsObj = {
|
|
|
- baction: 'C',
|
|
|
binfo: [
|
|
|
{
|
|
|
bid: id
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
- $.ajax({
|
|
|
- url: '/publicapply/bidcoll/action',
|
|
|
- type: "POST",
|
|
|
- contentType: 'application/json;charset=utf-8',
|
|
|
- data:JSON.stringify(paramsObj),
|
|
|
- success: function(res){
|
|
|
- console.log(res)
|
|
|
- if(res.error_code == 0) {
|
|
|
- if(res.data) {
|
|
|
- $(_this).find('.shoucang').show()
|
|
|
- $(_this).find('.weishoucang').hide()
|
|
|
- _this.$toast(res.error_msg)
|
|
|
- } else {
|
|
|
- _this.$toast(res.error_msg)
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(err){
|
|
|
- _this.$toast(res.error_msg)
|
|
|
- }
|
|
|
- })
|
|
|
- this.listState.list.map((item,index) => {
|
|
|
- console.log(item)
|
|
|
- if(id === item._id) {
|
|
|
- this.getList()
|
|
|
+ var shoucang = $(_this).find('.weishoucang').is(':hidden')
|
|
|
+ // 说明未收藏,点击收藏
|
|
|
+ console.log(vKeepComponent)
|
|
|
+ if (vKeepComponent) {
|
|
|
+ vKeepComponent.changeBid(id, !shoucang)
|
|
|
+ vKeepComponent.changeKeepStatus(!shoucang, _this)
|
|
|
}
|
|
|
- })
|
|
|
+ // $.ajax({
|
|
|
+ // url: '/publicapply/bidcoll/action',
|
|
|
+ // type: "POST",
|
|
|
+ // contentType: 'application/json;charset=utf-8',
|
|
|
+ // data:JSON.stringify(paramsObj),
|
|
|
+ // success: function(res){
|
|
|
+ // console.log(res)
|
|
|
+ // if(res.error_code == 0) {
|
|
|
+ // if(res.data) {
|
|
|
+ // $(_this).find('.shoucang').show()
|
|
|
+ // $(_this).find('.weishoucang').hide()
|
|
|
+ // } else {
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // error: function(err){
|
|
|
+ // _this.$toast(res.error_msg)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.listState.list.map((item,index) => {
|
|
|
+ // console.log(item)
|
|
|
+ // if(id === item._id) {
|
|
|
+ // this.getList()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
})
|
|
|
+ }
|
|
|
+
|
|
|
+ var vKeepComponent = new Vue({
|
|
|
+ delimiters: ['${', '}'],
|
|
|
+ el: '#jyKeepComponent',
|
|
|
+ data: {
|
|
|
+ nowOpenBid: ''
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ changeBid (id, type) {
|
|
|
+ this.nowOpenBid = id
|
|
|
+ this.$refs.vKeepComponent.ajaxAddKeep(id, type)
|
|
|
+ },
|
|
|
+ changeKeepStatus (type, that) {
|
|
|
+ changeCollectStatus(type, that)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ function changeCollectStatus(type, that) {
|
|
|
+ console.log(type, that)
|
|
|
+ if(type) {
|
|
|
+ $(that).find('.shoucang').show()
|
|
|
+ $(that).find('.weishoucang').hide()
|
|
|
+ } else {
|
|
|
+ $(that).find('.shoucang').hide()
|
|
|
+ $(that).find('.weishoucang').show()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//
|
|
|
function formatDate(date, sl) {
|
|
|
var myDate = new Date(date * 1000);
|
|
@@ -1505,8 +1530,7 @@
|
|
|
|
|
|
//
|
|
|
function appendList(content) {
|
|
|
- content.children(".tslist").on("click", function (event) {
|
|
|
- event.stopPropagation() // 阻止冒泡
|
|
|
+ content.children(".tslist").on("click", function () {
|
|
|
var isv = $(this).find("a.bt").hasClass("visited");//是否为已读
|
|
|
setVisitedIndex($(this), "");
|
|
|
var sds = $(this).attr("words");
|
|
@@ -1515,6 +1539,7 @@
|
|
|
var index = $(this).find("a.bt").attr("projectm");
|
|
|
var pdate = $(this).find("a.bt").attr("push_date");
|
|
|
beforeJump(eid, h, sds, index, pdate, isv);
|
|
|
+ sessionStorage.setItem(vm.sessStorageKey, JSON.stringify(vm.$data))
|
|
|
});
|
|
|
$("#list").append(content);
|
|
|
$(".findnull").hide();
|
|
@@ -1579,10 +1604,29 @@
|
|
|
}
|
|
|
if (area == undefined || area == "") {
|
|
|
sessionStorage.removeItem(userId + "_selectCity");
|
|
|
- sessionStorage.removeItem(userId + "_selectCityName");
|
|
|
} else {
|
|
|
sessionStorage.setItem(userId + "_selectCity", area);
|
|
|
}
|
|
|
+ if (subscopeclass == undefined || subscopeclass == "") {
|
|
|
+ sessionStorage.removeItem(userId + "_selectIndustry");
|
|
|
+ } else {
|
|
|
+ sessionStorage.setItem(userId + "_selectIndustry", subscopeclass);
|
|
|
+ }
|
|
|
+ if (buyerclass == undefined || buyerclass == "") {
|
|
|
+ sessionStorage.removeItem(userId + "_selectCate");
|
|
|
+ } else {
|
|
|
+ sessionStorage.setItem(userId + "_selectCate", buyerclass);
|
|
|
+ }
|
|
|
+ if (key == undefined || key == "") {
|
|
|
+ sessionStorage.removeItem(userId + "_selectKeyword");
|
|
|
+ } else {
|
|
|
+ sessionStorage.setItem(userId + "_selectKeyword", key);
|
|
|
+ }
|
|
|
+ if (subtype == undefined || subtype == "") {
|
|
|
+ sessionStorage.removeItem(userId + "_selectNotice");
|
|
|
+ } else {
|
|
|
+ sessionStorage.setItem(userId + "_selectNotice", subtype);
|
|
|
+ }
|
|
|
ajaxFlag = true;
|
|
|
},
|
|
|
error: function (xhr, type) {
|