jialh
2025-08-20 2d2756dc0e61ed8cd38c2796daf5cacdfdd49bf2
更新
10个文件已修改
200 ■■■■ 已修改文件
api/owner/ownerApi.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/user/userApi.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/index/index-ads.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
conf/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
constant/url.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/fee/roomFeeListNew.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/authOwner.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/authOwnerLog.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/owner/ownerApi.js
@@ -379,8 +379,8 @@
        msg = "请选择房屋";
    } else if (_data.link == "") {
        msg = "请填写手机号";
    } else if (_data.ownerName == "") {
        msg = "请填写人员名称";
    // } else if (_data.ownerName == "") {
    //     msg = "请填写人员名称";
    } else if (_data.ownerTypeCd == "") {
        msg = "请选择人员类型";
    }
@@ -400,12 +400,17 @@
            data: _data,
            success: function(res) {
                let _json = res.data;
                uni.showToast({
                wx.showToast({
                    title: _json.msg,
                    icon: 'none',
                    duration: 5000
                });
                if (_json.code != 0) {
                    wx.showToast({
                        title: _json.msg,
                        icon: 'none',
                        duration: 5000
                    });
                    reject(_json.msg);
                    return;
                }
@@ -413,7 +418,7 @@
            },
            fail: function(error) {
                // 查询失败
                reject();
                reject(error);
            }
        });
    })
api/user/userApi.js
@@ -124,6 +124,33 @@
}
/**
 * 查询广告信息
 * @param {Object} _objData
 */
export function advertsListApp(_objData) {
    return new Promise((resolve, reject) => {
        request({
            url: url.queryAdvertsListApp,
            method: "GET",
            data: _objData, //动态数据
            success: function(res) {
                console.log('==res==',res.data)
                let _json = res.data;
                if (_json.code == 0) {
                    //成功情况下跳转
                    resolve(_json);
                    return;
                }
                reject();
            },
            fail: function(e) {
                reject();
            }
        });
    })
}
/**
 * 查询用户账户信息
 * @param {Object} _objData
 */
@@ -462,5 +489,3 @@
        });
    })
}
components/index/index-ads.vue
@@ -3,9 +3,9 @@
        <view class="home_swiper">
            <swiper class="ad-swiper bg-white" indicator-dots="true" indicator-color="rgba(228,228,228,1)"
                indicator-active-color="#FECA49" autoplay="true" interval="5000" duration="1000" circular="true">
                <block v-for="(item, index) in ad" :key="index" @click="_advertJump(item)">
                    <swiper-item>
                        <image style="height:100%;width: 100%" :src="item.url"></image>
                <block v-for="(item, index) in ad" :key="index">
                    <swiper-item @click="_advertJump(item)">
                        <image style="height:100%;width: 100%" :src="item.ossUrl"></image>
                    </swiper-item>
                </block>
            </swiper>
