confirmOrder.vue 53 KB

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