confirmOrder.vue 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984
  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(
  820. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
  821. ).toFixed(2)
  822. } else {
  823. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  824. }
  825. if (this.coupon) {
  826. let totalMoney = parseFloat(
  827. this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
  828. )
  829. if (totalMoney <= 0) {
  830. this.totalPrice1 = 0.01
  831. } else {
  832. this.totalPrice1 = totalMoney
  833. }
  834. }
  835. if (this.huodong) {
  836. let totalMoney = parseFloat(
  837. this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
  838. )
  839. if (totalMoney <= 0) {
  840. this.totalPrice1 = 0.01
  841. } else {
  842. this.totalPrice1 = totalMoney
  843. }
  844. }
  845. },
  846. // 删除优惠券
  847. detCoupon() {
  848. let data = {
  849. orderId: this.dataList.orderId
  850. }
  851. this.$Request.post('/app/order/deleteCouponByOrderId', data).then((res) => {
  852. if (res.code == 0) {
  853. }
  854. })
  855. },
  856. // 选择优惠券
  857. selCoupon(item) {
  858. this.coupon = item
  859. if (this.orderType == 2) {
  860. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  861. } else {
  862. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  863. }
  864. let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)).toFixed(2)
  865. if (totalMoney <= 0) {
  866. this.totalPrice1 = 0.01
  867. } else {
  868. this.totalPrice1 = totalMoney
  869. }
  870. let data = {
  871. parentId: this.dataList.parentId,
  872. couponId: this.coupon ? this.coupon.id : ''
  873. }
  874. this.$Request.post('/app/order/employCoupon', data).then((res) => {
  875. if (res.code == 0) {
  876. this.show = false
  877. }
  878. })
  879. },
  880. //选择活动activityId
  881. selctHuo(item) {
  882. this.huodong = item
  883. if (this.orderType == 2) {
  884. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  885. } else {
  886. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  887. }
  888. let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)).toFixed(2)
  889. if (totalMoney <= 0) {
  890. this.totalPrice1 = 0.01
  891. } else {
  892. this.totalPrice1 = totalMoney
  893. }
  894. this.youhui = false
  895. },
  896. // 优惠卷列表
  897. getCouponList() {
  898. // console.log(this.paotuiMoney)
  899. // console.log(this.dabaoMoney, '123123')
  900. let minMoney =
  901. this.orderType == 2
  902. ? parseFloat(parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney)).toFixed(2)
  903. : parseFloat(this.totalPrice).toFixed(2)
  904. let data = {
  905. shopId: this.dataList.shopId,
  906. page: 1,
  907. limit: 10,
  908. minMoney: minMoney
  909. }
  910. this.$Request.get('/app/coupon/selectUserCouponList', data).then((res) => {
  911. if (res.code == 0) {
  912. this.couponList = res.data.list
  913. console.log(this.couponList, 'this.couponList', this.coupon)
  914. if (this.coupon) {
  915. let activityExists = this.couponList.some((item) => item.couponId === this.coupon.couponId)
  916. if (!activityExists) {
  917. this.coupon = ''
  918. if (this.orderType == 2) {
  919. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  920. } else {
  921. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  922. }
  923. let totalMoney = parseFloat(
  924. this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
  925. ).toFixed(2)
  926. if (totalMoney <= 0) {
  927. this.totalPrice1 = 0.01
  928. } else {
  929. this.totalPrice1 = totalMoney
  930. }
  931. uni.showModal({
  932. title: '提示',
  933. content: '当前选择的优惠券已过期,请重新选择',
  934. success: function (res) {
  935. if (res.confirm) {
  936. this.coupon = ''
  937. } else if (res.cancel) {
  938. this.coupon = ''
  939. }
  940. }
  941. })
  942. }
  943. }
  944. }
  945. })
  946. },
  947. // 优惠活动列表
  948. getHuoList() {
  949. let data = {
  950. orderId: this.dataList.orderId
  951. }
  952. this.$Request.get(`/app/activity/suit-activity/${this.dataList.orderId}`, data).then((res) => {
  953. if (res.code == 0) {
  954. this.huoList = res.data
  955. // console.log(this.huodong)
  956. if (this.huodong) {
  957. // console.log(this.huodong,'有呢')
  958. let activityExists = this.huoList.some((item) => item.activityId === this.huodong.activityId)
  959. if (!activityExists) {
  960. this.huodong = ''
  961. if (this.orderType == 2) {
  962. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  963. } else {
  964. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  965. }
  966. let totalMoney = parseFloat(
  967. this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
  968. ).toFixed(2)
  969. if (totalMoney <= 0) {
  970. this.totalPrice1 = 0.01
  971. } else {
  972. this.totalPrice1 = totalMoney
  973. }
  974. uni.showModal({
  975. title: '提示',
  976. content: '当前选择的优惠活动已过期,请重新选择',
  977. success: function (res) {
  978. if (res.confirm) {
  979. this.huodong = ''
  980. } else if (res.cancel) {
  981. this.huodong = ''
  982. }
  983. }
  984. })
  985. }
  986. }
  987. // 匹配出最优惠的活动
  988. if (this.huoList.length) {
  989. this.huodong = this.huoList.reduce((prev, current) => (prev.discountAmount > current.discountAmount ? prev : current))
  990. this.selctHuo(this.huodong)
  991. }
  992. // for(var i=0;i<this.huoList.length;i++){
  993. // if(this.huodong!=''&&this.huodong.activityId!=this.huoList[i].activityId){
  994. // console.log('优惠活动过期')
  995. // }
  996. // }
  997. // if(this.huoList.length==0){
  998. // this.huodong=''
  999. // }
  1000. }
  1001. })
  1002. },
  1003. //拼单支付成功取消订单
  1004. cancelPinDan() {
  1005. let that = this
  1006. // if (that.orderId) {
  1007. // let data = {
  1008. // orderId: that.orderId
  1009. // };
  1010. // that.$Request.post('/app/order/deleteOrder', data).then(res => {
  1011. // if (res.code == 0) {
  1012. // uni.removeStorageSync('orderId');
  1013. // }
  1014. // });
  1015. // }
  1016. },
  1017. // 商品列表
  1018. getOrderList() {
  1019. // 显示加载提示
  1020. uni.showLoading({
  1021. title: '加载中', // 加载提示文本
  1022. mask: true // 是否显示透明蒙层,防止触摸穿透
  1023. })
  1024. this.paotuiMoney = 0
  1025. this.totalPrice1 = 0
  1026. if (this.status == 0) {
  1027. console.log(6666)
  1028. this.payContinue()
  1029. return
  1030. }
  1031. let data = {
  1032. shopId: this.shopId,
  1033. status: 1,
  1034. page: 1,
  1035. limit: 1000
  1036. // orderType: this.orderType
  1037. }
  1038. // console.log(data)
  1039. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  1040. // console.log(res)
  1041. uni.hideLoading()
  1042. if (res.code == 0 && res.data.pageUtils.list.length) {
  1043. this.GoodsorderId = res.data.pageUtils.list[0].orderId
  1044. this.dataList = res.data.pageUtils.list[0]
  1045. if (this.dataList && this.dataList.orderGoodsList && this.dataList.orderGoodsList[0]) {
  1046. this.dataList.orderGoodsList[0].forEach((res) => {
  1047. res.goodsPicture = res.goodsPicture.split(',')
  1048. this.dabaoMoney += res.goodsPack * res.goodsNum
  1049. this.goodsMoney += res.goodsPrice * res.goodsNum
  1050. this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney)
  1051. })
  1052. this.goodsList = this.dataList.orderGoodsList[0]
  1053. }
  1054. console.log(this.dataList, this.dabaoMoney, 'kkklll')
  1055. if (this.ifPaotui == 1) {
  1056. this.paotuiMoney = this.dataList.errandMoney
  1057. } else if (this.ifPaotui == 0) {
  1058. // 判断商品金额是否大于最低减免配送费金额
  1059. console.log(this.goodsMoney, '商品总金额', res, this.dataList.exemptMinMoney)
  1060. if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
  1061. this.paotuiMoney = 0
  1062. } else {
  1063. this.paotuiMoney = this.dataList.errandMoney
  1064. }
  1065. }
  1066. this.totalPrice = res.data.money
  1067. if (this.orderType == 2) {
  1068. this.totalPrice1 = parseFloat(
  1069. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
  1070. ).toFixed(2)
  1071. } else {
  1072. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  1073. }
  1074. // console.log(this.dataList)
  1075. this.getCouponList()
  1076. this.getHuoList()
  1077. this.detCoupon()
  1078. this.getDistance()
  1079. }
  1080. // 加载提示关闭
  1081. uni.hideLoading()
  1082. })
  1083. },
  1084. payContinue() {
  1085. let data = {
  1086. orderId: this.orderId,
  1087. page: 1,
  1088. limit: 1000
  1089. }
  1090. console.log(data)
  1091. this.$Request.get('/app/order/selectOrder', data).then((res) => {
  1092. console.log(res)
  1093. uni.hideLoading()
  1094. if (res.code == 0 && res.data.pageUtils.list.length) {
  1095. this.GoodsorderId = res.data.pageUtils.list[0].orderId
  1096. this.dataList = res.data.pageUtils.list[0]
  1097. if (this.dataList && this.dataList.orderGoodsList && this.dataList.orderGoodsList[0]) {
  1098. this.dataList.orderGoodsList[0].forEach((res) => {
  1099. res.goodsPicture = res.goodsPicture.split(',')
  1100. this.dabaoMoney += res.goodsPack * res.goodsNum
  1101. this.goodsMoney += res.goodsPrice * res.goodsNum
  1102. this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney)
  1103. })
  1104. this.goodsList = this.dataList.orderGoodsList[0]
  1105. }
  1106. console.log(this.dataList, this.dabaoMoney, 'kkklll')
  1107. if (this.ifPaotui == 1) {
  1108. this.paotuiMoney = this.dataList.errandMoney
  1109. } else if (this.ifPaotui == 0) {
  1110. // 判断商品金额是否大于最低减免配送费金额
  1111. console.log(this.goodsMoney, '商品总金额', res, this.dataList.exemptMinMoney)
  1112. if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
  1113. this.paotuiMoney = 0
  1114. } else {
  1115. this.paotuiMoney = this.dataList.errandMoney
  1116. }
  1117. }
  1118. this.totalPrice = res.data.money
  1119. if (this.orderType == 2) {
  1120. this.totalPrice1 = parseFloat(
  1121. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
  1122. ).toFixed(2)
  1123. } else {
  1124. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  1125. }
  1126. // console.log(this.dataList)
  1127. this.getCouponList()
  1128. this.getHuoList()
  1129. this.detCoupon()
  1130. this.getDistance()
  1131. }
  1132. // 加载提示关闭
  1133. uni.hideLoading()
  1134. })
  1135. },
  1136. selectWay(item) {
  1137. this.openWay = item.id
  1138. },
  1139. takeReark() {
  1140. let datas = {
  1141. orderId: this.GoodsorderId,
  1142. remark: this.remark
  1143. }
  1144. this.$Request.post('/app/order/updateOrdersRemark', datas).then((res) => {
  1145. if (res.code == 0) {
  1146. } else {
  1147. uni.showToast({
  1148. title: res.msg,
  1149. icon: 'none'
  1150. })
  1151. }
  1152. })
  1153. },
  1154. toSettlement_throttle: throttle(function () {
  1155. this.toSettlement()
  1156. }, 1000),
  1157. // 立即结算
  1158. toSettlement() {
  1159. if (this.isThrottle == false) {
  1160. return
  1161. }
  1162. let that = this
  1163. if (this.isTrue && this.orderType == 2) {
  1164. uni.showToast({
  1165. title: '超出配送范围',
  1166. icon: 'none'
  1167. })
  1168. reutrn
  1169. }
  1170. if (this.orderType == 2 && !this.address.addressId) {
  1171. uni.showToast({
  1172. title: '请选择收货地址',
  1173. icon: 'none'
  1174. })
  1175. return
  1176. }
  1177. if (this.remark) {
  1178. this.takeReark()
  1179. }
  1180. uni.showLoading({
  1181. title: '支付中...',
  1182. mask: true // 是否显示透明蒙层,防止触摸穿透
  1183. })
  1184. this.isThrottle = false
  1185. if (this.openWay == 1) {
  1186. //零钱支付
  1187. let data = {
  1188. userId: uni.getStorageSync('userId'),
  1189. type: 1, //支付方式 1表示微信支付、4或5表示支付宝支付
  1190. activityId: this.huodong ? this.huodong.activityId : '',
  1191. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1192. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1193. parentId: this.dataList.parentId,
  1194. couponId: this.coupon ? this.coupon.id : '',
  1195. addressId: this.address.addressId ? this.address.addressId : '',
  1196. orderType: this.orderType
  1197. }
  1198. console.log(data, 'l')
  1199. this.$Request.post('/app/wxPay/balanceOrder', data).then((res) => {
  1200. console.log(res, '结果')
  1201. if (res.code == 0) {
  1202. uni.hideLoading()
  1203. that.$queue.showToast('支付成功')
  1204. that.cancelPinDan()
  1205. setTimeout(function () {
  1206. that.isThrottle = true
  1207. uni.switchTab({
  1208. url: '/pages/order/index'
  1209. })
  1210. }, 1000)
  1211. } else {
  1212. that.$queue.showToast(res.msg)
  1213. that.isThrottle = true
  1214. }
  1215. })
  1216. } else if (this.openWay == 2) {
  1217. //微信支付
  1218. // #ifdef H5
  1219. let data = {
  1220. userId: uni.getStorageSync('userId'),
  1221. type: 1, //支付方式 1表示微信支付、4或5表示支付宝支付
  1222. activityId: this.huodong ? this.huodong.activityId : '',
  1223. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1224. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1225. parentId: this.dataList.parentId,
  1226. couponId: this.coupon ? this.coupon.id : '',
  1227. addressId: this.address.addressId ? this.address.addressId : '',
  1228. orderType: this.orderType,
  1229. type: 2
  1230. }
  1231. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1232. uni.hideLoading()
  1233. if (res.code == 0) {
  1234. this.callPay(res.data)
  1235. } else {
  1236. uni.showToast({
  1237. title: res.msg,
  1238. icon: 'none'
  1239. })
  1240. this.isThrottle = true
  1241. }
  1242. })
  1243. // #endif
  1244. // #ifdef MP-WEIXIN
  1245. this.$Request.get('/app/new-pay/enable-new-pay').then((res) => {
  1246. console.log(res, '987')
  1247. if (res.code == 0) {
  1248. let data = {
  1249. userId: uni.getStorageSync('userId'),
  1250. //支付方式 1表示微信支付、4或5表示支付宝支付
  1251. // type: 4,
  1252. activityId: this.huodong ? this.huodong.activityId : '',
  1253. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1254. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1255. parentId: this.dataList.parentId,
  1256. couponId: this.coupon ? this.coupon.id : '',
  1257. addressId: this.address.addressId ? this.address.addressId : '',
  1258. orderType: this.orderType,
  1259. type: res.enable ? 1 : 3,
  1260. idCard: this.idcard1
  1261. }
  1262. console.log(data)
  1263. if (res.enable) {
  1264. console.log('xin')
  1265. this.newPay(data)
  1266. } else {
  1267. console.log('jiu')
  1268. this.oldPay(data)
  1269. }
  1270. }
  1271. })
  1272. // #endif
  1273. // #ifdef APP
  1274. let data = {
  1275. type: 1,
  1276. parentId: this.dataList.parentId,
  1277. couponId: this.coupon ? this.coupon.id : '',
  1278. addressId: this.address.addressId ? this.address.addressId : '',
  1279. orderType: this.orderType
  1280. }
  1281. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1282. console.log(res)
  1283. this.showpay = false
  1284. if (res.code == 0) {
  1285. this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data))
  1286. } else {
  1287. that.isThrottle = true
  1288. }
  1289. })
  1290. // #endif
  1291. } else if (this.openWay == 3) {
  1292. // #ifdef H5
  1293. let data = {
  1294. type: 5,
  1295. parentId: this.dataList.parentId,
  1296. couponId: this.coupon ? this.coupon.id : '',
  1297. addressId: this.address.addressId ? this.address.addressId : '',
  1298. orderType: this.orderType
  1299. }
  1300. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1301. this.showpay = false
  1302. this.isThrottle = true
  1303. const div = document.createElement('div')
  1304. div.innerHTML = res.data //此处form就是后台返回接收到的数据
  1305. document.body.appendChild(div)
  1306. document.forms[0].submit()
  1307. })
  1308. // #endif
  1309. // #ifdef APP
  1310. let data = {
  1311. type: 4,
  1312. parentId: this.dataList.parentId,
  1313. couponId: this.coupon ? this.coupon.id : '',
  1314. addressId: this.address.addressId ? this.address.addressId : '',
  1315. orderType: this.orderType
  1316. }
  1317. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1318. this.showpay = false
  1319. this.setPayment('alipay', res.data)
  1320. })
  1321. // #endif
  1322. }
  1323. },
  1324. newPay(data) {
  1325. this.$Request.get('/app/order/get-pay-param', data).then((res) => {
  1326. console.log(res, '新支付')
  1327. if (res.code == 0) {
  1328. uni.requestPayment({
  1329. provider: 'wxpay',
  1330. timeStamp: res.timeStamp,
  1331. nonceStr: res.nonceStr,
  1332. package: res.packageStr,
  1333. signType: res.signType,
  1334. paySign: res.paySign,
  1335. success: (suc) => {
  1336. this.cancelPinDan()
  1337. uni.hideLoading()
  1338. this.$queue.showToast('支付成功')
  1339. setTimeout(() => {
  1340. this.isThrottle = true
  1341. uni.switchTab({
  1342. url: '/pages/order/index'
  1343. })
  1344. }, 1000)
  1345. },
  1346. fail: (err) => {
  1347. console.log('fail:' + JSON.stringify(err))
  1348. this.isThrottle = true
  1349. uni.setStorageSync('isClear', true)
  1350. uni.showToast({
  1351. title: '支付失败',
  1352. icon: 'none',
  1353. mask: true
  1354. })
  1355. setTimeout(() => {
  1356. uni.reLaunch({
  1357. url: '/pages/order/index'
  1358. })
  1359. }, 1500)
  1360. }
  1361. })
  1362. } else {
  1363. uni.showToast({
  1364. title: res.msg,
  1365. icon: 'none'
  1366. })
  1367. this.isThrottle = true
  1368. }
  1369. })
  1370. },
  1371. oldPay(data) {
  1372. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1373. console.log(res, '旧支付')
  1374. // uni.hideLoading();
  1375. if (res.code == 0) {
  1376. uni.requestPayment({
  1377. provider: 'wxpay',
  1378. timeStamp: res.data.timestamp,
  1379. nonceStr: res.data.noncestr,
  1380. package: res.data.package,
  1381. signType: res.data.signType,
  1382. paySign: res.data.sign,
  1383. success: (suc) => {
  1384. this.cancelPinDan()
  1385. uni.hideLoading()
  1386. this.$queue.showToast('支付成功')
  1387. setTimeout(() => {
  1388. this.isThrottle = true
  1389. uni.switchTab({
  1390. url: '/pages/order/index'
  1391. })
  1392. }, 1000)
  1393. },
  1394. fail: (err) => {
  1395. console.log('fail:' + JSON.stringify(err))
  1396. this.isThrottle = true
  1397. uni.setStorageSync('isClear', true)
  1398. uni.showToast({
  1399. title: '支付失败',
  1400. icon: 'none',
  1401. mask: true
  1402. })
  1403. setTimeout(() => {
  1404. uni.reLaunch({
  1405. url: '/pages/order/index'
  1406. })
  1407. }, 1500)
  1408. }
  1409. })
  1410. } else {
  1411. uni.showToast({
  1412. title: res.msg,
  1413. icon: 'none'
  1414. })
  1415. this.isThrottle = true
  1416. }
  1417. })
  1418. },
  1419. callPay: function (response) {
  1420. if (typeof WeixinJSBridge === 'undefined') {
  1421. if (document.addEventListener) {
  1422. document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false)
  1423. } else if (document.attachEvent) {
  1424. document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response))
  1425. document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response))
  1426. }
  1427. } else {
  1428. this.onBridgeReady(response)
  1429. }
  1430. },
  1431. onBridgeReady: function (response) {
  1432. let that = this
  1433. if (!response.package) {
  1434. return
  1435. }
  1436. WeixinJSBridge.invoke(
  1437. 'getBrandWCPayRequest',
  1438. {
  1439. appId: response.appid, //公众号名称,由商户传入
  1440. timeStamp: response.timestamp, //时间戳,自1970年以来的秒数
  1441. nonceStr: response.noncestr, //随机串
  1442. package: response.package,
  1443. signType: response.signType, //微信签名方式:
  1444. paySign: response.sign //微信签名
  1445. },
  1446. function (res) {
  1447. if (res.err_msg === 'get_brand_wcpay_request:ok') {
  1448. // 使用以上方式判断前端返回,微信团队郑重提示:
  1449. //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
  1450. that.cancelPinDan()
  1451. that.$queue.showToast('支付成功')
  1452. setTimeout(function () {
  1453. uni.switchTab({
  1454. url: '/pages/order/index'
  1455. })
  1456. that.isThrottle = true
  1457. }, 1000)
  1458. } else {
  1459. uni.hideLoading()
  1460. that.isThrottle = true
  1461. }
  1462. WeixinJSBridge.log(response.err_msg)
  1463. }
  1464. )
  1465. },
  1466. isCheckPay(code, name, order) {
  1467. if (code == 0) {
  1468. console.log('999999999999')
  1469. this.setPayment(name, order)
  1470. } else {
  1471. uni.hideLoading()
  1472. uni.showToast({
  1473. title: '支付信息有误'
  1474. })
  1475. this.isThrottle = true
  1476. }
  1477. },
  1478. setPayment(name, order) {
  1479. let that = this
  1480. console.log(777777777, name, order)
  1481. uni.requestPayment({
  1482. provider: name,
  1483. orderInfo: order, //微信、支付宝订单数据
  1484. success: function (res) {
  1485. uni.hideLoading()
  1486. that.cancelPinDan()
  1487. uni.showLoading({
  1488. title: '支付成功',
  1489. icon: 'none'
  1490. })
  1491. setTimeout(function () {
  1492. that.isThrottle = true
  1493. uni.navigateBack()
  1494. }, 1000)
  1495. },
  1496. fail: function (err) {
  1497. uni.hideLoading()
  1498. that.isThrottle = true
  1499. },
  1500. complete() {
  1501. that.isThrottle = true
  1502. uni.hideLoading()
  1503. }
  1504. })
  1505. },
  1506. // 获取选择的地址
  1507. getAddressDet(e) {
  1508. let data = {
  1509. addressId: e
  1510. }
  1511. this.$Request.get('/app/address/selectAddressById', data).then((res) => {
  1512. console.log(res, 77777777)
  1513. if (res.code == 0) {
  1514. this.address = res.data
  1515. if (this.address.insideAddressId) {
  1516. this.getInsideDeliveryFee(this.address.insideAddressId)
  1517. } else {
  1518. this.getInsideDeliveryFee(0)
  1519. }
  1520. if (JSON.stringify(this.address) != '{}') {
  1521. this.getDistance()
  1522. }
  1523. uni.removeStorageSync('addressId')
  1524. }
  1525. })
  1526. },
  1527. // 获取地址列表
  1528. getAddressList() {
  1529. let that = this
  1530. let data = {
  1531. page: 1,
  1532. limit: 100
  1533. }
  1534. that.$Request.get('/app/address/selectAddressList', data).then((res) => {
  1535. console.log(res, 741852)
  1536. if (res.code == 0) {
  1537. that.address = res.data.list[0] ? res.data.list[0] : {}
  1538. res.data.list.forEach((ret) => {
  1539. if (ret.addressDefault == 1) {
  1540. that.address = ret
  1541. }
  1542. })
  1543. console.log(that.address, '我的地址列表460777')
  1544. if (this.address.insideAddressId) {
  1545. this.getInsideDeliveryFee(this.address.insideAddressId)
  1546. } else {
  1547. this.getInsideDeliveryFee(0)
  1548. }
  1549. if (JSON.stringify(this.address) != '{}') {
  1550. this.getDistance()
  1551. }
  1552. }
  1553. })
  1554. },
  1555. getInsideDeliveryFee(insideAddressId) {
  1556. this.$Request.get(`/app/inside-address/${insideAddressId}`).then((res) => {
  1557. console.log(res, 987456)
  1558. if (res.code == 0) {
  1559. this.address.insideDeliveryFee = res.data.deliveryFee || 0
  1560. }
  1561. })
  1562. },
  1563. goAddress() {
  1564. uni.navigateTo({
  1565. url: '/my/address/index?add=1'
  1566. })
  1567. },
  1568. // 点击调起地图查看位置
  1569. goMap() {
  1570. // let that = this
  1571. // let plugin = requirePlugin('routePlan');
  1572. // let key = 'A3RBZ-23MHW-PTPR5-RLCER-UJTXQ-JIF2G'; //使用在腾讯位置服务申请的key
  1573. // let referer = that.dataList.shopName; //调用插件的app的名称
  1574. // let endPoint = JSON.stringify({ //终点
  1575. // 'name': that.dataList.shopName,
  1576. // 'latitude': that.dataList.shopLat,
  1577. // 'longitude': that.dataList.shopLng,
  1578. // });
  1579. // wx.navigateTo({
  1580. // url: 'plugin://routePlan/index?key=' + key + '&referer=' + referer + '&endPoint=' + endPoint
  1581. // });
  1582. let that = this
  1583. let lati = parseFloat(that.dataList.shopLat)
  1584. let longi = parseFloat(that.dataList.shopLng)
  1585. uni.authorize({
  1586. scope: 'scope.userLocation',
  1587. success(res) {
  1588. uni.openLocation({
  1589. name: that.dataList.shopName,
  1590. latitude: lati,
  1591. longitude: longi,
  1592. success: function () {}
  1593. })
  1594. },
  1595. fail(err) {}
  1596. })
  1597. },
  1598. // 打电话
  1599. call() {
  1600. uni.makePhoneCall({
  1601. phoneNumber: this.dataList.shopPhone
  1602. })
  1603. }
  1604. }
  1605. }
  1606. </script>
  1607. <style scoped>
  1608. .hintPopul {
  1609. width: 100%;
  1610. height: 100vh;
  1611. position: fixed;
  1612. top: 0;
  1613. background: rgba(0, 0, 0, 0.4);
  1614. z-index: 999;
  1615. }
  1616. .content_ {
  1617. position: absolute;
  1618. left: 0;
  1619. right: 0;
  1620. top: 0;
  1621. bottom: 0;
  1622. margin: auto;
  1623. text-align: center;
  1624. width: 500rpx;
  1625. height: 400rpx;
  1626. border-radius: 20rpx;
  1627. background-color: #fff;
  1628. padding-top: 120rpx;
  1629. }
  1630. .content_ image {
  1631. position: absolute;
  1632. top: -50rpx;
  1633. left: 0;
  1634. right: 0;
  1635. margin: auto;
  1636. }
  1637. .hintText {
  1638. font-size: 30rpx;
  1639. }
  1640. .Btns {
  1641. width: 460rpx;
  1642. height: 60rpx;
  1643. line-height: 60rpx;
  1644. text-align: center;
  1645. background: #fcd202;
  1646. font-size: 28rpx;
  1647. border: 2rpx solid #fcd202;
  1648. color: #333333;
  1649. border-radius: 50rpx;
  1650. font-weight: 700;
  1651. margin: auto;
  1652. }
  1653. .goods_address {
  1654. width: 94%;
  1655. background: #ffffff;
  1656. height: 120rpx;
  1657. margin: 20rpx auto 0;
  1658. border-radius: 18rpx;
  1659. }
  1660. .address_box {
  1661. width: 90%;
  1662. margin: 0 auto;
  1663. height: 120rpx;
  1664. display: flex;
  1665. line-height: 120rpx;
  1666. }
  1667. .address_name {
  1668. flex: 1;
  1669. font-size: 30rpx;
  1670. }
  1671. .address_image {
  1672. /* flex: 1; */
  1673. display: flex;
  1674. justify-content: flex-end;
  1675. align-items: center;
  1676. }
  1677. .address_image image {
  1678. width: 25rpx;
  1679. height: 40rpx;
  1680. }
  1681. .songda_image image {
  1682. width: 20rpx;
  1683. height: 30rpx;
  1684. margin-left: 20rpx;
  1685. }
  1686. /* 地址 */
  1687. .address {
  1688. width: 88%;
  1689. margin: 3% auto;
  1690. padding: 3%;
  1691. display: flex;
  1692. background-color: #ffffff;
  1693. border-radius: 18rpx;
  1694. }
  1695. .adderss_le {
  1696. width: 90%;
  1697. line-height: 1.5;
  1698. }
  1699. .adderss_le_text {
  1700. font-size: 30rpx;
  1701. font-weight: bold;
  1702. color: #333333;
  1703. }
  1704. .adderss_le_text2 {
  1705. font-size: 24rpx;
  1706. font-weight: 500;
  1707. color: #999999;
  1708. display: flex;
  1709. }
  1710. .adderss_le_text2 view {
  1711. margin-left: 2%;
  1712. }
  1713. .adderss_le_text2 view:first-child {
  1714. margin-left: 0;
  1715. }
  1716. .adderss_ri {
  1717. width: 10%;
  1718. text-align: right;
  1719. line-height: 3;
  1720. }
  1721. .adderss_ri image {
  1722. width: 18rpx;
  1723. height: 30rpx;
  1724. }
  1725. /* 商品 */
  1726. .food {
  1727. width: 94%;
  1728. margin: 3% auto;
  1729. padding: 3%;
  1730. background-color: #ffffff;
  1731. border-radius: 18rpx;
  1732. }
  1733. .food_top {
  1734. display: flex;
  1735. justify-content: space-between;
  1736. align-items: center;
  1737. font-size: 32rpx;
  1738. font-weight: bold;
  1739. }
  1740. .food_bottom {
  1741. margin-top: 20rpx;
  1742. color: #666666;
  1743. font-size: 28rpx;
  1744. line-height: 45rpx;
  1745. }
  1746. .bottom_text {
  1747. color: #ea0018;
  1748. }
  1749. .tosend_header_food {
  1750. width: 100%;
  1751. display: flex;
  1752. margin-top: 3%;
  1753. }
  1754. .tosend_header_food_le {
  1755. width: 15%;
  1756. }
  1757. .tosend_header_food_le image {
  1758. width: 110rpx;
  1759. height: 110rpx;
  1760. border-radius: 10rpx;
  1761. }
  1762. .tosend_header_food_ce {
  1763. margin: 0 0 0 4%;
  1764. width: 57%;
  1765. }
  1766. .tosend_header_food_ri {
  1767. text-align: right;
  1768. width: 25%;
  1769. }
  1770. .tosend_header_food_text {
  1771. font-size: 34rpx;
  1772. font-weight: 500;
  1773. color: #333333;
  1774. line-height: 1.8;
  1775. }
  1776. .tosend_header_food_text text {
  1777. font-size: 25rpx;
  1778. }
  1779. .tosend_header_food_text2 {
  1780. font-size: 28rpx;
  1781. font-weight: 500;
  1782. color: #999999;
  1783. }
  1784. .do_top {
  1785. padding-top: 3%;
  1786. }
  1787. .do_bot {
  1788. padding-bottom: 3%;
  1789. border-bottom: 2rpx solid #e6e6e6;
  1790. }
  1791. .tosend_header_do {
  1792. width: 100%;
  1793. color: #333333;
  1794. font-size: 30rpx;
  1795. display: flex;
  1796. margin-top: 20rpx;
  1797. line-height: 1.5;
  1798. }
  1799. .tosend_header_do view {
  1800. /* flex: 1; */
  1801. }
  1802. .tosend_header_do_ri {
  1803. text-align: right;
  1804. }
  1805. .tosend_header_do_le2 {
  1806. font-family: PingFang SC;
  1807. font-weight: 500;
  1808. color: #999999;
  1809. padding-top: 1.5%;
  1810. }
  1811. .tosend_header_do_ri2 {
  1812. text-align: right;
  1813. color: #ea0000;
  1814. font-size: 40rpx;
  1815. }
  1816. .tosend_header_do_ri2 text {
  1817. font-size: 30rpx;
  1818. }
  1819. /* 支付 */
  1820. /* .payment_all{
  1821. width: 88%;margin: 3% auto;padding: 3%;background-color: #FFFFFF;
  1822. border-radius: 18rpx;
  1823. }
  1824. .payment{
  1825. width: 100%;display: flex;margin-top: 3%;
  1826. }
  1827. .payment_le{
  1828. width: 13%;
  1829. }
  1830. .payment_le image{
  1831. width: 60rpx;height: 60rpx;
  1832. }
  1833. .payment_ce{
  1834. width: 52%;
  1835. font-size: 30rpx;
  1836. font-weight: bold;
  1837. color: #333333;line-height: 60rpx;
  1838. }
  1839. .payment_ri{
  1840. width: 35%;text-align: right;line-height: 60rpx;
  1841. } */
  1842. /* 结算 */
  1843. .goorder {
  1844. width: 100%;
  1845. padding: 2% 3%;
  1846. position: fixed;
  1847. bottom: 0;
  1848. background-color: #ffffff;
  1849. z-index: 999;
  1850. }
  1851. .goorder_but {
  1852. width: 100%;
  1853. line-height: 3.5;
  1854. text-align: center;
  1855. background: #fcd202;
  1856. border-radius: 36rpx;
  1857. font-weight: 700;
  1858. }
  1859. .goorder_but_ {
  1860. opacity: 0.5;
  1861. }
  1862. .bg {
  1863. background-color: #ffffff;
  1864. }
  1865. .tabBtn {
  1866. /* background-color: #f6f6fa; */
  1867. height: 60rpx;
  1868. line-height: 60rpx;
  1869. color: #999999;
  1870. font-size: 38rpx;
  1871. }
  1872. .active {
  1873. /* width: 82rpx; */
  1874. height: 6rpx;
  1875. background: #fcd202;
  1876. /* position: relative;
  1877. top: -20rpx; */
  1878. z-index: 9;
  1879. }
  1880. </style>