BaseInfo.vue 8.4 KB

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