addressAdd.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014
  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-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. }
  571. .add-address .add-form {
  572. background: #fff;
  573. width: 680rpx;
  574. height: auto;
  575. overflow: hidden;
  576. border-radius: 10rpx;
  577. }
  578. .add-address .form-item {
  579. height: 88rpx;
  580. padding-left: 30rpx;
  581. /* border-bottom: 1px solid #d9d9d9; */
  582. display: flex;
  583. align-items: center;
  584. padding-right: 28rpx;
  585. }
  586. .add-address .input {
  587. flex: 1;
  588. height: 44rpx;
  589. line-height: 44rpx;
  590. overflow: hidden;
  591. }
  592. .add-address .input1 {
  593. color: #999999;
  594. }
  595. .custom-placeholder {
  596. font-size: 28rpx;
  597. letter-spacing: 2rpx;
  598. font-weight: 500;
  599. }
  600. .add-address .label {
  601. font-size: 30rpx;
  602. color: #333;
  603. /* font-weight: bold; */
  604. margin-right: 28rpx;
  605. width: 170rpx;
  606. text-align: left;
  607. font-weight: 500;
  608. }
  609. .add-address .content {
  610. border-bottom: 2rpx solid #f2f2f2;
  611. height: 88rpx;
  612. line-height: 88rpx;
  613. align-content: center;
  614. /* padding: 40rpx 0 0; */
  615. width: 100%;
  616. display: flex;
  617. align-items: center;
  618. }
  619. .add-address .content .name {
  620. line-height: 15px;
  621. height: 15px;
  622. }
  623. .add-address .content .detail {
  624. line-height: 14px;
  625. height: 14px;
  626. color: #999;
  627. font-size: 12px;
  628. margin-top: 1px;
  629. }
  630. .add-address .form-default {
  631. height: 100rpx;
  632. background: #fff;
  633. margin-top: 30rpx;
  634. border-radius: 10rpx;
  635. width: 680rpx;
  636. }
  637. .switch-wrapper {
  638. width: 680rpx;
  639. height: 100rpx;
  640. display: flex;
  641. align-items: center;
  642. justify-content: space-between;
  643. padding: 0 30rpx;
  644. }
  645. .switch-wrapper .switch {
  646. font-size: 24rpx;
  647. /* width:82rpx;
  648. height: 44rpx; */
  649. }
  650. .add-address .form-default .title {
  651. font-size: 30rpx;
  652. /* font-weight: bold; */
  653. color: #333;
  654. }
  655. .add-address .des {
  656. color: #999;
  657. line-height: 44rpx;
  658. height: 44rpx;
  659. font-size: 22rpx;
  660. padding-left: 30rpx;
  661. margin-top: 10rpx;
  662. }
  663. .add-address .form-default .van-checkbox .van-icon {
  664. color: #fff;
  665. }
  666. .add-address .btns {
  667. position: fixed;
  668. bottom: 50rpx;
  669. left: 30rpx;
  670. right: 30rpx;
  671. overflow: hidden;
  672. display: flex;
  673. height: 88rpx;
  674. /* width: 100%; */
  675. }
  676. .add-address .cannel,
  677. .add-address .save {
  678. flex: 1;
  679. height: 88rpx;
  680. text-align: center;
  681. line-height: 88rpx;
  682. font-size: 30rpx;
  683. color: #fff;
  684. border: none;
  685. border-radius: 10rpx;
  686. outline: none;
  687. position: static;
  688. }
  689. .add-address .cannel::after,
  690. .add-address .save::after {
  691. border: none;
  692. }
  693. .add-address .cannel {
  694. color: #333;
  695. margin-right: 18rpx;
  696. border: 2rpx solid #999999;
  697. border-radius: 10rpx;
  698. }
  699. .add-address .save {
  700. background: #00c0ff;
  701. }
  702. .region-select {
  703. width: 100%;
  704. height: 600rpx;
  705. background: #fff;
  706. position: fixed;
  707. z-index: 10;
  708. left: 0;
  709. bottom: 0;
  710. }
  711. .region-select .hd {
  712. height: 108rpx;
  713. width: 100%;
  714. border-bottom: 1px solid #f4f4f4;
  715. padding: 46rpx 30rpx 0 30rpx;
  716. }
  717. .region-select .region-selected {
  718. float: left;
  719. height: 60rpx;
  720. display: flex;
  721. }
  722. .region-select .region-selected .item {
  723. max-width: 140rpx;
  724. margin-right: 30rpx;
  725. text-align: left;
  726. line-height: 60rpx;
  727. height: 100%;
  728. color: #333;
  729. font-size: 28rpx;
  730. overflow: hidden;
  731. text-overflow: ellipsis;
  732. white-space: nowrap;
  733. }
  734. .region-select .region-selected .item.disabled {
  735. color: #999;
  736. }
  737. .region-select .region-selected .item.selected {
  738. color: #b4282d;
  739. }
  740. .region-select .done {
  741. float: right;
  742. height: 60rpx;
  743. width: 60rpx;
  744. border: none;
  745. background: #fff;
  746. line-height: 60rpx;
  747. text-align: center;
  748. color: #333;
  749. font-size: 28rpx;
  750. }
  751. .region-select .done.disabled {
  752. color: #999;
  753. }
  754. .region-select .bd {
  755. height: 492rpx;
  756. width: 100%;
  757. padding: 0 30rpx;
  758. }
  759. .region-select .region-list {
  760. height: 492rpx;
  761. }
  762. .region-select .region-list .item {
  763. width: 100%;
  764. height: 104rpx;
  765. line-height: 104rpx;
  766. text-align: left;
  767. color: #333;
  768. font-size: 28rpx;
  769. }
  770. .region-select .region-list .item.selected {
  771. color: #b4282d;
  772. }
  773. .bg-mask {
  774. height: 100%;
  775. width: 100%;
  776. background: rgba(0, 0, 0, 0.4);
  777. position: fixed;
  778. top: 0;
  779. left: 0;
  780. z-index: 8;
  781. }
  782. .add-address .form-item:last-child .content {
  783. border-bottom: none;
  784. }
  785. .add-address .btns.add-btn {
  786. height: 100rpx;
  787. }
  788. .add-address .btns.add-btn .save {
  789. height: 100rpx;
  790. border-radius: 100rpx;
  791. border: none;
  792. outline: none;
  793. }
  794. .add-address .btns.add-btn .save::after {
  795. border: none;
  796. }
  797. .gender-wrapper image {
  798. width: 26rpx;
  799. height: 26rpx;
  800. margin-right: 10rpx;
  801. }
  802. .gender-wrapper {
  803. display: flex;
  804. align-items: center;
  805. height: 96rpx;
  806. justify-content: space-between;
  807. width: 220rpx;
  808. }
  809. .male,
  810. .female {
  811. display: flex;
  812. align-items: center;
  813. height: 96rpx;
  814. }
  815. /* 弹框地址超过2公里 */
  816. .goods-info-overlay {
  817. position: fixed;
  818. top: 0;
  819. left: 0;
  820. width: 100%;
  821. height: 100%;
  822. background-color: rgba(0, 0, 0, 0.6);
  823. z-index: 99;
  824. display: flex;
  825. align-items: center;
  826. justify-content: center;
  827. }
  828. .goods-info-popup {
  829. width: 622rpx;
  830. border-radius: 24rpx;
  831. background: #fff;
  832. overflow: hidden;
  833. }
  834. .popup-title {
  835. height: 94rpx;
  836. line-height: 94rpx;
  837. text-align: center;
  838. color: #ffffff;
  839. font-size: 34rpx;
  840. background: url('https://mall.zhaijieshi.cc/file/jzmall-dy/verify-dy-title.png') no-repeat center center;
  841. background-size: 100% 100%;
  842. background-color: #008dff;
  843. }
  844. .tips-title {
  845. height: 180rpx;
  846. line-height: 40rpx;
  847. padding: 34rpx 32rpx;
  848. font-weight: 600;
  849. color: #191919;
  850. font-size: 28rpx;
  851. }
  852. .goods-info-popup .goods {
  853. display: flex;
  854. padding: 24rpx 20rpx 22rpx 22rpx;
  855. }
  856. .goods .img image {
  857. height: 168rpx;
  858. width: 168rpx;
  859. overflow: hidden;
  860. border-radius: 8rpx;
  861. }
  862. .goods .info {
  863. height: 168rpx;
  864. flex: 1;
  865. padding-left: 18rpx;
  866. }
  867. .info-main {
  868. display: flex;
  869. height: 40rpx;
  870. align-items: center;
  871. justify-content: space-between;
  872. }
  873. .info .sku-name {
  874. color: #666666;
  875. font-size: 24rpx;
  876. margin: 12rpx 0;
  877. height: 34rpx;
  878. line-height: 34rpx;
  879. }
  880. .product-name {
  881. line-height: 40rpx;
  882. font-size: 28rpx;
  883. /* padding-left: 20rpx;
  884. text-indent: -16rpx; */
  885. overflow: hidden;
  886. text-overflow: ellipsis;
  887. white-space: nowrap;
  888. width: 310rpx;
  889. font-weight: bold;
  890. color: rgba(0, 0, 0, 0.9);
  891. }
  892. .info-main .price {
  893. color: rgba(0, 0, 0, 0.9);
  894. font-size: 24rpx;
  895. font-weight: bold;
  896. }
  897. .info .other-info {
  898. font-size: 24rpx;
  899. color: rgba(0, 0, 0, 0.9);
  900. line-height: 34rpx;
  901. }
  902. .popup-bottom {
  903. height: 106rpx;
  904. padding: 14rpx 104rpx 34rpx;
  905. display: flex;
  906. justify-content: space-between;
  907. }
  908. .btn-cancel {
  909. height: 58rpx;
  910. line-height: 58rpx;
  911. border-radius: 58rpx;
  912. width: 162rpx;
  913. text-align: center;
  914. color: #0091ff;
  915. font-size: 24rpx;
  916. border: 2rpx solid #0091ff;
  917. }
  918. .btn-conf {
  919. height: 58rpx;
  920. line-height: 58rpx;
  921. border-radius: 58rpx;
  922. width: 162rpx;
  923. text-align: center;
  924. color: #fff;
  925. font-size: 24rpx;
  926. background: linear-gradient(270deg, #00baff 0%, #008dff 100%);
  927. }
  928. </style>