mang.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. <template>
  2. <view class="page">
  3. <navbar-line :bgColor="bgColor" :hasPlacer="false">
  4. <view class="header-loc align-center" @tap="chooseLoc">
  5. <image src="/static/mang-loc.png" class="image_19" mode="aspectFill" />
  6. <text class="text_43">沂蒙云谷·创意孵化中心</text>
  7. </view>
  8. </navbar-line>
  9. <view class="p-header"><image src="/static/mang-bg.png" mode="aspectFill" class="img"></image></view>
  10. <view class="align-center p-ads">
  11. <image src="/static/mang-sear.png" class="image_20" mode="aspectFill" />
  12. <view class="group_20"><zetank-notice colors="#55aaff" :noticeList="ads" :interval="3000"></zetank-notice></view>
  13. </view>
  14. <view class="p-entry">
  15. <view class="flex-col items-center grid-item">
  16. <image
  17. src="/static/mang-dianxin.png"
  18. class="image"
  19. />
  20. <text class="text">点心</text>
  21. </view>
  22. <view class="flex-col items-center grid-item">
  23. <image
  24. src="/static/mang-dangao.png"
  25. class="image"
  26. />
  27. <text class="text">蛋糕</text>
  28. </view>
  29. <view class="flex-col items-center grid-item">
  30. <image
  31. src="/static/mang-buding.png"
  32. class="image"
  33. />
  34. <text class="text">布丁</text>
  35. </view>
  36. <view class="flex-col items-center grid-item">
  37. <image
  38. src="/static/mang-pdangao.png"
  39. class="image"
  40. />
  41. <text class="text">纸杯蛋糕</text>
  42. </view>
  43. <view class="flex-col items-center grid-item">
  44. <image
  45. src="/static/mang-pisa.png"
  46. class="image"
  47. />
  48. <text class="text">披萨</text>
  49. </view>
  50. <view class="flex-col items-center grid-item">
  51. <image
  52. src="/static/mang-tusi.png"
  53. class="image"
  54. />
  55. <text class="text">吐司</text>
  56. </view>
  57. <view class="flex-col items-center grid-item">
  58. <image
  59. src="/static/mang-all.png"
  60. class="image"
  61. />
  62. <text class="text">全部</text>
  63. </view>
  64. </view>
  65. <view class="p-tabs align-center justify-between">
  66. <view class="flex-col text-wrapper">
  67. <image
  68. src="/static/mang-tabbg.png"
  69. class="image_8"
  70. />
  71. <text class="text_9">智能排序</text>
  72. </view>
  73. <view class="flex-col text-wrapper active">
  74. <image
  75. src="/static/mang-tabbg.png"
  76. class="image_8"
  77. />
  78. <text class="text_9">距离最近</text>
  79. </view>
  80. <view class="flex-col text-wrapper">
  81. <image
  82. src="/static/mang-tabbg.png"
  83. class="image_8"
  84. />
  85. <text class="text_9">评分最高</text>
  86. </view>
  87. </view>
  88. <view class="p-list">
  89. <view class="flex-row section_2 view_6" v-for="(item,idx) in 3" :key="idx" @tap="navTo('/pages/mang/detail')">
  90. <image
  91. src="/static/temp/pro.png"
  92. class="group_11"
  93. mode="aspectFill"
  94. />
  95. <view class="flex-col text_21 view_7">
  96. <text class="text_25 clamp">稻香村糕点随机盲盒</text>
  97. <view class="stars align-center">
  98. <image
  99. src="/static/mang_star.png"
  100. class="image_14"
  101. v-for="(item,idx) in 3"
  102. :key="idx"
  103. />
  104. </view>
  105. <text class="text_26">随机搭配</text>
  106. <view class="flex-row group_16">
  107. <view class="group_17">
  108. <text class="text_27">¥</text>
  109. <text class="text_28">38.8</text>
  110. </view>
  111. <text class="text_29">¥44~68</text>
  112. </view>
  113. </view>
  114. <text class="text_30">898m</text>
  115. <view class="flex-col text-wrapper_2"><text class="text_23 text_31 clamp">仅剩3份</text></view>
  116. </view>
  117. </view>
  118. </view>
  119. </template>
  120. <script>
  121. import navbarLine from '@/components/navbar-line.vue';
  122. import zetankNotice from './components/zetank-notice.vue';
  123. export default {
  124. components: {
  125. navbarLine,
  126. zetankNotice
  127. },
  128. data() {
  129. return {
  130. ads: [{ title: '1已帮助减少2486g数量的食品浪费' }, { title: '2已帮助减少2486g数量的食品浪费' }],
  131. bgColor:'transparent',
  132. };
  133. },
  134. onPageScroll(e) {
  135. // console.log('---',e);
  136. let scrollTop = e.scrollTop;
  137. if(scrollTop > this.CustomBar - 10){
  138. this.bgColor = "#ffffff";
  139. }else{
  140. this.bgColor = "transparent";
  141. }
  142. },
  143. methods:{
  144. async chooseLoc(){
  145. this.navTo('/pages/address/address')
  146. }
  147. }
  148. };
  149. </script>
  150. <style lang="scss">
  151. page {
  152. background-color: #F7FEFA;
  153. }
  154. .header-loc {
  155. position: absolute;
  156. width: 100%;
  157. padding: 0 30rpx;
  158. top: 50%;
  159. transform: translateY(-50%);
  160. .image_19 {
  161. width: 26rpx;
  162. height: 28rpx;
  163. }
  164. .text_43 {
  165. margin-left: 12rpx;
  166. color: #333333;
  167. font-size: 28rpx;
  168. font-family: PingFang;
  169. letter-spacing: 1.12rpx;
  170. }
  171. }
  172. .p-header {
  173. .img {
  174. width: 750rpx;
  175. height: 532rpx;
  176. }
  177. }
  178. .p-ads {
  179. margin: -32rpx auto 0;
  180. width: 690rpx;
  181. height: 72rpx;
  182. padding: 0 22rpx;
  183. background-image: url('/static/mang-ads.png');
  184. background-size: 100% 100%;
  185. background-repeat: no-repeat;
  186. position: relative;
  187. z-index: 2;
  188. .image_20 {
  189. width: 35rpx;
  190. height: 35rpx;
  191. }
  192. .group_20 {
  193. width: 100%;
  194. }
  195. }
  196. .p-entry {
  197. width: 690rpx;
  198. background: #FFFFFF;
  199. box-shadow: 0rpx 6rpx 10rpx 0rpx rgba(42,42,42,0.08);
  200. margin: 30rpx auto 0;
  201. padding: 9.5rpx 12rpx 20.5rpx;
  202. background-color: #ffffff;
  203. box-shadow: 0px 6rpx 10rpx #2a2a2a14;
  204. border-radius: 20rpx;
  205. height: 350rpx;
  206. display: grid;
  207. grid-template-columns: repeat(4, 1fr);
  208. .grid-item {
  209. padding: 17rpx 4rpx;
  210. }
  211. .image {
  212. width: 96rpx;
  213. height: 96rpx;
  214. }
  215. .text {
  216. margin-top: 7rpx;
  217. color: #333333;
  218. font-size: 24rpx;
  219. font-family: PingFang;
  220. line-height: 23rpx;
  221. letter-spacing: 1.44rpx;
  222. }
  223. }
  224. .p-tabs{
  225. margin-left: 30rpx;
  226. width: 530rpx;
  227. .text-wrapper {
  228. height: 85rpx;
  229. position: relative;
  230. &.active{
  231. .image_8{
  232. display: block;
  233. }
  234. .text_9{
  235. color: #333333;
  236. }
  237. }
  238. .image_8{
  239. width: 36rpx;
  240. height: 36rpx;
  241. display: none;
  242. position: absolute;
  243. z-index: 2;
  244. right: -14rpx;
  245. top:40%;
  246. transform: translateY(-50%);
  247. }
  248. .text_9 {
  249. color: #999999;
  250. font-size: 30rpx;
  251. font-family: PingFang;
  252. letter-spacing: 1.2rpx;
  253. line-height: 85rpx;
  254. }
  255. }
  256. }
  257. .p-list{
  258. .section_2 {
  259. width: 690rpx;
  260. margin:0 auto 24rpx;
  261. padding: 24rpx 14rpx 24rpx 24rpx;
  262. background-color: #ffffff;
  263. box-shadow: 0px 6rpx 10rpx #2a2a2a14;
  264. border-radius: 20rpx;
  265. position: relative;
  266. .text-wrapper_2 {
  267. padding: 8rpx 0 16rpx;
  268. background-image: url('/static/mang-listbg.png');
  269. background-size: 100% 100%;
  270. background-repeat: no-repeat;
  271. position: absolute;
  272. right: -10rpx;
  273. top: 26rpx;
  274. width: 120rpx;
  275. }
  276. .text_23 {
  277. margin-left: 12rpx;
  278. margin-right: 6rpx;
  279. color: #ffffff;
  280. font-size: 24rpx;
  281. font-family: PingFang;
  282. max-width: 120rpx;
  283. }
  284. // .text_31 {
  285. // margin-left: 12rpx;
  286. // margin-right: 6rpx;
  287. // }
  288. }
  289. .view_6 {
  290. padding: 24rpx 18rpx 24rpx 24rpx;
  291. }
  292. .group_11 {
  293. flex-shrink: 0;
  294. width: 200rpx;
  295. height: 200rpx;
  296. border-radius: 20rpx;
  297. }
  298. .text_21 {
  299. margin-top: 100rpx;
  300. color: #999999;
  301. font-size: 24rpx;
  302. font-family: PingFang;
  303. line-height: 18rpx;
  304. }
  305. .view_7 {
  306. margin-top: initial;
  307. color: initial;
  308. font-size: initial;
  309. font-family: initial;
  310. line-height: initial;
  311. margin-left: 19rpx;
  312. flex: 1 1 auto;
  313. align-self: center;
  314. }
  315. .text_25 {
  316. color: #333333;
  317. font-size: 30rpx;
  318. font-family: PingFang;
  319. max-width: 360rpx;
  320. }
  321. .stars{
  322. margin-top: 12rpx;
  323. .image_14 {
  324. width: 28rpx;
  325. height: 28rpx;
  326. margin-right: 4rpx;
  327. }
  328. }
  329. .text_26 {
  330. margin-top: 20rpx;
  331. align-self: flex-start;
  332. color: #999999;
  333. font-size: 24rpx;
  334. font-family: PingFang;
  335. line-height: 23rpx;
  336. }
  337. .group_16 {
  338. margin-top: 37rpx;
  339. padding: 0 2rpx;
  340. }
  341. .group_17 {
  342. line-height: 28rpx;
  343. height: 29rpx;
  344. }
  345. .text_27 {
  346. color: #ff3e3e;
  347. font-size: 24rpx;
  348. font-family: PingFang;
  349. line-height: 19rpx;
  350. }
  351. .text_28 {
  352. color: #ff3e3e;
  353. font-size: 36rpx;
  354. font-family: PingFang;
  355. line-height: 28rpx;
  356. }
  357. .text_29 {
  358. margin-left: 10rpx;
  359. margin-top: 9rpx;
  360. color: #999999;
  361. font-size: 24rpx;
  362. font-family: PingFang;
  363. line-height: 20rpx;
  364. text-decoration: line-through;
  365. }
  366. .text_30 {
  367. z-index: 2;
  368. position: absolute;
  369. top: 130rpx;
  370. right: 20rpx;
  371. color: #999999;
  372. font-size: 24rpx;
  373. font-family: PingFang;
  374. }
  375. }
  376. </style>