createOrder.vue 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  1. <template>
  2. <view class="content padding-t-30">
  3. <view class="flex tab-address goodsList">
  4. <view class="left">
  5. 收货方式
  6. </view>
  7. <view class="flex right">
  8. <view class=" item" :class="{action:tabCurrentIndex==1}" @click="tabCurrentIndex=1">
  9. 配送
  10. </view>
  11. <view class=" item" :class="{action:tabCurrentIndex==2}" @click="tabCurrentIndex=2">
  12. 自提
  13. </view>
  14. </view>
  15. </view>
  16. <!-- 地址 -->
  17. <navigator v-if="tabCurrentIndex == 1" url="/pages/set/address?source=1" class="address-section margin-b-30">
  18. <view class="order-content " v-if="addressData.real_name">
  19. <view class="cen">
  20. <view class="top">
  21. <text class="name">{{ addressData.real_name }}</text>
  22. <text class="mobile">{{ addressData.phone }}</text>
  23. </view>
  24. <text
  25. class="address flex">{{ addressData.province + addressData.city + addressData.district }}{{ addressData.detail }}</text>
  26. </view>
  27. <text class="iconfont iconenter"></text>
  28. </view>
  29. <view class="order-content" v-if="!addressData.real_name">
  30. <view class="addAddress">
  31. <text></text>
  32. <text>添加收货地址</text>
  33. </view>
  34. </view>
  35. </navigator>
  36. <navigator url="/pages/order/shopList?type=1" class="address-section">
  37. <view class="shop-box" v-if="shopAddress.name">
  38. <view class="shop-top flex">
  39. <view class="flex shop-title">
  40. <image class="shopImg" :src="shopAddress.image" mode="scaleToFill"></image>
  41. <view class="shop-name clamp2">{{ shopAddress.name }}</view>
  42. </view>
  43. <view class="shop-tip">
  44. 门店
  45. </view>
  46. </view>
  47. <view class="shop-content margin-t-10">
  48. <view class="shop-address">
  49. 电话:{{ shopAddress.phone }}
  50. </view>
  51. <text class="shop-address">
  52. 地区:{{shopAddress.address+shopAddress.detailed_address}}
  53. </text>
  54. </view>
  55. </view>
  56. <view class="order-content" v-if="!shopAddress.name">
  57. <view class="addAddress">
  58. <text></text>
  59. <text>添加收货地址</text>
  60. </view>
  61. </view>
  62. </navigator>
  63. <view class="goodsList">
  64. <view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
  65. <!-- 商品列表 -->
  66. <view class="g-item">
  67. <image :src="ls.productInfo.image"></image>
  68. <view class="right">
  69. <text class="title clamp">{{ ls.productInfo.store_name }}</text>
  70. <text class="spec">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.suk : '默认' }}</text>
  71. <view class="price-box">
  72. <text
  73. class="price">¥{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price }}</text>
  74. <text class="number">{{ 'x ' + ls.cart_num + (ls.productInfo.unit_name || '') }}</text>
  75. </view>
  76. <view class="serverSet" v-if="ls.day>0">
  77. (<text>服务费:{{ls.day_deducted}}</text>
  78. <text class="margin-l-10">服务天数:{{ls.day}}天</text>)
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <!-- 金额明细 -->
  85. <view class="yt-list">
  86. <template v-if="tabCurrentIndex == 1">
  87. <view class="yt-list-cell b-b">
  88. <text class="cell-tit clamp">送货日期</text>
  89. <view @click="openTime" class="desc">
  90. <text v-if="day.day">
  91. {{timeList[checkedTime].name+day.time}}
  92. </text>
  93. <text v-else>
  94. 请选择送货日期
  95. </text>
  96. </view>
  97. </view>
  98. </template>
  99. <template v-if="tabCurrentIndex == 2">
  100. <view class="yt-list-cell b-b">
  101. <text class="cell-tit clamp">姓名</text>
  102. <input class="desc" type="text" v-model="addressData.real_name" placeholder="请填写备注信息"
  103. placeholder-class="placeholder" />
  104. </view>
  105. <view class="yt-list-cell b-b">
  106. <text class="cell-tit clamp">手机号</text>
  107. <input class="desc" type="text" v-model="addressData.phone" placeholder="请填写备注信息"
  108. placeholder-class="placeholder" />
  109. </view>
  110. </template>
  111. <view class="yt-list-cell b-b">
  112. <text class="cell-tit clamp">运费</text>
  113. <text class="cell-tip disabled">{{ Postage }}</text>
  114. </view>
  115. <view class="yt-list-cell b-b">
  116. <text class="cell-tit clamp">备注</text>
  117. <input class="desc" type="text" v-model="desc" placeholder="请填写备注信息" placeholder-class="placeholder" />
  118. </view>
  119. </view>
  120. <view class="yt-list">
  121. <view class="yt-list-cell b-b" @click="payType='weixin'">
  122. <view class="cell-tit flex">
  123. <image class="orderIcon" src="../../static/icon/orderWx.png" mode="widthFix"></image>
  124. <text class="margin-l-10">微信支付</text>
  125. </view>
  126. <image class="checked" v-if="payType=='weixin'" src="../../static/icon/addressIconXz.png"
  127. mode="widthFix"></image>
  128. <view v-else class="noChecked"></view>
  129. </view>
  130. <!-- #ifdef APP-PLUS -->
  131. <view class="yt-list-cell b-b" @click="payType='ali'">
  132. <view class="cell-tit flex">
  133. <image class="orderIcon" src="../../static/icon/orderAli.png" mode="widthFix"></image>
  134. <text class="margin-l-10">支付宝</text>
  135. </view>
  136. <image class="checked" v-if="payType=='ali'" src="../../static/icon/addressIconXz.png" mode="widthFix">
  137. </image>
  138. <view v-else class="noChecked"></view>
  139. </view>
  140. <!-- #endif -->
  141. <view class="yt-list-cell b-b" @click="payType='yue'">
  142. <view class="cell-tit flex">
  143. <image class="orderIcon" src="../../static/icon/ye.png" mode="widthFix"></image>
  144. <text class="margin-l-10">余额({{now_money}})</text>
  145. </view>
  146. <image class="checked" v-if="payType=='yue'" src="../../static/icon/addressIconXz.png" mode="widthFix">
  147. </image>
  148. <view v-else class="noChecked"></view>
  149. </view>
  150. </view>
  151. <!-- 底部 -->
  152. <view class="footer">
  153. <view class="price-content">
  154. <text>实付款</text>
  155. <text class="price-tip">¥</text>
  156. <text class="price">{{ payPrice }}</text>
  157. </view>
  158. <text class="submit" :class="{submitNo:payLoding}" @click="payLoding?'':submit()">提交订单</text>
  159. </view>
  160. <uni-popup class="alertTime" ref="popup" type="bottom">
  161. <view class="alert-box position-relative">
  162. <view class="alert-title ">
  163. 选择预计送达时间
  164. </view>
  165. <view class="tip iconfont iconclose" @click="$refs.popup.close()"></view>
  166. <view class="flex">
  167. <view class="left-title">
  168. <view class="title" :class="{action:checkedTime==ind}" v-for="(item,ind) in timeList"
  169. @click="changeCheckedTime(item,ind)">
  170. {{item.name+'('+item.day+')'}}
  171. </view>
  172. </view>
  173. <view class="right-content">
  174. <view class="list flex" v-for="(item,ind) in timeList[checkedTime].list" @click="checkedShopTime(item)">
  175. <view class="time">
  176. {{item.time}}
  177. </view>
  178. <view class="checked">
  179. 剩余:{{item.door_number-item.day_number}}
  180. </view>
  181. </view>
  182. </view>
  183. </view>
  184. </view>
  185. </uni-popup>
  186. </view>
  187. </template>
  188. <script>
  189. import {
  190. mapState
  191. } from 'vuex';
  192. import {
  193. confirm,
  194. computedOrderkey,
  195. createOrderkey,
  196. orderPay
  197. } from '@/api/order.js';
  198. import {
  199. getUserInfo
  200. } from '@/api/user.js';
  201. import {
  202. storeday
  203. } from '@/api/water.js';
  204. // #ifdef H5
  205. import weixinObj from "@/plugin/jweixin-module/index.js";
  206. // #endif
  207. export default {
  208. data() {
  209. return {
  210. tabCurrentIndex: 1, //1为自提2为配送
  211. // #ifdef APP
  212. payType: 'ali',
  213. // #ifndef
  214. // #ifndef APP
  215. payType: 'weixin',
  216. // #ifndef
  217. desc: '', //备注
  218. // 收货地址
  219. addressData: {},
  220. // 店铺地址
  221. shopAddress: {
  222. name: '',
  223. mobile: '',
  224. addressName: '',
  225. address: '',
  226. area: '',
  227. default: false,
  228. id: ''
  229. },
  230. // 商品列表
  231. shopList: [],
  232. // 购物车id
  233. cartId: '',
  234. //购物金额详情
  235. moneyAll: {
  236. storeFreePostage: 0, //邮费优惠
  237. storePostage: 0, //邮费
  238. totalPrice: 0, //总支付金额
  239. vipPrice: 0 //vip优惠价
  240. },
  241. payPrice: 0, //总支付金额
  242. orderKey: '', //订单id
  243. payLoding: false, //判断是否支付中
  244. orderId: '', //订单id
  245. now_money: 0, //余额
  246. onShopId: -1, //默认-1为不存在商家id
  247. // 下单日期
  248. day: {
  249. day:'',
  250. id:'',
  251. time:''
  252. },
  253. // 当前选中的日期对象
  254. checkedTime: 0,
  255. // 保存每周日子
  256. timeName: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
  257. // 保存日期列表
  258. timeList: [{
  259. name: '今天',
  260. day: '',
  261. time: '',
  262. list: []
  263. }, {
  264. name: '明天',
  265. day: '',
  266. time: '',
  267. list: []
  268. }, {
  269. name: '',
  270. day: '',
  271. time: '',
  272. list: []
  273. }, {
  274. name: '',
  275. day: '',
  276. time: '',
  277. list: []
  278. }]
  279. };
  280. },
  281. watch: {
  282. shopAddress(newValue, oldValue) {
  283. console.log(newValue,'newValue');
  284. for (let i = 0; i < this.timeList.length; i++) {
  285. const item = this.timeList[i];
  286. const day = `${item.time.getFullYear()}-${item.time.getMonth()+1}-${item.time.getDate()}`
  287. storeday({
  288. store_id:newValue.id,
  289. day
  290. }).then(({
  291. data
  292. }) => {
  293. item.list= data;
  294. });
  295. }
  296. }
  297. },
  298. onLoad(option) {
  299. // 保存当前商品在购物车中的id
  300. this.cartId = option.id;
  301. // 判断是否要读取商家id
  302. if (option.shopId) {
  303. this.onShopId = option.shopId;
  304. }
  305. this.loadData();
  306. this.userinfo();
  307. // 初始化送货时间
  308. this.timeInit();
  309. },
  310. computed: {
  311. // 计算是否免运费
  312. Postage() {
  313. let money = +this.moneyAll.storePostage;
  314. if (money == 0) {
  315. return '免运费';
  316. } else {
  317. return '¥' + money;
  318. }
  319. },
  320. payAllMoney() {
  321. return +this.moneyAll.totalPrice + +this.moneyAll.vipPrice;
  322. },
  323. ...mapState('shop', ['shopDetail'])
  324. },
  325. methods: {
  326. checkedShopTime(item){
  327. this.day = item;
  328. this.$refs.popup.close();
  329. },
  330. // 选中的时间对象
  331. changeCheckedTime(item, ind) {
  332. this.checkedTime = ind;
  333. },
  334. // 打开弹窗
  335. openTime() {
  336. // 打开弹出窗
  337. this.$refs.popup.open();
  338. },
  339. // 初始化送货时间
  340. timeInit() {
  341. // 保存当前时间
  342. const startTime = new Date();
  343. for (let i = 0; i < this.timeList.length; i++) {
  344. const item = this.timeList[i]
  345. // 保存今天时间戳
  346. item.time = new Date(startTime.getTime() + 86400000 * i);
  347. // 获取今日周几
  348. item.day = this.timeName[item.time.getDay()];
  349. if (!item.name) {
  350. // 获取今日日期
  351. item.name = `${item.time.getMonth()+1}月${item.time.getDate()}日`
  352. }
  353. }
  354. console.log(this.timeList, 'this.timeList');
  355. },
  356. // 送货时间修改
  357. changeTime(res) {
  358. console.log(res);
  359. },
  360. // 加载用户基础信息
  361. userinfo() {
  362. getUserInfo({}).then(({
  363. data
  364. }) => {
  365. this.now_money = data.now_money;
  366. });
  367. },
  368. // 计算支付金额
  369. payMoneyNub() {
  370. computedOrderkey({
  371. orderkey: this.orderKey,
  372. useIntegral: 0, //是否积分抵扣
  373. addressId: this.addressData.id //地址编号
  374. })
  375. .then(({
  376. data
  377. }) => {
  378. this.integralShow = true;
  379. // 获取支付金额
  380. this.payPrice = +data.result.pay_price;
  381. this.integralMoney = data.result.deduction_price;
  382. })
  383. .catch(e => {
  384. console.log(e);
  385. this.integralShow = false;
  386. });
  387. },
  388. // 加载基础数据
  389. loadData() {
  390. let obj = this;
  391. confirm({
  392. cartId: obj.cartId + '',
  393. longitude: uni.getStorageSync('CACHE_LONGITUDE'),
  394. latitude: uni.getStorageSync('CACHE_LATITUDE'),
  395. }).then(({
  396. data
  397. }) => {
  398. obj.addressData = data.addressInfo || {};
  399. obj.shopList = data.cartInfo; //商品列表
  400. obj.moneyAll = data.priceGroup; //金额数据
  401. obj.orderKey = data.orderKey; //订单key
  402. obj.shopAddress = data.system_store; //到店自提列表
  403. obj.shopAddress.address = data.system_store.address.join(','); //到店自提列表
  404. // 计算金额
  405. this.payMoneyNub();
  406. });
  407. },
  408. // 提交订单
  409. submit() {
  410. let obj = this;
  411. if (!this.addressData.real_name) {
  412. this.$api.msg('请选择收货地址');
  413. return false;
  414. }
  415. // 判断是否余额不足
  416. if (obj.payType == 'yue' && +obj.now_money < obj.payPrice) {
  417. uni.showModal({
  418. title: '提示',
  419. content: '账户余额不足!',
  420. showCancel: false,
  421. });
  422. return;
  423. }
  424. uni.showLoading({
  425. title: '支付中',
  426. mask: true
  427. })
  428. // 支付中
  429. obj.payLoding = true;
  430. // 判断是否为未支付订单中跳转进入
  431. obj.firstCreateOrder();
  432. },
  433. // 订单金额支付
  434. orderMoneyPay() {
  435. let obj = this;
  436. orderPay({
  437. uni: obj.orderId,
  438. // #ifdef H5
  439. from: 'weixin', //来源
  440. // #endif
  441. // #ifdef MP-WEIXIN
  442. from: 'routine', //来源
  443. // #endif
  444. // #ifdef APP-PLUS
  445. from: 'app', //来源
  446. // #endif
  447. paytype: obj.payType //支付类型 weixin-微信 yue-余额
  448. })
  449. .then(e => {
  450. // 判断是否微信小程序支付
  451. if (obj.payType == 'weixin') {
  452. // #ifdef H5 || MP
  453. let da = e.data.result.jsConfig;
  454. let data = {
  455. nonceStr: da.nonceStr,
  456. package: da.package,
  457. signType: da.signType,
  458. paySign: da.paySign,
  459. success: function(res) {
  460. obj.paySuccessTo();
  461. },
  462. fail: () => {
  463. uni.navigateTo({
  464. url: '/pages/order/order?state=0'
  465. });
  466. }
  467. };
  468. // #endif
  469. // #ifdef H5
  470. data.timestamp = da.timestamp;
  471. weixinObj.chooseWXPay(data);
  472. // #endif
  473. // #ifdef MP-WEIXIN
  474. data.timeStamp = da.timestamp;
  475. wx.requestPayment(data);
  476. // #endif
  477. // #ifdef APP
  478. console.log(e.data.result.jsConfig, '返回数值');
  479. uni.requestPayment({
  480. provider: 'wxpay',
  481. orderInfo: e.data.result.jsConfig,
  482. success(e) {
  483. obj.paySuccessTo();
  484. },
  485. fail: (e) => {
  486. console.log(e, '支付失败');
  487. uni.navigateTo({
  488. url: '/pages/order/order?state=0'
  489. });
  490. }
  491. })
  492. // #endif
  493. }
  494. // #ifdef APP
  495. if (obj.payType == 'ali') {
  496. uni.requestPayment({
  497. provider: 'alipay',
  498. orderInfo: e.data.result.jsConfig,
  499. success(e) {
  500. obj.paySuccessTo();
  501. },
  502. fail: (e) => {
  503. console.log(e, '支付失败');
  504. uni.navigateTo({
  505. url: '/pages/order/order?state=0'
  506. });
  507. }
  508. })
  509. }
  510. // #endif
  511. uni.hideLoading();
  512. obj.payLoding = false;
  513. })
  514. .catch(e => {
  515. // 支付完成
  516. uni.hideLoading();
  517. obj.payLoding = false;
  518. console.log(e);
  519. });
  520. },
  521. // 支付成功跳转
  522. paySuccessTo() {
  523. uni.hideLoading();
  524. uni.redirectTo({
  525. url: '/pages/user/money/paySuccess?orderid=' + this.orderId,
  526. });
  527. },
  528. // 初次订单创建
  529. firstCreateOrder() {
  530. let obj = this;
  531. console.log(obj.day,'obj.day');
  532. let data = {
  533. real_name: obj.addressData.real_name, //联系人名称
  534. phone: obj.addressData.phone, //联系人号码
  535. addressId: obj.addressData.id, //支付地址id
  536. useIntegral: 0, //是否积分抵扣1为是0为否
  537. payType: obj.payType, //支付类型 weixin-微信 yue-余额
  538. mark: obj.desc, //备注
  539. // #ifdef H5
  540. from: 'weixin', //来源
  541. // #endif
  542. // #ifdef MP-WEIXIN
  543. from: 'routine', //来源
  544. // #endif
  545. // #ifdef APP-PLUS
  546. from: 'app', //来源
  547. // #endif
  548. shipping_type: obj.tabCurrentIndex, //提货方式 1 快递 2自提
  549. store_id: obj.shopAddress.id || '',
  550. day:obj.day.day,
  551. door_id:obj.day.door_id
  552. };
  553. // 生成订单
  554. createOrderkey(data, obj.orderKey)
  555. .then(({
  556. data,
  557. status,
  558. msg
  559. }) => {
  560. // 判断是否支付失败
  561. if (data.status == 'ORDER_EXIST') {
  562. uni.showModal({
  563. title: '提示',
  564. content: msg,
  565. showCancel: false
  566. });
  567. uni.hideLoading();
  568. obj.payLoding = false;
  569. return;
  570. }
  571. // 保存订单号
  572. obj.orderId = data.result.orderId;
  573. // 判断是否为余额支付
  574. if (obj.payType == 'yue') {
  575. console.log('余额支付', status == 200 && data.status == 'SUCCESS');
  576. if (status == 200 && data.status == 'SUCCESS') {
  577. obj.paySuccessTo();
  578. } else {
  579. obj.$api.msg(msg);
  580. }
  581. } else {
  582. // 立即支付
  583. obj.orderMoneyPay();
  584. }
  585. })
  586. .catch(e => {
  587. uni.hideLoading();
  588. obj.payLoding = false;
  589. console.log(e);
  590. });
  591. }
  592. }
  593. };
  594. </script>
  595. <style lang="scss">
  596. .content {
  597. padding-bottom: 100rpx;
  598. }
  599. .address-section {
  600. border-radius: 20rpx;
  601. padding: 30rpx;
  602. margin: 0 $page-row-spacing;
  603. background: #fff;
  604. position: relative;
  605. .order-content {
  606. min-height: 100rpx;
  607. display: flex;
  608. align-items: center;
  609. .leftIcon {
  610. width: 36rpx;
  611. margin: 0 30rpx;
  612. }
  613. .addAddress {
  614. text-align: center;
  615. width: 100%;
  616. display: flex;
  617. justify-content: center;
  618. align-items: center;
  619. }
  620. }
  621. .cen {
  622. display: flex;
  623. flex-direction: column;
  624. font-size: 28rpx;
  625. color: $font-color-dark;
  626. width: 0px;
  627. flex-grow: 1;
  628. }
  629. .name {
  630. font-size: 34rpx;
  631. margin-right: 24rpx;
  632. }
  633. .address {
  634. margin-top: 16rpx;
  635. margin-right: 20rpx;
  636. color: $font-color-light;
  637. }
  638. }
  639. .goodsList {
  640. margin: 0 $page-row-spacing;
  641. padding: 30rpx;
  642. background: #fff;
  643. border-radius: 20rpx;
  644. margin-top: 30rpx;
  645. }
  646. .goods-section {
  647. .logo {
  648. display: block;
  649. width: 50rpx;
  650. height: 50rpx;
  651. border-radius: 100px;
  652. }
  653. .name {
  654. font-size: 30rpx;
  655. color: $font-color-base;
  656. margin-left: 24rpx;
  657. }
  658. .g-item {
  659. display: flex;
  660. image {
  661. flex-shrink: 0;
  662. display: block;
  663. width: 170rpx;
  664. height: 170rpx;
  665. border-radius: 4rpx;
  666. }
  667. .right {
  668. flex: 1;
  669. padding-left: 24rpx;
  670. overflow: hidden;
  671. .serverSet {
  672. font-size: 22rpx;
  673. color: $font-color-light;
  674. }
  675. }
  676. .title {
  677. font-size: 30rpx;
  678. color: $font-color-dark;
  679. }
  680. .spec {
  681. font-size: 26rpx;
  682. color: $font-color-light;
  683. }
  684. .price-box {
  685. display: flex;
  686. align-items: center;
  687. font-size: 32rpx;
  688. padding-top: 10rpx;
  689. color: $font-color-light;
  690. .price {
  691. margin-bottom: 4rpx;
  692. }
  693. .number {
  694. font-size: 26rpx;
  695. margin-left: 20rpx;
  696. }
  697. }
  698. .step-box {
  699. position: relative;
  700. }
  701. }
  702. }
  703. .yt-list {
  704. background: #fff;
  705. margin: 0 $page-row-spacing;
  706. margin-top: 30rpx;
  707. border-radius: 20rpx;
  708. }
  709. .yt-list-cell {
  710. display: flex;
  711. align-items: center;
  712. justify-content: space-between;
  713. padding: 10rpx 30rpx 10rpx 40rpx;
  714. line-height: 70rpx;
  715. position: relative;
  716. .checked,
  717. .noChecked {
  718. width: 36rpx;
  719. height: 36rpx;
  720. }
  721. .noChecked {
  722. border: 1px solid $font-color-light;
  723. border-radius: 100rpx;
  724. }
  725. &.cell-hover {
  726. background: #fafafa;
  727. }
  728. &.b-b:after {
  729. left: 30rpx;
  730. }
  731. .cell-icon {
  732. height: 32rpx;
  733. width: 32rpx;
  734. font-size: 22rpx;
  735. color: #fff;
  736. text-align: center;
  737. line-height: 32rpx;
  738. background: #f85e52;
  739. border-radius: 4rpx;
  740. margin-right: 12rpx;
  741. &.hb {
  742. background: #ffaa0e;
  743. }
  744. &.lpk {
  745. background: #3ab54a;
  746. }
  747. }
  748. .cell-more {
  749. align-self: center;
  750. font-size: 24rpx;
  751. color: $font-color-light;
  752. margin-left: 8rpx;
  753. margin-right: -10rpx;
  754. }
  755. .cell-tit {
  756. font-size: 26rpx;
  757. color: $font-color-light;
  758. margin-right: 10rpx;
  759. .orderIcon {
  760. width: 48rpx;
  761. }
  762. }
  763. .cell-tip {
  764. font-size: 26rpx;
  765. color: $font-color-dark;
  766. &.disabled {
  767. color: $font-color-light;
  768. }
  769. &.active {
  770. color: $base-color;
  771. }
  772. &.red {
  773. color: $base-color;
  774. }
  775. }
  776. &.desc-cell {
  777. .cell-tit {
  778. max-width: 90rpx;
  779. }
  780. }
  781. .desc {
  782. text-align: right;
  783. font-size: $font-base;
  784. color: $font-color-light;
  785. }
  786. }
  787. /* 支付列表 */
  788. .pay-list {
  789. padding-left: 40rpx;
  790. margin-top: 16rpx;
  791. background: #fff;
  792. .pay-item {
  793. display: flex;
  794. align-items: center;
  795. padding-right: 20rpx;
  796. line-height: 1;
  797. height: 110rpx;
  798. position: relative;
  799. }
  800. .icon-weixinzhifu {
  801. width: 80rpx;
  802. font-size: 40rpx;
  803. color: #6bcc03;
  804. }
  805. .icon-alipay {
  806. width: 80rpx;
  807. font-size: 40rpx;
  808. color: #06b4fd;
  809. }
  810. .icon-xuanzhong2 {
  811. display: flex;
  812. align-items: center;
  813. justify-content: center;
  814. width: 60rpx;
  815. height: 60rpx;
  816. font-size: 40rpx;
  817. color: $base-color;
  818. }
  819. .tit {
  820. font-size: 32rpx;
  821. color: $font-color-dark;
  822. flex: 1;
  823. }
  824. }
  825. .footer {
  826. position: fixed;
  827. left: 0;
  828. bottom: 0;
  829. z-index: 995;
  830. display: flex;
  831. align-items: center;
  832. width: 100%;
  833. height: 90rpx;
  834. justify-content: space-between;
  835. font-size: 30rpx;
  836. background-color: #fff;
  837. z-index: 998;
  838. color: $font-color-base;
  839. box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
  840. .price-content {
  841. padding-left: 30rpx;
  842. }
  843. .price-tip {
  844. color: $font-color-base;
  845. margin-left: 8rpx;
  846. }
  847. .price {
  848. font-size: 36rpx;
  849. color: $font-color-base;
  850. }
  851. .submit {
  852. display: flex;
  853. align-items: center;
  854. justify-content: center;
  855. width: 280rpx;
  856. height: 100%;
  857. color: #fff;
  858. font-size: 32rpx;
  859. background: $bg-gradual;
  860. &.submitNo {
  861. background-color: $font-color-disabled;
  862. }
  863. }
  864. }
  865. .tab-address {
  866. margin-bottom: 30rpx;
  867. margin-top: 0;
  868. .left {
  869. font-size: $font-base;
  870. }
  871. .right {
  872. font-size: $font-sm;
  873. color: #FFF;
  874. background: $bg-gradual;
  875. padding: 6rpx;
  876. border-radius: 10rpx;
  877. line-height: 1;
  878. .item {
  879. padding: 16rpx 20rpx;
  880. &.action {
  881. color: $uni-color-primary;
  882. background-color: #FFF;
  883. border-radius: 10rpx;
  884. }
  885. }
  886. }
  887. }
  888. .shop-box {
  889. .shop-top {
  890. width: 100%;
  891. .shop-title {
  892. width: 0px;
  893. flex-grow: 1;
  894. justify-content: flex-start;
  895. .shopImg {
  896. height: 65rpx;
  897. width: 65rpx;
  898. border-radius: 100rpx;
  899. margin-right: 20rpx;
  900. flex-shrink: 0;
  901. }
  902. .shop-name {
  903. font-weight: bold;
  904. font-size: $font-lg;
  905. }
  906. }
  907. .shop-tip {
  908. color: #FFF;
  909. padding: 5rpx 10rpx;
  910. font-size: $font-sm;
  911. background: linear-gradient(-90deg, #DCB876 0%, #EECD92 100%);
  912. border-radius: 5rpx;
  913. }
  914. }
  915. .shop-content {
  916. color: $font-color-light;
  917. font-size: $font-sm;
  918. }
  919. }
  920. .alertTime {
  921. z-index: 1000;
  922. .alert-box {
  923. background-color: #FFF;
  924. border-top-right-radius: 20rpx;
  925. border-top-left-radius: 20rpx;
  926. min-height: 70vh;
  927. .right-content{
  928. width: 70%;
  929. .list{
  930. padding: 20rpx 30rpx;
  931. font-size: $font-sm;
  932. border-bottom: 1px solid $border-color-light;
  933. }
  934. }
  935. .left-title {
  936. width: 30%;
  937. align-self: flex-start;
  938. .title {
  939. padding: 30rpx;
  940. text-align: center;
  941. font-weight: bold;
  942. font-size: $font-sm;
  943. background-color: rgba(246, 246, 246, 1);
  944. &.action {
  945. background-color: #FFF;
  946. }
  947. }
  948. }
  949. .alert-title {
  950. text-align: center;
  951. padding: 30rpx;
  952. line-height: 1;
  953. font-weight: bold;
  954. }
  955. .tip {
  956. position: absolute;
  957. top: 30rpx;
  958. right: 30rpx;
  959. color: $font-color-disabled;
  960. font-weight: bold;
  961. }
  962. }
  963. }
  964. </style>