index.vue 19 KB

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