Commit 0c5891f2 by 李君

优化

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