This commit is contained in:
zyronon 2024-03-22 18:42:08 +08:00
parent 77f83f4f30
commit 766fa095c5
6 changed files with 25 additions and 23 deletions

View File

@ -44,10 +44,10 @@
<script crossorigin="anonymous" <script crossorigin="anonymous"
integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ=="
src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js"></script> src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js"></script>
<!-- <script crossorigin="anonymous"--> <!-- <script crossorigin="anonymous"-->
<!-- integrity="sha512-KkkY/3auRhaXDFzFMpwtZ+BrS8EBQ+GfiBxdJ9jGMi6Gg74/sYbq/IZpY593pkNjTmbeRfBwjpZo+7gcpH45Ww=="--> <!-- integrity="sha512-KkkY/3auRhaXDFzFMpwtZ+BrS8EBQ+GfiBxdJ9jGMi6Gg74/sYbq/IZpY593pkNjTmbeRfBwjpZo+7gcpH45Ww=="-->
<!-- src="https://lib.baomitu.com/eruda/3.0.1/eruda.min.js"></script>--> <!-- src="https://lib.baomitu.com/eruda/3.0.1/eruda.min.js"></script>-->
<!-- <script>eruda.init();</script>--> <!-- <script>eruda.init();</script>-->
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -2,7 +2,7 @@ export default {
list: [ list: [
{ {
"name": "小米电视6 65\" OLED 65英寸", "name": "小米电视6 65\" OLED 65英寸",
"cover": new URL('../img/goods/g6-0.jpg', import.meta.url).href, "cover": new URL('@/assets/img/goods/g6-0.jpg', import.meta.url).href,
imgs:[ imgs:[
new URL('../img/goods/g6-0.jpg', import.meta.url).href, new URL('../img/goods/g6-0.jpg', import.meta.url).href,
new URL('../img/goods/g6-1.jpg', import.meta.url).href, new URL('../img/goods/g6-1.jpg', import.meta.url).href,

View File

@ -15,7 +15,7 @@
--footer-height: 56rem; --footer-height: 56rem;
--common-header-height: 50rem; --common-header-height: 50rem;
--indicator-height: 43rem; --indicator-height: 43rem;
--padding-page: 15rem; --page-padding: 15rem;
--main-bg: rgb(21, 23, 36); --main-bg: rgb(21, 23, 36);
--active-main-bg: rgb(31, 37, 52); --active-main-bg: rgb(31, 37, 52);
--second-text-color: rgb(186, 186, 187); --second-text-color: rgb(186, 186, 187);

View File

@ -9,7 +9,7 @@ export default {
// filePreview:'http://localhost/static/uploads/' // filePreview:'http://localhost/static/uploads/'
} }
// export const BASE_URL = 'https://dy.ttentau.top' export const BASE_URL = 'https://dy.ttentau.top'
export const BASE_URL = '' // export const BASE_URL = ''
export const IMG_URL = BASE_URL + '/imgs/' export const IMG_URL = BASE_URL + '/imgs/'
export const FILE_URL = BASE_URL + '/data/' export const FILE_URL = BASE_URL + '/data/'

View File

@ -3,6 +3,7 @@ import globalMethods from '../utils'
import resource from "../assets/data/resource.js"; import resource from "../assets/data/resource.js";
import posts6 from "@/assets/data/posts6.json"; import posts6 from "@/assets/data/posts6.json";
import {uniqueId} from "lodash-es"; import {uniqueId} from "lodash-es";
import {BASE_URL} from "@/config";
function getParams(options) { function getParams(options) {
let params = globalMethods.$parseURL(options.url).params let params = globalMethods.$parseURL(options.url).params
@ -69,7 +70,7 @@ let t = [
// }, // },
function initData() { function initData() {
fetch('/data/posts.json').then(r => { fetch(BASE_URL + '/data/posts.json').then(r => {
r.json().then(v => { r.json().then(v => {
allRecommendVideos = allRecommendVideos.concat(v) allRecommendVideos = allRecommendVideos.concat(v)
allRecommendVideos = allRecommendVideos.map(w => { allRecommendVideos = allRecommendVideos.map(w => {
@ -81,7 +82,7 @@ function initData() {
}) })
}) })
fetch('/data/user-71158770.json').then(r => { fetch(BASE_URL + '/data/user-71158770.json').then(r => {
r.json().then(v => { r.json().then(v => {
resource.my = v resource.my = v
}) })

View File

@ -257,11 +257,12 @@ const Utils = {
// console.log(url) // console.log(url)
if (!url) return if (!url) return
// //
if (url.includes('img') || url.includes('data:image')) { if (url.includes('assets/img')
return url || url.includes('file://')
} || url.includes('data:image')
// || url.includes('http')
if (url.includes('http')) { || url.includes('https')
) {
return url return url
} }
return Config.filePreview + url return Config.filePreview + url
@ -439,18 +440,18 @@ export function _checkImgUrl(url) {
// console.log(url) // console.log(url)
if (!url) return if (!url) return
// //
if (url.includes('data:image')) { if (url.includes('assets/img')
|| url.includes('file://')
|| url.includes('data:image')
|| url.includes('http')
|| url.includes('https')
) {
return url return url
} }
// return IMG_URL + url
if (url.includes('http')) {
return url
} else {
return IMG_URL + url
}
} }
export function _duration(num){ export function _duration(num) {
return Utils.$duration(num) return Utils.$duration(num)
} }