search.vue 22 KB

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