@@ -21,43 +21,75 @@
        loadActivites,
        loadAdverts
    } from '../../api/index/indexApi.js'
    import {
        advertsListApp
    } from '@/api/user/userApi.js';
    export default {
        name: "indexAds",
        data() {
            return {
                banner: [{
                        url: this.imgUrl+'/h5/images/serve/banner1.jpg'
                        ossUrl: this.imgUrl + '/h5/images/serve/banner1.jpg'
                    },
                    {
                        url: this.imgUrl+'/h5/images/serve/banner2.jpg'
                        ossUrl: this.imgUrl + '/h5/images/serve/banner2.jpg'
                    }
                ],
                ad:[],
            };
        },
        created() {
            console.log('==_loadAdvertPhoto==')
            this._loadAdvertPhoto();
        },
        methods:{
            // _loadAdvertPhoto: function() {
            //     let _that = this;
            //     let _objData = {
            //         page: 1,
            //         row: 5,
            //         locationTypeCd: '2000',
            //         viewType: '8888',
            //         clientType: 'H5'
            //     };
            //     //查询 广告
            //     loadAdverts(_objData)
            //         .then(function(_aPhotos) {
            //             _that.ad = _aPhotos;
            //             if(!_aPhotos || _aPhotos.length <1){
            //                 _that.ad = _that.banner;
            //             }
            //         });
            // },
            _loadAdvertPhoto: function() {
                // console.log('==_loadAdvertPhoto==')
                let _that = this;
                let _objData = {
                    page: 1,
                    row: 5,
                    locationTypeCd: '2000',
                    viewType: '8888',
                    clientType: 'H5'
                    position: '业主小程序首页轮播图',
                };
                //查询 广告
                loadAdverts(_objData)
                advertsListApp(_objData)
                    .then(function(_aPhotos) {
                        _that.ad = _aPhotos;
                        if(!_aPhotos || _aPhotos.length <1){
                        _that.ad = _aPhotos.data;
                        console.log('==_that.ad==', _that.ad)
                        if (!_aPhotos || _that.ad.length < 1) {
                            _that.ad = _that.banner;
                        }
                    });
            },
            _advertJump: function(ad) {
                if (!ad) return;
                // 优先判断是否有直接的外部链接
                if (ad.url) {
                    let url = encodeURIComponent(ad.url)
                    uni.navigateTo({
                        url: '/pages/fee/webview?url=' + url
                    })
                    return;
                }
                if (ad.advertType == 3 || !ad.pageUrl) {
                    return;
                }
conf/config.js
@@ -16,7 +16,7 @@
// #ifndef H5
//服务器域名 小程序 或者 app 时 后端地址 
const baseUrl = 'https://zxshlx.com/';
// const baseUrl = 'http://192.168.31.137:8008/';
// const baseUrl = 'http://192.168.31.222:8008/';
// const baseUrl = 'http://47.92.223.85:8008/';
// #endif
constant/url.js
@@ -20,6 +20,7 @@
    listComplaintEvent: baseUrl + 'app/complaint.listPhoneComplaintEvent', //添加投诉建议
    saveComplaintAppraise: baseUrl + 'app/complaintAppraise.saveComplaintAppraise', //添加投诉建议
    listComplaintType: baseUrl + 'app/complaint.queryPhoneComplaintType', //查询投诉类型
    queryAdvertsListApp: baseUrl + 'app/smallProgram.advertsListApp', //查询广告
    
    saveComplaint: baseUrl + 'app/complaint.saveComplaint', //查询业主房间
    queryRoomsByOwner: baseUrl + 'app/room.queryPhoneOwnerRooms', //绑定业主
manifest.json
@@ -62,7 +62,9 @@
        "appid" : "wx780f11f414d30cbf",
        "setting" : {
            "urlCheck" : false,
            "es6" : false
            "es6" : false,
            "postcss" : true,
            "minified" : true
        },
        "navigateToMiniProgramAppIDList" : [ "wxa4211361ca1e1bfb" ], //商城小程序AppId
        "permission" : {
pages/fee/roomFeeListNew.vue
@@ -5,18 +5,18 @@
                <view class="flex text-center">
                    <view class="cu-item flex-sub" :class="item.roomId==curRoom.roomId?'text-green cur':''" v-for="(item,index) in rooms"
                     :key="index" @tap="switchRoom(item)" :data-id="index">
                        {{item.floorNum}}栋{{item.roomNum}}室
                        {{item.floorNum}}-{{item.unitNum}}-{{item.roomNum}}
                    </view>
                </view>
            </scroll-view>
            <scroll-view v-if="rooms.length >4" scroll-x class="bg-white nav" scroll-with-animation scroll-left="true">
                <view class="cu-item flex-sub" :class="item.roomId==curRoom.roomId?'text-green cur':''" v-for="(item,index) in rooms"
                 :key="index" @tap="switchRoom(item)" :data-id="index">
                    {{item.floorNum}}栋{{item.roomNum}}室
                    {{item.floorNum}}-{{item.unitNum}}-{{item.roomNum}}
                </view>
            </scroll-view>
        </view>
        <view v-if="rooms.length == 1" class="block__title">{{rooms[0].floorNum}}栋{{rooms[0].roomNum}}室</view>
        <view v-if="rooms.length == 1" class="block__title">{{rooms[0].floorNum}}-{{rooms[0].unitNum}}-{{rooms[0].roomNum}}</view>
        <view v-if="rooms.length > 1" class="margin-header-top"></view>
        <view v-if="noData == false" style="padding-bottom: 200rpx;">
            <view class="cu-list menu" v-if="moreRooms.length > 0" v-for="(fee, idx) in moreRooms" :key="idx" :data-item="fee"
pages/index/authOwner.vue
@@ -16,13 +16,14 @@
            <text class='cuIcon-right'></text>
        </view>
        <view class="block__title">人员信息</view>
        <view class="cu-form-group">
        <!-- <view class="cu-form-group">
            <view class="title">人员名称</view>
            <input v-model="ownerName" placeholder="请输入名称" class="text-right"></input>
        </view>
        </view> -->
        <view class="cu-form-group">
            <view class="title">手机号</view>
            <input v-model="link" disabled="disabled" placeholder="请输入手机号" class="text-right"></input>
            <input v-model="link" placeholder="请输入手机号" class="text-right"></input>
            <text v-if="errorMessage" class="error-message">{{ errorMessage }}</text>
        </view>
        <view class="cu-form-group">
            <view class="title">人员类型</view>
@@ -36,14 +37,20 @@
        <view class="flex flex-direction margin-top margin-bottom">
            <button class="cu-btn bg-blue margin-tb-sm lg" @click="_doAuthOwner()">提交</button>
        </view>
    </view>
</template>
<script>
    import {getCommunitys} from '../../api/community/communityApi.js';
    import {getUserTel} from '../../api/user/userApi.js';
    import {authOwner} from '../../api/owner/ownerApi.js';
    import {
        getCommunitys
    } from '../../api/community/communityApi.js';
    import {
        getUserTel
    } from '../../api/user/userApi.js';
    import {
        authOwner
    } from '../../api/owner/ownerApi.js';
    export default {
        data() {
            return {
@@ -57,8 +64,7 @@
                    communityId: '',
                    name: '请选择小区'
                }],
                "typeCds": [
                    {
                typeCds: [{
                        value: '1001',
                        name: '业主'
                    },
@@ -67,8 +73,9 @@
                        name: '成员'
                    }
                ],
                "typeCdIndex": 0,
                "ownerTypeCd": "1001",
                typeCdIndex: 0,
                ownerTypeCd: "1001",
                errorMessage: '' // 新增一个用于存放错误信息的字段
            }
        },
        onLoad(options) {
@@ -98,7 +105,6 @@
                    _communitys.forEach(_c=>{
                        _that.communitys.push(_c);
                    })
                })
            },
            chooseRoom:function(){
@@ -111,6 +117,15 @@
                this.ownerTypeCd = this.typeCds[this.typeCdIndex].value;
            },
            _doAuthOwner:function(){
                正则验证手机号格式
                const phoneRegex = /^1[3-9]\d{9}$/; // 正确的手机号格式
                if (!phoneRegex.test(this.link)) {
                    this.errorMessage = '请输入有效的手机号'; // 设置错误信息
                    return; // 如果手机号格式不对,停止执行
                } else {
                    this.errorMessage = ''; // 清除错误信息
                }
                authOwner({
                    communityId:this.communityId,
                    roomName:this.roomName,
@@ -123,7 +138,14 @@
                    uni.navigateTo({
                        url:'/pages/index/authOwnerLog'
                    })
                })
                }).catch(err => {
                    // 处理错误情况
                    wx.showToast({
                        icon: 'none',
                        title: err || '认证失败,请重试' // 提供一个默认的错误提示
                    });
                });
            }
        }
    }
