BaseInfo.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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>
  24. </div>
  25. <div id="contact-fragment">
  26. <div class="container" style="margin-top: 30px;">
  27. <div class="contact-title">
  28. <h3>
  29. 联系我们
  30. </h3>
  31. </div>
  32. <div class="contact-text">
  33. <div v-text="storeInfo.enterprise.enName || '-'"></div>
  34. <div>地址:<span v-text="storeInfo.enterprise.enAddress || '-'"></span></div>
  35. <div>电话:<span v-text="storeInfo.enterprise.enTel || '-'"></span></div>
  36. <div>传真:<span v-text="storeInfo.enterprise.enFax || '-'"></span></div>
  37. <div>官网地址:<a :href=storeInfo.enterprise.enUrl target="_blank">{{storeInfo.enterprise.enUrl || '-'}}</a></div>
  38. </div>
  39. </div>
  40. </div>
  41. <div id="proof-fragment" v-show="qualifications.length > 0">
  42. <div class="container" style="margin-top: 30px; margin-bottom: 60px;">
  43. <div class="proof-title">
  44. <h3>
  45. 资质证明
  46. </h3>
  47. </div>
  48. <div>
  49. <div class="div-proof" style="position:relative;" v-for="qualification in qualifications">
  50. <div v-if="qualification.isPdf">
  51. <img src="/images/store/common/timg.png" alt="" style="max-width: 124px; max-height: 147px;">
  52. <div class="hover-show hover-shows">
  53. <a :href="qualification.resourceUrl" target="_blank"><i class="fa fa-search" style="margin-right: 5px;"></i>查看</a>
  54. </div>
  55. </div>
  56. <div v-if="!qualification.isPdf">
  57. <a class="img-show">
  58. <img :src="qualification.resourceUrl"/>
  59. </a>
  60. <div class="hover-show" @click="showImg(qualification.resourceUrl)"><i class="fa fa-search" style="margin-right: 5px;"></i>查看</div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <!--查看大图-->
  67. <div id="image-box" v-if="isShow">
  68. <div class="x-floating-wrap"></div>
  69. <div class="x-floating">
  70. <div id="item-content">
  71. <div class="x-close-wrap" @click="isShow = false"><a href="javascript:void(0);">&times;</a></div>
  72. <div class="img"><img :src="imgUrl"/></div>
  73. </div>
  74. </div>
  75. </div>
  76. <!--查看大图 end-->
  77. </div>
  78. </template>
  79. <script>
  80. function isPdf (path) {
  81. // 根据path文件名来判断文件是否是PDF文件
  82. if (path) {
  83. let str = path.slice(path.lastIndexOf('.')).toLowerCase()
  84. if (str === '.pdf') {
  85. return true
  86. } else {
  87. return false
  88. }
  89. } else {
  90. return false
  91. }
  92. }
  93. export default {
  94. name: 'base-info',
  95. data () {
  96. return {
  97. imgUrl: '',
  98. isShow: false
  99. }
  100. },
  101. computed: {
  102. storeInfo () {
  103. return this.$store.state.shop.storeInfo.store.data
  104. },
  105. qualifications () {
  106. let storeInfo = this.$store.state.shop.storeInfo.store.data
  107. let qualifications = JSON.parse(JSON.stringify(storeInfo.qualifications))
  108. qualifications = qualifications.filter(qualification => {
  109. return qualification && qualification.type === 'APTITUDE'
  110. })
  111. for (let i = 0; i < qualifications.length; i++) {
  112. qualifications[i].isPdf = isPdf(qualifications[i].resourceUrl)
  113. }
  114. return qualifications || []
  115. }
  116. },
  117. methods: {
  118. showImg (imgUrl) {
  119. this.imgUrl = imgUrl
  120. this.isShow = true
  121. }
  122. }
  123. }
  124. </script>
  125. <style scoped>
  126. #introduction-fragment .intro-title h3 {
  127. font-size: 24px;
  128. color: rgb(50,50,50);
  129. }
  130. #introduction-fragment .intro-title a {
  131. font-size: 14px;
  132. color: rgb(33,71,151);
  133. margin-top: 25px;
  134. margin-left: -50px;
  135. }
  136. #introduction-fragment .intro-text {
  137. font-size: 14px;
  138. color: rgb(50,50,50);
  139. margin-top: 10px;
  140. line-height: 30px;
  141. }
  142. #introduction-fragment .intro-text{
  143. text-indent:2em;
  144. }
  145. #contact-fragment .contact-title h3 {
  146. font-size: 24px;
  147. color: rgb(50,50,50);
  148. }
  149. #contact-fragment .contact-text {
  150. font-size: 14px;
  151. color: rgb(50,50,50);
  152. margin-top: 10px;
  153. line-height: 28px;
  154. }
  155. #proof-fragment .proof-title {
  156. margin-bottom: 10px;
  157. }
  158. #proof-fragment .proof-title h3 {
  159. font-size: 24px;
  160. color: rgb(50,50,50);
  161. }
  162. #proof-fragment .div-proof {
  163. float: left;
  164. border: 1px solid #eee;
  165. margin-right: 47px;
  166. }
  167. #proof-fragment .div-proof:last-child{
  168. margin-right: 0;
  169. }
  170. #proof-fragment .div-proof a :HOVER {
  171. border: 1px solid #5078cb;
  172. }
  173. #proof-fragment .div-proof a.img-show :HOVER{
  174. border: none;
  175. }
  176. #proof-fragment .div-proof img {
  177. max-width: 200px;
  178. max-height: 200px;
  179. }
  180. .div-proof{
  181. width: 200px;
  182. height: 200px;
  183. overflow: hidden;
  184. line-height: 200px;
  185. text-align: center;
  186. }
  187. .div-proof a{
  188. display: inline-block;
  189. width: 100%;
  190. height: 100%;
  191. }
  192. .hover-show{
  193. position: absolute;
  194. width: 100%;
  195. height: 100%;
  196. top: 100%;
  197. left: 0;
  198. background: rgba(0,0,0,.5);
  199. z-index: 10;
  200. line-height: 200px;
  201. text-align: center;
  202. color: #fff;
  203. font-size: 14px;
  204. }
  205. .div-proof:hover .hover-show{
  206. top: 0;
  207. transition: top .3s ease-in;
  208. }
  209. .hover-show:hover{
  210. cursor: pointer;
  211. }
  212. .hover-shows a{
  213. text-decoration: none;
  214. color: #fff;
  215. }
  216. .hover-shows a:hover, .hover-shows a:focus, .hover-shows a:active{
  217. text-decoration: none;
  218. color: #fff;
  219. }
  220. </style>