Suppliers.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div class="container" id="store-list">
  3. <table class="table">
  4. <thead>
  5. <tr>
  6. <td width="175"></td>
  7. <td width="auto"></td>
  8. <td width="200">
  9. <div class="input-group">
  10. <input class="form-control" type="search" v-model="keyword" placeholder="请输入商家名称" @search="search()" />
  11. <span class="input-group-btn">
  12. <button type="button" class="btn btn-default" @click="search()"><i class="iconfont">&#xe6fc;</i></button>
  13. </span>
  14. </div>
  15. </td>
  16. <td width="150" style="vertical-align: middle"><span>入驻商家:</span><span class="text-message">{{stores ? stores.length : 0}}</span><span>家</span></td>
  17. <td width="150">
  18. <a href="vendor#/store-apply"><button class="btn btn-primary" style="margin-left: 6px;">立即入驻</button></a>
  19. </td>
  20. </tr>
  21. </thead>
  22. <tbody>
  23. <!--<tr>{{$data}}</tr>-->
  24. <tr v-for="store in stores">
  25. <td>
  26. <div class="logo">
  27. <a :href="'/store/' + store.uuid"><img :src="store.logoUrl || '/images/store/common/default.png'" :alt="store.storeName"></a>
  28. </div>
  29. </td>
  30. <td colspan="3">
  31. <a class="store-name" :href="'/store/' + store.uuid" target="_blank"><div :title="store.storeName">{{store.storeName}}</div></a>
  32. <div class="store-message">
  33. <span>商家介绍:</span>
  34. <span>{{store.description.slice(0,160)}}<em v-if="store.description.length > 160">...</em></span>
  35. </div>
  36. </td>
  37. <td class="vertical-middle">
  38. <a :href="'/store/' + store.uuid" target="_blank"><button class="btn btn-primary">进入店铺&nbsp;&gt;</button></a>
  39. </td>
  40. </tr>
  41. <tr v-if="!stores || stores.length == 0">
  42. <td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;">
  43. <i class="fa fa-smile-o fa-lg"></i> 暂无店铺信息
  44. </td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. </template>
  50. <script>
  51. export default {
  52. name: 'suppliers',
  53. props: ['op'],
  54. data () {
  55. return {
  56. keyword: ''
  57. }
  58. },
  59. computed: {
  60. stores () {
  61. return this.$store.state.provider.stores.storeList.data
  62. }
  63. },
  64. methods: {
  65. search () {
  66. let params = { op: this.op, keyword: this.keyword }
  67. this.$store.dispatch('provider/findStoreList', params)
  68. }
  69. }
  70. }
  71. </script>
  72. <style scoped>
  73. #store-list{
  74. width: 1190px;
  75. padding: 0;
  76. }
  77. #store-list table {
  78. border: 1px solid #d8d4d4;
  79. font-size: 14px;
  80. }
  81. #store-list table>thead>tr {
  82. background-color: #f7f7f7;
  83. font-size: 14px;
  84. font-weight: 600;
  85. color: rgb(50,50,50);
  86. }
  87. #store-list table>thead>tr input {
  88. font-weight: 100;
  89. }
  90. #store-list .text-message {
  91. color: rgb(80,120,203);
  92. font-family: "Microsoft Yahei";
  93. }
  94. #store-list .btn-primary {
  95. background-color: rgb(80,120,203);
  96. color: #fff;
  97. width: 100px;
  98. height: 30px;
  99. line-height: 14px;
  100. }
  101. #store-list table>tbody .logo {
  102. width: 150px;
  103. height: 76px;
  104. text-align: center;
  105. line-height: 72px;
  106. border:1px solid #ccc;
  107. }
  108. #store-list table>tbody img {
  109. max-width: 148px;
  110. max-height: 72px;
  111. }
  112. #store-list table>tbody .vertical-middle{
  113. vertical-align: middle;
  114. }
  115. #store-list table>tbody .store-mark {
  116. margin: 10px 0;
  117. }
  118. #store-list table>tbody .text-point {
  119. font-family: "Microsoft Yahei", "微软雅黑";
  120. color: #ff3737;
  121. font-weight: 600;
  122. }
  123. #store-list table>tbody .store-name {
  124. font-size: 17px;
  125. font-weight: 600;
  126. color: #000;
  127. }
  128. #store-list table>tbody .store-message {
  129. color: #999;
  130. width: 95%;
  131. overflow: hidden;
  132. text-overflow: ellipsis;
  133. display: -webkit-box;
  134. -webkit-box-orient: vertical;
  135. -webkit-line-clamp: 3;
  136. line-height: 18px;
  137. }
  138. #store-list table>tbody tr td{
  139. padding: 15px;
  140. }
  141. @font-face {
  142. font-family: 'iconfont'; /* project id 357960 */
  143. src: url('//at.alicdn.com/t/font_sw3uw5ndd9uow29.eot');
  144. src: url('//at.alicdn.com/t/font_sw3uw5ndd9uow29.eot?#iefix') format('embedded-opentype'),
  145. url('//at.alicdn.com/t/font_sw3uw5ndd9uow29.woff') format('woff'),
  146. url('//at.alicdn.com/t/font_sw3uw5ndd9uow29.ttf') format('truetype'),
  147. url('//at.alicdn.com/t/font_sw3uw5ndd9uow29.svg#iconfont') format('svg');
  148. }
  149. </style>