Commit 0c5891f2 by 李君

优化

1 parent 1112570e
...@@ -14,7 +14,7 @@ const axiosInstance = axios.create( ...@@ -14,7 +14,7 @@ const axiosInstance = axios.create(
// 请求拦截器 // 请求拦截器
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
config => { config => {
// Cookies.set('atoken','41ab4c2d-eb0e-44c2-9370-e5e338e234f8') // Cookies.set('atoken','acea42b1-2da3-4cbb-b2b0-ed6603cb6448')
if(!Cookies.get('atoken')){ if(!Cookies.get('atoken')){
ElMessage({ ElMessage({
message: `登录过期,请重新登录`, message: `登录过期,请重新登录`,
......
...@@ -49,12 +49,13 @@ ...@@ -49,12 +49,13 @@
<div class="resultContent" :style="{'height':contentHeight+'px'}"> <div class="resultContent" :style="{'height':contentHeight+'px'}">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="3" v-for="item in resultList"> <el-col :span="3" v-for="item in resultList">
<div style="margin: 0 5px;cursor: pointer;" > <div class="itemBox">
<div>id:{{ item.id }}</div> <div>{{ item.id }}</div>
<el-image :src="item.picture_url" <el-image :src="item.picture_url"
:fit="'fill'" :fit="'fill'"
class="single-image"> class="single-image">
</el-image> </el-image>
<p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -173,13 +174,15 @@ export default { ...@@ -173,13 +174,15 @@ export default {
formData.append('ip',window._baseImgUrl) formData.append('ip',window._baseImgUrl)
formData.append('customScore',rawData.customScore) formData.append('customScore',rawData.customScore)
api.getFindByFeature(formData).then((r) => { api.getFindByFeature(formData).then((r) => {
if(r.msg_code==200 && r.data && r.data.length>0){ if(r.msg_code==200 ){
r.data.forEach(item=>{ if(r.data && r.data.length>0){
if (item.picture_url) { r.data.forEach(item=>{
item.picture_url = window._baseImgUrl + item.picture_url if (item.picture_url) {
} item.picture_url = window._baseImgUrl + item.picture_url
}) }
resultList.value = r.data })
resultList.value = r.data
}
}else{ }else{
ElMessage({ ElMessage({
message: r.msg_info, message: r.msg_info,
...@@ -220,4 +223,17 @@ export default { ...@@ -220,4 +223,17 @@ export default {
width: 200px; width: 200px;
height: 300px; height: 300px;
} }
.itemBox{
position: relative;
margin: 0 5px;
cursor: pointer;
}
.featureNum{
position: absolute;
top: 25px;
left: 15px;
color: red;
font-weight: 900;
font-size: 16px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!