addressAdd.vue 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015
  1. <template>
  2. <view class="add-address">
  3. <view class="add-form">
  4. <view class="form-item">
  5. <view class="label">联系人</view>
  6. <view class="content special-content">
  7. <input class="input" @input="bindinputName" placeholder="姓名" :value="address.name" auto-focus
  8. placeholder-style="color:#999;font-size:26rpx;" />
  9. <view class="gender-wrapper">
  10. <view class="male" @tap="maleSelect">
  11. <image src="https://mall.zhaijieshi.cc/file/wx-dy/radio-select.png" mode="aspectFit"
  12. v-if="gender == 1"></image>
  13. <image src="https://mall.zhaijieshi.cc/file/wx-dy/radio-unselect.png" mode="aspectFit"
  14. v-else></image>
  15. <text>先生</text>
  16. </view>
  17. <view class="female" @tap="femaleSelect">
  18. <image src="https://mall.zhaijieshi.cc/file/wx-dy/radio-select.png" mode="aspectFit"
  19. v-if="gender == 2"></image>
  20. <image src="https://mall.zhaijieshi.cc/file/wx-dy/radio-unselect.png" mode="aspectFit"
  21. v-else></image>
  22. <text>女士</text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="form-item">
  28. <view class="label">电 话</view>
  29. <view class="content">
  30. <input class="input" @input="bindinputMobile" :value="address.tel" type="number" placeholder="手机号码"
  31. maxlength="11" placeholder-style="color:#999;font-size:26rpx;" />
  32. </view>
  33. </view>
  34. <!-- <view class="form-item" bindtap="goMap">
  35. <view class="label">省市区</view>
  36. <view class="content">
  37. <image src="/static/images/address.png" style="width: 24rpx;height: 30rpx;margin:12rpx 10rpx 0rpx 0;" mode="aspectFit"></image>
  38. <input class="input" value="{{address.province + address.city + address.county}}" disabled="true" placeholder="省份、城市、区县" placeholder-style="color:#999;font-size:26rpx;"/>
  39. <image src="/static/images/arrow.png" style="width: 12rpx;height: 20rpx;margin-right: 10rpx;"></image>
  40. </view>
  41. </view> -->
  42. <view class="form-item" @tap="goMap">
  43. <view class="label">服务地址</view>
  44. <view class="content">
  45. <view style="flex: 1;">
  46. <view class="address-name" v-if="address.addressName" style="height: 36rpx;line-height: 36rpx;font-weight: bold;">
  47. {{address.addressName}}
  48. </view>
  49. <input class="input input1" :value="address.province + address.city + address.county+address.address" :disabled="true" placeholder="请选择服务地址" placeholder-style="color:#09afff" placeholder-class="custom-placeholder"/>
  50. </view>
  51. <image src="/static/images/arrow.png" style="width: 12rpx; height: 20rpx; margin-right: 10rpx;margin-top: 10rpx;"></image>
  52. </view>
  53. </view>
  54. <!-- <view class="des" style="color:red;">如地图返回地址不详,请手动补全 </view> -->
  55. <view class="form-item">
  56. <view class="label">门牌号</view>
  57. <view class="content">
  58. <input class="input" @input="bindinputAddress" maxlength="20" :value="address.detail"
  59. placeholder="例:9号楼1505室" placeholder-style="color:#999;font-size:26rpx;" />
  60. </view>
  61. </view>
  62. </view>
  63. <view class="form-default">
  64. <view class="switch-wrapper">
  65. <text class="title">设为默认地址</text>
  66. <switch class="switch" color="#00C0FF" :checked="address.isDefault == 1" @change="bindIsDefault" />
  67. </view>
  68. </view>
  69. <view class="des">*每次下单会默认推荐使用该地址</view>
  70. <!-- <view class="form-item" wx:if="{{address.id>0}}">
  71. <button style="background: #19B3FF;color: white;" data-address-id="{{address.id}}" bindtap="deleteAddress">删除地址</button>
  72. </view> -->
  73. <view class="btns" v-if="address.id > 0">
  74. <!-- <button class="cannel" bindtap="cancelAddress">取消</button> -->
  75. <button class="cannel" :data-address-id="address.id" @tap="deleteAddress">删除地址</button>
  76. <button class="save" @tap="saveAddress">确认修改</button>
  77. </view>
  78. <view v-else class="btns add-btn">
  79. <button class="save" @tap="saveAddress">保存地址</button>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. var util = require('../../../utils/util.js');
  85. var api = require('../../../config/api.js');
  86. var check = require('../../../utils/check.js');
  87. var area = require('../../../utils/area.js');
  88. var map = require('../../../utils/map.js');
  89. // const chooseLocation = requirePlugin('chooseLocation');
  90. var app = getApp();
  91. export default {
  92. data() {
  93. return {
  94. overDistinctTips1: false,
  95. overDistinctTips2: false,
  96. gender: '1',
  97. selectAddress: '',
  98. isChange: 0,
  99. address: {
  100. id: 0,
  101. areaCode: 0,
  102. address: '',
  103. name: '',
  104. tel: '',
  105. isDefault: 0,
  106. province: '',
  107. city: '',
  108. county: '',
  109. latitude: '',
  110. longitude: '',
  111. addressDetail: '',
  112. detail: '',
  113. addressName: ''
  114. },
  115. addressId: 0,
  116. openSelectRegion: false,
  117. selectRegionList: [{
  118. code: 0,
  119. name: '省份'
  120. },
  121. {
  122. code: 0,
  123. name: '城市'
  124. },
  125. {
  126. code: 0,
  127. name: '区县'
  128. }
  129. ],
  130. regionType: 1,
  131. regionList: [],
  132. selectRegionDone: false,
  133. addressShow: false
  134. };
  135. },
  136. onLoad: function(options) {
  137. // 页面初始化 options为页面跳转所带来的参数
  138. //console.log(options)
  139. if (options.id && options.id != 0) {
  140. this.setData({
  141. addressId: options.id
  142. });
  143. this.getAddressDetail();
  144. }
  145. app.globalData.mapSelectFinish = false;
  146. //地址授权
  147. map.getUserLocation()
  148. .then(() => {})
  149. .catch(() => {
  150. uni.showToast({
  151. title: '授权失败 无法新增地址',
  152. icon: 'none',
  153. duration: 1000
  154. });
  155. });
  156. },
  157. onShow: function() {
  158. let that = this;
  159. if (app.globalData.mapSelectFinish) {
  160. let poi = app.globalData.mapSelectPoi;
  161. let location = poi.location;
  162. let address = that.address;
  163. address.lng = location.split(',')[0];
  164. address.lat = location.split(',')[1];
  165. address.addressName = poi.name;
  166. address.address = poi.address;
  167. address.areaCode = poi.areaCode;
  168. address.province = poi.province;
  169. address.city = poi.city;
  170. address.county = poi.county;
  171. if (!address.city) {
  172. that.getAreaCode(address.lat, address.lng)
  173. .then((res) => {
  174. address.areaCode = res.areaCode;
  175. address.province = res.province;
  176. address.city = res.city;
  177. address.county = res.county;
  178. that.setData({
  179. address: address,
  180. selectAddress: poi.address
  181. });
  182. })
  183. .catch(() => {
  184. uni.showToast({
  185. title: '获取地区码失败',
  186. icon: 'none',
  187. duration: 3000
  188. });
  189. });
  190. } else {
  191. that.setData({
  192. address: address,
  193. selectAddress: poi.address
  194. });
  195. }
  196. } else {
  197. //这里分2种情况 1,有城市 标识选中原有地址进来 保持不变
  198. //2,新增地址 初始化进入此页面时 需要调用getlocation2
  199. // if (that.addressId) {
  200. // return;
  201. // } //从已有地址进入
  202. // map.getLocation2().then(() => {
  203. // that.getAreaCode(app.globalData.lat, app.globalData.lng)
  204. // .then((res) => {
  205. // res.isDefault = that.address.isDefault;
  206. // // console.log('globalData',app.globalData.lat,app.globalData.lng)
  207. // // console.log('areaCode',res)
  208. // that.setData({
  209. // address: res,
  210. // selectAddress: res.address
  211. // });
  212. // })
  213. // .catch((err) => {
  214. // uni.showToast({
  215. // title: '获取地区码失败',
  216. // icon: 'none',
  217. // duration: 3000
  218. // });
  219. // });
  220. // });
  221. }
  222. },
  223. onHide: function() {
  224. // 页面隐藏
  225. },
  226. onUnload: function() {
  227. // 页面关闭
  228. // chooseLocation.setLocation(null);
  229. },
  230. methods: {
  231. onOverDiaClose() {
  232. this.setData({
  233. overDistinctTips1: false,
  234. overDistinctTips2: false
  235. });
  236. },
  237. continueModifyAddress() {
  238. //继续修改地址
  239. console.info(this.overDistinctTips1);
  240. if (this.overDistinctTips1) {
  241. this.setData({
  242. overDistinctTips1: false,
  243. overDistinctTips2: true
  244. });
  245. } else {
  246. this.setData({
  247. overDistinctTips2: false
  248. });
  249. this.submitAddress();
  250. }
  251. },
  252. bindinputMobile(event) {
  253. let address = this.address;
  254. address.tel = event.detail.value;
  255. this.setData({
  256. address: address
  257. });
  258. },
  259. bindinputName(event) {
  260. let address = this.address;
  261. address.name = event.detail.value;
  262. this.setData({
  263. address: address
  264. });
  265. },
  266. bindinputAddress(event) {
  267. let address = this.address;
  268. address.detail = event.detail.value.replace(/[,,]/g, '');
  269. this.setData({
  270. address: address
  271. });
  272. // return value.replace(/[,,]/g,'');
  273. },
  274. bindAddressDetail(event) {
  275. let address = this.address;
  276. address.address = event.detail.value.replace(/[,,]/g, '');
  277. this.setData({
  278. address: address
  279. });
  280. },
  281. bindIsDefault() {
  282. let address = this.address;
  283. address.isDefault = !address.isDefault;
  284. this.setData({
  285. address: address
  286. });
  287. },
  288. getAddressDetail() {
  289. let that = this;
  290. util.request(api.AddressDetail, {
  291. id: that.addressId
  292. }).then(function(res) {
  293. if (res.errno === 0) {
  294. if (res.data) {
  295. that.setData({
  296. address: res.data,
  297. gender: res.data.gender
  298. });
  299. let addressDetailList = res.data.addressDetail.split(',');
  300. let address = that.address;
  301. address.address = addressDetailList[0];
  302. address.detail = addressDetailList.length > 1 ? addressDetailList[1] : '';
  303. address.address = addressDetailList.length > 1 ? addressDetailList[0] : '';
  304. that.setData({
  305. address: address,
  306. selectAddress: addressDetailList[0]
  307. });
  308. }
  309. }
  310. });
  311. },
  312. cancelAddress() {
  313. uni.navigateBack();
  314. },
  315. saveAddress() {
  316. console.log(this.address);
  317. let address = this.address;
  318. if (address.name == '' || address.name == undefined) {
  319. util.showErrorToast('请输入姓名');
  320. return false;
  321. }
  322. if (this.gender == null || this.gender == '') {
  323. util.showErrorToast('请选择性别');
  324. return false;
  325. }
  326. if (address.tel == '' || address.tel == undefined) {
  327. util.showErrorToast('请输入手机号码');
  328. return false;
  329. }
  330. if (address.areaCode == 0) {
  331. util.showErrorToast('请输入省市区');
  332. return false;
  333. }
  334. if (address.address == '') {
  335. util.showErrorToast('请输入详细地址');
  336. return false;
  337. }
  338. if (address.detail == '' || address.detail == undefined) {
  339. util.showErrorToast('请输入门牌号');
  340. return false;
  341. }
  342. if (!check.isValidPhone(address.tel)) {
  343. util.showErrorToast('手机号不正确');
  344. return false;
  345. }
  346. // if (this.selectAddress != address.address) {
  347. // this.setData({
  348. // isChange: 1
  349. // });
  350. // } else {
  351. // this.setData({
  352. // isChange: 0
  353. // });
  354. // }
  355. // if (this.isChange == 1) {
  356. // util.request(api.AddressChcek, this.getAddressInfo(), 'POST').then((res) => {
  357. // if (res.errno == 601) {
  358. // this.setData({
  359. // overDistinctTips1: true
  360. // });
  361. // }
  362. // });
  363. // } else {
  364. // this.submitAddress();
  365. // }
  366. this.submitAddress();
  367. },
  368. submitAddress() {
  369. let that = this;
  370. util.request(api.AddressSave, this.getAddressInfo(), 'POST').then(function(res) {
  371. if (res.errno === 0) {
  372. //返回之前,先取出上一页对象,并设置addressId
  373. var pages = getCurrentPages();
  374. var prevPage = pages[pages.length - 2];
  375. console.log(prevPage);
  376. if (prevPage.route == 'pages/index/index') {
  377. var city = address.city.indexOf('市') < 0 ? address.province : address.city;
  378. var addresInfo = {
  379. city: city,
  380. lng: res.data.lng,
  381. lat: res.data.lat,
  382. shopId: res.data.shopId,
  383. address: res.data.addressDetail
  384. };
  385. uni.setStorageSync('addressInfo', addresInfo);
  386. } else if (prevPage.route == 'pages/checkout/checkout') {
  387. // ||prevPage.route == "pages/ucenter/appointOrder/appointOrder"
  388. prevPage.setData({
  389. addressId: res.data.id
  390. });
  391. try {
  392. uni.setStorageSync('addressId', res.data);
  393. uni.setStorageSync('addressName', addressString);
  394. } catch (e) {
  395. console.log('CatchClause', e);
  396. console.log('CatchClause', e);
  397. }
  398. console.log('set address');
  399. } else if (prevPage.route == 'pages/ucenter/appointOrder/appointOrder') {
  400. prevPage.setData({
  401. addressShow: true
  402. });
  403. }
  404. uni.navigateBack();
  405. } else {
  406. uni.showModal({
  407. title: '提醒',
  408. showCancel: false,
  409. content: res.errmsg
  410. });
  411. }
  412. });
  413. },
  414. getAddressInfo() {
  415. let address = this.address;
  416. let addressString = (address.detail == '' ? address.address : (address.address + ',' + (address.detail ?
  417. address.detail : '')));
  418. return {
  419. gender: this.gender,
  420. id: address.id,
  421. name: address.name,
  422. tel: address.tel,
  423. province: address.province,
  424. city: address.city,
  425. county: address.county,
  426. areaCode: address.areaCode,
  427. addressDetail: addressString,
  428. addressName: address.addressName,
  429. isDefault: address.isDefault,
  430. lat: Number(address.lat).toFixed(5),
  431. lng: Number(address.lng).toFixed(5),
  432. // isChange: this.isChange
  433. };
  434. },
  435. deleteAddress(event) {
  436. console.log(event.target);
  437. let that = this;
  438. uni.showModal({
  439. title: '',
  440. content: '确定要删除地址?',
  441. success: function(res) {
  442. if (res.confirm) {
  443. let addressId = event.target.dataset.addressId;
  444. util.request(
  445. api.AddressDelete, {
  446. id: addressId
  447. },
  448. 'POST'
  449. ).then(function(res) {
  450. if (res.errno === 0) {
  451. uni.navigateBack({
  452. delta: 1,
  453. success: function() {}
  454. });
  455. // that.getAddressList();
  456. // wx.removeStorage({
  457. // key: 'addressId',
  458. // success: function(res) {},
  459. // })
  460. }
  461. });
  462. console.log('用户点击确定');
  463. }
  464. }
  465. });
  466. return false;
  467. },
  468. goMap() {
  469. app.globalData.mapSelectFinish = false;
  470. if (this.address.lng && this.address.lat) {
  471. let city = this.address.city == '市辖区' ? this.address.province : this.address.city;
  472. uni.navigateTo({
  473. url: '/pages/map/mapContent/mapContent?lng=' + this.address.lng + '&lat=' + this.address
  474. .lat + '&addressname=' + this.address.address + '&city=' + city
  475. });
  476. } else {
  477. uni.navigateTo({
  478. url: '/pages/map/mapContent/mapContent'
  479. });
  480. }
  481. },
  482. maleSelect() {
  483. this.setData({
  484. gender: 1
  485. });
  486. },
  487. femaleSelect() {
  488. this.setData({
  489. gender: 2
  490. });
  491. },
  492. getAreaCode(lat, lng) {
  493. return new Promise(function(resolve, reject) {
  494. // let param = {
  495. // key: '6TRBZ-XXC6F-BWWJB-N75ME-BQNOF-YKFQY',
  496. // location: lat + ',' + lng
  497. // };
  498. let param = {
  499. location: lng + ',' + lat,
  500. extensions: 'all',
  501. key: api.gdKey,
  502. radius: 3000
  503. };
  504. uni.request({
  505. url: api.gdUrl,
  506. data: param,
  507. method: 'GET',
  508. header: {
  509. 'Content-Type': 'application/json'
  510. },
  511. success: (res) => {
  512. console.log(res);
  513. if (res.data.infocode == '10000') {
  514. if (res.data.info == 'OK') {
  515. console.info(res.data.regeocode);
  516. // let ad_info = res.data.result.ad_info;
  517. // let address = {
  518. // lat: lat,
  519. // lng: lng,
  520. // areaCode: res.data.result.ad_info.adcode,
  521. // province: ad_info.province,
  522. // city: ad_info.city,
  523. // county: ad_info.district,
  524. // address: res.data.result.address,
  525. // addressName: res.data.result.formatted_addresses.recommend
  526. // }
  527. let regeocode = res.data.regeocode.addressComponent;
  528. let cityName = regeocode.city == null || regeocode.city.length ==
  529. 0 ? regeocode.province : regeocode.city;
  530. let district = regeocode.district == null || regeocode.district
  531. .length == 0 ? '' : regeocode.district;
  532. let address = {
  533. lat: lat,
  534. lng: lng,
  535. areaCode: regeocode.adcode,
  536. province: regeocode.province,
  537. city: cityName,
  538. county: district,
  539. address: res.data.regeocode.formatted_address,
  540. addressName: regeocode.township //纯粹做显示
  541. };
  542. resolve(address);
  543. } else {
  544. reject(false);
  545. }
  546. } else {
  547. reject(false);
  548. }
  549. },
  550. fail: function(err) {
  551. reject(false);
  552. }
  553. });
  554. });
  555. },
  556. goWebView() {
  557. app.globalData.webAddress = null;
  558. uni.navigateTo({
  559. url: '/pages/ucenter/addressChoose/addressChoose'
  560. });
  561. }
  562. }
  563. };
  564. </script>
  565. <style>
  566. page {
  567. height: 100%;
  568. background: #f4f4f4;
  569. padding: 30rpx;
  570. width: 680rpx;
  571. }
  572. .add-address .add-form {
  573. background: #fff;
  574. width: 680rpx;
  575. height: auto;
  576. overflow: hidden;
  577. border-radius: 10rpx;
  578. }
  579. .add-address .form-item {
  580. height: 88rpx;
  581. padding-left: 30rpx;
  582. /* border-bottom: 1px solid #d9d9d9; */
  583. display: flex;
  584. align-items: center;
  585. padding-right: 28rpx;
  586. }
  587. .add-address .input {
  588. flex: 1;
  589. height: 44rpx;
  590. line-height: 44rpx;
  591. overflow: hidden;
  592. }
  593. .add-address .input1 {
  594. color: #999999;
  595. }
  596. .custom-placeholder {
  597. font-size: 28rpx;
  598. letter-spacing: 2rpx;
  599. font-weight: 500;
  600. }
  601. .add-address .label {
  602. font-size: 30rpx;
  603. color: #333;
  604. /* font-weight: bold; */
  605. margin-right: 28rpx;
  606. width: 170rpx;
  607. text-align: left;
  608. font-weight: 500;
  609. }
  610. .add-address .content {
  611. border-bottom: 2rpx solid #f2f2f2;
  612. height: 88rpx;
  613. line-height: 88rpx;
  614. align-content: center;
  615. /* padding: 40rpx 0 0; */
  616. width: 100%;
  617. display: flex;
  618. align-items: center;
  619. }
  620. .add-address .content .name {
  621. line-height: 15px;
  622. height: 15px;
  623. }
  624. .add-address .content .detail {
  625. line-height: 14px;
  626. height: 14px;
  627. color: #999;
  628. font-size: 12px;
  629. margin-top: 1px;
  630. }
  631. .add-address .form-default {
  632. height: 100rpx;
  633. background: #fff;
  634. margin-top: 30rpx;
  635. border-radius: 10rpx;
  636. width: 680rpx;
  637. }
  638. .switch-wrapper {
  639. width: 680rpx;
  640. height: 100rpx;
  641. display: flex;
  642. align-items: center;
  643. justify-content: space-between;
  644. padding: 0 30rpx;
  645. }
  646. .switch-wrapper .switch {
  647. font-size: 24rpx;
  648. /* width:82rpx;
  649. height: 44rpx; */
  650. }
  651. .add-address .form-default .title {
  652. font-size: 30rpx;
  653. /* font-weight: bold; */
  654. color: #333;
  655. }
  656. .add-address .des {
  657. color: #999;
  658. line-height: 44rpx;
  659. height: 44rpx;
  660. font-size: 22rpx;
  661. padding-left: 30rpx;
  662. margin-top: 10rpx;
  663. }
  664. .add-address .form-default .van-checkbox .van-icon {
  665. color: #fff;
  666. }
  667. .add-address .btns {
  668. position: fixed;
  669. bottom: 50rpx;
  670. left: 30rpx;
  671. right: 30rpx;
  672. overflow: hidden;
  673. display: flex;
  674. height: 88rpx;
  675. /* width: 100%; */
  676. }
  677. .add-address .cannel,
  678. .add-address .save {
  679. flex: 1;
  680. height: 88rpx;
  681. text-align: center;
  682. line-height: 88rpx;
  683. font-size: 30rpx;
  684. color: #fff;
  685. border: none;
  686. border-radius: 10rpx;
  687. outline: none;
  688. position: static;
  689. }
  690. .add-address .cannel::after,
  691. .add-address .save::after {
  692. border: none;
  693. }
  694. .add-address .cannel {
  695. color: #333;
  696. margin-right: 18rpx;
  697. border: 2rpx solid #999999;
  698. border-radius: 10rpx;
  699. }
  700. .add-address .save {
  701. background: #00c0ff;
  702. }
  703. .region-select {
  704. width: 100%;
  705. height: 600rpx;
  706. background: #fff;
  707. position: fixed;
  708. z-index: 10;
  709. left: 0;
  710. bottom: 0;
  711. }
  712. .region-select .hd {
  713. height: 108rpx;
  714. width: 100%;
  715. border-bottom: 1px solid #f4f4f4;
  716. padding: 46rpx 30rpx 0 30rpx;
  717. }
  718. .region-select .region-selected {
  719. float: left;
  720. height: 60rpx;
  721. display: flex;
  722. }
  723. .region-select .region-selected .item {
  724. max-width: 140rpx;
  725. margin-right: 30rpx;
  726. text-align: left;
  727. line-height: 60rpx;
  728. height: 100%;
  729. color: #333;
  730. font-size: 28rpx;
  731. overflow: hidden;
  732. text-overflow: ellipsis;
  733. white-space: nowrap;
  734. }
  735. .region-select .region-selected .item.disabled {
  736. color: #999;
  737. }
  738. .region-select .region-selected .item.selected {
  739. color: #b4282d;
  740. }
  741. .region-select .done {
  742. float: right;
  743. height: 60rpx;
  744. width: 60rpx;
  745. border: none;
  746. background: #fff;
  747. line-height: 60rpx;
  748. text-align: center;
  749. color: #333;
  750. font-size: 28rpx;
  751. }
  752. .region-select .done.disabled {
  753. color: #999;
  754. }
  755. .region-select .bd {
  756. height: 492rpx;
  757. width: 100%;
  758. padding: 0 30rpx;
  759. }
  760. .region-select .region-list {
  761. height: 492rpx;
  762. }
  763. .region-select .region-list .item {
  764. width: 100%;
  765. height: 104rpx;
  766. line-height: 104rpx;
  767. text-align: left;
  768. color: #333;
  769. font-size: 28rpx;
  770. }
  771. .region-select .region-list .item.selected {
  772. color: #b4282d;
  773. }
  774. .bg-mask {
  775. height: 100%;
  776. width: 100%;
  777. background: rgba(0, 0, 0, 0.4);
  778. position: fixed;
  779. top: 0;
  780. left: 0;
  781. z-index: 8;
  782. }
  783. .add-address .form-item:last-child .content {
  784. border-bottom: none;
  785. }
  786. .add-address .btns.add-btn {
  787. height: 100rpx;
  788. }
  789. .add-address .btns.add-btn .save {
  790. height: 100rpx;
  791. border-radius: 100rpx;
  792. border: none;
  793. outline: none;
  794. }
  795. .add-address .btns.add-btn .save::after {
  796. border: none;
  797. }
  798. .gender-wrapper image {
  799. width: 26rpx;
  800. height: 26rpx;
  801. margin-right: 10rpx;
  802. }
  803. .gender-wrapper {
  804. display: flex;
  805. align-items: center;
  806. height: 96rpx;
  807. justify-content: space-between;
  808. width: 220rpx;
  809. }
  810. .male,
  811. .female {
  812. display: flex;
  813. align-items: center;
  814. height: 96rpx;
  815. }
  816. /* 弹框地址超过2公里 */
  817. .goods-info-overlay {
  818. position: fixed;
  819. top: 0;
  820. left: 0;
  821. width: 100%;
  822. height: 100%;
  823. background-color: rgba(0, 0, 0, 0.6);
  824. z-index: 99;
  825. display: flex;
  826. align-items: center;
  827. justify-content: center;
  828. }
  829. .goods-info-popup {
  830. width: 622rpx;
  831. border-radius: 24rpx;
  832. background: #fff;
  833. overflow: hidden;
  834. }
  835. .popup-title {
  836. height: 94rpx;
  837. line-height: 94rpx;
  838. text-align: center;
  839. color: #ffffff;
  840. font-size: 34rpx;
  841. background: url('https://mall.zhaijieshi.cc/file/jzmall-dy/verify-dy-title.png') no-repeat center center;
  842. background-size: 100% 100%;
  843. background-color: #008dff;
  844. }
  845. .tips-title {
  846. height: 180rpx;
  847. line-height: 40rpx;
  848. padding: 34rpx 32rpx;
  849. font-weight: 600;
  850. color: #191919;
  851. font-size: 28rpx;
  852. }
  853. .goods-info-popup .goods {
  854. display: flex;
  855. padding: 24rpx 20rpx 22rpx 22rpx;
  856. }
  857. .goods .img image {
  858. height: 168rpx;
  859. width: 168rpx;
  860. overflow: hidden;
  861. border-radius: 8rpx;
  862. }
  863. .goods .info {
  864. height: 168rpx;
  865. flex: 1;
  866. padding-left: 18rpx;
  867. }
  868. .info-main {
  869. display: flex;
  870. height: 40rpx;
  871. align-items: center;
  872. justify-content: space-between;
  873. }
  874. .info .sku-name {
  875. color: #666666;
  876. font-size: 24rpx;
  877. margin: 12rpx 0;
  878. height: 34rpx;
  879. line-height: 34rpx;
  880. }
  881. .product-name {
  882. line-height: 40rpx;
  883. font-size: 28rpx;
  884. /* padding-left: 20rpx;
  885. text-indent: -16rpx; */
  886. overflow: hidden;
  887. text-overflow: ellipsis;
  888. white-space: nowrap;
  889. width: 310rpx;
  890. font-weight: bold;
  891. color: rgba(0, 0, 0, 0.9);
  892. }
  893. .info-main .price {
  894. color: rgba(0, 0, 0, 0.9);
  895. font-size: 24rpx;
  896. font-weight: bold;
  897. }
  898. .info .other-info {
  899. font-size: 24rpx;
  900. color: rgba(0, 0, 0, 0.9);
  901. line-height: 34rpx;
  902. }
  903. .popup-bottom {
  904. height: 106rpx;
  905. padding: 14rpx 104rpx 34rpx;
  906. display: flex;
  907. justify-content: space-between;
  908. }
  909. .btn-cancel {
  910. height: 58rpx;
  911. line-height: 58rpx;
  912. border-radius: 58rpx;
  913. width: 162rpx;
  914. text-align: center;
  915. color: #0091ff;
  916. font-size: 24rpx;
  917. border: 2rpx solid #0091ff;
  918. }
  919. .btn-conf {
  920. height: 58rpx;
  921. line-height: 58rpx;
  922. border-radius: 58rpx;
  923. width: 162rpx;
  924. text-align: center;
  925. color: #fff;
  926. font-size: 24rpx;
  927. background: linear-gradient(270deg, #00baff 0%, #008dff 100%);
  928. }
  929. </style>