confirmOrder.vue 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974
  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. if (res.code == 0) {
  1513. this.address = res.data
  1514. this.getInsideDeliveryFee(this.address.insideAddressId)
  1515. if (JSON.stringify(this.address) != '{}') {
  1516. this.getDistance()
  1517. }
  1518. uni.removeStorageSync('addressId')
  1519. }
  1520. })
  1521. },
  1522. // 获取地址列表
  1523. getAddressList() {
  1524. let that = this
  1525. let data = {
  1526. page: 1,
  1527. limit: 100
  1528. }
  1529. that.$Request.get('/app/address/selectAddressList', data).then((res) => {
  1530. if (res.code == 0) {
  1531. that.address = res.data.list[0] ? res.data.list[0] : {}
  1532. res.data.list.forEach((ret) => {
  1533. if (ret.addressDefault == 1) {
  1534. that.address = ret
  1535. }
  1536. })
  1537. // console.log(that.address, '我的地址列表460777')
  1538. this.getInsideDeliveryFee(this.address.insideAddressId)
  1539. if (JSON.stringify(this.address) != '{}') {
  1540. this.getDistance()
  1541. }
  1542. }
  1543. })
  1544. },
  1545. getInsideDeliveryFee(insideAddressId) {
  1546. this.$Request.get(`/app/inside-address/${insideAddressId}`).then((res) => {
  1547. // console.log(res, 987456)
  1548. if (res.code == 0) {
  1549. this.address.insideDeliveryFee = res.data.deliveryFee || 0
  1550. }
  1551. })
  1552. },
  1553. goAddress() {
  1554. uni.navigateTo({
  1555. url: '/my/address/index?add=1'
  1556. })
  1557. },
  1558. // 点击调起地图查看位置
  1559. goMap() {
  1560. // let that = this
  1561. // let plugin = requirePlugin('routePlan');
  1562. // let key = 'A3RBZ-23MHW-PTPR5-RLCER-UJTXQ-JIF2G'; //使用在腾讯位置服务申请的key
  1563. // let referer = that.dataList.shopName; //调用插件的app的名称
  1564. // let endPoint = JSON.stringify({ //终点
  1565. // 'name': that.dataList.shopName,
  1566. // 'latitude': that.dataList.shopLat,
  1567. // 'longitude': that.dataList.shopLng,
  1568. // });
  1569. // wx.navigateTo({
  1570. // url: 'plugin://routePlan/index?key=' + key + '&referer=' + referer + '&endPoint=' + endPoint
  1571. // });
  1572. let that = this
  1573. let lati = parseFloat(that.dataList.shopLat)
  1574. let longi = parseFloat(that.dataList.shopLng)
  1575. uni.authorize({
  1576. scope: 'scope.userLocation',
  1577. success(res) {
  1578. uni.openLocation({
  1579. name: that.dataList.shopName,
  1580. latitude: lati,
  1581. longitude: longi,
  1582. success: function () {}
  1583. })
  1584. },
  1585. fail(err) {}
  1586. })
  1587. },
  1588. // 打电话
  1589. call() {
  1590. uni.makePhoneCall({
  1591. phoneNumber: this.dataList.shopPhone
  1592. })
  1593. }
  1594. }
  1595. }
  1596. </script>
  1597. <style scoped>
  1598. .hintPopul {
  1599. width: 100%;
  1600. height: 100vh;
  1601. position: fixed;
  1602. top: 0;
  1603. background: rgba(0, 0, 0, 0.4);
  1604. z-index: 999;
  1605. }
  1606. .content_ {
  1607. position: absolute;
  1608. left: 0;
  1609. right: 0;
  1610. top: 0;
  1611. bottom: 0;
  1612. margin: auto;
  1613. text-align: center;
  1614. width: 500rpx;
  1615. height: 400rpx;
  1616. border-radius: 20rpx;
  1617. background-color: #fff;
  1618. padding-top: 120rpx;
  1619. }
  1620. .content_ image {
  1621. position: absolute;
  1622. top: -50rpx;
  1623. left: 0;
  1624. right: 0;
  1625. margin: auto;
  1626. }
  1627. .hintText {
  1628. font-size: 30rpx;
  1629. }
  1630. .Btns {
  1631. width: 460rpx;
  1632. height: 60rpx;
  1633. line-height: 60rpx;
  1634. text-align: center;
  1635. background: #fcd202;
  1636. font-size: 28rpx;
  1637. border: 2rpx solid #fcd202;
  1638. color: #333333;
  1639. border-radius: 50rpx;
  1640. font-weight: 700;
  1641. margin: auto;
  1642. }
  1643. .goods_address {
  1644. width: 94%;
  1645. background: #ffffff;
  1646. height: 120rpx;
  1647. margin: 20rpx auto 0;
  1648. border-radius: 18rpx;
  1649. }
  1650. .address_box {
  1651. width: 90%;
  1652. margin: 0 auto;
  1653. height: 120rpx;
  1654. display: flex;
  1655. line-height: 120rpx;
  1656. }
  1657. .address_name {
  1658. flex: 1;
  1659. font-size: 30rpx;
  1660. }
  1661. .address_image {
  1662. /* flex: 1; */
  1663. display: flex;
  1664. justify-content: flex-end;
  1665. align-items: center;
  1666. }
  1667. .address_image image {
  1668. width: 25rpx;
  1669. height: 40rpx;
  1670. }
  1671. .songda_image image {
  1672. width: 20rpx;
  1673. height: 30rpx;
  1674. margin-left: 20rpx;
  1675. }
  1676. /* 地址 */
  1677. .address {
  1678. width: 88%;
  1679. margin: 3% auto;
  1680. padding: 3%;
  1681. display: flex;
  1682. background-color: #ffffff;
  1683. border-radius: 18rpx;
  1684. }
  1685. .adderss_le {
  1686. width: 90%;
  1687. line-height: 1.5;
  1688. }
  1689. .adderss_le_text {
  1690. font-size: 30rpx;
  1691. font-weight: bold;
  1692. color: #333333;
  1693. }
  1694. .adderss_le_text2 {
  1695. font-size: 24rpx;
  1696. font-weight: 500;
  1697. color: #999999;
  1698. display: flex;
  1699. }
  1700. .adderss_le_text2 view {
  1701. margin-left: 2%;
  1702. }
  1703. .adderss_le_text2 view:first-child {
  1704. margin-left: 0;
  1705. }
  1706. .adderss_ri {
  1707. width: 10%;
  1708. text-align: right;
  1709. line-height: 3;
  1710. }
  1711. .adderss_ri image {
  1712. width: 18rpx;
  1713. height: 30rpx;
  1714. }
  1715. /* 商品 */
  1716. .food {
  1717. width: 94%;
  1718. margin: 3% auto;
  1719. padding: 3%;
  1720. background-color: #ffffff;
  1721. border-radius: 18rpx;
  1722. }
  1723. .food_top {
  1724. display: flex;
  1725. justify-content: space-between;
  1726. align-items: center;
  1727. font-size: 32rpx;
  1728. font-weight: bold;
  1729. }
  1730. .food_bottom {
  1731. margin-top: 20rpx;
  1732. color: #666666;
  1733. font-size: 28rpx;
  1734. line-height: 45rpx;
  1735. }
  1736. .bottom_text {
  1737. color: #ea0018;
  1738. }
  1739. .tosend_header_food {
  1740. width: 100%;
  1741. display: flex;
  1742. margin-top: 3%;
  1743. }
  1744. .tosend_header_food_le {
  1745. width: 15%;
  1746. }
  1747. .tosend_header_food_le image {
  1748. width: 110rpx;
  1749. height: 110rpx;
  1750. border-radius: 10rpx;
  1751. }
  1752. .tosend_header_food_ce {
  1753. margin: 0 0 0 4%;
  1754. width: 57%;
  1755. }
  1756. .tosend_header_food_ri {
  1757. text-align: right;
  1758. width: 25%;
  1759. }
  1760. .tosend_header_food_text {
  1761. font-size: 34rpx;
  1762. font-weight: 500;
  1763. color: #333333;
  1764. line-height: 1.8;
  1765. }
  1766. .tosend_header_food_text text {
  1767. font-size: 25rpx;
  1768. }
  1769. .tosend_header_food_text2 {
  1770. font-size: 28rpx;
  1771. font-weight: 500;
  1772. color: #999999;
  1773. }
  1774. .do_top {
  1775. padding-top: 3%;
  1776. }
  1777. .do_bot {
  1778. padding-bottom: 3%;
  1779. border-bottom: 2rpx solid #e6e6e6;
  1780. }
  1781. .tosend_header_do {
  1782. width: 100%;
  1783. color: #333333;
  1784. font-size: 30rpx;
  1785. display: flex;
  1786. margin-top: 20rpx;
  1787. line-height: 1.5;
  1788. }
  1789. .tosend_header_do view {
  1790. /* flex: 1; */
  1791. }
  1792. .tosend_header_do_ri {
  1793. text-align: right;
  1794. }
  1795. .tosend_header_do_le2 {
  1796. font-family: PingFang SC;
  1797. font-weight: 500;
  1798. color: #999999;
  1799. padding-top: 1.5%;
  1800. }
  1801. .tosend_header_do_ri2 {
  1802. text-align: right;
  1803. color: #ea0000;
  1804. font-size: 40rpx;
  1805. }
  1806. .tosend_header_do_ri2 text {
  1807. font-size: 30rpx;
  1808. }
  1809. /* 支付 */
  1810. /* .payment_all{
  1811. width: 88%;margin: 3% auto;padding: 3%;background-color: #FFFFFF;
  1812. border-radius: 18rpx;
  1813. }
  1814. .payment{
  1815. width: 100%;display: flex;margin-top: 3%;
  1816. }
  1817. .payment_le{
  1818. width: 13%;
  1819. }
  1820. .payment_le image{
  1821. width: 60rpx;height: 60rpx;
  1822. }
  1823. .payment_ce{
  1824. width: 52%;
  1825. font-size: 30rpx;
  1826. font-weight: bold;
  1827. color: #333333;line-height: 60rpx;
  1828. }
  1829. .payment_ri{
  1830. width: 35%;text-align: right;line-height: 60rpx;
  1831. } */
  1832. /* 结算 */
  1833. .goorder {
  1834. width: 100%;
  1835. padding: 2% 3%;
  1836. position: fixed;
  1837. bottom: 0;
  1838. background-color: #ffffff;
  1839. z-index: 999;
  1840. }
  1841. .goorder_but {
  1842. width: 100%;
  1843. line-height: 3.5;
  1844. text-align: center;
  1845. background: #fcd202;
  1846. border-radius: 36rpx;
  1847. font-weight: 700;
  1848. }
  1849. .goorder_but_ {
  1850. opacity: 0.5;
  1851. }
  1852. .bg {
  1853. background-color: #ffffff;
  1854. }
  1855. .tabBtn {
  1856. /* background-color: #f6f6fa; */
  1857. height: 60rpx;
  1858. line-height: 60rpx;
  1859. color: #999999;
  1860. font-size: 38rpx;
  1861. }
  1862. .active {
  1863. /* width: 82rpx; */
  1864. height: 6rpx;
  1865. background: #fcd202;
  1866. /* position: relative;
  1867. top: -20rpx; */
  1868. z-index: 9;
  1869. }
  1870. </style>