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

400 lines
8.0 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
3 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. </view>
  11. <!-- 瑶都万能墙 -->
  12. <view class="Headbackground">
  13. <view class="Toggle">
  14. <uv-icon
  15. size="30rpx"
  16. color="#fff"
  17. name="map"></uv-icon>
  18. 江华瑶族自治县
  19. </view>
  20. <view class="top">
  21. <view class="profilePicture"
  22. @click="$refs.customerServicePopup.open()">
  23. <image :src="headinfo.headImage" mode=""></image>
  24. </view>
  25. <view class="UniversalWall">
  26. <view class="dynamic"
  27. @click="$refs.customerServicePopup.open()">
  28. {{ headinfo.name }}
  29. </view>
  30. <!-- <view class="dynamics">
  31. {{headinfo.num}}动态
  32. <text>|</text>
  33. <view
  34. @click="$utils.navigateTo('/pages_order/mine/allUser')"
  35. >
  36. {{headinfo.userNum}}江华人
  37. </view>
  38. </view>
  39. <view class="dynamics">
  40. {{headinfo.homeNum}}租房
  41. <text>|</text>
  42. {{headinfo.jobNum}}工作
  43. <text>|</text>
  44. {{headinfo.jdNum}}景点
  45. <text>|</text>
  46. {{headinfo.shopNum}}美食
  47. <text>|</text>
  48. {{headinfo.activityNum}}活动
  49. </view> -->
  50. <view class="dynamics">
  51. 江华便民生活好帮手
  52. </view>
  53. </view>
  54. <view class="join"
  55. @click="join">
  56. <view
  57. v-if="userInfo.idCardOpen == 0">
  58. 审核中
  59. </view>
  60. <view
  61. v-else-if="!userInfo.idCardOpen">
  62. 加入
  63. </view>
  64. <view
  65. v-else>
  66. <uv-icon
  67. color="#fff"
  68. size="30rpx"
  69. name="list-dot"></uv-icon>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="box">
  75. <!-- 菜单栏 -->
  76. <scroll-view
  77. scroll-x="true">
  78. <view class="life">
  79. <view class="mouse" @click="menuClick(item.url)"
  80. :key="index"
  81. v-for="(item, index) in menu">
  82. <view class="RentingAhouseimg">
  83. <image
  84. :src="item.icon" mode=""></image>
  85. </view>
  86. <view class="RentingAhouse">
  87. {{ item.title }}
  88. </view>
  89. </view>
  90. </view>
  91. </scroll-view>
  92. <!-- 分类 -->
  93. <view class="LabelOptions">
  94. <uv-tabs :list="category"
  95. :activeStyle="{color : '#000', fontWeight : 900}"
  96. lineColor="#5baaff"
  97. lineHeight="8rpx"
  98. lineWidth="50rpx"
  99. keyName="title"
  100. @click="tabsClick"></uv-tabs>
  101. </view>
  102. <!-- 动态列表 -->
  103. <view
  104. class="dynamicList"
  105. :style="{backgroundColor: queryParams.classId ? '' : 'wheat'}">
  106. <dynamicItem
  107. :key="index"
  108. v-for="(item, index) in list"
  109. :item="item"
  110. @click="$utils.navigateTo('/pages_order/post/postDetail?id=' + item.id)"
  111. />
  112. </view>
  113. </view>
  114. <createDetailPopup/>
  115. <certificationPopup ref="certificationPopup"/>
  116. <sharePopup ref="sharePopup"/>
  117. <customerServicePopup
  118. :title="headinfo.details"
  119. :image="headinfo.kefu"
  120. ref="customerServicePopup"/>
  121. <PrivacyAgreementPoup />
  122. <tabber select="0" />
  123. </view>
  124. </template>
  125. <script>
  126. import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue'
  127. import tabber from '@/components/base/tabbar.vue'
  128. import certificationPopup from '@/components/user/certificationPopup.vue'
  129. import createDetailPopup from '@/components/user/createDetailPopup.vue'
  130. import customerServicePopup from '@/components/user/customerServicePopup.vue'
  131. import sharePopup from '@/components/user/sharePopup.vue'
  132. import dynamicItem from '@/components/list/dynamic/dynamicItem.vue'
  133. import mixinsList from '@/mixins/list.js'
  134. import { mapState } from 'vuex'
  135. export default {
  136. mixins: [mixinsList],
  137. components: {
  138. tabber,
  139. PrivacyAgreementPoup,
  140. createDetailPopup,
  141. customerServicePopup,
  142. dynamicItem,
  143. certificationPopup,
  144. sharePopup,
  145. },
  146. data() {
  147. return {
  148. headinfo: {},
  149. menu : [],
  150. mixinsListApi : 'getPostPage',
  151. bannerList : [],
  152. onShowData : false,
  153. }
  154. },
  155. onLoad(query) {
  156. if(query.shareId){
  157. uni.setStorageSync('shareId', query.shareId)
  158. }
  159. this.getData()
  160. this.getIndexHeaderInfo()
  161. this.getClassifyList()
  162. this.getBannerList()
  163. this.$store.commit('getCategory')
  164. },
  165. onShareAppMessage(res) {
  166. return {
  167. title: this.headinfo.name,
  168. path: '/pages/index/index'
  169. }
  170. },
  171. onShow() {
  172. this.getUserInfo()
  173. },
  174. onPullDownRefresh() {
  175. this.getIndexHeaderInfo()
  176. this.getClassifyList()
  177. this.getBannerList()
  178. this.$store.commit('getCategory')
  179. this.getUserInfo()
  180. },
  181. computed: {
  182. ...mapState(['city', 'category', 'userInfo']),
  183. },
  184. methods: {
  185. tabsClick(item) {
  186. if(item.index){
  187. this.queryParams.classId = item.id
  188. }else{
  189. delete this.queryParams.classId
  190. }
  191. this.getData()
  192. },
  193. menuClick(url) {
  194. // 跳转页面
  195. if (url.includes('reLaunch:')) {
  196. uni.reLaunch({
  197. url : url.replace('reLaunch:', '')
  198. })
  199. }else{
  200. uni.navigateTo({
  201. url
  202. })
  203. }
  204. },
  205. //获取首页头部信息
  206. getIndexHeaderInfo(){
  207. this.$api('getIndexHeaderInfo',res =>{
  208. if(res.code == 200){
  209. this.headinfo = res.result
  210. }
  211. })
  212. },
  213. //获取菜单
  214. getClassifyList(){
  215. this.$api('getClassifyList',res =>{
  216. if(res.code == 200){
  217. this.menu = res.result
  218. }
  219. })
  220. },
  221. //获取菜单
  222. getClassifyList(){
  223. this.$api('getClassifyList',res =>{
  224. if(res.code == 200){
  225. this.menu = res.result
  226. }
  227. })
  228. },
  229. // 获取banner
  230. getBannerList(){
  231. this.$api('getBannerList', res =>{
  232. if(res.code == 200){
  233. this.bannerList = res.result
  234. }
  235. })
  236. },
  237. join(){
  238. if(!uni.getStorageSync('token')){
  239. uni.navigateTo({
  240. url: '/pages_order/auth/wxLogin'
  241. })
  242. return
  243. }
  244. // if(this.userInfo.idCardOpen == 0){
  245. // uni.showToast({
  246. // title: '审核中...',
  247. // icon:'none'
  248. // })
  249. // }else if(!this.userInfo.idCardOpen){
  250. // this.$refs.certificationPopup.open()
  251. // }else{
  252. this.$refs.sharePopup.open()
  253. // }
  254. },
  255. getUserInfo(){
  256. if(uni.getStorageSync('token')){
  257. this.$store.commit('getUserInfo')
  258. }
  259. },
  260. }
  261. }
  262. </script>
  263. <style scoped lang="scss">
  264. .page{
  265. position: relative;
  266. }
  267. image{
  268. width: 100%;
  269. height: 100%;
  270. }
  271. .Headbackground {
  272. position: absolute;
  273. width: 100%;
  274. top: 0;
  275. left: 0;
  276. padding-top: 80rpx;
  277. // background: linear-gradient(to bottom, rgb(85, 94, 123), rgb(45, 51, 73));
  278. .Toggle{
  279. margin: 10rpx 30rpx;
  280. padding: 20rpx;
  281. background-color: #00000022;
  282. color: #fff;
  283. border-radius: 40rpx;
  284. width: fit-content;
  285. display: flex;
  286. justify-content: center;
  287. align-items: center;
  288. font-size: 28rpx;
  289. }
  290. .top {
  291. display: flex;
  292. color: white;
  293. padding: 25rpx;
  294. align-items: center;
  295. position: relative;
  296. .profilePicture {
  297. width: 150rpx;
  298. height: 150rpx;
  299. image{
  300. border-radius: 20rpx;
  301. }
  302. }
  303. .UniversalWall {
  304. padding: 0rpx 20rpx;
  305. .dynamic {
  306. font-size: 40rpx;
  307. letter-spacing: 5rpx;
  308. }
  309. .dynamics {
  310. margin-top: 20rpx;
  311. font-size: 25rpx;
  312. display: flex;
  313. text {
  314. margin: 0 10rpx;
  315. }
  316. }
  317. }
  318. .join {
  319. position: absolute;
  320. right: 10rpx;
  321. top: 40rpx;
  322. width: 125rpx;
  323. height: 50rpx;
  324. background-color: $uni-color;
  325. margin-left: auto;
  326. display: flex;
  327. align-items: center;
  328. justify-content: center;
  329. border-radius: 50rpx;
  330. }
  331. }
  332. }
  333. .box{
  334. margin-top: -70rpx;
  335. background-color: #fff;
  336. border-top-left-radius: 40rpx;
  337. border-top-right-radius: 40rpx;
  338. position: relative;
  339. z-index: 9;
  340. overflow: hidden;
  341. .life {
  342. display: flex;
  343. text-align: center;
  344. padding: 10rpx 0;
  345. .mouse {
  346. width: 20%;
  347. box-sizing: border-box;
  348. display: flex;
  349. justify-content: center;
  350. align-items: center;
  351. flex-direction: column;
  352. font-size: 26rpx;
  353. flex-shrink: 0;
  354. .RentingAhouseimg {
  355. display: flex;
  356. justify-content: center;
  357. align-items: center;
  358. flex-direction: column;
  359. image{
  360. width: 70rpx;
  361. height: 70rpx;
  362. }
  363. }
  364. }
  365. }
  366. .dynamicList{
  367. padding-top: 10rpx;
  368. }
  369. }
  370. </style>