Explorar o código

Merge remote-tracking branch 'origin/master'

guojing %!s(int64=5) %!d(string=hai) anos
pai
achega
1d1ac3d658

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 3288 - 0
whepi-doc/initialize.sql


+ 24 - 37
whepi-doc/login.sql

@@ -2,10 +2,9 @@
 -- Table structure for sys_user
 -- ----------------------------
 drop table if exists sys_user;
-create table sys_user
-(
+create table sys_user (
   user_id             BIGINT          not null             comment '用户编号',
-  weixin_id          VARCHAR(50)     not null default ''  comment '微信ID',
+  weixin_id           VARCHAR(50)     not null default ''  comment '微信ID',
   token               VARCHAR(50)     not null default ''  comment 'token',
   version             CHAR(19)        not null             comment 'token版本',
   create_at TIMESTAMP NOT NULL COMMENT '建立时间',
@@ -21,6 +20,7 @@ CREATE TABLE sys_user_role  (
   ur_id 		bigint(20) NOT NULL COMMENT '用户角色关系ID',
   user_id 		bigint(20) NOT NULL COMMENT '用户ID',
   role_id 		int(11) NOT NULL COMMENT '角色ID:1居民,2业委会,3商家',
+  property_id   bigint(20) NOT NULL DEFAULT 0 COMMENT '属性ID,居民门牌ID,业委会ID',
   user_create 	bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
   time_create 	datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
   user_update 	bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
@@ -29,41 +29,40 @@ CREATE TABLE sys_user_role  (
 ) ENGINE = InnoDB default charset=utf8 comment = '用户角色关系表';
 
 -- ----------------------------
+-- Table structure for sys_owner
 -- ----------------------------
-DROP TABLE IF EXISTS user_owner;
-CREATE TABLE user_owner  (
-  owner_id          bigint(20) NOT NULL DEFAULT 0 COMMENT '业主ID(user_id)',
-  linkman           varchar(10) NOT NULL DEFAULT '' COMMENT '联系人名称',
-  phone             varchar(20) NOT NULL DEFAULT '' COMMENT '联系人电话',
+DROP TABLE IF EXISTS sys_owner;
+CREATE TABLE sys_owner  (
+  owner_id          bigint(20) NOT NULL DEFAULT 0 COMMENT '业委会ID',
   uptown_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '小区ID,下拉选ID',
-  addr              varchar(100)  NOT NULL DEFAULT '' COMMENT '详细地址',
   user_create       bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
   user_update       bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
   time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
   PRIMARY KEY (owner_id) USING BTREE
-) ENGINE = InnoDB default charset=utf8 comment = '业委会';
+) ENGINE = InnoDB default charset=utf8 comment = '业委会';
 
 -- ----------------------------
+-- Table structure for sys_uptown_house
 -- ----------------------------
-DROP TABLE IF EXISTS user_resident;
-CREATE TABLE user_resident  (
-  resident_id       bigint(20) NOT NULL DEFAULT 0 COMMENT '居民ID(user_id)',
-  house_id          bigint(20) NOT NULL DEFAULT 0 COMMENT '门牌ID',
+DROP TABLE IF EXISTS sys_uptown_house;
+CREATE TABLE sys_uptown_house  (
+  house_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '门牌ID',
+  uptown_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '小区ID',
+  ridgepole         int(11) NOT NULL DEFAULT 0 COMMENT '栋',
+  unit              int(11) NOT NULL DEFAULT 0 COMMENT '单元',
+  doorplate         varchar(20)  NOT NULL DEFAULT '' COMMENT '门牌',
   linkman           varchar(10)  NOT NULL DEFAULT '' COMMENT '联系人名称',
   phone             varchar(20)  NOT NULL DEFAULT '' COMMENT '联系人电话',
   young             int(11) NOT NULL DEFAULT 0 COMMENT '家庭年前人数',
   middle            int(11) NOT NULL DEFAULT 0 COMMENT '家庭中年人数',
   old               int(11) NOT NULL DEFAULT 0 COMMENT '家庭老年人数',
   remark            varchar(100)  NOT NULL DEFAULT '' COMMENT '备注',
-  user_create       bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
+  status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
-  user_update       bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
   time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
-  PRIMARY KEY (resident_id) USING BTREE
-) ENGINE = InnoDB default charset=utf8 comment = '居民表';
+  PRIMARY KEY (house_id) USING BTREE
+) ENGINE = InnoDB default charset=utf8 comment = '小区家庭表';
 
 -- ----------------------------
 -- Table structure for sys_area
@@ -71,14 +70,14 @@ CREATE TABLE user_resident  (
 DROP TABLE IF EXISTS sys_area;
 CREATE TABLE sys_area  (
   area_id           bigint(20) NOT NULL DEFAULT 0 COMMENT '地区ID',
-  province          varchar(20)  NOT NULL DEFAULT '' COMMENT '省',
-  city              varchar(10)  NOT NULL DEFAULT '' COMMENT '市',
-  area              varchar(20)  NOT NULL DEFAULT '' COMMENT '区',
+  province          varchar(50)  NOT NULL DEFAULT '' COMMENT '省',
+  city              varchar(50)  NOT NULL DEFAULT '' COMMENT '市',
+  area              varchar(50)  NOT NULL DEFAULT '' COMMENT '区',
   status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
   time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
   PRIMARY KEY (area_id) USING BTREE
-) ENGINE = InnoDB default charset=utf8 comment = '居民表';
+) ENGINE = InnoDB default charset=utf8 comment = '省市区表';
 
 -- ----------------------------
 -- Table structure for sys_uptown
@@ -95,21 +94,4 @@ CREATE TABLE sys_uptown  (
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
   time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
   PRIMARY KEY (uptown_id) USING BTREE
-) ENGINE = InnoDB default charset=utf8 comment = '小区表';
-
-
-DROP TABLE IF EXISTS sys_uptown_house;
-CREATE TABLE sys_uptown_house  (
-  house_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '门牌ID',
-  uptown_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '小区ID',
-  ridgepole         int(11) NOT NULL DEFAULT 0 COMMENT '栋',
-  unit              int(11) NOT NULL DEFAULT 0 COMMENT '单元',
-  doorplate         varchar(20)  NOT NULL DEFAULT '' COMMENT '门牌',
-  status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
-  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
-  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
-  PRIMARY KEY (house_id) USING BTREE
-) ENGINE = InnoDB default charset=utf8 comment = '小区门牌表';
+) ENGINE = InnoDB default charset=utf8 comment = '小区表';

+ 1 - 1
whepi-doc/whepi.sql

@@ -20,7 +20,7 @@ create table tb_user
   place_id            BIGINT          not null default 0   comment '场地id',
   version             CHAR(19)        not null             comment 'token版本',
   login_count         INTEGER         not null default '0' comment '登录次数',
-  last_login_time     TIMESTAMP NOT NULL COMMENT '最后登录时间',
+  last_login_time     TIMESTAMP       NOT NULL             COMMENT '最后登录时间',
 
   be_active           CHAR(1)         not null default 'Y' comment '是否活动 Y=活动/N=禁用/D=删除',
   create_at TIMESTAMP NOT NULL COMMENT '建立时间',

+ 17 - 17
whepi-ui/templates/admin/head.ftl

@@ -227,23 +227,23 @@
         if (passwordDate.password && passwordDate.newPassword && passwordDate.newPassword.length<=20) {
 
             if (passwordDate.newPassword === passwordDate.repeatPassword) {
-                $.ajax({
-                    url:'/user/reset_password.json',
-                    contentType: "application/json; charset=utf-8",
-                    type:'post',
-                    data:JSON.stringify(passwordDate),
-                    success: function (data) {
-                        if (data.success) {
-                            layer.msg(data.msg);
-                            window.location.replace('/user/login.html');
-                        } else {
-                            layer.msg(data.msg);
-                        }
-                    },
-                    error: function () {
-                        layer.msg("网络异常");
-                    }
-                });
+                // $.ajax({
+                //     url:'/user/reset_password.json',
+                //     contentType: "application/json; charset=utf-8",
+                //     type:'post',
+                //     data:JSON.stringify(passwordDate),
+                //     success: function (data) {
+                //         if (data.success) {
+                //             layer.msg(data.msg);
+                //             window.location.replace('/user/login.html');
+                //         } else {
+                //             layer.msg(data.msg);
+                //         }
+                //     },
+                //     error: function () {
+                //         layer.msg("网络异常");
+                //     }
+                // });
 
             }else{
                 $.alert('两次密码不相等');

+ 187 - 187
whepi-ui/templates/admin/user.ftl

@@ -157,24 +157,24 @@
     }
 
     function openIdDelete(userId) {
-        $.ajax({
-            url: '/admin/deleteOpenId.json',
-            data: { userId: userId },
-            type: 'post',
-            success: function (data) {
-                if (data.success) {
-                    layer.msg("删除成功");
-                    initTable();
-                    $('#myModal').modal('toggle');
-
-                } else {
-                    layer.msg(data.msg);
-                }
-            },
-            error: function () {
-                layer.msg("网络异常");
-            }
-        });
+        // $.ajax({
+        //     url: '/admin/deleteOpenId.json',
+        //     data: { userId: userId },
+        //     type: 'post',
+        //     success: function (data) {
+        //         if (data.success) {
+        //             layer.msg("删除成功");
+        //             initTable();
+        //             $('#myModal').modal('toggle');
+        //
+        //         } else {
+        //             layer.msg(data.msg);
+        //         }
+        //     },
+        //     error: function () {
+        //         layer.msg("网络异常");
+        //     }
+        // });
     }
 
     function userBind() {
@@ -184,17 +184,17 @@
     }
 
     function choosedPlace() {
-        var data = $('#bindModal').find('form').formGet();
-        top.layer.open({
-            type: 2,
-            title: '绑定二维码',
-            shadeClose: false,
-            resize: true,
-            anim: 0,
-            skin: 'layer-class',
-            area: ['264px', '308px'],
-            content: '/admin/user_bind_qr_png?placeId=' + data.placeId1
-        });
+        // var data = $('#bindModal').find('form').formGet();
+        // top.layer.open({
+        //     type: 2,
+        //     title: '绑定二维码',
+        //     shadeClose: false,
+        //     resize: true,
+        //     anim: 0,
+        //     skin: 'layer-class',
+        //     area: ['264px', '308px'],
+        //     content: '/admin/user_bind_qr_png?placeId=' + data.placeId1
+        // });
     }
 
     function saveForm() {
@@ -224,25 +224,25 @@
             url = '/admin/user_addnew.json';
         }
 
-        $.ajax({
-            url: url,
-            contentType: "application/json; charset=utf-8",
-            data: JSON.stringify(data),
-            type: 'post',
-            success: function (data) {
-                if (data.success) {
-                    layer.msg("保存成功");
-                    initTable();
-                    $('#myModal').modal('toggle');
-
-                } else {
-                    layer.msg(data.msg);
-                }
-            },
-            error: function () {
-                layer.msg("网络异常");
-            }
-        });
+        // $.ajax({
+        //     url: url,
+        //     contentType: "application/json; charset=utf-8",
+        //     data: JSON.stringify(data),
+        //     type: 'post',
+        //     success: function (data) {
+        //         if (data.success) {
+        //             layer.msg("保存成功");
+        //             initTable();
+        //             $('#myModal').modal('toggle');
+        //
+        //         } else {
+        //             layer.msg(data.msg);
+        //         }
+        //     },
+        //     error: function () {
+        //         layer.msg("网络异常");
+        //     }
+        // });
     }
 
     function userEdit(row) {
@@ -265,154 +265,154 @@
                 data.beActive = 'Y';
             }
 
-            $.ajax({
-                url: '/admin/user_edit.json',
-                contentType: "application/json; charset=utf-8",
-                data: JSON.stringify(data),
-                type: 'post',
-                success: function (data) {
-                    if (data.success) {
-                        if (row.beActive === 'Y') {
-                            layer.msg('已启用当前角色');
-                        } else if (row.beActive === 'N') {
-                            layer.msg('已禁用当前角色');
-                        }
-                        initTable();
-
-                    } else {
-                        layer.msg(data.msg);
-                    }
-                },
-                error: function () {
-                    layer.msg("网络异常");
-                }
-            });
+            // $.ajax({
+            //     url: '/admin/user_edit.json',
+            //     contentType: "application/json; charset=utf-8",
+            //     data: JSON.stringify(data),
+            //     type: 'post',
+            //     success: function (data) {
+            //         if (data.success) {
+            //             if (row.beActive === 'Y') {
+            //                 layer.msg('已启用当前角色');
+            //             } else if (row.beActive === 'N') {
+            //                 layer.msg('已禁用当前角色');
+            //             }
+            //             initTable();
+            //
+            //         } else {
+            //             layer.msg(data.msg);
+            //         }
+            //     },
+            //     error: function () {
+            //         layer.msg("网络异常");
+            //     }
+            // });
 
         }
 
     }
 
     function initTable() {
-        $('#thetable').bootstrapTable('destroy').bootstrapTable({
-            url: '/admin/user.json',
-            method: 'get',
-            queryParams: function (params) {
-                $('#theform').serializeArray().forEach(function fn(v) {
-                    params[v.name] = v.value;
-                });
-                return params;
-            },
-            responseHandler: responseHandler,
-            idField: 'user_id',
-            exportDataType: 'all',
-            exportTypes: ['txt', 'excel'],
-            dataShowExport: true,
-            search: false,
-            sortStable: false,
-            sidePagination: 'server',
-            pagination: true,
-            columns: [
-                {
-                    field: 'userId',
-                    title: '操作',
-                    width: '50px',
-                    formatter: function (v, row) {
-                        row.sense_id = 'select';
-                        var ts = [];
-                        if (row.userType === 'A' || row.userType === 'C') {
-                            ts.push('<button class="btn btn-sm btn-default" onclick=\'userEdit(' + JSON.stringify(row) + ')\'>编辑</button>');
-
-                        } else {
-                            ts.push('<button class="btn btn-sm btn-dark" onclick="openIdDelete(\'' + row.userId + '\')">删除</button>');
-                        }
-                        return ts.join('\n');
-                    }
-                }, {
-                    field: 'loginName',
-                    title: '登录名'
-                }, {
-                    field: 'staffName',
-                    title: '员工姓名'
-                }, {
-                    field: 'phone',
-                    title: '手机'
-                }, {
-                    field: 'placeName',
-                    title: '场地名称'
-                }, {
-                    field: 'userType',
-                    title: '角色',
-                    formatter: function (v, row) {
-                        if (v === 'A') {
-                            return '管理员';
-                        } else if (v === 'C') {
-                            return '收银员';
-                        } else if (v === '1') {
-                            return '一级分销';
-                        } else if (v === '2') {
-                            return '二级分销';
-                        }
-                        return v;
-                    }
-                }, {
-                    field: 'beActive',
-                    title: '状态',
-                    formatter: function (v, row) {
-                        var ts = [];
-                        if (row.userType === 'A' || row.userType === 'C') {
-                            if (row.beActive === 'Y') {
-                                ts.push('<button class="btn btn-sm btn-default" onclick=\'userDisable(' + JSON.stringify(row) + ')\'>启用中</button>');
-                            } else if (row.beActive === 'N') {
-                                ts.push('<button class="btn btn-sm btn-dark" onclick=\'userDisable(' + JSON.stringify(row) + ')\'>已禁用</button>');
-                            }
-                            return ts.join('\n');
-                        }
-                        return '启用中';
-                    }
-                }, {
-                    field: 'loginCount',
-                    title: '登录次数'
-                }
-            ]
-        });
+        // $('#thetable').bootstrapTable('destroy').bootstrapTable({
+        //     url: '/admin/user.json',
+        //     method: 'get',
+        //     queryParams: function (params) {
+        //         $('#theform').serializeArray().forEach(function fn(v) {
+        //             params[v.name] = v.value;
+        //         });
+        //         return params;
+        //     },
+        //     responseHandler: responseHandler,
+        //     idField: 'user_id',
+        //     exportDataType: 'all',
+        //     exportTypes: ['txt', 'excel'],
+        //     dataShowExport: true,
+        //     search: false,
+        //     sortStable: false,
+        //     sidePagination: 'server',
+        //     pagination: true,
+        //     columns: [
+        //         {
+        //             field: 'userId',
+        //             title: '操作',
+        //             width: '50px',
+        //             formatter: function (v, row) {
+        //                 row.sense_id = 'select';
+        //                 var ts = [];
+        //                 if (row.userType === 'A' || row.userType === 'C') {
+        //                     ts.push('<button class="btn btn-sm btn-default" onclick=\'userEdit(' + JSON.stringify(row) + ')\'>编辑</button>');
+        //
+        //                 } else {
+        //                     ts.push('<button class="btn btn-sm btn-dark" onclick="openIdDelete(\'' + row.userId + '\')">删除</button>');
+        //                 }
+        //                 return ts.join('\n');
+        //             }
+        //         }, {
+        //             field: 'loginName',
+        //             title: '登录名'
+        //         }, {
+        //             field: 'staffName',
+        //             title: '员工姓名'
+        //         }, {
+        //             field: 'phone',
+        //             title: '手机'
+        //         }, {
+        //             field: 'placeName',
+        //             title: '场地名称'
+        //         }, {
+        //             field: 'userType',
+        //             title: '角色',
+        //             formatter: function (v, row) {
+        //                 if (v === 'A') {
+        //                     return '管理员';
+        //                 } else if (v === 'C') {
+        //                     return '收银员';
+        //                 } else if (v === '1') {
+        //                     return '一级分销';
+        //                 } else if (v === '2') {
+        //                     return '二级分销';
+        //                 }
+        //                 return v;
+        //             }
+        //         }, {
+        //             field: 'beActive',
+        //             title: '状态',
+        //             formatter: function (v, row) {
+        //                 var ts = [];
+        //                 if (row.userType === 'A' || row.userType === 'C') {
+        //                     if (row.beActive === 'Y') {
+        //                         ts.push('<button class="btn btn-sm btn-default" onclick=\'userDisable(' + JSON.stringify(row) + ')\'>启用中</button>');
+        //                     } else if (row.beActive === 'N') {
+        //                         ts.push('<button class="btn btn-sm btn-dark" onclick=\'userDisable(' + JSON.stringify(row) + ')\'>已禁用</button>');
+        //                     }
+        //                     return ts.join('\n');
+        //                 }
+        //                 return '启用中';
+        //             }
+        //         }, {
+        //             field: 'loginCount',
+        //             title: '登录次数'
+        //         }
+        //     ]
+        // });
     }
 
     function getPlaceAndRole() {
-        $.ajax({
-            url: '/admin/get_place_role.json',
-            contentType: "application/json; charset=utf-8",
-            type: 'get',
-            success: function (data) {
-                if (data.success) {
-
-                    $('#placeId').empty();
-                    $('#placeId').append($('<option value="">请选择</option>'));
-
-                    data.data.place.forEach(function (p) {
-                        $('#placeId').append($('<option value="' + p.placeId + '">' + p.placeName + '</option>'));
-                    });
-
-                    $('#placeId1').empty();
-                    $('#placeId1').append($('<option value="">请选择</option>'));
-
-                    data.data.place.forEach(function (p) {
-                        $('#placeId1').append($('<option value="' + p.placeId + '">' + p.placeName + '</option>'));
-                    });
-
-                    $('#userType').empty();
-                    $('#userType').append($('<option value="">请选择</option>'));
-                    data.data.role.forEach(function (p) {
-                        $('#userType').append($('<option value="' + p.role + '">' + p.roleName + '</option>'));
-                    });
-
-                } else {
-                    layer.msg(data.msg);
-                }
-            },
-            error: function () {
-                layer.msg("网络异常");
-            }
-        });
+        // $.ajax({
+        //     url: '/admin/get_place_role.json',
+        //     contentType: "application/json; charset=utf-8",
+        //     type: 'get',
+        //     success: function (data) {
+        //         if (data.success) {
+        //
+        //             $('#placeId').empty();
+        //             $('#placeId').append($('<option value="">请选择</option>'));
+        //
+        //             data.data.place.forEach(function (p) {
+        //                 $('#placeId').append($('<option value="' + p.placeId + '">' + p.placeName + '</option>'));
+        //             });
+        //
+        //             $('#placeId1').empty();
+        //             $('#placeId1').append($('<option value="">请选择</option>'));
+        //
+        //             data.data.place.forEach(function (p) {
+        //                 $('#placeId1').append($('<option value="' + p.placeId + '">' + p.placeName + '</option>'));
+        //             });
+        //
+        //             $('#userType').empty();
+        //             $('#userType').append($('<option value="">请选择</option>'));
+        //             data.data.role.forEach(function (p) {
+        //                 $('#userType').append($('<option value="' + p.role + '">' + p.roleName + '</option>'));
+        //             });
+        //
+        //         } else {
+        //             layer.msg(data.msg);
+        //         }
+        //     },
+        //     error: function () {
+        //         layer.msg("网络异常");
+        //     }
+        // });
     }
 
 

