details.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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. that.sitePhotoAddress = []
  132. if(res.data.data.attachmentAddress){
  133. that.sitePhotoAddress.push(res.data.data.attachmentAddress)
  134. }
  135. if(res.data.data.sitePhotoAddress){
  136. var tmp=res.data.data.sitePhotoAddress.split(',')
  137. for(var i=0;i<tmp.length;i++){
  138. if(tmp[i] && tmp[i] != res.data.data.attachmentAddress){
  139. that.sitePhotoAddress.push(tmp[i])
  140. }
  141. }
  142. console.log("that.sitePhotoAddress",that.sitePhotoAddress)
  143. }
  144. }
  145. })
  146. })
  147. },
  148. methods: {
  149. contactUs(item) {
  150. const that = this
  151. uni.makePhoneCall({
  152. // 手机号
  153. phoneNumber: item.contactsPhone,
  154. // 成功回调
  155. success: (res) => {
  156. console.log('调用成功!')
  157. },
  158. // 失败回调
  159. fail: (res) => {
  160. console.log('调用失败!')
  161. that.contactUs()
  162. }
  163. });
  164. },
  165. topSwiperTab(e) {
  166. var that = this;
  167. this.status = Number(e.target.current);
  168. },
  169. collect(){
  170. var that=this
  171. if(this.companylist.collectionCompanyList.length>0){
  172. this.$api.doRequest('post','/settledCompanyInfo/api/collectionNot',{id:this.companylist.id,loginPhone:this.userInfo.phone}).then(res => {
  173. if(res.data.code==200){
  174. uni.showToast({
  175. title: '取消收藏',
  176. icon: 'none',
  177. duration: 2000
  178. })
  179. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  180. if(res.data.code==200){
  181. that.companylist=res.data.data
  182. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  183. if(res.data.data.label){
  184. that.label=res.data.data.label.split(',')
  185. }
  186. that.sitePhotoAddress = []
  187. if(res.data.data.attachmentAddress){
  188. that.sitePhotoAddress.push(res.data.data.attachmentAddress)
  189. }
  190. if(res.data.data.sitePhotoAddress){
  191. var tmp=res.data.data.sitePhotoAddress.split(',')
  192. for(var i=0;i<tmp.length;i++){
  193. if(tmp[i] && tmp[i] != res.data.data.attachmentAddress){
  194. that.sitePhotoAddress.push(tmp[i])
  195. }
  196. }
  197. }
  198. }
  199. })
  200. }
  201. })
  202. }else{
  203. this.$api.doRequest('post','/settledCompanyInfo/api/collection',{id:this.companylist.id,compName:this.companylist.compName,loginPhone:this.userInfo.phone}).then(res => {
  204. if(res.data.code==200){
  205. uni.showToast({
  206. title: '收藏成功',
  207. icon: 'none',
  208. duration: 2000
  209. })
  210. that.$api.doRequest('get','/settledCompanyInfo/getSettledCompanyInfo',{id:that.id,pcFlag:2}).then(res => {
  211. if(res.data.code==200){
  212. that.companylist=res.data.data
  213. that.mainBusiness=res.data.data.mainBusinessType.split(',')
  214. if(res.data.data.label){
  215. that.label=res.data.data.label.split(',')
  216. }
  217. that.sitePhotoAddress = []
  218. if(res.data.data.attachmentAddress){
  219. that.sitePhotoAddress.push(res.data.data.attachmentAddress)
  220. }
  221. if(res.data.data.sitePhotoAddress){
  222. var tmp=res.data.data.sitePhotoAddress.split(',')
  223. for(var i=0;i<tmp.length;i++){
  224. if(tmp[i] && tmp[i] != res.data.data.attachmentAddress){
  225. that.sitePhotoAddress.push(tmp[i])
  226. }
  227. }
  228. }
  229. }
  230. })
  231. }
  232. })
  233. }
  234. },
  235. selecttype(e){
  236. console.log(e)
  237. if(e[0]==1){
  238. uni.navigateTo({
  239. url:'/pages/grain_pulse/jubao?id='+this.companylist.id+'&compName='+this.companylist.compName
  240. })
  241. }else{
  242. uni.navigateTo({
  243. url:'/pages/grain_pulse/errorcorrection?id='+this.companylist.id+'&compName='+this.companylist.compName
  244. })
  245. }
  246. },
  247. jubao(){
  248. },
  249. }
  250. }
  251. </script>
  252. <style lang='scss' scoped>
  253. .main_content{
  254. margin-top: 30rpx;
  255. }
  256. /* 《--轮播 */
  257. .swiper{
  258. position:relative;
  259. height:281.5px;
  260. }
  261. .screen-swiper{
  262. height:281.5px;
  263. }
  264. .swiper .dots{
  265. position:absolute;
  266. bottom:53px;
  267. background: rgba(255, 255, 255, 0.4);
  268. border-radius: 0px 11px 11px 0px;
  269. width: 58.5px;
  270. height: 23px;
  271. line-height:23px;
  272. text-align:center;
  273. padding:3px;
  274. color:#FFFFFF;
  275. }
  276. .functionality{
  277. position: absolute;
  278. right:0;
  279. bottom:53px;
  280. }
  281. .jubao{
  282. width:22px;height:19px;
  283. margin-right:25px;
  284. }
  285. .collect{
  286. width:22px;height:22px;
  287. margin-right:19.5px;
  288. }
  289. /* 轮播--》 */
  290. /*《--公司 */
  291. .company{
  292. background: linear-gradient(180deg, #FFFFFF 0%, #F7F8FC 100%);
  293. height:550px;
  294. border-radius:20px;
  295. margin-top:-38px;
  296. position: relative;
  297. z-index: 3;
  298. }
  299. .aptitude,.aptitudeImage{
  300. width: 38px;
  301. height:20px;
  302. }
  303. .aptitude{
  304. position:relative;
  305. margin-right:5px;
  306. }
  307. .aptitudeText{
  308. color:#8B511E;
  309. position:absolute;
  310. left:0;
  311. width:40px;
  312. top:0;
  313. text-align:center;
  314. width:100%;
  315. line-height: 20px;
  316. font-size:11px;
  317. height:100%;
  318. }
  319. .tag{
  320. background:#F5F6F9;
  321. padding:2.5px 6.5px;
  322. border-radius:3px;
  323. font-size:11px;
  324. margin-right:11.5px;
  325. }
  326. .generalSituation{
  327. background:#fff;
  328. margin:9px;
  329. padding:12px;
  330. border-radius:10px;
  331. .title{
  332. font-size:16px;
  333. margin:0 0 9.5px;
  334. }
  335. .content{
  336. font-size:12px;
  337. color:#676E80;
  338. }
  339. }
  340. .contactWay{
  341. margin:9px;
  342. padding:11.5px 13px;
  343. background:#fff;
  344. border-radius:10px;
  345. >.title{
  346. font-size:16px;
  347. color:#333;
  348. margin-bottom:12px;
  349. }
  350. .contactWayContent{
  351. .linkman>.title,.mailbox>.title,.fax>.title,.address>.title{
  352. color:#676E80;
  353. font-size:14px;
  354. }
  355. .mailbox,.fax,.address{
  356. margin-bottom:10px;
  357. }
  358. .linkmanItem{
  359. margin-bottom:10px;
  360. }
  361. .phone{
  362. width:14px;height:14px;margin-left:6px;
  363. }
  364. }
  365. }
  366. /* 公司--》 */
  367. </style>