index.vue 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319
  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. uni.showLoading({
  738. title: '加载中',
  739. mask: true // 是否显示透明蒙层,防止触摸穿透
  740. })
  741. uni.getLocation({
  742. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  743. success: (res) => {
  744. // console.log(res, '经纬度')
  745. this.lat = res.latitude
  746. this.lng = res.longitude
  747. this.getData()
  748. }
  749. })
  750. this.orderId = uni.getStorageSync('orderId') ? uni.getStorageSync('orderId') : ''
  751. },
  752. onHide() {
  753. uni.removeStorageSync('types')
  754. },
  755. onShow() {
  756. // 清空购物车
  757. let isClear = uni.getStorageSync('isClear')
  758. if (isClear) {
  759. uni.setStorageSync('isClear', false)
  760. this.empty()
  761. } else {
  762. this.getOrderList()
  763. }
  764. this.orderId = uni.getStorageSync('orderId') ? uni.getStorageSync('orderId') : ''
  765. if (this.orderId) {
  766. this.getOrderDetail()
  767. }
  768. this.userId = uni.getStorageSync('userId')
  769. // this.getOrderList()
  770. this.getcouponList()
  771. },
  772. onShareAppMessage(res) {
  773. //发送给朋友
  774. return {
  775. title: this.shopDet.shopName,
  776. path: '/my/index/shop/index2?shopId=' + this.shopDet.shopId + '&shopTypeId=' + this.shopDet.shopTypeId,
  777. imageUrl: this.shopDet.shopCover
  778. }
  779. },
  780. onShareTimeline(res) {
  781. //分享到朋友圈
  782. return {
  783. title: this.shopDet.shopName,
  784. path: '/my/index/shop/index2?shopId=' + this.shopDet.shopId + '&shopTypeId=' + this.shopDet.shopTypeId,
  785. imageUrl: this.shopDet.shopCover
  786. }
  787. },
  788. methods: {
  789. scrolltolower() {
  790. if (this.EvaluateData.pageUtils.totalCount > this.EvaluateList.length) {
  791. this.evaluatePage++
  792. this.getEvaluateList()
  793. } else {
  794. uni.showToast({
  795. title: '没有更多数据了',
  796. icon: 'none'
  797. })
  798. }
  799. },
  800. scrolltolowerRight() {
  801. if (this.showShopTypeId) {
  802. if (this.total > this.supermarketGoodsList.length) {
  803. this.page++
  804. this.getSupermarketGoodsList(this.dataList[this.tabCur].classifyId)
  805. } else {
  806. uni.showToast({
  807. title: '没有更多数据了',
  808. icon: 'none'
  809. })
  810. }
  811. }
  812. },
  813. //营业执照点击放大
  814. clickImg(img) {
  815. uni.previewImage({
  816. urls: [img], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  817. current: '', // 当前显示图片的http链接,默认是第一个
  818. success: function (res) {},
  819. fail: function (res) {},
  820. complete: function (res) {}
  821. })
  822. },
  823. //点击店铺公告弹框
  824. clickGong() {
  825. this.getHuoList()
  826. this.popupGong = true
  827. },
  828. //获取店铺活动信息
  829. getHuoList() {
  830. let data = {
  831. shopId: this.shopId
  832. }
  833. this.$Request.get(`/app/activity-shop/shop-activity-group/${this.shopId}`, data).then((res) => {
  834. if (res.code == 0) {
  835. this.gongHuo = res.data.activityTypeGroups
  836. }
  837. })
  838. },
  839. //领取优惠券
  840. lingqv(couponId, needIntegral) {
  841. let data = {
  842. couponId: couponId
  843. }
  844. this.$Request.postT('/app/coupon/buyCoupon', data).then((res) => {
  845. if (res.code == 0) {
  846. uni.showToast({
  847. title: '领取成功'
  848. })
  849. this.coupons = false
  850. } else {
  851. uni.showToast({
  852. title: res.msg,
  853. icon: 'none'
  854. })
  855. }
  856. })
  857. },
  858. //获取商家优惠券
  859. getcouponList() {
  860. // couponList
  861. let data = {
  862. shopId: this.shopId
  863. }
  864. this.$Request.get('/app/coupon/seleteAllCoupon', data).then((res) => {
  865. console.log(res, 963)
  866. if (res.code == 0 && res.data) {
  867. this.couponList = res.data
  868. }
  869. })
  870. },
  871. // 预览图片
  872. yuanlan(arr, index) {
  873. uni.previewImage({
  874. urls: arr,
  875. current: index
  876. })
  877. },
  878. goBack() {
  879. uni.navigateBack({})
  880. },
  881. goNav(url) {
  882. uni.navigateTo({
  883. url
  884. })
  885. },
  886. switchTab(e) {
  887. this.current = e
  888. if (this.current == 1) {
  889. this.tabCur = 0
  890. this.page = 1
  891. this.total = 0
  892. this.supermarketGoodsList = []
  893. this.getData()
  894. } else if (this.current == 2) {
  895. this.evaluatePage = 1
  896. this.getEvaluateList()
  897. } else if (this.current == 3) {
  898. }
  899. },
  900. sel(e) {
  901. this.grade = e
  902. this.count = e
  903. this.evaluatePage = 1
  904. this.getEvaluateList()
  905. },
  906. // 获取评论列表
  907. getEvaluateList() {
  908. let data = {
  909. shopId: this.shopId,
  910. page: this.evaluatePage,
  911. limit: this.evaluateLimit,
  912. grade: this.grade
  913. }
  914. this.$Request.get('/app/goods/selectEvaluateByShopId', data).then((res) => {
  915. // console.log(res)
  916. if (res.code == 0 && res.data) {
  917. this.EvaluateData = res.data
  918. if (this.evaluatePage == 1) {
  919. this.EvaluateList = res.data.pageUtils.list
  920. } else {
  921. this.EvaluateList = [...this.EvaluateList, ...res.data.pageUtils.list]
  922. }
  923. }
  924. })
  925. },
  926. // 获取店铺信息
  927. getData() {
  928. let urlreq = ''
  929. if (this.showShopTypeId) {
  930. urlreq = '/app/goods/selectGoodsClassifyList'
  931. } else {
  932. urlreq = '/app/goods/selectGoodsList'
  933. }
  934. let data = {
  935. shopId: this.shopId,
  936. lng: this.lng,
  937. lat: this.lat
  938. }
  939. this.$Request.get(urlreq, data).then((res) => {
  940. console.log(res, '999')
  941. if (res.code == 0 && res.data) {
  942. this.dataList = res.data.list
  943. this.shopDet = res.data.goodsShop
  944. for (let i = 0, len = this.dataList.length; i < len; i++) {
  945. // this.$set(this.dataList[i], 'id', i)
  946. this.dataList[i].id = i
  947. }
  948. this.shopDet.shopScore1 = Math.floor(this.shopDet.shopScore)
  949. this.shopDet.errandTime = Math.round(this.shopDet.errandTime)
  950. if (this.shopDet.shopBanner) {
  951. this.shopDet.shopBanner = this.shopDet.shopBanner.split(',')
  952. }
  953. // console.log(this.shopDet, 'kkkkkk')
  954. if (this.shopDet.businessLicense) {
  955. this.shop_zhizhao = this.shopDet.businessLicense.split(',')
  956. }
  957. this.shopDet.shopScore = this.shopDet.shopScore.toFixed(2)
  958. if (this.shopDet.distributionDistance < 1000) {
  959. this.shopDet.distributionDistance = '<1000m'
  960. } else {
  961. this.shopDet.distributionDistance = Number(this.shopDet.distributionDistance / 1000) + 'km'
  962. }
  963. uni.setNavigationBarTitle({
  964. title: this.shopDet.shopName
  965. })
  966. uni.hideLoading()
  967. if (urlreq == '/app/goods/selectGoodsClassifyList') {
  968. this.getSupermarketGoodsList(this.dataList[0].classifyId)
  969. }
  970. }
  971. })
  972. },
  973. getSupermarketGoodsList(classifyId) {
  974. let dataRight = {
  975. shopId: this.shopId,
  976. classifyId,
  977. page: this.page,
  978. limit: this.limit
  979. }
  980. console.log(dataRight,'ll')
  981. this.$Request.get('/app/goods/selectSupermarketGoodsList', dataRight).then((res) => {
  982. // console.log(res, '9996329')
  983. if (res.code == 0) {
  984. this.supermarketGoodsList = [...this.supermarketGoodsList, ...res.data.records]
  985. this.total = res.data.total
  986. }
  987. })
  988. },
  989. getEchoOrder() {
  990. let data = {
  991. shopId: this.shopId,
  992. goodsId: this.goodsDet.goodsId
  993. }
  994. this.$Request.get('/app/order/echoOrder', data).then((res) => {
  995. if (res.code == 0 && res.data.length) {
  996. this.echoSkuList = res.data
  997. if (res.data[0].skuMessage) {
  998. this.echoSku = res.data[0].skuMessage.split(',')
  999. }
  1000. }
  1001. })
  1002. },
  1003. // 弹窗展示商品详情
  1004. selSku(item) {
  1005. this.value = 1
  1006. this.checkStateList = []
  1007. this.checkString = ''
  1008. this.attrList = []
  1009. this.skuId = ''
  1010. this.skuMessage = ''
  1011. let data = {
  1012. goodsId: item.goodsId
  1013. }
  1014. console.log(data)
  1015. this.$Request.get('/app/goods/selectGoodsById', data).then((res) => {
  1016. uni.hideLoading()
  1017. if (res.code == 0) {
  1018. this.goodsDet = res.data
  1019. if (this.goodsDet.goodsLabel) {
  1020. this.goodsDet.goodsLabel = this.goodsDet.goodsLabel.split(',')
  1021. }
  1022. if (this.goodsDet.goodsPicture) {
  1023. this.goodsDet.goodsPicture = this.goodsDet.goodsPicture.split(',')
  1024. }
  1025. console.log(this.goodsDet, '商品')
  1026. this.price = this.goodsDet.goodsMoney
  1027. this.skuList = this.goodsDet.sku
  1028. this.getEchoOrder()
  1029. if (!this.skuList.length) {
  1030. setTimeout(() => {
  1031. this.orderSel(2)
  1032. }, 500)
  1033. } else {
  1034. if (this.goodsDet.attr.length) {
  1035. this.attrList = this.goodsDet.attr[0] ? this.goodsDet.attr[0].attrValue : []
  1036. } else {
  1037. this.skuId = this.goodsDet.sku[0].id
  1038. }
  1039. this.attrList.forEach((res) => {
  1040. let data = {
  1041. name: ''
  1042. }
  1043. this.checkStateList.push(data)
  1044. let detail = []
  1045. if (res.detail.length > 0) {
  1046. res.detail.split(',').forEach((d) => {
  1047. let data = {
  1048. name: '',
  1049. state: ''
  1050. }
  1051. data.name = d
  1052. detail.push(data)
  1053. })
  1054. res.detail = detail
  1055. }
  1056. })
  1057. this.skuShow = true
  1058. }
  1059. }
  1060. })
  1061. },
  1062. // 选择规格
  1063. skuSel(item, index, ind) {
  1064. this.attrList[index].goodsId = index
  1065. this.attrList[index].attrId = ind
  1066. this.checkStateList[index].name = item.name
  1067. this.checkString = ''
  1068. this.checkStateList.forEach((d) => {
  1069. if (d.name) {
  1070. if (this.checkString) {
  1071. this.checkString = this.checkString + ',' + d.name
  1072. } else {
  1073. this.checkString = d.name
  1074. }
  1075. }
  1076. })
  1077. console.log(this.checkString)
  1078. console.log(this.skuList)
  1079. for (var i = 0; i < this.skuList.length; i++) {
  1080. let d = this.skuList[i]
  1081. // console.log(this.skuList[i], 'l')
  1082. if (d.detailJson == this.checkString) {
  1083. console.log(d.detailJson, this.checkString)
  1084. // if (d.stock > 0) {
  1085. this.skuId = d.id
  1086. this.skuMessage = d.detailJson
  1087. this.price = d.skuPrice
  1088. this.CheckattrValue = true
  1089. // } else {
  1090. // this.$queue.showToast('库存不足请选择其他规格')
  1091. // }
  1092. break
  1093. } else {
  1094. this.CheckattrValue = false
  1095. }
  1096. }
  1097. },
  1098. valChange(e) {
  1099. console.log('当前值为: ' + e.value)
  1100. this.value = e.value
  1101. },
  1102. // 立即购买
  1103. payment() {
  1104. if (!this.userId) {
  1105. uni.navigateTo({
  1106. url: '/pages/public/login'
  1107. })
  1108. return
  1109. }
  1110. if (this.attrList.length) {
  1111. if (this.checkString == '' || !this.CheckattrValue) {
  1112. this.$queue.showToast('请选择正确的商品规格')
  1113. return
  1114. }
  1115. }
  1116. let goodstr1 = 0 //商品库的 必须次数
  1117. let goodstr2 = 0 //购物车的 必须次数
  1118. let regex = new RegExp('必选', 'g')
  1119. let dataList = JSON.stringify(this.dataList)
  1120. if (dataList.match(regex)) {
  1121. goodstr1 = dataList.match(regex).length
  1122. if (dataList.indexOf('必选') != -1) {
  1123. //检测商品是否存在必选
  1124. let goodsList = JSON.stringify(this.goodsDet)
  1125. if (goodsList.match(regex)) {
  1126. goodstr2 = goodsList.match(regex).length
  1127. if (goodstr1 == goodstr2) {
  1128. //检查购物车商品是否存在必须
  1129. let data = {
  1130. goodsId: this.goodsDet.goodsId,
  1131. skuMessage: this.skuMessage,
  1132. skuId: this.skuId,
  1133. num: this.value,
  1134. orderType: this.orderType,
  1135. shopId: this.shopId
  1136. }
  1137. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1138. if (res.code == 0) {
  1139. this.skuShow = false
  1140. uni.navigateTo({
  1141. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1142. })
  1143. } else {
  1144. this.$queue.showToast(res.msg)
  1145. }
  1146. })
  1147. } else {
  1148. uni.showToast({
  1149. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1150. icon: 'none'
  1151. })
  1152. return
  1153. }
  1154. } else {
  1155. uni.showToast({
  1156. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1157. icon: 'none'
  1158. })
  1159. return
  1160. }
  1161. }
  1162. } else {
  1163. let data = {
  1164. goodsId: this.goodsDet.goodsId,
  1165. skuMessage: this.skuMessage,
  1166. skuId: this.skuId,
  1167. num: this.value,
  1168. orderType: this.orderType,
  1169. shopId: this.shopId
  1170. }
  1171. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1172. if (res.code == 0) {
  1173. this.skuShow = false
  1174. uni.navigateTo({
  1175. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1176. })
  1177. } else {
  1178. this.$queue.showToast(res.msg)
  1179. }
  1180. })
  1181. }
  1182. },
  1183. // 加入购物车
  1184. orderSel(e) {
  1185. if (this.value < 1) {
  1186. uni.showToast({
  1187. title: '数量不能小于1',
  1188. icon: 'none'
  1189. })
  1190. return
  1191. }
  1192. if (!this.userId) {
  1193. uni.navigateTo({
  1194. url: '/pages/public/login'
  1195. })
  1196. return
  1197. }
  1198. if (this.attrList.length) {
  1199. if (this.checkString == '' || !this.CheckattrValue) {
  1200. this.$queue.showToast('请选择正确的商品规格')
  1201. return
  1202. }
  1203. }
  1204. let data = {
  1205. goodsId: this.goodsDet.goodsId,
  1206. skuMessage: this.skuMessage,
  1207. skuId: this.skuId,
  1208. num: this.value,
  1209. shopId: this.shopId
  1210. }
  1211. // let url = ''
  1212. // if (this.types == 1) {
  1213. // url = '/app/order/joinOrder'
  1214. // } else {
  1215. // url = '/app/order/insertOrder'
  1216. // }
  1217. console.log(data, '参数')
  1218. this.$Request.post('/app/order/insertOrder', data).then((res) => {
  1219. console.log(res)
  1220. if (res.code == 0) {
  1221. this.$queue.showToast('添加成功')
  1222. this.skuShow = false
  1223. this.getOrderList()
  1224. } else {
  1225. this.$queue.showToast(res.msg)
  1226. }
  1227. })
  1228. },
  1229. // 切换外卖/自提
  1230. tabSwidth(e) {
  1231. this.orderType = e
  1232. this.getOrderList()
  1233. },
  1234. // 展示购物车弹窗
  1235. isPopupShow() {
  1236. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1237. this.popupShow = true
  1238. } else {
  1239. uni.showToast({
  1240. title: '请先添加商品',
  1241. icon: 'none'
  1242. })
  1243. }
  1244. },
  1245. // 添加数量
  1246. add(item, index) {
  1247. // this.count++;
  1248. this.goodsList.orderGoodsList[0][index].goodsNum++
  1249. let data = {
  1250. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1251. type: 1,
  1252. num: 1,
  1253. shopId: this.shopId
  1254. }
  1255. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1256. if (res.code == 0) {
  1257. this.getOrderList()
  1258. } else {
  1259. this.$queue.showToast(res.msg)
  1260. this.goodsList.orderGoodsList[0][index].goodsNum--
  1261. }
  1262. })
  1263. },
  1264. // 减少数量
  1265. noAdd(item, index) {
  1266. this.goodsList.orderGoodsList[0][index].goodsNum--
  1267. // this.count--;
  1268. let data = {
  1269. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1270. type: 2,
  1271. num: 1,
  1272. shopId: this.shopId
  1273. }
  1274. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1275. if (res.code == 0) {
  1276. this.getOrderList()
  1277. }
  1278. })
  1279. },
  1280. // 清空购物车
  1281. empty() {
  1282. let data = {
  1283. shopId: this.shopId
  1284. }
  1285. this.$Request.post('/app/order/emptyShoppingTrolley', data).then((res) => {
  1286. console.log(res)
  1287. if (res.code == 0) {
  1288. this.totalPrice = 0
  1289. this.goodsNum = 0
  1290. this.goodsList = {
  1291. orderGoodsList: [[]]
  1292. }
  1293. this.echoSkuList = []
  1294. this.echoSku = []
  1295. this.getOrderList()
  1296. this.popupShow = false
  1297. this.getEchoOrder()
  1298. }
  1299. })
  1300. },
  1301. // 获取购物车商品列表
  1302. getOrderList() {
  1303. // 显示加载提示
  1304. uni.showLoading({
  1305. title: '加载中', // 加载提示文本
  1306. mask: true // 是否显示透明蒙层,防止触摸穿透
  1307. })
  1308. let data = {
  1309. shopId: this.shopId,
  1310. page: 1,
  1311. limit: 1000,
  1312. status: 1
  1313. // orderType: this.orderType
  1314. }
  1315. // console.log(data)
  1316. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  1317. console.log(res, '741')
  1318. if (res.code == 0 && res.data.pageUtils.list.length) {
  1319. this.goodsList = res.data.pageUtils.list[0]
  1320. console.log(this.goodsList, '888')
  1321. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0]) {
  1322. this.totalPrice = res.data.money
  1323. this.goodsNum = 0
  1324. this.goodsList.orderGoodsList[0].forEach((res) => {
  1325. if (res.goodsPicture) {
  1326. res.goodsPicture = res.goodsPicture.split(',')
  1327. }
  1328. this.goodsNum += res.goodsNum
  1329. })
  1330. if (!this.goodsList.orderGoodsList[0].length) {
  1331. this.popupShow = false
  1332. }
  1333. }
  1334. }
  1335. // 加载提示关闭
  1336. uni.hideLoading()
  1337. })
  1338. },
  1339. // 跳转商品详情
  1340. goDet(id) {
  1341. uni.navigateTo({
  1342. url: '/pages/index/shop/goodsDet?goodsId=' + id + '&shopId=' + this.shopId + '&orderType=' + this.orderType
  1343. })
  1344. },
  1345. goConfirm_throttle: throttle(function () {
  1346. this.goConfirm()
  1347. }, 1000),
  1348. // 去结算
  1349. goConfirm() {
  1350. if (!this.userId) {
  1351. uni.navigateTo({
  1352. url: '/pages/public/login'
  1353. })
  1354. return
  1355. }
  1356. let goodstr1 = 0 //商品库的 必须次数
  1357. let goodstr2 = 0 //购物车的 必须次数
  1358. // let aa=[]
  1359. // let bb=[]
  1360. let regex = new RegExp('必选', 'g')
  1361. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1362. // aa=this.dataList.map(item => item.goodsList)
  1363. // bb=aa.map(item => item)
  1364. let dataList = JSON.stringify(this.dataList)
  1365. if (dataList.match(regex)) {
  1366. goodstr1 = dataList.match(regex).length
  1367. if (dataList.indexOf('必选') != -1) {
  1368. //检测商品是否存在必选
  1369. let goodsList = JSON.stringify(this.goodsList.orderGoodsList)
  1370. if (goodsList.match(regex)) {
  1371. goodstr2 = goodsList.match(regex).length
  1372. if (goodstr1 == goodstr2) {
  1373. //检查购物车商品是否存在必须
  1374. uni.navigateTo({
  1375. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType + '&shopTypeName=' + this.shopDet.shopTypeName
  1376. })
  1377. } else {
  1378. uni.showToast({
  1379. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1380. icon: 'none'
  1381. })
  1382. return
  1383. }
  1384. } else {
  1385. uni.showToast({
  1386. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1387. icon: 'none'
  1388. })
  1389. return
  1390. }
  1391. }
  1392. } else {
  1393. console.log('3333fd', this.shopDet)
  1394. uni.navigateTo({
  1395. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType + '&shopTypeName=' + this.shopDet.shopTypeName
  1396. })
  1397. }
  1398. } else {
  1399. uni.showToast({
  1400. title: '请先添加商品',
  1401. icon: 'none'
  1402. })
  1403. }
  1404. },
  1405. TabSelect(e) {
  1406. // console.log(e)
  1407. this.tabCur = e.currentTarget.dataset.id
  1408. this.mainCur = e.currentTarget.dataset.id
  1409. this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
  1410. if (this.showShopTypeId) {
  1411. this.page = 1
  1412. this.total = []
  1413. this.supermarketGoodsList = []
  1414. // console.log(this.tabCur)
  1415. this.getSupermarketGoodsList(this.dataList[this.tabCur].classifyId)
  1416. }
  1417. },
  1418. VerticalMainFun(e) {
  1419. if (!this.showShopTypeId) {
  1420. let tabHeight = 0
  1421. if (this.load) {
  1422. for (let i = 0; i < this.dataList.length; i++) {
  1423. let view = uni.createSelectorQuery().select('#main-' + this.dataList[i].id)
  1424. view.fields(
  1425. {
  1426. size: true
  1427. },
  1428. (data) => {
  1429. this.dataList[i].top = tabHeight
  1430. tabHeight = tabHeight + data.height
  1431. this.dataList[i].bottom = tabHeight
  1432. }
  1433. ).exec()
  1434. }
  1435. this.load = false
  1436. }
  1437. let scrollTop = e.detail.scrollTop
  1438. for (let i = 0; i < this.dataList.length; i++) {
  1439. if (scrollTop > this.dataList[i].top && scrollTop < this.dataList[i].bottom) {
  1440. this.verticalNavTop = (this.dataList[i].id - 1) * 50
  1441. this.tabCur = this.dataList[i].id
  1442. return false
  1443. }
  1444. }
  1445. }
  1446. },
  1447. // 打电话
  1448. call(e) {
  1449. uni.makePhoneCall({
  1450. phoneNumber: e
  1451. })
  1452. },
  1453. // 点击调起地图查看位置
  1454. goMap() {
  1455. //查看位置需要传经纬度才能执行
  1456. uni.authorize({
  1457. scope: 'scope.userLocation',
  1458. success: (res) => {
  1459. uni.openLocation({
  1460. latitude: this.shopDet.shopLat,
  1461. longitude: this.shopDet.shopLng,
  1462. success: function () {}
  1463. })
  1464. },
  1465. fail(err) {}
  1466. })
  1467. },
  1468. getOrderDetail() {
  1469. let data = {
  1470. orderId: this.orderId
  1471. }
  1472. this.$Request.getT('/app/order/selectOrderById', data).then((res) => {
  1473. if (res.code == 0 && res.data) {
  1474. if (res.data.isPay && res.data.isPay == 1) {
  1475. this.orderId = ''
  1476. uni.removeStorageSync('orderId')
  1477. }
  1478. }
  1479. })
  1480. },
  1481. goPindan() {
  1482. if (!this.userId) {
  1483. uni.navigateTo({
  1484. url: '/pages/public/login'
  1485. })
  1486. return
  1487. }
  1488. if (uni.getStorageSync('orderId')) {
  1489. uni.navigateTo({
  1490. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + uni.getStorageSync('orderId')
  1491. })
  1492. } else {
  1493. let data = {
  1494. shopId: this.shopId
  1495. }
  1496. this.$Request.post('/app/order/shareTheBill', data).then((res) => {
  1497. if (res.code == 0) {
  1498. uni.navigateTo({
  1499. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + res.data
  1500. })
  1501. }
  1502. })
  1503. }
  1504. }
  1505. }
  1506. }
  1507. </script>
  1508. <style scoped lang="scss">
  1509. page {
  1510. background-color: #ffffff;
  1511. }
  1512. .yhq {
  1513. width: 100%;
  1514. height: 520rpx;
  1515. background-color: #f5f5f5;
  1516. overflow-y: hidden;
  1517. .yhq-box {
  1518. width: 686rpx;
  1519. height: 500rpx;
  1520. // background-color: red;
  1521. .yhq-box-title {
  1522. width: 100%;
  1523. text-align: center;
  1524. font-weight: bold;
  1525. }
  1526. .yhq-box-list {
  1527. width: 100%;
  1528. height: auto;
  1529. height: 460rpx;
  1530. margin-top: 30rpx;
  1531. .yhq-box-list-item {
  1532. width: 100%;
  1533. height: 120rpx;
  1534. border-radius: 24rpx;
  1535. background-color: #ffffff;
  1536. margin-bottom: 20rpx;
  1537. }
  1538. .yhq-box-list-item-c {
  1539. width: 646rpx;
  1540. height: 100%;
  1541. }
  1542. }
  1543. }
  1544. }
  1545. .scroll-view_H {
  1546. width: 100%;
  1547. white-space: nowrap;
  1548. }
  1549. .coupon-item {
  1550. display: inline-block;
  1551. height: 46rpx;
  1552. margin-right: 20rpx;
  1553. border: 1px solid red;
  1554. border-radius: 10rpx;
  1555. padding: 0rpx 10rpx 0rpx 10rpx;
  1556. font-size: 20rpx;
  1557. color: red;
  1558. line-height: 44rpx;
  1559. view {
  1560. display: inline-block;
  1561. }
  1562. }
  1563. .pinglunImg {
  1564. width: 100%;
  1565. margin-top: 10rpx;
  1566. }
  1567. .pinglunImg-box {
  1568. width: 100%;
  1569. image {
  1570. // margin-left: 10rpx;
  1571. width: 160upx;
  1572. height: 160upx;
  1573. border-radius: 10rpx;
  1574. }
  1575. }
  1576. .hintPopul {
  1577. width: 100%;
  1578. height: 100vh;
  1579. position: fixed;
  1580. top: 0;
  1581. background: rgba(0, 0, 0, 0.4);
  1582. z-index: 999;
  1583. }
  1584. .content_ {
  1585. position: absolute;
  1586. left: 0;
  1587. right: 0;
  1588. top: 0;
  1589. bottom: 0;
  1590. margin: auto;
  1591. text-align: center;
  1592. width: 500rpx;
  1593. height: 400rpx;
  1594. border-radius: 20rpx;
  1595. background-color: #fff;
  1596. padding-top: 120rpx;
  1597. }
  1598. .content_ image {
  1599. position: absolute;
  1600. top: -50rpx;
  1601. left: 0;
  1602. right: 0;
  1603. margin: auto;
  1604. }
  1605. .hintText {
  1606. font-size: 30rpx;
  1607. }
  1608. .Btns {
  1609. width: 460rpx;
  1610. height: 60rpx;
  1611. line-height: 60rpx;
  1612. text-align: center;
  1613. background: #fcd202;
  1614. font-size: 28rpx;
  1615. border: 2rpx solid #fcd202;
  1616. color: #333333;
  1617. border-radius: 50rpx;
  1618. font-weight: 700;
  1619. margin: auto;
  1620. }
  1621. .bg1 {
  1622. background: #ffffff;
  1623. }
  1624. .sticky-tabs {
  1625. z-index: 990;
  1626. position: sticky;
  1627. top: var(--window-top);
  1628. // background-color: #fff;
  1629. }
  1630. /* // 使用mescroll-uni,则top为0 */
  1631. .mescroll-uni,
  1632. /deep/.mescroll-uni {
  1633. .sticky-tabs {
  1634. top: 0;
  1635. }
  1636. }
  1637. .shop {
  1638. // position: relative;
  1639. // z-index: 2;
  1640. // margin-top: -80rpx;
  1641. // left: 0;
  1642. // right: 0;
  1643. display: flex;
  1644. width: 100%;
  1645. margin: auto;
  1646. border-radius: 40rpx;
  1647. box-shadow: 0 0 20rpx #cccccc;
  1648. background: linear-gradient(135deg, #81bdb3 0%, #ecf6ce 100%);
  1649. }
  1650. .skuBtn {
  1651. padding: 10rpx 30rpx;
  1652. border-radius: 10rpx;
  1653. text-align: center;
  1654. margin: 10rpx 20rpx;
  1655. font-size: 28rpx;
  1656. color: #333333;
  1657. border: 2px solid #f2f2f2;
  1658. }
  1659. .active {
  1660. background: rgba(129, 189, 179, 0.2) !important;
  1661. border: 2px solid rgba(129, 189, 179, 1) !important;
  1662. opacity: 0.6;
  1663. }
  1664. .active1 {
  1665. /* width: 82rpx; */
  1666. height: 6rpx;
  1667. background: #568d84;
  1668. position: relative;
  1669. top: -10rpx;
  1670. z-index: 9;
  1671. }
  1672. .popup {
  1673. /* height: 500rpx; */
  1674. max-height: 500rpx;
  1675. padding: 0 30rpx;
  1676. /* overflow-y: auto; */
  1677. }
  1678. .tabBtn {
  1679. height: 60rpx;
  1680. line-height: 60rpx;
  1681. color: #999999;
  1682. font-size: 38rpx;
  1683. .title {
  1684. background-color: #fff9ed;
  1685. }
  1686. }
  1687. .Switch {
  1688. width: 164rpx;
  1689. height: 62rpx;
  1690. color: #ffffff;
  1691. background: #fcd202;
  1692. border-radius: 30rpx;
  1693. display: flex;
  1694. align-items: center;
  1695. padding: 2rpx;
  1696. }
  1697. .Switch > view {
  1698. /* flex: 1; */
  1699. width: 80rpx;
  1700. text-align: center;
  1701. line-height: 62rpx;
  1702. height: 58rpx;
  1703. }
  1704. .selSwitch {
  1705. color: #333333;
  1706. background: #ffffff;
  1707. border-radius: 30rpx;
  1708. }
  1709. .hintPopul {
  1710. width: 100%;
  1711. height: 100vh;
  1712. position: absolute;
  1713. top: 0;
  1714. background: rgba(0, 0, 0, 0.4);
  1715. }
  1716. .content {
  1717. position: absolute;
  1718. left: 0;
  1719. right: 0;
  1720. top: 0;
  1721. bottom: 0;
  1722. margin: auto;
  1723. text-align: center;
  1724. width: 500rpx;
  1725. height: 400rpx;
  1726. border-radius: 20rpx;
  1727. background-color: #fff;
  1728. padding-top: 120rpx;
  1729. }
  1730. .content image {
  1731. position: absolute;
  1732. top: -50rpx;
  1733. left: 0;
  1734. right: 0;
  1735. margin: auto;
  1736. }
  1737. .hintText {
  1738. font-size: 30rpx;
  1739. }
  1740. .VerticalNav.nav {
  1741. width: 200upx;
  1742. height: calc(100% - 120rpx);
  1743. white-space: initial;
  1744. background-color: #fff;
  1745. overflow-y: scroll;
  1746. }
  1747. .VerticalNav.nav .cu-item {
  1748. width: 100%;
  1749. text-align: center;
  1750. background-color: #fff;
  1751. margin: 0;
  1752. border: none;
  1753. height: 50px;
  1754. line-height: 25px;
  1755. position: relative;
  1756. }
  1757. .VerticalNav.nav .cu-item.cur {
  1758. background-color: #fff9ed;
  1759. line-height: 25px;
  1760. }
  1761. .VerticalBox {
  1762. display: flex;
  1763. height: calc(100% - 120rpx);
  1764. background-color: #fff9ed;
  1765. }
  1766. .VerticalMain {
  1767. height: calc(100% - 120rpx);
  1768. background-color: #fff9ed;
  1769. flex: 1;
  1770. }
  1771. .detail_describe_text2 {
  1772. font-weight: 500;
  1773. margin-top: 2%;
  1774. color: #999999;
  1775. }
  1776. .detail_account_bottom {
  1777. margin-top: 20rpx;
  1778. width: 100%;
  1779. display: flex;
  1780. justify-content: space-between;
  1781. /* margin: 4% 0 3%; */
  1782. }
  1783. .detail_account_bottom_le {
  1784. width: 47.5%;
  1785. /* margin-right: 5%; */
  1786. border-radius: 44rpx;
  1787. text-align: center;
  1788. line-height: 2.8;
  1789. border: 2rpx solid rgba(129, 189, 179, 1);
  1790. background-color: rgba(129, 189, 179, 0.4);
  1791. }
  1792. .detail_account_bottom_ri {
  1793. width: 47.5%;
  1794. border-radius: 44rpx;
  1795. text-align: center;
  1796. line-height: 2.8;
  1797. background-color: rgba(129, 189, 179, 1);
  1798. }
  1799. .food_all {
  1800. position: relative;
  1801. }
  1802. .text-through {
  1803. text-decoration: line-through;
  1804. }
  1805. /* 食物 */
  1806. .food {
  1807. width: 100%;
  1808. height: calc(100vh - 260rpx);
  1809. overflow: hidden;
  1810. // position: absolute;
  1811. // top: 350rpx;
  1812. background-color: #fff9ed;
  1813. border-top-left-radius: 18rpx;
  1814. border-top-right-radius: 18rpx;
  1815. }
  1816. .food_address {
  1817. // margin: 3% 3% 0 3%;
  1818. // margin: 3%;
  1819. display: flex;
  1820. justify-content: space-between;
  1821. align-items: center;
  1822. // margin-top: 190rpx;
  1823. background-color: #fff9ed;
  1824. // padding-bottom: 3%;
  1825. padding: 3%;
  1826. }
  1827. .food_address_le {
  1828. width: 75%;
  1829. }
  1830. .food_address_le_top {
  1831. display: flex;
  1832. align-items: center;
  1833. justify-content: space-between;
  1834. }
  1835. .food_address_le_top_le {
  1836. width: 40rpx;
  1837. height: 37rpx;
  1838. }
  1839. .food_address_le_top_le image {
  1840. width: 40rpx;
  1841. height: 37rpx;
  1842. }
  1843. .food_address_le_top_ce {
  1844. line-height: 1.6;
  1845. font-size: 38rpx;
  1846. font-weight: 600;
  1847. color: #333333;
  1848. }
  1849. .food_address_le_top_ce_ri {
  1850. width: 14rpx;
  1851. /* margin: 1% 0 0 2%; */
  1852. height: 24rpx;
  1853. margin-left: 2%;
  1854. }
  1855. .food_address_le_top_ce_ri image {
  1856. width: 14rpx;
  1857. height: 24rpx;
  1858. }
  1859. .food_address_text {
  1860. font-weight: 500;
  1861. font-size: 24rpx;
  1862. color: #999999;
  1863. }
  1864. .food_address_ri {
  1865. width: 24%;
  1866. height: 55rpx;
  1867. display: flex;
  1868. padding: 0.5% 1%;
  1869. background-color: #fcd202;
  1870. border-radius: 31rpx;
  1871. color: #ffffff;
  1872. }
  1873. .food_address_ri_sty {
  1874. flex: 1;
  1875. text-align: center;
  1876. padding-top: 4%;
  1877. font-size: 24rpx;
  1878. }
  1879. .food_address_ri_sty_active {
  1880. width: 100%;
  1881. overflow: hidden;
  1882. background-color: #ffffff;
  1883. border-radius: 31rpx;
  1884. color: #333333;
  1885. text-align: center;
  1886. }
  1887. /* 结算 */
  1888. .settlement {
  1889. width: 94%;
  1890. line-height: 3.4;
  1891. position: fixed;
  1892. bottom: 10rpx;
  1893. left: 3%;
  1894. display: flex;
  1895. justify-content: space-between;
  1896. }
  1897. .settlement1 {
  1898. width: 94%;
  1899. background-color: rgba(129, 189, 179, 0.4);
  1900. line-height: 2.8;
  1901. border-radius: 49rpx;
  1902. position: relative;
  1903. /* bottom: 10rpx; */
  1904. left: 0;
  1905. right: 0;
  1906. /* left: 3%; */
  1907. display: flex;
  1908. justify-content: space-between;
  1909. margin: 20rpx auto;
  1910. }
  1911. .settlement_le {
  1912. width: 552rpx;
  1913. padding-left: 18%;
  1914. color: #000;
  1915. font-size: 30rpx;
  1916. background-image: url(@/static/images/index/1.png);
  1917. background-size: 100% 100%;
  1918. }
  1919. .settlement_le text {
  1920. font-size: 22rpx;
  1921. }
  1922. .settlement_ri {
  1923. margin-left: -8rpx;
  1924. width: 180rpx;
  1925. font-family: PingFang SC;
  1926. font-weight: 800;
  1927. color: #333333;
  1928. text-align: center;
  1929. background-image: url(@/static/images/index/2.png);
  1930. background-size: 100% 100%;
  1931. }
  1932. .settlement_ri1 {
  1933. margin-left: -8rpx;
  1934. width: 180rpx;
  1935. font-family: PingFang SC;
  1936. font-weight: 800;
  1937. color: #333333;
  1938. text-align: center;
  1939. background-image: url(@/static/images/index/2.png);
  1940. background-size: 100% 100%;
  1941. }
  1942. .settlement_img {
  1943. width: 91rpx;
  1944. height: 96rpx;
  1945. position: absolute;
  1946. // bottom: 30rpx;
  1947. left: 5%;
  1948. }
  1949. .settlement_img image {
  1950. margin-top: 10rpx;
  1951. width: 74rpx;
  1952. height: 81rpx;
  1953. }
  1954. .settlement_hot {
  1955. width: 35rpx;
  1956. height: 35rpx;
  1957. line-height: 35rpx;
  1958. text-align: center;
  1959. border-radius: 50%;
  1960. position: absolute;
  1961. top: 5rpx;
  1962. right: 0;
  1963. background-color: #ff130a;
  1964. color: #ffffff;
  1965. font-size: 20rpx;
  1966. font-weight: bold;
  1967. color: #ffffff;
  1968. }
  1969. .select_all {
  1970. width: 100%;
  1971. position: relative;
  1972. }
  1973. /* 餐厅 */
  1974. .select {
  1975. color: #000000;
  1976. font-weight: bold;
  1977. background-color: #fff;
  1978. z-index: 10;
  1979. }
  1980. .select_line {
  1981. width: 15%;
  1982. height: 6rpx;
  1983. margin: 0 auto 4%;
  1984. background: #e6e6e6;
  1985. border-radius: 4rpx;
  1986. }
  1987. .select_search {
  1988. width: 100%;
  1989. margin: 2% 0;
  1990. display: flex;
  1991. align-items: center;
  1992. }
  1993. .select_search_le {
  1994. /* width: 10%; */
  1995. font-size: 30rpx;
  1996. line-height: 2.5;
  1997. margin-right: 1%;
  1998. }
  1999. .select_search_ce {
  2000. /* width: 5%; */
  2001. /* margin-top: 1%; */
  2002. margin-right: 20rpx;
  2003. margin-left: 6rpx;
  2004. /* margin: 0 20rpx; */
  2005. width: 20rpx;
  2006. height: 10rpx;
  2007. }
  2008. .select_search_ri {
  2009. /* width: 84%; */
  2010. height: 72rpx;
  2011. flex: 1;
  2012. display: flex;
  2013. }
  2014. .select_search_ri input {
  2015. flex: 1;
  2016. /* width: 100%; */
  2017. height: 72rpx;
  2018. background: #f5f5f5;
  2019. color: #999999;
  2020. border-radius: 36rpx;
  2021. text-decoration: 42rpx;
  2022. text-align: center;
  2023. }
  2024. /* 附近 */
  2025. .nearby {
  2026. width: 100%;
  2027. position: relative;
  2028. }
  2029. .nearby_text {
  2030. width: 18%;
  2031. font-size: 30rpx;
  2032. font-weight: 800;
  2033. color: #333333;
  2034. text-align: center;
  2035. border-bottom: 16rpx solid #fcd202;
  2036. /* line-height: 20rpx; */
  2037. margin-top: 10rpx;
  2038. }
  2039. .nearby_address_active {
  2040. border: 2rpx solid #fcd202;
  2041. width: 100%;
  2042. padding: 3%;
  2043. margin-top: 3%;
  2044. border-radius: 10upx;
  2045. display: flex;
  2046. }
  2047. .nearby_address {
  2048. width: 100%;
  2049. padding: 3%;
  2050. margin-top: 3%;
  2051. border-radius: 10upx;
  2052. display: flex;
  2053. }
  2054. .nearby_address_le {
  2055. flex: 1;
  2056. }
  2057. .nearby_address_ri {
  2058. line-height: 2.5;
  2059. text-align: right;
  2060. /* flex: 1; */
  2061. }
  2062. .nearby_text2 {
  2063. /* line-height: 1.5; */
  2064. display: flex;
  2065. justify-content: space-between;
  2066. align-items: center;
  2067. }
  2068. .nearby_text2_ {
  2069. font-size: 30rpx;
  2070. font-weight: 800;
  2071. color: #333333;
  2072. }
  2073. .nearby_text3 {
  2074. font-size: 24rpx;
  2075. font-weight: 500;
  2076. color: #999999;
  2077. margin-top: 2%;
  2078. }
  2079. /* 添加地址 */
  2080. .goorder {
  2081. width: 100%;
  2082. padding: 2% 3%;
  2083. position: fixed;
  2084. bottom: 0;
  2085. background-color: #ffffff;
  2086. border-top: 1rpx solid #999999;
  2087. }
  2088. .goorder_but {
  2089. width: 100%;
  2090. line-height: 2.5;
  2091. text-align: center;
  2092. background: #fcd202;
  2093. border-radius: 36rpx;
  2094. }
  2095. .lable {
  2096. border: 1rpx solid #ffe6d9;
  2097. height: 40rpx;
  2098. padding: 0 14rpx;
  2099. background: #ffe6d9;
  2100. border-radius: 4rpx;
  2101. font-weight: 500;
  2102. color: #fd6416;
  2103. font-size: 20rpx;
  2104. margin-right: 10rpx;
  2105. margin-bottom: 10rpx;
  2106. }
  2107. //店铺公告弹框
  2108. .gong_img {
  2109. margin: 40rpx 0 0 40rpx;
  2110. width: 46px;
  2111. height: 46px;
  2112. }
  2113. .gong_name {
  2114. position: absolute;
  2115. margin: 41rpx 0 0 163rpx;
  2116. font-size: 28rpx;
  2117. font-weight: 700;
  2118. color: rgba(0, 0, 0, 1);
  2119. }
  2120. .gong_pei {
  2121. position: absolute;
  2122. margin: 87rpx 0 0 163rpx;
  2123. font-size: 20rpx;
  2124. font-weight: 400;
  2125. color: rgba(0, 0, 0, 1);
  2126. }
  2127. .gong_line {
  2128. position: absolute;
  2129. margin: 161rpx 0 0 1rpx;
  2130. width: 635.5rpx;
  2131. border: 1rpx solid rgba(230, 230, 230, 1);
  2132. }
  2133. .gong_huo {
  2134. width: 151rpx;
  2135. height: 34rpx;
  2136. border-radius: 5rpx;
  2137. background: rgba(230, 74, 69, 1);
  2138. font-size: 16rpx;
  2139. font-weight: 400;
  2140. line-height: 34rpx;
  2141. color: rgba(255, 255, 255, 1);
  2142. text-align: center;
  2143. }
  2144. //下方店铺详情
  2145. .shop_xiang {
  2146. width: 100%;
  2147. margin-top: 8px;
  2148. }
  2149. .shopDizhi {
  2150. // height: 80rpx;
  2151. font-size: 34rpx;
  2152. color: #000;
  2153. line-height: 80rpx;
  2154. }
  2155. .shopLine {
  2156. width: 100%;
  2157. height: 1rpx;
  2158. background-color: rgba(242, 242, 242, 1);
  2159. // border: 1rpx solid rgba(242,242,242,0.5);
  2160. }
  2161. .shop_zheng {
  2162. width: 100%;
  2163. margin-top: 8px;
  2164. height: 100%;
  2165. overflow: hidden;
  2166. }
  2167. .image-container {
  2168. width: 350px;
  2169. overflow-x: auto;
  2170. padding: 10rpx 0 10rpx 0;
  2171. white-space: nowrap;
  2172. // transition: transform 0.3s; /* 可以添加平滑滑动的效果 */
  2173. }
  2174. .image {
  2175. display: inline-block;
  2176. width: 180rpx; /* 三张图片平分宽度 */
  2177. height: 135rpx;
  2178. }
  2179. </style>