Commit 14605a53 by 杨树贤

解决冲突

parents f866fa00 334e1170
......@@ -46,3 +46,5 @@ MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
PUBLIC_URL=http://www.semour.com
#商品服务网址
GOODS_INFO_URL=http://192.168.1.237:60014
......@@ -3,7 +3,10 @@
namespace App\Http\Controllers\Api;
use App\Http\Requests\UserRegister;
use App\Http\Services\CartService;
use App\Http\Services\InquiryService;
use App\Models\User;
use Facade\Ignition\Support\Packagist\Package;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Http\Request;
......@@ -17,25 +20,30 @@ use Illuminate\Support\Facades\Validator;
class CartApiController extends Controller
{
use ThrottlesLogins, RegistersUsers;
//添加购物车, items: {"goods_id":1166788996788323407,"goods_number":2}
public function addCart(Request $request)
{
$validator = Validator::make($request->all(), [
'email' => 'required|string|email|max:255',
'password' => 'required|string|min:8',
'items' => 'required|string',
], [
'password.min' => 'Password must be at least 8 characters long.'
'items.min' => 'items must be at least 1 characters long.'
]);
if ($validator->fails()) {
return $this->setError($validator->errors()->first());
}
$data = $request->only([
'items',
'data',
]);
$result = CartService::addCart($data, $request->user->id);
return !$result ? $this->setError('Add cart failed , please contact administrator'):$this->setSuccess('Add inquiry success');
}
$this->incrementLoginAttempts($request);
//购物车列表
public function cartLists(){
return $this->setError('Login failure');
}
......
......@@ -25,4 +25,9 @@ class CarController extends Controller
{
return view('car.car');
}
public function confirm()
{
return view('car.confirm');
}
}
......@@ -2,31 +2,134 @@
namespace App\Http\Services;
use App\Exceptions\InvalidRequestException;
use App\Models\Inquiry;
use App\Models\InquiryItems;
use App\Models\InquiryItemsModel;
use App\Models\InquiryModel;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;
use App\Models\CartModel;
//购物车服务器层
class CartService
{
//添加购物车
public static function addCart($data, $user)
public static function addCart($data, $user_id)
{
return DB::transaction(function () use ($data, $user) {
$items = \Arr::get($data, 'item', []);
$inquiryItems = [];
try{
$con = DB::connection();
$con->beginTransaction();
$items = json_decode(\Arr::get($data, 'items', []),true);
$redis = Redis::connection();
$goodsInfoArr = ThirdService::getGoodsInfo(array_column($items,"goods_id"));
foreach ($items as $item) {
$inquiryItems[] = [
'user_id' => $user->user_id,
$goods_id = $item['goods_id'];
$temp = [
'user_id' => $user_id,
'goods_id' => $item['goods_id'],
];
$skuInfo = $goodsInfoArr[$goods_id]; //sku库存
$digikeyInfo = $redis->hget("sku_raw_map",$goods_id); //digikey 编码
if ($digikeyInfo){
$digikeyArr = json_decode($digikeyInfo,true);
$temp["raw_goods_sn"]= $digikeyArr["raw_goods_id"];
$temp["raw_goods_packing"]= $digikeyArr["pack"];
$temp["raw_brand_name"]= $digikeyArr["raw_brand_name"];
}
$checkHas = CartModel::where(["user_id"=>$user_id,"goods_id"=>$goods_id,"status"=>1])->first();
if ($checkHas){ //存在累计库存
$temp["goods_number"] = $skuInfo["stock"] > ($item['buy_number']+$checkHas["buy_number"]) ? $item['buy_number']+$checkHas["buy_number"] : $skuInfo["stock"];
$temp["update_time"] = time();
$flag = CartModel::where(["cart_id"=>$checkHas["cart_id"]])->update($temp);
if (!$flag){
return false;
}
}else{ //不存在插入购物车
$temp["goods_number"] = $skuInfo["stock"] > $item['buy_number'] ? $item['buy_number'] : $skuInfo["stock"];
$temp["create_time"] = time();
$temp["update_time"] = time();
$flag = CartModel::insertGetId($temp);
if (!$flag){
return false;
}
}
}
$con->commit();
return true;
}catch (\Exception $e){
$con->rollback();
throw new InvalidRequestException($e->getMessage().$e->getLine());
}
}
//刷新购物车并且返回列表
public static function cartUpdateGetLists($user_id){
//当前用户所有可用的购物车数据
$query = CartModel::where(['user_id'=>$user_id,"status"=>1])
->orderBy('cart_id', 'desc');
$result = $query->get()->toArray();
if (!$result){
return false;
}
try{
$con = DB::connection();
$con->beginTransaction();
$redis = Redis::connection();
$goodsInfoArr = ThirdService::getGoodsInfo(array_column($result,"goods_id"));
foreach ($result as $item) {
$goods_id = $item['goods_id'];
$temp = [
'user_id' => $user_id,
'goods_id' => $item['goods_id'],
'goods_number' => $item['goods_number'],
'create_goods_price' => $item['create_goods_price'],
'create_time' => time(),
'update_time' => time(),
];
$skuInfo = $goodsInfoArr[$goods_id]; //sku库存
$digikeyInfo = $redis->hget("sku_raw_map",$goods_id); //digikey 编码
if ($digikeyInfo){
$digikeyArr = json_decode($digikeyInfo,true);
$temp["raw_goods_sn"]= $digikeyArr["raw_goods_id"];
$temp["raw_goods_packing"]= $digikeyArr["pack"];
$temp["raw_brand_name"]= $digikeyArr["raw_brand_name"];
}
$temp["buy_number"] = $skuInfo["stock"] > $item['buy_number'] ? $item['buy_number'] : $skuInfo["stock"];
if ($temp["buy_number"] == 0){
$temp["status"] = CartModel::STATUS_NO ;
}
$temp["update_time"] = time();
$flag = CartModel::where(["cart_id"=>$item["cart_id"]])->update($temp);
if (!$flag){
return false;
}
}
return InquiryItems::addInquiryItems($inquiryItems);
});
$con->commit();
return true;
}catch (\Exception $e){
$con->rollback();
throw new InvalidRequestException($e->getMessage().$e->getLine());
}
}
}
<?php
namespace App\Http\Services;
use App\Exceptions\InvalidRequestException;
use App\Http\Models\Order\OrderModel;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use SoapClient;
use App\Http\Services\SaleOrderDetailsService;
//调用第三方api接口服务层
class ThirdService
{
//获取商品详情
public static function getGoodsInfo($goods_ids){
$url = env('GOODS_INFO_URL', '') . '/synchronization';
$req_params['goods_id'] = implode(',', $goods_ids);
$response = Http::asForm()->post($url, $req_params);
if (request()->input("debug") == 1){
print_r($url);
print_r("<br/>");
print_r($req_params);
print_r("<br/>");
print_r($response->body());
print_r("<br/>");
die();
}
$res = json_decode($response->body(), true);
if (!$res || $res['errcode'] != 0) {
return [];
}
return $res['data'];
}
}
<?php
namespace App\Http\Models\Order;
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CartModel extends Model
{
protected $primaryKey = 'cart_id';
protected $table = 'cart';
public $timestamps = false;
const STATUS_NO = -1; //状态禁用
const STATUS_YES = 1; //状态启动
//查询购物车数据
public static function getCartInfo($user_id)
......@@ -21,5 +24,4 @@ class CartModel extends Model
}
}
.confirmbox .back{height:56px}.confirmbox .back a{font-size:14px;color:#555}.confirmbox .back i{color:#04439D;font-size:16px}.confirmbox .top{background:#FFFFFF}.confirmbox .top .head{width:1200px;height:48px;background:#DFEAFA;color:#164D9A;font-size:16px;font-weight:bold;padding-left:25px}.confirmbox .top .address-group{padding:0 40px;font-size:14px;color:#555;position:relative;padding-bottom:40px}.confirmbox .top .address-group .edit{width:216px;position:absolute;top:30px;right:40px}.confirmbox .top .address-group .edit .bt{width:91px;height:33px;line-height:33px;border:1px solid #164D9A;border-radius:4px;text-align:center;color:#164D9A;margin-left:30px;cursor:pointer}.confirmbox .top .address-group .edit .bt:first-child{margin:0px}.confirmbox .top .address-group .choose{font-size:16px;color:#222;font-weight:bold;height:30px}.confirmbox .top .address-group .choose .choosebtn{margin-left:32px;cursor:pointer}.confirmbox .top .address-group .choose .choosebtn i{display:block;width:11px;height:11px;border:1px solid #164D9A;border-radius:50%;position:relative;top:1px;margin-right:4px}.confirmbox .top .address-group .choose .choosebtn.act i::after{position:absolute;content:"";width:7px;height:7px;background:#164D9A;border-radius:50%;top:2px;left:2px}.confirmbox .top .address-group .choose .choosebtn span{color:#555;font-size:14px}.confirmbox .top .address-group .info{margin-top:22px}.confirmbox .top .address-group .info .name{min-width:159px;margin-right:70px}.confirmbox .top .address-group .info .email{margin-left:70px;margin-right:70px}.confirmbox .top .address-group .addre{height:32px;line-height:32px;margin-top:23px}.confirmbox .top .address-group .defaults{width:160px;height:32px;line-height:32px;text-align:center;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;margin-left:70px}.confirmbox .top .address-group .handle-box{margin-top:26px}.confirmbox .top .address-group .handle-box .bts{color:#164D9A;font-size:14px;cursor:pointer;margin-right:70px}.confirmbox .bottom{background:#fff;margin-top:18px;padding-top:24px;padding-bottom:30px}.confirmbox .bottom .head{padding:0px 4px}.confirmbox .bottom .head span{font-size:16px;font-weight:bold;width:198px;border-bottom:4px solid #164D9A;border-radius:2px;padding-bottom:8px;text-align:center}.confirmbox .bottom .list-table{width:1152px;margin:0 auto;border-radius:0px 0px 8px 8px;margin-top:20px}.confirmbox .bottom .list-table .w70{width:70px}.confirmbox .bottom .list-table .w184{width:184px}.confirmbox .bottom .list-table .w176{width:176px}.confirmbox .bottom .list-table .w153{width:153px}.confirmbox .bottom .list-table .w116{width:116px}.confirmbox .bottom .list-table .w123{width:123px}.confirmbox .bottom .list-table .w120{width:120px}.confirmbox .bottom .list-table .thead{height:38px;background:#DFEAFA;line-height:38px;border-radius:8px 8px 0px 0px;padding:0 15px}.confirmbox .bottom .list-table .thead .th{font-size:14px;color:#333;font-weight:bold;box-sizing:border-box;padding-right:5px}.confirmbox .bottom .list-table .tbody{font-size:14px;color:#555;border-radius:0px 0px 8px 8px;background:#F7FAFF;overflow:hidden}.confirmbox .bottom .list-table .tbody input{width:164px;height:26px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;line-height:26px;color:#333}.confirmbox .bottom .list-table .tbody .tr{line-height:20px;border-bottom:1px solid #DFEAFA;padding:20px 15px;box-sizing:border-box}.confirmbox .bottom .list-table .tbody .tr .td{word-break:break-all;box-sizing:border-box;padding-right:5px}.confirmbox .bottom .list-table .tbody .tr:last-child{border:0px}.confirmbox .bottom .list-table .tbody .tr.sxbox{background:rgba(51,51,51,0.2)}.confirmbox .bottom .list-table .tbody .tr.sxbox input{background:none;border:1px solid #BCBCBC}.confirmbox .bottom .list-table .tbody .pdf{color:#F68332;font-size:20px}.confirmbox .bottom .list-table .tbody .sx{width:100px;height:20px;border:1px solid #EE1919;border-radius:14px;color:#EE1919;font-size:14px;text-align:center;line-height:20px;position:relative;top:1px}.confirmbox .bottom .jsInfo{padding:0 25px;padding-top:20px;padding-left:836px}.confirmbox .bottom .jsInfo span{font-size:16px;color:#333;font-weight:bold}.confirmbox .bottom .jsInfo .f-red{color:#E92E2E}.confirmbox .bottom .jsInfo .jsitem{height:30px;line-height:30px}.confirmbox .bottom .jsInfo .jsitem i{margin-right:22px;color:#555}.confirmbox .bottom .jsInfo .jsitem .tcon{width:300px}.confirmbox .bottom .jsInfo .jsitem.notip{padding-left:39px}.confirmbox .bottom .jsInfo .jsitem .tips{position:relative}.confirmbox .bottom .jsInfo .jsitem .tips .tipcon{position:absolute;width:500px;background:rgba(40,63,235,0.65);border:1px solid #FFFFFF;border-radius:10px;color:#fff;padding:10px 20px;line-height:20px;box-sizing:border-box;left:-500px;top:-15px;display:none}.confirmbox .bottom .jsInfo .jsitem .tips:hover .tipcon{display:block}.confirmbox .bottom .submit{width:372px;height:40px;line-height:40px;text-align:center;cursor:pointer;background:#164D9A;border-radius:4px;margin:0 auto;margin-top:30px;color:#fff}.choose-popcheck .w45{width:45px}.choose-popcheck .w130{width:130px}.choose-popcheck .w210{width:210px}.choose-popcheck .w153{width:153px}.choose-popcheck .w148{width:148px}.choose-popcheck .w122{width:122px}.choose-popcheck .w150{width:150px}.choose-popcheck .thead{height:48px;background:#FFFFFF;border-radius:8px 8px 0px 0px;line-height:48px;padding:0 22px}.choose-popcheck .thead .th{font-size:14px;color:#333;font-weight:bold;padding-right:5px;box-sizing:border-box}.choose-popcheck .tbody{background:#D5E1F3;border-radius:0px 0px 8px 8px;padding:0 22px;max-height:250px;overflow-y:auto}.choose-popcheck .tbody .tr{cursor:pointer;line-height:20px;border-bottom:1px solid #fff;box-sizing:border-box;padding:14px 0}.choose-popcheck .tbody .tr .td{word-break:break-all;box-sizing:border-box;padding-right:5px;font-size:14px;color:#555}.choose-popcheck .tbody .tr:last-child{border:0px}.choose-popcheck .tbody .tr.act .td{color:#164D9A;font-weight:bold}.choose-popcheck .choosesubmit{color:#fff;font-size:18px;font-weight:bold;width:176px;height:40px;background:#F68332;border-radius:10px;text-align:center;line-height:40px;margin:0 auto;margin-top:24px}
\ No newline at end of file
......@@ -127,7 +127,30 @@ input {
color: #BCBDC4;
}
}
.scrollbar{
&::-webkit-scrollbar {
width : 2px;
background-color: #EDEDED
}
&::-webkit-scrollbar-thumb {
border-radius : 2px;
background-color: #164D9A
}
}
textarea{
line-height: 32px;
box-sizing : border-box;
background : rgba(4, 17, 53, 0.65);
border : 1px solid #FFFFFF;
border-radius: 8px;
color : #fff;
padding-left : 10px;
padding-right: 10px;
&::-webkit-input-placeholder {
color: #BCBDC4;
}
}
select {
height : 32px;
line-height : 32px;
......
@charset "utf-8";html,body,div,iframe,em,img,p,a,strong,b,i,form,label,span,h1,h2,h3,h4,h5,h6,dl,dt,dd,ol,ul,li,applet,object,blockquote,big,cite,code,del,dfn,abbr,acronym,address,pre,time,mark,audio,video,article,aside,canvas,details,embed,figure,figcaption,footer,header,nav,section,menu,button,input,textarea{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;font-weight:normal;list-style:none;outline:none}table,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;font-size:100%;font:inherit}a{text-decoration:none}table{border-color:#ccc !important}body,html,button,input{font-family:Arial,helvetica,PingFangSC-Regular,PingFang SC,"微软雅黑"}.but{height:33px;background:#283FEB;border-radius:8px;line-height:33px;font-size:18px;font-weight:bold;text-align:center;color:#fff;cursor:pointer;box-sizing:border-box;padding:0 5px}input{height:32px;line-height:32px;box-sizing:border-box;background:rgba(4,17,53,0.65);border:1px solid #FFFFFF;border-radius:8px;color:#fff;padding-left:10px;padding-right:10px}input::-webkit-input-placeholder{color:#BCBDC4}select{height:32px;line-height:32px;background:rgba(4,17,53,0.65);border:1px solid #FFFFFF;border-radius:8px;color:#fff;padding-left:10px;padding-right:10px;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;outline:none;background-image:linear-gradient(45deg, transparent 50%, #fff 50%),linear-gradient(135deg, #fff 50%, transparent 50%);background-position:calc(100% - 15px) calc(1em - 1px),calc(100% - 10px) calc(1em - 1px),calc(100% - 2.5em) .5em;background-size:7px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat}select:focus{background-image:linear-gradient(45deg, #fff 50%, transparent 50%),linear-gradient(135deg, transparent 50%, #fff 50%);background-position:calc(100% - 8px) calc(1em - 1px),calc(100% - 15px) calc(1em - 1px),calc(100% - 2.5em) .5em;background-size:7px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat}.clr:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.clr{display:block;min-height:1%}.clr{clear:both}.clr:after{content:" ";display:table;clear:both}.fl{float:left}.fr{float:right}.fw{font-weight:bold}.ta-c{text-align:center}.ta-r{text-align:right}.ta-l{text-align:left}.flex{display:flex}.column{display:flex;flex-direction:column}.row{display:flex;flex-direction:row}.boxsiz{-webkit-box-sizing:border-box;box-sizing:border-box}.bothSide{justify-content:space-between}.avarage{justify-content:space-around}.rowCenter{justify-content:center}.verCenter{align-items:center}
\ No newline at end of file
@charset "utf-8";html,body,div,iframe,em,img,p,a,strong,b,i,form,label,span,h1,h2,h3,h4,h5,h6,dl,dt,dd,ol,ul,li,applet,object,blockquote,big,cite,code,del,dfn,abbr,acronym,address,pre,time,mark,audio,video,article,aside,canvas,details,embed,figure,figcaption,footer,header,nav,section,menu,button,input,textarea{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;font-weight:normal;list-style:none;outline:none}table,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;font-size:100%;font:inherit}a{text-decoration:none}table{border-color:#ccc !important}body,html,button,input{font-family:Arial,helvetica,PingFangSC-Regular,PingFang SC,"微软雅黑"}.but{height:33px;background:#283FEB;border-radius:8px;line-height:33px;font-size:18px;font-weight:bold;text-align:center;color:#fff;cursor:pointer;box-sizing:border-box;padding:0 5px}input{height:32px;line-height:32px;box-sizing:border-box;background:rgba(4,17,53,0.65);border:1px solid #FFFFFF;border-radius:8px;color:#fff;padding-left:10px;padding-right:10px}input::-webkit-input-placeholder{color:#BCBDC4}.scrollbar::-webkit-scrollbar{width:2px;background-color:#EDEDED}.scrollbar::-webkit-scrollbar-thumb{border-radius:2px;background-color:#164D9A}textarea{line-height:32px;box-sizing:border-box;background:rgba(4,17,53,0.65);border:1px solid #FFFFFF;border-radius:8px;color:#fff;padding-left:10px;padding-right:10px}textarea::-webkit-input-placeholder{color:#BCBDC4}select{height:32px;line-height:32px;background:rgba(4,17,53,0.65);border:1px solid #FFFFFF;border-radius:8px;color:#fff;padding-left:10px;padding-right:10px;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;outline:none;background-image:linear-gradient(45deg, transparent 50%, #fff 50%),linear-gradient(135deg, #fff 50%, transparent 50%);background-position:calc(100% - 15px) calc(1em - 1px),calc(100% - 10px) calc(1em - 1px),calc(100% - 2.5em) .5em;background-size:7px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat}select:focus{background-image:linear-gradient(45deg, #fff 50%, transparent 50%),linear-gradient(135deg, transparent 50%, #fff 50%);background-position:calc(100% - 8px) calc(1em - 1px),calc(100% - 15px) calc(1em - 1px),calc(100% - 2.5em) .5em;background-size:7px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat}.clr:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.clr{display:block;min-height:1%}.clr{clear:both}.clr:after{content:" ";display:table;clear:both}.fl{float:left}.fr{float:right}.fw{font-weight:bold}.ta-c{text-align:center}.ta-r{text-align:right}.ta-l{text-align:left}.flex{display:flex}.column{display:flex;flex-direction:column}.row{display:flex;flex-direction:row}.boxsiz{-webkit-box-sizing:border-box;box-sizing:border-box}.bothSide{justify-content:space-between}.avarage{justify-content:space-around}.rowCenter{justify-content:center}.verCenter{align-items:center}
\ No newline at end of file
......@@ -542,7 +542,6 @@
}
}
.rightboxx {
display : none;
position : absolute;
......@@ -556,6 +555,7 @@
z-index : 1;
padding : 24px;
overflow-y: auto;
box-shadow: 2px 0px 4px 0px rgba(2,30,69,0.2);
&::-webkit-scrollbar {
width : 2px;
......
......@@ -70,6 +70,184 @@
background: #fff;
margin-left: 92px;
}
&.cancel{
color: #fff;
background: none;
}
}
}
}
\ No newline at end of file
}
/**自定义弹窗**/
.pop-show-box{
position: fixed;
z-index: 9999;
top:0;
left:0;
bottom:0;
right:0;
.pop-show-con{
background:rgba(1, 22, 51, 0.6);
backdrop-filter: blur(5px);
border-radius: 16px;
margin:0 auto;
position: relative;
box-sizing: border-box;
padding-bottom: 30px;
.pop-head{
height:50px;
color:#fff;
font-size: 20px;
font-weight: bold;
span{position: relative;top:30px;left:37px;}
p{
color:#fff;
float:right;
cursor: pointer;
position: relative;
top:16px;
left:-16px;
}
margin-bottom: 25px;
}
.pop-body{
padding:0 30px;
}
}
}
/**自定义弹窗 表单样式**/
.inputboxp {
.checkbox {
margin-top : 22px;
padding-left : 20px;
color : #fff;
font-size : 14px;
margin-bottom: 15px;
.check-group {
cursor: pointer;
p {
width : 10px;
height : 10px;
border : 1px solid #F68332;
border-radius: 50%;
}
margin-right: 25px;
&.act {
p {
font {
display : block;
width : 4px;
height : 4px;
background : #F68332;
border-radius: 50%;
}
}
}
span {
margin-left: 6px;
position : relative;
top : -2px;
}
}
}
.input-con {
padding: 0 20px;
.input-group-auth {
margin-bottom: 15px;
p.labelp {
font-size : 14px;
color : #fff;
margin-bottom: 9px;
span {
color: #F68332;
}
}
input,select {
width: 320px;
}
textarea{
width: 670px;
height:48px;
line-height: 24px;
}
&.sm {
input {
width: 146px;
}
}
&.ml30 {
margin-left: 30px;
}
}
}
.gobtn {
width : 218px;
margin : 0 auto;
margin-top: 10px;
}
.subbtn{
.gobtn{
position: relative;
left:-81px;
}
height:20px;
.choose{
position: relative;
top:23px;
color:#fff;
font-size: 14px;
cursor: pointer;
div.chooseicon{
width: 16px;
height: 16px;
background: #FAFAFA;
border: 1px solid #DFEAFA;
border-radius: 4px;
margin-right: 6px;
position: relative;
}
&.act{
.chooseicon{
&::after{
content: "";
position: absolute;
width:14px;
height:14px;
background: #283FEB;
top:1px;
left:1px;
}
}
}
}
}
.tips {
font-size : 14px;
text-align : center;
color : #BF0707;
height : 20px;
line-height : 20px;
margin-top : 105x;
margin-bottom: 5px;
}
}
.pop-tip{height:32px;background:rgba(0,0,0,0.5);text-align:center;font-size:14px;line-height:32px;font-weight:bold;position:fixed;top:150px;color:#fff;z-index:99999;display:block}.pop-tip .tip-con{padding-left:20px;padding-right:20px;min-width:84px}.pop-loding{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999999}.pop-loding img{position:absolute;top:50%;left:50%;margin-left:-18px;margin-top:-18px}.pop-confirm{width:510px;padding:25px;padding-bottom:40px;background:rgba(1,22,51,0.6);border-radius:8px;position:fixed;z-index:99999;top:50%;left:50%;margin-left:-280px;margin-top:-175px;color:#fff}.pop-confirm .phead{font-size:22px;text-align:right}.pop-confirm .phead i{cursor:pointer}.pop-confirm .pbody{font-size:22px;text-align:center;padding-top:70px;height:120px;line-height:24px}.pop-confirm .pfoot .but{width:110px;height:48px;border:1px solid #FFFFFF;border-radius:6px;line-height:48px;text-align:center;color:#FAFAFA;font-size:18px;cursor:pointer}.pop-confirm .pfoot .but.sure{color:#164D9A;background:#fff;margin-left:92px}
\ No newline at end of file
.pop-tip{height:32px;background:rgba(0,0,0,0.5);text-align:center;font-size:14px;line-height:32px;font-weight:bold;position:fixed;top:150px;color:#fff;z-index:99999;display:block}.pop-tip .tip-con{padding-left:20px;padding-right:20px;min-width:84px}.pop-loding{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999999}.pop-loding img{position:absolute;top:50%;left:50%;margin-left:-18px;margin-top:-18px}.pop-confirm{width:510px;padding:25px;padding-bottom:40px;background:rgba(1,22,51,0.6);border-radius:8px;position:fixed;z-index:99999;top:50%;left:50%;margin-left:-280px;margin-top:-175px;color:#fff}.pop-confirm .phead{font-size:22px;text-align:right}.pop-confirm .phead i{cursor:pointer}.pop-confirm .pbody{font-size:22px;text-align:center;padding-top:70px;height:120px;line-height:24px}.pop-confirm .pfoot .but{width:110px;height:48px;border:1px solid #FFFFFF;border-radius:6px;line-height:48px;text-align:center;color:#FAFAFA;font-size:18px;cursor:pointer}.pop-confirm .pfoot .but.sure{color:#164D9A;background:#fff;margin-left:92px}.pop-confirm .pfoot .but.cancel{color:#fff;background:none}.pop-show-box{position:fixed;z-index:9999;top:0;left:0;bottom:0;right:0}.pop-show-box .pop-show-con{background:rgba(1,22,51,0.6);backdrop-filter:blur(5px);border-radius:16px;margin:0 auto;position:relative;box-sizing:border-box;padding-bottom:30px}.pop-show-box .pop-show-con .pop-head{height:50px;color:#fff;font-size:20px;font-weight:bold;margin-bottom:25px}.pop-show-box .pop-show-con .pop-head span{position:relative;top:30px;left:37px}.pop-show-box .pop-show-con .pop-head p{color:#fff;float:right;cursor:pointer;position:relative;top:16px;left:-16px}.pop-show-box .pop-show-con .pop-body{padding:0 30px}.inputboxp .checkbox{margin-top:22px;padding-left:20px;color:#fff;font-size:14px;margin-bottom:15px}.inputboxp .checkbox .check-group{cursor:pointer;margin-right:25px}.inputboxp .checkbox .check-group p{width:10px;height:10px;border:1px solid #F68332;border-radius:50%}.inputboxp .checkbox .check-group.act p font{display:block;width:4px;height:4px;background:#F68332;border-radius:50%}.inputboxp .checkbox .check-group span{margin-left:6px;position:relative;top:-2px}.inputboxp .input-con{padding:0 20px}.inputboxp .input-con .input-group-auth{margin-bottom:15px}.inputboxp .input-con .input-group-auth p.labelp{font-size:14px;color:#fff;margin-bottom:9px}.inputboxp .input-con .input-group-auth p.labelp span{color:#F68332}.inputboxp .input-con .input-group-auth input,.inputboxp .input-con .input-group-auth select{width:320px}.inputboxp .input-con .input-group-auth textarea{width:670px;height:48px;line-height:24px}.inputboxp .input-con .input-group-auth.sm input{width:146px}.inputboxp .input-con .input-group-auth.ml30{margin-left:30px}.inputboxp .gobtn{width:218px;margin:0 auto;margin-top:10px}.inputboxp .subbtn{height:20px}.inputboxp .subbtn .gobtn{position:relative;left:-81px}.inputboxp .subbtn .choose{position:relative;top:23px;color:#fff;font-size:14px;cursor:pointer}.inputboxp .subbtn .choose div.chooseicon{width:16px;height:16px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;margin-right:6px;position:relative}.inputboxp .subbtn .choose.act .chooseicon::after{content:"";position:absolute;width:14px;height:14px;background:#283FEB;top:1px;left:1px}.inputboxp .tips{font-size:14px;text-align:center;color:#BF0707;height:20px;line-height:20px;margin-top:105x;margin-bottom:5px}
\ No newline at end of file
......@@ -132,40 +132,3 @@ body{background: #000;min-width: 1200px;}
}
/**自定义弹窗**/
.pop-show-box{
position: fixed;
z-index: 9999;
top:0;
left:0;
bottom:0;
right:0;
.pop-show-con{
min-height: 200px;
background:rgba(255,255,255,0.3);
backdrop-filter: blur(5px);
border-radius: 16px;
margin:0 auto;
position: relative;
box-sizing: border-box;
.pop-head{
height:50px;
color:#fff;
font-size: 20px;
font-weight: bold;
span{position: relative;top:30px;left:37px;}
p{
color:#fff;
float:right;
cursor: pointer;
position: relative;
top:16px;
left:-16px;
}
margin-bottom: 25px;
}
.pop-body{
padding:0 50px;
}
}
}
\ No newline at end of file
.gw-header-nav{position:fixed;top:70px}body{background:#000;min-width:1200px}.homepage{background:#000}.homepage .floor1{height:1021px;width:100%;background:url("../../images/home/bg1.png") center top no-repeat}.homepage .floor1 .fl1-con{padding-top:440px;width:1200px;margin:0 auto}.homepage .floor1 .fl1-con .rtdes p{color:#fff;font-size:60px}.homepage .floor1 .fl1-con .rtdes .p24{font-size:24px;margin-top:30px}.homepage .floor1 .fl1-con .fl1botbox{margin-top:94px}.homepage .floor1 .fl1-con .fl1botbox .ftitem{width:390px;padding-top:38px;padding-bottom:42px;background:rgba(2,11,51,0.75);margin-right:15px;text-align:center;transition:all .8s}.homepage .floor1 .fl1-con .fl1botbox .ftitem.ftlast{margin-right:0px}.homepage .floor1 .fl1-con .fl1botbox .ftitem div{height:88px;width:88px;margin:0 auto;background:#fff;border-radius:88px;text-align:center;transition:all .8s}.homepage .floor1 .fl1-con .fl1botbox .ftitem div i{font-size:47px;position:relative;top:18px;color:#283FEB}.homepage .floor1 .fl1-con .fl1botbox .ftitem p{text-align:center;font-size:30px;color:#fff;margin-top:38px;margin-bottom:24px}.homepage .floor1 .fl1-con .fl1botbox .ftitem i.ijt{color:#283FEB;transition:all .8s}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover{background:rgba(40,63,235,0.75)}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover i.ijt{color:#F68332}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover div{background:none}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover div i{font-size:60px;color:#fff}.homepage .floor2{height:600px;background:url("../../images/home/bg2.png") center top no-repeat;font-size:24px;color:#fff}.homepage .floor2 b{font-size:40px}.homepage .floor2 .f2con{width:500px;margin:0 auto;position:relative;top:260px;width:864px}.homepage .floor3{padding-top:4px}.homepage .floor3 .row{margin-bottom:1px}.homepage .floor3 .itemf3{height:200px;width:50%;background:#1B2037;color:#fff;font-size:30px;line-height:200px;margin-bottom:1px}.homepage .floor3 .itemf3.trr{padding-left:122px}.homepage .floor3 .itemf3.trl{text-align:right;padding-right:122px;margin-right:1px}.homepage .floor3 .itemf3 b{font-size:40px;font-weight:bold;margin-right:10px}.homepage .floor3 .itemf3:hover{background:url("../../images/home/subj.png") no-repeat;background-size:100% 100%}.homepage .floor3 .itemf3:hover b{font-size:100px;font-weight:bold}.homepage .floor4{padding-top:60px;text-align:center;padding-bottom:60px}.homepage .floor4 p{font-size:30px;font-weight:bold;color:#FFf;margin-bottom:36px}.homepage .floor4 .but{width:560px;height:64px;line-height:64px;background:#283FEB;color:#fff;font-size:22px;border:2px solid #283FEB;cursor:pointer}.homepage .floor4 .but.but-lk{background:none;margin-left:39px}.homepage .footfixedcor{height:160px;width:100%;background:rgba(255,255,255,0.3);backdrop-filter:blur(5px);color:#fff;position:fixed;bottom:0px;z-index:1}.homepage .footfixedcor .confotfix{position:relative;padding-top:44px;padding-bottom:47px;z-index:2}.homepage .footfixedcor .confotfix div.textt{width:656px;font-size:18px;line-height:24px;margin-right:28px;color:#fff}.homepage .footfixedcor .confotfix .but{display:block;position:relative;top:10px;text-align:center;width:248px;height:48px;line-height:48px;background:#283FEB;color:#fff;font-size:20px;border:1px solid #283FEB;cursor:pointer}.homepage .footfixedcor .confotfix .but.but-lk{background:none;margin-right:20px;color:#283FEB}.pop-show-box{position:fixed;z-index:9999;top:0;left:0;bottom:0;right:0}.pop-show-box .pop-show-con{min-height:200px;background:rgba(255,255,255,0.3);backdrop-filter:blur(5px);border-radius:16px;margin:0 auto;position:relative;box-sizing:border-box}.pop-show-box .pop-show-con .pop-head{height:50px;color:#fff;font-size:20px;font-weight:bold;margin-bottom:25px}.pop-show-box .pop-show-con .pop-head span{position:relative;top:30px;left:37px}.pop-show-box .pop-show-con .pop-head p{color:#fff;float:right;cursor:pointer;position:relative;top:16px;left:-16px}.pop-show-box .pop-show-con .pop-body{padding:0 50px}
\ No newline at end of file
.gw-header-nav{position:fixed;top:70px}body{background:#000;min-width:1200px}.homepage{background:#000}.homepage .floor1{height:1021px;width:100%;background:url("../../images/home/bg1.png") center top no-repeat}.homepage .floor1 .fl1-con{padding-top:440px;width:1200px;margin:0 auto}.homepage .floor1 .fl1-con .rtdes p{color:#fff;font-size:60px}.homepage .floor1 .fl1-con .rtdes .p24{font-size:24px;margin-top:30px}.homepage .floor1 .fl1-con .fl1botbox{margin-top:94px}.homepage .floor1 .fl1-con .fl1botbox .ftitem{width:390px;padding-top:38px;padding-bottom:42px;background:rgba(2,11,51,0.75);margin-right:15px;text-align:center;transition:all .8s}.homepage .floor1 .fl1-con .fl1botbox .ftitem.ftlast{margin-right:0px}.homepage .floor1 .fl1-con .fl1botbox .ftitem div{height:88px;width:88px;margin:0 auto;background:#fff;border-radius:88px;text-align:center;transition:all .8s}.homepage .floor1 .fl1-con .fl1botbox .ftitem div i{font-size:47px;position:relative;top:18px;color:#283FEB}.homepage .floor1 .fl1-con .fl1botbox .ftitem p{text-align:center;font-size:30px;color:#fff;margin-top:38px;margin-bottom:24px}.homepage .floor1 .fl1-con .fl1botbox .ftitem i.ijt{color:#283FEB;transition:all .8s}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover{background:rgba(40,63,235,0.75)}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover i.ijt{color:#F68332}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover div{background:none}.homepage .floor1 .fl1-con .fl1botbox .ftitem:hover div i{font-size:60px;color:#fff}.homepage .floor2{height:600px;background:url("../../images/home/bg2.png") center top no-repeat;font-size:24px;color:#fff}.homepage .floor2 b{font-size:40px}.homepage .floor2 .f2con{width:500px;margin:0 auto;position:relative;top:260px;width:864px}.homepage .floor3{padding-top:4px}.homepage .floor3 .row{margin-bottom:1px}.homepage .floor3 .itemf3{height:200px;width:50%;background:#1B2037;color:#fff;font-size:30px;line-height:200px;margin-bottom:1px}.homepage .floor3 .itemf3.trr{padding-left:122px}.homepage .floor3 .itemf3.trl{text-align:right;padding-right:122px;margin-right:1px}.homepage .floor3 .itemf3 b{font-size:40px;font-weight:bold;margin-right:10px}.homepage .floor3 .itemf3:hover{background:url("../../images/home/subj.png") no-repeat;background-size:100% 100%}.homepage .floor3 .itemf3:hover b{font-size:100px;font-weight:bold}.homepage .floor4{padding-top:60px;text-align:center;padding-bottom:60px}.homepage .floor4 p{font-size:30px;font-weight:bold;color:#FFf;margin-bottom:36px}.homepage .floor4 .but{width:560px;height:64px;line-height:64px;background:#283FEB;color:#fff;font-size:22px;border:2px solid #283FEB;cursor:pointer}.homepage .floor4 .but.but-lk{background:none;margin-left:39px}.homepage .footfixedcor{height:160px;width:100%;background:rgba(255,255,255,0.3);backdrop-filter:blur(5px);color:#fff;position:fixed;bottom:0px;z-index:1}.homepage .footfixedcor .confotfix{position:relative;padding-top:44px;padding-bottom:47px;z-index:2}.homepage .footfixedcor .confotfix div.textt{width:656px;font-size:18px;line-height:24px;margin-right:28px;color:#fff}.homepage .footfixedcor .confotfix .but{display:block;position:relative;top:10px;text-align:center;width:248px;height:48px;line-height:48px;background:#283FEB;color:#fff;font-size:20px;border:1px solid #283FEB;cursor:pointer}.homepage .footfixedcor .confotfix .but.but-lk{background:none;margin-right:20px;color:#283FEB}
\ No newline at end of file
define('confirm', ['liexin_pop'], function (require, exports, module) {
var liexin_pop=require("liexin_pop");
var confirm = {
init: function () {
confirm.handle();
},
handle:function(){
//新增编辑
$("body").on("click",".popaddressbtn",function(){
var guid_=$(this).attr("guid");
var isAdd=$(this).hasClass("addbtn")?1:0;
liexin_pop.Open({
title:(isAdd?"Add Address":"Change Address"),
width:766,
height:595,
class:"addressOpen",
ele:".addressPop"
})
})
//选择地址
$("body").on("click",".choosebtadress",function(){
liexin_pop.Open({
title:"Choose Address",
width:1000,
class:"addressChoose",
ele:".choose-popcheck"
})
})
//删除
$("body").on("click",".delbtn",function(){
liexin_pop.Confirm({title:"你确定不放开那个女孩吗?",success:function(ele){
ele.fadeOut(300)
}})
})
}
}
module.exports = confirm.init();
})
seajs.use(['confirm'])
\ No newline at end of file
......@@ -70,16 +70,16 @@ define('liexin_pop', [], function (require, exports, module) {
//自定义弹窗
//class 自定义 class 加在弹窗盒子上 ele自定义弹窗 内容元素选择器 closeFun关闭弹窗回调
//opt={title:"test",width:500,height:300,class:"abc",ele:"#ceshi",closeFun:function(){}} openHide 关闭弹窗挂载到window上
//openHide() 关闭弹窗
//openHide() 关闭弹窗 详情 见下单页面 /confirm
module.exports.Open = function (opt) {
var ele = $(opt.ele);
var ele2 = $(opt.ele).hide();//存放html
var eleHtml = ele.clone(true);
$(opt.ele).remove();
ele.remove();
var width_ = (opt.width || 450);
var height_=(opt.height || 200);
var height_=(opt.height || "auto");
var html_ = '<div class="pop-show-box '+(opt.class||'')+'"><div class="pop-show-con" style="width:'+width_+'px;height:'+height_+'px"><div class="pop-head"><span>'+(opt.title||'')+'</span>'
......
......@@ -43,5 +43,7 @@ Route::middleware(['api', 'api.check'])->namespace('Api')->group(function () {
Route::get('country/list', 'CountryApiController@list');
Route::POST('cart/addCart', 'CartApiController@addCart'); //添加购物车
});
......@@ -47,3 +47,4 @@ Route::get('/brand/list', 'BrandController@list')->name('brand.list');
Route::get('/search', 'SearchController@index')->name('search.index');
Route::get('/car', 'CarController@car')->name('car.car');
Route::get('/confirm', 'CarController@confirm')->name('car.confirm');
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