Browse Source

Merge branch 'dev2.7' of http://192.168.3.207:10080/qmx/qfw into dev2.7

wangshan 5 years ago
parent
commit
9ea8050477

+ 1 - 1
common/src/qfw/util/jy/user_merge.go

@@ -5,8 +5,8 @@ import (
 	"errors"
 	"fmt"
 	"log"
+	"qfw/mongodb"
 	qutil "qfw/util"
-	"qfw/util/mongodb"
 	"qfw/util/redis"
 	"regexp"
 	"strings"

+ 1 - 1
core/src/message.json

@@ -16,7 +16,7 @@
 	"govserviceFD":"/ent-gov/gov/?to=funds",
 	"govserviceRT":"/ent-gov/gov/?to=reports",
 	"bindphone":"/ent-gov/phone/",
-	"myent":"/ent-gov/ent/",
+	"my":"/ent-gov/ent/",
 	
 	"lawsearchaction":"/law/qfw/index",
 	"msiteaction":"/ent/wsite/edit",

+ 19 - 2
core/src/qfw/manage/auth.go → core/src/qfw/manage/auth_ent.go

@@ -7,7 +7,10 @@ import (
 	cutil "qfw/coreutil"
 	"time"
 
+	"gopkg.in/mgo.v2/bson"
+
 	"qfw/util"
+	"qfw/util/mongodb"
 
 	"github.com/go-xweb/xweb"
 )
@@ -25,7 +28,7 @@ func init() {
 	xweb.AddAction(&EntAuth{})
 }
 func (this *EntAuth) List() {
-	this.Render("/manage/auth/list.html")
+	this.Render("/manage/auth/list_ent.html")
 }
 func (this *EntAuth) ListReq() {
 	r := func() *FuncResult {
@@ -63,8 +66,22 @@ func (this *EntAuth) Detail(id string) error {
 	if rData == nil || len(*rData) == 0 {
 		return errors.New("not find data")
 	}
+	//认证企业人员信息
+	phone := util.ObjToString((*rData)["phone"])
+	if phone != "" {
+		res := mongodb.FindOneByField("user", bson.M{"i_appid": bson.M{"$exists": 0},
+			"$or": []interface{}{bson.M{"s_phone": phone}, bson.M{"s_m_phone": phone}}}, `{"_id":1}`)
+		if res != nil && len(*res) > 0 {
+			_id := util.BsonIdToSId((*res)["_id"])
+			if final := mongodb.FindOneByField("user_auth", bson.M{"s_userid": _id}, `{"s_realName":1,"i_status":1}`); final != nil && len(*final) > 0 {
+				(*rData)["persion"] = (*final)["s_realName"]
+				(*rData)["persionAuthStatus"] = (*final)["i_status"]
+				(*rData)["persionId"] = util.BsonIdToSId((*final)["_id"])
+			}
+		}
+	}
 	this.T["data"] = rData
-	return this.Render("/manage/auth/detail.html", &this.T)
+	return this.Render("/manage/auth/detail_ent.html", &this.T)
 }
 
 func (this *EntAuth) Change() {

+ 114 - 0
core/src/qfw/manage/auth_user.go

@@ -0,0 +1,114 @@
+package manage
+
+import (
+	"errors"
+	"log"
+	"time"
+
+	cutil "qfw/coreutil"
+	"qfw/util"
+	"qfw/util/mongodb"
+
+	"gopkg.in/mgo.v2/bson"
+
+	"github.com/go-xweb/xweb"
+)
+
+//企业审核
+type UserAuth struct {
+	*xweb.Action
+	list    xweb.Mapper `xweb:"/manage/userauth/list"`        //列表页面请求
+	listReq xweb.Mapper `xweb:"/manage/userauth/listReq"`     //列表页面
+	detail  xweb.Mapper `xweb:"/manage/userauth/detail/(.*)"` //三级页展示
+	change  xweb.Mapper `xweb:"/manage/userauth/change"`      //审核修改
+}
+
+func init() {
+	xweb.AddAction(&UserAuth{})
+}
+func (this *UserAuth) List() {
+	this.Render("/manage/auth/list_user.html")
+}
+func (this *UserAuth) ListReq() {
+	r := func() *FuncResult {
+		cPage, _ := this.GetInteger("currentPage")
+		pageSize, _ := this.GetInteger("perPage")
+		queryStr := this.GetString("query")
+		status := this.GetString("status")
+		if pageSize == 0 {
+			return &FuncResult{false, errors.New("请求参数有误"), nil}
+		}
+		query := map[string]interface{}{}
+		if queryStr != "" {
+			query["$or"] = []interface{}{map[string]interface{}{"s_realName": queryStr}, map[string]interface{}{"s_idNum": queryStr}}
+		}
+		if status != "" {
+			query["i_status"] = util.IntAll(status)
+		}
+		count := mongodb.Count("user_auth", query)
+		list := mongodb.Find("user_auth", query, `{"l_auditDate":-1}`, `{"s_realName":1,"s_idNum":1,"l_authDate":1,"l_auditDate":1,"i_status":1}`, false, (cPage-1)*pageSize, pageSize)
+		return &FuncResult{true, nil, map[string]interface{}{
+			"currentPage": cPage,
+			"data":        list,
+			"totalRows":   count,
+		}}
+	}()
+	if r.Err != nil {
+		log.Printf("user anth ListReq err:%v\n", r.Err.Error())
+	}
+	this.ServeJson(r.Data)
+}
+
+func (this *UserAuth) Detail(id string) error {
+	rData := mongodb.FindById("user_auth", id, "")
+	if rData == nil || len(*rData) == 0 {
+		return errors.New("not find data")
+	}
+	//查询用户信息
+	userid := util.ObjToString((*rData)["s_userid"])
+	phone := ""
+	res := mongodb.FindById("user", userid, `{"s_m_phone":1,"s_phone":1}`)
+	if res != nil && len(*res) > 0 {
+		if (*res)["s_m_phone"] != nil {
+			phone = util.ObjToString((*res)["s_m_phone"])
+		} else if (*res)["s_phone"] != nil {
+			phone = util.ObjToString((*res)["s_phone"])
+		}
+	}
+	if phone != "" {
+		(*rData)["phone"] = phone
+		entRes := cutil.Mysql.Find("entniche_info", map[string]interface{}{"phone": phone}, "id,name,auth_status", "", -1, -1)
+		if len(*entRes) > 0 {
+			(*rData)["entList"] = entRes
+		}
+	}
+	//认证企业人员信息
+	this.T["data"] = rData
+	return this.Render("/manage/auth/detail_user.html", &this.T)
+}
+
+func (this *UserAuth) Change() {
+	r := func() *FuncResult {
+		id := this.GetString("id")
+		status, err := this.GetInteger("status")
+		reason := this.GetString("reason")
+		if err != nil || id == "" {
+			return &FuncResult{false, errors.New("请求参数异常"), nil}
+		}
+		if status == -1 && reason == "" || !(status == 1 || status == -1) {
+			return &FuncResult{false, errors.New("缺少参数"), nil}
+		}
+		if status == 1 {
+			reason = ""
+		}
+		if !mongodb.Update("user_auth", bson.M{"_id": util.StringTOBsonId(id)}, bson.M{"$set": bson.M{"i_status": status, "s_reason": reason, "l_auditDate": time.Now().Unix()}}, true, false) {
+			return &FuncResult{false, errors.New("数据库操作失败"), nil}
+		}
+
+		return &FuncResult{true, nil, nil}
+	}()
+	if r.Err != nil {
+		log.Printf("user anth ListReq err:%v\n", r.Err.Error())
+	}
+	this.ServeJson(r.Format())
+}

+ 29 - 5
core/src/web/templates/manage/auth/detail.html → core/src/web/templates/manage/auth/detail_ent.html

@@ -122,6 +122,23 @@
         .mimg{
         		width:950px;
         }
+        .entline-group{
+           display: flex;
+        }
+        .entline-group span{
+          white-space: nowrap;
+          color: #fff;
+          padding: 3px 5px;
+          margin-left: 10px;
+          border-radius: 2px;
+          cursor: pointer;
+        }
+        span.pass{
+          background:#4caf50;
+        }
+        span.unpass{
+          background:#ffc107;
+        }
     </style>
 </head>
 <body>
@@ -190,16 +207,23 @@
                             </div>
                             
                             <div class="form-group">
-                                <label class="col-sm-3 control-label" for="name">企业创建时间:</label>
-                                <div class="col-sm-3">
-                                    <input class="form-control" readonly="readonly"  value="{{.T.data.createtime}}"/>
+                                <label class="col-sm-3 control-label" for="name">认证企业人员:</label>
+                                <div class="col-sm-3 entline-group" style="padding-top: 9px;">
+                                    <div>{{.T.data.persion}}</div>
+                                    {{if .T.data.persionAuthStatus}}
+                                      {{if eq .T.data.persionAuthStatus 1}}
+                                      <span class="pass" onclick="window.location.href='/manage/userauth/detail/{{.T.data.persionId}}'">已认证</span>
+                                      {{else}}
+                                      <span class="unpass"  onclick="window.location.href='/manage/userauth/detail/{{.T.data.persionId}}'">未认证</span>
+                                      {{end}}
+                                    {{end}}
                                 </div>
                             </div>
                             
                             <div class="form-group">
-                                <label class="col-sm-3 control-label" for="name">提交审核时间:</label>
+                                <label class="col-sm-3 control-label" for="name">企业创建时间:</label>
                                 <div class="col-sm-3">
-                                    <input class="form-control" readonly="readonly"  value="{{.T.data.auth_time}}"/>
+                                    <input class="form-control" readonly="readonly"  value="{{.T.data.createtime}}"/>
                                 </div>
                             </div>
 

+ 322 - 0
core/src/web/templates/manage/auth/detail_user.html

@@ -0,0 +1,322 @@
+<html>
+<head>
+    <title>用户实名认证审核</title>
+    {{include "/common/inc.html"}}
+    <link href="{{Msg "seo" "cdn"}}/css/message.css" rel="stylesheet">
+    <script src="/js/validform-min.js"></script>
+    <script type="text/javascript" src="/js/zDrag.js"></script>
+    <script type="text/javascript" src="/js/zDialog.js"></script>
+    <script src="{{Msg "seo" "cdn"}}/js/jquery.cityselect.js"></script>
+    <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/My97DatePicker/WdatePicker.js"></script>
+    <style type="text/css">
+        .widget-content {
+            table-layout: fixed;
+            font-size: 14px;
+        }
+
+        #course {
+            background-color: #f5f5f5;
+        }
+
+        #tr1 td img {
+            border: 1px solid #999999;
+            width: 78px;
+            height: 78px;
+            margin: 0;
+            padding: 0;
+            margin-bottom: 20px;
+        }
+
+        .delbtn {
+            position: absolute;
+            margin: 0 0 0 -10px;
+            padding: 0 0 0 0;
+            background-color: #00ffff;
+            cursor: pointer;
+        }
+
+        .delbtn img {
+            height: 15px !important;
+            width: 15px !important;
+            margin-right: -20px !important;
+            margin-top: -8px !important;
+        }
+
+        /*修改弹框样式*/
+        .modal {
+            top: 10%;
+        }
+
+        .modal-dialog {
+            width: 400px;
+            text-align: center;
+        }
+
+        .modal-dialog .bootbox-close-button.close {
+            display: none;
+        }
+
+        .modal-dialog .modal-header .modal-title {
+            color: #4E5051;
+            font-size: 18px;
+        }
+
+        .modal-dialog .bootbox-body {
+            color: #4E5051;
+            font-size: 14px;
+        }
+
+        .modal-dialog .modal-header,
+        .modal-dialog .modal-footer {
+            border: none;
+
+        }
+
+        .modal-dialog .modal-footer {
+            display: flex;
+            justify-content: space-between;
+        }
+
+        .modal-dialog .modal-footer .bootbox-cancel {
+            width: 110px;
+            height: 38px;
+            left: 24px;
+            top: 112px;
+
+            background: #C2C2C2;
+            border-radius: 4px;
+            border-color: #C2C2C2;
+            color: #ffff;
+        }
+
+        .modal-dialog .modal-footer .bootbox-accept {
+            width: 110px;
+            height: 38px;
+            left: 226px;
+            top: 112px;
+
+            background: #4DB443;
+            border-radius: 4px;
+            border-color: #4DB443;
+            color: #ffff;
+        }
+        .entImg{
+            height:120px;
+            margin-right:10px;
+        }
+        .entImg-group{
+          display: flex;
+        }
+        #save{
+          margin:0px 25px;
+          color: #fff;
+          border-color: #4DB443;
+          background-color: #4DB443;
+        }
+        #cancel{
+          margin:0px 25px;
+          color: #4DB443;
+          border-color: #4DB443;
+          background-color: #fff
+        }
+        .mimg{
+        		width:950px;
+        }
+        .entline-group{
+          display: flex;
+          margin:10px 0;
+        }
+        .entline-group span{
+          white-space: nowrap;
+          color: #fff;
+          padding: 3px 5px;
+          margin-left: 10px;
+          border-radius: 2px;
+          cursor: pointer;
+        }
+        span.pass{
+          background:#4caf50;
+        }
+        span.unpass{
+          background:#ffc107;
+        }
+        .sendform{
+        	padding: 30px 0px;
+        }
+    </style>
+</head>
+<body>
+
+{{include "/manage/audithead.html"}}
+<!-- 中间 -->
+<div class="row" style="width:96%; margin:0 auto; margin-top:10px;">
+    <div>
+        {{include "/manage/slider.html"}}
+
+        <div id="content" class="send">
+            <div class="widget-box">
+                <div class="widget-content nopadding">
+                    <div class="head">
+                        <div class="title">企业资料</div>
+                        <div style="clear:both;"></div>
+                    </div>
+                    <div class="sendform">
+                        <form class="registerform form-horizontal" role="form" method="post">                
+                            <div class="form-group">
+                                <label class="col-sm-3 control-label" for="name">姓名:</label>
+                                <div class="col-sm-3">
+                                    <input class="form-control" readonly="readonly" value="{{.T.data.s_realName}}"/>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <label class="col-sm-3 control-label" for="name">绑定手机号:</label>
+                                <div class="col-sm-5" >
+                                    <input class="form-control" readonly="readonly" value="{{.T.data.phone}}"/>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <label class="col-sm-3 control-label" for="name">身份证号码:</label>
+                                <div class="col-sm-5" >
+                                    <input class="form-control" readonly="readonly" value="{{.T.data.s_idNum}}"/>
+                                </div>
+                            </div>
+                            
+                            <div class="form-group">
+                                <label class="col-sm-3 control-label" for="name">身份证照片:</label>
+                                <div class="col-sm-5 entImg-group">
+                                    <img class="entImg" src="{{.T.data.s_idPicPathZ}}">
+                                    <img class="entImg" src="{{.T.data.s_idPicPathF}}">
+                                </div>
+                            </div>
+
+                            <div class="form-group">
+                                <label class="col-sm-3 control-label" for="name">创建企业列表</label>
+                                <div>
+                                <div class="col-sm-8">
+                                  {{range $i, $v := .T.data.entList}}
+                                    {{if $v.auth_status}}
+                                    <div class="entline-group">
+                                        <div>{{$v.name}}</div>
+                                        {{if eq $v.auth_status 1}}
+                                         <div><span class="pass" onclick="window.location.href='/manage/entauth/detail/{{$v.id}}'">已认证</span></div>
+                                        {{else}}
+                                         <div><span class="unpass" onclick="window.location.href='/manage/entauth/detail/{{$v.id}}'">未认证</span></div>
+                                        {{end}}
+                                    </div>
+                                    {{end}}
+                                  {{end}}
+                                </div>
+                                </ul>
+                            </div>
+
+                        </form>
+                    </div>
+
+                   <div class="head">
+                        <div style="clear:both;"></div>
+                    </div>
+                    <div class="sendform form-horizontal"> 
+                          <div class="form-group">
+                              <label class="col-sm-3 control-label" for="name">审核:</label>
+                              <div class="col-sm-5" style="margin-top: 7px;">
+                                  <input type="radio" name="pass" value="1" style="margin:0px 10px 0px 0px;cursor: pointer;"/>通过
+                                  <input type="radio" name="pass" value="-1" style="margin:0px 10px 0px 30px;cursor: pointer;"/>不通过
+                              </div>
+                          </div> 
+                         <div class="form-group">
+                              <label class="col-sm-3 control-label" for="name">未通过原因:</label>
+                              <div class="col-sm-5">
+                                  <input id="reason" class="form-control" value="{{.T.data.s_reason}}"/>
+                              </div>
+                          </div>
+                          <div class="col-sm-10" style="margin-left:20%">
+                            <button class="btn" type="button" id="save">保存</button>
+                            <button class="btn" type="button" id="cancel">重置</button>
+                          </div>
+                    </div>
+            </div>
+        </div>
+
+    </div>
+</div>
+
+<!--显示图片-->
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
+   aria-labelledby="myModalLabel" aria-hidden="true">
+   <div class="modal-dialog mimg">
+      <div class="modal-content">
+         <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" 
+               aria-hidden="true">×
+            </button>
+         </div>
+         <div class="modal-body" id="imgshow" style="cursor:pointer;width:100%;" >
+
+         </div>
+         <div class="modal-footer">
+            <button type="button" class="btn btn-default" 
+               data-dismiss="modal">关闭
+            </button>
+         </div>
+      </div><!-- /.modal-content -->
+   </div><!-- /.modal-dialog -->
+</div><!-- /.modal -->
+{{include "/common/bottom.html"}}
+<script type="text/javascript" src="/js/bootbox.js"></script>
+<script>
+  $(function(){
+    var status={{.T.data.i_status}}
+    $("input[name='pass']").on("click",function(){
+      if($(this).val()==1){
+        $("#reason").val("");
+        $("#reason").attr("readonly","readonly")
+      }else{
+        $("#reason").removeAttr("readonly")
+      }
+    })
+    if(status===1){
+      $("input[name='pass']:eq(0)").trigger("click");
+    }else if(status===-1){
+      $("input[name='pass']:eq(1)").trigger("click");
+    }
+    
+    $(".entImg").on("click",function(){
+      showdiv(this)
+    })
+    
+    $("#cancel").on("click",function(){window.location.reload()})
+    $("#save").on("click",function(){
+      var status=$('input[name="pass"]:checked').val();
+      var reason=$('#reason').val();
+      if(status==="-1"){
+        if(reason==""){
+          alert("请输入未通过原因")
+          return
+        }
+      }else if(status==="1"){
+        reason="";
+      }else{
+         alert("未知输入")
+      }
+      $.post("/manage/userauth/change",{"id":{{.T.data._id}},"status":status,"reason":reason},function(r){
+        if(r.success){
+          window.history.back();
+        }else{
+          alert(r.errMsg)
+        }
+      },"json")
+    })
+  })
+   function showdiv(t) { 
+  	var ht=$(t).attr("src");
+    if(ht==""||ht==undefined){
+      return
+    }
+    $('#myModal').modal({
+   		keyboard: true
+	  });	
+  	$("#imgshow").html("<img style='width:100%' src='"+ht+"'/>")
+   }
+</script>
+</body>
+</html>

