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

382 lines
7.6 KiB

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