chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{yun:}include file="$wapstyle/member/header.htm"{/yun}
<div id="yunvue" class="none">
    <div class="m_tab ">
          <div class="m_tabbox category">
        <ul>
            <li :class="type == 'look' ? 'm_tabactive' : ''" @click="pageTo('index.php?c=look&type=look')">谁看过我</li>
            <li :class="type == 'lookjob' ? 'm_tabactive' : ''" @click="pageTo('index.php?c=look&type=lookjob')">我的足迹</li>
        </ul> 
    </div>    </div>
    <div class="m_cardbox" v-if="type== 'look'">
               <div class="m_cardbgbox">
       <div class="issue_post_body_card" v-for="(item, lookkey) in list" :key="lookkey" @click="pageTo(item.wapcom_url)">
 
            <div class="Posted_card_top" >
                <div class="Posted_card_name">{{item.com_name}}</div>                
            </div>
            <div class="Posted_card_cen">
                <ul>
                    <li v-if="item.city_n">{{item.city_n}}</li>
                    <li v-if="item.mun_n">{{item.mun_n}}</li>
                    <li v-if="item.pr_n">{{item.pr_n}}</li>
                </ul>
            </div>
            <div class="Posted_card_bom">
                <div class="Posted_bom_box">
                    <div class="Posted_box_logo">
                        <img :src="item.logo_n" alt="" width="100%" height="100%">
                    </div>
                    <div class="Posted_box_name">{{item.com_name}}</div>
                </div>
                <div class="Posted_bom_time">{{item.datetime_n}}</div>
            </div>
            <div class="Posted_card_look">
                <div class="Posted_look_box">
                    <div class="Posted_box_job">{{item.linkman}}{{item.linkjob ? '·' + item.linkjob : item.linkjob}}</div>
                    <div class="Posted_box_text">查看了您</div>
                </div>
 
                <div class="Posted_look_del" @click.stop="lookdel(item.id, lookkey)">
                    <img src="{yun:}$wap_style{/yun}/images/resume_del.png" alt="" width="100%" height="100%">
                </div> 
            </div>
        </div>
        <div v-if="count==2">
        <van-pagination v-model="page" :total-items="total" :items-per-page="limit" force-ellipses @change="pageChange" /> 
        </div>   <div class="wap_member_bgcar"v-show="islook&&count==0">
        <div class="wap_member_no">
           暂无记录!
        </div>          </div>  
    </div>    </div>
    <div class="m_cardbox" v-if="type=='lookjob'">        
       <div class="m_cardbgbox">
        <div class="issue_post_body_card" v-for="(item, lkey) in list" :key="lkey">
            <div class="Posted_card_top">
                <div class="Posted_card_name" @click="pageTo(item.wapjob_url)">{{item.job_name}}</div>
                <span class="">{{item.salary}}</span>
            </div>
            <div class="Posted_card_cen">
                <ul>
                    <li v-if="item.cityname">{{item.cityname}}</li>
                    <li v-if="item.edu_n">{{item.edu_n}}</li>
                    <li v-if="item.exp_n">{{item.exp_n}}</li>
                </ul>
               
            </div>
            <div class="Posted_card_bom">
                <div class="Posted_bom_box" @click="pageTo(item.wapcom_url)">
                    <div class="Posted_box_logo">
                        <img :src="item.com_logo_n" alt="" width="100%" height="100%">
                    </div>
                    <div class="Posted_box_name">{{item.com_name}}</div>
                </div>
                <div class="Posted_bom_time">{{item.datetime_n}}</div>
            </div>
    
    </div>
         </div>
        <div v-if="count ==2">
            <van-pagination v-model="page" :total-items="total" :items-per-page="limit" force-ellipses @change="pageChange" /> 
            </div>        <div class="wap_member_bgcar"  v-show="islook&&count==0">
        <div class="wap_member_no">
            您还没有浏览过的职位<div><a class="wap_member_no_submit" href="{yun:}url m=wap c=job{/yun}">去搜索相关职位</a></div>
        </div>     </div>
    </div>   
</div>
<script>  
  var currentPage = parseInt('{yun:}$smarty.get.page{/yun}');   
  var type = '{yun:}$smarty.get.type{/yun}';
   type = type ? type : 'look';
      new Vue({
        el: '#yunvue',
        data: {
          list: [],
          limit:20,
          type: type,        
          total:0,
          page: currentPage ? currentPage : 1,
          islook :false
        },
        computed: {
          count(){
            if(this.total > this.limit){
              return 2;
            }else if(this.list.length==0){
              return 0;
            }else{
                return 1;
            }
          }
        },
        created() {   
         this.typeShow(type);
        },
        methods:{
          typeShow:function(e){
            this.page=1;
            this.list=[];
            this.type = e;
            this.islook=false;
            if(e=='look'){
                this.getLook();
            }else if (e=='lookjob') {
              this.getLookJob();
            }
          },
          getLook:function(){
            showLoading();
            var that = this;
            var paramer = {};
                paramer['page'] = that.page;
                paramer['limit'] = that.limit;     
            $.post('{yun:}url d=wxapp h=user m=resume c=look_resume{/yun}',paramer,function(res){
              hideLoading();      
             
              that.list = res.data;
              that.total = res.total;
              that.type = type;
              that.page = currentPage ? currentPage : 1;
              that.islook = true 
               $("#yunvue").css('display', 'block');
            },'json');
          },
          getLookJob:function(){
            showLoading();
            var that = this;
            var paramer = {};
                paramer['page'] = that.page;
                paramer['limit'] = that.limit;     
            $.post('{yun:}url d=wxapp h=user m=job c=look_job{/yun}',paramer,function(res){
              hideLoading();      
              
              that.list = res.data;
              that.total = res.total;
              that.page = currentPage ? currentPage : 1;
              that.islook = true 
               $("#yunvue").css('display', 'block');
            },'json');
          },
          lookdel:function(id,key){
              let that = this
              let param = {
                ids: id
              };
             
             showConfirm('确定删除', () => {
                showLoading('删除中...')
                $.post('{yun:}url d=wxapp h=user m=resume c=look_resume_del{/yun}', param, function(data){
                  hideLoading();
                  if (data.error == 1) {
                    showToast('删除成功',2, function() {
                      that.list.splice(key, 1);   
                    });
                  } else {
                    showToast('删除失败');
                  }
                });
             });   
             
          },
           pageChange:function(e){
          
            location.href = 'index.php?c=look&type='+this.type+'&page='+e;
          },
          pageTo:function(url){
              window.location.href = url;
          }
        } 
      });
</script>
</body>
</html>