index.vue 20 KB

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