EnterpriseInfo.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <div id="recommend-fragment-self">
  3. <div class="recommend-product">
  4. <ul class="main-list clearfix">
  5. <li>
  6. <div>
  7. <div class="introduce">
  8. <div><h4>企业简介</h4></div>
  9. <p class="intro-content" v-if="storeInfo.enterprise">
  10. <span class="info" v-text="getIntro(storeInfo.enterprise.description)"></span>
  11. <span class="look" @click="dialogVisible = true" v-if="showMore">查看更多 <img src="/images/store/home/angle-right.png" style="margin-top:-2px;"></span>
  12. </p>
  13. <p v-else class="empty-introduce">暂无简介</p>
  14. </div>
  15. <div class="introduce qualification">
  16. <div><h4 class="prof">资质证明</h4><span @click="dialogCertificate = true">查看 <img src="/images/store/home/angle-right.png"></span></div>
  17. </div>
  18. <div class="product-show">
  19. <recommend-pcb></recommend-pcb>
  20. </div>
  21. </div>
  22. </li>
  23. <li>
  24. <div style="width: 962px; margin-left: 3px;">
  25. <commodity-list :kindIds="kindIds" :kindItem="kindItem"></commodity-list>
  26. </div>
  27. </li>
  28. </ul>
  29. <div class="remind-area">
  30. <img src="/images/store/store-remind.png" alt="">
  31. 所有报价、库存信息的真实性及准确性均由店铺负责,如有疑问请点击
  32. <a @click="goLink" class="link-seller">联系卖家</a>
  33. </div>
  34. </div>
  35. <!--企业简介-->
  36. <el-dialog class="dialog-description"
  37. :visible.sync="dialogVisible"
  38. size="tiny">
  39. <div>
  40. <div class="header">
  41. <span><img src="/images/store/home/blue.png">企业简介</span>
  42. <span class="close" @click="dialogVisible = false">&times;</span>
  43. </div>
  44. <div class='content'>
  45. <p v-if="storeInfo.enterprise">{{storeInfo.enterprise.description}}</p>
  46. <p v-else class="empty-introduce">暂无简介</p>
  47. </div>
  48. </div>
  49. </el-dialog>
  50. <!--资质证明-->
  51. <el-dialog class="dialog-description certificate"
  52. :visible.sync="dialogCertificate"
  53. size="tiny">
  54. <div>
  55. <div class="header">
  56. <span><img src="/images/store/home/blue.png">资质证明</span>
  57. <span class="close" @click="dialogCertificate = false">&times;</span></div>
  58. <div class="content" style="height: 270px; width: 1070px; padding: 0 50px;"><qualification-certificate></qualification-certificate></div>
  59. </div>
  60. </el-dialog>
  61. <!--联系卖家-->
  62. <link-saler-box
  63. :tel="tel"
  64. v-if="showLinkBox"
  65. @cancelAction="showLinkBox = false">
  66. </link-saler-box>
  67. </div>
  68. </template>
  69. <script>
  70. import Buy from '~components/common/buyOrCar/buyComponent.vue'
  71. import RecommendPcb from './RecommendPcb.vue'
  72. import CommodityList from './CommodityList.vue'
  73. import QualificationCertificate from './QualificationCertificate.vue'
  74. import LinkSalerBox from '~components/common/LinkSalerBox.vue'
  75. export default {
  76. name: 'product-recommend-self',
  77. props: {
  78. kindIds: {
  79. type: String,
  80. default: null
  81. },
  82. kindItem: {
  83. type: Object,
  84. default: {}
  85. }
  86. },
  87. data () {
  88. return {
  89. dialogVisible: false,
  90. dialogCertificate: false,
  91. showMore: false,
  92. showLinkBox: false
  93. }
  94. },
  95. components: {
  96. Buy,
  97. CommodityList,
  98. QualificationCertificate,
  99. LinkSalerBox,
  100. RecommendPcb
  101. },
  102. computed: {
  103. storeInfo () {
  104. return this.$store.state.shop.storeInfo.store.data
  105. }
  106. },
  107. methods: {
  108. // 店铺简介
  109. getIntro (text) {
  110. let realLength = this.baseUtils.getRealLen(text)
  111. if (realLength > 494) {
  112. this.showMore = true
  113. text = this.baseUtils.cutOutString(text, 494) + '...'
  114. } else {
  115. this.showMore = false
  116. }
  117. return text
  118. },
  119. // 联系卖家
  120. goLink: function () {
  121. this.baseUtils.goLinkUser(this, this.storeInfo.enUU)
  122. },
  123. buyNow: function (isBuy, item) {
  124. if (!this.$store.state.option.user.logged) {
  125. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  126. if (response.data) {
  127. this.$router.push('/auth/login')
  128. }
  129. })
  130. } else {
  131. this.baseUtils.buyOrCar(true, null, this, item, '/user#/order/pay/')
  132. }
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss" scoped>
  138. #recommend-fragment-self {
  139. min-width: 1190px;
  140. background: #ece9ec;
  141. margin:-18px 0px 0 0px;
  142. .recommend-product {
  143. position: relative;
  144. width: 1190px;
  145. margin: 0 auto;
  146. padding-bottom: 50px;
  147. .main-list {
  148. width: 100%;
  149. /*overflow: hidden;*/
  150. > li {
  151. position: relative;
  152. float: left;
  153. width: 962px;
  154. margin-left: 9px;
  155. &:first-child {
  156. width: 218px;
  157. /*height: 356px;*/
  158. /*background: #fff;*/
  159. margin: -5px 0 0 1px;
  160. border-radius: 5px;
  161. .list{
  162. margin-top: -20px;
  163. height: 170px;
  164. border-radius: 5px;
  165. background: #fff;
  166. .information-list {
  167. font-size: 12px;
  168. color: #333;
  169. margin-bottom: 2px;
  170. /*background: #fff;*/
  171. &:first-child{
  172. /*padding-top: 10px;*/
  173. }
  174. div:first-child {
  175. width: 72px;
  176. text-align: right;
  177. line-height: 20px;
  178. }
  179. div:last-child {
  180. width: 158px;
  181. line-height: 20px;
  182. padding: 0px 0px 0px 6px;
  183. }
  184. }
  185. .information-list > div {
  186. display: table-cell;
  187. }
  188. }
  189. .introduce {
  190. margin-top: 15px;
  191. width: 100%;
  192. height: 336px;
  193. font-size: 12px;
  194. line-height: 15px;
  195. color: #333;
  196. background: #fff;
  197. border-radius: 5px;
  198. p{
  199. span.info{
  200. font-size: 12px;
  201. color: #333;
  202. word-break: break-all;
  203. word-wrap:break-word;
  204. }
  205. span.look {
  206. color: #2496f1;
  207. cursor: pointer;
  208. position: absolute;
  209. right: 10px;
  210. }
  211. }
  212. div{
  213. overflow: hidden;
  214. height: 35px;
  215. h4 {
  216. float: left;
  217. background: url(/images/store/home/detail1.png) no-repeat 15% 10%;
  218. font-size: 14px;
  219. padding: 0 0 5px 30px;
  220. margin:10px 0;
  221. }
  222. h4.prof {
  223. background: url("/images/store/home/prof.png") no-repeat 15% 10%;
  224. }
  225. span{
  226. float: right;
  227. margin-top: 10px;
  228. padding-right: 10px;
  229. font-size: 12px;
  230. color: #2496f1;
  231. cursor: pointer;
  232. img{
  233. margin-top: -3px;
  234. }
  235. }
  236. }
  237. p {
  238. margin: -7px 0px 0px 9px;
  239. text-indent: 2em;
  240. width: 200px;
  241. line-height: 19px;
  242. height: 308px;
  243. overflow: hidden;
  244. }
  245. .empty-introduce{
  246. text-align: center;
  247. line-height: 153px;
  248. color: #666;
  249. }
  250. }
  251. .qualification {
  252. height: 35px;
  253. min-height: 35px;
  254. }
  255. .product-show{
  256. margin-top: 8px;
  257. }
  258. }
  259. }
  260. }
  261. }
  262. }
  263. </style>