diff --git a/application/index/view/default/order/index.html b/application/index/view/default/order/index.html index d44a5eb56..78fd8edd4 100755 --- a/application/index/view/default/order/index.html +++ b/application/index/view/default/order/index.html @@ -206,6 +206,11 @@ {{if in_array($order['status'], [4]) and $order['user_is_comments'] eq 0}} 评论 {{/if}} + + {{if in_array($order['status'], [4,5,6])}} + 售后 + {{/if}} + {{if in_array($order['status'], [4,5,6])}} {{/if}} diff --git a/application/service/ConfigService.php b/application/service/ConfigService.php index 3c9be447d..bcca960cf 100755 --- a/application/service/ConfigService.php +++ b/application/service/ConfigService.php @@ -117,6 +117,9 @@ class ConfigService if(Db::name('Config')->where(['only_tag'=>$k])->update(['value'=>$v, 'upd_time'=>time()])) { $success++; + + // 单条配置缓存删除 + cache(config('shopxo.cache_config_row_key').$k, null); } } if($success > 0) @@ -241,17 +244,26 @@ class ConfigService */ public static function ConfigContentRow($only_tag) { + // 缓存key + $key = config('shopxo.cache_config_row_key').$only_tag; + $data = cache($key); + // 获取内容 - $data = Db::name('Config')->where(['only_tag'=>$only_tag])->field('name,value,type,upd_time')->find(); - if(!empty($data)) + if(empty($data)) { - // 富文本处理 - if(in_array($only_tag, self::$rich_text_list)) + $data = Db::name('Config')->where(['only_tag'=>$only_tag])->field('name,value,type,upd_time')->find(); + if(!empty($data)) { - $data['value'] = ResourcesService::ContentStaticReplace($data['value'], 'get'); + // 富文本处理 + if(in_array($only_tag, self::$rich_text_list)) + { + $data['value'] = ResourcesService::ContentStaticReplace($data['value'], 'get'); + } + $data['upd_time_time'] = empty($data['upd_time']) ? null : date('Y-m-d H:i:s', $data['upd_time']); } - $data['upd_time_time'] = empty($data['upd_time']) ? null : date('Y-m-d H:i:s', $data['upd_time']); + cache($key, $data); } + return DataReturn('操作成功', 0, $data); } } diff --git a/config/shopxo.php b/config/shopxo.php index cb8eff5f0..5bc8968e7 100755 --- a/config/shopxo.php +++ b/config/shopxo.php @@ -42,6 +42,9 @@ return [ // 用户密码找回左侧数据 'cache_user_forgetpwd_left_key' => 'cache_user_forgetpwd_left_data', + // 配置信息一条缓存 拼接唯一标记 [ only_tag ] + 'cache_config_row_key' => 'cache_config_row_data_', + // 附件host, 数据库图片地址以/static/...开头 'attachment_host' => defined('__MY_PUBLIC_URL__') ? substr(__MY_PUBLIC_URL__, 0, -1) : '',