+ 0 - 0
core/src/web/templates/manage/auth/list.html → core/src/web/templates/manage/auth/list_ent.html


+ 312 - 0
core/src/web/templates/manage/auth/list_user.html

@@ -0,0 +1,312 @@
+<html>
+<head>
+    <title>用户实名认证审核</title>
+    {{include "/common/inc.html"}}
+    <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
+    <script src="/js/qfwtable.js"></script>
+    <style type="text/css">
+        #course {
+            background-color: #f5f5f5;
+        }
+
+        #content table {
+            table-layout: fixed;
+            border: 0px;
+            font-size: 14px;
+        }
+
+        #sidebar {
+            margin-left: 0px;
+        }
+
+        .table > thead > tr > th:nth-child(1) {
+            width: 15%;
+        }
+
+        .table > thead > tr > th:nth-child(2) {
+            width: 25%;
+        }
+
+        .table > thead > tr > th:nth-child(3) {
+            width: 15%;
+        }
+
+        .table > thead > tr > th:nth-child(4) {
+            width: 15%;
+        }
+
+        .table > thead > tr > th:nth-child(5) {
+            width: 10%;
+        }
+
+        .table > thead > tr > th:nth-child(6), .table > tbody > tr > td:nth-child(6) {
+            width: 20%;
+            /*text-align: center;*/
+        }
+
+
+        .table > thead > tr > th {
+            border: 0px;
+            font-size: 14px;
+        }
+
+        .table > tbody > tr > td {
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            border: 0px;
+            border-bottom: 1px dashed #999999;
+        }
+
+        .table > tbody > tr {
+            cursor: pointer;
+        }
+
+        .addCourse {
+            float: right;
+            margin-right: 20px;
+            color: #fff;
+            background-color: #38b44a;
+            border-color: #38b44a;
+            border-radius: 4px;
+            padding: 8px 12px;
+            margin: 5px;
+        }
+
+        .pagination > .active > a:hover, .pagination > .active > a:focus {
+            background-color: #18CC7D;
+        }
+
+        .editBtn {
+            display: flex;
+        }
+
+        .editBtn span {
+            padding: 3px 7px;
+            border: 1px solid;
+            border-radius: 4px;
+            margin: 0 3px;
+        }
+
+        .yellowStyle {
+            color: #EAB62F;
+            border-color: #EAB62F;
+        }
+
+        .greenStyle {
+            color: #4DB443;
+            border-color: #4DB443;
+        }
+
+        .redStyle {
+            color: #F5585C;
+            border-color: #F5585C;
+        }
+
+        /*修改弹框样式*/
+        .modal {
+            top: 33%;
+        }
+
+        .modal-dialog {
+            width: 400px;
+            text-align: center;
+        }
+
+        .modal-dialog .bootbox-close-button.close {
+            display: none;
+        }
+
+        .modal-dialog .modal-header .modal-title {
+            color: #4E5051;
+            font-size: 18px;
+        }
+
+        .modal-dialog .bootbox-body {
+            color: #4E5051;
+            font-size: 14px;
+        }
+
+        .modal-dialog .modal-header,
+        .modal-dialog .modal-footer {
+            border: none;
+
+        }
+
+        .modal-dialog .modal-footer{
+            display: flex;
+            justify-content: space-between;
+        }
+
+        .modal-dialog .modal-footer .bootbox-cancel{
+            width: 110px;
+            height: 38px;
+            left: 24px;
+            top: 112px;
+
+            background: #C2C2C2;
+            border-radius: 4px;
+            border-color: #C2C2C2;
+            color: #ffff;
+        }
+
+        .modal-dialog .modal-footer .bootbox-accept{
+            width: 110px;
+            height: 38px;
+            left: 226px;
+            top: 112px;
+
+            background: #4DB443;
+            border-radius: 4px;
+            border-color: #4DB443;
+            color: #ffff;
+        }
+
+
+    </style>
+</head>
+<body>
+{{include "/manage/audithead.html"}}
+<div class="row" style="width:96%; margin:0 auto;">
+    {{include "/manage/slider.html"}}
+    <div id="content">
+        <div id="audit"></div>
+    </div>
+</div>
+{{include "/common/bottom.html"}}
+</body>
+<script type="text/javascript" src="/js/bootbox.js"></script>
+<script>
+    $(function () {
+        $("#audit").datatable({
+            perPage: 10
+            ,
+            showPagination: true
+            ,
+            checkbox: "" //check radio
+            ,
+            checkboxHeader: false
+            ,
+            idField: "_id"
+            ,
+            classname: "table-hover"
+            ,
+            css: {"height": "550px"}
+            ,
+            buttons: ['<div style="width:50%;margin:5px" class="input-group pull-right" id="search"><input type="text" id="searchtext" value=""  data-original-title="Search" class="form-control" placeholder="请输入检索条件"><span class="input-group-btn"><button class="btn btn-success" onclick="SearchContent()" data-original-title="Search" id="searchtip" type="button" style="height:38px;">检索</button></span></div><div style="margin:5px;" class="controls pull-right"><select class="form-control" id="status"><option value="">  认证状态  </option><option value="1">  通过 </option><option value="-1">  未通过 </option><option value="0">  未认证 </option></select></div>']
+            ,
+            url: '/manage/userauth/listReq'
+            ,
+            columns: [
+                {
+                    title: "用户名", field: "s_realName"
+                },
+                {
+                    title: "身份证号", field: "s_idNum"
+                },
+                {
+                    title: "提交时间", field: "l_authDate", callback: function (data) {
+                       return formatDate(data.l_authDate*1000)
+                    }
+                },
+                {
+                    title: "处理时间", field: "l_auditDate", callback: function (data) {
+                       return formatDate(data.l_auditDate*1000)
+                    }
+                },
+                {
+                    title: "状态", field: "i_status", callback: function (data) {
+                        if (data.i_status === -1) {
+                            return "未通过"
+                        } else if (data.i_status === 1) {
+                            return "通过"
+                        } else {
+                            return "未审核"
+                        }
+                    }
+                },
+                {
+                    title: "操作", field: "applybill_company", callback: function (data) {
+                      return  "<div class='editBtn'><span class='greenStyle' onclick='window.location.href=\"" + "/manage/userauth/detail/" + data._id + "\"'>管理</span></div>"
+                    }
+                }
+            ]
+        });
+
+        $("select").change(function () {
+            var find = $("#audit").data("datatable");
+            if (!find.options.opost) find.options.opost = find.options.post || {};
+            find.options.post = $.extend(find.options.opost, {
+                status: $("#status").val(),
+            });
+            find.options.currentPage = 1;
+            find.render();
+        });
+
+        $(".addCourse").on("click", function () {
+            window.location.href = "/manage/course/page/add/new"
+        })
+    });
+
+    //点击跳转新页面
+    function redirect(code) {
+        //sessionStorage.setItem("contentHtml",$("#content").prop("outerHTML"));
+        window.open("/manage/dataExport/dataDetail/" + code);
+    }
+
+    //
+    function SearchContent() {
+        var find = $("#audit").data("datatable");
+        if (!find.options.opost) find.options.opost = find.options.post || {};
+        find.options.post = $.extend(find.options.opost, {query: $("#searchtext").val()});
+        find.options.currentPage = 1;
+        find.render();
+    }
+
+    function doCheck(flag, id) {
+        var tipMsg = "";
+        if (flag === "on") {
+            tipMsg = "确定发布课程?";
+        } else if (flag === "off") {
+            tipMsg = "课程下线后将无法购买,确定是否下线?";
+        } else {
+            return
+        }
+
+        bootbox.confirm({
+            title: "提示",
+            message: tipMsg,
+            buttons: {
+                cancel: {
+                    label: '取消'
+                },
+                confirm: {
+                    label: '确定'
+                }
+            },
+            callback: function (result) {
+                if (!result) {
+                    return
+                }
+                $.post("/manage/course/changeStatus", {id: id, flag: flag}, function (r) {
+                    if (r.success) {
+                        $("#audit").data("datatable").render();
+                    } else {
+                        bootbox.alert(r.errMsg)
+                    }
+                })
+            }
+        });
+    }
+    function formatDate(date) {
+      var date = new Date(date);
+      var YY = date.getFullYear() + '-';
+      var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+      var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
+      var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+      var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
+      var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
+      return YY + MM + DD +" "+hh + mm + ss;
+    }
+</script>
+</html>

