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
{yun:}include file="$wapstyle/member/cheader.htm"{/yun}
<div id="yunvue" class="none">
    <div class="m_cardbox">
        <div class="m_cardbg m_cardboxpv" v-for="(item, listkey) in list" :key="listkey">
            <div class="msg_user"><span class="zxuser_name">{{item.username}}</span>
                <div class="msg_user_r">
                    <div v-if="item.eid">
                        <div @click="pageTo(item.wapexp_url)">
                            <text class="yp_user_look">查看简历</text>
                        </div>
                    </div>
                    <div v-else>
                        <text class="yp_user_look">暂无简历</text>
                    </div>
                </div>
            </div>
            <div class="msg_box">
                <div class="zx_list" v-if="item.job_name"><span class="zx_n">咨询职位</span> {{item.job_name}}</div>
                <div class="zx_list"><span class="zx_n">咨询内容</span> {{item.content}}</div>
                <div class="zx_list" v-if="item.reply"><span class="zx_n">回复内容</span> {{item.reply}}</div>
                <div class="zx_list"><span class="zx_n">咨询日期</span> {{item.datetime_n}}</div>
            </div>
 
            <div class="msg_hf" v-if="!item.reply" @click="replystatus(item.id,item.content)"><img src="{yun:}$wap_style{/yun}/images/Apply_compile.png" alt=""></div>
            <div class="msg_sc" @click="delreply(item.id,listkey)"><img src="{yun:}$wap_style{/yun}/images/resume_del.png" alt=""/></div>
 
        </div>
        <div v-if="total>limit">
            <van-pagination v-model="page" :total-items="total" :items-per-page="limit" force-ellipses @change="pageChange"/>
        </div>
        <div class="wap_member_no" v-show="count==0">暂无记录!</div>
    </div>
    <!--弹出效果-->
    <van-popup v-model="firstreply" position="bottom" round closeable/>
 
    <form id="reply_form">
 
        <div class="job_tckpd">
            <div class="job_tcktit">回复咨询</div>
            <div class="job_tcktip">{{content}}!</div>
            <div class="job_tcktextarea">
                <textarea class=" mt10" placeholder="回复信息,请勿输入电话,QQ,邮箱等联系方式" maxlength="-1" style="width:100%" name="reply" value=''></textarea>
                <input class="ask_input" hidden="true" id="id" name="id" :value="replyid"/>
            </div>
 
            <div class="job_tckbth">
                <div @click="savereply" class="job_tckbth_div">确定</div>
            </div>
        </div>
    </form>
    </van-popup>
</div>
</div>
<script>
    var currentPage = parseInt('{yun:}$smarty.get.page{/yun}');
    new Vue({
        el: '#yunvue',
        data: {
            list: [],
            limit: 10,
            total: 0,
            page: currentPage ? currentPage : 1,
            replyid: '',
            firstreply: false,
            content: '',
        },
        computed: {
            count() {
                if (this.total > this.limit) {
                    return 2;
                } else if (this.list.length == 0) {
                    return 0;
                } else {
                    return 1;
                }
            }
        },
        created() {
            this.getCommsgNews();
        },
        methods: {
            getCommsgNews: function (type) {
                showLoading();
                var that = this;
                var paramer = {};
                paramer['page'] = that.page;
                paramer['limit'] = that.limit;
                $.post('{yun:}url d=wxapp h=com m=msg c=msglist{/yun}', paramer, function (data) {
                    hideLoading();
                    var res = data.data;
                    if (res.list && res.list.length > 0) {
                        that.list = res.list;
                    }
                    that.total = res.total;
                    that.page = currentPage ? currentPage : 1;
 
                    $("#yunvue").css('display', 'block');
                }, 'json');
            },
            savereply: function () {
                var v = getFormValue('reply_form');
                if (v.reply.length == 0) {
                    return showToast('请填写回复描述');
                }
 
                var paramer = {
                    reply: v.reply,
                    id: v.id,
                };
                showLoading('回复中...');
                $.post('{yun:}url d=wxapp h=com m=msg c=savereply{/yun}', paramer, function (data) {
                    hideLoading();
                    if (data.error == 1) {
                        showToast(data.msg, 2, function () {
                            location.reload();
                        });
                    } else {
                        showToast(data.msg);
                    }
                }, 'json');
            },
            replystatus: function (id, content) {
                var that = this;
                var content = content;
                var id = id;
                that.content = content;
                that.replyid = id;
                that.firstreply = true;
            },
            delreply: function (id, key) {
                var that = this;
                var paramer = {
                    id: id,
                };
                showConfirm("确定删除?", function () {
                    showLoading('删除中...');
                    $.post('{yun:}url d=wxapp h=com m=msg c=delsmsglist{/yun}', paramer, function (data) {
                        hideLoading();
 
                        if (data.error == 0) {
                            that.list.splice(key, 1);
                            showToast('删除成功');
                        } else {
                            showToast('删除失败');
                        }
                    }, 'json');
                })
            },
            closeReply: function () {
                var that = this;
                that.firstreply = false;
            },
            pageChange: function (e) {
 
                location.href = 'index.php?c=commsg&chat=1&page=' + e;
            },
            pageTo: function (url) {
                window.location.href = url;
            }
        }
    });
</script>
</body>
</html>