details.vue 10 KB

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