index.vue 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040
  1. <template>
  2. <view class="content">
  3. <view @click="goAddress()" class="address text-bold">
  4. <view class="address_name">{{address?address:'选择地址'}}</view>
  5. <u-icon name="arrow-down" color="#333333" size="28"></u-icon>
  6. </view>
  7. <!-- #ifdef H5 -->
  8. <view class="bg-white">
  9. <!-- #endif -->
  10. <!-- #ifndef H5 -->
  11. <view class="bg-white" style="margin-top: 180rpx;">
  12. <!-- #endif -->
  13. <view class="padding-lr padding-top">
  14. <view class="flex align-center padding-left" @click="goNav('/pages/index/search/index',2)"
  15. style="border: 2rpx solid #558C83;height: 80rpx;border-radius: 60rpx;">
  16. <u-icon name="search" size="46"></u-icon>
  17. <view class="flex-sub text-gray margin-left-sm">输入商家或商品名称</view>
  18. <view class="search-btn">搜索</view>
  19. </view>
  20. </view>
  21. <view class="padding-top padding-lr">
  22. <swiper class="swiper radius" :autoplay="true" interval="2000" duration="500" :circular="true"
  23. style="width: 100%;height: 280rpx;">
  24. <swiper-item v-for="(item,index) in bannerList" :key='index' @click="goNav(item.url,1)">
  25. <image :src="item.imageUrl" class="radius" style="width: 100%;height: 280rpx;"></image>
  26. </swiper-item>
  27. </swiper>
  28. </view>
  29. <view class="padding-lr radius" v-if="XCXIsSelect == '是'">
  30. <u-grid :col="5" :border="false">
  31. <u-grid-item v-for="(item,index) in gridData" :key='index' @tap="goDetail(item)" :custom-style="{padding:'20rpx 0'}">
  32. <image :src="item.imageUrl" style="width: 92rpx;height: 92rpx;border-radius: 92rpx;flex-shrink:0;">
  33. </image>
  34. <view class="grid-text margin-top-sm">{{item.name}}</view>
  35. </u-grid-item>
  36. </u-grid>
  37. </view>
  38. </view>
  39. <view class="padding-lr" @click="natiVip">
  40. <image class="radius" style="width: 100%;height: 280rpx;" src="https://mxys.chuanghai-tech.com/wmfile/20251128/aa2e9bf9a4e04b758090007ac04cea44.jpg"></image>
  41. </view>
  42. <!-- 公告 -->
  43. <!-- <view class="flex justify-between align-center bg-white padding-bottom padding-lr radius bg-white"
  44. style="width: 100%;height: 100rpx;">
  45. <image @click="ceshi" src="../../static/images/index/gonggao.png" style="width: 140rpx;height: 50rpx;" mode=""></image>
  46. <view class="flex-sub margin-left-sm" style="height:82rpx;overflow: hidden;">
  47. <uni-notice-bar single speed="25" scrollable background-color="#fff" color="#000" :text="noticeList.value" />
  48. </view>
  49. </view>
  50. <view class="flex justify-between padding-lr bg-white" v-if="XCXIsSelect == '是'">
  51. <image src="https://mxys.chuanghai-tech.com/wmfile/20250618/9eeeec20031849fe8379536ffa0f28b3.png" @click="goNav('/my/integral/index')"
  52. style="width: 338rpx;height: 180rpx;" mode=""></image>
  53. <image src="https://mxys.chuanghai-tech.com/wmfile/20250618/ddbb2b42ec9749afab93863bc078614f.png" @click="goNav('/my/task/index')"
  54. style="width: 338rpx;height: 180rpx;" mode=""></image>
  55. </view> -->
  56. <!-- <view class="padding-top padding-lr bg-white" v-if="!shopStatus == 1&&XCXIsSelect=='是'">
  57. <image src="../../static/images/index/banner.png" @click="goNav('/my/apply/index')"
  58. style="width: 100%;height: 170rpx;" mode=""></image>
  59. </view> -->
  60. <!-- 活动推荐 -->
  61. <!-- <view class="huodong flex justify-center" v-if="huodongList.length>0&&XCXIsSelect!='否'">
  62. <view class="huodong-box flex justify-center">
  63. <view class="huodong-box-c">
  64. <view class="huodong-box-c-title flex justify-between align-center">
  65. <view class="huodong-box-c-title-l flex align-center">
  66. <image src="../../static/images/index/hd.png" mode=""></image>
  67. </view>
  68. <view class="huodong-box-c-title-r">
  69. 美食速达
  70. </view>
  71. </view>
  72. <view class="huodong-box-c-list">
  73. <swiper @change="swiperChange" :indicator-dots="false" display-multiple-items="3"
  74. :circular="true" style="height: 300rpx;" :autoplay="false" previous-margin="5"
  75. :interval="300" :duration="300">
  76. <swiper-item v-for="(item,index) in huodongList"
  77. style="border-radius: 28rpx;height: 320rpx;"
  78. @click="gotohuodong(item.name,item.id,item.imageUrl,item.url)">
  79. <view class="swiper-item flex justify-center flex-wrap align-center"
  80. style="width: 200rpx;height: 240rpx;background: linear-gradient(0deg, rgba(252, 210, 2, 0.8) 0%, rgba(252, 210, 2, 1) 100%);border-radius: 28rpx;"
  81. :style="currents==index?'height:260rpx;border-radius: 28rpx;':'margin-top:14rpx;'">
  82. <view class="flex justify-center align-center"
  83. :style="currents==index?'height:200rpx':''"
  84. style="width: 190rpx;height: 180rpx;border-radius: 28rpx;margin-top: 5rpx;">
  85. <image :src="item.imageUrl"
  86. style="width: 95%;height: 95%;border-radius: 20rpx;" mode="aspectFill">
  87. </image>
  88. </view>
  89. <view class=""
  90. style="width: 100%;text-align: center;font-size: 32rpx;color: white;font-weight: bold;padding-bottom: 10rpx;">
  91. {{item.name}}
  92. </view>
  93. </view>
  94. </swiper-item>
  95. </swiper>
  96. </view>
  97. </view>
  98. </view>
  99. </view> -->
  100. <!-- 推荐商家 -->
  101. <!-- <view class="jxShop flex justify-center" v-if="jxlist.length>0&&XCXIsSelect!='否'">
  102. <view class="jxShop-box flex justify-center">
  103. <view class="jxShop-box-c">
  104. <view class="jxShop-box-c-title flex justify-between align-center">
  105. <view class="jxShop-box-c-title-l">
  106. 推荐商家
  107. </view>
  108. <view class="jxShop-box-c-title-r flex align-center" @click="gotoList()">
  109. 更多
  110. <u-icon name="arrow-right" color="#1E1F31" size="28"></u-icon>
  111. </view>
  112. </view>
  113. <view class="jxShop-box-c-list flex justify-between">
  114. <view class="jxShop-box-c-list-item"
  115. @click="goShopDet(item.shopId,item,item.shopActivityList)"
  116. v-for="(item,index) in jxlist" :key="index">
  117. <image :src="item.shopCover" mode="aspectFill"></image>
  118. <view class="jxShop-box-c-list-item-name">
  119. {{item.shopName}}
  120. </view>
  121. </view>
  122. <view class="jxShop-box-c-list-item" style="height: 0;">
  123. </view>
  124. <view class="jxShop-box-c-list-item" style="height: 0;">
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. </view> -->
  130. <view class="flex justify-center"
  131. style="position: relative;background-color: #ffffff;padding-top: 20rpx;padding-bottom: 20rpx;">
  132. <view style="width: 686rpx;" class="flex justify-between align-center bg-white">
  133. <view :class="current==1?'select':''" @click="confirm(1)">综合排序</view>
  134. <view :class="current==3?'select':''" @click="confirm(3)">距离优先</view>
  135. <view :class="current==4?'select':''" @click="confirm(4)">销量优先</view>
  136. <view class="flex" @click="isShow = !isShow">
  137. <view class="flex align-center" style="margin: 0 auto;">
  138. <view :class="isShow?'select':''">筛选</view>
  139. <u-icon v-if="!isShow" name="arrow-down" size="28"></u-icon>
  140. <u-icon v-if="isShow" name="arrow-up" color="#558C83" size="28"></u-icon>
  141. </view>
  142. </view>
  143. </view>
  144. <view v-if="isShow"
  145. style="position: absolute;top: 50rpx;width: 100%;z-index: 10;background: rgba(0,0,0,.5);height: 100vh;"
  146. @click="isShow =false">
  147. <view class="padding-lr bg-white">
  148. <view class="flex justify-between align-center padding-tb-sm u-border-bottom"
  149. v-for="(item,index) in options4" :key='index' @click.stop="getSelect(item)">
  150. <view class="text-df" :class="item.select?'select':''">{{item.shopTypeName}}</view>
  151. <u-icon v-if="item.select" name="checkmark" color="#558C83" size="28"></u-icon>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. <!-- 活动筛选 -->
  157. <view class="hd flex justify-center" v-if="hdlist.length>0">
  158. <view class="hd-box">
  159. <scroll-view scroll-x="true" class="scroll-view_H">
  160. <view class="hd-box-item" :style="currenthd==index?'background-color:#9ACAB9;':''"
  161. @click="searchhd(index,item.id)" v-for="(item,index) in hdlist" :key="index">
  162. {{item.title}}
  163. </view>
  164. </scroll-view>
  165. </view>
  166. </view>
  167. <view class="padding-lr">
  168. <view class="margin-tb-sm flex justify-between bg-white padding-sm radius"
  169. v-for="(item,index) in shopList" :key='index'
  170. @click="goShopDet(item.shopId,item,item.shopActivityList)">
  171. <image :src="item.shopCover[0]" class="radius" style="width: 180rpx;height: 180rpx;" mode="aspectFill"></image>
  172. <view class=" margin-left-sm" style="width: 450rpx;">
  173. <view class=" flex flex-direction justify-between">
  174. <view class="text-lg text-bold text-black">{{item.shopName}}</view>
  175. <view class="flex align-center margin-top-xs" style="width: 100%;">
  176. <!-- <u-icon name="star-fill" color="#FD6416" size="28"></u-icon> -->
  177. <text class="text-lg" style="color: #FF8205;"> {{item.shopScore?item.shopScore:0}}分</text>
  178. <text
  179. class="text-gray flex-sub margin-left-xs">销量{{item.shopSales?item.shopSales:0}}</text>
  180. <!-- <view style="font-size:20rpx;color:#707070;border: 2rpx solid #CCC6C6;border-radius: 8rpx;padding: 5rpx 8rpx;">{{item.autoSendOrder==1?'商家配送':'平台配送'}}</view> -->
  181. </view>
  182. <view class="text-gray margin-top-xs flex justify-between">
  183. <view>起送 ¥{{item.minimumDelivery}} 配送 ¥{{item.errandMoney?item.errandMoney:0}}</view>
  184. <view>
  185. <text class="text-gray margin-left-xs">{{item.errandTime}}分钟</text>
  186. <text class="text-gray margin-left-xs">{{item.distance}}</text>
  187. </view>
  188. </view>
  189. <view style="display: flex;" v-if="item.businessHours&&item.lockHours">
  190. <view class="text-gray margin-top-xs" style="background-color: #FFF5EB;color: #FF8205;border-radius: 8rpx;padding: 5rpx 16rpx;" >
  191. 营业时间:{{item.businessHours}}-{{item.lockHours}}
  192. </view>
  193. </view>
  194. <view class="flex margin-top-xs justify-between align-start" style="width: 100%;">
  195. <view class="flex flex-wrap align-center"
  196. style="width: 100%;height: 100%;overflow: hidden;">
  197. <!-- <view class="lable flex justify-center align-center" v-if="item.enableFullReductionFlag==1">
  198. 不参与配送费满减</view> -->
  199. <view class="lable flex justify-center align-center" v-if="item.enableFullReductionFlag==0&&item.exemptMinMoney">
  200. 满{{item.exemptMinMoney}}免配送费</view>
  201. <view v-for="(ite,ind) in item.shopActivityList" :key='ind' v-if="item.shopActivityList && ite.activityType!='1'">
  202. <view class="lable flex justify-center align-center" style="border-radius: 8rpx;border: 2rpx solid #F97A7A;background-color: #ffffff;color: #FF0000;box-sizing: border-box;">
  203. <text v-if="ite.activityType=='2'">时段</text>
  204. <text v-if="ite.activityType=='3'">满额</text>
  205. <text v-if="ite.activityType=='4'">全场</text>
  206. <text style="margin-left: 3px;">|</text>
  207. <text style="margin-left: 3px;">{{ite.activityName}}</text>
  208. </view>
  209. <!-- <view class="lable flex justify-center align-center"
  210. style="border-radius: 4rpx;border: 1rpx solid red;background-color: #ffffff;color: red;box-sizing: border-box;"
  211. >{{ite.activityName}}
  212. </view> -->
  213. </view>
  214. <view class="lable flex justify-center align-center" v-for="(ite,ind) in item.shopLable" :key='ind'
  215. v-if="item.shopLable">
  216. {{ite}}
  217. </view>
  218. <view class="lable flex justify-center align-center" v-if="item.couponList" style="border-radius: 8rpx;border: 1rpx solid #F97A7A;background-color: #ffffff;color: #FF0000;box-sizing: border-box;" v-for="(it,ide) in item.couponList" :key="ide">
  219. <text>优惠券</text>
  220. <text style="margin-left: 3px;">|</text>
  221. <text style="margin-left: 3px;">满{{it.minMoney}}减{{it.money}}</text>
  222. </view>
  223. <view v-if="item.isMclz == 1" class="lable flex justify-center align-center cook" @click.stop="goCook(item)">
  224. 明厨亮灶>
  225. </view>
  226. </view>
  227. </view>
  228. </view>
  229. <view class="flex margin-top-xs">
  230. <view v-for="(ite,ind) in item.goodsList" :key='ind'
  231. @click.stop="goDet(ite.goodsId,item.shopId)" style="width: 33%;">
  232. <image :src="ite.goodsCover" style="width: 120rpx;height: 120rpx;" class="radius"
  233. mode="">
  234. </image>
  235. <view class="u-line-1 text-df text-bold margin-top-xs">{{ite.goodsName}}</view>
  236. <view class="text-bold margin-top-xs" style="color: #FD6416;">
  237. <text class="text-sm">¥</text>
  238. {{ite.goodsMoney}}
  239. </view>
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. </view>
  245. <!-- <empty v-if="!shopList.length" ></empty> -->
  246. <view class="page-box" v-if="!shopList.length">
  247. <view class="centre" v-if="XCXIsSelect == '是'">
  248. <image src="https://mxys.chuanghai-tech.com/wmfile/20250814/99c5ced85df04062a736276ba75bdd1e.png" mode=""></image>
  249. <view class="tips">暂无内容</view>
  250. </view>
  251. <view class="centre" v-else-if="XCXIsSelect == '否'">
  252. <image style="width: 345px;height: 140px;" src="https://mxys.chuanghai-tech.com/img/20240315/12fa3c96351f4f10abae1ba251d4c284.jpg" mode=""></image>
  253. </view>
  254. </view>
  255. <!-- 打样提示 -->
  256. <view v-if="hintShow" class="hintPopul" @click.stop="hintShow=false">
  257. <view class="content_">
  258. <image src="../../static/images/index/shop.png" mode="" style="width: 200rpx;height: 180rpx;">
  259. </image>
  260. <view class="text-xl text-bold">店铺打烊啦</view>
  261. <view class="hintText margin-top-sm text-gray">现在店铺已经打烊了,营业时间</view>
  262. <view class="margin-top-xs text-gray margin-bottom">{{shop.businessHours}}-{{shop.lockHours}}</view>
  263. <view class="skuBtn" @click="hintShow=false">知道了</view>
  264. </view>
  265. </view>
  266. <u-popup v-model="Authorization" mode="center" close-icon="close-circle" close-icon-pos="top-right"
  267. close-icon-color="#8f9298" close-icon-size="50">
  268. <view class="contentview">
  269. <view class="title">隐私保护指引</view>
  270. <view class="des" @click="openPrivacyContract">
  271. 在使用当前小程序服务之前,请仔细阅读<text
  272. style="color: #FF7F00;">{{privacyContractName}}</text>。如你同意{{privacyContractName}},请点击“同意”开始使用。
  273. </view>
  274. <view class="btns">
  275. <button class="item reject" @click="exitMiniProgram">拒绝</button>
  276. <button id="agree-btn" class="item agree" open-type="agreePrivacyAuthorization"
  277. @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
  278. </view>
  279. </view>
  280. </u-popup>
  281. <!-- 新人红包 -->
  282. <view class="hongbao" v-if="waimaiHB == '是' &&HBShow">
  283. <view style="width: 62%;margin: 0 auto;position: relative;">
  284. <view @click="HBShow=false"
  285. style="position: absolute;right: -10rpx;top: -10rpx;z-index: 999;;font-size: 60rpx;font-weight: bold;">
  286. X
  287. </view>
  288. <!-- @click="takemoney()" https://mxys.chuanghai-tech.com/wmfile/20250814/f5146f4e2f1e46d28d4613260ab58c92.png-->
  289. <image :src="Tupian('/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20240520171928.jpg')" class="hb_img"></image>
  290. <!-- <image src="../../static/images/index/hb_btn.png" class="hb_btn" @click="takemoney()"></image> -->
  291. </view>
  292. </view>
  293. <!-- 联系客服悬浮按钮区域 -->
  294. <view class="serviceBtn" @click="goChat">
  295. </view>
  296. </view>
  297. </template>
  298. <script>
  299. import empty from '@/components/empty.vue'
  300. import {
  301. requestAndroidPermission,
  302. gotoAppPermissionSetting
  303. } from '@/components/permission.js'
  304. export default {
  305. components: {
  306. empty
  307. },
  308. data() {
  309. return {
  310. Authorization: false,
  311. privacyContractName: '',
  312. lookShow: false,
  313. currenthd: -1,
  314. hdlist: [],
  315. activityId: '',
  316. currents: 1,
  317. HBShow: false,
  318. isShow: false,
  319. hintShow: false,
  320. address: '暂无地址',
  321. city:'',
  322. bannerList: [{
  323. "id": 3,
  324. "createTime": "2021-12-24 17:52:27",
  325. "name": "banner3",
  326. "imageUrl": "https://diancan.xianmxkj.com/file/uploadPath/2021/12/24/0bfdbabcde9c62b42e77aecdb583033b.png",
  327. "state": 1,
  328. "classify": 1,
  329. "url": "",
  330. "sort": 3,
  331. "describess": "banner3"
  332. },
  333. {
  334. "id": 45,
  335. "createTime": "2021-12-24 17:52:27",
  336. "name": "banner",
  337. "imageUrl": "https://diancan.xianmxkj.com/file/uploadPath/2021/12/24/589d72b40a690147a48854a3b7f88953.png",
  338. "state": 1,
  339. "classify": 1,
  340. "url": "",
  341. "sort": 1,
  342. "describess": ""
  343. },
  344. ],
  345. gridData: [],
  346. page: 1,
  347. limit: 10,
  348. shopList: [],
  349. screen: '1',
  350. lng: '',
  351. lat: '',
  352. shopType: '1',
  353. shopTypeList: [{
  354. id: '0',
  355. shopTypeName: "全部"
  356. }],
  357. userId: '',
  358. src1: '../../static/images/index/xia.png',
  359. noticeList: {},
  360. show: false,
  361. typeShow: false,
  362. current: 1,
  363. sort: 1,
  364. fabuclassifyId: '',
  365. typeName: '全部',
  366. fabuclassifyName: '筛选',
  367. shopTypeId: '',
  368. value1: 0,
  369. value2: 0,
  370. value3: 0,
  371. value4: 0,
  372. options1: [{
  373. label: '综合排序',
  374. value: 1,
  375. }],
  376. options2: [{
  377. value: '3',
  378. label: "距离优先"
  379. }],
  380. options3: [{
  381. value: '4',
  382. label: "销量优先"
  383. }],
  384. options4: [{
  385. id: '',
  386. select: true,
  387. shopTypeName: "全部"
  388. }],
  389. defaultIndex: [0, 0, 0, 0],
  390. filterData: [
  391. [{
  392. label: '综合排序',
  393. value: '1',
  394. }],
  395. [{
  396. label: '距离优先',
  397. value: '3',
  398. }],
  399. [{
  400. label: '销量优先',
  401. value: '4',
  402. }],
  403. [{
  404. label: '不限性别',
  405. value: '0',
  406. },
  407. {
  408. label: '限男生',
  409. value: 1,
  410. },
  411. {
  412. label: '限女生',
  413. value: 2,
  414. }
  415. ],
  416. ],
  417. shopStatus: '',
  418. shop: {},
  419. title: '综合排序',
  420. title1: '距离优先',
  421. title2: '销量优先',
  422. title3: '筛选',
  423. XCXIsSelect: '否',
  424. arr: [],
  425. showModal: true,
  426. shopId: '',
  427. totalCount: 0,
  428. newUserFlagWm: 2,
  429. waimaiHB: '否',
  430. tuiguang: '',
  431. tuiguangImg: '',
  432. huodongList: [],
  433. jxlist: [],
  434. huoList:[],//商户参与的活动
  435. token:""
  436. }
  437. },
  438. onLoad(e) {
  439. let that = this
  440. that.token = that.$queue.getData("token")
  441. that.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
  442. that.getZiZhi();
  443. that.getBannerList()
  444. that.getGridList()
  445. that.getShopType()
  446. that.getNoticeList()
  447. // that.getHuoDongList() //活动列表
  448. that.getHuoDList() //活动轮播
  449. that.gethdlist();
  450. uni.getLocation({
  451. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  452. highAccuracyExpireTime: 100,
  453. success: function(res) {
  454. that.lat = res.latitude;
  455. that.lng = res.longitude;
  456. that.defaultAddress()
  457. // that.getShopList()
  458. },
  459. fail(e) {
  460. uni.showModal({
  461. title: '温馨提示',
  462. content: '您的定位权限未开启,请开启后再来刷新操作吧!',
  463. showCancel: true,
  464. cancelText: '取消',
  465. confirmText: '确认',
  466. success: res => {
  467. if (res.confirm) {
  468. // #ifdef MP-WEIXIN
  469. uni.openSetting({ // 打开设置页
  470. success(rea) {
  471. console.log(rea.authSetting)
  472. }
  473. });
  474. // #endif
  475. // #ifdef APP-PLUS
  476. gotoAppPermissionSetting()
  477. // #endif
  478. }
  479. }
  480. });
  481. }
  482. });
  483. console.log(that.lat, that.lng, '经纬度')
  484. // #ifdef MP-WEIXIN
  485. if (e.scene) {
  486. const scene = decodeURIComponent(e.scene);
  487. let params = {}
  488. // 分割成键值对数组
  489. let pairs = scene.split('&')
  490. // 遍历并解析每个键值对
  491. pairs.forEach((pair) => {
  492. const [key, value] = pair.split('=')
  493. params[key] = value
  494. })
  495. let shopId = params.shopId
  496. let shopTypeId = params.shopTypeId
  497. if (shopId) {
  498. that.shopId = shopId
  499. }
  500. // if (!that.userId) {
  501. // uni.navigateTo({
  502. // url: '/pages/public/login'
  503. // })
  504. // return;
  505. // }
  506. setTimeout(function() {
  507. uni.navigateTo({
  508. url: '/pages/index/shop/index?shopId=' + that.shopId +'&shopTypeId=' + shopTypeId+'&lat='+this.lat+'&lng='+this.lng
  509. })
  510. }, 100)
  511. } else if (e.orderId) {
  512. uni.setStorageSync('orderId', e.orderId)
  513. // if (!that.userId) {
  514. // uni.navigateTo({
  515. // url: '/pages/public/login'
  516. // })
  517. // return;
  518. // }
  519. setTimeout(function() {
  520. uni.navigateTo({
  521. url: '/pages/index/shop/goodsList?shopId=' + e.shopId
  522. })
  523. }, 100)
  524. }
  525. try {
  526. wx.getPrivacySetting({
  527. success: res => {
  528. console.log("是否需要授权:", res.needAuthorization, "隐私协议的名称为:", res.privacyContractName)
  529. if (res.needAuthorization) {
  530. that.privacyContractName = res.privacyContractName;
  531. // this.$refs.popusAuthorization.open();
  532. that.Authorization = true;
  533. }
  534. },
  535. fail: () => {},
  536. complete: () => {},
  537. })
  538. } catch (e) {
  539. //TODO handle the exception
  540. }
  541. // #endif
  542. },
  543. onShow() {
  544. let that = this
  545. that.token = that.$queue.getData('token')
  546. that.$Request.get('/app/common/type/264').then(res => {
  547. if (res.code == 0) {
  548. // #ifdef MP-WEIXIN
  549. that.XCXIsSelect = res.data.value;
  550. that.$queue.setData('XCXIsSelect', res.data.value);
  551. that.$queue.setData('shangxianSelect', res.data.value);
  552. // #endif
  553. // #ifndef MP-WEIXIN
  554. that.$queue.setData('XCXIsSelect', '是');
  555. that.$queue.setData('shangxianSelect', '是');
  556. that.XCXIsSelect = '是'
  557. // #endif
  558. }
  559. });
  560. that.getHuoDList() //活动轮播
  561. that.gethdlist();
  562. uni.getLocation({
  563. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  564. success: function(res) {
  565. console.log(res)
  566. that.lat = res.latitude;
  567. that.lng = res.longitude;
  568. that.defaultAddress()
  569. }
  570. });
  571. that.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
  572. that.lng = uni.getStorageSync('lng') ? uni.getStorageSync('lng') : that.lng
  573. that.lat = uni.getStorageSync('lat') ? uni.getStorageSync('lat') : that.lat
  574. console.log(that.userId, '我的id')
  575. // if (this.lng && this.lat) {
  576. // that.defaultAddress()
  577. // that.getjxShop(); //精选商家
  578. // }
  579. if (that.userId) {
  580. that.getUserInfo()
  581. that.$Request.getT('/app/common/type/266').then(res => { //订单取消通知
  582. // console.log(res, 963)
  583. if (res.code == 0) {
  584. if (res.data && res.data.value) {
  585. that.arr.push(res.data.value)
  586. }
  587. }
  588. })
  589. that.$Request.getT('/app/common/type/269').then(res => { //订单状态通知
  590. // console.log(res, 966)
  591. if (res.code == 0) {
  592. if (res.data && res.data.value) {
  593. that.arr.push(res.data.value)
  594. }
  595. }
  596. })
  597. // that.$Request.getT('/app/common/type/440').then(res => { //订单状态通知
  598. // // console.log(res, 999)
  599. // if (res.code == 0) {
  600. // if (res.data && res.data.value) {
  601. // that.arr.push(res.data.value)
  602. // }
  603. // }
  604. // })
  605. // that.$Request.getT('/app/common/type/441').then(res => { //订单状态通知
  606. // // console.log(res, 999)
  607. // if (res.code == 0) {
  608. // if (res.data && res.data.value) {
  609. // that.arr.push(res.data.value)
  610. // }
  611. // }
  612. // })
  613. // #ifdef MP-WEIXIN
  614. if (that.showModal) {
  615. that.openMsg()
  616. }
  617. // #endif
  618. }
  619. // this.getShopList()
  620. },
  621. onShareAppMessage(res) { //发送给朋友
  622. return {
  623. title: this.tuiguang,
  624. path: '/pages/index/index',
  625. imageUrl: this.tuiguangImg,
  626. }
  627. },
  628. onShareTimeline(res) { //分享到朋友圈
  629. return {
  630. title: this.tuiguang,
  631. path: '/pages/index/index',
  632. imageUrl: this.tuiguangImg,
  633. }
  634. },
  635. methods: {
  636. //跳转到会员页
  637. natiVip(){
  638. if (this.token) {
  639. uni.navigateTo({
  640. url:'/my/vip/shop?city='+this.city
  641. })
  642. } else {
  643. this.bindlogin()
  644. }
  645. },
  646. //测试付钱
  647. ceshi(){
  648. console.log('付钱')
  649. wx.requestPayment( {
  650. "appId": 'wx45ab46867002aa0b', //公众号ID,由商户传入
  651. "timeStamp": '1730281084', //时间戳,自1970年以来的秒数
  652. "nonceStr": '14cdaf9f6ab64c0ab4d2df3a63f2b484', //随机串
  653. "package": 'prepay_id=wx30173804948968a92217fddbd7942d0000',
  654. "signType": 'RSA', //微信签名方式:
  655. "paySign": 'QFMu/l1/WIM9QTXaalpiHSwKr6MpeNt6ixpWb/qaT2u0Dw344kknTQRWSs86T+aqSSnBuVyL+mjEchC/GkNwG489omH03fWtVWM3jEtgpzS4oEQF7F+QehyxKR/Lw11OBvQont+xmuhI7DwSVn5OKB5yEfxG57LdcFBb2x6+FGlLFvSEB0p/XqJh8aW+80tvaz1lhX677AyxU5VwP1aBIB5MivqvBWypbyfKR30qA7oM8wOq6O4baYQtXrq0z0kokhNk0aZxHTYuqqNXftcyyBGyyM6hl0LHXvlxhrbS8N/GitwgSX3KJ3Jate+V5UVNv0+vY1NNxVOzDMhNirWNMg==' //微信签名
  656. },
  657. function(res) {
  658. console.log(res,'res')
  659. if (res.err_msg == "get_brand_wcpay_request:ok") {
  660. // 使用以上方式判断前端返回,微信团队郑重提示:
  661. //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
  662. }else{
  663. this.chapayIf()
  664. }
  665. });
  666. },
  667. goChat() {
  668. if (this.token) {
  669. uni.navigateTo({
  670. url: '/my/setting/chat'
  671. })
  672. } else {
  673. this.bindlogin()
  674. }
  675. },
  676. bindlogin() {
  677. uni.navigateTo({
  678. url: '/pages/public/login'
  679. })
  680. },
  681. // 打开隐私协议页面
  682. openPrivacyContract() {
  683. let that = this;
  684. wx.openPrivacyContract({
  685. fail: () => {
  686. that.$queue.showToast('遇到错误无法打开!');
  687. }
  688. })
  689. },
  690. // 拒绝隐私协议
  691. exitMiniProgram() {
  692. // 直接退出小程序
  693. wx.exitMiniProgram()
  694. },
  695. // 同意隐私协议
  696. handleAgreePrivacyAuthorization() {
  697. // this.$refs.popusAuthorization.close();
  698. this.Authorization = false;
  699. let that = this;
  700. uni.getLocation({
  701. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  702. highAccuracyExpireTime: 100,
  703. success: function(res) {
  704. console.log(res)
  705. that.lat = res.latitude;
  706. that.lng = res.longitude;
  707. that.defaultAddress()
  708. // that.getShopList()
  709. },
  710. fail(e) {
  711. uni.showModal({
  712. title: '温馨提示',
  713. content: '您的定位权限未开启,请开启后再来刷新操作吧!',
  714. showCancel: true,
  715. cancelText: '取消',
  716. confirmText: '确认',
  717. success: res => {
  718. if (res.confirm) {
  719. // #ifdef MP-WEIXIN
  720. uni.openSetting({ // 打开设置页
  721. success(rea) {
  722. console.log(rea.authSetting)
  723. }
  724. });
  725. // #endif
  726. // #ifdef APP-PLUS
  727. gotoAppPermissionSetting()
  728. // #endif
  729. }
  730. }
  731. });
  732. }
  733. });
  734. },
  735. selectShow() {
  736. this.lookShow = !this.lookShow
  737. },
  738. //筛选活动
  739. searchhd(index, activityId) {
  740. if (index == this.currenthd) {
  741. this.page=1
  742. this.currenthd = -1
  743. this.activityId = '';
  744. this.shopList =[]
  745. this.getShopList()
  746. } else {
  747. console.log('eww','ll')
  748. this.page=1
  749. this.currenthd = index;
  750. this.activityId = activityId;
  751. this.shopList =[]
  752. // this.getShopList()
  753. this.huoDListSh()
  754. }
  755. },
  756. //获取所有活动
  757. gethdlist() {
  758. // this.$Request.get("/app/activityManage/getActivityList").then(res => {
  759. let data={
  760. page:1,
  761. limit:10,
  762. }
  763. this.$Request.get('/app/activity/page').then(res => {
  764. if (res.code == 0) {
  765. var total=res.totalCount
  766. let data={
  767. page:1,
  768. limit:total,
  769. }
  770. this.$Request.get('/app/activity/page').then(res => {
  771. if (res.code == 0) {
  772. res.data.list.map((item, index) => {
  773. if (item.id == 14) {
  774. res.data.list.splice(index, 1)
  775. }
  776. })
  777. this.hdlist = res.data.list
  778. }
  779. });
  780. }
  781. });
  782. },
  783. // 获取精选商家
  784. getjxShop() {
  785. let data = {
  786. activityId: 14,
  787. page: 1,
  788. limit: 4,
  789. lat: this.lat,
  790. lng: this.lng,
  791. }
  792. this.$Request.get("/app/activityManage/getShoActivityShopList", data).then(res => {
  793. if (res.code == 0) {
  794. this.jxlist = res.data.records
  795. }
  796. });
  797. },
  798. gotoList() {
  799. uni.navigateTo({
  800. url: '/running/huodong/list?activityId=14'
  801. })
  802. },
  803. gotohuodong(name,id,imageUrl, url) {
  804. uni.navigateTo({
  805. url: url + '?activityTitle=' + name+'&activityId='+id+'&imageUrl='+imageUrl
  806. })
  807. },
  808. // 获取活动轮播图
  809. getHuoDList() {
  810. let data = {
  811. classify: 12
  812. }
  813. this.$Request.get("/app/banner/selectBannerList", data).then(res => {
  814. if (res.code == 0) {
  815. let arr = []
  816. arr = res.data
  817. arr.map((item, index) => {
  818. if (item.name == '推荐商家') {
  819. arr.splice(index, 1)
  820. }
  821. })
  822. this.huodongList = arr
  823. }
  824. });
  825. },
  826. swiperChange(e) {
  827. if (this.huodongList.length - 1 == e.detail.current) {
  828. this.currents = 0
  829. } else {
  830. this.currents = e.detail.current + 1
  831. }
  832. // this.moneys = this.swiper[this.currents].mysteryBoxTypePrice
  833. // this.boxType = this.swiper[this.currents].mysteryBoxTypeId
  834. // this.getgoodsList(this.swiper[this.currents].mysteryBoxTypeId)
  835. },
  836. //活动列表
  837. getHuoDongList() {
  838. // huodongList
  839. //
  840. // this.$Request.getT('/app/activityManage/getActivityList').then(res => {
  841. let data={
  842. page:1,
  843. limit:10,
  844. }
  845. this.$Request.getT('/app/activity/page',data).then(res => {
  846. if (res.code === 0) {
  847. var total=res.totalCount
  848. let data={
  849. page:1,
  850. limit:total,
  851. }
  852. this.$Request.getT('/app/activity/page',data).then(res => {
  853. if (res.code === 0) {
  854. this.huodongList = res.data.list
  855. }
  856. });
  857. }
  858. });
  859. },
  860. // 分享文案和图片
  861. getZiZhi() {
  862. this.$Request.getT('/app/common/type/239').then(res => {
  863. if (res.code === 0) {
  864. this.tuiguang = res.data.value;
  865. }
  866. });
  867. this.$Request.getT('/app/common/type/238').then(res => {
  868. if (res.code === 0) {
  869. this.tuiguangImg = res.data.value;
  870. }
  871. });
  872. },
  873. // 红包
  874. takemoney() {
  875. this.$Request.getT('/app/userinfo/getNewUserRedPacketWm').then(res => {
  876. console.log(res.code)
  877. if (res.code == 0) {
  878. this.HBShow = false
  879. this.getUserInfo()
  880. setTimeout(function() {
  881. uni.navigateTo({
  882. url: '/my/coupon/index'
  883. })
  884. }, 100)
  885. }
  886. });
  887. },
  888. getSelect(e) {
  889. this.options4.forEach(res => {
  890. if (res.id == e.id) {
  891. res.select = true
  892. this.page = 1
  893. this.shopTypeId = e.id
  894. this.getShopList();
  895. this.isShow = false
  896. } else {
  897. res.select = false
  898. }
  899. })
  900. },
  901. // 获取用户信息
  902. getUserInfo() {
  903. this.$Request.getT('/app/user/selectUserMessage').then(res => {
  904. console.log(res)
  905. if (res.code == 0) {
  906. this.shopStatus = res.data.shopStatus
  907. this.newUserFlagWm = res.data.newUserFlagWm
  908. if (this.newUserFlagWm == 1) {
  909. this.waimaiHB = this.$queue.getData('waimaiHB');
  910. if (this.waimaiHB === '是') {
  911. this.HBShow = true
  912. }
  913. } else {
  914. this.HBShow = false
  915. }
  916. }
  917. });
  918. },
  919. // 获取公告
  920. getNoticeList() {
  921. let data = {
  922. page: 1,
  923. limit: 100
  924. }
  925. this.$Request.get("/app/common/type/432", data).then(res => {
  926. if (res.code == 0) {
  927. this.noticeList = res.data
  928. // console.log(this.noticeList,999);
  929. }
  930. });
  931. },
  932. confirm(e) {
  933. this.isShow = false
  934. this.page = 1
  935. this.current = e;
  936. this.getShopList();
  937. },
  938. // 获取轮播图
  939. getBannerList() {
  940. let data = {
  941. classify: 1
  942. }
  943. this.$Request.get("/app/banner/selectBannerList", data).then(res => {
  944. if (res.code == 0) {
  945. this.bannerList = res.data
  946. }
  947. });
  948. },
  949. // 获取轮播图
  950. getGridList() {
  951. let data = {
  952. classify: 4
  953. }
  954. this.$Request.get("/app/banner/selectBannerList", data).then(res => {
  955. if (res.code == 0) {
  956. this.gridData = res.data
  957. }
  958. });
  959. },
  960. // 商户类型
  961. getShopType() {
  962. this.$Request.getT('/app/shoptype/selectShopTypeList').then(res => {
  963. if (res.code == 0) {
  964. // this.shopTypeList = [...this.shopTypeList ,...res.data]
  965. res.data.forEach(res => {
  966. res.select = false
  967. })
  968. this.options4 = [...this.options4, ...res.data]
  969. console.log(this.options4, '+++++++++++++++++++')
  970. }
  971. })
  972. },
  973. //活动下的商户
  974. huoDListSh(){
  975. let data = {
  976. page: this.page,
  977. limit: this.limit,
  978. screen: this.current,
  979. shopTypeId: this.shopTypeId,
  980. lng: this.lng,
  981. lat: this.lat,
  982. // activityId: this.activityId,
  983. city:this.city,
  984. }
  985. this.$Request.getT('/app/goods/selectShop', data).then(res => {
  986. if (res.code == 0) {
  987. var totalCount=res.data.totalCount
  988. let data = {
  989. page: this.page,
  990. limit: totalCount,
  991. }
  992. console.log(data,this.activityId)
  993. this.$Request.getT(`/app/activity-shop/activity-shop-page/${this.activityId}`, data).then(res => {
  994. console.log(res,'hhhhhh2h')
  995. if (res.code == 0) {
  996. var huodongList=[]
  997. huodongList=res.data.list
  998. let data = {
  999. page: this.page,
  1000. limit: totalCount,
  1001. screen: this.current,
  1002. shopTypeId: this.shopTypeId,
  1003. lng: this.lng,
  1004. lat: this.lat,
  1005. // activityId: this.activityId,
  1006. city:this.city,
  1007. }
  1008. this.$Request.getT('/app/goods/selectShop', data).then(res => {
  1009. if (res.code == 0) {
  1010. this.totalCount = res.data.totalCount
  1011. res.data.list.forEach(ret => {
  1012. if (ret.distance > 1000) {
  1013. ret.distance = Number((ret.distance / 1000)).toFixed(2) + "km"
  1014. } else {
  1015. if (ret.distance == 0) {
  1016. ret.distance = "0m";
  1017. } else {
  1018. ret.distance = Number(ret.distance).toFixed(1) + "m";
  1019. }
  1020. }
  1021. ret.shopScore = ret.shopScore.toFixed(1)
  1022. ret.shopLable = ret.shopLable ? ret.shopLable.split(',') : ''
  1023. ret.shopCover = ret.shopCover ? ret.shopCover.split(',') :
  1024. 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'
  1025. ret.errandTime = Math.round(ret.errandTime)
  1026. })
  1027. var shopList=[]
  1028. shopList=res.data.list
  1029. for (let i = 0; i < shopList.length; i++) {
  1030. let item1 = shopList[i];
  1031. // 内层循环遍历array2
  1032. for (let j = 0; j < huodongList.length; j++) {
  1033. let item2 = huodongList[j];
  1034. // 检查id是否相等
  1035. if (item1.shopId === item2.shopId) {
  1036. // 如果相等,将对象添加到matchedArray
  1037. this.shopList.push(item1);
  1038. // 如果只需要添加一次,则可以在这里退出内层循环
  1039. // break;
  1040. }
  1041. }
  1042. }
  1043. // for(var i=0;i<shopList.length;i++){
  1044. // let item1 = shopList[i];
  1045. // for(var j=0;j<huodongList.length;j++){
  1046. // let item2 = huodongList[j];
  1047. // console.log(shopList[i].shopId==huodongList[j].shopId,'oppoo')
  1048. // if(item1.shopId==item2.shopId){
  1049. // this.shopList.push(item1)
  1050. // console.log(this.shopList,'pp')
  1051. // // return一次就退出
  1052. // }else{
  1053. // this.shopList =[]
  1054. // }
  1055. // }
  1056. // }
  1057. }
  1058. })
  1059. }
  1060. })
  1061. }
  1062. uni.stopPullDownRefresh();
  1063. uni.hideLoading()
  1064. })
  1065. },
  1066. // 商户列表
  1067. getShopList() {
  1068. console.log(this.city,'city')
  1069. uni.setStorageSync('lng', this.lng);
  1070. uni.setStorageSync('lat', this.lat);
  1071. let data = {
  1072. page: this.page,
  1073. limit: this.limit,
  1074. screen: this.current,
  1075. shopTypeId: this.shopTypeId,
  1076. lng: this.lng,
  1077. lat: this.lat,
  1078. // activityId: this.activityId,
  1079. city:this.city,
  1080. }
  1081. console.log(data,'jjj')
  1082. this.$Request.getT('/app/goods/selectShop', data).then(res => {
  1083. console.log(res,'hhhhhh6')
  1084. if (res.code == 0) {
  1085. this.totalCount = res.data.totalCount
  1086. res.data.list.forEach(ret => {
  1087. if (ret.distance > 1000) {
  1088. ret.distance = Number((ret.distance / 1000)).toFixed(2) + "km"
  1089. } else {
  1090. if (ret.distance == 0) {
  1091. ret.distance = "0m";
  1092. } else {
  1093. ret.distance = Number(ret.distance).toFixed(1) + "m";
  1094. }
  1095. }
  1096. ret.shopScore = ret.shopScore.toFixed(2)
  1097. ret.shopLable = ret.shopLable ? ret.shopLable.split(',') : ''
  1098. ret.shopCover = ret.shopCover ? ret.shopCover.split(',') :
  1099. 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'
  1100. ret.errandTime = Math.round(ret.errandTime)
  1101. })
  1102. if (this.page == 1) {
  1103. this.shopList = res.data.list
  1104. } else {
  1105. this.shopList = [...this.shopList, ...res.data.list]
  1106. }
  1107. console.log(this.shopList)
  1108. }
  1109. uni.stopPullDownRefresh();
  1110. uni.hideLoading()
  1111. })
  1112. },
  1113. goNav(url,type) {
  1114. console.log(url,'lkk')
  1115. if(url=='/my/integral/index' || url=='/my/task/index'){
  1116. uni.navigateTo({
  1117. url: '/pages/public/login'
  1118. })
  1119. return
  1120. }
  1121. // if (this.userId) {
  1122. if (uni.getStorageSync('sendMsg')) {
  1123. console.log('授权+1')
  1124. wx.requestSubscribeMessage({
  1125. tmplIds: this.arr,
  1126. success(re) {
  1127. console.log(JSON.stringify(re), 111111111111)
  1128. var datas = JSON.stringify(re);
  1129. if (datas.indexOf("accept") != -1) {
  1130. // console.log(re)
  1131. }
  1132. },
  1133. fail: (res) => {
  1134. // console.log(res)
  1135. }
  1136. })
  1137. }
  1138. if(type ==2&&url){
  1139. console.log('po','ssss')
  1140. uni.navigateTo({
  1141. url
  1142. })
  1143. }else if(type !=1&&url){
  1144. uni.navigateTo({
  1145. url:`/my/web/web?url=${url}`
  1146. })
  1147. }else{
  1148. uni.navigateTo({
  1149. url
  1150. })
  1151. }
  1152. // } else {
  1153. // uni.navigateTo({
  1154. // url: '/pages/public/login'
  1155. // })
  1156. // }
  1157. },
  1158. goShopDet(url, e,shuzu) {
  1159. if (uni.getStorageSync('sendMsg')) {
  1160. console.log('授权+1')
  1161. wx.requestSubscribeMessage({
  1162. tmplIds: this.arr,
  1163. success(re) {
  1164. console.log(JSON.stringify(re), 111111111111)
  1165. var datas = JSON.stringify(re);
  1166. if (datas.indexOf("accept") != -1) {
  1167. // console.log(re)
  1168. }
  1169. },
  1170. fail: (res) => {
  1171. // console.log(res)
  1172. }
  1173. })
  1174. }
  1175. this.shop = e
  1176. // console.log(e, '当前店铺')
  1177. let myDate = new Date();
  1178. let hours = myDate.getHours();
  1179. let minute = myDate.getMinutes();
  1180. let openTime = this.shop.businessHours.split(':')[0] //开始小时
  1181. let openTime1 = this.shop.businessHours.split(':')[1] //开始分钟
  1182. let closeTime = this.shop.lockHours.split(':')[0] //结束小时
  1183. let closeTime1 = this.shop.lockHours.split(':')[1] //结束分钟.
  1184. // console.log(hours)
  1185. // console.log(minute)
  1186. // console.log(openTime)
  1187. // console.log(openTime1)
  1188. // console.log(closeTime)
  1189. // console.log(closeTime1)
  1190. // console.log(minute >= closeTime1)
  1191. if (hours < openTime) {
  1192. this.hintShow = true
  1193. return
  1194. } else if (hours == openTime && minute < openTime1) {
  1195. this.hintShow = true
  1196. return
  1197. } else if (hours > closeTime) {
  1198. this.hintShow = true
  1199. return
  1200. } else if (hours == closeTime && minute >= closeTime1) {
  1201. this.hintShow = true
  1202. return
  1203. }
  1204. // console.log(url)
  1205. let items = encodeURIComponent(JSON.stringify(shuzu));
  1206. uni.navigateTo({
  1207. url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId+'&lat='+this.lat+'&lng='+this.lng
  1208. })
  1209. },
  1210. defaultAddress() {
  1211. if (uni.getStorageSync('city')) {
  1212. this.address = uni.getStorageSync('city')
  1213. this.lng = uni.getStorageSync('lng')
  1214. this.lat = uni.getStorageSync('lat')
  1215. this.page = 1
  1216. this.getShopList()
  1217. return
  1218. }
  1219. let data = {
  1220. page: 1,
  1221. limit: 1000
  1222. }
  1223. this.$Request.get('/app/address/selectAddressList', data).then(res => {
  1224. if (res.code == 0 && res.data.list.length) {
  1225. this.address = res.data.list[0].addressDetail
  1226. this.city=res.data.list[0].city
  1227. this.lng = res.data.list[0].lng
  1228. this.lat = res.data.list[0].lat
  1229. res.data.list.forEach(res => {
  1230. if (res.addressDefault) {
  1231. this.address = res.addressDetail
  1232. this.city=res.city
  1233. this.lng = res.lng
  1234. this.lat = res.lat
  1235. }
  1236. })
  1237. console.log('选择的经纬度', this.lng, this.lat)
  1238. } else {
  1239. let data = {
  1240. lat: this.lat,
  1241. lng: this.lng
  1242. }
  1243. this.$Request.get("/app/address/selectCity", data).then(res => {
  1244. if (res.code == 0) {
  1245. this.address = res.data.city
  1246. // console.log(3333333333)
  1247. // this.getShopList()
  1248. }
  1249. });
  1250. }
  1251. this.page = 1
  1252. this.getShopList()
  1253. })
  1254. },
  1255. goAddress() {
  1256. let userId = this.$queue.getData('userId');
  1257. // if (!userId) {
  1258. // uni.navigateTo({
  1259. // url: '/pages/public/login'
  1260. // })
  1261. // return
  1262. // }
  1263. uni.navigateTo({
  1264. url: '/pages/index/selectCampus'
  1265. })
  1266. },
  1267. // 查看金刚区详情
  1268. goDetail(item) {
  1269. console.log(item,'kkkk');
  1270. if (uni.getStorageSync('sendMsg')) {
  1271. console.log('授权+1',this.arr)
  1272. wx.requestSubscribeMessage({
  1273. tmplIds: this.arr,
  1274. success(re) {
  1275. console.log(JSON.stringify(re), 111111111111)
  1276. var datas = JSON.stringify(re);
  1277. if (datas.indexOf("accept") != -1) {
  1278. // console.log(re)
  1279. }
  1280. },
  1281. fail: (res) => {
  1282. // console.log(res)
  1283. }
  1284. })
  1285. }
  1286. let userId = this.$queue.getData('userId');
  1287. // if (!userId) {
  1288. // uni.navigateTo({
  1289. // url: '/pages/public/login'
  1290. // })
  1291. // return
  1292. // }
  1293. //如果是小程序跳转就是设置这个
  1294. if (item.describes) {
  1295. uni.navigateToMiniProgram({
  1296. appId: item.describes,
  1297. path: item.classifyUrl,
  1298. success: res => {
  1299. // 打开成功
  1300. console.log("打开成功", res);
  1301. },
  1302. fail: err => {
  1303. console.log(err);
  1304. }
  1305. })
  1306. return
  1307. }
  1308. if(item.url.indexOf('https:')){
  1309. uni.navigateTo({
  1310. url: item.url
  1311. });
  1312. }else{
  1313. uni.navigateTo({
  1314. url:`/my/web/web?url=${item.url}`
  1315. })
  1316. }
  1317. },
  1318. // 开启订阅消息
  1319. openMsg() {
  1320. console.log('订阅消息')
  1321. var that = this
  1322. uni.getSetting({
  1323. withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
  1324. success(ret) {
  1325. console.log(ret.subscriptionsSetting, '------------------')
  1326. // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
  1327. if (ret.subscriptionsSetting.itemSettings) {
  1328. uni.setStorageSync('sendMsg', true)
  1329. uni.openSetting({ // 打开设置页
  1330. success(rea) {
  1331. console.log(rea.authSetting)
  1332. }
  1333. });
  1334. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  1335. console.log(99999)
  1336. uni.setStorageSync('sendMsg', false)
  1337. uni.showModal({
  1338. title: '提示',
  1339. content: '为了更好的体验,请绑定消息推送',
  1340. confirmText: '确定',
  1341. cancelText: '取消',
  1342. success: function(res) {
  1343. if (res.confirm) {
  1344. console.log(that.arr)
  1345. wx.requestSubscribeMessage({
  1346. tmplIds: that.arr,
  1347. success(re) {
  1348. console.log(JSON.stringify(re),
  1349. '++++++++++++++')
  1350. var datas = JSON.stringify(re);
  1351. if (datas.indexOf("accept") != -1) {
  1352. console.log(re)
  1353. uni.setStorageSync('sendMsg', true)
  1354. }
  1355. },
  1356. fail: (res) => {
  1357. console.log(res)
  1358. }
  1359. })
  1360. uni.setStorageSync('sendMsg', true)
  1361. console.log('确认')
  1362. that.showModal = false
  1363. } else if (res.cancel) {
  1364. console.log('取消')
  1365. uni.setStorageSync('sendMsg', false)
  1366. that.showModal = true
  1367. }
  1368. }
  1369. })
  1370. }
  1371. }
  1372. })
  1373. },
  1374. // 跳转商品详情
  1375. goDet(goodsId, shopId) {
  1376. let userId = this.$queue.getData('userId');
  1377. // if (!userId) {
  1378. // uni.navigateTo({
  1379. // url: '/pages/public/login'
  1380. // })
  1381. // return
  1382. // }
  1383. uni.navigateTo({
  1384. url: '/pages/index/shop/goodsDet?goodsId=' + goodsId + '&shopId=' + shopId + '&orderType=2'
  1385. })
  1386. },
  1387. // 跳转厨房监控页面
  1388. goCook(item){
  1389. // console.log(item.shopName);
  1390. uni.navigateTo({
  1391. url:`/running/cook/cook?shopName=${item.shopName}`
  1392. })
  1393. }
  1394. },
  1395. onReachBottom: function() {
  1396. console.log('当前长度',this.shopList.length,this.totalCount)
  1397. if (this.shopList.length < this.totalCount) {
  1398. if(this.activityId==''){
  1399. wx.showLoading({
  1400. title: '加载中...',
  1401. mask: true, // 是否显示透明蒙层,防止触摸穿透
  1402. })
  1403. this.page = this.page + 1;
  1404. this.getShopList()
  1405. }
  1406. } else {
  1407. uni.showToast({
  1408. title: '已经到底了',
  1409. icon: 'none'
  1410. })
  1411. }
  1412. },
  1413. onPullDownRefresh: function() {
  1414. if(this.activityId==''){
  1415. this.page = 1;
  1416. this.getShopList()
  1417. }
  1418. },
  1419. }
  1420. </script>
  1421. <style lang="scss" scoped>
  1422. .privacy {
  1423. position: fixed;
  1424. top: 0;
  1425. right: 0;
  1426. bottom: 0;
  1427. left: 0;
  1428. background: rgba(0, 0, 0, .5);
  1429. z-index: 9999999;
  1430. display: flex;
  1431. align-items: center;
  1432. justify-content: center;
  1433. }
  1434. .contentview {
  1435. width: 632rpx;
  1436. padding: 48rpx;
  1437. box-sizing: border-box;
  1438. background: #fff;
  1439. border-radius: 16rpx;
  1440. }
  1441. .contentview .title {
  1442. text-align: center;
  1443. color: #333;
  1444. font-weight: bold;
  1445. font-size: 32rpx;
  1446. }
  1447. .contentview .des {
  1448. font-size: 26rpx;
  1449. color: #666;
  1450. margin-top: 40rpx;
  1451. text-align: justify;
  1452. line-height: 1.6;
  1453. }
  1454. .contentview .des .link {
  1455. color: #07c160;
  1456. text-decoration: underline;
  1457. }
  1458. button::after {
  1459. border: none;
  1460. }
  1461. .btns {
  1462. margin-top: 48rpx;
  1463. display: flex;
  1464. }
  1465. .btns .item {
  1466. justify-content: space-between;
  1467. width: 244rpx;
  1468. height: 80rpx;
  1469. display: flex;
  1470. align-items: center;
  1471. justify-content: center;
  1472. border-radius: 16rpx;
  1473. box-sizing: border-box;
  1474. border: none;
  1475. }
  1476. .btns .reject {
  1477. background: #f4f4f5;
  1478. color: #909399;
  1479. }
  1480. .btns .agree {
  1481. background: #07c160;
  1482. color: #fff;
  1483. }
  1484. .hd {
  1485. width: 100%;
  1486. height: auto;
  1487. // margin-top: 20rpx;
  1488. background-color: #ffffff;
  1489. .hd-box {
  1490. width: 686rpx;
  1491. height: 100%;
  1492. // padding-top: 20rpx;
  1493. padding-bottom: 20rpx;
  1494. .scroll-view_H {
  1495. width: 100%;
  1496. white-space: nowrap;
  1497. }
  1498. .hd-box-item {
  1499. display: inline-block;
  1500. padding: 6rpx 20rpx 6rpx 20rpx;
  1501. background-color: #F7F5F6;
  1502. font-size: 24rpx;
  1503. border-radius: 16rpx;
  1504. margin-right: 10rpx;
  1505. }
  1506. }
  1507. }
  1508. .select {
  1509. padding: 6rpx 15rpx;
  1510. color: #000;
  1511. border-bottom: 6rpx solid #568D84;
  1512. }
  1513. .jxShop {
  1514. width: 100%;
  1515. height: 320rpx;
  1516. background-color: #ffffff;
  1517. .jxShop-box {
  1518. margin-top: 20rpx;
  1519. width: 686rpx;
  1520. height: 300rpx;
  1521. // background-color: #F7F5F6;
  1522. // background: linear-gradient(rgba(252,210,2,0.4) 1%,#fffdf2 100%);
  1523. // background: linear-gradient(#ffee99 1%,#fffbe5 100%);
  1524. background: #fff8d3;
  1525. border-radius: 16rpx;
  1526. .jxShop-box-c {
  1527. width: 626rpx;
  1528. height: 100%;
  1529. }
  1530. .jxShop-box-c-title {
  1531. width: 100%;
  1532. margin-top: 20rpx;
  1533. }
  1534. .jxShop-box-c-title-l {
  1535. color: #1A1A1A;
  1536. font-size: 34rpx;
  1537. font-weight: 800;
  1538. }
  1539. .jxShop-box-c-title-r {
  1540. color: #1E1F31;
  1541. font-size: 26rpx;
  1542. font-weight: 500;
  1543. }
  1544. .jxShop-box-c-list {
  1545. width: 100%;
  1546. height: 190rpx;
  1547. margin-top: 20rpx;
  1548. }
  1549. .jxShop-box-c-list-item {
  1550. width: 149rpx;
  1551. height: 100%;
  1552. background: #ffffff;
  1553. border-radius: 8px;
  1554. image {
  1555. width: 100%;
  1556. height: 114rpx;
  1557. border-radius: 8rpx 8rpx 0 0;
  1558. }
  1559. .jxShop-box-c-list-item-name {
  1560. width: 149rpx;
  1561. text-align: center;
  1562. font-size: 28rpx;
  1563. color: #1A1A1A;
  1564. font-weight: bold;
  1565. margin-top: 10rpx;
  1566. overflow: hidden;
  1567. white-space: nowrap;
  1568. text-overflow: ellipsis;
  1569. padding-left: 10rpx;
  1570. padding-right: 10rpx;
  1571. }
  1572. }
  1573. }
  1574. }
  1575. .huodong {
  1576. width: 100%;
  1577. height: 380rpx;
  1578. // margin-top: 20rpx;
  1579. background-color: #ffffff;
  1580. .huodong-box {
  1581. margin-top: 20rpx;
  1582. width: 686rpx;
  1583. height: 360rpx;
  1584. // background-color: #D4FCE2;
  1585. background-color: #fff8d3;
  1586. border-radius: 24rpx;
  1587. .huodong-box-c {
  1588. width: 646rpx;
  1589. height: 100%;
  1590. }
  1591. .huodong-box-c-title {
  1592. margin-top: 20rpx;
  1593. }
  1594. .huodong-box-c-title-l {
  1595. // color: #34CD40;
  1596. color: rgba(252, 210, 2, 1);
  1597. font-size: 44rpx;
  1598. font-weight: 600;
  1599. image {
  1600. width: 276rpx;
  1601. height: 65rpx;
  1602. }
  1603. // font-style: italic;
  1604. }
  1605. .huodong-box-c-title-r {
  1606. // background: linear-gradient(114deg, rgba(252, 210, 2, 0.2) 0%, rgba(252, 210, 2, 0.5) 50%, rgba(252, 210, 2, 1) 100%);
  1607. background-color: #FFE3C7;
  1608. border-radius: 40rpx;
  1609. color: #FF8D1A;
  1610. font-size: 26rpx;
  1611. font-weight: 600;
  1612. padding: 10rpx 20rpx;
  1613. }
  1614. .huodong-box-c-list {
  1615. width: 100%;
  1616. height: 320rpx;
  1617. margin-top: 10rpx;
  1618. }
  1619. .huodong-box-c-list-l {
  1620. width: 190rpx;
  1621. height: 250rpx;
  1622. background: linear-gradient(0deg, #34CD41 0%, #48DB19 100%);
  1623. border-radius: 24rpx;
  1624. }
  1625. .huodong-box-c-list-l-t {
  1626. width: 180rpx;
  1627. height: 240rpx;
  1628. border-radius: 24rpx;
  1629. background-color: #ffffff;
  1630. margin-top: 5rpx;
  1631. }
  1632. .huodong-box-c-list-l-t>image {
  1633. width: 160rpx;
  1634. height: 170rpx;
  1635. margin-top: 10rpx;
  1636. border-radius: 24rpx;
  1637. }
  1638. .huodong-box-c-list-l-t-b {
  1639. width: 100%;
  1640. height: 56rpx;
  1641. background-color: #E0F7F1;
  1642. color: #36CF3D;
  1643. font-size: 30rpx;
  1644. border-radius: 24rpx;
  1645. }
  1646. .huodong-box-c-list-l-t-t {
  1647. width: 100%;
  1648. text-align: center;
  1649. font-size: 36rpx;
  1650. // font-weight: bold;
  1651. font-weight: 600;
  1652. color: #ffffff;
  1653. }
  1654. .huodong-box-c-list-c {
  1655. width: 220rpx;
  1656. height: 280rpx;
  1657. background: linear-gradient(0deg, #34CD41 0%, #48DB19 100%);
  1658. border-radius: 24rpx;
  1659. }
  1660. .huodong-box-c-list-c-t {
  1661. width: 211rpx;
  1662. height: 270rpx;
  1663. border-radius: 24rpx;
  1664. background-color: #ffffff;
  1665. margin-top: 5rpx;
  1666. }
  1667. .huodong-box-c-list-c-t>image {
  1668. width: 186rpx;
  1669. height: 190rpx;
  1670. margin-top: 10rpx;
  1671. border-radius: 24rpx;
  1672. }
  1673. .huodong-box-c-list-c-b {
  1674. width: 100%;
  1675. height: 70rpx;
  1676. background-color: #E0F7F1;
  1677. color: #36CF3D;
  1678. font-size: 30rpx;
  1679. border-radius: 24rpx;
  1680. }
  1681. .huodong-box-c-list-c-t-t {
  1682. width: 100%;
  1683. text-align: center;
  1684. font-size: 36rpx;
  1685. // font-weight: bold;
  1686. font-weight: 600;
  1687. color: #ffffff;
  1688. }
  1689. }
  1690. }
  1691. .search-btn {
  1692. width: 132rpx;
  1693. height: 80rpx;
  1694. font-size: 28rpx;
  1695. text-align: center;
  1696. line-height: 80rpx;
  1697. background: linear-gradient(90.25deg, #77A69A 0%, #558C83 100%);
  1698. border-radius: 36px;
  1699. color:#fff;
  1700. }
  1701. .address {
  1702. width: 100%;
  1703. background: linear-gradient(135deg, rgba(129, 189, 179, 1) 0%, rgba(236, 246, 206, 1) 100%);
  1704. display: flex;
  1705. align-items: center;
  1706. // #ifndef H5
  1707. position: fixed;
  1708. top: 0;
  1709. height: 180rpx;
  1710. // line-height: 260rpx;
  1711. padding: 80rpx 34rpx 0rpx;
  1712. // #endif
  1713. // #ifdef H5
  1714. height: 80rpx;
  1715. line-height: 80rpx;
  1716. padding: 0 34rpx;
  1717. // #endif
  1718. font-size: 32rpx;
  1719. z-index: 999;
  1720. .address_name {
  1721. max-width: 90%;
  1722. overflow: hidden;
  1723. text-overflow: ellipsis;
  1724. white-space: nowrap;
  1725. }
  1726. }
  1727. .grid-text {
  1728. font-size: 22rpx;
  1729. color: #333333;
  1730. text-align: center;
  1731. white-space: nowrap;
  1732. overflow: hidden;
  1733. text-overflow: ellipsis;
  1734. width: 100%;
  1735. padding: 0 4rpx;
  1736. box-sizing: border-box;
  1737. line-height: 1.4;
  1738. }
  1739. .lable {
  1740. border: 1rpx solid #FFE6D9;
  1741. height: 40rpx;
  1742. padding: 0 14rpx;
  1743. background: #FFE6D9;
  1744. border-radius: 4rpx;
  1745. font-weight: 500;
  1746. color: #FD6416;
  1747. font-size: 20rpx;
  1748. margin-right: 10rpx;
  1749. margin-bottom: 10rpx;
  1750. }
  1751. .tabs {
  1752. margin-bottom: 20rpx;
  1753. display: flex;
  1754. justify-content: space-between;
  1755. align-items: center;
  1756. }
  1757. .tabs_name {
  1758. flex: 1;
  1759. /* display: inline-block; */
  1760. text-align: center;
  1761. margin-bottom: 30rpx 0;
  1762. position: relative;
  1763. display: flex;
  1764. /* justify-content: space-between; */
  1765. align-items: center;
  1766. }
  1767. .tabs_name view {
  1768. margin: 0 auto;
  1769. display: flex;
  1770. align-items: center;
  1771. }
  1772. .tabs_2 {
  1773. /* width: 30%; */
  1774. }
  1775. .actives {
  1776. color: #007AFF;
  1777. }
  1778. .tabsicon {
  1779. position: absolute;
  1780. top: 0;
  1781. right: 22rpx;
  1782. width: 20rpx;
  1783. height: 40rpx;
  1784. z-index: 1;
  1785. }
  1786. .tabs_icon {
  1787. width: 12rpx;
  1788. height: 8rpx;
  1789. z-index: 1;
  1790. margin-left: 10rpx;
  1791. }
  1792. .icon1 {
  1793. /* position: absolute; */
  1794. /* top: 6rpx; */
  1795. }
  1796. .icon2 {
  1797. position: absolute;
  1798. bottom: 6rpx;
  1799. }
  1800. .page-box {
  1801. // position: relative;
  1802. // z-index: 0;
  1803. // top: 70px;
  1804. }
  1805. .centre {
  1806. margin: auto;
  1807. height: 400rpx;
  1808. text-align: center;
  1809. font-size: 32rpx;
  1810. }
  1811. .centre image {
  1812. width: 387rpx;
  1813. height: 341rpx;
  1814. margin: 40rpx auto 20rpx;
  1815. }
  1816. .centre .tips {
  1817. font-size: 32rpx;
  1818. color: #2F3044;
  1819. margin: 20rpx 0 40rpx;
  1820. font-weight: 700;
  1821. }
  1822. .hintPopul {
  1823. width: 100%;
  1824. height: 100%;
  1825. position: fixed;
  1826. top: 0;
  1827. background: rgba(0, 0, 0, .4);
  1828. z-index: 999;
  1829. }
  1830. .content_ {
  1831. position: absolute;
  1832. left: 0;
  1833. right: 0;
  1834. top: 0;
  1835. bottom: 0;
  1836. margin: auto;
  1837. text-align: center;
  1838. width: 500rpx;
  1839. height: 400rpx;
  1840. border-radius: 20rpx;
  1841. background-color: #fff;
  1842. padding-top: 120rpx;
  1843. }
  1844. .content_ image {
  1845. position: absolute;
  1846. top: -50rpx;
  1847. left: 0;
  1848. right: 0;
  1849. margin: auto;
  1850. }
  1851. .hintText {
  1852. font-size: 30rpx;
  1853. }
  1854. .skuBtn {
  1855. width: 460rpx;
  1856. height: 60rpx;
  1857. line-height: 60rpx;
  1858. text-align: center;
  1859. background: #FCD202;
  1860. font-size: 28rpx;
  1861. border: 2rpx solid #FCD202;
  1862. color: #333333;
  1863. border-radius: 50rpx;
  1864. font-weight: 700;
  1865. margin: auto;
  1866. }
  1867. .hongbao {
  1868. width: 100%;
  1869. /* height: 100px; */
  1870. /* background: #007AFF; */
  1871. position: fixed;
  1872. top: 34%;
  1873. /* bottom: 50%; */
  1874. left: 0rpx;
  1875. right: 0rpx;
  1876. /* display: none; */
  1877. }
  1878. .hb_img {
  1879. width: 100%;
  1880. height: 535rpx;
  1881. }
  1882. .hb_btn {
  1883. width: 70%;
  1884. height: 72rpx;
  1885. position: absolute;
  1886. top: 315rpx;
  1887. left: 80rpx;
  1888. }
  1889. .serviceBtn{
  1890. position: fixed;
  1891. right: 52rpx;
  1892. bottom: 50rpx;
  1893. display: flex;
  1894. flex-direction: column;
  1895. align-items: center;
  1896. justify-content: center;
  1897. width: 100rpx;
  1898. height: 120rpx;
  1899. color: #fff;
  1900. font-size: 20rpx;
  1901. background-image: url(https://mxys.chuanghai-tech.com/wmfile/20260413/b645b4f41ba34128ae6b88d2fe30c813.png);
  1902. background-repeat: no-repeat;
  1903. background-size: contain;
  1904. }
  1905. .cook{
  1906. color: #2B7924;
  1907. border: none;
  1908. background-color: #F0FCE6;
  1909. }
  1910. </style>