index.vue 19 KB

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