lookup.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. <template>
  2. <view class="content">
  3. <view style='background:#fff;display:flex;' class="cu-bar search">
  4. <view style='flex:6;' class="search-form round Medium">
  5. <text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
  6. <input type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()"
  7. @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
  8. </view>
  9. <view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
  10. <u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34" name="close-circle-fill" color="#D6D9E0"></u-icon>
  11. <!-- <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text> -->
  12. </view>
  13. <!-- mSearch组件 如果使用原样式,删除组件元素-->
  14. <!-- <mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword" @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch> -->
  15. <!-- 原样式 如果使用原样式,恢复下方注销代码 -->
  16. <!--
  17. <view class="input-box">
  18. <input type="text" :placeholder="defaultKeyword" @input="inputChange" v-model="keyword" @confirm="doSearch(false)"
  19. placeholder-class="placeholder-class" confirm-type="search">
  20. </view>
  21. <view class="search-btn" @tap="doSearch(false)">搜索</view>
  22. -->
  23. <!-- 原样式 end -->
  24. <view class="search-keyword" @touchstart="blur">
  25. <scroll-view style='background:#F5F6FA;' class="keyword-list-box"
  26. v-show="isShowKeywordList&&keywordList.length>0" scroll-y>
  27. <view style='background:#fff;padding:0 15px;border-radius:0rpx 0rpx 30rpx 30rpx;' class="Semibold">
  28. <view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
  29. <view @click='tabcarchange(1)' class='line' :class='TabCur==1?"active":""'>销售</view>
  30. </view>
  31. <view class="introduce-section">
  32. <view v-for="(item, index) in keywordList" :key="index" class="guess-item"
  33. @click="navToDetailPage(item)">
  34. <view class="price-box">
  35. <view class="title Medium">{{item.title}}</view>
  36. <view class='flex justify-between align-item-center Regular'>
  37. <view v-if='TabCur==0' class='address'>
  38. {{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}{{item.receiveWarehouse}}
  39. </view>
  40. <view v-if='TabCur==1' class='address'>
  41. {{item.sendPrivate}}{{item.sendCity}}{{item.sendArea}}{{item.sendWarehouse}}
  42. </view>
  43. <view class='price NumberBold' v-if='item.procurementPlanType=="期货"'>
  44. <text class="number-style">{{item.basisPrice}}</text><text style='font-size:13px;color:#333333;'
  45. class="Semibold">元/吨</text></view>
  46. <view class='price NumberBold' v-if='item.procurementPlanType=="现货"'>
  47. <text class="number-style">{{item.procurementPrice}}</text><text style='font-size:13px;color:#333;'
  48. class="Semibold">元/吨</text></view>
  49. <view class='price NumberBold' v-if='item.salePlanType=="期货"'><text class="number-style">+{{item.basisPrice}}</text><text
  50. style='font-size:13px;color:#333333;' class="Semibold">元/吨</text></view>
  51. <view class='price NumberBold' v-if='item.salePlanType=="现货"'><text class="number-style">{{item.salePrice}}</text><text
  52. style='font-size:13px;color:#333;' class="Semibold">元/吨</text></view>
  53. </view>
  54. </view>
  55. <view class='flex justify-between Regular'>
  56. <view class="Regular">
  57. <view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="现货"'>现货</view>
  58. <view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="期货"'>期货</view>
  59. <view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="现货"'>现货</view>
  60. <view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="期货"'>期货</view>
  61. <view class='tag1 tag-yellow radius line-green'>{{item.goodsName}}</view>
  62. <view class='tag1 tag-red radius line-yellow' v-if="TabCur== 0">{{item.plannedPurchaseVolume}}吨
  63. </view>
  64. <view class='tag1 tag-red radius line-yellow' v-if="TabCur== 1">{{item.plannedSaleVolume}}吨
  65. </view>
  66. </view>
  67. <view style='font-size: 12px;color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货" && TabCur== 0'>
  68. 今日基差</view>
  69. <view style='font-size: 12px;color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货" && TabCur== 0'>
  70. 采购价格</view>
  71. <view style='font-size: 12px;color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="期货" && TabCur== 1'>今日基差
  72. </view>
  73. <view style='font-size: 12px;color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="现货" && TabCur== 1'>销售价格
  74. </view>
  75. </view>
  76. </view>
  77. <view v-show="isLoadMore">
  78. <uni-load-more :status="loadStatus"></uni-load-more>
  79. </view>
  80. </view>
  81. </scroll-view>
  82. <view style='height:80vh;' v-show="isShowKeywordList&&keywordList.length==0">
  83. <view style='background:#fff;padding:0 15px;'>
  84. <view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
  85. <view @click='tabcarchange(1)' class='line' :class='TabCur==1?"active":""'>销售</view>
  86. </view>
  87. <view style='background:#F5F6FA;height:100%;line-height:80vh;text-align:center;'>
  88. 暂无相关结果
  89. </view>
  90. </view>
  91. <scroll-view class="keyword-box" v-show="!isShowKeywordList" scroll-y>
  92. <view class="keyword-block" v-if="oldKeywordList.records.length>0">
  93. <view class="keyword-list-header Medium">
  94. <view style='font-size:16px;font-weight:600;'>最近搜索</view>
  95. <view>
  96. <image @tap="oldDelete" style='width:16px;height:16px;'
  97. src="../../static/img/jiaoyi/shanchu@3x.png"></image>
  98. <!-- <image @tap="oldDelete" src="./static/delete.png"></image> -->
  99. <!-- <text class="cuIcon-delete text-gray " ></text> -->
  100. </view>
  101. </view>
  102. <view class="keyword Regular">
  103. <view v-for="(keyword,index) in oldKeywordList.records" @tap="doSearch(keyword)" :key="index">
  104. {{keyword.searchContent}}
  105. </view>
  106. </view>
  107. </view>
  108. <view class="keyword-block Medium">
  109. <view class="keyword-list-header">
  110. <view style='font-size:16px;font-weight:600;'>推荐搜索</view>
  111. <view>
  112. <image @tap="hotToggle" :src="'/static/HM-search/attention'+forbid+'.png'"></image>
  113. </view>
  114. </view>
  115. <view class="keyword Regular" v-if="forbid==''">
  116. <view v-for="(keyword,index) in hotKeywordList" @tap="doSearch(keyword)" :key="index">
  117. {{keyword.searchContent}}
  118. </view>
  119. </view>
  120. </view>
  121. </scroll-view>
  122. </view>
  123. </view>
  124. </template>
  125. <script>
  126. import {
  127. mapState
  128. } from 'vuex';
  129. //引用mSearch组件,如不需要删除即可
  130. import mSearch from '@/components/mehaotian-search-revision.vue';
  131. export default {
  132. data() {
  133. return {
  134. defaultKeyword: "",
  135. searchKeyWord: "",
  136. pageSize: 10,
  137. currentPage: 1,
  138. oldKeywordList: [],
  139. hotKeywordList: [],
  140. keywordList: [],
  141. forbid: '',
  142. isShowKeywordList: false,
  143. TabCur: 0,
  144. isLoadMore: false,
  145. loadStatus: '',
  146. content: '搜索'
  147. }
  148. },
  149. onLoad(options) {
  150. if (options.searchKeyWord) {
  151. this.searchKeyWord = options.searchKeyWord
  152. }
  153. this.TabCur = options.TabCur
  154. if (this.searchKeyWord) {
  155. this.isShowKeywordList = true
  156. this.getData()
  157. }
  158. },
  159. onShow() {
  160. this.init();
  161. },
  162. components: {
  163. //引用mSearch组件,如不需要删除即可
  164. mSearch
  165. },
  166. computed: {
  167. ...mapState(['hasLogin', 'userInfo'])
  168. },
  169. methods: {
  170. //详情
  171. navToDetailPage(item) {
  172. let id = item.id;
  173. if (this.TabCur == 0) {
  174. uni.navigateTo({
  175. url: `/pageA/product/detail?id=${id}`
  176. })
  177. } else {
  178. uni.navigateTo({
  179. url: `/pageA/product/sales_detail?id=${id}`
  180. })
  181. }
  182. },
  183. init() {
  184. if (this.hasLogin) {
  185. this.loadDefaultKeyword();
  186. this.loadOldKeyword();
  187. this.loadHotKeyword();
  188. }
  189. },
  190. search(e) {
  191. if (e.detail.value.length == 0) {
  192. this.isShowKeywordList = false
  193. this.loadOldKeyword()
  194. this.loadHotKeyword()
  195. } else {
  196. this.searchKeyWord = e.detail.value
  197. }
  198. },
  199. blur() {
  200. uni.hideKeyboard()
  201. },
  202. doSearch(keyword) {
  203. console.log(keyword)
  204. if (keyword) {
  205. this.searchKeyWord = keyword.searchContent
  206. }
  207. if (this.searchKeyWord.length > 0) {
  208. this.isShowKeywordList = true
  209. this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo', {
  210. commonId: this.userInfo.id,
  211. functionType:"1",
  212. searchContent: this.searchKeyWord
  213. }).then(res => {})
  214. .catch(res => {
  215. });
  216. } else {
  217. this.isShowKeywordList = false
  218. this.loadOldKeyword()
  219. this.loadHotKeyword()
  220. }
  221. uni.showLoading({
  222. title: '正在加载',
  223. mask: true
  224. })
  225. var param1 = ''
  226. if (this.TabCur == 0) {
  227. param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
  228. } else {
  229. param1 = '/salePlanInfo/selectSalePlanInfo'
  230. }
  231. this.$api.doRequest('get', param1, {
  232. pageSize: this.pageSize,
  233. currentPage: this.currentPage,
  234. searchKeyWord: this.searchKeyWord
  235. }).then(res => {
  236. uni.hideLoading()
  237. console.log("res.data",res.data)
  238. this.keywordList = res.data.data.records
  239. })
  240. .catch(res => {
  241. uni.hideLoading()
  242. if (res.errmsg) {
  243. uni.showToast({
  244. title: res.errmsg,
  245. icon: 'none',
  246. duration: 2000
  247. })
  248. } else {
  249. uni.showToast({
  250. title: "系统异常,请联系管理员",
  251. icon: 'none',
  252. duration: 2000
  253. })
  254. }
  255. });
  256. },
  257. emptysearch() {
  258. this.searchKeyWord = ''
  259. this.isShowKeywordList = false
  260. this.loadOldKeyword()
  261. this.loadHotKeyword()
  262. },
  263. loadHotKeyword() {
  264. this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo', {
  265. pageSize: this.pageSize,
  266. currentPage: this.currentPage,
  267. functionType:"1",
  268. commonId: this.userInfo.id
  269. }).then(res => {
  270. uni.hideLoading()
  271. this.hotKeywordList = res.data.data.records
  272. })
  273. .catch(res => {
  274. if (res.errmsg) {
  275. uni.showToast({
  276. title: res.errmsg,
  277. icon: 'none',
  278. duration: 2000
  279. })
  280. } else {
  281. uni.showToast({
  282. title: "系统异常,请联系管理员",
  283. icon: 'none',
  284. duration: 2000
  285. })
  286. }
  287. });
  288. },
  289. tabSelect(e) {
  290. if (e.currentTarget.dataset.id) {
  291. this.TabCur = e.currentTarget.dataset.id;
  292. } else {
  293. this.TabCur = e.target.current;
  294. }
  295. this.pages = 1
  296. this.isLoadMore = false
  297. this.loadData()
  298. },
  299. getData() {
  300. var param1 = ''
  301. if (this.TabCur == 0) {
  302. param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
  303. } else {
  304. param1 = '/salePlanInfo/selectSalePlanInfo'
  305. }
  306. this.$api.doRequest('get', param1, {
  307. pageSize: this.pageSize,
  308. currentPage: this.currentPage,
  309. searchKeyWord: this.searchKeyWord
  310. }).then(res => {
  311. uni.hideLoading()
  312. this.keywordList = res.data.data.records
  313. })
  314. .catch(res => {
  315. if (res.errmsg) {
  316. uni.showToast({
  317. title: res.errmsg,
  318. icon: 'none',
  319. duration: 2000
  320. })
  321. } else {
  322. uni.showToast({
  323. title: "系统异常,请联系管理员",
  324. icon: 'none',
  325. duration: 2000
  326. })
  327. }
  328. });
  329. },
  330. //加载默认搜索关键字
  331. loadDefaultKeyword() {
  332. //定义默认搜索关键字,可以自己实现ajax请求数据再赋值,用户未输入时,以水印方式显示在输入框,直接不输入内容搜索会搜索默认关键字
  333. this.defaultKeyword = "默认关键字";
  334. },
  335. //加载历史搜索,自动读取本地Storage
  336. loadOldKeyword() {
  337. var that = this
  338. this.$api.doRequest('get', '/searchRecordsInfo/selectSearchRecordsInfo', {
  339. pageSize: this.pageSize,
  340. currentPage: this.currentPage,
  341. functionType:"1",
  342. commonId: this.userInfo.id
  343. }).then(res => {
  344. uni.hideLoading()
  345. that.oldKeywordList = res.data.data
  346. console.log(that.oldKeywordList)
  347. })
  348. },
  349. //监听输入
  350. inputChange(event) {
  351. //兼容引入组件时传入参数情况
  352. var keyword = event.detail ? event.detail.value : event;
  353. // if (!keyword) {
  354. // this.keywordList = [];
  355. // this.isShowKeywordList = false;
  356. // return;
  357. // }
  358. // this.isShowKeywordList = true;
  359. // //以下示例截取淘宝的关键字,请替换成你的接口
  360. // uni.request({
  361. // url: 'https://suggest.taobao.com/sug?code=utf-8&q=' + keyword, //仅为示例
  362. // success: (res) => {
  363. // this.keywordList = this.drawCorrelativeKeyword(res.data.result, keyword);
  364. // }
  365. // });
  366. },
  367. //高亮关键字
  368. drawCorrelativeKeyword(keywords, keyword) {
  369. var len = keywords.length,
  370. keywordArr = [];
  371. for (var i = 0; i < len; i++) {
  372. var row = keywords[i];
  373. //定义高亮#9f9f9f
  374. var html = row[0].replace(keyword, "<span style='color: #9f9f9f;'>" + keyword + "</span>");
  375. html = '<div>' + html + '</div>';
  376. var tmpObj = {
  377. keyword: row[0],
  378. htmlStr: html
  379. };
  380. keywordArr.push(tmpObj)
  381. }
  382. return keywordArr;
  383. },
  384. //顶置关键字
  385. setkeyword(data) {
  386. this.keyword = data.keyword;
  387. },
  388. //清除历史搜索
  389. oldDelete() {
  390. var that = this
  391. uni.showModal({
  392. content: '确定清除历史搜索记录?',
  393. success: (res) => {
  394. if (res.confirm) {
  395. this.$api.doRequest('post', '/searchRecordsInfo/api/deleteSearchRecordsInfo', {
  396. commonId: this.userInfo.id,
  397. functionType:"1",
  398. }).then(res => {
  399. if (res.data.code == 200) {
  400. uni.showToast({
  401. title: '清除历史搜索成功',
  402. icon: 'none',
  403. duration: 2000
  404. })
  405. that.oldKeywordList.records = []
  406. }
  407. })
  408. .catch(res => {
  409. uni.showToast({
  410. title: '清除历史搜索成功',
  411. icon: 'none',
  412. duration: 2000
  413. })
  414. });
  415. } else if (res.cancel) {
  416. console.log('用户点击取消');
  417. }
  418. }
  419. });
  420. },
  421. //热门搜索开关
  422. hotToggle() {
  423. this.forbid = this.forbid ? '' : '_forbid';
  424. },
  425. // //执行搜索
  426. // doSearch(e) {
  427. // if(e.detail){
  428. // if(e.detail.value.length>0){
  429. // this.content='取消'
  430. // this.isShowKeywordList=true
  431. // this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e.detail.value}).then(res => {
  432. // })
  433. // .catch(res => {
  434. // });
  435. // }else{
  436. // this.content='搜索'
  437. // this.isShowKeywordList=false
  438. // this.loadOldKeyword()
  439. // this.loadHotKeyword()
  440. // }
  441. // }
  442. // else if(e){
  443. // if(e.length>0){
  444. // this.isShowKeywordList=true
  445. // this.content='取消'
  446. // this.searchKeyWord = e
  447. // this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e}).then(res => {
  448. // })
  449. // .catch(res => {
  450. // })
  451. // }else{
  452. // this.content='搜索'
  453. // this.isShowKeywordList=false
  454. // this.loadOldKeyword()
  455. // this.loadHotKeyword()
  456. // }
  457. // }
  458. // uni.showLoading({
  459. // title: '正在加载',
  460. // mask:true
  461. // })
  462. // var param1=''
  463. // if (this.TabCur == 0) {
  464. // param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
  465. // } else {
  466. // param1 = '/salePlanInfo/selectSalePlanInfo'
  467. // }
  468. // this.$api.doRequest('get', param1,{pageSize:this.pageSize,
  469. // currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
  470. // uni.hideLoading()
  471. // this.keywordList=res.data.data.records
  472. // })
  473. // .catch(res => {
  474. // uni.hideLoading()
  475. // uni.showToast({
  476. // title: res.errmsg,
  477. // icon:'none',
  478. // duration: 2000
  479. // })
  480. // });
  481. // // console.log(key)
  482. // // console.log(this.keyword)
  483. // // key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
  484. // // this.keyword = key;
  485. // // this.saveKeyword(key); //保存为历史
  486. // // var TabCur = this.TabCur
  487. // // uni.navigateTo({
  488. // // url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
  489. // // })
  490. // },
  491. tabcarchange(status) {
  492. this.TabCur = status
  493. var param1 = ''
  494. if (this.TabCur == 0) {
  495. param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
  496. } else {
  497. param1 = '/salePlanInfo/selectSalePlanInfo'
  498. }
  499. this.$api.doRequest('get', param1, {
  500. pageSize: this.pageSize,
  501. currentPage: this.currentPage,
  502. searchKeyWord: this.searchKeyWord
  503. }).then(res => {
  504. if (res.data.code == 200) {
  505. this.keywordList = res.data.data.records
  506. } else {
  507. uni.showToast({
  508. title: res.data.message,
  509. icon: 'none',
  510. duration: 2000
  511. })
  512. }
  513. uni.hideLoading()
  514. })
  515. .catch(res => {
  516. uni.hideLoading()
  517. if (res.errmsg) {
  518. uni.showToast({
  519. title: res.errmsg,
  520. icon: 'none',
  521. duration: 2000
  522. })
  523. } else {
  524. uni.showToast({
  525. title: "系统异常,请联系管理员",
  526. icon: 'none',
  527. duration: 2000
  528. })
  529. }
  530. });
  531. },
  532. //保存关键字到历史记录
  533. saveKeyword(keyword) {
  534. uni.getStorage({
  535. key: 'OldKeys',
  536. success: (res) => {
  537. console.log(res.data);
  538. var OldKeys = JSON.parse(res.data);
  539. var findIndex = OldKeys.indexOf(keyword);
  540. if (findIndex == -1) {
  541. OldKeys.unshift(keyword);
  542. } else {
  543. OldKeys.splice(findIndex, 1);
  544. OldKeys.unshift(keyword);
  545. }
  546. //最多10个纪录
  547. OldKeys.length > 10 && OldKeys.pop();
  548. uni.setStorage({
  549. key: 'OldKeys',
  550. data: JSON.stringify(OldKeys)
  551. });
  552. this.oldKeywordList = OldKeys; //更新历史搜索
  553. },
  554. fail: (e) => {
  555. var OldKeys = [keyword];
  556. uni.setStorage({
  557. key: 'OldKeys',
  558. data: JSON.stringify(OldKeys)
  559. });
  560. this.oldKeywordList = OldKeys; //更新历史搜索
  561. }
  562. });
  563. }
  564. }
  565. }
  566. </script>
  567. <style scoped>
  568. .search-form {
  569. background: #F5F6F9;
  570. }
  571. .line {
  572. display: inline-block;
  573. padding: 5px;
  574. position: relative;
  575. font-size: 17px;
  576. }
  577. .line.active {
  578. font-size: 19px;
  579. font-weight: 900;
  580. }
  581. .line.active:after {
  582. content: '';
  583. display: block;
  584. position: absolute;
  585. width: 36rpx;
  586. height: 6rpx;
  587. left: 50%;
  588. transform: translateX(-50%);
  589. bottom: 0;
  590. background: #22C572;
  591. /* border-bottom: 1px solid #22C572; */
  592. }
  593. .search-box {
  594. width: 100%;
  595. background-color: rgb(242, 242, 242);
  596. padding: 15upx 2.5%;
  597. display: flex;
  598. justify-content: space-between;
  599. }
  600. .search-box .mSearch-input-box {
  601. width: 100%;
  602. }
  603. .search-box .input-box {
  604. width: 85%;
  605. flex-shrink: 1;
  606. display: flex;
  607. justify-content: center;
  608. align-items: center;
  609. }
  610. .search-box .search-btn {
  611. width: 15%;
  612. margin: 0 0 0 2%;
  613. display: flex;
  614. justify-content: center;
  615. align-items: center;
  616. flex-shrink: 0;
  617. font-size: 28upx;
  618. color: #fff;
  619. background: linear-gradient(to right, #ff9801, #ff570a);
  620. border-radius: 60upx;
  621. }
  622. .search-box .input-box>input {
  623. width: 100%;
  624. height: 60upx;
  625. font-size: 32upx;
  626. border: 0;
  627. border-radius: 60upx;
  628. -webkit-appearance: none;
  629. -moz-appearance: none;
  630. appearance: none;
  631. padding: 0 3%;
  632. margin: 0;
  633. background-color: #ffffff;
  634. }
  635. .placeholder-class {
  636. color: #9e9e9e;
  637. }
  638. .search-keyword {
  639. width: 100%;
  640. background-color: rgb(242, 242, 242);
  641. }
  642. .keyword-list-box {
  643. background: #F5F6FA;
  644. height: calc(100vh - 110upx);
  645. /* padding-top: 10upx; */
  646. border-radius: 20upx 20upx 0 0;
  647. }
  648. .keyword-entry-tap {
  649. background-color: #eee;
  650. }
  651. .keyword-entry {
  652. width: 94%;
  653. height: 80upx;
  654. margin: 0 3%;
  655. font-size: 30upx;
  656. color: #333;
  657. display: flex;
  658. justify-content: space-between;
  659. align-items: center;
  660. border-bottom: solid 1upx #e7e7e7;
  661. }
  662. .keyword-entry image {
  663. width: 60upx;
  664. height: 60upx;
  665. }
  666. .keyword-entry .keyword-text,
  667. .keyword-entry .keyword-img {
  668. height: 80upx;
  669. display: flex;
  670. align-items: center;
  671. }
  672. .keyword-entry .keyword-text {
  673. width: 90%;
  674. }
  675. .keyword-entry .keyword-img {
  676. width: 10%;
  677. justify-content: center;
  678. }
  679. .keyword-box {
  680. height: calc(100vh - 110upx);
  681. border-radius: 20upx 20upx 0 0;
  682. background-color: #fff;
  683. }
  684. .keyword-box .keyword-block {
  685. padding: 10upx 0;
  686. }
  687. .keyword-box .keyword-block .keyword-list-header {
  688. width: 94%;
  689. padding: 10upx 3%;
  690. font-size: 27upx;
  691. color: #333;
  692. display: flex;
  693. justify-content: space-between;
  694. }
  695. .keyword-box .keyword-block .keyword-list-header image {
  696. width: 40upx;
  697. height: 40upx;
  698. }
  699. .keyword-box .keyword-block .keyword {
  700. width: 94%;
  701. padding: 3px 3%;
  702. display: flex;
  703. flex-flow: wrap;
  704. justify-content: flex-start;
  705. }
  706. .keyword-box .keyword-block .hide-hot-tis {
  707. display: flex;
  708. justify-content: center;
  709. font-size: 28upx;
  710. color: #6b6b6b;
  711. }
  712. .keyword-box .keyword-block .keyword>view {
  713. display: flex;
  714. justify-content: center;
  715. align-items: center;
  716. border-radius: 60upx;
  717. padding: 0 20upx;
  718. margin: 10upx 20upx 10upx 0;
  719. height: 60upx;
  720. font-size: 28upx;
  721. background-color: rgb(242, 242, 242);
  722. color: #6b6b6b;
  723. }
  724. .cuIcon {
  725. position: absolute;
  726. right: 80px;
  727. }
  728. .tag1 {
  729. background: #F5F6F9;
  730. padding: 2px;
  731. color: #333333;
  732. display: inline-flex;
  733. font-size: 22rpx;
  734. border-radius: 3px;
  735. margin: 3px;
  736. }
  737. .tag {
  738. background: #F5F6F9;
  739. padding: 7px 12px;
  740. color: #333333;
  741. display: inline-flex;
  742. font-size: 22rpx;
  743. border-radius: 15px;
  744. margin: 3px;
  745. }
  746. .tag-bule {
  747. background: #EBEEFA;
  748. color: #5C76DF;
  749. }
  750. .tag-green {
  751. background: #C6F7BC;
  752. color: #065112;
  753. }
  754. .tag-yellow {
  755. background: #F9F2EA;
  756. color: #BE9C69;
  757. }
  758. .tag-red {
  759. background: #FEECE6;
  760. color: #FE6430;
  761. }
  762. .introduce-section .title {
  763. font-size: 17px;
  764. height: 40px;
  765. line-height: 40px;
  766. flex: 2.5;
  767. /* border-bottom: 1px solid #EEEEEE; */
  768. }
  769. .introduce-section .address {
  770. color: #878C9C;
  771. font-size: 12px;
  772. /* padding: 15px 0 10px; */
  773. }
  774. .introduce-section .price {
  775. /* padding: 10px 0 10px; */
  776. color: #FD714F;
  777. font-size: 19px;
  778. font-weight: 700;
  779. }
  780. .introduce-section .guess-item {
  781. border-radius: 10px;
  782. background: #fff;
  783. padding: 0upx 30upx 20upx;
  784. margin: 8px;
  785. /* border-bottom: 1px solid #ccc; */
  786. }
  787. /* 销售信息 */
  788. .introduce-section {
  789. .title-tip {
  790. flex: 1;
  791. }
  792. .price-box {
  793. display: flex;
  794. align-items: baseline;
  795. font-size: 26upx;
  796. }
  797. .price {
  798. font-size: $font-lg + 2upx;
  799. }
  800. .m-price {
  801. margin: 0 12upx;
  802. color: $font-color-light;
  803. text-decoration: line-through;
  804. }
  805. .coupon-tip {
  806. align-items: center;
  807. padding: 4upx 10upx;
  808. background: $uni-color-primary;
  809. font-size: $font-sm;
  810. color: #fff;
  811. border-radius: 6upx;
  812. line-height: 1;
  813. transform: translateY(-4upx);
  814. }
  815. .bot-row {
  816. display: flex;
  817. align-items: center;
  818. height: 50upx;
  819. font-size: $font-sm;
  820. color: $font-color-light;
  821. view {
  822. flex: 1;
  823. }
  824. }
  825. }
  826. .side-bg {
  827. position: absolute;
  828. width: 64px;
  829. height: 64px;
  830. z-index: 1;
  831. }
  832. .drag {
  833. position: relative;
  834. display: flex;
  835. justify-content: center;
  836. align-items: center;
  837. color: $uni-text-color-inverse;
  838. width: 64px;
  839. height: 64px;
  840. background: transparent;
  841. font-size: $uni-font-size-sm;
  842. position: fixed;
  843. z-index: 9;
  844. &.transition {
  845. transition: left .3s ease, top .3s ease;
  846. }
  847. }
  848. .number-style{
  849. font-size: 44rpx;
  850. }
  851. </style>