index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. <template>
  2. <view>
  3. <view class="content">
  4. <view class="header-box">
  5. <UniStatusBar></UniStatusBar>
  6. <view class="title flex align_center" :style="{height:(navHeight+'px')}">
  7. <u-image src="/static/logo-h.png" width="349" height='40'></u-image>
  8. </view>
  9. </view>
  10. <view class="cbody">
  11. <view class="body-box bg-blue">
  12. <!-- 滚动区域 -->
  13. <view class="scroll-list">
  14. <scrollBox v-if="list.length&&!hasRedPacket" :list="list"></scrollBox>
  15. <scrollBox v-if="slist.length&&hasRedPacket" :list="slist"></scrollBox>
  16. </view>
  17. <!-- 保证金 -->
  18. <view class="notices flex align_center" v-if="bondRecord" @click="toPayBondAmount">
  19. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有一笔保证金待支付 ¥{{bondRecord.bondAmount}}</view>
  20. <!-- <text class="text">立即支付>></text> -->
  21. </view>
  22. <!-- 待取货提醒 -->
  23. <view class="notices flex align_center" v-if="!bondRecord&&orderTodo" @click="toOrder">
  24. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有待取货的货架订单哦!</view> <text class="text">立即处理>></text>
  25. </view>
  26. <!-- 门店审核不通过 -->
  27. <view class="notices flex justify_between" v-if="storeApply&&storeApply.auditStatus=='REFUSE'&&storeApply.readFlag=='0'">
  28. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
  29. </view>
  30. <!-- 名片 -->
  31. <view class="userCard flex align_center justify_between">
  32. <view class="userCard-info flex align_center">
  33. <view>
  34. <u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
  35. <u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
  36. </view>
  37. <view class="user-info" @click="toUser">
  38. <view v-if="!hasLogin" style="font-size: 40rpx;">
  39. 请点击登录
  40. </view>
  41. <view v-else>
  42. <view class="user-name">{{userInfo.userNameCN || userInfo.mobile}}</view>
  43. <view v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'">
  44. <u-tag text="个人用户" mode="dark" type="warning" shape="circle" size="mini" />
  45. </view>
  46. <view v-else>{{userInfo.orgName}}</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view @click="toUser">
  51. <text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
  52. {{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
  53. </text>
  54. <u-icon name="arrow-right"></u-icon>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="body-box">
  59. <!-- 扫描按钮 -->
  60. <!-- <view class="scanButton flex align_center" @click="openCamera">
  61. <u-icon name="scan" size="60"></u-icon><text class="ml10">扫描VIN</text>
  62. </view> -->
  63. <!-- 直接取货 -->
  64. <!-- <view class="scanButton flex align_center" v-if="userInfo.sysUserFlag == '1'" @click="openTakeGood">
  65. <text>没有VIN,直接取货</text>
  66. </view> -->
  67. <view class="action-button flex" v-if="userInfo.sysUserFlag == '1'">
  68. <view class="f1" @click="openTakeGood(1)">
  69. <view class="icons"><u-icon name="shujuchaxun" custom-prefix="custom-icon"></u-icon></view>
  70. <view class="tits">产品编码取货</view>
  71. </view>
  72. <view class="f2" @click="openTakeGood(0)">
  73. <view class="icons"><u-icon name="saomasoudan" custom-prefix="custom-icon"></u-icon></view>
  74. <view class="tits">二维码/条形码取货</view>
  75. </view>
  76. </view>
  77. <view style="margin-top: 20upx;">
  78. <u-swiper mode="dot" bg-color="" img-mode="widthFix" @click="clickBanner" :interval="3000" :height="374" :list="imgList"></u-swiper>
  79. </view>
  80. <!-- <u-action-sheet :list="actionList" @click="clickAction" v-model="showAction"></u-action-sheet> -->
  81. </view>
  82. <!-- 扫描记录 -->
  83. <view class="list-box">
  84. <!-- 扫描记录 -->
  85. <u-cell-group :border="false">
  86. <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" value="全部">
  87. <u-icon slot="icon" size="38" color="#066cff" style="margin-right: 0.3em;" name="order"></u-icon>
  88. </u-cell-item>
  89. </u-cell-group>
  90. <u-cell-group :border="false" v-if="hasLogin">
  91. <u-cell-item v-for="item in vinList"
  92. @click="toChoosePart(item)"
  93. :key="item.id"
  94. :title="item.vinCode"
  95. :title-style="{fontSize:'1em'}"
  96. :label="userInfo&&userInfo.sysUserFlag == '0' ? item.createDate : (item.brandName +' '+item.modelName)">
  97. <text slot="icon"></text>
  98. </u-cell-item>
  99. <view style="padding: 20upx;">
  100. <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="vinList.length==0 && status!='loading'" mode="list"></u-empty>
  101. <u-loadmore v-if="status=='loading'" :status="status" />
  102. </view>
  103. </u-cell-group>
  104. <view class="des" v-if="vinList.length&&hasLogin">仅展示最近5条记录,点击“全部”查看更多</view>
  105. <view class="des" v-if="!hasLogin">请登录后查看历史记录</view>
  106. </view>
  107. </view>
  108. </view>
  109. <u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="false"></u-tabbar>
  110. </view>
  111. </template>
  112. <script>
  113. import {
  114. mapState,
  115. mapMutations,
  116. } from 'vuex'
  117. import scrollBox from '@/components/scrollBox.vue'
  118. import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
  119. import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode } from '@/api/shelf.js'
  120. import { xprhStoreApplyRead } from '@/api/xprh.js'
  121. import { findCurrentRewardRule } from '@/api/rewardRule.js'
  122. import { listLookUp, getLookUpDatas, getCurrUserInfo } from '@/api/data.js';
  123. import { scanVinLogQueryRoll, getScanVinLogList, getScanGetMaxQty }from '@/api/car.js'
  124. import { promoTerminalList } from '@/api/video.js'
  125. import { getRewardRollList } from '@/api/rewardRule.js'
  126. export default {
  127. components: {
  128. scrollBox,
  129. UniStatusBar
  130. },
  131. data() {
  132. return {
  133. status: 'loading',
  134. noDataText: '暂无数据',
  135. bondRecord: null, // 保证金
  136. list:[], // 扫描记录滚动
  137. slist:[], // 红包滚动
  138. vinList: [],
  139. orderTodo: null,
  140. avatarUrl:'',
  141. navHeight: '44',
  142. scanMaxNums: 10,
  143. showAction: false,
  144. actionList: [
  145. {
  146. text: '扫描条形码/二维码',
  147. fontSize: 32
  148. },
  149. {
  150. text: '按产品编码查询',
  151. fontSize: 32
  152. }
  153. ],
  154. carouselList: []
  155. }
  156. },
  157. computed: {
  158. ...mapState(['hasLogin','vuex_vinScanNums','vuex_tabBarList']),
  159. hasShelf(){
  160. return this.$store.state.vuex_storeShelf
  161. },
  162. userInfo(){
  163. return this.$store.state.vuex_userInfo
  164. },
  165. storeApply(){
  166. return this.$store.state.vuex_storeAuthInfo || null
  167. },
  168. hasRedPacket(){
  169. const rule = this.$store.state.vuex_rewardRule
  170. return rule&&rule.ruleStatus == 'release'
  171. },
  172. imgList(){
  173. let list = [
  174. {
  175. image: '/static/banner1.png',
  176. activeType: ''
  177. }
  178. ]
  179. if(this.hasRedPacket&&this.hasShelf){
  180. list.push(
  181. {
  182. image: '/static/banner2.png',
  183. activeType: 'redPacket'
  184. })
  185. }
  186. return list.concat(this.carouselList)
  187. }
  188. },
  189. onReady() {
  190. this.getScrollLog()
  191. // 获取导航栏高度
  192. const res = uni.getSystemInfoSync()
  193. const system = res.platform
  194. if (system === 'android') {
  195. this.navHeight = 48
  196. } else if (system === 'ios') {
  197. this.navHeight = 44
  198. }
  199. },
  200. onLoad() {
  201. this.orderTodo = null
  202. this.bondRecord = null
  203. this.vinList = []
  204. // 视频类型
  205. this.getLookUpList('CONTENT_CATEGORY', 'vuex_videoTypeList');
  206. // 检测是否登录
  207. this.$store.dispatch('checkLogin',()=>{
  208. // 获取数据字典
  209. this.getListLookUp();
  210. // 获取支付,收款方式
  211. this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
  212. // 价格类型
  213. this.getLookUpList('PRICE_SHOW_TYPE', 'vuex_priceTypeList');
  214. // 初始化页面
  215. this.pageInit()
  216. // 查询红包活动
  217. this.getRedPacketRule()
  218. // 更新用户信息
  219. this.getCurrUserInfo()
  220. })
  221. // 刷新首页数据
  222. uni.$on("refashHome",()=>{
  223. this.pageInit()
  224. })
  225. },
  226. onUnload() {
  227. uni.$off('refashHome')
  228. },
  229. // 下拉刷新
  230. onPullDownRefresh(){
  231. this.pageInit()
  232. setTimeout(function () {
  233. uni.stopPullDownRefresh();
  234. }, 1000);
  235. },
  236. onShareAppMessage() {},
  237. onShow() {
  238. // 用户头像
  239. this.avatarUrl = uni.getStorageSync('userPhoto');
  240. if(this.hasLogin){
  241. // 更新用户信息
  242. this.getCurrUserInfo()
  243. // 查询门店认证信息
  244. if(this.userInfo.sysUserFlag == '0'){
  245. this.findLastApply()
  246. }
  247. if(this.userInfo.sysUserFlag == '1'){
  248. // 查询红包活动
  249. this.getRedPacketRule()
  250. }
  251. }
  252. },
  253. methods: {
  254. // 扫描vin
  255. beforeSwitch(index){
  256. if(index==1){
  257. this.openCamera()
  258. }else{
  259. return true
  260. }
  261. },
  262. // 轮播图片
  263. getCarousel(){
  264. this.carouselList = []
  265. const storeShelf = this.$store.state.vuex_storeShelf
  266. promoTerminalList({sn:storeShelf.dealerSn}).then(res => {
  267. if(res.status == 200){
  268. res.data&&res.data.map(item => {
  269. item.imageSet&&item.imageSet.map(k => {
  270. this.carouselList.push({
  271. image: k,
  272. title: item.title,
  273. contentType: item.contentType,
  274. id: item.id,
  275. name: item.name,
  276. promoActiveSn: item.promoActiveSn
  277. })
  278. })
  279. })
  280. }
  281. })
  282. },
  283. pageInit(){
  284. if(this.hasLogin){
  285. // 获取扫描记录
  286. this.getVinLog()
  287. // 非游客
  288. if(this.userInfo.sysUserFlag == '1'){
  289. // 查询是否有数字货架
  290. this.getStoreShelf()
  291. }else{
  292. // 获取扫描次数
  293. this.$store.dispatch("getScanNums")
  294. // 获取最大扫描次数
  295. this.getMaxQty()
  296. // 查询门店认证信息
  297. this.findLastApply()
  298. }
  299. }else{
  300. uni.removeStorageSync('token')
  301. }
  302. },
  303. // 获取数据字典
  304. getListLookUp() {
  305. const _this = this;
  306. listLookUp({ pageNo: 1, pageSize: 1000 }).then(res => {
  307. if (res.status == 200) {
  308. _this.$store.state.vuex_allLookUp = res.data;
  309. }
  310. });
  311. },
  312. // 或某一项字典列表,参数code
  313. getLookUpList(code, vuexKey) {
  314. getLookUpDatas({ type: code }).then(res => {
  315. if (res.status == 200) {
  316. this.$store.state[vuexKey] = res.data || [];
  317. }
  318. });
  319. },
  320. // 最新用户信息
  321. getCurrUserInfo(){
  322. getCurrUserInfo().then(res => {
  323. if(res.data){
  324. this.$store.state.vuex_userInfo.userNameCN = res.data.name;
  325. this.$store.state.vuex_userInfo.mobile = res.data.mobile;
  326. this.$store.state.vuex_userInfo.adminId = res.data.id;
  327. this.$store.state.vuex_userPhoto = res.data.photo;
  328. uni.setStorageSync('userPhoto', res.data.photo);
  329. }
  330. })
  331. },
  332. // 获取最大扫描数
  333. getMaxQty(){
  334. getScanGetMaxQty().then(res => {
  335. this.scanMaxNums = res.data || 10
  336. this.$store.state.vuex_scanMaxNums = this.scanMaxNums
  337. })
  338. },
  339. // 获取最新申请门店
  340. findLastApply(){
  341. const mobile = this.userInfo.mobile
  342. this.$store.dispatch('getSotreAuth',mobile)
  343. },
  344. // 知道审核不通过
  345. toKnow(){
  346. uni.showLoading({
  347. title: "正在提交"
  348. })
  349. xprhStoreApplyRead({sn:this.storeApply.applySn}).then(res => {
  350. if(res.status == 200){
  351. this.findLastApply()
  352. }
  353. uni.hideLoading()
  354. })
  355. },
  356. // 待取货数量合计
  357. shelfGetTotalWaitQty(){
  358. shelfGetTotalWaitQty({billState:'WAIT'}).then(res => {
  359. if(res.status == 200){
  360. this.orderTodo = res.data;
  361. }
  362. })
  363. },
  364. // 货架订单列表
  365. toOrder(){
  366. if(this.hasShelf){
  367. uni.navigateTo({
  368. url: "/pagesA/digitalShelf/orderList"
  369. })
  370. }else{
  371. uni.showToast({
  372. icon:'none',
  373. title: '门店没有关联数字货架,无法使用此功能!'
  374. })
  375. }
  376. },
  377. // 获取上方滚动扫描记录
  378. getScrollLog(){
  379. scanVinLogQueryRoll({pageNo:1,pageSize:50}).then(res => {
  380. console.log(res)
  381. this.list = res.data.list || []
  382. this.list.map(item => {
  383. item.placeText = item.userName + '刚刚扫描了一个VIN'
  384. })
  385. })
  386. },
  387. // 获取当前门店扫描记录
  388. getVinLog(){
  389. this.vinList = []
  390. this.status = "loading"
  391. // VISITOR:游客,EMPLOYEE:雇员
  392. getScanVinLogList({ pageNo:1, pageSize:5, identifyType: this.userInfo.identifyType }).then(res => {
  393. this.vinList = res.data&&res.data.list || []
  394. this.vinList = this.vinList.filter(item => item.vinCode)
  395. this.status = 'nomore'
  396. })
  397. },
  398. // 查询是否支持数字货架
  399. getStoreShelf(){
  400. findStoreShelf().then(res => {
  401. console.log(res)
  402. this.$store.state.vuex_storeShelf = res.data;
  403. if(res.data){
  404. // 保证金查询
  405. this.getShelfBWPayRecord()
  406. // 获取订单信息
  407. this.shelfGetTotalWaitQty()
  408. // 获取轮播数据
  409. this.getCarousel()
  410. }
  411. })
  412. },
  413. // 查询是有红包活动
  414. getRedPacketRule(){
  415. findCurrentRewardRule().then(res => {
  416. this.$store.state.vuex_rewardRule = res.data;
  417. this.getRedScroll()
  418. })
  419. },
  420. getRedScroll(){
  421. getRewardRollList({pageNo:1,pageSize:50}).then(res => {
  422. this.slist = res.data || []
  423. this.slist.map(item => {
  424. item.placeText = item.userName + '刚刚得到了'+item.totalRewardAmount+'元 红包奖励'
  425. })
  426. })
  427. },
  428. // 获取保证金金额
  429. getShelfBWPayRecord(){
  430. const data = this.$store.state.vuex_storeShelf
  431. shelfBondRecordWaitPayRecord({shelfSn: data.shelfSn, storeSn: data.storeSn}).then(res => {
  432. console.log(res,'获取保证金金额')
  433. this.bondRecord = res.data
  434. })
  435. },
  436. // 保证金支付
  437. toPayBondAmount(){},
  438. openTakeGood(index){
  439. // 已有数字货架
  440. if(this.hasShelf){
  441. // this.showAction = true
  442. this.clickAction(index)
  443. }else{
  444. uni.showToast({
  445. icon:'none',
  446. title: '门店没有关联数字货架,无法使用此功能!'
  447. })
  448. }
  449. },
  450. // 单击banner
  451. clickBanner(index){
  452. const row = this.imgList[index]
  453. if(row.activeType == 'redPacket'){
  454. uni.navigateTo({url:"/pages/morePage/redPacket"})
  455. }
  456. // 图文
  457. if(row.contentType == 'IMAGE_CONTENT'){
  458. uni.navigateTo({url:"/pagesA/activeDetail/index?sn="+row.promoActiveSn})
  459. }
  460. // 视频
  461. if(row.activeType == 'VIDEO_CONTENT'){
  462. uni.navigateTo({url:"/pagesA/videos/detail?sn="+row.promoActiveSn})
  463. }
  464. },
  465. // 选择取货方式
  466. clickAction(index){
  467. const shelfSn = this.hasShelf.shelfSn
  468. const _this = this
  469. // 扫描
  470. if(index == 0){
  471. uni.scanCode({
  472. success: function (ret) {
  473. console.log(ret);
  474. const params = {
  475. codeType: ret.scanType == 'QR_CODE' ? 0 : 1
  476. }
  477. // 二维码
  478. if(ret.scanType == 'QR_CODE'){
  479. const result = ret.result.split("&")
  480. params.productSn = result[2] // 产品编码sn
  481. }else{
  482. params.qrCode = ret.result
  483. }
  484. uni.showLoading({
  485. title: "正在查询产品..."
  486. })
  487. // 确认取货
  488. getProductfindByScanCode(params).then(res => {
  489. if(res.status == 200 && res.data){
  490. if(res.data.currentInven){
  491. const billSource = ret.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'
  492. const params = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
  493. _this.$store.state.vuex_tempData = params
  494. uni.navigateTo({
  495. url: '/pagesA/queryByCode/confirmQh'
  496. })
  497. }else{
  498. uni.showModal({
  499. title: '提示',
  500. content: '产品库存为0,无法取货!',
  501. confirmText: '好的',
  502. showCancel: false
  503. })
  504. }
  505. }else{
  506. uni.showModal({
  507. title: '提示',
  508. content: '产品不属于此货架,请重新扫描!',
  509. confirmText: '好的',
  510. showCancel: false
  511. })
  512. }
  513. uni.hideLoading()
  514. })
  515. }
  516. });
  517. }else{
  518. // 按编码搜索
  519. uni.navigateTo({
  520. url: '/pagesA/queryByCode/queryByCode'
  521. })
  522. }
  523. },
  524. // 去扫描
  525. openCamera(){
  526. if(this.hasLogin){
  527. if(this.userInfo.sysUserFlag == '0'){
  528. if(this.vuex_vinScanNums < this.scanMaxNums){
  529. uni.navigateTo({
  530. url: "/pages/scan-frame/scan-frame"
  531. })
  532. }else{
  533. uni.showModal({
  534. title: '提示',
  535. content: '个人用户扫描VIN仅限10次,您的次数已用完!',
  536. confirmText: '好的',
  537. showCancel: false,
  538. success(res) {}
  539. })
  540. }
  541. }else{
  542. uni.navigateTo({
  543. url: "/pages/scan-frame/scan-frame"
  544. })
  545. }
  546. }else{
  547. uni.navigateTo({
  548. url: '/pages/login/login'
  549. })
  550. }
  551. },
  552. // 查看扫描记录
  553. toAllRecord(){
  554. uni.navigateTo({
  555. url: this.hasLogin ? "/pages/vinRecord/vinRecord" : '/pages/login/login'
  556. })
  557. },
  558. toUser(){
  559. if(this.hasLogin){
  560. // 用户详细信息 或 门店认证
  561. uni.navigateTo({
  562. url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
  563. })
  564. }else{
  565. uni.navigateTo({
  566. url: '/pages/login/login'
  567. })
  568. }
  569. },
  570. toChoosePart(item){
  571. item.text = item.modelInfo
  572. uni.navigateTo({
  573. url: "/pagesA/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))+'&type=log'
  574. })
  575. }
  576. }
  577. }
  578. </script>
  579. <style lang="less">
  580. page{
  581. background-color: #ffffff;
  582. }
  583. .content {
  584. margin: 0;
  585. padding: 0;
  586. height: 100vh;
  587. display: flex;
  588. flex-direction: column;
  589. background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
  590. .header-box{
  591. z-index: 5;
  592. padding: 0em 1em;
  593. background: #066cff;
  594. .title{
  595. padding: 0;
  596. }
  597. }
  598. .cbody{
  599. flex-grow: 1;
  600. overflow-y: auto;
  601. overflow-x: hidden;
  602. }
  603. .body-box{
  604. padding: 0em 1em 0.8em;
  605. z-index: 4;
  606. .notices{
  607. padding: 0.5em 0 0;
  608. font-size: 0.9em;
  609. margin-top: 0.5rem;
  610. view{
  611. color: #ffaf46;
  612. max-width: 80%;
  613. }
  614. .text{
  615. color: #ffffff;
  616. margin-left: 1em;
  617. }
  618. }
  619. .action-button{
  620. padding:40upx 0 0 0;
  621. justify-content: space-between;
  622. > view{
  623. display: flex;
  624. align-items: center;
  625. color: #fff;
  626. border-radius: 10rpx;
  627. width: 49%;
  628. }
  629. .f1{
  630. background: #ff9800;
  631. }
  632. .f2{
  633. background: #2196f3;
  634. }
  635. .icons{
  636. font-size: 50rpx;
  637. color: #fff;
  638. width: 80rpx;
  639. height: 80rpx;
  640. text-align:center;
  641. display: flex;
  642. align-items: center;
  643. flex-direction: column;
  644. justify-content: center;
  645. }
  646. .tits{
  647. font-size:28rpx;
  648. }
  649. }
  650. .scanButton{
  651. margin: 0.8em 0 0.5em;
  652. padding: 0.5em;
  653. background: #066cff;
  654. color: #fff;
  655. font-size: 1.5em;
  656. border-radius: 5em;
  657. justify-content: center;
  658. &:active{
  659. opacity: 0.8;
  660. }
  661. }
  662. .quickButton{
  663. margin: 0.8em 0 0.5em;
  664. padding: 0.5em;
  665. background: #fff;
  666. color: #333;
  667. font-size: 1.5em;
  668. border-radius: 5em;
  669. justify-content: center;
  670. border:0.1rpx solid #eee;
  671. box-shadow: 1rpx 2rpx 5rpx #f8f8f8;
  672. &:active{
  673. opacity: 0.8;
  674. }
  675. }
  676. .ml10{
  677. margin-left: 0.4em;
  678. }
  679. }
  680. .bg-blue{
  681. position: relative;
  682. > view{
  683. z-index: 100;
  684. position: relative;
  685. }
  686. &::after{
  687. /* 这个伪类的作用就是一个圆弧的背景色 */
  688. width: 130%;
  689. height: 100%;
  690. position: absolute;
  691. /*设置水平居中*/
  692. left: -15%;
  693. /* 之所以left:20%,是因为width:140%,若width:160%,那么left:30%才能水平居中 */
  694. top: -20%;
  695. /*层叠顺序,最底层显示*/
  696. content: '';
  697. border-radius: 0 0 50% 50%;
  698. /*分别对应 左上 右上 右下 左下 可以修改成其它颜色*/
  699. background: linear-gradient(to bottom, #066cff, #1d77ff);
  700. }
  701. .userCard{
  702. position:relative;
  703. left:0;
  704. bottom:-1rem;
  705. padding:0.8em;
  706. background: #fff;
  707. border-radius: 0.5em;
  708. box-shadow: 0.3em 0.3em 1em #c4e5ee;
  709. .userCard-info{
  710. flex-grow:1;
  711. > view{
  712. &:last-child{
  713. margin-left: 0.5em;
  714. line-height: 1.5em;
  715. .user-name{
  716. font-size: 1rem;
  717. }
  718. >view{
  719. padding: 0.2em;
  720. }
  721. }
  722. }
  723. .user-info{
  724. flex-grow:1;
  725. }
  726. }
  727. .user-rz{
  728. font-size: 0.8rem;
  729. color:#58aff5;
  730. }
  731. }
  732. }
  733. .list-box{
  734. padding: 0 1em;
  735. overflow: auto;
  736. .des{
  737. text-align: center;
  738. padding: 1em 0;
  739. color: #999;
  740. font-size: 0.8em;
  741. }
  742. }
  743. }
  744. </style>