index.vue 20 KB

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