chengkun
2025-09-05 4822304b63e1bd6327860af7f3db0133cecf167f
public/static/admin/js/online_message/index.js
@@ -8,7 +8,7 @@
            count: 0,
            searchForm: {
                page: 1,
                page_size: 20,
                limit: 20,
                kw: '',
            },
        };
@@ -22,28 +22,30 @@
            return moment(time * 1000).format("YYYY-MM-DD H:m");
        },
        ///修改扩展字段的值////
        updateExt(row, field) {
            if (row.id) {
                let that = this;
                let url = "/admin/" + viewPath + "/updateExt.html"
                postRequest(url, { id: row.id, [field]: row[field] }).then(res => {
                    if (res.data.code == 200) {
                        that.$notify({
                            title: "成功",
                            message: res.data.message,
                            position: "top-left",
                            type: "success",
                        });
                    }
                    else {
                        that.$notify.error({
                            title: "错误",
                            position: "top-left",
                            message: res.data.message,
                        });
                    }
                });
            }
        changeMessageStatus(id) {
            let that = this;
            let url = "/admin/onlineMessage/change_message_status.html"
            postRequest(url, { id: id }).then(res => {
                if (res.data.code == 200) {
                    that.$message({
                        message: res.data.message,
                        type: 'success',
                        duration: 1000,
                        center: true,
                        onClose: function () {
                            that.getOnlineMessageList();
                        }
                    });
                } else {
                    that.$message({
                        message: res.data.message,
                        type: 'error',
                        duration: 2000,
                        center: true
                    });
                }
            });
        },
        handleSizeChange(val) {