修改接口路径
This commit is contained in:
parent
061fde4eaf
commit
ab7b714461
@ -177,7 +177,7 @@ Container(
|
|||||||
|
|
||||||
```dart
|
```dart
|
||||||
Image.network(
|
Image.network(
|
||||||
'https://www.colorfulsweet.site/api/common/randomBg?id=5d79b8606867833591833ae4', // 图片地址
|
'https://www.colorfulsweet.site/api/v1/common/randomBg?id=5d79b8606867833591833ae4', // 图片地址
|
||||||
scale: 1.5, // 缩放(值越大图片显示越小)
|
scale: 1.5, // 缩放(值越大图片显示越小)
|
||||||
fit: BoxFit.fitHeight, // fit属性指定控制图片拉伸适应容器的方式, 这里是按高度适应
|
fit: BoxFit.fitHeight, // fit属性指定控制图片拉伸适应容器的方式, 这里是按高度适应
|
||||||
),
|
),
|
||||||
@ -187,7 +187,7 @@ Image.network(
|
|||||||
可以给图片混合上一种颜色,类似于添加滤镜
|
可以给图片混合上一种颜色,类似于添加滤镜
|
||||||
```dart
|
```dart
|
||||||
Image.network(
|
Image.network(
|
||||||
'https://www.colorfulsweet.site/api/common/randomBg?id=5d79b8606867833591833ae4',
|
'https://www.colorfulsweet.site/api/v1/common/randomBg?id=5d79b8606867833591833ae4',
|
||||||
color: Colors.lightGreen, // 混合的颜色
|
color: Colors.lightGreen, // 混合的颜色
|
||||||
colorBlendMode: BlendMode.lighten, // 混合的模式
|
colorBlendMode: BlendMode.lighten, // 混合的模式
|
||||||
repeat: ImageRepeat.repeat, // 平铺充满容器
|
repeat: ImageRepeat.repeat, // 平铺充满容器
|
||||||
|
|||||||
@ -22,7 +22,7 @@ html, body, #container {
|
|||||||
min-height:100%;
|
min-height:100%;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
background: $colorBodyBg url(/api/common/randomBg?label=background) no-repeat;
|
background: $colorBodyBg url(/api/v1/common/randomBg?label=background) no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-position: right;
|
background-position: right;
|
||||||
// overflow-scrolling: touch;
|
// overflow-scrolling: touch;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
.left-col {
|
.left-col {
|
||||||
background: $colorBg url(/api/common/randomBg?label=banner) no-repeat;
|
background: $colorBg url(/api/v1/common/randomBg?label=banner) no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: top;
|
background-position: top;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|||||||
@ -10,7 +10,7 @@ window.AV = require('leancloud-storage')
|
|||||||
|
|
||||||
import(/* webpackChunkName: "valine" */ '../lib/Valine.min').then(({default: Valine }) => {
|
import(/* webpackChunkName: "valine" */ '../lib/Valine.min').then(({default: Valine }) => {
|
||||||
// 从接口获取评论配置
|
// 从接口获取评论配置
|
||||||
axios.get(`${window.themeConfig.root}api/common/config/valine_config`).then(res => {
|
axios.get(`${window.themeConfig.root}api/v1/common/config/valine_config`).then(res => {
|
||||||
let config = res.data
|
let config = res.data
|
||||||
config.path = window.location.pathname
|
config.path = window.location.pathname
|
||||||
// config.av = AV
|
// config.av = AV
|
||||||
|
|||||||
@ -27,7 +27,7 @@ function loadMoreItems(step) {
|
|||||||
scrollLock = true //加载过程中锁定滚动加载
|
scrollLock = true //加载过程中锁定滚动加载
|
||||||
loadTip.style.display = 'block'
|
loadTip.style.display = 'block'
|
||||||
// 滚动到底部时调用
|
// 滚动到底部时调用
|
||||||
axios.get(`${themeConfig.root}api/common/photos`, {params: {start:totalIndex, limit:step}}).then(res => {
|
axios.get(`${themeConfig.root}api/v1/common/photos`, {params: {start:totalIndex, limit:step}}).then(res => {
|
||||||
var itemContainer = document.createElement('div')
|
var itemContainer = document.createElement('div')
|
||||||
for(let index = 0 ; index<res.data.data.length && totalIndex<res.data.total ; index++,totalIndex++ ) {
|
for(let index = 0 ; index<res.data.data.length && totalIndex<res.data.total ; index++,totalIndex++ ) {
|
||||||
let imgHeight = null, imgFile = res.data.data[index],
|
let imgHeight = null, imgFile = res.data.data[index],
|
||||||
|
|||||||
@ -99,7 +99,7 @@ const vm = new Vue({
|
|||||||
limit: this.fullTextSearch.limit,
|
limit: this.fullTextSearch.limit,
|
||||||
words: this.fullTextSearchWords
|
words: this.fullTextSearchWords
|
||||||
}
|
}
|
||||||
axios.get(window.themeConfig.root + 'api/common/search', {params}).then(res => {
|
axios.get(window.themeConfig.root + 'api/v1/common/search', {params}).then(res => {
|
||||||
this.fullTextSearch.isLoading = false
|
this.fullTextSearch.isLoading = false
|
||||||
fullTextSearchTimer = null
|
fullTextSearchTimer = null
|
||||||
let result = res.data
|
let result = res.data
|
||||||
@ -225,7 +225,7 @@ function handleSearch(searchItems) {
|
|||||||
|
|
||||||
async function welcomeMessage() {
|
async function welcomeMessage() {
|
||||||
let now = new Date().getHours()
|
let now = new Date().getHours()
|
||||||
return axios.get(`${window.themeConfig.root}api/common/config/waifu_tip`).then(res => {
|
return axios.get(`${window.themeConfig.root}api/v1/common/config/waifu_tip`).then(res => {
|
||||||
let textTimes = res.data
|
let textTimes = res.data
|
||||||
let text = null
|
let text = null
|
||||||
Array.prototype.sort.call(textTimes, (item1, item2) => {
|
Array.prototype.sort.call(textTimes, (item1, item2) => {
|
||||||
@ -273,7 +273,7 @@ const waifuTools = {
|
|||||||
},
|
},
|
||||||
'tools.chart'() {
|
'tools.chart'() {
|
||||||
// 一言
|
// 一言
|
||||||
axios.get(`${window.themeConfig.root}api/common/hitokoto?length=40&format=json`).then(res => {
|
axios.get(`${window.themeConfig.root}api/v1/common/hitokoto?length=40&format=json`).then(res => {
|
||||||
this.showMessage(res.data.hitokoto + (res.data.from?` ——${res.data.from}`:''))
|
this.showMessage(res.data.hitokoto + (res.data.from?` ——${res.data.from}`:''))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user