BaseInfo.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. <a href="/">商城首页</a> >
  8. <a href="provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</a>
  9. <a href="provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</a>
  10. <a :href="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</a>
  11. >
  12. <span v-if="storeInfo.type != 'CONSIGNMENT'"><a :href="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">店铺名称</a>> </span>
  13. <span>了解更多</span>
  14. </div>
  15. </div>
  16. <div class="intro-title row">
  17. <h3 class="col-xs-2">
  18. 商家介绍
  19. </h3>
  20. <a class="col-xs-10" :href="'/store/' + storeInfo.uuid">返回店铺</a>
  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.length > 0">传真:<span v-text="storeInfo.enterprise.enFax">0755-26038111</span></div>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div id="proof-fragment" v-show="qualifications.length > 0">
  43. <div class="container" style="margin-top: 30px; margin-bottom: 20px;">
  44. <div class="proof-title">
  45. <h3>
  46. 资质证明
  47. </h3>
  48. </div>
  49. <div>
  50. <div class="div-proof" style="position:relative;" v-for="qualification in qualifications">
  51. <div v-if="qualification.isPdf">
  52. <img src="/images/store/common/timg.png" alt="" style="max-width: 124px; max-height: 147px;">
  53. <div class="hover-show hover-shows">
  54. <a :href="qualification.resourceUrl" target="_blank"><i class="fa fa-search" style="margin-right: 5px;"></i>查看</a>
  55. </div>
  56. </div>
  57. <div v-if="!qualification.isPdf">
  58. <a class="img-show">
  59. <img :src="qualification.resourceUrl"/>
  60. </a>
  61. <div class="hover-show" @click="showImg(qualification.resourceUrl)"><i class="fa fa-search" style="margin-right: 5px;"></i>查看</div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </template>
  69. <script>
  70. function isPdf (path) {
  71. // 根据path文件名来判断文件是否是PDF文件
  72. if (path) {
  73. let str = path.slice(path.lastIndexOf('.')).toLowerCase()
  74. if (str === '.pdf') {
  75. return true
  76. } else {
  77. return false
  78. }
  79. } else {
  80. return false
  81. }
  82. }
  83. export default {
  84. name: 'base-info',
  85. computed: {
  86. storeInfo () {
  87. return this.$store.state.shop.storeInfo.store.data
  88. },
  89. qualifications () {
  90. let storeInfo = this.$store.state.shop.storeInfo.store.data
  91. let qualifications = JSON.parse(JSON.stringify(storeInfo.qualifications))
  92. qualifications = qualifications.filter(qualification => {
  93. return qualification && qualification.type === 'APTITUDE'
  94. })
  95. for (let i = 0; i < qualifications.length; i++) {
  96. qualifications[i].isPdf = isPdf(qualifications[i].resourceUrl)
  97. }
  98. return qualifications || []
  99. }
  100. },
  101. methods: {
  102. showImg (path) {
  103. window.open(path)
  104. }
  105. }
  106. }
  107. </script>
  108. <style scoped>
  109. #introduction-fragment .intro-title h3 {
  110. font-size: 24px;
  111. color: rgb(50,50,50);
  112. }
  113. #introduction-fragment .intro-title a {
  114. font-size: 14px;
  115. color: rgb(33,71,151);
  116. margin-top: 25px;
  117. margin-left: -50px;
  118. }
  119. #introduction-fragment .intro-text {
  120. font-size: 14px;
  121. color: rgb(50,50,50);
  122. margin-top: 10px;
  123. line-height: 30px;
  124. }
  125. #introduction-fragment .intro-text{
  126. text-indent:2em;
  127. }
  128. #contact-fragment .contact-title h3 {
  129. font-size: 24px;
  130. color: rgb(50,50,50);
  131. }
  132. #contact-fragment .contact-text {
  133. font-size: 14px;
  134. color: rgb(50,50,50);
  135. margin-top: 10px;
  136. line-height: 28px;
  137. }
  138. #proof-fragment .proof-title {
  139. margin-bottom: 10px;
  140. }
  141. #proof-fragment .proof-title h3 {
  142. font-size: 24px;
  143. color: rgb(50,50,50);
  144. }
  145. #proof-fragment .div-proof {
  146. float: left;
  147. border: 1px solid #eee;
  148. margin-right: 47px;
  149. }
  150. #proof-fragment .div-proof:last-child{
  151. margin-right: 0;
  152. }
  153. #proof-fragment .div-proof a :HOVER {
  154. border: 1px solid #5078cb;
  155. }
  156. #proof-fragment .div-proof a.img-show :HOVER{
  157. border: none;
  158. }
  159. #proof-fragment .div-proof img {
  160. max-width: 200px;
  161. max-height: 200px;
  162. }
  163. .div-proof{
  164. width: 200px;
  165. height: 200px;
  166. overflow: hidden;
  167. line-height: 200px;
  168. text-align: center;
  169. }
  170. .div-proof a{
  171. display: inline-block;
  172. width: 100%;
  173. height: 100%;
  174. }
  175. .hover-show{
  176. position: absolute;
  177. width: 100%;
  178. height: 100%;
  179. top: 100%;
  180. left: 0;
  181. background: rgba(0,0,0,.5);
  182. z-index: 10;
  183. line-height: 200px;
  184. text-align: center;
  185. color: #fff;
  186. font-size: 14px;
  187. }
  188. .div-proof:hover .hover-show{
  189. top: 0;
  190. transition: top .3s ease-in;
  191. }
  192. .hover-show:hover{
  193. cursor: pointer;
  194. }
  195. /* 预览框 end */
  196. #image-box .x-floating-wrap {
  197. position: fixed;
  198. z-index: 99998;
  199. background: #000;
  200. top: 0;
  201. left: 0;
  202. width: 100%;
  203. height: 100%;
  204. opacity: 0.5;
  205. }
  206. #image-box .x-floating {
  207. position: fixed;
  208. z-index: 99999;
  209. top: 60px;
  210. left: 0;
  211. width: 100%;
  212. height: 100%;
  213. text-align: center;
  214. vertical-align: middle;
  215. }
  216. #image-box .x-floating img {
  217. margin: auto auto;
  218. max-width: 100%;
  219. max-height: 80%;
  220. -webkit-user-select: none;
  221. -moz-user-select: none;
  222. -ms-user-select: none;
  223. user-select: none
  224. }
  225. #image-box .x-close-wrap {
  226. position: fixed;
  227. top: 0;
  228. right: 0;
  229. z-index: 100000;
  230. width: 120px;
  231. height: 120px;
  232. margin: -60px -60px 0 0;
  233. border-radius: 100%;
  234. background: #000;
  235. opacity: .3
  236. }
  237. #image-box .x-close-wrap a {
  238. position: absolute;
  239. left: 25px;
  240. bottom: 25px;
  241. font-size: 42px;
  242. color: #fff
  243. }
  244. #image-box .x-close-wrap:hover {
  245. opacity: .7
  246. }
  247. .hover-shows a{
  248. text-decoration: none;
  249. color: #fff;
  250. }
  251. .hover-shows a:hover, .hover-shows a:focus, .hover-shows a:active{
  252. text-decoration: none;
  253. color: #fff;
  254. }
  255. </style>