confirmCreateOrder.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160
  1. <template>
  2. <view>
  3. <view class="inner-box">
  4. <!-- 收货人 -->
  5. <view class="address-box" v-if="address==null" @click="openAddress()">
  6. <view class="left">
  7. <view class="name-box">
  8. <text class="text name">添加收货地址</text>
  9. </view>
  10. </view>
  11. <view class="arrow-box">
  12. <image src="/static/images/arrow_gray.png" mode=""></image>
  13. </view>
  14. </view>
  15. <view class="address-box" v-if="address!=null" @click="openAddress()">
  16. <view class="left">
  17. <view class="name-box">
  18. <text class="text name">{{address.realName}}</text>
  19. <text class="text" v-if="address.phone!=null">{{$parsePhone(address.phone)}}</text>
  20. </view>
  21. <view class="address">
  22. {{address.province}}{{address.city}}{{address.district}}{{address.detail}}
  23. </view>
  24. </view>
  25. <view class="arrow-box">
  26. <image src="/static/images/arrow_gray.png" mode=""></image>
  27. </view>
  28. </view>
  29. <!-- 药品列表 -->
  30. <view class="shopbox" v-for="(shop,idx) in carts" :key="idx">
  31. <view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
  32. <text>{{shop.storeName}}</text>
  33. </view>
  34. <view class="goods-list">
  35. <view v-for="(item,index) in shop.list" :key="index" class="item">
  36. <view class="img-box">
  37. <image :src="item.productAttrImage?item.productAttrImage:item.productImage"
  38. mode="aspectFill"></image>
  39. </view>
  40. <view class="info-box">
  41. <view>
  42. <view class="name-box ellipsis2">
  43. <view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}
  44. </view>{{item.productName}}
  45. </view>
  46. <view class="spec ellipsis2">{{item.productAttrName}}</view>
  47. </view>
  48. <view class="price-num">
  49. <view class="price">
  50. <text class="unit">¥</text>
  51. <text class="num">{{item.price?.toFixed(2)}}</text>
  52. </view>
  53. <view class="num">x{{item.cartNum}}</view>
  54. </view>
  55. </view>
  56. </view>
  57. <!-- 运费 -->
  58. <view class="points">
  59. <view class="left">
  60. <text class="text">运费</text>
  61. </view>
  62. <view class="right" v-if="price&&price.length > 0">
  63. <text
  64. class="text">{{price[idx].payPostage==null||price[idx].payPostage==0?'免运费':price[idx].payPostage.toFixed(2)}}</text>
  65. </view>
  66. </view>
  67. <!-- 备注 -->
  68. <view class="points">
  69. <view class="left">
  70. <text class="text">备注</text>
  71. </view>
  72. <view class="remarks">
  73. <input type="text" v-model="shop.markinfo" placeholder="备注留言(选填)"
  74. placeholder-class="input" />
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 积分 -->
  80. <view class="price-info">
  81. <view class="price-info-title">价格明细</view>
  82. <view class="points">
  83. <view class="left">
  84. <text class="text">商品总价</text>
  85. </view>
  86. <view class="right" style="align-items: baseline;">
  87. <text class="price-info-unit">¥</text>
  88. <text class="price-info-num">{{priceSum?.toFixed(2)}}</text>
  89. </view>
  90. </view>
  91. <!-- <view class="points">
  92. <view class="left">
  93. <image src="/static/images/points.png" mode=""></image>
  94. <text class="text">可用积分</text>
  95. </view>
  96. <view class="right">
  97. <text class="text">{{priceAll.usedIntegral}}积分</text>
  98. <evan-switch @change="integralChange" v-model="checked" activeColor="#0bb3f2"
  99. inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
  100. </view>
  101. </view> -->
  102. <!-- <view class="points" @click="openCoupon()">
  103. <view class="left">
  104. <text class="text">优惠券</text>
  105. </view>
  106. <view class="right">
  107. <text class="text">{{couponText}}</text>
  108. <image src="/static/images/arrow4.png" mode=""></image>
  109. </view>
  110. </view> -->
  111. <view class="points">
  112. <view class="left">
  113. <text class="text">合计</text>
  114. </view>
  115. <view class="right" style="align-items: baseline;">
  116. <text class="price-info-unit">¥</text>
  117. <text class="price-info-num">{{priceSum?.toFixed(2)}}</text>
  118. </view>
  119. </view>
  120. </view>
  121. <!-- <view class="points">
  122. <view class="left">
  123. <text class="text">运费</text>
  124. </view>
  125. <view class="right">
  126. <text class="text">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
  127. </view>
  128. </view> -->
  129. <!-- 备注 -->
  130. <!-- <view class="remarks">
  131. <input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
  132. </view> -->
  133. </view>
  134. <!-- 底部按钮 -->
  135. <view class="btn-foot">
  136. <view class="right">
  137. <view class="total">
  138. <text class="label">合计:</text>
  139. <view class="price">
  140. <text class="unit">¥</text>
  141. <text class="num">{{priceSum?.toFixed(2)}}</text>
  142. </view>
  143. </view>
  144. <view class="btn" @click="submitOrder">提交订单</view>
  145. </view>
  146. </view>
  147. <popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30" maxHeight="60%">
  148. <view class="coupon" style="height:650rpx;">
  149. <div class="coupon-list" v-if="couponsList.length > 0">
  150. <div class="item acea-row row-center-wrapper" v-for="(item, index) in couponsList" :key="index">
  151. <div class="money">
  152. <image v-if="item.status==0" class="img" src="/static/images/coupon1.png" mode="widthFix">
  153. </image>
  154. <image v-if="item.status!=0" class="img" src="/static/images/coupon2.png" mode="widthFix">
  155. </image>
  156. <div style="z-index: 999;">
  157. ¥<span class="num">{{ item.couponPrice }}</span>
  158. </div>
  159. <div class="pic-num">满{{ item.useMinPrice }}元可用</div>
  160. </div>
  161. <div class="text">
  162. <div class="condition line1">
  163. {{ item.couponTitle }}
  164. </div>
  165. <div class="data acea-row row-between-wrapper">
  166. <div>{{ item.limitTime }}到期</div>
  167. <div class="bnt bg-color-red" @click="couponSelect(item)">选择</div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <view v-if="couponsList.length == 0" class="no-data-box">
  173. <image src="/static/images/no_data.png" mode="aspectFit"></image>
  174. <view class="empty-title">暂无数据</view>
  175. </view>
  176. </view>
  177. </popupBottom>
  178. </view>
  179. </template>
  180. <script>
  181. // import {getWeixinOrderTemps} from '@/api/common'
  182. // import {confirm,computed,create} from '@/api/storeOrder'
  183. // import { getMyEnableCouponList } from '@/api/coupon'
  184. import {
  185. createliveOrder, // 创建订单
  186. userAddr, // 获取用户收货地址
  187. cartOrder, //购物车订单
  188. checked //获取购物车选中商品
  189. } from "@/api/order.js"
  190. import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
  191. import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
  192. export default {
  193. components: {
  194. EvanSwitch,
  195. popupBottom
  196. },
  197. data() {
  198. return {
  199. priceSum: null,
  200. cartsSelect: [],
  201. address: null,
  202. addressId: null,
  203. totalNum: null,
  204. orderKey: null,
  205. price: null,
  206. liveId: null,
  207. orderList: [],
  208. userInfo: null,
  209. userAddrLiat: [], //用户地址
  210. temps: [],
  211. couponUserId: null,
  212. couponText: "请选择",
  213. couponsList: [],
  214. couponVisible: false,
  215. priceAll: {
  216. payPrice: 0,
  217. totalPostage: 0,
  218. usedIntegral: 0,
  219. totalPrice: 0.00,
  220. },
  221. carts: [],
  222. checked: false,
  223. type: null,
  224. cartIds: null,
  225. // form:{
  226. // useIntegral:0,
  227. // orderKey:null,
  228. // addressId:null,
  229. // mark:null,
  230. // companyId:null,
  231. // companyUserId:null,
  232. // createOrderKey:null,
  233. // },
  234. confirmParam: []
  235. }
  236. },
  237. onLoad(options) {
  238. console.log("确认订单", options)
  239. this.orderKey = options.orderKey;
  240. this.type = options.type
  241. if (this.type == "goods") {
  242. this.liveId = options.liveId
  243. this.productId = options.productId
  244. this.totalNum = Number(options.totalNum)
  245. this.price = Number(options.price)
  246. this.priceSum = this.price * this.totalNum
  247. }
  248. if (this.type == "cart") {
  249. this.getChecked();
  250. }
  251. // this.confirmParam = JSON.parse(decodeURIComponent(option.confirmParam))
  252. // this.form.createOrderKey=option.createOrderKey;
  253. // this.form.companyId= option.companyId;
  254. // this.form.companyUserId=option.companyUserId;
  255. // this.cartIds=option.cartIds;
  256. // this.type=option.type;
  257. // this.confirm();
  258. // uni.$on('updateAddress', (e) => {
  259. // console.log("e",e)
  260. // this.address=e;
  261. // this.addressId=e.id;
  262. // })
  263. // this.getWeixinOrderTemps();
  264. },
  265. mounted() {
  266. this.getUserAddr()
  267. uni.$on('updateAddress', (e) => {
  268. this.address = e;
  269. this.addressId = e.addressId;
  270. });
  271. },
  272. beforeDestroy() {
  273. // 移除事件监听,避免内存泄漏
  274. uni.$off('updateAddress');
  275. },
  276. methods: {
  277. //获取购物车选中商品
  278. getChecked() {
  279. checked().then(res => {
  280. if (res.code == 200) {
  281. // console.log("获取购物车选中商品>>>>", res.rows)
  282. this.cartsSelect = res.rows
  283. // this.price=res.rows.reduce((sum, item) => sum + item.price, 0)
  284. this.priceSum = res.rows.reduce((sum, item) => {
  285. return sum + (item.price * item.cartNum);
  286. }, 0);
  287. console.log("获取购物车选中商品>>>>", this.priceSum)
  288. } else {
  289. uni.showToast({
  290. title: res.msg,
  291. icon: 'none'
  292. });
  293. }
  294. },
  295. rej => {}
  296. );
  297. },
  298. // 获取用户收货地址
  299. getUserAddr() {
  300. this.userInfo = JSON.parse(uni.getStorageSync("userInfo"))
  301. userAddr(this.userInfo.userId).then(res => {
  302. if (res.code == 200) {
  303. console.log("用户收货地址>>>>", res.data)
  304. // this.address = res.data;
  305. this.address = res.data.find(item => item.isDefault == 1);
  306. } else {
  307. uni.showToast({
  308. title: res.msg,
  309. icon: 'none'
  310. });
  311. }
  312. },
  313. rej => {}
  314. );
  315. },
  316. // 创建购物车订单
  317. createCartLiveOrder() {
  318. let data = {
  319. orderKey: this.orderKey,
  320. userName: this.address.realName,
  321. userPhone: this.address.phone,
  322. userAddress: this.address.province + this.address.city + this.address.district + this.address
  323. .detail,
  324. }
  325. return cartOrder(data).then(res => { // 添加 return
  326. if (res.code == 200) {
  327. console.log("创建购物车订单res",res)
  328. this.OrderList = res.order;
  329. return res.order; // 返回订单数据供后续使用
  330. } else {
  331. uni.showToast({
  332. title: res.msg,
  333. icon: 'none'
  334. });
  335. throw new Error(res.msg); // 抛出错误以便 submitOrder 捕获
  336. }
  337. });
  338. },
  339. // 创建订单
  340. createLiveOrder() {
  341. let data = {
  342. liveId: this.liveId,
  343. orderKey: this.orderKey,
  344. userName: this.address.realName,
  345. userPhone: this.address.phone,
  346. userAddress: this.address.province + this.address.city + this.address.district + this.address
  347. .detail,
  348. cartId: "5",
  349. productId: this.productId,
  350. totalNum: this.totalNum,
  351. }
  352. return createliveOrder(data).then(res => { // 添加 return
  353. if (res.code == 200) {
  354. this.orderList = res.order;
  355. return res.order; // 返回订单数据供后续使用
  356. } else {
  357. uni.showToast({
  358. title: res.msg,
  359. icon: 'none'
  360. });
  361. throw new Error(res.msg); // 抛出错误以便 submitOrder 捕获
  362. }
  363. });
  364. },
  365. getWeixinOrderTemps: function() {
  366. getWeixinOrderTemps().then(
  367. res => {
  368. if (res.code == 200) {
  369. this.temps = res.temp
  370. } else {
  371. }
  372. },
  373. rej => {}
  374. );
  375. },
  376. couponSelect(item) {
  377. this.couponText = "-¥" + item.couponPrice.toFixed(2);
  378. this.couponUserId = item.id;
  379. this.couponVisible = false;
  380. this.computed();
  381. },
  382. openCoupon() {
  383. let that = this;
  384. var data = {
  385. couponType: 2,
  386. useMinPrice: this.price.payPrice
  387. };
  388. getMyEnableCouponList(data).then(res => {
  389. this.couponVisible = true;
  390. that.couponsList = res.data
  391. })
  392. },
  393. integralChange(e) {
  394. this.form.useIntegral = e ? 1 : 0
  395. this.computed()
  396. },
  397. openAddress() {
  398. uni.navigateTo({
  399. url: '/pages_user/address'
  400. })
  401. },
  402. // 提交订单
  403. async submitOrder() {
  404. try {
  405. if (this.orderKey == null) {
  406. uni.showToast({
  407. icon: 'none',
  408. title: '订单KEY不存在',
  409. });
  410. return;
  411. }
  412. if (this.address == null) {
  413. uni.showToast({
  414. icon: 'none',
  415. title: '收货地址不能为空',
  416. });
  417. return;
  418. }
  419. let orderList;
  420. if(this.type=="cart"){
  421. orderList = await this.createCartLiveOrder(); // 等待订单数据返回
  422. }else if(this.type=="goods"){
  423. orderList = await this.createLiveOrder(); // 等待订单数据返回
  424. }
  425. console.log("orderList>>",orderList)
  426. const orderListStr = encodeURIComponent(JSON.stringify(orderList));
  427. uni.navigateTo({
  428. url: `/pages_shop/paymentOrder?orderList=${orderListStr}`
  429. });
  430. } catch (error) {
  431. uni.showToast({
  432. title: res.msg,
  433. icon: 'none'
  434. });
  435. }
  436. },
  437. // 购物车支付订单
  438. async creatCartOrder() {
  439. try {
  440. if (this.orderKey == null) {
  441. uni.showToast({
  442. icon: 'none',
  443. title: '订单KEY不存在',
  444. });
  445. return;
  446. }
  447. if (this.address == null) {
  448. uni.showToast({
  449. icon: 'none',
  450. title: '收货地址不能为空',
  451. });
  452. return;
  453. }
  454. const orderList = await this.cartOrder(); // 等待订单数据返回
  455. const orderListStr = encodeURIComponent(JSON.stringify(orderList));
  456. uni.navigateTo({
  457. url: `/pages_shop/paymentOrder?orderList=${orderListStr}`
  458. });
  459. } catch (error) {
  460. console.error('订单创建失败:', error);
  461. uni.showToast({
  462. title: '提交失败',
  463. icon: 'none'
  464. });
  465. }
  466. },
  467. // var that=this;
  468. // if(this.form.orderKey==null){
  469. // uni.showToast({
  470. // icon:'none',
  471. // title: '订单KEY不存在',
  472. // });
  473. // return;
  474. // }
  475. // if(this.form.addressId==null){
  476. // uni.showToast({
  477. // icon:'none',
  478. // title: '收货地址不能为空',
  479. // });
  480. // return;
  481. // }
  482. // uni.requestSubscribeMessage({
  483. // tmplIds: this.temps,
  484. // success(res) {
  485. // that.createOrder();
  486. // },
  487. // fail(res) {
  488. // that.createOrder();
  489. // }
  490. // })
  491. // createOrder() {
  492. // const mark = this.carts.map(item => item.markinfo)
  493. // var that = this;
  494. // var data = null;
  495. // var tuiUserId = uni.getStorageSync('tuiUserId');
  496. // uni.showLoading({
  497. // title: '正在处理中...'
  498. // });
  499. // if (tuiUserId != null && tuiUserId != undefined && tuiUserId > 0) {
  500. // data = {
  501. // createOrderKey: this.form.createOrderKey,
  502. // orderCreateType: 3,
  503. // tuiUserId: tuiUserId,
  504. // companyId: this.form.companyId,
  505. // companyUserId: this.form.companyUserId,
  506. // couponUserId: this.couponUserId,
  507. // mark: mark,
  508. // orderKeys: this.form.orderKey,
  509. // addressId: this.form.addressId,
  510. // useIntegral: this.form.useIntegral,
  511. // payType: 1
  512. // };
  513. // } else {
  514. // data = {
  515. // createOrderKey: this.form.createOrderKey,
  516. // orderCreateType: 3,
  517. // companyId: this.form.companyId,
  518. // companyUserId: this.form.companyUserId,
  519. // couponUserId: this.couponUserId,
  520. // mark: mark,
  521. // orderKeys: this.form.orderKey,
  522. // addressId: this.form.addressId,
  523. // useIntegral: this.form.useIntegral,
  524. // payType: 1
  525. // };
  526. // }
  527. // create(data).then(
  528. // res => {
  529. // uni.hideLoading()
  530. // if (!res.code && res.code !== 0) {
  531. // uni.hideLoading()
  532. // // if(res.order.isPrescribe==1){
  533. // // setTimeout(function(){
  534. // // uni.redirectTo({
  535. // // url:"prescribe?orderId="+res.order.id
  536. // // })
  537. // // },200);
  538. // // }
  539. // // else{
  540. // // setTimeout(function(){
  541. // // uni.redirectTo({
  542. // // url: './paymentOrder?orderId='+res.order.id
  543. // // })
  544. // // },200);
  545. // // }
  546. // if (res.some(item => item.order.isPrescribe) == 1) {
  547. // setTimeout(function() {
  548. // let orderIds = res.filter(item => item.order.isPrescribe == 1).map(it => it
  549. // .order.id)
  550. // orderIds = orderIds.join(',')
  551. // uni.redirectTo({
  552. // url: "prescribe?orderId=" + orderIds + "&combinationOrderId=" +
  553. // encodeURIComponent(res[0].order.combinationOrderId)
  554. // })
  555. // }, 200);
  556. // } else {
  557. // setTimeout(function() {
  558. // uni.redirectTo({
  559. // url: './paymentOrder?combinationOrderId=' + encodeURIComponent(
  560. // res[0].order.combinationOrderId)
  561. // })
  562. // }, 200);
  563. // }
  564. // return;
  565. // } else {
  566. // if (res.code == 501) {
  567. // uni.showToast({
  568. // icon: 'none',
  569. // title: res.msg,
  570. // });
  571. // setTimeout(function() {
  572. // uni.navigateBack({
  573. // delta: 1
  574. // })
  575. // }, 200);
  576. // return;
  577. // } else {
  578. // uni.showToast({
  579. // icon: 'none',
  580. // title: res.msg,
  581. // });
  582. // }
  583. // }
  584. // },
  585. // rej => {}
  586. // );
  587. // },// confirm(item) {
  588. // // let data = {type:this.type,cartIds:this.cartIds};
  589. // confirm(this.confirmParam).then(
  590. // res => {
  591. // if (res.code == 200) {
  592. // this.carts = res.carts.map(item => ({
  593. // ...item,
  594. // markinfo: ""
  595. // }));
  596. // this.form.orderKey = res.orderKeys;
  597. // if (res.address != null) {
  598. // this.form.addressId = res.address.id;
  599. // this.address = res.address;
  600. // }
  601. // this.computed()
  602. // } else {
  603. // uni.showToast({
  604. // icon: 'none',
  605. // title: res.msg,
  606. // });
  607. // }
  608. // },
  609. // rej => {}
  610. // );
  611. // },
  612. // computed(item) {
  613. // let data = {
  614. // createOrderKey: this.form.createOrderKey,
  615. // couponUserId: this.couponUserId,
  616. // orderKeys: this.form.orderKey,
  617. // addressId: this.form.addressId,
  618. // useIntegral: this.form.useIntegral
  619. // };
  620. // computed(data).then(
  621. // res => {
  622. // if (res.code == 200) {
  623. // // this.price=res.data
  624. // this.price = res.data && res.data.length > 0 ? res.data : []
  625. // this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length - 1] : {
  626. // payPrice: 0,
  627. // totalPostage: 0,
  628. // usedIntegral: 0,
  629. // totalPrice: 0.00,
  630. // }
  631. // } else {
  632. // if (res.code == 501) {
  633. // uni.showToast({
  634. // icon: 'none',
  635. // title: res.msg,
  636. // });
  637. // setTimeout(function() {
  638. // uni.navigateBack({
  639. // delta: 1
  640. // })
  641. // }, 500);
  642. // return;
  643. // } else {
  644. // uni.showToast({
  645. // icon: 'none',
  646. // title: res.msg,
  647. // });
  648. // }
  649. // }
  650. // },
  651. // rej => {}
  652. // );
  653. // },
  654. }
  655. }
  656. </script>
  657. <style lang="scss">
  658. .inner-box {
  659. padding: 20upx 20upx 140upx;
  660. .address-box {
  661. margin-bottom: 20rpx;
  662. box-sizing: border-box;
  663. min-height: 171upx;
  664. background: #FFFFFF;
  665. border-radius: 16upx;
  666. // background-image: url(../../static/images/address_bg.png);
  667. background-repeat: no-repeat;
  668. background-size: 100% 30upx;
  669. background-position: left bottom;
  670. padding: 38upx 30upx 36upx;
  671. display: flex;
  672. align-items: center;
  673. justify-content: space-between;
  674. .left {
  675. width: 92%;
  676. .name-box {
  677. display: flex;
  678. align-items: center;
  679. .text {
  680. font-size: 32upx;
  681. font-family: PingFang SC;
  682. font-weight: bold;
  683. color: #111111;
  684. line-height: 1;
  685. &.name {
  686. margin-right: 30upx;
  687. }
  688. }
  689. }
  690. .address {
  691. font-size: 28upx;
  692. font-family: PingFang SC;
  693. font-weight: 500;
  694. color: #666666;
  695. line-height: 42upx;
  696. text-align: left;
  697. margin-top: 23upx;
  698. }
  699. }
  700. .arrow-box {
  701. width: 12upx;
  702. height: 23upx;
  703. display: flex;
  704. align-items: cenetr;
  705. justify-content: cenetr;
  706. image {
  707. width: 100%;
  708. height: 100%;
  709. }
  710. }
  711. }
  712. .shopbox {
  713. background: #FFFFFF;
  714. border-radius: 16rpx;
  715. margin-bottom: 20rpx;
  716. .points {
  717. padding: 0 !important;
  718. }
  719. .remarks {
  720. padding: 0 !important;
  721. }
  722. }
  723. .shopbox-name {
  724. padding: 30rpx 30rpx 0 30rpx;
  725. font-family: PingFang SC, PingFang SC;
  726. font-weight: 400;
  727. font-size: 30rpx;
  728. color: #111;
  729. overflow: hidden;
  730. white-space: nowrap;
  731. text-overflow: ellipsis;
  732. }
  733. .goods-list {
  734. // margin-top: 20upx;
  735. padding: 0 30upx;
  736. background-color: #FFFFFF;
  737. border-radius: 16upx;
  738. .item {
  739. padding: 30upx 0;
  740. border-bottom: 1px solid #EDEEEF;
  741. display: flex;
  742. align-items: center;
  743. .img-box {
  744. width: 160upx;
  745. height: 160upx;
  746. margin-right: 30upx;
  747. image {
  748. width: 100%;
  749. height: 100%;
  750. }
  751. }
  752. .info-box {
  753. width: calc(100% - 190upx);
  754. height: 160upx;
  755. display: flex;
  756. flex-direction: column;
  757. justify-content: space-between;
  758. .name-box {
  759. font-size: 28upx;
  760. font-family: PingFang SC;
  761. font-weight: 500;
  762. color: #111111;
  763. line-height: 40upx;
  764. .tag {
  765. display: inline-block;
  766. padding: 0 6upx;
  767. height: 30upx;
  768. background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
  769. border-radius: 4upx;
  770. margin-right: 10upx;
  771. font-size: 22upx;
  772. font-family: PingFang SC;
  773. font-weight: bold;
  774. color: #FFFFFF;
  775. line-height: 30upx;
  776. float: left;
  777. margin-top: 7upx;
  778. }
  779. }
  780. .spec {
  781. margin-top: 10upx;
  782. font-size: 24upx;
  783. font-family: PingFang SC;
  784. font-weight: 500;
  785. color: #999999;
  786. line-height: 1;
  787. }
  788. .price-num {
  789. display: flex;
  790. align-items: center;
  791. justify-content: space-between;
  792. .price {
  793. display: flex;
  794. align-items: flex-end;
  795. .unit {
  796. font-size: 24upx;
  797. font-family: PingFang SC;
  798. font-weight: 500;
  799. color: #111111;
  800. line-height: 1.2;
  801. margin-right: 4upx;
  802. }
  803. .num {
  804. font-size: 32upx;
  805. font-family: PingFang SC;
  806. font-weight: 500;
  807. color: #111111;
  808. line-height: 1;
  809. }
  810. }
  811. .num {
  812. font-size: 24upx;
  813. font-family: PingFang SC;
  814. font-weight: 500;
  815. color: #999999;
  816. line-height: 1;
  817. }
  818. }
  819. }
  820. }
  821. .sub-total {
  822. height: 88upx;
  823. display: flex;
  824. align-items: center;
  825. justify-content: flex-end;
  826. .label {
  827. font-size: 24upx;
  828. font-family: PingFang SC;
  829. font-weight: 500;
  830. color: #999999;
  831. }
  832. .price {
  833. display: flex;
  834. align-items: flex-end;
  835. .unit {
  836. font-size: 24upx;
  837. font-family: PingFang SC;
  838. font-weight: 500;
  839. color: #FF6633;
  840. line-height: 1.2;
  841. margin-right: 4upx;
  842. }
  843. .num {
  844. font-size: 32upx;
  845. font-family: PingFang SC;
  846. font-weight: bold;
  847. color: #FF6633;
  848. line-height: 1;
  849. }
  850. }
  851. }
  852. }
  853. .price-info {
  854. background: #FFFFFF;
  855. border-radius: 16upx;
  856. &-title {
  857. padding: 30rpx 30rpx 20rpx 30rpx;
  858. font-family: PingFang SC, PingFang SC;
  859. font-weight: 500;
  860. font-size: 30rpx;
  861. color: #111;
  862. }
  863. &-unit {
  864. font-size: 24rpx;
  865. }
  866. &-num {
  867. font-size: 28rpx;
  868. }
  869. }
  870. .points {
  871. height: 88upx;
  872. padding: 0 30upx;
  873. background: #FFFFFF;
  874. border-radius: 16upx;
  875. display: flex;
  876. align-items: center;
  877. justify-content: space-between;
  878. .left {
  879. display: flex;
  880. align-items: center;
  881. image {
  882. width: 28upx;
  883. height: 28upx;
  884. margin-right: 20upx;
  885. }
  886. .text {
  887. font-size: 28upx;
  888. font-family: PingFang SC;
  889. font-weight: 500;
  890. color: #666666;
  891. }
  892. }
  893. .right {
  894. display: flex;
  895. align-items: center;
  896. .text {
  897. font-size: 28upx;
  898. font-family: PingFang SC;
  899. font-weight: 500;
  900. color: #111111;
  901. }
  902. image {
  903. margin-left: 15upx;
  904. width: 14upx;
  905. height: 24upx;
  906. }
  907. }
  908. }
  909. .remarks {
  910. // height: 88upx;
  911. padding: 0 30upx;
  912. background: #FFFFFF;
  913. border-radius: 16upx;
  914. margin-top: 20upx;
  915. display: flex;
  916. align-items: center;
  917. input {
  918. width: 100%;
  919. font-size: 28upx;
  920. font-family: PingFang SC;
  921. font-weight: 500;
  922. color: #000000;
  923. }
  924. .input {
  925. font-size: 28upx;
  926. font-family: PingFang SC;
  927. font-weight: 500;
  928. color: #999999;
  929. }
  930. }
  931. }
  932. .btn-foot {
  933. box-sizing: border-box;
  934. width: 100%;
  935. height: 121upx;
  936. background: #FFFFFF;
  937. padding: 16upx 30upx 16upx 60upx;
  938. display: flex;
  939. align-items: center;
  940. justify-content: flex-end;
  941. position: fixed;
  942. left: 0;
  943. bottom: 0;
  944. z-index: 99;
  945. .right {
  946. display: flex;
  947. align-items: center;
  948. .total {
  949. display: flex;
  950. align-items: flex-end;
  951. margin-right: 36upx;
  952. .label {
  953. font-size: 26upx;
  954. font-family: PingFang SC;
  955. font-weight: 500;
  956. color: #999999;
  957. line-height: 1.5;
  958. }
  959. .price {
  960. display: flex;
  961. align-items: flex-end;
  962. .unit {
  963. font-size: 32upx;
  964. font-family: PingFang SC;
  965. font-weight: bold;
  966. color: #FF6633;
  967. line-height: 1.2;
  968. margin-right: 10upx;
  969. }
  970. .num {
  971. font-size: 50upx;
  972. font-family: PingFang SC;
  973. font-weight: bold;
  974. color: #FF6633;
  975. line-height: 1;
  976. }
  977. }
  978. }
  979. .btn {
  980. width: 200upx;
  981. height: 88upx;
  982. line-height: 88upx;
  983. text-align: center;
  984. font-size: 30upx;
  985. font-family: PingFang SC;
  986. font-weight: bold;
  987. color: #FFFFFF;
  988. background: #0bb3f2;
  989. border-radius: 44upx;
  990. }
  991. }
  992. }
  993. </style>
  994. <style lang="less" scoped>
  995. .coupon {
  996. height: 100%;
  997. }
  998. /*优惠券列表公共*/
  999. .coupon-list {}
  1000. .coupon-list .item {
  1001. display: flex;
  1002. flex-direction: column;
  1003. justify-content: center;
  1004. align-items: center;
  1005. width: 100%;
  1006. height: 1.7 * 100rpx;
  1007. margin-bottom: 0.16 * 100rpx;
  1008. }
  1009. .coupon-list .item .money {
  1010. background-size: 100% 100%;
  1011. width: 2.4 * 100rpx;
  1012. height: 100%;
  1013. color: #fff;
  1014. font-size: 0.36 * 100rpx;
  1015. font-weight: bold;
  1016. text-align: center;
  1017. display: flex;
  1018. flex-direction: column;
  1019. align-items: center;
  1020. justify-content: center;
  1021. position: relative;
  1022. }
  1023. .coupon-list .item .money .img {
  1024. position: absolute;
  1025. width: 2.4 * 100rpx;
  1026. height: 100%;
  1027. color: #fff;
  1028. }
  1029. .coupon-list .item .money .num {
  1030. font-size: 0.6 * 100rpx;
  1031. }
  1032. .coupon-list .item .money .pic-num {
  1033. font-size: 20rpx;
  1034. z-index: 99;
  1035. }
  1036. .coupon-list .item .text {
  1037. width: 4.5 * 100rpx;
  1038. padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
  1039. background-color: #fff;
  1040. box-sizing: border-box;
  1041. }
  1042. .coupon-list .item .text .condition {
  1043. font-size: 0.3 * 100rpx;
  1044. color: #282828;
  1045. height: 0.93 * 100rpx;
  1046. line-height: 0.93 * 100rpx;
  1047. border-bottom: 1px solid #f0f0f0;
  1048. }
  1049. .coupon-list .item .text .data {
  1050. font-size: 0.2 * 100rpx;
  1051. color: #999;
  1052. height: 0.76 * 100rpx;
  1053. }
  1054. .coupon-list .item .text .data .bnt {
  1055. width: 1.36 * 100rpx;
  1056. height: 0.44 * 100rpx;
  1057. border-radius: 0.22 * 100rpx;
  1058. font-size: 0.22 * 100rpx;
  1059. color: #fff;
  1060. text-align: center;
  1061. line-height: 0.44 * 100rpx;
  1062. background-color: red;
  1063. }
  1064. .coupon-list .item .text .data .bnt.gray {
  1065. background-color: #ccc;
  1066. }
  1067. </style>