Commit 03fa1041 by 杨树贤

修复注册问题

parents b15e8830 1de6de3f
...@@ -13,6 +13,13 @@ DB_DATABASE=semour ...@@ -13,6 +13,13 @@ DB_DATABASE=semour
DB_USERNAME=semour DB_USERNAME=semour
DB_PASSWORD='semour#zsyM' DB_PASSWORD='semour#zsyM'
DB_CMS_CONNECTION=web
DB_CMS_HOST=192.168.1.238
DB_CMS_PORT=3306
DB_CMS_DATABASE=icdata
DB_CMS_USERNAME=icdata
DB_CMS_PASSWORD='icdata#zsyM'
BROADCAST_DRIVER=log BROADCAST_DRIVER=log
CACHE_DRIVER=file CACHE_DRIVER=file
QUEUE_CONNECTION=sync QUEUE_CONNECTION=sync
......
...@@ -162,6 +162,11 @@ class AuthApiController extends Controller ...@@ -162,6 +162,11 @@ class AuthApiController extends Controller
return $this->setError('Email code invalid'); return $this->setError('Email code invalid');
} }
$hashedPassword = UserModel::where('email', $email)->value('password');
if (Hash::check($password, $hashedPassword)) {
return $this->setError('The new password cannot be the same as the old password!');
}
$user = UserModel::where('email', $email)->first(); $user = UserModel::where('email', $email)->first();
$user->password = Hash::make($password); $user->password = Hash::make($password);
$user->update_time = time(); $user->update_time = time();
...@@ -207,20 +212,20 @@ class AuthApiController extends Controller ...@@ -207,20 +212,20 @@ class AuthApiController extends Controller
$code = mt_rand(1000, 9999); $code = mt_rand(1000, 9999);
$redisKey = 'sem_email_code_' . $type . '_' . $email; $redisKey = 'sem_email_code_' . $type . '_' . $email;
if (Redis::get($redisKey)) { if (Redis::get($redisKey)) {
return $this->setError('Email code had been sent'); return $this->setError('A verification code has been sent. Please enter the code below to continue.');
} }
Redis::set($redisKey, $code); Redis::set($redisKey, $code);
Redis::expire($redisKey, 120); Redis::expire($redisKey, 120);
$subject = config('mail.from.name'); $subject = config('mail.from.name');
// return $this->setSuccessData($code); // return $this->setSuccessData($code);
Mail::to($email)->send(new SendCode($type, $code)); // Mail::to($email)->send(new SendCode($type, $code));
//错误处理 // //错误处理
if (count(Mail::failures())) { // if (count(Mail::failures())) {
return $this->setError('Email code send failed'); // return $this->setError('Email code send failed');
} // }
return $this->setSuccess('Email code send success'); return $this->setSuccess('A verification code has been sent. Please enter the code below to continue. '.$code);
} }
} }
...@@ -24,7 +24,7 @@ class UserController extends Controller ...@@ -24,7 +24,7 @@ class UserController extends Controller
public function inquiry(Request $request) public function inquiry(Request $request)
{ {
$userId = $_COOKIE['sem_user_id']; $userId = \Auth::id();
//获取不同状态的统计 //获取不同状态的统计
$statusCount = InquiryService::getStatusCount($userId); $statusCount = InquiryService::getStatusCount($userId);
return view('user.inquiry',compact('statusCount')); return view('user.inquiry',compact('statusCount'));
......
...@@ -21,7 +21,7 @@ class CheckApiLogin ...@@ -21,7 +21,7 @@ class CheckApiLogin
{ {
if (!\Auth::check() ) { if (!\Auth::check() ) {
if (in_array($request->path(),$this->no_login_url)){ //一些接口可以登录或者不登录都可以通行 if (in_array($request->path(),$this->no_login_url)){ //一些接口可以登录或者不登录都可以通行
request()->offsetSet("user",(object)["id"=>0,"gid"=>\Arr::get($_COOKIE,"sem_gid")]); request()->offsetSet("user",(object)["id"=>0,"gid"=>\Arr::get($_COOKIE,"sem_gid","")]);
return $next($request); return $next($request);
}else{ }else{
$response = [ $response = [
...@@ -32,7 +32,7 @@ class CheckApiLogin ...@@ -32,7 +32,7 @@ class CheckApiLogin
} }
} else { } else {
$request->user = \Auth::user(); $request->user = \Auth::user();
$request->user->gid = ""; $request->user->gid = \Arr::get($_COOKIE,"sem_gid","");
return $next($request); return $next($request);
} }
} }
......
...@@ -10,6 +10,7 @@ use App\Models\InquiryModel; ...@@ -10,6 +10,7 @@ use App\Models\InquiryModel;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Redis;
use App\Models\CartModel; use App\Models\CartModel;
use Mockery\Exception;
//购物车服务器层 //购物车服务器层
class CartService class CartService
...@@ -24,7 +25,6 @@ class CartService ...@@ -24,7 +25,6 @@ class CartService
$con = DB::connection(); $con = DB::connection();
$con->beginTransaction(); $con->beginTransaction();
$redis = Redis::connection(); $redis = Redis::connection();
$goodsInfoArr = ThirdService::getGoodsInfo([$goods_id]); $goodsInfoArr = ThirdService::getGoodsInfo([$goods_id]);
...@@ -33,8 +33,10 @@ class CartService ...@@ -33,8 +33,10 @@ class CartService
'update_time' => time(), 'update_time' => time(),
]; ];
if ($user_id){ if ($user_id){
$checkHas = CartModel::where(["user_id"=>$user_id,"goods_id"=>$goods_id,"status"=>1])->first();
$temp["user_id"] = $user_id; $temp["user_id"] = $user_id;
}else{ }else{
$checkHas = CartModel::where(["gid"=>$gid,"goods_id"=>$goods_id,"status"=>1])->first();
$temp["gid"] = $gid; $temp["gid"] = $gid;
} }
...@@ -47,7 +49,6 @@ class CartService ...@@ -47,7 +49,6 @@ class CartService
$temp["raw_brand_name"]= $digikeyArr["raw_brand_name"]; $temp["raw_brand_name"]= $digikeyArr["raw_brand_name"];
} }
//购买时价格 //购买时价格
$buy_price = 0; $buy_price = 0;
$ladder_price = data_get($skuInfo,"ladder_price"); $ladder_price = data_get($skuInfo,"ladder_price");
...@@ -62,29 +63,32 @@ class CartService ...@@ -62,29 +63,32 @@ class CartService
} }
$temp["buy_price"] = $buy_price; $temp["buy_price"] = $buy_price;
$checkHas = CartModel::where(["user_id"=>$user_id,"goods_id"=>$goods_id,"status"=>1])->first();
if ($checkHas){ if ($buy_number < \Arr::get($skuInfo,"moq") || $buy_number > $skuInfo["stock"] ){
$buy_number = $buy_number+$checkHas["buy_number"]; throw new Exception("error moq",1001);
}
$temp["buy_number"] = $buy_number;
if ($checkHas){
$cart_id = $checkHas["cart_id"]; $cart_id = $checkHas["cart_id"];
$temp["update_time"] = time(); $temp["update_time"] = time();
$temp["status"] = $buy_number > 0 ? CartModel::status_yes:CartModel::status_no; $temp["status"] = $buy_number > 0 ? CartModel::status_yes:CartModel::status_no;
$temp["buy_number"] = $skuInfo["stock"] > $buy_number ? $buy_number : $skuInfo["stock"];
$flag = CartModel::where(["cart_id"=>$checkHas["cart_id"]])->update($temp); $flag = CartModel::where(["cart_id"=>$checkHas["cart_id"]])->update($temp);
if (!$flag){ if (!$flag){
return false; throw new Exception("error update",1002);
} }
}else{ //不存在插入购物车 }else{ //不存在插入购物车
$temp["buy_number"] = $skuInfo["stock"] > $buy_number ? $buy_number : $skuInfo["stock"]; $temp["user_id"] = $user_id;
$temp["gid"] = $user_id > 0 ? "":$gid;
$temp["status"] = $buy_number > 0 ? CartModel::status_yes:CartModel::status_no; $temp["status"] = $buy_number > 0 ? CartModel::status_yes:CartModel::status_no;
$temp["create_time"] = time(); $temp["create_time"] = time();
$temp["update_time"] = time(); $temp["update_time"] = time();
$cart_id = CartModel::insertGetId($temp); $cart_id = CartModel::insertGetId($temp);
if (!$cart_id){ if (!$cart_id){
return false; throw new Exception("error add",1003);
} }
} }
...@@ -108,7 +112,8 @@ class CartService ...@@ -108,7 +112,8 @@ class CartService
return $te; return $te;
}catch (\Exception $e){ }catch (\Exception $e){
$con->rollback(); $con->rollback();
throw new InvalidRequestException($e->getMessage().$e->getLine()); # throw new InvalidRequestException($e->getMessage().$e->getLine());
return false;
} }
} }
...@@ -170,7 +175,7 @@ class CartService ...@@ -170,7 +175,7 @@ class CartService
$temp["status"] = $v["buy_number"] > 0 ? CartModel::status_yes:CartModel::status_no; $temp["status"] = $v["buy_number"] > 0 ? CartModel::status_yes:CartModel::status_no;
$flag = CartModel::where(["cart_id"=>$checkHas["cart_id"]])->update($temp); $flag = CartModel::where(["cart_id"=>$checkHas["cart_id"]])->update($temp);
if (!$flag){ if (!$flag){
return false; throw new Exception("error update",1003);
} }
}else{ //不存在插入购物车 }else{ //不存在插入购物车
$temp["buy_number"] = $skuInfo["stock"] > $v['buy_number'] ? $v['buy_number'] : $skuInfo["stock"]; $temp["buy_number"] = $skuInfo["stock"] > $v['buy_number'] ? $v['buy_number'] : $skuInfo["stock"];
...@@ -180,7 +185,7 @@ class CartService ...@@ -180,7 +185,7 @@ class CartService
$flag = CartModel::insertGetId($temp); $flag = CartModel::insertGetId($temp);
if (!$flag){ if (!$flag){
return false; throw new Exception("error add",1003);
} }
} }
} }
...@@ -190,7 +195,8 @@ class CartService ...@@ -190,7 +195,8 @@ class CartService
return true; return true;
}catch (\Exception $e){ }catch (\Exception $e){
$con->rollback(); $con->rollback();
throw new InvalidRequestException($e->getMessage().$e->getLine()); #throw new InvalidRequestException($e->getMessage().$e->getLine());
return false;
} }
} }
...@@ -205,10 +211,11 @@ class CartService ...@@ -205,10 +211,11 @@ class CartService
if ($user_id){ if ($user_id){
$where["user_id"] = $user_id; $where["user_id"] = $user_id;
} }
if ($gid){ if (!$user_id && $gid){
$where["gid"] = $gid; $where["gid"] = $gid;
} }
$query = CartModel::where($where)->wherein("status",[CartModel::status_no,CartModel::status_yes])->orderBy('status', 'desc'); $query = CartModel::where($where)->wherein("status",[CartModel::status_no,CartModel::status_yes])->orderBy('status', 'desc');
if($cart_ids){ if($cart_ids){
$query = $query->wherein("cart_id",explode(",",$cart_ids)); $query = $query->wherein("cart_id",explode(",",$cart_ids));
...@@ -397,8 +404,22 @@ class CartService ...@@ -397,8 +404,22 @@ class CartService
* 购物车当前数量 * 购物车当前数量
*/ */
public static function cartMyCount($user_id,$gid=""){ public static function cartMyCount($user_id,$gid=""){
$where = $user_id ? ["user_id"=>$user_id,"status"=>1]:["gid"=>$gid,"status"=>1]; $where = $user_id ? ["user_id"=>$user_id]:["gid"=>$gid];
return CartModel::where($where)->count(); #登录后数据带入此购物车
if ($user_id > 0 && $gid){
$gidCart = CartModel::where(["gid"=>$gid])->wherein("status",[CartModel::status_no,CartModel::status_yes])->get()->toArray();
foreach ($gidCart as $k=>$v){
$nowCart = CartModel::where(["user_id"=>$user_id,"goods_id"=>$v["goods_id"]])->first();
if ($nowCart){
CartModel::where(["cart_id"=>$nowCart["cart_id"]])->update(["buy_number"=>$v["buy_number"],"status"=>CartModel::status_yes,"gid"=>"","update_time"=>time()]);
CartModel::where(["cart_id"=>$v["cart_id"]])->delete();
}else{
CartModel::where(["cart_id"=>$v["cart_id"]])->update(["user_id"=>$user_id,"status"=>CartModel::status_yes,"gid"=>"","update_time"=>time()]);
}
}
}
$mycartCountFirst = CartModel::where($where)->wherein("status",[CartModel::status_no,CartModel::status_yes])->count();
return $mycartCountFirst;
} }
/* /*
......
...@@ -354,7 +354,7 @@ class OrderService ...@@ -354,7 +354,7 @@ class OrderService
$where["order_id"] = $order_id; $where["order_id"] = $order_id;
if ($user_id >0){ if ($user_id >0){
$where["user_id"] = $user_id; // $where["user_id"] = $user_id;
} }
$orderInfo = OrderModel::getOrderInfo($where); $orderInfo = OrderModel::getOrderInfo($where);
if (!$orderInfo){ if (!$orderInfo){
......
...@@ -32,7 +32,7 @@ class UserService ...@@ -32,7 +32,7 @@ class UserService
'company_name' => $data['company_name'], 'company_name' => $data['company_name'],
'account_properties' => $data['account_properties'], 'account_properties' => $data['account_properties'],
'sale_id' => $salesId, 'sale_id' => $salesId,
'sale_name' => \Arr::get($sales, 'name'), 'sale_name' => \Arr::get($sales, 'name',''),
'create_time' => time(), 'create_time' => time(),
'password' => Hash::make($data['password']), 'password' => Hash::make($data['password']),
]); ]);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
background-color: #164D9A; background-color: #164D9A;
} }
a{color:#555;&:hover{color:#164D9A;} float:left;height:20px;width:25%;margin-bottom: 20px;} a{color:#555;&:hover{color:#164D9A;} float:left;width:25%;margin-bottom: 20px;}
} }
} }
......
.classbox .class-three-box{width:1200px;background:#fff}.classbox .class-three-box .chead{width:1200px;height:48px;background:#DFEAFA;line-height:48px;padding-left:26px;color:#164D9A;font-size:20px;font-weight:bold}.classbox .class-three-box .csec{width:1200px;max-height:160px;overflow-y:auto;padding:20px 50px}.classbox .class-three-box .csec::-webkit-scrollbar{width:2px;background-color:#EDEDED}.classbox .class-three-box .csec::-webkit-scrollbar-thumb{border-radius:2px;background-color:#164D9A}.classbox .class-three-box .csec a{color:#555;float:left;height:20px;width:25%;margin-bottom:20px}.classbox .class-three-box .csec a:hover{color:#164D9A}.classbox .shit-box{padding:20px 25px}.classbox .shit-box p.titletext{font-size:14px;color:#333;margin-bottom:15px}.classbox .shit-box .brand-box{width:294px;height:30px;background:#FFFFFF;border:1px solid #DFEAFA;border-radius:8px;position:relative}.classbox .shit-box .brand-box span.icon{position:absolute;left:15px;top:6px}.classbox .shit-box .brand-box span.icon i{font-size:18px;color:#aaa}.classbox .shit-box .brand-box input{background:#fff;display:block;height:30px;line-height:30px;color:#333;padding-left:42px}.classbox .shit-box .brand-box .bcon{position:absolute;z-index:2;top:30px;left:0px;width:294px;background:#fff;box-shadow:0 0 5px #ccc;max-height:150px;overflow-y:auto;display:none}.classbox .shit-box .brand-box .bcon p{height:20px;line-height:20px;padding:5px 15px;color:#333;font-size:14px;cursor:pointer}.classbox .shit-box .brand-box .bcon p:hover{background:#F0F7FF;color:#164D9A}.classbox .shit-box .brand-box .bcon::-webkit-scrollbar{width:2px;background-color:#EDEDED}.classbox .shit-box .brand-box .bcon::-webkit-scrollbar-thumb{border-radius:2px;background-color:#164D9A}.classbox .mb20{margin-bottom:20px}.classbox .listcon{background:#fff;padding:25px 0px}.classbox .listcon .p25{padding:0 25px}.classbox .listcon .countshead{color:#555;font-size:16px}.classbox .listcon .butcon{position:relative;top:10px}.classbox .listcon .butcon .but{width:100px;height:32px;background:#164D9A;border-radius:8px;text-align:center;line-height:32px;color:#fff;font-size:16px;margin-left:30px}.classbox .listcon .search-shit{width:350px;height:32px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:8px;position:relative}.classbox .listcon .search-shit span.icon{position:absolute;right:0px;top:-1px;width:50px;height:32px;background:#164D9A;text-align:center;line-height:32px;border-radius:0px 8px 8px 0px;cursor:pointer}.classbox .listcon .search-shit span.icon i{font-size:18px;color:#fff}.classbox .listcon .search-shit input{background:#fff;display:block;height:30px;line-height:30px;color:#333;padding-left:15px;width:305px}.classbox .listcon .check-group{color:#555;font-size:16px;cursor:pointer;margin-left:50px}.classbox .listcon .check-group .check{width:22px;height:22px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;text-align:center;line-height:20px}.classbox .listcon .check-group .check i{color:#164D9A;font-size:16px;position:relative;top:1px;display:none}.classbox .listcon .check-group p{height:22px;line-height:22px;margin-left:9px}.classbox .listcon .check-group.act .check{background:#DFEAFA;border:1px solid #164D9A}.classbox .listcon .check-group.act .check i{display:inline} .classbox .class-three-box{width:1200px;background:#fff}.classbox .class-three-box .chead{width:1200px;height:48px;background:#DFEAFA;line-height:48px;padding-left:26px;color:#164D9A;font-size:20px;font-weight:bold}.classbox .class-three-box .csec{width:1200px;max-height:160px;overflow-y:auto;padding:20px 50px}.classbox .class-three-box .csec::-webkit-scrollbar{width:2px;background-color:#EDEDED}.classbox .class-three-box .csec::-webkit-scrollbar-thumb{border-radius:2px;background-color:#164D9A}.classbox .class-three-box .csec a{color:#555;float:left;width:25%;margin-bottom:20px}.classbox .class-three-box .csec a:hover{color:#164D9A}.classbox .shit-box{padding:20px 25px}.classbox .shit-box p.titletext{font-size:14px;color:#333;margin-bottom:15px}.classbox .shit-box .brand-box{width:294px;height:30px;background:#FFFFFF;border:1px solid #DFEAFA;border-radius:8px;position:relative}.classbox .shit-box .brand-box span.icon{position:absolute;left:15px;top:6px}.classbox .shit-box .brand-box span.icon i{font-size:18px;color:#aaa}.classbox .shit-box .brand-box input{background:#fff;display:block;height:30px;line-height:30px;color:#333;padding-left:42px}.classbox .shit-box .brand-box .bcon{position:absolute;z-index:2;top:30px;left:0px;width:294px;background:#fff;box-shadow:0 0 5px #ccc;max-height:150px;overflow-y:auto;display:none}.classbox .shit-box .brand-box .bcon p{height:20px;line-height:20px;padding:5px 15px;color:#333;font-size:14px;cursor:pointer}.classbox .shit-box .brand-box .bcon p:hover{background:#F0F7FF;color:#164D9A}.classbox .shit-box .brand-box .bcon::-webkit-scrollbar{width:2px;background-color:#EDEDED}.classbox .shit-box .brand-box .bcon::-webkit-scrollbar-thumb{border-radius:2px;background-color:#164D9A}.classbox .mb20{margin-bottom:20px}.classbox .listcon{background:#fff;padding:25px 0px}.classbox .listcon .p25{padding:0 25px}.classbox .listcon .countshead{color:#555;font-size:16px}.classbox .listcon .butcon{position:relative;top:10px}.classbox .listcon .butcon .but{width:100px;height:32px;background:#164D9A;border-radius:8px;text-align:center;line-height:32px;color:#fff;font-size:16px;margin-left:30px}.classbox .listcon .search-shit{width:350px;height:32px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:8px;position:relative}.classbox .listcon .search-shit span.icon{position:absolute;right:0px;top:-1px;width:50px;height:32px;background:#164D9A;text-align:center;line-height:32px;border-radius:0px 8px 8px 0px;cursor:pointer}.classbox .listcon .search-shit span.icon i{font-size:18px;color:#fff}.classbox .listcon .search-shit input{background:#fff;display:block;height:30px;line-height:30px;color:#333;padding-left:15px;width:305px}.classbox .listcon .check-group{color:#555;font-size:16px;cursor:pointer;margin-left:50px}.classbox .listcon .check-group .check{width:22px;height:22px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;text-align:center;line-height:20px}.classbox .listcon .check-group .check i{color:#164D9A;font-size:16px;position:relative;top:1px;display:none}.classbox .listcon .check-group p{height:22px;line-height:22px;margin-left:9px}.classbox .listcon .check-group.act .check{background:#DFEAFA;border:1px solid #164D9A}.classbox .listcon .check-group.act .check i{display:inline}
\ No newline at end of file \ No newline at end of file
...@@ -539,7 +539,7 @@ ...@@ -539,7 +539,7 @@
position : absolute; position : absolute;
width : 160px; width : 160px;
background: #FFFFFF; background: #FFFFFF;
top : 19px; top : 17px;
left : 0px; left : 0px;
box-shadow: 0px 0px 5px #ccc; box-shadow: 0px 0px 5px #ccc;
padding : 15px 0px; padding : 15px 0px;
......
...@@ -14,7 +14,7 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio ...@@ -14,7 +14,7 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
var data_ = { var data_ = {
page: brandlist.page, page: brandlist.page,
page_size: brandlist.limit, page_size: brandlist.limit,
"brand_id/eq":$("#brandvalxsp").attr("guid") "standard_brand_id/eq":$("#brandvalxsp").attr("guid")
} }
if ($(".eqsort").hasClass("act")) { if ($(".eqsort").hasClass("act")) {
data_["goods_name/eq"] = $(".mallbrandlistvalx").val() data_["goods_name/eq"] = $(".mallbrandlistvalx").val()
...@@ -74,7 +74,7 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio ...@@ -74,7 +74,7 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
brandlist.page=api.getCurrent() brandlist.page=api.getCurrent()
brandlist.getData(); brandlist.getData();
} }
}); });
} else { } else {
tool.NoData(".data-td") tool.NoData(".data-td")
...@@ -127,11 +127,13 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio ...@@ -127,11 +127,13 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
if (num > max_num) { if (num > max_num) {
$(this).val(max_num) $(this).val(max_num)
liexin_pop.Tip({ title: "At Most " + max_num }) liexin_pop.Tip({ title: "At Most " + max_num })
brandlist.onePriceRow($(this).parents(".td-group"))
return return
} }
if (num < min_num) { if (num < min_num) {
$(this).val(min_num) $(this).val(min_num)
liexin_pop.Tip({ title: "At Least " + min_num }) liexin_pop.Tip({ title: "At Least " + min_num })
brandlist.onePriceRow($(this).parents(".td-group"))
return return
} }
...@@ -193,7 +195,7 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio ...@@ -193,7 +195,7 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
return false; return false;
} }
}) })
//计算合计价格 //计算合计价格
var ac_price = obj.find(".price-group.act").find(".jtpcval").text() var ac_price = obj.find(".price-group.act").find(".jtpcval").text()
...@@ -204,4 +206,4 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio ...@@ -204,4 +206,4 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
}) })
seajs.use(['brandlist']) seajs.use(['brandlist'])
\ No newline at end of file
...@@ -74,12 +74,12 @@ define('car', ['tool', 'liexin_pop', 'artTemplate'], function (require, exports, ...@@ -74,12 +74,12 @@ define('car', ['tool', 'liexin_pop', 'artTemplate'], function (require, exports,
if(num>max_num){ if(num>max_num){
$(this).val(max_num) $(this).val(max_num)
liexin_pop.Tip({ title: "At Most "+max_num }) liexin_pop.Tip({ title: "At Most "+max_num })
return
} }
if(num<min_num){ if(num<min_num){
$(this).val(min_num) $(this).val(min_num)
liexin_pop.Tip({ title: "At Least "+min_num }) liexin_pop.Tip({ title: "At Least "+min_num })
return
} }
var data_={ var data_={
goods_id:$(this).attr("goods_id"), goods_id:$(this).attr("goods_id"),
...@@ -116,6 +116,7 @@ define('car', ['tool', 'liexin_pop', 'artTemplate'], function (require, exports, ...@@ -116,6 +116,7 @@ define('car', ['tool', 'liexin_pop', 'artTemplate'], function (require, exports,
if (res.code === 0) { if (res.code === 0) {
liexin_pop.Tip({ title: res.msg },function(){ liexin_pop.Tip({ title: res.msg },function(){
car.getData() car.getData()
tool.getCarNum()
ele.fadeOut(300) ele.fadeOut(300)
}) })
} else { } else {
......
...@@ -250,6 +250,8 @@ define('confirm', ['liexin_pop','form','artTemplate'], function (require, export ...@@ -250,6 +250,8 @@ define('confirm', ['liexin_pop','form','artTemplate'], function (require, export
//提交订单 //提交订单
$(".ordercreates").click(function(){ $(".ordercreates").click(function(){
if($(this).hasClass("dis")){return}
$(".ordercreates").addClass("dis")
var arr_=[] var arr_=[]
$(".tbodycars .tr").each(function(){ $(".tbodycars .tr").each(function(){
arr_.push({ arr_.push({
...@@ -267,6 +269,7 @@ define('confirm', ['liexin_pop','form','artTemplate'], function (require, export ...@@ -267,6 +269,7 @@ define('confirm', ['liexin_pop','form','artTemplate'], function (require, export
window.location.href="/user/order" window.location.href="/user/order"
}) })
} else { } else {
$(".ordercreates").removeClass("dis")
liexin_pop.Tip({ title: res.msg }) liexin_pop.Tip({ title: res.msg })
} }
}) })
......
...@@ -135,11 +135,13 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function ...@@ -135,11 +135,13 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
if (num > max_num) { if (num > max_num) {
$(this).val(max_num) $(this).val(max_num)
liexin_pop.Tip({ title: "At Most " + max_num }) liexin_pop.Tip({ title: "At Most " + max_num })
class_p.onePriceRow($(this).parents(".td-group"))
return return
} }
if (num < min_num) { if (num < min_num) {
$(this).val(min_num) $(this).val(min_num)
liexin_pop.Tip({ title: "At Least " + min_num }) liexin_pop.Tip({ title: "At Least " + min_num })
class_p.onePriceRow($(this).parents(".td-group"))
return return
} }
......
...@@ -50,7 +50,7 @@ define(function (require, exports, module) { ...@@ -50,7 +50,7 @@ define(function (require, exports, module) {
module.exports.isLogin = function () { module.exports.isLogin = function () {
if(module.exports.getCookie("sem_email")){ if($("#emailCookie").val()){
return true return true
} }
return false return false
......
...@@ -125,11 +125,13 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function ( ...@@ -125,11 +125,13 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
if(num>max_num){ if(num>max_num){
$(this).val(max_num) $(this).val(max_num)
liexin_pop.Tip({ title: "At Most "+max_num }) liexin_pop.Tip({ title: "At Most "+max_num })
search.onePriceRow($(this).parents(".td-group"))
return return
} }
if(num<min_num){ if(num<min_num){
$(this).val(min_num) $(this).val(min_num)
liexin_pop.Tip({ title: "At Least "+min_num }) liexin_pop.Tip({ title: "At Least "+min_num })
search.onePriceRow($(this).parents(".td-group"))
return return
} }
......
...@@ -20,9 +20,9 @@ define('account', ['tool', 'liexin_pop', 'form', 'artTemplate'], function (requi ...@@ -20,9 +20,9 @@ define('account', ['tool', 'liexin_pop', 'form', 'artTemplate'], function (requi
$(".changeInfoPop .first_name_acpo").val(res.data.first_name) $(".changeInfoPop .first_name_acpo").val(res.data.first_name)
$(".infobase .last_name_val").text(res.data.last_name) $(".infobase .last_name_val").text(res.data.last_name)
$(".changeInfoPop .last_name_acpo").val(res.data.last_name) $(".changeInfoPop .last_name_acpo").val(res.data.last_name)
$(".infobase .account_properties_val").text("For Business") $(".infobase .account_properties_val").text("For Individual")
if (res.data.account_properties == 2) { if (res.data.account_properties == 2) {
$(".infobase .account_properties_val").text("For Individual") $(".infobase .account_properties_val").text("For Business")
$(".changeInfoPop .checkbox_acpo .check-group").removeClass("act") $(".changeInfoPop .checkbox_acpo .check-group").removeClass("act")
$(".changeInfoPop .checkbox_acpo .check-group22").addClass("act") $(".changeInfoPop .checkbox_acpo .check-group22").addClass("act")
} }
...@@ -266,8 +266,11 @@ define('account', ['tool', 'liexin_pop', 'form', 'artTemplate'], function (requi ...@@ -266,8 +266,11 @@ define('account', ['tool', 'liexin_pop', 'form', 'artTemplate'], function (requi
$(".check-group-addressp").removeClass("act") $(".check-group-addressp").removeClass("act")
$(this).addClass("act") $(this).addClass("act")
}) })
$("body").on("click", ".check-groupinfo", function () {
$(".check-groupinfo").removeClass("act")
$(this).addClass("act")
})
//获取国家 //获取国家
account.getCountry() account.getCountry()
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<div class="check"> <div class="check">
<i class="icon iconfont icon-gou"></i> <i class="icon iconfont icon-gou"></i>
</div> </div>
<p>Show what's available</p> <p>Exact Match</p>
</div> </div>
</div> </div>
<div class="datalistcon boxsiz"> <div class="datalistcon boxsiz">
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
<div class="fr clr ghn-right-box"> <div class="fr clr ghn-right-box">
<div class="grb-top clr"> <div class="grb-top clr">
<a href="javascript:void(0)" class="fr clj gofooter">CONTACT US</a> <a href="javascript:void(0)" class="fr clj gofooter">CONTACT US</a>
@if(!empty($_COOKIE['sem_email'])) @if(Auth::check())
<div class="login-head-box yesLogin fr clj"> <div class="login-head-box yesLogin fr clj">
<a href="/user/order" class="row"> <a href="/user/order" class="row">
<span><i class="icon iconfont icon-touxiang"></i></span> <span><i class="icon iconfont icon-touxiang"></i></span>
<div class="username">{{$_COOKIE['sem_email']}}</div> <div class="username">{{Auth::user()->email??''}}</div>
</a> </a>
<div class="userurl-box"> <div class="userurl-box">
<a href="/user/order">My Orders</a> <a href="/user/order">My Orders</a>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
const PUBLICXK="{{$public}}";//资源文件文件目录 js公用变量 const PUBLICXK="{{$public}}";//资源文件文件目录 js公用变量
const SO_URL="{{$so_url}}";//资源文件文件目录 js公用变量 const SO_URL="{{$so_url}}";//资源文件文件目录 js公用变量
</script> </script>
<input type="hidden" id="emailCookie" value="{{Auth::user()->email??''}}">
<script src="{{$public}}/assets/js/common/sea.js?v={{time()}}"></script> <script src="{{$public}}/assets/js/common/sea.js?v={{time()}}"></script>
<script src="{{$public}}/assets/js/common/jquery-1.8.3.min.js?v={{time()}}"></script> <script src="{{$public}}/assets/js/common/jquery-1.8.3.min.js?v={{time()}}"></script>
<script src="{{$public}}/assets/js/common/config.js?v={{time()}}"></script> <script src="{{$public}}/assets/js/common/config.js?v={{time()}}"></script>
<div class="mall-footer"> <div class="mall-footer">
<div class="floor1 w1200"> <div class="floor1 w1200">
<div class="row"> <div class="row">
<div class="itemf3 trl bgbts1"><b>30M+</b>sku</div> <div class="itemf3 trl bgbts1"><b>30M+</b>SKU</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div> <div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<div class="searchbtnx boxsiz mallsearchbtnx"><i class="icon iconfont icon-sousuo-shangcheng"></i></div> <div class="searchbtnx boxsiz mallsearchbtnx"><i class="icon iconfont icon-sousuo-shangcheng"></i></div>
</div> </div>
<a class="car-boxs" href="/car"><i class="icon iconfont icon-gouwuche"></i><span class="carNum carNumxs">0</span></a> <a class="car-boxs" href="/car"><i class="icon iconfont icon-gouwuche"></i><span class="carNum carNumxs">0</span></a>
@if(!empty($_COOKIE['sem_email'])) @if(Auth::check())
<div class="login-head-box yesLogin"> <div class="login-head-box yesLogin">
<a href="/user/order" class="row"> <a href="/user/order" class="row">
<span><i class="icon iconfont icon-touxiang"></i></span> <span><i class="icon iconfont icon-touxiang"></i></span>
<div class="username">{{$_COOKIE['sem_email']}}</div> <div class="username">{{Auth::user()->email??''}}</div>
</a> </a>
<div class="userurl-box"> <div class="userurl-box">
<a href="/user/order">My Orders</a> <a href="/user/order">My Orders</a>
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<div class="login-head-box yesLogin"> <div class="login-head-box yesLogin">
<a href="/user/order" class="row"> <a href="/user/order" class="row">
<span><i class="icon iconfont icon-touxiang"></i></span> <span><i class="icon iconfont icon-touxiang"></i></span>
@if(!empty($_COOKIE['sem_email'])) @if(Auth::check())
<div class="username">{{$_COOKIE['sem_email']}}</div> <div class="username">{{Auth::user()->email??''}}</div>
@endif @endif
</a> </a>
</div> </div>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
<div class="floor3"> <div class="floor3">
<div class="row"> <div class="row">
<div class="itemf3 trl bgbts1"><b>30M+</b>sku</div> <div class="itemf3 trl bgbts1"><b>30M+</b>SKU</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div> <div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -185,13 +185,13 @@ ...@@ -185,13 +185,13 @@
<div class="changeInfoPop" style="display:none;"> <div class="changeInfoPop" style="display:none;">
<div class="inputboxp boxsiz"> <div class="inputboxp boxsiz">
<div class="checkbox row checkbox_acpo"> <div class="checkbox row checkbox_acpo">
<div class="check-group row act check-group11" guid="1"> <div class="check-group row check-group22 check-groupinfo" guid="2">
<p class="row verCenter rowCenter"> <p class="row verCenter rowCenter">
<font></font> <font></font>
</p> </p>
<span>For Business</span> <span>For Business</span>
</div> </div>
<div class="check-group row check-group22" guid="2"> <div class="check-group row check-group11 act check-groupinfo" guid="1">
<p class="row verCenter rowCenter"> <p class="row verCenter rowCenter">
<font></font> <font></font>
</p> </p>
......
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
<div class="td w239">{{value.shipping_address}}</div> <div class="td w239">{{value.shipping_address}}</div>
<div class="td w150"> <div class="td w150">
<!-- <div class="btnsi">Buy Again</div> --> <!-- <div class="btnsi">Buy Again</div> -->
{{if (value.status==1||value.status==2)}} {{if (value.status==1||value.status==-1)}}
<div class="btnsi cancelbtn" guid="{{value.order_id}}">Cancel Order</div> <div class="btnsi cancelbtn" guid="{{value.order_id}}">Cancel Order</div>
{{else}} {{else}}
<div class="btnsi paybtn" merchandise_pay="{{value.merchandise_total}}" shipping_pay="{{value.shipping}}" ps_pay="{{value.payment_surcharge}}" goods_num_pay="{{value.goods_name_arr.length}}" subtotal_pay="{{value.sub_total}}" >Pay</div> <div class="btnsi paybtn" merchandise_pay="{{value.merchandise_total}}" shipping_pay="{{value.shipping}}" ps_pay="{{value.payment_surcharge}}" goods_num_pay="{{value.goods_name_arr.length}}" subtotal_pay="{{value.sub_total}}" >Pay</div>
......
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