details.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <view>
  3. <view v-if='sitePhotoAddress.length>0' class='swiper'>
  4. <swiper class="screen-swiper header-swiper" ::class="dotStyle?'square-dot':'round-dot'"
  5. :indicator-dots="false" :circular="true" interval="5000"
  6. :current="status" @change="topSwiperTab">
  7. <swiper-item class="swiper-item" v-for="(item,index) in sitePhotoAddress" :key="index"
  8. :class="status==index?'text-white':''">
  9. <image :src="item"></image>
  10. <!-- <view style='position:absolute;top:50%;left:50%;transform: translate(-50%,-50%);'>11111</view> -->
  11. </swiper-item>
  12. </swiper>
  13. <view class="dots">
  14. <text class='Regular'>{{status+1}} / {{imagelist.length}}</text>
  15. </view>
  16. <view class='functionality'>
  17. <image @click='show=true' class='jubao' src="../../static/img/liangmai/jubao.png" mode=""></image>
  18. <image @click='collect' class='collect' :src="companylist.collectionCompanyList.length>0?'../../static/img/liangmai/shoucang1.png':'../../static/img/liangmai/shoucang-2.png'" mode=""></image>
  19. </view>
  20. </view>
  21. <view class='company'>
  22. <view style='padding:21px;padding-bottom:0;'>
  23. <view style='font-size:24px;' class='Medium'>{{companylist.compName}}</view>
  24. <view style='margin-top:3px;' class='flex'>
  25. <view class='aptitude'>
  26. <image class='aptitudeImage' :src="aptiutudeStatus?'../../static/img/liangmai/bg_no_check.png':'../../static/img/liangmai/bg_check.png'" mode=""></image>
  27. <text class='aptitudeText Medium'>资质</text>
  28. </view>
  29. <view class='Regular' style='font-size:13px;'>主营:<text style='display:inline-block;margin:3px;' v-for='item in mainBusiness'> {{item}} </text></view>
  30. </view>
  31. <view style='margin:12.5px 0;' class='flex'>
  32. <view v-for='item in label' class="tag Regular">
  33. {{item}}
  34. </view>
  35. </view>
  36. </view>
  37. <view class="generalSituation">
  38. <view class="title Medium">企业概况</view>
  39. <view class="content Regular">
  40. {{companylist.companyContant}}
  41. </view>
  42. </view>
  43. <view class='contactWay'>
  44. <view class="title Medium">联系方式</view>
  45. <view class='contactWayContent'>
  46. <view class='flex linkman'>
  47. <view style='flex:1;' class='title Regular'>联系人</view>
  48. <view style='flex:3;'>
  49. <view class='Regular linkmanItem' v-for='item in companylist.settledCompanyContacts'>
  50. {{item.contacts}} <a :href="item.contactsPhone"><image class="phone" src="../../static/img/liangmai/dianhau.png" mode=""></image></a>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="flex mailbox">
  55. <view style='flex:1;' class='title Regular'>邮箱</view>
  56. <view class='Regular' style='font-size:14px;flex:3;'>
  57. {{companylist.email}}
  58. </view>
  59. </view>
  60. <view class="flex fax">
  61. <view style='flex:1;' class='title Regular'>传真</view>
  62. <view class='Regular' style='font-size:14px;flex:3;'>
  63. {{companylist.fax}}
  64. </view>
  65. </view>
  66. <view class="flex fax">
  67. <view style='flex:1;' class='title Regular'>地址</view>
  68. <view style='font-size:14px;flex:3;' class='Regular'>
  69. {{companylist.province}}{{companylist.city}}{{companylist.area}}{{companylist.detailedAddress}}
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <u-picker mode="selector" v-model="show" @confirm='selecttype' :range="selector"></u-picker>
  76. </view>
  77. </template>
  78. <script>
  79. import {
  80. mapState
  81. } from 'vuex';
  82. export default {
  83. components: {
  84. },
  85. data() {
  86. return {
  87. imagelist:[
  88. {url:'../../static/img/authentication/banklow(2).png'},
  89. {url:'../../static/img/authentication/banklow(2).png'},
  90. {url:'../../static/img/authentication/banklow(2).png'}
  91. ],
  92. linkmanList:[
  93. {name:'廖经理',phone:'18513069273'},
  94. {name:'廖经理',phone:'18513069273'},
  95. {name:'廖经理',phone:'18513069273'},
  96. {name:'廖经理',phone:'18513069273'},
  97. ],
  98. id:0,
  99. dotStyle: false,
  100. status: 0,
  101. companylist:{
  102. settledCompanyContacts:[]
  103. },
  104. show:false,
  105. mainBusiness:[],
  106. label:[],
  107. sitePhotoAddress:[],
  108. selector:['纠错','举报'],
  109. aptiutudeStatus:false,
  110. iscollect:false
  111. }
  112. },
  113. computed: {
  114. ...mapState(['hasLogin', 'userInfo'])
  115. },
  116. onLoad(options){
  117. this.id=options.id
  118. },
  119. onShow(){
  120. var that=this
  121. this.$nextTick(function(){
  122. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  123. if(res.data.code==200){
  124. that.companylist=res.data.data
  125. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  126. if(res.data.data.label){
  127. that.label=res.data.data.label.split(',')
  128. }
  129. if(res.data.data.sitePhotoAddress){
  130. that.sitePhotoAddress=res.data.data.sitePhotoAddress.split(',')
  131. }
  132. }
  133. })
  134. })
  135. },
  136. methods: {
  137. topSwiperTab(e) {
  138. var that = this;
  139. this.status = Number(e.target.current);
  140. },
  141. collect(){
  142. var that=this
  143. if(this.companylist.collectionCompanyList.length>0){
  144. this.$api.doRequest('post','/settledCompanyInfo/api/collectionNot',{id:this.companylist.id,loginPhone:this.userInfo.phone}).then(res => {
  145. if(res.data.code==200){
  146. uni.showToast({
  147. title: '取消收藏',
  148. icon: 'none',
  149. duration: 2000
  150. })
  151. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  152. if(res.data.code==200){
  153. that.companylist=res.data.data
  154. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  155. if(res.data.data.label){
  156. that.label=res.data.data.label.split(',')
  157. }
  158. if(res.data.data.sitePhotoAddress){
  159. that.sitePhotoAddress=res.data.data.sitePhotoAddress.split(',')
  160. }
  161. }
  162. })
  163. }
  164. })
  165. }else{
  166. this.$api.doRequest('post','/settledCompanyInfo/api/collection',{id:this.companylist.id,compName:this.companylist.compName,loginPhone:this.userInfo.phone}).then(res => {
  167. if(res.data.code==200){
  168. uni.showToast({
  169. title: '收藏成功',
  170. icon: 'none',
  171. duration: 2000
  172. })
  173. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  174. if(res.data.code==200){
  175. that.companylist=res.data.data
  176. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  177. if(res.data.data.label){
  178. that.label=res.data.data.label.split(',')
  179. }
  180. if(res.data.data.sitePhotoAddress){
  181. that.sitePhotoAddress=res.data.data.sitePhotoAddress.split(',')
  182. }
  183. }
  184. })
  185. }
  186. })
  187. }
  188. },
  189. selecttype(e){
  190. console.log(e)
  191. if(e[0]==1){
  192. uni.navigateTo({
  193. url:'/pages/grain_pulse/jubao?id='+this.companylist.id+'&compName='+this.companylist.compName
  194. })
  195. }else{
  196. uni.navigateTo({
  197. url:'/pages/grain_pulse/errorcorrection?id='+this.companylist.id+'&compName='+this.companylist.compName
  198. })
  199. }
  200. },
  201. jubao(){
  202. },
  203. }
  204. }
  205. </script>
  206. <style lang='scss' scoped>
  207. /* 《--轮播 */
  208. .swiper{
  209. position:relative;
  210. height:281.5px;
  211. }
  212. .screen-swiper{
  213. height:281.5px;
  214. }
  215. .swiper .dots{
  216. position:absolute;
  217. bottom:53px;
  218. background: rgba(255, 255, 255, 0.4);
  219. border-radius: 0px 11px 11px 0px;
  220. width: 58.5px;
  221. height: 23px;
  222. line-height:23px;
  223. text-align:center;
  224. padding:3px;
  225. color:#FFFFFF;
  226. }
  227. .functionality{
  228. position: absolute;
  229. right:0;
  230. bottom:53px;
  231. }
  232. .jubao{
  233. width:22px;height:19px;
  234. margin-right:25px;
  235. }
  236. .collect{
  237. width:22px;height:22px;
  238. margin-right:19.5px;
  239. }
  240. /* 轮播--》 */
  241. /*《--公司 */
  242. .company{
  243. background: linear-gradient(180deg, #FFFFFF 0%, #F7F8FC 100%);
  244. height:550px;
  245. border-radius:20px;
  246. margin-top:-38px;
  247. position: relative;
  248. z-index: 3;
  249. }
  250. .aptitude,.aptitudeImage{
  251. width: 38px;
  252. height:20px;
  253. }
  254. .aptitude{
  255. position:relative;
  256. margin-right:5px;
  257. }
  258. .aptitudeText{
  259. color:#8B511E;
  260. position:absolute;
  261. left:0;
  262. width:40px;
  263. top:0;
  264. text-align:center;
  265. width:100%;
  266. line-height: 20px;
  267. font-size:11px;
  268. height:100%;
  269. }
  270. .tag{
  271. background:#F5F6F9;
  272. padding:2.5px 6.5px;
  273. border-radius:3px;
  274. font-size:11px;
  275. margin-right:11.5px;
  276. }
  277. .generalSituation{
  278. background:#fff;
  279. margin:9px;
  280. padding:12px;
  281. border-radius:10px;
  282. .title{
  283. font-size:16px;
  284. margin:0 0 9.5px;
  285. }
  286. .content{
  287. font-size:12px;
  288. color:#676E80;
  289. }
  290. }
  291. .contactWay{
  292. margin:9px;
  293. padding:11.5px 13px;
  294. background:#fff;
  295. border-radius:10px;
  296. >.title{
  297. font-size:16px;
  298. color:#333;
  299. margin-bottom:12px;
  300. }
  301. .contactWayContent{
  302. .linkman>.title,.mailbox>.title,.fax>.title,.address>.title{
  303. color:#676E80;
  304. font-size:14px;
  305. }
  306. .mailbox,.fax,.address{
  307. margin-bottom:10px;
  308. }
  309. .linkmanItem{
  310. margin-bottom:10px;
  311. }
  312. .phone{
  313. width:14px;height:14px;margin-left:6px;
  314. }
  315. }
  316. }
  317. /* 公司--》 */
  318. </style>