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

384 lines
7.6 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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. }
  143. },
  144. onLoad(query) {
  145. if(query.shareId){
  146. uni.setStorageSync('shareId', query.shareId)
  147. }
  148. },
  149. onShareAppMessage(res) {
  150. return {
  151. title: this.headinfo.name,
  152. path: '/pages/index/index'
  153. }
  154. },
  155. onShow() {
  156. this.getIndexHeaderInfo()
  157. this.getClassifyList()
  158. this.getBannerList()
  159. this.$store.commit('getCategory')
  160. this.getUserInfo()
  161. },
  162. onPullDownRefresh() {
  163. this.getIndexHeaderInfo()
  164. this.getClassifyList()
  165. this.getBannerList()
  166. this.$store.commit('getCategory')
  167. this.getUserInfo()
  168. },
  169. computed: {
  170. ...mapState(['city', 'category', 'userInfo']),
  171. },
  172. methods: {
  173. tabsClick(item) {
  174. if(item.index){
  175. this.queryParams.classId = item.id
  176. }else{
  177. delete this.queryParams.classId
  178. }
  179. this.getData()
  180. },
  181. menuClick(url) {
  182. // 跳转页面
  183. if (url.includes('reLaunch:')) {
  184. uni.reLaunch({
  185. url : url.replace('reLaunch:', '')
  186. })
  187. }else{
  188. uni.navigateTo({
  189. url
  190. })
  191. }
  192. },
  193. //获取首页头部信息
  194. getIndexHeaderInfo(){
  195. this.$api('getIndexHeaderInfo',res =>{
  196. if(res.code == 200){
  197. this.headinfo = res.result
  198. }
  199. })
  200. },
  201. //获取菜单
  202. getClassifyList(){
  203. this.$api('getClassifyList',res =>{
  204. if(res.code == 200){
  205. this.menu = res.result
  206. }
  207. })
  208. },
  209. //获取菜单
  210. getClassifyList(){
  211. this.$api('getClassifyList',res =>{
  212. if(res.code == 200){
  213. this.menu = res.result
  214. }
  215. })
  216. },
  217. // 获取banner
  218. getBannerList(){
  219. this.$api('getBannerList', res =>{
  220. if(res.code == 200){
  221. this.bannerList = res.result
  222. }
  223. })
  224. },
  225. join(){
  226. if(!uni.getStorageSync('token')){
  227. uni.navigateTo({
  228. url: '/pages_order/auth/wxLogin'
  229. })
  230. return
  231. }
  232. // if(this.userInfo.idCardOpen == 0){
  233. // uni.showToast({
  234. // title: '审核中...',
  235. // icon:'none'
  236. // })
  237. // }else if(!this.userInfo.idCardOpen){
  238. // this.$refs.certificationPopup.open()
  239. // }else{
  240. this.$refs.sharePopup.open()
  241. // }
  242. },
  243. getUserInfo(){
  244. if(uni.getStorageSync('token')){
  245. this.$store.commit('getUserInfo')
  246. }
  247. },
  248. }
  249. }
  250. </script>
  251. <style scoped lang="scss">
  252. .page{
  253. position: relative;
  254. }
  255. image{
  256. width: 100%;
  257. height: 100%;
  258. }
  259. .Headbackground {
  260. position: absolute;
  261. width: 100%;
  262. top: 0;
  263. left: 0;
  264. padding-top: 80rpx;
  265. // background: linear-gradient(to bottom, rgb(85, 94, 123), rgb(45, 51, 73));
  266. .Toggle{
  267. margin: 10rpx 30rpx;
  268. padding: 20rpx;
  269. background-color: #00000022;
  270. color: #fff;
  271. border-radius: 40rpx;
  272. width: fit-content;
  273. display: flex;
  274. justify-content: center;
  275. align-items: center;
  276. font-size: 28rpx;
  277. }
  278. .top {
  279. display: flex;
  280. color: white;
  281. padding: 25rpx;
  282. align-items: center;
  283. position: relative;
  284. .profilePicture {
  285. width: 150rpx;
  286. height: 150rpx;
  287. image{
  288. border-radius: 20rpx;
  289. }
  290. }
  291. .UniversalWall {
  292. padding: 0rpx 20rpx;
  293. .dynamic {
  294. font-size: 40rpx;
  295. letter-spacing: 5rpx;
  296. }
  297. .dynamics {
  298. margin-top: 20rpx;
  299. font-size: 25rpx;
  300. display: flex;
  301. text {
  302. margin: 0 10rpx;
  303. }
  304. }
  305. }
  306. .join {
  307. position: absolute;
  308. right: 10rpx;
  309. top: 40rpx;
  310. width: 125rpx;
  311. height: 50rpx;
  312. background-color: $uni-color;
  313. margin-left: auto;
  314. display: flex;
  315. align-items: center;
  316. justify-content: center;
  317. border-radius: 50rpx;
  318. }
  319. }
  320. }
  321. .box{
  322. margin-top: -70rpx;
  323. background-color: #fff;
  324. border-top-left-radius: 40rpx;
  325. border-top-right-radius: 40rpx;
  326. position: relative;
  327. z-index: 9;
  328. overflow: hidden;
  329. .life {
  330. display: flex;
  331. text-align: center;
  332. padding: 10rpx 0;
  333. .mouse {
  334. width: 20%;
  335. box-sizing: border-box;
  336. display: flex;
  337. justify-content: center;
  338. align-items: center;
  339. flex-direction: column;
  340. font-size: 26rpx;
  341. flex-shrink: 0;
  342. .RentingAhouseimg {
  343. display: flex;
  344. justify-content: center;
  345. align-items: center;
  346. flex-direction: column;
  347. image{
  348. width: 70rpx;
  349. height: 70rpx;
  350. }
  351. }
  352. }
  353. }
  354. }
  355. </style>