BaseInfo.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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. console.log(qualifications)
  99. return qualifications || []
  100. }
  101. },
  102. methods: {
  103. showImg (path) {
  104. window.open(path)
  105. }
  106. }
  107. }
  108. </script>
  109. <style scoped>
  110. #introduction-fragment .intro-title h3 {
  111. font-size: 24px;
  112. color: rgb(50,50,50);
  113. }
  114. #introduction-fragment .intro-title a {
  115. font-size: 14px;
  116. color: rgb(33,71,151);
  117. margin-top: 25px;
  118. margin-left: -50px;
  119. }
  120. #introduction-fragment .intro-text {
  121. font-size: 14px;
  122. color: rgb(50,50,50);
  123. margin-top: 10px;
  124. line-height: 30px;
  125. }
  126. #introduction-fragment .intro-text{
  127. text-indent:2em;
  128. }
  129. #contact-fragment .contact-title h3 {
  130. font-size: 24px;
  131. color: rgb(50,50,50);
  132. }
  133. #contact-fragment .contact-text {
  134. font-size: 14px;
  135. color: rgb(50,50,50);
  136. margin-top: 10px;
  137. line-height: 28px;
  138. }
  139. #proof-fragment .proof-title {
  140. margin-bottom: 10px;
  141. }
  142. #proof-fragment .proof-title h3 {
  143. font-size: 24px;
  144. color: rgb(50,50,50);
  145. }
  146. #proof-fragment .div-proof {
  147. float: left;
  148. border: 1px solid #eee;
  149. margin-right: 47px;
  150. }
  151. #proof-fragment .div-proof:last-child{
  152. margin-right: 0;
  153. }
  154. #proof-fragment .div-proof a :HOVER {
  155. border: 1px solid #5078cb;
  156. }
  157. #proof-fragment .div-proof a.img-show :HOVER{
  158. border: none;
  159. }
  160. #proof-fragment .div-proof img {
  161. max-width: 200px;
  162. max-height: 200px;
  163. }
  164. .div-proof{
  165. width: 200px;
  166. height: 200px;
  167. overflow: hidden;
  168. line-height: 200px;
  169. text-align: center;
  170. }
  171. .div-proof a{
  172. display: inline-block;
  173. width: 100%;
  174. height: 100%;
  175. }
  176. .hover-show{
  177. position: absolute;
  178. width: 100%;
  179. height: 100%;
  180. top: 100%;
  181. left: 0;
  182. background: rgba(0,0,0,.5);
  183. z-index: 10;
  184. line-height: 200px;
  185. text-align: center;
  186. color: #fff;
  187. font-size: 14px;
  188. }
  189. .div-proof:hover .hover-show{
  190. top: 0;
  191. transition: top .3s ease-in;
  192. }
  193. .hover-show:hover{
  194. cursor: pointer;
  195. }
  196. /* 预览框 end */
  197. #image-box .x-floating-wrap {
  198. position: fixed;
  199. z-index: 99998;
  200. background: #000;
  201. top: 0;
  202. left: 0;
  203. width: 100%;
  204. height: 100%;
  205. opacity: 0.5;
  206. }
  207. #image-box .x-floating {
  208. position: fixed;
  209. z-index: 99999;
  210. top: 60px;
  211. left: 0;
  212. width: 100%;
  213. height: 100%;
  214. text-align: center;
  215. vertical-align: middle;
  216. }
  217. #image-box .x-floating img {
  218. margin: auto auto;
  219. max-width: 100%;
  220. max-height: 80%;
  221. -webkit-user-select: none;
  222. -moz-user-select: none;
  223. -ms-user-select: none;
  224. user-select: none
  225. }
  226. #image-box .x-close-wrap {
  227. position: fixed;
  228. top: 0;
  229. right: 0;
  230. z-index: 100000;
  231. width: 120px;
  232. height: 120px;
  233. margin: -60px -60px 0 0;
  234. border-radius: 100%;
  235. background: #000;
  236. opacity: .3
  237. }
  238. #image-box .x-close-wrap a {
  239. position: absolute;
  240. left: 25px;
  241. bottom: 25px;
  242. font-size: 42px;
  243. color: #fff
  244. }
  245. #image-box .x-close-wrap:hover {
  246. opacity: .7
  247. }
  248. .hover-shows a{
  249. text-decoration: none;
  250. color: #fff;
  251. }
  252. .hover-shows a:hover, .hover-shows a:focus, .hover-shows a:active{
  253. text-decoration: none;
  254. color: #fff;
  255. }
  256. </style>