NewStore.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div class="new-sign-module">
  3. <div class="head">
  4. <div class="img">
  5. <img src="/images/store/home/new.png" />
  6. </div>
  7. <div class="title">新入驻的商家</div>
  8. </div>
  9. <ul class="list-unstyled list-inline" style="height: 210px;">
  10. <li class="new-store" v-for="(store, index) in stores">
  11. <div class="img">
  12. <img :src="store.logoUrl || '/images/store/common/default.png'" style="max-width: 100%;max-height: 100%;" />
  13. </div>
  14. <div class="content">
  15. <div class="name"><a target="_blank" :href="'/store/' + store.uuid" :title="store.storeName">{{store.storeName}}</a></div>
  16. <div class="subject" style="display: none;">
  17. 主营:<span>暂无</span>
  18. </div>
  19. <div class="subject">
  20. 企业介绍:<span>{{store.enterprise.description || '暂无企业介绍'}}</span>
  21. </div>
  22. </div>
  23. </li>
  24. </ul>
  25. <div class="sign">
  26. <div class="img">
  27. <img src="/images/store/home/shop.png"/>
  28. </div>
  29. <div class="content">
  30. <div class="count">
  31. 已入驻商家<span>{{storeCount}}</span>家
  32. </div>
  33. <div>
  34. <a @click="goStoreApply()"><button>立即入驻</button></a>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. export default {
  42. name: 'new-store',
  43. computed: {
  44. user () {
  45. return this.$store.state.option.user
  46. },
  47. stores () {
  48. return this.$store.state.provider.storeCms.newStores.data ? this.$store.state.provider.storeCms.newStores.data.content : []
  49. },
  50. storeCount () {
  51. return this.$store.state.provider.storeCms.storeCount.data
  52. },
  53. enterprise () {
  54. return this.user.data.enterprise
  55. }
  56. },
  57. methods: {
  58. goStoreApply: function () {
  59. if (this.user.logged) {
  60. if (this.enterprise && this.enterprise.isVendor === 313) {
  61. window.location.href = '/vendor#/index'
  62. } else {
  63. this.$router.push('/register-saler')
  64. }
  65. } else {
  66. this.$router.push('/auth/login')
  67. }
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. @import '~assets/scss/variables';
  74. .new-sign-module {
  75. width: 280px;
  76. height: 360px;
  77. padding-left: 10px;
  78. border-right: 1px solid #D6D3CE;
  79. border-bottom: 1px solid #D6D3CE;
  80. border-top: 1px solid #D6D3CE;
  81. a {
  82. color: #337ab7;
  83. text-decoration: none;
  84. }
  85. ul {
  86. margin-bottom: 10px;
  87. }
  88. .head {
  89. height: 60px;
  90. .img {
  91. margin-right: 14px;
  92. width: 50px;
  93. height: 50px;
  94. display: inline-block;
  95. text-align: center;
  96. line-height: 50px;
  97. img {
  98. vertical-align: middle;
  99. }
  100. }
  101. .title {
  102. height: 60px;
  103. line-height: 60px;
  104. font-size: 18px;
  105. font-weight: 600;
  106. display: inline-block;
  107. }
  108. }
  109. .new-store {
  110. display: inline-block;
  111. height: 70px;
  112. padding-bottom: 0;
  113. width: 260px;
  114. .img {
  115. width: 50px;
  116. height: 50px;
  117. display: inline-block;
  118. text-align: center;
  119. line-height: 45px;
  120. border: #e8e8e8 1px solid;
  121. img {
  122. vertical-align: middle;
  123. }
  124. }
  125. .content {
  126. width: 185px;
  127. display: inline-block;
  128. padding: 8px;
  129. vertical-align: middle;
  130. margin-left: 10px;
  131. .name {
  132. font-size: 16px;
  133. color: #6D6B66;
  134. width: 190px;
  135. line-height: 28px;
  136. text-overflow: ellipsis;
  137. overflow: hidden;
  138. white-space: nowrap;
  139. word-break: keep-all;
  140. }
  141. .subject {
  142. font-size: 14px;
  143. color: #777570;
  144. line-height: 28px;
  145. overflow: hidden;
  146. text-overflow: ellipsis;
  147. white-space: nowrap;
  148. word-break: keep-all;
  149. }
  150. }
  151. }
  152. .sign {
  153. height: 80px;
  154. box-shadow: 0px -5px 20px 0px #E3E1DE;
  155. margin-left: -20px;
  156. padding-left: 20px;
  157. padding-top: 5px;
  158. .img {
  159. display: inline-block;
  160. img {
  161. margin-bottom: 25px;
  162. vertical-align: middle;
  163. }
  164. }
  165. .content {
  166. display: inline-block;
  167. font-size: 0;
  168. padding-left: 3px;
  169. height: 70px;
  170. button {
  171. background-color: #3D76C6;
  172. color: white;
  173. font-size: 14px;
  174. font-weight: 600;
  175. border-radius: 4px;
  176. height: 30px;
  177. width: 160px;
  178. border: #3D76C6;
  179. }
  180. button:hover {
  181. transform: scale(1.05);
  182. background: #5078cb;
  183. }
  184. }
  185. .count {
  186. font-size: 16px;
  187. padding: 5px;
  188. span {
  189. color: #328CFE;
  190. }
  191. }
  192. }
  193. }
  194. </style>