search.vue 22 KB

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