index.vue 61 KB

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