index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  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. this.carouselList.push({
  270. image: item.images,
  271. title: item.title,
  272. contentType: item.contentType,
  273. id: item.id,
  274. name: item.name,
  275. promoActiveSn: item.promoActiveSn
  276. })
  277. })
  278. }
  279. })
  280. },
  281. pageInit(){
  282. if(this.hasLogin){
  283. // 获取扫描记录
  284. this.getVinLog()
  285. // 非游客
  286. if(this.userInfo.sysUserFlag == '1'){
  287. // 查询是否有数字货架
  288. this.getStoreShelf()
  289. }else{
  290. // 获取扫描次数
  291. this.$store.dispatch("getScanNums")
  292. // 获取最大扫描次数
  293. this.getMaxQty()
  294. // 查询门店认证信息
  295. this.findLastApply()
  296. }
  297. }else{
  298. uni.removeStorageSync('token')
  299. }
  300. },
  301. // 获取数据字典
  302. getListLookUp() {
  303. const _this = this;
  304. listLookUp({ pageNo: 1, pageSize: 1000 }).then(res => {
  305. if (res.status == 200) {
  306. _this.$store.state.vuex_allLookUp = res.data;
  307. }
  308. });
  309. },
  310. // 或某一项字典列表,参数code
  311. getLookUpList(code, vuexKey) {
  312. getLookUpDatas({ type: code }).then(res => {
  313. if (res.status == 200) {
  314. this.$store.state[vuexKey] = res.data || [];
  315. }
  316. });
  317. },
  318. // 最新用户信息
  319. getCurrUserInfo(){
  320. getCurrUserInfo().then(res => {
  321. if(res.data){
  322. this.$store.state.vuex_userInfo.userNameCN = res.data.name;
  323. this.$store.state.vuex_userInfo.mobile = res.data.mobile;
  324. this.$store.state.vuex_userInfo.adminId = res.data.id;
  325. this.$store.state.vuex_userPhoto = res.data.photo;
  326. uni.setStorageSync('userPhoto', res.data.photo);
  327. }
  328. })
  329. },
  330. // 获取最大扫描数
  331. getMaxQty(){
  332. getScanGetMaxQty().then(res => {
  333. this.scanMaxNums = res.data || 10
  334. this.$store.state.vuex_scanMaxNums = this.scanMaxNums
  335. })
  336. },
  337. // 获取最新申请门店
  338. findLastApply(){
  339. const mobile = this.userInfo.mobile
  340. this.$store.dispatch('getSotreAuth',mobile)
  341. },
  342. // 知道审核不通过
  343. toKnow(){
  344. uni.showLoading({
  345. title: "正在提交"
  346. })
  347. xprhStoreApplyRead({sn:this.storeApply.applySn}).then(res => {
  348. if(res.status == 200){
  349. this.findLastApply()
  350. }
  351. uni.hideLoading()
  352. })
  353. },
  354. // 待取货数量合计
  355. shelfGetTotalWaitQty(){
  356. shelfGetTotalWaitQty({billState:'WAIT'}).then(res => {
  357. if(res.status == 200){
  358. this.orderTodo = res.data;
  359. }
  360. })
  361. },
  362. // 货架订单列表
  363. toOrder(){
  364. if(this.hasShelf){
  365. uni.navigateTo({
  366. url: "/pagesA/digitalShelf/orderList"
  367. })
  368. }else{
  369. uni.showToast({
  370. icon:'none',
  371. title: '门店没有关联数字货架,无法使用此功能!'
  372. })
  373. }
  374. },
  375. // 获取上方滚动扫描记录
  376. getScrollLog(){
  377. scanVinLogQueryRoll({pageNo:1,pageSize:50}).then(res => {
  378. console.log(res)
  379. this.list = res.data.list || []
  380. this.list.map(item => {
  381. item.placeText = item.userName + '刚刚扫描了一个VIN'
  382. })
  383. })
  384. },
  385. // 获取当前门店扫描记录
  386. getVinLog(){
  387. this.vinList = []
  388. this.status = "loading"
  389. // VISITOR:游客,EMPLOYEE:雇员
  390. getScanVinLogList({ pageNo:1, pageSize:5, identifyType: this.userInfo.identifyType }).then(res => {
  391. this.vinList = res.data&&res.data.list || []
  392. this.vinList = this.vinList.filter(item => item.vinCode)
  393. this.status = 'nomore'
  394. })
  395. },
  396. // 查询是否支持数字货架
  397. getStoreShelf(){
  398. findStoreShelf().then(res => {
  399. console.log(res)
  400. this.$store.state.vuex_storeShelf = res.data;
  401. if(res.data){
  402. // 保证金查询
  403. this.getShelfBWPayRecord()
  404. // 获取订单信息
  405. this.shelfGetTotalWaitQty()
  406. // 获取轮播数据
  407. this.getCarousel()
  408. }
  409. })
  410. },
  411. // 查询是有红包活动
  412. getRedPacketRule(){
  413. findCurrentRewardRule().then(res => {
  414. this.$store.state.vuex_rewardRule = res.data;
  415. this.getRedScroll()
  416. })
  417. },
  418. getRedScroll(){
  419. getRewardRollList({pageNo:1,pageSize:50}).then(res => {
  420. this.slist = res.data || []
  421. this.slist.map(item => {
  422. item.placeText = item.userName + '刚刚得到了'+item.totalRewardAmount+'元 红包奖励'
  423. })
  424. })
  425. },
  426. // 获取保证金金额
  427. getShelfBWPayRecord(){
  428. const data = this.$store.state.vuex_storeShelf
  429. shelfBondRecordWaitPayRecord({shelfSn: data.shelfSn, storeSn: data.storeSn}).then(res => {
  430. console.log(res,'获取保证金金额')
  431. this.bondRecord = res.data
  432. })
  433. },
  434. // 保证金支付
  435. toPayBondAmount(){},
  436. openTakeGood(index){
  437. // 已有数字货架
  438. if(this.hasShelf){
  439. // this.showAction = true
  440. this.clickAction(index)
  441. }else{
  442. uni.showToast({
  443. icon:'none',
  444. title: '门店没有关联数字货架,无法使用此功能!'
  445. })
  446. }
  447. },
  448. // 单击banner
  449. clickBanner(index){
  450. const row = this.imgList[index]
  451. if(row.activeType == 'redPacket'){
  452. uni.navigateTo({url:"/pages/morePage/redPacket"})
  453. }
  454. // 图文
  455. if(row.contentType == 'IMAGE_CONTENT'){
  456. uni.navigateTo({url:"/pagesA/activeDetail/index?sn="+row.promoActiveSn})
  457. }
  458. // 视频
  459. if(row.activeType == 'VIDEO_CONTENT'){
  460. uni.navigateTo({url:"/pagesA/videos/detail?sn="+row.promoActiveSn})
  461. }
  462. },
  463. // 选择取货方式
  464. clickAction(index){
  465. const shelfSn = this.hasShelf.shelfSn
  466. const _this = this
  467. // 扫描
  468. if(index == 0){
  469. uni.scanCode({
  470. success: function (ret) {
  471. console.log(ret);
  472. const params = {
  473. codeType: ret.scanType == 'QR_CODE' ? 0 : 1
  474. }
  475. // 二维码
  476. if(ret.scanType == 'QR_CODE'){
  477. const result = ret.result.split("&")
  478. params.productSn = result[2] // 产品编码sn
  479. }else{
  480. params.qrCode = ret.result
  481. }
  482. uni.showLoading({
  483. title: "正在查询产品..."
  484. })
  485. // 确认取货
  486. getProductfindByScanCode(params).then(res => {
  487. if(res.status == 200 && res.data){
  488. if(res.data.currentInven){
  489. const billSource = ret.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'
  490. const params = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
  491. _this.$store.state.vuex_tempData = params
  492. uni.navigateTo({
  493. url: '/pagesA/queryByCode/confirmQh'
  494. })
  495. }else{
  496. uni.showModal({
  497. title: '提示',
  498. content: '产品库存为0,无法取货!',
  499. confirmText: '好的',
  500. showCancel: false
  501. })
  502. }
  503. }else{
  504. uni.showModal({
  505. title: '提示',
  506. content: '产品不属于此货架,请重新扫描!',
  507. confirmText: '好的',
  508. showCancel: false
  509. })
  510. }
  511. uni.hideLoading()
  512. })
  513. }
  514. });
  515. }else{
  516. // 按编码搜索
  517. uni.navigateTo({
  518. url: '/pagesA/queryByCode/queryByCode'
  519. })
  520. }
  521. },
  522. // 去扫描
  523. openCamera(){
  524. if(this.hasLogin){
  525. if(this.userInfo.sysUserFlag == '0'){
  526. if(this.vuex_vinScanNums < this.scanMaxNums){
  527. uni.navigateTo({
  528. url: "/pages/scan-frame/scan-frame"
  529. })
  530. }else{
  531. uni.showModal({
  532. title: '提示',
  533. content: '个人用户扫描VIN仅限10次,您的次数已用完!',
  534. confirmText: '好的',
  535. showCancel: false,
  536. success(res) {}
  537. })
  538. }
  539. }else{
  540. uni.navigateTo({
  541. url: "/pages/scan-frame/scan-frame"
  542. })
  543. }
  544. }else{
  545. uni.navigateTo({
  546. url: '/pages/login/login'
  547. })
  548. }
  549. },
  550. // 查看扫描记录
  551. toAllRecord(){
  552. uni.navigateTo({
  553. url: this.hasLogin ? "/pages/vinRecord/vinRecord" : '/pages/login/login'
  554. })
  555. },
  556. toUser(){
  557. if(this.hasLogin){
  558. // 用户详细信息 或 门店认证
  559. uni.navigateTo({
  560. url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
  561. })
  562. }else{
  563. uni.navigateTo({
  564. url: '/pages/login/login'
  565. })
  566. }
  567. },
  568. toChoosePart(item){
  569. item.text = item.modelInfo
  570. uni.navigateTo({
  571. url: "/pagesA/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))+'&type=log'
  572. })
  573. }
  574. }
  575. }
  576. </script>
  577. <style lang="less">
  578. page{
  579. background-color: #ffffff;
  580. }
  581. .content {
  582. margin: 0;
  583. padding: 0;
  584. height: 100vh;
  585. display: flex;
  586. flex-direction: column;
  587. background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
  588. .header-box{
  589. z-index: 5;
  590. padding: 0em 1em;
  591. background: #066cff;
  592. .title{
  593. padding: 0;
  594. }
  595. }
  596. .cbody{
  597. flex-grow: 1;
  598. overflow-y: auto;
  599. overflow-x: hidden;
  600. }
  601. .body-box{
  602. padding: 0em 1em 0.8em;
  603. z-index: 4;
  604. .notices{
  605. padding: 0.5em 0 0;
  606. font-size: 0.9em;
  607. margin-top: 0.5rem;
  608. view{
  609. color: #ffaf46;
  610. max-width: 80%;
  611. }
  612. .text{
  613. color: #ffffff;
  614. margin-left: 1em;
  615. }
  616. }
  617. .action-button{
  618. padding:40upx 0 0 0;
  619. justify-content: space-between;
  620. > view{
  621. display: flex;
  622. align-items: center;
  623. color: #fff;
  624. border-radius: 10rpx;
  625. width: 49%;
  626. }
  627. .f1{
  628. background: #ff9800;
  629. }
  630. .f2{
  631. background: #2196f3;
  632. }
  633. .icons{
  634. font-size: 50rpx;
  635. color: #fff;
  636. width: 80rpx;
  637. height: 80rpx;
  638. text-align:center;
  639. display: flex;
  640. align-items: center;
  641. flex-direction: column;
  642. justify-content: center;
  643. }
  644. .tits{
  645. font-size:28rpx;
  646. }
  647. }
  648. .scanButton{
  649. margin: 0.8em 0 0.5em;
  650. padding: 0.5em;
  651. background: #066cff;
  652. color: #fff;
  653. font-size: 1.5em;
  654. border-radius: 5em;
  655. justify-content: center;
  656. &:active{
  657. opacity: 0.8;
  658. }
  659. }
  660. .quickButton{
  661. margin: 0.8em 0 0.5em;
  662. padding: 0.5em;
  663. background: #fff;
  664. color: #333;
  665. font-size: 1.5em;
  666. border-radius: 5em;
  667. justify-content: center;
  668. border:0.1rpx solid #eee;
  669. box-shadow: 1rpx 2rpx 5rpx #f8f8f8;
  670. &:active{
  671. opacity: 0.8;
  672. }
  673. }
  674. .ml10{
  675. margin-left: 0.4em;
  676. }
  677. }
  678. .bg-blue{
  679. position: relative;
  680. > view{
  681. z-index: 100;
  682. position: relative;
  683. }
  684. &::after{
  685. /* 这个伪类的作用就是一个圆弧的背景色 */
  686. width: 130%;
  687. height: 100%;
  688. position: absolute;
  689. /*设置水平居中*/
  690. left: -15%;
  691. /* 之所以left:20%,是因为width:140%,若width:160%,那么left:30%才能水平居中 */
  692. top: -20%;
  693. /*层叠顺序,最底层显示*/
  694. content: '';
  695. border-radius: 0 0 50% 50%;
  696. /*分别对应 左上 右上 右下 左下 可以修改成其它颜色*/
  697. background: linear-gradient(to bottom, #066cff, #1d77ff);
  698. }
  699. .userCard{
  700. position:relative;
  701. left:0;
  702. bottom:-1rem;
  703. padding:0.8em;
  704. background: #fff;
  705. border-radius: 0.5em;
  706. box-shadow: 0.3em 0.3em 1em #c4e5ee;
  707. .userCard-info{
  708. flex-grow:1;
  709. > view{
  710. &:last-child{
  711. margin-left: 0.5em;
  712. line-height: 1.5em;
  713. .user-name{
  714. font-size: 1rem;
  715. }
  716. >view{
  717. padding: 0.2em;
  718. }
  719. }
  720. }
  721. .user-info{
  722. flex-grow:1;
  723. }
  724. }
  725. .user-rz{
  726. font-size: 0.8rem;
  727. color:#58aff5;
  728. }
  729. }
  730. }
  731. .list-box{
  732. padding: 0 1em;
  733. overflow: auto;
  734. .des{
  735. text-align: center;
  736. padding: 1em 0;
  737. color: #999;
  738. font-size: 0.8em;
  739. }
  740. }
  741. }
  742. </style>