index.vue 19 KB

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