confirmCreateOrder.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161
  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. console.error('订单创建失败:', error);
  432. uni.showToast({
  433. title: '提交失败',
  434. icon: 'none'
  435. });
  436. }
  437. },
  438. // 购物车支付订单
  439. async creatCartOrder() {
  440. try {
  441. if (this.orderKey == null) {
  442. uni.showToast({
  443. icon: 'none',
  444. title: '订单KEY不存在',
  445. });
  446. return;
  447. }
  448. if (this.address == null) {
  449. uni.showToast({
  450. icon: 'none',
  451. title: '收货地址不能为空',
  452. });
  453. return;
  454. }
  455. const orderList = await this.cartOrder(); // 等待订单数据返回
  456. const orderListStr = encodeURIComponent(JSON.stringify(orderList));
  457. uni.navigateTo({
  458. url: `/pages_shop/paymentOrder?orderList=${orderListStr}`
  459. });
  460. } catch (error) {
  461. console.error('订单创建失败:', error);
  462. uni.showToast({
  463. title: '提交失败',
  464. icon: 'none'
  465. });
  466. }
  467. },
  468. // var that=this;
  469. // if(this.form.orderKey==null){
  470. // uni.showToast({
  471. // icon:'none',
  472. // title: '订单KEY不存在',
  473. // });
  474. // return;
  475. // }
  476. // if(this.form.addressId==null){
  477. // uni.showToast({
  478. // icon:'none',
  479. // title: '收货地址不能为空',
  480. // });
  481. // return;
  482. // }
  483. // uni.requestSubscribeMessage({
  484. // tmplIds: this.temps,
  485. // success(res) {
  486. // that.createOrder();
  487. // },
  488. // fail(res) {
  489. // that.createOrder();
  490. // }
  491. // })
  492. // createOrder() {
  493. // const mark = this.carts.map(item => item.markinfo)
  494. // var that = this;
  495. // var data = null;
  496. // var tuiUserId = uni.getStorageSync('tuiUserId');
  497. // uni.showLoading({
  498. // title: '正在处理中...'
  499. // });
  500. // if (tuiUserId != null && tuiUserId != undefined && tuiUserId > 0) {
  501. // data = {
  502. // createOrderKey: this.form.createOrderKey,
  503. // orderCreateType: 3,
  504. // tuiUserId: tuiUserId,
  505. // companyId: this.form.companyId,
  506. // companyUserId: this.form.companyUserId,
  507. // couponUserId: this.couponUserId,
  508. // mark: mark,
  509. // orderKeys: this.form.orderKey,
  510. // addressId: this.form.addressId,
  511. // useIntegral: this.form.useIntegral,
  512. // payType: 1
  513. // };
  514. // } else {
  515. // data = {
  516. // createOrderKey: this.form.createOrderKey,
  517. // orderCreateType: 3,
  518. // companyId: this.form.companyId,
  519. // companyUserId: this.form.companyUserId,
  520. // couponUserId: this.couponUserId,
  521. // mark: mark,
  522. // orderKeys: this.form.orderKey,
  523. // addressId: this.form.addressId,
  524. // useIntegral: this.form.useIntegral,
  525. // payType: 1
  526. // };
  527. // }
  528. // create(data).then(
  529. // res => {
  530. // uni.hideLoading()
  531. // if (!res.code && res.code !== 0) {
  532. // uni.hideLoading()
  533. // // if(res.order.isPrescribe==1){
  534. // // setTimeout(function(){
  535. // // uni.redirectTo({
  536. // // url:"prescribe?orderId="+res.order.id
  537. // // })
  538. // // },200);
  539. // // }
  540. // // else{
  541. // // setTimeout(function(){
  542. // // uni.redirectTo({
  543. // // url: './paymentOrder?orderId='+res.order.id
  544. // // })
  545. // // },200);
  546. // // }
  547. // if (res.some(item => item.order.isPrescribe) == 1) {
  548. // setTimeout(function() {
  549. // let orderIds = res.filter(item => item.order.isPrescribe == 1).map(it => it
  550. // .order.id)
  551. // orderIds = orderIds.join(',')
  552. // uni.redirectTo({
  553. // url: "prescribe?orderId=" + orderIds + "&combinationOrderId=" +
  554. // encodeURIComponent(res[0].order.combinationOrderId)
  555. // })
  556. // }, 200);
  557. // } else {
  558. // setTimeout(function() {
  559. // uni.redirectTo({
  560. // url: './paymentOrder?combinationOrderId=' + encodeURIComponent(
  561. // res[0].order.combinationOrderId)
  562. // })
  563. // }, 200);
  564. // }
  565. // return;
  566. // } else {
  567. // if (res.code == 501) {
  568. // uni.showToast({
  569. // icon: 'none',
  570. // title: res.msg,
  571. // });
  572. // setTimeout(function() {
  573. // uni.navigateBack({
  574. // delta: 1
  575. // })
  576. // }, 200);
  577. // return;
  578. // } else {
  579. // uni.showToast({
  580. // icon: 'none',
  581. // title: res.msg,
  582. // });
  583. // }
  584. // }
  585. // },
  586. // rej => {}
  587. // );
  588. // },// confirm(item) {
  589. // // let data = {type:this.type,cartIds:this.cartIds};
  590. // confirm(this.confirmParam).then(
  591. // res => {
  592. // if (res.code == 200) {
  593. // this.carts = res.carts.map(item => ({
  594. // ...item,
  595. // markinfo: ""
  596. // }));
  597. // this.form.orderKey = res.orderKeys;
  598. // if (res.address != null) {
  599. // this.form.addressId = res.address.id;
  600. // this.address = res.address;
  601. // }
  602. // this.computed()
  603. // } else {
  604. // uni.showToast({
  605. // icon: 'none',
  606. // title: res.msg,
  607. // });
  608. // }
  609. // },
  610. // rej => {}
  611. // );
  612. // },
  613. // computed(item) {
  614. // let data = {
  615. // createOrderKey: this.form.createOrderKey,
  616. // couponUserId: this.couponUserId,
  617. // orderKeys: this.form.orderKey,
  618. // addressId: this.form.addressId,
  619. // useIntegral: this.form.useIntegral
  620. // };
  621. // computed(data).then(
  622. // res => {
  623. // if (res.code == 200) {
  624. // // this.price=res.data
  625. // this.price = res.data && res.data.length > 0 ? res.data : []
  626. // this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length - 1] : {
  627. // payPrice: 0,
  628. // totalPostage: 0,
  629. // usedIntegral: 0,
  630. // totalPrice: 0.00,
  631. // }
  632. // } else {
  633. // if (res.code == 501) {
  634. // uni.showToast({
  635. // icon: 'none',
  636. // title: res.msg,
  637. // });
  638. // setTimeout(function() {
  639. // uni.navigateBack({
  640. // delta: 1
  641. // })
  642. // }, 500);
  643. // return;
  644. // } else {
  645. // uni.showToast({
  646. // icon: 'none',
  647. // title: res.msg,
  648. // });
  649. // }
  650. // }
  651. // },
  652. // rej => {}
  653. // );
  654. // },
  655. }
  656. }
  657. </script>
  658. <style lang="scss">
  659. .inner-box {
  660. padding: 20upx 20upx 140upx;
  661. .address-box {
  662. margin-bottom: 20rpx;
  663. box-sizing: border-box;
  664. min-height: 171upx;
  665. background: #FFFFFF;
  666. border-radius: 16upx;
  667. // background-image: url(../../static/images/address_bg.png);
  668. background-repeat: no-repeat;
  669. background-size: 100% 30upx;
  670. background-position: left bottom;
  671. padding: 38upx 30upx 36upx;
  672. display: flex;
  673. align-items: center;
  674. justify-content: space-between;
  675. .left {
  676. width: 92%;
  677. .name-box {
  678. display: flex;
  679. align-items: center;
  680. .text {
  681. font-size: 32upx;
  682. font-family: PingFang SC;
  683. font-weight: bold;
  684. color: #111111;
  685. line-height: 1;
  686. &.name {
  687. margin-right: 30upx;
  688. }
  689. }
  690. }
  691. .address {
  692. font-size: 28upx;
  693. font-family: PingFang SC;
  694. font-weight: 500;
  695. color: #666666;
  696. line-height: 42upx;
  697. text-align: left;
  698. margin-top: 23upx;
  699. }
  700. }
  701. .arrow-box {
  702. width: 12upx;
  703. height: 23upx;
  704. display: flex;
  705. align-items: cenetr;
  706. justify-content: cenetr;
  707. image {
  708. width: 100%;
  709. height: 100%;
  710. }
  711. }
  712. }
  713. .shopbox {
  714. background: #FFFFFF;
  715. border-radius: 16rpx;
  716. margin-bottom: 20rpx;
  717. .points {
  718. padding: 0 !important;
  719. }
  720. .remarks {
  721. padding: 0 !important;
  722. }
  723. }
  724. .shopbox-name {
  725. padding: 30rpx 30rpx 0 30rpx;
  726. font-family: PingFang SC, PingFang SC;
  727. font-weight: 400;
  728. font-size: 30rpx;
  729. color: #111;
  730. overflow: hidden;
  731. white-space: nowrap;
  732. text-overflow: ellipsis;
  733. }
  734. .goods-list {
  735. // margin-top: 20upx;
  736. padding: 0 30upx;
  737. background-color: #FFFFFF;
  738. border-radius: 16upx;
  739. .item {
  740. padding: 30upx 0;
  741. border-bottom: 1px solid #EDEEEF;
  742. display: flex;
  743. align-items: center;
  744. .img-box {
  745. width: 160upx;
  746. height: 160upx;
  747. margin-right: 30upx;
  748. image {
  749. width: 100%;
  750. height: 100%;
  751. }
  752. }
  753. .info-box {
  754. width: calc(100% - 190upx);
  755. height: 160upx;
  756. display: flex;
  757. flex-direction: column;
  758. justify-content: space-between;
  759. .name-box {
  760. font-size: 28upx;
  761. font-family: PingFang SC;
  762. font-weight: 500;
  763. color: #111111;
  764. line-height: 40upx;
  765. .tag {
  766. display: inline-block;
  767. padding: 0 6upx;
  768. height: 30upx;
  769. background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
  770. border-radius: 4upx;
  771. margin-right: 10upx;
  772. font-size: 22upx;
  773. font-family: PingFang SC;
  774. font-weight: bold;
  775. color: #FFFFFF;
  776. line-height: 30upx;
  777. float: left;
  778. margin-top: 7upx;
  779. }
  780. }
  781. .spec {
  782. margin-top: 10upx;
  783. font-size: 24upx;
  784. font-family: PingFang SC;
  785. font-weight: 500;
  786. color: #999999;
  787. line-height: 1;
  788. }
  789. .price-num {
  790. display: flex;
  791. align-items: center;
  792. justify-content: space-between;
  793. .price {
  794. display: flex;
  795. align-items: flex-end;
  796. .unit {
  797. font-size: 24upx;
  798. font-family: PingFang SC;
  799. font-weight: 500;
  800. color: #111111;
  801. line-height: 1.2;
  802. margin-right: 4upx;
  803. }
  804. .num {
  805. font-size: 32upx;
  806. font-family: PingFang SC;
  807. font-weight: 500;
  808. color: #111111;
  809. line-height: 1;
  810. }
  811. }
  812. .num {
  813. font-size: 24upx;
  814. font-family: PingFang SC;
  815. font-weight: 500;
  816. color: #999999;
  817. line-height: 1;
  818. }
  819. }
  820. }
  821. }
  822. .sub-total {
  823. height: 88upx;
  824. display: flex;
  825. align-items: center;
  826. justify-content: flex-end;
  827. .label {
  828. font-size: 24upx;
  829. font-family: PingFang SC;
  830. font-weight: 500;
  831. color: #999999;
  832. }
  833. .price {
  834. display: flex;
  835. align-items: flex-end;
  836. .unit {
  837. font-size: 24upx;
  838. font-family: PingFang SC;
  839. font-weight: 500;
  840. color: #FF6633;
  841. line-height: 1.2;
  842. margin-right: 4upx;
  843. }
  844. .num {
  845. font-size: 32upx;
  846. font-family: PingFang SC;
  847. font-weight: bold;
  848. color: #FF6633;
  849. line-height: 1;
  850. }
  851. }
  852. }
  853. }
  854. .price-info {
  855. background: #FFFFFF;
  856. border-radius: 16upx;
  857. &-title {
  858. padding: 30rpx 30rpx 20rpx 30rpx;
  859. font-family: PingFang SC, PingFang SC;
  860. font-weight: 500;
  861. font-size: 30rpx;
  862. color: #111;
  863. }
  864. &-unit {
  865. font-size: 24rpx;
  866. }
  867. &-num {
  868. font-size: 28rpx;
  869. }
  870. }
  871. .points {
  872. height: 88upx;
  873. padding: 0 30upx;
  874. background: #FFFFFF;
  875. border-radius: 16upx;
  876. display: flex;
  877. align-items: center;
  878. justify-content: space-between;
  879. .left {
  880. display: flex;
  881. align-items: center;
  882. image {
  883. width: 28upx;
  884. height: 28upx;
  885. margin-right: 20upx;
  886. }
  887. .text {
  888. font-size: 28upx;
  889. font-family: PingFang SC;
  890. font-weight: 500;
  891. color: #666666;
  892. }
  893. }
  894. .right {
  895. display: flex;
  896. align-items: center;
  897. .text {
  898. font-size: 28upx;
  899. font-family: PingFang SC;
  900. font-weight: 500;
  901. color: #111111;
  902. }
  903. image {
  904. margin-left: 15upx;
  905. width: 14upx;
  906. height: 24upx;
  907. }
  908. }
  909. }
  910. .remarks {
  911. // height: 88upx;
  912. padding: 0 30upx;
  913. background: #FFFFFF;
  914. border-radius: 16upx;
  915. margin-top: 20upx;
  916. display: flex;
  917. align-items: center;
  918. input {
  919. width: 100%;
  920. font-size: 28upx;
  921. font-family: PingFang SC;
  922. font-weight: 500;
  923. color: #000000;
  924. }
  925. .input {
  926. font-size: 28upx;
  927. font-family: PingFang SC;
  928. font-weight: 500;
  929. color: #999999;
  930. }
  931. }
  932. }
  933. .btn-foot {
  934. box-sizing: border-box;
  935. width: 100%;
  936. height: 121upx;
  937. background: #FFFFFF;
  938. padding: 16upx 30upx 16upx 60upx;
  939. display: flex;
  940. align-items: center;
  941. justify-content: flex-end;
  942. position: fixed;
  943. left: 0;
  944. bottom: 0;
  945. z-index: 99;
  946. .right {
  947. display: flex;
  948. align-items: center;
  949. .total {
  950. display: flex;
  951. align-items: flex-end;
  952. margin-right: 36upx;
  953. .label {
  954. font-size: 26upx;
  955. font-family: PingFang SC;
  956. font-weight: 500;
  957. color: #999999;
  958. line-height: 1.5;
  959. }
  960. .price {
  961. display: flex;
  962. align-items: flex-end;
  963. .unit {
  964. font-size: 32upx;
  965. font-family: PingFang SC;
  966. font-weight: bold;
  967. color: #FF6633;
  968. line-height: 1.2;
  969. margin-right: 10upx;
  970. }
  971. .num {
  972. font-size: 50upx;
  973. font-family: PingFang SC;
  974. font-weight: bold;
  975. color: #FF6633;
  976. line-height: 1;
  977. }
  978. }
  979. }
  980. .btn {
  981. width: 200upx;
  982. height: 88upx;
  983. line-height: 88upx;
  984. text-align: center;
  985. font-size: 30upx;
  986. font-family: PingFang SC;
  987. font-weight: bold;
  988. color: #FFFFFF;
  989. background: #0bb3f2;
  990. border-radius: 44upx;
  991. }
  992. }
  993. }
  994. </style>
  995. <style lang="less" scoped>
  996. .coupon {
  997. height: 100%;
  998. }
  999. /*优惠券列表公共*/
  1000. .coupon-list {}
  1001. .coupon-list .item {
  1002. display: flex;
  1003. flex-direction: column;
  1004. justify-content: center;
  1005. align-items: center;
  1006. width: 100%;
  1007. height: 1.7 * 100rpx;
  1008. margin-bottom: 0.16 * 100rpx;
  1009. }
  1010. .coupon-list .item .money {
  1011. background-size: 100% 100%;
  1012. width: 2.4 * 100rpx;
  1013. height: 100%;
  1014. color: #fff;
  1015. font-size: 0.36 * 100rpx;
  1016. font-weight: bold;
  1017. text-align: center;
  1018. display: flex;
  1019. flex-direction: column;
  1020. align-items: center;
  1021. justify-content: center;
  1022. position: relative;
  1023. }
  1024. .coupon-list .item .money .img {
  1025. position: absolute;
  1026. width: 2.4 * 100rpx;
  1027. height: 100%;
  1028. color: #fff;
  1029. }
  1030. .coupon-list .item .money .num {
  1031. font-size: 0.6 * 100rpx;
  1032. }
  1033. .coupon-list .item .money .pic-num {
  1034. font-size: 20rpx;
  1035. z-index: 99;
  1036. }
  1037. .coupon-list .item .text {
  1038. width: 4.5 * 100rpx;
  1039. padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
  1040. background-color: #fff;
  1041. box-sizing: border-box;
  1042. }
  1043. .coupon-list .item .text .condition {
  1044. font-size: 0.3 * 100rpx;
  1045. color: #282828;
  1046. height: 0.93 * 100rpx;
  1047. line-height: 0.93 * 100rpx;
  1048. border-bottom: 1px solid #f0f0f0;
  1049. }
  1050. .coupon-list .item .text .data {
  1051. font-size: 0.2 * 100rpx;
  1052. color: #999;
  1053. height: 0.76 * 100rpx;
  1054. }
  1055. .coupon-list .item .text .data .bnt {
  1056. width: 1.36 * 100rpx;
  1057. height: 0.44 * 100rpx;
  1058. border-radius: 0.22 * 100rpx;
  1059. font-size: 0.22 * 100rpx;
  1060. color: #fff;
  1061. text-align: center;
  1062. line-height: 0.44 * 100rpx;
  1063. background-color: red;
  1064. }
  1065. .coupon-list .item .text .data .bnt.gray {
  1066. background-color: #ccc;
  1067. }
  1068. </style>