+ 6 - 1
core/src/web/templates/manage/openplatform/caudit.html

@@ -264,6 +264,7 @@ $(function(){
 						var chb1 = "";
 						var chb2 = "";
 						var chb3 = "";
+						var chb4 = "";
 						for (i in power){
 							if(power[i]=="1"){
 								chb1='checked="checked"';
@@ -274,6 +275,9 @@ $(function(){
 							if(power[i]=="3"){
 								chb3='checked="checked"';
 							}
+							if (power[i]=="4"){
+								chb4='checked="checked"';
+							}
 						}
 						str = '';
 						//if(freeze==-1){
@@ -283,7 +287,8 @@ $(function(){
 						//}
 						str +='<div class="checkbox" style="display: block;"><label><input type="checkbox" name="checkbox1" '+chb1+' onclick="power(this,\''+id+'\')" id="inlineCheckbox1" value="1">订阅Pro</label></div>'+
 					'<div class="checkbox" style="display: block;"><label><input type="checkbox" name="checkbox2" '+chb2+' onclick="power(this,\''+id+'\')" id="inlineCheckbox2" value="2">接口1</label></div>'+
-					'<div class="checkbox" style="display: block;"><label><input type="checkbox" name="checkbox3" '+chb3+' onclick="power(this,\''+id+'\')" id="inlineCheckbox3" value="3">接口2</label></div></div>'
+					'<div class="checkbox" style="display: block;"><label><input type="checkbox" name="checkbox3" '+chb3+' onclick="power(this,\''+id+'\')" id="inlineCheckbox3" value="3">接口2</label></div>'+
+					'<div class="checkbox" style="display: block;"><label><input type="checkbox" name="checkbox4" '+chb4+' onclick="power(this,\''+id+'\')" id="inlineCheckbox4" value="4">接口3</label></div></div>'
 						return str
 					}else{
 						 return '<div style="margin-left: 10px;">-</div>'

+ 3 - 7
weixin/src/qfw/weixin/menu.go

@@ -56,18 +56,14 @@ func CreateMenu(rw http.ResponseWriter, r *http.Request) {
 		menu.Buttons[1].SubButtons[2].Key = "oidentification"
 	*/
 	menu.Buttons[2].Name = "工具箱" //"会员服务"
-	menu.Buttons[2].SubButtons = make([]MenuButton, 3)
+	menu.Buttons[2].SubButtons = make([]MenuButton, 2)
 	menu.Buttons[2].SubButtons[0].Name = "剑鱼标讯" //"微官网"
 	menu.Buttons[2].SubButtons[0].Type = MenuButtonTypeUrl
 	menu.Buttons[2].SubButtons[0].Url = fmt.Sprintf(urlstr, "swordfishaction")
 
-	menu.Buttons[2].SubButtons[1].Name = "绑定手机号" //"我的积分/签到"
+	menu.Buttons[2].SubButtons[1].Name = "我的"
 	menu.Buttons[2].SubButtons[1].Type = MenuButtonTypeUrl
-	menu.Buttons[2].SubButtons[1].Url = fmt.Sprintf(urlstr, "bindphone") //fmt.Sprintf(urlstr, "signature")
-
-	menu.Buttons[2].SubButtons[2].Name = "我的企业"
-	menu.Buttons[2].SubButtons[2].Type = MenuButtonTypeUrl
-	menu.Buttons[2].SubButtons[2].Url = fmt.Sprintf(urlstr, "myent")
+	menu.Buttons[2].SubButtons[1].Url = fmt.Sprintf(urlstr, "my")
 
 	//	menu.Buttons[2].SubButtons[3].Name = "企业认证"
 	//	menu.Buttons[2].SubButtons[3].Type = MenuButtonTypeKey ///search/enterprise/m_ent.html

+ 5 - 3
weixin/src/qfw/weixin/subscribehandler.go

@@ -226,15 +226,17 @@ func downloadUserFace(url string) string {
 	var filename string
 
 	tn := time.Now()
-	filename = fmt.Sprintf("/upload/%s/%s/%s/%s%d.jpg", tn.Format("2006"), tn.Format("01"), tn.Format("02"), tn.Format("20060102150405"), rand.Intn(9999)+1000)
+	dirname := fmt.Sprintf("/upload/%s/%s/%s/", tn.Format("2006"), tn.Format("01"), tn.Format("02"))
+	filename = dirname + fmt.Sprintf("%s%d.jpg", tn.Format("20060102150405"), rand.Intn(9999)+1000)
 	go func() {
 		util.Try(func() {
-			fi, _ := os.OpenFile(weixinconfig.SysConfig.Imgpath+filename, os.O_CREATE|os.O_TRUNC|os.O_SYNC|os.O_RDWR, 0x666)
+			os.MkdirAll(weixinconfig.SysConfig.Imgpath+dirname, 0777)
+			fi, err := os.OpenFile(weixinconfig.SysConfig.Imgpath+filename, os.O_CREATE|os.O_TRUNC|os.O_SYNC|os.O_RDWR, 0x666)
 			defer fi.Close()
 			resp, err := http.Get(url)
 			defer resp.Body.Close()
 			if err == nil {
-				io.Copy(fi, resp.Body)
+				log.Println(io.Copy(fi, resp.Body))
 			} else {
 				log.Println("download userface err:", err.Error())
 			}