payOrder.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471
  1. <template>
  2. <view class="pages">
  3. <!-- 地址 -->
  4. <view class="text-center text-red" v-if="isTrue && orderType == 2">超出配送距离</view>
  5. <view class="food">
  6. <view class="flex bg justify-between padding-lr-xl">
  7. <view @click="switchTab(2)" :class="orderType == 2 ? 'select' : ''" class="tabBtn"
  8. v-if="XCXIsSelect == '是'">
  9. <view class="title">外卖配送</view>
  10. <view :class="orderType == 2 ? 'active' : ''"></view>
  11. </view>
  12. <view @click="switchTab(1)" :class="orderType == 1 ? 'select' : ''" class="tabBtn">
  13. <view class="title">到店自取</view>
  14. <view :class="orderType == 1 ? 'active' : ''"></view>
  15. </view>
  16. </view>
  17. <view v-if="orderType == 1">
  18. <view class="flex margin-top">
  19. <u-icon name="map" size="50"></u-icon>
  20. <!-- <text>商家信息</text> -->
  21. <view class="flex-sub padding-tb-sm margin-left-sm">
  22. <view class="text-lg text-bold text-black">
  23. <text>{{ dataList.shopName }}</text>
  24. <text class="margin-left-sm" @click="call"><u-icon name="phone" size="40"></u-icon></text>
  25. </view>
  26. <view class="text-df margin-top-xs" style="color: #999999;" @click="goMap">
  27. {{ dataList.detailedAddress }}
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="" v-if="orderType == 2">
  33. <view class="goods_address" v-if="JSON.stringify(address) == '{}'" @click="goAddress">
  34. <view class="address_box">
  35. <view class="address_name">请选择收货地址</view>
  36. <view class="address_image margin-left">
  37. <image src="../../../static/images/index/right.png"></image>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="flex margin-top" style="" v-else @click="goAddress">
  42. <u-icon name="map" size="50"></u-icon>
  43. <view class="flex-sub padding-tb-sm margin-left-sm">
  44. <view class="text-lg text-bold text-black">
  45. <text>{{ address.userName }}</text>
  46. <text class="margin-left-sm">{{ address.userPhone }}</text>
  47. </view>
  48. <view class="text-df margin-top-xs" style="color: #999999;">
  49. {{ address.province }}{{ address.city }}{{ address.district }}{{ address.addressDetail }}
  50. </view>
  51. </view>
  52. <view class="address_image margin-left">
  53. <image src="../../../static/images/index/right.png"></image>
  54. </view>
  55. </view>
  56. <!-- 预约送达时间 -->
  57. <view class="goods_address">
  58. <view class="address_box">
  59. <view class="address_name">送达时间</view>
  60. <picker class='time-picker' mode="multiSelector" @change="bindStartMultiPickerChange"
  61. @columnchange="bindMultiPickerColumnChange" :range="data.multiArray">
  62. {{data.startDate}}
  63. </picker>
  64. <view class="songda_image">
  65. <image src="../../../static/images/index/right.png"></image>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- 商品 -->
  72. <view class="food">
  73. <view class="tosend_header_food" v-for="(item, index) in dataList.orderGoodsList" :key="index">
  74. <view class="tosend_header_food_le">
  75. <image :src="item.goodsPicture[0]" style="border-radius: 10rpx;" mode=""></image>
  76. </view>
  77. <view class="flex-sub margin-left-sm">
  78. <view class="flex justify-between align-center">
  79. <view class="text-lg text-bold text-black">{{ item.goodsName }}</view>
  80. <view class="text-lg text-bold text-black">
  81. <text class="text-sm">¥</text>
  82. {{ item.goodsPrice }}
  83. </view>
  84. </view>
  85. <view class="flex justify-between align-center text-gray">
  86. <view v-if="item.skuMessage">{{ item.skuMessage }}</view>
  87. <view>x{{ item.goodsNum }}</view>
  88. </view>
  89. <view class="flex justify-between align-center text-gray margin-tb-sm" v-if="item.goodsPack">
  90. <view>打包费</view>
  91. <view class="">¥{{ item.goodsPack }} / 份</view>
  92. </view>
  93. </view>
  94. </view>
  95. <!-- <view class="tosend_header_do do_top" v-if="item.goodsPack>0" >
  96. <view>打包费</view>
  97. <view class="tosend_header_do_ri">¥{{item.goodsPack}}</view>
  98. </view> -->
  99. <view class="tosend_header_do justify-between" v-if="paotuiMoney > 0 && orderType == 2">
  100. <view>跑腿费</view>
  101. <view class="tosend_header_do_ri">¥{{ paotuiMoney }}</view>
  102. </view>
  103. <view class="tosend_header_do justify-between do_bot" @click="isShow">
  104. <view>优惠券</view>
  105. <view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
  106. <view v-else>
  107. <image src="../../../static/images/order/right1.png" style="width: 14rpx;height: 24rpx;" mode="">
  108. </image>
  109. </view>
  110. </view>
  111. <view class="tosend_header_do justify-between do_bot" @click="huodongShow">
  112. <view>优惠活动</view>
  113. <view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
  114. <view v-else>
  115. <image src="../../../static/images/order/right1.png" style="width: 14rpx;height: 24rpx;" mode="">
  116. </image>
  117. </view>
  118. </view>
  119. <view class="tosend_header_do justify-between">
  120. <view class="tosend_header_do_le2">合计</view>
  121. <view class="tosend_header_do_ri2">
  122. <text>¥</text>
  123. {{ totalPrice1 }}
  124. </view>
  125. </view>
  126. </view>
  127. <!-- 订单备注 -->
  128. <view class="food">
  129. <view class="padding-tb-sm text-lg text-bold text-bold text-black">订单备注</view>
  130. <view class="flex align-center justify-between padding-tb-sm padding-lr"
  131. style="background: #f5f5f5;width: 100%;">
  132. <u-input v-model="remark" type="textarea" placeholder="请输入订单备注" height="180" maxlength="200"
  133. style="width: 100%;"></u-input>
  134. </view>
  135. </view>
  136. <!-- 支付方式 -->
  137. <view class="margin-top padding-lr radius bg-white" style="width: 94%;margin: 0 auto;border-radius: 18rpx;">
  138. <view class="padding-tb-sm text-lg text-bold text-bold text-black">支付方式</view>
  139. <view style="height: 100upx;" v-for="(item, index) in openLists" :key="index">
  140. <view class="flex align-center justify-between padding-tb" v-if="item.text != '零钱'">
  141. <image :src="item.image" style="width: 55rpx;height: 55rpx;border-radius: 50upx;"></image>
  142. <view class="flex-sub text-xl margin-left">{{ item.text }}</view>
  143. <radio-group name="openWay" style="margin-left: 20upx;" @change="selectWay(item)">
  144. <label class="tui-radio">
  145. <radio class="red" :checked="openWay === item.id ? true : false" />
  146. </label>
  147. </radio-group>
  148. </view>
  149. <view class="flex align-center justify-between padding-tb" v-if="item.text === '零钱'">
  150. <image :src="item.image" style="width: 55rpx;height: 55rpx;border-radius: 50upx;"></image>
  151. <view class="flex-sub text-xl margin-left">{{ item.text }} <text
  152. style="font-size: 30rpx;margin-left: 10rpx;"
  153. v-if="userMoney && userMoney > 0">(余额:{{userMoney}})</text>
  154. <text v-else
  155. style="font-size: 30rpx;margin-left: 10rpx;text-decoration:underline;color: #ea0000;"
  156. @tap="goCash()">去充值</text>
  157. </view>
  158. <radio-group name="openWay" style="margin-left: 20upx;" @change="selectWay(item)">
  159. <label class="tui-radio">
  160. <radio class="red" :checked="openWay === item.id ? true : false" />
  161. </label>
  162. </radio-group>
  163. </view>
  164. </view>
  165. </view>
  166. <view style="height: 120rpx;"></view>
  167. <!-- 结算 -->
  168. <view class="goorder">
  169. <view class="goorder_but" :class="isTrue && orderType == 2 ? 'goorder_but_' : ''" @click="toSettlement">立即结算
  170. </view>
  171. </view>
  172. <u-popup v-model="show" mode="center" :closeable="true" close-icon-pos="top-right" close-icon="close-circle"
  173. close-icon-size="50" border-radius="20" width="80%" @close="close">
  174. <view class="padding bg-gray">
  175. <view class="text-center text-lg text-bold margin-bottom-sm">可用优惠券</view>
  176. <scroll-view scroll-y="true" style="height: 600rpx;" v-if="couponList.length > 0">
  177. <view class="flex justify-between align-center radius margin-tb-sm padding-sm bg-white"
  178. v-for="(item, index) in couponList" :key="index" @click="selCoupon(item)">
  179. <view>
  180. <view>{{ item.couponName }}</view>
  181. <view>有效期至{{ item.expirationTime }}</view>
  182. </view>
  183. <view class="text-sm text-bold">
  184. ¥
  185. <text class="text-lg">{{ item.money }}</text>
  186. </view>
  187. </view>
  188. </scroll-view>
  189. <view v-if="couponList.length == 0"
  190. style="height: 100rpx;line-height: 100rpx;text-align: center;font-weight: 700;">暂无可用优惠券</view>
  191. </view>
  192. </u-popup>
  193. <!-- 选择优惠活动 -->
  194. <u-popup v-model="youhui" mode="center" :closeable="true" close-icon-pos="top-right" close-icon="close-circle"
  195. close-icon-size="50" border-radius="20" width="80%" @close="closeYouhui()">
  196. <view class="padding bg-gray">
  197. <view class="text-center text-lg text-bold margin-bottom-sm">可用优惠活动</view>
  198. <scroll-view scroll-y="true" style="height: 600rpx;" v-if="huoList.length > 0">
  199. <view class="flex justify-between align-center radius margin-tb-sm padding-sm bg-white"
  200. v-for="(item, index) in huoList" :key="index" @click="selctHuo(item)">
  201. <view>
  202. <view>{{ item.activityTitle }}</view>
  203. <view>有效期至{{ item.activityEndTime }}</view>
  204. </view>
  205. <!-- <view class="text-sm text-bold">
  206. ¥
  207. <text class="text-lg" v-if="item.activityType=='2'">{{ item.money }}</text>
  208. <text class="text-lg" v-if="item.activityType=='2'">{{ item.money }}</text>
  209. <text class="text-lg" v-if="item.activityType=='4'">全场打{{ item.discountAmount }}折</text>
  210. </view> -->
  211. </view>
  212. </scroll-view>
  213. <view v-if="huoList.length == 0"
  214. style="height: 100rpx;line-height: 100rpx;text-align: center;font-weight: 700;">暂无可用优惠活动</view>
  215. </view>
  216. </u-popup>
  217. <view class="hintPopul" v-if="shopDet && shopDet.putawayFlag == 1">
  218. <view class="content_">
  219. <image src="../../../static/images/index/shop.png" style="width: 200rpx;height: 180rpx;"></image>
  220. <view class="text-xl text-bold">店铺打烊啦</view>
  221. <view class="hintText margin-top-sm text-gray">现在店铺已经打烊了,营业时间</view>
  222. <view class="margin-top-xs text-gray margin-bottom">{{ shopDet.businessHours }}-{{ shopDet.lockHours }}
  223. </view>
  224. <view class="Btns" @click="goBack()">知道了</view>
  225. </view>
  226. </view>
  227. </view>
  228. </template>
  229. <script>
  230. /**
  231. * 获取任意时间
  232. */
  233. function getDate(date, AddDayCount = 0) {
  234. if (!date) {
  235. date = new Date()
  236. }
  237. if (typeof date !== 'object') {
  238. date = date.replace(/-/g, '/')
  239. }
  240. const dd = new Date(date)
  241. dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
  242. var a = new Array("日", "一", "二", "三", "四", "五", "六");
  243. var week = new Date().getDay();
  244. var week2 = new Date().getDay()+1;
  245. const y = dd.getFullYear()
  246. const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
  247. const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
  248. const h = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
  249. const f = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
  250. const s = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
  251. return {
  252. fullDate: y + '-' + m + '-' + d,
  253. fullDate2: y + '-' + m + '-' + d+' '+h+':'+f+':'+s,
  254. fullTime: m + '月' + d + '日',
  255. year: y,
  256. month: m,
  257. date: d,
  258. day: dd.getDay(),
  259. sWeek:"周"+ a[week],
  260. eWeek:"周"+ a[week2]
  261. }
  262. }
  263. export default {
  264. data() {
  265. return {
  266. userMoney: 0,
  267. storeCommodityId: 0,
  268. openLists: [],
  269. openWay: 2,
  270. hintShow: true,
  271. page: 1,
  272. limit: 100,
  273. dataList: {},
  274. packMoney: 0, //打包费
  275. totalPrice: 0,
  276. totalPrice1: 0,
  277. address: {}, //地址
  278. addressId: '',
  279. parentId: '',
  280. orderId: '',
  281. show: false,
  282. youhui:false,//优惠活动
  283. coupon: '',
  284. shopDet: '',
  285. huodong: '', //选择的活动信息
  286. couponList: [],
  287. huoList: [], //可用活动
  288. orderType: 2, //1表示到店自取 2表示外卖配送
  289. paotuiMoney: 0,
  290. dabaoMoney: 0,
  291. goodsMoney: 0,
  292. distance: 0,
  293. isTrue: false,
  294. XCXIsSelect: '是',
  295. remark: '',
  296. GoodsorderId: '',
  297. isThrottle: true,
  298. lng:'',
  299. lat:'',
  300. data: {
  301. multiArray: [],
  302. warning: '',
  303. startDate: '请选择'
  304. },
  305. workStart:'',//骑手上班时间
  306. workEnd:'',//骑手下班时间
  307. yusongTime:'',//骑手预计送达时长
  308. reservationFlag:0,//是否预约单 1是、0否
  309. expectDeliveryTime:'',//预约送达时间
  310. };
  311. },
  312. onLoad(option) {
  313. // #ifdef APP
  314. this.openLists = [{
  315. image: '../../../static/images/my/weixin.png',
  316. text: '微信',
  317. id: 2
  318. },
  319. {
  320. image: '../../../static/images/my/zhifubao.png',
  321. text: '支付宝',
  322. id: 3
  323. },
  324. {
  325. image: '../../../static/images/my/jinbi.png',
  326. text: '零钱',
  327. id: 1
  328. }
  329. ];
  330. // #endif
  331. // #ifdef MP-WEIXIN
  332. this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是';
  333. this.openLists = [{
  334. image: '../../../static/images/my/weixin.png',
  335. text: '微信',
  336. id: 2
  337. },
  338. {
  339. image: '../../../static/images/my/jinbi.png',
  340. text: '零钱',
  341. id: 1
  342. }
  343. ];
  344. // #endif
  345. // #ifdef H5
  346. this.openLists = [{
  347. image: '../../../static/images/my/weixin.png',
  348. text: '微信',
  349. id: 2
  350. },
  351. {
  352. image: '../../../static/images/my/zhifubao.png',
  353. text: '支付宝',
  354. id: 3
  355. },
  356. {
  357. image: '../../../static/images/my/jinbi.png',
  358. text: '零钱',
  359. id: 1
  360. }
  361. ];
  362. // #endif
  363. this.orderId = option.orderId;
  364. this.orderType = option.orderType;
  365. uni.showLoading({
  366. title: '加载中...'
  367. });
  368. this.getOrderList();
  369. this.getAddressList();
  370. this.getQishou()
  371. let that = this;
  372. //获取店铺信息
  373. uni.getLocation({
  374. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  375. success: function(res) {
  376. console.log(res, '经纬度');
  377. that.lat = res.latitude;
  378. that.lng = res.longitude;
  379. }
  380. });
  381. },
  382. onShow() {
  383. this.getMsgData();
  384. this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId');
  385. if (this.addressId) {
  386. this.getAddressDet(this.addressId);
  387. }
  388. },
  389. methods: {
  390. //获取骑手上下班时间
  391. getQishou(){
  392. this.$Request.get('/app/tbindent/work-time').then(res => {
  393. if (res.code == 0 && res.data) {
  394. this.workStart=parseInt((res.data.workingHoursOfRider).substring(0,2))
  395. this.workEnd=parseInt((res.data.workingHoursOfRider).substring(6,8))
  396. this.yusongTime=res.data.timeOfRider
  397. var date = new Date();
  398. var currentHours = date.getHours();
  399. var currentMinute = date.getMinutes();
  400. var temp = [];
  401. // currentHours = 12;
  402. var temp_time = [];
  403. //如果当前时间大于20点
  404. var minite=parseInt(this.yusongTime-parseInt(this.yusongTime/60)*60)
  405. if(parseInt(this.yusongTime/60)==0){
  406. var h1=0
  407. var h2=parseInt(this.yusongTime-parseInt(this.yusongTime/60)*60)
  408. }else{
  409. var h1=parseInt(this.yusongTime/60)
  410. var h2=parseInt(this.yusongTime-parseInt(this.yusongTime/60)*60)
  411. }
  412. var acc=currentHours + h1
  413. var bcc=currentMinute + h2
  414. var teshu=this.workStart + h1
  415. if(bcc>=60){
  416. var b=bcc-60
  417. var a=acc+1
  418. }else{
  419. var b=bcc
  420. var a=acc
  421. }
  422. var a1=a + 1
  423. var s1=a.toString()
  424. var s2=a1.toString()
  425. var e1=b.toString()
  426. if (currentHours >= (this.workEnd-h1)) {
  427. // this.$queue.setData({
  428. // warning:'当前时间段不在服务范围,现在下单,最早将于明早8点上门安装',
  429. // startDate:'明早 | 8:00-10:00'
  430. // })
  431. var time2=teshu+1
  432. this.data.warning = '当前时间段无骑手配送,现在下单,最早将于明日'+teshu + ':00'+'送达'
  433. this.data.startDate = '明日 | '+teshu + ':00' + '-' + time2 + ':00'
  434. // this.data.startDate = '明早 | '+a + ':'+b + '-' + a1 + ':'+b
  435. temp[0] = ["明天", "后天"];
  436. temp[1] = [];
  437. for (let i = teshu; i < (this.workEnd-h1);) {
  438. var i1 = i + 1;
  439. var ss1=i.toString()
  440. var ss2=i1.toString()
  441. temp[1].push(i + ':00' + '-' + i1 + ':00')
  442. i += 1;
  443. }
  444. } else if (currentHours < this.workStart) {
  445. // this.$queue.setData({
  446. // warning:'当前时间段不在服务范围,现在下单,最早将于今早8点上门安装',
  447. // startDate:'明早 | 8:00-10:00'
  448. // })
  449. var time2=teshu+1
  450. this.data.warning = '当前时间段无骑手配送,现在下单,最早将于今日'+teshu + ':00'+'送达'
  451. this.data.startDate = '今日 | '+teshu + ':00' + '-' + time2 + ':00'
  452. temp[0] = ["今天", "明天"];
  453. temp[1] = [];
  454. for (let i = teshu; i < (this.workEnd-h1);) {
  455. var i1 = i + 1;
  456. var ss1=i.toString()
  457. var ss2=i1.toString()
  458. temp[1].push(i + ':00' + '-' + i1 + ':00')
  459. i += 1;
  460. }
  461. } else {
  462. // this.$queue.setData({
  463. // startDate:'尽快送达 | 两小时内'
  464. // })
  465. // this.data.startDate = '尽快送达 | 两小时内'
  466. // this.data.startDate = s1.padStart(2,0) + ':'+e1.padStart(2,0) + '-' + s2.padStart(2,0) + ':'+e1.padStart(2,0)
  467. temp[0] = ["今天", "明天"];
  468. temp[1] = [];
  469. for (let i = a; i < (this.workEnd-h1);) {
  470. var i1 = i + 1;
  471. var ss1=i.toString()
  472. var ss2=i1.toString()
  473. temp[1].push(ss1.padStart(2,0) + ':'+e1.padStart(2,0) + '-' + ss2.padStart(2,0) + ':'+e1.padStart(2,0))
  474. i += 1;
  475. }
  476. }
  477. // this.$queue.setData({
  478. // multiArray:temp,
  479. // })
  480. this.data.multiArray = temp
  481. if(this.data.warning!=''){
  482. wx.showToast({
  483. title: this.data.warning,
  484. icon: 'none',
  485. duration: 3000
  486. })
  487. }
  488. }
  489. });
  490. },
  491. bindMultiPickerColumnChange: function(e) {
  492. let c = e.detail.column;
  493. let v = e.detail.value;
  494. var time = [];
  495. var date = new Date();
  496. console.log(date)
  497. var date = new Date();
  498. var currentHours = date.getHours();
  499. var currentMinute = date.getMinutes();
  500. var minite=parseInt(this.yusongTime-parseInt(this.yusongTime/60)*60)
  501. if(parseInt(this.yusongTime/60)==0){
  502. var h2=parseInt(this.yusongTime-parseInt(this.yusongTime/60)*60)
  503. }else{
  504. var h1=parseInt(this.yusongTime/60)
  505. var h2=parseInt(this.yusongTime-parseInt(this.yusongTime/60)*60)
  506. }
  507. var acc=currentHours + h1
  508. var bcc=currentMinute + h2
  509. var teshu=this.workStart + h1
  510. if(bcc>=60){
  511. var b=bcc-60
  512. var a=acc+1
  513. }else{
  514. var b=bcc
  515. var a=acc
  516. }
  517. var a1=a + 1
  518. var s1=a.toString()
  519. var s2=a1.toString()
  520. var e1=b.toString()
  521. var temp = this.data.multiArray;
  522. // currentHours = 12;
  523. if (c == 0) {
  524. if (temp[c][v] == '今天') {
  525. temp[1] = [];
  526. for (let i = a; i < (this.workEnd-h1);) {
  527. var i1 = i + 1;
  528. var ss1=i.toString()
  529. var ss2=i1.toString()
  530. temp[1].push(ss1.padStart(2,0) + ':'+e1.padStart(2,0) + '-' + ss2.padStart(2,0) + ':'+e1.padStart(2,0))
  531. i += 1;
  532. }
  533. } else {
  534. temp[1] = [];
  535. for (let i = teshu; i < (this.workEnd-h1);) {
  536. var i1 = i + 1;
  537. var ss1=i.toString()
  538. var ss2=i1.toString()
  539. temp[1].push(i + ':00' + '-' + i1 + ':00')
  540. i += 1;
  541. }
  542. }
  543. // this.$queue.setData({
  544. // multiArray:temp
  545. // })
  546. this.data.multiArray = temp
  547. this.$forceUpdate();
  548. }
  549. },
  550. bindStartMultiPickerChange: function(e) {
  551. let temp = this.data.multiArray;
  552. // this.$queue.setData({
  553. // startDate:temp[0][e.detail.value[0]]+' | '+temp[1][e.detail.value[1]]
  554. // })
  555. this.data.startDate = temp[0][e.detail.value[0]] + ' | ' + temp[1][e.detail.value[1]]
  556. if(this.data.startDate){
  557. this.reservationFlag=1
  558. if(temp[0][e.detail.value[0]]=="今天") {
  559. var date=getDate(new Date()).fullDate
  560. this.expectDeliveryTime=date+' '+temp[1][e.detail.value[1]].substring(6,11)+":00"
  561. }else if(temp[0][e.detail.value[0]]=="明天") {
  562. var date=getDate(new Date(),1).fullDate
  563. this.expectDeliveryTime=date+' '+temp[1][e.detail.value[1]].substring(6,11)+":00"
  564. }else if(temp[0][e.detail.value[0]]=="后天") {
  565. var date=getDate(new Date(),2).fullDate
  566. this.expectDeliveryTime=date+' '+temp[1][e.detail.value[1]].substring(6,11)+":00"
  567. }
  568. }
  569. },
  570. goCash() {
  571. uni.navigateTo({
  572. url: '/my/wallet/index'
  573. });
  574. },
  575. getMsgData() {
  576. this.$Request.get("/app/userintegral/findUserMessage").then(res => {
  577. if (res.code == 0 && res.data) {
  578. this.userMoney = res.data.userMoney ? res.data.userMoney : 0;
  579. }
  580. });
  581. },
  582. //获取店铺详情
  583. getShopDet(shopId) {
  584. let data = {
  585. shopId,
  586. lng: this.lng,
  587. lat: this.lat
  588. };
  589. this.$Request.get('/app/goods/selectGoodsList', data).then(res => {
  590. if (res.code == 0 && res.data) {
  591. this.shopDet = res.data.goodsShop;
  592. }
  593. });
  594. },
  595. goBack() {
  596. uni.navigateBack({});
  597. },
  598. isShow() {
  599. this.show = true;
  600. },
  601. //选择优惠活动弹框
  602. huodongShow(){
  603. this.youhui=true
  604. },
  605. getDistance() {
  606. if (this.address.lng && this.dataList.shopLng) {
  607. let data = {
  608. ol: this.address.lng,
  609. od: this.address.lat,
  610. dl: this.dataList.shopLng,
  611. dd: this.dataList.shopLat
  612. };
  613. this.$Request.post('/app/tbindent/distance', data).then(res => {
  614. if (res.code == 0) {
  615. this.distance = res.data;
  616. if (this.distance > Number(this.dataList.distributionDistance)) {
  617. this.isTrue = true;
  618. } else {
  619. this.isTrue = false;
  620. }
  621. }
  622. });
  623. }
  624. },
  625. close() {
  626. this.show = false;
  627. },
  628. closeYouhui() {
  629. this.youhui = false;
  630. },
  631. switchTab(e) {
  632. // this.page = 1
  633. // this.status = ''
  634. this.coupon = ''
  635. this.orderType = e;
  636. // this.current = 0;
  637. console.log(e);
  638. if (JSON.stringify(this.address) != '{}') {
  639. this.getDistance();
  640. }
  641. // if (this.orderType == 2) {
  642. // this.totalPrice1 = this.totalPrice + this.paotuiMoney + this.dabaoMoney
  643. // } else {
  644. // this.totalPrice1 = this.totalPrice + this.dabaoMoney
  645. // }
  646. if (this.orderType == 2) {
  647. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney).toFixed(2);
  648. } else {
  649. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2);
  650. }
  651. if (this.coupon) {
  652. let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0)).toFixed(2);
  653. if (totalMoney <= 0) {
  654. this.totalPrice1 = 0.01;
  655. } else {
  656. this.totalPrice1 = totalMoney;
  657. }
  658. }
  659. },
  660. // 删除优惠券
  661. detCoupon() {
  662. let data = {
  663. orderId: this.dataList.orderId
  664. };
  665. this.$Request.post('/app/order/deleteCouponByOrderId', data).then(res => {
  666. if (res.code == 0) {}
  667. });
  668. },
  669. // 选择优惠券
  670. selCoupon(item) {
  671. this.coupon = item;
  672. if (this.orderType == 2) {
  673. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney).toFixed(2);
  674. } else {
  675. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2);
  676. }
  677. let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0)).toFixed(2);
  678. if (totalMoney <= 0) {
  679. this.totalPrice1 = 0.01;
  680. } else {
  681. this.totalPrice1 = totalMoney;
  682. }
  683. let data = {
  684. parentId: this.dataList.parentId,
  685. couponId: this.coupon ? this.coupon.id : ''
  686. };
  687. this.$Request.post('/app/order/employCoupon', data).then(res => {
  688. if (res.code == 0) {
  689. this.show = false;
  690. } else {
  691. this.$queue.showToast(res.msg);
  692. }
  693. });
  694. },
  695. //选择活动activityId
  696. selctHuo(item) {
  697. this.huodong = item;
  698. if (this.orderType == 2) {
  699. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney).toFixed(2);
  700. } else {
  701. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2);
  702. }
  703. let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)).toFixed(2);
  704. if (totalMoney <= 0) {
  705. this.totalPrice1 = 0.01;
  706. } else {
  707. this.totalPrice1 = totalMoney;
  708. }
  709. this.youhui = false;
  710. },
  711. // 获取优惠券列表
  712. getCouponList() {
  713. console.log(this.totalPrice);
  714. console.log(this.dataList.packMoney);
  715. let data = {
  716. shopId: this.dataList.shopId,
  717. page: 1,
  718. limit: 20,
  719. minMoney: this.orderType == 2 ? parseFloat(this.totalPrice * 1).toFixed(2) * 1 + this.paotuiMoney *
  720. 1 + this.dabaoMoney * 1 : parseFloat(this.totalPrice * 1).toFixed(2)
  721. };
  722. this.$Request.get('/app/coupon/selectUserCouponList', data).then(res => {
  723. if (res.code == 0) {
  724. this.couponList = res.data.list;
  725. }
  726. });
  727. },
  728. // 优惠活动列表
  729. getHuoList(){
  730. let data = {
  731. orderId: this.dataList.orderId,
  732. };
  733. this.$Request.get(`/app/activity/suit-activity/${this.dataList.orderId}`, data).then(res => {
  734. if (res.code == 0) {
  735. this.huoList = res.data;
  736. }
  737. });
  738. },
  739. // 获取订单信息
  740. getOrderList() {
  741. let data = {
  742. orderId: this.orderId
  743. };
  744. this.$Request.get('/app/order/selectBuyGoods', data).then(res => {
  745. uni.hideLoading();
  746. if (res.code == 0) {
  747. this.dataList = res.data;
  748. this.GoodsorderId = res.data.orderId;
  749. this.getShopDet(res.data.shopId);
  750. // this.dataList.orderGoodsList[0].goodsPicture = this.dataList.orderGoodsList[0].goodsPicture.split(',')
  751. console.log(this.dataList.orderGoodsList);
  752. if (this.dataList) {
  753. this.dataList.orderGoodsList.forEach(res => {
  754. res.goodsPicture = res.goodsPicture.split(',');
  755. this.dabaoMoney += res.goodsPack * res.goodsNum;
  756. this.goodsMoney += res.goodsPrice * res.goodsNum;
  757. this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney);
  758. });
  759. }
  760. console.log(Number(this.dataList.orderGoodsList[0].goodsPrice));
  761. console.log(Number(this.dataList.exemptMinMoney));
  762. // 判断商品金额是否大于最低减免配送费金额
  763. if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
  764. console.log('跑腿费');
  765. this.paotuiMoney = 0;
  766. } else {
  767. this.paotuiMoney = this.dataList.errandMoney;
  768. }
  769. this.totalPrice = res.data.payMoney * 1;
  770. console.log(this.dabaoMoney, '打包');
  771. console.log(this.paotuiMoney, '跑腿');
  772. if (this.orderType == 2) {
  773. this.totalPrice1 = this.totalPrice + this.paotuiMoney + this.dabaoMoney;
  774. } else {
  775. this.totalPrice1 = this.totalPrice + this.dabaoMoney;
  776. }
  777. console.log(this.dataList);
  778. this.getCouponList();
  779. this.getHuoList();
  780. this.detCoupon();
  781. this.getDistance();
  782. }
  783. });
  784. },
  785. selectWay: function(item) {
  786. this.openWay = item.id;
  787. },
  788. takeReark() {
  789. let datas = {
  790. orderId: this.GoodsorderId,
  791. remark: this.remark
  792. };
  793. this.$Request.post('/app/order/updateOrdersRemark', datas).then(res => {
  794. // uni.hideLoading();
  795. if (res.code == 0) {} else {
  796. uni.showToast({
  797. title: res.msg,
  798. icon: 'none'
  799. });
  800. }
  801. });
  802. },
  803. // 立即结算
  804. toSettlement() {
  805. if (this.isThrottle == false) {
  806. return
  807. }
  808. let that = this
  809. if (this.isTrue && this.orderType == 2) {
  810. uni.showToast({
  811. title: '超出配送范围',
  812. icon: 'none'
  813. });
  814. reutrn;
  815. }
  816. if (this.orderType == 2 && !this.address.addressId) {
  817. uni.showToast({
  818. title: '请选择收货地址',
  819. icon: 'none'
  820. });
  821. return;
  822. }
  823. if (this.remark) {
  824. this.takeReark();
  825. }
  826. uni.showLoading({
  827. title: '支付中...'
  828. });
  829. this.isThrottle = false
  830. if (this.openWay == 1) {
  831. let data = {
  832. userId:uni.getStorageSync('userId'),
  833. type:1,//支付方式 1表示微信支付、4或5表示支付宝支付
  834. activityId:this.huodong ? this.huodong.activityId : '',
  835. reservationFlag:this.reservationFlag,//是否预约单 1是、0否
  836. expectDeliveryTime:this.expectDeliveryTime,//期待送达时间 yyyy-MM-dd HH:mm:ss
  837. parentId: this.dataList.parentId,
  838. couponId: this.coupon ? this.coupon.id : '',
  839. addressId: this.address.addressId ? this.address.addressId : '',
  840. orderType: this.orderType,
  841. };
  842. this.$Request.post('/app/wxPay/balanceOrder', data).then(res => {
  843. if (res.code == 0) {
  844. uni.hideLoading();
  845. that.$queue.showToast('支付成功');
  846. setTimeout(function() {
  847. that.isThrottle = true
  848. uni.switchTab({
  849. url: '/pages/order/index'
  850. });
  851. }, 1000);
  852. } else {
  853. that.isThrottle = true
  854. that.$queue.showToast(res.msg, );
  855. }
  856. });
  857. } else if (this.openWay == 2) {
  858. // #ifdef H5
  859. let data = {
  860. userId:uni.getStorageSync('userId'),
  861. type:1,//支付方式 1表示微信支付、4或5表示支付宝支付
  862. activityId:this.huodong ? this.huodong.activityId : '',
  863. reservationFlag:this.reservationFlag,//是否预约单 1是、0否
  864. expectDeliveryTime:this.expectDeliveryTime,//期待送达时间 yyyy-MM-dd HH:mm:ss
  865. parentId: this.dataList.parentId,
  866. couponId: this.coupon ? this.coupon.id : '',
  867. addressId: this.address.addressId ? this.address.addressId : '',
  868. orderType: this.orderType,
  869. type: 2
  870. };
  871. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then(res => {
  872. if (res.code == 0) {
  873. this.callPay(res.data);
  874. } else {
  875. that.isThrottle = true
  876. uni.showToast({
  877. title: res.msg,
  878. icon: 'none'
  879. });
  880. }
  881. });
  882. // #endif
  883. // #ifdef MP-WEIXIN
  884. let data = {
  885. userId:uni.getStorageSync('userId'),
  886. type:4,//支付方式 1表示微信支付、4或5表示支付宝支付
  887. activityId:this.huodong ? this.huodong.activityId : '',
  888. reservationFlag:this.reservationFlag,//是否预约单 1是、0否
  889. expectDeliveryTime:this.expectDeliveryTime,//期待送达时间 yyyy-MM-dd HH:mm:ss
  890. parentId: this.dataList.parentId,
  891. couponId: this.coupon ? this.coupon.id : '',
  892. addressId: this.address.addressId ? this.address.addressId : '',
  893. orderType: this.orderType,
  894. type: 3
  895. };
  896. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then(res => {
  897. if (res.code == 0) {
  898. uni.requestPayment({
  899. provider: 'wxpay',
  900. timeStamp: res.data.timestamp,
  901. nonceStr: res.data.noncestr,
  902. package: res.data.package,
  903. signType: res.data.signType,
  904. paySign: res.data.sign,
  905. success: function(suc) {
  906. uni.hideLoading();
  907. that.$queue.showToast('支付成功');
  908. setTimeout(function() {
  909. that.isThrottle = true
  910. uni.switchTab({
  911. url: '/pages/order/index'
  912. });
  913. }, 1000);
  914. },
  915. fail: function(err) {
  916. console.log('fail:' + JSON.stringify(err));
  917. that.isThrottle = true
  918. uni.showToast({
  919. title: '支付失败',
  920. icon: 'none'
  921. });
  922. }
  923. });
  924. } else {
  925. uni.showToast({
  926. title: res.msg,
  927. icon: 'none'
  928. });
  929. that.isThrottle = true
  930. }
  931. });
  932. // #endif
  933. // #ifdef APP
  934. let data = {
  935. type: 1,
  936. parentId: this.dataList.parentId,
  937. couponId: this.coupon ? this.coupon.id : '',
  938. addressId: this.address.addressId ? this.address.addressId : '',
  939. orderType: this.orderType
  940. };
  941. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then(res => {
  942. console.log(res);
  943. this.showpay = false;
  944. if (res.code == 0) {
  945. this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));
  946. } else {
  947. that.isThrottle = true
  948. }
  949. });
  950. // #endif
  951. } else if (this.openWay == 3) {
  952. // #ifdef H5
  953. let data = {
  954. type: 5,
  955. parentId: this.dataList.parentId,
  956. couponId: this.coupon ? this.coupon.id : '',
  957. addressId: this.address.addressId ? this.address.addressId : '',
  958. orderType: this.orderType
  959. };
  960. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then(res => {
  961. this.showpay = false;
  962. that.isThrottle = true
  963. const div = document.createElement('div');
  964. div.innerHTML = res.data; //此处form就是后台返回接收到的数据
  965. document.body.appendChild(div);
  966. document.forms[0].submit();
  967. });
  968. // #endif
  969. // #ifdef APP-PLUS
  970. let data = {
  971. type: 4,
  972. parentId: this.dataList.parentId,
  973. couponId: this.coupon ? this.coupon.id : '',
  974. addressId: this.address.addressId ? this.address.addressId : '',
  975. orderType: this.orderType
  976. };
  977. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then(res => {
  978. this.showpay = false;
  979. this.setPayment('alipay', res.data);
  980. });
  981. // #endif
  982. }
  983. },
  984. callPay: function(response) {
  985. if (typeof WeixinJSBridge === 'undefined') {
  986. if (document.addEventListener) {
  987. document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false);
  988. } else if (document.attachEvent) {
  989. document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response));
  990. document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response));
  991. }
  992. } else {
  993. this.onBridgeReady(response);
  994. }
  995. },
  996. onBridgeReady: function(response) {
  997. let that = this;
  998. if (!response.package) {
  999. return;
  1000. }
  1001. WeixinJSBridge.invoke(
  1002. 'getBrandWCPayRequest', {
  1003. appId: response.appid, //公众号名称,由商户传入
  1004. timeStamp: response.timestamp, //时间戳,自1970年以来的秒数
  1005. nonceStr: response.noncestr, //随机串
  1006. package: response.package,
  1007. signType: response.signType, //微信签名方式:
  1008. paySign: response.sign //微信签名
  1009. },
  1010. function(res) {
  1011. if (res.err_msg === 'get_brand_wcpay_request:ok') {
  1012. // 使用以上方式判断前端返回,微信团队郑重提示:
  1013. //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
  1014. uni.hideLoading();
  1015. uni.showToast({
  1016. title: '支付成功',
  1017. icon: 'success'
  1018. });
  1019. setTimeout(function() {
  1020. that.isThrottle = true
  1021. uni.switchTab({
  1022. url: '/pages/order/index'
  1023. });
  1024. }, 1000);
  1025. } else {
  1026. that.isThrottle = true
  1027. uni.hideLoading();
  1028. }
  1029. WeixinJSBridge.log(response.err_msg);
  1030. }
  1031. );
  1032. },
  1033. isCheckPay(code, name, order) {
  1034. let that = this
  1035. if (code == 0) {
  1036. console.log('999999999999');
  1037. this.setPayment(name, order);
  1038. } else {
  1039. uni.hideLoading();
  1040. uni.showToast({
  1041. title: '支付信息有误'
  1042. });
  1043. that.isThrottle = true
  1044. }
  1045. },
  1046. setPayment(name, order) {
  1047. console.log(777777777, name, order);
  1048. let that = this
  1049. uni.requestPayment({
  1050. provider: name,
  1051. orderInfo: order, //微信、支付宝订单数据
  1052. success: function(res) {
  1053. uni.hideLoading();
  1054. uni.showLoading({
  1055. title: '支付成功',
  1056. icon: 'none'
  1057. });
  1058. setTimeout(function() {
  1059. that.isThrottle = true
  1060. uni.navigateBack();
  1061. }, 1000);
  1062. },
  1063. fail: function(err) {
  1064. that.isThrottle = true
  1065. uni.hideLoading();
  1066. },
  1067. complete() {
  1068. that.isThrottle = true
  1069. uni.hideLoading();
  1070. }
  1071. });
  1072. },
  1073. // 获取选择的地址
  1074. getAddressDet(e) {
  1075. this.$Request.get('/app/address/selectAddressById?addressId=' + e).then(res => {
  1076. if (res.code == 0) {
  1077. this.address = res.data;
  1078. if (JSON.stringify(this.address) != '{}') {
  1079. this.getDistance();
  1080. }
  1081. uni.removeStorageSync('addressId');
  1082. }
  1083. });
  1084. },
  1085. // 获取地址列表
  1086. getAddressList() {
  1087. let that = this;
  1088. let data = {
  1089. page: 1,
  1090. limit: 100
  1091. };
  1092. that.$Request.get('/app/address/selectAddressList', data).then(res => {
  1093. if (res.code == 0) {
  1094. that.address = res.data.list[0] ? res.data.list[0] : {};
  1095. res.data.list.forEach(ret => {
  1096. if (ret.addressDefault == 1) {
  1097. that.address = ret;
  1098. }
  1099. });
  1100. console.log(that.address, '我的地址列表460');
  1101. if (JSON.stringify(this.address) != '{}') {
  1102. this.getDistance();
  1103. }
  1104. }
  1105. });
  1106. },
  1107. goAddress() {
  1108. uni.navigateTo({
  1109. url: '/my/address/index?add=1'
  1110. });
  1111. },
  1112. // 点击调起地图查看位置
  1113. goMap() {
  1114. let that = this;
  1115. let lati = parseFloat(that.dataList.shopLat);
  1116. let longi = parseFloat(that.dataList.shopLng);
  1117. uni.authorize({
  1118. scope: 'scope.userLocation',
  1119. success(res) {
  1120. uni.openLocation({
  1121. name: that.dataList.shopName,
  1122. latitude: lati,
  1123. longitude: longi,
  1124. success: function() {}
  1125. });
  1126. },
  1127. fail(err) {}
  1128. });
  1129. },
  1130. // 打电话
  1131. call() {
  1132. uni.makePhoneCall({
  1133. phoneNumber: this.dataList.shopPhone
  1134. });
  1135. }
  1136. }
  1137. };
  1138. </script>
  1139. <style scoped>
  1140. .hintPopul {
  1141. width: 100%;
  1142. height: 100vh;
  1143. position: fixed;
  1144. top: 0;
  1145. background: rgba(0, 0, 0, 0.4);
  1146. z-index: 999;
  1147. }
  1148. .content_ {
  1149. position: absolute;
  1150. left: 0;
  1151. right: 0;
  1152. top: 0;
  1153. bottom: 0;
  1154. margin: auto;
  1155. text-align: center;
  1156. width: 500rpx;
  1157. height: 400rpx;
  1158. border-radius: 20rpx;
  1159. background-color: #fff;
  1160. padding-top: 120rpx;
  1161. }
  1162. .content_ image {
  1163. position: absolute;
  1164. top: -50rpx;
  1165. left: 0;
  1166. right: 0;
  1167. margin: auto;
  1168. }
  1169. .hintText {
  1170. font-size: 30rpx;
  1171. }
  1172. .Btns {
  1173. width: 460rpx;
  1174. height: 60rpx;
  1175. line-height: 60rpx;
  1176. text-align: center;
  1177. background: #fcd202;
  1178. font-size: 28rpx;
  1179. border: 2rpx solid #fcd202;
  1180. color: #333333;
  1181. border-radius: 50rpx;
  1182. font-weight: 700;
  1183. margin: auto;
  1184. }
  1185. .goods_address {
  1186. width: 94%;
  1187. background: #ffffff;
  1188. height: 120rpx;
  1189. margin: 20rpx auto 0;
  1190. border-radius: 18rpx;
  1191. }
  1192. .address_box {
  1193. width: 90%;
  1194. margin: 0 auto;
  1195. height: 120rpx;
  1196. display: flex;
  1197. line-height: 120rpx;
  1198. }
  1199. .address_name {
  1200. flex: 1;
  1201. font-size: 30rpx;
  1202. }
  1203. .address_image {
  1204. /* flex: 1; */
  1205. display: flex;
  1206. justify-content: flex-end;
  1207. align-items: center;
  1208. }
  1209. .address_image image {
  1210. width: 15rpx;
  1211. height: 30rpx;
  1212. }
  1213. .songda_image image {
  1214. width: 20rpx;
  1215. height: 30rpx;
  1216. margin-left: 20rpx;
  1217. }
  1218. /* 地址 */
  1219. .address {
  1220. width: 88%;
  1221. margin: 3% auto;
  1222. padding: 3%;
  1223. display: flex;
  1224. background-color: #ffffff;
  1225. border-radius: 18rpx;
  1226. }
  1227. .adderss_le {
  1228. width: 90%;
  1229. line-height: 1.5;
  1230. }
  1231. .adderss_le_text {
  1232. font-size: 30rpx;
  1233. font-weight: bold;
  1234. color: #333333;
  1235. }
  1236. .adderss_le_text2 {
  1237. font-size: 24rpx;
  1238. font-weight: 500;
  1239. color: #999999;
  1240. display: flex;
  1241. }
  1242. .adderss_le_text2 view {
  1243. margin-left: 2%;
  1244. }
  1245. .adderss_le_text2 view:first-child {
  1246. margin-left: 0;
  1247. }
  1248. .adderss_ri {
  1249. width: 10%;
  1250. text-align: right;
  1251. line-height: 3;
  1252. }
  1253. .adderss_ri image {
  1254. width: 18rpx;
  1255. height: 30rpx;
  1256. }
  1257. /* 商品 */
  1258. .food {
  1259. width: 94%;
  1260. margin: 3% auto;
  1261. padding: 3%;
  1262. background-color: #ffffff;
  1263. border-radius: 18rpx;
  1264. }
  1265. .tosend_header_food {
  1266. width: 100%;
  1267. display: flex;
  1268. margin-top: 3%;
  1269. }
  1270. .tosend_header_food_le {
  1271. width: 15%;
  1272. }
  1273. .tosend_header_food_le image {
  1274. width: 110rpx;
  1275. height: 110rpx;
  1276. }
  1277. .tosend_header_food_ce {
  1278. margin: 0 0 0 4%;
  1279. width: 57%;
  1280. }
  1281. .tosend_header_food_ri {
  1282. text-align: right;
  1283. width: 25%;
  1284. }
  1285. .tosend_header_food_text {
  1286. font-size: 34rpx;
  1287. font-weight: 500;
  1288. color: #333333;
  1289. line-height: 1.8;
  1290. }
  1291. .tosend_header_food_text text {
  1292. font-size: 25rpx;
  1293. }
  1294. .tosend_header_food_text2 {
  1295. font-size: 30rpx;
  1296. font-weight: 500;
  1297. color: #999999;
  1298. }
  1299. .do_top {
  1300. padding-top: 3%;
  1301. }
  1302. .do_bot {
  1303. padding-bottom: 3%;
  1304. border-bottom: 2rpx solid #e6e6e6;
  1305. }
  1306. .tosend_header_do {
  1307. width: 100%;
  1308. color: #333333;
  1309. font-size: 30rpx;
  1310. display: flex;
  1311. margin-top: 20rpx;
  1312. line-height: 1.5;
  1313. }
  1314. .tosend_header_do view {
  1315. /* flex: 1; */
  1316. }
  1317. .tosend_header_do_ri {
  1318. text-align: right;
  1319. }
  1320. .tosend_header_do_le2 {
  1321. font-family: PingFang SC;
  1322. font-weight: 500;
  1323. color: #999999;
  1324. padding-top: 1.5%;
  1325. }
  1326. .tosend_header_do_ri2 {
  1327. text-align: right;
  1328. color: #ea0000;
  1329. font-size: 40rpx;
  1330. }
  1331. .tosend_header_do_ri2 text {
  1332. font-size: 30rpx;
  1333. }
  1334. /* 支付 */
  1335. /* .payment_all{
  1336. width: 88%;margin: 3% auto;padding: 3%;background-color: #FFFFFF;
  1337. border-radius: 18rpx;
  1338. }
  1339. .payment{
  1340. width: 100%;display: flex;margin-top: 3%;
  1341. }
  1342. .payment_le{
  1343. width: 13%;
  1344. }
  1345. .payment_le image{
  1346. width: 60rpx;height: 60rpx;
  1347. }
  1348. .payment_ce{
  1349. width: 52%;
  1350. font-size: 30rpx;
  1351. font-weight: bold;
  1352. color: #333333;line-height: 60rpx;
  1353. }
  1354. .payment_ri{
  1355. width: 35%;text-align: right;line-height: 60rpx;
  1356. } */
  1357. /* 结算 */
  1358. .goorder {
  1359. width: 100%;
  1360. padding: 2% 3%;
  1361. position: fixed;
  1362. bottom: 0;
  1363. background-color: #ffffff;
  1364. }
  1365. .goorder_but {
  1366. width: 100%;
  1367. line-height: 3.5;
  1368. text-align: center;
  1369. background: #fcd202;
  1370. border-radius: 36rpx;
  1371. font-weight: 700;
  1372. }
  1373. .goorder_but_ {
  1374. opacity: 0.5;
  1375. }
  1376. .bg {
  1377. background-color: #ffffff;
  1378. }
  1379. .tabBtn {
  1380. /* background-color: #f6f6fa; */
  1381. height: 60rpx;
  1382. line-height: 60rpx;
  1383. color: #999999;
  1384. font-size: 38rpx;
  1385. }
  1386. .active {
  1387. /* width: 82rpx; */
  1388. height: 6rpx;
  1389. background: #fcd202;
  1390. /* position: relative;
  1391. top: -20rpx; */
  1392. z-index: 9;
  1393. }
  1394. </style>