newkeycode.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250
  1. <template>
  2. <div class="search-wrapper">
  3. <!-- 头部搜索 -->
  4. <div class="main-search-header">
  5. <input type="text" id="search-box" v-model="keyword" @keyup.13="onClickSearchHander()" :placeholder="placeholder" @input="changeKeyWord()">
  6. <span @click="onClickSearchHander()">搜索</span>
  7. <a @click="cancelSearchHander()">取消</a>
  8. <div class="main-search-header-controll clearfix">
  9. <div style="display: flex;align-items: center;justify-content: space-between;width:100%;">
  10. <div :class="ChooseTop === 'component' ? 'active' : ''" @click="setChangelistHander('component')"><a>型号</a></div>
  11. <div :class="ChooseTop === 'kind' ? 'active' : ''" @click="setChangelistHander('kind')"><a>物料名称</a></div>
  12. <div :class="ChooseTop === 'store' ? 'active' : ''" @click="setChangelistHander('store')"><a>卖家</a></div>
  13. <div :class="ChooseTop === 'brand' ? 'active' : ''" @click="setChangelistHander('brand')"><a>品牌</a></div>
  14. </div>
  15. </div>
  16. </div>
  17. <ul class="associate-list" v-show="associate.show" @click="associate.show = false">
  18. <li @click.stop="onAssociateClick(similar)" v-for="similar in similarKeywords.result">
  19. <i class="icon-sousuo iconfont"></i>
  20. <span>{{Getsimilar(similar)}}</span>
  21. <!--<span v-if="ChooseTop === 'component'">{{similar.code}}</span>-->
  22. <!--<span v-else-if="ChooseTop === 'product'">{{similar}}</span>-->
  23. <!--<span v-else-if="ChooseTop === 'store'">{{similar}}</span>-->
  24. <!--<span v-else-if="ChooseTop === 'brand'">{{similar.nameEn}}</span>-->
  25. </li>
  26. <li @click.stop="onClickTosearch(keyword)">查找“{{baseUtils.filterStringEllipsis(keyword, 30)}}”</li>
  27. </ul>
  28. <!-- 主体内容 -->
  29. <div class="main-search-wrapper">
  30. <div class="search-title">搜索“<span>{{displayKeyword}}</span>”为您找到{{allTotal}}条信息</div>
  31. <template v-if="allTotal > 0">
  32. <!-- 品牌精确查找 -->
  33. <template v-if="ChooseTop === 'brand' && brandIsAccurate">
  34. <div class="search-content" style="margin-bottom: 0.2rem;height: auto">
  35. <div class="middle">
  36. <div class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem;line-height: 0.8rem;">
  37. <img :src="'' || '/images/component/default.png'" class="pull-left">
  38. <div class="name pull-left overHidden" style="max-width: 5rem;">{{resourceList.brand && resourceList.brand.nameEn}}</div>
  39. </div>
  40. <div class="list">
  41. <div class="name">主打产品:</div>
  42. <div class="text">
  43. {{resourceList.brand && resourceList.brand.series}}
  44. </div>
  45. </div>
  46. <div class="list">
  47. <div class="name">应用领域:</div>
  48. <div class="text">
  49. {{resourceList.brand && resourceList.brand.application}}
  50. </div>
  51. </div>
  52. <div class="list">
  53. <div class="name">品牌介绍:</div>
  54. <div class="text">
  55. {{resourceList.brand && resourceList.brand.brief}}
  56. </div>
  57. </div>
  58. <div class="list">
  59. <div class="name" style="color:#4290f7">官网地址:</div>
  60. <div class="text" style="width: 4.5rem">
  61. <a :href="resourceList.brand && resourceList.brand.url" target="_blank">{{resourceList.brand && resourceList.brand.url}}</a>
  62. </div>
  63. <div class="pull-right lookMoreBtn" @click="showBrandDetails = true" style="color:#4290f7">
  64. 查看更多
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </template>
  70. <div class="search-nav clearfix" v-if="brandIsAccurate || (!brandIsAccurate && ChooseTop !== 'brand')">
  71. <span class="pull-left" :class="navType === 'hasStore' ? 'active' : ''" @click="getReloadList('hasStore')">
  72. {{ChooseTop === 'component' ? '现货': '现货卖家'}}({{stockallTotal}})条
  73. </span>
  74. <span class="pull-left" :class="navType === 'noHasStore' ? 'active' : ''" @click="getReloadList('noHasStore')">
  75. {{ChooseTop === 'component' ? '期货': '期货卖家'}}({{futuresallTotal}})条</span>
  76. </div>
  77. <div class="search-content" id="main-search-wrapper" :class="{'searchContent2' : ChooseTop === 'brand' && brandIsAccurate, 'searchContent3': ChooseTop === 'brand' && !brandIsAccurate}">
  78. <!-- 品牌模糊查询 -->
  79. <template v-if="!brandIsAccurate && ChooseTop === 'brand'">
  80. <div class="middle" v-for="item in resourceList.content">
  81. <div class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem;line-height: 0.8rem;" @click="goToBrandAccurate(item)">
  82. <img :src="item.logoUrl || '/images/component/default.png'" class="pull-left">
  83. <div class="name pull-left overHidden" style="max-width: 5rem;">{{item.nameEn}}</div>
  84. <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
  85. </div>
  86. <div class="list">
  87. <div class="name">主打产品:</div>
  88. <div class="text">
  89. {{item.series}}
  90. </div>
  91. </div>
  92. <div class="list">
  93. <div class="name">应用领域:</div>
  94. <div class="text">
  95. {{item.application}}
  96. </div>
  97. </div>
  98. <div class="list">
  99. <div class="name">品牌介绍:</div>
  100. <div class="text">
  101. {{item.brief}}
  102. </div>
  103. </div>
  104. <div class="list">
  105. <div class="name">官网地址:</div>
  106. <div class="text">
  107. <a :href="item.url" target="_blank">{{item.url}}</a>
  108. </div>
  109. </div>
  110. </div>
  111. </template>
  112. <!-- /end 品牌模糊查询 -->
  113. <template v-if="brandIsAccurate || (!brandIsAccurate && ChooseTop !== 'brand')">
  114. <!-- 现货 -->
  115. <template v-if="navType === 'hasStore'">
  116. <!-- 型号结果 -->
  117. <template v-if="ChooseTop === 'component'">
  118. <div v-if="resourceList&&resourceList.stock&&resourceList.stock.content.length > 0">
  119. <div v-for="(item, index) in resourceList.stock.content">
  120. <!--@click="goProductDetail(item)"-->
  121. <div class="middle">
  122. <div class="list">
  123. <div class="name">品牌:</div>
  124. <div class="text overHidden">{{item.brand && item.brand.nameEn || '-'}}</div>
  125. </div>
  126. <div class="list">
  127. <div class="name">物料名称(类目):</div>
  128. <div class="text overHidden">{{item.kindNameCn || '-'}}</div>
  129. </div>
  130. <div class="list">
  131. <div class="name">型号:</div>
  132. <div class="text overHidden">{{item.code || '-'}}</div>
  133. </div>
  134. <div class="list">
  135. <div class="name">规格:</div>
  136. <div class="text overHidden">{{item.spec || '-'}}</div>
  137. </div>
  138. <div class="list">
  139. <div class="fl">
  140. <div class="name">包装:</div>
  141. <div class="text overHidden" style="width: 2.3rem">{{item.packaging || '无包装信息'}}</div>
  142. </div>
  143. <div class="fl">
  144. <div class="name">交期(天):</div>
  145. <div class="text overHidden" style="width: 1.8rem" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
  146. <div class="text overHidden" style="width: 1.8rem" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
  147. </div>
  148. </div>
  149. <div class="list">
  150. <div class="fl">
  151. <div class="name">生产日期:</div>
  152. <div class="text overHidden" style="width: 1.75rem" :title="item.produceDate">{{item.produceDate || '-'}}</div>
  153. </div>
  154. <div class="fl">
  155. <div class="name">库存:</div>
  156. <div class="text overHidden" style="width: 2.3rem">{{item.reserve || '-'}}</div>
  157. </div>
  158. </div>
  159. <div class="list">
  160. <div class="fl" @click.stop="goAttach(item.attach)">
  161. <div class="name">规格书:</div>
  162. <div class="text">
  163. <i class="iconfont icon-pdf" :class="{'active': item.attach && item.attach !== '' && item.attach !== '1'}"></i>
  164. </div>
  165. </div>
  166. <div class="fl">
  167. <div class="name">起拍:</div>
  168. <div class="text overHidden" style="width: 2.3rem">{{item.minBuyQty || '-'}}</div>
  169. </div>
  170. </div>
  171. <div class="list">
  172. <div class="name">卖家名称:</div>
  173. <div class="text overHidden">{{item.storeName}}</div>
  174. </div>
  175. <div class="list">
  176. <div class="name left">价格梯度<p>(pcs):</p></div>
  177. <div class="table left">
  178. <ul>
  179. <li class="title">
  180. <div>分段数量/PCS</div>
  181. <div>分段单价</div>
  182. </li>
  183. <li v-for="price in item.prices">
  184. <div>{{price.start}}+</div>
  185. <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
  186. <div v-else>${{price.uSDPrice}}</div>
  187. </li>
  188. </ul>
  189. </div>
  190. </div>
  191. <div class="list clearfix">
  192. <div class="pull-left cancat" @click.stop="cancatSeller(item)">
  193. <i class="iconfont icon-kefu1"></i>联系卖家
  194. </div>
  195. <div class="pull-right clearfix">
  196. <div class="pull-left" @click="buy(item, false, $event)">加入购物车</div>
  197. <div class="pull-left" @click="buy(item, true, $event)">立即购买</div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </template>
  204. <!-- 卖家 物料名称 品牌-->
  205. <template v-else-if="ChooseTop === 'kind' || ChooseTop === 'store' || ChooseTop === 'brand'">
  206. <div v-if="resourceList&&resourceList.stock&&resourceList.stock.content.length > 0">
  207. <div class="middle" v-for="(item, index) in resourceList.stock.content">
  208. <nuxt-link :to="`/mobile/shop/${item.storeUuid}`" tag="div" class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem">
  209. <div class="name pull-left">{{item.enName}}</div>
  210. <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
  211. </nuxt-link>
  212. <div class="middle_bottom clearfix">
  213. <div class="middle_bottom-left">
  214. <img :src="item.storeLogoUrl || '/images/component/default.png'">
  215. </div>
  216. <div class="middle_bottom-left">
  217. <div class="middle_bottom-leftitem clearfix">
  218. <div class="bottom-title">电话</div><label style="float: left">:</label>
  219. <div class="overHidden" style="width: 3.9rem">
  220. <a :href="'tel:' + AlertstoreInfo.enterprise.enTel" target="_blank" class="content-line" style="color: #2d8cf0">{{item.enTel}}</a>
  221. </div>
  222. </div>
  223. <!--<div class="middle_bottom-leftitem clearfix">-->
  224. <!--<div class="bottom-title">邮箱</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enEmail}}</div>-->
  225. <!--</div>-->
  226. <div class="middle_bottom-leftitem clearfix">
  227. <div class="bottom-title">执照号</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enBusinesscode}}</div>
  228. </div>
  229. <div class="middle_bottom-leftitem clearfix">
  230. <div class="bottom-title">地址</div><label style="float: left">:</label><div style="width: 3.9rem;">{{item.enAddress}}</div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. </template>
  237. </template>
  238. <!-- 期货 -->
  239. <template v-else>
  240. <!-- 型号结果 -->
  241. <template v-if="ChooseTop === 'component'">
  242. <div v-if="resourceList && resourceList.futures && resourceList.futures.content.length > 0">
  243. <div class="middle" v-for="(item, index) in resourceList.futures.content">
  244. <div class="list">
  245. <div class="name">品牌:</div>
  246. <div class="text overHidden">{{item.brandNameEn || item.brand || '—'}}</div>
  247. </div>
  248. <div class="list">
  249. <div class="name">物料名称(类目):</div>
  250. <div class="text overHidden">{{item.kindNameCn || item.kind || '-'}}</div>
  251. </div>
  252. <div class="list">
  253. <div class="name">型号:</div>
  254. <div class="text overHidden">{{item.code || item.cmpCode || '-'}}</div>
  255. </div>
  256. <div class="list">
  257. <div class="name">规格:</div>
  258. <div class="text overHidden">{{item.spec || '-'}}</div>
  259. </div>
  260. <div class="list">
  261. <div class="name">单位:</div>
  262. <div class="text overHidden">{{item.unit || 'PCS'}}</div>
  263. </div>
  264. <div class="list clearfix" style="overflow: inherit;">
  265. <div class="fl">
  266. <div class="name">卖家:</div>
  267. <div class="text overHidden" style="width: 4rem">{{item.storeName || '卖家名称'}}</div>
  268. </div>
  269. <div class="pull-right sayPriBtn" @click="publish(item)">立即询价</div>
  270. </div>
  271. </div>
  272. </div>
  273. </template>
  274. <!-- 卖家 物料名称 品牌-->
  275. <template v-else-if="ChooseTop === 'kind' || ChooseTop === 'store' || ChooseTop === 'brand'">
  276. <div v-if="resourceList&&resourceList.futures &&resourceList.futures.content.length > 0">
  277. <div class="middle" v-for="(item, index) in resourceList.futures.content" @click="goSupplierDetail(item)">
  278. <div class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem">
  279. <div class="name pull-left">{{item.enName}}</div>
  280. <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
  281. </div>
  282. <div class="middle_bottom clearfix">
  283. <div class="middle_bottom-left">
  284. <img :src="item.storeLogoUrl || '/images/component/default.png'">
  285. </div>
  286. <div class="middle_bottom-left">
  287. <div class="middle_bottom-leftitem clearfix">
  288. <div class="bottom-title">电话</div><label style="float: left">:</label>
  289. <div class="overHidden" style="width: 3.9rem">
  290. <a :href="'tel:' + AlertstoreInfo.enterprise.enTel" target="_blank" class="content-line" style="color: #2d8cf0">{{item.enTel}}</a>
  291. </div>
  292. </div>
  293. <!--<div class="middle_bottom-leftitem clearfix">-->
  294. <!--<div class="bottom-title">邮箱</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enEmail}}</div>-->
  295. <!--</div>-->
  296. <div class="middle_bottom-leftitem clearfix">
  297. <div class="bottom-title">执照号</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enBusinesscode}}</div>
  298. </div>
  299. <div class="middle_bottom-leftitem clearfix">
  300. <div class="bottom-title">地址</div><label style="float: left">:</label><div style="width: 3.9rem;">{{item.enAddress}}</div>
  301. </div>
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. </template>
  307. </template>
  308. </template>
  309. </div>
  310. </template>
  311. <template v-if="allTotal === 0">
  312. <div class="none-state">
  313. <img src="/images/mobile/@2x/search-empty.png">
  314. <p>暂无数据</p>
  315. <nuxt-link to="/">返回首页</nuxt-link>
  316. </div>
  317. </template>
  318. </div>
  319. <!-- 联系卖买家 -->
  320. <div class="mobile-modal" v-if="showStoreInfo" @touchmove="preventTouchMove($event)">
  321. <div class="mobile-modal-box mobile-link-en">
  322. <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
  323. <div class="mobile-modal-content">
  324. <div v-if="AlertstoreInfo.enterprise.enTel"><span >电话:</span><a :href="'tel:' + AlertstoreInfo.enterprise.enTel" target="_blank" class="content-line link-url">{{AlertstoreInfo.enterprise.enTel}}</a></div>
  325. <div v-if="AlertstoreInfo.enterprise.enPhone"><span >手机:</span><a :href="'tel:' + AlertstoreInfo.enterprise.enPhone" target="_blank" class="content-line link-url">{{AlertstoreInfo.enterprise.enPhone}}</a></div>
  326. <div v-if="AlertstoreInfo.enterprise.enWeixin"><span >微信:</span><span class="content-line">{{AlertstoreInfo.enterprise.enWeixin}}</span></div>
  327. <div v-if="AlertstoreInfo.enterprise.enQQ"><span >Q&nbsp;Q:</span><span class="content-line">{{AlertstoreInfo.enterprise.enQQ}}</span></div>
  328. <div v-if="!empty">暂无联系方式</div>
  329. </div>
  330. </div>
  331. </div>
  332. <!-- 询价 -->
  333. <publish-supplier-seek :product="currentProduct" :showPublishBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="setRemindText"></publish-supplier-seek>
  334. <!-- 查看品牌更多信息 -->
  335. <modal-wrapper :showModal="showBrandDetails" :title="currentBrandItem.nameEn" @closeAction="showBrandDetails=false">
  336. <div class="store-info" >
  337. <div class="store-description">
  338. <h4>主营产品</h4>
  339. <p class="content" v-if="currentBrandItem.series">
  340. {{currentBrandItem.series}}
  341. </p>
  342. <div class="com-none-state" v-else>
  343. <p>抱歉,暂无主营产品信息</p>
  344. </div>
  345. </div>
  346. <div class="store-description">
  347. <h4>应用领域</h4>
  348. <p class="content" v-if="currentBrandItem.application">
  349. {{currentBrandItem.application}}
  350. </p>
  351. <div class="com-none-state" v-else>
  352. <p>抱歉,暂无应用领域信息</p>
  353. </div>
  354. </div>
  355. <div class="store-description">
  356. <h4>品牌介绍</h4>
  357. <p class="content" v-if="currentBrandItem.brief">
  358. {{currentBrandItem.brief}}
  359. </p>
  360. <div class="com-none-state" v-else>
  361. <p>抱歉,暂无企业介绍</p>
  362. </div>
  363. </div>
  364. <div class="contact-info">
  365. <h4>联系我们</h4>
  366. <ul class="list-unstyled clearfix">
  367. <li>
  368. <div>电&nbsp;&nbsp;话:</div>
  369. <div v-if="currentBrandItem.userDefine.userTel"><a :href="'tel:' + currentBrandItem.userDefine.userTel" >{{currentBrandItem.userDefine.userTel}}</a></div>
  370. <div v-else><span>-</span></div>
  371. </li>
  372. <!-- <li>
  373. <div>店铺地址:</div>
  374. <div v-if="store.enterprise.address">{{store.enterprise.address}}</div>
  375. <div v-else><span>-</span></div>
  376. </li>-->
  377. </ul>
  378. </div>
  379. </div>
  380. </modal-wrapper>
  381. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  382. <!--<loading v-if="isSearchSearchingMore"></loading>-->
  383. <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox" :url="url"></login-box>
  384. <pull-up v-if="addShowPullup" :fixId="'main-search-wrapper'" :searchMore="isSearchSearchingMore" :allPage="allPage" :page="page" @pullUpAction="onPullUp" :FixedEl="true"></pull-up>
  385. </div>
  386. </template>
  387. <script>
  388. import { PublishSupplierSeek } from '~components/mobile/applyPurchase'
  389. import { RemindBox, Loading, LoginBox, PullUp } from '~components/mobile/common'
  390. import { ModalWrapper } from '~components/mobile/base'
  391. import axios from '~plugins/axios'
  392. export default {
  393. layout: 'mobile',
  394. data() {
  395. return {
  396. collectResult: '', // 提示性文字
  397. timeoutCount: 0, // 弹出框计时数
  398. isSearchSearchingMore: false, // 是否正在请求数据
  399. showLoginBox: false, // 是否显示登录弹窗
  400. url: '', // 登录后跳转回来的地址
  401. keyword: '', // 关键字搜索
  402. showStoreInfo: false, // 联系买卖家弹窗
  403. AlertstoreInfo: { // 买卖家弹窗信息
  404. enterprise: {}
  405. },
  406. navType: 'hasStore', // 现货 期货
  407. ChooseTop: 'component', // 型号, 物料名称, 卖家, 品牌
  408. page: 1,
  409. currentProduct: {},
  410. currentBrandItem: { // 查看品牌详情信息
  411. userDefine: {}
  412. }, // 存放当前点击的品牌内容
  413. showBrandDetails: false, // 是否展示品牌详情
  414. brandIsAccurate: false, // 品牌是否处于精确查找
  415. showPublishBox: false, // 询价弹窗
  416. resourceList: [],
  417. futuresallTotal: 0,
  418. stockallTotal: 0,
  419. allPage: 0, // 总页数
  420. allTotal: 0, // 总条数
  421. associate: {
  422. show: false
  423. },
  424. displayKeyword: '',
  425. addShowPullup: true
  426. }
  427. },
  428. computed: {
  429. getNowChooseType() {
  430. if (this.ChooseTop === 'component') {
  431. return '型号'
  432. } else if (this.ChooseTop === 'kind') {
  433. return '物料'
  434. } else if (this.ChooseTop === 'store') {
  435. return '卖家'
  436. } else if (this.ChooseTop === 'brand') {
  437. return '品牌'
  438. }
  439. },
  440. empty () {
  441. return this.checkInfo(this.AlertstoreInfo.enterprise.enTel) || this.checkInfo(this.AlertstoreInfo.enterprise.enPhone) || this.checkInfo(this.AlertstoreInfo.enterprise.enWeixin) || this.checkInfo(this.AlertstoreInfo.enterprise.enQQ)
  442. },
  443. placeholder() {
  444. if (this.ChooseTop === 'component') {
  445. return '请输入您要搜索的型号'
  446. } else if (this.ChooseTop === 'kind') {
  447. return '请输入您要搜索的物料名称'
  448. } else if (this.ChooseTop === 'store') {
  449. return '请输入您要搜索的卖家名称'
  450. } else if (this.ChooseTop === 'brand') {
  451. return '请输入您要搜索的品牌'
  452. }
  453. },
  454. similarKeywords () {
  455. return this.$store.state.search.keywords.data
  456. }
  457. },
  458. async asyncData({store, route}) {
  459. let ChooseTop = route.query.choosetype || 'component'
  460. let keyword = route.query.keyword || ''
  461. let brandIsAccurate = false
  462. let { data } = await axios.get(`/search/201819`, {params: {count: 10, page: 1, keyword: keyword, type: ChooseTop}})
  463. let allTotal = 0
  464. let futuresallTotal = data.futures ? data.futures.total : 0
  465. let stockallTotal = data.stock ? data.stock.total : 0
  466. let allPage = 0
  467. let currentBrandItem = {
  468. userDefine: {}
  469. }
  470. if (ChooseTop === 'brand') {
  471. if (data.futures && data.stock) {
  472. // 品牌查询 精准查找
  473. brandIsAccurate = true
  474. currentBrandItem = data.brand
  475. // 则总条数等于 现货 + 期货
  476. allTotal = stockallTotal + futuresallTotal
  477. allPage = Math.ceil(data.stock.total / 10)
  478. } else {
  479. allTotal = data.total || 0
  480. allPage = Math.ceil(data.total / 10)
  481. }
  482. } else {
  483. // 其他情况
  484. allTotal = stockallTotal + futuresallTotal
  485. allPage = Math.ceil(data.stock.total / 10)
  486. }
  487. return {
  488. ChooseTop: ChooseTop,
  489. keyword: keyword,
  490. resourceList: data,
  491. allPage: allPage,
  492. stockallTotal: stockallTotal,
  493. futuresallTotal: futuresallTotal,
  494. allTotal: allTotal,
  495. brandIsAccurate: brandIsAccurate,
  496. currentBrandItem: currentBrandItem,
  497. displayKeyword: keyword
  498. }
  499. },
  500. methods: {
  501. onPullUp() {
  502. this.page++
  503. this.ReloadList()
  504. },
  505. // 搜索点击事件
  506. onClickSearchHander() {
  507. if (!this.keyword) return
  508. this.$router.push(`/mobile/search/newkeycode?choosetype=${this.ChooseTop}&keyword=${this.keyword}`)
  509. // this.setChangelistHander(this.ChooseTop)
  510. // window.location.href =
  511. },
  512. // 现货 期货切换
  513. getReloadList(_tp) {
  514. this.navType = _tp
  515. this.page = 1
  516. this.resourceList.futures.content = []
  517. this.resourceList.stock.content = []
  518. this.ReloadList()
  519. },
  520. // 刷新数据
  521. ReloadList(param) {
  522. // 如果有值,则代表 是品牌 模糊到精确
  523. // 这里发送数据请求
  524. this.isSearchSearchingMore = true
  525. this.$http.get(`/search/201819`, {params: {count: 10, page: this.page, keyword: this.keyword, type: this.ChooseTop}}).then(res => {
  526. this.isSearchSearchingMore = false
  527. if (!this.brandIsAccurate && this.ChooseTop === 'brand') {
  528. // 品牌模糊查询
  529. this.resourceList.content = [...this.resourceList.content, ...res.data.content]
  530. return
  531. }
  532. if (this.navType === 'hasStore') {
  533. this.resourceList.stock.content = [...this.resourceList.stock.content, ...res.data.stock.content]
  534. this.allPage = Math.ceil(res.data.stock.total / 10) || 0
  535. } else {
  536. this.resourceList.futures.content = [...this.resourceList.futures.content, ...res.data.futures.content]
  537. this.allPage = Math.ceil(res.data.futures.total / 10) || 0
  538. }
  539. }, err => {
  540. this.isSearchSearchingMore = false
  541. })
  542. },
  543. // 模糊品牌查询结果点击
  544. goToBrandAccurate(item) {
  545. this.currentBrandItem = item
  546. this.keyword = item.nameEn
  547. this.setChangelistHander(this.ChooseTop)
  548. },
  549. // 取消返回事件
  550. cancelSearchHander() {
  551. this.$router.replace('/')
  552. },
  553. // 购买 加入购物车
  554. buy: function (item, flag, e) {
  555. this.baseUtils.buyOrCar(flag, e, this, item, '/mobile/center/user/pay/')
  556. },
  557. // 联系买卖家
  558. cancatSeller(item) {
  559. this.$http.get(`/api/store-service/stores?uuid=${item.storeid}`).then(res => {
  560. this.AlertstoreInfo = res.data
  561. this.showStoreInfo = true
  562. })
  563. },
  564. // 切换顶部一级标题
  565. setChangelistHander(str) {
  566. this.addShowPullup = false
  567. if (document.querySelector('#main-search-wrapper')) document.querySelector('#main-search-wrapper').scrollTop = 0
  568. this.ChooseTop = str
  569. this.page = 1
  570. if (!this.keyword) return
  571. this.displayKeyword = this.keyword
  572. this.brandIsAccurate = false
  573. this.isSearchSearchingMore = true
  574. this.$http.get(`/search/201819`, {params: {count: 10, page: 1, keyword: this.keyword, type: this.ChooseTop}}).then(data => {
  575. data = data.data
  576. this.resourceList = data
  577. this.futuresallTotal = data.futures ? data.futures.total : 0
  578. this.stockallTotal = data.stock ? data.stock.total : 0
  579. let allTotal = 0 // 总条数
  580. if (this.ChooseTop === 'brand') {
  581. if (data.futures && data.stock) {
  582. // 品牌查询 精准查找
  583. this.brandIsAccurate = true
  584. // 则总条数等于 现货 + 期货
  585. allTotal = this.stockallTotal + this.futuresallTotal
  586. this.currentBrandItem = data.brand
  587. } else {
  588. allTotal = data.total || 0
  589. }
  590. } else {
  591. // 其他情况
  592. allTotal = this.stockallTotal + this.futuresallTotal
  593. }
  594. this.allTotal = allTotal
  595. this.isSearchSearchingMore = false
  596. if (!this.brandIsAccurate && this.ChooseTop === 'brand') {
  597. // 品牌 模糊查找
  598. this.allPage = Math.ceil(this.resourceList.total / 10) || 0
  599. } else {
  600. if (this.navType === 'hasStore') {
  601. this.allPage = this.resourceList.stock && Math.ceil(this.resourceList.stock.total / 10) || 0
  602. } else {
  603. this.allPage = this.resourceList.futures && Math.ceil(this.resourceList.futures.total / 10) || 0
  604. }
  605. }
  606. this.associate.show = false
  607. this.addShowPullup = true
  608. })
  609. },
  610. // 供应商详情
  611. goSupplierDetail: function (item) {
  612. this.$http.get('/vendor/introduction/product/count', {params: {vendUU: item.enUU}})
  613. .then(response => {
  614. if (response.data.success && response.data.count > 0) {
  615. this.$router.push(`/mobile/supplier/detail/${item.enUU}?isStore=${item.isStore}`)
  616. } else {
  617. this.setRemindText('供应商正在完善产品信息,暂时不能查看更多。')
  618. }
  619. })
  620. },
  621. checkInfo: function (str) {
  622. return str && str.trim() !== ''
  623. },
  624. publish: function (product) {
  625. if (this.user.logged) {
  626. let item = {
  627. cmpCode: product.cmpCode,
  628. pbranden: product.brand,
  629. brand: product.brand,
  630. spec: product.spec,
  631. kind: product.cmpCode
  632. }
  633. console.log(item)
  634. console.log(product)
  635. this.currentProduct = item
  636. this.showPublishBox = true
  637. } else {
  638. this.url = this.$route.fullPath
  639. this.showLoginBox = true
  640. }
  641. },
  642. setRemindText(str) {
  643. this.timeoutCount++
  644. this.collectResult = str
  645. },
  646. onAssociateClick (word) {
  647. if (this.ChooseTop === 'component') {
  648. this.keyword = word.code
  649. } else if (this.ChooseTop === 'kind') {
  650. this.keyword = word.nameCn
  651. } else if (this.ChooseTop === 'store') {
  652. this.keyword = word.name
  653. } else if (this.ChooseTop === 'brand') {
  654. this.keyword = word.nameEn
  655. }
  656. this.associate.show = false
  657. this.setChangelistHander(this.ChooseTop)
  658. },
  659. Getsimilar(word) {
  660. if (this.ChooseTop === 'component') {
  661. return word.code
  662. } else if (this.ChooseTop === 'kind') {
  663. return word.nameCn
  664. } else if (this.ChooseTop === 'store') {
  665. return word.name
  666. } else if (this.ChooseTop === 'brand') {
  667. return word.nameEn
  668. }
  669. },
  670. onChange () {
  671. if (!this.keyword) {
  672. this.associate.show = false
  673. this.$store.dispatch('resetSearchKeywords')
  674. } else {
  675. this.searchKeywords()
  676. }
  677. },
  678. changeKeyWord() {
  679. this.associate.show = true
  680. this.onChange()
  681. },
  682. searchKeywords () {
  683. this.$store.dispatch('searchKeywords', {keyword: this.keyword, type: this.ChooseTop})
  684. },
  685. onClickTosearch(str) {
  686. this.keyword = str
  687. this.setChangelistHander(this.ChooseTop)
  688. }
  689. },
  690. components: {
  691. RemindBox,
  692. Loading,
  693. LoginBox,
  694. PublishSupplierSeek,
  695. ModalWrapper,
  696. PullUp
  697. },
  698. watch: {
  699. '$route' (to, from) {
  700. this.keyword = to.query.keyword
  701. this.displayKeyword = to.query.keyword
  702. this.setChangelistHander(to.query.choosetype)
  703. }
  704. }
  705. }
  706. </script>
  707. <style lang="scss" scoped>
  708. @mixin overFlowHidden {
  709. overflow: hidden;
  710. text-overflow: ellipsis;
  711. white-space: nowrap;
  712. }
  713. @mixin lineHeight($value) {
  714. height: $value;
  715. line-height: $value;
  716. }
  717. .search-wrapper {
  718. background: #f1f3f6;
  719. width: 100%;
  720. position: fixed;
  721. z-index: 1000;
  722. top: 0;
  723. bottom: 0;
  724. .main-search-header {
  725. position: absolute;
  726. background: #3e82f5;
  727. line-height: .88rem;
  728. margin-top: 0;
  729. z-index: 1;
  730. width: 100%;
  731. input {
  732. width: 4.88rem;
  733. height: .62rem;
  734. line-height: .62rem;
  735. font-size: .26rem;
  736. color: #333;
  737. margin-left: 0.3rem;
  738. /*padding-left: 1.26rem;*/
  739. border: .04rem solid #fff;
  740. background: #fff;
  741. outline: none;
  742. border-radius: 0;
  743. float: left;
  744. margin-top: .12rem;
  745. -webkit-appearance: none;
  746. border-top-left-radius: .14rem;
  747. border-bottom-left-radius: .14rem;
  748. }
  749. span {
  750. display: inline-block;
  751. width: 1.02rem;
  752. text-align: center;
  753. height: .62rem;
  754. line-height: .62rem;
  755. color: #366df3;
  756. font-size: .28rem;
  757. margin-left: .02rem;
  758. border-top-right-radius: .14rem;
  759. border-bottom-right-radius: .14rem;
  760. background: #fff;
  761. float: left;
  762. margin-top: .12rem;
  763. }
  764. a {
  765. font-size: .28rem;
  766. color: #fff;
  767. margin-left: .2rem;
  768. }
  769. .main-search-header-controll {
  770. background: #3e82f5;
  771. width: 5.9rem;
  772. margin-left: 0.3rem;
  773. div {
  774. @include lineHeight(0.66rem);
  775. font-size: 0.28rem;
  776. color: #fff;
  777. margin: 0;
  778. background: rgba(0,0,0,0);
  779. border-radius: 0;
  780. &.active a {
  781. color: #fff;
  782. border-bottom: 0.02rem solid #fff;
  783. }
  784. a {
  785. margin-left: 0 !important;
  786. }
  787. }
  788. }
  789. }
  790. .main-search-wrapper {
  791. margin-top: 1.71rem;
  792. }
  793. .search-title {
  794. font-size: 0.26rem;
  795. text-align: center;
  796. color: #999;
  797. margin: 0 auto 0.2rem;
  798. span {
  799. color: #4290f7
  800. }
  801. }
  802. .search-nav {
  803. background: #fff;
  804. @include lineHeight(1rem);
  805. padding: 0 0.2rem;
  806. span {
  807. width: 50%;
  808. color: #666;
  809. font-size: 0.28rem;
  810. text-align: center;
  811. border-bottom: 0.04rem solid #dcdcdc;
  812. @include lineHeight(0.7rem);
  813. margin-top: 0.15rem;
  814. &.active {
  815. border-bottom: 0.04rem solid #4290f7;
  816. color: #4290f7
  817. }
  818. }
  819. }
  820. .search-content {
  821. padding-top: 0;
  822. margin-top: 0.2rem;
  823. height: calc(100vh - 3.41rem);
  824. overflow-y: auto;
  825. position: absolute;
  826. width: 100%;
  827. bottom: 0;
  828. .middle {
  829. background: #fff;
  830. padding: 0.2rem;
  831. .lookMoreBtn {
  832. font-size: 0.28rem;
  833. color: #2d8cf0
  834. }
  835. .more_icon {
  836. font-size: 0.34rem;
  837. color: #999;
  838. }
  839. .order-tag {
  840. display: inline-block;
  841. font-size: .18rem;
  842. color: #fff;
  843. font-weight: bold;
  844. background: #ee1717;
  845. height: .27rem;
  846. width: .27rem;
  847. line-height: .27rem;
  848. text-align: center;
  849. border-radius: .05rem;
  850. position: relative;
  851. top: -.05rem;
  852. margin-right: .05rem;
  853. &.reserve-tag {
  854. background: #07bb1c;
  855. }
  856. }
  857. text-align: left;
  858. background: #fff;
  859. /*border-radius: 5px;*/
  860. margin-bottom: 0.2rem;
  861. .overHidden {
  862. @include overFlowHidden()
  863. }
  864. .pms {
  865. color: #f57710;
  866. border: 1px solid #f57710;
  867. border-radius: 0.4rem;
  868. background: #fff;
  869. font-size: 0.24rem;
  870. height: 0.4rem;
  871. line-height: 0.4rem;
  872. width: 0.8rem;
  873. text-align: center;
  874. }
  875. .list {
  876. @include overFlowHidden();
  877. width: 100%;
  878. .left {
  879. float: left;
  880. overflow: hidden;
  881. text-overflow: ellipsis;
  882. white-space: nowrap;
  883. }
  884. .textinfo {
  885. font-size: 0.18rem;
  886. margin-left: 0.1rem;
  887. display: inline-block;
  888. background: #3f84f6;
  889. color: #fff;
  890. font-weight: bold;
  891. border-radius: 3px;
  892. width: 0.8rem;
  893. height: 0.32rem;
  894. line-height: 0.32rem;
  895. text-align: center
  896. }
  897. .button {
  898. font-size: 0.3rem;
  899. color: #1a58dd;
  900. width: 0.92rem;
  901. height: 0.43rem;
  902. line-height: 0.43rem;
  903. text-align: center;
  904. border-radius: 5px;
  905. border:1px solid #1a58dd;
  906. display: inline-block;
  907. margin-right: 0.2rem;
  908. }
  909. margin-bottom: 0.18rem;
  910. &::after{
  911. clear: both;
  912. display: block;
  913. content: ' ';
  914. visibility: hidden;
  915. zoom: 1;
  916. }
  917. .fl {
  918. width: 3.5rem;
  919. float: left;
  920. }
  921. .fr {
  922. text-align: left;
  923. width: 2.6rem;
  924. overflow: hidden;
  925. text-overflow: ellipsis;
  926. white-space: nowrap;
  927. }
  928. &.list-long {
  929. .fl {
  930. width: 100% !important;
  931. }
  932. }
  933. .name {
  934. color: #666;
  935. font-size: 0.28rem;
  936. display: inline-block;
  937. }
  938. .text {
  939. display: inline-block;
  940. color: #333;
  941. font-size: 0.28rem;
  942. vertical-align: top;
  943. width: 5.5rem;
  944. @include overFlowHidden();
  945. }
  946. .table {
  947. width: 5.85rem;
  948. margin-bottom: 0;
  949. margin-top: 0;
  950. margin-left: 0.1rem;
  951. li {
  952. height: 0.43rem;
  953. line-height: 0.43rem;
  954. border-left: .01rem solid #c5c5c5;
  955. font-size: .28rem;
  956. &::after {
  957. clear: both;
  958. display: block;
  959. content: ' ';
  960. visibility: hidden;
  961. zoom: 1;
  962. }
  963. div {
  964. text-align: center;
  965. width: 50%;
  966. float: left;
  967. border-right: .01rem solid #c5c5c5;
  968. border-bottom: .01rem solid #c5c5c5;
  969. }
  970. &:nth-child(odd) {
  971. background: #ddd;
  972. color: #333;
  973. font-size: 0.28rem;
  974. }
  975. &:nth-child(even) {
  976. background: #fcfcfc;
  977. color: #333;
  978. font-size: 0.28rem;
  979. }
  980. &:nth-last-of-type(1){
  981. color: #f31919;
  982. }
  983. &.title {
  984. font-size: 0.28rem;
  985. color: #333;
  986. }
  987. }
  988. }
  989. .pull-right {
  990. div {
  991. color: #3f84f6;
  992. font-size: 0.28rem;
  993. border-radius: 0.07rem;
  994. border: 1px solid #3f84f6;
  995. background: #fff;
  996. width: 2rem;
  997. line-height: 0.56rem;
  998. height: 0.56rem;
  999. text-align: center;
  1000. }
  1001. div:last-child {
  1002. margin-left: 0.2rem;
  1003. color: #fff;
  1004. background: #3f84f6;
  1005. }
  1006. }
  1007. i {
  1008. &.icon-pdf {
  1009. color: #929292;
  1010. font-size: 0.4rem;
  1011. }
  1012. &.active {
  1013. color: #eb062b;
  1014. }
  1015. }
  1016. .cancat {
  1017. height: 0.56rem;
  1018. line-height: 0.56rem;
  1019. border: 1px solid #3f84f6;
  1020. color: #3f84f6;
  1021. font-size: 0.26rem;
  1022. text-align: center;
  1023. border-radius: 3px;
  1024. padding: 0 0.1rem;
  1025. overflow: hidden;
  1026. width: auto;
  1027. }
  1028. img.pull-left {
  1029. width: 1.21rem;
  1030. height: 0.8rem;
  1031. border: 1px solid #dcdcdc;
  1032. border-radius: 0.07rem;
  1033. margin-top: 0;
  1034. }
  1035. }
  1036. .sayPriBtn {
  1037. width: 2rem;
  1038. @include lineHeight(0.54rem);
  1039. color: #fff;
  1040. font-size: 0.28rem;
  1041. background: #3f84f6;
  1042. border-radius: 3px;
  1043. text-align: center;
  1044. margin-top: -0.1rem;
  1045. }
  1046. .middle_bottom {
  1047. .middle_bottom-left {
  1048. float: left;
  1049. img {
  1050. width: 1.21rem;
  1051. height: 1.21rem;
  1052. border: 1px solid #4290f7;
  1053. border-radius: 0.07rem;
  1054. overflow: hidden;
  1055. }
  1056. div.middle_bottom-leftitem {
  1057. line-height: 0.5rem;
  1058. font-size: 0.28rem;
  1059. div {
  1060. display: inline-block;
  1061. color: #666;
  1062. height: 100%;
  1063. float: left;
  1064. &.bottom-title {
  1065. display: inline-block;
  1066. text-align: justify;
  1067. vertical-align: top;
  1068. width: 1.5rem;
  1069. height: 0.5rem;
  1070. &::after {
  1071. content: "";
  1072. display: inline-block;
  1073. width: 100%;
  1074. overflow: hidden;
  1075. height: 0;
  1076. }
  1077. }
  1078. }
  1079. }
  1080. }
  1081. }
  1082. }
  1083. }
  1084. .searchContent2 {
  1085. height: calc(100vh - 7.3rem);
  1086. }
  1087. .searchContent3 {
  1088. height: calc(100vh - 2.25rem);
  1089. }
  1090. .store-info {
  1091. background: #f7f7f7;
  1092. h4{
  1093. width: 100%;
  1094. text-align: left;
  1095. font-size: 0.3rem;
  1096. line-height: 0.6rem;
  1097. height: 0.6rem;
  1098. letter-spacing: 0px;
  1099. color: #333;
  1100. font-weight: normal;
  1101. border-bottom: 1px solid #efeded;
  1102. padding-left: 0.11rem;
  1103. &:before{
  1104. content: '';
  1105. display: inline-block;
  1106. width: 0.08rem;
  1107. height: 0.26rem;
  1108. background-color: #145dee;
  1109. margin-right: 0.13rem;
  1110. position: relative;
  1111. top: 0.02rem;
  1112. }
  1113. }
  1114. .contact-info{
  1115. background: #fff;
  1116. margin: .2rem auto;
  1117. border-radius: .1rem;
  1118. ul{
  1119. padding: 0.22rem 0rem;
  1120. li{
  1121. div{
  1122. float: left;
  1123. font-size: .28rem;
  1124. color: #666;
  1125. line-height: .53rem;
  1126. width:80%;
  1127. text-align: left;
  1128. &:first-child{
  1129. width: 20%;
  1130. padding-left: 0.36rem;
  1131. text-align: justify;
  1132. }
  1133. a{
  1134. color: #145dee;
  1135. }
  1136. .click-tel, .click-phone{
  1137. color: #f44336;
  1138. }
  1139. }
  1140. /* &:last-child{
  1141. div{
  1142. width: 74%;
  1143. padding-right:.34rem;
  1144. word-wrap: break-word;
  1145. &:first-child{
  1146. text-align: left;
  1147. padding: 0rem 0rem 0rem .36rem;
  1148. width: 26%;
  1149. }
  1150. }
  1151. }*/
  1152. }
  1153. }
  1154. }
  1155. .store-description{
  1156. background: #fff;
  1157. /*width: 6.96rem;*/
  1158. margin: 0 auto .2rem;
  1159. border-radius: .1rem;
  1160. .content {
  1161. text-indent:2em;
  1162. background: #fff;
  1163. margin: .2rem auto 0;
  1164. padding: .04rem .34rem .4rem .34rem;
  1165. width: 100%;
  1166. font-size: .28rem;
  1167. color: #666;
  1168. text-align: left;
  1169. height: 95%;
  1170. /*box-shadow: 0 .03rem .01rem 0 #cdcbcb96;*/
  1171. line-height: .5rem;
  1172. word-break: break-all;
  1173. }
  1174. }
  1175. }
  1176. .none-state{
  1177. text-align: center;
  1178. padding:1.5rem 0;
  1179. background: #fff;
  1180. margin-top:.1rem;
  1181. width:100%;
  1182. img{
  1183. margin:0 auto;
  1184. width: 4.08rem;
  1185. height: 2.62rem;
  1186. }
  1187. p {
  1188. font-size: .32rem;
  1189. color: #999;
  1190. margin: 1.19rem 0 0 0;
  1191. }
  1192. a {
  1193. display: block;
  1194. font-size: .28rem;
  1195. color: #fff;
  1196. width: 1.88rem;
  1197. height: .54rem;
  1198. line-height: .54rem;
  1199. background: #418bf6;
  1200. margin: .7rem auto 0;
  1201. border-radius: .05rem;
  1202. }
  1203. }
  1204. .associate-list {
  1205. position: absolute;
  1206. width: 100%;
  1207. background: #fff;
  1208. top: 0.8rem;
  1209. border: 1px solid #dcdcdc;
  1210. z-index: 100;
  1211. height: 100%;
  1212. left: 0;
  1213. bottom: 0;
  1214. right: 0;
  1215. li {
  1216. height: 0.7rem;
  1217. line-height: .9rem;
  1218. margin: 0 .45rem;
  1219. border-bottom: .04rem solid #f1f0f0;
  1220. @include overFlowHidden();
  1221. i {
  1222. font-size: .36rem;
  1223. margin-right: .24rem;
  1224. color: #ddd;
  1225. }
  1226. span {
  1227. color: #999;
  1228. font-size: .28rem;
  1229. line-height: .58rem;
  1230. height: .58rem;
  1231. display: inline-block;
  1232. }
  1233. &:active, &:hover {
  1234. background: #eee;
  1235. }
  1236. &:last-child {
  1237. text-align: center;
  1238. font-size: .3rem;
  1239. color: #3976f4;
  1240. border-bottom: none;
  1241. &:active, &:hover {
  1242. background: #fff;
  1243. }
  1244. }
  1245. }
  1246. }
  1247. }
  1248. </style>