index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  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. this.getRedPacketRule()
  210. })
  211. // 刷新首页数据
  212. uni.$on("refashHome",()=>{
  213. this.pageInit()
  214. })
  215. },
  216. onUnload() {
  217. uni.$off('refashHome')
  218. },
  219. // 下拉刷新
  220. onPullDownRefresh(){
  221. this.pageInit()
  222. setTimeout(function () {
  223. uni.stopPullDownRefresh();
  224. }, 1000);
  225. },
  226. onShareAppMessage() {},
  227. onShow() {
  228. // 用户头像
  229. this.avatarUrl = uni.getStorageSync('userPhoto');
  230. if(this.hasLogin){
  231. // 查询门店认证信息
  232. if(this.userInfo.sysUserFlag == '0'){
  233. this.findLastApply()
  234. }
  235. if(this.userInfo.sysUserFlag == '1'){
  236. // 查询红包活动
  237. this.getRedPacketRule()
  238. }
  239. }
  240. },
  241. methods: {
  242. // 扫描vin
  243. beforeSwitch(index){
  244. if(index==1){
  245. this.openCamera()
  246. }else{
  247. return true
  248. }
  249. },
  250. // 价格显示
  251. async getPriceShow(){
  252. await findPriceShow().then(res => {
  253. this.showPrice = res.data ? res.data.paramValue=='1' : false
  254. this.$store.state.vuex_showPrice[0] = this.showPrice
  255. })
  256. await findPriceShowType().then(res => {
  257. if(res.data&&res.data.paramValue){
  258. this.priceType = res.data.paramValue
  259. this.priceTypeName = this.$store.state.vuex_priceTypeList.find(item => item.code == res.data.paramValue).dispName
  260. this.$store.state.vuex_showPrice[1] = this.priceType
  261. }
  262. })
  263. await findPriceShowEmployee().then(res => {
  264. this.showJhPrice = res.data ? res.data.paramValue=='1' : false
  265. this.$store.state.vuex_showPrice[2] = this.showJhPrice
  266. })
  267. },
  268. pageInit(){
  269. if(this.hasLogin){
  270. // 获取扫描记录
  271. this.getVinLog()
  272. // 非游客
  273. if(this.userInfo.sysUserFlag == '1'){
  274. // 查询是否有数字货架
  275. this.getStoreShelf()
  276. }else{
  277. // 获取扫描次数
  278. this.$store.dispatch("getScanNums")
  279. // 获取最大扫描次数
  280. this.getMaxQty()
  281. // 查询门店认证信息
  282. this.findLastApply()
  283. }
  284. }else{
  285. uni.removeStorageSync('token')
  286. }
  287. },
  288. // 获取数据字典
  289. getListLookUp() {
  290. const _this = this;
  291. listLookUp({ pageNo: 1, pageSize: 1000 }).then(res => {
  292. if (res.status == 200) {
  293. _this.$store.state.vuex_allLookUp = res.data;
  294. }
  295. });
  296. },
  297. // 或某一项字典列表,参数code
  298. getLookUpList(code, vuexKey) {
  299. getLookUpDatas({ type: code }).then(res => {
  300. if (res.status == 200) {
  301. this.$store.state[vuexKey] = res.data || [];
  302. if(code=='PRICE_SHOW_TYPE'){
  303. // 获取显示价格类型
  304. this.getPriceShow()
  305. }
  306. }
  307. });
  308. },
  309. // 获取最大扫描数
  310. getMaxQty(){
  311. getScanGetMaxQty().then(res => {
  312. this.scanMaxNums = res.data || 10
  313. this.$store.state.vuex_scanMaxNums = this.scanMaxNums
  314. })
  315. },
  316. // 获取最新申请门店
  317. findLastApply(){
  318. const mobile = this.userInfo.mobile
  319. this.$store.dispatch('getSotreAuth',mobile)
  320. },
  321. // 知道审核不通过
  322. toKnow(){
  323. uni.showLoading({
  324. title: "正在提交"
  325. })
  326. xprhStoreApplyRead({sn:this.storeApply.applySn}).then(res => {
  327. if(res.status == 200){
  328. this.findLastApply()
  329. }
  330. uni.hideLoading()
  331. })
  332. },
  333. // 待取货数量合计
  334. shelfGetTotalWaitQty(){
  335. shelfGetTotalWaitQty({billState:'WAIT'}).then(res => {
  336. if(res.status == 200){
  337. this.orderTodo = res.data;
  338. }
  339. })
  340. },
  341. // 货架订单列表
  342. toOrder(){
  343. if(this.hasShelf){
  344. uni.navigateTo({
  345. url: "/pagesA/digitalShelf/orderList"
  346. })
  347. }else{
  348. uni.showToast({
  349. icon:'none',
  350. title: '门店没有关联数字货架,无法使用此功能!'
  351. })
  352. }
  353. },
  354. // 获取上方滚动扫描记录
  355. getScrollLog(){
  356. scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
  357. console.log(res)
  358. this.list = res.data.list || []
  359. this.list.map(item => {
  360. item.placeText = item.userName + '刚刚扫描了一个VIN'
  361. })
  362. })
  363. },
  364. // 获取当前门店扫描记录
  365. getVinLog(){
  366. this.vinList = []
  367. this.status = "loading"
  368. // VISITOR:游客,EMPLOYEE:雇员
  369. getScanVinLogList({ pageNo:1, pageSize:5, identifyType: this.userInfo.identifyType }).then(res => {
  370. this.vinList = res.data&&res.data.list || []
  371. this.vinList = this.vinList.filter(item => item.vinCode)
  372. this.status = 'nomore'
  373. })
  374. },
  375. // 查询是否支持数字货架
  376. getStoreShelf(){
  377. findStoreShelf().then(res => {
  378. console.log(res)
  379. this.$store.state.vuex_storeShelf = res.data;
  380. if(res.data){
  381. // 保证金查询
  382. this.getShelfBWPayRecord()
  383. // 获取订单信息
  384. this.shelfGetTotalWaitQty()
  385. }
  386. })
  387. },
  388. // 查询是有红包活动
  389. getRedPacketRule(){
  390. findCurrentRewardRule().then(res => {
  391. this.$store.state.vuex_rewardRule = res.data;
  392. })
  393. },
  394. // 获取保证金金额
  395. getShelfBWPayRecord(){
  396. const data = this.$store.state.vuex_storeShelf
  397. shelfBondRecordWaitPayRecord({shelfSn: data.shelfSn, storeSn: data.storeSn}).then(res => {
  398. console.log(res,'获取保证金金额')
  399. this.bondRecord = res.data
  400. })
  401. },
  402. // 保证金支付
  403. toPayBondAmount(){},
  404. openTakeGood(index){
  405. // 已有数字货架
  406. if(this.hasShelf){
  407. // this.showAction = true
  408. this.clickAction(index)
  409. }else{
  410. uni.showToast({
  411. icon:'none',
  412. title: '门店没有关联数字货架,无法使用此功能!'
  413. })
  414. }
  415. },
  416. // 单击banner
  417. clickBanner(index){
  418. if(index == 1 && this.hasRedPacket){
  419. uni.navigateTo({url:"/pages/morePage/redPacket"})
  420. }
  421. },
  422. // 选择取货方式
  423. clickAction(index){
  424. const shelfSn = this.hasShelf.shelfSn
  425. const _this = this
  426. // 扫描
  427. if(index == 0){
  428. uni.scanCode({
  429. success: function (ret) {
  430. console.log(ret);
  431. const params = {
  432. codeType: ret.scanType == 'QR_CODE' ? 0 : 1
  433. }
  434. // 二维码
  435. if(ret.scanType == 'QR_CODE'){
  436. const result = ret.result.split("&")
  437. params.productSn = result[2] // 产品编码sn
  438. }else{
  439. params.qrCode = ret.result
  440. }
  441. uni.showLoading({
  442. title: "正在查询产品..."
  443. })
  444. // 确认取货
  445. getProductfindByScanCode(params).then(res => {
  446. if(res.status == 200 && res.data){
  447. if(res.data.currentInven){
  448. const billSource = ret.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'
  449. const params = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
  450. _this.$store.state.vuex_tempData = params
  451. uni.navigateTo({
  452. url: '/pages/queryByCode/confirmQh'
  453. })
  454. }else{
  455. uni.showModal({
  456. title: '提示',
  457. content: '产品库存为0,无法取货!',
  458. confirmText: '好的',
  459. showCancel: false
  460. })
  461. }
  462. }else{
  463. uni.showModal({
  464. title: '提示',
  465. content: '产品不属于此货架,请重新扫描!',
  466. confirmText: '好的',
  467. showCancel: false
  468. })
  469. }
  470. uni.hideLoading()
  471. })
  472. }
  473. });
  474. }else{
  475. // 按编码搜索
  476. uni.navigateTo({
  477. url: '/pages/queryByCode/queryByCode'
  478. })
  479. }
  480. },
  481. // 去扫描
  482. openCamera(){
  483. if(this.hasLogin){
  484. if(this.userInfo.sysUserFlag == '0'){
  485. if(this.vuex_vinScanNums < this.scanMaxNums){
  486. uni.navigateTo({
  487. url: "/pages/scan-frame/scan-frame"
  488. })
  489. }else{
  490. uni.showModal({
  491. title: '提示',
  492. content: '个人用户扫描VIN仅限10次,您的次数已用完!',
  493. confirmText: '好的',
  494. showCancel: false,
  495. success(res) {}
  496. })
  497. }
  498. }else{
  499. uni.navigateTo({
  500. url: "/pages/scan-frame/scan-frame"
  501. })
  502. }
  503. }else{
  504. uni.navigateTo({
  505. url: '/pages/login/login'
  506. })
  507. }
  508. },
  509. // 查看扫描记录
  510. toAllRecord(){
  511. uni.navigateTo({
  512. url: this.hasLogin ? "/pages/vinRecord/vinRecord" : '/pages/login/login'
  513. })
  514. },
  515. toUser(){
  516. if(this.hasLogin){
  517. // 用户详细信息 或 门店认证
  518. uni.navigateTo({
  519. url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
  520. })
  521. }else{
  522. uni.navigateTo({
  523. url: '/pages/login/login'
  524. })
  525. }
  526. },
  527. toChoosePart(item){
  528. item.text = item.modelInfo
  529. uni.navigateTo({
  530. url: "/pagesA/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
  531. })
  532. }
  533. }
  534. }
  535. </script>
  536. <style lang="less">
  537. page{
  538. background-color: #ffffff;
  539. }
  540. .content {
  541. margin: 0;
  542. padding: 0;
  543. height: 100vh;
  544. display: flex;
  545. flex-direction: column;
  546. background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
  547. .header-box{
  548. z-index: 5;
  549. padding: 0em 1em;
  550. background: #066cff;
  551. .title{
  552. padding: 0;
  553. }
  554. }
  555. .cbody{
  556. flex-grow: 1;
  557. overflow-y: auto;
  558. overflow-x: hidden;
  559. }
  560. .body-box{
  561. padding: 0em 1em 0.8em;
  562. z-index: 4;
  563. .notices{
  564. padding: 0.5em 0 0;
  565. font-size: 0.9em;
  566. margin-top: 0.5rem;
  567. view{
  568. color: #ffaf46;
  569. max-width: 80%;
  570. }
  571. .text{
  572. color: #ffffff;
  573. margin-left: 1em;
  574. }
  575. }
  576. .action-button{
  577. padding:40upx 0 0 0;
  578. justify-content: space-between;
  579. > view{
  580. text-align: center;
  581. display: flex;
  582. align-items: center;
  583. flex-direction: column;
  584. }
  585. .f1{
  586. width: 140rpx;
  587. }
  588. .f2{
  589. width: 150rpx;
  590. }
  591. .icons{
  592. font-size: 60rpx;
  593. background: #066cff;
  594. color: #fff;
  595. border-radius: 30rpx;
  596. width: 110rpx;
  597. height: 110rpx;
  598. text-align:center;
  599. display: flex;
  600. align-items: center;
  601. flex-direction: column;
  602. justify-content: center;
  603. }
  604. .tits{
  605. font-size:30rpx;
  606. font-weight: bold;
  607. padding: 10upx 0;
  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>