Lou
2024-01-26 abd6c0f20c7801f434f6124d7c3e46ac57072a34
我的评论、我的评价
4 files modified
1 files added
228 ■■■■■ changed files
pages.json 9 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 60 ●●●● patch | view | raw | blame | history
pages/user/center.vue 8 ●●●● patch | view | raw | blame | history
subPackage/user/commentList/commentList.vue 75 ●●●● patch | view | raw | blame | history
subPackage/user/commentList/evaluateList.vue 76 ●●●●● patch | view | raw | blame | history
pages.json
@@ -155,6 +155,15 @@
                {
                    "path": "commentList/commentList",
                    "style": {
                        "navigationBarTitleText": "我的评论",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                },
                {
                    "path": "commentList/evaluateList",
                    "style": {
                        "navigationBarTitleText": "我的评价",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
pages/home/index.vue
@@ -695,40 +695,40 @@
                        unitCode,
                        buildingCode
                    } = res.data;
                    // if (isJur == 1) {
                    if (doorplateType == "户室牌") {
                        this.$u.func.globalNavigator(
                            `/subPackage/house/roomDetails/index?id=${code}&from=scan`, "navTo")
                    } else if (doorplateType == "中门牌") {
                        if (addressLevel == 4) { //自建房
                    if (isJur == 1) {
                        if (doorplateType == "户室牌") {
                            this.$u.func.globalNavigator(
                                `/subPackage/house/roomDetails/detail?code=${code}`, "navTo")
                        } else { //商铺
                                `/subPackage/house/roomDetails/index?id=${code}&from=scan`, "navTo")
                        } else if (doorplateType == "中门牌") {
                            if (addressLevel == 4) { //自建房
                                this.$u.func.globalNavigator(
                                    `/subPackage/house/roomDetails/detail?code=${code}`, "navTo")
                            } else { //商铺
                                this.$u.func.globalNavigator(
                                    `/subPackage/house/houseNumber/index?stdId=${code}`, "navTo")
                            }
                        } else if (doorplateType == "楼幢牌") {
                            let url = "/subPackage/house/family/index"
                            this.$u.func.globalNavigator(
                                `/subPackage/house/houseNumber/index?stdId=${code}`, "navTo")
                                `${url}?id=${code}&address=${addressName}&neiName=${neiName}&housingName=${aoiName}&buildingName=${buildingName}&buildingCode=${buildingCode}&aoiCode=${aoiCode}&neiCode=${neiCode}`,
                                "navTo")
                        } else if (doorplateType == "单元牌") {
                            let url = "/subPackage/house/family/index"
                            this.$u.func.globalNavigator(
                                `${url}?id=${code}&address=${addressName}&neiName=${neiName}&housingName=${aoiName}&buildingName=${buildingName}&unitName=${unitName}&unitCode=${unitCode}&neiCode=${neiCode}&buildingCode=${buildingCode}`,
                                "navTo")
                        } else if (doorplateType == "大门牌") {
                            this.$u.func.globalNavigator(
                                `/subPackage/house/list/index?id=${code}&title=${aoiName}&neiName=${neiName}&address=${addressName}&neiCode=${neiCode}&aoiCode=${aoiCode}`,
                                "navTo")
                        }
                    } else if (doorplateType == "楼幢牌") {
                        let url = "/subPackage/house/family/index"
                        this.$u.func.globalNavigator(
                            `${url}?id=${code}&address=${addressName}&neiName=${neiName}&housingName=${aoiName}&buildingName=${buildingName}&buildingCode=${buildingCode}&aoiCode=${aoiCode}&neiCode=${neiCode}`,
                            "navTo")
                    } else if (doorplateType == "单元牌") {
                        let url = "/subPackage/house/family/index"
                        this.$u.func.globalNavigator(
                            `${url}?id=${code}&address=${addressName}&neiName=${neiName}&housingName=${aoiName}&buildingName=${buildingName}&unitName=${unitName}&unitCode=${unitCode}&neiCode=${neiCode}&buildingCode=${buildingCode}`,
                            "navTo")
                    } else if (doorplateType == "大门牌") {
                        this.$u.func.globalNavigator(
                            `/subPackage/house/list/index?id=${code}&title=${aoiName}&neiName=${neiName}&address=${addressName}&neiCode=${neiCode}&aoiCode=${aoiCode}`,
                            "navTo")
                    } else {
                        uni.showModal({
                            title: "提示!",
                            content: "该区域不是您管辖范围",
                            showCancel: false
                        })
                    }
                    // } else {
                    //     uni.showModal({
                    //         title: "提示!",
                    //         content: "该区域不是您管辖范围",
                    //         showCancel: false
                    //     })
                    // }
                })
            },
