不知道是我的版本低了还是fecshop系统bug

bug问题 · zhuzhi1 · 于 6年前 发布 · 2030 次阅读

terry 是不是应该把上面一坨注释掉,不然不可能执行第二个if,也就不能实现动态添加字段

共收到 5 条回复
Fecmall#16年前 0 个赞

文件路径!!!!!!!

Fecmall#26年前 0 个赞

怀疑版本低,就去github对比一下不就行了?

Fecmall#36年前 0 个赞

注意描述清楚问题,自己的帖子别人是否能看懂。

zhuzhi1#46年前 0 个赞

@Terry #1楼 这个文件

Fecmall#56年前 0 个赞

历史原因残留代码,把这个代码去掉就行,改成这样吧

public function attributes($origin = false)
    {
        $origin = [
            '_id',
            'product_spu',
            'product_sku',
            'product_id',
            'rate_star',
            'name',
            'user_id',
            'ip',
            'summary',
            'review_content',        // 评论的内容
            'review_date',            // 评论的最后更新时间
            'store',            // store
            'lang_code',        // 语言
            'status',            // 审核状态 10代表未审核,1代表已审核。
            'audit_user',        // 审核账号
            'audit_date',        // 审核时间
        ];
        if (is_array(self::$_customAttrs) && !empty(self::$_customAttrs)) {
            $origin = array_merge($origin, self::$_customAttrs);
        }

        return $origin;
    }

我查阅了一下代码,没有实际用到 addCustomAttrs 这个方法的,因此目前对功能没有影响,改成上面的样子把,

https://github.com/fecshop/yii2_fecshop/commit/d02df5c7a9e23a796c9507ea13e254e40288e07d

代码已经提交,下个版本会更新,多谢发现代码问题。

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics