confirmOrder.vue 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949
  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>