selectCity.vue 20 KB

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