confirmOrder.vue 53 KB

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