home.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  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" v-show="showIcon"
  68. mode="aspectFit" class='imgIcon' />
  69. <image v-if="item.inventoryLocal == 0&&item.inventoryShare > 0" v-show="showIcon"
  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. showIcon: true
  188. }
  189. },
  190. onPageScroll(e) {
  191. this.scrollTop = e.scrollTop;
  192. },
  193. onPullDownRefresh() {
  194. // 调用数据刷新方法
  195. this.refreshData();
  196. setTimeout(() => {
  197. uni.stopPullDownRefresh(); // 停止下拉刷新动画
  198. }, 1000);
  199. },
  200. onReachBottom() {
  201. this.status = 'loading'
  202. if (this.dataList.length < this.page.total) {
  203. this.page.current++
  204. this.onSearch()
  205. } else {
  206. this.status = 'nomore'
  207. }
  208. },
  209. onLoad(e) {
  210. this.getIsCloud()
  211. isProcurement({
  212. "param": "whether.open.share"
  213. }).then(res => {
  214. uni.setStorageSync('whether_openShare', res.data);
  215. })
  216. this.userInfo = uni.getStorageSync('userInfo')
  217. // 轮播图
  218. brandDescList({
  219. type: 'LBT',
  220. whetherIntegral: "0"
  221. }).then(res => {
  222. brandDescDetail({
  223. id: res.data.records[0].id
  224. }).then(res => {
  225. this.list3 = res.data.brandFilesList.map(item => {
  226. return item.url
  227. })
  228. })
  229. })
  230. uni.showLoading({
  231. title: '加载中',
  232. mask: true
  233. });
  234. // 判断是怎么登录的
  235. if (JSON.parse(JSON.stringify(uni.getStorageSync('userInfo'))).tenant_id != '000000') {
  236. // 查看是否有客户信息
  237. validationCorpEmpty().then(res => {
  238. uni.hideLoading();
  239. //获取公司名称
  240. userDept().then(res => {
  241. uni.setNavigationBarTitle({
  242. title: res.data.fullName
  243. })
  244. })
  245. //获取所有品牌
  246. listAll({
  247. type: 'PP',
  248. enableOrNot: '1',
  249. whetherIntegral: '0'
  250. }).then(res => {
  251. this.zsbrandList = []
  252. this.brandList = []
  253. // this.zsbrandList = res.data
  254. this.zsbrandList = res.data.sort(this.compare('sort'))
  255. if (this.zsbrandList.length <= 10) {
  256. this.gengduofalse = false
  257. this.brandList = this.zsbrandList
  258. } else {
  259. for (let i in res.data) {
  260. if (i < this.brandDescfor) {
  261. this.brandList.push(res.data[i])
  262. }
  263. }
  264. }
  265. })
  266. this.page = {
  267. total: 0,
  268. size: 10,
  269. current: 1
  270. }
  271. this.dataList = []
  272. this.onSearch()
  273. }).catch(err => {
  274. uni.hideLoading();
  275. uni.$u.route('/pages/views/personalInformation/index');
  276. })
  277. } else {
  278. uni.setNavigationBarTitle({
  279. title: '青岛途宝'
  280. })
  281. //获取所有品牌
  282. listAll({
  283. type: 'PP',
  284. enableOrNot: '1',
  285. whetherIntegral: '0'
  286. }).then(res => {
  287. this.zsbrandList = []
  288. this.brandList = []
  289. // this.zsbrandList = res.data
  290. this.zsbrandList = res.data.sort(this.compare('sort'))
  291. if (this.zsbrandList.length <= 10) {
  292. this.gengduofalse = false
  293. this.brandList = this.zsbrandList
  294. } else {
  295. for (let i in res.data) {
  296. if (i < this.brandDescfor) {
  297. this.brandList.push(res.data[i])
  298. }
  299. }
  300. }
  301. })
  302. this.page = {
  303. total: 0,
  304. size: 10,
  305. current: 1
  306. }
  307. this.dataList = []
  308. this.onSearch()
  309. }
  310. uni.hideLoading();
  311. },
  312. onShow() {
  313. this.getIsShowIcon()
  314. this.getIsCloud()
  315. this.getUpdate()
  316. activityList({
  317. current: 1,
  318. size: 10,
  319. status: 1
  320. }).then(res => {
  321. uni.setTabBarBadge({
  322. index: 1, // tabIndex,tabBar的哪一项,从0开始
  323. text: res.data.total.toString() // 显示的文本,超过 99 显示成 “…”
  324. })
  325. })
  326. shoppingCartList({
  327. whetherIntegral: '0'
  328. }).then(res => {
  329. let num = 0
  330. res.data.forEach(e => {
  331. num = num + e.list.length
  332. })
  333. uni.setTabBarBadge({
  334. index: 3, // tabIndex,tabBar的哪一项,从0开始
  335. text: num.toString() // 显示的文本,超过 99 显示成 “…”
  336. })
  337. })
  338. // 获取审核状态
  339. details().then(res => {
  340. this.checkStatus = res.data.checkStatus
  341. this.enableOrNot = res.data.enableOrNot
  342. uni.setStorageSync('checkStatus', res.data.checkStatus);
  343. uni.setStorageSync('enableOrNot', res.data.enableOrNot);
  344. // 查询业务员详情拿取手机号
  345. this.salesmanName = res.data.salesmanName
  346. if (!this.phoneNumber) {
  347. nameDetail({
  348. id: res.data.salesmanId
  349. }).then(res => {
  350. this.phoneNumber = res.data.phone
  351. })
  352. }
  353. })
  354. },
  355. methods: {
  356. getIsShowIcon(){
  357. isProcurement({
  358. "param": "show.icon"
  359. }).then(res => {
  360. console.info('res-----', res)
  361. console.info('res-----', Number(res.data))
  362. this.showIcon = Number(res.data) === 0
  363. })
  364. },
  365. getIsCloud(){
  366. isProcurement({
  367. "param": "cloud_warehouse"
  368. }).then(res => {
  369. console.info('res-----', res)
  370. this.cloudWarehouse = res.data
  371. })
  372. },
  373. getUpdate() {
  374. const updateManager = uni.getUpdateManager();
  375. updateManager.onCheckForUpdate(function(res) {
  376. // 请求完新版本信息的回调
  377. if (res.hasUpdate) {
  378. updateManager.onUpdateReady(function() {
  379. uni.showModal({
  380. title: '更新提示',
  381. content: '新版本已经准备好,是否重启应用?',
  382. success: function(res) {
  383. if (res.confirm) {
  384. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  385. updateManager.applyUpdate();
  386. }
  387. }
  388. });
  389. });
  390. updateManager.onUpdateFailed(function() {
  391. // 新的版本下载失败
  392. uni.showModal({
  393. title: '已经有新版本了哟~',
  394. content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
  395. });
  396. });
  397. }
  398. });
  399. },
  400. refreshData() {
  401. listAll({
  402. type: 'PP',
  403. enableOrNot: '1',
  404. whetherIntegral: '0'
  405. }).then(res => {
  406. this.zsbrandList = []
  407. this.brandList = []
  408. // this.zsbrandList = res.data
  409. this.zsbrandList = res.data.sort(this.compare('sort'))
  410. if (this.zsbrandList.length <= 10) {
  411. this.gengduofalse = false
  412. this.brandList = this.zsbrandList
  413. } else {
  414. for (let i in res.data) {
  415. if (i < this.brandDescfor) {
  416. this.brandList.push(res.data[i])
  417. }
  418. }
  419. }
  420. })
  421. this.page = {
  422. total: 0,
  423. size: 10,
  424. current: 1
  425. }
  426. this.search = {}
  427. this.dataList = []
  428. this.onSearch()
  429. },
  430. insearchPage() {
  431. if (this.checkStatus != '通过') {
  432. uni.showToast({
  433. title: "当前用户未授权,请联系客服",
  434. icon: "none",
  435. mask: true
  436. });
  437. return
  438. }
  439. uni.switchTab({
  440. url: '/pages/tabBar/classification'
  441. });
  442. },
  443. // 车型
  444. clickVehicle() {
  445. if (this.checkStatus != '通过') {
  446. uni.showToast({
  447. title: "当前用户未授权,请联系客服",
  448. icon: "none",
  449. mask: true
  450. });
  451. return
  452. }
  453. this.$u.route('/pages/tabBar/vehicleModel');
  454. },
  455. swiperChange(e) {
  456. this.dotCurrent = e.detail.current;
  457. },
  458. // 点击联系业务员
  459. clickCall() {
  460. uni.makePhoneCall({
  461. phoneNumber: this.phoneNumber,
  462. success: function() {
  463. console.log('拨打电话成功');
  464. this.salesmanShow = false
  465. },
  466. fail() {
  467. console.log('打电话失败了');
  468. this.salesmanShow = false
  469. }
  470. })
  471. },
  472. // 数组排序 property:根据什么属性排序
  473. compare(property) {
  474. return function(a, b) {
  475. var value1 = a[property]
  476. var value2 = b[property]
  477. return value1 - value2
  478. }
  479. },
  480. // 更多项目盒子
  481. Moreprojectsfun() {
  482. this.brandDescfor += 5
  483. this.brandList = []
  484. console.log(123);
  485. for (let i in this.zsbrandList) {
  486. if (i < this.brandDescfor) {
  487. this.brandList.push(this.zsbrandList[i])
  488. }
  489. }
  490. if (this.brandDescfor >= this.zsbrandList.length) {
  491. this.gengduofalse = false
  492. }
  493. },
  494. // 收回项目
  495. shohuifun() {
  496. this.brandDescfor = 9
  497. this.brandList = []
  498. for (let i in this.zsbrandList) {
  499. if (i < this.brandDescfor) {
  500. this.brandList.push(this.zsbrandList[i])
  501. }
  502. }
  503. this.gengduofalse = true
  504. // if (this.brandDescfor >= this.zsbrandList.length) {
  505. // this.gengduofalse = false
  506. // }
  507. },
  508. groupChange(e) {
  509. console.log(e, 228);
  510. if (e.name == '静音棉') {
  511. this.originalFactory = 1
  512. this.selfRecovery = 0
  513. this.explosionProof = 0
  514. } else if (e.name == '自修补') {
  515. this.originalFactory = 0
  516. this.selfRecovery = 1
  517. this.explosionProof = 0
  518. } else if (e.name == '防爆') {
  519. this.originalFactory = 0
  520. this.selfRecovery = 0
  521. this.explosionProof = 1
  522. } else {
  523. this.originalFactory = 0
  524. this.selfRecovery = 0
  525. this.explosionProof = 0
  526. }
  527. this.page.current = 1
  528. this.dataList = []
  529. this.onSearch()
  530. },
  531. // 点击筛选条件
  532. dianjiqiehuan(name) {
  533. if (this[name] == 0) {
  534. this[name] = 1
  535. } else {
  536. this[name] = 0
  537. }
  538. this.click()
  539. },
  540. // 获取列表数据
  541. onSearch() {
  542. uni.showLoading({
  543. title: '加载中',
  544. mask: true
  545. });
  546. let obj = {}
  547. if (this.originalFactory) {
  548. obj.originalFactory = 1
  549. }
  550. if (this.selfRecovery) {
  551. obj.selfRecovery = 1
  552. }
  553. if (this.explosionProof) {
  554. obj.explosionProof = 1
  555. }
  556. if (this.cloudWarehouse == 1) {
  557. cloudWarehouseList({
  558. size: this.page.size,
  559. current: this.page.current,
  560. ...obj,
  561. ...this.search,
  562. whetherIntegral: 0
  563. }).then(res => {
  564. this.dataList = this.dataList.concat(res.data.records)
  565. this.page.total = res.data.total
  566. if (this.dataList.length == res.data.total) {
  567. this.status = 'nomore'
  568. }
  569. uni.hideLoading();
  570. }).catch(err => {
  571. uni.hideLoading();
  572. })
  573. } else {
  574. if (uni.getStorageSync('whether_openShare') == 1) {
  575. appListNew({
  576. size: this.page.size,
  577. current: this.page.current,
  578. ...obj,
  579. ...this.search,
  580. whetherIntegral: 0
  581. }).then(res => {
  582. this.dataList = this.dataList.concat(res.data.records)
  583. this.page.total = res.data.total
  584. if (this.dataList.length == res.data.total) {
  585. this.status = 'nomore'
  586. }
  587. uni.hideLoading();
  588. }).catch(err => {
  589. uni.hideLoading();
  590. })
  591. } else {
  592. appList({
  593. size: this.page.size,
  594. current: this.page.current,
  595. ...obj,
  596. ...this.search,
  597. whetherIntegral: 0
  598. }).then(res => {
  599. this.dataList = this.dataList.concat(res.data.records)
  600. this.page.total = res.data.total
  601. if (this.dataList.length == res.data.total) {
  602. this.status = 'nomore'
  603. }
  604. uni.hideLoading();
  605. }).catch(err => {
  606. uni.hideLoading();
  607. })
  608. }
  609. }
  610. },
  611. close() {
  612. this.show = false
  613. this.search.brandId = ''
  614. this.search.brandName = ''
  615. },
  616. // 原厂点击差号
  617. yuanchangclose(type) {
  618. if (type == 'originalFactory') {
  619. this.originalFactory = false
  620. } else if (type == 'selfRecovery') {
  621. this.selfRecovery = false
  622. } else {
  623. this.explosionProof = false
  624. }
  625. this.click()
  626. },
  627. click(name) {
  628. if (this.checkStatus != '通过') {
  629. uni.showToast({
  630. title: "当前用户未授权,请联系客服",
  631. icon: "none",
  632. mask: true
  633. });
  634. return
  635. }
  636. if (name != undefined) {
  637. this.page = {
  638. total: 0,
  639. size: 10,
  640. current: 1,
  641. }
  642. this.dataList = []
  643. if (this.PPindex == name) {
  644. this.PPindex = null
  645. delete this.search.brandId
  646. delete this.search.brandNmae
  647. } else {
  648. this.PPindex = name
  649. this.search = {
  650. ...this.search,
  651. brandId: this.brandList[this.PPindex].id,
  652. brandNmae: this.brandList[this.PPindex].cname,
  653. }
  654. }
  655. }
  656. this.show = true
  657. this.onSearch()
  658. },
  659. //打开明细
  660. choice(item, index) {
  661. if (this.checkStatus != '通过') {
  662. uni.showToast({
  663. title: "当前用户未授权,请联系客服",
  664. icon: "none",
  665. mask: true
  666. });
  667. return
  668. }
  669. uni.$u.route('/pages/views/buyGoods/commodityDetails', {
  670. id: item.id
  671. });
  672. },
  673. opensalesman() {
  674. if (this.checkStatus != '通过') {
  675. uni.showToast({
  676. title: "当前用户未授权,请联系客服",
  677. icon: "none",
  678. mask: true
  679. });
  680. return
  681. }
  682. this.salesmanShow = true
  683. },
  684. inIntegralMall() {
  685. if (this.checkStatus != '通过') {
  686. uni.showToast({
  687. title: "当前用户未授权,请联系客服",
  688. icon: "none",
  689. mask: true
  690. });
  691. // uni.switchTab({
  692. // url: '/pages/tabBar/home'
  693. // })
  694. return
  695. }
  696. uni.$u.route('/pages/integralMall/index');
  697. }
  698. }
  699. }
  700. </script>
  701. <style lang="scss" scoped>
  702. .suspensionBox {
  703. width: 80rpx;
  704. height: 80rpx;
  705. background: #fff;
  706. border-radius: 50%;
  707. position: fixed;
  708. top: 92%;
  709. right: 40rpx;
  710. box-shadow: 4px 4px 8px 1px rgba(0, 0, 0, .5);
  711. display: flex;
  712. align-items: center;
  713. justify-content: center;
  714. }
  715. .card {
  716. background-color: #fff;
  717. border-radius: 10rpx;
  718. overflow: hidden;
  719. margin: 12rpx 0;
  720. }
  721. .carBtn {
  722. display: flex;
  723. align-items: center;
  724. justify-content: center;
  725. color: #E75F37;
  726. font-weight: bold;
  727. width: 25%;
  728. text-align: center;
  729. background-color: #fff;
  730. height: 64rpx;
  731. border-radius: 36rpx;
  732. margin-right: 20rpx;
  733. }
  734. .brandImg {
  735. display: flex;
  736. flex-direction: column;
  737. align-items: center;
  738. justify-content: center;
  739. margin: 16rpx 0;
  740. .text {
  741. white-space: nowrap;
  742. overflow: hidden;
  743. text-overflow: ellipsis;
  744. width: 140rpx;
  745. text-align: center;
  746. font-size: 24rpx;
  747. color: #797979;
  748. }
  749. }
  750. .goodsImg {
  751. display: flex;
  752. flex-direction: column;
  753. align-items: center;
  754. justify-content: center;
  755. margin: 16rpx 0;
  756. .text {
  757. white-space: nowrap;
  758. overflow: hidden;
  759. text-overflow: ellipsis;
  760. width: 300rpx;
  761. text-align: center;
  762. font-size: 24rpx;
  763. color: #797979;
  764. }
  765. }
  766. .container {
  767. position: relative;
  768. }
  769. .background-image {
  770. position: absolute;
  771. z-index: -1;
  772. /* 将图片置于组件后面 */
  773. }
  774. .imgIcon {
  775. position: absolute;
  776. width: 100rpx;
  777. height: 35rpx;
  778. top: 16rpx;
  779. right: 36rpx;
  780. }
  781. </style>