BaseInfo.vue 7.7 KB

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