Commit e7afcf92 by 肖康

Merge branch 'dev/ver/1.0.0' of http://git.ichunt.net/semour/semour_web into dev/ver/1.0.0

parents d4e77465 3858ad20
......@@ -9,6 +9,10 @@ class ClassService
//获取首页需要的所有分类,没有英文名称的不要
public static function getClassificationForHome()
{
$cache = Redis::get('semour_classification_cache');
if ($cache) {
return json_decode($cache, true);
}
//先获取所有分类
$classData = \Http::get(config('website.footstone_url') . '/open/getClassification')->json();
$secondClassList = [];
......@@ -56,13 +60,20 @@ class ClassService
}
}
}
return array_values($topFields);
$data = array_values($topFields);
Redis::set('semour_classification_cache', json_encode($data));
Redis::expire('semour_classification_cache', 600);
return $data;
}
return [];
}
public static function getClassificationById($classId, $includeChildren = false)
{
$cache = Redis::get('semour_classification_cache_' . $classId);
if ($cache) {
return json_decode($cache, true);
}
$classData = \Http::get(config('website.footstone_url') . '/open/getClassification')->json();
if (isset($classData['code']) && $classData['code'] == 0) {
$classificationCache = $classData['data'];
......@@ -87,6 +98,8 @@ class ClassService
}
}
$classification['sku_number'] = $totalSkuNumber;
Redis::set('semour_classification_cache_' . $classId, json_encode($classification));
Redis::expire('semour_classification_cache_' . $classId, 600);
return $classification;
}
return [];
......
......@@ -462,9 +462,7 @@ class OrderService
->keyby("rec_id")
->toArray();
$temp = [];
$return_amount_all = 0;
foreach ($returnItems as $k=>$v){
$recId = $v["rec_id"];
$orderGoodsInfo = \Arr::get($orderItemsArr,$recId);
......@@ -479,12 +477,13 @@ class OrderService
"after_sale_price"=>$v["return_price"], // 售后单价
"return_amount"=>$v["return_amount"], // 售后金额
];
$return_amount_all += $v["return_amount"];
}
$return_amount_all = 0;
$temp = array_values($temp);
foreach ($temp as $c=>&$a){
$a["no"] = $c+1;
$return_amount_all += $a["return_amount"];
}
return ["return_amount_all"=>$return_amount_all,"items"=>$temp];
}
......
......@@ -3,7 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Certification - ')
@section('body')
@include('common.headerTop')
@include('common.headerNav')
......
......@@ -3,7 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Company - ')
@section('body')
@include('common.headerTop')
@include('common.headerNav')
......
......@@ -3,7 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Privacy - ')
@section('body')
@include('common.headerTop')
@include('common.headerNav')
......
......@@ -3,6 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Quality - ')
@section('body')
@include('common.headerTop')
......
......@@ -3,6 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Refund - ')
@section('body')
@include('common.headerTop')
......
......@@ -3,6 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Term - ')
@section('body')
@include('common.headerTop')
......
......@@ -3,6 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Term User - ')
@section('body')
@include('common.headerTop')
......
@extends('layouts.app')
@section('title','Change Password - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/auth/forget.min.css?v={{time()}}">
@endsection
......
@extends('layouts.app')
@section('title','Forget Password - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/auth/forget.min.css?v={{time()}}">
@endsection
......
@extends('layouts.app')
@section('title','Login - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/auth/login.min.css?v={{time()}}">
@endsection
......
@extends('layouts.app')
@section('title','Confirm - ')
@section('content')
<div class="container">
......
@extends('layouts.app')
@section('title','Email - ')
@section('content')
<div class="container">
......
@extends('layouts.app')
@section('title','Reset Password - ')
@section('content')
<div class="container">
......
@extends('layouts.app')
@section('title','Register - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/auth/reg.min.css?v={{time()}}">
@endsection
......
@extends('layouts.appMall')
@section('title','Brand - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/brand/list.min.css?v={{time()}}">
@endsection
......
@extends('layouts.appMall')
@section('title','Brand Map - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/brand/brand.min.css?v={{time()}}">
@endsection
......
@extends('layouts.appMall')
@section('title','Shopping Car - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/car/car.min.css?v={{time()}}">
@endsection
......
@extends('layouts.appMall')
@section('title','Order Confirm - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/car/confirm.min.css?v={{time()}}">
@endsection
......
@extends('layouts.appMall')
@section('title','Classification - ')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/class/class.min.css?v={{time()}}">
@endsection
......
......@@ -3,7 +3,7 @@
<link rel="stylesheet" href="{{$public}}/assets/css/home/home.min.css?v={{time()}}">
@endsection
@section('title','Semour: The Global ')
@section('body')
@include('common.headerTop')
@include('common.headerNav')
......
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', '深茂官网')title描述</title>
<title>@yield('title')Electronics Supply Chain Solution Provider</title>
@include("common.css")
@yield('css')
......
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', '深茂官网')title描述</title>
<title>@yield('title')Electronics Supply Chain Solution Provider SEMOUR</title>
@include("common.css")
@yield('css')
......
@extends('layouts.appMall')
@section('css')
@section('title',' Online Store - ')
<link rel="stylesheet" href="{{$public}}/assets/css/mall/mall.min.css?v={{time()}}">
@endsection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment