BaseInfo.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <div style="margin-bottom: 30px;">
  3. <div id="introduction-fragment">
  4. <div class="container">
  5. <div class="menu-com row">
  6. <div class="menu-title col-md-12">
  7. <nuxt-link to="/">商城首页</nuxt-link> >
  8. <nuxt-link to="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</nuxt-link>
  9. <nuxt-link to="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</nuxt-link>
  10. <nuxt-link :to="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</nuxt-link>
  11. >
  12. <span v-if="storeInfo.type != 'CONSIGNMENT'"><nuxt-link :to="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">店铺名称</nuxt-link>> </span>
  13. <span>了解更多</span>
  14. </div>
  15. </div>
  16. <div class="intro-title row">
  17. <h3 class="col-xs-2">
  18. 主营产品
  19. </h3>
  20. <nuxt-link class="col-xs-10" :to="'/store/' + storeInfo.uuid">返回店铺</nuxt-link>
  21. </div>
  22. <div class="intro-text" v-text="storeInfo.description || '暂无主营产品信息'"></div>
  23. <div class="intro-title row">
  24. <h3 class="col-xs-2">
  25. 应用领域
  26. </h3>
  27. </div>
  28. <div class="intro-text" v-text="storeInfo.storeApplication || '暂无应用领域信息'"></div>
  29. <div class="intro-title row">
  30. <h3 class="col-xs-2">
  31. 企业介绍
  32. </h3>
  33. </div>
  34. <div class="intro-text" v-text="storeInfo.enterprise.description || '暂无企业介绍信息'"></div>
  35. </div>
  36. </div>
  37. <div id="contact-fragment">
  38. <div class="container" style="margin-top: 10px;">
  39. <div class="contact-title">
  40. <h3>
  41. 联系我们
  42. </h3>
  43. </div>
  44. <div v-if="storeInfo.enterprise">
  45. <div class="contact-text">
  46. <div v-text="storeInfo.enterprise.enName || '-'"></div>
  47. <!--<div><span class="public">地址:</span><span v-text="storeInfo.enterprise.address || '-'"></span></div>-->
  48. <div><span class="public">电话:</span><span v-text="storeInfo.enterprise.enTel || '-'"></span></div>
  49. <div><span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax || '-'"></span></div>
  50. <div><span class="public">官网地址:</span><a @click="goTarget(storeInfo.enterprise.enUrl)">{{storeInfo.enterprise.enUrl || '-'}}</a></div>
  51. <div v-if="storeInfo.enterprise.enPhone && storeInfo.enterprise.enPhone.length > 0"><span class="public">手机:</span><span v-text="storeInfo.enterprise.enPhone">136********</span></div>
  52. <div v-if="storeInfo.enterprise.enWeixin && storeInfo.enterprise.enWeixin.length > 0"><span class="public">微信:</span><span v-text="storeInfo.enterprise.enWeixin">好名字更容易让人记住你</span></div>
  53. <div v-if="storeInfo.enterprise.enQQ && storeInfo.enterprise.enQQ.length > 0"><span class="public">Q&nbsp;Q:</span><span v-text="storeInfo.enterprise.enQQ">123456789</span></div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <div id="proof-fragment" v-show="qualifications.length > 0">
  59. <div class="container" style="margin-top: 30px; margin-bottom: 60px;">
  60. <div class="proof-title">
  61. <h3>
  62. 资质证明
  63. </h3>
  64. </div>
  65. <div>
  66. <div class="div-proof" style="position:relative;" v-for="(qualification, index) in qualifications" :key="index">
  67. <div v-if="qualification.isPdf">
  68. <img src="/images/store/common/timg.png" alt="" style="max-width: 124px; max-height: 147px;">
  69. <div class="hover-show hover-shows">
  70. <a :href="qualification.resourceUrl" target="_blank"><i class="fa fa-search" style="margin-right: 5px;"></i>查看</a>
  71. </div>
  72. </div>
  73. <div v-if="!qualification.isPdf">
  74. <a class="img-show">
  75. <img :src="qualification.resourceUrl"/>
  76. </a>
  77. <div class="hover-show" @click="showImg(qualification.resourceUrl)"><i class="fa fa-search" style="margin-right: 5px;"></i>查看</div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <!--查看大图-->
  84. <div id="image-box" v-if="isShow">
  85. <div class="x-floating-wrap"></div>
  86. <div class="x-floating">
  87. <div id="item-content">
  88. <div class="x-close-wrap" @click="isShow = false"><a href="javascript:void(0);">&times;</a></div>
  89. <div class="img"><img :src="imgUrl"/></div>
  90. </div>
  91. </div>
  92. </div>
  93. <!--查看大图 end-->
  94. </div>
  95. </template>
  96. <script>
  97. import {startWith, judgeIsPdf} from '~utils/baseUtils'
  98. export default {
  99. name: 'base-info',
  100. data () {
  101. return {
  102. imgUrl: '',
  103. isShow: false
  104. }
  105. },
  106. computed: {
  107. storeInfo () {
  108. return this.$store.state.shop.storeInfo.store.data
  109. },
  110. qualifications () {
  111. let storeInfo = this.$store.state.shop.storeInfo.store.data
  112. let qualifications = JSON.parse(JSON.stringify(storeInfo.qualifications))
  113. qualifications = qualifications.filter(qualification => {
  114. return qualification && qualification.type === 'APTITUDE'
  115. })
  116. for (let i = 0; i < qualifications.length; i++) {
  117. qualifications[i].isPdf = judgeIsPdf(qualifications[i].resourceUrl)
  118. }
  119. return qualifications || []
  120. }
  121. },
  122. methods: {
  123. showImg (imgUrl) {
  124. this.imgUrl = imgUrl
  125. this.isShow = true
  126. },
  127. goTarget: function (url) {
  128. if (url) {
  129. if (startWith(url, 'http://') || startWith(url, 'https://')) {
  130. window.open(url)
  131. } else {
  132. window.open(`http://${url}`)
  133. }
  134. } else {
  135. this.$message.error('地址错误')
  136. }
  137. }
  138. }
  139. }
  140. </script>
  141. <style scoped>
  142. #introduction-fragment .intro-title h3 {
  143. font-size: 24px;
  144. color: rgb(50,50,50);
  145. }
  146. #introduction-fragment .intro-title a {
  147. font-size: 14px;
  148. color: rgb(33,71,151);
  149. margin-top: 25px;
  150. margin-left: -50px;
  151. }
  152. .intro-text {
  153. font-size: 14px;
  154. color: rgb(50,50,50);
  155. margin-top: 10px;
  156. line-height: 30px;
  157. word-break: break-all;
  158. text-indent:2em;
  159. }
  160. #contact-fragment .contact-title h3 {
  161. font-size: 24px;
  162. color: rgb(50,50,50);
  163. }
  164. #contact-fragment .contact-text {
  165. font-size: 14px;
  166. color: rgb(50,50,50);
  167. margin-top: 10px;
  168. line-height: 28px;
  169. }
  170. #contact-fragment .contact-text div {
  171. height: 25px;
  172. }
  173. #contact-fragment .contact-text .intro-text {
  174. height: auto;
  175. }
  176. #contact-fragment .contact-text span{
  177. display:inline-block;
  178. height: 100%
  179. }
  180. #contact-fragment .contact-text .public {
  181. width:80px;
  182. display:inline-block;
  183. text-align: justify;
  184. vertical-align:top;
  185. }
  186. #contact-fragment .contact-text .public::after{
  187. content:"";
  188. display: inline-block;
  189. width:100%;
  190. overflow:hidden;
  191. height:0;
  192. }
  193. #proof-fragment .proof-title {
  194. margin-bottom: 10px;
  195. }
  196. #proof-fragment .proof-title h3 {
  197. font-size: 24px;
  198. color: rgb(50,50,50);
  199. }
  200. #proof-fragment .div-proof {
  201. float: left;
  202. border: 1px solid #eee;
  203. margin-right: 47px;
  204. }
  205. #proof-fragment .div-proof:last-child{
  206. margin-right: 0;
  207. }
  208. #proof-fragment .div-proof a :HOVER {
  209. border: 1px solid #5078cb;
  210. }
  211. #proof-fragment .div-proof a.img-show :HOVER{
  212. border: none;
  213. }
  214. #proof-fragment .div-proof img {
  215. max-width: 200px;
  216. max-height: 200px;
  217. }
  218. .div-proof{
  219. width: 200px;
  220. height: 200px;
  221. overflow: hidden;
  222. line-height: 200px;
  223. text-align: center;
  224. }
  225. .div-proof a{
  226. display: inline-block;
  227. width: 100%;
  228. height: 100%;
  229. }
  230. .hover-show{
  231. position: absolute;
  232. width: 100%;
  233. height: 100%;
  234. top: 100%;
  235. left: 0;
  236. background: rgba(0,0,0,.5);
  237. z-index: 10;
  238. line-height: 200px;
  239. text-align: center;
  240. color: #fff;
  241. font-size: 14px;
  242. }
  243. .div-proof:hover .hover-show{
  244. top: 0;
  245. transition: top .3s ease-in;
  246. }
  247. .hover-show:hover{
  248. cursor: pointer;
  249. }
  250. .hover-shows a{
  251. text-decoration: none;
  252. color: #fff;
  253. }
  254. .hover-shows a:hover, .hover-shows a:focus, .hover-shows a:active{
  255. text-decoration: none;
  256. color: #fff;
  257. }
  258. </style>