hrjy 2 年之前
父節點
當前提交
21c1a190b6

+ 2 - 2
app/admin/view/index/index.php

@@ -40,7 +40,7 @@
                         <ul class="dropdown-menu animated fadeInRight m-t-xs">
                             <li><a class="J_menuItem admin_close" href="{:Url('setting.systemAdmin/admin_info')}">个人资料</a>
                             </li>
-                            <li><a class="admin_close" target="_blank" href="http://www.crmeb.com/">联系我们</a>
+<!--                            <li><a class="admin_close" target="_blank" href="http://www.crmeb.com/">联系我们</a>-->
                             </li>
                             <li class="divider"></li>
                             <li><a href="{:Url('login/logout')}">安全退出</a>
@@ -150,7 +150,7 @@
         </div>
         <!--底部版权-->
         <div class="footer"  @touchmove.prevent>
-            <div class="pull-right">© 2017-2021 <a href="http://www.crmeb.com/" target="_blank">CRMEB</a>
+<!--            <div class="pull-right">© 2017-2021 <a href="http://www.crmeb.com/" target="_blank">CRMEB</a>-->
             </div>
         </div>
     </div>

+ 22 - 0
app/api/controller/PublicController.php

@@ -339,4 +339,26 @@ class PublicController
         return app('json')->successful($data);
     }
 
+
+    /**
+     * 版本更新
+     * @param Request $request
+     * @return void
+     */
+    public function version(Request $request)
+    {
+        $config = SystemConfigService::more(['version', 'apk']);
+        $data = [
+            'version' => $config['version'],
+            'url' =>   $request->domain().'/'.$config['apk'],
+        ];
+        $msg = [
+            'status' => 200,
+            'msg' => 'ok',
+            'data' => $data
+        ];
+        return json_encode($msg, JSON_UNESCAPED_SLASHES);
+
+    }
+
 }

+ 1 - 1
app/api/controller/auction/AuctionProductController.php

@@ -248,7 +248,6 @@ class AuctionProductController
 
         try {
             Db::startTrans();
-            $order->save();
             $product = AuctionProduct::find($order['product_id']);
             if (!$product) return app('json')->fail('数据不存在');
             $uid = $product['uid']; // 所属人id
@@ -259,6 +258,7 @@ class AuctionProductController
             $product['is_show'] = 0;
             $res = $product->save();
             AuctionTime::where([['product_id', '=', $product['id']]])->delete();
+            AuctionOrder::where('order_id', $data['order_id'])->update(['status' => 3]);
             AuctionOrder::return($order['id']); // 买家
             Db::commit();
             return app('json')->successful('完成');

+ 77 - 0
app/api/controller/user/UserBillController.php

@@ -333,6 +333,83 @@ class UserBillController
                             $item['wap_poster'] = UtilService::setHttpType($posterInfo['thumb_path'], 1);
                     }
                 }
