index.vue 19 KB

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