index.vue 58 KB

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