+            }else if ($type == 3) {
+                //公众号
+                $name = $user['uid'] . '_' . $user['is_promoter'] . '_user_wap.jpg';
+                $imageInfo = SystemAttachment::getInfo($name, 'name');
+                //检测远程文件是否存在
+                if (isset($imageInfo['att_dir']) && strstr($imageInfo['att_dir'], 'http') !== false && curl_file_exist($imageInfo['att_dir']) === false) {
+                    $imageInfo = null;
+                    SystemAttachment::where(['name' => $name])->delete();
+                }
+                if (!$imageInfo) {
+//                    $qr_code = QrcodeService::getForeverQrcode('spread', $user['uid']);
+//                    if (isset($qr_code['url'])) {
+//                        $urlCode = $qr_code['url'];
+//                    } else {
+                    $codeUrl = set_http_type($siteUrl . '/register?spread=' . $user['uid'], 1);//二维码链接
+                    $imageInfo = UtilService::getQRCodePath($codeUrl, $name);
+                    if (is_string($imageInfo)) return app('json')->fail('二维码生成失败', ['error' => $imageInfo]);
+                    SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
+                    $urlCode = $imageInfo['dir'];
+//                    }
+                } else $urlCode = $imageInfo['att_dir'];
+                if ($imageInfo['image_type'] == 1) $urlCode = $siteUrl . $urlCode;
+                $siteUrl = set_http_type($siteUrl, 1);
+                $filelink = [
+                    'Bold' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
+                    'Normal' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
+                ];
+                if (!file_exists($filelink['Bold'])) return app('json')->fail('缺少字体文件Bold');
+                if (!file_exists($filelink['Normal'])) return app('json')->fail('缺少字体文件Normal');
+                foreach ($routineSpreadBanner as $key => &$item) {
+                    $posterInfo = '海报生成失败:(';
+                    $config = array(
+                        'image' => array(
+                            array(
+                                'url' => $urlCode,     //二维码资源
+                                'stream' => 0,
+                                'left' => 225,
+                                'top' => 913,
+                                'right' => 0,
+                                'bottom' => 0,
+                                'width' => 300,
+                                'height' => 300,
+                                'opacity' => 100
+                            )
+                        ),
+                        'text' => array(
+                            array(
+                                'text' => $user['nickname'],
+                                'left' => 250,
+                                'top' => 840,
+                                'fontPath' => $rootPath . 'public' . DS . $filelink['Bold'],     //字体文件
+                                'fontSize' => 16,             //字号
+                                'fontColor' => '40,40,40',       //字体颜色
+                                'angle' => 0,
+                            ),
+                            array(
+                                'text' => '邀请您加入' . sys_config('site_name'),
+                                'left' => 250,
+                                'top' => 880,
+                                'fontPath' => $rootPath . 'public' . DS . $filelink['Normal'],     //字体文件
+                                'fontSize' => 16,             //字号
+                                'fontColor' => '40,40,40',       //字体颜色
+                                'angle' => 0,
+                            )
+                        ),
+                        'background' => $item['pic']
+                    );
+                    $resWap = $resWap && $posterInfo = UtilService::setSharePoster($config, 'wap/spread/poster');
+                    if (!is_array($posterInfo)) return app('json')->fail($posterInfo);
+                    SystemAttachment::attachmentAdd($posterInfo['name'], $posterInfo['size'], $posterInfo['type'], $posterInfo['dir'], $posterInfo['thumb_path'], 1, $posterInfo['image_type'], $posterInfo['time'], 2);
+                    if ($resWap) {
+                        if ($posterInfo['image_type'] == 1)
+                            $item['wap_poster'] = $siteUrl . $posterInfo['thumb_path'];
+                        else
+                            $item['wap_poster'] = UtilService::setHttpType($posterInfo['thumb_path'], 1);
+                    }
+                }
             }
             if ($resRoutine && $resWap) return app('json')->successful($routineSpreadBanner);
             else return app('json')->fail('生成图片失败');

+ 1 - 1
app/api/controller/user/UserController.php

@@ -89,7 +89,7 @@ class UserController
         if(!$validate->Check($info)){
             return app('json')->fail($validate->getError());
         }
-        $res= User::where('card_id',$info['cid'])->count();
+        $res= User::where('card_id',$info['cid'])->where('is_auth', 2)->count();
         if($res >= 2){
             return app('json')->fail('身份证最多绑定两个账号');
         }

+ 25 - 0
app/register/config/route.php

@@ -0,0 +1,25 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 应用设置
+// +----------------------------------------------------------------------
+
+return [
+    // 是否强制使用路由
+    'url_route_must'        => false,
+    // 合并路由规则
+    'route_rule_merge'      => true,
+    // 路由是否完全匹配
+    'route_complete_match'  => false,
+    // 是否自动转换URL中的控制器和操作名
+    'url_convert'           => true,
+];

+ 20 - 0
app/register/config/view.php

@@ -0,0 +1,20 @@
+<?php
+// +----------------------------------------------------------------------
+// | 模板设置
+// +----------------------------------------------------------------------
+
+return [
+    // 模板后缀
+    'view_suffix'  => 'html',
+    // 模板路径
+    'view_path'    => app_path('view'),
+    // 视图输出字符串内容替换
+    'tpl_replace_string'       => [
+        '{__PUBLIC_PATH}' =>  '/',              //public 目录
+        '{__STATIC_PATH}' =>  '/static/',       //全局静态目录
+        '{__PLUG_PATH}'   =>  '/static/plug/',  //全局静态插件
+        '{__ADMIN_PATH}'  =>  '/system/',        //后台目录
+        '{__FRAME_PATH}'  =>  '/system/frame/',  //后台框架
+        '{__MODULE_PATH}' =>  '/system/module/', //后台模块
+    ]
+];

+ 25 - 0
app/register/controller/Index.php

@@ -0,0 +1,25 @@
+<?php
+
+
+namespace app\register\controller;
+
+
+use app\models\system\Site;
+use crmeb\basic\BaseController;
+
+class Index extends BaseController
+{
+    public function index()
+    {
+        $apk = sys_config('apk', '');
+        $this->assign('apk', $apk);
+        return $this->fetch();
+    }
+
+    public function down()
+    {
+        $apk = sys_config('apk', '');
+        $this->assign('apk', $apk);
+        return $this->fetch();
+    }
+}

