jialh
2025-08-20 2d2756dc0e61ed8cd38c2796daf5cacdfdd49bf2
更新
10个文件已修改
350 ■■■■■ 已修改文件
api/owner/ownerApi.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/user/userApi.js 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/index/index-ads.vue 64 ●●●● 补丁 | 查看 | 原始文档 | 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 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/authOwnerLog.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | 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
@@ -73,7 +73,7 @@
                    let _json = res.data;
                    if (_json.code == 0) {
                        uni.showToast({
                            title:_json.data,
                            title: _json.data,
                            icon: 'none',
                            duration: 5000
                        });
@@ -112,6 +112,33 @@
                    //成功情况下跳转
                    let _integral = _json.data;
                    resolve(_integral);
                    return;
                }
                reject();
            },
            fail: function(e) {
                reject();
            }
        });
    })
}
/**
 * 查询广告信息
 * @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();
@@ -177,7 +204,7 @@
 * 刷新用户
 * @param {Object} _objData
 */
export function refreshUserOpenId(_objData){
export function refreshUserOpenId(_objData) {
    return new Promise((resolve, reject) => {
        requestNoAuth({
            url: url.refreshOpenId,
@@ -199,7 +226,7 @@
export function getWechatMiniOpenId(_objData){
export function getWechatMiniOpenId(_objData) {
    return new Promise((resolve, reject) => {
        requestNoAuth({
            url: url.getWechatMiniOpenId,
@@ -222,7 +249,7 @@
 * 刷新用户
 * @param {Object} _objData
 */
export function getOpenIdFromAliPay(_objData){
export function getOpenIdFromAliPay(_objData) {
    return new Promise((resolve, reject) => {
        requestNoAuth({
            url: url.getOpenIdFromAliPay,
@@ -245,7 +272,7 @@
 * 刷新用户
 * @param {Object} _objData
 */
export function queryDict(_objData){
export function queryDict(_objData) {
    return new Promise((resolve, reject) => {
        requestNoAuth({
            url: url.queryDict,
@@ -268,7 +295,7 @@
/**
 * 查询活动列表
 */
export function generatorUserQrCode( _that) {
export function generatorUserQrCode(_that) {
    let obj = {
        tel: '123'
    };
@@ -291,7 +318,7 @@
        })
}
export function getCommunityWechatAppId(_objData){
export function getCommunityWechatAppId(_objData) {
    return new Promise((resolve, reject) => {
        requestNoAuth({
            url: url.getCommunityWechatAppId,
@@ -331,12 +358,12 @@
                        return;
                    }
                    //todo 保存业主信息
                    uni.setStorageSync("userInfo",_json.data);
                    uni.setStorageSync("currentCommunityInfo",{
                        communityId:_json.data.communityId,
                        communityName:_json.data.communityName,
                        sCommunityTel:_json.data.communityTel,
                        communityQrCode:_json.data.communityQrCode
                    uni.setStorageSync("userInfo", _json.data);
                    uni.setStorageSync("currentCommunityInfo", {
                        communityId: _json.data.communityId,
                        communityName: _json.data.communityName,
                        sCommunityTel: _json.data.communityTel,
                        communityQrCode: _json.data.communityQrCode
                    });
                    resolve(_json.data);
                },
@@ -377,34 +404,34 @@
        })
}
export function getUserId(){
export function getUserId() {
    let _userInfo = uni.getStorageSync("userInfo");
    if(!_userInfo){
    if (!_userInfo) {
        return null;
    }
    return _userInfo.userId;
}
export function getUserName(){
export function getUserName() {
    let _userInfo = uni.getStorageSync("userInfo");
    if(!_userInfo){
    if (!_userInfo) {
        return null;
    }
    return _userInfo.userName;
}
export function getUserTel(){
export function getUserTel() {
    let _userInfo = uni.getStorageSync("userInfo");
    if(!_userInfo){
    if (!_userInfo) {
        return null;
    }
    return _userInfo.ownerTel;
}
export function ownerRegiter(_data){
export function ownerRegiter(_data) {
    return new Promise(
        (resolve, reject) => {
            requestNoAuth({
@@ -447,12 +474,12 @@
                    return;
                }
                //todo 保存业主信息
                uni.setStorageSync("userInfo",_json.data);
                uni.setStorageSync("currentCommunityInfo",{
                    communityId:_json.data.communityId,
                    communityName:_json.data.communityName,
                    sCommunityTel:_json.data.communityTel,
                    communityQrCode:_json.data.communityQrCode
                uni.setStorageSync("userInfo", _json.data);
                uni.setStorageSync("currentCommunityInfo", {
                    communityId: _json.data.communityId,
                    communityName: _json.data.communityName,
                    sCommunityTel: _json.data.communityTel,
                    communityQrCode: _json.data.communityQrCode
                });
                resolve(_json.data);
            },
@@ -461,6 +488,4 @@
            }
        });
    })
}
}
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:[],
                ad: [],
            };
        },
        created() {
            console.log('==_loadAdvertPhoto==')
            this._loadAdvertPhoto();
        },
        methods:{
        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;
                }
@@ -85,4 +117,4 @@
    .home_swiper {
        margin-bottom: 20upx;
    }
</style>
</style>
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
@@ -12,17 +12,18 @@
        </view>
        <view class="cu-form-group arrow" v-if="communityId" @tap="chooseRoom">
            <view class="title">房屋</view>
            <input readonly v-model="roomName" class="text-right" placeholder="请选择房屋"  icon="arrow"></input>
            <input readonly v-model="roomName" class="text-right" placeholder="请选择房屋" icon="arrow"></input>
            <text class='cuIcon-right'></text>
        </view>
        <view class="block__title">人员信息</view>
        <view class="cu-form-group">
            <view class="title">人员名称</view>
            <input v-model="ownerName" placeholder="请输入名称" class="text-right"></input>
        </view>
        <!-- <view class="cu-form-group">
            <view class="title">人员名称</view>
            <input v-model="ownerName" placeholder="请输入名称" class="text-right"></input>
        </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>
@@ -32,33 +33,38 @@
                </view>
            </picker>
        </view>
        <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 {
                communityIndex: 0,
                communityId:'',
                roomId:'',
                roomName:'',
                link:'',
                ownerName:'',
                communityId: '',
                roomId: '',
                roomName: '',
                link: '',
                ownerName: '',
                communitys: [{
                    communityId: '',
                    name: '请选择小区'
                }],
                "typeCds": [
                    {
                typeCds: [{
                        value: '1001',
                        name: '业主'
                    },
@@ -67,8 +73,9 @@
                        name: '成员'
                    }
                ],
                "typeCdIndex": 0,
                "ownerTypeCd": "1001",
                typeCdIndex: 0,
                ownerTypeCd: "1001",
                errorMessage: '' // 新增一个用于存放错误信息的字段
            }
        },
        onLoad(options) {
@@ -77,7 +84,7 @@
        },
        onShow() {
            let _selectRoom = uni.getStorageSync('selectRoom');
            if(_selectRoom){
            if (_selectRoom) {
                this.roomName = _selectRoom.roomName;
                this.roomId = _selectRoom.roomId;
                uni.removeStorageSync('selectRoom');
@@ -89,41 +96,56 @@
                let selected = this.communitys[this.communityIndex] //获取选中的数组
                this.communityId = selected.communityId; //选中的id
            },
            _loadCommunitys:function(){
                let _that =this;
            _loadCommunitys: function() {
                let _that = this;
                getCommunitys({
                    page:1,
                    row:500
                }).then(_communitys=>{
                    _communitys.forEach(_c=>{
                    page: 1,
                    row: 500
                }).then(_communitys => {
                    _communitys.forEach(_c => {
                        _that.communitys.push(_c);
                    })
                })
            },
            chooseRoom:function(){
            chooseRoom: function() {
                uni.navigateTo({
                    url:'/pages/family/selectRoom?communityId='+this.communityId
                    url: '/pages/family/selectRoom?communityId=' + this.communityId
                })
            },
            _changeTypeCd: function(e){
            _changeTypeCd: function(e) {
                this.typeCdIndex = e.detail.value;
                this.ownerTypeCd = this.typeCds[this.typeCdIndex].value;
            },
            _doAuthOwner:function(){
            _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,
                    roomId:this.roomId,
                    link:this.link,
                    ownerName:this.ownerName,
                    ownerTypeCd:this.ownerTypeCd,
                }).then(_data=>{
                    //todo 跳转到认证历史页面
                    communityId: this.communityId,
                    roomName: this.roomName,
                    roomId: this.roomId,
                    link: this.link,
                    ownerName: this.ownerName,
                    ownerTypeCd: this.ownerTypeCd,
                }).then(_data => {
                    // todo 跳转到认证历史页面
                    uni.navigateTo({
                        url:'/pages/index/authOwnerLog'
                        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 -->
@@ -55,10 +55,10 @@
    import context from '../../lib/java110/Java110Context.js';
    import {
        getLoginCode
    } from '../../lib/java110/page/Page.js';
    import {
        saveOwnerStorage,
        saveUserLoginInfo,
@@ -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;
@@ -98,14 +98,14 @@
                uni.setStorageSync(constant.mapping.W_APP_ID, wAppId);
            }
            // #ifdef MP-WEIXIN
            setTimeout(function(){
            setTimeout(function() {
                that.$refs.wechatLoginRef._initWechatLogin();
            },1000)
            }, 1000)
            // #endif
        },
        components:{
            wechatLogin
        },
        // components: {
        //     wechatLogin
        // },
        methods: {
            _doLogin: function() {
                let _that = this;
@@ -130,17 +130,34 @@
                    appId: this.vc.getWAppId(),
                    loginByPhone: this.loginByPhone
                };
                ownerLogin(this,_obj)
                ownerLogin(this, _obj)
                    .then((_user) => {
                        //todo 保存登录信息
                        saveUserLoginInfo(_user.userId, _user.token, _user.key);
                        uni.navigateTo({
                            url:'/pages/login/loginInitWechat?communityId='+_user.communityId
                        })
                    },err=>{
                        uni.showToast({
                            icon:'none',
                            title:err
                        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 => {
                        wx.showToast({
                            icon: 'none',
                            title: err
                        })
                    });
            },
@@ -193,4 +210,4 @@
        color: #FFFFFF;
        font-size: 30upx;
    }
</style>
</style>