details.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <template>
  2. <view class="main_content">
  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}} / {{sitePhotoAddress.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. <view @click="contactUs(item)">
  51. {{item.contacts}} <image class="phone" src="../../static/img/liangmai/dianhau.png" mode=""></image>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="flex mailbox">
  57. <view style='flex:1;' class='title Regular'>邮箱</view>
  58. <view class='Regular' style='font-size:14px;flex:3;'>
  59. {{companylist.email}}
  60. </view>
  61. </view>
  62. <view v-show="companylist.fax" class="flex fax">
  63. <view style='flex:1;' class='title Regular'>传真</view>
  64. <view class='Regular' style='font-size:14px;flex:3;'>
  65. {{companylist.fax}}
  66. </view>
  67. </view>
  68. <view class="flex fax">
  69. <view style='flex:1;' class='title Regular'>地址</view>
  70. <view style='font-size:14px;flex:3;' class='Regular'>
  71. {{companylist.province}}{{companylist.city}}{{companylist.area}}{{companylist.detailedAddress}}
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <u-picker mode="selector" v-model="show" @confirm='selecttype' :range="selector"></u-picker>
  78. </view>
  79. </template>
  80. <script>
  81. import {
  82. mapState
  83. } from 'vuex';
  84. export default {
  85. components: {
  86. },
  87. data() {
  88. return {
  89. imagelist:[
  90. {url:'../../static/img/authentication/banklow(2).png'},
  91. {url:'../../static/img/authentication/banklow(2).png'},
  92. {url:'../../static/img/authentication/banklow(2).png'}
  93. ],
  94. linkmanList:[
  95. {name:'廖经理',phone:'18513069273'},
  96. {name:'廖经理',phone:'18513069273'},
  97. {name:'廖经理',phone:'18513069273'},
  98. {name:'廖经理',phone:'18513069273'},
  99. ],
  100. id:0,
  101. dotStyle: false,
  102. status: 0,
  103. companylist:{
  104. settledCompanyContacts:[]
  105. },
  106. show:false,
  107. mainBusiness:[],
  108. label:[],
  109. sitePhotoAddress:[],
  110. selector:['纠错','举报'],
  111. aptiutudeStatus:false,
  112. iscollect:false
  113. }
  114. },
  115. computed: {
  116. ...mapState(['hasLogin', 'userInfo'])
  117. },
  118. onLoad(options){
  119. this.id=options.id
  120. },
  121. onShow(){
  122. var that=this
  123. this.$nextTick(function(){
  124. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  125. if(res.data.code==200){
  126. that.companylist=res.data.data
  127. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  128. if(res.data.data.label){
  129. that.label=res.data.data.label.split(',')
  130. }
  131. if(res.data.data.sitePhotoAddress){
  132. var tmp=res.data.data.sitePhotoAddress.split(',')
  133. that.sitePhotoAddress = []
  134. for(var i=0;i<tmp.length;i++){
  135. if(tmp[i]){
  136. that.sitePhotoAddress.push(tmp[i])
  137. }
  138. }
  139. console.log("that.sitePhotoAddress",that.sitePhotoAddress)
  140. }
  141. }
  142. })
  143. })
  144. },
  145. methods: {
  146. contactUs(item) {
  147. const that = this
  148. uni.makePhoneCall({
  149. // 手机号
  150. phoneNumber: item.contactsPhone,
  151. // 成功回调
  152. success: (res) => {
  153. console.log('调用成功!')
  154. },
  155. // 失败回调
  156. fail: (res) => {
  157. console.log('调用失败!')
  158. that.contactUs()
  159. }
  160. });
  161. },
  162. topSwiperTab(e) {
  163. var that = this;
  164. this.status = Number(e.target.current);
  165. },
  166. collect(){
  167. var that=this
  168. if(this.companylist.collectionCompanyList.length>0){
  169. this.$api.doRequest('post','/settledCompanyInfo/api/collectionNot',{id:this.companylist.id,loginPhone:this.userInfo.phone}).then(res => {
  170. if(res.data.code==200){
  171. uni.showToast({
  172. title: '取消收藏',
  173. icon: 'none',
  174. duration: 2000
  175. })
  176. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  177. if(res.data.code==200){
  178. that.companylist=res.data.data
  179. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  180. if(res.data.data.label){
  181. that.label=res.data.data.label.split(',')
  182. }
  183. if(res.data.data.sitePhotoAddress){
  184. var tmp=res.data.data.sitePhotoAddress.split(',')
  185. that.sitePhotoAddress = []
  186. for(var i=0;i<tmp.length;i++){
  187. if(tmp[i]){
  188. that.sitePhotoAddress.push(tmp[i])
  189. }
  190. }
  191. }
  192. }
  193. })
  194. }
  195. })
  196. }else{
  197. this.$api.doRequest('post','/settledCompanyInfo/api/collection',{id:this.companylist.id,compName:this.companylist.compName,loginPhone:this.userInfo.phone}).then(res => {
  198. if(res.data.code==200){
  199. uni.showToast({
  200. title: '收藏成功',
  201. icon: 'none',
  202. duration: 2000
  203. })
  204. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  205. if(res.data.code==200){
  206. that.companylist=res.data.data
  207. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  208. if(res.data.data.label){
  209. that.label=res.data.data.label.split(',')
  210. }
  211. if(res.data.data.sitePhotoAddress){
  212. var tmp=res.data.data.sitePhotoAddress.split(',')
  213. that.sitePhotoAddress = []
  214. for(var i=0;i<tmp.length;i++){
  215. if(tmp[i]){
  216. that.sitePhotoAddress.push(tmp[i])
  217. }
  218. }
  219. }
  220. }
  221. })
  222. }
  223. })
  224. }
  225. },
  226. selecttype(e){
  227. console.log(e)
  228. if(e[0]==1){
  229. uni.navigateTo({
  230. url:'/pages/grain_pulse/jubao?id='+this.companylist.id+'&compName='+this.companylist.compName
  231. })
  232. }else{
  233. uni.navigateTo({
  234. url:'/pages/grain_pulse/errorcorrection?id='+this.companylist.id+'&compName='+this.companylist.compName
  235. })
  236. }
  237. },
  238. jubao(){
  239. },
  240. }
  241. }
  242. </script>
  243. <style lang='scss' scoped>
  244. .main_content{
  245. margin-top: 30rpx;
  246. }
  247. /* 《--轮播 */
  248. .swiper{
  249. position:relative;
  250. height:281.5px;
  251. }
  252. .screen-swiper{
  253. height:281.5px;
  254. }
  255. .swiper .dots{
  256. position:absolute;
  257. bottom:53px;
  258. background: rgba(255, 255, 255, 0.4);
  259. border-radius: 0px 11px 11px 0px;
  260. width: 58.5px;
  261. height: 23px;
  262. line-height:23px;
  263. text-align:center;
  264. padding:3px;
  265. color:#FFFFFF;
  266. }
  267. .functionality{
  268. position: absolute;
  269. right:0;
  270. bottom:53px;
  271. }
  272. .jubao{
  273. width:22px;height:19px;
  274. margin-right:25px;
  275. }
  276. .collect{
  277. width:22px;height:22px;
  278. margin-right:19.5px;
  279. }
  280. /* 轮播--》 */
  281. /*《--公司 */
  282. .company{
  283. background: linear-gradient(180deg, #FFFFFF 0%, #F7F8FC 100%);
  284. height:550px;
  285. border-radius:20px;
  286. margin-top:-38px;
  287. position: relative;
  288. z-index: 3;
  289. }
  290. .aptitude,.aptitudeImage{
  291. width: 38px;
  292. height:20px;
  293. }
  294. .aptitude{
  295. position:relative;
  296. margin-right:5px;
  297. }
  298. .aptitudeText{
  299. color:#8B511E;
  300. position:absolute;
  301. left:0;
  302. width:40px;
  303. top:0;
  304. text-align:center;
  305. width:100%;
  306. line-height: 20px;
  307. font-size:11px;
  308. height:100%;
  309. }
  310. .tag{
  311. background:#F5F6F9;
  312. padding:2.5px 6.5px;
  313. border-radius:3px;
  314. font-size:11px;
  315. margin-right:11.5px;
  316. }
  317. .generalSituation{
  318. background:#fff;
  319. margin:9px;
  320. padding:12px;
  321. border-radius:10px;
  322. .title{
  323. font-size:16px;
  324. margin:0 0 9.5px;
  325. }
  326. .content{
  327. font-size:12px;
  328. color:#676E80;
  329. }
  330. }
  331. .contactWay{
  332. margin:9px;
  333. padding:11.5px 13px;
  334. background:#fff;
  335. border-radius:10px;
  336. >.title{
  337. font-size:16px;
  338. color:#333;
  339. margin-bottom:12px;
  340. }
  341. .contactWayContent{
  342. .linkman>.title,.mailbox>.title,.fax>.title,.address>.title{
  343. color:#676E80;
  344. font-size:14px;
  345. }
  346. .mailbox,.fax,.address{
  347. margin-bottom:10px;
  348. }
  349. .linkmanItem{
  350. margin-bottom:10px;
  351. }
  352. .phone{
  353. width:14px;height:14px;margin-left:6px;
  354. }
  355. }
  356. }
  357. /* 公司--》 */
  358. </style>