index.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175
  1. <template>
  2. <view v-if="XCXIsSelect == '是'">
  3. <view>
  4. <view class="food_all">
  5. <!-- banner -->
  6. <view style="height: 100%; padding-bottom: 10px">
  7. <swiper class="swiper" :autoplay="true" interval="2000" duration="500" :circular="true" style="width: 100%; z-index: 1; height: 128px">
  8. <swiper-item v-for="(item, index) in shopDet.shopBanner" :key="index">
  9. <image :src="item" mode="scaleToFill" style="width: 100%"></image>
  10. </swiper-item>
  11. </swiper>
  12. <view style="position: relative; height: 34px; z-index: 1; margin-top: -50px"></view>
  13. <view class="shop padding">
  14. <view class="flex justify-between">
  15. <view style="width: 500rpx">
  16. <view class="text-xl text-bold u-line-1">{{ shopDet.shopName }}</view>
  17. <view class="flex align-center margin-top-xs">
  18. <view style="color: #fd6416; font-weight: bold; font-size: 30rpx">
  19. <u-icon name="star-fill" color="#FD6416" size="28"></u-icon>
  20. {{ shopDet.shopScore ? shopDet.shopScore : 0 }}
  21. </view>
  22. <view class="margin-left-xs text-gray">销量 {{ shopDet.shopSales ? shopDet.shopSales : 0 }}</view>
  23. <view class="margin-left-xs text-gray" v-if="shopDet.errandTime">约{{ shopDet.errandTime }}分钟</view>
  24. <view class="margin-left-xs text-gray" v-if="shopDet.minimumDelivery">{{ shopDet.minimumDelivery }}元起送</view>
  25. </view>
  26. <view class="flex align-center margin-top-xs">
  27. <!-- <view style="color: #FCD202;margin-right: 8rpx;">{{shopDet.autoSendOrder==1?'商家配送':'平台配送'}}</view> -->
  28. <view style="margin-right: 8rpx">{{ shopDet.autoSendOrder == 1 ? '商家配送:' : '平台配送:' }}</view>
  29. <view class="text-gray" style="margin-right: 8rpx">配送费{{ shopDet.errandMoney ? shopDet.errandMoney : 0 }}元</view>
  30. <!-- <view class="lable text-gray" v-if="shopDet.enableFullReductionFlag==1">
  31. 不参与配送费满减</view> -->
  32. <view class="lable text-gray" v-if="shopDet.enableFullReductionFlag == 0 && shopDet.exemptMinMoney">
  33. 满{{ shopDet.exemptMinMoney }}元免配送费
  34. </view>
  35. </view>
  36. </view>
  37. <view>
  38. <image :src="shopDet.shopCover" class="radius" style="width: 110rpx; height: 110rpx; margin-top: 30rpx"></image>
  39. </view>
  40. </view>
  41. <view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice">
  42. <text style="width: 14%">公告:</text>
  43. <u-notice-bar
  44. color="#AAAAAA"
  45. :speed="100"
  46. border-radius="30"
  47. padding="0rpx 0rpx"
  48. bg-color="#f5f5f5"
  49. style="width: 86%"
  50. type="none"
  51. mode="horizontal"
  52. :volume-icon="false"
  53. :list="shopDet.shopNotice.split(',')"
  54. ></u-notice-bar>
  55. </view>
  56. <view style="display: flex; margin-top: 3px" class="flex flex-wrap align-center" @click="clickGong">
  57. <view v-for="(ite, ind) in huoListss" :key="ind" v-if="huoListss && ite.activityType != '1'">
  58. <!-- -->
  59. <view class="lable flex justify-center align-center" style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box">
  60. <text v-if="ite.activityType == '2'">时段</text>
  61. <text v-if="ite.activityType == '3'">满额</text>
  62. <text v-if="ite.activityType == '4'">全场</text>
  63. <text style="margin-left: 3px">|</text>
  64. <text style="margin-left: 3px">{{ ite.activityName }}</text>
  65. </view>
  66. <!-- <view class="lable flex justify-center align-center"
  67. style="border-radius: 4rpx;border: 1rpx solid red;background-color: #ffffff;color: red;box-sizing: border-box;"
  68. >{{ite.activityName}}
  69. </view> -->
  70. </view>
  71. </view>
  72. <view class="margin-top-xs" style="width: 100%; height: 40rpx" v-if="couponList.length > 0">
  73. <scroll-view scroll-x="true" class="scroll-view_H">
  74. <view class="coupon-item flex align-center" v-for="(item, index) in couponList" :key="index" @click="coupons = true">
  75. <text>优惠券</text>
  76. <text style="margin-left: 3px">|</text>
  77. <view style="margin-left: 3px">¥</view>
  78. <view class="" style="font-weight: bold; font-size: 24rpx; margin-right: 10rpx">
  79. {{ item.money }}
  80. </view>
  81. <view style="margin-right: 20rpx">满{{ item.minMoney }}可用</view>
  82. <view style="font-weight: bold">领</view>
  83. </view>
  84. <!-- <view class="flex align-center" style="width: 100%;height: 100%;">
  85. </view> -->
  86. </scroll-view>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 食品 -->
  91. <view class="food">
  92. <!-- 店名地址 -->
  93. <view class="food_address">
  94. <view class="flex flex-sub bg justify-between padding-right-xl">
  95. <view @click="switchTab(1)" :class="current == 1 ? 'select' : ''" class="tabBtn">
  96. <view class="title">全部商品</view>
  97. <view :class="current == 1 ? 'active1' : ''"></view>
  98. </view>
  99. <view @click="switchTab(2)" :class="current == 2 ? 'select' : ''" class="tabBtn">
  100. <view class="title">评价</view>
  101. <view :class="current == 2 ? 'active1' : ''"></view>
  102. </view>
  103. <view @click="switchTab(3)" :class="current == 3 ? 'select' : ''" class="tabBtn">
  104. <view class="title">商家</view>
  105. <view :class="current == 3 ? 'active1' : ''"></view>
  106. </view>
  107. </view>
  108. <!-- <view class="flex Switch">
  109. <view @click="tabSwidth(1)" :class="orderType==1?'selSwitch':''">自取</view>
  110. <view @click="tabSwidth(2)" :class="orderType==2?'selSwitch':''">外卖</view>
  111. </view> -->
  112. <view>
  113. <!-- #ifdef MP-WEIXIN -->
  114. <!-- <image @click="goPindan()" src="../../../static/images/index/pindan.png"
  115. style="width: 160rpx;height: 64rpx;" mode=""></image> -->
  116. <!-- #endif -->
  117. </view>
  118. </view>
  119. <view class="VerticalBox" v-if="current == 1">
  120. <scroll-view class="VerticalNav nav bg-gray" scroll-y scroll-with-animation :scroll-top="verticalNavTop" style="height: calc(100vh - 590upx)">
  121. <view
  122. style="font-size: 28upx"
  123. class="cu-item text-lg"
  124. :class="index == tabCur ? 'cur' : 'text-gray'"
  125. v-for="(item, index) in dataList"
  126. :key="index"
  127. @tap="TabSelect"
  128. :data-id="index"
  129. >
  130. {{ item.classifyName }}
  131. </view>
  132. </scroll-view>
  133. <scroll-view
  134. class="VerticalMain"
  135. scroll-y
  136. scroll-with-animation
  137. style="height: calc(100vh - 590rpx)"
  138. :scroll-into-view="'main-' + mainCur"
  139. @scroll="VerticalMain"
  140. >
  141. <view class="bg-white padding-sm margin-bottom-sm" v-for="(item, index) in dataList" v-if="item.goodsList.length" :key="index" :id="'main-' + index">
  142. <view class="flex justify-between padding-bottom-sm" @click="goDet(ite.goodsId)" v-for="(ite, ind) in item.goodsList" :key="ind">
  143. <image :src="ite.goodsCover" mode="" style="width: 184rpx; height: 184rpx; border-radius: 10rpx"></image>
  144. <view class="flex-sub margin-left-sm padding-tb-xs flex flex-direction justify-between">
  145. <view class="text-black text-lg text-bold" style="font-size: 30upx">
  146. {{ ite.goodsName }}
  147. </view>
  148. <view class="text-gray">已售 {{ ite.sales ? ite.sales : 0 }}</view>
  149. <view class="text-gray text-sm u-line-2" style="overflow: hidden; line-clamp: 2; -webkit-line-clamp: 2; width: 100%">
  150. {{ ite.goodsDescribe ? ite.goodsDescribe : '' }}
  151. </view>
  152. <view class="flex justify-between" style="position: relative">
  153. <view class="text-sm text-red">
  154. ¥
  155. <text class="text-lg">{{ ite.goodsMoney }}</text>
  156. </view>
  157. <view
  158. style="width: 80rpx; height: 80rpx; line-height: 80rpx; position: absolute; right: 0; top: -10rpx; text-align: center"
  159. @click.stop="selSku(ite)"
  160. >
  161. <image src="../../../static/images/index/add.png" style="width: 40rpx; height: 40rpx"></image>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. <view style="height: 30px"></view>
  167. </view>
  168. </scroll-view>
  169. <empty v-if="!dataList.length"></empty>
  170. </view>
  171. <view class="" v-if="current == 2">
  172. <view class="flex margin-lr padding-tb-sm u-border-bottom" v-if="shopDet.shopScore">
  173. <view class="flex padding-right">
  174. <view class="text-sl" style="color: #fd6416">{{ shopDet.shopScore }}</view>
  175. <view class="flex flex-direction justify-around margin-left-sm">
  176. <view>商家评分</view>
  177. <view class="flex">
  178. <u-icon v-for="ite in shopDet.shopScore1" :key="ite" color="#FCD202" name="star-fill"></u-icon>
  179. </view>
  180. </view>
  181. </view>
  182. <view class="flex-sub flex justify-around u-border-left padding-left">
  183. <view class="flex flex-direction justify-around text-center">
  184. <view>好评</view>
  185. <view>{{ EvaluateData.goodReputation ? EvaluateData.goodReputation : 0 }}</view>
  186. </view>
  187. <view class="flex flex-direction justify-around text-center">
  188. <view>中评</view>
  189. <view>{{ EvaluateData.mediumReview ? EvaluateData.mediumReview : 0 }}</view>
  190. </view>
  191. <view class="flex flex-direction justify-around text-center">
  192. <view>差评</view>
  193. <view>{{ EvaluateData.negativeComment ? EvaluateData.negativeComment : 0 }}</view>
  194. </view>
  195. </view>
  196. </view>
  197. <view class="padding-tb-sm margin-lr">
  198. <u-button
  199. hover-class="none"
  200. @click="sel(0)"
  201. type="primary"
  202. shape="circle"
  203. size="mini"
  204. :plain="false"
  205. :custom-style="count == 0 ? customStyle : customStyle1"
  206. >
  207. 全部评论
  208. </u-button>
  209. <u-button
  210. hover-class="none"
  211. @click="sel(1)"
  212. type="primary"
  213. shape="circle"
  214. size="mini"
  215. :plain="false"
  216. :custom-style="count == 1 ? customStyle : customStyle1"
  217. >
  218. 好评({{ EvaluateData.goodReputation ? EvaluateData.goodReputation : 0 }})
  219. </u-button>
  220. <u-button
  221. hover-class="none"
  222. @click="sel(2)"
  223. type="primary"
  224. shape="circle"
  225. size="mini"
  226. :plain="false"
  227. :custom-style="count == 2 ? customStyle : customStyle1"
  228. >
  229. 中评({{ EvaluateData.mediumReview ? EvaluateData.mediumReview : 0 }})
  230. </u-button>
  231. <u-button
  232. hover-class="none"
  233. @click="sel(3)"
  234. type="primary"
  235. shape="circle"
  236. size="mini"
  237. :plain="false"
  238. :custom-style="count == 3 ? customStyle : customStyle1"
  239. >
  240. 差评({{ EvaluateData.negativeComment ? EvaluateData.negativeComment : 0 }})
  241. </u-button>
  242. </view>
  243. <view class="padding-tb-sm margin-lr u-border-bottom" v-for="(item, index) in EvaluateList" :key="index">
  244. <view class="flex justify-between align-center">
  245. <view class="flex align-center">
  246. <u-avatar :src="item.avatar" size="65"></u-avatar>
  247. <view class="margin-left-sm" style="line-height: 46upx">
  248. {{ item.userName ? item.userName : '匿名' }}
  249. </view>
  250. <view class="flex margin-left-sm">
  251. <u-icon v-for="ite in item.score" :key="ite" color="#FCD202" name="star-fill"></u-icon>
  252. </view>
  253. </view>
  254. <view>{{ item.createTime }}</view>
  255. </view>
  256. <view class="margin-top-sm">{{ item.evaluateMessage }}</view>
  257. <view class="pinglunImg" v-if="item.pictures != undefined && item.pictures">
  258. <view class="pinglunImg-box flex justify-between flex-wrap">
  259. <image
  260. style="margin-bottom: 20rpx"
  261. @click="yuanlan(item.pictures == undefined ? [] : item.pictures.split(','), index2)"
  262. v-for="(item2, index2) in item.pictures == undefined ? [] : item.pictures.split(',')"
  263. :src="item2"
  264. mode=""
  265. ></image>
  266. <image style="margin-bottom: 20rpx; width: 160rpx; height: 0" src="" mode=""></image>
  267. <image style="margin-bottom: 20rpx; width: 160rpx; height: 0" src="" mode=""></image>
  268. </view>
  269. </view>
  270. <view class="margin-top-sm" v-if="item.shopReplyMessage">
  271. <view class="flex align-center">
  272. <view class="flex align-center text-df" style="color: #999999">
  273. <view class="text-df">商家回复:</view>
  274. {{ item.shopReplyMessage }}
  275. </view>
  276. </view>
  277. </view>
  278. </view>
  279. <empty v-if="!EvaluateList.length"></empty>
  280. </view>
  281. <view class="padding-bottom" v-if="current == 3">
  282. <view class="shop_xiang">
  283. <view class="shopDizhi margin-lr">
  284. <image :src="Tupian('/shopXiang/address.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  285. <text style="margin-left: 5px">{{ shopDet.detailedAddress }}</text>
  286. <image
  287. @click="call(shopDet.phone)"
  288. :src="Tupian('/shopXiang/phone.png')"
  289. class="radius"
  290. style="width: 44rpx; height: 44rpx; float: right; margin-top: 20rpx"
  291. ></image>
  292. </view>
  293. <view class="shopLine margin-lr"></view>
  294. <view class="shopDizhi margin-lr">
  295. <image :src="Tupian('/shopXiang/22.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  296. <text style="margin-left: 5px">营业时间:{{ shopDet.businessHours }}-{{ shopDet.lockHours }}</text>
  297. </view>
  298. <view class="shopLine margin-lr"></view>
  299. <view class="shopDizhi margin-lr">
  300. <image :src="Tupian('/shopXiang/33.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  301. <text style="margin-left: 5px">商家品类:{{ shopDet.shopTypeName }}</text>
  302. </view>
  303. <view class="shopLine margin-lr"></view>
  304. <view class="shopDizhi margin-lr">
  305. <image :src="Tupian('/shopXiang/44.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  306. <text style="margin-left: 5px">配送范围:{{ shopDet.distributionDistance }}以内</text>
  307. </view>
  308. </view>
  309. <view class="shop_zheng">
  310. <view class="shopDizhi margin-lr">
  311. <image :src="Tupian('/shopXiang/55.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  312. <text style="margin-left: 5px">营业执照,食品经营许可和健康证</text>
  313. </view>
  314. <view class="image-container" v-if="shop_zhizhao.length > 0">
  315. <image v-for="(item, index) in shop_zhizhao" :key="index" class="image" :src="item" style="margin-left: 10px" @click="clickImg(item)"></image>
  316. </view>
  317. </view>
  318. <!-- <view class="flex align-center margin-top-sm">
  319. <view class="flex-sub">
  320. <view class="text-black text-lg text-bold">{{shopDet.shopName}}</view>
  321. <view class="margin-top-sm" @click="goMap">
  322. <u-icon name="map" size="28"></u-icon> {{shopDet.detailedAddress}}
  323. </view>
  324. </view>
  325. <image @click="call(shopDet.phone)" src="../../../static/images/index/phone.png"
  326. class="radius" style="width: 38rpx;height: 49rpx;">
  327. </image>
  328. </view>
  329. <image :src="shopDet.shopCover" class="radius margin-top-sm"
  330. style="width: 140rpx;height: 140rpx;">
  331. </image>
  332. <view class="text-black text-lg text-bold margin-top-xs">商家信息</view>
  333. <view class="text-black margin-top-xs text-df">
  334. 营业时间:{{shopDet.businessHours}}-{{shopDet.lockHours}}</view>
  335. <view class="text-black margin-top-xs text-df">商家品类:{{shopDet.shopTypeName}}</view>
  336. <view class="text-black margin-top-xs text-df">配送范围:{{shopDet.distributionDistance}}以内</view>
  337. <view class="text-black margin-top-xs text-df" v-if="shopDet.shopNotice">
  338. 公告:{{shopDet.shopNotice}}</view>
  339. <view class="text-black margin-top-xs text-df" v-else>公告:店铺开业啦!</view> -->
  340. </view>
  341. </view>
  342. <!-- 结算 -->
  343. <view class="settlement" @click="isPopupShow" v-if="current == 1">
  344. <view class="settlement_img">
  345. <image src="../../../static/images/index/diancan.png" mode=""></image>
  346. <view class="settlement_hot">{{ goodsNum }}</view>
  347. </view>
  348. <view class="settlement_le">
  349. <text>¥</text>
  350. {{ totalPrice }}
  351. <text v-if="shopDet.minimumDelivery" style="margin-left: 10rpx">{{ shopDet.minimumDelivery }}元起送</text>
  352. </view>
  353. <view v-if="totalPrice >= shopDet.minimumDelivery" class="settlement_ri" @click.stop="goConfirm_throttle()">去结算</view>
  354. <view v-else class="settlement_ri1">去结算</view>
  355. </view>
  356. <!-- 购物车弹窗 -->
  357. <u-popup v-model="popupShow" mode="bottom" border-radius="20">
  358. <view class="padding">
  359. <view class="flex justify-between align-center margin-bottom-sm">
  360. <view class="text-bold text-black text-df">已选餐品</view>
  361. <view class="flex align-center">
  362. <image src="../../../static/images/index/delete.png" style="width: 28rpx; height: 31rpx" mode=""></image>
  363. <text class="margin-left-xs" @click="empty">清空购物车</text>
  364. </view>
  365. </view>
  366. <scroll-view scroll-y="true" class="popup">
  367. <view v-for="(item, ind) in goodsList.orderGoodsList[0]" :key="ind">
  368. <view class="flex align-center margin-tb-sm">
  369. <image :src="item.goodsPicture[0]" style="width: 96rpx; height: 96rpx; border-radius: 10rpx"></image>
  370. <view class="margin-left-sm">
  371. <view>{{ item.goodsName }}</view>
  372. <view v-if="item.skuMessage">{{ item.skuMessage }}</view>
  373. </view>
  374. </view>
  375. <view class="flex justify-between align-center">
  376. <view class="text-bold text-sm">
  377. ¥
  378. <text class="text-lg">{{ item.goodsPrice }}</text>
  379. </view>
  380. <view class="flex align-center justify-between">
  381. <view @click.stop="noAdd(item, ind)">
  382. <image src="../../../static/images/index/jian.png" style="width: 54rpx; height: 54rpx"></image>
  383. </view>
  384. <view class="text-center margin-lr-xs">{{ item.goodsNum }}</view>
  385. <view @click.stop="add(item, ind)">
  386. <image src="../../../static/images/index/add.png" style="width: 50rpx; height: 50rpx"></image>
  387. </view>
  388. </view>
  389. </view>
  390. </view>
  391. </scroll-view>
  392. </view>
  393. <view class="settlement1 margin-top-lg">
  394. <view class="settlement_img">
  395. <image src="../../../static/images/index/diancan.png" mode=""></image>
  396. <view class="settlement_hot">{{ goodsNum }}</view>
  397. </view>
  398. <view class="settlement_le">
  399. <text>¥</text>
  400. {{ totalPrice }}
  401. <text v-if="shopDet.minimumDelivery" style="margin-left: 10rpx">{{ shopDet.minimumDelivery }}元起送</text>
  402. </view>
  403. <view v-if="totalPrice >= shopDet.minimumDelivery" class="settlement_ri" @click.stop="goConfirm_throttle()">去结算</view>
  404. <view v-else class="settlement_ri1">去结算</view>
  405. </view>
  406. </u-popup>
  407. <!-- 选择规格弹窗 -->
  408. <u-popup v-model="skuShow" mode="center" :closeable="true" border-radius="20">
  409. <view style="width: 700rpx">
  410. <view class="text-center text-lg text-bold padding-tb">{{ goodsDet.goodsName }}</view>
  411. <view class="margin-top-sm padding-lr" v-for="(item, index) in attrList" :key="index">
  412. <view class="text-bold text-black">{{ item.value }}</view>
  413. <view class="flex margin-tb-sm flex-wrap">
  414. <view v-for="(ite, ind) in item.detail" :key="ind" @click="skuSel(ite, index, ind)" class="margin-bottom-sm">
  415. <view class="skuBtn" :class="item.goodsId == index && item.attrId == ind ? 'active' : ''">
  416. {{ ite.name }}
  417. </view>
  418. </view>
  419. </view>
  420. </view>
  421. <view class="flex justify-between padding-lr padding-top">
  422. <view>
  423. <view class="text-xl text-bold text-black">
  424. <text class="text-sm">¥</text>
  425. {{ price }}
  426. </view>
  427. <view class="detail_describe_text2">{{ checkString }}</view>
  428. </view>
  429. <u-number-box v-model="value" :min="1" @change="valChange"></u-number-box>
  430. </view>
  431. <view class="detail_account_bottom padding">
  432. <view class="detail_account_bottom_le" @click="payment()">立即购买</view>
  433. <view class="detail_account_bottom_ri" @click="orderSel(2)">加入购物车</view>
  434. </view>
  435. </view>
  436. </u-popup>
  437. <!-- 优惠券弹窗 -->
  438. <!-- coupons -->
  439. <u-popup v-model="coupons" height="520rpx" mode="bottom" :closeable="true">
  440. <view class="yhq flex justify-center align-center">
  441. <view class="yhq-box">
  442. <view class="yhq-box-title">优惠券</view>
  443. <view class="yhq-box-list">
  444. <scroll-view scroll-y="true" style="width: 100%; height: 100%; padding-bottom: 20rpx">
  445. <view class="yhq-box-list-item flex justify-center align-center" v-for="(item, index) in couponList" :key="index">
  446. <view class="yhq-box-list-item-c flex justify-between align-center">
  447. <view class="yhq-box-list-item-c-l flex align-center">
  448. <image
  449. :src="item.couponPicture ? item.couponPicture : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'"
  450. style="width: 80rpx; height: 80rpx; border-radius: 20rpx"
  451. mode=""
  452. ></image>
  453. <view class="" style="margin-left: 20rpx">
  454. <view class="">
  455. <text style="color: red; margin-right: 10rpx">¥{{ item.money }}</text>
  456. <text style="font-weight: bold; margin-right: 10rpx">优惠券</text>
  457. (满{{ item.minMoney }}元可用)
  458. </view>
  459. <view class="" style="font-size: 20rpx; color: gray">领取后{{ item.endDate }}天内有效</view>
  460. </view>
  461. </view>
  462. <view class="yhq-box-list-item-c-r" style="color: red" @click="lingqv(item.couponId)">领取</view>
  463. </view>
  464. </view>
  465. </scroll-view>
  466. </view>
  467. </view>
  468. </view>
  469. </u-popup>
  470. <!-- 点击店铺公告栏弹框 -->
  471. <u-popup v-model="popupGong" mode="center" border-radius="20">
  472. <view style="width: 700rpx; height: 592rpx">
  473. <view style="width: 500rpx; display: flex">
  474. <view class="gong_img">
  475. <image :src="shopDet.shopCover" class="radius" style="width: 110rpx; height: 110rpx"></image>
  476. </view>
  477. <view class="gong_name">{{ shopDet.shopName }}</view>
  478. <view class="flex align-center margin-top-xs gong_pei">
  479. <!-- <view style="color: #FCD202;margin-right: 8rpx;">{{shopDet.autoSendOrder==1?'商家配送':'平台配送'}}</view> -->
  480. <view style="margin-right: 8rpx">{{ shopDet.autoSendOrder == 1 ? '商家配送:' : '平台配送:' }}</view>
  481. <view class="text-gray" style="margin-right: 8rpx">配送费{{ shopDet.errandMoney ? shopDet.errandMoney : 0 }}元</view>
  482. <!-- <view class="lable text-gray" v-if="shopDet.enableFullReductionFlag==1">
  483. 不参与配送费满减</view> -->
  484. <view class="lable text-gray" v-if="shopDet.enableFullReductionFlag == 0 && shopDet.exemptMinMoney">满{{ shopDet.exemptMinMoney }}元免配送费</view>
  485. </view>
  486. <view class="gong_line"></view>
  487. </view>
  488. <view class="align-center margin-top-xs" style="margin-top: 35rpx">
  489. <view v-for="(ite, ind) in gongHuo" :key="ind">
  490. <view class="flex align-center" style="margin-left: 40rpx; margin-top: 4px" v-for="(ite2, ind2) in ite.activityInGroups" :key="ind2">
  491. <text
  492. style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box; border: 1px solid rgba(215, 55, 49, 1)"
  493. v-if="ite.activityType == '2'"
  494. >
  495. 时段
  496. </text>
  497. <text
  498. style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box; border: 1px solid rgba(215, 55, 49, 1)"
  499. v-if="ite.activityType == '3'"
  500. >
  501. 满额
  502. </text>
  503. <text
  504. style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box; border: 1px solid rgba(215, 55, 49, 1)"
  505. v-if="ite.activityType == '4'"
  506. >
  507. 全场
  508. </text>
  509. <text style="margin-left: 6px">{{ ite2.activityTitle }}</text>
  510. <view class="gong_huo" style="margin-left: 6px">
  511. <text v-if="ite2.suitType == '1'">皆适用</text>
  512. <text v-if="ite2.suitType == '2'">仅针对第一次下单</text>
  513. <text v-if="ite2.limitType == '1'">无数量限制</text>
  514. <text v-if="ite2.limitType == '2'">每天限使用{{ ite2.limitValue }}次</text>
  515. </view>
  516. </view>
  517. </view>
  518. <!-- <view v-for="(ite,ind) in gongHuo" :key='ind' v-if="ite.activityType=='3'">
  519. <view class=" flex align-center" style="margin-left: 40rpx;margin-top: 4px;" v-for="(ite2,ind2) in ite2.activityInGroups" :key='ind2'>
  520. <text style="border-radius: 4rpx;background-color: #ffffff;color: red;box-sizing: border-box;border: 1px solid rgba(215, 55, 49, 1);">时段</text>
  521. <text style="margin-left: 6px;">{{ite2.activityTitle}}</text>
  522. <view class="gong_huo" style="margin-left: 6px;">
  523. <text v-if="ite2.suitType=='1'">无限制</text>
  524. <text v-if="ite2.suitType=='2'">仅针对第一次下单</text>
  525. </view>
  526. </view>
  527. </view>
  528. <view v-for="(ite,ind) in gongHuo" :key='ind' v-if="ite.activityType=='4'">
  529. <view class=" flex align-center" style="margin-left: 40rpx;margin-top: 4px;" v-for="(ite2,ind2) in ite2.activityInGroups" :key='ind2'>
  530. <text style="border-radius: 4rpx;background-color: #ffffff;color: red;box-sizing: border-box;border: 1px solid rgba(215, 55, 49, 1);">时段</text>
  531. <text style="margin-left: 6px;">{{ite2.activityTitle}}</text>
  532. <view class="gong_huo" style="margin-left: 6px;">
  533. <text v-if="ite2.suitType=='1'">无限制</text>
  534. <text v-if="ite2.suitType=='2'">仅针对第一次下单</text>
  535. </view>
  536. </view>
  537. </view> -->
  538. </view>
  539. <view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice" style="margin-top: 35rpx; margin-left: 40rpx">
  540. <text style="width: 14%">公告:</text>
  541. <view>{{ shopDet.shopNotice }}</view>
  542. </view>
  543. </view>
  544. </u-popup>
  545. </view>
  546. <view class="hintPopul" v-if="shopDet && shopDet.putawayFlag == 1">
  547. <view class="content_">
  548. <image src="../../../static/images/index/shop.png" style="width: 200rpx; height: 180rpx"></image>
  549. <view class="text-xl text-bold">店铺打烊啦</view>
  550. <view class="hintText margin-top-sm text-gray">现在店铺已经打烊了,营业时间</view>
  551. <view class="margin-top-xs text-gray margin-bottom">{{ shopDet.businessHours }}-{{ shopDet.lockHours }}</view>
  552. <view class="Btns" @click="goBack()">知道了</view>
  553. </view>
  554. </view>
  555. </view>
  556. </view>
  557. </template>
  558. <script>
  559. import empty from '@/components/empty.vue'
  560. import { throttle } from '@/utils/throttle.js'
  561. export default {
  562. components: {
  563. empty
  564. },
  565. data() {
  566. return {
  567. maskCustomStyle: {
  568. background: 'rgba(0,0,0,0.1)'
  569. },
  570. hdStyle: {
  571. background: '#F5F5F5'
  572. },
  573. customStyle: {
  574. color: '#333333',
  575. background: '#FCD202',
  576. marginRight: '20rpx',
  577. border: 0
  578. },
  579. customStyle1: {
  580. color: '#333333',
  581. background: '#F2F2F2',
  582. marginRight: '20rpx',
  583. border: 0
  584. },
  585. current: 1,
  586. loading: false, // 是否显示骨架屏组件
  587. tabCur: 0,
  588. mainCur: 0,
  589. verticalNavTop: 0,
  590. load: true,
  591. dataList: [],
  592. shopDet: {},
  593. shopList: [],
  594. city: '西安',
  595. lat: '',
  596. lng: '',
  597. shopName: '',
  598. page: 1,
  599. limit: 10,
  600. evaluatePage: 1,
  601. evaluateLimit: 10,
  602. show: true,
  603. totalPrice: 0,
  604. goodsNum: 0,
  605. goodsList: {
  606. orderGoodsList: [[]]
  607. },
  608. popupShow: false,
  609. skuShow: false,
  610. popupGong: false, //店铺公告弹框
  611. gongHuo: [], //店铺公告活动
  612. userId: '',
  613. hintShow: true, //
  614. shouquan: 0,
  615. orderType: 2,
  616. value: 1,
  617. goodsDet: {},
  618. skuId: '',
  619. skuMessage: '',
  620. skuList: [],
  621. attrList: [],
  622. checkString: '',
  623. checkStateList: [],
  624. CheckattrValue: false,
  625. price: 0,
  626. echoSkuList: [],
  627. echoSku: [],
  628. isEchoSku: {},
  629. shopId: '',
  630. lng: '',
  631. lat: '',
  632. commentList: [],
  633. EvaluateList: [],
  634. EvaluateData: {},
  635. grade: '',
  636. count: 0,
  637. orderId: '',
  638. isTrue: false,
  639. XCXIsSelect: '否',
  640. couponList: [], //优惠券列表
  641. coupons: false,
  642. huoListss: [], //活动
  643. shop_zhizhao: []
  644. }
  645. },
  646. onLoad(option) {
  647. if (option.huoListss) {
  648. this.huoListss = JSON.parse(decodeURIComponent(option.huoListss))
  649. }
  650. this.XCXIsSelect = this.$queue.getData('XCXIsSelect')
  651. if (this.XCXIsSelect == '否') {
  652. // this.getGuize()
  653. uni.setNavigationBarTitle({
  654. title: '隐私政策'
  655. })
  656. } else {
  657. uni.setNavigationBarTitle({
  658. title: '店铺详情'
  659. })
  660. }
  661. let that = this
  662. that.shopId = option.shopId
  663. uni.showLoading({
  664. title: '加载中',
  665. mask: true // 是否显示透明蒙层,防止触摸穿透
  666. })
  667. // #ifndef H5
  668. uni.getLocation({
  669. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  670. success: function (res) {
  671. that.lat = res.latitude
  672. that.lng = res.longitude
  673. }
  674. })
  675. that.getData()
  676. // #endif
  677. // #ifdef H5
  678. uni.getLocation({
  679. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  680. success: function (res) {
  681. console.log(res, '经纬度')
  682. that.lat = res.latitude
  683. that.lng = res.longitude
  684. that.getData()
  685. }
  686. })
  687. that.getData()
  688. // #endif
  689. that.orderId = uni.getStorageSync('orderId') ? uni.getStorageSync('orderId') : ''
  690. },
  691. onHide() {
  692. uni.removeStorageSync('types')
  693. },
  694. onShow() {
  695. // 清空购物车
  696. let isClear = uni.getStorageSync('isClear')
  697. if (isClear) {
  698. uni.setStorageSync('isClear', false)
  699. this.empty()
  700. } else {
  701. this.getOrderList()
  702. }
  703. this.orderId = uni.getStorageSync('orderId') ? uni.getStorageSync('orderId') : ''
  704. if (this.orderId) {
  705. this.getOrderDetail()
  706. }
  707. this.userId = uni.getStorageSync('userId')
  708. // this.getOrderList()
  709. this.getcouponList()
  710. },
  711. onShareAppMessage(res) {
  712. //发送给朋友
  713. return {
  714. title: this.shopDet.shopName,
  715. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  716. imageUrl: this.shopDet.shopCover
  717. }
  718. },
  719. onShareTimeline(res) {
  720. //分享到朋友圈
  721. return {
  722. title: this.shopDet.shopName,
  723. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  724. imageUrl: this.shopDet.shopCover
  725. }
  726. },
  727. methods: {
  728. //营业执照点击放大
  729. clickImg(img) {
  730. uni.previewImage({
  731. urls: [img], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  732. current: '', // 当前显示图片的http链接,默认是第一个
  733. success: function (res) {},
  734. fail: function (res) {},
  735. complete: function (res) {}
  736. })
  737. },
  738. //点击店铺公告弹框
  739. clickGong() {
  740. this.getHuoList()
  741. this.popupGong = true
  742. },
  743. //获取店铺活动信息
  744. getHuoList() {
  745. let data = {
  746. shopId: this.shopId
  747. }
  748. this.$Request.get(`/app/activity-shop/shop-activity-group/${this.shopId}`, data).then((res) => {
  749. if (res.code == 0) {
  750. this.gongHuo = res.data.activityTypeGroups
  751. }
  752. })
  753. },
  754. //领取优惠券
  755. lingqv(couponId, needIntegral) {
  756. let that = this
  757. let data = {
  758. couponId: couponId
  759. }
  760. that.$Request.postT('/app/coupon/buyCoupon', data).then((res) => {
  761. if (res.code == 0) {
  762. uni.showToast({
  763. title: '领取成功'
  764. })
  765. that.coupons = false
  766. } else {
  767. uni.showToast({
  768. title: res.msg,
  769. icon: 'none'
  770. })
  771. }
  772. })
  773. },
  774. //获取商家优惠券
  775. getcouponList() {
  776. // couponList
  777. let data = {
  778. shopId: this.shopId
  779. }
  780. this.$Request.get('/app/coupon/seleteAllCoupon', data).then((res) => {
  781. if (res.code == 0 && res.data) {
  782. this.couponList = res.data
  783. }
  784. })
  785. },
  786. // 预览图片
  787. yuanlan(arr, index) {
  788. uni.previewImage({
  789. urls: arr,
  790. current: index
  791. })
  792. },
  793. goBack() {
  794. uni.navigateBack({})
  795. },
  796. goNav(url) {
  797. uni.navigateTo({
  798. url
  799. })
  800. },
  801. switchTab(e) {
  802. // this.page = 1
  803. this.current = e
  804. if (this.current == 1) {
  805. this.getData()
  806. } else if (this.current == 2) {
  807. this.evaluatePage = 1
  808. this.getEvaluateList()
  809. } else if (this.current == 3) {
  810. }
  811. },
  812. sel(e) {
  813. this.grade = e
  814. this.count = e
  815. this.evaluatePage = 1
  816. this.getEvaluateList()
  817. },
  818. // 获取评论列表
  819. getEvaluateList() {
  820. let data = {
  821. shopId: this.shopId,
  822. page: this.evaluatePage,
  823. limit: this.evaluateLimit,
  824. grade: this.grade
  825. }
  826. this.$Request.get('/app/goods/selectEvaluateByShopId', data).then((res) => {
  827. if (res.code == 0 && res.data) {
  828. this.EvaluateData = res.data
  829. if (this.evaluatePage == 1) {
  830. this.EvaluateList = res.data.pageUtils.list
  831. } else {
  832. this.EvaluateList = [...this.EvaluateList, ...res.data.pageUtils.list]
  833. }
  834. }
  835. })
  836. },
  837. // 获取店铺信息
  838. getData() {
  839. let data = {
  840. shopId: this.shopId,
  841. lng: this.lng,
  842. lat: this.lat
  843. }
  844. this.$Request.get('/app/goods/selectGoodsList', data).then((res) => {
  845. console.log(res, '999')
  846. if (res.code == 0 && res.data) {
  847. this.dataList = res.data.list
  848. this.shopDet = res.data.goodsShop
  849. for (var i = 0; i < this.dataList.length; i++) {
  850. this.dataList[i].id = i
  851. }
  852. this.shopDet.shopScore1 = Math.floor(this.shopDet.shopScore)
  853. this.shopDet.errandTime = Math.round(this.shopDet.errandTime)
  854. if (this.shopDet.shopBanner) {
  855. this.shopDet.shopBanner = this.shopDet.shopBanner.split(',')
  856. }
  857. console.log(this.shopDet, 'kkkkkk')
  858. if (this.shopDet.businessLicense) {
  859. this.shop_zhizhao = this.shopDet.businessLicense.split(',')
  860. }
  861. this.shopDet.shopScore = this.shopDet.shopScore.toFixed(2)
  862. if (this.shopDet.distributionDistance < 1000) {
  863. this.shopDet.distributionDistance = '<1000m'
  864. } else {
  865. this.shopDet.distributionDistance = Number(this.shopDet.distributionDistance / 1000) + 'km'
  866. }
  867. uni.setNavigationBarTitle({
  868. title: this.shopDet.shopName
  869. })
  870. }
  871. uni.hideLoading()
  872. })
  873. },
  874. getEchoOrder() {
  875. let data = {
  876. shopId: this.shopId,
  877. goodsId: this.goodsDet.goodsId
  878. }
  879. this.$Request.get('/app/order/echoOrder', data).then((res) => {
  880. if (res.code == 0 && res.data.length) {
  881. this.echoSkuList = res.data
  882. if (res.data[0].skuMessage) {
  883. this.echoSku = res.data[0].skuMessage.split(',')
  884. }
  885. }
  886. })
  887. },
  888. // 弹窗展示商品详情
  889. selSku(item) {
  890. this.value = 1
  891. this.checkStateList = []
  892. this.checkString = ''
  893. this.attrList = []
  894. this.skuId = ''
  895. this.skuMessage = ''
  896. let data = {
  897. goodsId: item.goodsId
  898. }
  899. console.log(data)
  900. this.$Request.get('/app/goods/selectGoodsById', data).then((res) => {
  901. uni.hideLoading()
  902. if (res.code == 0) {
  903. this.goodsDet = res.data
  904. if (this.goodsDet.goodsLabel) {
  905. this.goodsDet.goodsLabel = this.goodsDet.goodsLabel.split(',')
  906. }
  907. if (this.goodsDet.goodsPicture) {
  908. this.goodsDet.goodsPicture = this.goodsDet.goodsPicture.split(',')
  909. }
  910. console.log(this.goodsDet, '商品')
  911. this.price = this.goodsDet.goodsMoney
  912. this.skuList = this.goodsDet.sku
  913. this.getEchoOrder()
  914. if (!this.skuList.length) {
  915. let that = this
  916. setTimeout(function () {
  917. that.orderSel(2)
  918. }, 500)
  919. } else {
  920. if (this.goodsDet.attr.length) {
  921. this.attrList = this.goodsDet.attr[0] ? this.goodsDet.attr[0].attrValue : []
  922. } else {
  923. this.skuId = this.goodsDet.sku[0].id
  924. }
  925. this.attrList.forEach((res) => {
  926. let data = {
  927. name: ''
  928. }
  929. this.checkStateList.push(data)
  930. let detail = []
  931. if (res.detail.length > 0) {
  932. res.detail.split(',').forEach((d) => {
  933. let data = {
  934. name: '',
  935. state: ''
  936. }
  937. data.name = d
  938. detail.push(data)
  939. })
  940. res.detail = detail
  941. }
  942. })
  943. this.skuShow = true
  944. }
  945. }
  946. })
  947. },
  948. // 选择规格
  949. skuSel(item, index, ind) {
  950. this.attrList[index].goodsId = index
  951. this.attrList[index].attrId = ind
  952. this.checkStateList[index].name = item.name
  953. this.checkString = ''
  954. this.checkStateList.forEach((d) => {
  955. if (d.name) {
  956. if (this.checkString) {
  957. this.checkString = this.checkString + ',' + d.name
  958. } else {
  959. this.checkString = d.name
  960. }
  961. }
  962. })
  963. console.log(this.checkString)
  964. console.log(this.skuList)
  965. for (var i = 0; i < this.skuList.length; i++) {
  966. let d = this.skuList[i]
  967. // console.log(this.skuList[i], 'l')
  968. if (d.detailJson == this.checkString) {
  969. console.log(d.detailJson, this.checkString)
  970. // if (d.stock > 0) {
  971. this.skuId = d.id
  972. this.skuMessage = d.detailJson
  973. this.price = d.skuPrice
  974. this.CheckattrValue = true
  975. // } else {
  976. // this.$queue.showToast('库存不足请选择其他规格')
  977. // }
  978. break
  979. } else {
  980. this.CheckattrValue = false
  981. }
  982. }
  983. },
  984. valChange(e) {
  985. console.log('当前值为: ' + e.value)
  986. this.value = e.value
  987. },
  988. // 立即购买
  989. payment() {
  990. if (!this.userId) {
  991. uni.navigateTo({
  992. url: '/pages/public/login'
  993. })
  994. return
  995. }
  996. if (this.attrList.length) {
  997. if (this.checkString == '' || !this.CheckattrValue) {
  998. this.$queue.showToast('请选择正确的商品规格')
  999. return
  1000. }
  1001. }
  1002. let goodstr1 = 0 //商品库的 必须次数
  1003. let goodstr2 = 0 //购物车的 必须次数
  1004. let regex = new RegExp('必选', 'g')
  1005. let dataList = JSON.stringify(this.dataList)
  1006. if (dataList.match(regex)) {
  1007. goodstr1 = dataList.match(regex).length
  1008. if (dataList.indexOf('必选') != -1) {
  1009. //检测商品是否存在必选
  1010. let goodsList = JSON.stringify(this.goodsDet)
  1011. if (goodsList.match(regex)) {
  1012. goodstr2 = goodsList.match(regex).length
  1013. if (goodstr1 == goodstr2) {
  1014. //检查购物车商品是否存在必须
  1015. let data = {
  1016. goodsId: this.goodsDet.goodsId,
  1017. skuMessage: this.skuMessage,
  1018. skuId: this.skuId,
  1019. num: this.value,
  1020. orderType: this.orderType,
  1021. shopId: this.shopId
  1022. }
  1023. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1024. if (res.code == 0) {
  1025. this.skuShow = false
  1026. uni.navigateTo({
  1027. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1028. })
  1029. } else {
  1030. this.$queue.showToast(res.msg)
  1031. }
  1032. })
  1033. } else {
  1034. uni.showToast({
  1035. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1036. icon: 'none'
  1037. })
  1038. return
  1039. }
  1040. } else {
  1041. uni.showToast({
  1042. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1043. icon: 'none'
  1044. })
  1045. return
  1046. }
  1047. }
  1048. } else {
  1049. let data = {
  1050. goodsId: this.goodsDet.goodsId,
  1051. skuMessage: this.skuMessage,
  1052. skuId: this.skuId,
  1053. num: this.value,
  1054. orderType: this.orderType,
  1055. shopId: this.shopId
  1056. }
  1057. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1058. if (res.code == 0) {
  1059. this.skuShow = false
  1060. uni.navigateTo({
  1061. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1062. })
  1063. } else {
  1064. this.$queue.showToast(res.msg)
  1065. }
  1066. })
  1067. }
  1068. },
  1069. // 加入购物车
  1070. orderSel(e) {
  1071. if (this.value < 1) {
  1072. uni.showToast({
  1073. title: '数量不能小于1',
  1074. icon: 'none'
  1075. })
  1076. return
  1077. }
  1078. if (!this.userId) {
  1079. uni.navigateTo({
  1080. url: '/pages/public/login'
  1081. })
  1082. return
  1083. }
  1084. if (this.attrList.length) {
  1085. if (this.checkString == '' || !this.CheckattrValue) {
  1086. this.$queue.showToast('请选择正确的商品规格')
  1087. return
  1088. }
  1089. }
  1090. let data = {
  1091. goodsId: this.goodsDet.goodsId,
  1092. skuMessage: this.skuMessage,
  1093. skuId: this.skuId,
  1094. num: this.value,
  1095. shopId: this.shopId
  1096. }
  1097. // let url = ''
  1098. // if (this.types == 1) {
  1099. // url = '/app/order/joinOrder'
  1100. // } else {
  1101. // url = '/app/order/insertOrder'
  1102. // }
  1103. // console.log(data, '参数')
  1104. this.$Request.post('/app/order/insertOrder', data).then((res) => {
  1105. if (res.code == 0) {
  1106. this.$queue.showToast('添加成功')
  1107. this.skuShow = false
  1108. this.getOrderList()
  1109. } else {
  1110. this.$queue.showToast(res.msg)
  1111. }
  1112. })
  1113. },
  1114. // 切换外卖/自提
  1115. tabSwidth(e) {
  1116. this.orderType = e
  1117. this.getOrderList()
  1118. },
  1119. // 展示购物车弹窗
  1120. isPopupShow() {
  1121. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1122. this.popupShow = true
  1123. } else {
  1124. uni.showToast({
  1125. title: '请先添加商品',
  1126. icon: 'none'
  1127. })
  1128. }
  1129. },
  1130. // 添加数量
  1131. add(item, index) {
  1132. // this.count++;
  1133. this.goodsList.orderGoodsList[0][index].goodsNum++
  1134. let data = {
  1135. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1136. type: 1,
  1137. num: 1,
  1138. shopId: this.shopId
  1139. }
  1140. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1141. if (res.code == 0) {
  1142. this.getOrderList()
  1143. } else {
  1144. this.$queue.showToast(res.msg)
  1145. this.goodsList.orderGoodsList[0][index].goodsNum--
  1146. }
  1147. })
  1148. },
  1149. // 减少数量
  1150. noAdd(item, index) {
  1151. this.goodsList.orderGoodsList[0][index].goodsNum--
  1152. // this.count--;
  1153. let data = {
  1154. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1155. type: 2,
  1156. num: 1,
  1157. shopId: this.shopId
  1158. }
  1159. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1160. if (res.code == 0) {
  1161. this.getOrderList()
  1162. }
  1163. })
  1164. },
  1165. // 清空购物车
  1166. empty() {
  1167. let data = {
  1168. shopId: this.shopId
  1169. }
  1170. this.$Request.post('/app/order/emptyShoppingTrolley', data).then((res) => {
  1171. console.log(res)
  1172. if (res.code == 0) {
  1173. this.totalPrice = 0
  1174. this.goodsNum = 0
  1175. this.goodsList = {
  1176. orderGoodsList: [[]]
  1177. }
  1178. this.echoSkuList = []
  1179. this.echoSku = []
  1180. this.getOrderList()
  1181. this.popupShow = false
  1182. this.getEchoOrder()
  1183. }
  1184. })
  1185. },
  1186. // 获取购物车商品列表
  1187. getOrderList() {
  1188. // 显示加载提示
  1189. uni.showLoading({
  1190. title: '加载中', // 加载提示文本
  1191. mask: true // 是否显示透明蒙层,防止触摸穿透
  1192. })
  1193. let data = {
  1194. shopId: this.shopId,
  1195. page: 1,
  1196. limit: 1000,
  1197. status: 1
  1198. // orderType: this.orderType
  1199. }
  1200. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  1201. if (res.code == 0 && res.data.pageUtils.list.length) {
  1202. this.goodsList = res.data.pageUtils.list[0]
  1203. // console.log(this.goodsList, '888')
  1204. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0]) {
  1205. this.totalPrice = res.data.money
  1206. this.goodsNum = 0
  1207. this.goodsList.orderGoodsList[0].forEach((res) => {
  1208. if (res.goodsPicture) {
  1209. res.goodsPicture = res.goodsPicture.split(',')
  1210. }
  1211. this.goodsNum += res.goodsNum
  1212. })
  1213. if (!this.goodsList.orderGoodsList[0].length) {
  1214. this.popupShow = false
  1215. }
  1216. }
  1217. }
  1218. // 加载提示关闭
  1219. uni.hideLoading()
  1220. })
  1221. },
  1222. // 跳转商品详情
  1223. goDet(id) {
  1224. uni.navigateTo({
  1225. url: '/pages/index/shop/goodsDet?goodsId=' + id + '&shopId=' + this.shopId + '&orderType=' + this.orderType
  1226. })
  1227. },
  1228. goConfirm_throttle: throttle(function () {
  1229. this.goConfirm()
  1230. }, 1000),
  1231. // 去结算
  1232. goConfirm() {
  1233. if (!this.userId) {
  1234. uni.navigateTo({
  1235. url: '/pages/public/login'
  1236. })
  1237. return
  1238. }
  1239. let goodstr1 = 0 //商品库的 必须次数
  1240. let goodstr2 = 0 //购物车的 必须次数
  1241. // let aa=[]
  1242. // let bb=[]
  1243. let regex = new RegExp('必选', 'g')
  1244. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1245. // aa=this.dataList.map(item => item.goodsList)
  1246. // bb=aa.map(item => item)
  1247. let dataList = JSON.stringify(this.dataList)
  1248. if (dataList.match(regex)) {
  1249. goodstr1 = dataList.match(regex).length
  1250. if (dataList.indexOf('必选') != -1) {
  1251. //检测商品是否存在必选
  1252. let goodsList = JSON.stringify(this.goodsList.orderGoodsList)
  1253. if (goodsList.match(regex)) {
  1254. goodstr2 = goodsList.match(regex).length
  1255. if (goodstr1 == goodstr2) {
  1256. //检查购物车商品是否存在必须
  1257. uni.navigateTo({
  1258. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType+'&shopTypeName='+this.shopDet.shopTypeName
  1259. })
  1260. } else {
  1261. uni.showToast({
  1262. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1263. icon: 'none'
  1264. })
  1265. return
  1266. }
  1267. } else {
  1268. uni.showToast({
  1269. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1270. icon: 'none'
  1271. })
  1272. return
  1273. }
  1274. }
  1275. } else {
  1276. console.log('3333fd',this.shopDet)
  1277. uni.navigateTo({
  1278. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType+'&shopTypeName='+this.shopDet.shopTypeName
  1279. })
  1280. }
  1281. } else {
  1282. uni.showToast({
  1283. title: '请先添加商品',
  1284. icon: 'none'
  1285. })
  1286. }
  1287. },
  1288. TabSelect(e) {
  1289. this.tabCur = e.currentTarget.dataset.id
  1290. this.mainCur = e.currentTarget.dataset.id
  1291. this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
  1292. },
  1293. VerticalMain(e) {
  1294. let that = this
  1295. let tabHeight = 0
  1296. if (this.load) {
  1297. for (let i = 0; i < this.dataList.length; i++) {
  1298. let view = uni.createSelectorQuery().select('#main-' + this.dataList[i].id)
  1299. view.fields(
  1300. {
  1301. size: true
  1302. },
  1303. (data) => {
  1304. this.dataList[i].top = tabHeight
  1305. tabHeight = tabHeight + data.height
  1306. this.dataList[i].bottom = tabHeight
  1307. }
  1308. ).exec()
  1309. }
  1310. this.load = false
  1311. }
  1312. let scrollTop = e.detail.scrollTop
  1313. for (let i = 0; i < this.dataList.length; i++) {
  1314. if (scrollTop > this.dataList[i].top && scrollTop < this.dataList[i].bottom) {
  1315. this.verticalNavTop = (this.dataList[i].id - 1) * 50
  1316. this.tabCur = this.dataList[i].id
  1317. return false
  1318. }
  1319. }
  1320. },
  1321. // 打电话
  1322. call(e) {
  1323. uni.makePhoneCall({
  1324. phoneNumber: e
  1325. })
  1326. },
  1327. // 点击调起地图查看位置
  1328. goMap() {
  1329. //查看位置需要传经纬度才能执行
  1330. let that = this
  1331. uni.authorize({
  1332. scope: 'scope.userLocation',
  1333. success(res) {
  1334. uni.openLocation({
  1335. latitude: that.shopDet.shopLat,
  1336. longitude: that.shopDet.shopLng,
  1337. success: function () {}
  1338. })
  1339. },
  1340. fail(err) {}
  1341. })
  1342. },
  1343. getOrderDetail() {
  1344. let data = {
  1345. orderId: this.orderId
  1346. }
  1347. this.$Request.getT('/app/order/selectOrderById', data).then((res) => {
  1348. if (res.code == 0 && res.data) {
  1349. if (res.data.isPay && res.data.isPay == 1) {
  1350. this.orderId = ''
  1351. uni.removeStorageSync('orderId')
  1352. }
  1353. }
  1354. })
  1355. },
  1356. goPindan() {
  1357. if (!this.userId) {
  1358. uni.navigateTo({
  1359. url: '/pages/public/login'
  1360. })
  1361. return
  1362. }
  1363. if (uni.getStorageSync('orderId')) {
  1364. uni.navigateTo({
  1365. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + uni.getStorageSync('orderId')
  1366. })
  1367. } else {
  1368. let data = {
  1369. shopId: this.shopId
  1370. }
  1371. this.$Request.post('/app/order/shareTheBill', data).then((res) => {
  1372. if (res.code == 0) {
  1373. uni.navigateTo({
  1374. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + res.data
  1375. })
  1376. }
  1377. })
  1378. }
  1379. }
  1380. },
  1381. onReachBottom: function () {
  1382. if (this.current == 2) {
  1383. this.evaluatePage = this.evaluatePage + 1
  1384. this.getEvaluateList()
  1385. }
  1386. }
  1387. }
  1388. </script>
  1389. <style scoped lang="scss">
  1390. page {
  1391. background-color: #ffffff;
  1392. }
  1393. .yhq {
  1394. width: 100%;
  1395. height: 520rpx;
  1396. background-color: #f5f5f5;
  1397. overflow-y: hidden;
  1398. .yhq-box {
  1399. width: 686rpx;
  1400. height: 500rpx;
  1401. // background-color: red;
  1402. .yhq-box-title {
  1403. width: 100%;
  1404. text-align: center;
  1405. font-weight: bold;
  1406. }
  1407. .yhq-box-list {
  1408. width: 100%;
  1409. height: auto;
  1410. height: 460rpx;
  1411. margin-top: 30rpx;
  1412. .yhq-box-list-item {
  1413. width: 100%;
  1414. height: 120rpx;
  1415. border-radius: 24rpx;
  1416. background-color: #ffffff;
  1417. margin-bottom: 20rpx;
  1418. }
  1419. .yhq-box-list-item-c {
  1420. width: 646rpx;
  1421. height: 100%;
  1422. }
  1423. }
  1424. }
  1425. }
  1426. .scroll-view_H {
  1427. width: 100%;
  1428. white-space: nowrap;
  1429. }
  1430. .coupon-item {
  1431. display: inline-block;
  1432. height: 46rpx;
  1433. margin-right: 20rpx;
  1434. border: 1px solid red;
  1435. border-radius: 10rpx;
  1436. padding: 0rpx 10rpx 0rpx 10rpx;
  1437. font-size: 20rpx;
  1438. color: red;
  1439. line-height: 44rpx;
  1440. view {
  1441. display: inline-block;
  1442. }
  1443. }
  1444. .pinglunImg {
  1445. width: 100%;
  1446. margin-top: 10rpx;
  1447. }
  1448. .pinglunImg-box {
  1449. width: 100%;
  1450. image {
  1451. // margin-left: 10rpx;
  1452. width: 160upx;
  1453. height: 160upx;
  1454. border-radius: 10rpx;
  1455. }
  1456. }
  1457. .hintPopul {
  1458. width: 100%;
  1459. height: 100vh;
  1460. position: fixed;
  1461. top: 0;
  1462. background: rgba(0, 0, 0, 0.4);
  1463. z-index: 999;
  1464. }
  1465. .content_ {
  1466. position: absolute;
  1467. left: 0;
  1468. right: 0;
  1469. top: 0;
  1470. bottom: 0;
  1471. margin: auto;
  1472. text-align: center;
  1473. width: 500rpx;
  1474. height: 400rpx;
  1475. border-radius: 20rpx;
  1476. background-color: #fff;
  1477. padding-top: 120rpx;
  1478. }
  1479. .content_ image {
  1480. position: absolute;
  1481. top: -50rpx;
  1482. left: 0;
  1483. right: 0;
  1484. margin: auto;
  1485. }
  1486. .hintText {
  1487. font-size: 30rpx;
  1488. }
  1489. .Btns {
  1490. width: 460rpx;
  1491. height: 60rpx;
  1492. line-height: 60rpx;
  1493. text-align: center;
  1494. background: #fcd202;
  1495. font-size: 28rpx;
  1496. border: 2rpx solid #fcd202;
  1497. color: #333333;
  1498. border-radius: 50rpx;
  1499. font-weight: 700;
  1500. margin: auto;
  1501. }
  1502. .bg1 {
  1503. background: #ffffff;
  1504. }
  1505. .sticky-tabs {
  1506. z-index: 990;
  1507. position: sticky;
  1508. top: var(--window-top);
  1509. // background-color: #fff;
  1510. }
  1511. /* // 使用mescroll-uni,则top为0 */
  1512. .mescroll-uni,
  1513. /deep/.mescroll-uni {
  1514. .sticky-tabs {
  1515. top: 0;
  1516. }
  1517. }
  1518. .shop {
  1519. position: relative;
  1520. z-index: 2;
  1521. margin-top: -80rpx;
  1522. left: 0;
  1523. right: 0;
  1524. width: 686rpx;
  1525. margin: auto;
  1526. background: #ffffff;
  1527. border-radius: 20rpx;
  1528. box-shadow: 0 0 20rpx #cccccc;
  1529. }
  1530. .skuBtn {
  1531. padding: 10rpx 30rpx;
  1532. border-radius: 10rpx;
  1533. text-align: center;
  1534. margin: 10rpx 20rpx;
  1535. font-size: 28rpx;
  1536. color: #333333;
  1537. border: 2px solid #f2f2f2;
  1538. }
  1539. .active {
  1540. background: rgba(252, 210, 2, 0.2) !important;
  1541. border: 2px solid #fcd202 !important;
  1542. opacity: 0.6;
  1543. }
  1544. .active1 {
  1545. /* width: 82rpx; */
  1546. height: 16rpx;
  1547. background: #fcd202;
  1548. position: relative;
  1549. top: -10rpx;
  1550. z-index: 9;
  1551. }
  1552. .popup {
  1553. /* height: 500rpx; */
  1554. max-height: 500rpx;
  1555. /* overflow-y: auto; */
  1556. }
  1557. .tabBtn {
  1558. /* background-color: #f6f6fa; */
  1559. height: 60rpx;
  1560. line-height: 60rpx;
  1561. color: #999999;
  1562. font-size: 38rpx;
  1563. }
  1564. .Switch {
  1565. width: 164rpx;
  1566. height: 62rpx;
  1567. color: #ffffff;
  1568. background: #fcd202;
  1569. border-radius: 30rpx;
  1570. display: flex;
  1571. align-items: center;
  1572. padding: 2rpx;
  1573. }
  1574. .Switch > view {
  1575. /* flex: 1; */
  1576. width: 80rpx;
  1577. text-align: center;
  1578. line-height: 62rpx;
  1579. height: 58rpx;
  1580. }
  1581. .selSwitch {
  1582. color: #333333;
  1583. background: #ffffff;
  1584. border-radius: 30rpx;
  1585. }
  1586. .hintPopul {
  1587. width: 100%;
  1588. height: 100vh;
  1589. position: absolute;
  1590. top: 0;
  1591. background: rgba(0, 0, 0, 0.4);
  1592. }
  1593. .content {
  1594. position: absolute;
  1595. left: 0;
  1596. right: 0;
  1597. top: 0;
  1598. bottom: 0;
  1599. margin: auto;
  1600. text-align: center;
  1601. width: 500rpx;
  1602. height: 400rpx;
  1603. border-radius: 20rpx;
  1604. background-color: #fff;
  1605. padding-top: 120rpx;
  1606. }
  1607. .content image {
  1608. position: absolute;
  1609. top: -50rpx;
  1610. left: 0;
  1611. right: 0;
  1612. margin: auto;
  1613. }
  1614. .hintText {
  1615. font-size: 30rpx;
  1616. }
  1617. .VerticalNav.nav {
  1618. width: 200upx;
  1619. white-space: initial;
  1620. }
  1621. .VerticalNav.nav .cu-item {
  1622. width: 100%;
  1623. text-align: center;
  1624. background-color: #f1f1f1;
  1625. margin: 0;
  1626. border: none;
  1627. height: 50px;
  1628. line-height: 25px;
  1629. position: relative;
  1630. }
  1631. .VerticalNav.nav .cu-item.cur {
  1632. background-color: #fff;
  1633. line-height: 25px;
  1634. }
  1635. .VerticalBox {
  1636. display: flex;
  1637. }
  1638. .VerticalMain {
  1639. background-color: #f1f1f1;
  1640. flex: 1;
  1641. }
  1642. .detail_describe_text2 {
  1643. font-weight: 500;
  1644. margin-top: 2%;
  1645. color: #999999;
  1646. }
  1647. .detail_account_bottom {
  1648. margin-top: 20rpx;
  1649. width: 100%;
  1650. display: flex;
  1651. justify-content: space-between;
  1652. /* margin: 4% 0 3%; */
  1653. }
  1654. .detail_account_bottom_le {
  1655. width: 47.5%;
  1656. /* margin-right: 5%; */
  1657. border-radius: 44rpx;
  1658. text-align: center;
  1659. line-height: 2.8;
  1660. border: 2rpx solid #fcd202;
  1661. }
  1662. .detail_account_bottom_ri {
  1663. width: 47.5%;
  1664. border-radius: 44rpx;
  1665. text-align: center;
  1666. line-height: 2.8;
  1667. background-color: #fcd202;
  1668. }
  1669. .food_all {
  1670. position: relative;
  1671. }
  1672. .text-through {
  1673. text-decoration: line-through;
  1674. }
  1675. /* 食物 */
  1676. .food {
  1677. width: 100%;
  1678. overflow: hidden;
  1679. // position: absolute;
  1680. // top: 350rpx;
  1681. // background-color: #FFFFFF;
  1682. border-top-left-radius: 18rpx;
  1683. border-top-right-radius: 18rpx;
  1684. }
  1685. .food_address {
  1686. // margin: 3% 3% 0 3%;
  1687. // margin: 3%;
  1688. display: flex;
  1689. justify-content: space-between;
  1690. align-items: center;
  1691. // margin-top: 190rpx;
  1692. background-color: #ffffff;
  1693. // padding-bottom: 3%;
  1694. padding: 3%;
  1695. }
  1696. .food_address_le {
  1697. width: 75%;
  1698. }
  1699. .food_address_le_top {
  1700. display: flex;
  1701. align-items: center;
  1702. justify-content: space-between;
  1703. }
  1704. .food_address_le_top_le {
  1705. width: 40rpx;
  1706. height: 37rpx;
  1707. }
  1708. .food_address_le_top_le image {
  1709. width: 40rpx;
  1710. height: 37rpx;
  1711. }
  1712. .food_address_le_top_ce {
  1713. line-height: 1.6;
  1714. font-size: 38rpx;
  1715. font-weight: 600;
  1716. color: #333333;
  1717. }
  1718. .food_address_le_top_ce_ri {
  1719. width: 14rpx;
  1720. /* margin: 1% 0 0 2%; */
  1721. height: 24rpx;
  1722. margin-left: 2%;
  1723. }
  1724. .food_address_le_top_ce_ri image {
  1725. width: 14rpx;
  1726. height: 24rpx;
  1727. }
  1728. .food_address_text {
  1729. font-weight: 500;
  1730. font-size: 24rpx;
  1731. color: #999999;
  1732. }
  1733. .food_address_ri {
  1734. width: 24%;
  1735. height: 55rpx;
  1736. display: flex;
  1737. padding: 0.5% 1%;
  1738. background-color: #fcd202;
  1739. border-radius: 31rpx;
  1740. color: #ffffff;
  1741. }
  1742. .food_address_ri_sty {
  1743. flex: 1;
  1744. text-align: center;
  1745. padding-top: 4%;
  1746. font-size: 24rpx;
  1747. }
  1748. .food_address_ri_sty_active {
  1749. width: 100%;
  1750. overflow: hidden;
  1751. background-color: #ffffff;
  1752. border-radius: 31rpx;
  1753. color: #333333;
  1754. text-align: center;
  1755. }
  1756. /* 结算 */
  1757. .settlement {
  1758. width: 94%;
  1759. background-color: #000000;
  1760. line-height: 3.4;
  1761. border-radius: 49rpx;
  1762. position: fixed;
  1763. bottom: 10rpx;
  1764. left: 3%;
  1765. display: flex;
  1766. justify-content: space-between;
  1767. }
  1768. .settlement1 {
  1769. width: 94%;
  1770. background-color: #000000;
  1771. line-height: 2.8;
  1772. border-radius: 49rpx;
  1773. position: relative;
  1774. /* bottom: 10rpx; */
  1775. left: 0;
  1776. right: 0;
  1777. /* left: 3%; */
  1778. display: flex;
  1779. justify-content: space-between;
  1780. margin: 20rpx auto;
  1781. }
  1782. .settlement_le {
  1783. width: 48%;
  1784. padding-left: 18%;
  1785. color: #ffffff;
  1786. font-size: 30rpx;
  1787. }
  1788. .settlement_le text {
  1789. font-size: 22rpx;
  1790. }
  1791. .settlement_ri {
  1792. width: 35%;
  1793. background-color: #fcd202;
  1794. font-family: PingFang SC;
  1795. font-weight: 800;
  1796. color: #333333;
  1797. text-align: center;
  1798. border-top-right-radius: 49rpx;
  1799. border-bottom-right-radius: 49rpx;
  1800. }
  1801. .settlement_ri1 {
  1802. width: 35%;
  1803. background-color: #333333;
  1804. font-family: PingFang SC;
  1805. font-weight: 800;
  1806. color: #999999;
  1807. text-align: center;
  1808. border-top-right-radius: 49rpx;
  1809. border-bottom-right-radius: 49rpx;
  1810. }
  1811. .settlement_img {
  1812. width: 91rpx;
  1813. height: 96rpx;
  1814. position: absolute;
  1815. // bottom: 30rpx;
  1816. left: 5%;
  1817. }
  1818. .settlement_img image {
  1819. width: 74rpx;
  1820. height: 81rpx;
  1821. }
  1822. .settlement_hot {
  1823. width: 35rpx;
  1824. height: 35rpx;
  1825. line-height: 35rpx;
  1826. text-align: center;
  1827. border-radius: 50%;
  1828. position: absolute;
  1829. top: -10rpx;
  1830. right: 0;
  1831. background-color: #ff130a;
  1832. color: #ffffff;
  1833. font-size: 20rpx;
  1834. font-weight: bold;
  1835. color: #ffffff;
  1836. }
  1837. .select_all {
  1838. width: 100%;
  1839. position: relative;
  1840. }
  1841. /* 餐厅 */
  1842. .select {
  1843. color: #000000;
  1844. font-weight: bold;
  1845. background-color: #fff;
  1846. z-index: 10;
  1847. }
  1848. .select_line {
  1849. width: 15%;
  1850. height: 6rpx;
  1851. margin: 0 auto 4%;
  1852. background: #e6e6e6;
  1853. border-radius: 4rpx;
  1854. }
  1855. .select_search {
  1856. width: 100%;
  1857. margin: 2% 0;
  1858. display: flex;
  1859. align-items: center;
  1860. }
  1861. .select_search_le {
  1862. /* width: 10%; */
  1863. font-size: 30rpx;
  1864. line-height: 2.5;
  1865. margin-right: 1%;
  1866. }
  1867. .select_search_ce {
  1868. /* width: 5%; */
  1869. /* margin-top: 1%; */
  1870. margin-right: 20rpx;
  1871. margin-left: 6rpx;
  1872. /* margin: 0 20rpx; */
  1873. width: 20rpx;
  1874. height: 10rpx;
  1875. }
  1876. .select_search_ri {
  1877. /* width: 84%; */
  1878. height: 72rpx;
  1879. flex: 1;
  1880. display: flex;
  1881. }
  1882. .select_search_ri input {
  1883. flex: 1;
  1884. /* width: 100%; */
  1885. height: 72rpx;
  1886. background: #f5f5f5;
  1887. color: #999999;
  1888. border-radius: 36rpx;
  1889. text-decoration: 42rpx;
  1890. text-align: center;
  1891. }
  1892. /* 附近 */
  1893. .nearby {
  1894. width: 100%;
  1895. position: relative;
  1896. }
  1897. .nearby_text {
  1898. width: 18%;
  1899. font-size: 30rpx;
  1900. font-weight: 800;
  1901. color: #333333;
  1902. text-align: center;
  1903. border-bottom: 16rpx solid #fcd202;
  1904. /* line-height: 20rpx; */
  1905. margin-top: 10rpx;
  1906. }
  1907. .nearby_address_active {
  1908. border: 2rpx solid #fcd202;
  1909. width: 100%;
  1910. padding: 3%;
  1911. margin-top: 3%;
  1912. border-radius: 10upx;
  1913. display: flex;
  1914. }
  1915. .nearby_address {
  1916. width: 100%;
  1917. padding: 3%;
  1918. margin-top: 3%;
  1919. border-radius: 10upx;
  1920. display: flex;
  1921. }
  1922. .nearby_address_le {
  1923. flex: 1;
  1924. }
  1925. .nearby_address_ri {
  1926. line-height: 2.5;
  1927. text-align: right;
  1928. /* flex: 1; */
  1929. }
  1930. .nearby_text2 {
  1931. /* line-height: 1.5; */
  1932. display: flex;
  1933. justify-content: space-between;
  1934. align-items: center;
  1935. }
  1936. .nearby_text2_ {
  1937. font-size: 30rpx;
  1938. font-weight: 800;
  1939. color: #333333;
  1940. }
  1941. .nearby_text3 {
  1942. font-size: 24rpx;
  1943. font-weight: 500;
  1944. color: #999999;
  1945. margin-top: 2%;
  1946. }
  1947. /* 添加地址 */
  1948. .goorder {
  1949. width: 100%;
  1950. padding: 2% 3%;
  1951. position: fixed;
  1952. bottom: 0;
  1953. background-color: #ffffff;
  1954. border-top: 1rpx solid #999999;
  1955. }
  1956. .goorder_but {
  1957. width: 100%;
  1958. line-height: 2.5;
  1959. text-align: center;
  1960. background: #fcd202;
  1961. border-radius: 36rpx;
  1962. }
  1963. .lable {
  1964. border: 1rpx solid #ffe6d9;
  1965. height: 40rpx;
  1966. padding: 0 14rpx;
  1967. background: #ffe6d9;
  1968. border-radius: 4rpx;
  1969. font-weight: 500;
  1970. color: #fd6416;
  1971. font-size: 20rpx;
  1972. margin-right: 10rpx;
  1973. margin-bottom: 10rpx;
  1974. }
  1975. //店铺公告弹框
  1976. .gong_img {
  1977. margin: 40rpx 0 0 40rpx;
  1978. width: 46px;
  1979. height: 46px;
  1980. }
  1981. .gong_name {
  1982. position: absolute;
  1983. margin: 41rpx 0 0 163rpx;
  1984. font-size: 28rpx;
  1985. font-weight: 700;
  1986. color: rgba(0, 0, 0, 1);
  1987. }
  1988. .gong_pei {
  1989. position: absolute;
  1990. margin: 87rpx 0 0 163rpx;
  1991. font-size: 20rpx;
  1992. font-weight: 400;
  1993. color: rgba(0, 0, 0, 1);
  1994. }
  1995. .gong_line {
  1996. position: absolute;
  1997. margin: 161rpx 0 0 1rpx;
  1998. width: 635.5rpx;
  1999. border: 1rpx solid rgba(230, 230, 230, 1);
  2000. }
  2001. .gong_huo {
  2002. width: 151rpx;
  2003. height: 34rpx;
  2004. border-radius: 5rpx;
  2005. background: rgba(230, 74, 69, 1);
  2006. font-size: 16rpx;
  2007. font-weight: 400;
  2008. line-height: 34rpx;
  2009. color: rgba(255, 255, 255, 1);
  2010. text-align: center;
  2011. }
  2012. //下方店铺详情
  2013. .shop_xiang {
  2014. background-color: rgba(255, 255, 255, 1);
  2015. width: 100%;
  2016. margin-top: 8px;
  2017. }
  2018. .shopDizhi {
  2019. // height: 80rpx;
  2020. font-size: 34rpx;
  2021. color: #000;
  2022. line-height: 80rpx;
  2023. }
  2024. .shopLine {
  2025. width: 100%;
  2026. height: 1rpx;
  2027. background-color: rgba(242, 242, 242, 1);
  2028. // border: 1rpx solid rgba(242,242,242,0.5);
  2029. }
  2030. .shop_zheng {
  2031. background-color: rgba(255, 255, 255, 1);
  2032. width: 100%;
  2033. margin-top: 8px;
  2034. height: 100%;
  2035. overflow: hidden;
  2036. }
  2037. .image-container {
  2038. width: 350px;
  2039. overflow-x: auto;
  2040. padding: 10rpx 0 10rpx 0;
  2041. white-space: nowrap;
  2042. // transition: transform 0.3s; /* 可以添加平滑滑动的效果 */
  2043. }
  2044. .image {
  2045. display: inline-block;
  2046. width: 180rpx; /* 三张图片平分宽度 */
  2047. height: 135rpx;
  2048. }
  2049. </style>