Jonlin 6 роки тому
батько
коміт
574006b8f4

+ 62 - 0
application/user/controller/Certification.php

@@ -0,0 +1,62 @@
+<?php
+
+namespace app\user\controller;
+
+use think\Validate;
+use think\Lang;
+
+class Certification extends UserControl
+{
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        Lang::load(APP_PATH . 'admin/lang/' . config('default_lang') . '/member.lang.php');
+    }
+
+    /**
+     * 用户
+     * @return mixed
+     */
+    public function index()
+    {
+        $user_info = $this->getAdminInfo();
+        if (request()->isPost()) {
+            $user_name = input('post.user_name');
+            $company = input('post.company');
+            $trade = input('post.trade');
+            $address = input('post.address');
+
+            $update_info = array(
+                'user_name' => $user_name,
+                'company' => $company,
+                'trade' => $trade,
+                'address' => $address
+            );
+            //print_r($update_info);
+            $res = db('user')->where('user_id', $user_info['user_id'])->update($update_info);
+            if($res == 1){
+                return $this->redirect('User/Member/index');
+            }
+
+        }else{
+            $user = db('user')->where('user_email',$user_info['user_email'])->find();
+            if($user['user_status'] ==1){
+                $user['user_status_cn'] = '已实名认证';
+            }else{
+                $user['user_status_cn'] = '未实名认证';
+            }
+
+            if($user['user_type'] ==1){
+                $user['user_type_cn'] = '个人用户';
+            }
+            if($user['user_type'] ==2){
+                $user['user_type_cn'] = '企业用户';
+            }
+            $this->assign('user', $user);
+            return $this->fetch();
+        }
+    }
+
+
+}

+ 1 - 1
application/user/controller/UserControl.php

@@ -138,7 +138,7 @@ class UserControl extends Controller
                     ),
                     'real_name_authentication' => array(
                         'text' => lang('ds_real_name_authentication'),
-                        'url' => url('Admingroup/index'),
+                        'url' => url('Certification/index'),
                     ),
                 ),
             ),

+ 131 - 0
application/user/view/certification/index.html

@@ -0,0 +1,131 @@
+{extend name="layout:home" /}
+{block name="container"}
+<style>
+    .user{
+        height: 80px;
+    }
+    .user ul{
+        margin-top: 30px;
+    }
+    .user ul li{
+        list-style: none;
+        float: left;
+        margin-left: 50px;
+        text-align: center;
+        height: 45px;
+        line-height: 45px;
+    }
+    .personal_title{
+        margin-left:80px;
+        /*margin-top:20px;*/
+        font-size: 13px;
+        color: dodgerblue;
+    }
+    table{
+        margin-left: 120px;
+        margin-top: 10px;
+    }
+    .enterprise_title{
+        margin-left:80px;
+        margin-top:50px;
+        font-size: 13px;
+        color: dodgerblue;
+    }
+    .enterprise_title table input{
+        border: 1px #aaa solid;
+        border-radius: 2px;
+        height: 30px;
+        width: 280px;
+        line-height:30px ;
+    }
+    .td_info{
+        width: 300px;
+        height: 30px;
+        line-height: 30px;
+    }
+    .td_user_info{
+        width: 300px;
+        height: 30px;
+        line-height: 30px;
+    }
+    .btn{
+        margin-left: 120px;
+        margin-top: 10px;
+        width: 90px;
+        height: 30px;
+        text-align: center;
+        line-height: 30px;
+        border-radius: 20px;
+        background-color: dodgerblue;
+        color: white;
+        cursor:pointer;
+    }
+</style>
+<div class="layui-tab layui-tab-card">
+    <div class="user">
+        <ul>
+            <li style="margin-left: 40px;"><img height="45px" src="{$Think.USER_SITE_ROOT}/images/header.png" alt=""></li>
+            <li>{$Think.session.user_email}</li>
+            <li style="color: dodgerblue;">{$user['user_status_cn']}</li>
+        </ul>
+    </div>
+    <div class="personal">
+        <div>
+            <div class="personal_title">个人认证</div>
+            <table>
+                <tr>
+                    <td class="td_info">可使用HAJD全球数据中心</td>
+                    <td class="td_user_info">可按需购买资源,无锁定随时删除退费</td>
+                </tr>
+                <tr>
+                    <td class="td_info">五分钟工单回复,7*24 90秒极速响应</td>
+                    <td class="td_user_info">30秒申请,全自动秒速审核</td>
+                </tr>
+                <tr>
+                    <td class="td_info">支持升级为企业认证</td>
+                    <td class="td_user_info"></td>
+                </tr>
+            </table>
+            <div class="btn">前往认证</div>
+        </div>
+    </div>
+    <div class="enterprise">
+        <div>
+            <div class="enterprise_title">企业认证</div>
+            <table>
+                <tr>
+                    <td class="td_info">可使用HAJD全球数据中心</td>
+                    <td class="td_user_info">可按需购买资源,无锁定随时删除退费</td>
+                </tr>
+                <tr>
+                    <td class="td_info">五分钟工单回复,7*24 90秒极速响应</td>
+                    <td class="td_user_info">工作日24小时内开具增值税专用发票</td>
+                </tr>
+                <tr>
+                    <td class="td_info">银企直接快捷转账</td>
+                    <td class="td_user_info">VIP群组服务</td>
+                </tr>
+            </table>
+            <div class="btn" style="margin-bottom: 80px;">前往认证</div>
+        </div>
+    </div>
+</div>
+<script type="text/javascript">
+    layui.use('laydate', function(){
+      var laydate = layui.laydate;
+      
+      //执行一个laydate实例
+      laydate.render({
+        elem: '#creatTime' //指定元素
+      });
+        laydate.render({
+            elem:'#timeRang',
+            range:true,
+            format: 'yyyy/MM/dd',
+            done: function(value, date){
+                /* 时间选择完成后的回调 */
+            }
+        })
+    });
+</script>
+{/block}