# lzdls **Repository Path**: workwodrow/lzdls ## Basic Information - **Project Name**: lzdls - **Description**: 大理石 - **Primary Language**: PHP - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-12-21 - **Last Updated**: 2025-10-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 基于YII2重构的服务及应用 ## 准备工作 ```text git config --global credential.helper store && git config --global core.ignorecase false && git config --global core.autocrlf true ``` ## 迁移教程 1. `git clone https://gitee.com/workwodrow/lzdls.git` 2. `cd path/to/project` 3. `php composer.phar install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --no-scripts --no-suggest --optimize-autoloader -vvv` 4. `php init` 5. 设置数据库以及其他配置文件 6. 挂载文件 `sshfs -o allow_other,nonempty,IdentityFile=~/.ssh/id_rsa -p port username@host:/path/to/storage/ /@storage_root` 7. 设置http服务器并请求测试 8. nginx重写 ```allykeynamelanguage location / { try_files $uri $uri/ /index.php$is_args$args; } location /api { try_files $uri $uri/ /api/index.php$is_args$args; } location /xcxApi { try_files $uri $uri/ /xcxApi/index.php$is_args$args; } location /adminApi { try_files $uri $uri/ /adminApi/index.php$is_args$args; } location /backend { try_files $uri $uri/ /backend/index.php$is_args$args; } location /admin { try_files $uri $uri/ /admin/index.php$is_args$args; } location /home { try_files $uri $uri/ /home/index.php$is_args$args; } ``` ## postman ### after auth ```text if(responseCode.code === 200){ console.log(responseBody); var json = JSON.parse(responseBody); if(json.status === 200){ pm.environment.set('token', json.data.token); pm.environment.set('key', json.data.key); } } ``` ### auth request ```text var _token = pm.environment.get("token"); var _key = pm.environment.get("key"); var _timestamp = pm.variables.replaceIn('{{$timestamp}}'); var _nonce = pm.variables.replaceIn('{{$randomUUID}}'); request.data["token"] = _token; request.data["key"] = _key; request.data["timestamp"] = _timestamp; request.data["nonce"] = _nonce; delete request.data["sign"]; var keys = Object.keys(request.data), i, len = keys.length; keys.sort(); var arr = []; for(var index in keys){ arr[index] = keys[index] + "=" + request.data[keys[index]]; } _sign = arr.join("&"); _sign = CryptoJS.MD5(_sign).toString(); if (pm.request.body.formdata) { // console.log(pm.request.body.formdata); pm.request.body.formdata.append({key: "timestamp", value: _timestamp, type: "text"}); pm.request.body.formdata.append({key: "nonce", value: _nonce, type: "text"}); pm.request.body.formdata.append({key: "sign", value: _sign, type: "text"}); } pm.environment.set("timestamp", _timestamp); pm.environment.set("nonce", _nonce); pm.environment.set("sign", _sign); ``` ### others #### GitHub代理 ```text #只对github.com git config --global http.https://github.com.proxy socks5://127.0.0.1:10808 ```