index.vue 19 KB

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