爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

751 lines
23 KiB

2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="container" :style="{paddingTop: (statusBarHeight + 88) + 'rpx'}">
  3. <!-- 顶部导航 -->
  4. <view class="nav-bar" :style="{height: (statusBarHeight + 88) + 'rpx', paddingTop: statusBarHeight + 'px'}">
  5. <view class="back" @tap="goBack">
  6. <uni-icons type="left" size="20"></uni-icons>
  7. </view>
  8. <text class="title">选择寄件地址</text>
  9. </view>
  10. <!-- 地址列表 -->
  11. <view class="address-list">
  12. <view
  13. class="address-item"
  14. @click="selectAddress(item)"
  15. v-for="(item, index) in addressList"
  16. :key="index"
  17. >
  18. <view class="address-header">
  19. <text class="name">{{item.name}}</text>
  20. <text class="phone">{{item.phone}}</text>
  21. <text v-if="item.defaultFlag === 'Y'" class="default-tag">默认</text>
  22. </view>
  23. <view class="address-text">{{item.address}} {{item.addressDetails}}</view>
  24. <view class="dashed-line"></view>
  25. <view class="address-actions">
  26. <view class="action" @tap="setDefault(item.id)">
  27. <view class="circle" :class="{ active: item.defaultFlag === 'Y' }">
  28. <text v-if="item.defaultFlag === 'Y'" class="check"></text>
  29. </view>
  30. <text :class="{ 'active-text': item.defaultFlag === 'Y' }">默认地址</text>
  31. </view>
  32. <view class="action" @tap="editAddress(item)">
  33. <uni-icons type="compose" size="22" color="#bbb" />
  34. <text>编辑</text>
  35. </view>
  36. <view class="action" @tap="deleteAddress(item.id)">
  37. <uni-icons type="trash" size="22" color="#bbb" />
  38. <text>删除</text>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 新建地址按钮 -->
  44. <view class="bottom-bar">
  45. <button class="main-btn" @tap="goToAddAddress">新建地址</button>
  46. </view>
  47. <!-- 遮罩 -->
  48. <view v-if="showAddressModal" class="modal-mask" @tap="closeAddressModal"></view>
  49. <!-- 新建地址弹窗 -->
  50. <view v-if="showAddressModal" class="address-modal">
  51. <view class="modal-header">
  52. <text class="close-btn" @tap="closeAddressModal">关闭</text>
  53. <text class="modal-title">{{form.id ? '编辑地址' : '新建地址'}}</text>
  54. </view>
  55. <view class="modal-form">
  56. <view class="form-item">
  57. <text class="label">联系人</text>
  58. <input class="input" v-model="form.name" placeholder="请输入" />
  59. </view>
  60. <view class="form-item">
  61. <text class="label">手机号</text>
  62. <input class="input" v-model="form.phone" placeholder="请输入" />
  63. </view>
  64. <view class="form-item" @tap="selectRegion">
  65. <text class="label">所在地区</text>
  66. <view class="input region-input">
  67. <text :class="{placeholder: !form.address}">
  68. {{ form.address || '选择省市区街道' }}
  69. </text>
  70. <text class="arrow">></text>
  71. </view>
  72. </view>
  73. <view class="form-item">
  74. <text class="label">详细地址</text>
  75. <input class="input" v-model="form.addressDetails" placeholder="小区楼栋、门牌号、村等" />
  76. </view>
  77. </view>
  78. <button class="main-btn" @tap="saveAddress">保存</button>
  79. </view>
  80. <!-- 地区选择器弹窗 -->
  81. <view v-if="showRegionPicker" class="region-modal">
  82. <view class="modal-header">
  83. <text class="close-btn" @tap="showRegionPicker = false">关闭</text>
  84. <text class="modal-title">手动选择地区</text>
  85. </view>
  86. <view class="region-tip">
  87. <text>请手动选择准确的省市区信息</text>
  88. </view>
  89. <view class="region-picker">
  90. <picker-view style="height:300px;" :value="regionIndex" @change="onRegionChange">
  91. <picker-view-column >
  92. <view v-for="(item,index) in provinces" :key="index" class="item">{{item.name}}</view>
  93. </picker-view-column>
  94. <picker-view-column>
  95. <view v-for="(item,index) in cities" :key="index" class="item">{{item.name}}</view>
  96. </picker-view-column>
  97. <picker-view-column>
  98. <view v-for="(item,index) in districts" :key="index" class="item">{{item.name}}</view>
  99. </picker-view-column>
  100. </picker-view>
  101. </view>
  102. <button class="main-btn" @tap="confirmRegion">确认</button>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. import regionData from '@/pages/subcomponent/region-data.js'
  108. import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js'
  109. export default {
  110. mixins: [pullRefreshMixin],
  111. data() {
  112. return {
  113. statusBarHeight: 0,
  114. addressList: [
  115. ],
  116. batchMode: false,
  117. selectedIndexes: [],
  118. showAddressModal: false,
  119. showRegionPicker: false,
  120. form: {
  121. name: '',
  122. phone: '',
  123. region: [],
  124. address: '',
  125. addressDetails: '',
  126. latitude: '',
  127. longitude: ''
  128. },
  129. provinces: regionData,
  130. cities: [],
  131. districts: [],
  132. regionIndex: [0, 0, 0],
  133. mode: ''
  134. }
  135. },
  136. watch: {
  137. regionIndex: {
  138. handler(val) {
  139. let pIdx = val[0] < this.provinces.length ? val[0] : 0
  140. let cIdx = val[1] < (this.provinces[pIdx]?.children?.length || 0) ? val[1] : 0
  141. this.cities = this.provinces[pIdx]?.children || []
  142. this.districts = this.cities[cIdx]?.children || []
  143. },
  144. immediate: true
  145. }
  146. },
  147. onPullDownRefresh() {
  148. this.getAddressList(() => {
  149. uni.stopPullDownRefresh();
  150. });
  151. },
  152. onLoad(options) {
  153. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
  154. this.cities = this.provinces[0]?.children || []
  155. this.districts = this.cities[0]?.children || []
  156. this.regionIndex = [0, 0, 0]
  157. this.getAddressList();
  158. this.mode = options.mode || ''
  159. },
  160. methods: {
  161. async onRefresh() {
  162. // 模拟刷新数据
  163. await new Promise(resolve => setTimeout(resolve, 1000))
  164. uni.stopPullRefresh()
  165. },
  166. getAddressList(callback) {
  167. this.$api('getAddressList', {}, res => {
  168. if (res && res.result && res.result.records) {
  169. this.addressList = res.result.records;
  170. }
  171. if (typeof callback === 'function') callback();
  172. });
  173. },
  174. goBack() {
  175. uni.navigateBack()
  176. },
  177. startBatchDelete() {
  178. this.batchMode = true
  179. this.selectedIndexes = []
  180. },
  181. cancelBatchDelete() {
  182. this.batchMode = false
  183. this.selectedIndexes = []
  184. },
  185. selectItem(index) {
  186. if (!this.batchMode) return
  187. const idx = this.selectedIndexes.indexOf(index)
  188. if (idx > -1) {
  189. this.selectedIndexes.splice(idx, 1)
  190. } else {
  191. this.selectedIndexes.push(index)
  192. }
  193. },
  194. confirmDelete() {
  195. if (this.selectedIndexes.length === 0) return
  196. uni.showModal({
  197. title: '提示',
  198. content: '确定要删除选中的地址吗?',
  199. success: (res) => {
  200. if (res.confirm) {
  201. // 从后往前删除,避免索引变化的问题
  202. this.selectedIndexes.sort((a, b) => b - a).forEach(index => {
  203. this.addressList.splice(index, 1)
  204. })
  205. this.batchMode = false
  206. this.selectedIndexes = []
  207. }
  208. }
  209. })
  210. },
  211. editAddress(item) {
  212. this.showAddressModal = true
  213. this.form = {
  214. id: item.id,
  215. name: item.name,
  216. phone: item.phone,
  217. region: [],
  218. address: item.address,
  219. addressDetails: item.addressDetails,
  220. defaultFlag: item.defaultFlag,
  221. latitude: item.latitude || '',
  222. longitude: item.longitude || ''
  223. }
  224. this.regionIndex = [0, 0, 0]
  225. this.cities = this.provinces[0]?.children || []
  226. this.districts = this.cities[0]?.children || []
  227. },
  228. goToAddAddress() {
  229. this.showAddressModal = true
  230. this.form = {
  231. id: undefined,
  232. name: '',
  233. phone: '',
  234. region: [],
  235. address: '',
  236. addressDetails: '',
  237. latitude: '',
  238. longitude: ''
  239. }
  240. this.regionIndex = [0, 0, 0]
  241. this.cities = this.provinces[0]?.children || []
  242. this.districts = this.cities[0]?.children || []
  243. },
  244. selectAddress(address) {
  245. if (this.mode === 'select') {
  246. uni.$emit('addressSelected', {
  247. id: address.id,
  248. name: address.name,
  249. phone: address.phone,
  250. address: address.address,
  251. addressDetails: address.addressDetails
  252. })
  253. uni.navigateBack()
  254. }
  255. },
  256. closeAddressModal() {
  257. this.showAddressModal = false
  258. },
  259. saveAddress() {
  260. if (!this.form.name) return uni.showToast({ title: '请输入联系人', icon: 'none' })
  261. if (!this.form.phone) return uni.showToast({ title: '请输入手机号', icon: 'none' })
  262. if (!this.form.address) return uni.showToast({ title: '请选择地区', icon: 'none' })
  263. if (!this.form.addressDetails) return uni.showToast({ title: '请输入详细地址', icon: 'none' })
  264. // 判断手机号是否合法
  265. if (!/^1[3-9]\d{9}$/.test(this.form.phone)) return uni.showToast({ title: '请输入正确的手机号', icon: 'none' })
  266. const params = {
  267. name: this.form.name,
  268. phone: this.form.phone,
  269. address: this.form.address,
  270. addressDetails: this.form.addressDetails,
  271. defaultFlag: this.form.defaultFlag,
  272. latitude: this.form.latitude,
  273. longitude: this.form.longitude
  274. }
  275. if (this.form.id) params.id = this.form.id
  276. this.$api('saveOrUpdateAddress', params, (res) => {
  277. if(res.code == 200){
  278. uni.showToast({ title: '保存成功', icon: 'success' })
  279. this.closeAddressModal()
  280. // 保存成功后刷新地址列表
  281. this.getAddressList()
  282. }
  283. })
  284. },
  285. onRegionChange(e) {
  286. let [pIdx, cIdx, dIdx] = e.detail.value
  287. if (pIdx !== this.regionIndex[0]) {
  288. cIdx = 0
  289. dIdx = 0
  290. } else if (cIdx !== this.regionIndex[1]) {
  291. dIdx = 0
  292. }
  293. this.regionIndex = [pIdx, cIdx, dIdx]
  294. },
  295. // 选择地区
  296. selectRegion() {
  297. // 首先检查位置权限
  298. uni.getSetting({
  299. success: (res) => {
  300. if (res.authSetting['scope.userLocation'] === false) {
  301. // 用户之前拒绝了位置权限,引导用户去设置
  302. uni.showModal({
  303. title: '位置权限',
  304. content: '需要获取您的位置信息来选择地址,请在设置中开启位置权限',
  305. confirmText: '去设置',
  306. success: (modalRes) => {
  307. if (modalRes.confirm) {
  308. uni.openSetting()
  309. } else {
  310. // 用户拒绝去设置,直接打开区域选择器
  311. this.showRegionPicker = true
  312. }
  313. },
  314. fail: () => {
  315. this.showRegionPicker = true
  316. }
  317. })
  318. return
  319. }
  320. // 调用位置选择
  321. uni.chooseLocation({
  322. success: res => {
  323. console.log(res);
  324. this.form.latitude = res.latitude
  325. this.form.longitude = res.longitude
  326. var reg = /.+?(省|市|自治区|自治州|县|区)/g;
  327. let address = ''
  328. if (!res.address && res.name) { //用户直接选择城市的逻辑
  329. address = res.name
  330. }
  331. if (res.address || res.name) {
  332. address = res.address + res.name
  333. }
  334. if(!address){
  335. return
  336. }
  337. let arr = address.match(reg)
  338. // 判断是否提取到了省市县信息
  339. if (!arr || arr.length < 2) {
  340. // 提取不到完整的省市县信息,打开区域选择器
  341. uni.showToast({
  342. title: '地址信息不完整,请手动选择',
  343. icon: 'none'
  344. })
  345. this.showRegionPicker = true
  346. return
  347. }
  348. const province = arr[0] || ''
  349. const city = arr[1] || ''
  350. const district = arr[2] || ''
  351. let detail = district || city || province || ''
  352. this.form.addressDetails = address.substring(address.indexOf(detail) + detail.length)
  353. this.form.address = `${province}${city}${district}`
  354. // 尝试匹配到region数据中对应的省市区
  355. this.matchRegionData(province, city, district)
  356. },
  357. fail(e) {
  358. console.log("获取位置信息失败!", e)
  359. // 根据错误类型给出不同提示
  360. if (e.errMsg && e.errMsg.includes('auth deny')) {
  361. uni.showModal({
  362. title: '位置权限',
  363. content: '需要获取您的位置信息来选择地址,请允许位置权限',
  364. confirmText: '重新授权',
  365. success: (modalRes) => {
  366. if (modalRes.confirm) {
  367. uni.openSetting()
  368. } else {
  369. this.showRegionPicker = true
  370. }
  371. }
  372. })
  373. } else if (e.errMsg && e.errMsg.includes('cancel')) {
  374. // 用户取消选择位置,直接打开区域选择器
  375. this.showRegionPicker = true
  376. } else {
  377. // 其他错误,提示并打开区域选择器
  378. uni.showToast({
  379. title: '获取位置失败,请手动选择',
  380. icon: 'none'
  381. })
  382. this.showRegionPicker = true
  383. }
  384. }
  385. })
  386. },
  387. fail: () => {
  388. // 获取设置失败,直接打开区域选择器
  389. this.showRegionPicker = true
  390. }
  391. })
  392. },
  393. // 匹配region数据
  394. matchRegionData(provinceName, cityName, districtName) {
  395. // 查找省份
  396. const provinceIndex = this.provinces.findIndex(p =>
  397. provinceName.includes(p.name) || p.name.includes(provinceName.replace(/省|市|自治区|自治州/g, ''))
  398. )
  399. if (provinceIndex === -1) {
  400. this.regionIndex = [0, 0, 0]
  401. return
  402. }
  403. this.cities = this.provinces[provinceIndex]?.children || []
  404. // 查找城市
  405. const cityIndex = this.cities.findIndex(c =>
  406. cityName.includes(c.name) || c.name.includes(cityName.replace(/市|县|区/g, ''))
  407. )
  408. if (cityIndex === -1) {
  409. this.regionIndex = [provinceIndex, 0, 0]
  410. this.districts = this.cities[0]?.children || []
  411. return
  412. }
  413. this.districts = this.cities[cityIndex]?.children || []
  414. // 查找区县
  415. const districtIndex = this.districts.findIndex(d =>
  416. districtName.includes(d.name) || d.name.includes(districtName.replace(/县|区/g, ''))
  417. )
  418. this.regionIndex = [
  419. provinceIndex,
  420. cityIndex,
  421. districtIndex > -1 ? districtIndex : 0
  422. ]
  423. // 更新form.region
  424. this.form.region = [
  425. this.provinces[provinceIndex]?.code || '',
  426. this.cities[cityIndex]?.code || '',
  427. this.districts[districtIndex > -1 ? districtIndex : 0]?.code || ''
  428. ]
  429. },
  430. confirmRegion() {
  431. const province = this.provinces[this.regionIndex[0]]
  432. const city = this.cities[this.regionIndex[1]]
  433. const district = this.districts[this.regionIndex[2]]
  434. this.form.region = [
  435. province?.code || '',
  436. city?.code || '',
  437. district?.code || ''
  438. ]
  439. this.form.address = [
  440. province?.name || '',
  441. city?.name || '',
  442. district?.name || ''
  443. ].filter(Boolean).join(' ')
  444. this.showRegionPicker = false
  445. },
  446. setDefault(id) {
  447. // 找到当前地址项
  448. const address = this.addressList.find(item => item.id === id)
  449. // 如果已经是默认地址,则取消默认
  450. const defaultFlag = address.defaultFlag === 'Y' ? 'N' : 'Y'
  451. this.$api('updateDefaultAddress', {
  452. id: id
  453. }, (res) => {
  454. if(res.code == 200) {
  455. uni.showToast({
  456. title: defaultFlag === 'Y' ? '设置成功' : '已取消默认',
  457. icon: 'success'
  458. })
  459. // 设置成功后刷新地址列表
  460. this.getAddressList()
  461. }
  462. })
  463. },
  464. deleteAddress(id) {
  465. uni.showModal({
  466. title: '提示',
  467. content: '确定要删除该地址吗?',
  468. success: (res) => {
  469. if (res.confirm) {
  470. this.$api('deleteAddress', {id:id}, res => {
  471. if(res.code == 200) {
  472. uni.showToast({
  473. title: '删除成功',
  474. icon: 'success'
  475. })
  476. // 删除成功后刷新地址列表
  477. this.getAddressList()
  478. }
  479. })
  480. }
  481. }
  482. })
  483. },
  484. initRegionPicker() {
  485. if (this.form.region.length > 0) {
  486. const [provinceCode, cityCode, districtCode] = this.form.region
  487. const provinceIndex = this.provinces.findIndex(p => p.code === provinceCode)
  488. if (provinceIndex > -1) {
  489. this.cities = this.provinces[provinceIndex].children || []
  490. if (this.cities.length === 0) {
  491. this.cities = [{ code: '', name: '请选择' }]
  492. }
  493. const cityIndex = this.cities.findIndex(c => c.code === cityCode)
  494. if (cityIndex > -1) {
  495. this.districts = this.cities[cityIndex].children || []
  496. if (this.districts.length === 0) {
  497. this.districts = [{ code: '', name: '请选择' }]
  498. }
  499. const districtIndex = this.districts.findIndex(d => d.code === districtCode)
  500. this.regionIndex = [
  501. provinceIndex,
  502. cityIndex,
  503. districtIndex > -1 ? districtIndex : 0
  504. ]
  505. return
  506. }
  507. }
  508. }
  509. this.cities = this.provinces[0]?.children || []
  510. if (this.cities.length === 0) {
  511. this.cities = [{ code: '', name: '请选择' }]
  512. }
  513. this.districts = this.cities[0]?.children || []
  514. if (this.districts.length === 0) {
  515. this.districts = [{ code: '', name: '请选择' }]
  516. }
  517. this.regionIndex = [0, 0, 0]
  518. }
  519. },
  520. }
  521. </script>
  522. <style lang="scss" scoped>
  523. .container {
  524. min-height: 100vh;
  525. background: #f8f8f8;
  526. padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
  527. }
  528. .nav-bar {
  529. display: flex;
  530. align-items: center;
  531. background: #fff;
  532. padding: 0 30rpx;
  533. position: fixed;
  534. top: 0;
  535. left: 0;
  536. right: 0;
  537. z-index: 999;
  538. .back {
  539. padding: 20rpx;
  540. margin-left: -20rpx;
  541. }
  542. .title {
  543. flex: 1;
  544. text-align: center;
  545. font-size: 34rpx;
  546. font-weight: 500;
  547. color: #222;
  548. }
  549. .right-btns {
  550. display: flex;
  551. align-items: center;
  552. gap: 30rpx;
  553. .more, .target {
  554. font-size: 40rpx;
  555. color: #333;
  556. }
  557. }
  558. }
  559. .address-list {
  560. padding: 32rpx;
  561. margin-top: calc(38rpx + var(--status-bar-height));
  562. height: calc(100vh - 88rpx - var(--status-bar-height) - 140rpx - env(safe-area-inset-bottom));
  563. box-sizing: border-box;
  564. overflow-y: auto;
  565. -webkit-overflow-scrolling: touch;
  566. .address-item {
  567. background: #fff;
  568. border-radius: 24rpx;
  569. margin-bottom: 24rpx;
  570. padding: 32rpx 28rpx 0 28rpx;
  571. box-shadow: 0 4rpx 24rpx rgba(0,0,0,0.04);
  572. .address-header {
  573. display: flex;
  574. align-items: center;
  575. .name { font-size: 32rpx; color: #222; font-weight: 500; margin-right: 20rpx; }
  576. .phone { font-size: 32rpx; color: #222; }
  577. .default-tag {
  578. margin-left: 18rpx;
  579. font-size: 24rpx;
  580. color: #FF9500;
  581. border: 1rpx solid #FF9500;
  582. border-radius: 8rpx;
  583. padding: 2rpx 12rpx;
  584. background: #FFF7E6;
  585. vertical-align: middle;
  586. }
  587. }
  588. .address-text {
  589. font-size: 28rpx;
  590. color: #888;
  591. margin: 16rpx 0 0 0;
  592. line-height: 1.5;
  593. }
  594. .dashed-line {
  595. border-bottom: 1rpx dashed #eee;
  596. margin: 24rpx 0 0 0;
  597. }
  598. .address-actions {
  599. display: flex;
  600. align-items: center;
  601. justify-content: space-around;
  602. padding: 0 0 18rpx 0;
  603. .action {
  604. display: flex;
  605. align-items: center;
  606. margin-right: 48rpx;
  607. .circle {
  608. width: 36rpx; height: 36rpx; border-radius: 50%;
  609. border: 2rpx solid #FF9500; margin-right: 8rpx;
  610. display: flex; align-items: center; justify-content: center;
  611. &.active {
  612. background: #FF9500; border: none;
  613. .check { color: #fff; font-size: 24rpx; }
  614. }
  615. }
  616. text { font-size: 26rpx; color: #bbb; }
  617. .active-text { color: #FF9500; }
  618. }
  619. }
  620. }
  621. }
  622. .bottom-bar {
  623. position: fixed;
  624. left: 0; right: 0; bottom: 0;
  625. background: #fff;
  626. padding: 24rpx 32rpx env(safe-area-inset-bottom);
  627. z-index: 10;
  628. margin-bottom: calc(40rpx );
  629. }
  630. .main-btn {
  631. width: 100%;
  632. height: 90rpx;
  633. background: linear-gradient(90deg, #FFB74D 0%, #FF9500 100%);
  634. color: #fff;
  635. font-size: 32rpx;
  636. border-radius: 45rpx;
  637. font-weight: bold;
  638. margin: 0 auto;
  639. margin: calc(40rpx) 0 40rpx 0;
  640. display: flex; align-items: center; justify-content: center;
  641. box-shadow: 0 4rpx 16rpx rgba(255, 149, 0, 0.08);
  642. }
  643. .modal-mask {
  644. position: fixed; left: 0; right: 0; top: 0; bottom: 0;
  645. background: rgba(0,0,0,0.5); z-index: 1000;
  646. }
  647. .address-modal, .region-modal {
  648. position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001;
  649. background: #fff; border-radius: 32rpx 32rpx 0 0;
  650. box-shadow: 0 -4rpx 32rpx rgba(0,0,0,0.08);
  651. padding-bottom: env(safe-area-inset-bottom);
  652. animation: slideUp 0.2s;
  653. }
  654. @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  655. .modal-header {
  656. display: flex; align-items: center; justify-content: space-between;
  657. padding: 32rpx 32rpx 0 32rpx;
  658. .close-btn { color: #bbb; font-size: 30rpx; }
  659. .modal-title { flex: 1; text-align: center; font-size: 34rpx; font-weight: bold; color: #222; }
  660. }
  661. .modal-form {
  662. padding: 0 32rpx;
  663. .form-item {
  664. border-bottom: 1rpx solid #f2f2f2;
  665. padding: 28rpx 0 10rpx 0;
  666. .label { color: #222; font-size: 28rpx; margin-bottom: 8rpx; }
  667. .input, .region-input {
  668. width: 100%; font-size: 28rpx; color: #222; background: none; border: none; outline: none;
  669. &.placeholder { color: #ccc; }
  670. }
  671. .region-input { display: flex; align-items: center; justify-content: space-between; }
  672. .arrow { color: #ccc; font-size: 28rpx; margin-left: 10rpx; }
  673. }
  674. }
  675. .region-tip {
  676. padding: 0 32rpx 16rpx 32rpx;
  677. text-align: center;
  678. text {
  679. font-size: 26rpx;
  680. color: #999;
  681. }
  682. }
  683. .region-picker {
  684. padding: 16rpx 0 0 0;
  685. .picker-view {
  686. width: 100%; height: 300rpx; display: flex; justify-content: center; align-items: center;
  687. .active { color: #222; font-weight: bold; }
  688. view { color: #ccc; font-size: 28rpx; text-align: center; }
  689. }
  690. .item {
  691. // line-height: 100upx;
  692. text-align: center;
  693. display: flex;
  694. align-items: center;
  695. justify-content: center;
  696. // height: 100upx;
  697. font-size: 30rpx;
  698. color: #222;
  699. }
  700. }
  701. </style>