+ 32 - 32
whepi-ui/templates/cust/account.ftl

@@ -67,23 +67,23 @@
                 'userId': userId
             };
 
-            $.ajax({
-                url: '/cust/update_account.json',
-                contentType: "application/json; charset=utf-8",
-                data: JSON.stringify(data),
-                type: 'post',
-                success: function (data) {
-                    if (data.success) {
-                        window.location.replace('/prompt/prompt.html?title=修改成功&message=');
-                        // window.location.reload();
-                    } else {
-                        $.alert(data.msg);
-                    }
-                },
-                error: function () {
-                    $.alert("网络异常");
-                }
-            });
+            // $.ajax({
+            //     url: '/cust/update_account.json',
+            //     contentType: "application/json; charset=utf-8",
+            //     data: JSON.stringify(data),
+            //     type: 'post',
+            //     success: function (data) {
+            //         if (data.success) {
+            //             window.location.replace('/prompt/prompt.html?title=修改成功&message=');
+            //             // window.location.reload();
+            //         } else {
+            //             $.alert(data.msg);
+            //         }
+            //     },
+            //     error: function () {
+            //         $.alert("网络异常");
+            //     }
+            // });
 
         });
 
@@ -99,21 +99,21 @@
     }
 
     function modifyBind(v) {
-        $.ajax({
-            url: '/cust/modify_bind.json?userId='+userId + '&placeId=' + v,
-            type: 'get',
-            success: function (data) {
-                if (data.success) {
-                    window.location.replace('/prompt/prompt.html?title=解绑成功&message=');
-                    // window.location.reload();
-                } else {
-                    $.alert(data.msg);
-                }
-            },
-            error: function () {
-                $.alert("网络异常");
-            }
-        });
+        // $.ajax({
+        //     url: '/cust/modify_bind.json?userId='+userId + '&placeId=' + v,
+        //     type: 'get',
+        //     success: function (data) {
+        //         if (data.success) {
+        //             window.location.replace('/prompt/prompt.html?title=解绑成功&message=');
+        //             // window.location.reload();
+        //         } else {
+        //             $.alert(data.msg);
+        //         }
+        //     },
+        //     error: function () {
+        //         $.alert("网络异常");
+        //     }
+        // });
     }
 
 </script>

