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

508 lines
11 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
6 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
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
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
4 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
6 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="LabelOptions">
  97. <uv-tabs :list="category" :activeStyle="{color : '#000', fontWeight : 900, fontSize : '36rpx'}"
  98. lineColor="#5baaff" lineHeight="8rpx" lineWidth="60rpx" keyName="title"
  99. @click="tabsClick"></uv-tabs>
  100. </view>
  101. <!-- 动态列表 -->
  102. <view class="dynamicList">
  103. <dynamicItem :key="index" v-for="(item, index) in list" :item="item"
  104. @click="$utils.navigateTo('/pages_order/post/postDetail?id=' + item.id)" />
  105. </view>
  106. </view>
  107. <!-- 页面浮窗 -->
  108. <createDetailPopup @customerServiceOpen="$refs.customerServicePopup.open()"
  109. @integralDetailsOpen="$refs.integralDetailsPopup.open('bottom')" />
  110. <!-- 加入我们 -->
  111. <certificationPopup ref="certificationPopup" />
  112. <!-- 分享 -->
  113. <sharePopup ref="sharePopup" />
  114. <!-- 签到获取积分 -->
  115. <signInOnePopup ref="signInOnePopup" />
  116. <!-- 联系客服 -->
  117. <customerServicePopup :title="headInfo.details" :image="headInfo.kefu" ref="customerServicePopup" />
  118. <!-- 隐私协议 -->
  119. <PrivacyAgreementPoup />
  120. <!-- 积分规则 -->
  121. <uv-popup ref="integralDetailsPopup" :round="30" :customStyle="{height: '60vh'}">
  122. <view style="overflow: scroll;padding: 30rpx 20rpx;">
  123. <uv-parse :content="headInfo.integralDetails"></uv-parse>
  124. </view>
  125. </uv-popup>
  126. <tabber select="0" />
  127. </view>
  128. </template>
  129. <script>
  130. import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue'
  131. import tabber from '@/components/base/tabbar.vue'
  132. import certificationPopup from '@/components/user/certificationPopup.vue'
  133. import createDetailPopup from '@/components/user/createDetailPopup.vue'
  134. import customerServicePopup from '@/components/user/customerServicePopup.vue'
  135. import sharePopup from '@/components/user/sharePopup.vue'
  136. import signInOnePopup from '@/components/user/signInOnePopup.vue'
  137. import dynamicItem from '@/components/list/dynamic/dynamicItem.vue'
  138. import mixinsList from '@/mixins/list.js'
  139. import {
  140. mapState
  141. } from 'vuex'
  142. export default {
  143. mixins: [mixinsList],
  144. components: {
  145. tabber,
  146. PrivacyAgreementPoup,
  147. createDetailPopup,
  148. customerServicePopup,
  149. dynamicItem,
  150. certificationPopup,
  151. sharePopup,
  152. signInOnePopup,
  153. },
  154. data() {
  155. return {
  156. // headInfo: {},
  157. menu: [],
  158. mixinsListApi: 'getPostPage',
  159. bannerList: [],
  160. // onShowData: false,
  161. templateIds: [
  162. 'uXZnHWrjtcX9JHlnMpdlWmzgJp71sKxCRiMn3TrE-EE',
  163. 'gTzGpOfJcYxtbvPG9OHnhbureKz5XLG8NPyECUGb2lw',
  164. ],
  165. }
  166. },
  167. onLoad(query) {
  168. if (query.shareId) {
  169. uni.setStorageSync('shareId', query.shareId)
  170. }
  171. this.onSubscribeMessageTap();
  172. // this.getData()
  173. // this.getIndexHeaderInfo()
  174. this.$store.commit('getIndexHeaderInfo')
  175. this.getClassifyList()
  176. // this.getBannerList()
  177. this.$store.commit('getCategory')
  178. },
  179. onShareAppMessage(res) {
  180. return {
  181. title: this.headInfo.name,
  182. path: '/pages/index/index'
  183. }
  184. },
  185. onShow() {
  186. // this.onSubscribeMessageTap();
  187. this.getUserInfo();
  188. },
  189. onPullDownRefresh() {
  190. // this.getIndexHeaderInfo()
  191. this.getClassifyList()
  192. // this.getBannerList()
  193. this.$store.commit('getCategory')
  194. this.getUserInfo()
  195. },
  196. computed: {
  197. ...mapState(['city', 'category', 'userInfo', 'headInfo']),
  198. },
  199. methods: {
  200. tabsClick(item) {
  201. if (item.index) {
  202. this.queryParams.classId = item.id
  203. } else {
  204. delete this.queryParams.classId
  205. }
  206. this.getData()
  207. },
  208. //订阅模版消息
  209. onSubscribeMessageTap(){
  210. let templateIds = [
  211. 'uXZnHWrjtcX9JHlnMpdlWmzgJp71sKxCRiMn3TrE-EE',
  212. 'gTzGpOfJcYxtbvPG9OHnhbureKz5XLG8NPyECUGb2lw',
  213. ];
  214. console.log("======")
  215. console.log(templateIds)
  216. wx.requestSubscribeMessage({
  217. tmplIds: templateIds, // 需要订阅的模板ID列表
  218. success(res) {
  219. console.log('订阅消息调用成功', res);
  220. // res[tmplId] 表示用户是否同意订阅该模板ID对应的消息
  221. // 例如:res['your_template_id_1'] === 'accept' 表示用户同意订阅
  222. templateIds.forEach(tmplId => {
  223. if (res[tmplId] === 'accept') {
  224. console.log(`用户同意订阅模板ID:${tmplId}`);
  225. // 这里可以添加用户同意后的逻辑,比如发送消息等(注意:发送消息需要在后端进行)
  226. } else if (res[tmplId] === 'reject') {
  227. console.log(`用户拒绝订阅模板ID:${tmplId}`);
  228. } else {
  229. console.log(`用户对该模板ID的订阅请求:${res[tmplId]}`); // 'ban' 表示用户被禁止订阅该模板
  230. }
  231. });
  232. },
  233. fail(err) {
  234. console.error('订阅消息调用失败', err);
  235. }
  236. });
  237. },
  238. menuClick(url) {
  239. if (!url){
  240. uni.showToast({
  241. title:'暂未开放,请耐心等待',
  242. icon: 'none'
  243. })
  244. return
  245. }
  246. // 跳转页面
  247. if (url.includes('reLaunch:')) {
  248. uni.reLaunch({
  249. url: url.replace('reLaunch:', '')
  250. })
  251. } else {
  252. uni.navigateTo({
  253. url
  254. })
  255. }
  256. },
  257. //获取首页头部信息
  258. getIndexHeaderInfo() {
  259. this.$api('getIndexHeaderInfo', res => {
  260. if (res.code == 200) {
  261. this.headInfo = res.result
  262. }
  263. })
  264. },
  265. //获取菜单
  266. getClassifyList() {
  267. this.$api('getClassifyList', res => {
  268. if (res.code == 200) {
  269. this.menu = res.result
  270. }
  271. })
  272. },
  273. //获取菜单
  274. getClassifyList() {
  275. this.$api('getClassifyList', res => {
  276. if (res.code == 200) {
  277. this.menu = res.result
  278. }
  279. })
  280. },
  281. // 获取banner
  282. getBannerList() {
  283. this.$api('getBannerList', res => {
  284. if (res.code == 200) {
  285. this.bannerList = res.result
  286. }
  287. })
  288. },
  289. join() {
  290. if (!uni.getStorageSync('token')) {
  291. uni.navigateTo({
  292. url: '/pages_order/auth/wxLogin'
  293. })
  294. return
  295. }
  296. // if(this.userInfo.idCardOpen == 0){
  297. // uni.showToast({
  298. // title: '审核中...',
  299. // icon:'none'
  300. // })
  301. // }else if(!this.userInfo.idCardOpen){
  302. // this.$refs.certificationPopup.open()
  303. // }else{
  304. this.$refs.sharePopup.open();
  305. // }
  306. },
  307. join2() {
  308. if (!uni.getStorageSync('token')) {
  309. uni.navigateTo({
  310. url: '/pages_order/auth/wxLogin'
  311. })
  312. return
  313. }
  314. this.onSubscribeMessageTap();
  315. },
  316. getUserInfo() {
  317. if (uni.getStorageSync('token')) {
  318. this.$store.commit('getUserInfo')
  319. }
  320. },
  321. }
  322. }
  323. </script>
  324. <style scoped lang="scss">
  325. .page {
  326. position: relative;
  327. /deep/ .uv-tabs__wrapper__scroll-view::-webkit-scrollbar {
  328. width: 0 !important;
  329. height: 0 !important;
  330. }
  331. }
  332. image {
  333. width: 100%;
  334. height: 100%;
  335. }
  336. .Headbackground {
  337. position: absolute;
  338. width: 100%;
  339. top: 0;
  340. left: 0;
  341. padding-top: 80rpx;
  342. // background: linear-gradient(to bottom, rgb(85, 94, 123), rgb(45, 51, 73));
  343. .Toggle {
  344. margin: 10rpx 30rpx;
  345. padding: 20rpx;
  346. background-color: #00000022;
  347. color: #fff;
  348. border-radius: 40rpx;
  349. width: fit-content;
  350. display: flex;
  351. justify-content: center;
  352. align-items: center;
  353. font-size: 28rpx;
  354. }
  355. .top {
  356. display: flex;
  357. color: white;
  358. padding: 25rpx;
  359. align-items: center;
  360. position: relative;
  361. .profilePicture {
  362. width: 150rpx;
  363. height: 150rpx;
  364. image {
  365. border-radius: 20rpx;
  366. }
  367. }
  368. .UniversalWall {
  369. padding: 0rpx 20rpx;
  370. .dynamic {
  371. font-size: 40rpx;
  372. letter-spacing: 5rpx;
  373. }
  374. .dynamics {
  375. margin-top: 20rpx;
  376. font-size: 25rpx;
  377. display: flex;
  378. text {
  379. margin: 0 10rpx;
  380. }
  381. }
  382. }
  383. .join {
  384. position: absolute;
  385. right: 10rpx;
  386. top: 40rpx;
  387. padding: 10rpx 20rpx;
  388. background-color: $uni-color;
  389. margin-left: auto;
  390. display: flex;
  391. align-items: center;
  392. justify-content: center;
  393. border-radius: 50rpx;
  394. }
  395. .join2 {
  396. position: absolute;
  397. right: 10rpx;
  398. top: 120rpx;
  399. padding: 10rpx 20rpx;
  400. background-color: $uni-color;
  401. margin-left: auto;
  402. display: flex;
  403. align-items: center;
  404. justify-content: center;
  405. border-radius: 50rpx;
  406. }
  407. }
  408. }
  409. .box {
  410. margin-top: -70rpx;
  411. background-color: #fff;
  412. border-top-left-radius: 40rpx;
  413. border-top-right-radius: 40rpx;
  414. position: relative;
  415. z-index: 9;
  416. overflow: hidden;
  417. .life {
  418. display: flex;
  419. text-align: center;
  420. padding: 10rpx 0;
  421. flex-wrap: wrap;
  422. .mouse {
  423. // margin-top: 20rpx;
  424. width: 20%;
  425. box-sizing: border-box;
  426. display: flex;
  427. justify-content: center;
  428. align-items: center;
  429. flex-direction: column;
  430. font-size: 26rpx;
  431. flex-shrink: 0;
  432. .RentingAhouseimg {
  433. margin-top: 20rpx;
  434. display: flex;
  435. justify-content: center;
  436. align-items: center;
  437. flex-direction: column;
  438. image {
  439. width: 70rpx;
  440. height: 70rpx;
  441. }
  442. }
  443. }
  444. .more {
  445. margin-top: 85rpx;
  446. margin-left: 47rpx;
  447. }
  448. }
  449. .dynamicList {
  450. padding-top: 10rpx;
  451. }
  452. }
  453. </style>