实现部署到二级虚拟目录

This commit is contained in:
Minho
2018-03-13 14:14:56 +08:00
parent 34654ed4d4
commit c278b72f15
17 changed files with 191 additions and 108 deletions

View File

@@ -46,7 +46,7 @@
<div class="list-item" v-for="item in lists">
<div class="book-title">
<div class="pull-left">
<a :href="'/book/' + item.identify + '/dashboard'" title="项目概要" data-toggle="tooltip">
<a :href="'{{.BaseUrl}}/book/' + item.identify + '/dashboard'" title="项目概要" data-toggle="tooltip">
<template v-if="item.privately_owned == 0">
<i class="fa fa-unlock" aria-hidden="true"></i>
</template>
@@ -58,7 +58,7 @@
</div>
<div class="pull-right">
<div class="btn-group">
<a :href="'/book/' + item.identify + '/dashboard'" class="btn btn-default">设置</a>
<a :href="'{{.BaseUrl}}/book/' + item.identify + '/dashboard'" class="btn btn-default">设置</a>
<a href="javascript:;" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
@@ -67,7 +67,7 @@
<ul class="dropdown-menu">
<li><a :href="'{{urlfor "DocumentController.Index" ":key" ""}}' + item.identify" target="_blank">阅读</a></li>
<template v-if="item.role_id != 3">
<li><a :href="'/api/' + item.identify + '/edit'" target="_blank">编辑</a></li>
<li><a :href="'{{.BaseUrl}}/api/' + item.identify + '/edit'" target="_blank">编辑</a></li>
</template>
<template v-if="item.role_id == 0">
<li><a :href="'javascript:deleteBook(\''+item.identify+'\');'">删除</a></li>
@@ -88,7 +88,7 @@
&nbsp;
</template>
<template v-else="">
<a :href="'/book/' + item.identify + '/dashboard'" title="项目概要" style="font-size: 12px;">
<a :href="'{{.BaseUrl}}/book/' + item.identify + '/dashboard'" title="项目概要" style="font-size: 12px;">
${item.description}
</a>
</template>

View File

@@ -61,7 +61,7 @@
</div>
<div class="form-group">
<label>标识</label>
<input type="text" class="form-control" value="{{.BaseUrl}}{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" placeholder="项目唯一标识" disabled>
<input type="text" class="form-control" value="{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" placeholder="项目唯一标识" disabled>
</div>
<div class="form-group">
<label>历史记录数量</label>
@@ -424,7 +424,7 @@
try {
var uploader = WebUploader.create({
auto: false,
swf: '/static/webuploader/Uploader.swf',
swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',
server: '{{urlfor "BookController.UploadCover"}}',
formData : { "identify" : {{.Model.Identify}} },
pick: "#filePicker",

View File

@@ -15,8 +15,8 @@
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="/static/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="/static/respond.js/1.4.2/respond.min.js"></script>
<script src="{{cdnjs "/static/html5shiv/3.7.3/html5shiv.min.js"}}"></script>
<script src="{{cdnjs "/static/respond.js/1.4.2/respond.min.js"}}"></script>
<![endif]-->
</head>
<body>
@@ -50,7 +50,7 @@
</template>
<template v-else>
<div class="list-item" v-for="item in lists">
<img :src="item.avatar" onerror="this.src='/static/images/middle.gif'" class="img-circle" width="34" height="34">
<img :src="item.avatar" onerror="this.src='{{cdnimg "/static/images/middle.gif"}}'" class="img-circle" width="34" height="34">
<span>${item.account}</span>
<span style="font-size: 12px;color: #484848" v-if="item.real_name != ''">[${item.real_name}]</span>
<div class="operate">

View File

@@ -229,7 +229,7 @@
<div class="form-group">
<label for="password" class="col-sm-2 control-label">项目地址</label>
<div class="col-sm-10">
<input type="text" value="{{.BaseUrl}}{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" class="form-control" onmouseover="this.select()" id="projectUrl" title="项目地址">
<input type="text" value="{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" class="form-control" onmouseover="this.select()" id="projectUrl" title="项目地址">
</div>
<div class="clearfix"></div>
</div>

View File

@@ -71,7 +71,7 @@
<tbody>
<tr v-for="item in lists">
<td>${item.member_id}</td>
<td><img :src="item.avatar" onerror="this.src='/static/images/middle.gif'" class="img-circle" width="34" height="34"></td>
<td><img :src="item.avatar" onerror="this.src='{{cdnimg "/static/images/middle.gif"}}'" class="img-circle" width="34" height="34"></td>
<td>${item.account}</td>
<td>${item.real_name}</td>
<td>

View File

@@ -1,7 +1,7 @@
<header class="navbar navbar-static-top navbar-fixed-top manual-header" role="banner">
<div class="container">
<div class="navbar-header col-sm-12 col-md-9 col-lg-8">
<a href="/" class="navbar-brand" title="{{.SITE_NAME}}">
<a href="{{.BaseUrl}}/" class="navbar-brand" title="{{.SITE_NAME}}">
{{if .SITE_TITLE}}
{{.SITE_TITLE}}
{{else}}