NewStore.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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.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. },
  54. methods: {
  55. goStoreApply: function () {
  56. if (!this.user.logged) {
  57. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  58. if (response.data) {
  59. this.$router.push('/auth/login')
  60. }
  61. })
  62. } else {
  63. window.location.href = '/vendor#/store-apply'
  64. }
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. @import '~assets/scss/variables';
  71. .new-sign-module {
  72. width: 280px;
  73. height: 360px;
  74. padding-left: 10px;
  75. border-right: 1px solid #D6D3CE;
  76. border-bottom: 1px solid #D6D3CE;
  77. border-top: 1px solid #D6D3CE;
  78. a {
  79. color: #337ab7;
  80. text-decoration: none;
  81. }
  82. ul {
  83. margin-bottom: 10px;
  84. }
  85. .head {
  86. height: 60px;
  87. .img {
  88. margin-right: 14px;
  89. width: 50px;
  90. height: 50px;
  91. display: inline-block;
  92. text-align: center;
  93. line-height: 50px;
  94. img {
  95. vertical-align: middle;
  96. }
  97. }
  98. .title {
  99. height: 60px;
  100. line-height: 60px;
  101. font-size: 18px;
  102. font-weight: 600;
  103. display: inline-block;
  104. }
  105. }
  106. .new-store {
  107. display: inline-block;
  108. height: 70px;
  109. padding-bottom: 0;
  110. width: 260px;
  111. .img {
  112. width: 50px;
  113. height: 50px;
  114. display: inline-block;
  115. text-align: center;
  116. line-height: 45px;
  117. border: #e8e8e8 1px solid;
  118. img {
  119. vertical-align: middle;
  120. }
  121. }
  122. .content {
  123. width: 185px;
  124. display: inline-block;
  125. padding: 8px;
  126. vertical-align: middle;
  127. margin-left: 10px;
  128. .name {
  129. font-size: 16px;
  130. color: #6D6B66;
  131. width: 190px;
  132. line-height: 28px;
  133. text-overflow: ellipsis;
  134. overflow: hidden;
  135. white-space: nowrap;
  136. word-break: keep-all;
  137. }
  138. .subject {
  139. font-size: 14px;
  140. color: #777570;
  141. line-height: 28px;
  142. overflow: hidden;
  143. text-overflow: ellipsis;
  144. white-space: nowrap;
  145. word-break: keep-all;
  146. }
  147. }
  148. }
  149. .sign {
  150. height: 80px;
  151. box-shadow: 0px -5px 20px 0px #E3E1DE;
  152. margin-left: -20px;
  153. padding-left: 20px;
  154. padding-top: 5px;
  155. .img {
  156. display: inline-block;
  157. img {
  158. margin-bottom: 25px;
  159. vertical-align: middle;
  160. }
  161. }
  162. .content {
  163. display: inline-block;
  164. font-size: 0;
  165. padding-left: 3px;
  166. height: 70px;
  167. button {
  168. background-color: #3D76C6;
  169. color: white;
  170. font-size: 14px;
  171. font-weight: 600;
  172. border-radius: 4px;
  173. height: 30px;
  174. width: 160px;
  175. border: #3D76C6;
  176. }
  177. button:hover {
  178. transform: scale(1.05);
  179. background: #5078cb;
  180. }
  181. }
  182. .count {
  183. font-size: 16px;
  184. padding: 5px;
  185. span {
  186. color: #328CFE;
  187. }
  188. }
  189. }
  190. }
  191. </style>