瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

615 lines
14 KiB

8 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
4 months ago
6 months ago
7 months ago
4 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
8 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
8 months ago
6 months ago
8 months ago
8 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
8 months ago
6 months ago
6 months ago
6 months ago
4 months ago
8 months ago
7 months ago
6 months ago
7 months ago
6 months ago
4 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
4 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
8 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
4 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
4 months ago
6 months ago
7 months ago
8 months ago
6 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
4 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
6 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="page">
  3. <view>
  4. <!-- <uv-swiper
  5. :list="bannerList"
  6. indicator
  7. height="490rpx"
  8. indicatorStyle="bottom: 100rpx;"
  9. keyName="image"></uv-swiper> -->
  10. <image :src="headInfo.bg" style="width: 100%;height: 490rpx;" mode="aspectFill"></image>
  11. </view>
  12. <!-- 瑶都万能墙 -->
  13. <view class="Headbackground">
  14. <view class="Toggle">
  15. <uv-icon size="30rpx" color="#fff" name="map"></uv-icon>
  16. 江华瑶族自治县
  17. </view>
  18. <view class="top">
  19. <view class="profilePicture">
  20. <image :src="headInfo.headImage" mode=""></image>
  21. </view>
  22. <view class="UniversalWall">
  23. <view class="dynamic">
  24. {{ headInfo.name }}
  25. </view>
  26. <!-- <view class="dynamics">
  27. {{headInfo.num}}动态
  28. <text>|</text>
  29. <view
  30. @click="$utils.navigateTo('/pages_order/mine/allUser')"
  31. >
  32. {{headInfo.userNum}}江华人
  33. </view>
  34. </view>
  35. <view class="dynamics">
  36. {{headInfo.homeNum}}租房
  37. <text>|</text>
  38. {{headInfo.jobNum}}工作
  39. <text>|</text>
  40. {{headInfo.jdNum}}景点
  41. <text>|</text>
  42. {{headInfo.shopNum}}美食
  43. <text>|</text>
  44. {{headInfo.activityNum}}活动
  45. </view> -->
  46. <view class="dynamics">
  47. 江华便民生活好帮手
  48. </view>
  49. </view>
  50. <view class="join" @click="join">
  51. <view v-if="userInfo.idCardOpen == 0">
  52. 审核中
  53. </view>
  54. <view v-else-if="!userInfo.idCardOpen">
  55. 成为会员
  56. </view>
  57. <view v-else>
  58. <uv-icon color="#fff" size="30rpx" name="list-dot"></uv-icon>
  59. </view>
  60. </view>
  61. <view>
  62. <view class="join2" @click="join2">
  63. 订阅通知
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="box">
  69. <!-- 菜单栏 -->
  70. <scroll-view scroll-x="true">
  71. <view class="life">
  72. <view class="mouse"
  73. @click="menuClick(item.url)"
  74. v-if="index < 9"
  75. :key="index" v-for="(item, index) in menu">
  76. <view class="RentingAhouseimg">
  77. <image :src="item.icon" mode=""></image>
  78. </view>
  79. <view class="RentingAhouse">
  80. {{ item.title }}
  81. </view>
  82. </view>
  83. <view class="more"
  84. v-if="menu.length > 8"
  85. @click="menuClick(item.url)" >
  86. <view class="RentingAhouseimg">
  87. <image src="" mode=""></image>
  88. </view>
  89. <view class="RentingAhouse">
  90. 更多
  91. </view>
  92. </view>
  93. </view>
  94. </scroll-view>
  95. <!-- 大转盘抽奖入口 -->
  96. <view class="turntable-entrance" @click="goTurntable">
  97. <view class="turntable-content">
  98. <view class="turntable-icon">
  99. <text class="icon">🎰</text>
  100. <view class="shine"></view>
  101. </view>
  102. <view class="turntable-text">
  103. <text class="title">幸运大转盘</text>
  104. <text class="subtitle">天天有惊喜转一转试试手气</text>
  105. </view>
  106. <view class="turntable-arrow">
  107. <text></text>
  108. </view>
  109. </view>
  110. </view>
  111. <!-- 分类 -->
  112. <view class="LabelOptions">
  113. <uv-tabs :list="category" :activeStyle="{color : '#000', fontWeight : 900, fontSize : '36rpx'}"
  114. lineColor="#5baaff" lineHeight="8rpx" lineWidth="60rpx" keyName="title"
  115. @click="tabsClick"></uv-tabs>
  116. </view>
  117. <!-- 动态列表 -->
  118. <view class="dynamicList">
  119. <dynamicItem :key="index" v-for="(item, index) in list" :item="item"
  120. @click="$utils.navigateTo('/pages_order/post/postDetail?id=' + item.id)" />
  121. </view>
  122. </view>
  123. <!-- 页面浮窗 -->
  124. <createDetailPopup @customerServiceOpen="$refs.customerServicePopup.open()"
  125. @integralDetailsOpen="$refs.integralDetailsPopup.open('bottom')" />
  126. <!-- 加入我们 -->
  127. <certificationPopup ref="certificationPopup" />
  128. <!-- 分享 -->
  129. <sharePopup ref="sharePopup" />
  130. <!-- 签到获取积分 -->
  131. <signInOnePopup ref="signInOnePopup" />
  132. <!-- 联系客服 -->
  133. <customerServicePopup :title="headInfo.details" :image="headInfo.kefu" ref="customerServicePopup" />
  134. <!-- 隐私协议 -->
  135. <PrivacyAgreementPoup />
  136. <!-- 积分规则 -->
  137. <uv-popup ref="integralDetailsPopup" :round="30" :customStyle="{height: '60vh'}">
  138. <view style="overflow: scroll;padding: 30rpx 20rpx;">
  139. <uv-parse :content="headInfo.integralDetails"></uv-parse>
  140. </view>
  141. </uv-popup>
  142. <tabber select="0" />
  143. </view>
  144. </template>
  145. <script>
  146. import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue'
  147. import tabber from '@/components/base/tabbar.vue'
  148. import certificationPopup from '@/components/user/certificationPopup.vue'
  149. import createDetailPopup from '@/components/user/createDetailPopup.vue'
  150. import customerServicePopup from '@/components/user/customerServicePopup.vue'
  151. import sharePopup from '@/components/user/sharePopup.vue'
  152. import signInOnePopup from '@/components/user/signInOnePopup.vue'
  153. import dynamicItem from '@/components/list/dynamic/dynamicItem.vue'
  154. import mixinsList from '@/mixins/list.js'
  155. import {
  156. mapState
  157. } from 'vuex'
  158. export default {
  159. mixins: [mixinsList],
  160. components: {
  161. tabber,
  162. PrivacyAgreementPoup,
  163. createDetailPopup,
  164. customerServicePopup,
  165. dynamicItem,
  166. certificationPopup,
  167. sharePopup,
  168. signInOnePopup,
  169. },
  170. data() {
  171. return {
  172. // headInfo: {},
  173. menu: [],
  174. mixinsListApi: 'getPostPage',
  175. bannerList: [],
  176. // onShowData: false,
  177. templateIds: [
  178. 'uXZnHWrjtcX9JHlnMpdlWmzgJp71sKxCRiMn3TrE-EE',
  179. 'gTzGpOfJcYxtbvPG9OHnhbureKz5XLG8NPyECUGb2lw',
  180. ],
  181. }
  182. },
  183. onLoad(query) {
  184. if (query.shareId) {
  185. uni.setStorageSync('shareId', query.shareId)
  186. }
  187. this.onSubscribeMessageTap();
  188. // this.getData()
  189. // this.getIndexHeaderInfo()
  190. this.$store.commit('getIndexHeaderInfo')
  191. this.getClassifyList()
  192. // this.getBannerList()
  193. this.$store.commit('getCategory')
  194. },
  195. onShareAppMessage(res) {
  196. return {
  197. title: this.headInfo.name,
  198. path: '/pages/index/index'
  199. }
  200. },
  201. onShow() {
  202. // this.onSubscribeMessageTap();
  203. this.getUserInfo();
  204. },
  205. onPullDownRefresh() {
  206. // this.getIndexHeaderInfo()
  207. this.getClassifyList()
  208. // this.getBannerList()
  209. this.$store.commit('getCategory')
  210. this.getUserInfo()
  211. },
  212. computed: {
  213. ...mapState(['city', 'category', 'userInfo', 'headInfo']),
  214. },
  215. methods: {
  216. tabsClick(item) {
  217. if (item.index) {
  218. this.queryParams.classId = item.id
  219. } else {
  220. delete this.queryParams.classId
  221. }
  222. this.getData()
  223. },
  224. //订阅模版消息
  225. onSubscribeMessageTap(){
  226. let templateIds = [
  227. 'uXZnHWrjtcX9JHlnMpdlWmzgJp71sKxCRiMn3TrE-EE',
  228. 'gTzGpOfJcYxtbvPG9OHnhbureKz5XLG8NPyECUGb2lw',
  229. ];
  230. console.log("======")
  231. console.log(templateIds)
  232. wx.requestSubscribeMessage({
  233. tmplIds: templateIds, // 需要订阅的模板ID列表
  234. success(res) {
  235. console.log('订阅消息调用成功', res);
  236. // res[tmplId] 表示用户是否同意订阅该模板ID对应的消息
  237. // 例如:res['your_template_id_1'] === 'accept' 表示用户同意订阅
  238. templateIds.forEach(tmplId => {
  239. if (res[tmplId] === 'accept') {
  240. console.log(`用户同意订阅模板ID:${tmplId}`);
  241. // 这里可以添加用户同意后的逻辑,比如发送消息等(注意:发送消息需要在后端进行)
  242. } else if (res[tmplId] === 'reject') {
  243. console.log(`用户拒绝订阅模板ID:${tmplId}`);
  244. } else {
  245. console.log(`用户对该模板ID的订阅请求:${res[tmplId]}`); // 'ban' 表示用户被禁止订阅该模板
  246. }
  247. });
  248. },
  249. fail(err) {
  250. console.error('订阅消息调用失败', err);
  251. }
  252. });
  253. },
  254. menuClick(url) {
  255. if (!url){
  256. uni.showToast({
  257. title:'暂未开放,请耐心等待',
  258. icon: 'none'
  259. })
  260. return
  261. }
  262. // 跳转页面
  263. if (url.includes('reLaunch:')) {
  264. uni.reLaunch({
  265. url: url.replace('reLaunch:', '')
  266. })
  267. } else {
  268. uni.navigateTo({
  269. url
  270. })
  271. }
  272. },
  273. //获取首页头部信息
  274. getIndexHeaderInfo() {
  275. this.$api('getIndexHeaderInfo', res => {
  276. if (res.code == 200) {
  277. this.headInfo = res.result
  278. }
  279. })
  280. },
  281. //获取菜单
  282. getClassifyList() {
  283. this.$api('getClassifyList', res => {
  284. if (res.code == 200) {
  285. this.menu = res.result
  286. }
  287. })
  288. },
  289. //获取菜单
  290. getClassifyList() {
  291. this.$api('getClassifyList', res => {
  292. if (res.code == 200) {
  293. this.menu = res.result
  294. }
  295. })
  296. },
  297. // 获取banner
  298. getBannerList() {
  299. this.$api('getBannerList', res => {
  300. if (res.code == 200) {
  301. this.bannerList = res.result
  302. }
  303. })
  304. },
  305. join() {
  306. if (!uni.getStorageSync('token')) {
  307. uni.navigateTo({
  308. url: '/pages_order/auth/wxLogin'
  309. })
  310. return
  311. }
  312. // if(this.userInfo.idCardOpen == 0){
  313. // uni.showToast({
  314. // title: '审核中...',
  315. // icon:'none'
  316. // })
  317. // }else if(!this.userInfo.idCardOpen){
  318. // this.$refs.certificationPopup.open()
  319. // }else{
  320. this.$refs.sharePopup.open();
  321. // }
  322. },
  323. join2() {
  324. if (!uni.getStorageSync('token')) {
  325. uni.navigateTo({
  326. url: '/pages_order/auth/wxLogin'
  327. })
  328. return
  329. }
  330. this.onSubscribeMessageTap();
  331. },
  332. getUserInfo() {
  333. if (uni.getStorageSync('token')) {
  334. this.$store.commit('getUserInfo')
  335. }
  336. },
  337. // 跳转到大转盘页面
  338. goTurntable() {
  339. uni.navigateTo({
  340. url: '/pages_order/marketing/turntable'
  341. })
  342. },
  343. }
  344. }
  345. </script>
  346. <style scoped lang="scss">
  347. .page {
  348. position: relative;
  349. /deep/ .uv-tabs__wrapper__scroll-view::-webkit-scrollbar {
  350. width: 0 !important;
  351. height: 0 !important;
  352. }
  353. }
  354. image {
  355. width: 100%;
  356. height: 100%;
  357. }
  358. .Headbackground {
  359. position: absolute;
  360. width: 100%;
  361. top: 0;
  362. left: 0;
  363. padding-top: 80rpx;
  364. // background: linear-gradient(to bottom, rgb(85, 94, 123), rgb(45, 51, 73));
  365. .Toggle {
  366. margin: 10rpx 30rpx;
  367. padding: 20rpx;
  368. background-color: #00000022;
  369. color: #fff;
  370. border-radius: 40rpx;
  371. width: fit-content;
  372. display: flex;
  373. justify-content: center;
  374. align-items: center;
  375. font-size: 28rpx;
  376. }
  377. .top {
  378. display: flex;
  379. color: white;
  380. padding: 25rpx;
  381. align-items: center;
  382. position: relative;
  383. .profilePicture {
  384. width: 150rpx;
  385. height: 150rpx;
  386. image {
  387. border-radius: 20rpx;
  388. }
  389. }
  390. .UniversalWall {
  391. padding: 0rpx 20rpx;
  392. .dynamic {
  393. font-size: 40rpx;
  394. letter-spacing: 5rpx;
  395. }
  396. .dynamics {
  397. margin-top: 20rpx;
  398. font-size: 25rpx;
  399. display: flex;
  400. text {
  401. margin: 0 10rpx;
  402. }
  403. }
  404. }
  405. .join {
  406. position: absolute;
  407. right: 10rpx;
  408. top: 40rpx;
  409. padding: 10rpx 20rpx;
  410. background-color: $uni-color;
  411. margin-left: auto;
  412. display: flex;
  413. align-items: center;
  414. justify-content: center;
  415. border-radius: 50rpx;
  416. }
  417. .join2 {
  418. position: absolute;
  419. right: 10rpx;
  420. top: 120rpx;
  421. padding: 10rpx 20rpx;
  422. background-color: $uni-color;
  423. margin-left: auto;
  424. display: flex;
  425. align-items: center;
  426. justify-content: center;
  427. border-radius: 50rpx;
  428. }
  429. }
  430. }
  431. .box {
  432. margin-top: -70rpx;
  433. background-color: #fff;
  434. border-top-left-radius: 40rpx;
  435. border-top-right-radius: 40rpx;
  436. position: relative;
  437. z-index: 9;
  438. overflow: hidden;
  439. // 大转盘入口样式
  440. .turntable-entrance {
  441. margin: 20rpx;
  442. border-radius: 20rpx;
  443. background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
  444. box-shadow: 0 8rpx 20rpx rgba(255, 107, 107, 0.3);
  445. overflow: hidden;
  446. position: relative;
  447. &::before {
  448. content: '';
  449. position: absolute;
  450. top: 0;
  451. left: -100%;
  452. width: 100%;
  453. height: 100%;
  454. background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  455. animation: shine 3s infinite;
  456. }
  457. .turntable-content {
  458. display: flex;
  459. align-items: center;
  460. padding: 30rpx;
  461. position: relative;
  462. z-index: 2;
  463. .turntable-icon {
  464. position: relative;
  465. margin-right: 30rpx;
  466. .icon {
  467. font-size: 60rpx;
  468. display: block;
  469. animation: bounce 2s infinite;
  470. }
  471. }
  472. .turntable-text {
  473. flex: 1;
  474. .title {
  475. display: block;
  476. font-size: 32rpx;
  477. font-weight: bold;
  478. color: white;
  479. margin-bottom: 10rpx;
  480. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
  481. }
  482. .subtitle {
  483. display: block;
  484. font-size: 24rpx;
  485. color: rgba(255, 255, 255, 0.9);
  486. text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.3);
  487. }
  488. }
  489. .turntable-arrow {
  490. font-size: 36rpx;
  491. color: white;
  492. font-weight: bold;
  493. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
  494. animation: arrow-bounce 1.5s infinite;
  495. }
  496. }
  497. }
  498. @keyframes shine {
  499. 0% { left: -100%; }
  500. 100% { left: 100%; }
  501. }
  502. @keyframes bounce {
  503. 0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  504. 40% { transform: translateY(-10rpx); }
  505. 60% { transform: translateY(-5rpx); }
  506. }
  507. @keyframes arrow-bounce {
  508. 0%, 100% { transform: translateX(0); }
  509. 50% { transform: translateX(10rpx); }
  510. }
  511. .life {
  512. display: flex;
  513. text-align: center;
  514. padding: 10rpx 0;
  515. flex-wrap: wrap;
  516. .mouse {
  517. // margin-top: 20rpx;
  518. width: 20%;
  519. box-sizing: border-box;
  520. display: flex;
  521. justify-content: center;
  522. align-items: center;
  523. flex-direction: column;
  524. font-size: 26rpx;
  525. flex-shrink: 0;
  526. .RentingAhouseimg {
  527. margin-top: 20rpx;
  528. display: flex;
  529. justify-content: center;
  530. align-items: center;
  531. flex-direction: column;
  532. image {
  533. width: 70rpx;
  534. height: 70rpx;
  535. }
  536. }
  537. }
  538. .more {
  539. margin-top: 85rpx;
  540. margin-left: 47rpx;
  541. }
  542. }
  543. .dynamicList {
  544. padding-top: 10rpx;
  545. }
  546. }
  547. </style>