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

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