index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  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="showVersion">
  19. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 当前是体验版</view>
  20. </view>
  21. <!-- 保证金 -->
  22. <view class="notices flex align_center" v-if="bondRecord" @click="toPayBondAmount">
  23. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有一笔保证金待支付 ¥{{bondRecord.bondAmount}}</view>
  24. <!-- <text class="text">立即支付>></text> -->
  25. </view>
  26. <!-- 待取货提醒 -->
  27. <view class="notices flex align_center" v-if="!bondRecord&&orderTodo" @click="toOrder">
  28. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有待取货的货架订单哦!</view> <text class="text">立即处理>></text>
  29. </view>
  30. <!-- 门店审核不通过 -->
  31. <view class="notices flex justify_between" v-if="storeApply&&storeApply.auditStatus=='REFUSE'&&storeApply.readFlag=='0'">
  32. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
  33. </view>
  34. <!-- 名片 -->
  35. <view class="userCard flex align_center justify_between">
  36. <view class="userCard-info flex align_center">
  37. <view>
  38. <u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
  39. <u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
  40. </view>
  41. <view class="user-info" @click="toUser">
  42. <view v-if="!hasLogin" style="font-size: 40rpx;">
  43. 请点击登录
  44. </view>
  45. <view v-else>
  46. <view class="user-name">{{userInfo.userNameCN || userInfo.mobile}}</view>
  47. <view v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'">
  48. <u-tag text="个人用户" mode="dark" type="warning" shape="circle" size="mini" />
  49. </view>
  50. <view v-else>{{userInfo.orgName}}</view>
  51. </view>
  52. </view>
  53. </view>
  54. <view @click="toUser">
  55. <text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
  56. {{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
  57. </text>
  58. <u-icon name="arrow-right"></u-icon>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="body-box">
  63. <!-- 扫描按钮 -->
  64. <view class="action-button flex" v-if="userInfo.sysUserFlag == '1'">
  65. <view class="f1" @click="openTakeGood(1)">
  66. <view class="icons"><u-icon name="shujuchaxun" custom-prefix="custom-icon"></u-icon></view>
  67. <view class="tits">产品编码取货</view>
  68. </view>
  69. <view class="f2" @click="openTakeGood(0)">
  70. <view class="icons"><u-icon name="saomasoudan" custom-prefix="custom-icon"></u-icon></view>
  71. <view class="tits">二维码/条形码取货</view>
  72. </view>
  73. </view>
  74. <view style="margin-top: 20upx;">
  75. <u-swiper mode="dot" bg-color="" img-mode="widthFix" @click="clickBanner" :interval="3000" :height="374" :list="imgList"></u-swiper>
  76. </view>
  77. </view>
  78. <!-- 扫描记录 -->
  79. <view class="list-box">
  80. <!-- 扫描记录 -->
  81. <u-cell-group :border="false">
  82. <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" value="全部">
  83. <u-icon slot="icon" size="38" color="#066cff" style="margin-right: 0.3em;" name="order"></u-icon>
  84. </u-cell-item>
  85. </u-cell-group>
  86. <u-cell-group :border="false" v-if="hasLogin">
  87. <u-cell-item v-for="item in vinList"
  88. @click="toChoosePart(item)"
  89. :key="item.id"
  90. :title="item.vinCode"
  91. :title-style="{fontSize:'1em'}"
  92. :label="userInfo&&userInfo.sysUserFlag == '0' ? item.createDate : (item.brandName +' '+item.modelName)">
  93. <text slot="icon"></text>
  94. </u-cell-item>
  95. <view style="padding: 20upx;">
  96. <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>
  97. <u-loadmore v-if="status=='loading'" :status="status" />
  98. </view>
  99. </u-cell-group>
  100. <view class="des" v-if="vinList.length&&hasLogin">仅展示最近5条记录,点击“全部”查看更多</view>
  101. <view class="des" v-if="!hasLogin">请登录后查看历史记录</view>
  102. </view>
  103. </view>
  104. </view>
  105. <u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch"></u-tabbar>
  106. </view>
  107. </template>
  108. <script>
  109. import {
  110. mapState,
  111. mapMutations,
  112. } from 'vuex'
  113. import scrollBox from '@/components/scrollBox.vue'
  114. import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
  115. import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode, queryQplsConfig } from '@/api/shelf.js'
  116. import { xprhStoreApplyRead } from '@/api/xprh.js'
  117. import { findCurrentRewardRule } from '@/api/rewardRule.js'
  118. import { listLookUp, getLookUpDatas, getCurrUserInfo } from '@/api/data.js';
  119. import { scanVinLogQueryRoll, getScanVinLogList, getScanGetMaxQty }from '@/api/car.js'
  120. import { promoTerminalList } from '@/api/video.js'
  121. import { getRewardRollList } from '@/api/rewardRule.js'
  122. import { openWebView } from "@/utils/index.js"
  123. export default {
  124. components: {
  125. scrollBox, // 无缝滚动组件
  126. UniStatusBar // 状态栏组件
  127. },
  128. data() {
  129. return {
  130. status: 'loading',
  131. noDataText: '暂无数据',
  132. bondRecord: null, // 保证金
  133. list:[], // 扫描记录滚动
  134. slist:[], // 红包滚动
  135. vinList: [], // 扫描记录
  136. orderTodo: null, // 待取货的货架订单信息
  137. avatarUrl:'', // 用户图像
  138. navHeight: '44', // 头部高度
  139. scanMaxNums: 10, // 扫描VIN仅限10次
  140. carouselList: [] // 修理厂促销活动列表
  141. }
  142. },
  143. computed: {
  144. ...mapState(['hasLogin','vuex_vinScanNums','vuex_tabBarList']),
  145. // 显示开发版本信息
  146. showVersion () {
  147. const baseUrl = getApp().globalData.baseUrl
  148. return baseUrl.indexOf(".test.") >= 0
  149. },
  150. // 是否有数字货架
  151. hasShelf(){
  152. return this.$store.state.vuex_storeShelf
  153. },
  154. // 登录用户信息
  155. userInfo(){
  156. return this.$store.state.vuex_userInfo
  157. },
  158. // 是否有门店申请信息
  159. storeApply(){
  160. return this.$store.state.vuex_storeAuthInfo || null
  161. },
  162. // 是否有红包
  163. hasRedPacket(){
  164. const rule = this.$store.state.vuex_rewardRule
  165. return rule&&rule.ruleStatus == 'release'
  166. },
  167. // banner 图片列表
  168. imgList(){
  169. let list = [
  170. {
  171. image: '/static/banner1.png',
  172. activeType: ''
  173. }
  174. ]
  175. if(this.hasRedPacket&&this.hasShelf){
  176. list.push(
  177. {
  178. image: '/static/banner2.png',
  179. activeType: 'redPacket'
  180. })
  181. }
  182. return list.concat(this.carouselList)
  183. }
  184. },
  185. onReady() {
  186. // 滚动扫描记录
  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.getLookUpList('CONTENT_CATEGORY', 'vuex_videoTypeList');
  203. // 检测是否登录
  204. this.$store.dispatch('checkLogin',()=>{
  205. // 获取数据字典
  206. this.getListLookUp();
  207. // 获取支付,收款方式
  208. this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
  209. // 价格类型
  210. this.getLookUpList('PRICE_SHOW_TYPE', 'vuex_priceTypeList');
  211. // 初始化页面
  212. this.pageInit()
  213. // 查询红包活动
  214. this.getRedPacketRule()
  215. // 更新用户信息
  216. this.getCurrUserInfo()
  217. })
  218. // 刷新首页数据
  219. uni.$on("refashHome",()=>{
  220. this.pageInit()
  221. })
  222. },
  223. // 页面卸载
  224. onUnload() {
  225. uni.$off('refashHome')
  226. },
  227. // 下拉刷新
  228. onPullDownRefresh(){
  229. this.pageInit()
  230. setTimeout(function () {
  231. uni.stopPullDownRefresh();
  232. }, 1000);
  233. },
  234. onShareAppMessage() {},
  235. onShow() {
  236. // 用户头像
  237. this.avatarUrl = uni.getStorageSync('userPhoto');
  238. if(this.hasLogin){
  239. // 更新用户信息
  240. this.getCurrUserInfo()
  241. // 查询门店认证信息
  242. if(this.userInfo.sysUserFlag == '0'){
  243. this.findLastApply()
  244. }
  245. if(this.userInfo.sysUserFlag == '1'){
  246. // 查询红包活动
  247. this.getRedPacketRule()
  248. }
  249. }
  250. },
  251. methods: {
  252. // 扫描vin
  253. beforeSwitch(index){
  254. const row = this.$store.state.vuex_tabBarList[index]
  255. if(row.text == '扫描VIN'){
  256. this.openCamera()
  257. }else{
  258. return true
  259. }
  260. },
  261. // 轮播图片
  262. getCarousel(){
  263. this.carouselList = []
  264. const storeShelf = this.$store.state.vuex_storeShelf
  265. promoTerminalList({sn:storeShelf.dealerSn}).then(res => {
  266. if(res.status == 200){
  267. res.data&&res.data.map(item => {
  268. item.image = item.imageSet&&item.imageSet[0] // 默认取第一张图片
  269. })
  270. // 过滤掉产品促销活动
  271. this.carouselList = res.data.filter(item => item.content.indexOf("pages/promo/index") < 0)
  272. }
  273. })
  274. },
  275. pageInit(){
  276. this.carouselList = []
  277. if(this.hasLogin){
  278. // 获取扫描记录
  279. this.getVinLog()
  280. // 非游客
  281. if(this.userInfo.sysUserFlag == '1'){
  282. // 查询是否有数字货架
  283. this.getStoreShelf()
  284. }else{
  285. // 获取扫描次数
  286. this.$store.dispatch("getScanNums")
  287. // 获取最大扫描次数
  288. this.getMaxQty()
  289. // 查询门店认证信息
  290. this.findLastApply()
  291. }
  292. }else{
  293. uni.removeStorageSync('token')
  294. }
  295. },
  296. // 获取数据字典
  297. getListLookUp() {
  298. const _this = this;
  299. listLookUp({ pageNo: 1, pageSize: 1000 }).then(res => {
  300. if (res.status == 200) {
  301. _this.$store.state.vuex_allLookUp = res.data;
  302. }
  303. });
  304. },
  305. // 或某一项字典列表,参数code
  306. getLookUpList(code, vuexKey) {
  307. getLookUpDatas({ type: code }).then(res => {
  308. if (res.status == 200) {
  309. this.$store.state[vuexKey] = res.data || [];
  310. }
  311. });
  312. },
  313. // 获取价格配置
  314. getPriceCofig(){
  315. const data = this.$store.state.vuex_storeShelf
  316. queryQplsConfig({shelfSn: data.shelfSn}).then(res => {
  317. this.$store.state.vuex_configPrice = res.data || null
  318. })
  319. },
  320. // 最新用户信息
  321. getCurrUserInfo(){
  322. getCurrUserInfo().then(res => {
  323. if(res.data){
  324. this.$store.state.vuex_userInfo.userNameCN = res.data.name;
  325. this.$store.state.vuex_userInfo.mobile = res.data.mobile;
  326. this.$store.state.vuex_userInfo.adminId = res.data.id;
  327. this.$store.state.vuex_userPhoto = res.data.photo;
  328. uni.setStorageSync('userPhoto', res.data.photo);
  329. }
  330. })
  331. },
  332. // 获取最大扫描数
  333. getMaxQty(){
  334. getScanGetMaxQty().then(res => {
  335. this.scanMaxNums = res.data || 10
  336. this.$store.state.vuex_scanMaxNums = this.scanMaxNums
  337. })
  338. },
  339. // 获取最新申请门店
  340. findLastApply(){
  341. const mobile = this.userInfo.mobile
  342. this.$store.dispatch('getSotreAuth',mobile)
  343. },
  344. // 知道审核不通过
  345. toKnow(){
  346. uni.showLoading({
  347. title: "正在提交"
  348. })
  349. xprhStoreApplyRead({sn:this.storeApply.applySn}).then(res => {
  350. if(res.status == 200){
  351. this.findLastApply()
  352. }
  353. uni.hideLoading()
  354. })
  355. },
  356. // 待取货数量合计
  357. shelfGetTotalWaitQty(){
  358. shelfGetTotalWaitQty({billState:'WAIT'}).then(res => {
  359. if(res.status == 200){
  360. this.orderTodo = res.data;
  361. }
  362. })
  363. },
  364. // 货架订单列表
  365. toOrder(){
  366. if(this.hasShelf){
  367. uni.navigateTo({
  368. url: "/pagesA/digitalShelf/orderList"
  369. })
  370. }else{
  371. uni.showToast({
  372. icon:'none',
  373. title: '门店没有关联数字货架,无法使用此功能!'
  374. })
  375. }
  376. },
  377. // 获取上方滚动扫描记录
  378. getScrollLog(){
  379. scanVinLogQueryRoll({pageNo:1,pageSize:50}).then(res => {
  380. console.log(res)
  381. this.list = res.data.list || []
  382. this.list.map(item => {
  383. item.placeText = item.userName + '刚刚扫描了一个VIN'
  384. })
  385. })
  386. },
  387. // 获取当前门店扫描记录
  388. getVinLog(){
  389. this.vinList = []
  390. this.status = "loading"
  391. // VISITOR:游客,EMPLOYEE:雇员
  392. getScanVinLogList({ pageNo:1, pageSize:5, identifyType: this.userInfo.identifyType }).then(res => {
  393. this.vinList = res.data&&res.data.list || []
  394. this.vinList = this.vinList.filter(item => item.vinCode)
  395. this.status = 'nomore'
  396. })
  397. },
  398. // 查询是否支持数字货架
  399. getStoreShelf(){
  400. findStoreShelf().then(res => {
  401. this.$store.state.vuex_storeShelf = res.data;
  402. if(res.data){
  403. // 获取价格权限配置
  404. this.getPriceCofig()
  405. // 保证金查询
  406. this.getShelfBWPayRecord()
  407. // 获取订单信息
  408. this.shelfGetTotalWaitQty()
  409. // 获取轮播数据
  410. this.getCarousel()
  411. // 显示促销模块
  412. this.$store.state.vuex_tabBarList.splice(1,0,{
  413. "pagePath": "/pages/promo/index",
  414. "iconPath": "/static/tab/tab_promo_normal.png",
  415. "selectedIconPath": "/static/tab/tab_promo_pressed.png",
  416. "text": "促销",
  417. 'customIcon': false,
  418. })
  419. }
  420. })
  421. },
  422. // 查询是有红包活动
  423. getRedPacketRule(){
  424. findCurrentRewardRule().then(res => {
  425. this.$store.state.vuex_rewardRule = res.data;
  426. this.getRedScroll()
  427. })
  428. },
  429. getRedScroll(){
  430. getRewardRollList({pageNo:1,pageSize:50}).then(res => {
  431. this.slist = res.data || []
  432. this.slist.map(item => {
  433. item.placeText = item.userName + '刚刚得到了'+item.totalRewardAmount+'元 红包奖励'
  434. })
  435. })
  436. },
  437. // 获取保证金金额
  438. getShelfBWPayRecord(){
  439. const data = this.$store.state.vuex_storeShelf
  440. shelfBondRecordWaitPayRecord({shelfSn: data.shelfSn, storeSn: data.storeSn}).then(res => {
  441. console.log(res,'获取保证金金额')
  442. this.bondRecord = res.data
  443. })
  444. },
  445. // 保证金支付
  446. toPayBondAmount(){},
  447. openTakeGood(index){
  448. // 已有数字货架
  449. if(this.hasShelf){
  450. this.clickAction(index)
  451. }else{
  452. uni.showToast({
  453. icon:'none',
  454. title: '门店没有关联数字货架,无法使用此功能!'
  455. })
  456. }
  457. },
  458. // 单击banner
  459. clickBanner(index){
  460. const row = this.imgList[index]
  461. // 红包
  462. if(row.activeType == 'redPacket'){
  463. uni.navigateTo({url:"/pages/morePage/redPacket"})
  464. }
  465. // 图文
  466. if(row.contentType == 'IMAGE_CONTENT'){
  467. uni.navigateTo({url:"/pagesA/activeDetail/index?sn="+row.promoActiveSn})
  468. }
  469. // 视频
  470. if(row.contentType == 'VIDEO'){
  471. uni.navigateTo({url:"/pages/videos/detail?form=banner&&sn="+row.promoActiveSn})
  472. }
  473. // 链接
  474. if(row.contentType == 'LINK'){
  475. openWebView({url:row.content})
  476. }
  477. },
  478. // 选择取货方式
  479. clickAction(index){
  480. const shelfSn = this.hasShelf.shelfSn
  481. const _this = this
  482. // 扫描
  483. if(index == 0){
  484. uni.scanCode({
  485. success: function (ret) {
  486. console.log(ret);
  487. const params = {
  488. codeType: ret.scanType == 'QR_CODE' ? 0 : 1
  489. }
  490. // 二维码
  491. if(ret.scanType == 'QR_CODE'){
  492. const result = ret.result.split("&")
  493. params.productSn = result[2] // 产品编码sn
  494. }else{
  495. params.qrCode = ret.result
  496. }
  497. uni.showLoading({
  498. title: "正在查询产品..."
  499. })
  500. // 确认取货
  501. getProductfindByScanCode(params).then(res => {
  502. if(res.status == 200 && res.data){
  503. if(res.data.currentInven){
  504. const billSource = ret.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'
  505. const retData = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
  506. _this.$store.state.vuex_tempData = retData
  507. uni.navigateTo({
  508. url: '/pagesA/queryByCode/confirmQh'
  509. })
  510. }else{
  511. uni.showModal({
  512. title: '提示',
  513. content: '产品库存为0,无法取货!',
  514. confirmText: '好的',
  515. showCancel: false
  516. })
  517. }
  518. }else{
  519. uni.showModal({
  520. title: '提示',
  521. content: '产品不属于此货架,请重新扫描!',
  522. confirmText: '好的',
  523. showCancel: false
  524. })
  525. }
  526. uni.hideLoading()
  527. })
  528. }
  529. });
  530. }else{
  531. // 按编码搜索
  532. uni.navigateTo({
  533. url: '/pagesA/queryByCode/queryByCode'
  534. })
  535. }
  536. },
  537. // 去扫描
  538. openCamera(){
  539. if(this.hasLogin){
  540. // 游客身份
  541. if(this.userInfo.sysUserFlag == '0'){
  542. // 最多扫10次
  543. if(this.vuex_vinScanNums < this.scanMaxNums){
  544. uni.navigateTo({
  545. url: "/pages/scan-frame/scan-frame"
  546. })
  547. }else{
  548. uni.showModal({
  549. title: '提示',
  550. content: '个人用户扫描VIN仅限10次,您的次数已用完!',
  551. confirmText: '好的',
  552. showCancel: false,
  553. success(res) {}
  554. })
  555. }
  556. }else{
  557. // 非游客,直接扫
  558. uni.navigateTo({
  559. url: "/pages/scan-frame/scan-frame"
  560. })
  561. }
  562. }else{
  563. uni.navigateTo({
  564. url: '/pages/login/login'
  565. })
  566. }
  567. },
  568. // 查看扫描记录
  569. toAllRecord(){
  570. uni.navigateTo({
  571. url: this.hasLogin ? "/pagesA/vinRecord/vinRecord" : '/pages/login/login'
  572. })
  573. },
  574. // 查看用户信息
  575. toUser(){
  576. if(this.hasLogin){
  577. // 用户详细信息 或 门店认证
  578. uni.navigateTo({
  579. url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
  580. })
  581. }else{
  582. uni.navigateTo({
  583. url: '/pages/login/login'
  584. })
  585. }
  586. },
  587. // 选择配件
  588. toChoosePart(item){
  589. item.text = item.modelInfo
  590. uni.navigateTo({
  591. url: "/pagesA/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))+'&type=log'
  592. })
  593. }
  594. }
  595. }
  596. </script>
  597. <style lang="less">
  598. page{
  599. background-color: #ffffff;
  600. }
  601. .content {
  602. margin: 0;
  603. padding: 0;
  604. height: 100vh;
  605. display: flex;
  606. flex-direction: column;
  607. background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
  608. .header-box{
  609. z-index: 5;
  610. padding: 0em 1em;
  611. background: #066cff;
  612. .title{
  613. padding: 0;
  614. }
  615. }
  616. .cbody{
  617. flex-grow: 1;
  618. overflow-y: auto;
  619. overflow-x: hidden;
  620. }
  621. .body-box{
  622. padding: 0em 1em 0.8em;
  623. z-index: 4;
  624. .notices{
  625. padding: 0.5em 0 0;
  626. font-size: 0.9em;
  627. margin-top: 0.5rem;
  628. view{
  629. color: #ffaf46;
  630. max-width: 80%;
  631. }
  632. .text{
  633. color: #ffffff;
  634. margin-left: 1em;
  635. }
  636. }
  637. .action-button{
  638. padding:40upx 0 0 0;
  639. justify-content: space-between;
  640. > view{
  641. display: flex;
  642. align-items: center;
  643. color: #fff;
  644. border-radius: 10rpx;
  645. width: 49%;
  646. }
  647. .f1{
  648. background: #ff9800;
  649. }
  650. .f2{
  651. background: #2196f3;
  652. }
  653. .icons{
  654. font-size: 50rpx;
  655. color: #fff;
  656. width: 80rpx;
  657. height: 80rpx;
  658. text-align:center;
  659. display: flex;
  660. align-items: center;
  661. flex-direction: column;
  662. justify-content: center;
  663. }
  664. .tits{
  665. font-size:28rpx;
  666. }
  667. }
  668. .scanButton{
  669. margin: 0.8em 0 0.5em;
  670. padding: 0.5em;
  671. background: #066cff;
  672. color: #fff;
  673. font-size: 1.5em;
  674. border-radius: 5em;
  675. justify-content: center;
  676. &:active{
  677. opacity: 0.8;
  678. }
  679. }
  680. .quickButton{
  681. margin: 0.8em 0 0.5em;
  682. padding: 0.5em;
  683. background: #fff;
  684. color: #333;
  685. font-size: 1.5em;
  686. border-radius: 5em;
  687. justify-content: center;
  688. border:0.1rpx solid #eee;
  689. box-shadow: 1rpx 2rpx 5rpx #f8f8f8;
  690. &:active{
  691. opacity: 0.8;
  692. }
  693. }
  694. .ml10{
  695. margin-left: 0.4em;
  696. }
  697. }
  698. .bg-blue{
  699. position: relative;
  700. > view{
  701. z-index: 100;
  702. position: relative;
  703. }
  704. &::after{
  705. /* 这个伪类的作用就是一个圆弧的背景色 */
  706. width: 130%;
  707. height: 100%;
  708. position: absolute;
  709. /*设置水平居中*/
  710. left: -15%;
  711. /* 之所以left:20%,是因为width:140%,若width:160%,那么left:30%才能水平居中 */
  712. top: -20%;
  713. /*层叠顺序,最底层显示*/
  714. content: '';
  715. border-radius: 0 0 50% 50%;
  716. /*分别对应 左上 右上 右下 左下 可以修改成其它颜色*/
  717. background: linear-gradient(to bottom, #066cff, #1d77ff);
  718. }
  719. .userCard{
  720. position:relative;
  721. left:0;
  722. bottom:-1rem;
  723. padding:0.8em;
  724. background: #fff;
  725. border-radius: 0.5em;
  726. box-shadow: 0.3em 0.3em 1em #c4e5ee;
  727. .userCard-info{
  728. flex-grow:1;
  729. > view{
  730. &:last-child{
  731. margin-left: 0.5em;
  732. line-height: 1.5em;
  733. .user-name{
  734. font-size: 1rem;
  735. }
  736. >view{
  737. padding: 0.2em;
  738. }
  739. }
  740. }
  741. .user-info{
  742. flex-grow:1;
  743. }
  744. }
  745. .user-rz{
  746. font-size: 0.8rem;
  747. color:#58aff5;
  748. }
  749. }
  750. }
  751. .list-box{
  752. padding: 0 1em;
  753. overflow: auto;
  754. .des{
  755. text-align: center;
  756. padding: 1em 0;
  757. color: #999;
  758. font-size: 0.8em;
  759. }
  760. }
  761. }
  762. </style>