index.vue 60 KB

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