BaseInfo.vue 7.6 KB

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