其他 #453
Updated by Junyi Zhang 2 months ago
*Background*
# 记录在开发OTS4.0过程中需要讨论的特殊处理
*Task Details (Optimizations)*
* *1.【DONE】添加DOM对象的时候,先隐藏然后复制*
1.1 web/catalog/model/account/order_filters_v3.php row 78
1.2 web/catalog/model/account/order_v3.php row 233
*Niko:*
1. 避免DOM元素提前加载,保持PHP model数据层数据整洁。修改原来JS clone新增元素的方式为JS动态创建。
2. 动态加载元素的语言包:各自定义在各自的twig中,共通的则写在footer.twig中
* *2. 不同设备的差异*
2.1 _*IOS:*_
- Date类型在IOS中的显示问题
1)默认水平居中(期待值:和Android一样,左对齐)
2)默认垂直偏上(期待值:和Android一样,居中对齐)
3)点击Reset, 期待为清空, 当前恢复为初始值日期
- Order list will scroll in two directions.(IOS较为明显)
- Current filter中的setup new filter未focus到filter name上(只有第一次加载My-filter时未focus到filter name)。
2.2 _*Android:*_
- Edge中的icon默认实心(fill:1)。Chrome没有此类问题。
* *3. Session机制: file -> redis*
** 3.1 _*error.log*_ session相关的两个问题:
<pre>
- PHP Notice: Error: session file size is 0 : /var/www/html/storage/session/sess_ed565225ec4097c33086dd03eb in /var/www/html/ots4.0/system/library/session/file.php on line 28
- PHP Unknown: Automatic conversion of false to array is deprecated in /var/www/html/ots4.0/catalog/controller/startup/startup.php on line 94
</pre>
* *4. UI 优化*
** 4.1 _*手机端order list中长按功能:*_ 科参考一些"App":https://redmine.easydingzhi.com/attachments/241 的做法,长按后突出显示当前选中内容,
在当前行的上方、下方显示可操作的下拉列表(取代当前简易版的Popover)。 需调研web端是否能够实现。
* *5. 上线前的准备*
** 5.1 _*重新排查Size相关的options,确保全覆盖,参考如下SQL(需要一个一个option检查)*
<pre>
SELECT DISTINCT po.option_id
FROM ots_product p
LEFT JOIN ots_product_option po ON (po.product_id = p.product_id)
WHERE p.declaration_base_info LIKE '%{dimension}%'
</pre>
*Task Details (Remaining Tasks)*
* *1. 用户管理模块* #464
# 创建用户成功的modal,可选:是否发送提示邮件
# 登录:remember me
# 错误提示机制: 区分是alert提示还是input的弹出框提示,从而决定是否需要滚动顶部。
# Mobile: 'Add shipping address' 按钮底部有部分被挡住了
# 禁用双击放大
* *2. 产品管理模块* #463
# Price_min, Price_min_branding怎么处理,要不要显示在Invoice上
*v4 coding standard:*
# Git提交
#xxx(redmine number): xxx(redmine title) - xxx(任意:补充内容)
# 代码规范
2.1: 结构:Public -> Protected -> Private
2.2: 其他代码规范同SBX
# MVCL的v3/v4物理分割
3.1: v3/v4的代码分为两个文件,比如: order.php, order_v3.php
3.2: system也分为两个文件,暂时只有一个user_v3
- Note: front的$this->user在v4中会替换为$this->customer, 即v4中需要清除$this->user
3.3: 代码中,区分v3/v4的调用,比如:new User_V3
# 前台代码
twig, js, css (js, css尽量写在单独的css文件中)
# 后台代码
MVCL (L:en,cn)
# 注释
## 类名:
<pre>
/**
* xxx
*
* @copyright RedBlue-OTS 2024
* @version v4
*
*/
</pre>
## 函数名:参数类型 + 返回值类型
<pre>
/**
* xxx
*
* @param xxx $xxx
* @param xxx $xxx
* @return xxx
*/
</pre>
*Output*
* Report and Solution
*Others*