newkeycode.vue 47 KB

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