123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458 |
- <template>
- <view class="main_content">
- <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 sitePhotoAddress" :key="index"
- :class="status==index?'text-white':''" @click="preview(sitePhotoAddress,index)">
- <image :src="item"></image>
- <!-- <view style='position:absolute;top:50%;left:50%;transform: translate(-50%,-50%);'>11111</view> -->
- </swiper-item>
- </swiper>
- <view class="dots">
- <text class='Regular'>{{status+1}} / {{sitePhotoAddress.length}}</text>
- </view>
- <view class='functionality'>
- <image @click='show=true' class='jubao' src="../../static/img/liangmai/jubao.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;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 style='display:inline-block;margin:3px;'
- v-for='item in mainBusiness'> {{item}} </text></view>
- </view>
- <view style='margin:12.5px 0;' class='flex'>
- <view v-for='item in label' class="tag Regular">
- {{item}}
- </view>
- </view>
- </view>
- <view class="generalSituation">
- <view class="title Medium">企业概况</view>
- <view class="content Regular">
- {{companylist.companyContant}}
- </view>
- </view>
- <view class='contactWay'>
- <view class="title Medium">联系方式</view>
- <view class='contactWayContent'>
- <view class='flex linkman'>
- <view style='flex:1;' class='title Regular'>联系人</view>
- <view style='flex:3;'>
- <view class='Regular linkmanItem' v-for='item in companylist.settledCompanyContacts'>
- <view @click="contactUs(item)">
- {{item.contacts}}
- <image class="phone" src="../../static/img/liangmai/dianhau.png" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- <view class="flex mailbox">
- <view style='flex:1;' class='title Regular'>邮箱</view>
- <view class='Regular' style='font-size:14px;flex:3;'>
- {{companylist.email}}
- </view>
- </view>
- <view v-show="companylist.fax" class="flex fax">
- <view style='flex:1;' class='title Regular'>传真</view>
- <view class='Regular' style='font-size:14px;flex:3;'>
- {{companylist.fax}}
- </view>
- </view>
- <view class="flex fax">
- <view style='flex:1;' class='title Regular'>地址</view>
- <view style='font-size:14px;flex:3;' class='Regular'>
- {{companylist.province}}{{companylist.city}}{{companylist.area}}{{companylist.detailedAddress}}
- </view>
- </view>
- </view>
- </view>
- </view>
- <u-picker mode="selector" v-model="show" @confirm='selecttype' :range="selector" confirm-color='rgb(34, 197, 114)'></u-picker>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- export default {
- components: {
- },
- data() {
- return {
- imagelist: [{
- url: '../../static/img/authentication/banklow(2).png'
- },
- {
- url: '../../static/img/authentication/banklow(2).png'
- },
- {
- url: '../../static/img/authentication/banklow(2).png'
- }
- ],
- linkmanList: [{
- name: '廖经理',
- phone: '18513069273'
- },
- {
- name: '廖经理',
- phone: '18513069273'
- },
- {
- name: '廖经理',
- phone: '18513069273'
- },
- {
- name: '廖经理',
- phone: '18513069273'
- },
- ],
- id: 0,
- dotStyle: false,
- status: 0,
- companylist: {
- settledCompanyContacts: []
- },
- show: false,
- mainBusiness: [],
- label: [],
- sitePhotoAddress: [],
- selector: ['纠错', '举报'],
- aptiutudeStatus: false,
- iscollect: false
- }
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo'])
- },
- onLoad(options) {
- this.id = options.id
- },
- onShow() {
- var that = this
- this.$nextTick(function() {
- 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(',')
- }
- that.sitePhotoAddress = []
- if (res.data.data.attachmentAddress) {
- that.sitePhotoAddress.push(res.data.data.attachmentAddress)
- }
- if (res.data.data.sitePhotoAddress) {
- var tmp = res.data.data.sitePhotoAddress.split(',')
- for (var i = 0; i < tmp.length; i++) {
- if (tmp[i] && tmp[i] != res.data.data.attachmentAddress) {
- that.sitePhotoAddress.push(tmp[i])
- }
- }
- console.log("that.sitePhotoAddress", that.sitePhotoAddress)
- }
- }
- })
- })
- },
- methods: {
- preview(img, index) {
- console.log("preview", img, index)
- uni.previewImage({
- urls: img,
- current: index
- });
- },
- contactUs(item) {
- const that = this
- uni.makePhoneCall({
- // 手机号
- phoneNumber: item.contactsPhone,
- // 成功回调
- success: (res) => {
- console.log('调用成功!')
- },
- // 失败回调
- fail: (res) => {
- console.log('调用失败!')
- that.contactUs()
- }
- });
- },
- topSwiperTab(e) {
- 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(',')
- }
- that.sitePhotoAddress = []
- if (res.data.data.attachmentAddress) {
- that.sitePhotoAddress.push(res.data.data.attachmentAddress)
- }
- if (res.data.data.sitePhotoAddress) {
- var tmp = res.data.data.sitePhotoAddress.split(',')
- for (var i = 0; i < tmp.length; i++) {
- if (tmp[i] && tmp[i] != res.data.data
- .attachmentAddress) {
- that.sitePhotoAddress.push(tmp[i])
- }
- }
- }
- }
- })
- }
- })
- } 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(',')
- }
- that.sitePhotoAddress = []
- if (res.data.data.attachmentAddress) {
- that.sitePhotoAddress.push(res.data.data.attachmentAddress)
- }
- if (res.data.data.sitePhotoAddress) {
- var tmp = res.data.data.sitePhotoAddress.split(',')
- for (var i = 0; i < tmp.length; i++) {
- if (tmp[i] && tmp[i] != res.data.data
- .attachmentAddress) {
- that.sitePhotoAddress.push(tmp[i])
- }
- }
- }
- }
- })
- }
- })
- }
- },
- selecttype(e) {
- console.log(e)
- if (e[0] == 1) {
- uni.navigateTo({
- url: '/pages/grain_pulse/jubao?id=' + this.companylist.id + '&compName=' + this
- .companylist
- .compName
- })
- } else {
- uni.navigateTo({
- url: '/pages/grain_pulse/errorcorrection?id=' + this.companylist.id +
- '&compName=' + this
- .companylist.compName
- })
- }
- },
- jubao() {
- },
- }
- }
- </script>
- <style lang='scss' scoped>
- .main_content {
- /* margin-top: 30rpx; */
- }
- /* 《--轮播 */
- .swiper {
- position: relative;
- height: 281.5px;
- }
- .screen-swiper {
- height: 281.5px;
- }
- .swiper .dots {
- position: absolute;
- bottom: 53px;
- background: rgba(255, 255, 255, 0.4);
- border-radius: 0px 11px 11px 0px;
- width: 58.5px;
- height: 23px;
- line-height: 23px;
- text-align: center;
- padding: 3px;
- color: #FFFFFF;
- }
- .functionality {
- position: absolute;
- right: 0;
- bottom: 53px;
- }
- .jubao {
- width: 44rpx;
- height: 44rpx;
- margin-right: 25px;
- }
- .collect {
- width: 22px;
- height: 22px;
- margin-right: 19.5px;
- }
- /* 轮播--》 */
- /*《--公司 */
- .company {
- background: linear-gradient(180deg, #FFFFFF 0%, #F7F8FC 100%);
- height: 550px;
- border-radius: 20px;
- margin-top: -38px;
- position: relative;
- z-index: 3;
- }
- .aptitude,
- .aptitudeImage {
- width: 38px;
- height: 20px;
- }
- .aptitude {
- position: relative;
- margin-right: 5px;
- }
- .aptitudeText {
- color: #8B511E;
- position: absolute;
- left: 0;
- width: 40px;
- top: 0;
- text-align: center;
- width: 100%;
- line-height: 20px;
- font-size: 11px;
- height: 100%;
- }
- .tag {
- background: #F5F6F9;
- padding: 2.5px 6.5px;
- border-radius: 3px;
- font-size: 11px;
- margin-right: 11.5px;
- }
- .generalSituation {
- background: #fff;
- margin: 9px;
- padding: 12px;
- /* border-radius: 10px; */
- .title {
- font-size: 16px;
- margin: 0 0 9.5px;
- }
- .content {
- font-size: 12px;
- color: #676E80;
- }
- }
- .contactWay {
- margin: 9px;
- padding: 11.5px 13px;
- background: #fff;
- border-radius: 10px;
- >.title {
- font-size: 16px;
- color: #333;
- margin-bottom: 12px;
- }
- .contactWayContent {
- .linkman>.title,
- .mailbox>.title,
- .fax>.title,
- .address>.title {
- color: #676E80;
- font-size: 14px;
- }
- .mailbox,
- .fax,
- .address {
- margin-bottom: 10px;
- }
- .linkmanItem {
- margin-bottom: 10px;
- }
- .phone {
- width: 22rpx;
- height: 22rpx;
- margin-left: 6px;
- }
- }
- }
- /* 公司--》 */
- </style>
|