confirmOrder.vue 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972
  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" v-if="XCXIsSelect == '是' && showReach != 1 && shopTypeName != '三大运营商'">
  8. <view class="title">外卖配送</view>
  9. <view :class="orderType == 2 ? 'active' : ''"></view>
  10. </view>
  11. <view @click="switchTab(1)" :class="orderType == 1 ? 'select' : ''" class="tabBtn" v-if="showReach != 2">
  12. <view class="title">到店自取</view>
  13. <view :class="orderType == 1 ? 'active' : ''"></view>
  14. </view>
  15. </view>
  16. <view v-if="orderType == 1">
  17. <!-- <view class="text-black text-lg margin-top">商家地址</view> -->
  18. <view class="flex margin-top" style="">
  19. <u-icon name="map" size="50"></u-icon>
  20. <view class="flex-sub padding-tb-sm margin-left-sm">
  21. <view class="text-lg text-bold text-black">
  22. <text>{{ dataList.shopName }}</text>
  23. <text class="margin-left-sm" @click="call">{{ dataList.shopPhone }}</text>
  24. </view>
  25. <view class="text-df margin-top-xs" style="color: #999999" @click="goMap">
  26. {{ dataList.detailedAddress }}
  27. </view>
  28. </view>
  29. </view>
  30. <view class="flex margin-top" style="align-items: center" v-if="shopTypeName == '三大运营商'">
  31. <view>请填写身份证号:</view>
  32. <input type="idcard" v-model="idcard1" style="border: 1px solid" />
  33. </view>
  34. <!-- 预约送达时间 -->
  35. <!-- <view class="goods_address" v-if="reservationOpenFlag==1">
  36. <view class="address_box">
  37. <view class="address_name">送达时间</view>
  38. <picker class='time-picker' mode="multiSelector" @change="bindStartMultiPickerChange"
  39. @columnchange="bindMultiPickerColumnChange" :range="data.multiArray">
  40. {{data.startDate}}
  41. </picker>
  42. <view class="songda_image">
  43. <image src="../../../static/images/index/right.png"></image>
  44. </view>
  45. </view>
  46. </view> -->
  47. </view>
  48. <view class="" v-if="orderType == 2">
  49. <view class="goods_address" v-if="JSON.stringify(address) == '{}'" @click="goAddress">
  50. <view class="address_box">
  51. <view class="address_name">请选择收货地址</view>
  52. <view class="address_image margin-left">
  53. <image src="../../../static/images/index/right.png"></image>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="flex margin-top" style="" v-else @click="goAddress">
  58. <u-icon name="map" size="50"></u-icon>
  59. <view class="flex-sub padding-tb-sm margin-left-sm">
  60. <view class="text-lg text-bold text-black">
  61. <text>{{ address.userName }}</text>
  62. <text class="margin-left-sm">{{ address.userPhone }}</text>
  63. </view>
  64. <view class="text-df margin-top-xs" style="color: #999999">{{ address.province }}{{ address.city }}{{ address.district }}{{ address.addressDetail }}</view>
  65. </view>
  66. <view class="address_image margin-left">
  67. <image src="../../../static/images/index/right.png"></image>
  68. </view>
  69. </view>
  70. <!-- 预约送达时间 -->
  71. <!-- <view class="goods_address" v-if="reservationOpenFlag==1">
  72. <view class="address_box">
  73. <view class="address_name">送达时间</view>
  74. <picker class='time-picker' mode="multiSelector" @change="bindStartMultiPickerChange"
  75. @columnchange="bindMultiPickerColumnChange" :range="data.multiArray">
  76. {{data.startDate}}
  77. </picker>
  78. <view class="songda_image">
  79. <image src="../../../static/images/index/right.png"></image>
  80. </view>
  81. </view>
  82. </view> -->
  83. </view>
  84. </view>
  85. <!-- 商品 -->
  86. <view class="food">
  87. <view class="tosend_header_food" v-for="(item, index) in goodsList" :key="index">
  88. <view class="tosend_header_food_le">
  89. <image :src="item.goodsPicture[0]" style="border-radius: 10rpx" mode=""></image>
  90. </view>
  91. <view class="flex-sub margin-left-sm">
  92. <view class="flex justify-between align-center">
  93. <view class="text-lg text-bold text-black">{{ item.goodsName }}</view>
  94. <view class="text-lg text-bold text-black">
  95. <text class="text-sm">¥</text>
  96. {{ item.goodsPrice }}
  97. </view>
  98. </view>
  99. <view class="flex justify-between align-center text-gray">
  100. <view v-if="item.skuMessage">{{ item.skuMessage }}</view>
  101. <view>x{{ item.goodsNum }}</view>
  102. </view>
  103. <view class="flex justify-between text-bold align-center margin-tb-sm">
  104. <view>打包费</view>
  105. <view class="">¥{{ item.goodsPack }} / 份</view>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="tosend_header_do justify-between" v-if="paotuiMoney > 0 && orderType == 2">
  110. <view>跑腿费</view>
  111. <view class="tosend_header_do_ri">¥{{ paotuiMoney }}</view>
  112. </view>
  113. <view class="tosend_header_do justify-between" v-if="address.insideDeliveryFee && orderType == 2">
  114. <view>特殊地址跑腿费</view>
  115. <view class="tosend_header_do_ri">¥{{ address.insideDeliveryFee }}</view>
  116. </view>
  117. <view class="tosend_header_do justify-between do_bot" @click="isShow">
  118. <view>优惠券</view>
  119. <view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
  120. <view v-else>
  121. <image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
  122. </view>
  123. </view>
  124. <view class="tosend_header_do justify-between do_bot" @click="huodongShow">
  125. <view>优惠活动</view>
  126. <view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
  127. <view v-else>
  128. <image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
  129. </view>
  130. </view>
  131. <view class="tosend_header_do justify-between">
  132. <view class="tosend_header_do_le2">合计</view>
  133. <view class="tosend_header_do_ri2">
  134. <text>¥</text>
  135. {{ totalPrice1 }}
  136. </view>
  137. </view>
  138. </view>
  139. <!-- 积分介绍 -->
  140. <view class="food" v-if="isIntegral">
  141. <view class="food_top">
  142. <view class="">获取积分</view>
  143. <view class="">{{ intergral }}</view>
  144. </view>
  145. <view class="food_bottom">
  146. 实付满{{ ruleAmount1 }}元得
  147. <text class="bottom_text">{{ ruleValue1 }}分</text>
  148. ,超过{{ ruleMaxAmount }}元部分,每满{{ ruleAmount2 }}元得
  149. <text class="bottom_text">{{ ruleValue2 }}分</text>
  150. ;每笔订单上限
  151. <text class="bottom_text">{{ maxIntegral }}分</text>
  152. </view>
  153. </view>
  154. <!-- 订单备注 -->
  155. <view class="food">
  156. <view class="padding-tb-sm text-lg text-bold text-bold text-black">订单备注</view>
  157. <view class="flex align-center justify-between padding-tb-sm padding-lr" style="background: #f5f5f5; width: 100%">
  158. <u-input v-model="remark" type="textarea" placeholder="请输入订单备注" height="180" maxlength="200" style="width: 100%"></u-input>
  159. </view>
  160. </view>
  161. <!-- 支付方式 -->
  162. <view class="food">
  163. <view class="padding-tb-sm text-lg text-bold text-bold text-black">支付方式</view>
  164. <view style="height: 100upx" v-for="(item, index) in openLists" :key="index">
  165. <view class="flex align-center justify-between padding-tb" v-if="item.text != '零钱'">
  166. <image :src="item.image" style="width: 55rpx; height: 55rpx; border-radius: 50upx"></image>
  167. <view class="flex-sub text-xl margin-left">{{ item.text }}</view>
  168. <radio-group name="openWay" style="margin-left: 20upx" @change="selectWay(item)">
  169. <label class="tui-radio">
  170. <radio class="red" :checked="openWay === item.id ? true : false" />
  171. </label>
  172. </radio-group>
  173. </view>
  174. <view class="flex align-center justify-between padding-tb" v-if="item.text === '零钱'">
  175. <image :src="item.image" style="width: 55rpx; height: 55rpx; border-radius: 50upx"></image>
  176. <view class="flex-sub text-xl margin-left">
  177. {{ item.text }}
  178. <text style="font-size: 30rpx; margin-left: 10rpx" v-if="userMoney && userMoney > 0">(余额:{{ userMoney }})</text>
  179. <!-- <text v-else
  180. style="font-size: 30rpx;margin-left: 10rpx;text-decoration:underline;color: #ea0000;"
  181. @tap="goCash()">去充值</text> -->
  182. </view>
  183. <radio-group name="openWay" style="margin-left: 20upx" @change="selectWay(item)">
  184. <label class="tui-radio">
  185. <radio class="red" :checked="openWay === item.id ? true : false" />
  186. </label>
  187. </radio-group>
  188. </view>
  189. </view>
  190. </view>
  191. <view style="height: 120rpx"></view>
  192. <!-- 结算 -->
  193. <view class="goorder">
  194. <view class="goorder_but" :class="isTrue && orderType == 2 ? 'goorder_but_' : ''" @click="toSettlement_throttle">立即结算</view>
  195. </view>
  196. <view class="hintPopul" v-if="shopDet && shopDet.putawayFlag == 1">
  197. <view class="content_">
  198. <image src="../../../static/images/index/shop.png" style="width: 200rpx; height: 180rpx"></image>
  199. <view class="text-xl text-bold">店铺打烊啦</view>
  200. <view class="hintText margin-top-sm text-gray">现在店铺已经打烊了,营业时间</view>
  201. <view class="margin-top-xs text-gray margin-bottom">{{ shopDet.businessHours }}-{{ shopDet.lockHours }}</view>
  202. <view class="Btns" @click="goBack()">知道了</view>
  203. </view>
  204. </view>
  205. <u-popup
  206. v-model="show"
  207. mode="center"
  208. :closeable="true"
  209. close-icon-pos="top-right"
  210. close-icon="close-circle"
  211. close-icon-size="50"
  212. border-radius="20"
  213. width="80%"
  214. @close="close"
  215. >
  216. <view class="padding bg-gray">
  217. <view class="text-center text-lg text-bold margin-bottom-sm">可用优惠券</view>
  218. <scroll-view scroll-y="true" style="height: 600rpx" v-if="couponList.length > 0">
  219. <view
  220. class="flex justify-between align-center radius margin-tb-sm padding-sm bg-white"
  221. v-for="(item, index) in couponList"
  222. :key="index"
  223. @click="selCoupon(item)"
  224. >
  225. <view>
  226. <view>{{ item.couponName }}</view>
  227. <view>
  228. {{ item.shopId == 0 ? '平台优惠券' : '商家优惠券' }}
  229. </view>
  230. <view>有效期至{{ item.expirationTime }}</view>
  231. </view>
  232. <view class="text-sm text-bold">
  233. ¥
  234. <text class="text-lg">{{ item.money }}</text>
  235. </view>
  236. </view>
  237. </scroll-view>
  238. <view v-if="couponList.length == 0" style="height: 100rpx; line-height: 100rpx; text-align: center; font-weight: 700">暂无可用优惠券</view>
  239. </view>
  240. </u-popup>
  241. <!-- 选择优惠活动 -->
  242. <u-popup
  243. v-model="youhui"
  244. mode="center"
  245. :closeable="true"
  246. close-icon-pos="top-right"
  247. close-icon="close-circle"
  248. close-icon-size="50"
  249. border-radius="20"
  250. width="80%"
  251. @close="closeYouhui()"
  252. >
  253. <view class="padding bg-gray">
  254. <view class="text-center text-lg text-bold margin-bottom-sm">可用优惠活动</view>
  255. <scroll-view scroll-y="true" style="height: 600rpx" v-if="huoList.length > 0">
  256. <view class="flex justify-between align-center radius margin-tb-sm padding-sm bg-white" v-for="(item, index) in huoList" :key="index" @click="selctHuo(item)">
  257. <view>
  258. <view>{{ item.activityTitle }}</view>
  259. <view>有效期至{{ item.activityEndTime }}</view>
  260. </view>
  261. <!-- <view class="text-sm text-bold">
  262. ¥
  263. <text class="text-lg" v-if="item.activityType=='2'">{{ item.money }}</text>
  264. <text class="text-lg" v-if="item.activityType=='2'">{{ item.money }}</text>
  265. <text class="text-lg" v-if="item.activityType=='4'">全场打{{ item.discountAmount }}折</text>
  266. </view> -->
  267. </view>
  268. </scroll-view>
  269. <view v-if="huoList.length == 0" style="height: 100rpx; line-height: 100rpx; text-align: center; font-weight: 700">暂无可用优惠活动</view>
  270. </view>
  271. </u-popup>
  272. </view>
  273. </template>
  274. <script>
  275. /**
  276. * 获取任意时间
  277. */
  278. function getDate(date, AddDayCount = 0) {
  279. if (!date) {
  280. date = new Date()
  281. }
  282. if (typeof date !== 'object') {
  283. date = date.replace(/-/g, '/')
  284. }
  285. const dd = new Date(date)
  286. dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
  287. var a = new Array('日', '一', '二', '三', '四', '五', '六')
  288. var week = new Date().getDay()
  289. var week2 = new Date().getDay() + 1
  290. const y = dd.getFullYear()
  291. const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
  292. const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
  293. const h = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
  294. const f = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
  295. const s = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
  296. return {
  297. fullDate: y + '-' + m + '-' + d,
  298. fullDate2: y + '-' + m + '-' + d + ' ' + h + ':' + f + ':' + s,
  299. fullTime: m + '月' + d + '日',
  300. year: y,
  301. month: m,
  302. date: d,
  303. day: dd.getDay(),
  304. sWeek: '周' + a[week],
  305. eWeek: '周' + a[week2]
  306. }
  307. }
  308. import { throttle } from '@/utils/throttle.js'
  309. export default {
  310. data() {
  311. return {
  312. userMoney: 0,
  313. shopDet: '',
  314. isThrottle: true, //防抖,待支付结果返回后继续
  315. storeCommodityId: 0,
  316. openLists: [],
  317. openWay: 2,
  318. orderId: '',
  319. page: 1,
  320. limit: 100,
  321. dataList: [],
  322. packMoney: 0, //打包费
  323. totalPrice: 0,
  324. totalPrice1: 0,
  325. address: {
  326. insideDeliveryFee: 0
  327. }, //地址
  328. addressId: '',
  329. parentId: '',
  330. shopId: '',
  331. show: false,
  332. youhui: false, //优惠活动
  333. coupon: '', //选择的优惠券信息
  334. huodong: '', //选择的活动信息
  335. couponList: [],
  336. huoList: [], //可用活动
  337. orderType: 2,
  338. paotuiMoney: 0,
  339. dabaoMoney: 0,
  340. goodsMoney: null,
  341. distance: 0,
  342. isTrue: false,
  343. goodsList: [],
  344. XCXIsSelect: '是',
  345. remark: '',
  346. GoodsorderId: '',
  347. ifPaotui: 0, //是否满减
  348. lng: '',
  349. lat: '',
  350. data: {
  351. multiArray: [],
  352. warning: '',
  353. startDate: '请选择'
  354. },
  355. workStart: '', //骑手上班时间
  356. workStartMin: '', //上班分钟
  357. workEnd: '', //骑手下班时间
  358. yusongTime: '', //骑手预计送达时长
  359. reservationFlag: 0, //是否预约单 1是、0否
  360. expectDeliveryTime: '', //预约送达时间
  361. timer: '', //定时器
  362. autoSendOrder: 0, //autoSendOrder为1商家自配,0平台配送
  363. reservationOpenFlag: 0, //1预约,0不预约
  364. status: null,
  365. showReach: null,
  366. // 基础实付满多少
  367. ruleAmount1: 0,
  368. // 基础实付满多少送的积分
  369. ruleValue1: 0,
  370. // 超过多少
  371. ruleMaxAmount: 0,
  372. // 第二阶段实付满多少
  373. ruleAmount2: 0,
  374. // 第二阶段实付满多少送的积分
  375. ruleValue2: 0,
  376. // 每笔订单获取的积分上限
  377. maxIntegral: 0,
  378. // 可获得积分
  379. intergral: 0,
  380. // 是否显示积分模块
  381. isIntegral: false,
  382. shopTypeName: '', //店铺类型
  383. idcard1: '' //身份证号
  384. }
  385. },
  386. onLoad(option) {
  387. console.log(option, '256')
  388. this.shopTypeName = option.shopTypeName
  389. if (option.showReach) {
  390. this.showReach = option.showReach
  391. }
  392. // #ifdef APP
  393. this.openLists = [
  394. {
  395. image: '../../../static/images/my/weixin.png',
  396. text: '微信',
  397. id: 2
  398. }
  399. // {
  400. // image: '../../../static/images/my/zhifubao.png',
  401. // text: '支付宝',
  402. // id: 3
  403. // },
  404. // {
  405. // image: '../../../static/images/my/jinbi.png',
  406. // text: '零钱',
  407. // id: 1
  408. // }
  409. ]
  410. // #endif
  411. // #ifdef MP-WEIXIN
  412. this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是'
  413. this.openLists = [
  414. {
  415. image: '../../../static/images/my/weixin.png',
  416. text: '微信',
  417. id: 2
  418. }
  419. // {
  420. // image: '../../../static/images/my/jinbi.png',
  421. // text: '零钱',
  422. // id: 1
  423. // }
  424. ]
  425. // #endif
  426. // #ifdef H5
  427. this.openLists = [
  428. {
  429. image: '../../../static/images/my/weixin.png',
  430. text: '微信',
  431. id: 2
  432. }
  433. // {
  434. // image: '../../../static/images/my/zhifubao.png',
  435. // text: '支付宝',
  436. // id: 3
  437. // },
  438. // {
  439. // image: '../../../static/images/my/jinbi.png',
  440. // text: '零钱',
  441. // id: 1
  442. // }
  443. ]
  444. // #endif
  445. this.shopId = option.shopId
  446. if (option.shopTypeName == '三大运营商') {
  447. this.orderType = 1
  448. } else {
  449. this.orderType = option.orderType
  450. }
  451. if (option.orderId) {
  452. this.orderId = option.orderId
  453. }
  454. if (option.status) {
  455. this.status = option.status
  456. }
  457. // #ifndef H5
  458. uni.getLocation({
  459. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  460. success: function (res) {
  461. this.lat = res.latitude
  462. this.lng = res.longitude
  463. }
  464. })
  465. this.getShopDet(this.shopId)
  466. // #endif
  467. // #ifdef H5
  468. uni.getLocation({
  469. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  470. success: function (res) {
  471. this.lat = res.latitude
  472. this.lng = res.longitude
  473. }
  474. })
  475. this.getShopDet(this.shopId)
  476. // #endif
  477. uni.showLoading({
  478. title: '加载中...',
  479. mask: true // 是否显示透明蒙层,防止触摸穿透
  480. })
  481. // this.getOrderList();
  482. this.getAddressList()
  483. },
  484. onUnload() {
  485. // 页面销毁时清除定时器
  486. if (this.timer) {
  487. clearInterval(this.timer)
  488. }
  489. },
  490. onShow() {
  491. this.getMsgData()
  492. console.log(uni.getStorageSync('addressId'), '地址id')
  493. this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
  494. if (this.addressId) {
  495. console.log(this.addressId, '地址id')
  496. this.address = {}
  497. this.getAddressDet(this.addressId)
  498. }
  499. // 设置定时器
  500. this.timer = setInterval(() => {
  501. // 定时器执行的操作
  502. // this.getQishou()
  503. console.log('每分钟执行一次')
  504. // 这里可以放置你需要每分钟执行的代码
  505. this.getCouponList()
  506. this.getHuoList()
  507. }, 60 * 1000) // 60 * 1000 毫秒代表一分钟
  508. },
  509. watch: {
  510. totalPrice1() {
  511. this.getIntegralRules()
  512. }
  513. },
  514. methods: {
  515. getIntegralRules() {
  516. let data = {
  517. money: this.totalPrice1
  518. }
  519. this.$Request.get('/app/userintegral/getIntegralByMoney', data).then((res) => {
  520. console.log(res, '999')
  521. if (res.code == 0) {
  522. this.intergral = res.data.intergral
  523. this.maxIntegral = res.data.maxIntegral
  524. this.ruleAmount1 = res.data.ruleAmount1
  525. this.ruleAmount2 = res.data.ruleAmount2
  526. this.ruleMaxAmount = res.data.ruleMaxAmount
  527. this.ruleValue1 = res.data.ruleValue1
  528. this.ruleValue2 = res.data.ruleValue2
  529. if (res.data.flag == 1) {
  530. this.isIntegral = true
  531. } else {
  532. this.isIntegral = false
  533. }
  534. }
  535. })
  536. },
  537. //获取骑手上下班时间
  538. getQishou() {
  539. this.$Request.get('/app/tbindent/work-time').then((res) => {
  540. console.log(res, 'p')
  541. if (res.code == 0 && res.data) {
  542. if (this.orderType == 2) {
  543. if (this.autoSendOrder == 0) {
  544. //0是平台配
  545. this.workStart = parseInt(res.data.workingHoursOfRider.substring(0, 2))
  546. this.workStartMin = parseInt(res.data.workingHoursOfRider.substring(3, 5))
  547. this.workEnd = parseInt(res.data.workingHoursOfRider.substring(6, 8))
  548. } else if (this.autoSendOrder == 1) {
  549. this.workStart = parseInt(this.shopDet.businessHours.substring(0, 2))
  550. this.workStartMin = parseInt(this.shopDet.businessHours.substring(3, 5))
  551. this.workEnd = parseInt(this.shopDet.lockHours.substring(0, 2))
  552. }
  553. } else if (this.orderType == 1) {
  554. this.workStart = parseInt(this.shopDet.businessHours.substring(0, 2))
  555. this.workStartMin = parseInt(this.shopDet.businessHours.substring(3, 5))
  556. this.workEnd = parseInt(this.shopDet.lockHours.substring(0, 2))
  557. }
  558. this.yusongTime = res.data.timeOfRider
  559. var date = new Date()
  560. var currentHours = date.getHours()
  561. var currentMinute = date.getMinutes()
  562. var temp = []
  563. // currentHours = 12;
  564. var temp_time = []
  565. //如果当前时间大于20点
  566. var minite = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  567. if (parseInt(this.yusongTime / 60) == 0) {
  568. var h1 = 0
  569. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  570. } else {
  571. var h1 = parseInt(this.yusongTime / 60)
  572. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  573. }
  574. var acc = currentHours + h1
  575. var bcc = currentMinute + h2
  576. var teshu = this.workStart + h1
  577. if (bcc >= 60) {
  578. var b = bcc - 60
  579. var a = acc + 1
  580. } else {
  581. var b = bcc
  582. var a = acc
  583. }
  584. var a1 = a + 1
  585. var s1 = a.toString()
  586. var s2 = a1.toString()
  587. var e1 = b.toString()
  588. console.log(this.workEnd, h1, currentHours, 'o')
  589. var cc = (this.workStartMin + h2).toString()
  590. if (currentHours >= this.workEnd - h1) {
  591. var time2 = teshu + 1
  592. // this.data.warning = '当前时间段无骑手配送,现在下单,最早将于明日'+teshu + ':00'+'送达'
  593. uni.showModal({
  594. title: '提示',
  595. content: '当前时间段无骑手配送,现在下单,最早将于明日' + teshu + ':00' + '送达',
  596. success: function (res) {
  597. if (res.confirm) {
  598. } else if (res.cancel) {
  599. }
  600. }
  601. })
  602. // this.data.startDate = '明日 | '+teshu + ':00' + '-' + time2 + ':00'
  603. // this.data.startDate = '明早 | '+a + ':'+b + '-' + a1 + ':'+b
  604. temp[0] = ['明天']
  605. temp[1] = []
  606. // console.log(teshu,'明1',this.workEnd-h1)
  607. for (let i = teshu; i < this.workEnd - h1; ) {
  608. var i1 = i + 1
  609. var ss1 = i.toString()
  610. var ss2 = i1.toString()
  611. // console.log(ss1,'明')
  612. temp[1].push(ss1.padStart(2, 0) + ':' + cc.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + cc.padStart(2, 0))
  613. i += 1
  614. }
  615. } else if (currentHours < this.workStart) {
  616. var time2 = teshu + 1
  617. uni.showModal({
  618. title: '提示',
  619. content: '当前时间段无骑手配送,现在下单,最早将于今日' + teshu + ':00' + '送达',
  620. success: function (res) {
  621. if (res.confirm) {
  622. } else if (res.cancel) {
  623. }
  624. }
  625. })
  626. temp[0] = ['今天', '明天']
  627. temp[1] = []
  628. for (let i = teshu; i < this.workEnd - h1; ) {
  629. var i1 = i + 1
  630. var ss1 = i.toString()
  631. var ss2 = i1.toString()
  632. temp[1].push(ss1.padStart(2, 0) + ':' + cc.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + cc.padStart(2, 0))
  633. i += 1
  634. }
  635. } else {
  636. temp[0] = ['今天', '明天']
  637. temp[1] = []
  638. for (let i = a; i < this.workEnd - h1; ) {
  639. var i1 = i + 1
  640. var ss1 = i.toString()
  641. var ss2 = i1.toString()
  642. temp[1].push(ss1.padStart(2, 0) + ':' + e1.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + e1.padStart(2, 0))
  643. i += 1
  644. }
  645. }
  646. // this.$queue.setData({
  647. // multiArray:temp,
  648. // })
  649. this.data.multiArray = temp
  650. if (this.data.warning != '') {
  651. wx.showToast({
  652. title: this.data.warning,
  653. icon: 'none',
  654. duration: 3000
  655. })
  656. }
  657. }
  658. })
  659. },
  660. bindMultiPickerColumnChange: function (e) {
  661. console.log(e)
  662. console.log('第几列发生变化', e.detail.column)
  663. console.log('选择第几个', e.detail.value)
  664. let c = e.detail.column
  665. let v = e.detail.value
  666. var time = []
  667. var date = new Date()
  668. var currentHours = date.getHours()
  669. var currentMinute = date.getMinutes()
  670. var minite = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  671. if (parseInt(this.yusongTime / 60) == 0) {
  672. var h1 = 0
  673. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  674. } else {
  675. var h1 = parseInt(this.yusongTime / 60)
  676. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  677. }
  678. var acc = currentHours + h1
  679. var bcc = currentMinute + h2
  680. var teshu = this.workStart + h1
  681. if (bcc >= 60) {
  682. var b = bcc - 60
  683. var a = acc + 1
  684. } else {
  685. var b = bcc
  686. var a = acc
  687. }
  688. var a1 = a + 1
  689. var s1 = a.toString()
  690. var s2 = a1.toString()
  691. var e1 = b.toString()
  692. var cc = (this.workStartMin + h2).toString()
  693. // console.log(this.workStartMin,h2,'kkk')
  694. var temp = this.data.multiArray
  695. // currentHours = 12;
  696. if (c == 0) {
  697. if (temp[c][v] == '今天') {
  698. temp[1] = []
  699. for (let i = a; i < this.workEnd - h1; ) {
  700. var i1 = i + 1
  701. var ss1 = i.toString()
  702. var ss2 = i1.toString()
  703. temp[1].push(ss1.padStart(2, 0) + ':' + e1.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + e1.padStart(2, 0))
  704. i += 1
  705. }
  706. } else {
  707. temp[1] = []
  708. for (let i = teshu; i < this.workEnd - h1; ) {
  709. var i1 = i + 1
  710. var ss1 = i.toString()
  711. var ss2 = i1.toString()
  712. temp[1].push(ss1.padStart(2, 0) + ':' + cc.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + cc.padStart(2, 0))
  713. i += 1
  714. }
  715. }
  716. // this.$queue.setData({
  717. // multiArray:temp
  718. // })
  719. this.data.multiArray = temp
  720. this.$forceUpdate()
  721. }
  722. },
  723. bindStartMultiPickerChange: function (e) {
  724. let temp = this.data.multiArray
  725. // this.$queue.setData({
  726. // startDate:temp[0][e.detail.value[0]]+' | '+temp[1][e.detail.value[1]]
  727. // })
  728. this.data.startDate = temp[0][e.detail.value[0]] + ' | ' + temp[1][e.detail.value[1]]
  729. console.log(temp[0][e.detail.value[0]], temp[1][e.detail.value[1]].substring(0, 5), getDate(new Date(), 2).fullDate)
  730. if (this.data.startDate) {
  731. this.reservationFlag = 1
  732. if (temp[0][e.detail.value[0]] == '今天') {
  733. var date = getDate(new Date()).fullDate
  734. this.expectDeliveryTime = date + ' ' + temp[1][e.detail.value[1]].substring(0, 5) + ':00'
  735. } else if (temp[0][e.detail.value[0]] == '明天') {
  736. var date = getDate(new Date(), 1).fullDate
  737. this.expectDeliveryTime = date + ' ' + temp[1][e.detail.value[1]].substring(0, 5) + ':00'
  738. } else if (temp[0][e.detail.value[0]] == '后天') {
  739. var date = getDate(new Date(), 2).fullDate
  740. this.expectDeliveryTime = date + ' ' + temp[1][e.detail.value[1]].substring(0, 5) + ':00'
  741. }
  742. }
  743. },
  744. goCash() {
  745. uni.navigateTo({
  746. url: '/my/wallet/index'
  747. })
  748. },
  749. getMsgData() {
  750. this.$Request.get('/app/userintegral/findUserMessage').then((res) => {
  751. if (res.code == 0 && res.data) {
  752. this.userMoney = res.data.userMoney ? res.data.userMoney : 0
  753. }
  754. })
  755. },
  756. //获取店铺详情
  757. getShopDet(shopId) {
  758. let data = {
  759. shopId,
  760. lng: this.lng,
  761. lat: this.lat
  762. }
  763. this.$Request.get('/app/goods/selectGoodsList', data).then((res) => {
  764. console.log(res, 'data')
  765. if (res.code == 0 && res.data) {
  766. this.reservationOpenFlag = res.data.goodsShop.reservationOpenFlag
  767. this.autoSendOrder = res.data.goodsShop.autoSendOrder
  768. this.shopDet = res.data.goodsShop
  769. this.ifPaotui = res.data.goodsShop.enableFullReductionFlag
  770. this.getOrderList()
  771. // this.getQishou()
  772. }
  773. })
  774. },
  775. goBack() {
  776. uni.navigateBack({})
  777. },
  778. isShow() {
  779. this.show = true
  780. },
  781. //选择优惠活动弹框
  782. huodongShow() {
  783. this.youhui = true
  784. },
  785. getDistance() {
  786. if (this.address.lng && this.dataList.shopLng) {
  787. let data = {
  788. ol: this.address.lng,
  789. od: this.address.lat,
  790. dl: this.dataList.shopLng,
  791. dd: this.dataList.shopLat
  792. }
  793. this.$Request.post('/app/tbindent/distance', data).then((res) => {
  794. if (res.code == 0) {
  795. this.distance = res.data
  796. if (this.distance > Number(this.dataList.distributionDistance)) {
  797. this.isTrue = true
  798. } else {
  799. this.isTrue = false
  800. }
  801. }
  802. })
  803. }
  804. },
  805. close() {
  806. this.show = false
  807. },
  808. closeYouhui() {
  809. this.youhui = false
  810. },
  811. switchTab(e) {
  812. this.orderType = e
  813. this.coupon = ''
  814. // this.huodong = ''
  815. if (JSON.stringify(this.address) != '{}') {
  816. this.getDistance()
  817. }
  818. if (this.orderType == 2) {
  819. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + this.address.insideDeliveryFee).toFixed(2)
  820. } else {
  821. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  822. }
  823. if (this.coupon) {
  824. let totalMoney = parseFloat(
  825. this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
  826. )
  827. if (totalMoney <= 0) {
  828. this.totalPrice1 = 0.01
  829. } else {
  830. this.totalPrice1 = totalMoney
  831. }
  832. }
  833. if (this.huodong) {
  834. let totalMoney = parseFloat(
  835. this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
  836. )
  837. if (totalMoney <= 0) {
  838. this.totalPrice1 = 0.01
  839. } else {
  840. this.totalPrice1 = totalMoney
  841. }
  842. }
  843. },
  844. // 删除优惠券
  845. detCoupon() {
  846. let data = {
  847. orderId: this.dataList.orderId
  848. }
  849. this.$Request.post('/app/order/deleteCouponByOrderId', data).then((res) => {
  850. if (res.code == 0) {
  851. }
  852. })
  853. },
  854. // 选择优惠券
  855. selCoupon(item) {
  856. this.coupon = item
  857. if (this.orderType == 2) {
  858. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  859. } else {
  860. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  861. }
  862. let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)).toFixed(2)
  863. if (totalMoney <= 0) {
  864. this.totalPrice1 = 0.01
  865. } else {
  866. this.totalPrice1 = totalMoney
  867. }
  868. let data = {
  869. parentId: this.dataList.parentId,
  870. couponId: this.coupon ? this.coupon.id : ''
  871. }
  872. this.$Request.post('/app/order/employCoupon', data).then((res) => {
  873. if (res.code == 0) {
  874. this.show = false
  875. }
  876. })
  877. },
  878. //选择活动activityId
  879. selctHuo(item) {
  880. this.huodong = item
  881. if (this.orderType == 2) {
  882. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  883. } else {
  884. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  885. }
  886. let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)).toFixed(2)
  887. if (totalMoney <= 0) {
  888. this.totalPrice1 = 0.01
  889. } else {
  890. this.totalPrice1 = totalMoney
  891. }
  892. this.youhui = false
  893. },
  894. // 优惠卷列表
  895. getCouponList() {
  896. // console.log(this.paotuiMoney)
  897. // console.log(this.dabaoMoney, '123123')
  898. let minMoney =
  899. this.orderType == 2
  900. ? parseFloat(parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney)).toFixed(2)
  901. : parseFloat(this.totalPrice).toFixed(2)
  902. let data = {
  903. shopId: this.dataList.shopId,
  904. page: 1,
  905. limit: 10,
  906. minMoney: minMoney
  907. }
  908. this.$Request.get('/app/coupon/selectUserCouponList', data).then((res) => {
  909. if (res.code == 0) {
  910. this.couponList = res.data.list
  911. console.log(this.couponList, 'this.couponList', this.coupon)
  912. if (this.coupon) {
  913. let activityExists = this.couponList.some((item) => item.couponId === this.coupon.couponId)
  914. if (!activityExists) {
  915. this.coupon = ''
  916. if (this.orderType == 2) {
  917. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  918. } else {
  919. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  920. }
  921. let totalMoney = parseFloat(
  922. this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
  923. ).toFixed(2)
  924. if (totalMoney <= 0) {
  925. this.totalPrice1 = 0.01
  926. } else {
  927. this.totalPrice1 = totalMoney
  928. }
  929. uni.showModal({
  930. title: '提示',
  931. content: '当前选择的优惠券已过期,请重新选择',
  932. success: function (res) {
  933. if (res.confirm) {
  934. this.coupon = ''
  935. } else if (res.cancel) {
  936. this.coupon = ''
  937. }
  938. }
  939. })
  940. }
  941. }
  942. }
  943. })
  944. },
  945. // 优惠活动列表
  946. getHuoList() {
  947. let data = {
  948. orderId: this.dataList.orderId
  949. }
  950. this.$Request.get(`/app/activity/suit-activity/${this.dataList.orderId}`, data).then((res) => {
  951. if (res.code == 0) {
  952. this.huoList = res.data
  953. // console.log(this.huodong)
  954. if (this.huodong) {
  955. // console.log(this.huodong,'有呢')
  956. let activityExists = this.huoList.some((item) => item.activityId === this.huodong.activityId)
  957. if (!activityExists) {
  958. this.huodong = ''
  959. if (this.orderType == 2) {
  960. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  961. } else {
  962. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  963. }
  964. let totalMoney = parseFloat(
  965. this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
  966. ).toFixed(2)
  967. if (totalMoney <= 0) {
  968. this.totalPrice1 = 0.01
  969. } else {
  970. this.totalPrice1 = totalMoney
  971. }
  972. uni.showModal({
  973. title: '提示',
  974. content: '当前选择的优惠活动已过期,请重新选择',
  975. success: function (res) {
  976. if (res.confirm) {
  977. this.huodong = ''
  978. } else if (res.cancel) {
  979. this.huodong = ''
  980. }
  981. }
  982. })
  983. }
  984. }
  985. // 匹配出最优惠的活动
  986. if (this.huoList.length) {
  987. this.huodong = this.huoList.reduce((prev, current) => (prev.discountAmount > current.discountAmount ? prev : current))
  988. this.selctHuo(this.huodong)
  989. }
  990. // for(var i=0;i<this.huoList.length;i++){
  991. // if(this.huodong!=''&&this.huodong.activityId!=this.huoList[i].activityId){
  992. // console.log('优惠活动过期')
  993. // }
  994. // }
  995. // if(this.huoList.length==0){
  996. // this.huodong=''
  997. // }
  998. }
  999. })
  1000. },
  1001. //拼单支付成功取消订单
  1002. cancelPinDan() {
  1003. let that = this
  1004. // if (that.orderId) {
  1005. // let data = {
  1006. // orderId: that.orderId
  1007. // };
  1008. // that.$Request.post('/app/order/deleteOrder', data).then(res => {
  1009. // if (res.code == 0) {
  1010. // uni.removeStorageSync('orderId');
  1011. // }
  1012. // });
  1013. // }
  1014. },
  1015. // 商品列表
  1016. getOrderList() {
  1017. // 显示加载提示
  1018. uni.showLoading({
  1019. title: '加载中', // 加载提示文本
  1020. mask: true // 是否显示透明蒙层,防止触摸穿透
  1021. })
  1022. this.paotuiMoney = 0
  1023. this.totalPrice1 = 0
  1024. if (this.status == 0) {
  1025. console.log(6666)
  1026. this.payContinue()
  1027. return
  1028. }
  1029. let data = {
  1030. shopId: this.shopId,
  1031. status: 1,
  1032. page: 1,
  1033. limit: 1000
  1034. // orderType: this.orderType
  1035. }
  1036. // console.log(data)
  1037. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  1038. // console.log(res)
  1039. uni.hideLoading()
  1040. if (res.code == 0 && res.data.pageUtils.list.length) {
  1041. this.GoodsorderId = res.data.pageUtils.list[0].orderId
  1042. this.dataList = res.data.pageUtils.list[0]
  1043. if (this.dataList && this.dataList.orderGoodsList && this.dataList.orderGoodsList[0]) {
  1044. this.dataList.orderGoodsList[0].forEach((res) => {
  1045. res.goodsPicture = res.goodsPicture.split(',')
  1046. this.dabaoMoney += res.goodsPack * res.goodsNum
  1047. this.goodsMoney += res.goodsPrice * res.goodsNum
  1048. this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney)
  1049. })
  1050. this.goodsList = this.dataList.orderGoodsList[0]
  1051. }
  1052. console.log(this.dataList, this.dabaoMoney, 'kkklll')
  1053. if (this.ifPaotui == 1) {
  1054. this.paotuiMoney = this.dataList.errandMoney
  1055. } else if (this.ifPaotui == 0) {
  1056. // 判断商品金额是否大于最低减免配送费金额
  1057. console.log(this.goodsMoney, '商品总金额', res, this.dataList.exemptMinMoney)
  1058. if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
  1059. this.paotuiMoney = 0
  1060. } else {
  1061. this.paotuiMoney = this.dataList.errandMoney
  1062. }
  1063. }
  1064. this.totalPrice = res.data.money
  1065. if (this.orderType == 2) {
  1066. this.totalPrice1 = parseFloat(
  1067. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + this.address.insideDeliveryFee
  1068. ).toFixed(2)
  1069. } else {
  1070. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  1071. }
  1072. // console.log(this.dataList)
  1073. this.getCouponList()
  1074. this.getHuoList()
  1075. this.detCoupon()
  1076. this.getDistance()
  1077. }
  1078. // 加载提示关闭
  1079. uni.hideLoading()
  1080. })
  1081. },
  1082. payContinue() {
  1083. let data = {
  1084. orderId: this.orderId,
  1085. page: 1,
  1086. limit: 1000
  1087. }
  1088. console.log(data)
  1089. this.$Request.get('/app/order/selectOrder', data).then((res) => {
  1090. console.log(res)
  1091. uni.hideLoading()
  1092. if (res.code == 0 && res.data.pageUtils.list.length) {
  1093. this.GoodsorderId = res.data.pageUtils.list[0].orderId
  1094. this.dataList = res.data.pageUtils.list[0]
  1095. if (this.dataList && this.dataList.orderGoodsList && this.dataList.orderGoodsList[0]) {
  1096. this.dataList.orderGoodsList[0].forEach((res) => {
  1097. res.goodsPicture = res.goodsPicture.split(',')
  1098. this.dabaoMoney += res.goodsPack * res.goodsNum
  1099. this.goodsMoney += res.goodsPrice * res.goodsNum
  1100. this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney)
  1101. })
  1102. this.goodsList = this.dataList.orderGoodsList[0]
  1103. }
  1104. console.log(this.dataList, this.dabaoMoney, 'kkklll')
  1105. if (this.ifPaotui == 1) {
  1106. this.paotuiMoney = this.dataList.errandMoney
  1107. } else if (this.ifPaotui == 0) {
  1108. // 判断商品金额是否大于最低减免配送费金额
  1109. console.log(this.goodsMoney, '商品总金额', res, this.dataList.exemptMinMoney)
  1110. if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
  1111. this.paotuiMoney = 0
  1112. } else {
  1113. this.paotuiMoney = this.dataList.errandMoney
  1114. }
  1115. }
  1116. this.totalPrice = res.data.money
  1117. if (this.orderType == 2) {
  1118. this.totalPrice1 = parseFloat(
  1119. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + this.address.insideDeliveryFee
  1120. ).toFixed(2)
  1121. } else {
  1122. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  1123. }
  1124. // console.log(this.dataList)
  1125. this.getCouponList()
  1126. this.getHuoList()
  1127. this.detCoupon()
  1128. this.getDistance()
  1129. }
  1130. // 加载提示关闭
  1131. uni.hideLoading()
  1132. })
  1133. },
  1134. selectWay(item) {
  1135. this.openWay = item.id
  1136. },
  1137. takeReark() {
  1138. let datas = {
  1139. orderId: this.GoodsorderId,
  1140. remark: this.remark
  1141. }
  1142. this.$Request.post('/app/order/updateOrdersRemark', datas).then((res) => {
  1143. if (res.code == 0) {
  1144. } else {
  1145. uni.showToast({
  1146. title: res.msg,
  1147. icon: 'none'
  1148. })
  1149. }
  1150. })
  1151. },
  1152. toSettlement_throttle: throttle(function () {
  1153. this.toSettlement()
  1154. }, 1000),
  1155. // 立即结算
  1156. toSettlement() {
  1157. if (this.isThrottle == false) {
  1158. return
  1159. }
  1160. let that = this
  1161. if (this.isTrue && this.orderType == 2) {
  1162. uni.showToast({
  1163. title: '超出配送范围',
  1164. icon: 'none'
  1165. })
  1166. reutrn
  1167. }
  1168. if (this.orderType == 2 && !this.address.addressId) {
  1169. uni.showToast({
  1170. title: '请选择收货地址',
  1171. icon: 'none'
  1172. })
  1173. return
  1174. }
  1175. if (this.remark) {
  1176. this.takeReark()
  1177. }
  1178. uni.showLoading({
  1179. title: '支付中...',
  1180. mask: true // 是否显示透明蒙层,防止触摸穿透
  1181. })
  1182. this.isThrottle = false
  1183. if (this.openWay == 1) {
  1184. //零钱支付
  1185. let data = {
  1186. userId: uni.getStorageSync('userId'),
  1187. type: 1, //支付方式 1表示微信支付、4或5表示支付宝支付
  1188. activityId: this.huodong ? this.huodong.activityId : '',
  1189. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1190. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1191. parentId: this.dataList.parentId,
  1192. couponId: this.coupon ? this.coupon.id : '',
  1193. addressId: this.address.addressId ? this.address.addressId : '',
  1194. orderType: this.orderType
  1195. }
  1196. console.log(data, 'l')
  1197. this.$Request.post('/app/wxPay/balanceOrder', data).then((res) => {
  1198. console.log(res, '结果')
  1199. if (res.code == 0) {
  1200. uni.hideLoading()
  1201. that.$queue.showToast('支付成功')
  1202. that.cancelPinDan()
  1203. setTimeout(function () {
  1204. that.isThrottle = true
  1205. uni.switchTab({
  1206. url: '/pages/order/index'
  1207. })
  1208. }, 1000)
  1209. } else {
  1210. that.$queue.showToast(res.msg)
  1211. that.isThrottle = true
  1212. }
  1213. })
  1214. } else if (this.openWay == 2) {
  1215. //微信支付
  1216. // #ifdef H5
  1217. let data = {
  1218. userId: uni.getStorageSync('userId'),
  1219. type: 1, //支付方式 1表示微信支付、4或5表示支付宝支付
  1220. activityId: this.huodong ? this.huodong.activityId : '',
  1221. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1222. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1223. parentId: this.dataList.parentId,
  1224. couponId: this.coupon ? this.coupon.id : '',
  1225. addressId: this.address.addressId ? this.address.addressId : '',
  1226. orderType: this.orderType,
  1227. type: 2
  1228. }
  1229. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1230. uni.hideLoading()
  1231. if (res.code == 0) {
  1232. this.callPay(res.data)
  1233. } else {
  1234. uni.showToast({
  1235. title: res.msg,
  1236. icon: 'none'
  1237. })
  1238. this.isThrottle = true
  1239. }
  1240. })
  1241. // #endif
  1242. // #ifdef MP-WEIXIN
  1243. this.$Request.get('/app/new-pay/enable-new-pay').then((res) => {
  1244. console.log(res, '987')
  1245. if (res.code == 0) {
  1246. let data = {
  1247. userId: uni.getStorageSync('userId'),
  1248. //支付方式 1表示微信支付、4或5表示支付宝支付
  1249. // type: 4,
  1250. activityId: this.huodong ? this.huodong.activityId : '',
  1251. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1252. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1253. parentId: this.dataList.parentId,
  1254. couponId: this.coupon ? this.coupon.id : '',
  1255. addressId: this.address.addressId ? this.address.addressId : '',
  1256. orderType: this.orderType,
  1257. type: res.enable ? 1 : 3,
  1258. idCard: this.idcard1
  1259. }
  1260. console.log(data)
  1261. if (res.enable) {
  1262. console.log('xin')
  1263. this.newPay(data)
  1264. } else {
  1265. console.log('jiu')
  1266. this.oldPay(data)
  1267. }
  1268. }
  1269. })
  1270. // #endif
  1271. // #ifdef APP
  1272. let data = {
  1273. type: 1,
  1274. parentId: this.dataList.parentId,
  1275. couponId: this.coupon ? this.coupon.id : '',
  1276. addressId: this.address.addressId ? this.address.addressId : '',
  1277. orderType: this.orderType
  1278. }
  1279. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1280. console.log(res)
  1281. this.showpay = false
  1282. if (res.code == 0) {
  1283. this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data))
  1284. } else {
  1285. that.isThrottle = true
  1286. }
  1287. })
  1288. // #endif
  1289. } else if (this.openWay == 3) {
  1290. // #ifdef H5
  1291. let data = {
  1292. type: 5,
  1293. parentId: this.dataList.parentId,
  1294. couponId: this.coupon ? this.coupon.id : '',
  1295. addressId: this.address.addressId ? this.address.addressId : '',
  1296. orderType: this.orderType
  1297. }
  1298. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1299. this.showpay = false
  1300. this.isThrottle = true
  1301. const div = document.createElement('div')
  1302. div.innerHTML = res.data //此处form就是后台返回接收到的数据
  1303. document.body.appendChild(div)
  1304. document.forms[0].submit()
  1305. })
  1306. // #endif
  1307. // #ifdef APP
  1308. let data = {
  1309. type: 4,
  1310. parentId: this.dataList.parentId,
  1311. couponId: this.coupon ? this.coupon.id : '',
  1312. addressId: this.address.addressId ? this.address.addressId : '',
  1313. orderType: this.orderType
  1314. }
  1315. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1316. this.showpay = false
  1317. this.setPayment('alipay', res.data)
  1318. })
  1319. // #endif
  1320. }
  1321. },
  1322. newPay(data) {
  1323. this.$Request.get('/app/order/get-pay-param', data).then((res) => {
  1324. console.log(res, '新支付')
  1325. if (res.code == 0) {
  1326. uni.requestPayment({
  1327. provider: 'wxpay',
  1328. timeStamp: res.timeStamp,
  1329. nonceStr: res.nonceStr,
  1330. package: res.packageStr,
  1331. signType: res.signType,
  1332. paySign: res.paySign,
  1333. success: (suc) => {
  1334. this.cancelPinDan()
  1335. uni.hideLoading()
  1336. this.$queue.showToast('支付成功')
  1337. setTimeout(() => {
  1338. this.isThrottle = true
  1339. uni.switchTab({
  1340. url: '/pages/order/index'
  1341. })
  1342. }, 1000)
  1343. },
  1344. fail: (err) => {
  1345. console.log('fail:' + JSON.stringify(err))
  1346. this.isThrottle = true
  1347. uni.setStorageSync('isClear', true)
  1348. uni.showToast({
  1349. title: '支付失败',
  1350. icon: 'none',
  1351. mask: true
  1352. })
  1353. setTimeout(() => {
  1354. uni.reLaunch({
  1355. url: '/pages/order/index'
  1356. })
  1357. }, 1500)
  1358. }
  1359. })
  1360. } else {
  1361. uni.showToast({
  1362. title: res.msg,
  1363. icon: 'none'
  1364. })
  1365. this.isThrottle = true
  1366. }
  1367. })
  1368. },
  1369. oldPay(data) {
  1370. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1371. console.log(res, '旧支付')
  1372. // uni.hideLoading();
  1373. if (res.code == 0) {
  1374. uni.requestPayment({
  1375. provider: 'wxpay',
  1376. timeStamp: res.data.timestamp,
  1377. nonceStr: res.data.noncestr,
  1378. package: res.data.package,
  1379. signType: res.data.signType,
  1380. paySign: res.data.sign,
  1381. success: (suc) => {
  1382. this.cancelPinDan()
  1383. uni.hideLoading()
  1384. this.$queue.showToast('支付成功')
  1385. setTimeout(() => {
  1386. this.isThrottle = true
  1387. uni.switchTab({
  1388. url: '/pages/order/index'
  1389. })
  1390. }, 1000)
  1391. },
  1392. fail: (err) => {
  1393. console.log('fail:' + JSON.stringify(err))
  1394. this.isThrottle = true
  1395. uni.setStorageSync('isClear', true)
  1396. uni.showToast({
  1397. title: '支付失败',
  1398. icon: 'none',
  1399. mask: true
  1400. })
  1401. setTimeout(() => {
  1402. uni.reLaunch({
  1403. url: '/pages/order/index'
  1404. })
  1405. }, 1500)
  1406. }
  1407. })
  1408. } else {
  1409. uni.showToast({
  1410. title: res.msg,
  1411. icon: 'none'
  1412. })
  1413. this.isThrottle = true
  1414. }
  1415. })
  1416. },
  1417. callPay: function (response) {
  1418. if (typeof WeixinJSBridge === 'undefined') {
  1419. if (document.addEventListener) {
  1420. document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false)
  1421. } else if (document.attachEvent) {
  1422. document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response))
  1423. document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response))
  1424. }
  1425. } else {
  1426. this.onBridgeReady(response)
  1427. }
  1428. },
  1429. onBridgeReady: function (response) {
  1430. let that = this
  1431. if (!response.package) {
  1432. return
  1433. }
  1434. WeixinJSBridge.invoke(
  1435. 'getBrandWCPayRequest',
  1436. {
  1437. appId: response.appid, //公众号名称,由商户传入
  1438. timeStamp: response.timestamp, //时间戳,自1970年以来的秒数
  1439. nonceStr: response.noncestr, //随机串
  1440. package: response.package,
  1441. signType: response.signType, //微信签名方式:
  1442. paySign: response.sign //微信签名
  1443. },
  1444. function (res) {
  1445. if (res.err_msg === 'get_brand_wcpay_request:ok') {
  1446. // 使用以上方式判断前端返回,微信团队郑重提示:
  1447. //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
  1448. that.cancelPinDan()
  1449. that.$queue.showToast('支付成功')
  1450. setTimeout(function () {
  1451. uni.switchTab({
  1452. url: '/pages/order/index'
  1453. })
  1454. that.isThrottle = true
  1455. }, 1000)
  1456. } else {
  1457. uni.hideLoading()
  1458. that.isThrottle = true
  1459. }
  1460. WeixinJSBridge.log(response.err_msg)
  1461. }
  1462. )
  1463. },
  1464. isCheckPay(code, name, order) {
  1465. if (code == 0) {
  1466. console.log('999999999999')
  1467. this.setPayment(name, order)
  1468. } else {
  1469. uni.hideLoading()
  1470. uni.showToast({
  1471. title: '支付信息有误'
  1472. })
  1473. this.isThrottle = true
  1474. }
  1475. },
  1476. setPayment(name, order) {
  1477. let that = this
  1478. console.log(777777777, name, order)
  1479. uni.requestPayment({
  1480. provider: name,
  1481. orderInfo: order, //微信、支付宝订单数据
  1482. success: function (res) {
  1483. uni.hideLoading()
  1484. that.cancelPinDan()
  1485. uni.showLoading({
  1486. title: '支付成功',
  1487. icon: 'none'
  1488. })
  1489. setTimeout(function () {
  1490. that.isThrottle = true
  1491. uni.navigateBack()
  1492. }, 1000)
  1493. },
  1494. fail: function (err) {
  1495. uni.hideLoading()
  1496. that.isThrottle = true
  1497. },
  1498. complete() {
  1499. that.isThrottle = true
  1500. uni.hideLoading()
  1501. }
  1502. })
  1503. },
  1504. // 获取选择的地址
  1505. getAddressDet(e) {
  1506. let data = {
  1507. addressId: e
  1508. }
  1509. this.$Request.get('/app/address/selectAddressById', data).then((res) => {
  1510. if (res.code == 0) {
  1511. this.address = res.data
  1512. this.getInsideDeliveryFee(this.address.insideAddressId)
  1513. if (JSON.stringify(this.address) != '{}') {
  1514. this.getDistance()
  1515. }
  1516. uni.removeStorageSync('addressId')
  1517. }
  1518. })
  1519. },
  1520. // 获取地址列表
  1521. getAddressList() {
  1522. let that = this
  1523. let data = {
  1524. page: 1,
  1525. limit: 100
  1526. }
  1527. that.$Request.get('/app/address/selectAddressList', data).then((res) => {
  1528. if (res.code == 0) {
  1529. that.address = res.data.list[0] ? res.data.list[0] : {}
  1530. res.data.list.forEach((ret) => {
  1531. if (ret.addressDefault == 1) {
  1532. that.address = ret
  1533. }
  1534. })
  1535. // console.log(that.address, '我的地址列表460777')
  1536. this.getInsideDeliveryFee(this.address.insideAddressId)
  1537. if (JSON.stringify(this.address) != '{}') {
  1538. this.getDistance()
  1539. }
  1540. }
  1541. })
  1542. },
  1543. getInsideDeliveryFee(insideAddressId) {
  1544. this.$Request.get(`/app/inside-address/${insideAddressId}`).then((res) => {
  1545. // console.log(res, 987456)
  1546. if (res.code == 0) {
  1547. this.address.insideDeliveryFee = res.data.deliveryFee
  1548. }
  1549. })
  1550. },
  1551. goAddress() {
  1552. uni.navigateTo({
  1553. url: '/my/address/index?add=1'
  1554. })
  1555. },
  1556. // 点击调起地图查看位置
  1557. goMap() {
  1558. // let that = this
  1559. // let plugin = requirePlugin('routePlan');
  1560. // let key = 'A3RBZ-23MHW-PTPR5-RLCER-UJTXQ-JIF2G'; //使用在腾讯位置服务申请的key
  1561. // let referer = that.dataList.shopName; //调用插件的app的名称
  1562. // let endPoint = JSON.stringify({ //终点
  1563. // 'name': that.dataList.shopName,
  1564. // 'latitude': that.dataList.shopLat,
  1565. // 'longitude': that.dataList.shopLng,
  1566. // });
  1567. // wx.navigateTo({
  1568. // url: 'plugin://routePlan/index?key=' + key + '&referer=' + referer + '&endPoint=' + endPoint
  1569. // });
  1570. let that = this
  1571. let lati = parseFloat(that.dataList.shopLat)
  1572. let longi = parseFloat(that.dataList.shopLng)
  1573. uni.authorize({
  1574. scope: 'scope.userLocation',
  1575. success(res) {
  1576. uni.openLocation({
  1577. name: that.dataList.shopName,
  1578. latitude: lati,
  1579. longitude: longi,
  1580. success: function () {}
  1581. })
  1582. },
  1583. fail(err) {}
  1584. })
  1585. },
  1586. // 打电话
  1587. call() {
  1588. uni.makePhoneCall({
  1589. phoneNumber: this.dataList.shopPhone
  1590. })
  1591. }
  1592. }
  1593. }
  1594. </script>
  1595. <style scoped>
  1596. .hintPopul {
  1597. width: 100%;
  1598. height: 100vh;
  1599. position: fixed;
  1600. top: 0;
  1601. background: rgba(0, 0, 0, 0.4);
  1602. z-index: 999;
  1603. }
  1604. .content_ {
  1605. position: absolute;
  1606. left: 0;
  1607. right: 0;
  1608. top: 0;
  1609. bottom: 0;
  1610. margin: auto;
  1611. text-align: center;
  1612. width: 500rpx;
  1613. height: 400rpx;
  1614. border-radius: 20rpx;
  1615. background-color: #fff;
  1616. padding-top: 120rpx;
  1617. }
  1618. .content_ image {
  1619. position: absolute;
  1620. top: -50rpx;
  1621. left: 0;
  1622. right: 0;
  1623. margin: auto;
  1624. }
  1625. .hintText {
  1626. font-size: 30rpx;
  1627. }
  1628. .Btns {
  1629. width: 460rpx;
  1630. height: 60rpx;
  1631. line-height: 60rpx;
  1632. text-align: center;
  1633. background: #fcd202;
  1634. font-size: 28rpx;
  1635. border: 2rpx solid #fcd202;
  1636. color: #333333;
  1637. border-radius: 50rpx;
  1638. font-weight: 700;
  1639. margin: auto;
  1640. }
  1641. .goods_address {
  1642. width: 94%;
  1643. background: #ffffff;
  1644. height: 120rpx;
  1645. margin: 20rpx auto 0;
  1646. border-radius: 18rpx;
  1647. }
  1648. .address_box {
  1649. width: 90%;
  1650. margin: 0 auto;
  1651. height: 120rpx;
  1652. display: flex;
  1653. line-height: 120rpx;
  1654. }
  1655. .address_name {
  1656. flex: 1;
  1657. font-size: 30rpx;
  1658. }
  1659. .address_image {
  1660. /* flex: 1; */
  1661. display: flex;
  1662. justify-content: flex-end;
  1663. align-items: center;
  1664. }
  1665. .address_image image {
  1666. width: 25rpx;
  1667. height: 40rpx;
  1668. }
  1669. .songda_image image {
  1670. width: 20rpx;
  1671. height: 30rpx;
  1672. margin-left: 20rpx;
  1673. }
  1674. /* 地址 */
  1675. .address {
  1676. width: 88%;
  1677. margin: 3% auto;
  1678. padding: 3%;
  1679. display: flex;
  1680. background-color: #ffffff;
  1681. border-radius: 18rpx;
  1682. }
  1683. .adderss_le {
  1684. width: 90%;
  1685. line-height: 1.5;
  1686. }
  1687. .adderss_le_text {
  1688. font-size: 30rpx;
  1689. font-weight: bold;
  1690. color: #333333;
  1691. }
  1692. .adderss_le_text2 {
  1693. font-size: 24rpx;
  1694. font-weight: 500;
  1695. color: #999999;
  1696. display: flex;
  1697. }
  1698. .adderss_le_text2 view {
  1699. margin-left: 2%;
  1700. }
  1701. .adderss_le_text2 view:first-child {
  1702. margin-left: 0;
  1703. }
  1704. .adderss_ri {
  1705. width: 10%;
  1706. text-align: right;
  1707. line-height: 3;
  1708. }
  1709. .adderss_ri image {
  1710. width: 18rpx;
  1711. height: 30rpx;
  1712. }
  1713. /* 商品 */
  1714. .food {
  1715. width: 94%;
  1716. margin: 3% auto;
  1717. padding: 3%;
  1718. background-color: #ffffff;
  1719. border-radius: 18rpx;
  1720. }
  1721. .food_top {
  1722. display: flex;
  1723. justify-content: space-between;
  1724. align-items: center;
  1725. font-size: 32rpx;
  1726. font-weight: bold;
  1727. }
  1728. .food_bottom {
  1729. margin-top: 20rpx;
  1730. color: #666666;
  1731. font-size: 28rpx;
  1732. line-height: 45rpx;
  1733. }
  1734. .bottom_text {
  1735. color: #ea0018;
  1736. }
  1737. .tosend_header_food {
  1738. width: 100%;
  1739. display: flex;
  1740. margin-top: 3%;
  1741. }
  1742. .tosend_header_food_le {
  1743. width: 15%;
  1744. }
  1745. .tosend_header_food_le image {
  1746. width: 110rpx;
  1747. height: 110rpx;
  1748. border-radius: 10rpx;
  1749. }
  1750. .tosend_header_food_ce {
  1751. margin: 0 0 0 4%;
  1752. width: 57%;
  1753. }
  1754. .tosend_header_food_ri {
  1755. text-align: right;
  1756. width: 25%;
  1757. }
  1758. .tosend_header_food_text {
  1759. font-size: 34rpx;
  1760. font-weight: 500;
  1761. color: #333333;
  1762. line-height: 1.8;
  1763. }
  1764. .tosend_header_food_text text {
  1765. font-size: 25rpx;
  1766. }
  1767. .tosend_header_food_text2 {
  1768. font-size: 28rpx;
  1769. font-weight: 500;
  1770. color: #999999;
  1771. }
  1772. .do_top {
  1773. padding-top: 3%;
  1774. }
  1775. .do_bot {
  1776. padding-bottom: 3%;
  1777. border-bottom: 2rpx solid #e6e6e6;
  1778. }
  1779. .tosend_header_do {
  1780. width: 100%;
  1781. color: #333333;
  1782. font-size: 30rpx;
  1783. display: flex;
  1784. margin-top: 20rpx;
  1785. line-height: 1.5;
  1786. }
  1787. .tosend_header_do view {
  1788. /* flex: 1; */
  1789. }
  1790. .tosend_header_do_ri {
  1791. text-align: right;
  1792. }
  1793. .tosend_header_do_le2 {
  1794. font-family: PingFang SC;
  1795. font-weight: 500;
  1796. color: #999999;
  1797. padding-top: 1.5%;
  1798. }
  1799. .tosend_header_do_ri2 {
  1800. text-align: right;
  1801. color: #ea0000;
  1802. font-size: 40rpx;
  1803. }
  1804. .tosend_header_do_ri2 text {
  1805. font-size: 30rpx;
  1806. }
  1807. /* 支付 */
  1808. /* .payment_all{
  1809. width: 88%;margin: 3% auto;padding: 3%;background-color: #FFFFFF;
  1810. border-radius: 18rpx;
  1811. }
  1812. .payment{
  1813. width: 100%;display: flex;margin-top: 3%;
  1814. }
  1815. .payment_le{
  1816. width: 13%;
  1817. }
  1818. .payment_le image{
  1819. width: 60rpx;height: 60rpx;
  1820. }
  1821. .payment_ce{
  1822. width: 52%;
  1823. font-size: 30rpx;
  1824. font-weight: bold;
  1825. color: #333333;line-height: 60rpx;
  1826. }
  1827. .payment_ri{
  1828. width: 35%;text-align: right;line-height: 60rpx;
  1829. } */
  1830. /* 结算 */
  1831. .goorder {
  1832. width: 100%;
  1833. padding: 2% 3%;
  1834. position: fixed;
  1835. bottom: 0;
  1836. background-color: #ffffff;
  1837. z-index: 999;
  1838. }
  1839. .goorder_but {
  1840. width: 100%;
  1841. line-height: 3.5;
  1842. text-align: center;
  1843. background: #fcd202;
  1844. border-radius: 36rpx;
  1845. font-weight: 700;
  1846. }
  1847. .goorder_but_ {
  1848. opacity: 0.5;
  1849. }
  1850. .bg {
  1851. background-color: #ffffff;
  1852. }
  1853. .tabBtn {
  1854. /* background-color: #f6f6fa; */
  1855. height: 60rpx;
  1856. line-height: 60rpx;
  1857. color: #999999;
  1858. font-size: 38rpx;
  1859. }
  1860. .active {
  1861. /* width: 82rpx; */
  1862. height: 6rpx;
  1863. background: #fcd202;
  1864. /* position: relative;
  1865. top: -20rpx; */
  1866. z-index: 9;
  1867. }
  1868. </style>