app/Modules/Chat/Controllers/AdminController.php

启用远程图片,需替换为oss前缀

// oss图片处理
if (config('shop.open_oss') == 1) {
    $bucket_info = $this->dscRepository->getBucketInfo();
    $endpoint = $bucket_info['endpoint'];
    $result['url'] = str_replace('https:///images', $endpoint.'/images', $result['url']);
}

上传后回调处理public/vendor/layui/lay/modules/layedit.js

o.render({
    url: r.url, method: r.type, elem: e(n).find("input")[0], done: function (e) {
        0 == e.code ? (e.data = e.data || {}, v.call(t, "img", {
            src: e.data.src,
            alt: '',
        }, a)) : i.msg(e.msg || "上传失败")
    }
})