1111
This commit is contained in:
+16
-1
@@ -32,4 +32,19 @@ const getBlog = (bid: string) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export { getBlogs, getBlog, getBtName }
|
const publishAll = () => {
|
||||||
|
return request({
|
||||||
|
url: '/auth/api/v1/reader/blogs/publish/all',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const publish = (bid: string) => {
|
||||||
|
return request({
|
||||||
|
url: '/auth/api/v1/reader/blogs/publish/' + bid,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export { getBlogs, getBlog, getBtName, publish, publishAll }
|
||||||
+1
-1
@@ -20,7 +20,7 @@ const configObj: any = {
|
|||||||
CLIENT_ID: '&client_id=' + 'BIukdHDXeNPmIXe96GA6OOXGgnP5GEhM',
|
CLIENT_ID: '&client_id=' + 'BIukdHDXeNPmIXe96GA6OOXGgnP5GEhM',
|
||||||
REDIRECT_URI: '&redirect_uri=' + 'http://localhost:8080/auth/api/v1/authorize/baidu',
|
REDIRECT_URI: '&redirect_uri=' + 'http://localhost:8080/auth/api/v1/authorize/baidu',
|
||||||
SCOPE: '&scope=basic,netdisk',
|
SCOPE: '&scope=basic,netdisk',
|
||||||
DEVICE_ID: '&device_id=26202308',
|
DEVICE_ID: '&device_id=27103657',
|
||||||
QR_CODE: '&qrcode=' + '1',
|
QR_CODE: '&qrcode=' + '1',
|
||||||
DISPLAY: '&display=popup'
|
DISPLAY: '&display=popup'
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-3
@@ -28,20 +28,26 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button @click="openBlogEditer">创作</el-button>
|
<el-button @click="openBlogEditer">创作</el-button>
|
||||||
|
<el-button @click="publishbyBids">全部重新发布</el-button>
|
||||||
|
|
||||||
<div class="blog_list" v-for="item in data_list">
|
<div class="blog_list" v-for="item in data_list">
|
||||||
<h3 style="cursor: pointer; width: min-content;white-space:nowrap" @click="openBlog(item.bid)">{{ item.title }}</h3>
|
<h3 style="cursor: pointer; width: min-content;white-space:nowrap" @click="openBlog(item.bid)">{{ item.title }}</h3>
|
||||||
<span style="font-size: 12px;">{{ item.bid }}</span>
|
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||||
|
<p style="font-size: 12px; height: 16px;line-height: 16px;overflow: hidden;text-overflow: ellipsis;">{{
|
||||||
|
item.content
|
||||||
|
}}</p>
|
||||||
|
<el-button size="small" type="success" @click="publishbyBid(item.bid)">重新发布
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
<!-- <span style="font-size: 12px;">{{ item.blog_prex }}</span> -->
|
<!-- <span style="font-size: 12px;">{{ item.blog_prex }}</span> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { getBlogs, getBtName } from '../../api/blogView'
|
import { getBlogs, getBtName, publish, publishAll } from '../../api/blogView'
|
||||||
import router from '../../router/index'
|
import router from '../../router/index'
|
||||||
type Blog = {
|
type Blog = {
|
||||||
bid: string,
|
bid: string,
|
||||||
@@ -114,6 +120,13 @@ const openBlogEditer = () => {
|
|||||||
window.open(href, '_blank');
|
window.open(href, '_blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const publishbyBids = () => {
|
||||||
|
publishAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
const publishbyBid = (bid: string) => {
|
||||||
|
publish(bid)
|
||||||
|
}
|
||||||
|
|
||||||
// 初期化処理
|
// 初期化処理
|
||||||
init()
|
init()
|
||||||
|
|||||||
Reference in New Issue
Block a user