confirmOrder.vue 53 KB

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