BaseInfo.vue 6.8 KB

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