payOrder.vue 55 KB

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