search.vue 24 KB

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