addressAdd.vue 21 KB

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