addressAdd.vue 24 KB

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