index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. <template>
  2. <div class="user-content mobile-content">
  3. <div class="user-name">
  4. <img src="/images/component/default.png"/>
  5. <div class="user-info">
  6. <p v-text="userInfo.data.userName"></p>
  7. <p>{{enterpriseInfo.enName}}<a @click="setShowEnterpriseToggle(!showEnterpriseToggle, $event)">切换</a></p>
  8. <ul class="en-list" v-show="showEnterpriseToggle">
  9. <li class="menu-item"
  10. v-for="en in sortEnterprises"
  11. v-if="en.uu != enterpriseInfo.uu"
  12. v-bind:key="en.uu">
  13. <a @click="switchEnterprise(en)">{{ en.enName }}</a>
  14. </li>
  15. <li class="menu-item" v-if="enterpriseInfo.uu">
  16. <a @click="switchEnterprise({uu: 0})"><span v-text="userInfo.data.userName"></span>(个人账户)</a>
  17. </li>
  18. </ul>
  19. </div>
  20. <a v-if="isVendor" v-text="userType === 'saler' ? '切换至买家中心' : '切换至卖家中心'" @click="switchType"></a>
  21. </div>
  22. <ul class="switch-list" v-if="userType !== 'saler'">
  23. <li :class="{active: activeType == 'seek'}" @click="activeType = 'seek'" v-text="userType === 'saler' ? '求购询价' : '我的求购'"></li>
  24. <li :class="{active: activeType == 'comp'}" @click="activeType = 'comp'">器件收藏</li>
  25. <li :class="{active: activeType == 'store'}" @click="activeType = 'store'">店铺关注</li>
  26. </ul>
  27. <div v-if="activeType == 'seek'">
  28. <div class="seek" v-if="userType !== 'saler'">
  29. <ul class="seek-type">
  30. <li :class="{active: seekType == 'wait'}" @click="switchSeek('wait')"><div>待报价</div></li>
  31. <li :class="{active: seekType == 'done'}" @click="switchSeek('done')"><div>已报价</div></li>
  32. <!--<li :class="{active: seekType == 'accept'}" @click="switchSeek('accept')"><div>已采纳</div></li>-->
  33. </ul>
  34. </div>
  35. <ul class="switch-list vendor-switch" v-if="userType === 'saler'">
  36. <li :class="{active: seekType == 'wait'}" @click="switchSeek('wait')"><div>全部</div></li>
  37. <li :class="{active: seekType == 'done'}" @click="switchSeek('done')"><div>已报价</div></li>
  38. </ul>
  39. <div class="search-content">
  40. <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
  41. <span @click="searchSeek" >
  42. <i class="iconfont icon-sousuo"></i>
  43. </span>
  44. </div>
  45. <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
  46. </div>
  47. <div class="shop-list" v-bind:key="item.id" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
  48. <h3>{{item.storeName}}</h3>
  49. <div class="list-item">
  50. <div class="item-img">
  51. <img :src="getBackground(item.storeInfo.type)" />
  52. <img :src="item.storeInfo.logoUrl || '/images/component/default.png'">
  53. </div>
  54. <div class="list-item-phone">
  55. <p>电话:<span>{{item.storeInfo.enterprise ? item.storeInfo.enterprise.enTel : '-'}}</span></p>
  56. <p>传真:<span>{{item.storeInfo.enterprise ? item.storeInfo.enterprise.enFax : '-'}}</span></p>
  57. <p>联系商家:<a @click="selectStoreInfo(item, $event)">点击查看</a></p>
  58. <i class="iconfont icon-shoucang" @click="cancelFocus('store', item, $event)"></i>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="detail-brand" v-bind:key="index" v-for="(item, index) in collectSave.content" v-if="activeType == 'comp'" @click="goComponentDetail(item.componentinfo.uuid)">
  63. <a>
  64. <div class="brand-item">
  65. <p>型号:<span>{{item.componentinfo.code}}</span></p>
  66. <p>品牌:<span>{{item.componentinfo.brand.nameCn}}</span></p>
  67. <p>产品描述:<span>{{item.componentinfo.kind.nameCn}}</span></p>
  68. <i class="iconfont icon-shoucang" @click="cancelFocus('product', item, $event)"></i>
  69. </div>
  70. </a>
  71. </div>
  72. <div class="none-state" v-if="(activeType != 'seek') && ((collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0))">
  73. <img src="/images/mobile/@2x/empty-collect.png">
  74. <p v-text="getRemindText()"></p>
  75. <nuxt-link to="/">返回首页</nuxt-link>
  76. </div>
  77. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  78. <div class="mobile-modal" v-if="showStoreInfo">
  79. <div class="mobile-modal-box">
  80. <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
  81. <div class="mobile-modal-content">
  82. <div v-if="checkInfo(storeInfo.enAddress || storeInfo.address)">商家地址:{{storeInfo.enAddress || storeInfo.address}}</div>
  83. <!--<div class="content-line link-url">在线咨询</div>-->
  84. <div v-if="checkInfo(storeInfo.enTel)">致电:<a :href="'tel:' + storeInfo.enTel" target="_blank" class="content-line link-url">{{storeInfo.enTel}}</a></div>
  85. <div v-if="checkInfo(storeInfo.enEmail)">邮件:<a :href="'mailto:' + storeInfo.enEmail" target="_blank" class="content-line link-url">{{storeInfo.enEmail}}</a></div>
  86. </div>
  87. </div>
  88. </div>
  89. <page-loading v-show="showLoading"></page-loading>
  90. <loading v-show="isSearchSearchingMore"></loading>
  91. <div v-if="purchaseManList && false"></div>
  92. <div v-if="purchaseManListFetching && false"></div>
  93. </div>
  94. </template>
  95. <script>
  96. import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
  97. import {RemindBox, Loading} from '~components/mobile/common'
  98. import PageLoading from '~components/common/loading/PageLoading.vue'
  99. export default {
  100. layout: 'mobile',
  101. middleware: 'authenticated',
  102. data () {
  103. return {
  104. userName: '',
  105. count: '',
  106. page: '',
  107. type: '',
  108. activeType: 'seek',
  109. collectResult: '取消成功',
  110. timeoutCount: 0,
  111. showStoreInfo: false,
  112. storeInfo: {},
  113. seekType: 'wait',
  114. showLoading: false,
  115. seekKeyword: '',
  116. isSearchSearchingMore: false,
  117. isChange: false,
  118. seekPage: 1,
  119. seekSize: 10,
  120. purchaseManListData: [],
  121. isDataChange: false,
  122. showEnterpriseToggle: false
  123. }
  124. },
  125. components: {
  126. RemindBox,
  127. SeekList,
  128. PageLoading,
  129. Loading
  130. },
  131. fetch ({ store, route }) {
  132. let user = store.state.option.user.data
  133. let isSaler = route.query.type === 'saler'
  134. let params = {
  135. pageNumber: 1,
  136. pageSize: 10,
  137. state: !isSaler ? 'todo' : null
  138. }
  139. if (!isSaler) {
  140. if (user.enterprise.uu) {
  141. params.enUU = user.enterprise.uu
  142. } else {
  143. params.userUU = user.userUU
  144. }
  145. } else {
  146. params.enuu = user.enterprise.uu
  147. params.useruu = user.userUU
  148. }
  149. // console.log(params)
  150. return Promise.all([
  151. store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
  152. store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 }),
  153. store.dispatch(route.query.type === 'saler' ? 'applyPurchase/loadVendorPushList' : 'applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
  154. ])
  155. },
  156. watch: {
  157. '$route.query': {
  158. handler: function (val, old) {
  159. this.switchSeek('wait')
  160. }
  161. }
  162. },
  163. mounted: function () {
  164. this.$nextTick(() => {
  165. window.addEventListener('scroll', this.scroll, false)
  166. document.body.addEventListener('click', () => {
  167. this.setShowEnterpriseToggle(false)
  168. }, false)
  169. })
  170. },
  171. methods: {
  172. // 切换当前企业
  173. switchEnterprise (en) {
  174. this.showEnterpriseToggle = false
  175. this.$http.get(`/user/authentication/${en.uu}`).then(() => {
  176. this.isChange = true
  177. this.$store.dispatch('loadUserInfo').then(() => {
  178. if (this.userType === 'saler') {
  179. this.$router.push('/mobile/user?type=buyer')
  180. } else {
  181. this.reloadData()
  182. }
  183. })
  184. })
  185. },
  186. setShowEnterpriseToggle (flag, e) {
  187. if (e) {
  188. e.stopPropagation()
  189. }
  190. this.showEnterpriseToggle = flag
  191. },
  192. cancelFocus: function (type, item, event) {
  193. event.stopPropagation()
  194. if (type === 'store') {
  195. this.$http.post('/trade/storeFocus/delete/storeId', [item.storeid])
  196. .then(response => {
  197. this.$store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 })
  198. this.timeoutCount++
  199. })
  200. } else {
  201. // /trade/collection/
  202. this.$http.delete('/trade/collection/' + item.id)
  203. .then(response => {
  204. this.$store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' })
  205. this.timeoutCount++
  206. })
  207. }
  208. },
  209. getBackground: function (type) {
  210. let url = ''
  211. if (type === 'AGENCY') {
  212. url += '/images/mobile/@2x/shop/agency.png'
  213. } else if (type === 'DISTRIBUTION') {
  214. url += '/images/mobile/@2x/shop/distribution.png'
  215. } else if (type === 'ORIGINAL_FACTORY') {
  216. url += '/images/mobile/@2x/shop/original_factory.png'
  217. } else if (type === 'CONSIGNMENT') {
  218. url = '/images/mobile/@2x/shop/consignment.png'
  219. }
  220. return url
  221. },
  222. goStoreDetail: function (uuid) {
  223. this.$router.push('/mobile/shop/' + uuid)
  224. },
  225. goComponentDetail: function (uuid) {
  226. this.$router.push('/mobile/brand/componentDetail/' + uuid)
  227. },
  228. getRemindText: function () {
  229. if (this.activeType === 'comp') {
  230. return '抱歉,暂无器件收藏'
  231. } else if (this.activeType === 'store') {
  232. return '抱歉,暂无店铺关注'
  233. }
  234. },
  235. selectStoreInfo: function (store, event) {
  236. event.stopPropagation()
  237. this.storeInfo = store.storeInfo.enterprise || {}
  238. this.showStoreInfo = true
  239. },
  240. checkInfo: function (str) {
  241. return str && str.trim() !== ''
  242. },
  243. switchSeek: function (type) {
  244. this.seekType = type
  245. this.showLoading = true
  246. this.seekKeyword = ''
  247. this.isChange = true
  248. this.seekPage = 1
  249. this.reloadData()
  250. },
  251. switchType: function () {
  252. this.activeType = 'seek'
  253. this.seekKeyword = ''
  254. this.$router.push('/mobile/user' + (this.userType === 'saler' ? '?type=buyer' : '?type=saler'))
  255. },
  256. searchSeek: function () {
  257. this.isChange = true
  258. this.reloadData()
  259. },
  260. reloadData: function () {
  261. let type = this.seekType
  262. let user = this.$store.state.option.user.data
  263. let params = {
  264. pageNumber: 1,
  265. pageSize: 10,
  266. keyword: this.seekKeyword || null
  267. }
  268. if (user.enterprise.uu) {
  269. params.enUU = user.enterprise.uu
  270. } else {
  271. params.userUU = user.userUU
  272. }
  273. if (this.userType !== 'saler') {
  274. if (type === 'wait') {
  275. params.state = 'todo'
  276. this.$store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
  277. } else if (type === 'done') {
  278. params._state = 'done'
  279. this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
  280. } else {
  281. params._state = 'done'
  282. this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
  283. }
  284. } else {
  285. if (type === 'wait') {
  286. this.$store.dispatch('applyPurchase/loadVendorPushList', {pageNumber: this.seekPage, pageSize: this.seekSize, enuu: this.user.data.enterprise.uu, useruu: this.user.data.userUU, keyword: this.seekKeyword})
  287. } else if (type === 'done') {
  288. this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
  289. } else {
  290. this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
  291. }
  292. }
  293. },
  294. scroll: function () {
  295. let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
  296. if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.seekPage < this.allPage) {
  297. this.getMoreSearch()
  298. }
  299. if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
  300. this.$refs.searchSeekInput.blur()
  301. }
  302. },
  303. blur: function() {
  304. setTimeout(() => {
  305. this.$store.dispatch('mobile/SetInputGetFocus', false)
  306. }, 300)
  307. },
  308. inputGetFocus: function() {
  309. setTimeout(() => {
  310. this.$store.dispatch('mobile/SetInputGetFocus', true)
  311. }, 300)
  312. },
  313. getMoreSearch: function () {
  314. this.seekPage++
  315. this.isSearchSearchingMore = true
  316. this.reloadData()
  317. }
  318. },
  319. computed: {
  320. collectSave () {
  321. return this.$store.state.product.common.collectList.data
  322. },
  323. userInfo () {
  324. return this.$store.state.option.user
  325. },
  326. enterpriseInfo () {
  327. if (this.userInfo.data.enterprises) {
  328. let ens = this.userInfo.data.enterprises.slice()
  329. if (ens && ens.length) {
  330. for (let i = 0; i < ens.length; i++) {
  331. if (ens[i].current) {
  332. return ens[i]
  333. }
  334. }
  335. }
  336. return {enName: this.userInfo.data.userName + '(个人账户)'}
  337. } else {
  338. return ''
  339. }
  340. },
  341. sortEnterprises () {
  342. if (this.user.data.enterprises) {
  343. let ens = this.user.data.enterprises.slice()
  344. if (ens && ens.length) {
  345. ens.sort(function (a, b) {
  346. return b.lastLoginTime - a.lastLoginTime
  347. })
  348. }
  349. return ens
  350. } else {
  351. return ''
  352. }
  353. },
  354. isVendor () {
  355. return this.enterpriseInfo.isVendor === 313
  356. },
  357. userType () {
  358. return this.$route.query.type
  359. },
  360. focusPage () {
  361. return this.$store.state.shop.storeInfo.focusPage.data
  362. },
  363. purchase () {
  364. return this.$store.state.applyPurchase.purchaseManList.purchaseManList
  365. },
  366. purchaseManList () {
  367. let list = this.purchase.data.content ? this.purchase.data.content.slice() : []
  368. if (this.isChange) {
  369. this.purchaseManListData = []
  370. this.seekPage = 1
  371. this.isChange = false
  372. this.isDataChange = true
  373. } else {
  374. this.purchaseManListData = this.purchaseManListData.concat(list)
  375. this.isSearchSearchingMore = false
  376. this.isDataChange = false
  377. }
  378. // console.log(this.purchaseManListData)
  379. return this.purchase.data.content
  380. },
  381. allPage () {
  382. return Math.floor(this.purchase.data.totalElements / this.purchase.data.size) + Math.floor(this.purchase.data.totalElements % this.purchase.data.size > 0 ? 1 : 0)
  383. },
  384. purchaseManListFetching () {
  385. this.showLoading = false
  386. return this.purchase.fetching
  387. }
  388. }
  389. }
  390. </script>
  391. <style scoped lang="scss">
  392. .user-content{
  393. margin-bottom: .98rem;
  394. .none-state{
  395. text-align: center;
  396. padding:1.5rem 0;
  397. background: #fff;
  398. margin-top:.1rem;
  399. width:100%;
  400. img{
  401. margin:0 auto;
  402. width: 4.08rem;
  403. height: 2.62rem;
  404. }
  405. p {
  406. font-size: .32rem;
  407. color: #999;
  408. margin: 1.19rem 0 0 0;
  409. }
  410. a {
  411. display: block;
  412. font-size: .28rem;
  413. color: #fff;
  414. width: 1.88rem;
  415. height: .54rem;
  416. line-height: .54rem;
  417. background: #418bf6;
  418. margin: .7rem auto 0;
  419. border-radius: .05rem;
  420. }
  421. }
  422. .user-name{
  423. height: 1.8rem;
  424. padding: .28rem 0 .28rem .34rem;
  425. background: #fff;
  426. width: 100%;
  427. position: relative;
  428. img{
  429. display: inline-block;
  430. width: 1.25rem;
  431. height: 1.25rem;
  432. border: 1px solid #c5dbfc;
  433. border-radius: .05rem;
  434. vertical-align: middle;
  435. }
  436. .user-info {
  437. margin-left:.25rem;
  438. display: inline-block;
  439. vertical-align: middle;
  440. position: relative;
  441. p{
  442. font-size:.3rem;
  443. margin:0;
  444. display: block;
  445. overflow: hidden;
  446. text-overflow: ellipsis;
  447. white-space: nowrap;
  448. max-width: 3.92rem;
  449. &:nth-child(2) {
  450. position: relative;
  451. margin-top: .2rem;
  452. padding-right: .7rem;
  453. a {
  454. position: absolute;
  455. right: 0;
  456. }
  457. }
  458. }
  459. .en-list {
  460. position: absolute;
  461. max-width: 8rem;
  462. max-height: 3rem;
  463. overflow-y: auto;
  464. border-radius: .05rem;
  465. .menu-item {
  466. height: .6rem;
  467. line-height: .6rem;
  468. font-size: .3rem;
  469. padding: 0 .2rem;
  470. overflow: hidden;
  471. white-space: nowrap;
  472. text-overflow: ellipsis;
  473. background: rgba(0, 0, 0, .6);
  474. &:active, &:focus, &:hover {
  475. background: #7d7d7d;
  476. }
  477. a {
  478. color: #fff;
  479. }
  480. }
  481. }
  482. }
  483. > a {
  484. font-size: .24rem;
  485. position: absolute;
  486. top: .45rem;
  487. right: .1rem;
  488. color: #3f84f6;
  489. border: 1px solid #3f84f6;
  490. border-radius: .2rem;
  491. padding: .06rem .12rem;
  492. }
  493. }
  494. .shop-list {
  495. background:#fff;
  496. border-bottom: .1rem solid #dfe2e4;
  497. padding: .14rem 0 .14rem 0;
  498. h3{
  499. font-size: .32rem;
  500. line-height: .4rem;
  501. margin: 0 0 0 .27rem;
  502. overflow: hidden;
  503. text-overflow: ellipsis;
  504. white-space: nowrap;
  505. padding-top: .1rem;
  506. position: relative;
  507. top: .1rem;
  508. }
  509. .list-item{
  510. width:6.77rem;
  511. margin-left:.39rem;
  512. .item-img{
  513. width:2.4rem;
  514. vertical-align: middle;
  515. display: inline-block;
  516. img{
  517. &:nth-child(2) {
  518. width:2.4rem;
  519. height:1.69rem;
  520. border: 1px solid #eee;
  521. }
  522. &:nth-child(1) {
  523. position:absolute;
  524. width:.65rem;
  525. height:.33rem;
  526. }
  527. }
  528. }
  529. .list-item-phone{
  530. width:3.95rem;
  531. padding:.18rem 0;
  532. position:relative;
  533. display: inline-block;
  534. vertical-align: middle;
  535. margin-left: .26rem;
  536. p{
  537. font-size:.28rem;
  538. line-height: .67rem;
  539. margin:0;
  540. overflow: hidden;
  541. text-overflow: ellipsis;
  542. white-space: nowrap;
  543. width: 3.2rem;
  544. }
  545. i{
  546. display:block;
  547. position:absolute;
  548. top: -.06rem;
  549. right: -.18rem;
  550. font-size:.5rem;
  551. color:#ff7800;
  552. width: .6rem;
  553. height: .6rem;
  554. text-align: center;
  555. line-height: .6rem;
  556. }
  557. }
  558. }
  559. &:active {
  560. background: #e1e1e1;
  561. }
  562. }
  563. .detail-brand{
  564. background: #fff;
  565. width:100%;
  566. min-height:1.5rem;
  567. padding:.2rem 0;
  568. border-bottom: .1rem solid #dfe2e4;
  569. &:nth-child(1) {
  570. margin-top:.1rem;
  571. }
  572. .brand-item{
  573. width:7rem;
  574. margin:0 auto;
  575. border-radius:.1rem;
  576. background: #fff;
  577. padding:.2rem;
  578. position:relative;
  579. &:active{
  580. background: #e1e1e1;
  581. }
  582. p{
  583. font-size:.28rem;
  584. line-height:.4rem;
  585. color:#333;
  586. margin:0;
  587. }
  588. i{
  589. display:block;
  590. position:absolute;
  591. top:.2rem;
  592. right:.1rem;
  593. font-size:.5rem;
  594. color:#ff7800;
  595. width: .6rem;
  596. height: .6rem;
  597. line-height: .6rem;
  598. text-align: center;
  599. }
  600. }
  601. div.active{
  602. background: #d4d;
  603. }
  604. }
  605. .collect-list-type {
  606. background: #fff;
  607. border-bottom: 1px solid #acacac;
  608. p {
  609. font-size: .32rem;
  610. margin: 0 0 0 .13rem;
  611. width: .92rem;
  612. text-align: center;
  613. line-height: .5rem;
  614. border-bottom: .06rem solid #418bf6;
  615. }
  616. }
  617. ul.switch-list {
  618. li {
  619. display: inline-block;
  620. width: 2.5rem;
  621. height: .63rem;
  622. line-height: .63rem;
  623. text-align: center;
  624. font-size: .28rem;
  625. color: #666;
  626. background: #fff;
  627. border: 1px solid #b4b4b4;
  628. border-right: none;
  629. &.active {
  630. background: #0067e7;
  631. border: 1px solid #0067e7;
  632. color: #fff;
  633. }
  634. &:first-child {
  635. border-left: none;
  636. }
  637. &:last-child {
  638. border-right: none;
  639. }
  640. }
  641. &.vendor-switch {
  642. li {
  643. width: 50%;
  644. }
  645. }
  646. }
  647. .seek {
  648. .seek-type {
  649. margin-top: .15rem;
  650. li {
  651. font-size: .28rem;
  652. color: #666;
  653. display: inline-block;
  654. width: 50%;
  655. text-align: center;
  656. div {
  657. border-bottom: 1px solid #c1c4c9;
  658. margin: 0 auto;
  659. height: .46rem;
  660. line-height: .46rem;
  661. }
  662. &.active {
  663. color: #3f84f6;
  664. div {
  665. border-color: #3f84f6;
  666. }
  667. }
  668. }
  669. }
  670. }
  671. .search-content {
  672. text-align: center;
  673. padding: .25rem 0 0 0;
  674. input {
  675. border: 1px solid #376ff3;
  676. }
  677. span {
  678. height: .46rem;
  679. line-height: .46rem;
  680. }
  681. }
  682. }
  683. </style>