|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <view class='swiper'>
|
|
|
+ <view v-if='sitePhotoAddress.length>0' class='swiper'>
|
|
|
<swiper class="screen-swiper header-swiper" ::class="dotStyle?'square-dot':'round-dot'"
|
|
|
:indicator-dots="false" :circular="true" interval="5000"
|
|
|
:current="status" @change="topSwiperTab">
|
|
|
- <swiper-item class="swiper-item" v-for="(item,index) in imagelist" :key="index"
|
|
|
- :class="status==index?'text-white':''" @click="naviageToPage(item.url)">
|
|
|
- <image :src="item.url"></image>
|
|
|
+ <swiper-item class="swiper-item" v-for="(item,index) in sitePhotoAddress" :key="index"
|
|
|
+ :class="status==index?'text-white':''">
|
|
|
+ <image :src="item"></image>
|
|
|
<!-- <view style='position:absolute;top:50%;left:50%;transform: translate(-50%,-50%);'>11111</view> -->
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
@@ -15,28 +15,22 @@
|
|
|
</view>
|
|
|
<view class='functionality'>
|
|
|
<image @click='show=true' class='jubao' src="../../static/img/liangmai/jubao.png" mode=""></image>
|
|
|
- <image class='collect' :src="iscollect?'../../static/img/liangmai/shoucang1.png':'../../static/img/liangmai/shoucang-2.png'" mode=""></image>
|
|
|
+ <image @click='collect' class='collect' :src="companylist.collectionCompanyList.length>0?'../../static/img/liangmai/shoucang1.png':'../../static/img/liangmai/shoucang-2.png'" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class='company'>
|
|
|
- <view style='padding:21px;'>
|
|
|
+ <view style='padding:21px;padding-bottom:0;'>
|
|
|
<view style='font-size:24px;' class='Medium'>{{companylist.compName}}</view>
|
|
|
<view style='margin-top:3px;' class='flex'>
|
|
|
<view class='aptitude'>
|
|
|
<image class='aptitudeImage' :src="aptiutudeStatus?'../../static/img/liangmai/bg_no_check.png':'../../static/img/liangmai/bg_check.png'" mode=""></image>
|
|
|
<text class='aptitudeText Medium'>资质</text>
|
|
|
</view>
|
|
|
- <view class='Regular' style='font-size:13px;'>主营:<text v-for='item in mainBusiness'> {{item}} </text></view>
|
|
|
+ <view class='Regular' style='font-size:13px;'>主营:<text style='display:inline-block;margin:3px;' v-for='item in mainBusiness'> {{item}} </text></view>
|
|
|
</view>
|
|
|
<view style='margin:12.5px 0;' class='flex'>
|
|
|
- <view class="tag Regular">
|
|
|
- 超大规模
|
|
|
- </view>
|
|
|
- <view class="tag Regular">
|
|
|
- 超大规模
|
|
|
- </view>
|
|
|
- <view class="tag Regular">
|
|
|
- 超大规模
|
|
|
+ <view v-for='item in label' class="tag Regular">
|
|
|
+ {{item}}
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -86,6 +80,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ mapState
|
|
|
+ } from 'vuex';
|
|
|
export default {
|
|
|
components: {
|
|
|
|
|
@@ -112,12 +109,15 @@
|
|
|
show:false,
|
|
|
mainBusiness:[],
|
|
|
label:[],
|
|
|
+ sitePhotoAddress:[],
|
|
|
selector:['纠错','举报'],
|
|
|
aptiutudeStatus:false,
|
|
|
iscollect:false
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ computed: {
|
|
|
+ ...mapState(['hasLogin', 'userInfo'])
|
|
|
+ },
|
|
|
onLoad(options){
|
|
|
this.id=options.id
|
|
|
},
|
|
@@ -131,6 +131,9 @@
|
|
|
if(res.data.data.label){
|
|
|
that.label=res.data.data.label.split(',')
|
|
|
}
|
|
|
+ if(res.data.data.sitePhotoAddress){
|
|
|
+ that.sitePhotoAddress=res.data.data.sitePhotoAddress.split(',')
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -141,15 +144,63 @@
|
|
|
var that = this;
|
|
|
this.status = Number(e.target.current);
|
|
|
},
|
|
|
+ collect(){
|
|
|
+ var that=this
|
|
|
+ if(this.companylist.collectionCompanyList.length>0){
|
|
|
+ this.$api.doRequest('post','/settledCompanyInfo/api/collectionNot',{id:this.companylist.id,loginPhone:this.userInfo.phone}).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ uni.showToast({
|
|
|
+ title: '取消收藏',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.companylist=res.data.data
|
|
|
+ that.mainBusiness=res.data.data.mainBusinessType.split(',')
|
|
|
+ if(res.data.data.label){
|
|
|
+ that.label=res.data.data.label.split(',')
|
|
|
+ }
|
|
|
+ if(res.data.data.sitePhotoAddress){
|
|
|
+ that.sitePhotoAddress=res.data.data.sitePhotoAddress.split(',')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$api.doRequest('post','/settledCompanyInfo/api/collection',{id:this.companylist.id,compName:this.companylist.compName,loginPhone:this.userInfo.phone}).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ uni.showToast({
|
|
|
+ title: '收藏成功',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.companylist=res.data.data
|
|
|
+ that.mainBusiness=res.data.data.mainBusinessType.split(',')
|
|
|
+ if(res.data.data.label){
|
|
|
+ that.label=res.data.data.label.split(',')
|
|
|
+ }
|
|
|
+ if(res.data.data.sitePhotoAddress){
|
|
|
+ that.sitePhotoAddress=res.data.data.sitePhotoAddress.split(',')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
selecttype(e){
|
|
|
console.log(e)
|
|
|
if(e[0]==1){
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/grain_pulse/jubao'
|
|
|
+ url:'/pages/grain_pulse/jubao?id='+this.companylist.id+'&compName='+this.companylist.compName
|
|
|
})
|
|
|
}else{
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/grain_pulse/errorcorrection'
|
|
|
+ url:'/pages/grain_pulse/errorcorrection?id='+this.companylist.id+'&compName='+this.companylist.compName
|
|
|
})
|
|
|
}
|
|
|
},
|