pages/user/center.vue
@@ -47,6 +47,12 @@
                <u-cell v-if="siteInfo.addressType == 2" title="我的事件" isLink url="/subPackage/user/event/event">
                    <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image>
                </u-cell>
                <u-cell v-if="roleType == 1" title="我的评价" isLink url="/subPackage/user/commentList/evaluateList">
                    <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image>
                </u-cell>
                <u-cell v-if="roleType == 1" title="我的评论" isLink url="/subPackage/user/commentList/commentList">
                    <image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image>
                </u-cell>
                <u-cell title="修改密码" :border="false" isLink url="/subPackage/user/password/index">
                    <image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image>
                </u-cell>
@@ -108,11 +114,9 @@
        },
        methods: {
            setAvatar(avatar) {
                return `${minioBaseUrl}${avatar}`
            },
            getUserInfo() {
                let id = uni.getStorageSync("userInfo").user_id;
subPackage/user/commentList/commentList.vue
@@ -2,14 +2,16 @@
    <view class="">
        <z-paging ref="paging" v-model="list" @query="queryList" :refresher-enabled="false"
            loading-more-no-more-text="没有更多了">
            <view class="bgc-ff">
                <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
                    :activeStyle="{color:'#017BFC'}" :scrollable="false">
                </u-tabs>
            </view>
            <view class="">
            <view class="list" v-for="(i,k) in list">
                <view class="f-24 c-99 mb-20">
                    {{i.createTime}}
                </view>
                <view class="f-28 mb-20">
                    {{i.content}}
                </view>
                <view class="list-box f-28" v-if="i.title" @click="navTo(i.articleId)">
                    {{i.title}}
                </view>
            </view>
        </z-paging>
    </view>
@@ -19,6 +21,9 @@
    import {
        getTenementComment
    } from "@/api/grid/grid.js"
    import {
        getCommentList
    } from '@/api/article/article.js'
    export default {
        data() {
            return {
@@ -36,45 +41,41 @@
            }
        },
        methods: {
            changeTab(e) {
                this.tabIndex = e.index;
                this.$refs.paging.reload()
            },
            queryList(pageNo, pageSize) {
                if (this.tabIndex == 0) {
                    this.getTenementCommentList(pageNo, pageSize)
                } else {
                    this.getArticleCommentList(pageNo, pageSize)
                }
            },
            getTenementCommentList(page, size) {
                getTenementComment({
                    isRec: 1,
                    page: page,
                    size: size,
                    propertyCompanyId: this.id,
                    checkStatus: 2,
                    createUser: uni.getStorageSync("userInfo").user_id
                getCommentList({
                    page: pageNo,
                    size: pageSize
                }).then(res => {
                    console.log(res)
                    this.$refs.paging.complete(res.data.records);
                })
            },
            getArticleCommentList(page, size) {
            }
            navTo(id) {
                uni.navigateTo({
                    url: `/subPackage/article/detail?id=${id}`
                })
            },
        }
    }
</script>
<style>
<style lang="scss">
    page {
        background-color: #f5f5f5;
    }
    .list {
        padding: 20rpx;
        margin: 20rpx;
        border-radius: 12rpx;
        background-color: #fff;
        .list-box {
            padding: 20rpx;
            background-color: #f5f5f5;
            border-radius: 6rpx;
        }
    }
</style>
subPackage/user/commentList/evaluateList.vue
New file
@@ -0,0 +1,76 @@
<template>
    <view class="">
        <z-paging ref="paging" v-model="list" @query="queryList" :refresher-enabled="false"
            loading-more-no-more-text="没有更多了">
            <view class="list" v-for="(i,k) in list">
                <view class="f-24 c-99 mb-20">
                    {{i.createTime}}
                </view>
                <view class="f-28 mb-20">
                    {{i.content}}
                </view>
                <u-rate v-if="i.score" count="5" v-model="i.score" activeColor="#ffc000" :readonly="true"></u-rate>
            </view>
        </z-paging>
    </view>
</template>
<script>
    import {
        getTenementComment
    } from "@/api/grid/grid.js"
    export default {
        data() {
            return {
                list: [],
                score: 3
            }
        },
        methods: {
            queryList(pageNo, pageSize) {
                getTenementComment({
                    isRec: 1,
                    page: pageNo,
                    size: pageSize,
                    // propertyCompanyId: this.id,
                    checkStatus: 2,
                    createUser: uni.getStorageSync("userInfo").user_id
                }).then(res => {
                    console.log(res)
                    this.$refs.paging.complete(res.data.records);
                })
            },
        }
    }
</script>
<style lang="scss">
    page {
        background-color: #f5f5f5;
    }
    .list {
        padding: 20rpx;
        margin: 20rpx;
        border-radius: 12rpx;
        background-color: #fff;
        .list-box {
            padding: 20rpx;
            background-color: #f5f5f5;
            border-radius: 6rpx;
        }
    }
</style>