d8d8583618395a47888ea32369fd0537.php 5.1 KB

12
  1. <?php /*a:1:{s:70:"D:\project\gyx\gaoyixia\application\admin\view\config\storage-oss.html";i:1699858976;}*/ ?>
  2. <form onsubmit="return false;" data-auto="true" action="<?php echo url(); ?>" method="post" class='layui-form layui-card' autocomplete="off"><div class="layui-card-body"><div class="color-text margin-left-40 margin-bottom-20 layui-code" style="border-left-width:1px;background:none"><p class="margin-bottom-5 font-w7">文件将上传到阿里云OSS空间,需要配置OSS公开访问及跨域策略!</p> 目前已实现自动创建空间及配置访问策略!<a target="_blank" href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=08p1pddw">我要免费申请</a></div><div class="layui-form-item"><label class="layui-form-label">AllowExts<br><span class="nowrap color-desc">允许类型</span></label><div class="layui-input-block"><input type="text" name="storage_local_exts" required value="<?php echo sysconf('storage_local_exts'); ?>" placeholder="请输入系统文件上传后缀" class="layui-input"><p class="help-block">设置系统允许上传文件的后缀,多个以英文逗号隔开。如:png,jpg,rar,doc</p></div></div><div class="layui-form-item"><label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label><div class="layui-input-block"><?php foreach(['http','https','auto'] as $pro): ?><label class="think-radio"><?php if(sysconf('storage_oss_is_https') == $pro): ?><input checked type="radio" name="storage_oss_is_https" value="<?php echo htmlentities($pro); ?>" lay-ignore><?php echo htmlentities($pro); else: ?><input type="radio" name="storage_oss_is_https" value="<?php echo htmlentities($pro); ?>" lay-ignore><?php echo htmlentities($pro); ?><?php endif; ?></label><?php endforeach; ?><p class="help-block">阿里云对象存储访问协议(http、https、auto),其中 https 需要配置证书才能使用,auto 为相对协议自动根据域名切换http与https。</p></div></div><div class="layui-form-item"><label class="layui-form-label">Bucket<br><span class="nowrap color-desc">空间名称</span></label><div class="layui-input-block"><input type="text" name="storage_oss_bucket" required value="<?php echo sysconf('storage_oss_bucket'); ?>" placeholder="请输入OSS Bucket (空间名称)" class="layui-input"><p class="help-block">填写OSS存储空间名称,如:think-admin-oss(需要是全区唯一的值,不存在时会自动创建)</p></div></div><div class="layui-form-item"><label class="layui-form-label">EndPoint<br><span class="nowrap color-desc">数据中心</span></label><div class="layui-input-block"><select required name="storage_oss_endpoint" class="layui-select" lay-search><?php foreach($ossPoints as $k=>$p): if(sysconf('storage_oss_endpoint') == $k): ?><option selected value="<?php echo htmlentities($k); ?>"><?php echo htmlentities($p); ?><span class="font-s10 color-desc">(<?php echo htmlentities($k); ?>)</span></option><?php else: ?><option value="<?php echo htmlentities($k); ?>"><?php echo htmlentities($p); ?><span class="font-s10 color-desc">(<?php echo htmlentities($k); ?>)</span></option><?php endif; ?><?php endforeach; ?></select><p class="help-block">请选择OSS数据中心访问节点,有效值如:oss-cn-shenzhen.aliyuncs.com</p></div></div><div class="layui-form-item"><label class="layui-form-label">AccessKey<br><span class="nowrap color-desc">访问密钥</span></label><div class="layui-input-block"><input type="text" name="storage_oss_keyid" required value="<?php echo sysconf('storage_oss_keyid'); ?>" maxlength="30" placeholder="请输入OSS AccessKey (访问密钥)" class="layui-input"><p class="help-block">可以在 [ 阿里云 > 个人中心 ] 设置并获取到访问密钥。</p></div></div><div class="layui-form-item"><label class="layui-form-label">SecretKey<br><span class="nowrap color-desc">安全密钥</span></label><div class="layui-input-block"><input type="text" name="storage_oss_secret" required value="<?php echo sysconf('storage_oss_secret'); ?>" maxlength="30" placeholder="请输入OSS SecretKey (安全密钥)" class="layui-input"><p class="help-block">可以在 [ 阿里云 > 个人中心 ] 设置并获取到安全密钥。</p></div></div><div class="layui-form-item"><label class="layui-form-label">Domain<br><span class="nowrap color-desc">访问域名</span></label><div class="layui-input-block"><input type="text" name="storage_oss_domain" value="<?php echo sysconf('storage_oss_domain'); ?>" placeholder="请输入OSS存储 Domain (访问域名)" class="layui-input"><p class="help-block">填写OSS存储外部访问域名,如:think-admin-oss.oss-cn-shenzhen.aliyuncs.com(正常情况下是自动获取的)</p></div></div><div class="hr-line-dashed margin-left-40"></div><div class="layui-form-item text-center padding-left-40"><input type="hidden" name="storage_type" value="oss"><button class="layui-btn" type="submit">保存配置</button><button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗?" data-close>取消修改</button></div></div><script>form.render()</script></form>