index.vue 64 KB

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