home.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. <template>
  2. <view class="container">
  3. <image class="background-image" src="/static/images/tabBar/527@2x.png" style="width: 100%;height: 320rpx;"
  4. mode="scaleToFill"></image>
  5. <view>
  6. <view style="display: flex;align-items: center;">
  7. <view style="width: 75%;">
  8. <!-- <uni-search-bar radius="100" placeholder="请输入商品名称" readonly bgColor="#fff"/> -->
  9. <u-search placeholder="请输入商品名称" bgColor="#fff" readonly :showAction="false"
  10. searchIconColor='#E75F37' :searchIconSize='24' margin='20rpx' disabled
  11. @click="insearchPage"></u-search>
  12. </view>
  13. <view style="height: 64rpx;width: 25%;" @click="clickVehicle">
  14. <image class="background-image" src="/static/images/tabBar/car@2x.png"
  15. style="width:164rpx;height: 64rpx;" mode="scaleToFill"></image>
  16. </view>
  17. </view>
  18. </view>
  19. <view style="padding: 0 20rpx 20rpx 20rpx;">
  20. <view style="border-radius: 10rpx;overflow: hidden;" v-if="list3.length>0">
  21. <uni-swiper-dot :info="list3" :current="dotCurrent" mode="round" :dots-styles="dotsStyles">
  22. <swiper circular :autoplay="true" :interval="2000" :duration="500" @change="swiperChange">
  23. <swiper-item v-for="(item,index) in list3" :key="index">
  24. <image mode="scaleToFill" :src="item" @error="imageError" style="width: 100%;height: 100%;">
  25. </image>
  26. </swiper-item>
  27. </swiper>
  28. </uni-swiper-dot>
  29. </view>
  30. <view class="card" v-if="brandList.length >0" style="padding: 20rpx;">
  31. <uni-grid :column="5" :show-border="false" :square="false" :highlight="false">
  32. <uni-grid-item v-for="(item ,index) in brandList" :key="index">
  33. <view class="brandImg" @click="click(index)">
  34. <image :src="item.brandFilesList[0].url" mode="aspectFit"
  35. style="width:88rpx;height: 88rpx;border-radius: 100%;" />
  36. <text class="text">{{item.cname}}</text>
  37. </view>
  38. </uni-grid-item>
  39. <uni-grid-item v-if="brandList.length >= 9 && gengduofalse">
  40. <view class="brandImg" @click="Moreprojectsfun">
  41. <image src="/static/images/view/buyGoods/2842x.png" mode="aspectFit"
  42. style="width:88rpx;height: 88rpx;border-radius: 100%;" />
  43. <text class="text">更多品牌</text>
  44. </view>
  45. </uni-grid-item>
  46. <uni-grid-item v-if="brandList.length >= zsbrandList.length && zsbrandList.length > 8">
  47. <view class="brandImg" @click="shohuifun">
  48. <image src="../../static/images/view/buyGoods/fanhui.png" mode="aspectFit"
  49. style="width:88rpx;height: 88rpx;border-radius: 100%;" />
  50. <text class="text">回收品牌</text>
  51. </view>
  52. </uni-grid-item>
  53. </uni-grid>
  54. </view>
  55. <view @click="inIntegralMall">
  56. <image src="/static/images/tabBar/JF.png" style="width: 100%;height: 251rpx;" mode="scaleToFill">
  57. </image>
  58. </view>
  59. <view class="card">
  60. <u-tabs :list="dianjiqielist" v-model="groupModel" @click="groupChange" :lineHeight='0'
  61. :activeStyle="activeStyle" :inactiveStyle="inactiveStyle"></u-tabs>
  62. <view style="padding: 16rpx;border-top: 2px #F1F1F1 solid;;">
  63. <uni-grid :column="2" :show-border="false" :square="false" :highlight="false"
  64. v-if="dataList.length > 0">
  65. <uni-grid-item v-for="(item ,index) in dataList" :key="index">
  66. <view class="goodsImg" @click="choice(item,index)">
  67. <image v-if="item.inventoryLocal > 0" src="/static/images/tabBar/xsd2x.png"
  68. mode="aspectFit" class='imgIcon' />
  69. <image v-if="item.inventoryLocal == 0&&item.inventoryShare > 0"
  70. src="/static/images/tabBar/crd2x.png" mode="aspectFit" class='imgIcon' />
  71. <image :src="item.url" mode="aspectFit"
  72. style="width:300rpx;height:300rpx;border-radius:20rpx;border: 2rpx #E7E7E7 solid;" />
  73. <text class="text">{{item.cname}}</text>
  74. <text
  75. style="color:#E75F37;width: 300rpx;font-weight: bold;font-size: 32rpx;">¥{{checkStatus == '通过'?item.mallPrice:'***'}}</text>
  76. </view>
  77. </uni-grid-item>
  78. </uni-grid>
  79. <u-empty v-if="dataList.length == 0" mode="list" icon="/static/images/tabBar/emptylist.jpg"
  80. text='暂无数据' />
  81. </view>
  82. </view>
  83. <u-loadmore v-if="page.total !== 0 && dataList.length != 0" :status="status" />
  84. <u-back-top :scroll-top="scrollTop"></u-back-top>
  85. <view v-if="userInfo.tenant_id != '000000'" class="suspensionBox" @click="opensalesman">
  86. <u-icon name="server-fill" color="#2979ff" size="30"></u-icon>
  87. </view>
  88. <u-modal :show="salesmanShow" title="业务员联系方式" showCancelButton confirmText="拨号" cancelText="关闭"
  89. @confirm="clickCall" @cancel="salesmanShow=false">
  90. <view class="slot-content">
  91. <view style="margin-bottom: 10rpx;">业务员:{{salesmanName?salesmanName:''}}</view>
  92. <view>电话:{{phoneNumber?phoneNumber:''}}</view>
  93. </view>
  94. </u-modal>
  95. </view>
  96. </view>
  97. </template>
  98. <script>
  99. import {
  100. appList,
  101. appListNew,
  102. userDept,
  103. validationCorpEmpty,
  104. isProcurement,
  105. brandDescList,
  106. brandDescDetail
  107. } from '@/api/tabBar/homeNew.js'
  108. import {
  109. shoppingCartList
  110. } from '@/api/tabBar/shoppingCart.js'
  111. import {
  112. listAll
  113. } from '@/api/tabBar/classification.js'
  114. import {
  115. details,
  116. nameDetail
  117. } from '@/api/views/personalInformation/index.js'
  118. import {
  119. activityList
  120. } from '@/api/tabBar/activity.js'
  121. import {cloudWarehouseList} from '@/api/tabBar/classification.js'
  122. export default {
  123. data() {
  124. return {
  125. scrollTop: 0,
  126. activeStyle: {
  127. color: '#E75F37',
  128. fontWeight: 'bold',
  129. fontSize: '28rpx'
  130. },
  131. inactiveStyle: {
  132. color: '#797979',
  133. fontSize: '28rpx'
  134. },
  135. dotsStyles: {
  136. backgroundColor: 'rgba(0, 0, 0, .1)',
  137. border: '1px #fff solid',
  138. color: '#fff',
  139. selectedBackgroundColor: '#fff',
  140. selectedBorder: '1px #fff solid'
  141. },
  142. dotCurrent: 0,
  143. show: false,
  144. search: {},
  145. page: {
  146. total: 0,
  147. size: 10,
  148. current: 1
  149. },
  150. status: 'loadmore',
  151. dataList: [],
  152. list3: [],
  153. brandList: [],
  154. // 静音棉
  155. originalFactory: 0,
  156. // 自修补
  157. selfRecovery: 0,
  158. // 防爆
  159. explosionProof: 0,
  160. dianjiqielist: [{
  161. name: '全部',
  162. },
  163. {
  164. name: '静音棉',
  165. },
  166. {
  167. name: '自修补',
  168. },
  169. {
  170. name: '防爆',
  171. }
  172. ],
  173. groupModel: null,
  174. PPindex: null,
  175. // 品牌
  176. zsbrandList: [],
  177. brandDescfor: 9,
  178. gengduofalse: true,
  179. // 审核状态
  180. checkStatus: '',
  181. enableOrNot: '',
  182. salesmanName: '', // 业务员姓名
  183. phoneNumber: '', // 业务员联系电话
  184. salesmanShow: false, // 联系业务员弹窗
  185. userInfo: {}, // 当前用户数据
  186. cloudWarehouse: 0
  187. }
  188. },
  189. onPageScroll(e) {
  190. this.scrollTop = e.scrollTop;
  191. },
  192. onPullDownRefresh() {
  193. // 调用数据刷新方法
  194. this.refreshData();
  195. setTimeout(() => {
  196. uni.stopPullDownRefresh(); // 停止下拉刷新动画
  197. }, 1000);
  198. },
  199. onReachBottom() {
  200. this.status = 'loading'
  201. if (this.dataList.length < this.page.total) {
  202. this.page.current++
  203. this.onSearch()
  204. } else {
  205. this.status = 'nomore'
  206. }
  207. },
  208. onLoad(e) {
  209. this.getIsCloud()
  210. isProcurement({
  211. "param": "whether.open.share"
  212. }).then(res => {
  213. uni.setStorageSync('whether_openShare', res.data);
  214. })
  215. this.userInfo = uni.getStorageSync('userInfo')
  216. // 轮播图
  217. brandDescList({
  218. type: 'LBT',
  219. whetherIntegral: "0"
  220. }).then(res => {
  221. brandDescDetail({
  222. id: res.data.records[0].id
  223. }).then(res => {
  224. this.list3 = res.data.brandFilesList.map(item => {
  225. return item.url
  226. })
  227. })
  228. })
  229. uni.showLoading({
  230. title: '加载中',
  231. mask: true
  232. });
  233. // 判断是怎么登录的
  234. if (JSON.parse(JSON.stringify(uni.getStorageSync('userInfo'))).tenant_id != '000000') {
  235. // 查看是否有客户信息
  236. validationCorpEmpty().then(res => {
  237. uni.hideLoading();
  238. //获取公司名称
  239. userDept().then(res => {
  240. uni.setNavigationBarTitle({
  241. title: res.data.fullName
  242. })
  243. })
  244. //获取所有品牌
  245. listAll({
  246. type: 'PP',
  247. enableOrNot: '1',
  248. whetherIntegral: '0'
  249. }).then(res => {
  250. this.zsbrandList = []
  251. this.brandList = []
  252. // this.zsbrandList = res.data
  253. this.zsbrandList = res.data.sort(this.compare('sort'))
  254. if (this.zsbrandList.length <= 10) {
  255. this.gengduofalse = false
  256. this.brandList = this.zsbrandList
  257. } else {
  258. for (let i in res.data) {
  259. if (i < this.brandDescfor) {
  260. this.brandList.push(res.data[i])
  261. }
  262. }
  263. }
  264. })
  265. this.page = {
  266. total: 0,
  267. size: 10,
  268. current: 1
  269. }
  270. this.dataList = []
  271. this.onSearch()
  272. }).catch(err => {
  273. uni.hideLoading();
  274. uni.$u.route('/pages/views/personalInformation/index');
  275. })
  276. } else {
  277. uni.setNavigationBarTitle({
  278. title: '青岛途宝'
  279. })
  280. //获取所有品牌
  281. listAll({
  282. type: 'PP',
  283. enableOrNot: '1',
  284. whetherIntegral: '0'
  285. }).then(res => {
  286. this.zsbrandList = []
  287. this.brandList = []
  288. // this.zsbrandList = res.data
  289. this.zsbrandList = res.data.sort(this.compare('sort'))
  290. if (this.zsbrandList.length <= 10) {
  291. this.gengduofalse = false
  292. this.brandList = this.zsbrandList
  293. } else {
  294. for (let i in res.data) {
  295. if (i < this.brandDescfor) {
  296. this.brandList.push(res.data[i])
  297. }
  298. }
  299. }
  300. })
  301. this.page = {
  302. total: 0,
  303. size: 10,
  304. current: 1
  305. }
  306. this.dataList = []
  307. this.onSearch()
  308. }
  309. uni.hideLoading();
  310. },
  311. onShow() {
  312. this.getIsCloud()
  313. this.getUpdate()
  314. activityList({
  315. current: 1,
  316. size: 10,
  317. status: 1
  318. }).then(res => {
  319. uni.setTabBarBadge({
  320. index: 1, // tabIndex,tabBar的哪一项,从0开始
  321. text: res.data.total.toString() // 显示的文本,超过 99 显示成 “…”
  322. })
  323. })
  324. shoppingCartList({
  325. whetherIntegral: '0'
  326. }).then(res => {
  327. let num = 0
  328. res.data.forEach(e => {
  329. num = num + e.list.length
  330. })
  331. uni.setTabBarBadge({
  332. index: 3, // tabIndex,tabBar的哪一项,从0开始
  333. text: num.toString() // 显示的文本,超过 99 显示成 “…”
  334. })
  335. })
  336. // 获取审核状态
  337. details().then(res => {
  338. this.checkStatus = res.data.checkStatus
  339. this.enableOrNot = res.data.enableOrNot
  340. uni.setStorageSync('checkStatus', res.data.checkStatus);
  341. uni.setStorageSync('enableOrNot', res.data.enableOrNot);
  342. // 查询业务员详情拿取手机号
  343. this.salesmanName = res.data.salesmanName
  344. if (!this.phoneNumber) {
  345. nameDetail({
  346. id: res.data.salesmanId
  347. }).then(res => {
  348. this.phoneNumber = res.data.phone
  349. })
  350. }
  351. })
  352. },
  353. methods: {
  354. getIsCloud(){
  355. isProcurement({
  356. "param": "cloud_warehouse"
  357. }).then(res => {
  358. console.info('res-----', res)
  359. this.cloudWarehouse = res.data
  360. })
  361. },
  362. getUpdate() {
  363. const updateManager = uni.getUpdateManager();
  364. updateManager.onCheckForUpdate(function(res) {
  365. // 请求完新版本信息的回调
  366. if (res.hasUpdate) {
  367. updateManager.onUpdateReady(function() {
  368. uni.showModal({
  369. title: '更新提示',
  370. content: '新版本已经准备好,是否重启应用?',
  371. success: function(res) {
  372. if (res.confirm) {
  373. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  374. updateManager.applyUpdate();
  375. }
  376. }
  377. });
  378. });
  379. updateManager.onUpdateFailed(function() {
  380. // 新的版本下载失败
  381. uni.showModal({
  382. title: '已经有新版本了哟~',
  383. content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
  384. });
  385. });
  386. }
  387. });
  388. },
  389. refreshData() {
  390. listAll({
  391. type: 'PP',
  392. enableOrNot: '1',
  393. whetherIntegral: '0'
  394. }).then(res => {
  395. this.zsbrandList = []
  396. this.brandList = []
  397. // this.zsbrandList = res.data
  398. this.zsbrandList = res.data.sort(this.compare('sort'))
  399. if (this.zsbrandList.length <= 10) {
  400. this.gengduofalse = false
  401. this.brandList = this.zsbrandList
  402. } else {
  403. for (let i in res.data) {
  404. if (i < this.brandDescfor) {
  405. this.brandList.push(res.data[i])
  406. }
  407. }
  408. }
  409. })
  410. this.page = {
  411. total: 0,
  412. size: 10,
  413. current: 1
  414. }
  415. this.search = {}
  416. this.dataList = []
  417. this.onSearch()
  418. },
  419. insearchPage() {
  420. if (this.checkStatus != '通过') {
  421. uni.showToast({
  422. title: "当前用户未授权,请联系客服",
  423. icon: "none",
  424. mask: true
  425. });
  426. return
  427. }
  428. uni.switchTab({
  429. url: '/pages/tabBar/classification'
  430. });
  431. },
  432. // 车型
  433. clickVehicle() {
  434. if (this.checkStatus != '通过') {
  435. uni.showToast({
  436. title: "当前用户未授权,请联系客服",
  437. icon: "none",
  438. mask: true
  439. });
  440. return
  441. }
  442. this.$u.route('/pages/tabBar/vehicleModel');
  443. },
  444. swiperChange(e) {
  445. this.dotCurrent = e.detail.current;
  446. },
  447. // 点击联系业务员
  448. clickCall() {
  449. uni.makePhoneCall({
  450. phoneNumber: this.phoneNumber,
  451. success: function() {
  452. console.log('拨打电话成功');
  453. this.salesmanShow = false
  454. },
  455. fail() {
  456. console.log('打电话失败了');
  457. this.salesmanShow = false
  458. }
  459. })
  460. },
  461. // 数组排序 property:根据什么属性排序
  462. compare(property) {
  463. return function(a, b) {
  464. var value1 = a[property]
  465. var value2 = b[property]
  466. return value1 - value2
  467. }
  468. },
  469. // 更多项目盒子
  470. Moreprojectsfun() {
  471. this.brandDescfor += 5
  472. this.brandList = []
  473. console.log(123);
  474. for (let i in this.zsbrandList) {
  475. if (i < this.brandDescfor) {
  476. this.brandList.push(this.zsbrandList[i])
  477. }
  478. }
  479. if (this.brandDescfor >= this.zsbrandList.length) {
  480. this.gengduofalse = false
  481. }
  482. },
  483. // 收回项目
  484. shohuifun() {
  485. this.brandDescfor = 9
  486. this.brandList = []
  487. for (let i in this.zsbrandList) {
  488. if (i < this.brandDescfor) {
  489. this.brandList.push(this.zsbrandList[i])
  490. }
  491. }
  492. this.gengduofalse = true
  493. // if (this.brandDescfor >= this.zsbrandList.length) {
  494. // this.gengduofalse = false
  495. // }
  496. },
  497. groupChange(e) {
  498. console.log(e, 228);
  499. if (e.name == '静音棉') {
  500. this.originalFactory = 1
  501. this.selfRecovery = 0
  502. this.explosionProof = 0
  503. } else if (e.name == '自修补') {
  504. this.originalFactory = 0
  505. this.selfRecovery = 1
  506. this.explosionProof = 0
  507. } else if (e.name == '防爆') {
  508. this.originalFactory = 0
  509. this.selfRecovery = 0
  510. this.explosionProof = 1
  511. } else {
  512. this.originalFactory = 0
  513. this.selfRecovery = 0
  514. this.explosionProof = 0
  515. }
  516. this.page.current = 1
  517. this.dataList = []
  518. this.onSearch()
  519. },
  520. // 点击筛选条件
  521. dianjiqiehuan(name) {
  522. if (this[name] == 0) {
  523. this[name] = 1
  524. } else {
  525. this[name] = 0
  526. }
  527. this.click()
  528. },
  529. // 获取列表数据
  530. onSearch() {
  531. uni.showLoading({
  532. title: '加载中',
  533. mask: true
  534. });
  535. let obj = {}
  536. if (this.originalFactory) {
  537. obj.originalFactory = 1
  538. }
  539. if (this.selfRecovery) {
  540. obj.selfRecovery = 1
  541. }
  542. if (this.explosionProof) {
  543. obj.explosionProof = 1
  544. }
  545. if (this.cloudWarehouse == 1) {
  546. cloudWarehouseList({
  547. size: this.page.size,
  548. current: this.page.current,
  549. ...obj,
  550. ...this.search,
  551. whetherIntegral: 0
  552. }).then(res => {
  553. this.dataList = this.dataList.concat(res.data.records)
  554. this.page.total = res.data.total
  555. if (this.dataList.length == res.data.total) {
  556. this.status = 'nomore'
  557. }
  558. uni.hideLoading();
  559. }).catch(err => {
  560. uni.hideLoading();
  561. })
  562. } else {
  563. if (uni.getStorageSync('whether_openShare') == 1) {
  564. appListNew({
  565. size: this.page.size,
  566. current: this.page.current,
  567. ...obj,
  568. ...this.search,
  569. whetherIntegral: 0
  570. }).then(res => {
  571. this.dataList = this.dataList.concat(res.data.records)
  572. this.page.total = res.data.total
  573. if (this.dataList.length == res.data.total) {
  574. this.status = 'nomore'
  575. }
  576. uni.hideLoading();
  577. }).catch(err => {
  578. uni.hideLoading();
  579. })
  580. } else {
  581. appList({
  582. size: this.page.size,
  583. current: this.page.current,
  584. ...obj,
  585. ...this.search,
  586. whetherIntegral: 0
  587. }).then(res => {
  588. this.dataList = this.dataList.concat(res.data.records)
  589. this.page.total = res.data.total
  590. if (this.dataList.length == res.data.total) {
  591. this.status = 'nomore'
  592. }
  593. uni.hideLoading();
  594. }).catch(err => {
  595. uni.hideLoading();
  596. })
  597. }
  598. }
  599. },
  600. close() {
  601. this.show = false
  602. this.search.brandId = ''
  603. this.search.brandName = ''
  604. },
  605. // 原厂点击差号
  606. yuanchangclose(type) {
  607. if (type == 'originalFactory') {
  608. this.originalFactory = false
  609. } else if (type == 'selfRecovery') {
  610. this.selfRecovery = false
  611. } else {
  612. this.explosionProof = false
  613. }
  614. this.click()
  615. },
  616. click(name) {
  617. if (this.checkStatus != '通过') {
  618. uni.showToast({
  619. title: "当前用户未授权,请联系客服",
  620. icon: "none",
  621. mask: true
  622. });
  623. return
  624. }
  625. if (name != undefined) {
  626. this.page = {
  627. total: 0,
  628. size: 10,
  629. current: 1,
  630. }
  631. this.dataList = []
  632. if (this.PPindex == name) {
  633. this.PPindex = null
  634. delete this.search.brandId
  635. delete this.search.brandNmae
  636. } else {
  637. this.PPindex = name
  638. this.search = {
  639. ...this.search,
  640. brandId: this.brandList[this.PPindex].id,
  641. brandNmae: this.brandList[this.PPindex].cname,
  642. }
  643. }
  644. }
  645. this.show = true
  646. this.onSearch()
  647. },
  648. //打开明细
  649. choice(item, index) {
  650. if (this.checkStatus != '通过') {
  651. uni.showToast({
  652. title: "当前用户未授权,请联系客服",
  653. icon: "none",
  654. mask: true
  655. });
  656. return
  657. }
  658. uni.$u.route('/pages/views/buyGoods/commodityDetails', {
  659. id: item.id
  660. });
  661. },
  662. opensalesman() {
  663. if (this.checkStatus != '通过') {
  664. uni.showToast({
  665. title: "当前用户未授权,请联系客服",
  666. icon: "none",
  667. mask: true
  668. });
  669. return
  670. }
  671. this.salesmanShow = true
  672. },
  673. inIntegralMall() {
  674. if (this.checkStatus != '通过') {
  675. uni.showToast({
  676. title: "当前用户未授权,请联系客服",
  677. icon: "none",
  678. mask: true
  679. });
  680. // uni.switchTab({
  681. // url: '/pages/tabBar/home'
  682. // })
  683. return
  684. }
  685. uni.$u.route('/pages/integralMall/index');
  686. }
  687. }
  688. }
  689. </script>
  690. <style lang="scss" scoped>
  691. .suspensionBox {
  692. width: 80rpx;
  693. height: 80rpx;
  694. background: #fff;
  695. border-radius: 50%;
  696. position: fixed;
  697. top: 92%;
  698. right: 40rpx;
  699. box-shadow: 4px 4px 8px 1px rgba(0, 0, 0, .5);
  700. display: flex;
  701. align-items: center;
  702. justify-content: center;
  703. }
  704. .card {
  705. background-color: #fff;
  706. border-radius: 10rpx;
  707. overflow: hidden;
  708. margin: 12rpx 0;
  709. }
  710. .carBtn {
  711. display: flex;
  712. align-items: center;
  713. justify-content: center;
  714. color: #E75F37;
  715. font-weight: bold;
  716. width: 25%;
  717. text-align: center;
  718. background-color: #fff;
  719. height: 64rpx;
  720. border-radius: 36rpx;
  721. margin-right: 20rpx;
  722. }
  723. .brandImg {
  724. display: flex;
  725. flex-direction: column;
  726. align-items: center;
  727. justify-content: center;
  728. margin: 16rpx 0;
  729. .text {
  730. white-space: nowrap;
  731. overflow: hidden;
  732. text-overflow: ellipsis;
  733. width: 140rpx;
  734. text-align: center;
  735. font-size: 24rpx;
  736. color: #797979;
  737. }
  738. }
  739. .goodsImg {
  740. display: flex;
  741. flex-direction: column;
  742. align-items: center;
  743. justify-content: center;
  744. margin: 16rpx 0;
  745. .text {
  746. white-space: nowrap;
  747. overflow: hidden;
  748. text-overflow: ellipsis;
  749. width: 300rpx;
  750. text-align: center;
  751. font-size: 24rpx;
  752. color: #797979;
  753. }
  754. }
  755. .container {
  756. position: relative;
  757. }
  758. .background-image {
  759. position: absolute;
  760. z-index: -1;
  761. /* 将图片置于组件后面 */
  762. }
  763. .imgIcon {
  764. position: absolute;
  765. width: 100rpx;
  766. height: 35rpx;
  767. top: 16rpx;
  768. right: 36rpx;
  769. }
  770. </style>