+ 16 - 16
whepi-web/src/main/java/com/bofeng/wx/controller/CustAccountController.java

@@ -28,26 +28,26 @@ public class CustAccountController {
     @GetMapping("/cust/account.html")
     public ModelAndView market(ModelMap model) throws WxErrorException {
 
-        ParseCurrentOpenId wxToken = userService.currentWxUser();
-        if (wxToken.isError()) return wxToken.getErrorResult();
+//        ParseCurrentOpenId wxToken = userService.currentWxUser();
+//        if (wxToken.isError()) return wxToken.getErrorResult();
 
-        val user = wxToken.getUser();
-        val wxMpUser = wxToken.getWxMpUser();
+//        val user = wxToken.getUser();
+//        val wxMpUser = wxToken.getWxMpUser();
+//
+//        model.put("user", user);
+//        model.put("openId", wxMpUser.getOpenId());
+//        model.put("nickName", wxMpUser.getNickname());
+//        model.put("sexDesc", wxMpUser.getSexDesc());
+//        model.put("sex", wxMpUser.getSex());
+//        model.put("city", wxMpUser.getCity());
+//        model.put("province", wxMpUser.getProvince());
+//        model.put("country", wxMpUser.getCountry());
+//        model.put("headImgUrl", wxMpUser.getHeadImgUrl());
 
-        model.put("user", user);
-        model.put("openId", wxMpUser.getOpenId());
-        model.put("nickName", wxMpUser.getNickname());
-        model.put("sexDesc", wxMpUser.getSexDesc());
-        model.put("sex", wxMpUser.getSex());
-        model.put("city", wxMpUser.getCity());
-        model.put("province", wxMpUser.getProvince());
-        model.put("country", wxMpUser.getCountry());
-        model.put("headImgUrl", wxMpUser.getHeadImgUrl());
-
-        List<UserPlace> userPlaceList = userPlaceService.getByUserId(user.getUserId());
+//        List<UserPlace> userPlaceList = userPlaceService.getByUserId(user.getUserId());
 
         JsonWapper jw = new JsonWapper();
-        jw.set("userPlaceList", userPlaceList);
+//        jw.set("userPlaceList", userPlaceList);
         model.put("userPlaceList", jw);
 
         return new ModelAndView("/cust/account.ftl", model);

+ 4 - 4
whepi-web/src/main/resources/application-dev.yml

@@ -22,9 +22,9 @@ yvan:
   upload_domain: /static
   wechat:
     #测试帐号
-    token: luoyifan
-    appID: wx81b852a5a49ab57d
-    appsecret: 40410a13cf71fdc91919232fb0226893
+    token: yuliang
+    appID: wxa3991865de920847
+    appsecret: 4ac7ffba92e934f944a9d78ecc1807b5
 
 #    token: yuliang
 #    appID: wx1b020f76b18f0294
@@ -46,7 +46,7 @@ yvan:
 
     ##domain: http://wx.good5you.com/
 #    domain: http://bofeng.ng.good5you.com
-    domain: http://lyf.ng.yvanui.com/
+    domain: http://yuliang.ng.yvanui.com/
 #    domain: http://yyc21fmd42.hkhttp.cn
 #    tmpTicketExpireSeconds: 10800
     templates: