ysx123/mx_invest

There is no license information available for the latest version (dev-master) of this package.

A face for mx invest

dev-master 2025-03-23 12:32 UTC

This package is auto-updated.

Last update: 2025-04-23 12:36:02 UTC


README

1:通过composer安装

composer require ysx123/mx_invest:dev-master --ignore-platform-reqs

2:在项目中增加模块的路由。修改配置文件:D:\www\ysx_www\ph02\shiny-pera-ios-dc\frontend\config\main.php

 'components'=>[
 'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            //'rules' =>  $url_rules,
            'rules' =>  array_merge($url_rules,['recipe/<action:\w+>' => 'recipe/recipe/<action>']),
  ],
],
//增加模块
'modules' => [
        'recipe' => [
            'class' => 'ysx\recipe\Module',
        ],
    ],

3:app-api-doc项目增加url路由,用于混淆。修改url.php文件

    //因为这是一个独立出去的模块。所以前面加个recipe模块名
    "impossible/syncabl1"=>'/recipe/recipe/recipe-type',
    "impossible/syncabl2"=>'/recipe/recipe/index' ,
      "impossible/syncabl3"=>'/recipe/recipe/collect-list',
      "impossible/syncabl4"=>'/recipe/recipe/detail',
      "impossible/syncabl5"=>'/recipe/recipe/collect',
      "impossible/syncabl6"=>'/recipe/recipe/upload-image',
      "impossible/syncabl7"=>'/recipe/recipe/add-recipe',
      "impossible/syncabl8"=>'/recipe/recipe/del-recipe',
      "impossible/syncabl9"=>'/recipe/recipe/my-recipe',
     "impossible/syncabl10"=>'/recipe/recipe/add-comment',
     "impossible/syncabl11"=>'/recipe/recipe/comment-list',
     "impossible/syncabl12"=>'/recipe/recipe/delete-comment',
     "impossible/syncabl13"=>'/recipe/recipe/edit-recipe',
     "impossible/syncabl14"=>'/recipe/recipe/report-recipe',
     "impossible/syncabl15"=>'/recipe/recipe/report-type',

4:修改app-api-doc项目,增加文档,直接复制到相应项目的文档目录里。示例文档在:D:\www\ysx_www\app-api-doc\docs\ph_wealth_cash_ios\recipe.md

5:执行生成混淆路由和混淆字段

#混淆字段
php generater.php 目录名
#混淆路由
php generate_url.php 目录名 前缀

6:上传图片接口的key,固定位took,需要手动改一下文档

7:线上项目执行数据迁移,创建表

    php yii migrate --migrationPath=vendor/ysx123/mx_invest/src/migrations/

如果该迁移已经被执行过一次,那上面的命令无法再次执行,需要先删除掉执行记录。删除后再次执行上面迁移命令。

    DELETE FROM migration WHERE version = 'm230225_123456_create_recipe_table';

8:类型图标问题。如果设计图中有类型图标,需要手动上传到H5项目的中 recipe 目录,然后图片地址固定位y1.png到y10-png(这是选中的图片),未选中的是n1.png到n10.png。