confirmOrder.vue 54 KB

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