wangxiaogang 3 年 前
コミット
ceb918f038
2 ファイル変更14 行追加23 行削除
  1. 2 17
      src/web/staticres/js/login.js
  2. 12 6
      src/web/staticres/js/pur-search-index-pc.js

+ 2 - 17
src/web/staticres/js/login.js

@@ -354,11 +354,11 @@ function checkMenuForEnt () {
                     }
                     if(r.entnicheMenu == true){
                         if (r.isNew == true) {
-                            tempHtml+= "<div class=\"myorderDiv\" id=\"entDiv\">"
+                            tempHtml+= "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/newBus'\">"
                                 +"<span>商机管理</span>"
                                 +"</div>"
                         } else {
-                            tempHtml+= "<div data-ent-menu id=\"entDiv\" class=\"myorderDiv\">"
+                            tempHtml+= "<div data-ent-menu class=\"myorderDiv\" onclick=\"window.location.href='/entpc/bus'\">"
                                 +"<span>商机管理</span>"
                                 +"</div>"
                         }
@@ -369,21 +369,6 @@ function checkMenuForEnt () {
                           +"</div>"
                     }
                     $(".infoList .lastBox").before(tempHtml)
-                    $('#entDiv').click(function () {
-                        $.ajax({
-                            type:'POST',
-                            url:'/entnicheNew/buy/whetherbuy',
-                            success:function () {
-                                if(r.entnicheMenu == true){
-                                    if (r.isNew == true) {
-                                        window.location.href='/entpc/newBus'
-                                    } else {
-                                        window.location.href='/entpc/bus'
-                                    }
-                                }
-                            }
-                        })
-                    })
                 }
             })
         }

+ 12 - 6
src/web/staticres/js/pur-search-index-pc.js

@@ -534,7 +534,7 @@ var vm = new Vue({
             this.selectName = arr1
             this.selectIndustry = arr2
             this.selectId = arr3
-            console.info(this.selectName, this.claimcheckName)
+            // console.info(this.attentionName, this.claimcheckName)
             var tempArray1 = this.arrDefault(this.selectName, this.attentionName)
             var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
             if (tempArray1.length == 0) {
@@ -586,12 +586,14 @@ var vm = new Vue({
                 contentType:'application/json;charset=utf-8',
                 success: function (res) {
                     if (res.data.names) {
-                        // this.claimcheckName = res.data.names
+                      this.claimcheckName = []
+                      res.data.names.forEach(s => {
+                        this.claimcheckName.push(s.split(',')[0])
+                      })
                     }
                     arrs.forEach(v => {
                       let renName = res.data.names.join(',')
                       res.data.names.forEach(s => {
-                        this.claimcheckName.push(s.split(',')[0])
                         if (renName.indexOf(v.Buyer) > -1) {
                           v.claim1 = true
                           if (s.split(',')[0] == v.Buyer) {
@@ -628,7 +630,7 @@ var vm = new Vue({
                     D: per ? str : item.claim1,
                 }
             }
-            console.info(obj)
+            // console.info(obj)
             $.ajax({
                 url: '/entnicheNew/customer/attention',
                 method: 'POST',
@@ -662,6 +664,7 @@ var vm = new Vue({
                       this.follow = false
                       this.claim = false
                       $('.custom-checkbox').prop('checked', false)
+                      _this.selectName = []
                       _this.getList(_this.listState.pageNum)
                     }
                 }.bind(this)
@@ -992,6 +995,7 @@ var vm = new Vue({
                 $('.tag-labels').empty()
                 $('.clear-input').val('')
                 $('.tags-list').find('.tags-item').removeClass('tags-active')
+                $('.tags-list').find('.disabled').removeClass('disabled')
                 $('.tag-placeholder').show()
               })
             })
@@ -1083,11 +1087,13 @@ var vm = new Vue({
                 dataType: 'json',
                 success: function (r) {
                   if (r.error_code == 0 && r.data) {
-                    // $('.tags-box').slideToggle()
-                    _this.getList(_this.listState.pageNum)
                     _this.follow = false
                     _this.claim = false
                     $('.custom-checkbox').prop('checked', false)
+                    _this.selectName = []
+                    _this.claimcheckName = []
+                    _this.getList(_this.listState.pageNum)
+                    $('.tags-list').find('.disabled').removeClass('disabled')
                     toastFn('认领成功!', 1000)
                     _this.$emit('updatelist', true)
                     callback && callback()