| api/article/article.js | ●●●●● patch | view | raw | blame | history | |
| mixin/uploadMixin.js | ●●●●● patch | view | raw | blame | history | |
| pages.json | ●●●●● patch | view | raw | blame | history | |
| pages/circle/index.vue | ●●●●● patch | view | raw | blame | history | |
| pages/circle/publish.vue | ●●●●● patch | view | raw | blame | history | |
| pages/home/index.vue | ●●●●● patch | view | raw | blame | history | |
| pages/user/center.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/article/comment.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/article/communityList.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/article/detail.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/task/index.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/workbench/views/editExamine.vue | ●●●●● patch | view | raw | blame | history |
api/article/article.js
@@ -27,4 +27,24 @@ ...params } }) } //获取文章评论 export const getCommentList = (params) => { return http.request({ url: '/blade-articleComment/articleComment/page', method: 'GET', params: { ...params } }) } //添加评论 export const addComment = (params) => { return http.request({ url: '/blade-articleComment/articleComment/save', method: 'POST', data: params }) } mixin/uploadMixin.js
@@ -1,5 +1,5 @@ import { minioBaseUrl, prodUrl, clientId, clientSecret } from '@/common/setting' @@ -22,7 +22,7 @@ maxCount: "5", previewFullImage: true, uploadText: "上传中", url: minioBaseUrl + "blade-resource/oss/endpoint/put-file", url: prodUrl + "/blade-resource/oss/endpoint/put-file", header: {}, }, } pages.json
@@ -31,10 +31,8 @@ { "path": "pages/circle/index", "style": { "navigationBarTitleText": "圈子", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black" "navigationStyle": "custom" } } @@ -111,6 +109,24 @@ "path": "detail", "style": { "navigationBarTitleText": "详情", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black" } }, { "path": "comment", "style": { "navigationBarTitleText": "评论", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black" } }, { "path": "communityList", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black" @@ -568,12 +584,12 @@ "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", pages/circle/index.vue
@@ -1,7 +1,22 @@ <template> <view class=""> <u-navbar @rightClick="rightClick" :autoBack="false"> <view class="" slot="left"> <u-search placeholder="日照香炉生紫烟" v-model="keyword" :showAction="false"></u-search> </view> </u-navbar> </view> </template> <script> export default{ data(){ return{ keyword:"" } } } </script> <style> pages/circle/publish.vue
@@ -1,4 +1,5 @@ <template> </template> <script> pages/home/index.vue
@@ -72,11 +72,11 @@ <caption-row title="社区" /> <view class="mt-20"> <u-grid :border="false" col="4"> <u-grid-item @click="navigatorPage(`/subPackage/article/list?type=0`)"> <u-grid-item @click="navigatorPage(`/subPackage/article/communityList?type=0`)"> <u-icon name="/static/icon/nav-09.png" width="90rpx" height="70rpx"></u-icon> <text class="f-26 mt-10">公益报名</text> </u-grid-item> <u-grid-item @click="navigatorPage(`/subPackage/article/list?type=1`)"> <u-grid-item @click="navigatorPage(`/subPackage/article/communityList?type=1`)"> <u-icon name="/static/icon/nav-10.png" width="90rpx" height="70rpx"></u-icon> <text class="f-26 mt-10">选举调查</text> </u-grid-item> @@ -531,6 +531,13 @@ }) return } if(path == '/subPackage/user/clockIn/index'){ uni.showToast({ title:"功能开发中~", icon:"none" }) return; } this.$u.func.globalNavigator(`${path}?houseCode=${this.curHouseCode}`, "navTo") } }, @@ -547,7 +554,7 @@ console.log(obj) // let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId // let url = "/subPackage/workbench/views/cscj?houseCode=" + obj.stdId let url = `/subPackage/house/houseNumber/index?houseCode=${obj.stdId}` let url = `/subPackage/house/houseNumber/index?stdId=${obj.stdId}` that.$u.func.globalNavigator(url, "navTo") } }); pages/user/center.vue
@@ -105,7 +105,12 @@ } } }) } else { } else if(item.title == '我的小区'){ uni.showToast({ title:"功能开发中~", icon:"none" }) }else { this.$u.func.globalNavigator(item.url) } }, subPackage/article/comment.vue
New file @@ -0,0 +1,59 @@ <template> <view class="container"> <view class="content"> <u-textarea v-model="content" placeholder="请输入内容" ></u-textarea> </view> <button class="submit-btn bgc-main c-ff f-30" @click="submitInfo">提交</button> </view> </template> <script> import { addComment} from "@/api/article/article.js" export default{ data(){ return { content:"", articleId:"" } }, onLoad(option){ this.articleId = option.id; }, methods:{ submitInfo(){ if(!this.content)return addComment({ content:this.content, articleId:this.articleId }).then(res=>{ if(res.code == 200){ uni.showToast({ title:"提交成功!" }) uni.$emit("refreshComment") setTimeout(()=>{ uni.navigateBack(); },1000) } }) } } } </script> <style> .container{ padding:30rpx 30rpx 0; } .content{ margin-bottom:50rpx; } .submit-btn{ width:100%; height:80rpx; line-height:80rpx; border:none; border-radius: 40rpx; } </style> subPackage/article/communityList.vue
New file @@ -0,0 +1,140 @@ <template> <view class=""> <!-- <view class="tab" v-if="tabList.length"> <u-tabs :list="tabList" :current="tabIndex" keyName="dictValue" @change="changeTab" :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs> </view> --> <view class="list bgc-ff"> <notice-list :data="list" /> </view> <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line /> </view> </template> <script> import { getPage, getCategory } from "@/api/article/article.js"; import noticeList from "@/components/noticeList/noticeList.vue" export default { components: { noticeList }, data() { return { tabList: [], tabId: "", tabIndex: 0, list: [], currentPage: 1, loadingStatus: 'nomore', eventType: "" } }, onLoad(option) { this.eventType = option.type; if (option.type == 0) { uni.setNavigationBarTitle({ title: "公益报名" }) } else { uni.setNavigationBarTitle({ title: "选举调查" }) } this.getNoticeList() }, onReachBottom() { this.currentPage++ this.getPageList() }, methods: { changeTab(e) { this.tabIndex = e.index; this.tabId = e.dictKey; this.list = []; this.currentPage = 1; this.getNoticeList() }, getCateList() { getCategory({ parentId: '1722966265111248897', }).then(res => { console.log(res) let data = res.data; data.unshift({ dictKey: "", dictValue: "全部" }) this.tabList = data; // this.tabId = data[0].dictKey; this.getNoticeList() }) }, async getNoticeList() { this.loadingStatus = 'loadingmore' const param = { size: 10, current: this.currentPage, articleType: this.tabId, eventType: this.eventType } const res = await getPage(param) const { code, data: { records } } = res if (code != 200) { uni.showToast({ title: '数据请求失败', icon: 'error' }) return } this.list = [...this.list, ...records] this.loadingStatus = 'nomore' }, navTo(id, type) { this.$u.func.globalNavigator(`detail?id=${id}&type=${type}`, "navTo") } } } </script> <style lang="scss"> page { background-color: #f5f5f5; } .tab { width: 100%; height: 88rpx; position: fixed; /*#ifdef H5*/ top: 88rpx; /*#endif*/ /*#ifdef MP-WEIXIN*/ top: 0; /*#endif*/ left: 0; background-color: #fff; padding: 0 30rpx; box-sizing: border-box; z-index: 999; } .list { // margin-top: 108rpx; padding: 0 30rpx; } </style> subPackage/article/detail.vue
@@ -7,7 +7,7 @@ <!-- <view class="flex a-i-c mr-40"> <u-icon name="thumb-up-fill" color="#CECECE"></u-icon> <text class="f-22 ml-10">120</text> </view> --> </view> --> <view class="flex a-i-c"> <tag-cell :text="detailInfo.dictValue"></tag-cell> <view class="flex a-i-c ml-20"> @@ -31,67 +31,111 @@ <view class="select-row flex j-c-s-b a-i-c"> <text class="f-28">房屋</text> <view class="select-row-content flex a-i-c"> <text class="f-26 c-99 mr-20">{{siteInfo.name}}</text> <text class="f-26 c-99 mr-20">{{curSite.name}}</text> <!-- <u-icon name="arrow-right" color="#999"></u-icon> --> </view> </view> <view class="apply"> <view class="flex f-d-c a-i-c" v-if="applyList.length"> <view class="flex mb-20"> <image v-for="i in applyList" class="apply-user" src="/static/icon/user-01.png" mode="aspectFill"> <image v-for="i in applyList" class="apply-user" src="/static/icon/user-01.png" mode="aspectFill"> </image> </view> <text class="f-28 c-99">共{{applyList.length}}人</text> </view> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime > 0" @click="handleApply()" :disabled="applyInfo.userId">{{applyInfo.userId?"已报名":"报名"}}</button> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime <= 0" :disabled="true">已结束</button> <button v-if="computeEndTime > 0 && !applyInfo.userId" class="apply-btn bgc-main c-ff " @click="handleApply()">报名</button> <button v-if="applyInfo.userId" class="apply-btn bgc-lightblue c-main border-current" @click="handleApply()">已报名</button> <button v-if="computeEndTime <= 0" class="apply-btn bgc-lightblue c-main border-current">已结束</button> </view> </view> <view class="mt-20" v-if="eventType == 1 && voteTopicList.length"> <view class="select-row flex j-c-s-b a-i-c mb-20"> <text class="f-28">房屋</text> <view class="select-row-content flex a-i-c"> <text class="f-26 c-99 mr-20">{{curSite.name}}</text> <!-- <u-icon name="arrow-right" color="#999"></u-icon> --> </view> </view> <view class="explain-row c-main f-28"> 投票进行中 投票{{computeEndTime > 0 || !isSubmit?"进行中":"已结束"}} </view> <view class="vote bgc-ff"> <view class="" v-for="(item,index) in voteTopicList" :key="index"> <view class="vote-title f-30 fw"> {{item.discussContent}} <view class="mb-20" v-for="(item,index) in voteTopicList" :key="index"> <view class="vote-title"> <text class="f-30 fw">{{item.discussContent}}</text> <text class="f-26 ml-10">{{item.optionRange == 0?"(单选)":"(多选)"}}</text> </view> <view class="" v-if="item.optionRange == 0"> <u-radio-group iconPlacement="right" activeColor="#017BFC" placement="column" <u-radio-group size="22" iconPlacement="right" activeColor="#017BFC" placement="column" v-model="item.selected" @change="selectOption($event,index)" :disabled="isSubmit"> <view class="mb-20" v-for="(i,k) in item.children"> <view class="mb-30" v-for="(i,k) in item.children"> <u-radio :label="i.optionContent" :name="i.id"></u-radio> <view class="flex j-c-s-b a-i-c mt-10"> <uv-line-progress height="10"></uv-line-progress> <view class="mt-10" style="width:80%;"> <uv-line-progress height="6" :showText="false" :percentage="getRatio(i.number)" activeColor="#017BFC"></uv-line-progress> </view> <text class="c-99 f-28" v-if="i.number">{{i.number}}人</text> </view> </view> </u-radio-group> </view> <view class="" v-if="item.optionRange == 1"> <u-checkbox-group iconPlacement="right" activeColor="#017BFC" placement="column" v-model="item.selected" :disabled="isSubmit" @change="selectOption($event,index)"> <view class="mb-20" v-for="(i,k) in item.children" :key="k"> <u-checkbox-group size="22" iconPlacement="right" activeColor="#017BFC" placement="column" v-model="item.selected" :disabled="isSubmit" @change="selectOption($event,index)" shape="circle" labelColor="#333"> <view class="mb-30" v-for="(i,k) in item.children" :key="k"> <u-checkbox :label="i.optionContent" :name="i.id"></u-checkbox> <view class="flex j-c-s-b a-i-c mt-10"> <!-- <uv-line-progress :percentage="10" height="10"></uv-line-progress> --> <uv-line-progress height="10"></uv-line-progress> <view class="mt-10" style="width:80%;"> <uv-line-progress height="6" :showText="false" :percentage="getRatio(i.number)" activeColor="#017BFC"></uv-line-progress> </view> <text class="c-99 f-28" v-if="i.number">{{i.number}}人</text> </view> </view> </u-checkbox-group> </view> </view> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime > 0" @click="submitVote()" :disabled="isSubmit">{{isSubmit?"已提交":"提交"}}</button> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime <= 0" :disabled="true">已结束</button> <button class="apply-btn bgc-main c-ff" v-if="computeEndTime > 0 && !isSubmit" @click="submitVote()">提交</button> <button class="apply-btn bgc-gray c-d1" v-if="isSubmit">已提交</button> <button class="apply-btn bgc-gray c-d1" v-if="computeEndTime <= 0">已结束</button> </view> </view> </view> <view class="comment bgc-ff mt-20" v-if="commentList.length"> <caption-row title="用户评论" /> <view class="comment-list "> <view class="comment-item flex " v-for="(item,index) in commentList" :key="index"> <u-avatar size="45" src="/static/icon/user-01.png"></u-avatar> <view class="comment-item-content"> <view class="flex j-c-s-b a-i-c mb-20"> <text class="f-28 c-99">{{item.name}}</text> <text class="c-99 f-24">{{item.createTime}}</text> </view> <view class="f-30"> {{item.content}} </view> </view> </view> </view> </view> <view class="footer"> <u-search searchIcon='edit-pen' :showAction="true" actionText="写评论" :animation="true" disabled @click="navToComment"></u-search> </view> <!-- <view class="action flex flex_base"> <view class="action-item flex_base bgc-main"> @@ -106,16 +150,16 @@ <script> import { getDetail getDetail, getCommentList } from '@/api/article/article.js' import * as communityModel from "@/api/community/community.js" import tagCell from '@/components/noticeList/tagCell.vue' import { jsonString } from '../../uni_modules/uv-ui-tools/libs/function/test' import captionRow from "@/components/caption/caption.vue" export default { components: { tagCell tagCell, captionRow }, data() { return { @@ -125,12 +169,13 @@ eventType: null, detailInfo: {}, pdId: "", siteInfo: {}, curSite: {}, applyList: [], applyInfo: {}, isLoad: false, voteTopicList: [], isSubmit: false // 是否已提交投票 isSubmit: false, // 是否已提交投票 commentList: [] } }, onLoad(option) { @@ -139,9 +184,13 @@ this.$set(this.params, "eventType", option.type); this.eventType = option.type; this.pdId = option.pdId; this.siteInfo = uni.getStorageSync("siteInfo") this.curSite = uni.getStorageSync("siteInfo") } this.getDetailInfo() this.getAritcleComment(); uni.$on('refreshComment', () => { this.getAritcleComment() }) }, computed: { @@ -158,6 +207,10 @@ return Number(val) }, getRatio(num) { return Number(num / this.applyInfo.numberRestrictions) * 100 }, getDetailInfo() { getDetail(this.params).then(res => { this.isLoad = true; @@ -171,6 +224,17 @@ if (this.eventType == 1) { this.getVoteList(); } }) }, //获取评论 getAritcleComment() { getCommentList({ page: 1, size: 20, articleId:this.params.id }).then(res => { this.commentList = res.data.records; }) }, @@ -207,12 +271,12 @@ let data = res.data; if (data.length) { for (let i of data) { if(i.selected){ if (i.selected) { if (typeof i.selected == "string" && i.optionRange == 0) { this.isSubmit = true; i.selected = Number(i.selected) } if(typeof i.selected == "string" && i.optionRange == 1){ if (typeof i.selected == "string" && i.optionRange == 1) { this.isSubmit = true; i.selected = JSON.parse(i.selected) } @@ -278,6 +342,12 @@ }) } }) }, navToComment() { uni.navigateTo({ url: `comment?id=${this.params.id}` }) } } } @@ -312,6 +382,10 @@ background-color: #C4C4C4; } .bgc-lightblue { background-color: rgb(236, 244, 255); } .explain-row { background-color: rgb(236, 244, 255); padding: 20rpx; @@ -320,7 +394,7 @@ .select-row { padding: 30rpx; background-color: #fff; box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); // box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); border-top: 1px solid #f5f5f5; .select-row-content { @@ -339,18 +413,32 @@ margin-right: -15rpx; border: 1px solid #fff; } } .apply-btn { width: 100%; width: 400rpx; height: 80rpx; line-height: 80rpx; margin: 30rpx auto 0; border: none; border-radius: 40rpx; font-size: 30rpx; } .apply-btn:after { border: none; } .border-current { border: 1px solid currentColor } .bgc-gray { background-color: #fafafa; } .c-d1 { color: #d1d1d1; } .vote { @@ -360,4 +448,60 @@ padding: 30rpx 0; } } .comment { width: 100%; padding: 0 30rpx 160rpx; box-sizing: border-box; } .comment-list { width: 100%; padding-top:20rpx; .comment-item { width: 100%; padding: 20rpx 0; } .comment-item-content { flex: 1; margin-left: 20rpx; } } .footer { width: 100%; padding: 20rpx 30rpx; box-sizing: border-box; background-color: #fff; position: fixed; bottom: 0; left: 0; z-index: 10; border-top: 1px solid #f5f5f5; } /deep/ .u-radio { margin-right: 0 !important; } /deep/ .u-radio__icon-wrap { border-style: none !important; } /deep/ .u-checkbox__icon-wrap { border-style: none !important; } /deep/ .u-radio__text { color: #333 !important; } /deep/ .u-checkbox text:nth-child(2) { color: #333 !important; } .mb-30 { margin-bottom: 30rpx; } </style> subPackage/task/index.vue
@@ -26,7 +26,16 @@ <view class="caption"> <view class="flex a-i-c"> <view class="line"></view> <text class="f-32 fw">公安</text> <text class="f-32 fw">综治任务</text> </view> </view> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/cshw')"> <text class="f-28">场所审核</text> <view class="flex"> <!-- <text class="f-28 c-99">待处理</text> <view class="dot bgc-main">3</view> --> <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/report')"> @@ -50,7 +59,7 @@ </view> </view> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/task/taskList')"> <text class="f-28">标签报事</text> <text class="f-28">标签事件</text> <view class="flex"> <block v-if="comprehensiveTask > 0"> <text class="f-28 c-99">待处理</text> @@ -59,17 +68,28 @@ <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> <!-- <view class="nav-item flex j-c-s-b a-i-c"> <text class="f-28">工作日志</text> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo()"> <text class="f-28">走访提醒</text> <view class="flex"> <text class="f-28 c-99">待处理</text> <view class="dot bgc-main">3</view> <!-- <text class="f-28 c-99">待处理</text> <view class="dot bgc-main">3</view> --> <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> --> </view> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/rental')"> <text class="f-28">出租房管理</text> <view class="flex"> <block v-if="countInfo.chuzhu > 0"> <text class="f-28 c-99">待处理</text> <view class="dot bgc-main">{{countInfo.chuzhu}}</view> </block> <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> </view> <view class="nav bgc-ff mb-20"> <!-- <view class="nav bgc-ff mb-20"> <view class="caption"> <view class="flex a-i-c"> <view class="line"></view> @@ -86,18 +106,18 @@ <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> </view> </view> --> <view class="nav bgc-ff mb-20"> <view class="caption"> <view class="flex a-i-c"> <view class="line"></view> <text class="f-32 fw">综治</text> <text class="f-32 fw">公安任务</text> </view> </view> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/task/taskList')"> <text class="f-28">综治任务</text> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo()"> <text class="f-28">取保候审</text> <view class="flex"> <block v-if="comprehensiveTask > 0"> <block v-if="false"> <text class="f-28 c-99">待处理</text> <view class="dot bgc-main">{{countInfo.comprehensiveTask}}</view> </block> @@ -150,7 +170,14 @@ navTo(url) { this.$u.func.globalNavigator(url) if(url){ this.$u.func.globalNavigator(url) }else { uni.showToast({ title:"功能开发中~", icon:"none" }) } } } subPackage/workbench/views/editExamine.vue
@@ -36,7 +36,7 @@ <u-upload :fileList="form.planImageUrls" :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" uploadIcon="/static/icon/upload.png" :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg" :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'planImageUrls')" @delete="deletePic"> </u-upload> </view>