index.vue 82 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963
  1. <template>
  2. <view>
  3. <view v-if="xcxSelect === '是'">
  4. <view class="content" style="position: relative;">
  5. <!-- #ifdef APP -->
  6. <cover-view class="headTop">
  7. <cover-view class="flex align-center padding-lr" @click="openMap()"
  8. v-if="isDw&&!ordershow&&!driverShow" style="margin-top: 70rpx;height: 80rpx;">
  9. <cover-view style="color: #333333;"> {{city?city:'暂无地址'}} </cover-view>
  10. <cover-image v-if="globalImages" :src="globalImages + 'images/static/image/right.png'"
  11. style="width: 14rpx;height: 22rpx;margin-left: 8rpx;">
  12. </cover-image>
  13. </cover-view>
  14. <cover-view class="padding-lr" v-else @click="openFest()"
  15. style="margin-top: 80rpx;height:65rpx;width: 80rpx;">
  16. <cover-image v-if="globalImages" :src="globalImages + 'images/static/image/icon_back.png'"
  17. style="width:18rpx;height: 28rpx;margin-left: 8rpx;">
  18. </cover-image>
  19. </cover-view>
  20. </cover-view>
  21. <!-- #endif -->
  22. <!-- #ifndef APP -->
  23. <view class="headTop">
  24. <view class="flex align-center" @click="openMap()" v-if="isDw&&!ordershow&&!driverShow">
  25. <view> {{city}} </view>
  26. <image v-if="globalImages" :src="globalImages + 'images/static/image/right.png'" style="width: 14rpx;height: 22rpx;margin-left: 8rpx;">
  27. </image>
  28. </view>
  29. <view v-else @click="openFest()">
  30. <image v-if="globalImages" :src="globalImages + 'images/static/image/icon_back.png'"
  31. style="width:18rpx;height: 28rpx;margin-left: 8rpx;">
  32. </image>
  33. </view>
  34. </view>
  35. <!-- #endif -->
  36. <!-- #ifndef MP-WEIXIN -->
  37. <view class="page-body">
  38. <view class="page-section page-section-gap">
  39. <map id="map" style="width: 100%;" :style="!pcMoney?'height: 55vh':'height: 55vh'"
  40. :latitude="latitude" :longitude="longitude" :markers="covers" :show-location="true"
  41. :polyline="polyline" :polygons="polylist">
  42. </map>
  43. </view>
  44. </view>
  45. <!-- #endif -->
  46. <!-- #ifdef MP-WEIXIN -->
  47. <view class="page-body">
  48. <view class="page-section page-section-gap">
  49. <map id="map" style="width: 100%; " :style="!pcMoney?'height: 55vh':'height: 55vh'"
  50. :latitude="latitude" :longitude="longitude" :markers="covers" :show-location="true"
  51. :customCallout="customCallout" :polygons="polylist" :polyline="polyline">
  52. </map>
  53. </view>
  54. </view>
  55. <!-- #endif -->
  56. <view class="controls-title" style="position:absolute;top: 90%;">
  57. <!-- <view class="orderb" v-if="haveorder.length!=0&&!driverShow" @click="goOrerDer()">
  58. <view>您当前有一个正在进行的订单</view>
  59. <view class="flex align-center">
  60. <view class="text-sm">立即查看</view>
  61. <image src="../../static/image/go.png" style="width: 14rpx;height: 24rpx;margin-left: 5rpx;">
  62. </image>
  63. </view>
  64. </view> -->
  65. <view v-if="popupshow">
  66. <view style="position: relative;width: 100%;height: 730rpx; overflow: auto; -webkit-overflow-scrolling: touch;">
  67. <cover-image v-if="globalImages" :src="globalImages + 'images/sc_bg.png'" style="z-index: 99;width: 100%;height: 280rpx;position: absolute;top: -40rpx;"
  68. ></cover-image>
  69. <view class="controls-box" style="position: absolute; top: 160rpx;width: 100%; padding: 30upx 30rpx 20rpx;">
  70. <!-- <view class="controls-tabs" v-if="xcxSelect=='是'">
  71. <view v-for="(item,index) in classifyLsit" :key="index" v-if="index<4"
  72. @tap="change(index,item)" class="atabs_ds">
  73. <view>{{item.name}}</view>
  74. <view :class="{btna:current == index}"></view>
  75. </view>
  76. </view> -->
  77. <!-- <view style="color: #999999;" class="flex align-center justify-center margin-bottom-sm"
  78. @click="openHour()" v-if="current==3">
  79. <view v-if="!daijiaTime">小时代驾</view>
  80. <view v-else>{{daijiaTime}}</view>
  81. <image src="../../static/image/go.png"
  82. style="width: 14rpx;height: 21rpx;margin-left: 10rpx;">
  83. </image>
  84. </view>
  85. <view style="color: #999999;" class="flex align-center justify-center margin-bottom-sm"
  86. v-if="current==1" @click="godaijia()">
  87. <view v-if="daijiao.length==0">替朋友叫代驾</view>
  88. <view v-else>{{daijiao.name}} {{daijiao.phone}}</view>
  89. <image src="../../static/image/go.png"
  90. style="width: 14rpx;height: 21rpx;margin-left: 10rpx;">
  91. </image>
  92. </view> -->
  93. <!-- <view style="color: #999999;" class="flex align-center justify-center margin-bottom"
  94. v-if="current==2" @click="openTime()">
  95. <view v-if="!yuyueTime">选择预约时间</view>
  96. <view v-else style="color: #333333;">{{yuyueTime}}</view>
  97. <image src="../../static/image/go.png"
  98. style="width: 14rpx;height: 21rpx;margin-left: 10rpx;">
  99. </image>
  100. </view> -->
  101. <view style="background: #fee8d9;padding: 40rpx 20rpx 20rpx 20rpx;border-radius: 15rpx;">
  102. <view style="margin: 0 10rpx 20rpx;">
  103. 出发地
  104. </view>
  105. <view class="addbox bgc" @click="changeAdd(current,1)">
  106. <view class="add_cont">
  107. <view class="green"></view>
  108. <view class="" v-if="addlist.length==0">正在获取上车点...</view>
  109. <view class="add_tit" v-else>
  110. <view class="flex align-center">
  111. 从<view class="text-cut" style="color: #346EF6;max-width: 420rpx;">
  112. {{addlist.address}}
  113. </view>出发
  114. </view>
  115. <!-- <view class="text-sm" style="color: #999999;font-weight: 500;margin-top: 5rpx;"
  116. v-if="riderNumber">
  117. 附近有{{riderNumber}}个司机
  118. </view> -->
  119. </view>
  120. </view>
  121. <view>
  122. <image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'" style="width: 16rpx;height: 25rpx;">
  123. </image>
  124. </view>
  125. </view>
  126. <view style="margin: 0 10rpx 20rpx;">
  127. 目的地
  128. </view>
  129. <view class="addbox bg" @click="changeAdd(current,2)">
  130. <view class="add_cont">
  131. <view class="orgin"></view>
  132. <view class="add_tit" v-if="addlists.length==0">输入目的地</view>
  133. <view class="add_tit" v-else>{{addlists.address}}</view>
  134. </view>
  135. <view>
  136. <image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'" style="width: 16rpx;height: 25rpx;">
  137. </image>
  138. </view>
  139. </view>
  140. <view style="margin: 0 10rpx 20rpx;">
  141. 出发时间
  142. </view>
  143. <view class="addbox bg">
  144. <view class="add_cont">
  145. <image v-if="globalImages" :src="globalImages + 'images/rili.png'" style="width: 30rpx;height: 30rpx;"></image>
  146. <view style="width: 540rpx;display: flex;justify-content: center;">
  147. <view style="flex: 1;" @click="openTime(1)">
  148. <view class="add_tit" v-if="!yuyueTime">开始预约时间</view>
  149. <view class="add_tit" v-else>{{yuyueTime}}</view>
  150. </view>
  151. <view style="flex: 1;" @click="openTime(2)">
  152. <view class="add_tit" v-if="!yyEndTime">结束预约时间</view>
  153. <view class="add_tit" v-else>{{yyEndTime}}</view>
  154. </view>
  155. </view>
  156. </view>
  157. <view>
  158. <image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'" style="width: 16rpx;height: 25rpx;">
  159. </image>
  160. </view>
  161. </view>
  162. <!-- <view class="text-center text-lg margin-tb" v-if="current==2">预估<text class="text-bold"
  163. style="font-size: 48rpx;">18</text>元</view> -->
  164. <view class="pc_view" v-if="pcMoney">
  165. <view :class="pcIndex == 2 ? 'pc_items' : 'pc_item'" @tap="selPC(2)">
  166. <view class="pc_name">拼车</view>
  167. <image v-if="globalImages" :src="globalImages + 'images/static/upload/duoren.png'" style="width: 143rpx;height: 73rpx;"></image>
  168. <view v-if="pcMoney" class="pc_money">拼到人<text>{{pcMoney}}</text>元</view>
  169. </view>
  170. <view :class="pcIndex == 1 ? 'pc_items' : 'pc_item'" @tap="selPC(1)">
  171. <view class="pc_name">独享</view>
  172. <image v-if="globalImages" :src="globalImages + 'images/static/upload/danren.png'"></image>
  173. <view v-if="dxMoney" class="pc_money">一口价<text>{{dxMoney}}</text>元</view>
  174. </view>
  175. </view>
  176. <view class="flex justify-between margin-top">
  177. <!-- <view class="zx_view" @tap="payorder()">
  178. <image v-if="globalImages" :src="globalImages + 'images/shijian.png'" style="width: 35rpx;height: 37rpx;">
  179. </image>
  180. <view class="zx_name">预约</view>
  181. </view> -->
  182. <view class="zx_view" @tap="personShow = true">
  183. <image v-if="globalImages" :src="globalImages + 'images/yiren.png'" style="width: 34rpx;height: 32rpx;">
  184. </image>
  185. <view class="zx_name">{{personNum}}人乘坐</view>
  186. </view>
  187. <view class="zx_view" @click="openRemk">
  188. <image v-if="globalImages" :src="globalImages + 'images/beizhu.png'" style="width: 30rpx;height: 32rpx;">
  189. </image>
  190. <view class="zx_name">添加备注</view>
  191. </view>
  192. </view>
  193. <view class="flex align-center justify-center margin-lr margin-top-xs zx_name"
  194. v-if="dxMoney" @click="openYouhui">
  195. {{-couponName?-couponName:'使用优惠劵'}}
  196. <image v-if="globalImages" :src="globalImages + 'images/static/image/my/right_icon.png'"
  197. style="width: 12rpx;height: 20rpx;margin-left: 5rpx;margin-top: 4rpx;">
  198. </image>
  199. </view>
  200. <!-- @tap="payorder()" -->
  201. </view>
  202. <view class="btna" @click="goNav('/my/classes/list')">发布行程</view>
  203. </view>
  204. </view>
  205. <!-- <view class="margin-lr" v-if="bannerList.length > 0">
  206. <swiper class="swiper" autoplay="1500" :indicator-dots="true" :circular='true'
  207. indicator-active-color="#ffffff" indicator-color="#cccccc">
  208. <swiper-item class="swiper-wrap" v-for="(item,index) in bannerList" :key='index'>
  209. <image :src="item.imageUrl" style="width: 100%;border-radius: 8upx;height: 161upx;"
  210. @click="goWeb(item.url)" mode="aspectFill"></image>
  211. </swiper-item>
  212. </swiper>
  213. </view> -->
  214. </view>
  215. <view v-if="ordershow">
  216. <view class="controls-box" style="margin: 30upx 30rpx 20rpx;background: #FFFFFF;">
  217. <view class="padding ">
  218. <view class="text-lg text-bold text-center">您好,预估里程时长{{basicPrice.duration}}分钟</view>
  219. <view class="text-center text-lg margin-top">预估
  220. <text class="text-bold" style="font-size: 48rpx;">{{basicPrice.allMoney}}</text>元
  221. </view>
  222. <view class="flex align-center justify-between " style="width: 50%;margin: 0 auto;">
  223. <view class="flex align-center justify-center margin-top" @click="openmingxi">
  224. <view class="text-sm" style="color: #999999;">查看明细</view>
  225. <image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
  226. style="width: 10rpx;height: 15rpx;margin-left: 8rpx;">
  227. </image>
  228. </view>
  229. <view class="flex align-center justify-center margin-top" @click="openRemk">
  230. <view class="text-sm" style="color: #999999;">备注</view>
  231. <image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
  232. style="width: 14rpx;height: 21rpx;margin-left: 8rpx;">
  233. </image>
  234. </view>
  235. </view>
  236. <view class="bg flex align-center justify-between margin-top" v-if="current==1"
  237. style="border-radius: 16rpx;padding: 20rpx 45rpx;">
  238. <view class="flex align-center" @click="godaijia">
  239. <view style="color: #666666;">{{daijiao.phone}}</view>
  240. <image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
  241. style="width: 14rpx;height: 21rpx;margin-left: 8rpx;">
  242. </image>
  243. </view>
  244. <view class="line"></view>
  245. <view class="flex align-center" @click="selectShow = true">
  246. <view style="color: #666666;">{{payUsername}}</view>
  247. <image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
  248. style="width: 14rpx;height: 21rpx;margin-left: 8rpx;">
  249. </image>
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. <view class="flex align-center justify-end margin-lr margin-top-xs" @click="openYouhui">
  255. {{-couponName?-couponName:'使用优惠劵'}}
  256. <image v-if="globalImages" :src="globalImages + 'images/static/image/right.png'"
  257. style="width: 14rpx;height: 24rpx;margin-left: 5rpx;">
  258. </image>
  259. </view>
  260. <view class="flex align-center justify-center padding-top" v-if="xcxSelect=='是'">
  261. <view class="flex align-center " style="font-size: 26upx;">
  262. <image v-if="showAgree" @tap="isShowAgree"
  263. src="https://api.shengqianxiong.com.cn/img/20201112/669aa8946cfb4ebdb459d57193c0ebca.png"
  264. style="width: 32upx;height: 32upx;"></image>
  265. <image v-else @tap="isShowAgree"
  266. src="https://api.shengqianxiong.com.cn/img/20201112/1e9102fc891f4d86a13c7b2ba6921cba.png"
  267. style="width: 32upx;height: 32upx;"></image>
  268. <view class="margin-left-xs">我已阅读并同意<text style="color: #346EF6;"
  269. @click="goWeb('/my/setting/sijixieyi')">《代驾服务协议》</text></view>
  270. </view>
  271. </view>
  272. <view class="btn" @click="payorder()">呼叫代驾</view>
  273. <view class="text-center margin-top-sm" @click="openFest()">取消呼叫</view>
  274. </view>
  275. </view>
  276. <view class="margin-lr margin-top" style="background: #FFFFFF;border-radius: 24rpx;" v-if="driverShow">
  277. <view class=" flex align-start justify-between " style="padding: 40rpx 30rpx 40rpx;">
  278. <view>
  279. <view class="text-bold" style="font-size: 40rpx;">正在为您全力寻找司机</view>
  280. <view class="text-lg margin-top-xs flex align-center ">已等待
  281. <smh-timer ref="timer" @timing="timing" :auto="true"></smh-timer>
  282. <!-- <text style="color: #346EF6;">00:02</text> -->
  283. </view>
  284. </view>
  285. <view class="qxdj" @click="qxshow = true">取消代驾</view>
  286. </view>
  287. </view>
  288. <!-- 新人红包弹框 -->
  289. <!-- -->
  290. <cover-view class="hongbao xinhongbao" v-if="HBShow">
  291. <cover-view style="width: 100%;height: 100%;margin: 0 auto;position: relative;padding: 0rpx;">
  292. <cover-view @click.stop="HBShow=false"
  293. style="position: absolute;right: 120rpx;top: 460rpx;font-size: 200rpx;font-weight: bold;z-index: 999;">
  294. <cover-image v-if="globalImages" :src="globalImages + 'images/static/image/close.png'"
  295. style="width:40rpx;height: 40rpx;"></cover-image>
  296. </cover-view>
  297. <!-- @click.stop="takemoney()" -->
  298. <cover-image v-if="globalImages" :src="globalImages + 'images/hb_bg.png'" class="hb_img"
  299. ></cover-image>
  300. <cover-view class="btna_view" @tap="takemoney()">立即领取</cover-view>
  301. </cover-view>
  302. </cover-view>
  303. <!-- 当前正在进行弹框 -->
  304. <cover-view class="hongbao" v-if="hoveorderShow">
  305. <cover-view style="width: 60%;margin: 400rpx auto;position: relative;padding: 40rpx;">
  306. <cover-view @click.stop="hoveorderShow=false"
  307. style="position: absolute;right: 0rpx;top: 0rpx;font-size: 32rpx;font-weight: bold;z-index: 999;">
  308. <cover-image v-if="globalImages" :src="globalImages + 'images/static/image/close.png'"
  309. style="width: 40rpx;height:40rpx;"></cover-image>
  310. </cover-view>
  311. <cover-image v-if="globalImages" :src="globalImages + 'images/static/image/hoveorderbg.png'" class="hoveorderimg"
  312. @click.stop="goOrerDer()"></cover-image>
  313. </cover-view>
  314. </cover-view>
  315. <view v-else></view>
  316. </view>
  317. <u-popup v-model="payshow" mode="center" border-radius="14" width="560rpx" :closeable="true">
  318. <view class="padding text-center">
  319. <image v-if="globalImages" :src="globalImages + 'images/static/image/yue.png'" style="width: 209rpx;height: 191rpx;"></image>
  320. <view class="margin-top" style="font-size: 38rpx;font-weight: bold;">
  321. <view>您的账户余额不足</view>
  322. <view>请先去充值</view>
  323. </view>
  324. <view class="czbtn">去充值</view>
  325. </view>
  326. </u-popup>
  327. <!-- #ifdef APP -->
  328. <cover-view v-if="qxshow" class="flex align-center justify-center" @click="closeHaveorder(2)"
  329. style="background: rgba(0, 0, 0, 0.2);width: 100%;height: 100vh;position: absolute;top: 0;left: 0;z-index: 9;">
  330. <cover-view class="" style="background: #FFFFFF;border-radius: 24rpx;width: 580rpx;">
  331. <cover-view class="padding text-center">
  332. <cover-image v-if="globalImages" :src="globalImages + 'images/static/image/qxdj.png'"
  333. style="width: 406rpx;height: 181rpx;"></cover-image>
  334. <cover-view class="margin-top-sm" style="font-size: 32rpx;font-weight: bold;">
  335. 取消后重新呼叫可能会耽
  336. </cover-view>
  337. <cover-view class="margin-top-xs" style="font-size: 32rpx;font-weight: bold;">
  338. 误您的出行时间,是否要取消?
  339. </cover-view>
  340. <cover-view class="flex justify-between margin-top-60">
  341. <cover-view class="btns" @click="qxshow=false">暂不取消</cover-view>
  342. <cover-view class="btnss" @click="bindorderOff">确认取消</cover-view>
  343. </cover-view>
  344. </cover-view>
  345. </cover-view>
  346. </cover-view>
  347. <cover-view v-else></cover-view>
  348. <!-- #endif -->
  349. <!-- #ifndef APP -->
  350. <u-popup v-model="qxshow" mode="center" border-radius="14" width="580rpx" :closeable="true">
  351. <view class="padding text-center">
  352. <image v-if="globalImages" :src="globalImages + 'images/static/image/qxdj.png'" style="width: 406rpx;height: 181rpx;"></image>
  353. <view class="margin-top-sm" style="font-size: 32rpx;font-weight: bold;">
  354. 取消后重新呼叫可能会耽
  355. 误您的出行时间,是否要取消?
  356. </view>
  357. <view class="flex justify-between margin-top-60">
  358. <view class="btns" @click="qxshow=false">暂不取消</view>
  359. <view class="btnss" @click="bindorderOff">确认取消</view>
  360. </view>
  361. </view>
  362. </u-popup>
  363. <!-- #endif -->
  364. <!-- #ifdef APP -->
  365. <cover-view v-if="moneyShow" class="flex align-center justify-center" @click="closeHaveorder(1)"
  366. style="background: rgba(0, 0, 0, 0.2);width: 100%;height: 100vh;position: absolute;top: 0;left: 0;z-index: 9;">
  367. <cover-view
  368. style="width: 520rpx;background: #FFFFFF;border-radius: 24rpx;position: relative;z-index: 99;">
  369. <cover-view class="text-lg text-bold text-center margin-top">价格明细</cover-view>
  370. <cover-view class="margin-tb" style="padding-left: 100rpx;">
  371. <cover-view class="margin-bottom-xs"
  372. v-if="basicPrice.allMoney">总费用:¥{{basicPrice.allMoney}}</cover-view>
  373. <cover-view class="margin-bottom-xs"
  374. v-if="basicPrice.distance">总公里数:{{basicPrice.distance}}km</cover-view>
  375. <cover-view class="margin-bottom-xs"
  376. v-if="basicPrice.kilometer">基础公里数:{{basicPrice.kilometer}}km</cover-view>
  377. <cover-view class="margin-bottom-xs"
  378. v-if="basicPrice.initMoney">基础起步价:¥{{basicPrice.initMoney}}</cover-view>
  379. <cover-view class="margin-bottom-xs"
  380. v-if="basicPrice.metre">超出部分公里数:{{basicPrice.metre}}km</cover-view>
  381. <cover-view class="margin-bottom-xs"
  382. v-if="basicPrice.unitOverMoney">超出部分每公里价格:¥{{basicPrice.unitOverMoney}}</cover-view>
  383. <cover-view class="margin-bottom-xs"
  384. v-if="basicPrice.otherMoney">超出部分收费总金额:¥{{basicPrice.otherMoney}}</cover-view>
  385. <cover-view class="margin-bottom-xs" v-if="basicPrice.isNight==1">当前是夜间时段 </cover-view>
  386. <cover-view class="margin-bottom-xs" v-if="basicPrice.isBeforeDawn==1">当前是凌晨时段 </cover-view>
  387. <cover-view class="margin-bottom-xs"
  388. v-if="basicPrice.durationAllMoney">预估总时长费:¥{{basicPrice.durationAllMoney}}</cover-view>
  389. <cover-view v-if="basicPrice.durationMoney">每分钟时长费:¥{{basicPrice.durationMoney}}</cover-view>
  390. </cover-view>
  391. <cover-view class="margin-bottom flex align-center justify-center">
  392. <cover-image @click.stop="closeHaveorder(1)"
  393. src="https://daijia.xianmaxiong.com/file/uploadPath/2023/07/24/5f4da4be9181f414b57ad4b57dd90ffa.png"
  394. style="width: 50rpx;height: 50rpx;"></cover-image>
  395. </cover-view>
  396. </cover-view>
  397. </cover-view>
  398. <cover-view v-else></cover-view>
  399. <!-- #endif -->
  400. <!-- #ifndef APP -->
  401. <u-popup v-model=" moneyShow" mode="center" width="520rpx" border-radius="24" :closeable="true">
  402. <view class="padding">
  403. <view class="text-lg text-bold text-center ">价格明细</view>
  404. <view class="margin-top" style="padding-left: 100rpx;">
  405. <view class="margin-bottom-xs" v-if="basicPrice.allMoney">总费用:¥{{basicPrice.allMoney}}</view>
  406. <view class="margin-bottom-xs" v-if="basicPrice.distance">总公里数:{{basicPrice.distance}}km</view>
  407. <view class="margin-bottom-xs" v-if="basicPrice.kilometer">基础公里数:{{basicPrice.kilometer}}km
  408. </view>
  409. <view class="margin-bottom-xs" v-if="basicPrice.initMoney">基础起步价:¥{{basicPrice.initMoney}}
  410. </view>
  411. <view class="margin-bottom-xs" v-if="basicPrice.metre">超出部分公里数:{{basicPrice.metre}}km</view>
  412. <view class="margin-bottom-xs" v-if="basicPrice.unitOverMoney">
  413. 超出部分每公里价格:¥{{basicPrice.unitOverMoney}}</view>
  414. <view class="margin-bottom-xs" v-if="basicPrice.otherMoney">超出部分收费总金额:¥{{basicPrice.otherMoney}}
  415. </view>
  416. <view class="margin-bottom-xs" v-if="basicPrice.isNight==1">当前是夜间时段 </view>
  417. <view class="margin-bottom-xs" v-if="basicPrice.isBeforeDawn==1">当前是凌晨时段 </view>
  418. <view class="margin-bottom-xs" v-if="basicPrice.durationAllMoney">
  419. 预估总时长费:¥{{basicPrice.durationAllMoney}}</view>
  420. <view v-if="basicPrice.durationMoney">每分钟时长费:¥{{basicPrice.durationMoney}}</view>
  421. </view>
  422. </view>
  423. </u-popup>
  424. <!-- #endif -->
  425. <u-popup v-model="youhuiShow" mode="bottom" border-radius="14" height="650rpx" :closeable="true">
  426. <view style="padding: 30rpx 30rpx 50rpx 30rpx;background: #F5F8FC;">
  427. <view class="text-lg text-bold text-center">优惠劵</view>
  428. <view class="flex align-center justify-end">
  429. <view class="deteJuan" @click="deteYouhuj">不使用优惠劵</view>
  430. </view>
  431. <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
  432. @scrolltolower="lower" @scroll="scroll">
  433. <view class="money_box" v-for="(item,index) in youhuiList" :key="index">
  434. <view class="box_tit">
  435. <view class="money_name">{{item.couponName}}</view>
  436. <view class="money_price"><text>¥</text>{{item.money}}</view>
  437. </view>
  438. <view class="money_data" v-if="item.expirationTime">有效期至{{item.expirationTime}}
  439. </view>
  440. <view class="money_data" v-else>永久有效</view>
  441. <view class="money_line">
  442. <u-line direction="row" color="#E6E6E6" border-style="dashed" />
  443. </view>
  444. <view class="box_bottom">
  445. <view class="money_use">满{{item.minMoney}}元可使用</view>
  446. <view class="money_btn">
  447. <view class="lj_use" @click="useryouhui(item)">
  448. 立即使用
  449. </view>
  450. </view>
  451. </view>
  452. </view>
  453. </scroll-view>
  454. </view>
  455. </u-popup>
  456. <u-popup v-model="personShow" mode="bottom" border-radius="40" :closeable="true">
  457. <view style="padding: 50rpx 30rpx 50rpx 30rpx;">
  458. <view class="text-lg text-bold">选择乘车人数</view>
  459. <view class="text-df text-bold margin-top-lg">请如实填写人数,若人数不符,车主有权拒绝通行</view>
  460. <view class="flex margin-tb-lg">
  461. <view class="u-page__tag-item" v-for="(item, index) in radios" :key="index">
  462. <view :class="personNum == item.num ? 'rs_item_sel' : 'rs_item'"
  463. @tap="checkPerson(item.num)">
  464. {{item.num}}人
  465. </view>
  466. </view>
  467. </view>
  468. <!-- <view class="margin-top-xl" style="background: #F5F8FC;padding: 20rpx 25rpx;border-radius: 24rpx;">
  469. <u-input v-model="remarks" type="textarea" maxlength="100" placeholder="请输入备注(备注车型或者要求驾照,100字以内)"
  470. height="240" />
  471. </view> -->
  472. <view class="remkbtn" @click="savePerson">确定</view>
  473. </view>
  474. </u-popup>
  475. <u-popup v-model="remkShow" mode="bottom" border-radius="40" :closeable="true">
  476. <view style="padding: 50rpx 30rpx 50rpx 30rpx;">
  477. <view class="text-lg text-bold">添加行程备注</view>
  478. <view v-for="(item,index) in bzList">
  479. <view class="text-df text-bold margin-top-lg">{{item.title}}</view>
  480. <view class="flex">
  481. <view v-if="item.content && item.content.length > 0" v-for="(itee,indee) in item.content">
  482. <view :class="itee.state ? 'bz_item_sel' : 'bz_item'" @tap="checkBZ(index,indee)">
  483. {{itee.name}}
  484. </view>
  485. </view>
  486. </view>
  487. </view>
  488. <view class="remkbtn" @click="remkShow = false">确定</view>
  489. </view>
  490. </u-popup>
  491. <!-- 小时选择 -->
  492. <u-select v-model="selectTimeShow" mode="single-column" :list="Timelist" @confirm="confirmTime"></u-select>
  493. <u-popup v-model="showpay" mode="bottom">
  494. <view class="popup_pay">
  495. <view class="bgs margin-top padding-lr radius">
  496. <view style="padding: 0 20upx;margin-top: 36rpx;">
  497. <view
  498. style="display: flex;height: 100upx;align-items: center;padding: 20upx 0;justify-content: center;"
  499. v-for="(item,index) in openLists" :key='index'>
  500. <image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
  501. </image>
  502. <view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
  503. {{item.name}}
  504. </view>
  505. <radio-group name="openWay" style="margin-left: 45rpx;" @tap='selectWay(item)'>
  506. <label class="tui-radio">
  507. <radio color="#3699FF" :checked="openWay == item.id ? true : false" />
  508. </label>
  509. </radio-group>
  510. </view>
  511. </view>
  512. </view>
  513. <view class="pay_btns" @click="pay()">确认支付</view>
  514. </view>
  515. </u-popup>
  516. <!-- 支付选择 -->
  517. <u-select v-model="selectShow" mode="single-column" :list="list" @confirm="confirmPay"></u-select>
  518. <u-picker :start-year="dqYear" v-model="Timeshow" mode="time" :params="params"
  519. @confirm="confirm"></u-picker>
  520. <view class="sos" @click="goJinji()">
  521. <image v-if="globalImages" :src="globalImages + 'images/static/image/my/jjqz.png'" mode=""></image>
  522. </view>
  523. </view>
  524. <view class="" v-if="xcxSelect === '否'">
  525. <view class="index_banner">
  526. <swiper class="swiper-container" :autoplay="true" :interval="4000" :circular="true"
  527. :indicator-dots="true" indicator-active-color="#4B75FF" indicator-color="#cccccc"
  528. style="height: 218upx;">
  529. <swiper-item class="swiper-wrapper" style="" v-for="(item, index3) in bannerLists" :key="index3">
  530. <image lazy-load='true' fade-show='true' :src="item.imgUrl" v-if="item" class="banner_image"
  531. mode="scaleToFill"></image>
  532. </swiper-item>
  533. </swiper>
  534. </view>
  535. <view class="flex justify-center margin">
  536. <view style="flex:1;display: flex;align-items: center;">
  537. <image v-if="globalImages" :src="globalImages + 'images/static/upload/top1.png'" class="centeritem_image"></image>
  538. <view class="centeritem_text">独立部署</view>
  539. </view>
  540. <view style="flex:1;display: flex;align-items: center;">
  541. <image v-if="globalImages" :src="globalImages + 'images/static/upload/top2.png'" class="centeritem_image"></image>
  542. <view class="centeritem_text">商业开源</view>
  543. </view>
  544. <view style="flex:1;display: flex;align-items: center;">
  545. <image v-if="globalImages" :src="globalImages + 'images/static/upload/top3.png'" class="centeritem_image"></image>
  546. <view class="centeritem_text">使用文档</view>
  547. </view>
  548. <view style="flex:1;display: flex;align-items: center;">
  549. <image v-if="globalImages" :src="globalImages + 'images/static/upload/top4.png'" class="centeritem_image"></image>
  550. <view class="centeritem_text">优质售后</view>
  551. </view>
  552. </view>
  553. <!--首页公告开始-->
  554. <swiper v-if="messageList.length > 0" :autoplay="true" :vertical="true" :interval="4000" :circular="true"
  555. :indicator-dots="false" class="index_gonggao">
  556. <block v-for="(item1, index10) in messageList" :key="index10">
  557. <swiper-item style="height: 60upx;">
  558. <view style="display: flex;align-items: center;">
  559. <image v-if="globalImages" :src="globalImages + 'images/static/upload/laba.png'" style="width: 31upx;height: 31upx;margin-top: -5upx;">
  560. </image>
  561. <text style="margin-left: 10rpx;">{{ item1.title }}</text>
  562. </view>
  563. </swiper-item>
  564. </block>
  565. </swiper>
  566. <view class="index_bottom_list">
  567. <view class="index_bottom_list_view" @tap='goKeFu' v-for="(item,index) in homegoodsList"
  568. :key='index' v-if="homegoodsList.length > 0">
  569. <image style="border-radius: 16upx;" lazy-load="true" class="index_bottom_list_viewImage"
  570. :src="item.coverImg"></image>
  571. <view style="padding: 10upx 16upx 16upx 16upx;">
  572. <view style="width: 100%;">
  573. <text class="limapboxqing2"><text class="indexr"
  574. style=""><text>成品源码</text></text>{{ item.title }}</text>
  575. </view>
  576. <view style="display: flex;margin-top: 20rpx;justify-content: space-between;">
  577. <view style="font-size: 40upx;color: #FF2A47;font-weight: bold;"><text
  578. style="font-size: 20upx;margin-right: 10upx;">¥</text>{{item.price}}</view>
  579. <view class="save_btn">查看详情</view>
  580. </view>
  581. </view>
  582. </view>
  583. </view>
  584. <view class="cu-modal" :class="modalName == 'Image' ? 'show' : ''" @tap="hideModal">
  585. <image :src="erweimaImg" @tap="selectPhoto(erweimaImg)" mode="widthFix" style="margin-top: 50%;">
  586. </image>
  587. </view>
  588. <!-- 悬浮上拉 -->
  589. <view class="kefu_item" @tap="goKeFu">
  590. <image src="https://myshop.xianmxkj.com/kefu.gif"></image>
  591. </view>
  592. </view>
  593. </view>
  594. </template>
  595. <script>
  596. // 引入SDK核心类,地图组件
  597. import QQMapWX from '@/components/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js'
  598. import { waitForGlobalImages } from '@/utils/globalImageLoader'
  599. export default {
  600. data() {
  601. return {
  602. modalName: '',
  603. erweimaImg: '',
  604. homegoodsList: [],
  605. messageList: [],
  606. bannerLists: [],
  607. ordersId: '',
  608. timeSel: 1,
  609. yyEndTime: '',
  610. personShow: false,
  611. radios: [{
  612. num: 1,
  613. checked: true
  614. },
  615. {
  616. num: 2,
  617. checked: false
  618. },
  619. {
  620. num: 3,
  621. checked: false
  622. },
  623. {
  624. num: 4,
  625. checked: false
  626. }
  627. ],
  628. showpay: false,
  629. openWay: 1,
  630. openLists: [],
  631. bzList: [],
  632. userName: '',
  633. phone: '',
  634. personNum: 1,
  635. pcMoney: 0, //拼车价格
  636. dxMoney: 0, //独享价格
  637. pcIndex: 2,
  638. is_focus: false,
  639. remarks: '', //需求备注
  640. HBShow: false,
  641. id: 0, // 使用 marker点击事件 需要填写id
  642. title: 'map',
  643. latitude: '',
  644. longitude: '',
  645. // iconPath: '../../static/image/qi.png',
  646. qqmapsdk: {}, // 腾讯地图小程序的SDK
  647. covers: [], // 地图上面的标记点
  648. to: { // 目的地坐标
  649. latitude: '',
  650. longitude: '',
  651. },
  652. polyline: [], //路线
  653. polylines: '',
  654. polylist: [],
  655. classifyLsit: [{
  656. id: 1,
  657. name: '即时代驾'
  658. }, {
  659. id: 2,
  660. name: '朋友代叫'
  661. }, {
  662. id: 3,
  663. name: '预约代驾'
  664. }, {
  665. id: 1,
  666. name: '包时代驾'
  667. }],
  668. current: 0,
  669. value0: '',
  670. value1: '',
  671. value2: '',
  672. value3: '',
  673. type: 'text',
  674. clearable: false,
  675. riderNumber: 0,
  676. // 用户红包
  677. newUserFlag: 2,
  678. token: '',
  679. bannerList: [],
  680. noticeList: [],
  681. tuiguang: '',
  682. tuiguangImg: '',
  683. arr: [],
  684. showModal1: true,
  685. invitationCode: '',
  686. city: '',
  687. showAgree: false, //协议是否选择
  688. payshow: false,
  689. qxshow: false,
  690. isDw: true,
  691. yuyueTime: '',
  692. Timeshow: false,
  693. params: {
  694. year: true,
  695. month: true,
  696. day: true,
  697. hour: true,
  698. minute: true,
  699. second: false
  700. },
  701. addlist: [], //出发地址
  702. addressId: '',
  703. addlists: [], //目的地
  704. addressIds: "",
  705. popupshow: true,
  706. ordershow: false,
  707. basicPrice: [], //基础价格
  708. driverShow: false,
  709. moneyShow: false, //价格明细
  710. haveorder: [], //正在进行订单
  711. youhuiShow: false, //优惠劵弹框
  712. daijiao: [], //代叫信息
  713. selectShow: false, //下单人切换
  714. list: [{
  715. value: '1',
  716. label: '我来支付'
  717. },
  718. {
  719. value: '2',
  720. label: '对方支付'
  721. }
  722. ],
  723. payUser: 0,
  724. payUsername: '我来支付',
  725. youhuiList: [], //优惠劵
  726. couponName: '',
  727. couponId: '',
  728. scrollTop: 0,
  729. old: {
  730. scrollTop: 0
  731. },
  732. timer: '',
  733. hoveorderShow: false, //正在进行订单
  734. isFist: true,
  735. key: '',
  736. dqYear: '',
  737. remkShow: false, //备注弹框
  738. remarks: '',
  739. district: '',
  740. province: '',
  741. daijiaTime: '',
  742. timeId: '',
  743. selectTimeShow: false,
  744. Timelist: [],
  745. xcxSelect: '是',
  746. globalImages: ''
  747. }
  748. },
  749. onLoad(e) {
  750. waitForGlobalImages().then((path) => {
  751. console.log('✅ 全局图片路径:', path)
  752. this.globalImages = path
  753. })
  754. let that = this
  755. // #ifdef MP-WEIXIN
  756. if (e.scene) {
  757. const scene = decodeURIComponent(e.scene);
  758. if (scene.split('=')[0].indexOf('userId') != -1) {
  759. let riderUserId = scene.split('=')[1]
  760. console.log(riderUserId)
  761. that.$queue.setData('riderUserId', riderUserId);
  762. } else {
  763. that.$queue.setData('inviterCode', scene.split(',')[0]);
  764. }
  765. }
  766. // #endif
  767. // 获取邀请码保存到本地
  768. if (e.invitation) {
  769. that.$queue.setData('inviterCode', e.invitation);
  770. }
  771. that.$Request.getT('/app/common/type/128').then(res => {
  772. if (res.code == 0 && res.data && res.data.value) {
  773. that.key = res.data.value
  774. // 实例化API核心类
  775. that.qqmapsdk = new QQMapWX({
  776. key: that.key // 自己申请的key值
  777. })
  778. }
  779. });
  780. this.$Request.getT('/app/common/type/313').then(res => {
  781. if (res.code == 0) {
  782. if (res.data && res.data.value) {
  783. // #ifdef MP-WEIXIN
  784. // res.data.value
  785. this.$queue.setData('xcxSelect', '是')
  786. // #endif
  787. // #ifndef MP-WEIXIN
  788. this.$queue.setData('xcxSelect', '是')
  789. // #endif
  790. this.xcxSelect = uni.getStorageSync('xcxSelect')
  791. if (this.xcxSelect === '否') {
  792. this.getBannerListS();
  793. this.getGuangGao();
  794. this.getHomeGoods("");
  795. }
  796. }
  797. }
  798. });
  799. // yuyueTime
  800. // yyEndTime
  801. let timeNow = new Date();
  802. timeNow.setMinutes(timeNow.getMinutes() + 30);
  803. let timeEndNow = new Date();
  804. timeEndNow.setMinutes(timeEndNow.getMinutes() + 60);
  805. this.dqYear = timeNow.getFullYear()
  806. this.yuyueTime =
  807. `${this.padZero(timeNow.getMonth() + 1)}月${this.padZero(timeNow.getDate())}日${this.padZero(timeNow.getHours())}:${this.padZero(timeNow.getMinutes())}`;
  808. this.yyEndTime =
  809. `${this.padZero(timeEndNow.getMonth() + 1)}月${this.padZero(timeEndNow.getDate())}日${this.padZero(timeEndNow.getHours())}:${this.padZero(timeEndNow.getMinutes())}`;
  810. if (uni.getStorageSync('token')) {
  811. // that.timer = setInterval(() => {
  812. // console.log('111123666')
  813. // that.gethaveOrder() //获取正在进行订单k
  814. // }, 5000);
  815. } else {
  816. clearInterval(that.timer)
  817. }
  818. // #ifdef MP-WEIXIN
  819. this.openLists = [{
  820. id: 1,
  821. image: '../../static/image/icon_weixin.png',
  822. name: '微信'
  823. }, {
  824. id: 3,
  825. image: '../../static/image/jinbi.png',
  826. name: '零钱'
  827. }]
  828. // #endif
  829. // #ifdef H5
  830. let ua = navigator.userAgent.toLowerCase();
  831. if (ua.indexOf('micromessenger') !== -1) { //微信浏览器
  832. this.$Request.get('/app/common/type/443').then(res => {
  833. if (res.data && res.data.value && res.data.value == '是') {
  834. this.openLists = [{
  835. id: 1,
  836. image: '../../static/image/icon_weixin.png',
  837. name: '微信'
  838. }, {
  839. id: 3,
  840. image: '../../static/image/jinbi.png',
  841. name: '零钱'
  842. }]
  843. this.openWay = 1
  844. } else {
  845. this.openLists = [{
  846. id: 3,
  847. image: '../../static/image/jinbi.png',
  848. name: '零钱'
  849. }]
  850. this.openWay = 3
  851. }
  852. })
  853. } else { //非微信浏览器
  854. this.openLists = [{
  855. id: 2,
  856. image: '../../static/image/zhifubao.png',
  857. name: '支付宝'
  858. }, {
  859. id: 3,
  860. image: '../../static/image/jinbi.png',
  861. name: '零钱'
  862. }]
  863. this.openWay = 2
  864. }
  865. // #endif
  866. // #ifdef APP-PLUS
  867. this.openLists = [{
  868. id: 1,
  869. image: '../../static/image/icon_weixin.png',
  870. name: '微信'
  871. },
  872. {
  873. id: 2,
  874. image: '../../static/image/zhifubao.png',
  875. name: '支付宝'
  876. }, {
  877. id: 3,
  878. image: '../../static/image/jinbi.png',
  879. name: '零钱'
  880. }
  881. ]
  882. // #endif
  883. uni.getLocation({
  884. type: 'gcj02',
  885. geocode: true, //设置该参数为true可直接获取经纬度及城市信息
  886. success: function(res) {
  887. console.log(res, '地理位置')
  888. that.latitude = res.latitude
  889. that.longitude = res.longitude
  890. // that.getsflist()
  891. uni.setStorageSync('latitude', res.latitude)
  892. uni.setStorageSync('longitude', res.longitude)
  893. that.selectCity(that.longitude, that.latitude);
  894. },
  895. fail: function() {
  896. console.log('获取地址失败')
  897. uni.startLocationUpdate({
  898. type: 'gcj02', //gcj02 wgs84
  899. isHighAccuracy: true, //开启高精度定位(!!!必需)
  900. geocode: true,
  901. success: res => {
  902. uni.onLocationChange(function(res2) {
  903. console.log('实时纬度:' + res2.latitude);
  904. console.log('实时经度:' + res2.longitude);
  905. that.latitude = res2.latitude
  906. that.longitude = res2.longitude
  907. uni.setStorageSync('latitude', that.latitude)
  908. uni.setStorageSync('longitude', that.longitude)
  909. that.selectCity(that.longitude, that.latitude);
  910. // that.getsflist()
  911. // that.getHourlist() //获取小时列表
  912. });
  913. },
  914. fail: err => {
  915. // clearInterval(this.ordertimer)
  916. console.error('开启小程序接收位置消息失败:', err)
  917. },
  918. complete: msg => {
  919. // clearInterval(this.ordertimer)
  920. console.log('调用开启小程序接收位置消息 API 完成')
  921. }
  922. });
  923. }
  924. })
  925. },
  926. onHide() {
  927. clearInterval(this.timer)
  928. },
  929. onUnload() {
  930. clearInterval(this.timer)
  931. },
  932. onShow() {
  933. this.invitationCode = this.$queue.getData('invitationCode');
  934. this.token = uni.getStorageSync('token')
  935. if (this.token) {
  936. // this.timer = setInterval(() => {
  937. // this.gethaveOrder() //获取正在进行订单k
  938. // }, 5000);
  939. this.getuserinfo()
  940. if (this.isFist) {
  941. this.isFist = false
  942. this.gethaveOrders()
  943. } else {
  944. this.gethaveOrders()
  945. }
  946. if (this.driverShow) {
  947. this.openFest()
  948. }
  949. this.getbzList();
  950. this.getZiZhi() //获取分享文案 图片
  951. if (uni.getStorageSync('addressId')) {
  952. this.addressId = uni.getStorageSync('addressId')
  953. this.getcfd()
  954. }
  955. if (uni.getStorageSync('addressIds')) {
  956. this.addressIds = uni.getStorageSync('addressIds')
  957. this.getzd()
  958. }
  959. if (uni.getStorageSync('daijiao')) {
  960. this.daijiao = uni.getStorageSync('daijiao')
  961. }
  962. this.$Request.getT('/app/common/type/427').then(res => { //用户端小程序订单状态通知 427
  963. if (res.code == 0) {
  964. if (res.data && res.data.value) {
  965. this.arr.push(res.data.value)
  966. }
  967. }
  968. })
  969. if (this.showModal1) {
  970. // #ifdef MP-WEIXIN
  971. this.openMsg()
  972. // #endif
  973. }
  974. } else {
  975. clearInterval(this.timer)
  976. }
  977. },
  978. onReady() {
  979. this.map = uni.createMapContext("map", this)
  980. },
  981. onShareAppMessage(res) { //发送给朋友
  982. return {
  983. title: this.tuiguang,
  984. path: '/pages/index/index?invitation=' + this.invitationCode,
  985. imageUrl: this.tuiguangImg,
  986. }
  987. },
  988. onShareTimeline(res) { //分享到朋友圈
  989. return {
  990. title: this.tuiguang,
  991. path: '/pages/index/index?invitation=' + this.invitationCode,
  992. imageUrl: this.tuiguangImg,
  993. }
  994. },
  995. methods: {
  996. goNav(url) {
  997. // #ifdef MP-WEIXIN
  998. if (uni.getStorageSync('sendorderMsg')) {
  999. uni.requestSubscribeMessage({
  1000. tmplIds: this.arr,
  1001. success(re) {
  1002. // console.log(re,'**********')
  1003. var datas = JSON.stringify(re);
  1004. if (datas.indexOf("accept") != -1) {
  1005. console.log(re)
  1006. }
  1007. },
  1008. fail: (res) => {
  1009. console.log(res)
  1010. }
  1011. })
  1012. }
  1013. // #endif
  1014. let token = this.$queue.getData("token");
  1015. if (token) {
  1016. uni.navigateTo({
  1017. url: url
  1018. })
  1019. } else {
  1020. this.bindlogin();
  1021. }
  1022. },
  1023. hideModal() {
  1024. this.modalName = null;
  1025. },
  1026. goKeFu(){
  1027. this.$Request.getTS('/common/type/1').then(res => {
  1028. if (res.status == 0) {
  1029. if (res.data && res.data.value) {
  1030. this.erweimaImg = res.data.value
  1031. this.modalName = 'Image';
  1032. }
  1033. }
  1034. })
  1035. },
  1036. getBannerListS() {
  1037. this.$Request.getTS('/advert/list').then(res => {
  1038. if (res.status === 0) {
  1039. this.bannerLists = [];
  1040. res.data.forEach(d => {
  1041. this.bannerLists.push(d)
  1042. });
  1043. }
  1044. });
  1045. },
  1046. getGuangGao() {
  1047. this.$Request.getTS('/selfBanner/list').then(res => {
  1048. if (res.status === 0) {
  1049. this.guanggao = res.data;
  1050. }
  1051. });
  1052. },
  1053. getHomeGoods(type) {
  1054. this.loadingType = 1;
  1055. this.$Request.getTS('/goods/userList?page=0&size=20&sort=createAt').then(
  1056. res => {
  1057. if (res.status === 0) {
  1058. res.data.content.forEach(d => {
  1059. this.homegoodsList.push(d);
  1060. });
  1061. }
  1062. if (type === "Refresh") {
  1063. uni.stopPullDownRefresh(); // 停止刷新
  1064. }
  1065. });
  1066. },
  1067. goJinji() {
  1068. uni.navigateTo({
  1069. url: '/my/setting/jinji'
  1070. })
  1071. },
  1072. savePerson() {
  1073. this.personShow = false
  1074. this.orderPay();
  1075. },
  1076. checkPerson(num) {
  1077. this.personNum = num;
  1078. },
  1079. checkBZ(index, indee) {
  1080. this.bzList[index].content[indee].state = !this.bzList[index].content[indee].state;
  1081. },
  1082. getbzList() {
  1083. this.$Request.getT('/app/message/selectMessageList?state=10').then(res => {
  1084. if (res.code == 0) {
  1085. this.bzList = [];
  1086. res.data.forEach(d => {
  1087. if (d.content) {
  1088. let contentList = [];
  1089. d.content = d.content.split(',');
  1090. for (var i = 0; i < d.content.length; i++) {
  1091. let data = {
  1092. name: "" + d.content[i],
  1093. state: false
  1094. }
  1095. contentList.push(data);
  1096. }
  1097. d.content = contentList;
  1098. }
  1099. this.bzList.push(d);
  1100. });
  1101. }
  1102. });
  1103. },
  1104. selPC(index) {
  1105. this.pcIndex = index;
  1106. if (this.pcIndex == 1 && this.dxMoney) {
  1107. this.getyouhui(this.dxMoney);
  1108. } else if (this.pcIndex == 2 && this.pcMoney) {
  1109. this.getyouhui(this.pcMoney);
  1110. }
  1111. },
  1112. getsflist() {
  1113. this.$Request.getT("/app/indent/findVicinityRider?lng=" + this.longitude + '&lat=' + this.latitude).then(
  1114. res => {
  1115. if (res.code == 0) {
  1116. let arr = []
  1117. res.data.kmRider.map((item, index) => {
  1118. let data = {
  1119. id: index,
  1120. latitude: item.lat,
  1121. longitude: item.lng,
  1122. iconPath: '../../static/image/shifu.png',
  1123. width: 34,
  1124. height: 30,
  1125. callout: { //自定义标记点上方的气泡窗口 点击有效
  1126. content: item.nickName, //文本
  1127. color: '#333333', //文字颜色
  1128. fontSize: 10, //文本大小
  1129. padding: 10, //附近留白
  1130. borderRadius: 6, //边框圆角
  1131. bgColor: '#FFFFFF', //背景颜色
  1132. display: 'ALWAYS', //常显
  1133. },
  1134. }
  1135. arr.push(data)
  1136. });
  1137. this.covers = arr
  1138. }
  1139. })
  1140. },
  1141. confirmTime(e) {
  1142. console.log(e)
  1143. this.daijiaTime = e[0].label
  1144. this.timeId = e[0].value
  1145. },
  1146. openHour() {
  1147. this.selectTimeShow = true
  1148. },
  1149. getHourlist() {
  1150. this.$Request.get("/app/packageTime/getPackageTimeList?cityName=" + this.city).then(res => {
  1151. if (res.code == 0) {
  1152. let arr = []
  1153. res.data.records.map((item, index) => {
  1154. let dataHour = {
  1155. value: '',
  1156. label: '',
  1157. }
  1158. dataHour.value = item.timeId
  1159. dataHour.label = item.timeNum + '小时'
  1160. arr.push(dataHour)
  1161. })
  1162. this.Timelist = arr
  1163. }
  1164. });
  1165. },
  1166. //时间格式转换
  1167. padZero(num) {
  1168. return num < 10 ? `0${num}` : num;
  1169. },
  1170. // 获取区域范围
  1171. getquyuList() {
  1172. let data = {
  1173. city: this.city,
  1174. // district: this.district,
  1175. province: this.province,
  1176. }
  1177. this.$Request.get("/app/banArea/getBanAreaList", data).then(res => {
  1178. if (res.code == 0) {
  1179. let arr = []
  1180. if (res.data.records && res.data.records.length > 0) {
  1181. res.data.records.forEach((item, index) => {
  1182. let dataList = [];
  1183. item.points.forEach((ite, ind) => {
  1184. dataList.push({
  1185. latitude: ite.lat,
  1186. longitude: ite.lng
  1187. })
  1188. })
  1189. let ps = {
  1190. points: dataList,
  1191. strokeColor: "#0186FF",
  1192. strokeWidth: 3,
  1193. fillOpacity: 0.4,
  1194. };
  1195. arr.push(ps)
  1196. });
  1197. this.polylist = arr
  1198. }
  1199. }
  1200. });
  1201. },
  1202. getOpencity() {
  1203. this.$Request.getT('/app/cityInfo/isOpenCity?cityName=' + this.district).then(res => {
  1204. if (res.code === 0) {
  1205. if (!res.data) {
  1206. uni.showToast({
  1207. title: '当前城市未开通服务',
  1208. icon: 'none',
  1209. duration: 2000
  1210. })
  1211. }
  1212. }
  1213. });
  1214. },
  1215. openRemk() {
  1216. this.remkShow = true
  1217. },
  1218. closeHaveorder(index) {
  1219. console.log('99999999999')
  1220. if (index == 1) {
  1221. this.moneyShow = false
  1222. } else if (index == 2) {
  1223. this.qxshow = false
  1224. }
  1225. },
  1226. selectWay: function(item) {
  1227. this.openWay = item.id;
  1228. },
  1229. openYouhui() {
  1230. if (this.youhuiList.length == 0) {
  1231. uni.showToast({
  1232. title: '当前暂无可使用的优惠劵',
  1233. icon: 'none'
  1234. })
  1235. return
  1236. }
  1237. this.youhuiShow = true
  1238. },
  1239. openMap() {
  1240. console.log('--44444444444')
  1241. let that = this
  1242. uni.chooseLocation({
  1243. success: function(res) {
  1244. console.log('位置名称:' + res.name);
  1245. console.log('详细地址:' + res.address);
  1246. console.log('纬度:' + res.latitude);
  1247. console.log('经度:' + res.longitude);
  1248. that.latitude = res.latitude
  1249. that.longitude = res.longitude
  1250. that.selectCity(that.longitude, that.latitude);
  1251. }
  1252. });
  1253. },
  1254. confirmPay(e) {
  1255. // console.log(e,'-------')
  1256. if (e[0].value == 1) {
  1257. this.payUser = 0
  1258. } else if (e[0].value == 2) {
  1259. this.payUser = 1
  1260. }
  1261. this.payUsername = e[0].label
  1262. },
  1263. goOrerDer() {
  1264. uni.navigateTo({
  1265. url: '/my/order/pay?indentNumber=' + this.haveorder.ordersId
  1266. })
  1267. this.hoveorderShow = false
  1268. },
  1269. openFest() { //返回首页下单
  1270. console.log('.........222222')
  1271. this.addlists = []
  1272. this.covers = []
  1273. this.polyline = []
  1274. this.daijiaTime = ''
  1275. this.timeId = ''
  1276. this.ordershow = false
  1277. this.popupshow = true
  1278. this.driverShow = false
  1279. this.selectCity(this.longitude, this.latitude);
  1280. this.gethaveOrder()
  1281. },
  1282. openmingxi() { //查看价格明细
  1283. this.moneyShow = true
  1284. },
  1285. confirm(e) {
  1286. if (this.timeSel == 1) {
  1287. this.yuyueTime = e.month + '月' + e.day + '日' + '' + e.hour + ':' + e.minute
  1288. this.hopeTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':00'
  1289. } else {
  1290. this.yyEndTime = e.month + '月' + e.day + '日' + '' + e.hour + ':' + e.minute
  1291. }
  1292. },
  1293. openTime(index) {
  1294. if (index == 2 && this.yuyueTime === '') {
  1295. this.$queue.showToast('请选择开始预约时间!')
  1296. return;
  1297. }
  1298. this.timeSel = index;
  1299. this.Timeshow = true
  1300. },
  1301. godaijia() {
  1302. uni.navigateTo({
  1303. url: '/my/daijia/index'
  1304. })
  1305. },
  1306. changeAdd(current, index) {
  1307. if (this.token) {
  1308. uni.navigateTo({
  1309. url: '/my/address/index?type=' + current + '&index=' + index
  1310. })
  1311. this.hoveorderShow = false
  1312. } else {
  1313. uni.navigateTo({
  1314. url: '/pages/my/register'
  1315. })
  1316. }
  1317. },
  1318. isShowAgree() {
  1319. //是否选择协议
  1320. this.showAgree = !this.showAgree;
  1321. },
  1322. // 分享文案和图片
  1323. getZiZhi() {
  1324. this.$Request.getT('/app/common/type/276').then(res => {
  1325. if (res.code === 0) {
  1326. this.tuiguang = res.data.value;
  1327. }
  1328. });
  1329. this.$Request.getT('/app/common/type/277').then(res => {
  1330. if (res.code === 0) {
  1331. this.tuiguangImg = res.data.value;
  1332. }
  1333. });
  1334. },
  1335. goWeb(url) {
  1336. // #ifdef MP-WEIXIN
  1337. if (uni.getStorageSync('sendMsg')) {
  1338. uni.requestSubscribeMessage({
  1339. tmplIds: this.arr,
  1340. success(re) {
  1341. // console.log(re,'**********')
  1342. var datas = JSON.stringify(re);
  1343. if (datas.indexOf("accept") != -1) {
  1344. console.log(re)
  1345. }
  1346. },
  1347. fail: (res) => {
  1348. console.log(res)
  1349. }
  1350. })
  1351. }
  1352. // #endif
  1353. // console.log(url.indexOf('/pages/') !== -1)
  1354. // return
  1355. if (url.indexOf('/pages/') !== -1 || url.indexOf('/pageA/') !== -1 || url.indexOf('/my/') !== -1) {
  1356. uni.navigateTo({
  1357. url
  1358. });
  1359. } else {
  1360. //#ifndef H5
  1361. uni.navigateTo({
  1362. url: '/pages/index/webView?url=' + url
  1363. });
  1364. //#endif
  1365. //#ifdef H5
  1366. window.location.href = url;
  1367. //#endif
  1368. }
  1369. },
  1370. // 获取轮播图
  1371. getBannerList() {
  1372. this.$Request.get("/app/banner/selectBannerList?classify=1&state=1&cityName=" + this.city).then(
  1373. res => {
  1374. if (res.code == 0) {
  1375. this.bannerList = res.data
  1376. }
  1377. });
  1378. },
  1379. //右下角定位按钮的点击事件
  1380. onToGetLocation() {
  1381. let mapContext = uni.createMapContext('map');
  1382. mapContext.moveToLocation(); //moveToLocation将地图中心移动到当前定位点,需要配合map组件的show-location使用
  1383. },
  1384. selectCity(longitude, latitude) {
  1385. let data
  1386. this.$Request.getT('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
  1387. if (res.code === 0) {
  1388. this.city = res.data.city ? res.data.city : res.data.province
  1389. this.district = res.data.district
  1390. this.province = res.data.province
  1391. // this.getOpencity()
  1392. // this.getquyuList()
  1393. // this.getBannerList()
  1394. // this.getHourlist() //获取小时列表
  1395. uni.setStorageSync('city', res.data.city)
  1396. // this.covers = [{
  1397. // id: 1,
  1398. // latitude: latitude,
  1399. // longitude: longitude,
  1400. // iconPath: '../../static/image/qi.png',
  1401. // width: 32,
  1402. // height: 44,
  1403. // callout: { //自定义标记点上方的气泡窗口 点击有效
  1404. // content: res.data.address, //文本
  1405. // color: '#333333', //文字颜色
  1406. // fontSize: 10, //文本大小
  1407. // padding: 10, //附近留白
  1408. // borderRadius: 6, //边框圆角
  1409. // bgColor: '#FFFFFF', //背景颜色
  1410. // display: 'ALWAYS', //常显
  1411. // },
  1412. // }]
  1413. data = {
  1414. address: res.data.address,
  1415. lng: longitude, //地址经度
  1416. lat: latitude, //地址维度
  1417. addressId: '',
  1418. addressDefault: '',
  1419. county: res.data.district,
  1420. province: res.data.province,
  1421. city: res.data.city
  1422. }
  1423. this.addlist = data
  1424. console.log('----')
  1425. }
  1426. });
  1427. },
  1428. // 查询附近司机
  1429. getAdd(lng, lat) {
  1430. this.$Request.getT('/app/indent/findVicinityRider?lng=' + lng + '&lat=' + lat).then(res => {
  1431. if (res.code == 0) {
  1432. this.riderNumber = res.data.count
  1433. }
  1434. });
  1435. },
  1436. //获取出发地
  1437. getcfd() {
  1438. this.$Request.getT('/app/address/getAddressInfo?addressId=' + this.addressId).then(res => {
  1439. if (res.code == 0 && res.data) {
  1440. this.addlist = res.data
  1441. // this.covers = [{
  1442. // id: 1,
  1443. // latitude: this.addlist.lat,
  1444. // longitude: this.addlist.lng,
  1445. // iconPath: '../../static/image/qi.png',
  1446. // width: 32,
  1447. // height: 44,
  1448. // callout: { //自定义标记点上方的气泡窗口 点击有效
  1449. // content: this.addlist.address, //文本
  1450. // color: '#333333', //文字颜色
  1451. // fontSize: 10, //文本大小
  1452. // padding: 10, //附近留白
  1453. // borderRadius: 6, //边框圆角
  1454. // bgColor: '#FFFFFF', //背景颜色
  1455. // display: 'ALWAYS', //常显
  1456. // },
  1457. // }]
  1458. this.getAdd(res.data.lng, res.data.lat)
  1459. uni.removeStorageSync('addressId')
  1460. // console.log(this.addlists || this.addlist, this.addlists && this.addlis)
  1461. // return
  1462. if (this.addlists && this.addlists.lng && this.addlist && this.addlist.lng) {
  1463. this.orderPay()
  1464. }
  1465. // uni.getStorageSync('addressId')
  1466. } else {
  1467. this.addlist = []
  1468. }
  1469. });
  1470. },
  1471. //获取目的地
  1472. getzd() {
  1473. this.$Request.getT('/app/address/getAddressInfo?addressId=' + this.addressIds).then(res => {
  1474. if (res.code == 0 && res.data) {
  1475. this.addlists = res.data
  1476. this.to.latitude = res.data.addressLatitude
  1477. this.to.longitude = res.data.addressLongitude
  1478. uni.removeStorageSync('addressIds')
  1479. if (this.addlists && this.addlists.lng && this.addlist && this.addlist.lng) {
  1480. this.orderPay()
  1481. }
  1482. } else {
  1483. this.addlists = []
  1484. }
  1485. });
  1486. },
  1487. // 步行路线规划
  1488. routePlanning() {
  1489. let that = this
  1490. that.qqmapsdk.direction({
  1491. mode: 'driving', // 驾车
  1492. from: { // 起始位置(当前位置)坐标
  1493. latitude: that.latitude,
  1494. longitude: that.longitude
  1495. },
  1496. to: that.to, // 目的地位置坐标
  1497. success(res) {
  1498. // console.log(res, '=======')
  1499. var coors = JSON.parse(that.polylines)
  1500. // console.log(coors,'11111111111111')
  1501. // var coors = res.result.routes[0].polyline
  1502. // console.log(coors2,'11111111111111')
  1503. var pl = [] // 点串数组
  1504. // 坐标解压(返回的点串坐标,通过前向差分进行压缩)
  1505. var kr = 1000000
  1506. for (var i = 2; i < coors.length; i++) {
  1507. coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr
  1508. }
  1509. // 将解压后的坐标放入点串数组pl中
  1510. for (var i = 0; i < coors.length; i += 2) {
  1511. pl.push({
  1512. latitude: coors[i],
  1513. longitude: coors[i + 1]
  1514. })
  1515. }
  1516. // 设置polyline属性,将路线显示出来,将解压坐标第一个数据作为起点
  1517. that.polyline = [{
  1518. points: pl,
  1519. color: '#346EF6',
  1520. width: 4
  1521. }]
  1522. }
  1523. })
  1524. },
  1525. // 计算基础价格
  1526. orderPay() {
  1527. this.couponId = '';
  1528. this.couponName = '';
  1529. let data = {
  1530. shipUserName: this.userName,
  1531. shipUserPhone: this.phone,
  1532. shipAddressId: this.addlist.addressId,
  1533. shipProvince: this.addlist.province,
  1534. shipCity: this.addlist.city,
  1535. shipDistrict: this.addlist.county,
  1536. shipAddressLongitude: this.addlist.lng,
  1537. shipAddressLatitude: this.addlist.lat,
  1538. deliveryAddressId: this.addlists.addressId,
  1539. deliveryProvince: this.addlists.province,
  1540. deliveryCity: this.addlists.city,
  1541. deliveryDistrict: this.addlists.county,
  1542. deliveryAddressLongitude: this.addlists.lng,
  1543. deliveryAddressLatitude: this.addlists.lat,
  1544. appointmentStartTime: this.yuyueTime,
  1545. appointmentEndTime: this.yyEndTime,
  1546. appointmentType: 2, //预约类型 1独享 2拼单
  1547. appointmentNum: this.personNum,
  1548. }
  1549. let datas = {
  1550. shipUserName: this.userName,
  1551. shipUserPhone: this.phone,
  1552. shipAddressId: this.addlist.addressId,
  1553. shipProvince: this.addlist.province,
  1554. shipCity: this.addlist.city,
  1555. shipDistrict: this.addlist.county,
  1556. shipAddressLongitude: this.addlist.lng,
  1557. shipAddressLatitude: this.addlist.lat,
  1558. deliveryAddressId: this.addlists.addressId,
  1559. deliveryProvince: this.addlists.province,
  1560. deliveryCity: this.addlists.city,
  1561. deliveryDistrict: this.addlists.county,
  1562. deliveryAddressLongitude: this.addlists.lng,
  1563. deliveryAddressLatitude: this.addlists.lat,
  1564. appointmentStartTime: this.yuyueTime,
  1565. appointmentEndTime: this.yyEndTime,
  1566. appointmentType: 1, //预约类型 1独享 2拼单
  1567. appointmentNum: this.personNum,
  1568. }
  1569. this.$Request.postJson('/app/priceRule/getOrdersPrice', data).then(res => {
  1570. if (res.code == 0) {
  1571. this.pcMoney = res.data.payMoney;
  1572. // this.basicPrice = res.data
  1573. // this.polylines = res.data.polyline
  1574. // this.gethaveOrder()
  1575. // this.popupshow = false
  1576. // this.ordershow = true
  1577. // this.routePlanning()
  1578. if (this.pcIndex == 1 && this.dxMoney) {
  1579. this.getyouhui(this.dxMoney);
  1580. } else if (this.pcIndex == 2 && this.pcMoney) {
  1581. this.getyouhui(this.pcMoney);
  1582. }
  1583. } else {
  1584. uni.showToast({
  1585. title: res.msg,
  1586. icon: 'none'
  1587. })
  1588. }
  1589. });
  1590. this.$Request.postJson('/app/priceRule/getOrdersPrice', datas).then(res => {
  1591. if (res.code == 0) {
  1592. this.dxMoney = res.data.payMoney;
  1593. // this.basicPrice = res.data
  1594. // this.polylines = res.data.polyline
  1595. // this.gethaveOrder()
  1596. // this.popupshow = false
  1597. // this.ordershow = true
  1598. // this.routePlanning()
  1599. if (this.pcIndex == 1 && this.dxMoney) {
  1600. this.getyouhui(this.dxMoney);
  1601. } else if (this.pcIndex == 2 && this.pcMoney) {
  1602. this.getyouhui(this.pcMoney);
  1603. }
  1604. } else {
  1605. uni.showToast({
  1606. title: res.msg,
  1607. icon: 'none'
  1608. })
  1609. }
  1610. });
  1611. },
  1612. //下单
  1613. payorder() {
  1614. this.$queue.showLoading('提交中...')
  1615. if (this.addlists.length == 0) {
  1616. uni.hideLoading();
  1617. this.$queue.showToast('请选择目的地!')
  1618. return;
  1619. }
  1620. if (this.yuyueTime === '') {
  1621. uni.hideLoading();
  1622. this.$queue.showToast('请选择开始预约时间!')
  1623. return;
  1624. }
  1625. if (this.yyEndTime === '') {
  1626. uni.hideLoading();
  1627. this.$queue.showToast('请选择结束预约时间!')
  1628. return;
  1629. }
  1630. if (this.pcMoney === '' || this.dxMoney === '') {
  1631. uni.hideLoading();
  1632. this.$queue.showToast('请检查信息内容!')
  1633. return;
  1634. }
  1635. let remarks = '';
  1636. // this.bzList[index].content[indee].state = !this.bzList[index].content[indee].state;
  1637. for (var i = 0; i < this.bzList.length; i++) {
  1638. if (this.bzList[i].content) {
  1639. for (var d = 0; d < this.bzList[i].content.length; d++) {
  1640. if (this.bzList[i].content[d].state) {
  1641. if (remarks === '') {
  1642. remarks = this.bzList[i].content[d].name;
  1643. } else {
  1644. remarks = remarks + ',' + this.bzList[i].content[d].name;
  1645. }
  1646. }
  1647. }
  1648. }
  1649. }
  1650. let userId = this.$queue.getData('userId');
  1651. let data = {
  1652. shipUserName: this.userName,
  1653. shipUserPhone: this.phone,
  1654. shipAddressId: this.addlist.addressId,
  1655. shipProvince: this.addlist.province,
  1656. shipCity: this.addlist.city,
  1657. shipDistrict: this.addlist.county,
  1658. shipAddressLongitude: this.addlist.lng,
  1659. shipAddressLatitude: this.addlist.lat,
  1660. shipAddress: this.addlist.address,
  1661. deliveryAddressId: this.addlists.addressId,
  1662. deliveryProvince: this.addlists.province,
  1663. deliveryCity: this.addlists.city,
  1664. deliveryDistrict: this.addlists.county,
  1665. deliveryAddressLongitude: this.addlists.lng,
  1666. deliveryAddressLatitude: this.addlists.lat,
  1667. deliveryAddress: this.addlists.address,
  1668. appointmentStartTime: this.yuyueTime,
  1669. appointmentEndTime: this.yyEndTime,
  1670. appointmentType: this.pcIndex, //预约类型 1独享 2拼单
  1671. couponId: this.couponId,
  1672. couponName: this.couponName,
  1673. remark: remarks,
  1674. userId: userId,
  1675. appointmentNum: this.personNum,
  1676. }
  1677. this.$Request.postJson('/app/orders/insertOrders', data).then(res => {
  1678. if (res.code == 0) {
  1679. uni.hideLoading();
  1680. this.ordersId = res.data.ordersId;
  1681. //生产订单后清除选中值
  1682. this.pcIndex = 2;
  1683. this.addlists = [];
  1684. // this.yuyueTime = '';
  1685. this.pcMoney = 0;
  1686. this.dxMoney = 0;
  1687. this.personNum = 1;
  1688. this.couponId = ''
  1689. // this.yyEndTime = ''
  1690. this.couponName = ''
  1691. if (uni.getStorageSync('isOnline') == '是') { //线上收费
  1692. this.showpay = true;
  1693. } else { //线下收费
  1694. uni.switchTab({
  1695. url: '/pages/order/order'
  1696. })
  1697. }
  1698. } else {
  1699. this.$queue.showToast(res.msg);
  1700. }
  1701. });
  1702. },
  1703. // 查询是否有正在进行的订单
  1704. gethaveOrders() {
  1705. this.$Request.getT('/app/orders/getMyHaveOrder').then(res => {
  1706. if (res.code == 0 && res.data) {
  1707. this.haveorder = res.data
  1708. // this.hoveorderShow = true
  1709. } else {
  1710. this.haveorder = []
  1711. this.hoveorderShow = false
  1712. }
  1713. });
  1714. },
  1715. gethaveOrder() {
  1716. this.$Request.getT('/app/orders/getMyHaveOrder').then(res => {
  1717. if (res.code == 0 && res.data) {
  1718. this.haveorder = res.data
  1719. console.log('查询订单', this.haveorder, this.haveorder && this.haveorder.riderUserId && this
  1720. .driverShow)
  1721. if (this.$queue.getData('riderUserId')) {
  1722. if (this.haveorder) {
  1723. uni.navigateTo({
  1724. url: '/my/order/pay?indentNumber=' + this.haveorder.ordersId
  1725. })
  1726. clearInterval(this.timer)
  1727. uni.removeStorageSync('riderUserId')
  1728. this.openFest()
  1729. }
  1730. } else {
  1731. if (this.haveorder && this.driverShow) {
  1732. uni.navigateTo({
  1733. url: '/my/order/pay?indentNumber=' + this.haveorder.ordersId
  1734. })
  1735. clearInterval(this.timer)
  1736. this.openFest()
  1737. }
  1738. }
  1739. } else {
  1740. this.haveorder = []
  1741. clearInterval(this.timer)
  1742. }
  1743. });
  1744. },
  1745. // 取消订单
  1746. bindorderOff() {
  1747. let data = {
  1748. indentNumber: this.haveorder.indentNumber
  1749. }
  1750. this.$Request.postT('/app/indent/userCancleIndent', data).then(res => {
  1751. if (res.code == 0) {
  1752. uni.showToast({
  1753. title: '订单取消成功'
  1754. });
  1755. this.qxshow = false
  1756. this.driverShow = false
  1757. this.haveorder = []
  1758. this.openFest()
  1759. } else {
  1760. uni.hideLoading();
  1761. uni.showModal({
  1762. showCancel: false,
  1763. title: '订单失败',
  1764. content: res.msg
  1765. });
  1766. }
  1767. });
  1768. },
  1769. timing(second) {
  1770. //实时返回计时时间
  1771. // console.log(second)
  1772. },
  1773. reset() {
  1774. //重置计时器
  1775. this.$refs.timer.reset()
  1776. },
  1777. start() {
  1778. //手动开启计时器
  1779. this.$refs.timer.start()
  1780. },
  1781. clear() {
  1782. //停止计时器
  1783. this.$refs.timer.clear()
  1784. },
  1785. change(index, item) {
  1786. this.current = index;
  1787. this.daijiaTime = ''
  1788. this.timeId = ''
  1789. this.yuyueTime = ''
  1790. this.hopeTime = ''
  1791. },
  1792. //清空优惠劵
  1793. deteYouhuj() {
  1794. this.couponId = ''
  1795. this.couponName = ''
  1796. this.youhuiShow = false
  1797. },
  1798. //使用优惠劵
  1799. useryouhui(item) {
  1800. this.couponId = item.id
  1801. this.couponName = item.money
  1802. this.youhuiShow = false
  1803. },
  1804. // 获取用户信息
  1805. getuserinfo() {
  1806. this.$Request.getT('/app/user/selectUserById').then(res => {
  1807. if (res.code == 0 && res.data) {
  1808. this.userName = res.data.nickName;
  1809. this.phone = res.data.phone;
  1810. if (res.data.newUserFlag) {
  1811. this.newUserFlag = res.data.newUserFlag
  1812. // console.log(this.newUserFlag)
  1813. if (this.newUserFlag == 1) {
  1814. //是否开启新人优惠劵
  1815. this.$Request.getT('/app/common/type/354').then(res => {
  1816. if (res.code == 0) {
  1817. if (res.data && res.data.value && res.data.value == '是') {
  1818. this.HBShow = true
  1819. }
  1820. }
  1821. });
  1822. } else {
  1823. this.HBShow = false
  1824. }
  1825. }
  1826. }
  1827. });
  1828. },
  1829. getyouhui(money) { //获取优惠劵
  1830. let data = {
  1831. money: money
  1832. }
  1833. this.$Request.getT('/app/couponUser/selectMyCouponListByMoney', data).then(res => {
  1834. if (res.code === 0 && res.data) {
  1835. this.youhuiList = res.data
  1836. } else {
  1837. uni.showToast({
  1838. title: res.msg,
  1839. icon: "none"
  1840. })
  1841. }
  1842. });
  1843. },
  1844. // 红包
  1845. takemoney() {
  1846. this.$Request.getT('/app/couponUser/newUserCoupon').then(res => {
  1847. if (res.code === 0) {
  1848. this.HBShow = false
  1849. uni.showToast({
  1850. title: '领取成功',
  1851. icon: 'none',
  1852. duration: 3000
  1853. })
  1854. this.getuserinfo()
  1855. // setTimeout(function() {
  1856. // uni.navigateTo({
  1857. // url: '/pages/my/hongbao/hongbao'
  1858. // })
  1859. // }, 100)
  1860. } else {
  1861. uni.showToast({
  1862. title: res.msg,
  1863. icon: "none"
  1864. })
  1865. this.newUserFlag = ''
  1866. }
  1867. });
  1868. },
  1869. upper: function(e) {
  1870. // console.log(e)
  1871. },
  1872. lower: function(e) {
  1873. // console.log(e)
  1874. },
  1875. scroll: function(e) {
  1876. // console.log(e)
  1877. this.old.scrollTop = e.detail.scrollTop
  1878. },
  1879. pay() {
  1880. if (this.openWay == 0) {
  1881. this.$queue.showToast('请选择支付方式!')
  1882. return;
  1883. }
  1884. this.showpay = false;
  1885. if (this.openWay == 1) {
  1886. // #ifdef APP-PLUS
  1887. let data = {
  1888. ordersId: this.ordersId,
  1889. type: 1
  1890. }
  1891. // 微信APP支付 根据订单id获取支付信息
  1892. this.$Request.postT("/app/wxPay/payOrders", data).then(res => {
  1893. console.log(JSON.stringify(res), '微信支付信息')
  1894. this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));
  1895. });
  1896. // #endif
  1897. // #ifdef MP-WEIXIN
  1898. let data = {
  1899. ordersId: this.ordersId,
  1900. type: 3
  1901. }
  1902. let that = this
  1903. that.$Request.postT("/app/wxPay/payOrders", data).then(res => {
  1904. if (res.code == 0) {
  1905. uni.requestPayment({
  1906. provider: 'wxpay',
  1907. timeStamp: res.data.timestamp,
  1908. nonceStr: res.data.noncestr,
  1909. package: res.data.package,
  1910. signType: res.data.signType,
  1911. paySign: res.data.sign,
  1912. success: function(res) {
  1913. console.log(res)
  1914. uni.hideLoading();
  1915. uni.showToast({
  1916. title: '支付成功',
  1917. icon: 'none'
  1918. });
  1919. setTimeout(function() {
  1920. uni.switchTab({
  1921. url: '/pages/order/order'
  1922. })
  1923. }, 1000)
  1924. },
  1925. fail: function(err) {
  1926. console.log('fail:' + JSON.stringify(err));
  1927. uni.hideLoading();
  1928. that.$queue.showToast('支付失败');
  1929. }
  1930. });
  1931. } else {
  1932. uni.showToast({
  1933. title: res.msg,
  1934. icon: 'none'
  1935. })
  1936. }
  1937. });
  1938. // #endif
  1939. //微信公众号支付
  1940. // #ifdef H5
  1941. let ua = navigator.userAgent.toLowerCase();
  1942. if (ua.indexOf('micromessenger') !== -1) {
  1943. let data = {
  1944. ordersId: this.ordersId,
  1945. type: 2
  1946. }
  1947. let that = this
  1948. that.$Request.postT("/app/wxPay/payOrders", data).then(res => {
  1949. if (res.code == 0) {
  1950. this.callPay(res.data);
  1951. } else {
  1952. uni.showToast({
  1953. title: res.msg,
  1954. icon: 'none'
  1955. })
  1956. }
  1957. });
  1958. }
  1959. // #endif
  1960. } else if (this.openWay == 2) {
  1961. // APP支付宝支付
  1962. // #ifdef H5
  1963. let data = {
  1964. ordersId: this.ordersId,
  1965. type: 1
  1966. }
  1967. this.$Request.postT("/app/aliPay/payOrders", data).then(res => {
  1968. if (res.code == 0) {
  1969. const div = document.createElement('div')
  1970. div.innerHTML = res.data //此处form就是后台返回接收到的数据
  1971. document.body.appendChild(div)
  1972. document.forms[0].submit()
  1973. } else {
  1974. uni.showToast({
  1975. icon: 'none',
  1976. title: '支付失败!'
  1977. });
  1978. }
  1979. });
  1980. // #endif
  1981. // #ifdef APP
  1982. let data = {
  1983. ordersId: this.ordersId,
  1984. type: 2
  1985. }
  1986. this.$Request.postT("/app/aliPay/payOrders", data).then(res => {
  1987. console.log(JSON.stringify(res), '支付宝支付信息')
  1988. this.isCheckPay(res.code, 'alipay', res.data)
  1989. });
  1990. // #endif
  1991. } else if (this.openWay == 3) {
  1992. let data = {
  1993. ordersId: this.ordersId
  1994. }
  1995. let that = this
  1996. that.$Request.postT("/app/orders/payOrders", data).then(res => {
  1997. if (res.code == 0) {
  1998. uni.hideLoading();
  1999. uni.showToast({
  2000. title: '支付成功',
  2001. icon: 'none'
  2002. });
  2003. setTimeout(function() {
  2004. uni.switchTab({
  2005. url: '/pages/order/order'
  2006. })
  2007. }, 1000)
  2008. } else {
  2009. uni.showToast({
  2010. title: res.msg,
  2011. icon: 'none'
  2012. })
  2013. }
  2014. });
  2015. }
  2016. },
  2017. callPay: function(response) {
  2018. if (typeof WeixinJSBridge === "undefined") {
  2019. if (document.addEventListener) {
  2020. document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false);
  2021. } else if (document.attachEvent) {
  2022. document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response));
  2023. document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response));
  2024. }
  2025. } else {
  2026. this.onBridgeReady(response);
  2027. }
  2028. },
  2029. onBridgeReady: function(response) {
  2030. let that = this;
  2031. // if (!response.package) {
  2032. // return;
  2033. // }
  2034. console.log(response, 111111)
  2035. WeixinJSBridge.invoke(
  2036. 'getBrandWCPayRequest', {
  2037. "appId": response.appid, //公众号名称,由商户传入
  2038. "timeStamp": response.timestamp, //时间戳,自1970年以来的秒数
  2039. "nonceStr": response.noncestr, //随机串
  2040. "package": response.package,
  2041. "signType": response.signType, //微信签名方式:
  2042. "paySign": response.sign //微信签名
  2043. },
  2044. function(res) {
  2045. console.log(res, '/*-/*-/*-')
  2046. if (res.err_msg === "get_brand_wcpay_request:ok") {
  2047. // 使用以上方式判断前端返回,微信团队郑重提示:
  2048. //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
  2049. uni.showLoading({
  2050. title: '支付成功'
  2051. });
  2052. setTimeout(function() {
  2053. uni.hideLoading();
  2054. uni.switchTab({
  2055. url: '/pages/order/order'
  2056. })
  2057. }, 1000);
  2058. } else {
  2059. uni.hideLoading();
  2060. }
  2061. WeixinJSBridge.log(response.err_msg);
  2062. }
  2063. );
  2064. },
  2065. isCheckPay(status, name, order) {
  2066. if (status == 0) {
  2067. this.setPayment(name, order);
  2068. } else {
  2069. uni.hideLoading();
  2070. uni.showToast({
  2071. title: '支付信息有误',
  2072. icon: 'none'
  2073. });
  2074. }
  2075. },
  2076. setPayment(name, order) {
  2077. console.log(name, '*-*-*', order)
  2078. uni.requestPayment({
  2079. provider: name,
  2080. orderInfo: order, //微信、支付宝订单数据
  2081. success: function(res) {
  2082. console.log(res)
  2083. uni.hideLoading();
  2084. uni.showLoading({
  2085. title: '支付成功'
  2086. });
  2087. setTimeout(function() {
  2088. uni.switchTab({
  2089. url: '/pages/order/order'
  2090. })
  2091. }, 1000);
  2092. },
  2093. fail: function(err) {
  2094. console.log(err)
  2095. uni.hideLoading();
  2096. },
  2097. complete() {
  2098. uni.hideLoading();
  2099. }
  2100. });
  2101. },
  2102. // 开启订阅消息
  2103. openMsg() {
  2104. console.log('订阅消息')
  2105. var that = this
  2106. uni.getSetting({
  2107. withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
  2108. success(ret) {
  2109. console.log(ret.subscriptionsSetting, '------------------')
  2110. // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
  2111. if (ret.subscriptionsSetting.itemSettings) {
  2112. uni.setStorageSync('sendMsg', true)
  2113. uni.openSetting({ // 打开设置页
  2114. success(rea) {
  2115. console.log(rea.authSetting)
  2116. }
  2117. });
  2118. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  2119. console.log(99999)
  2120. uni.setStorageSync('sendMsg', false)
  2121. uni.showModal({
  2122. title: '提示',
  2123. content: '为了更好的体验,请绑定消息推送',
  2124. confirmText: '确定',
  2125. cancelText: '取消',
  2126. success: function(res) {
  2127. if (res.confirm) {
  2128. console.log(that.arr)
  2129. wx.requestSubscribeMessage({
  2130. tmplIds: that.arr,
  2131. success(re) {
  2132. console.log(JSON.stringify(re),
  2133. '++++++++++++++')
  2134. var datas = JSON.stringify(re);
  2135. if (datas.indexOf("accept") != -1) {
  2136. console.log(re)
  2137. // uni.setStorageSync('sendMsg', true)
  2138. }
  2139. },
  2140. fail: (res) => {
  2141. console.log(res)
  2142. }
  2143. })
  2144. // uni.setStorageSync('sendMsg', true)
  2145. console.log('确认')
  2146. that.showModal1 = false
  2147. } else if (res.cancel) {
  2148. console.log('取消')
  2149. // uni.setStorageSync('sendMsg', false)
  2150. that.showModal1 = true
  2151. }
  2152. }
  2153. })
  2154. }
  2155. }
  2156. })
  2157. },
  2158. }
  2159. }
  2160. </script>
  2161. <style lang="less">
  2162. /deep/.swiper {
  2163. height: 160rpx !important;
  2164. }
  2165. page {
  2166. background: #FFFFFF;
  2167. }
  2168. .sos {
  2169. width: 70rpx;
  2170. height: 70rpx;
  2171. position: fixed;
  2172. bottom: 290rpx;
  2173. left: 32rpx;
  2174. z-index: 99;
  2175. image {
  2176. width: 70rpx;
  2177. height: 70rpx;
  2178. }
  2179. }
  2180. .content {
  2181. width: 100%;
  2182. // position: fixed;
  2183. // top: 0upx;
  2184. // left: 0upx;
  2185. // right: 0upx;
  2186. // bottom: 0upx;
  2187. }
  2188. .controls-title {
  2189. width: 100%;
  2190. // height: 55vh;
  2191. // background: #FFFFFF;
  2192. // box-shadow: 0px -12px 40px 0px rgba(192, 220, 245, 0.6);
  2193. border-radius: 55upx 55upx 0 0;
  2194. /* #ifdef MP-WEIXIN */
  2195. // padding-bottom: 20rpx;
  2196. /* #endif */
  2197. padding-top: 10rpx;
  2198. }
  2199. .orderb {
  2200. display: flex;
  2201. align-items: center;
  2202. justify-content: space-between;
  2203. background: #FFFFFF;
  2204. margin: 30rpx 30rpx 0 30rpx;
  2205. border-radius: 24rpx;
  2206. padding: 30rpx;
  2207. }
  2208. .controls-box {
  2209. // background: #FFFFFF;
  2210. // margin: 30upx 30rpx 20rpx;
  2211. border-radius: 32upx;
  2212. padding-bottom: 1rpx;
  2213. }
  2214. /* tab选项卡 */
  2215. .controls-tabs {
  2216. /* width: 100%; */
  2217. height: 90rpx;
  2218. display: flex;
  2219. font-size: 28rpx;
  2220. overflow-x: auto;
  2221. justify-content: space-between;
  2222. align-items: center;
  2223. margin-top: 10rpx;
  2224. padding: 0 30rpx;
  2225. }
  2226. .atabs_ds {
  2227. text-align: center;
  2228. height: 55rpx;
  2229. }
  2230. .btna {
  2231. width: 686rpx;
  2232. height: 98rpx;
  2233. background: #FE6B01;
  2234. border-radius: 16rpx;
  2235. /* margin: 9rpx 10rpx 10rpx 29rpx; */
  2236. margin: 0rpx auto;
  2237. text-align: center;
  2238. line-height: 98rpx;
  2239. margin-top: 30rpx;
  2240. font-family: PingFang SC;
  2241. font-weight: bold;
  2242. font-size: 32rpx;
  2243. color: #FFFFFF;
  2244. }
  2245. .btna_view {
  2246. width: 252rpx;
  2247. height: 68rpx;
  2248. border-radius: 166rpx;
  2249. opacity: 1;
  2250. background: linear-gradient(105deg, #FF5900 -1%, #FD1818 100%);
  2251. position: absolute;
  2252. left: 246rpx;
  2253. top: 882rpx;
  2254. display: flex;
  2255. flex-direction: column;
  2256. justify-content: center;
  2257. align-items: center;
  2258. padding: 10rpx;
  2259. gap: 10rpx;
  2260. color: #FFFFFF;
  2261. font-weight: normal;
  2262. font-size: 36rpx;
  2263. }
  2264. .zx_view {
  2265. display: flex;
  2266. align-items: center;
  2267. width: 328rpx;
  2268. justify-content: center;
  2269. }
  2270. .zx_name {
  2271. font-family: PingFang SC;
  2272. font-weight: 500;
  2273. font-size: 26rpx;
  2274. // color: #999999;
  2275. margin-left: 20rpx;
  2276. }
  2277. .pc_view {
  2278. display: flex;
  2279. align-items: center;
  2280. justify-content: space-between;
  2281. margin: 0 10rpx 30rpx;
  2282. }
  2283. .rs_item {
  2284. width: fit-content;
  2285. padding: 20rpx 40rpx;
  2286. // height: 71rpx;
  2287. background: #FFFFFF;
  2288. border-radius: 24rpx;
  2289. border: 2px solid #CCCCCC;
  2290. font-family: PingFang SC;
  2291. font-weight: 500;
  2292. font-size: 24rpx;
  2293. color: #030303;
  2294. margin-top: 20rpx;
  2295. margin-right: 20rpx;
  2296. }
  2297. .rs_item_sel {
  2298. width: fit-content;
  2299. padding: 20rpx 40rpx;
  2300. // height: 71rpx;
  2301. background: #FFFFFF;
  2302. border-radius: 24rpx;
  2303. border: 2px solid #346EF6;
  2304. font-family: PingFang SC;
  2305. font-weight: 500;
  2306. font-size: 24rpx;
  2307. color: #346EF6;
  2308. margin-top: 20rpx;
  2309. margin-right: 20rpx;
  2310. }
  2311. .bz_item {
  2312. width: fit-content;
  2313. padding: 20rpx 22rpx;
  2314. // height: 71rpx;
  2315. background: #FFFFFF;
  2316. border-radius: 24rpx;
  2317. border: 2px solid #CCCCCC;
  2318. font-family: PingFang SC;
  2319. font-weight: 500;
  2320. font-size: 24rpx;
  2321. color: #030303;
  2322. margin-top: 20rpx;
  2323. margin-right: 20rpx;
  2324. }
  2325. .bz_item_sel {
  2326. width: fit-content;
  2327. padding: 20rpx 22rpx;
  2328. // height: 71rpx;
  2329. background: #FFFFFF;
  2330. border-radius: 24rpx;
  2331. border: 2px solid #346EF6;
  2332. font-family: PingFang SC;
  2333. font-weight: 500;
  2334. font-size: 24rpx;
  2335. color: #346EF6;
  2336. margin-top: 20rpx;
  2337. margin-right: 20rpx;
  2338. }
  2339. .pc_item {
  2340. width: 328rpx;
  2341. height: 250rpx;
  2342. background: #FFFFFF;
  2343. border-radius: 24rpx;
  2344. border: 1rpx solid #DCDCDC;
  2345. text-align: center;
  2346. padding: 20rpx 0;
  2347. image {
  2348. width: 97rpx;
  2349. height: 85rpx;
  2350. margin-top: 20rpx;
  2351. }
  2352. }
  2353. .pc_items {
  2354. width: 328rpx;
  2355. height: 250rpx;
  2356. background: #EDF2FF;
  2357. border-radius: 24rpx;
  2358. border: 1px solid #346EF6;
  2359. text-align: center;
  2360. padding: 20rpx 0;
  2361. image {
  2362. width: 97rpx;
  2363. height: 85rpx;
  2364. margin-top: 20rpx;
  2365. }
  2366. }
  2367. .pc_name {
  2368. font-family: PingFang SC;
  2369. font-weight: bold;
  2370. font-size: 28rpx;
  2371. color: #030303;
  2372. }
  2373. .pc_money {
  2374. font-family: PingFang SC;
  2375. font-weight: 500;
  2376. font-size: 28rpx;
  2377. color: #030303;
  2378. margin-top: 15rpx;
  2379. text {
  2380. font-size: 40rpx;
  2381. font-weight: bold;
  2382. }
  2383. }
  2384. .addbox {
  2385. display: flex;
  2386. align-items: center;
  2387. justify-content: space-between;
  2388. margin: 0 10rpx 30rpx;
  2389. padding: 0 30rpx;
  2390. height: 100rpx;
  2391. border-radius: 16rpx;
  2392. }
  2393. .add_cont {
  2394. display: flex;
  2395. align-items: center;
  2396. }
  2397. .add_tit {
  2398. font-size: 30rpx;
  2399. font-family: PingFang SC;
  2400. font-weight: bold;
  2401. color: #333333;
  2402. margin-left: 10rpx;
  2403. }
  2404. .bg {
  2405. background: #F5F5F5;
  2406. }
  2407. .bgc {
  2408. background: #F5F8FF;
  2409. }
  2410. .bgs {
  2411. background: #FFFFFF;
  2412. }
  2413. .green {
  2414. width: 16rpx;
  2415. height: 16rpx;
  2416. background: #1FC657;
  2417. border-radius: 50%;
  2418. margin-right: 20rpx;
  2419. }
  2420. .orgin {
  2421. width: 16rpx;
  2422. height: 16rpx;
  2423. background: #FBAC04;
  2424. border-radius: 50%;
  2425. margin-right: 20rpx;
  2426. }
  2427. /* 支付弹框 */
  2428. .popup_pay {
  2429. width: 100%;
  2430. }
  2431. .pay_btns {
  2432. width: 90%;
  2433. margin: 0 auto 40rpx;
  2434. text-align: center;
  2435. background: #3699FF;
  2436. height: 80rpx;
  2437. border-radius: 16rpx;
  2438. color: #ffffff;
  2439. line-height: 80rpx;
  2440. margin-top: 20rpx;
  2441. }
  2442. /* 红包样式 */
  2443. .hongbao {
  2444. width: 100%;
  2445. /* height: 100px; */
  2446. /* background: #007AFF; */
  2447. position: fixed;
  2448. top: 0rpx;
  2449. /* bottom: 50%; */
  2450. left: 0rpx;
  2451. right: 0rpx;
  2452. /* display: none; */
  2453. }
  2454. .xinhongbao {
  2455. height: 100%;
  2456. z-index: 999;
  2457. background: rgba(0, 0, 0, 0.4);
  2458. }
  2459. .hb_img {
  2460. width: 100%;
  2461. height: 100%;
  2462. }
  2463. .hb_btn {
  2464. width: 60%;
  2465. height: 72rpx;
  2466. position: absolute;
  2467. top: 315rpx;
  2468. left: 80rpx;
  2469. }
  2470. .hoveorderimg {
  2471. width: 100%;
  2472. height: 535rpx;
  2473. }
  2474. .img-map1 {
  2475. width: 80rpx;
  2476. height: 80rpx;
  2477. }
  2478. .headTop {
  2479. width: 100%;
  2480. background: #FFFFFF;
  2481. position: fixed;
  2482. top: 0;
  2483. left: 0;
  2484. right: 0;
  2485. z-index: 999;
  2486. /* #ifdef MP-WEIXIN */
  2487. padding: 120rpx 30rpx 25rpx;
  2488. /* #endif */
  2489. /* #ifdef H5 */
  2490. padding: 40rpx 30rpx 25rpx;
  2491. /* #endif */
  2492. /* #ifdef APP */
  2493. padding: 0rpx 0rpx;
  2494. /* #endif */
  2495. display: flex;
  2496. align-items: center;
  2497. }
  2498. .line {
  2499. width: 1rpx;
  2500. height: 63rpx;
  2501. background: #E6E6E6;
  2502. }
  2503. .btn {
  2504. width: 686rpx;
  2505. height: 98rpx;
  2506. margin: 0 auto;
  2507. background: #346EF6;
  2508. border-radius: 16rpx;
  2509. font-size: 32rpx;
  2510. font-family: PingFang SC;
  2511. font-weight: bold;
  2512. color: #FFFFFF;
  2513. display: flex;
  2514. align-items: center;
  2515. justify-content: center;
  2516. margin: 40rpx auto;
  2517. }
  2518. .czbtn {
  2519. width: 480rpx;
  2520. height: 80rpx;
  2521. background: #346EF6;
  2522. border-radius: 40rpx;
  2523. font-size: 28rpx;
  2524. font-family: PingFang SC;
  2525. font-weight: bold;
  2526. color: #FFFFFF;
  2527. display: flex;
  2528. align-items: center;
  2529. justify-content: center;
  2530. margin-top: 50rpx;
  2531. }
  2532. .qxdj {
  2533. width: 180rpx;
  2534. height: 70rpx;
  2535. border: 2rpx solid #CCCCCC;
  2536. border-radius: 16rpx;
  2537. font-size: 28rpx;
  2538. font-family: PingFang SC;
  2539. font-weight: bold;
  2540. color: #666666;
  2541. display: flex;
  2542. align-items: center;
  2543. justify-content: center;
  2544. }
  2545. .btns {
  2546. width: 250rpx;
  2547. height: 80rpx;
  2548. border: 2rpx solid #999999;
  2549. border-radius: 40rpx;
  2550. font-size: 28rpx;
  2551. font-family: PingFang SC;
  2552. font-weight: bold;
  2553. color: #999999;
  2554. display: flex;
  2555. align-items: center;
  2556. justify-content: center;
  2557. line-height: 80rpx;
  2558. }
  2559. .btnss {
  2560. width: 250rpx;
  2561. height: 80rpx;
  2562. background: #346EF6;
  2563. border-radius: 40rpx;
  2564. font-size: 28rpx;
  2565. font-family: PingFang SC;
  2566. font-weight: bold;
  2567. color: #FFFFFF;
  2568. display: flex;
  2569. align-items: center;
  2570. justify-content: center;
  2571. line-height: 80rpx;
  2572. }
  2573. //优惠劵
  2574. .scroll-Y {
  2575. height: 580rpx;
  2576. }
  2577. .money_box {
  2578. // height: 300rpx;
  2579. // line-height: 300rpx;
  2580. // text-align: center;
  2581. // font-size: 36rpx;
  2582. width: 100%;
  2583. margin: 0 auto;
  2584. background: #ffffff;
  2585. border-radius: 14upx;
  2586. height: 220rpx;
  2587. margin-bottom: 20upx;
  2588. margin-top: 20rpx;
  2589. }
  2590. .box_tit {
  2591. width: 90%;
  2592. margin: 0 auto;
  2593. height: 80upx;
  2594. display: flex;
  2595. }
  2596. .money_name {
  2597. flex: 1;
  2598. display: flex;
  2599. justify-content: left;
  2600. align-items: center;
  2601. font-size: 27rpx;
  2602. font-weight: bold;
  2603. letter-spacing: 2upx;
  2604. }
  2605. .money_price {
  2606. flex: 1;
  2607. display: flex;
  2608. justify-content: flex-end;
  2609. align-items: center;
  2610. font-size: 48upx;
  2611. font-weight: bold;
  2612. color: red;
  2613. text {
  2614. font-size: 30rpx;
  2615. }
  2616. }
  2617. .money_data {
  2618. color: #999999;
  2619. font-size: 24rpx;
  2620. width: 90%;
  2621. margin: 0 auto;
  2622. margin-top: -8upx;
  2623. }
  2624. .u-line {
  2625. width: 90% !important;
  2626. border-bottom-width: 6upx !important;
  2627. margin: 0 auto !important;
  2628. margin-top: 22upx !important;
  2629. margin-bottom: 22upx !important;
  2630. }
  2631. .box_bottom {
  2632. width: 90%;
  2633. margin: 0 auto;
  2634. display: flex;
  2635. height: 40upx;
  2636. }
  2637. .money_use {
  2638. flex: 1;
  2639. color: #999999;
  2640. font-size: 24rpx;
  2641. display: flex;
  2642. justify-content: left;
  2643. align-items: center;
  2644. }
  2645. .lj_use {
  2646. width: 150rpx;
  2647. border: 2rpx solid #FF130A;
  2648. color: #FF130A;
  2649. text-align: center;
  2650. line-height: 48rpx;
  2651. border-radius: 40rpx;
  2652. font-size: 23rpx;
  2653. }
  2654. .deteJuan {
  2655. width: 190rpx;
  2656. border: 2rpx solid #FF130A;
  2657. color: #FF130A;
  2658. text-align: center;
  2659. line-height: 48rpx;
  2660. border-radius: 40rpx;
  2661. font-size: 23rpx;
  2662. margin: 20rpx 0;
  2663. }
  2664. .remkbtn {
  2665. width: 100%;
  2666. height: 98rpx;
  2667. background: #fe6b01;
  2668. border-radius: 16rpx;
  2669. font-size: 28rpx;
  2670. font-family: PingFang SC;
  2671. font-weight: bold;
  2672. color: #FFFFFF;
  2673. display: flex;
  2674. align-items: center;
  2675. justify-content: center;
  2676. line-height: 98rpx;
  2677. margin-top: 40rpx;
  2678. }
  2679. .kefu_item {
  2680. position: fixed;
  2681. bottom: 200upx;
  2682. right: 20rpx;
  2683. z-index: 999;
  2684. image {
  2685. width: 150rpx;
  2686. height: 150rpx;
  2687. }
  2688. }
  2689. .index_bottom_list {
  2690. /* #ifdef H5 */
  2691. display: flex;
  2692. flex-wrap: wrap;
  2693. padding-bottom: 30upx;
  2694. margin-left: 13upx;
  2695. /* #endif */
  2696. /* #ifndef H5 */
  2697. display: flex;
  2698. flex-wrap: wrap;
  2699. padding-bottom: 0upx;
  2700. margin-left: 15rpx;
  2701. /* #endif */
  2702. }
  2703. .centeritem_image {
  2704. width: 32upx;
  2705. height: 32upx
  2706. }
  2707. .centeritem_text {
  2708. font-family: PingFang SC;
  2709. font-weight: 500;
  2710. font-size: 24rpx;
  2711. color: #666666;
  2712. margin-left: 10rpx;
  2713. }
  2714. .index_bottom_list_view {
  2715. width: 350rpx;
  2716. // height: 240upx;
  2717. background-color: #FFFFFF;
  2718. border-radius: 20upx;
  2719. margin-left: 10upx;
  2720. margin-top: 15upx;
  2721. box-shadow: rgba(183, 183, 183, 0.3) 1px 1px 10px 1px;
  2722. }
  2723. .index_bottom_list_viewImage {
  2724. width: 350rpx;
  2725. height: 340upx;
  2726. border-top-left-radius: 20rpx;
  2727. border-top-right-radius: 20rpx;
  2728. // padding: 16upx;
  2729. }
  2730. .index_banner {
  2731. /* #ifdef APP-PLUS */
  2732. padding: 20upx 16upx 0;
  2733. margin: 0upx 6upx;
  2734. /* #endif */
  2735. /* #ifndef APP-PLUS */
  2736. padding: 20upx 16upx 0;
  2737. margin: 0upx 6upx;
  2738. /* #endif */
  2739. }
  2740. .swiper-container image {
  2741. width: 100%;
  2742. }
  2743. .banner_image {
  2744. width: 100%;
  2745. height: 218upx;
  2746. overflow: hidden;
  2747. border-radius: 20rpx;
  2748. }
  2749. .index_gonggao {
  2750. height: 60upx;
  2751. line-height: 50upx;
  2752. background: #EEF2FF;
  2753. border-radius: 16rpx;
  2754. width: 95%;
  2755. padding: 5upx 0 0 20upx;
  2756. margin: 20upx 0rpx;
  2757. margin-left: 20upx;
  2758. margin-right: 32upx;
  2759. color: #4B75FF;
  2760. }
  2761. </style>