classification.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  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">
  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;">
  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. }
  194. },
  195. mounted() {},
  196. onLoad(data) {
  197. listAll2({
  198. type: 'PP',
  199. enableOrNot: '1',
  200. whetherIntegral: '0'
  201. }).then(res => {
  202. console.log(res.data.sort(this.compare('sort')), 111111)
  203. let arr = []
  204. arr = res.data.sort(this.compare('sort'))
  205. this.tabbarTwo = arr
  206. this.page = {
  207. total: 0,
  208. size: 10,
  209. current: 1
  210. }
  211. this.dataList = []
  212. if (uni.getStorageSync('cname')) {
  213. this.$set(this.search, 'cname', JSON.parse(JSON.stringify(uni.getStorageSync('cname'))))
  214. uni.removeStorage('cname')
  215. this.page = {
  216. total: 0,
  217. size: 10,
  218. current: 1
  219. }
  220. this.dataList = []
  221. this.onSearch()
  222. } else {
  223. this.name = null
  224. if (this.current == -1) {
  225. this.current = 0
  226. }
  227. this.search = {
  228. whether: '0',
  229. }
  230. this.onSearch()
  231. }
  232. })
  233. },
  234. onShow() {
  235. this.getUpdate()
  236. this.getIsCloud()
  237. // 获取审核状态
  238. details().then(res => {
  239. this.checkStatus = res.data.checkStatus
  240. uni.setStorageSync('checkStatus', res.data.checkStatus);
  241. // if (this.checkStatus != '通过') {
  242. // uni.showToast({
  243. // title: "当前用户未授权,请联系客服",
  244. // icon: "none",
  245. // mask:true
  246. // });
  247. // // uni.switchTab({
  248. // // url: '/pages/tabBar/home'
  249. // // })
  250. // return
  251. // }
  252. this.salesmanName = res.data.salesmanName
  253. // 查询业务员详情拿取手机号
  254. if (!this.phoneNumber) {
  255. nameDetail({
  256. id: res.data.salesmanId
  257. }).then(res => {
  258. this.phoneNumber = res.data.phone
  259. })
  260. }
  261. })
  262. this.userInfo = uni.getStorageSync('userInfo')
  263. // 获取最近搜索数据
  264. if (uni.getStorageSync('recentSearches')) {
  265. this.recentSearches = uni.getStorageSync('recentSearches').slice(0, 8);
  266. }
  267. },
  268. methods: {
  269. getIsCloud(){
  270. isProcurement({
  271. "param": "cloud_warehouse"
  272. }).then(res => {
  273. console.info('res-----', res)
  274. this.cloudWarehouse = res.data
  275. })
  276. },
  277. getUpdate() {
  278. const updateManager = uni.getUpdateManager();
  279. updateManager.onCheckForUpdate(function(res) {
  280. // 请求完新版本信息的回调
  281. if (res.hasUpdate) {
  282. updateManager.onUpdateReady(function() {
  283. uni.showModal({
  284. title: '更新提示',
  285. content: '新版本已经准备好,是否重启应用?',
  286. success: function(res) {
  287. if (res.confirm) {
  288. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  289. updateManager.applyUpdate();
  290. }
  291. }
  292. });
  293. });
  294. updateManager.onUpdateFailed(function() {
  295. // 新的版本下载失败
  296. uni.showModal({
  297. title: '已经有新版本了哟~',
  298. content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
  299. });
  300. });
  301. }
  302. });
  303. },
  304. opensalesman() {
  305. if (this.checkStatus != '通过') {
  306. uni.showToast({
  307. title: "当前用户未授权,请联系客服",
  308. icon: "none",
  309. mask: true
  310. });
  311. return
  312. }
  313. this.salesmanShow = true
  314. },
  315. openBrand() {
  316. if (this.checkStatus != '通过') {
  317. uni.showToast({
  318. title: "当前用户未授权,请联系客服",
  319. icon: "none",
  320. mask: true
  321. });
  322. return
  323. }
  324. this.$refs.popup.open('bottom')
  325. },
  326. goTop(e) {
  327. // 解决view层不同步的问题
  328. this.scrollTop = this.old.scrollTop
  329. this.$nextTick(() => {
  330. this.scrollTop = 0
  331. this.old.scrollTop = 0
  332. });
  333. },
  334. scroll(e) {
  335. this.old.scrollTop = e.detail.scrollTop
  336. },
  337. // 数组排序 property:根据什么属性排序
  338. compare(property) {
  339. return function(a, b) {
  340. var value1 = a[property]
  341. var value2 = b[property]
  342. return value1 - value2
  343. }
  344. },
  345. // 点击联系业务员
  346. clickCall() {
  347. uni.makePhoneCall({
  348. phoneNumber: this.phoneNumber,
  349. success: function() {
  350. console.log('拨打电话成功');
  351. },
  352. fail() {
  353. console.log('打电话失败了');
  354. }
  355. })
  356. },
  357. // 清空搜索条件
  358. emptyfun() {
  359. this.name = ''
  360. this.current = -1
  361. this.radios.map((item, index) => {
  362. item.checked = false
  363. });
  364. this.checkboxValue = []
  365. this.search = {
  366. whether: '0'
  367. }
  368. this.page = {
  369. total: 0,
  370. size: 10,
  371. current: 1
  372. }
  373. this.dataList = []
  374. this.onSearch()
  375. },
  376. checkboxChange(value, index) {
  377. if (this.checkStatus != '通过') {
  378. uni.showToast({
  379. title: "当前用户未授权,请联系客服",
  380. icon: "none",
  381. mask: true
  382. });
  383. return
  384. }
  385. this.radios.map((item, index) => {
  386. item.checked = item.label === value ? true : false;
  387. });
  388. this.checkboxValue = value
  389. this.search.originalFactory = null
  390. this.search.selfRecovery = null
  391. this.search.explosionProof = null
  392. if (this.checkboxValue.indexOf('静音棉') != -1) {
  393. this.search.originalFactory = 1
  394. }
  395. if (this.checkboxValue.indexOf('自修补') != -1) {
  396. this.search.selfRecovery = 1
  397. }
  398. if (this.checkboxValue.indexOf('防爆') != -1) {
  399. this.search.explosionProof = 1
  400. }
  401. this.page = {
  402. total: 0,
  403. size: 10,
  404. current: 1
  405. }
  406. this.dataList = []
  407. this.onSearch()
  408. },
  409. // 加入购物车
  410. shoppingCartfun(row) {
  411. if (this.checkStatus != '通过') {
  412. uni.showToast({
  413. title: "当前用户未授权,请联系客服",
  414. icon: "none",
  415. mask: true
  416. });
  417. return
  418. }
  419. if (row.inventory == 0) {
  420. uni.showToast({
  421. title: "当前商品库存为零",
  422. icon: "none",
  423. mask: true,
  424. duration: 2500
  425. });
  426. return
  427. }
  428. uni.showLoading({
  429. title: '加载中',
  430. mask: true
  431. });
  432. if (uni.getStorageSync('whether_openShare') == 1) {
  433. // 获取详情数据
  434. appDetailNew({
  435. id: row.id
  436. }).then(res => {
  437. if (res.data.type == 0) {
  438. this.form = res.data.thisLocality
  439. } else {
  440. this.form = res.data.offsite
  441. }
  442. addToCart({
  443. ...this.form,
  444. whetherIntegral: '0',
  445. detailsText: ''
  446. }).then(res => {
  447. uni.showToast({
  448. title: "加入购物车成功",
  449. icon: "none",
  450. mask: true,
  451. duration: 2500
  452. });
  453. uni.switchTab({
  454. url: '/pages/tabBar/shoppingCart',
  455. })
  456. uni.hideLoading();
  457. }).catch(err => {
  458. uni.hideLoading();
  459. })
  460. })
  461. } else {
  462. // 获取详情数据
  463. appDetail({
  464. id: row.id
  465. }).then(res => {
  466. if (res.data.type == 0) {
  467. this.form = res.data.thisLocality
  468. } else {
  469. this.form = res.data.offsite
  470. }
  471. addToCart({
  472. ...this.form,
  473. whetherIntegral: '0',
  474. detailsText: ''
  475. }).then(res => {
  476. uni.showToast({
  477. title: "加入购物车成功",
  478. icon: "none",
  479. mask: true,
  480. duration: 2500
  481. });
  482. uni.switchTab({
  483. url: '/pages/tabBar/shoppingCart',
  484. })
  485. uni.hideLoading();
  486. }).catch(err => {
  487. uni.hideLoading();
  488. })
  489. })
  490. }
  491. },
  492. // 搜索全部删除
  493. searchDeletefun() {
  494. this.recentSearches = []
  495. uni.setStorageSync('recentSearches', this.recentSearches);
  496. this.searchDeleteShow = false
  497. },
  498. // 点击搜索
  499. tagSearches(name) {
  500. this.name = name
  501. this.search.cname = name
  502. this.custom()
  503. },
  504. // 最近搜索点击关闭按钮
  505. tagClose(index) {
  506. this.recentSearches.splice(index, 1)
  507. uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
  508. },
  509. selectProduct(item) {
  510. if (this.checkStatus != '通过') {
  511. uni.showToast({
  512. title: "当前用户未授权,请联系客服",
  513. icon: "none",
  514. mask: true
  515. });
  516. return
  517. }
  518. uni.$u.route('/pages/views/buyGoods/commodityDetails', {
  519. id: item.id
  520. });
  521. },
  522. inSearch() {
  523. // uni.navigateTo({
  524. // url: `/pages/tabBar/searchPage?searchData=${this.name?this.name:''}`
  525. // })
  526. },
  527. lowerBottom() {
  528. this.status = 'loading'
  529. if (this.dataList.length < this.page.total) {
  530. this.page.current++
  531. this.onSearch()
  532. } else {
  533. this.status = 'nomore'
  534. }
  535. },
  536. // 搜索
  537. custom() {
  538. if (this.userInfo.tenant_id == '000000') {
  539. uni.showToast({
  540. title: '请点右下角<我的> 授权登录!',
  541. icon: 'none'
  542. });
  543. return
  544. }
  545. if (this.checkStatus != '通过') {
  546. uni.showToast({
  547. title: "当前用户未授权,请联系客服",
  548. icon: "none",
  549. mask: true
  550. });
  551. return
  552. }
  553. this.current = -1
  554. this.page = {
  555. total: 0,
  556. size: 10,
  557. current: 1
  558. }
  559. if (this.name) {
  560. this.recentSearches.unshift(this.name)
  561. // 去重
  562. this.recentSearches = this.recentSearches.filter((item, index) => this.recentSearches.indexOf(item) ===
  563. index).slice(0, 8);
  564. uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
  565. }
  566. delete this.search.brandId
  567. this.search.cname = this.name
  568. this.dataList = []
  569. this.onSearch()
  570. },
  571. // 左侧选择
  572. swichMenu(row, index) {
  573. // this.current = index;
  574. this.page = {
  575. total: 0,
  576. size: 10,
  577. current: 1
  578. }
  579. this.search.brandId = row.id
  580. this.search.cname = this.name ? this.name : null
  581. this.dataList = []
  582. this.onSearch()
  583. this.$refs.popup.close()
  584. },
  585. // 列表数据获取
  586. onSearch() {
  587. uni.showLoading({
  588. title: '加载中',
  589. mask: true
  590. });
  591. if (this.cloudWarehouse == 1) {
  592. cloudWarehouseList({
  593. size: this.page.size,
  594. current: this.page.current,
  595. ...this.search,
  596. whetherIntegral: '0'
  597. }).then(res => {
  598. this.dataList = this.dataList.concat(res.data.records)
  599. this.page.total = res.data.total
  600. if (this.dataList.length == res.data.total) {
  601. this.status = 'nomore'
  602. }
  603. uni.hideLoading();
  604. }).catch(err => {
  605. uni.hideLoading();
  606. })
  607. } else {
  608. if (uni.getStorageSync('whether_openShare') == 1) {
  609. goodsListNew({
  610. size: this.page.size,
  611. current: this.page.current,
  612. ...this.search,
  613. whetherIntegral: '0'
  614. }).then(res => {
  615. this.dataList = this.dataList.concat(res.data.records)
  616. this.page.total = res.data.total
  617. if (this.dataList.length == res.data.total) {
  618. this.status = 'nomore'
  619. }
  620. uni.hideLoading();
  621. }).catch(err => {
  622. uni.hideLoading();
  623. })
  624. } else {
  625. goodsList({
  626. size: this.page.size,
  627. current: this.page.current,
  628. ...this.search,
  629. whetherIntegral: '0'
  630. }).then(res => {
  631. this.dataList = this.dataList.concat(res.data.records)
  632. this.page.total = res.data.total
  633. if (this.dataList.length == res.data.total) {
  634. this.status = 'nomore'
  635. }
  636. uni.hideLoading();
  637. }).catch(err => {
  638. uni.hideLoading();
  639. })
  640. }
  641. }
  642. },
  643. }
  644. }
  645. </script>
  646. <style lang="scss" scoped>
  647. .suspensionBox {
  648. width: 80rpx;
  649. height: 80rpx;
  650. background: #fff;
  651. border-radius: 50%;
  652. position: fixed;
  653. top: 92%;
  654. right: 40rpx;
  655. box-shadow: 4px 4px 8px 1px rgba(0, 0, 0, .5);
  656. display: flex;
  657. align-items: center;
  658. justify-content: center;
  659. }
  660. .brandImg {
  661. display: flex;
  662. flex-direction: column;
  663. align-items: center;
  664. justify-content: center;
  665. margin: 10rpx 0;
  666. .text {
  667. white-space: nowrap;
  668. overflow: hidden;
  669. text-overflow: ellipsis;
  670. width: 130rpx;
  671. text-align: center;
  672. font-size: 24rpx;
  673. color: #797979;
  674. }
  675. }
  676. .tagClass {
  677. display: flex;
  678. padding: 8rpx 63rpx 18rpx 63rpx;
  679. background-color: #fff;
  680. justify-content: space-around;
  681. ::v-deep .u-tag--mini {
  682. font-size: 28rpx;
  683. line-height: 22px;
  684. padding: 0rpx 24rpx;
  685. }
  686. }
  687. .card {
  688. display: flex;
  689. align-items: center;
  690. background-color: #fff;
  691. width: 100%;
  692. margin-top: 28rpx;
  693. .cardImg {
  694. margin: 31rpx;
  695. width: 180rpx;
  696. height: 180rpx;
  697. border: 2rpx solid #E7E7E7;
  698. }
  699. .cardName {
  700. font-weight: 400;
  701. font-size: 24rpx;
  702. height: 64rpx;
  703. width: 400rpx;
  704. color: #797979;
  705. display: -webkit-box;
  706. -webkit-box-orient: vertical;
  707. -webkit-line-clamp: 2;
  708. overflow: hidden;
  709. text-overflow: ellipsis;
  710. // margin-bottom: 28rpx;
  711. }
  712. .cardTitle {
  713. font-weight: 400;
  714. font-size: 24rpx;
  715. width: 400rpx;
  716. .cardRetailPrice {
  717. display: flex;
  718. color: #909399;
  719. font-size: 22rpx;
  720. height: 28rpx;
  721. }
  722. }
  723. .cardTab {
  724. position: relative;
  725. top: 4rpx;
  726. .cardKc {
  727. text-align: center;
  728. position: absolute;
  729. right: 0rpx;
  730. top: 3rpx;
  731. font-size: 22rpx;
  732. color: #FFFFFF;
  733. font-weight: 500;
  734. width: 49rpx;
  735. height: 26rpx;
  736. }
  737. }
  738. .cardPrice {
  739. margin-left: 10rpx;
  740. color: #E75F37;
  741. font-size: 32rpx;
  742. font-weight: 500;
  743. }
  744. }
  745. .recentSearches {
  746. padding: 8rpx 12rpx;
  747. background-color: #fff;
  748. .recentSearches-head {
  749. display: flex;
  750. align-items: center;
  751. justify-content: space-between;
  752. color: #C4C4C4;
  753. .recentSearches-headLeft {
  754. display: flex;
  755. align-items: center;
  756. }
  757. .recentSearches-headRight {}
  758. }
  759. .recentSearches-text {
  760. display: flex;
  761. flex-wrap: wrap;
  762. align-items: baseline;
  763. ::v-deep .u-tag__close {
  764. z-index: 99 !important;
  765. }
  766. }
  767. }
  768. </style>