selectCity.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <template>
  2. <view>
  3. <u-navbar :title="title" @leftClick='back' :placeholder='true'>
  4. </u-navbar>
  5. <view class="row1">
  6. <view class="start-place" :class="type==0?'active1':''" @click="changeCity(0)">选择发货地</view>
  7. <view class="end-place" :class="type==1?'active1':''" @click="changeCity(1)">选择收货地</view>
  8. </view>
  9. <view class="container">
  10. <view class="row2">
  11. <view class="content1" v-if="type==0">
  12. <view class="history-city-title">历史发货地</view>
  13. <view class="city-list">
  14. <view class="city" v-for="(item,index) in historyFcityList" :key='index'>
  15. {{item.selected}}
  16. </view>
  17. </view>
  18. </view>
  19. <view class="content2" v-if="type==1">
  20. <view class="history-city-title">历史收货地</view>
  21. <view class="city-list">
  22. <view class="city" v-for="(item,index) in historyScityList" :key='index'>
  23. {{item.selected}}
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="page">
  30. <view class="title flex flex-space-between">
  31. <view class="flex nav-bag-left">
  32. <!-- 省 -->
  33. <view class="flex" :class="(type==0?fstatus:sstatus)==0?'select-active':''" @click="titleClick(0)">
  34. <view class="tt point">{{type==0?fchooseprovince:schooseprovince}}</view>
  35. <view v-if="type==0?fchooseprovince:schooseprovince" style="margin: 0 10rpx;">></view>
  36. </view>
  37. <!-- 市 -->
  38. <view class="flex"
  39. v-if="(type==0?fchooseprovince:schooseprovince)!='选择'&&(type==0?fchooseprovince:schooseprovince)!='全国'"
  40. :class="(type==0?fstatus:sstatus)==1?'select-active':''" @click="titleClick(1)">
  41. <view class="tt point nav-point">{{type==0?fchoosecity:schoosecity}}</view>
  42. <view v-if="type==0?fchoosecity:schoosecity" style="margin: 0 10rpx;">></view>
  43. </view>
  44. <!-- 区 -->
  45. <view class="tt area"
  46. v-if="(type==0?fchooseprovince:schooseprovince)!='选择'&&(type==0?fchoosecity:schoosecity)!='请选择市'&&(type==0?fchoosecity:schoosecity)!='全部'"
  47. :class="(type==0?fstatus:sstatus)==2?'select-active':''" @click="titleClick(2)">
  48. {{type==0?fchoosearea:schoosearea}}
  49. </view>
  50. </view>
  51. <view class="back-level" v-if="(type==0?fstatus:sstatus)!=0" @click="backLevel">返回上一级</view>
  52. </view>
  53. <view class="link">
  54. <!-- 省 -->
  55. <view class="container" v-if="(type==0?fstatus:sstatus)==0">
  56. <view class="content-item" :class="index ==(type==0?isfprovince:issprovince) ?'active':''"
  57. @click="selectProvince(item, index,(type==0?fstatus:sstatus))"
  58. v-for="(item,index) in (type==0?fprovincelist:sprovincelist)" :key="index">
  59. {{item.label}}
  60. </view>
  61. </view>
  62. <!-- 市 -->
  63. <view class="container" v-if="(type==0?fstatus:sstatus)==1">
  64. <view class="content-item" :class="index == (type==0?isfcity:isscity)?'active':''"
  65. @click="selectCity(item, index,type==0?fstatus:sstatus)"
  66. v-for="(item,index) in (type==0?fcitylist:scitylist)" :key="index">
  67. {{item.label}}
  68. </view>
  69. </view>
  70. <!-- index ==(type==0?isfarea:issarea) -->
  71. <!-- 区 -->
  72. <view class="container" v-if="(type==0?fstatus:sstatus)==2">
  73. <view class="content-item" :class="item.checked?'active':''"
  74. @click="selectaArea(item, index,(type==0?fstatus:sstatus))"
  75. v-for="(item,index) in (type==0?farealist:sarealist)" :key="index">
  76. {{item.label}}
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <u-button class="btn" @click="confirmBtn">确定</u-button>
  82. <u-toast ref="uToast"></u-toast>
  83. </view>
  84. </template>
  85. <script>
  86. import {
  87. address
  88. } from '@/components/data/data.js'
  89. export default {
  90. data() {
  91. return {
  92. fstatus: 0,
  93. sstatus: 0,
  94. isfprovince: null,
  95. isfcity: null,
  96. isfarea: null,
  97. issprovince: null,
  98. isscity: null,
  99. issarea: null,
  100. fprovincelist: [],
  101. sprovincelist: [],
  102. fcitylist: [],
  103. scitylist: [],
  104. farealist: [],
  105. sarealist: [],
  106. fchooseprovince: '选择',
  107. fchoosecity: '请选择市',
  108. fchoosearea: '请选择区',
  109. schooseprovince: '选择',
  110. schoosecity: '请选择市',
  111. schoosearea: '请选择区',
  112. heightCot: 0,
  113. historyFcityList: [],
  114. historyScityList: [],
  115. title: '',
  116. type: 0,
  117. count: 0,
  118. ftitle: '',
  119. stitle: '',
  120. selectList: [],
  121. }
  122. },
  123. created() {
  124. this.fprovincelist = address
  125. this.sprovincelist = address
  126. console.log('---------------------------------')
  127. console.log(this.type)
  128. },
  129. onLoad(options) {
  130. console.log(options)
  131. this.type = options.type
  132. this.title = options.startPlace + '→' + options.endPlace
  133. //获取缓存收发地
  134. if (uni.getStorageSync('fPlaceList')) {
  135. this.historyFcityList = uni.getStorageSync('fPlaceList');
  136. } else {
  137. this.historyFcityList = []
  138. }
  139. if (uni.getStorageSync('sPlaceList')) {
  140. this.historyScityList = uni.getStorageSync('sPlaceList');
  141. } else {
  142. this.historyScityList = []
  143. }
  144. //赋值地区
  145. },
  146. methods: {
  147. // 历史收发地去重
  148. makeHistoryList(val) {
  149. debugger
  150. if (this.type == 0) {
  151. let _obj = {}
  152. // for (let i = 0; i < this.historyScityList.length; i++) {
  153. // // let _data = this.historyScityList[i]
  154. // }
  155. if (val.selected == '全国' || val.fchoosecity == '全部') {
  156. this.historyFcityList = this.historyFcityList.reduce((cur, item) => {
  157. _obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
  158. return cur;
  159. }, [])
  160. } else {
  161. this.historyFcityList = this.historyFcityList.reduce((cur, item) => {
  162. if (item.fchoosecity == val.fchoosecity) {
  163. _obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
  164. return cur;
  165. } else {
  166. _obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
  167. return cur;
  168. }
  169. }, [])
  170. }
  171. return this.historyFcityList
  172. } else {
  173. let _obj = {}
  174. // for (let i = 0; i < this.historyScityList.length; i++) {
  175. // // let _data = this.historyScityList[i]
  176. // }
  177. if (val.selected == '全国' || val.schoosecity == '全部') {
  178. this.historyScityList = this.historyScityList.reduce((cur, item) => {
  179. _obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
  180. return cur;
  181. }, [])
  182. } else {
  183. this.historyScityList = this.historyScityList.reduce((cur, item) => {
  184. if (item.schoosecity == val.schoosecity) {
  185. _obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
  186. return cur;
  187. } else {
  188. _obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
  189. return cur;
  190. }
  191. }, [])
  192. }
  193. return this.historyScityList
  194. }
  195. },
  196. confirmBtn() {
  197. //设置地区 0发货地 1收货地
  198. if (this.type == 0) {
  199. if (this.fchooseprovince == '选择' || (this.fchoosecity == '请选择市' && this.fchooseprovince != '全国')) {
  200. this.$refs.uToast.show({
  201. type: 'error',
  202. message: "请选择区域!",
  203. })
  204. return
  205. }
  206. console.log("省", this.fchooseprovince)
  207. console.log("市", this.fchoosecity)
  208. console.log("区", this.fchoosearea)
  209. let _obj = {
  210. fchooseprovince: this.fchooseprovince,
  211. fchoosecity: this.fchoosecity,
  212. fchoosearea: this.fchoosearea,
  213. selected: ''
  214. }
  215. //选中全国
  216. if (this.fchoosecity == '请选择市' && this.fchooseprovince == '全国') {
  217. _obj.selected = this.fchooseprovince
  218. this.historyFcityList.unshift(_obj)
  219. let _newList = this.makeHistoryList(_obj)
  220. uni.setStorageSync('fPlaceList', _newList);
  221. }
  222. //选择省
  223. if (this.fchoosearea == '请选择区' && this.fchoosecity == '全部') {
  224. _obj.selected = this.fchooseprovince
  225. this.historyFcityList.unshift(_obj)
  226. let _newList = this.makeHistoryList(_obj)
  227. uni.setStorageSync('fPlaceList', _newList);
  228. }
  229. //选择市
  230. if (this.fchoosearea == '全部') {
  231. _obj.selected = this.fchoosecity
  232. this.historyFcityList.unshift(_obj)
  233. let _newList = this.makeHistoryList(_obj)
  234. uni.setStorageSync('fPlaceList', _newList);
  235. }
  236. uni.setStorageSync('fPlaceObj', _obj);
  237. //选择区
  238. if (this.fchoosearea != '请选择区' && this.fchoosearea != '全部') {
  239. let _list = this.fchoosearea.split(',')
  240. let _newList
  241. //设置历史收发地并去重,区重名判断是否是同一个市在去重
  242. for (let i = 0; i < _list.length; i++) {
  243. let _deepObj = uni.$u.deepClone(_obj)
  244. _deepObj.selected = _list[i]
  245. this.historyFcityList.unshift(_deepObj)
  246. _newList = this.makeHistoryList(_deepObj)
  247. }
  248. console.log(_newList)
  249. uni.setStorageSync('fPlaceList', this.historyFcityList);
  250. uni.setStorageSync('fPlaceObj', {
  251. fchooseprovince: this.fchooseprovince,
  252. fchoosecity: this.fchoosecity,
  253. fchoosearea: this.fchoosearea,
  254. selected: this.fchoosearea
  255. });
  256. }
  257. console.log(this.historyFcityList)
  258. uni.switchTab({
  259. url: '/pages/goodSource/index'
  260. });
  261. } else {
  262. //收货地
  263. if (this.schooseprovince == '选择' || (this.schoosecity == '请选择市' && this.schooseprovince != '全国')) {
  264. this.$refs.uToast.show({
  265. type: 'error',
  266. message: "请选择区域!",
  267. })
  268. }
  269. console.log(this.schooseprovince)
  270. console.log(this.schoosecity)
  271. console.log(this.schoosearea)
  272. let _obj = {
  273. schooseprovince: this.schooseprovince,
  274. schoosecity: this.schoosecity,
  275. schoosearea: this.schoosearea,
  276. selected: ''
  277. }
  278. //选中全国
  279. if (this.schoosecity == '请选择市' && this.schooseprovince == '全国') {
  280. _obj.selected = this.schooseprovince
  281. this.historyScityList.unshift(_obj)
  282. let _newList = this.makeHistoryList(_obj)
  283. uni.setStorageSync('sPlaceList', _newList);
  284. }
  285. //选择省
  286. if (this.schoosearea == '请选择区' && this.schoosecity == '全部') {
  287. _obj.selected = this.schooseprovince
  288. this.historyScityList.unshift(_obj)
  289. let _newList = this.makeHistoryList(_obj)
  290. uni.setStorageSync('sPlaceList', _newList);
  291. }
  292. //选择市
  293. if (this.schoosearea == '全部') {
  294. _obj.selected = this.schoosecity
  295. this.historyScityList.unshift(_obj)
  296. let _newList = this.makeHistoryList(_obj)
  297. uni.setStorageSync('sPlaceList', _newList);
  298. }
  299. uni.setStorageSync('sPlaceObj', _obj);
  300. //选择区
  301. if (this.schoosearea != '请选择区' && this.schoosearea != '全部') {
  302. let _list = this.schoosearea.split(',')
  303. let _newList
  304. for (let i = 0; i < _list.length; i++) {
  305. let _deepObj = uni.$u.deepClone(_obj)
  306. _deepObj.selected = _list[i]
  307. this.historyScityList.unshift(_deepObj)
  308. _newList = this.makeHistoryList(_deepObj)
  309. }
  310. console.log(_newList)
  311. uni.setStorageSync('sPlaceList', this.historyScityList);
  312. uni.setStorageSync('sPlaceObj', {
  313. schooseprovince: this.schooseprovince,
  314. schoosecity: this.schoosecity,
  315. schoosearea: this.schoosearea,
  316. selected: this.schoosearea
  317. });
  318. }
  319. console.log(this.historyScityList)
  320. uni.switchTab({
  321. url: '/pages/goodSource/index'
  322. });
  323. }
  324. },
  325. //返回上一级
  326. backLevel() {
  327. // this.count=0;
  328. if (this.type == 0) {
  329. this.fstatus--
  330. } else {
  331. this.sstatus--
  332. }
  333. if ((this.type == 0 ? this.fstatus : this.sstatus) == 1) {
  334. if (this.type == 0) {
  335. this.fchoosecity = '请选择市'
  336. this.fchoosearea = ''
  337. this.ftitle = ''
  338. this.isfcity = null
  339. } else {
  340. this.schoosecity = '请选择市'
  341. this.schoosearea = ''
  342. this.stitle = ''
  343. this.isscity = null
  344. }
  345. } else if ((this.type == 0 ? this.fstatus : this.sstatus) == 0) {
  346. if (this.type == 0) {
  347. this.fchooseprovince = '选择'
  348. this.isfprovince = null
  349. } else {
  350. this.schooseprovince = '选择'
  351. this.issprovince = null
  352. }
  353. }
  354. },
  355. // 点击面包屑导航
  356. titleClick(status) {
  357. this.ftitle = ''
  358. this.stitle = ''
  359. this.count = 0
  360. if (this.type == 0) {
  361. this.fstatus = status
  362. this.isfprovince = null
  363. this.isfcity = null
  364. this.isfarea = null
  365. if (this.fchoosecity == '全部') return;
  366. } else {
  367. this.sstatus = status
  368. this.issprovince = null
  369. this.isscity = null
  370. this.issarea = null
  371. if (this.fchoosecity == '全部') return;
  372. }
  373. if (status == 0) {
  374. if (this.type == 0) {
  375. this.fchooseprovince = '选择'
  376. this.fchoosecity = '请选择市'
  377. this.fchoosearea = '请选择区'
  378. } else {
  379. this.schooseprovince = '选择'
  380. this.schoosecity = '请选择市'
  381. this.schoosearea = '请选择区'
  382. }
  383. } else if (status == 1) {
  384. if (this.type == 0) {
  385. this.fchoosecity = '请选择市'
  386. this.fchoosearea = '请选择区'
  387. } else {
  388. this.schoosecity = '请选择市'
  389. this.schoosearea = '请选择区'
  390. }
  391. }
  392. },
  393. // 选择省
  394. selectProvince(item, i, statusIndex) {
  395. this.count = 0;
  396. if (this.type == 0) {
  397. if (i == 0) {
  398. this.$refs.uToast.show({
  399. type: 'error',
  400. message: "发货地不可选择全国!",
  401. })
  402. return
  403. }
  404. this.fchoosecity = '请选择市'
  405. this.fchoosearea = '请选择区'
  406. this.isfprovince = i
  407. this.fchooseprovince = item.label
  408. if (item.child) {
  409. this.fcitylist = item.child
  410. }
  411. if (this.fchoosecity != '全部') {
  412. this.fstatus = statusIndex + 1
  413. }
  414. } else {
  415. this.issprovince = i
  416. this.schooseprovince = item.label
  417. if (item.label == '全国') {
  418. item.checked = !item.checked
  419. if (!item.checked) {
  420. this.issprovince = null
  421. }
  422. return
  423. } else {
  424. this.schoosecity = '请选择市'
  425. this.schoosearea = '请选择区'
  426. if (item.child) {
  427. this.scitylist = item.child
  428. }
  429. if (this.schoosecity != '全部') {
  430. this.sstatus = statusIndex + 1
  431. }
  432. }
  433. }
  434. },
  435. // 选择市
  436. selectCity(item, i, statusIndex) {
  437. this.count = 0;
  438. if (this.type == 0) {
  439. this.isfcity = i
  440. } else {
  441. this.isscity = i
  442. }
  443. if (item.child) {
  444. for (let i = 0; i < item.child.length; i++) {
  445. item.child[i].checked = false
  446. }
  447. if (this.type == 0) {
  448. this.farealist = item.child
  449. } else {
  450. this.sarealist = item.child
  451. }
  452. }
  453. if (this.type == 0) {
  454. this.fchoosecity = item.label
  455. } else {
  456. this.schoosecity = item.label
  457. }
  458. if ((this.type == 0 ? this.fchoosecity : this.schoosecity) != '全部') {
  459. if (this.type == 0) {
  460. this.fstatus = statusIndex + 1
  461. } else {
  462. this.sstatus = statusIndex + 1
  463. }
  464. }
  465. },
  466. //选择区
  467. selectaArea(item, i) {
  468. if (item.label == '全部') {
  469. if (this.type == 0) {
  470. for (let i = 0; i < this.farealist.length; i++) {
  471. if (i == 0) {
  472. this.farealist[i].checked = true
  473. } else {
  474. this.farealist[i].checked = false
  475. }
  476. }
  477. this.fchoosearea = '全部'
  478. this.$forceUpdate()
  479. return
  480. } else {
  481. for (let i = 0; i < this.sarealist.length; i++) {
  482. if (i == 0) {
  483. this.sarealist[i].checked = true
  484. } else {
  485. this.sarealist[i].checked = false
  486. }
  487. }
  488. this.schoosearea = '全部'
  489. this.$forceUpdate()
  490. return
  491. }
  492. }
  493. if (this.count < 3) {
  494. item.checked = !item.checked
  495. if (item.checked && this.count < 3) {
  496. this.count++;
  497. } else if (!item.checked && this.count < 3) {
  498. this.count--;
  499. }
  500. } else {
  501. if (item.checked) {
  502. item.checked = !item.checked
  503. this.count--;
  504. } else {
  505. this.$refs.uToast.show({
  506. type: 'error',
  507. message: "最多选择3个地区",
  508. })
  509. }
  510. }
  511. this.$forceUpdate()
  512. //设置面包屑 0发货地 1收货地
  513. if (this.type == 0) {
  514. if (item.checked && !this.fchoosearea.includes(item.label)) {
  515. if (this.ftitle) {
  516. this.ftitle += ',' + item.label
  517. } else {
  518. this.ftitle += item.label
  519. }
  520. this.fchoosearea = this.ftitle
  521. console.log(this.fchoosearea)
  522. } else {
  523. if (this.ftitle.includes(',' + item.label)) {
  524. this.ftitle = this.ftitle.replace(',' + item.label, '')
  525. this.fchoosearea = this.fchoosearea.replace(',' + item.label, '')
  526. } else {
  527. let _val = this.ftitle.split(',')
  528. let _len = _val.length;
  529. if (_len == 1) {
  530. this.ftitle = this.ftitle.replace(item.label, '')
  531. this.fchoosearea = '请选择区'
  532. } else if (_len > 1) {
  533. this.ftitle = this.ftitle.replace(item.label + ',', '')
  534. this.fchoosearea = this.fchoosearea.replace(item.label + ',', '')
  535. }
  536. }
  537. }
  538. } else {
  539. if (item.checked && !this.schoosearea.includes(item.label)) {
  540. if (this.stitle) {
  541. this.stitle += ',' + item.label
  542. } else {
  543. this.stitle += item.label
  544. }
  545. this.schoosearea = this.stitle
  546. } else {
  547. if (this.stitle.includes(',' + item.label)) {
  548. this.stitle = this.stitle.replace(',' + item.label, '')
  549. this.schoosearea = this.schoosearea.replace(',' + item.label, '')
  550. } else {
  551. let _val = this.stitle.split(',')
  552. let _len = _val.length;
  553. if (_len == 1) {
  554. this.stitle = this.stitle.replace(item.label, '')
  555. this.schoosearea = '请选择区'
  556. } else if (_len > 1) {
  557. this.stitle = this.stitle.replace(item.label + ',', '')
  558. this.schoosearea = this.schoosearea.replace(item.label + ',', '')
  559. }
  560. }
  561. }
  562. }
  563. },
  564. changeCity(type) {
  565. if (type == 0) {
  566. this.type = 0
  567. } else {
  568. this.type = 1
  569. }
  570. },
  571. back() {
  572. uni.navigateBack({
  573. })
  574. },
  575. }
  576. }
  577. </script>
  578. <style lang="scss" scoped>
  579. .row1 {
  580. display: flex;
  581. justify-content: space-evenly;
  582. margin-top: 10rpx;
  583. border-bottom: 1px solid #E6E6E6;
  584. }
  585. .start-place,
  586. .end-place {
  587. font-size: 28rpx;
  588. color: #B1B5C0;
  589. padding-bottom: 20rpx;
  590. }
  591. .active1 {
  592. position: relative;
  593. color: black;
  594. font-size: 32rpx;
  595. font-weight: 700;
  596. display: flex;
  597. justify-content: center;
  598. }
  599. .active1:after {
  600. content: '';
  601. position: absolute;
  602. bottom: 0rpx;
  603. width: 50%;
  604. left: 25%;
  605. padding: 0 20rpx;
  606. box-sizing: border-box;
  607. height: 6rpx;
  608. background: #2772FB;
  609. border-radius: 3px;
  610. }
  611. .history-city-title {
  612. font-size: 28rpx;
  613. font-weight: 700;
  614. color: #363636;
  615. margin-bottom: 20rpx;
  616. }
  617. .container {
  618. padding: 0 20rpx;
  619. }
  620. .content1 {
  621. margin: 20rpx 0;
  622. }
  623. .city-list {
  624. max-height: 118rpx;
  625. overflow: hidden;
  626. }
  627. .city {
  628. display: inline-block;
  629. font-size: 26rpx;
  630. text-align: center;
  631. padding: 8rpx 16rpx;
  632. margin: 0 20rpx 20rpx 0;
  633. height: 33rpx;
  634. line-height: 33rpx;
  635. border-radius: 4rpx;
  636. background: #F7F8FA;
  637. }
  638. .content2 {
  639. margin: 20rpx 0;
  640. }
  641. .container {
  642. // width: 100%;
  643. width: calc(100% - 40rpx);
  644. display: inline-flex;
  645. flex-flow: row wrap;
  646. align-content: flex-start;
  647. }
  648. .select-active,
  649. .back-level {
  650. color: #2772FB;
  651. font-size: 28rpx;
  652. }
  653. .content-item {
  654. background: #F7F8FA;
  655. margin: 10rpx;
  656. font-size: 30rpx;
  657. color: #333333;
  658. text-align: center;
  659. padding: 10rpx 0;
  660. border-radius: 10rx;
  661. overflow: hidden;
  662. text-overflow: ellipsis;
  663. white-space: nowrap;
  664. padding: 6rpx 8rpx;
  665. box-sizing: border-box;
  666. flex: 0 0 calc(25% - 20rpx);
  667. }
  668. .title {
  669. margin: 0 20rpx;
  670. }
  671. .active {
  672. background: #E5F0FE;
  673. border-radius: 10rpx;
  674. // border: 1px solid #2772FB;
  675. color: #2772FB;
  676. box-sizing: border-box;
  677. }
  678. .area {
  679. width: 55%;
  680. text-overflow: ellipsis;
  681. white-space: nowrap;
  682. overflow: hidden;
  683. }
  684. .nav-bag-left {
  685. width: 70%;
  686. font-size: 30rpx;
  687. }
  688. .btn {
  689. background: #2772FB;
  690. color: white;
  691. width: 80%;
  692. position: absolute;
  693. bottom: 30rpx;
  694. margin-left: 10%;
  695. border-radius: 50rpx;
  696. }
  697. </style>