99 lines
2.1 KiB
Vue
99 lines
2.1 KiB
Vue
<template>
|
||
<Layout :index="index" :banner="banner">
|
||
<view class="max-width">
|
||
<view class="common-head">
|
||
<text class="color-666">当前位置:</text>
|
||
<a class="color-666 pointer" href="/">首页</a>
|
||
<text class="color-666 mg-10-lr">></text>
|
||
<a class="color-666 pointer" v-if="index!=0" href="/corporateStyle">企业风采</a>
|
||
<text class="color-666 mg-10-lr" v-if="index!=0">></text>
|
||
<text>企业简介</text>
|
||
</view>
|
||
<view class="profile">
|
||
<view class="profile-title">{{detail.store_name||''}}</view>
|
||
<view class="profile-text">联系电话:{{detail.phone||''}}</view>
|
||
<view class="profile-text">联系人:{{detail.linkman||''}}</view>
|
||
<view class="profile-text">地址:{{detail.address||''}}</view>
|
||
<view class="profile-content" v-html="detail.summary||''"></view>
|
||
</view>
|
||
</view>
|
||
</Layout>
|
||
</template>
|
||
|
||
<script>
|
||
import Layout from './part/layout.vue';
|
||
export default {
|
||
components:{
|
||
Layout
|
||
},
|
||
data(){
|
||
return {
|
||
id: '',
|
||
detail:{
|
||
store_name: '',
|
||
phone: '',
|
||
linkman: '',
|
||
address: '',
|
||
summary: ''
|
||
},
|
||
index: 6,
|
||
banner: 6,
|
||
}
|
||
},
|
||
watch: {
|
||
//监听路由
|
||
$route(to, from) {
|
||
let obj = this.$Route.query;
|
||
this.id = obj.id;
|
||
if(obj.hasOwnProperty('index')){
|
||
this.index = Number(obj.index);
|
||
this.banner = Number(obj.index);
|
||
}
|
||
this.getData();
|
||
}
|
||
},
|
||
created() {
|
||
let obj = this.$Route.query;
|
||
this.id = obj.id;
|
||
if(obj.hasOwnProperty('index')){
|
||
this.index = Number(obj.index);
|
||
this.banner = Number(obj.index);
|
||
}
|
||
this.getData();
|
||
},
|
||
methods:{
|
||
getData(){
|
||
this._get('store.store/detail',{
|
||
store_id: this.id,
|
||
},res=>{
|
||
this.detail = res.data.detail;
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
.profile{
|
||
|
||
}
|
||
.profile-title{
|
||
font-size: 22px;
|
||
font-weight: bold;
|
||
text-align: center;
|
||
line-height: 2.5;
|
||
}
|
||
.profile-text{
|
||
font-size: 20px;
|
||
line-height: 2;
|
||
text-align: center;
|
||
}
|
||
.profile-content{
|
||
padding: 30px 0;
|
||
font-size: 18px;
|
||
line-height: 2;
|
||
word-break: break-all;
|
||
white-space: pre-wrap;
|
||
}
|
||
</style>
|