NewStore.vue 4.9 KB

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