search.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. <template>
  2. <view class="uni-main">
  3. <view class="sticky-nav">
  4. <view class="nav-box">
  5. <text class="header-text">寺院</text>
  6. <text class="right-btn">搜索</text>
  7. </view>
  8. </view>
  9. <view class="uni-list">
  10. <view class="uni-list-item" v-for="(item,index) in activityList" :key="index">
  11. <view class="uni-list-item_box">
  12. <view>
  13. <image :src="item.thumb" class="thumb"></image>
  14. </view>
  15. <view class="uni-list_text">
  16. <view class="text_title">{{item.title}}</view>
  17. <view class="text_desc">
  18. <text class="text_count">{{item.join_count}}人参与</text><text class="text_time">{{item.publish_at}}</text>
  19. </view>
  20. </view>
  21. <view class="uni-list_btn" v-if="item.type ==1"><navigator :url="'./activity?id='+item.id">代订</navigator></view>
  22. <view class="uni-list_btn" v-if="item.type ==2"><navigator :url="'./activity?id='+item.id">助印</navigator></view>
  23. <view class="uni-list_btn" v-if="item.type ==3"><navigator :url="'./activity?id='+item.id">供奉</navigator></view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="uni-list-media">
  28. <view class="uni-list-media-header">
  29. <view class="list-media-header_text">
  30. <text class="text_title">优选寺院</text>
  31. <view class="text_operation"><text>推荐</text><img src="../../static/index/arrow_down.png" width="18"></view>
  32. </view>
  33. </view>
  34. <view class="uni-list-media-item" v-for="(item,index) in recommList" :key="index">
  35. <view class="uni-list-media-item_box">
  36. <navigator :url="'./detail?id='+item.id">
  37. <view>
  38. <image :src="item.thumb" class="thumb"></image>
  39. </view>
  40. <view class="uni-list_text">
  41. <text class="text_title">{{item.title}}</text>
  42. <text class="text_count"><img src="../../static/index/popular_value.png" width="9">{{item.count}}</text>
  43. </view>
  44. </navigator>
  45. </view>
  46. </view>
  47. </view>
  48. <u-mask :show="showMask" @click="showMask = false">
  49. <view class="wrap">
  50. <div class="shiyuan_operate_wrap shiyuan_operate_wrap_top">
  51. <view v-for="(item,index) in operateList" :key="index" class="operate_list">
  52. <view class="operate_item" @tap.stop="gongdengDetail(item)">
  53. <image :src="item.icon" class="oprate_icon" width="20"></image>
  54. <text class="oprate_content">{{item.content}}</text>
  55. </view>
  56. </view>
  57. </div>
  58. </view>
  59. </u-mask>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. activityList: [{
  67. id: 1,
  68. thumb: '../../static/index/shiyuan/sjmn.jpg',
  69. title: "深圳线下祈福交流活动",
  70. description: "般若智慧、慈悲宽容",
  71. join_count: "5",
  72. publish_at: "5月20-6月10日",
  73. price: 0,
  74. type: 1,
  75. },
  76. {
  77. id: 2,
  78. thumb: '../../static/index/gongdeng/wen_shu.jpg',
  79. title: "弘扬佛法,助印经书",
  80. description: "粉丝地方",
  81. join_count: "24",
  82. publish_at: "5月24-6月16日",
  83. price: 50.00,
  84. type: 1,
  85. },
  86. {
  87. id: 3,
  88. thumb: '../../static/index/gongdeng/guanyin.jpg',
  89. title: "观世音菩萨",
  90. description: "救苦救难",
  91. join_count: "10",
  92. publish_at: "5月21-6月20日",
  93. price: 100.00,
  94. type: 1,
  95. },
  96. {
  97. id: 4,
  98. thumb: '../../static/index/gongdeng/caishenye.jpg',
  99. title: "财神爷",
  100. description: "财运亨通",
  101. join_count: "300",
  102. publish_at: "5月20-6月18日",
  103. price: 0.00,
  104. type: 3,
  105. },
  106. {
  107. id: 5,
  108. thumb: '../../static/index/gongdeng/qianshouguanyin.jpg',
  109. title: "千手观音",
  110. description: "守护生肖:鼠",
  111. join_count: "1200",
  112. publish_at: "5月10-6月11日",
  113. price: 80.00,
  114. type: 2,
  115. }
  116. ],
  117. recommList: [{
  118. id: 1,
  119. thumb: '../../static/index/shiyuan/lys.jpg',
  120. title: "杭州灵隐寺",
  121. count: 1522,
  122. business_time: "5月20-6月16日",
  123. type: 1,
  124. },
  125. {
  126. id: 2,
  127. thumb: '../../static/index/shiyuan/cds.jpg',
  128. title: "承德普宁寺",
  129. description: "简介",
  130. count: "1.06万",
  131. publish_at: "5月20-6月23日",
  132. price: 120.00,
  133. type: 2,
  134. },
  135. {
  136. id: 3,
  137. thumb: '../../static/index/shiyuan/dangyang.jpg',
  138. title: "当阳浴玉泉寺",
  139. description: "救苦救难",
  140. count: "1.06万",
  141. business_time: "5月20-6月16日",
  142. type: 2,
  143. },
  144. {
  145. id: 4,
  146. thumb: '../../static/index/shiyuan/kys.jpg',
  147. title: "泉州开元寺",
  148. description: "财运亨通",
  149. count: "6354",
  150. business_time: "5月20-6月16日",
  151. type: 2,
  152. },
  153. {
  154. id: 5,
  155. thumb: '../../static/index/shiyuan/bms.jpg',
  156. title: "洛阳白马寺",
  157. description: "简介",
  158. count: "1621",
  159. business_time: "5月20-6月16日",
  160. type: 2,
  161. },
  162. {
  163. id: 6,
  164. thumb: '../../static/index/shiyuan/sls.jpg',
  165. title: "福清南少林寺",
  166. description: "简介",
  167. count: "1621",
  168. business_time: "5月20-6月16日",
  169. type: 2,
  170. },
  171. {
  172. id: 7,
  173. thumb: '../../static/index/shiyuan/ygs.jpg',
  174. title: "风岩古寺",
  175. description: "简介",
  176. count: "1621",
  177. business_time: "5月20-6月16日",
  178. type: 2,
  179. },
  180. {
  181. id: 8,
  182. thumb: '../../static/index/shiyuan/hfs.jpg',
  183. title: "深圳弘法寺",
  184. description: "简介",
  185. count: "1621",
  186. business_time: "5月20-6月16日",
  187. type: 2,
  188. }
  189. ],
  190. showMask: false, //是否显示遮罩层
  191. operateList: [{
  192. icon: '../../static/index/menu_history_icon.png',
  193. content: '我的活动',
  194. pagesPath: '/pages/my/activity',
  195. }, {
  196. icon: '../../static/index/search_bold_icon.png',
  197. content: '搜索寺院',
  198. }]
  199. }
  200. },
  201. methods: {
  202. backHome() {
  203. uni.navigateBack({
  204. delta: 1
  205. });
  206. },
  207. showGongdengMask() {
  208. this.showMask = true;
  209. },
  210. gongdengDetail(item) {
  211. switch (item.content) {
  212. case '供灯说明':
  213. uni.navigateTo({
  214. url: '../gongdeng/gongdengIntroduction'
  215. });
  216. break;
  217. case '我的供灯':
  218. uni.navigateTo({
  219. url: '../gongdeng/myGongdeng'
  220. });
  221. break;
  222. case '我的灯劵':
  223. uni.navigateTo({
  224. url: '../gongdeng/myTicket'
  225. });
  226. break;
  227. }
  228. }
  229. }
  230. }
  231. </script>
  232. <style>
  233. page {
  234. background-color: rgb(247, 246, 242);
  235. }
  236. </style>
  237. <style lang="less" scoped>
  238. .uni-main {
  239. width: 100%;
  240. height: 100%;
  241. background-color: #f6f7f5;
  242. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  243. }
  244. .sticky-nav {
  245. position: sticky;
  246. width: 100%;
  247. top: 0;
  248. z-index: 1;
  249. }
  250. .nav-box {
  251. width: 100%;
  252. padding-top: 90rpx;
  253. display: flex;
  254. align-items: center;
  255. background: linear-gradient(rgb(255, 152, 101), rgb(255, 122, 85));
  256. height: 135rpx;
  257. padding-bottom: 50rpx;
  258. .header-text {
  259. font-size: 45rpx;
  260. color: #333;
  261. font-weight: bold;
  262. width: 100%;
  263. text-align: center;
  264. margin-left: 20rpx;
  265. }
  266. .header_operate {
  267. width: 48rpx;
  268. height: 46rpx;
  269. float: right;
  270. margin-right: 20rpx;
  271. }
  272. }
  273. .uni-list {
  274. margin: 20rpx 20rpx 15rpx 20rpx;
  275. }
  276. .uni-list-item {
  277. padding: 20rpx 30rpx;
  278. margin-bottom: 12rpx;
  279. background-color: #FFFFFF;
  280. border-radius: 8rpx;
  281. position: relative;
  282. }
  283. .uni-list-item_box .thumb {
  284. width: 100%;
  285. height: 200rpx;
  286. border-radius: 8rpx;
  287. }
  288. .uni-list_text .text_title {
  289. font-size: 32rpx;
  290. font-weight: bold;
  291. padding: 4rpx 0rpx;
  292. }
  293. .uni-list_text .text_count {
  294. margin-right: 20rpx;
  295. }
  296. .uni-list_text .text_time {
  297. color: #999;
  298. }
  299. .uni-list .uni-list_btn {
  300. text-align: center;
  301. min-width: 120rpx;
  302. position: absolute;
  303. right: 40rpx;
  304. bottom: 40rpx;
  305. background-color: #ccac56;
  306. color: #fff;
  307. border-radius: 30rpx;
  308. padding: 8rpx 20rpx;
  309. display: inline-block;
  310. }
  311. .uni-list-media {
  312. background-color: #fff;
  313. margin: 0rpx 20rpx 4rpx;
  314. border-radius: 8rpx;
  315. }
  316. .uni-list-media-header {
  317. padding: 20rpx 20rpx 24rpx;
  318. }
  319. .uni-list-media-header .text_title {
  320. font-size: 36rpx;
  321. font-weight: bold;
  322. }
  323. .uni-list-media-header .text_operation {
  324. display: inline-block;
  325. float: right;
  326. color: #999;
  327. font-size: 24rpx;
  328. margin-top: 4rpx;
  329. }
  330. .uni-list-media-header .text_operation img {
  331. vertical-align: middle;
  332. }
  333. .uni-list-media-item {
  334. width: calc(50% - 16rpx);
  335. display: inline-block;
  336. margin: 0rpx 8rpx;
  337. margin-bottom: 20rpx;
  338. }
  339. .uni-list-media-item_box {
  340. width: 100%;
  341. height: 100%;
  342. }
  343. .uni-list-media-item .thumb {
  344. width: 100%;
  345. height: 200rpx;
  346. }
  347. .uni-list-media-item .text_title {
  348. font-weight: normal;
  349. padding: 8rpx 0rpx;
  350. }
  351. .uni-list-media-item .text_count {
  352. float: right;
  353. margin-right: 6rpx;
  354. color: #cc540e;
  355. font-size: 24rpx;
  356. line-height: 40rpx;
  357. }
  358. .uni-list-media-item .text_count img {
  359. margin-right: 6rpx;
  360. }
  361. .wrap{
  362. position: fixed;
  363. top:140rpx;
  364. right:0;
  365. .shiyuan_operate_wrap {
  366. width: 300rpx;
  367. // height: 430rpx;
  368. background-color: #fff;
  369. border-radius: 10rpx;
  370. position: relative;
  371. .operate_list {
  372. margin: 0 5rpx 0 25rpx;
  373. border-bottom: 1rpx solid rgb(165, 165, 165);
  374. .operate_item{
  375. padding: 27rpx 5rpx 27rpx 25rpx;
  376. display: flex;
  377. align-items: center;
  378. }
  379. .oprate_icon {
  380. width: 50rpx;
  381. height: 50rpx;
  382. padding-right: 15rpx;
  383. }
  384. .oprate_content{
  385. font-size: 35rpx;
  386. }
  387. }
  388. .operate_list:last-of-type{
  389. border-bottom: none;
  390. }
  391. }
  392. .shiyuan_operate_wrap_top::before {
  393. content: '';
  394. position: absolute;
  395. width: 0;
  396. height: 0;
  397. left: 220rpx;
  398. top: -52rpx;
  399. border: 25rpx solid;
  400. border-color: transparent transparent rgb(255, 255, 255) transparent;
  401. /*上 右 下 左 */
  402. }
  403. }
  404. </style>