实现特殊页面配置

This commit is contained in:
GoEdgeLab
2020-09-20 08:58:48 +08:00
parent b20ab500aa
commit 6fddbc6a33
13 changed files with 400 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
{$layout "layout_popup"}
<h3>添加特殊页面</h3>
<form class="ui form" data-tea-action="$" data-tea-success="success">
<table class="ui table selectable definition">
<tr>
<td class="title">响应状态码 *</td>
<td>
<input type="text" name="status" size="3" placeholder="状态码" maxlength="3" style="width:5.2em" ref="focus"/>
<p class="comment">比如404或者50x。</p>
</td>
</tr>
<tr>
<td>URL *</td>
<td>
<input type="text" name="url" maxlength="500" placeholder="页面文件路径或者完整的URL"/>
<p class="comment">页面文件是相对于节点安装目录的页面文件比如web/pages/40x.html或者一个完整的URL。</p>
</td>
</tr>
<tr>
<td>新状态码</td>
<td>
<input type="text" name="newStatus" size="3" placeholder="状态码" maxlength="3" style="width:5.2em"/>
<p class="comment">可以用来修改响应的状态码,不填表示不改变原有状态码。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
this.success = NotifyPopup
})

View File

@@ -3,5 +3,9 @@
{$template "/left_menu"}
<div class="right-box">
<p class="ui message">此功能暂未开放,敬请期待。</p>
<form class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="webId" :value="webId"/>
<pages-and-shutdown-box :v-pages="pages" :v-shutdown-config="shutdownConfig"></pages-and-shutdown-box>
<submit-btn></submit-btn>
</form>
</div>

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
this.success = NotifyReloadSuccess("保存成功")
})

View File

@@ -0,0 +1,29 @@
{$layout "layout_popup"}
<h3>修改特殊页面</h3>
<form class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="pageId" :value="pageConfig.id"/>
<table class="ui table selectable definition">
<tr>
<td class="title">响应状态码 *</td>
<td>
<input type="text" name="status" size="3" placeholder="状态码" maxlength="3" style="width:5.2em" ref="focus" v-model="pageConfig.status"/>
<p class="comment">比如404或者50x。</p>
</td>
</tr>
<tr>
<td>URL *</td>
<td>
<input type="text" name="url" maxlength="500" placeholder="页面文件路径或者完整的URL" v-model="pageConfig.url"/>
<p class="comment">页面文件是相对于节点安装目录的页面文件比如web/pages/40x.html或者一个完整的URL。</p>
</td>
</tr>
<tr>
<td>新状态码</td>
<td>
<input type="text" name="newStatus" size="3" placeholder="状态码" maxlength="3" style="width:5.2em" v-model="newStatus"/>
<p class="comment">可以用来修改响应的状态码,不填表示不改变原有状态码。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>

View File

@@ -0,0 +1,8 @@
Tea.context(function () {
this.success = NotifyPopup
this.newStatus = ""
if (this.pageConfig.newStatus > 0) {
this.newStatus = this.pageConfig.newStatus
}
})