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

370 lines
7.4 KiB

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