index.vue 61 KB

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