9 files modified
1 files added
| | |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //圈子点赞 |
| | | export const handleLike = (params) => { |
| | | return http.request({ |
| | | url: '/blade-circleLike/circleLike/submit', |
| | | method: 'POST', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | //圈子评论 |
| | | export const handleAddComment = (params) => { |
| | | return http.request({ |
| | | url: '/blade-circleComment/circleComment/save', |
| | | method: 'POST', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | //评论列表 |
| | | export const getComment = (params) => { |
| | | return http.request({ |
| | | url: '/blade-circleComment/circleComment/page', |
| | | method: 'GET', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | //获取小区详情 |
| | | export const getDistrictDetail=(param)=>{ |
| | | return http.request({ |
| | | url: 'blade-district/district/getDetail', |
| | | method: 'GET', |
| | | params: param |
| | | }) |
| | | } |
| | |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取快捷拨号 |
| | | export const getContact = (params) => { |
| | | return http.request({ |
| | | url: '/blade-household/household/getHouseholdOtherInfo', |
| | | method: 'GET', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | // devUrl:'http://192.168.1.50:9528', |
| | | // devUrl: 'http://192.168.0.102:9528', |
| | | // devUrl:'https://srgdjczzxtpt.com:2080/api', |
| | | devUrl: 'http://192.168.0.102:9528', |
| | | // devUrl: 'https://srgdjczzxtpt.com:2080/api', |
| | | // devUrl: 'http://192.168.0.100:9528', |
| | | devUrl: 'https://srgdjczzxtpt.com:2080/api', |
| | | minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/", |
| | | // minioBaseUrl:"http://192.168.0.103:9528/", |
| | | // minioBaseUrl: 'https://srgdjczzxtpt.com:2080/', |
| | |
| | | { |
| | | "path": "pages/circle/index", |
| | | "style": { |
| | | "enablePullDownRefresh": false, |
| | | "enablePullDownRefresh": true, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | |
| | | "path": "family/edit", |
| | | "style": { |
| | | "navigationBarTitleText": "编辑", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | | } |
| | | }, |
| | | { |
| | | "path": "district/index", |
| | | "style": { |
| | | "navigationBarTitleText": "我的小区", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | |
| | | "iconPath": "static/img/tabbar-01.png", |
| | | "text": "首页" |
| | | }, |
| | | // { |
| | | // "pagePath": "pages/circle/index", |
| | | // "iconPath": "static/img/tabbar-02.png", |
| | | // "selectedIconPath": "static/img/tabbar-02-selected.png", |
| | | // "text": "圈子" |
| | | // }, |
| | | { |
| | | "pagePath": "pages/circle/index", |
| | | "iconPath": "static/img/tabbar-02.png", |
| | | "selectedIconPath": "static/img/tabbar-02-selected.png", |
| | | "text": "圈子" |
| | | }, |
| | | { |
| | | "pagePath": "pages/user/center", |
| | | "iconPath": "static/img/tabbar-03.png", |
| | |
| | | <template> |
| | | <view class=""> |
| | | <view class=""> |
| | | <u-navbar @rightClick="rightClick" :autoBack="false"> |
| | | <view class="" slot="left"> |
| | | <u-search placeholder="搜索" v-model="keyword" :showAction="false"></u-search> |
| | | <u-navbar :autoBack="false"> |
| | | <view class="" slot="left" style="width:500rpx"> |
| | | <u-search placeholder="搜索" v-model="keyword" :clearabled="true" animation="true" :showAction="true" |
| | | @clear="clearSearch" @search="searchList" @custom="searchList"></u-search> |
| | | </view> |
| | | </u-navbar> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="topic-item" v-for="(item,index) in list" @click="navToDetail(item.id)"> |
| | | <view class="topic-item" v-for="(item,index) in list"> |
| | | <view class="flex"> |
| | | <u-avatar size="44" :src="item.avatar"></u-avatar> |
| | | <view class="ml-10 flex f-d-c"> |
| | | <u-avatar size="44" :src="item.avatar"></u-avatar> |
| | | <view class="ml-20 flex f-d-c"> |
| | | <text class="f-26 mb-10">{{item.name}}</text> |
| | | <text class="f-22 c-66">{{item.createTime}}</text> |
| | | <text class="f-24 c-66">{{item.createTime}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="topic-content f-28"> |
| | | {{item.circleText}} |
| | | </view> |
| | | <u-album v-if="item.circleImages" :urls="setImgUrl(item.circleImages)" ></u-album> |
| | | <view class="topic-action flex j-c-f-e" > |
| | | <view class="flex a-i-c"> |
| | | <u-icon name="heart-fill" color="#C4C8CB" size="24"></u-icon> |
| | | <text class="f-22 c-66 ml-10">10</text> |
| | | <u-album v-if="item.circleImages" :urls="setImgUrl(item.circleImages)" singleSize="100" |
| | | multipleSize="100"></u-album> |
| | | <view class="topic-action flex j-c-f-e"> |
| | | <view class="flex a-i-c" @click="handleThumpsUp(item.id,item.likeFlag,index)"> |
| | | <u-icon v-if="item.likeFlag == 0" name="heart-fill" color="#C4C8CB" size="24"></u-icon> |
| | | <u-icon v-if="item.likeFlag == 1" name="heart-fill" color="#CC0000" size="24"></u-icon> |
| | | <text class="f-22 c-66 ml-10">{{item.likeCount}}</text> |
| | | </view> |
| | | <view class="flex ml-30 a-i-c"> |
| | | <view class="flex ml-30 a-i-c" @click="showPopup(item)"> |
| | | <u-icon name="chat-fill" color="#C4C8CB" size="24"></u-icon> |
| | | <text class="f-22 c-66 ml-10">10</text> |
| | | <text class="f-22 c-66 ml-10">{{item.commentCount}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="float flex j-c-c a-i-c" @click="navToPublish"> |
| | | |
| | | <u-popup :show="isShowPop" :round="10" mode="bottom" @close="isShowPop = false" :closeable="true" |
| | | :safeAreaInsetBottom="true"> |
| | | <view class="popup-content"> |
| | | <view class="popup-top f-28" v-if="current.commentCount > 0"> |
| | | {{current.commentCount}}条评论 |
| | | </view> |
| | | <view class="popup-list"> |
| | | <view class="popup-empty f-28 flex j-c-c a-i-c" v-if="!commentList.length"> |
| | | 暂无评论~ |
| | | </view> |
| | | <scroll-view scroll-y="true" class="popup-scroll" v-if="commentList.length"> |
| | | <view class="comment-item flex" v-for="(i,k) in commentList" :key="k"> |
| | | <u-avatar size="40" :src="i.avatar"></u-avatar> |
| | | <view class="ml-20 flex f-d-c"> |
| | | <text class="f-26 c-99">{{i.name}}</text> |
| | | <view class="comment-content f-28"> |
| | | {{i.content}} |
| | | </view> |
| | | <text class="f-24 c-99">{{i.createTime}}</text> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="popup-bottom flex j-c-s-b a-i-c"> |
| | | <view class="popup-input"> |
| | | <input class="input-box" type="text" v-model="commentContent" placeholder="说点什么..." |
| | | placeholder-class="f-26 c-99" /> |
| | | </view> |
| | | <button v-if="commentContent" class="popup-btn bgc-main c-ff f-26" |
| | | @click="handleSubmitComment">发送</button> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | | |
| | | <view class="float flex j-c-c a-i-c" @click="navToPublish"> |
| | | <view class="float-box bgc-main flex j-c-c f-d-c a-i-c"> |
| | | <u-icon name="plus" color="#fff" size="24"></u-icon> |
| | | <u-icon name="plus" color="#fff" size="24"></u-icon> |
| | | <text class="f-26 c-ff">发布</text> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList } from "@/api/circle/circle.js" |
| | | import { minioBaseUrl } from "@/common/setting.js" |
| | | export default { |
| | | import { |
| | | getList, |
| | | handleLike, |
| | | handleAddComment, |
| | | getComment |
| | | } from "@/api/circle/circle.js" |
| | | import { |
| | | minioBaseUrl |
| | | } from "@/common/setting.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | keyword: "", |
| | | urls: [{ |
| | | src: 'https://cdn.uviewui.com/uview/album/1.jpg', |
| | | }], |
| | | roleType:0, |
| | | list:[] |
| | | roleType: 0, |
| | | list: [], |
| | | isShowPop: false, |
| | | current: "", |
| | | commentContent: "", //评论内容 |
| | | page: 1, |
| | | isSearch: false, |
| | | commentList: [] |
| | | } |
| | | }, |
| | | |
| | | onLoad(){ |
| | | let role = uni.getStorageSync('activeRole') |
| | | if(role.roleAlias == "inhabitant"){ |
| | | |
| | | onLoad() { |
| | | let role = uni.getStorageSync('activeRole') |
| | | if (role.roleAlias == "inhabitant") { |
| | | this.roleType = 0 |
| | | }else { |
| | | } else { |
| | | this.roleType = 1; |
| | | } |
| | | |
| | | this.getCircleList() |
| | | uni.$on("refreshList",()=>{ |
| | | this.getCircleList() |
| | | }) |
| | | uni.$on("refreshList", () => { |
| | | this.getCircleList() |
| | | }) |
| | | }, |
| | | |
| | | methods:{ |
| | | getCircleList(){ |
| | | getList({ |
| | | current:1, |
| | | size:20, |
| | | circleType:this.roleType |
| | | }).then(res=>{ |
| | | if(res.code == 200){ |
| | | onPullDownRefresh() { |
| | | this.getCircleList(); |
| | | setTimeout(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }, 300) |
| | | }, |
| | | |
| | | methods: { |
| | | searchList() { |
| | | this.isSearch = true; |
| | | this.page = 1; |
| | | this.list = []; |
| | | this.getCircleList() |
| | | }, |
| | | |
| | | clearSearch() { |
| | | if (!this.isSearch) return; |
| | | this.keyword = ""; |
| | | this.page = 1; |
| | | this.list = []; |
| | | this.getCircleList(); |
| | | this.isSearch = false; |
| | | }, |
| | | |
| | | getCircleList() { |
| | | let params = { |
| | | current: this.page, |
| | | size: 20, |
| | | circleType: this.roleType, |
| | | } |
| | | if (this.keyword) { |
| | | params.circleText = this.keyword; |
| | | } |
| | | getList(params).then(res => { |
| | | if (res.code == 200) { |
| | | this.list = res.data.records |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | setImgUrl(str){ |
| | | let urls = str.split(","); |
| | | let arr = []; |
| | | for(let i of urls){ |
| | | arr.push(`${minioBaseUrl}${i}`) |
| | | } |
| | | return arr; |
| | | |
| | | setImgUrl(str) { |
| | | let urls = str.split(","); |
| | | let arr = []; |
| | | for (let i of urls) { |
| | | arr.push(`${minioBaseUrl}${i}`) |
| | | } |
| | | return arr; |
| | | }, |
| | | |
| | | navToDetail(id){ |
| | | uni.navigateTo({ |
| | | url:`/subPackage/circle/detail?id=${id}` |
| | | |
| | | getCommentList() { |
| | | getComment({ |
| | | circleId: this.current.id |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.commentList = res.data.records; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | navToPublish(){ |
| | | |
| | | |
| | | //点赞 |
| | | handleThumpsUp(id, status, index) { |
| | | handleLike({ |
| | | circleId: id, |
| | | deleteFlag: status |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | if (status == 0) { |
| | | this.list[index].likeFlag = 1; |
| | | this.list[index].likeCount++ |
| | | } else { |
| | | this.list[index].likeFlag = 0; |
| | | this.list[index].likeCount-- |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | showPopup(item) { |
| | | this.current = item; |
| | | this.isShowPop = true; |
| | | this.getCommentList(); |
| | | }, |
| | | |
| | | //评论 |
| | | handleSubmitComment() { |
| | | handleAddComment({ |
| | | circleId: this.current.id, |
| | | content: this.commentContent |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: res.msg |
| | | }) |
| | | this.commentContent = "" |
| | | this.getCommentList() |
| | | this.current.commentCount = this.commentList.length; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | navToDetail(id) { |
| | | uni.navigateTo({ |
| | | url:"publish" |
| | | url: `/subPackage/circle/detail?id=${id}` |
| | | }) |
| | | }, |
| | | |
| | | navToPublish() { |
| | | uni.navigateTo({ |
| | | url: "publish" |
| | | }) |
| | | } |
| | | } |
| | |
| | | padding: 30rpx 0; |
| | | } |
| | | } |
| | | .float{ |
| | | width:120rpx; |
| | | height:120rpx; |
| | | |
| | | .float { |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border-radius: 50%; |
| | | border:1px solid #3A74F1; |
| | | border: 1px solid #3A74F1; |
| | | position: fixed; |
| | | bottom: 20%; |
| | | right:30rpx; |
| | | .float-box{ |
| | | width:110rpx; |
| | | height:110rpx; |
| | | right: 30rpx; |
| | | |
| | | .float-box { |
| | | width: 110rpx; |
| | | height: 110rpx; |
| | | border-radius: 50%; |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | .popup-content { |
| | | width: 100%; |
| | | |
| | | .popup-top { |
| | | text-align: center; |
| | | padding: 30rpx 0; |
| | | } |
| | | |
| | | .popup-list { |
| | | height: 600rpx; |
| | | padding-top: 20rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .popup-scroll { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .popup-empty{ |
| | | width:100%; |
| | | height:200rpx; |
| | | } |
| | | |
| | | .popup-bottom { |
| | | width: 100%; |
| | | padding: 20rpx; |
| | | box-sizing: border-box; |
| | | border-top: 1px solid #F5F5F5; |
| | | } |
| | | |
| | | .popup-btn { |
| | | width: 160rpx; |
| | | height: 70rpx; |
| | | line-height: 70rpx; |
| | | border-radius: 35rpx; |
| | | border: none; |
| | | margin: 0; |
| | | padding: 0; |
| | | margin: 0 0 0 20rpx; |
| | | } |
| | | |
| | | .popup-btn { |
| | | border: none; |
| | | } |
| | | |
| | | .popup-input { |
| | | // width:70%; |
| | | flex: 1; |
| | | height: 70rpx; |
| | | border-radius: 35rpx; |
| | | padding: 0 10rpx 0 30rpx; |
| | | box-sizing: border-box; |
| | | background-color: #f5f5f5; |
| | | transition: all .2s; |
| | | } |
| | | |
| | | .input-box { |
| | | width: 100%; |
| | | height: 70rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .comment-item { |
| | | padding: 20rpx; |
| | | } |
| | | |
| | | .comment-content { |
| | | padding: 14rpx 0; |
| | | } |
| | | |
| | | .tc { |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </u-grid-item>
|
| | | </u-grid>
|
| | |
|
| | | <view class="section flex j-c-s-b mt-40">
|
| | | <view class="section-item" v-for="(i,k) in contactList" :key="k" @click="navigatorPage()">
|
| | | <image class="section-item-bg" :src="i.pictureImg" mode="aspectFill"></image>
|
| | | <view class="section flex j-c-s-a a-i-c mt-40" v-if="isShowContact && curSelectSite.addressType == 1">
|
| | | <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name" >
|
| | | <image class="section-item-bg" :src="i.bgImg" mode="aspectFill"></image>
|
| | | <view class="item-box">
|
| | | <view class="f-28">{{i.name}}</view>
|
| | | <view class="f-28">{{i.title}}</view>
|
| | | <view class="flex j-c-s-b">
|
| | | <text class="f-22">{{i.remark}}</text>
|
| | | <!-- <u-icon :name="i.icon"></u-icon> -->
|
| | | <text class="f-22">{{i.name}}</text>
|
| | | <u-icon :name="i.icon" @click="callPhone(i.phone)"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | </u-grid-item>
|
| | | </u-grid>
|
| | | </view>
|
| | |
|
| | |
|
| | | <view class="" v-if="roleType == 2 && curSelectSite.addressType == 2">
|
| | | <caption-row title="工作台" />
|
| | | <u-grid :border="false" col="4">
|
| | |
| | | style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
|
| | | <u-icon name="/static/icon/menu-05.png" width="60rpx" height="60rpx"></u-icon>
|
| | | <text class="grid-text f-24 fw mt-10">场所维护</text>
|
| | | </view>
|
| | | </u-grid-item>
|
| | | <u-grid-item @click="navigatorPage('')"
|
| | | :customStyle="{paddingTop:20+'rpx'}">
|
| | | <view class="grid-item flex f-d-c a-i-c"
|
| | | style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
|
| | | <u-icon name="/static/icon/menu-02.png" width="60rpx" height="60rpx"></u-icon>
|
| | | <text class="grid-text f-24 fw mt-10">场所任务</text>
|
| | | </view>
|
| | | </u-grid-item>
|
| | | </u-grid>
|
| | |
| | | getPage
|
| | | } from "@/api/article/article";
|
| | | import {
|
| | | getBannerList
|
| | | getBannerList,
|
| | | getContact
|
| | | } from "@/api/system/index"
|
| | | import {
|
| | | minioBaseUrl
|
| | |
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)'
|
| | | },
|
| | | path: "/subPackage/workbench/views/patrol"
|
| | | },
|
| | | // {
|
| | | // icon: "/static/icon/menu-07.png",
|
| | | // text: "校园安全",
|
| | | // style: {
|
| | | // background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | // }
|
| | | // },
|
| | | // {
|
| | | // icon: "/static/icon/menu-08.png",
|
| | | // text: "旅馆安全",
|
| | | // style: {
|
| | | // background: 'linear-gradient(131deg, #FCF8FF 0%, rgba(252,248,255,0) 100%)',
|
| | | // }
|
| | | // },
|
| | | // {
|
| | | // icon: "/static/icon/menu-09.png",
|
| | | // text: "取保候审",
|
| | | // style: {
|
| | | // background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
|
| | | // }
|
| | | // }
|
| | | }
|
| | | ],
|
| | | roleType: 2, // 1网格员/系统管理员 、 2居民
|
| | | roleTypeName: "街道社区网格",
|
| | |
| | | contactList: [], //便民服务联系方式
|
| | | isShowHouse: false, //显示楼盘表
|
| | | isShowNotice: false, //显示通知公告
|
| | | bannerList: []
|
| | | isShowContact:false ,
|
| | | bannerList: [],
|
| | | navList: [{
|
| | | title: "物业",
|
| | | name: "",
|
| | | icon: "/static/icon/tel-green.png",
|
| | | bgImg: "/static/icon/nav-bg-01.png",
|
| | | phone:""
|
| | | },
|
| | | {
|
| | | title: "综治网格",
|
| | | name: "",
|
| | | icon: "/static/icon/tel-orange.png",
|
| | | bgImg: "/static/icon/nav-bg-02.png",
|
| | | phone:""
|
| | | },
|
| | | {
|
| | | title: "公安网格",
|
| | | name: "",
|
| | | icon: "/static/icon/tel-blue.png",
|
| | | bgImg: "/static/icon/nav-bg-03.png",
|
| | | phone:""
|
| | | },
|
| | | ],
|
| | | }
|
| | | },
|
| | |
|
| | |
| | | }
|
| | | })
|
| | | },
|
| | |
|
| | | |
| | | getContactList(){
|
| | | getContact({
|
| | | houseCode:this.curHouseCode
|
| | | }).then(res=>{
|
| | | let data = res.data;
|
| | | this.contactList = this.navList;
|
| | | if(data.wg){
|
| | | this.contactList[1].name = data.wg.name;
|
| | | this.contactList[1].phone = data.wg.phone
|
| | | }
|
| | | if(data.wy){
|
| | | this.contactList[0].name = data.wy.name;
|
| | | this.contactList[0].phone = data.wy.phone
|
| | | }
|
| | | if(data.ga){
|
| | | this.contactList[2].name = data.ga.name;
|
| | | this.contactList[2].phone = data.ga.phone
|
| | | }
|
| | | })
|
| | | },
|
| | | |
| | | callPhone(phone){
|
| | | uni.makePhoneCall({
|
| | | phoneNumber:phone
|
| | | })
|
| | | },
|
| | | |
| | | |
| | | |
| | | async getNoticeList() {
|
| | | const param = {
|
| | | size: 10,
|
| | |
| | |
|
| | | //获取首页菜单
|
| | | getMenuList() {
|
| | | // this.$store.dispatch("getMenuList").then(res => {
|
| | | // this.menuList = res;
|
| | | // setTimeout(() => {
|
| | | // this.liveList = this.hasMenu('生活')
|
| | | // this.contactList = this.hasMenu('快捷拨号');
|
| | | // this.jobList = this.hasMenu('工作台')
|
| | | // this.getHouseMenu();
|
| | | // this.getNoticeMenu();
|
| | | // }, 100)
|
| | | // });
|
| | | this.menuList = uni.getStorageSync("menu")
|
| | | this.liveList = this.setLiveMenu(this.hasMenu('生活'));
|
| | | this.contactList = this.hasMenu('快捷拨号');
|
| | | // this.contactList = this.hasMenu('快捷拨号');
|
| | | this.jobList = this.hasMenu('工作台')
|
| | | if (this.menuList.length) {
|
| | | this.getContactMenu();
|
| | | this.getHouseMenu();
|
| | | this.getNoticeMenu();
|
| | | }
|
| | |
| | | }
|
| | | }, 200)
|
| | | },
|
| | | |
| | | getContactMenu() {
|
| | | let list = [];
|
| | | list = this.menuList.filter(item => item.name == "快捷拨号")
|
| | | this.isShowContact = list.length ? true : false;
|
| | | if(list.length){
|
| | | this.getContactList()
|
| | | }
|
| | | },
|
| | |
|
| | | getHouseMenu() {
|
| | | let list = [];
|
| | |
| | | <text class="f-36 mb-20 fw" v-else>{{userInfo.user_name}}</text> |
| | | <!-- <text class="f-28 c-99">您好业主,欢迎回家</text> --> |
| | | </view> |
| | | <view class="flex f-d-c ml-20" v-if="!isLogin" @click="navToLogin()"> |
| | | <view class="flex f-d-c ml-20" v-if="!isLogin" @click="navToLogin()"> |
| | | <text class="f-36 mb-20 fw">未登录</text> |
| | | <!-- <text class="f-28 c-99">您好业主,欢迎回家</text> --> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="main" v-if="isLogin"> |
| | | <view class="nav bgc-ff flex j-c-s-a a-i-c"> |
| | | <view v-for="(item,index) in navList" :key="index" class="flex f-d-c a-i-c" @click="navigator(item)"> |
| | | <view class="main" v-if="isLogin"> |
| | | <view class="nav bgc-ff flex j-c-s-a a-i-c" v-if="roleType == 1"> |
| | | <view v-for="(item,index) in navList" :key="index" class="flex f-d-c a-i-c" |
| | | @click="navigator(item.url)"> |
| | | <u-icon :customStyle="{paddingTop:20+'rpx'}" :name="item.icon" width="90rpx" |
| | | height="90rpx"></u-icon> |
| | | <text class="grid-text mt-20 f-28">{{item.title}}</text> |
| | |
| | | </view> |
| | | <view class="main-cell bgc-ff"> |
| | | <view class="cell-content"> |
| | | <!-- <u-cell-group :border="false"> |
| | | <u-cell @click="navigator(item)" v-for="(item, index) in menuList" :icon="item.icon" |
| | | :title="item.title" :key="index" :border="true" :iconStyle="{width:'48rpx',height:'48rpx'}" |
| | | :isLink="true"></u-cell> |
| | | </u-cell-group> --> |
| | | <view class="cell-item flex j-c-s-b a-i-c" @click="navigator('/subPackage/user/family/list')" |
| | | v-if="roleType == 1"> |
| | | <view class="flex a-i-c"> |
| | | <u-icon name="/static/icon/menu-center-01.png" width="60rpx" height="60rpx"></u-icon> |
| | | <text class="f-30 ml-20">我的家人</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#999"></u-icon> |
| | | </view> |
| | | |
| | | <view class="cell-item flex j-c-s-b a-i-c" v-for="(item,index) in menuList" :key="index" |
| | | @click="navigator(item)"> |
| | | @click="navigator(item.url)"> |
| | | <view class="flex a-i-c"> |
| | | <u-icon :name="item.icon" width="60rpx" height="60rpx"></u-icon> |
| | | <text class="f-30 ml-20">{{item.title}}</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#999"></u-icon> |
| | | </view> |
| | | |
| | | <view class="cell-item flex j-c-s-b a-i-c" @click="logOut()"> |
| | | <view class="flex a-i-c"> |
| | | <u-icon name="/static/icon/menu-center-04.png" width="60rpx" height="60rpx"></u-icon> |
| | | <text class="f-30 ml-20">退出登录</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#999"></u-icon> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | menuList: [{ |
| | | icon: "/static/icon/menu-center-01.png", |
| | | title: "我的家人", |
| | | url: "/subPackage/user/family/list" |
| | | }, |
| | | { |
| | | icon: "/static/icon/menu-center-02.png", |
| | | title: "切换角色", |
| | | url: "/subPackage/user/role/index" |
| | |
| | | icon: "/static/icon/menu-center-03.png", |
| | | title: "修改密码", |
| | | url: "/subPackage/user/password/index" |
| | | }, |
| | | { |
| | | icon: "/static/icon/menu-center-04.png", |
| | | title: "退出登录", |
| | | url: "" |
| | | }, |
| | | } |
| | | ], |
| | | navList: [{ |
| | | icon: "/static/icon/nav-center-01.png", |
| | |
| | | { |
| | | icon: "/static/icon/nav-center-02.png", |
| | | title: "我的小区", |
| | | url: "" |
| | | url: "/subPackage/user/district/index" |
| | | }, |
| | | { |
| | | icon: "/static/icon/nav-center-03.png", |
| | | title: "出租信息", |
| | | url: "/subPackage/bs/views/zhsb" |
| | | }, |
| | | ] |
| | | ], |
| | | roleType: 1 |
| | | // userInfo:{} |
| | | } |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | let role = uni.getStorageSync('activeRole') |
| | | if (role.roleAlias == "inhabitant") { |
| | | this.roleType = 1 |
| | | } else { |
| | | this.roleType = 2; |
| | | } |
| | | }, |
| | | |
| | |
| | | this.$u.func.globalNavigator(url, "switchTab") |
| | | }, |
| | | |
| | | navigator(item) { |
| | | if (item.title == '退出登录') { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "是否要退出该账号?", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.logOut() |
| | | } |
| | | } |
| | | }) |
| | | } else if(item.title == '我的小区'){ |
| | | uni.showToast({ |
| | | title:"功能开发中~", |
| | | icon:"none" |
| | | }) |
| | | }else { |
| | | this.$u.func.globalNavigator(item.url) |
| | | } |
| | | navigator(url) { |
| | | this.$u.func.globalNavigator(url) |
| | | }, |
| | | |
| | | navToLogin(){ |
| | | |
| | | |
| | | |
| | | |
| | | navToLogin() { |
| | | uni.redirectTo({ |
| | | url: "/pages/login/login-account" |
| | | }) |
| | | }, |
| | | |
| | | logOut() { |
| | | uni.setStorageSync("responIndex", 0) |
| | | uni.clearStorageSync() |
| | | uni.reLaunch({ |
| | | url: "/pages/login/login-account" |
| | | |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "是否要退出该账号?", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.setStorageSync("responIndex", 0) |
| | | uni.clearStorageSync() |
| | | uni.reLaunch({ |
| | | url: "/pages/login/login-account" |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | icon: "none" |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | selectOption(id, index) { |
| | | let item = this.voteTopicList[index]; |
| | | item.selected = id; |
| | | this.$set(this.voteTopicList, index, item); |
| | | }, |
| | | selectOption(id, index) { |
| | | let item = this.voteTopicList[index]; |
| | | item.selected = id; |
| | | this.$set(this.voteTopicList, index, item); |
| | | }, |
| | | |
| | | getParams() { |
| | | let list = JSON.parse(JSON.stringify(this.voteTopicList)); |
| | | let arr = []; |
| | | for (let i of list) { |
| | | if (i.selected) { |
| | | delete i.children; |
| | | i.selected = JSON.stringify(i.selected) |
| | | arr.push(i) |
| | | } |
| | | } |
| | | return arr; |
| | | }, |
| | | |
| | | //提交投票 |
| | | submitVote() { |
| | | if (this.computeEndTime > 0) { |
| | | let data = this.getParams() |
| | | communityModel.addVoteOperate(data).then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: "操作成功" |
| | | }) |
| | | this.$nextTick(() => { |
| | | this.getApplyDetail(); |
| | | this.getVoteList(); |
| | | }) |
| | | getParams() { |
| | | let list = JSON.parse(JSON.stringify(this.voteTopicList)); |
| | | let arr = []; |
| | | for (let i of list) { |
| | | if (i.selected) { |
| | | delete i.children; |
| | | i.selected = JSON.stringify(i.selected) |
| | | arr.push(i) |
| | | } |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: "投票已结束", |
| | | icon: "none" |
| | | } |
| | | return arr; |
| | | }, |
| | | |
| | | //提交投票 |
| | | submitVote() { |
| | | if (this.computeEndTime > 0) { |
| | | let data = this.getParams() |
| | | communityModel.addVoteOperate(data).then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: "操作成功" |
| | | }) |
| | | this.$nextTick(() => { |
| | | this.getApplyDetail(); |
| | | this.getVoteList(); |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: "投票已结束", |
| | | icon: "none" |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | navToComment() { |
| | | uni.navigateTo({ |
| | | url: `comment?id=${this.params.id}` |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | navToComment() { |
| | | uni.navigateTo({ |
| | | url: `comment?id=${this.params.id}` |
| | | }) |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| New file |
| | |
| | | <template> |
| | | <view class=""> |
| | | <view class="bgc-ff"> |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>小区名称</text> |
| | | <text>{{detail.name}}</text> |
| | | </view> |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>居委会名称</text> |
| | | <text>{{detail.communityName}}</text> |
| | | </view> |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>房屋住址</text> |
| | | <text class="address">{{detail.address}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="box bgc-ff" v-if="detail.remark"> |
| | | <view class="caption f-28"> |
| | | 小区简介 |
| | | </view> |
| | | <view class="f-30"> |
| | | {{detail.remark}} |
| | | </view> |
| | | </view> |
| | | <view class="box bgc-ff" v-if="images.length"> |
| | | <view class="caption f-28"> |
| | | 小区照片 |
| | | </view> |
| | | <u-album :urls="images" singleSize="100" multipleSize="100"></u-album> |
| | | </view> |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDistrictDetail |
| | | } from "@/api/house/house.js" |
| | | import { |
| | | minioBaseUrl |
| | | } from "@/common/setting.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | detail: {}, |
| | | images: [] |
| | | } |
| | | }, |
| | | |
| | | onLoad() { |
| | | this.getDetail() |
| | | }, |
| | | |
| | | methods: { |
| | | getDetail() { |
| | | getDistrictDetail({ |
| | | houseCode: uni.getStorageSync("siteInfo").houseCode |
| | | }).then(res => { |
| | | this.detail = res.data; |
| | | if (res.data.picUrl) { |
| | | this.images = this.setImageUrl(res.data.picUrl); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | setImageUrl(str) { |
| | | let urls = str.split(",") |
| | | let temp = []; |
| | | for (let i of urls) { |
| | | temp.push(`${minioBaseUrl}${i}`) |
| | | } |
| | | return temp |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #f5f5f5; |
| | | } |
| | | |
| | | .item-row { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .address { |
| | | width: 70%; |
| | | text-align: right; |
| | | } |
| | | |
| | | .box { |
| | | padding: 0 30rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .caption { |
| | | padding: 30rpx 0; |
| | | } |
| | | </style> |