index.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172
  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 : '../../../static/logo.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. if (res.code == 0 && res.data) {
  846. this.dataList = res.data.list
  847. this.shopDet = res.data.goodsShop
  848. for (var i = 0; i < this.dataList.length; i++) {
  849. this.dataList[i].id = i
  850. }
  851. this.shopDet.shopScore1 = Math.floor(this.shopDet.shopScore)
  852. this.shopDet.errandTime = Math.round(this.shopDet.errandTime)
  853. if (this.shopDet.shopBanner) {
  854. this.shopDet.shopBanner = this.shopDet.shopBanner.split(',')
  855. }
  856. console.log(this.shopDet, 'kkkkkk')
  857. if (this.shopDet.businessLicense) {
  858. this.shop_zhizhao = this.shopDet.businessLicense.split(',')
  859. }
  860. this.shopDet.shopScore = this.shopDet.shopScore.toFixed(2)
  861. if (this.shopDet.distributionDistance < 1000) {
  862. this.shopDet.distributionDistance = '<1000m'
  863. } else {
  864. this.shopDet.distributionDistance = Number(this.shopDet.distributionDistance / 1000) + 'km'
  865. }
  866. uni.setNavigationBarTitle({
  867. title: this.shopDet.shopName
  868. })
  869. }
  870. uni.hideLoading()
  871. })
  872. },
  873. getEchoOrder() {
  874. let data = {
  875. shopId: this.shopId,
  876. goodsId: this.goodsDet.goodsId
  877. }
  878. this.$Request.get('/app/order/echoOrder', data).then((res) => {
  879. if (res.code == 0 && res.data.length) {
  880. this.echoSkuList = res.data
  881. if (res.data[0].skuMessage) {
  882. this.echoSku = res.data[0].skuMessage.split(',')
  883. }
  884. }
  885. })
  886. },
  887. // 弹窗展示商品详情
  888. selSku(item) {
  889. this.value = 1
  890. this.checkStateList = []
  891. this.checkString = ''
  892. this.attrList = []
  893. this.skuId = ''
  894. this.skuMessage = ''
  895. let data = {
  896. goodsId: item.goodsId
  897. }
  898. this.$Request.get('/app/goods/selectGoodsById', data).then((res) => {
  899. uni.hideLoading()
  900. if (res.code == 0) {
  901. this.goodsDet = res.data
  902. if (this.goodsDet.goodsLabel) {
  903. this.goodsDet.goodsLabel = this.goodsDet.goodsLabel.split(',')
  904. }
  905. if (this.goodsDet.goodsPicture) {
  906. this.goodsDet.goodsPicture = this.goodsDet.goodsPicture.split(',')
  907. }
  908. console.log(this.goodsDet, '商品')
  909. this.price = this.goodsDet.goodsMoney
  910. this.skuList = this.goodsDet.sku
  911. this.getEchoOrder()
  912. if (!this.skuList.length) {
  913. let that = this
  914. setTimeout(function () {
  915. that.orderSel(2)
  916. }, 500)
  917. } else {
  918. if (this.goodsDet.attr.length) {
  919. this.attrList = this.goodsDet.attr[0] ? this.goodsDet.attr[0].attrValue : []
  920. } else {
  921. this.skuId = this.goodsDet.sku[0].id
  922. }
  923. this.attrList.forEach((res) => {
  924. let data = {
  925. name: ''
  926. }
  927. this.checkStateList.push(data)
  928. let detail = []
  929. if (res.detail.length > 0) {
  930. res.detail.split(',').forEach((d) => {
  931. let data = {
  932. name: '',
  933. state: ''
  934. }
  935. data.name = d
  936. detail.push(data)
  937. })
  938. res.detail = detail
  939. }
  940. })
  941. this.skuShow = true
  942. }
  943. }
  944. })
  945. },
  946. // 选择规格
  947. skuSel(item, index, ind) {
  948. this.attrList[index].goodsId = index
  949. this.attrList[index].attrId = ind
  950. this.checkStateList[index].name = item.name
  951. this.checkString = ''
  952. this.checkStateList.forEach((d) => {
  953. if (d.name) {
  954. if (this.checkString) {
  955. this.checkString = this.checkString + ',' + d.name
  956. } else {
  957. this.checkString = d.name
  958. }
  959. }
  960. })
  961. for (var i = 0; i < this.skuList.length; i++) {
  962. let d = this.skuList[i]
  963. console.log(this.skuList[i], 'l')
  964. if (d.detailJson == this.checkString) {
  965. console.log(d.detailJson, this.checkString)
  966. // if (d.stock > 0) {
  967. this.skuId = d.id
  968. this.skuMessage = d.detailJson
  969. this.price = d.skuPrice
  970. this.CheckattrValue = true
  971. // } else {
  972. // this.$queue.showToast('库存不足请选择其他规格')
  973. // }
  974. break
  975. } else {
  976. this.CheckattrValue = false
  977. }
  978. }
  979. },
  980. valChange(e) {
  981. console.log('当前值为: ' + e.value)
  982. this.value = e.value
  983. },
  984. // 立即购买
  985. payment() {
  986. if (!this.userId) {
  987. uni.navigateTo({
  988. url: '/pages/public/login'
  989. })
  990. return
  991. }
  992. if (this.attrList.length) {
  993. console.log(this.checkString, this.CheckattrValue, '规格')
  994. if (this.checkString == '' || !this.CheckattrValue) {
  995. console.log(this.checkString, this.CheckattrValue, '规格')
  996. this.$queue.showToast('请选择正确的商品规格')
  997. return
  998. }
  999. }
  1000. let goodstr1 = 0 //商品库的 必须次数
  1001. let goodstr2 = 0 //购物车的 必须次数
  1002. let regex = new RegExp('必选', 'g')
  1003. let dataList = JSON.stringify(this.dataList)
  1004. if (dataList.match(regex)) {
  1005. goodstr1 = dataList.match(regex).length
  1006. if (dataList.indexOf('必选') != -1) {
  1007. //检测商品是否存在必选
  1008. let goodsList = JSON.stringify(this.goodsDet)
  1009. if (goodsList.match(regex)) {
  1010. goodstr2 = goodsList.match(regex).length
  1011. if (goodstr1 == goodstr2) {
  1012. //检查购物车商品是否存在必须
  1013. let data = {
  1014. goodsId: this.goodsDet.goodsId,
  1015. skuMessage: this.skuMessage,
  1016. skuId: this.skuId,
  1017. num: this.value,
  1018. orderType: this.orderType,
  1019. shopId: this.shopId
  1020. }
  1021. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1022. if (res.code == 0) {
  1023. this.skuShow = false
  1024. uni.navigateTo({
  1025. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1026. })
  1027. } else {
  1028. this.$queue.showToast(res.msg)
  1029. }
  1030. })
  1031. } else {
  1032. uni.showToast({
  1033. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1034. icon: 'none'
  1035. })
  1036. return
  1037. }
  1038. } else {
  1039. uni.showToast({
  1040. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1041. icon: 'none'
  1042. })
  1043. return
  1044. }
  1045. }
  1046. } else {
  1047. let data = {
  1048. goodsId: this.goodsDet.goodsId,
  1049. skuMessage: this.skuMessage,
  1050. skuId: this.skuId,
  1051. num: this.value,
  1052. orderType: this.orderType,
  1053. shopId: this.shopId
  1054. }
  1055. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1056. if (res.code == 0) {
  1057. this.skuShow = false
  1058. uni.navigateTo({
  1059. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1060. })
  1061. } else {
  1062. this.$queue.showToast(res.msg)
  1063. }
  1064. })
  1065. }
  1066. },
  1067. // 加入购物车
  1068. orderSel(e) {
  1069. if (this.value < 1) {
  1070. uni.showToast({
  1071. title: '数量不能小于1',
  1072. icon: 'none'
  1073. })
  1074. return
  1075. }
  1076. if (!this.userId) {
  1077. uni.navigateTo({
  1078. url: '/pages/public/login'
  1079. })
  1080. return
  1081. }
  1082. if (this.attrList.length) {
  1083. if (this.checkString == '' || !this.CheckattrValue) {
  1084. this.$queue.showToast('请选择正确的商品规格')
  1085. return
  1086. }
  1087. }
  1088. let data = {
  1089. goodsId: this.goodsDet.goodsId,
  1090. skuMessage: this.skuMessage,
  1091. skuId: this.skuId,
  1092. num: this.value,
  1093. shopId: this.shopId
  1094. }
  1095. // let url = ''
  1096. // if (this.types == 1) {
  1097. // url = '/app/order/joinOrder'
  1098. // } else {
  1099. // url = '/app/order/insertOrder'
  1100. // }
  1101. // console.log(data, '参数')
  1102. this.$Request.post('/app/order/insertOrder', data).then((res) => {
  1103. if (res.code == 0) {
  1104. this.$queue.showToast('添加成功')
  1105. this.skuShow = false
  1106. this.getOrderList()
  1107. } else {
  1108. this.$queue.showToast(res.msg)
  1109. }
  1110. })
  1111. },
  1112. // 切换外卖/自提
  1113. tabSwidth(e) {
  1114. this.orderType = e
  1115. this.getOrderList()
  1116. },
  1117. // 展示购物车弹窗
  1118. isPopupShow() {
  1119. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1120. this.popupShow = true
  1121. } else {
  1122. uni.showToast({
  1123. title: '请先添加商品',
  1124. icon: 'none'
  1125. })
  1126. }
  1127. },
  1128. // 添加数量
  1129. add(item, index) {
  1130. // this.count++;
  1131. this.goodsList.orderGoodsList[0][index].goodsNum++
  1132. let data = {
  1133. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1134. type: 1,
  1135. num: 1,
  1136. shopId: this.shopId
  1137. }
  1138. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1139. if (res.code == 0) {
  1140. this.getOrderList()
  1141. } else {
  1142. this.$queue.showToast(res.msg)
  1143. this.goodsList.orderGoodsList[0][index].goodsNum--
  1144. }
  1145. })
  1146. },
  1147. // 减少数量
  1148. noAdd(item, index) {
  1149. this.goodsList.orderGoodsList[0][index].goodsNum--
  1150. // this.count--;
  1151. let data = {
  1152. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1153. type: 2,
  1154. num: 1,
  1155. shopId: this.shopId
  1156. }
  1157. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1158. if (res.code == 0) {
  1159. this.getOrderList()
  1160. }
  1161. })
  1162. },
  1163. // 清空购物车
  1164. empty() {
  1165. let data = {
  1166. shopId: this.shopId
  1167. }
  1168. this.$Request.post('/app/order/emptyShoppingTrolley', data).then((res) => {
  1169. console.log(res)
  1170. if (res.code == 0) {
  1171. this.totalPrice = 0
  1172. this.goodsNum = 0
  1173. this.goodsList = {
  1174. orderGoodsList: [[]]
  1175. }
  1176. this.echoSkuList = []
  1177. this.echoSku = []
  1178. this.getOrderList()
  1179. this.popupShow = false
  1180. this.getEchoOrder()
  1181. }
  1182. })
  1183. },
  1184. // 获取购物车商品列表
  1185. getOrderList() {
  1186. // 显示加载提示
  1187. uni.showLoading({
  1188. title: '加载中', // 加载提示文本
  1189. mask: true // 是否显示透明蒙层,防止触摸穿透
  1190. })
  1191. let data = {
  1192. shopId: this.shopId,
  1193. page: 1,
  1194. limit: 1000,
  1195. status: 1
  1196. // orderType: this.orderType
  1197. }
  1198. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  1199. if (res.code == 0 && res.data.pageUtils.list.length) {
  1200. this.goodsList = res.data.pageUtils.list[0]
  1201. // console.log(this.goodsList, '888')
  1202. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0]) {
  1203. this.totalPrice = res.data.money
  1204. this.goodsNum = 0
  1205. this.goodsList.orderGoodsList[0].forEach((res) => {
  1206. if (res.goodsPicture) {
  1207. res.goodsPicture = res.goodsPicture.split(',')
  1208. }
  1209. this.goodsNum += res.goodsNum
  1210. })
  1211. if (!this.goodsList.orderGoodsList[0].length) {
  1212. this.popupShow = false
  1213. }
  1214. }
  1215. }
  1216. // 加载提示关闭
  1217. uni.hideLoading()
  1218. })
  1219. },
  1220. // 跳转商品详情
  1221. goDet(id) {
  1222. uni.navigateTo({
  1223. url: '/pages/index/shop/goodsDet?goodsId=' + id + '&shopId=' + this.shopId + '&orderType=' + this.orderType
  1224. })
  1225. },
  1226. goConfirm_throttle: throttle(function () {
  1227. this.goConfirm()
  1228. }, 1000),
  1229. // 去结算
  1230. goConfirm() {
  1231. if (!this.userId) {
  1232. uni.navigateTo({
  1233. url: '/pages/public/login'
  1234. })
  1235. return
  1236. }
  1237. let goodstr1 = 0 //商品库的 必须次数
  1238. let goodstr2 = 0 //购物车的 必须次数
  1239. // let aa=[]
  1240. // let bb=[]
  1241. let regex = new RegExp('必选', 'g')
  1242. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1243. // aa=this.dataList.map(item => item.goodsList)
  1244. // bb=aa.map(item => item)
  1245. let dataList = JSON.stringify(this.dataList)
  1246. if (dataList.match(regex)) {
  1247. goodstr1 = dataList.match(regex).length
  1248. if (dataList.indexOf('必选') != -1) {
  1249. //检测商品是否存在必选
  1250. let goodsList = JSON.stringify(this.goodsList.orderGoodsList)
  1251. if (goodsList.match(regex)) {
  1252. goodstr2 = goodsList.match(regex).length
  1253. if (goodstr1 == goodstr2) {
  1254. //检查购物车商品是否存在必须
  1255. uni.navigateTo({
  1256. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType
  1257. })
  1258. } else {
  1259. uni.showToast({
  1260. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1261. icon: 'none'
  1262. })
  1263. return
  1264. }
  1265. } else {
  1266. uni.showToast({
  1267. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1268. icon: 'none'
  1269. })
  1270. return
  1271. }
  1272. }
  1273. } else {
  1274. uni.navigateTo({
  1275. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType
  1276. })
  1277. }
  1278. } else {
  1279. uni.showToast({
  1280. title: '请先添加商品',
  1281. icon: 'none'
  1282. })
  1283. }
  1284. },
  1285. TabSelect(e) {
  1286. this.tabCur = e.currentTarget.dataset.id
  1287. this.mainCur = e.currentTarget.dataset.id
  1288. this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
  1289. },
  1290. VerticalMain(e) {
  1291. let that = this
  1292. let tabHeight = 0
  1293. if (this.load) {
  1294. for (let i = 0; i < this.dataList.length; i++) {
  1295. let view = uni.createSelectorQuery().select('#main-' + this.dataList[i].id)
  1296. view.fields(
  1297. {
  1298. size: true
  1299. },
  1300. (data) => {
  1301. this.dataList[i].top = tabHeight
  1302. tabHeight = tabHeight + data.height
  1303. this.dataList[i].bottom = tabHeight
  1304. }
  1305. ).exec()
  1306. }
  1307. this.load = false
  1308. }
  1309. let scrollTop = e.detail.scrollTop
  1310. for (let i = 0; i < this.dataList.length; i++) {
  1311. if (scrollTop > this.dataList[i].top && scrollTop < this.dataList[i].bottom) {
  1312. this.verticalNavTop = (this.dataList[i].id - 1) * 50
  1313. this.tabCur = this.dataList[i].id
  1314. return false
  1315. }
  1316. }
  1317. },
  1318. // 打电话
  1319. call(e) {
  1320. uni.makePhoneCall({
  1321. phoneNumber: e
  1322. })
  1323. },
  1324. // 点击调起地图查看位置
  1325. goMap() {
  1326. //查看位置需要传经纬度才能执行
  1327. let that = this
  1328. uni.authorize({
  1329. scope: 'scope.userLocation',
  1330. success(res) {
  1331. uni.openLocation({
  1332. latitude: that.shopDet.shopLat,
  1333. longitude: that.shopDet.shopLng,
  1334. success: function () {}
  1335. })
  1336. },
  1337. fail(err) {}
  1338. })
  1339. },
  1340. getOrderDetail() {
  1341. let data = {
  1342. orderId: this.orderId
  1343. }
  1344. this.$Request.getT('/app/order/selectOrderById', data).then((res) => {
  1345. if (res.code == 0 && res.data) {
  1346. if (res.data.isPay && res.data.isPay == 1) {
  1347. this.orderId = ''
  1348. uni.removeStorageSync('orderId')
  1349. }
  1350. }
  1351. })
  1352. },
  1353. goPindan() {
  1354. if (!this.userId) {
  1355. uni.navigateTo({
  1356. url: '/pages/public/login'
  1357. })
  1358. return
  1359. }
  1360. if (uni.getStorageSync('orderId')) {
  1361. uni.navigateTo({
  1362. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + uni.getStorageSync('orderId')
  1363. })
  1364. } else {
  1365. let data = {
  1366. shopId: this.shopId
  1367. }
  1368. this.$Request.post('/app/order/shareTheBill', data).then((res) => {
  1369. if (res.code == 0) {
  1370. uni.navigateTo({
  1371. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + res.data
  1372. })
  1373. }
  1374. })
  1375. }
  1376. }
  1377. },
  1378. onReachBottom: function () {
  1379. if (this.current == 2) {
  1380. this.evaluatePage = this.evaluatePage + 1
  1381. this.getEvaluateList()
  1382. }
  1383. }
  1384. }
  1385. </script>
  1386. <style scoped lang="scss">
  1387. page {
  1388. background-color: #ffffff;
  1389. }
  1390. .yhq {
  1391. width: 100%;
  1392. height: 520rpx;
  1393. background-color: #f5f5f5;
  1394. overflow-y: hidden;
  1395. .yhq-box {
  1396. width: 686rpx;
  1397. height: 500rpx;
  1398. // background-color: red;
  1399. .yhq-box-title {
  1400. width: 100%;
  1401. text-align: center;
  1402. font-weight: bold;
  1403. }
  1404. .yhq-box-list {
  1405. width: 100%;
  1406. height: auto;
  1407. height: 460rpx;
  1408. margin-top: 30rpx;
  1409. .yhq-box-list-item {
  1410. width: 100%;
  1411. height: 120rpx;
  1412. border-radius: 24rpx;
  1413. background-color: #ffffff;
  1414. margin-bottom: 20rpx;
  1415. }
  1416. .yhq-box-list-item-c {
  1417. width: 646rpx;
  1418. height: 100%;
  1419. }
  1420. }
  1421. }
  1422. }
  1423. .scroll-view_H {
  1424. width: 100%;
  1425. white-space: nowrap;
  1426. }
  1427. .coupon-item {
  1428. display: inline-block;
  1429. height: 46rpx;
  1430. margin-right: 20rpx;
  1431. border: 1px solid red;
  1432. border-radius: 10rpx;
  1433. padding: 0rpx 10rpx 0rpx 10rpx;
  1434. font-size: 20rpx;
  1435. color: red;
  1436. line-height: 44rpx;
  1437. view {
  1438. display: inline-block;
  1439. }
  1440. }
  1441. .pinglunImg {
  1442. width: 100%;
  1443. margin-top: 10rpx;
  1444. }
  1445. .pinglunImg-box {
  1446. width: 100%;
  1447. image {
  1448. // margin-left: 10rpx;
  1449. width: 160upx;
  1450. height: 160upx;
  1451. border-radius: 10rpx;
  1452. }
  1453. }
  1454. .hintPopul {
  1455. width: 100%;
  1456. height: 100vh;
  1457. position: fixed;
  1458. top: 0;
  1459. background: rgba(0, 0, 0, 0.4);
  1460. z-index: 999;
  1461. }
  1462. .content_ {
  1463. position: absolute;
  1464. left: 0;
  1465. right: 0;
  1466. top: 0;
  1467. bottom: 0;
  1468. margin: auto;
  1469. text-align: center;
  1470. width: 500rpx;
  1471. height: 400rpx;
  1472. border-radius: 20rpx;
  1473. background-color: #fff;
  1474. padding-top: 120rpx;
  1475. }
  1476. .content_ image {
  1477. position: absolute;
  1478. top: -50rpx;
  1479. left: 0;
  1480. right: 0;
  1481. margin: auto;
  1482. }
  1483. .hintText {
  1484. font-size: 30rpx;
  1485. }
  1486. .Btns {
  1487. width: 460rpx;
  1488. height: 60rpx;
  1489. line-height: 60rpx;
  1490. text-align: center;
  1491. background: #fcd202;
  1492. font-size: 28rpx;
  1493. border: 2rpx solid #fcd202;
  1494. color: #333333;
  1495. border-radius: 50rpx;
  1496. font-weight: 700;
  1497. margin: auto;
  1498. }
  1499. .bg1 {
  1500. background: #ffffff;
  1501. }
  1502. .sticky-tabs {
  1503. z-index: 990;
  1504. position: sticky;
  1505. top: var(--window-top);
  1506. // background-color: #fff;
  1507. }
  1508. /* // 使用mescroll-uni,则top为0 */
  1509. .mescroll-uni,
  1510. /deep/.mescroll-uni {
  1511. .sticky-tabs {
  1512. top: 0;
  1513. }
  1514. }
  1515. .shop {
  1516. position: relative;
  1517. z-index: 2;
  1518. margin-top: -80rpx;
  1519. left: 0;
  1520. right: 0;
  1521. width: 686rpx;
  1522. margin: auto;
  1523. background: #ffffff;
  1524. border-radius: 20rpx;
  1525. box-shadow: 0 0 20rpx #cccccc;
  1526. }
  1527. .skuBtn {
  1528. padding: 10rpx 30rpx;
  1529. border-radius: 10rpx;
  1530. text-align: center;
  1531. margin: 10rpx 20rpx;
  1532. font-size: 28rpx;
  1533. color: #333333;
  1534. border: 2px solid #f2f2f2;
  1535. }
  1536. .active {
  1537. background: rgba(252, 210, 2, 0.2) !important;
  1538. border: 2px solid #fcd202 !important;
  1539. opacity: 0.6;
  1540. }
  1541. .active1 {
  1542. /* width: 82rpx; */
  1543. height: 16rpx;
  1544. background: #fcd202;
  1545. position: relative;
  1546. top: -10rpx;
  1547. z-index: 9;
  1548. }
  1549. .popup {
  1550. /* height: 500rpx; */
  1551. max-height: 500rpx;
  1552. /* overflow-y: auto; */
  1553. }
  1554. .tabBtn {
  1555. /* background-color: #f6f6fa; */
  1556. height: 60rpx;
  1557. line-height: 60rpx;
  1558. color: #999999;
  1559. font-size: 38rpx;
  1560. }
  1561. .Switch {
  1562. width: 164rpx;
  1563. height: 62rpx;
  1564. color: #ffffff;
  1565. background: #fcd202;
  1566. border-radius: 30rpx;
  1567. display: flex;
  1568. align-items: center;
  1569. padding: 2rpx;
  1570. }
  1571. .Switch > view {
  1572. /* flex: 1; */
  1573. width: 80rpx;
  1574. text-align: center;
  1575. line-height: 62rpx;
  1576. height: 58rpx;
  1577. }
  1578. .selSwitch {
  1579. color: #333333;
  1580. background: #ffffff;
  1581. border-radius: 30rpx;
  1582. }
  1583. .hintPopul {
  1584. width: 100%;
  1585. height: 100vh;
  1586. position: absolute;
  1587. top: 0;
  1588. background: rgba(0, 0, 0, 0.4);
  1589. }
  1590. .content {
  1591. position: absolute;
  1592. left: 0;
  1593. right: 0;
  1594. top: 0;
  1595. bottom: 0;
  1596. margin: auto;
  1597. text-align: center;
  1598. width: 500rpx;
  1599. height: 400rpx;
  1600. border-radius: 20rpx;
  1601. background-color: #fff;
  1602. padding-top: 120rpx;
  1603. }
  1604. .content image {
  1605. position: absolute;
  1606. top: -50rpx;
  1607. left: 0;
  1608. right: 0;
  1609. margin: auto;
  1610. }
  1611. .hintText {
  1612. font-size: 30rpx;
  1613. }
  1614. .VerticalNav.nav {
  1615. width: 200upx;
  1616. white-space: initial;
  1617. }
  1618. .VerticalNav.nav .cu-item {
  1619. width: 100%;
  1620. text-align: center;
  1621. background-color: #f1f1f1;
  1622. margin: 0;
  1623. border: none;
  1624. height: 50px;
  1625. line-height: 25px;
  1626. position: relative;
  1627. }
  1628. .VerticalNav.nav .cu-item.cur {
  1629. background-color: #fff;
  1630. line-height: 25px;
  1631. }
  1632. .VerticalBox {
  1633. display: flex;
  1634. }
  1635. .VerticalMain {
  1636. background-color: #f1f1f1;
  1637. flex: 1;
  1638. }
  1639. .detail_describe_text2 {
  1640. font-weight: 500;
  1641. margin-top: 2%;
  1642. color: #999999;
  1643. }
  1644. .detail_account_bottom {
  1645. margin-top: 20rpx;
  1646. width: 100%;
  1647. display: flex;
  1648. justify-content: space-between;
  1649. /* margin: 4% 0 3%; */
  1650. }
  1651. .detail_account_bottom_le {
  1652. width: 47.5%;
  1653. /* margin-right: 5%; */
  1654. border-radius: 44rpx;
  1655. text-align: center;
  1656. line-height: 2.8;
  1657. border: 2rpx solid #fcd202;
  1658. }
  1659. .detail_account_bottom_ri {
  1660. width: 47.5%;
  1661. border-radius: 44rpx;
  1662. text-align: center;
  1663. line-height: 2.8;
  1664. background-color: #fcd202;
  1665. }
  1666. .food_all {
  1667. position: relative;
  1668. }
  1669. .text-through {
  1670. text-decoration: line-through;
  1671. }
  1672. /* 食物 */
  1673. .food {
  1674. width: 100%;
  1675. overflow: hidden;
  1676. // position: absolute;
  1677. // top: 350rpx;
  1678. // background-color: #FFFFFF;
  1679. border-top-left-radius: 18rpx;
  1680. border-top-right-radius: 18rpx;
  1681. }
  1682. .food_address {
  1683. // margin: 3% 3% 0 3%;
  1684. // margin: 3%;
  1685. display: flex;
  1686. justify-content: space-between;
  1687. align-items: center;
  1688. // margin-top: 190rpx;
  1689. background-color: #ffffff;
  1690. // padding-bottom: 3%;
  1691. padding: 3%;
  1692. }
  1693. .food_address_le {
  1694. width: 75%;
  1695. }
  1696. .food_address_le_top {
  1697. display: flex;
  1698. align-items: center;
  1699. justify-content: space-between;
  1700. }
  1701. .food_address_le_top_le {
  1702. width: 40rpx;
  1703. height: 37rpx;
  1704. }
  1705. .food_address_le_top_le image {
  1706. width: 40rpx;
  1707. height: 37rpx;
  1708. }
  1709. .food_address_le_top_ce {
  1710. line-height: 1.6;
  1711. font-size: 38rpx;
  1712. font-weight: 600;
  1713. color: #333333;
  1714. }
  1715. .food_address_le_top_ce_ri {
  1716. width: 14rpx;
  1717. /* margin: 1% 0 0 2%; */
  1718. height: 24rpx;
  1719. margin-left: 2%;
  1720. }
  1721. .food_address_le_top_ce_ri image {
  1722. width: 14rpx;
  1723. height: 24rpx;
  1724. }
  1725. .food_address_text {
  1726. font-weight: 500;
  1727. font-size: 24rpx;
  1728. color: #999999;
  1729. }
  1730. .food_address_ri {
  1731. width: 24%;
  1732. height: 55rpx;
  1733. display: flex;
  1734. padding: 0.5% 1%;
  1735. background-color: #fcd202;
  1736. border-radius: 31rpx;
  1737. color: #ffffff;
  1738. }
  1739. .food_address_ri_sty {
  1740. flex: 1;
  1741. text-align: center;
  1742. padding-top: 4%;
  1743. font-size: 24rpx;
  1744. }
  1745. .food_address_ri_sty_active {
  1746. width: 100%;
  1747. overflow: hidden;
  1748. background-color: #ffffff;
  1749. border-radius: 31rpx;
  1750. color: #333333;
  1751. text-align: center;
  1752. }
  1753. /* 结算 */
  1754. .settlement {
  1755. width: 94%;
  1756. background-color: #000000;
  1757. line-height: 3.4;
  1758. border-radius: 49rpx;
  1759. position: fixed;
  1760. bottom: 10rpx;
  1761. left: 3%;
  1762. display: flex;
  1763. justify-content: space-between;
  1764. }
  1765. .settlement1 {
  1766. width: 94%;
  1767. background-color: #000000;
  1768. line-height: 2.8;
  1769. border-radius: 49rpx;
  1770. position: relative;
  1771. /* bottom: 10rpx; */
  1772. left: 0;
  1773. right: 0;
  1774. /* left: 3%; */
  1775. display: flex;
  1776. justify-content: space-between;
  1777. margin: 20rpx auto;
  1778. }
  1779. .settlement_le {
  1780. width: 48%;
  1781. padding-left: 18%;
  1782. color: #ffffff;
  1783. font-size: 30rpx;
  1784. }
  1785. .settlement_le text {
  1786. font-size: 22rpx;
  1787. }
  1788. .settlement_ri {
  1789. width: 35%;
  1790. background-color: #fcd202;
  1791. font-family: PingFang SC;
  1792. font-weight: 800;
  1793. color: #333333;
  1794. text-align: center;
  1795. border-top-right-radius: 49rpx;
  1796. border-bottom-right-radius: 49rpx;
  1797. }
  1798. .settlement_ri1 {
  1799. width: 35%;
  1800. background-color: #333333;
  1801. font-family: PingFang SC;
  1802. font-weight: 800;
  1803. color: #999999;
  1804. text-align: center;
  1805. border-top-right-radius: 49rpx;
  1806. border-bottom-right-radius: 49rpx;
  1807. }
  1808. .settlement_img {
  1809. width: 91rpx;
  1810. height: 96rpx;
  1811. position: absolute;
  1812. // bottom: 30rpx;
  1813. left: 5%;
  1814. }
  1815. .settlement_img image {
  1816. width: 74rpx;
  1817. height: 81rpx;
  1818. }
  1819. .settlement_hot {
  1820. width: 35rpx;
  1821. height: 35rpx;
  1822. line-height: 35rpx;
  1823. text-align: center;
  1824. border-radius: 50%;
  1825. position: absolute;
  1826. top: -10rpx;
  1827. right: 0;
  1828. background-color: #ff130a;
  1829. color: #ffffff;
  1830. font-size: 20rpx;
  1831. font-weight: bold;
  1832. color: #ffffff;
  1833. }
  1834. .select_all {
  1835. width: 100%;
  1836. position: relative;
  1837. }
  1838. /* 餐厅 */
  1839. .select {
  1840. color: #000000;
  1841. font-weight: bold;
  1842. background-color: #fff;
  1843. z-index: 10;
  1844. }
  1845. .select_line {
  1846. width: 15%;
  1847. height: 6rpx;
  1848. margin: 0 auto 4%;
  1849. background: #e6e6e6;
  1850. border-radius: 4rpx;
  1851. }
  1852. .select_search {
  1853. width: 100%;
  1854. margin: 2% 0;
  1855. display: flex;
  1856. align-items: center;
  1857. }
  1858. .select_search_le {
  1859. /* width: 10%; */
  1860. font-size: 30rpx;
  1861. line-height: 2.5;
  1862. margin-right: 1%;
  1863. }
  1864. .select_search_ce {
  1865. /* width: 5%; */
  1866. /* margin-top: 1%; */
  1867. margin-right: 20rpx;
  1868. margin-left: 6rpx;
  1869. /* margin: 0 20rpx; */
  1870. width: 20rpx;
  1871. height: 10rpx;
  1872. }
  1873. .select_search_ri {
  1874. /* width: 84%; */
  1875. height: 72rpx;
  1876. flex: 1;
  1877. display: flex;
  1878. }
  1879. .select_search_ri input {
  1880. flex: 1;
  1881. /* width: 100%; */
  1882. height: 72rpx;
  1883. background: #f5f5f5;
  1884. color: #999999;
  1885. border-radius: 36rpx;
  1886. text-decoration: 42rpx;
  1887. text-align: center;
  1888. }
  1889. /* 附近 */
  1890. .nearby {
  1891. width: 100%;
  1892. position: relative;
  1893. }
  1894. .nearby_text {
  1895. width: 18%;
  1896. font-size: 30rpx;
  1897. font-weight: 800;
  1898. color: #333333;
  1899. text-align: center;
  1900. border-bottom: 16rpx solid #fcd202;
  1901. /* line-height: 20rpx; */
  1902. margin-top: 10rpx;
  1903. }
  1904. .nearby_address_active {
  1905. border: 2rpx solid #fcd202;
  1906. width: 100%;
  1907. padding: 3%;
  1908. margin-top: 3%;
  1909. border-radius: 10upx;
  1910. display: flex;
  1911. }
  1912. .nearby_address {
  1913. width: 100%;
  1914. padding: 3%;
  1915. margin-top: 3%;
  1916. border-radius: 10upx;
  1917. display: flex;
  1918. }
  1919. .nearby_address_le {
  1920. flex: 1;
  1921. }
  1922. .nearby_address_ri {
  1923. line-height: 2.5;
  1924. text-align: right;
  1925. /* flex: 1; */
  1926. }
  1927. .nearby_text2 {
  1928. /* line-height: 1.5; */
  1929. display: flex;
  1930. justify-content: space-between;
  1931. align-items: center;
  1932. }
  1933. .nearby_text2_ {
  1934. font-size: 30rpx;
  1935. font-weight: 800;
  1936. color: #333333;
  1937. }
  1938. .nearby_text3 {
  1939. font-size: 24rpx;
  1940. font-weight: 500;
  1941. color: #999999;
  1942. margin-top: 2%;
  1943. }
  1944. /* 添加地址 */
  1945. .goorder {
  1946. width: 100%;
  1947. padding: 2% 3%;
  1948. position: fixed;
  1949. bottom: 0;
  1950. background-color: #ffffff;
  1951. border-top: 1rpx solid #999999;
  1952. }
  1953. .goorder_but {
  1954. width: 100%;
  1955. line-height: 2.5;
  1956. text-align: center;
  1957. background: #fcd202;
  1958. border-radius: 36rpx;
  1959. }
  1960. .lable {
  1961. border: 1rpx solid #ffe6d9;
  1962. height: 40rpx;
  1963. padding: 0 14rpx;
  1964. background: #ffe6d9;
  1965. border-radius: 4rpx;
  1966. font-weight: 500;
  1967. color: #fd6416;
  1968. font-size: 20rpx;
  1969. margin-right: 10rpx;
  1970. margin-bottom: 10rpx;
  1971. }
  1972. //店铺公告弹框
  1973. .gong_img {
  1974. margin: 40rpx 0 0 40rpx;
  1975. width: 46px;
  1976. height: 46px;
  1977. }
  1978. .gong_name {
  1979. position: absolute;
  1980. margin: 41rpx 0 0 163rpx;
  1981. font-size: 28rpx;
  1982. font-weight: 700;
  1983. color: rgba(0, 0, 0, 1);
  1984. }
  1985. .gong_pei {
  1986. position: absolute;
  1987. margin: 87rpx 0 0 163rpx;
  1988. font-size: 20rpx;
  1989. font-weight: 400;
  1990. color: rgba(0, 0, 0, 1);
  1991. }
  1992. .gong_line {
  1993. position: absolute;
  1994. margin: 161rpx 0 0 1rpx;
  1995. width: 635.5rpx;
  1996. border: 1rpx solid rgba(230, 230, 230, 1);
  1997. }
  1998. .gong_huo {
  1999. width: 151rpx;
  2000. height: 34rpx;
  2001. border-radius: 5rpx;
  2002. background: rgba(230, 74, 69, 1);
  2003. font-size: 16rpx;
  2004. font-weight: 400;
  2005. line-height: 34rpx;
  2006. color: rgba(255, 255, 255, 1);
  2007. text-align: center;
  2008. }
  2009. //下方店铺详情
  2010. .shop_xiang {
  2011. background-color: rgba(255, 255, 255, 1);
  2012. width: 100%;
  2013. margin-top: 8px;
  2014. }
  2015. .shopDizhi {
  2016. // height: 80rpx;
  2017. font-size: 34rpx;
  2018. color: #000;
  2019. line-height: 80rpx;
  2020. }
  2021. .shopLine {
  2022. width: 100%;
  2023. height: 1rpx;
  2024. background-color: rgba(242, 242, 242, 1);
  2025. // border: 1rpx solid rgba(242,242,242,0.5);
  2026. }
  2027. .shop_zheng {
  2028. background-color: rgba(255, 255, 255, 1);
  2029. width: 100%;
  2030. margin-top: 8px;
  2031. height: 100%;
  2032. overflow: hidden;
  2033. }
  2034. .image-container {
  2035. width: 350px;
  2036. overflow-x: auto;
  2037. padding: 10rpx 0 10rpx 0;
  2038. white-space: nowrap;
  2039. // transition: transform 0.3s; /* 可以添加平滑滑动的效果 */
  2040. }
  2041. .image {
  2042. display: inline-block;
  2043. width: 180rpx; /* 三张图片平分宽度 */
  2044. height: 135rpx;
  2045. }
  2046. </style>