classification.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. <template>
  2. <view>
  3. <view style="background-color: #E75F37;padding: 20rpx;">
  4. <u-search placeholder="请输入商品名称" bgColor="#fff" searchIconColor='#E75F37' :actionStyle="{color:'#FFF'}"
  5. :searchIconSize='24' v-model="name" @search="custom()" @custom="custom()"></u-search>
  6. </view>
  7. <scroll-view @scrolltolower="lowerBottom" scroll-y="true" style="max-height: 92vh;" @scroll="scroll"
  8. :scroll-top="scrollTop">
  9. <view class="recentSearches" v-if="recentSearches.length != 0">
  10. <view class="recentSearches-head">
  11. <view class="recentSearches-headLeft">
  12. <u-icon name="clock" color="#C4C4C4"></u-icon>
  13. <view style="font-size: 26rpx;margin-left: 6rpx;">最近搜索</view>
  14. </view>
  15. <view class="recentSearches-headRight">
  16. <u-icon name="trash" size="20px" @click="searchDeleteShow = true" color="#C4C4C4"></u-icon>
  17. </view>
  18. </view>
  19. <view class="recentSearches-text">
  20. <u-tag v-for="(item,index) in recentSearches" :key="index" :text="item" bgColor="#EFEFEF"
  21. color="#414141" borderColor="#EFEFEF" size="medium" closable :show="item"
  22. @close="tagClose(index)" shape="circle" @click.stop="tagSearches(item)"></u-tag>
  23. </view>
  24. <u-modal :show="searchDeleteShow" content="确认删除搜索记录吗?" showCancelButton @confirm="searchDeletefun"
  25. @cancel="searchDeleteShow = false" ref="uModal" :asyncClose="true">
  26. </u-modal>
  27. </view>
  28. <view class="tagClass">
  29. <view v-for="(item, index) in radios" :key="index" style="margin:0 6rpx;">
  30. <u-tag :text="item.label" :bgColor="item.checked?'#E75F37':'#fff'" borderColor='#E75F37'
  31. :color="item.checked?'#fff':'#E75F37'" @click="checkboxChange(item.label,index)" size="mini">
  32. </u-tag>
  33. </view>
  34. <view style="margin:0 6rpx;">
  35. <u-tag text="品牌" bgColor="#fff" borderColor='#E75F37' color="#E75F37" @click="openBrand"
  36. size="mini">
  37. </u-tag>
  38. </view>
  39. <view style="margin:0 6rpx;width: 2rpx;height: 43rpx;background: #E75F37;border-radius: 1rpx;"></view>
  40. <view style="margin:0 6rpx;">
  41. <u-tag text="重置" bgColor="#F8AA09" borderColor='#F8AA09' color="#fff" @click="emptyfun" size="mini">
  42. </u-tag>
  43. </view>
  44. </view>
  45. <view v-for="(item, index) in dataList" :key="index">
  46. <view class="card" @click="selectProduct(item)">
  47. <image :src="item.url" class="cardImg" mode="scaleToFill">
  48. </image>
  49. <view class="">
  50. <view style="display: flex;align-items: center;">
  51. <view class="cardTitle">
  52. <view class="cardName">
  53. {{item.cname}}
  54. </view>
  55. <view class="cardRetailPrice">
  56. <view v-if="item.suggestedRetailPrice">
  57. 建议零售价:¥{{item.suggestedRetailPrice}}
  58. </view>
  59. </view>
  60. </view>
  61. <image src="/static/images/tabBar/carIcon@2x.png" @click.stop="shoppingCartfun(item)"
  62. style="width: 54rpx;height: 54rpx;margin-left: 32rpx;" mode="scaleToFill">
  63. </image>
  64. </view>
  65. <view style="display: flex;align-items: center;">
  66. <view class="cardTab" v-show="showIcon">
  67. <image src="/static/images/tabBar/280@2x.png" style="width: 142rpx;height: 36rpx;"
  68. mode="scaleToFill">
  69. </image>
  70. <image src="/static/images/tabBar/6@2x.png"
  71. style="width: 78rpx;height: 20rpx;position: absolute;left:10rpx;top:8rpx"
  72. mode="scaleToFill">
  73. </image>
  74. <view class="cardKc">
  75. {{Number(item.inventoryLocal) > 10?'充足':Number(item.inventoryLocal)}}
  76. </view>
  77. </view>
  78. <view>
  79. <view class="cardTab" style="margin-left: 10rpx;" v-show="showIcon">
  80. <image src="/static/images/tabBar/2801@2x.png" style="width: 142rpx;height: 36rpx;"
  81. mode="scaleToFill">
  82. </image>
  83. <image src="/static/images/tabBar/7@2x.png"
  84. style="width: 78rpx;height: 20rpx;position: absolute;left:10rpx;top:8rpx"
  85. mode="scaleToFill">
  86. </image>
  87. <view class="cardKc">
  88. {{Number(item.inventoryShare) > 10?'充足':Number(item.inventoryShare)}}
  89. </view>
  90. </view>
  91. </view>
  92. <view class="cardPrice">
  93. ¥{{checkStatus == '通过'?item.mallPrice:'***'}}
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <u-empty v-if="page.total == 0" mode="list" icon="/static/images/tabBar/emptylist.jpg" text='暂无数据' />
  100. <u-loadmore v-if="page.total !== 0 && dataList.length != 0" :status="status" />
  101. </scroll-view>
  102. <u-back-top :scroll-top="old.scrollTop" @tap="goTop"></u-back-top>
  103. <uni-popup ref="popup" background-color="#fff" type="bottom">
  104. <view style="padding: 40rpx 0 0 0;">
  105. <scroll-view scroll-y="true" style="max-height: 74vh;">
  106. <uni-row>
  107. <uni-col :span="6" v-for="(item,index) in tabbarTwo" :key="index">
  108. <view class="brandImg" @click="swichMenu(item,index)">
  109. <image :src="item.brandFilesList[0].url" mode="aspectFit"
  110. style="width:110rpx;height: 110rpx;border-radius:6rpx;border: 2rpx solid #EBEBEB;" />
  111. <text class='text'>{{item.cname}}</text>
  112. </view>
  113. </uni-col>
  114. </uni-row>
  115. </scroll-view>
  116. </view>
  117. </uni-popup>
  118. <view v-if="userInfo.tenant_id != '000000'" class="suspensionBox" @click="opensalesman">
  119. <u-icon name="server-fill" color="#2979ff" size="30"></u-icon>
  120. </view>
  121. <u-modal :show="salesmanShow" title="业务员联系方式" showCancelButton confirmText="拨号" cancelText="关闭"
  122. @confirm="clickCall" @cancel="salesmanShow=false">
  123. <view class="slot-content">
  124. <view style="margin-bottom: 10rpx;">业务员:{{salesmanName?salesmanName:''}}</view>
  125. <view>电话:{{phoneNumber?phoneNumber:''}}</view>
  126. </view>
  127. </u-modal>
  128. </view>
  129. </template>
  130. <script>
  131. import {
  132. listAll2,
  133. goodsList,
  134. goodsListNew,
  135. cloudWarehouseList
  136. } from '@/api/tabBar/classification.js'
  137. import {
  138. details,
  139. nameDetail
  140. } from '@/api/views/personalInformation/index.js'
  141. import {
  142. appDetail,
  143. addToCart,
  144. appDetailNew,
  145. } from '@/api/tabBar/homeNew.js'
  146. import {isProcurement} from '@/api/tabBar/shoppingCart.js'
  147. export default {
  148. data() {
  149. return {
  150. scrollTop: 0,
  151. old: {
  152. scrollTop: 0
  153. },
  154. radios: [{
  155. label: '静音棉',
  156. checked: false,
  157. },
  158. {
  159. label: '自修补',
  160. checked: false,
  161. },
  162. {
  163. label: '防爆',
  164. checked: false,
  165. },
  166. ],
  167. current: 0, // 预设当前项的值
  168. tabbar: [],
  169. dataList: [],
  170. show: false,
  171. status: 'loadmore',
  172. filesList: [],
  173. tabbarTwo: [],
  174. name: '',
  175. page: {
  176. total: 0,
  177. size: 10,
  178. current: 1
  179. },
  180. search: {
  181. whether: '0'
  182. },
  183. checkStatus: null,
  184. recentSearches: [], // 搜索数据
  185. searchDeleteShow: false, // 搜索全部删除弹窗
  186. form: {}, // 详情数据
  187. checkboxValue: [], // 多选
  188. salesmanName: '', // 业务员姓名
  189. phoneNumber: '', // 业务员联系电话
  190. salesmanShow: false, // 联系业务员弹窗
  191. userInfo: {}, // 当前用户数据
  192. cloudWarehouse: 0,
  193. showIcon: true
  194. }
  195. },
  196. mounted() {},
  197. onLoad(data) {
  198. listAll2({
  199. type: 'PP',
  200. enableOrNot: '1',
  201. whetherIntegral: '0'
  202. }).then(res => {
  203. console.log(res.data.sort(this.compare('sort')), 111111)
  204. let arr = []
  205. arr = res.data.sort(this.compare('sort'))
  206. this.tabbarTwo = arr
  207. this.page = {
  208. total: 0,
  209. size: 10,
  210. current: 1
  211. }
  212. this.dataList = []
  213. if (uni.getStorageSync('cname')) {
  214. this.$set(this.search, 'cname', JSON.parse(JSON.stringify(uni.getStorageSync('cname'))))
  215. uni.removeStorage('cname')
  216. this.page = {
  217. total: 0,
  218. size: 10,
  219. current: 1
  220. }
  221. this.dataList = []
  222. this.onSearch()
  223. } else {
  224. this.name = null
  225. if (this.current == -1) {
  226. this.current = 0
  227. }
  228. this.search = {
  229. whether: '0',
  230. }
  231. this.onSearch()
  232. }
  233. })
  234. },
  235. onShow() {
  236. this.getUpdate()
  237. this.getIsShowIcon()
  238. this.getIsCloud()
  239. // 获取审核状态
  240. details().then(res => {
  241. this.checkStatus = res.data.checkStatus
  242. uni.setStorageSync('checkStatus', res.data.checkStatus);
  243. // if (this.checkStatus != '通过') {
  244. // uni.showToast({
  245. // title: "当前用户未授权,请联系客服",
  246. // icon: "none",
  247. // mask:true
  248. // });
  249. // // uni.switchTab({
  250. // // url: '/pages/tabBar/home'
  251. // // })
  252. // return
  253. // }
  254. this.salesmanName = res.data.salesmanName
  255. // 查询业务员详情拿取手机号
  256. if (!this.phoneNumber) {
  257. nameDetail({
  258. id: res.data.salesmanId
  259. }).then(res => {
  260. this.phoneNumber = res.data.phone
  261. })
  262. }
  263. })
  264. this.userInfo = uni.getStorageSync('userInfo')
  265. // 获取最近搜索数据
  266. if (uni.getStorageSync('recentSearches')) {
  267. this.recentSearches = uni.getStorageSync('recentSearches').slice(0, 8);
  268. }
  269. },
  270. methods: {
  271. getIsShowIcon(){
  272. isProcurement({
  273. "param": "show.icon"
  274. }).then(res => {
  275. console.info('res-----', res)
  276. this.showIcon = Number(res.data) === 0
  277. })
  278. },
  279. getIsCloud(){
  280. isProcurement({
  281. "param": "cloud_warehouse"
  282. }).then(res => {
  283. console.info('res-----', res)
  284. this.cloudWarehouse = res.data
  285. })
  286. },
  287. getUpdate() {
  288. const updateManager = uni.getUpdateManager();
  289. updateManager.onCheckForUpdate(function(res) {
  290. // 请求完新版本信息的回调
  291. if (res.hasUpdate) {
  292. updateManager.onUpdateReady(function() {
  293. uni.showModal({
  294. title: '更新提示',
  295. content: '新版本已经准备好,是否重启应用?',
  296. success: function(res) {
  297. if (res.confirm) {
  298. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  299. updateManager.applyUpdate();
  300. }
  301. }
  302. });
  303. });
  304. updateManager.onUpdateFailed(function() {
  305. // 新的版本下载失败
  306. uni.showModal({
  307. title: '已经有新版本了哟~',
  308. content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
  309. });
  310. });
  311. }
  312. });
  313. },
  314. opensalesman() {
  315. if (this.checkStatus != '通过') {
  316. uni.showToast({
  317. title: "当前用户未授权,请联系客服",
  318. icon: "none",
  319. mask: true
  320. });
  321. return
  322. }
  323. this.salesmanShow = true
  324. },
  325. openBrand() {
  326. if (this.checkStatus != '通过') {
  327. uni.showToast({
  328. title: "当前用户未授权,请联系客服",
  329. icon: "none",
  330. mask: true
  331. });
  332. return
  333. }
  334. this.$refs.popup.open('bottom')
  335. },
  336. goTop(e) {
  337. // 解决view层不同步的问题
  338. this.scrollTop = this.old.scrollTop
  339. this.$nextTick(() => {
  340. this.scrollTop = 0
  341. this.old.scrollTop = 0
  342. });
  343. },
  344. scroll(e) {
  345. this.old.scrollTop = e.detail.scrollTop
  346. },
  347. // 数组排序 property:根据什么属性排序
  348. compare(property) {
  349. return function(a, b) {
  350. var value1 = a[property]
  351. var value2 = b[property]
  352. return value1 - value2
  353. }
  354. },
  355. // 点击联系业务员
  356. clickCall() {
  357. uni.makePhoneCall({
  358. phoneNumber: this.phoneNumber,
  359. success: function() {
  360. console.log('拨打电话成功');
  361. },
  362. fail() {
  363. console.log('打电话失败了');
  364. }
  365. })
  366. },
  367. // 清空搜索条件
  368. emptyfun() {
  369. this.name = ''
  370. this.current = -1
  371. this.radios.map((item, index) => {
  372. item.checked = false
  373. });
  374. this.checkboxValue = []
  375. this.search = {
  376. whether: '0'
  377. }
  378. this.page = {
  379. total: 0,
  380. size: 10,
  381. current: 1
  382. }
  383. this.dataList = []
  384. this.onSearch()
  385. },
  386. checkboxChange(value, index) {
  387. if (this.checkStatus != '通过') {
  388. uni.showToast({
  389. title: "当前用户未授权,请联系客服",
  390. icon: "none",
  391. mask: true
  392. });
  393. return
  394. }
  395. this.radios.map((item, index) => {
  396. item.checked = item.label === value ? true : false;
  397. });
  398. this.checkboxValue = value
  399. this.search.originalFactory = null
  400. this.search.selfRecovery = null
  401. this.search.explosionProof = null
  402. if (this.checkboxValue.indexOf('静音棉') != -1) {
  403. this.search.originalFactory = 1
  404. }
  405. if (this.checkboxValue.indexOf('自修补') != -1) {
  406. this.search.selfRecovery = 1
  407. }
  408. if (this.checkboxValue.indexOf('防爆') != -1) {
  409. this.search.explosionProof = 1
  410. }
  411. this.page = {
  412. total: 0,
  413. size: 10,
  414. current: 1
  415. }
  416. this.dataList = []
  417. this.onSearch()
  418. },
  419. // 加入购物车
  420. shoppingCartfun(row) {
  421. if (this.checkStatus != '通过') {
  422. uni.showToast({
  423. title: "当前用户未授权,请联系客服",
  424. icon: "none",
  425. mask: true
  426. });
  427. return
  428. }
  429. if (row.inventory == 0) {
  430. uni.showToast({
  431. title: "当前商品库存为零",
  432. icon: "none",
  433. mask: true,
  434. duration: 2500
  435. });
  436. return
  437. }
  438. uni.showLoading({
  439. title: '加载中',
  440. mask: true
  441. });
  442. if (uni.getStorageSync('whether_openShare') == 1) {
  443. // 获取详情数据
  444. appDetailNew({
  445. id: row.id
  446. }).then(res => {
  447. if (res.data.type == 0) {
  448. this.form = res.data.thisLocality
  449. } else {
  450. this.form = res.data.offsite
  451. }
  452. addToCart({
  453. ...this.form,
  454. whetherIntegral: '0',
  455. detailsText: ''
  456. }).then(res => {
  457. uni.showToast({
  458. title: "加入购物车成功",
  459. icon: "none",
  460. mask: true,
  461. duration: 2500
  462. });
  463. uni.switchTab({
  464. url: '/pages/tabBar/shoppingCart',
  465. })
  466. uni.hideLoading();
  467. }).catch(err => {
  468. uni.hideLoading();
  469. })
  470. })
  471. } else {
  472. // 获取详情数据
  473. appDetail({
  474. id: row.id
  475. }).then(res => {
  476. if (res.data.type == 0) {
  477. this.form = res.data.thisLocality
  478. } else {
  479. this.form = res.data.offsite
  480. }
  481. addToCart({
  482. ...this.form,
  483. whetherIntegral: '0',
  484. detailsText: ''
  485. }).then(res => {
  486. uni.showToast({
  487. title: "加入购物车成功",
  488. icon: "none",
  489. mask: true,
  490. duration: 2500
  491. });
  492. uni.switchTab({
  493. url: '/pages/tabBar/shoppingCart',
  494. })
  495. uni.hideLoading();
  496. }).catch(err => {
  497. uni.hideLoading();
  498. })
  499. })
  500. }
  501. },
  502. // 搜索全部删除
  503. searchDeletefun() {
  504. this.recentSearches = []
  505. uni.setStorageSync('recentSearches', this.recentSearches);
  506. this.searchDeleteShow = false
  507. },
  508. // 点击搜索
  509. tagSearches(name) {
  510. this.name = name
  511. this.search.cname = name
  512. this.custom()
  513. },
  514. // 最近搜索点击关闭按钮
  515. tagClose(index) {
  516. this.recentSearches.splice(index, 1)
  517. uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
  518. },
  519. selectProduct(item) {
  520. if (this.checkStatus != '通过') {
  521. uni.showToast({
  522. title: "当前用户未授权,请联系客服",
  523. icon: "none",
  524. mask: true
  525. });
  526. return
  527. }
  528. uni.$u.route('/pages/views/buyGoods/commodityDetails', {
  529. id: item.id
  530. });
  531. },
  532. inSearch() {
  533. // uni.navigateTo({
  534. // url: `/pages/tabBar/searchPage?searchData=${this.name?this.name:''}`
  535. // })
  536. },
  537. lowerBottom() {
  538. this.status = 'loading'
  539. if (this.dataList.length < this.page.total) {
  540. this.page.current++
  541. this.onSearch()
  542. } else {
  543. this.status = 'nomore'
  544. }
  545. },
  546. // 搜索
  547. custom() {
  548. if (this.userInfo.tenant_id == '000000') {
  549. uni.showToast({
  550. title: '请点右下角<我的> 授权登录!',
  551. icon: 'none'
  552. });
  553. return
  554. }
  555. if (this.checkStatus != '通过') {
  556. uni.showToast({
  557. title: "当前用户未授权,请联系客服",
  558. icon: "none",
  559. mask: true
  560. });
  561. return
  562. }
  563. this.current = -1
  564. this.page = {
  565. total: 0,
  566. size: 10,
  567. current: 1
  568. }
  569. if (this.name) {
  570. this.recentSearches.unshift(this.name)
  571. // 去重
  572. this.recentSearches = this.recentSearches.filter((item, index) => this.recentSearches.indexOf(item) ===
  573. index).slice(0, 8);
  574. uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
  575. }
  576. delete this.search.brandId
  577. this.search.cname = this.name
  578. this.dataList = []
  579. this.onSearch()
  580. },
  581. // 左侧选择
  582. swichMenu(row, index) {
  583. // this.current = index;
  584. this.page = {
  585. total: 0,
  586. size: 10,
  587. current: 1
  588. }
  589. this.search.brandId = row.id
  590. this.search.cname = this.name ? this.name : null
  591. this.dataList = []
  592. this.onSearch()
  593. this.$refs.popup.close()
  594. },
  595. // 列表数据获取
  596. onSearch() {
  597. uni.showLoading({
  598. title: '加载中',
  599. mask: true
  600. });
  601. if (this.cloudWarehouse == 1) {
  602. cloudWarehouseList({
  603. size: this.page.size,
  604. current: this.page.current,
  605. ...this.search,
  606. whetherIntegral: '0'
  607. }).then(res => {
  608. this.dataList = this.dataList.concat(res.data.records)
  609. this.page.total = res.data.total
  610. if (this.dataList.length == res.data.total) {
  611. this.status = 'nomore'
  612. }
  613. uni.hideLoading();
  614. }).catch(err => {
  615. uni.hideLoading();
  616. })
  617. } else {
  618. if (uni.getStorageSync('whether_openShare') == 1) {
  619. goodsListNew({
  620. size: this.page.size,
  621. current: this.page.current,
  622. ...this.search,
  623. whetherIntegral: '0'
  624. }).then(res => {
  625. this.dataList = this.dataList.concat(res.data.records)
  626. this.page.total = res.data.total
  627. if (this.dataList.length == res.data.total) {
  628. this.status = 'nomore'
  629. }
  630. uni.hideLoading();
  631. }).catch(err => {
  632. uni.hideLoading();
  633. })
  634. } else {
  635. goodsList({
  636. size: this.page.size,
  637. current: this.page.current,
  638. ...this.search,
  639. whetherIntegral: '0'
  640. }).then(res => {
  641. this.dataList = this.dataList.concat(res.data.records)
  642. this.page.total = res.data.total
  643. if (this.dataList.length == res.data.total) {
  644. this.status = 'nomore'
  645. }
  646. uni.hideLoading();
  647. }).catch(err => {
  648. uni.hideLoading();
  649. })
  650. }
  651. }
  652. },
  653. }
  654. }
  655. </script>
  656. <style lang="scss" scoped>
  657. .suspensionBox {
  658. width: 80rpx;
  659. height: 80rpx;
  660. background: #fff;
  661. border-radius: 50%;
  662. position: fixed;
  663. top: 92%;
  664. right: 40rpx;
  665. box-shadow: 4px 4px 8px 1px rgba(0, 0, 0, .5);
  666. display: flex;
  667. align-items: center;
  668. justify-content: center;
  669. }
  670. .brandImg {
  671. display: flex;
  672. flex-direction: column;
  673. align-items: center;
  674. justify-content: center;
  675. margin: 10rpx 0;
  676. .text {
  677. white-space: nowrap;
  678. overflow: hidden;
  679. text-overflow: ellipsis;
  680. width: 130rpx;
  681. text-align: center;
  682. font-size: 24rpx;
  683. color: #797979;
  684. }
  685. }
  686. .tagClass {
  687. display: flex;
  688. padding: 8rpx 63rpx 18rpx 63rpx;
  689. background-color: #fff;
  690. justify-content: space-around;
  691. ::v-deep .u-tag--mini {
  692. font-size: 28rpx;
  693. line-height: 22px;
  694. padding: 0rpx 24rpx;
  695. }
  696. }
  697. .card {
  698. display: flex;
  699. align-items: center;
  700. background-color: #fff;
  701. width: 100%;
  702. margin-top: 28rpx;
  703. .cardImg {
  704. margin: 31rpx;
  705. width: 180rpx;
  706. height: 180rpx;
  707. border: 2rpx solid #E7E7E7;
  708. }
  709. .cardName {
  710. font-weight: 400;
  711. font-size: 24rpx;
  712. height: 64rpx;
  713. width: 400rpx;
  714. color: #797979;
  715. display: -webkit-box;
  716. -webkit-box-orient: vertical;
  717. -webkit-line-clamp: 2;
  718. overflow: hidden;
  719. text-overflow: ellipsis;
  720. // margin-bottom: 28rpx;
  721. }
  722. .cardTitle {
  723. font-weight: 400;
  724. font-size: 24rpx;
  725. width: 400rpx;
  726. .cardRetailPrice {
  727. display: flex;
  728. color: #909399;
  729. font-size: 22rpx;
  730. height: 28rpx;
  731. }
  732. }
  733. .cardTab {
  734. position: relative;
  735. top: 4rpx;
  736. .cardKc {
  737. text-align: center;
  738. position: absolute;
  739. right: 0rpx;
  740. top: 3rpx;
  741. font-size: 22rpx;
  742. color: #FFFFFF;
  743. font-weight: 500;
  744. width: 49rpx;
  745. height: 26rpx;
  746. }
  747. }
  748. .cardPrice {
  749. margin-left: 10rpx;
  750. color: #E75F37;
  751. font-size: 32rpx;
  752. font-weight: 500;
  753. }
  754. }
  755. .recentSearches {
  756. padding: 8rpx 12rpx;
  757. background-color: #fff;
  758. .recentSearches-head {
  759. display: flex;
  760. align-items: center;
  761. justify-content: space-between;
  762. color: #C4C4C4;
  763. .recentSearches-headLeft {
  764. display: flex;
  765. align-items: center;
  766. }
  767. .recentSearches-headRight {}
  768. }
  769. .recentSearches-text {
  770. display: flex;
  771. flex-wrap: wrap;
  772. align-items: baseline;
  773. ::v-deep .u-tag__close {
  774. z-index: 99 !important;
  775. }
  776. }
  777. }
  778. </style>