Browse Source

图片限制反盗不能正常显示

master
xuhuajiao 3 months ago
parent
commit
09f0edefbf
  1. 63
      public/index.html
  2. 2
      src/views/module/homeListItem.vue

63
public/index.html

@ -1,31 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script>
window.onload = function() {
document.addEventListener('touchstart', function(event) {
if (event.touches.length > 1) {
event.preventDefault()
}
},
{ passive: false }
)
document.addEventListener('gesturestart', function(event) {
event.preventDefault()
})
}
</script>
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="referrer" content="no-referrer">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script>
window.onload = function() {
document.addEventListener('touchstart', function(event) {
if (event.touches.length > 1) {
event.preventDefault()
}
},
{ passive: false }
)
document.addEventListener('gesturestart', function(event) {
event.preventDefault()
})
}
</script>
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

2
src/views/module/homeListItem.vue

@ -3,7 +3,7 @@
<div :class="[isNewBook ? 'list-small' : (isOtherBook ? 'list-middle' : 'list-big') ]">
<div v-for="(item,index) in listData" :key="item.ranking" class="list-item" @click="handleDetails(index)">
<div class="book-img">
<img :src="item.cover" :onerror="defaultImg" />
<img :src="item.cover ? item.cover : ''" :onerror="defaultImg" />
</div>
<div class="book-info">
<h4 :class="['book-title', {'title-item': !isOtherBook}]">{{ item.nbName }}</h4>

Loading…
Cancel
Save