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

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