index.vue 20 KB

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