瑶都万能墙
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.

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