confirmOrder.vue 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938
  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. {
  318. image: '../../../static/images/my/weixin.png',
  319. text: '微信',
  320. id: 2
  321. }
  322. // {
  323. // image: '../../../static/images/my/zhifubao.png',
  324. // text: '支付宝',
  325. // id: 3
  326. // },
  327. // {
  328. // image: '../../../static/images/my/jinbi.png',
  329. // text: '零钱',
  330. // id: 1
  331. // }
  332. ],
  333. openWay: 2,
  334. orderId: '',
  335. page: 1,
  336. limit: 100,
  337. dataList: [],
  338. packMoney: 0, //打包费
  339. totalPrice: 0,
  340. totalPrice1: 0,
  341. address: {
  342. insideDeliveryFee: 0
  343. }, //地址
  344. addressId: '',
  345. parentId: '',
  346. shopId: '',
  347. show: false,
  348. youhui: false, //优惠活动
  349. coupon: '', //选择的优惠券信息
  350. huodong: '', //选择的活动信息
  351. couponList: [],
  352. huoList: [], //可用活动
  353. orderType: 2,
  354. paotuiMoney: 0,
  355. dabaoMoney: 0,
  356. goodsMoney: null,
  357. distance: 0,
  358. isTrue: false,
  359. goodsList: [],
  360. XCXIsSelect: '是',
  361. remark: '',
  362. GoodsorderId: '',
  363. ifPaotui: 0, //是否满减
  364. lng: '',
  365. lat: '',
  366. data: {
  367. multiArray: [],
  368. warning: '',
  369. startDate: '请选择'
  370. },
  371. workStart: '', //骑手上班时间
  372. workStartMin: '', //上班分钟
  373. workEnd: '', //骑手下班时间
  374. yusongTime: '', //骑手预计送达时长
  375. reservationFlag: 0, //是否预约单 1是、0否
  376. expectDeliveryTime: '', //预约送达时间
  377. timer: '', //定时器
  378. autoSendOrder: 0, //autoSendOrder为1商家自配,0平台配送
  379. reservationOpenFlag: 0, //1预约,0不预约
  380. status: null,
  381. showReach: null,
  382. // 基础实付满多少
  383. ruleAmount1: 0,
  384. // 基础实付满多少送的积分
  385. ruleValue1: 0,
  386. // 超过多少
  387. ruleMaxAmount: 0,
  388. // 第二阶段实付满多少
  389. ruleAmount2: 0,
  390. // 第二阶段实付满多少送的积分
  391. ruleValue2: 0,
  392. // 每笔订单获取的积分上限
  393. maxIntegral: 0,
  394. // 可获得积分
  395. intergral: 0,
  396. // 是否显示积分模块
  397. isIntegral: false,
  398. shopTypeName: '', //店铺类型
  399. idcard1: '' //身份证号
  400. }
  401. },
  402. onLoad(option) {
  403. console.log(option, '256')
  404. this.shopTypeName = option.shopTypeName
  405. if (option.showReach) {
  406. this.showReach = option.showReach
  407. }
  408. // #ifdef MP-WEIXIN
  409. this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是'
  410. // #endif
  411. this.shopId = option.shopId
  412. if (option.shopTypeName == '三大运营商') {
  413. this.orderType = 1
  414. } else {
  415. this.orderType = option.orderType
  416. }
  417. if (option.orderId) {
  418. this.orderId = option.orderId
  419. }
  420. if (option.status) {
  421. this.status = option.status
  422. }
  423. uni.showLoading({
  424. title: '加载中...',
  425. mask: true // 是否显示透明蒙层,防止触摸穿透
  426. })
  427. uni.getLocation({
  428. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  429. success: (res) => {
  430. this.lat = res.latitude
  431. this.lng = res.longitude
  432. }
  433. })
  434. this.getAddressList()
  435. },
  436. onUnload() {
  437. // 页面销毁时清除定时器
  438. if (this.timer) {
  439. clearInterval(this.timer)
  440. }
  441. },
  442. onShow() {
  443. this.getMsgData()
  444. this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
  445. if (this.addressId) {
  446. console.log(this.addressId, '地址id')
  447. this.address = {}
  448. this.getAddressDet(this.addressId)
  449. }
  450. // console.log(this.shopId, 'this.shopId')
  451. this.getShopDet(this.shopId)
  452. // 设置定时器
  453. this.timer = setInterval(() => {
  454. // 定时器执行的操作
  455. // this.getQishou()
  456. console.log('每分钟执行一次')
  457. // 这里可以放置你需要每分钟执行的代码
  458. this.getCouponList()
  459. this.getHuoList()
  460. }, 60 * 1000) // 60 * 1000 毫秒代表一分钟
  461. },
  462. watch: {
  463. totalPrice1() {
  464. this.getIntegralRules()
  465. }
  466. },
  467. methods: {
  468. getIntegralRules() {
  469. let data = {
  470. money: this.totalPrice1
  471. }
  472. this.$Request.get('/app/userintegral/getIntegralByMoney', data).then((res) => {
  473. console.log(res, '999')
  474. if (res.code == 0) {
  475. this.intergral = res.data.intergral
  476. this.maxIntegral = res.data.maxIntegral
  477. this.ruleAmount1 = res.data.ruleAmount1
  478. this.ruleAmount2 = res.data.ruleAmount2
  479. this.ruleMaxAmount = res.data.ruleMaxAmount
  480. this.ruleValue1 = res.data.ruleValue1
  481. this.ruleValue2 = res.data.ruleValue2
  482. if (res.data.flag == 1) {
  483. this.isIntegral = true
  484. } else {
  485. this.isIntegral = false
  486. }
  487. }
  488. })
  489. },
  490. //获取骑手上下班时间
  491. getQishou() {
  492. this.$Request.get('/app/tbindent/work-time').then((res) => {
  493. console.log(res, 'p')
  494. if (res.code == 0 && res.data) {
  495. if (this.orderType == 2) {
  496. if (this.autoSendOrder == 0) {
  497. //0是平台配
  498. this.workStart = parseInt(res.data.workingHoursOfRider.substring(0, 2))
  499. this.workStartMin = parseInt(res.data.workingHoursOfRider.substring(3, 5))
  500. this.workEnd = parseInt(res.data.workingHoursOfRider.substring(6, 8))
  501. } else if (this.autoSendOrder == 1) {
  502. this.workStart = parseInt(this.shopDet.businessHours.substring(0, 2))
  503. this.workStartMin = parseInt(this.shopDet.businessHours.substring(3, 5))
  504. this.workEnd = parseInt(this.shopDet.lockHours.substring(0, 2))
  505. }
  506. } else if (this.orderType == 1) {
  507. this.workStart = parseInt(this.shopDet.businessHours.substring(0, 2))
  508. this.workStartMin = parseInt(this.shopDet.businessHours.substring(3, 5))
  509. this.workEnd = parseInt(this.shopDet.lockHours.substring(0, 2))
  510. }
  511. this.yusongTime = res.data.timeOfRider
  512. var date = new Date()
  513. var currentHours = date.getHours()
  514. var currentMinute = date.getMinutes()
  515. var temp = []
  516. // currentHours = 12;
  517. var temp_time = []
  518. //如果当前时间大于20点
  519. var minite = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  520. if (parseInt(this.yusongTime / 60) == 0) {
  521. var h1 = 0
  522. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  523. } else {
  524. var h1 = parseInt(this.yusongTime / 60)
  525. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  526. }
  527. var acc = currentHours + h1
  528. var bcc = currentMinute + h2
  529. var teshu = this.workStart + h1
  530. if (bcc >= 60) {
  531. var b = bcc - 60
  532. var a = acc + 1
  533. } else {
  534. var b = bcc
  535. var a = acc
  536. }
  537. var a1 = a + 1
  538. var s1 = a.toString()
  539. var s2 = a1.toString()
  540. var e1 = b.toString()
  541. console.log(this.workEnd, h1, currentHours, 'o')
  542. var cc = (this.workStartMin + h2).toString()
  543. if (currentHours >= this.workEnd - h1) {
  544. var time2 = teshu + 1
  545. // this.data.warning = '当前时间段无骑手配送,现在下单,最早将于明日'+teshu + ':00'+'送达'
  546. uni.showModal({
  547. title: '提示',
  548. content: '当前时间段无骑手配送,现在下单,最早将于明日' + teshu + ':00' + '送达',
  549. success: (res) => {
  550. if (res.confirm) {
  551. } else if (res.cancel) {
  552. }
  553. }
  554. })
  555. // this.data.startDate = '明日 | '+teshu + ':00' + '-' + time2 + ':00'
  556. // this.data.startDate = '明早 | '+a + ':'+b + '-' + a1 + ':'+b
  557. temp[0] = ['明天']
  558. temp[1] = []
  559. // console.log(teshu,'明1',this.workEnd-h1)
  560. for (let i = teshu; i < this.workEnd - h1; ) {
  561. var i1 = i + 1
  562. var ss1 = i.toString()
  563. var ss2 = i1.toString()
  564. // console.log(ss1,'明')
  565. temp[1].push(ss1.padStart(2, 0) + ':' + cc.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + cc.padStart(2, 0))
  566. i += 1
  567. }
  568. } else if (currentHours < this.workStart) {
  569. var time2 = teshu + 1
  570. uni.showModal({
  571. title: '提示',
  572. content: '当前时间段无骑手配送,现在下单,最早将于今日' + teshu + ':00' + '送达',
  573. success: (res) => {
  574. if (res.confirm) {
  575. } else if (res.cancel) {
  576. }
  577. }
  578. })
  579. temp[0] = ['今天', '明天']
  580. temp[1] = []
  581. for (let i = teshu; i < this.workEnd - h1; ) {
  582. var i1 = i + 1
  583. var ss1 = i.toString()
  584. var ss2 = i1.toString()
  585. temp[1].push(ss1.padStart(2, 0) + ':' + cc.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + cc.padStart(2, 0))
  586. i += 1
  587. }
  588. } else {
  589. temp[0] = ['今天', '明天']
  590. temp[1] = []
  591. for (let i = a; i < this.workEnd - h1; ) {
  592. var i1 = i + 1
  593. var ss1 = i.toString()
  594. var ss2 = i1.toString()
  595. temp[1].push(ss1.padStart(2, 0) + ':' + e1.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + e1.padStart(2, 0))
  596. i += 1
  597. }
  598. }
  599. // this.$queue.setData({
  600. // multiArray:temp,
  601. // })
  602. this.data.multiArray = temp
  603. if (this.data.warning != '') {
  604. wx.showToast({
  605. title: this.data.warning,
  606. icon: 'none',
  607. duration: 3000
  608. })
  609. }
  610. }
  611. })
  612. },
  613. bindMultiPickerColumnChange: function (e) {
  614. console.log(e)
  615. console.log('第几列发生变化', e.detail.column)
  616. console.log('选择第几个', e.detail.value)
  617. let c = e.detail.column
  618. let v = e.detail.value
  619. var time = []
  620. var date = new Date()
  621. var currentHours = date.getHours()
  622. var currentMinute = date.getMinutes()
  623. var minite = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  624. if (parseInt(this.yusongTime / 60) == 0) {
  625. var h1 = 0
  626. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  627. } else {
  628. var h1 = parseInt(this.yusongTime / 60)
  629. var h2 = parseInt(this.yusongTime - parseInt(this.yusongTime / 60) * 60)
  630. }
  631. var acc = currentHours + h1
  632. var bcc = currentMinute + h2
  633. var teshu = this.workStart + h1
  634. if (bcc >= 60) {
  635. var b = bcc - 60
  636. var a = acc + 1
  637. } else {
  638. var b = bcc
  639. var a = acc
  640. }
  641. var a1 = a + 1
  642. var s1 = a.toString()
  643. var s2 = a1.toString()
  644. var e1 = b.toString()
  645. var cc = (this.workStartMin + h2).toString()
  646. // console.log(this.workStartMin,h2,'kkk')
  647. var temp = this.data.multiArray
  648. // currentHours = 12;
  649. if (c == 0) {
  650. if (temp[c][v] == '今天') {
  651. temp[1] = []
  652. for (let i = a; i < this.workEnd - h1; ) {
  653. var i1 = i + 1
  654. var ss1 = i.toString()
  655. var ss2 = i1.toString()
  656. temp[1].push(ss1.padStart(2, 0) + ':' + e1.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + e1.padStart(2, 0))
  657. i += 1
  658. }
  659. } else {
  660. temp[1] = []
  661. for (let i = teshu; i < this.workEnd - h1; ) {
  662. var i1 = i + 1
  663. var ss1 = i.toString()
  664. var ss2 = i1.toString()
  665. temp[1].push(ss1.padStart(2, 0) + ':' + cc.padStart(2, 0) + '-' + ss2.padStart(2, 0) + ':' + cc.padStart(2, 0))
  666. i += 1
  667. }
  668. }
  669. // this.$queue.setData({
  670. // multiArray:temp
  671. // })
  672. this.data.multiArray = temp
  673. this.$forceUpdate()
  674. }
  675. },
  676. bindStartMultiPickerChange: function (e) {
  677. let temp = this.data.multiArray
  678. // this.$queue.setData({
  679. // startDate:temp[0][e.detail.value[0]]+' | '+temp[1][e.detail.value[1]]
  680. // })
  681. this.data.startDate = temp[0][e.detail.value[0]] + ' | ' + temp[1][e.detail.value[1]]
  682. console.log(temp[0][e.detail.value[0]], temp[1][e.detail.value[1]].substring(0, 5), getDate(new Date(), 2).fullDate)
  683. if (this.data.startDate) {
  684. this.reservationFlag = 1
  685. if (temp[0][e.detail.value[0]] == '今天') {
  686. var date = getDate(new Date()).fullDate
  687. this.expectDeliveryTime = date + ' ' + temp[1][e.detail.value[1]].substring(0, 5) + ':00'
  688. } else if (temp[0][e.detail.value[0]] == '明天') {
  689. var date = getDate(new Date(), 1).fullDate
  690. this.expectDeliveryTime = date + ' ' + temp[1][e.detail.value[1]].substring(0, 5) + ':00'
  691. } else if (temp[0][e.detail.value[0]] == '后天') {
  692. var date = getDate(new Date(), 2).fullDate
  693. this.expectDeliveryTime = date + ' ' + temp[1][e.detail.value[1]].substring(0, 5) + ':00'
  694. }
  695. }
  696. },
  697. goCash() {
  698. uni.navigateTo({
  699. url: '/my/wallet/index'
  700. })
  701. },
  702. getMsgData() {
  703. this.$Request.get('/app/userintegral/findUserMessage').then((res) => {
  704. if (res.code == 0 && res.data) {
  705. this.userMoney = res.data.userMoney ? res.data.userMoney : 0
  706. }
  707. })
  708. },
  709. //获取店铺详情
  710. getShopDet(shopId) {
  711. let data = {
  712. shopId,
  713. lng: this.lng,
  714. lat: this.lat
  715. }
  716. this.$Request.get('/app/goods/selectGoodsList', data).then((res) => {
  717. console.log(res, 'data')
  718. if (res.code == 0 && res.data) {
  719. this.reservationOpenFlag = res.data.goodsShop.reservationOpenFlag
  720. this.autoSendOrder = res.data.goodsShop.autoSendOrder
  721. this.shopDet = res.data.goodsShop
  722. this.ifPaotui = res.data.goodsShop.enableFullReductionFlag
  723. this.getOrderList()
  724. // this.getQishou()
  725. }
  726. })
  727. },
  728. goBack() {
  729. uni.navigateBack({})
  730. },
  731. isShow() {
  732. this.show = true
  733. },
  734. //选择优惠活动弹框
  735. huodongShow() {
  736. this.youhui = true
  737. },
  738. getDistance() {
  739. if (this.address.lng && this.dataList.shopLng) {
  740. let data = {
  741. ol: this.address.lng,
  742. od: this.address.lat,
  743. dl: this.dataList.shopLng,
  744. dd: this.dataList.shopLat
  745. }
  746. this.$Request.post('/app/tbindent/distance', data).then((res) => {
  747. if (res.code == 0) {
  748. this.distance = res.data
  749. if (this.distance > Number(this.dataList.distributionDistance)) {
  750. this.isTrue = true
  751. } else {
  752. this.isTrue = false
  753. }
  754. }
  755. })
  756. }
  757. },
  758. close() {
  759. this.show = false
  760. },
  761. closeYouhui() {
  762. this.youhui = false
  763. },
  764. switchTab(e) {
  765. this.orderType = e
  766. this.coupon = ''
  767. // this.huodong = ''
  768. if (JSON.stringify(this.address) != '{}') {
  769. this.getDistance()
  770. }
  771. if (this.orderType == 2) {
  772. this.totalPrice1 = parseFloat(
  773. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
  774. ).toFixed(2)
  775. } else {
  776. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  777. }
  778. if (this.coupon) {
  779. let totalMoney = parseFloat(
  780. this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
  781. )
  782. if (totalMoney <= 0) {
  783. this.totalPrice1 = 0.01
  784. } else {
  785. this.totalPrice1 = totalMoney
  786. }
  787. }
  788. if (this.huodong) {
  789. let totalMoney = parseFloat(
  790. this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
  791. )
  792. if (totalMoney <= 0) {
  793. this.totalPrice1 = 0.01
  794. } else {
  795. this.totalPrice1 = totalMoney
  796. }
  797. }
  798. },
  799. // 删除优惠券
  800. detCoupon() {
  801. let data = {
  802. orderId: this.dataList.orderId
  803. }
  804. this.$Request.post('/app/order/deleteCouponByOrderId', data).then((res) => {
  805. if (res.code == 0) {
  806. }
  807. })
  808. },
  809. // 选择优惠券
  810. selCoupon(item) {
  811. this.coupon = item
  812. if (this.orderType == 2) {
  813. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  814. } else {
  815. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  816. }
  817. let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)).toFixed(2)
  818. if (totalMoney <= 0) {
  819. this.totalPrice1 = 0.01
  820. } else {
  821. this.totalPrice1 = totalMoney
  822. }
  823. let data = {
  824. parentId: this.dataList.parentId,
  825. couponId: this.coupon ? this.coupon.id : ''
  826. }
  827. this.$Request.post('/app/order/employCoupon', data).then((res) => {
  828. if (res.code == 0) {
  829. this.show = false
  830. }
  831. })
  832. },
  833. //选择活动activityId
  834. selctHuo(item) {
  835. this.huodong = item
  836. if (this.orderType == 2) {
  837. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  838. } else {
  839. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  840. }
  841. let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)).toFixed(2)
  842. if (totalMoney <= 0) {
  843. this.totalPrice1 = 0.01
  844. } else {
  845. this.totalPrice1 = totalMoney
  846. }
  847. this.youhui = false
  848. },
  849. // 优惠卷列表
  850. getCouponList() {
  851. // console.log(this.paotuiMoney)
  852. // console.log(this.dabaoMoney, '123123')
  853. let minMoney =
  854. this.orderType == 2
  855. ? parseFloat(parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney)).toFixed(2)
  856. : parseFloat(this.totalPrice).toFixed(2)
  857. let data = {
  858. shopId: this.dataList.shopId,
  859. page: 1,
  860. limit: 10,
  861. minMoney: minMoney
  862. }
  863. this.$Request.get('/app/coupon/selectUserCouponList', data).then((res) => {
  864. if (res.code == 0) {
  865. this.couponList = res.data.list
  866. console.log(this.couponList, 'this.couponList', this.coupon)
  867. if (this.coupon) {
  868. let activityExists = this.couponList.some((item) => item.couponId === this.coupon.couponId)
  869. if (!activityExists) {
  870. this.coupon = ''
  871. if (this.orderType == 2) {
  872. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  873. } else {
  874. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  875. }
  876. let totalMoney = parseFloat(
  877. this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
  878. ).toFixed(2)
  879. if (totalMoney <= 0) {
  880. this.totalPrice1 = 0.01
  881. } else {
  882. this.totalPrice1 = totalMoney
  883. }
  884. uni.showModal({
  885. title: '提示',
  886. content: '当前选择的优惠券已过期,请重新选择',
  887. success: (res) => {
  888. if (res.confirm) {
  889. this.coupon = ''
  890. } else if (res.cancel) {
  891. this.coupon = ''
  892. }
  893. }
  894. })
  895. }
  896. }
  897. }
  898. })
  899. },
  900. // 优惠活动列表
  901. getHuoList() {
  902. let data = {
  903. orderId: this.dataList.orderId
  904. }
  905. this.$Request.get(`/app/activity/suit-activity/${this.dataList.orderId}`, data).then((res) => {
  906. if (res.code == 0) {
  907. this.huoList = res.data
  908. // console.log(this.huodong)
  909. if (this.huodong) {
  910. // console.log(this.huodong,'有呢')
  911. let activityExists = this.huoList.some((item) => item.activityId === this.huodong.activityId)
  912. if (!activityExists) {
  913. this.huodong = ''
  914. if (this.orderType == 2) {
  915. this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
  916. } else {
  917. this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
  918. }
  919. let totalMoney = parseFloat(
  920. this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
  921. ).toFixed(2)
  922. if (totalMoney <= 0) {
  923. this.totalPrice1 = 0.01
  924. } else {
  925. this.totalPrice1 = totalMoney
  926. }
  927. uni.showModal({
  928. title: '提示',
  929. content: '当前选择的优惠活动已过期,请重新选择',
  930. success: (res) => {
  931. if (res.confirm) {
  932. this.huodong = ''
  933. } else if (res.cancel) {
  934. this.huodong = ''
  935. }
  936. }
  937. })
  938. }
  939. }
  940. // 匹配出最优惠的活动
  941. if (this.huoList.length) {
  942. this.huodong = this.huoList.reduce((prev, current) => (prev.discountAmount > current.discountAmount ? prev : current))
  943. this.selctHuo(this.huodong)
  944. }
  945. // for(var i=0;i<this.huoList.length;i++){
  946. // if(this.huodong!=''&&this.huodong.activityId!=this.huoList[i].activityId){
  947. // console.log('优惠活动过期')
  948. // }
  949. // }
  950. // if(this.huoList.length==0){
  951. // this.huodong=''
  952. // }
  953. }
  954. })
  955. },
  956. //拼单支付成功取消订单
  957. cancelPinDan() {
  958. // if (this.orderId) {
  959. // let data = {
  960. // orderId: this.orderId
  961. // };
  962. // this.$Request.post('/app/order/deleteOrder', data).then(res => {
  963. // if (res.code == 0) {
  964. // uni.removeStorageSync('orderId');
  965. // }
  966. // });
  967. // }
  968. },
  969. // 商品列表
  970. getOrderList() {
  971. // 显示加载提示
  972. uni.showLoading({
  973. title: '加载中', // 加载提示文本
  974. mask: true // 是否显示透明蒙层,防止触摸穿透
  975. })
  976. this.paotuiMoney = 0
  977. this.totalPrice1 = 0
  978. if (this.status == 0) {
  979. console.log(6666)
  980. this.payContinue()
  981. return
  982. }
  983. let data = {
  984. shopId: this.shopId,
  985. status: 1,
  986. page: 1,
  987. limit: 1000
  988. // orderType: this.orderType
  989. }
  990. // console.log(data)
  991. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  992. // console.log(res)
  993. uni.hideLoading()
  994. if (res.code == 0 && res.data.pageUtils.list.length) {
  995. this.GoodsorderId = res.data.pageUtils.list[0].orderId
  996. this.dataList = res.data.pageUtils.list[0]
  997. if (this.dataList && this.dataList.orderGoodsList && this.dataList.orderGoodsList[0]) {
  998. this.dabaoMoney = 0
  999. this.dataList.orderGoodsList[0].forEach((res) => {
  1000. res.goodsPicture = res.goodsPicture.split(',')
  1001. this.dabaoMoney += res.goodsPack * res.goodsNum
  1002. this.goodsMoney += res.goodsPrice * res.goodsNum
  1003. this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney)
  1004. })
  1005. this.goodsList = this.dataList.orderGoodsList[0]
  1006. }
  1007. console.log(this.dataList, this.dabaoMoney, 'kkklll')
  1008. if (this.ifPaotui == 1) {
  1009. this.paotuiMoney = this.dataList.errandMoney
  1010. } else if (this.ifPaotui == 0) {
  1011. // 判断商品金额是否大于最低减免配送费金额
  1012. console.log(this.goodsMoney, '商品总金额', res, this.dataList.exemptMinMoney)
  1013. if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
  1014. this.paotuiMoney = 0
  1015. } else {
  1016. this.paotuiMoney = this.dataList.errandMoney
  1017. }
  1018. }
  1019. this.totalPrice = res.data.money
  1020. console.log(this.totalPrice)
  1021. console.log(this.paotuiMoney)
  1022. console.log(this.dabaoMoney)
  1023. console.log(this.address.insideDeliveryFee)
  1024. if (this.orderType == 2) {
  1025. this.totalPrice1 = parseFloat(
  1026. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
  1027. ).toFixed(2)
  1028. } else {
  1029. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  1030. }
  1031. // console.log(this.dataList)
  1032. this.getCouponList()
  1033. this.getHuoList()
  1034. this.detCoupon()
  1035. this.getDistance()
  1036. }
  1037. // 加载提示关闭
  1038. uni.hideLoading()
  1039. })
  1040. },
  1041. payContinue() {
  1042. let data = {
  1043. orderId: this.orderId,
  1044. page: 1,
  1045. limit: 1000
  1046. }
  1047. console.log(data)
  1048. this.$Request.get('/app/order/selectOrder', data).then((res) => {
  1049. console.log(res)
  1050. uni.hideLoading()
  1051. if (res.code == 0 && res.data.pageUtils.list.length) {
  1052. this.GoodsorderId = res.data.pageUtils.list[0].orderId
  1053. this.dataList = res.data.pageUtils.list[0]
  1054. if (this.dataList && this.dataList.orderGoodsList && this.dataList.orderGoodsList[0]) {
  1055. this.dataList.orderGoodsList[0].forEach((res) => {
  1056. res.goodsPicture = res.goodsPicture.split(',')
  1057. this.dabaoMoney += res.goodsPack * res.goodsNum
  1058. this.goodsMoney += res.goodsPrice * res.goodsNum
  1059. this.goodsMoney = parseFloat(this.goodsMoney + this.dabaoMoney)
  1060. })
  1061. this.goodsList = this.dataList.orderGoodsList[0]
  1062. }
  1063. console.log(this.dataList, this.dabaoMoney, 'kkklll')
  1064. if (this.ifPaotui == 1) {
  1065. this.paotuiMoney = this.dataList.errandMoney
  1066. } else if (this.ifPaotui == 0) {
  1067. // 判断商品金额是否大于最低减免配送费金额
  1068. console.log(this.goodsMoney, '商品总金额', res, this.dataList.exemptMinMoney)
  1069. if (Number(this.goodsMoney) >= Number(this.dataList.exemptMinMoney)) {
  1070. this.paotuiMoney = 0
  1071. } else {
  1072. this.paotuiMoney = this.dataList.errandMoney
  1073. }
  1074. }
  1075. this.totalPrice = res.data.money
  1076. if (this.orderType == 2) {
  1077. this.totalPrice1 = parseFloat(
  1078. parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
  1079. ).toFixed(2)
  1080. } else {
  1081. this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
  1082. }
  1083. // console.log(this.dataList)
  1084. this.getCouponList()
  1085. this.getHuoList()
  1086. this.detCoupon()
  1087. this.getDistance()
  1088. }
  1089. // 加载提示关闭
  1090. uni.hideLoading()
  1091. })
  1092. },
  1093. selectWay(item) {
  1094. this.openWay = item.id
  1095. },
  1096. takeReark() {
  1097. let datas = {
  1098. orderId: this.GoodsorderId,
  1099. remark: this.remark
  1100. }
  1101. this.$Request.post('/app/order/updateOrdersRemark', datas).then((res) => {
  1102. if (res.code == 0) {
  1103. } else {
  1104. uni.showToast({
  1105. title: res.msg,
  1106. icon: 'none'
  1107. })
  1108. }
  1109. })
  1110. },
  1111. toSettlement_throttle: throttle(function () {
  1112. this.toSettlement()
  1113. }, 1000),
  1114. // 立即结算
  1115. toSettlement() {
  1116. if (this.isThrottle == false) {
  1117. return
  1118. }
  1119. if (this.isTrue && this.orderType == 2) {
  1120. uni.showToast({
  1121. title: '超出配送范围',
  1122. icon: 'none'
  1123. })
  1124. reutrn
  1125. }
  1126. if (this.orderType == 2 && !this.address.addressId) {
  1127. uni.showToast({
  1128. title: '请选择收货地址',
  1129. icon: 'none'
  1130. })
  1131. return
  1132. }
  1133. if (this.remark) {
  1134. this.takeReark()
  1135. }
  1136. uni.showLoading({
  1137. title: '支付中...',
  1138. mask: true // 是否显示透明蒙层,防止触摸穿透
  1139. })
  1140. this.isThrottle = false
  1141. if (this.openWay == 1) {
  1142. //零钱支付
  1143. let data = {
  1144. userId: uni.getStorageSync('userId'),
  1145. type: 1, //支付方式 1表示微信支付、4或5表示支付宝支付
  1146. activityId: this.huodong ? this.huodong.activityId : '',
  1147. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1148. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1149. parentId: this.dataList.parentId,
  1150. couponId: this.coupon ? this.coupon.id : '',
  1151. addressId: this.address.addressId ? this.address.addressId : '',
  1152. orderType: this.orderType
  1153. }
  1154. console.log(data, 'l')
  1155. this.$Request.post('/app/wxPay/balanceOrder', data).then((res) => {
  1156. console.log(res, '结果')
  1157. if (res.code == 0) {
  1158. uni.hideLoading()
  1159. this.$queue.showToast('支付成功')
  1160. this.cancelPinDan()
  1161. setTimeout(() => {
  1162. this.isThrottle = true
  1163. uni.switchTab({
  1164. url: '/pages/order/index'
  1165. })
  1166. }, 1000)
  1167. } else {
  1168. this.$queue.showToast(res.msg)
  1169. this.isThrottle = true
  1170. }
  1171. })
  1172. } else if (this.openWay == 2) {
  1173. //微信支付
  1174. // #ifdef H5
  1175. let data = {
  1176. userId: uni.getStorageSync('userId'),
  1177. type: 1, //支付方式 1表示微信支付、4或5表示支付宝支付
  1178. activityId: this.huodong ? this.huodong.activityId : '',
  1179. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1180. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1181. parentId: this.dataList.parentId,
  1182. couponId: this.coupon ? this.coupon.id : '',
  1183. addressId: this.address.addressId ? this.address.addressId : '',
  1184. orderType: this.orderType,
  1185. type: 2
  1186. }
  1187. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1188. uni.hideLoading()
  1189. if (res.code == 0) {
  1190. this.callPay(res.data)
  1191. } else {
  1192. uni.showToast({
  1193. title: res.msg,
  1194. icon: 'none'
  1195. })
  1196. this.isThrottle = true
  1197. }
  1198. })
  1199. // #endif
  1200. // #ifdef MP-WEIXIN
  1201. this.$Request.get('/app/new-pay/enable-new-pay').then((res) => {
  1202. console.log(res, '987')
  1203. if (res.code == 0) {
  1204. let data = {
  1205. userId: uni.getStorageSync('userId'),
  1206. //支付方式 1表示微信支付、4或5表示支付宝支付
  1207. // type: 4,
  1208. activityId: this.huodong ? this.huodong.activityId : '',
  1209. reservationFlag: this.reservationFlag, //是否预约单 1是、0否
  1210. expectDeliveryTime: this.expectDeliveryTime, //期待送达时间 yyyy-MM-dd HH:mm:ss
  1211. parentId: this.dataList.parentId,
  1212. couponId: this.coupon ? this.coupon.id : '',
  1213. addressId: this.address.addressId ? this.address.addressId : '',
  1214. orderType: this.orderType,
  1215. type: res.enable ? 1 : 3,
  1216. idCard: this.idcard1
  1217. }
  1218. console.log(data)
  1219. if (res.enable) {
  1220. console.log('xin')
  1221. this.newPay(data)
  1222. } else {
  1223. console.log('jiu')
  1224. this.oldPay(data)
  1225. }
  1226. }
  1227. })
  1228. // #endif
  1229. // #ifdef APP
  1230. let data = {
  1231. type: 1,
  1232. parentId: this.dataList.parentId,
  1233. couponId: this.coupon ? this.coupon.id : '',
  1234. addressId: this.address.addressId ? this.address.addressId : '',
  1235. orderType: this.orderType
  1236. }
  1237. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1238. console.log(res)
  1239. this.showpay = false
  1240. if (res.code == 0) {
  1241. this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data))
  1242. } else {
  1243. this.isThrottle = true
  1244. }
  1245. })
  1246. // #endif
  1247. } else if (this.openWay == 3) {
  1248. // #ifdef H5
  1249. let data = {
  1250. type: 5,
  1251. parentId: this.dataList.parentId,
  1252. couponId: this.coupon ? this.coupon.id : '',
  1253. addressId: this.address.addressId ? this.address.addressId : '',
  1254. orderType: this.orderType
  1255. }
  1256. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1257. this.showpay = false
  1258. this.isThrottle = true
  1259. const div = document.createElement('div')
  1260. div.innerHTML = res.data //此处form就是后台返回接收到的数据
  1261. document.body.appendChild(div)
  1262. document.forms[0].submit()
  1263. })
  1264. // #endif
  1265. // #ifdef APP
  1266. let data = {
  1267. type: 4,
  1268. parentId: this.dataList.parentId,
  1269. couponId: this.coupon ? this.coupon.id : '',
  1270. addressId: this.address.addressId ? this.address.addressId : '',
  1271. orderType: this.orderType
  1272. }
  1273. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1274. this.showpay = false
  1275. this.setPayment('alipay', res.data)
  1276. })
  1277. // #endif
  1278. }
  1279. },
  1280. newPay(data) {
  1281. this.$Request.get('/app/order/get-pay-param', data).then((res) => {
  1282. console.log(res, '新支付')
  1283. if (res.code == 0) {
  1284. uni.requestPayment({
  1285. provider: 'wxpay',
  1286. timeStamp: res.timeStamp,
  1287. nonceStr: res.nonceStr,
  1288. package: res.packageStr,
  1289. signType: res.signType,
  1290. paySign: res.paySign,
  1291. success: (suc) => {
  1292. this.cancelPinDan()
  1293. uni.hideLoading()
  1294. this.$queue.showToast('支付成功')
  1295. setTimeout(() => {
  1296. this.isThrottle = true
  1297. uni.switchTab({
  1298. url: '/pages/order/index'
  1299. })
  1300. }, 1000)
  1301. },
  1302. fail: (err) => {
  1303. console.log('fail:' + JSON.stringify(err))
  1304. this.isThrottle = true
  1305. uni.setStorageSync('isClear', true)
  1306. uni.showToast({
  1307. title: '支付失败',
  1308. icon: 'none',
  1309. mask: true
  1310. })
  1311. setTimeout(() => {
  1312. uni.reLaunch({
  1313. url: '/pages/order/index'
  1314. })
  1315. }, 1500)
  1316. }
  1317. })
  1318. } else {
  1319. uni.showToast({
  1320. title: res.msg,
  1321. icon: 'none'
  1322. })
  1323. this.isThrottle = true
  1324. }
  1325. })
  1326. },
  1327. oldPay(data) {
  1328. this.$Request.post('/app/wxPay/wxPayJsApiOrder', data).then((res) => {
  1329. console.log(res, '旧支付')
  1330. // uni.hideLoading();
  1331. if (res.code == 0) {
  1332. uni.requestPayment({
  1333. provider: 'wxpay',
  1334. timeStamp: res.data.timestamp,
  1335. nonceStr: res.data.noncestr,
  1336. package: res.data.package,
  1337. signType: res.data.signType,
  1338. paySign: res.data.sign,
  1339. success: (suc) => {
  1340. this.cancelPinDan()
  1341. uni.hideLoading()
  1342. this.$queue.showToast('支付成功')
  1343. setTimeout(() => {
  1344. this.isThrottle = true
  1345. uni.switchTab({
  1346. url: '/pages/order/index'
  1347. })
  1348. }, 1000)
  1349. },
  1350. fail: (err) => {
  1351. console.log('fail:' + JSON.stringify(err))
  1352. this.isThrottle = true
  1353. uni.setStorageSync('isClear', true)
  1354. uni.showToast({
  1355. title: '支付失败',
  1356. icon: 'none',
  1357. mask: true
  1358. })
  1359. setTimeout(() => {
  1360. uni.reLaunch({
  1361. url: '/pages/order/index'
  1362. })
  1363. }, 1500)
  1364. }
  1365. })
  1366. } else {
  1367. uni.showToast({
  1368. title: res.msg,
  1369. icon: 'none'
  1370. })
  1371. this.isThrottle = true
  1372. }
  1373. })
  1374. },
  1375. callPay: function (response) {
  1376. if (typeof WeixinJSBridge === 'undefined') {
  1377. if (document.addEventListener) {
  1378. document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false)
  1379. } else if (document.attachEvent) {
  1380. document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response))
  1381. document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response))
  1382. }
  1383. } else {
  1384. this.onBridgeReady(response)
  1385. }
  1386. },
  1387. onBridgeReady: function (response) {
  1388. let that = this
  1389. if (!response.package) {
  1390. return
  1391. }
  1392. WeixinJSBridge.invoke(
  1393. 'getBrandWCPayRequest',
  1394. {
  1395. appId: response.appid, //公众号名称,由商户传入
  1396. timeStamp: response.timestamp, //时间戳,自1970年以来的秒数
  1397. nonceStr: response.noncestr, //随机串
  1398. package: response.package,
  1399. signType: response.signType, //微信签名方式:
  1400. paySign: response.sign //微信签名
  1401. },
  1402. function (res) {
  1403. if (res.err_msg === 'get_brand_wcpay_request:ok') {
  1404. // 使用以上方式判断前端返回,微信团队郑重提示:
  1405. //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
  1406. that.cancelPinDan()
  1407. that.$queue.showToast('支付成功')
  1408. setTimeout(function () {
  1409. uni.switchTab({
  1410. url: '/pages/order/index'
  1411. })
  1412. that.isThrottle = true
  1413. }, 1000)
  1414. } else {
  1415. uni.hideLoading()
  1416. that.isThrottle = true
  1417. }
  1418. WeixinJSBridge.log(response.err_msg)
  1419. }
  1420. )
  1421. },
  1422. isCheckPay(code, name, order) {
  1423. if (code == 0) {
  1424. console.log('999999999999')
  1425. this.setPayment(name, order)
  1426. } else {
  1427. uni.hideLoading()
  1428. uni.showToast({
  1429. title: '支付信息有误'
  1430. })
  1431. this.isThrottle = true
  1432. }
  1433. },
  1434. setPayment(name, order) {
  1435. console.log(777777777, name, order)
  1436. uni.requestPayment({
  1437. provider: name,
  1438. orderInfo: order, //微信、支付宝订单数据
  1439. success: (res) => {
  1440. uni.hideLoading()
  1441. this.cancelPinDan()
  1442. uni.showLoading({
  1443. title: '支付成功',
  1444. icon: 'none'
  1445. })
  1446. setTimeout(() => {
  1447. this.isThrottle = true
  1448. uni.navigateBack()
  1449. }, 1000)
  1450. },
  1451. fail: (err) => {
  1452. uni.hideLoading()
  1453. this.isThrottle = true
  1454. },
  1455. complete: () => {
  1456. this.isThrottle = true
  1457. uni.hideLoading()
  1458. }
  1459. })
  1460. },
  1461. // 获取选择的地址
  1462. getAddressDet(e) {
  1463. let data = {
  1464. addressId: e
  1465. }
  1466. this.$Request.get('/app/address/selectAddressById', data).then((res) => {
  1467. console.log(res, 77777777)
  1468. if (res.code == 0) {
  1469. this.address = res.data
  1470. if (this.address.insideAddressId) {
  1471. this.getInsideDeliveryFee(this.address.insideAddressId)
  1472. } else {
  1473. this.getInsideDeliveryFee(0)
  1474. }
  1475. if (JSON.stringify(this.address) != '{}') {
  1476. this.getDistance()
  1477. }
  1478. uni.removeStorageSync('addressId')
  1479. }
  1480. })
  1481. },
  1482. // 获取地址列表
  1483. getAddressList() {
  1484. let data = {
  1485. page: 1,
  1486. limit: 100
  1487. }
  1488. this.$Request.get('/app/address/selectAddressList', data).then((res) => {
  1489. console.log(res, 741852)
  1490. if (res.code == 0 && res.data.list.length) {
  1491. this.address = res.data.list[0]
  1492. res.data.list.forEach((ret) => {
  1493. if (ret.addressDefault == 1) {
  1494. this.address = ret
  1495. }
  1496. })
  1497. console.log(this.address, '我的地址列表460777')
  1498. if (this.address.insideAddressId) {
  1499. this.getInsideDeliveryFee(this.address.insideAddressId)
  1500. } else {
  1501. this.getInsideDeliveryFee(0)
  1502. }
  1503. if (JSON.stringify(this.address) != '{}') {
  1504. this.getDistance()
  1505. }
  1506. }
  1507. })
  1508. },
  1509. getInsideDeliveryFee(insideAddressId) {
  1510. this.$Request.get(`/app/inside-address/${insideAddressId}`).then((res) => {
  1511. console.log(res, 987456)
  1512. if (res.code == 0) {
  1513. this.address.insideDeliveryFee = res.data.deliveryFee || 0
  1514. }
  1515. })
  1516. },
  1517. goAddress() {
  1518. uni.navigateTo({
  1519. url: '/my/address/index?add=1'
  1520. })
  1521. },
  1522. // 点击调起地图查看位置
  1523. goMap() {
  1524. // let that = this
  1525. // let plugin = requirePlugin('routePlan');
  1526. // let key = 'A3RBZ-23MHW-PTPR5-RLCER-UJTXQ-JIF2G'; //使用在腾讯位置服务申请的key
  1527. // let referer = that.dataList.shopName; //调用插件的app的名称
  1528. // let endPoint = JSON.stringify({ //终点
  1529. // 'name': that.dataList.shopName,
  1530. // 'latitude': that.dataList.shopLat,
  1531. // 'longitude': that.dataList.shopLng,
  1532. // });
  1533. // wx.navigateTo({
  1534. // url: 'plugin://routePlan/index?key=' + key + '&referer=' + referer + '&endPoint=' + endPoint
  1535. // });
  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: 25rpx;
  1632. height: 40rpx;
  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. border-radius: 10rpx;
  1714. }
  1715. .tosend_header_food_ce {
  1716. margin: 0 0 0 4%;
  1717. width: 57%;
  1718. }
  1719. .tosend_header_food_ri {
  1720. text-align: right;
  1721. width: 25%;
  1722. }
  1723. .tosend_header_food_text {
  1724. font-size: 34rpx;
  1725. font-weight: 500;
  1726. color: #333333;
  1727. line-height: 1.8;
  1728. }
  1729. .tosend_header_food_text text {
  1730. font-size: 25rpx;
  1731. }
  1732. .tosend_header_food_text2 {
  1733. font-size: 28rpx;
  1734. font-weight: 500;
  1735. color: #999999;
  1736. }
  1737. .do_top {
  1738. padding-top: 3%;
  1739. }
  1740. .do_bot {
  1741. padding-bottom: 3%;
  1742. border-bottom: 2rpx solid #e6e6e6;
  1743. }
  1744. .tosend_header_do {
  1745. width: 100%;
  1746. color: #333333;
  1747. font-size: 30rpx;
  1748. display: flex;
  1749. margin-top: 20rpx;
  1750. line-height: 1.5;
  1751. }
  1752. .tosend_header_do view {
  1753. /* flex: 1; */
  1754. }
  1755. .tosend_header_do_ri {
  1756. text-align: right;
  1757. }
  1758. .tosend_header_do_le2 {
  1759. font-family: PingFang SC;
  1760. font-weight: 500;
  1761. color: #999999;
  1762. padding-top: 1.5%;
  1763. }
  1764. .tosend_header_do_ri2 {
  1765. text-align: right;
  1766. color: #ea0000;
  1767. font-size: 40rpx;
  1768. }
  1769. .tosend_header_do_ri2 text {
  1770. font-size: 30rpx;
  1771. }
  1772. /* 支付 */
  1773. /* .payment_all{
  1774. width: 88%;margin: 3% auto;padding: 3%;background-color: #FFFFFF;
  1775. border-radius: 18rpx;
  1776. }
  1777. .payment{
  1778. width: 100%;display: flex;margin-top: 3%;
  1779. }
  1780. .payment_le{
  1781. width: 13%;
  1782. }
  1783. .payment_le image{
  1784. width: 60rpx;height: 60rpx;
  1785. }
  1786. .payment_ce{
  1787. width: 52%;
  1788. font-size: 30rpx;
  1789. font-weight: bold;
  1790. color: #333333;line-height: 60rpx;
  1791. }
  1792. .payment_ri{
  1793. width: 35%;text-align: right;line-height: 60rpx;
  1794. } */
  1795. /* 结算 */
  1796. .goorder {
  1797. width: 100%;
  1798. padding: 2% 3%;
  1799. position: fixed;
  1800. bottom: 0;
  1801. background-color: #ffffff;
  1802. z-index: 999;
  1803. }
  1804. .goorder_but {
  1805. width: 100%;
  1806. line-height: 3.5;
  1807. text-align: center;
  1808. background: #fcd202;
  1809. border-radius: 36rpx;
  1810. font-weight: 700;
  1811. }
  1812. .goorder_but_ {
  1813. opacity: 0.5;
  1814. }
  1815. .bg {
  1816. background-color: #ffffff;
  1817. }
  1818. .tabBtn {
  1819. /* background-color: #f6f6fa; */
  1820. height: 60rpx;
  1821. line-height: 60rpx;
  1822. color: #999999;
  1823. font-size: 38rpx;
  1824. }
  1825. .active {
  1826. /* width: 82rpx; */
  1827. height: 6rpx;
  1828. background: #fcd202;
  1829. /* position: relative;
  1830. top: -20rpx; */
  1831. z-index: 9;
  1832. }
  1833. </style>