index.vue 19 KB

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