BaseInfo.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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. // import axios from '~plugins/axios'
  84. export default {
  85. name: 'base-info',
  86. // data () {
  87. // return {
  88. // storeInfo: {}
  89. // }
  90. // },
  91. // mounted () {
  92. // axios.get('/api/store-service/stores', {params: {StoreUuid: this.$route.params.uuid}})
  93. // .then(response => {
  94. // this.storeInfo = response.data
  95. // })
  96. // },
  97. computed: {
  98. storeInfo () {
  99. return this.$store.state.shop.storeInfo.store.data
  100. },
  101. qualifications () {
  102. let storeInfo = this.$store.state.shop.storeInfo.store.data
  103. let qualifications = JSON.parse(JSON.stringify(storeInfo.qualifications))
  104. qualifications = qualifications.filter(qualification => {
  105. return qualification && qualification.type === 'APTITUDE'
  106. })
  107. for (let i = 0; i < qualifications.length; i++) {
  108. qualifications[i].isPdf = isPdf(qualifications[i].resourceUrl)
  109. }
  110. return qualifications || []
  111. }
  112. },
  113. methods: {
  114. showImg (path) {
  115. window.open(path)
  116. }
  117. }
  118. }
  119. </script>
  120. <style scoped>
  121. #introduction-fragment .intro-title h3 {
  122. font-size: 24px;
  123. color: rgb(50,50,50);
  124. }
  125. #introduction-fragment .intro-title a {
  126. font-size: 14px;
  127. color: rgb(33,71,151);
  128. margin-top: 25px;
  129. margin-left: -50px;
  130. }
  131. #introduction-fragment .intro-text {
  132. font-size: 14px;
  133. color: rgb(50,50,50);
  134. margin-top: 10px;
  135. line-height: 30px;
  136. }
  137. #introduction-fragment .intro-text{
  138. text-indent:2em;
  139. }
  140. #contact-fragment .contact-title h3 {
  141. font-size: 24px;
  142. color: rgb(50,50,50);
  143. }
  144. #contact-fragment .contact-text {
  145. font-size: 14px;
  146. color: rgb(50,50,50);
  147. margin-top: 10px;
  148. line-height: 28px;
  149. }
  150. #proof-fragment .proof-title {
  151. margin-bottom: 10px;
  152. }
  153. #proof-fragment .proof-title h3 {
  154. font-size: 24px;
  155. color: rgb(50,50,50);
  156. }
  157. #proof-fragment .div-proof {
  158. float: left;
  159. border: 1px solid #eee;
  160. margin-right: 47px;
  161. }
  162. #proof-fragment .div-proof:last-child{
  163. margin-right: 0;
  164. }
  165. #proof-fragment .div-proof a :HOVER {
  166. border: 1px solid #5078cb;
  167. }
  168. #proof-fragment .div-proof a.img-show :HOVER{
  169. border: none;
  170. }
  171. #proof-fragment .div-proof img {
  172. max-width: 200px;
  173. max-height: 200px;
  174. }
  175. .div-proof{
  176. width: 200px;
  177. height: 200px;
  178. overflow: hidden;
  179. line-height: 200px;
  180. text-align: center;
  181. }
  182. .div-proof a{
  183. display: inline-block;
  184. width: 100%;
  185. height: 100%;
  186. }
  187. .hover-show{
  188. position: absolute;
  189. width: 100%;
  190. height: 100%;
  191. top: 100%;
  192. left: 0;
  193. background: rgba(0,0,0,.5);
  194. z-index: 10;
  195. line-height: 200px;
  196. text-align: center;
  197. color: #fff;
  198. font-size: 14px;
  199. }
  200. .div-proof:hover .hover-show{
  201. top: 0;
  202. transition: top .3s ease-in;
  203. }
  204. .hover-show:hover{
  205. cursor: pointer;
  206. }
  207. /* 预览框 end */
  208. #image-box .x-floating-wrap {
  209. position: fixed;
  210. z-index: 99998;
  211. background: #000;
  212. top: 0;
  213. left: 0;
  214. width: 100%;
  215. height: 100%;
  216. opacity: 0.5;
  217. }
  218. #image-box .x-floating {
  219. position: fixed;
  220. z-index: 99999;
  221. top: 60px;
  222. left: 0;
  223. width: 100%;
  224. height: 100%;
  225. text-align: center;
  226. vertical-align: middle;
  227. }
  228. #image-box .x-floating img {
  229. margin: auto auto;
  230. max-width: 100%;
  231. max-height: 80%;
  232. -webkit-user-select: none;
  233. -moz-user-select: none;
  234. -ms-user-select: none;
  235. user-select: none
  236. }
  237. #image-box .x-close-wrap {
  238. position: fixed;
  239. top: 0;
  240. right: 0;
  241. z-index: 100000;
  242. width: 120px;
  243. height: 120px;
  244. margin: -60px -60px 0 0;
  245. border-radius: 100%;
  246. background: #000;
  247. opacity: .3
  248. }
  249. #image-box .x-close-wrap a {
  250. position: absolute;
  251. left: 25px;
  252. bottom: 25px;
  253. font-size: 42px;
  254. color: #fff
  255. }
  256. #image-box .x-close-wrap:hover {
  257. opacity: .7
  258. }
  259. .hover-shows a{
  260. text-decoration: none;
  261. color: #fff;
  262. }
  263. .hover-shows a:hover, .hover-shows a:focus, .hover-shows a:active{
  264. text-decoration: none;
  265. color: #fff;
  266. }
  267. </style>