最新服务器上的版本,以后用这个
ggc
wangzhenxin
2023-04-16 5b01c67286f27e37e6728549d239413bbf315f1a
ggc
5 files modified
76 ■■■■ changed files
.user.ini 2 ●●● patch | view | raw | blame | history
.vscode/launch.json 41 ●●●●● patch | view | raw | blame | history
plugins/exchange/forms/exchange/validate/BasicModel.php 9 ●●●●● patch | view | raw | blame | history
plugins/exchange/forms/exchange/validate/FacadeAdmin.php 6 ●●●● patch | view | raw | blame | history
plugins/exchange/views/code/index.php 18 ●●●● patch | view | raw | blame | history
.user.ini
@@ -1 +1 @@
open_basedir=/www/wwwroot/th/:/tmp/
open_basedir="d:/wamp64/www/cms/;C:/Windows/Temp/;C:/Temp/;D:/BtSoft/temp/session/"
.vscode/launch.json
@@ -5,11 +5,44 @@
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "name": "针对 localhost 启动 Chrome",
            "url": "http://localhost:8080",
            "webRoot": "${workspaceFolder}"
            "port": 9000
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 0,
            "runtimeArgs": [
                "-dxdebug.start_with_request=yes"
            ],
            "env": {
                "XDEBUG_MODE": "debug,develop",
                "XDEBUG_CONFIG": "client_port=${port}"
            }
        },
        {
            "name": "Launch Built-in web server",
            "type": "php",
            "request": "launch",
            "runtimeArgs": [
                "-dxdebug.mode=debug",
                "-dxdebug.start_with_request=yes",
                "-S",
                "127.0.0.1"
            ],
            "program": "",
            "cwd": "${workspaceRoot}",
            "port": 9000,
            "serverReadyAction": {
                "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
                "uriFormat": "http://127.0.0.1:%s",
                "action": "openExternally"
            }
        }
    ]
}
plugins/exchange/forms/exchange/validate/BasicModel.php
@@ -53,6 +53,15 @@
        ])->one();
    }
    public function setCodeModel3($card_no)
    {
        $this->codeModel = ExchangeCode::find()->where([
            // 'code' => $code,
            'card_no' => $card_no,
            'mall_id' => $this->mall_id,
        ])->one();
    }
    public function setLibraryModel($library_id)
    {
        $this->libraryModel = CommonModel::getLibrary($library_id, $this->mall_id);
plugins/exchange/forms/exchange/validate/FacadeAdmin.php
@@ -35,7 +35,11 @@
    public function admin2($mall_id, $code, $card_no)
    {
        $this->validate->setMallId($mall_id);
        $this->validate->setCodeModel2($code,$card_no);
        // 按卡号和密码验证
        // $this->validate->setCodeModel2($code,$card_no);
        // 只验证卡号,不验证密码
        $this->validate->setCodeModel3($card_no);
        $this->validate->hasCode();//是否存在码
        $this->validate->hasExchange();//是否兑换
        $this->validate->hasDisable();//是否禁用
plugins/exchange/views/code/index.php
@@ -122,19 +122,19 @@
            <div flex="wrap:wrap cross:center" style="margin-bottom: 15px;">
                <div>卡号</div>
                <div class="input-item" style="width: 230px">
                    <el-input maxlength="20" size="small" placeholder="请输入卡号" v-model="cardKeyword" >
                    </el-input>
                </div>
            </div>
            <div flex="wrap:wrap cross:center" style="margin-bottom: 15px;">
                <div>密码</div>
                <div class="input-item" style="width: 230px">
                    <el-input maxlength="12" @keyup.enter.native="toSearch" size="small" placeholder="请输入密码" v-model="keyword" clearable @clear="toSearch">
                    <el-input maxlength="20" size="small" placeholder="请输入卡号" @keyup.enter.native="toSearch" v-model="cardKeyword"  clearable @clear="toSearch">
                        <el-button slot="append" icon="el-icon-search" @click="toSearch"></el-button>
                    </el-input>
                </div>
            </div>
            <el-form v-show="form.rewards.length > 0" @submit.native.prevent size="small" ref="form" :model="form" label-width="80px">
                <div flex="wrap:wrap cross:center" style="margin-bottom: 15px;">
                    <div>密码</div>
                    <div class="input-item" style="width: 230px">
                        <el-input maxlength="12" size="small" aria-readonly="true" placeholder="请输入密码" v-model="form.keyword">
                        </el-input>
                    </div>
                </div>
                <el-form-item label="兑换用户" prop="user">
                    <div flex="dir:left cross:center">
                        <div v-if="form.user && form.user.id > 0" flex="dir:left cross:center" style="margin-right: 15px;">
@@ -426,7 +426,7 @@
                let that = this;
                that.form.rewards = [];
                that.msg = '';
                if(!that.keyword || !that.cardKeyword) {
                if(!that.cardKeyword) {
                    return false
                }
                that.loading = true;