@@ -138,7 +160,8 @@
        padding: 40rpx 30rpx 20rpx;
    }
    .button_up_blank {
        height: 40rpx;
    .error-message {
        color: red;
        /* 错误信息的红色字体 */
    }
</style>
pages/index/authOwnerLog.vue
@@ -5,7 +5,8 @@
            <view v-for="(item,index) in appUsers" :key="index" class="bg-white margin-bottom margin-right-xs radius margin-left-xs padding padding-bottom-xs">
                <view class="flex padding-bottom-xs solid-bottom justify-between">
                    <view>{{item.roomName || '-'}}</view>
                    <view class="text-red" v-if="item.state == '10000'">审核中</view>
                    <view class="text-red" v-if="item.state == '10000'">待审核</view>
                    <view class="text-red" v-else-if="item.state == '11000'">待认证</view>
                    <view class="text-red" v-else-if="item.state == '12000'">认证完成</view>
                    <view class="text-red" v-else-if="item.state == '13000'">认证失败</view>
                    <view class="text-red" v-else>未知状态</view>
pages/login/login.vue
@@ -8,7 +8,7 @@
        <view class="margin-top padding-left padding-right radius" v-if="!loginByPhone">
            <view class="cu-form-group margin-top">
                <view class="title">用户名</view>
                <input placeholder="请输入用户名" name="input" v-model="username"></input>
                <input placeholder="请输入姓名/手机号" name="input" v-model="username"></input>
            </view>
            <view class="cu-form-group border-bottom">
                <view class="title">密码</view>
@@ -31,7 +31,7 @@
        <view class="padding flex flex-direction margin-top">
            <button class="cu-btn bg-blue lg" @click="_doLogin()">登录</button>
            <!-- #ifdef MP-WEIXIN -->
            <wechat-login ref="wechatLoginRef"></wechat-login>
            <!-- <wechat-login ref="wechatLoginRef"></wechat-login> -->
            <!-- #endif -->
        </view>
        <!-- #ifdef H5 -->
@@ -67,7 +67,7 @@
        saveWAppId,
        getLoginFlag
    } from '@/lib/java110/utils/StorageUtil.js';
    import wechatLogin from '@/components/user/wechat-login.vue';
    // import wechatLogin from '@/components/user/wechat-login.vue';
    const constant = context.constant;
    const factory = context.factory;
@@ -103,9 +103,9 @@
            },1000)
            // #endif
        },
        components:{
            wechatLogin
        },
        // components: {
        //     wechatLogin
        // },
        methods: {
            _doLogin: function() {
                let _that = this;
@@ -133,12 +133,29 @@
                ownerLogin(this,_obj)
                    .then((_user) => {
                        //todo 保存登录信息
                        if (_user.auditState == "11000") {
                            saveUserLoginInfo(_user.userId, _user.token, _user.key);
                            uni.navigateTo({
                                url: '/pages/index/authOwnerLog'
                            })
                        } else if (_user.auditState == "10000") {
                            uni.showToast({
                                icon: 'none',
                                title: '您提交的房屋认证审核中,请联系物业管理人员'
                            })
                        } else if (_user.auditState == "13000") {
                            uni.showToast({
                                icon: 'none',
                                title: '您提交的房屋认证审核失败,请联系物业管理人员'
                            })
                        } else {
                        saveUserLoginInfo(_user.userId, _user.token, _user.key);
                        uni.navigateTo({
                            url:'/pages/login/loginInitWechat?communityId='+_user.communityId
                        })
                        }
                    },err=>{
                        uni.showToast({
                        wx.showToast({
                            icon:'none',
                            title:err
                        })