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

619 lines
14 KiB

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