公司演示版e鹿悦游
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
CjyTravel/subPage/imgDistinguish/imgDistinguish.vue

104 lines
3.2 KiB

<template>
<view>
<view v-if="index < 2" v-for="(item,index) in msgList" :key="index">
<view v-if="item.baike_info != null && item.baike_info.image_url != null "><image :src="item.baike_info.image_url"></image></view>
<view v-if="item.root != ''">类别:{{item.root}}</view>
<view v-if="item.root == ''">类别:无</view>
<view>名称:{{item.keyword}}</view>
<view v-if="item.baike_info != null && item.baike_info.description != null " class="mode_com mdd_jj">
<text class="tit_com">介绍</text>
<view class="sce_jianj_dest">
<view class="fod_det_inf">
<u-parse :content="item.baike_info.description" :loading="loading" @preview="preview" @navigate="navigate" />
</view>
</view>
</view>
<view align="center" v-else>暂无介绍</view>
<view>—————————————————————————————————</view>
</view>
<view>相似结果</view>
<view class="dly_flex sug_fm_img hbgl_t2">
<view v-if="index > 1" v-for="(item,index) in msgList" :key="index" class="hb_ut_3 mb_hb" >
<view class="sjz_main">
<image v-if="item.baike_info != null && item.baike_info.image_url != null " class="hb_img_size2" :src="item.baike_info.image_url" mode="aspectFill"></image>
</view>
<view class="mmd_s_txt control_2">{{ item.keyword }}</view>
</view>
</view>
</view>
</template>
<script>
import uParse from '@/components/gaoyia-parse/parse.vue'
export default {
components: {
uParse
},
data() {
return {
tempFilePaths:"",
msgList:[],
showTypeUrl:"../../static/images/icn_down_g.png",
showType:"展开",
}
},
onLoad:function(options){
const oMeta = document.createElement('meta');
oMeta.name = "referrer";
oMeta.content = "no-referrer"
document.getElementsByTagName('head')[0].appendChild(oMeta);
this.tempFilePaths = options.tempFilePaths;
this.urlTobase64(this.tempFilePaths)
},
methods: {
urlTobase64:function(url){
var that = this;
uni.request({
url: url,
method:'GET',
responseType: 'arraybuffer',
success: ress => {
let base64 = uni.arrayBufferToBase64(ress.data); //把arraybuffer转成base64
that.getImgDistinguishMsg(base64)
}
})
},
getImgDistinguishMsg:function(base64){
var that = this;
var data = {
fileUrl: base64,
}
that.$Request.post(that.$config.objectDistinguish,data).then(res => {
this.msgList = res.result;
});
},
preview(src, e) {
// do something
},
navigate(href, e) {
// do something
},
}
}
</script>
<style>
@import "/static/css/common.css";
@import '/subPage/food/fooddetial/fooddetial.css';
@import "/subPage/cate/destination.css";
@import url('/static/css/hebei.css');
/*目的地*/
.sce_jianj_dest{ position: relative;}
.btn_zhank{ width: 30rpx; height: 30rpx; display: inline-block; position: relative; top:6rpx; margin-left: 5rpx;}
.btn_shouq{ color: #999; font-size: 25rpx; position:absolute; right: 0; top:-80rpx}
.sce_jianj_dest .fod_det_inf{ margin-bottom: 10rpx;}
.h_define{height: 255rpx; overflow: hidden;text-overflow: ellipsis;
white-space: pre-wrap;
-webkit-box-orient: vertical;
-webkit-line-clamp: 5;
display: -webkit-box;
}
</style>