+ 3 - 0
app/register/view/index/.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+    "liveServer.settings.port": 5501
+}

+ 99 - 0
app/register/view/index/down.html

@@ -0,0 +1,99 @@
+<!doctype html>
+<html>
+<head>
+    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
+    <style>
+        .div {
+            width: 100%;
+            height: 100%;
+            position: relative;
+        }
+
+        .button {
+            margin-left: 10%;
+            position: absolute;
+            bottom: 40px;
+            width: 80%;
+            text-align: center;
+            z-index: 999;
+            height: 140px;
+            font-size: 32px;
+            line-height: 140px;
+            letter-spacing: 5px;
+            background-color: #32baff;
+            border-radius: 5px;
+            color: white;
+
+        }
+
+        .img {
+            position: relative;
+            width: 100%;
+        }
+
+        img {
+            max-width: 100%;
+            height: auto;
+        }
+
+        .weixin-tip {
+            display: none;
+            position: fixed;
+            left: 0;
+            top: 0;
+            bottom: 0;
+            background: rgba(0, 0, 0, 0.8);
+            filter: alpha(opacity=80);
+            height: 100%;
+            width: 100%;
+            z-index: 100;
+        }
+
+        .weixin-tip p {
+            text-align: center;
+            margin-top: 10%;
+            padding: 0 5%;
+        }
+
+        * {
+            padding: 0;
+            margin: 0;
+            box-sizing: border-box
+        }
+
+    </style>
+</head>
+<body>
+<div class="div">
+    <img class="img" src="/static/img/down.jpg"/>
+    <a href="{$apk}" downLoad="易趣CBB.apk">
+        <div class="button">Android版本下载</div>
+    </a>
+</div>
+<div class="weixin-tip">
+    <p>
+        <img src="/static/img/live_weixin.png" alt="微信打开"/>
+    </p>
+</div>
+</body>
+<script>
+    $(window).on("load", function () {
+        var winHeight = $(window).height();
+
+        function is_weixin() {
+            var ua = navigator.userAgent.toLowerCase();
+            if (ua.match(/MicroMessenger/i) == "micromessenger") {
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+        var isWeixin = is_weixin();
+        if (isWeixin) {
+            $(".weixin-tip").css("height", winHeight);
+            $(".weixin-tip").show();
+        }
+    })
+</script>
+</html>

+ 210 - 0
app/register/view/index/index.html

@@ -0,0 +1,210 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta name="misapplication-tap-highlight" content="no"/>
+    <meta name="HandheldFriendly" content="true"/>
+    <meta name="MobileOptimized" content="320"/>
+    <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
+    <script typet="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
+</head>
+<body>
+<div class="container">
+    <div class="loginTitle">欢迎注册易趣CBB</div>
+    <div class="loginText">请认真填写个人信息</div>
+    <div class="login-box">
+        <div class="username">账号</div>
+        <input class="input-box" type="email" id="phone" name="phone" placeholder="请输入手机号"/>
+    </div>
+    <div class="login-box">
+        <div class="username">验证码</div>
+        <div class="flex">
+            <input class="input-box" style="width: 50%" id="code" type="number" name="code" placeholder="请输入验证码">
+            <div class="code" id="daojishi" onclick="verification()">发送验证码</div>
+        </div>
+    </div>
+    <div class="login-box">
+        <div class="username">登录密码</div>
+        <input class="input-box" id="loginPass" type="password" name="loginPass" placeholder="请输入登录密码">
+    </div>
+    <div class="login-box">
+        <div class="username">邀请码</div>
+        <input class="input-box" id="invitation" type="text" disabled="disabled" name="invitation" placeholder="请输入邀请码">
+    </div>
+    <div class="flex">
+        <div class="login" onclick="fnLogin()">注册</div>
+        <div class="login"><a href="{:url('down')}">下载APP</a></div>
+    </div>
+</div>
+</body>
+<script type="text/javascript">
+    var url = location.search;
+    if (url.indexOf("?") != -1) {
+        var str = url.substr(1);
+        strs = str.split("=");
+        var invitation = strs[1];
+        document.getElementById('invitation').value = invitation;
+    }
+
+    function fnLogin() {
+        var phone = document.getElementById("phone").value;
+        var loginPass = document.getElementById("loginPass").value;
+        var code = document.getElementById("code").value;
+        var invitation = document.getElementById("invitation").value;
+        if (phone == '') {
+            window.alert("请输入账号");
+            return false;
+        }
+        if (code == '') {
+            window.alert("请输入验证码");
+            return false;
+        }
+        if (loginPass == '') {
+            window.alert("请输入登录密码");
+            return false;
+        }
+        if (invitation == '') {
+            window.alert("请输入邀请码");
+            return false;
+        }
+        $.ajax({
+            type: "post",
+            url: "http://shop.yiqushangshi.com/api/register",
+            data: {account: phone, captcha: code, password: loginPass, spread: invitation},
+            dataType: "json",
+            success: function (data) {
+                window.alert(data.msg);
+                if (data.msg === '注册成功')
+                    window.location.href = "{:url('down')}"
+            }
+        });
+    }
+
+    function verification() {
+        var phone = document.getElementById("phone").value;
+        if (phone == '') {
+            window.alert("请输入手机号");
+            return false;
+        }
+        if (!/^1[3|4|5|6|7|8|9]\d{9}$/.test(phone)) {
+            window.alert('请输入正确的手机号');
+            return;
+        }
+
+        var timer = null;
+        var count = 60;
+        var codeText = $('#daojishi').text();
+
+        if (codeText == '发送验证码') {
+            timer = setInterval(function () {
+                count--;
+                $('#daojishi').text(count);
+                if (count <= 0) {
+                    clearInterval(timer);
+                    $('#daojishi').text('发送验证码');
+                }
+            }, 1000);
+        }
+        if (codeText != '发送验证码') {
+            return
+        }
+        $.ajax({
+            type: "post",
+            url: "http://shop.yiqushangshi.com/api/register/verify",
+            data: {phone: phone, type: 'register'},
+            dataType: "json",
+            success: function (data) {
+                window.alert(data.msg);
+
+            }
+        });
+    }
+</script>
+<style type="text/css">
+    * {
+        margin: 0;
+        padding: 0;
+        font-family: 微软雅黑;
+        font-size: 12px;
+        min-height: 100%;
+    }
+
+    .container {
+        padding: 10% 30px 0px 30px;
+    }
+
+    .loginTitle {
+        font-weight: bold;
+        color: #32baff;
+        font-size: 29px;
+        padding-bottom: 25px;
+    }
+
+    .loginText {
+        font-weight: 500;
+        color: #333333;
+        font-size: 17px;
+        margin-bottom: 15px;
+    }
+
+    .login-box {
+        width: 100%;
+        font-size: 16px;
+        padding-top: 15px;
+    }
+
+    .username {
+        display: block;
+        padding-bottom: 12px;
+        font-weight: 500;
+        color: #333333;
+        font-size: 16px;
+
+    }
+
+    .input-box {
+        border: none;
+        padding: 10px 8px;
+        outline: none;
+        width: 100%;
+        background-color: #F5F5F5;
+        border-radius: 9px;
+        color: #32baff;
+    }
+
+    .input-box::placeholder {
+        color: #bbbbbb;
+    }
+
+    .code {
+        background-color: #32baff;
+        border-radius: 5px;
+        font-weight: 500;
+        color: #FFFFFF;
+        font-size: 13px;
+        padding: 6px 8px;
+    }
+
+    .login {
+        background-color: #32baff;
+        color: #FFFFFF;
+        text-align: center;
+        width: 130px;
+        line-height: 40px;
+        border-radius: 25px;
+        margin-top: 30px;
+    }
+
+    .login > a {
+        color: #FFFFFF;
+        text-decoration: none;
+    }
+
+    .flex {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+    }
+</style>
+</html>

+ 1 - 1
config/app.php

@@ -27,7 +27,7 @@ return [
     // 自动多应用模式
     'auto_multi_app'   => true,
     // 应用映射(自动多应用模式有效)
-    'app_map'          => ['*'=>'', 'api'=>'api', 'admin'=>'admin','wap'=>'wap'],
+    'app_map'          => ['*'=>'', 'api'=>'api', 'admin'=>'admin','wap'=>'wap', 'register' => 'register'],
     // 域名绑定(自动多应用模式有效)
     'domain_bind'      => [],
     // 禁止URL访问的应用列表(自动多应用模式有效)

二進制
public/static/img/down.jpg


二進制
public/static/img/downLoad.png


二進制
public/static/img/live_weixin.png


+ 1 - 0
route/api/route.php

@@ -273,6 +273,7 @@ Route::group(function () {
 
 
     Route::get('auction_list', 'auction.auctionController/list')->name('auction');//场馆数据
+    Route::get('version', 'PublicController/version')->name('version'); // 版本更新
 
 })->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, false);