Commit a0cb00f1 by 肖康

p品牌路由 新增地址

parent f4140683
......@@ -24,10 +24,13 @@ class BrandController extends Controller
*/
public function map()
{
$brandList = BrandService::getStandardBrandList();
return view('brand.map',compact('brandList'));
}
public function list()
public function info(Request $request)
{
return view('brand.list');
}
......
......@@ -13,7 +13,7 @@ class BrandService
$redisKey = 'semour_standard_brand_map';
$standardBrandList = Redis::get($redisKey);
if ($standardBrandList) {
return $standardBrandList;
return json_decode($standardBrandList,true);
}
$standardBrandCache = Redis::hgetall('standard_brand');
$standardBrandCache = array_map(function ($value) {
......
......@@ -236,6 +236,7 @@
border-radius: 4px;
margin-right: 6px;
position: relative;
top:-1px;
}
&.act{
.chooseicon{
......
.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:#4e5263;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}.pop-show-box.pop-show-box-login .pop-head{margin-bottom:0px}.pop-show-box.pop-show-box-login .pop-show-con .inputboxp{background:none}.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 .tip-con{color:#fff;margin-bottom:10px}.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}.allInquiryPop{box-sizing:border-box;padding:0 15px}.allInquiryPop .inquirygrouplabel{width:570px;margin-bottom:9px}.allInquiryPop .inquirygrouplabel div.labels{width:190px;box-sizing:border-box;padding-left:10px;font-size:14px;color:#fff}.allInquiryPop .inquirygrouplabel div.labels i{color:#F68332}.allInquiryPop .inquirygroupinputs{width:570px;height:30px;background:#041135;border:1px solid #FFFFFF;opacity:.65;border-radius:8px;position:relative;margin-bottom:2px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox{position:absolute;right:-210px;width:200px;height:30px;line-height:30px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox b{color:rgba(255,255,255,0.7);font-size:20px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox .ibts{color:#F68332;cursor:pointer;font-size:16px;margin-left:10px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox .ibts.addibts{color:#5569FD}.allInquiryPop .inquirygroupinputs .inquiryadddelbox .ibts.addibts b{position:relative;top:1px}.allInquiryPop .inquirygroupinputs input{border-radius:0px;border:0px;box-sizing:border-box;width:190px;height:20px;line-height:20px;border-radius:8px;border-right:1px dashed rgba(255,255,255,0.1)}.allInquiryPop .inquiry-input-group{margin-top:14px}.allInquiryPop .inquiry-input-group .labelp{font-size:14px;color:#fff;margin-bottom:9px}.allInquiryPop .inquiry-input-group textarea{width:570px;height:48px}.allInquiryPop .submitInquiry{width:300px;height:32px;border:2px solid #5569FD;border-radius:8px;color:#5569FD;line-height:32px;text-align:center;cursor:pointer;margin:0 auto;margin-top:30px}
\ 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:#4e5263;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}.pop-show-box.pop-show-box-login .pop-head{margin-bottom:0px}.pop-show-box.pop-show-box-login .pop-show-con .inputboxp{background:none}.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 .tip-con{color:#fff;margin-bottom:10px}.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;top:-1px}.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}.allInquiryPop{box-sizing:border-box;padding:0 15px}.allInquiryPop .inquirygrouplabel{width:570px;margin-bottom:9px}.allInquiryPop .inquirygrouplabel div.labels{width:190px;box-sizing:border-box;padding-left:10px;font-size:14px;color:#fff}.allInquiryPop .inquirygrouplabel div.labels i{color:#F68332}.allInquiryPop .inquirygroupinputs{width:570px;height:30px;background:#041135;border:1px solid #FFFFFF;opacity:.65;border-radius:8px;position:relative;margin-bottom:2px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox{position:absolute;right:-210px;width:200px;height:30px;line-height:30px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox b{color:rgba(255,255,255,0.7);font-size:20px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox .ibts{color:#F68332;cursor:pointer;font-size:16px;margin-left:10px}.allInquiryPop .inquirygroupinputs .inquiryadddelbox .ibts.addibts{color:#5569FD}.allInquiryPop .inquirygroupinputs .inquiryadddelbox .ibts.addibts b{position:relative;top:1px}.allInquiryPop .inquirygroupinputs input{border-radius:0px;border:0px;box-sizing:border-box;width:190px;height:20px;line-height:20px;border-radius:8px;border-right:1px dashed rgba(255,255,255,0.1)}.allInquiryPop .inquiry-input-group{margin-top:14px}.allInquiryPop .inquiry-input-group .labelp{font-size:14px;color:#fff;margin-bottom:9px}.allInquiryPop .inquiry-input-group textarea{width:570px;height:48px}.allInquiryPop .submitInquiry{width:300px;height:32px;border:2px solid #5569FD;border-radius:8px;color:#5569FD;line-height:32px;text-align:center;cursor:pointer;margin:0 auto;margin-top:30px}
\ No newline at end of file
......@@ -91,14 +91,30 @@
.addressbox {
margin-top: 16px;
.addbtn{
width: 150px;
line-height: 32px;
color:#fff;
text-align: center;
height: 32px;
background: #164D9A;
border-radius: 8px;
margin-bottom: 15px;
cursor: pointer;
}
.list-table {
.w56 {
width: 56px;
}
.w150 {
width: 150px;
.w200 {
width: 190px;
}
.w160 {
width: 160px;
}
.w140 {
width: 140px;
}
......@@ -147,7 +163,17 @@
box-sizing : border-box;
padding-right: 5px;
word-break : break-all;
line-height: 22px;
.default-btn{
width: 160px;
height: 32px;
line-height: 32px;
text-align: center;
background: #FAFAFA;
border: 1px solid #DFEAFA;
border-radius: 4px;
margin-left: 70px
}
.bot {
width : 74px;
height : 32px;
......@@ -176,3 +202,28 @@
}
.gobtn{background: #F68332!important;}
.getCountryBox{
position: relative;
.conps{
display: none;
position: absolute;
top:33px;
left:0px;
width:320px;
height:200px;
overflow-y: auto;
background: #fff;
box-shadow: 0px 0px 10px #ccc;
padding:15px 0;
z-index: 2;
.citem{
height:28px;
line-height: 28px;
padding:0 20px;
color:#164D9A;
cursor: pointer;
&:hover{background: #DFEAFA;}
}
}
}
\ No newline at end of file
.accountbox .user-right{width:1024px;min-height:350px;background:#FFFFFF;padding:18px 12px}.accountbox .user-right .nav{border-bottom:1px solid #DFEAFA}.accountbox .user-right .nav .item{height:38px;font-size:16px;color:#222;text-align:center;box-sizing:border-box;padding:0px 30px;line-height:38px;cursor:pointer}.accountbox .user-right .nav .item .tt{width:80px}.accountbox .user-right .nav .item.act{font-weight:bold;border-bottom:4px solid #164D9A}.accountbox .user-right .section .boxinfo{width:1000px;background:#F7FAFF;border-radius:8px;margin:0 auto;box-sizing:border-box;padding:25px 46px;margin-top:10px}.accountbox .user-right .section .grp{font-size:14px;color:#555;margin-bottom:35px}.accountbox .user-right .section .grp:last-child{margin-bottom:0px}.accountbox .user-right .section .grp .labels{width:200px;color:#333;font-weight:bold}.accountbox .user-right .section .grp .labels span{color:#F68332}.accountbox .user-right .section .grp .lval{width:200px;margin-right:70px}.accountbox .user-right .section .grp .edit{color:#164D9A;cursor:pointer}.accountbox .user-right .section .changebtn{width:150px;height:32px;background:#164D9A;border-radius:8px;font-size:14px;color:#fff;text-align:center;line-height:32px;cursor:pointer}.accountbox .user-right .addressbox{margin-top:16px}.accountbox .user-right .addressbox .list-table .w56{width:56px}.accountbox .user-right .addressbox .list-table .w150{width:150px}.accountbox .user-right .addressbox .list-table .thead{width:1000px;height:48px;background:#DFEAFA;border-radius:8px 8px 0px 0px;height:39px;line-height:39px;padding:0 22px;border-bottom:1px solid #DFEAFA;box-sizing:border-box}.accountbox .user-right .addressbox .list-table .thead .th{font-size:14px;color:#333;font-weight:bold;box-sizing:border-box;padding-right:5px}.accountbox .user-right .addressbox .list-table .tbody{width:1000px;background:#F7FAFF;box-sizing:border-box;border-radius:0px 0px 8px 8px;padding:0 22px}.accountbox .user-right .addressbox .list-table .tr{padding:22px 0px;border-bottom:1px solid #DFEAFA}.accountbox .user-right .addressbox .list-table .tr:last-child{border:0px}.accountbox .user-right .addressbox .list-table .tr .td{font-size:14px;color:#555;box-sizing:border-box;padding-right:5px;word-break:break-all}.accountbox .user-right .addressbox .list-table .tr .td .bot{width:74px;height:32px;font-size:14px;background:#164D9A;border-radius:4px;line-height:74px;color:#fff;text-align:center;line-height:32px;cursor:pointer}.accountbox .user-right .addressbox .list-table .tr .td .bot.delbtns{background:#FFD7BB;color:#A74703;margin-left:10px}.gobtn{background:#F68332 !important}
\ No newline at end of file
.accountbox .user-right{width:1024px;min-height:350px;background:#FFFFFF;padding:18px 12px}.accountbox .user-right .nav{border-bottom:1px solid #DFEAFA}.accountbox .user-right .nav .item{height:38px;font-size:16px;color:#222;text-align:center;box-sizing:border-box;padding:0px 30px;line-height:38px;cursor:pointer}.accountbox .user-right .nav .item .tt{width:80px}.accountbox .user-right .nav .item.act{font-weight:bold;border-bottom:4px solid #164D9A}.accountbox .user-right .section .boxinfo{width:1000px;background:#F7FAFF;border-radius:8px;margin:0 auto;box-sizing:border-box;padding:25px 46px;margin-top:10px}.accountbox .user-right .section .grp{font-size:14px;color:#555;margin-bottom:35px}.accountbox .user-right .section .grp:last-child{margin-bottom:0px}.accountbox .user-right .section .grp .labels{width:200px;color:#333;font-weight:bold}.accountbox .user-right .section .grp .labels span{color:#F68332}.accountbox .user-right .section .grp .lval{width:200px;margin-right:70px}.accountbox .user-right .section .grp .edit{color:#164D9A;cursor:pointer}.accountbox .user-right .section .changebtn{width:150px;height:32px;background:#164D9A;border-radius:8px;font-size:14px;color:#fff;text-align:center;line-height:32px;cursor:pointer}.accountbox .user-right .addressbox{margin-top:16px}.accountbox .user-right .addressbox .addbtn{width:150px;line-height:32px;color:#fff;text-align:center;height:32px;background:#164D9A;border-radius:8px;margin-bottom:15px;cursor:pointer}.accountbox .user-right .addressbox .list-table .w56{width:56px}.accountbox .user-right .addressbox .list-table .w200{width:190px}.accountbox .user-right .addressbox .list-table .w160{width:160px}.accountbox .user-right .addressbox .list-table .w140{width:140px}.accountbox .user-right .addressbox .list-table .thead{width:1000px;height:48px;background:#DFEAFA;border-radius:8px 8px 0px 0px;height:39px;line-height:39px;padding:0 22px;border-bottom:1px solid #DFEAFA;box-sizing:border-box}.accountbox .user-right .addressbox .list-table .thead .th{font-size:14px;color:#333;font-weight:bold;box-sizing:border-box;padding-right:5px}.accountbox .user-right .addressbox .list-table .tbody{width:1000px;background:#F7FAFF;box-sizing:border-box;border-radius:0px 0px 8px 8px;padding:0 22px}.accountbox .user-right .addressbox .list-table .tr{padding:22px 0px;border-bottom:1px solid #DFEAFA}.accountbox .user-right .addressbox .list-table .tr:last-child{border:0px}.accountbox .user-right .addressbox .list-table .tr .td{font-size:14px;color:#555;box-sizing:border-box;padding-right:5px;word-break:break-all;line-height:22px}.accountbox .user-right .addressbox .list-table .tr .td .default-btn{width:160px;height:32px;line-height:32px;text-align:center;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;margin-left:70px}.accountbox .user-right .addressbox .list-table .tr .td .bot{width:74px;height:32px;font-size:14px;background:#164D9A;border-radius:4px;line-height:74px;color:#fff;text-align:center;line-height:32px;cursor:pointer}.accountbox .user-right .addressbox .list-table .tr .td .bot.delbtns{background:#FFD7BB;color:#A74703;margin-left:10px}.gobtn{background:#F68332 !important}.getCountryBox{position:relative}.getCountryBox .conps{display:none;position:absolute;top:33px;left:0px;width:320px;height:200px;overflow-y:auto;background:#fff;box-shadow:0 0 10px #ccc;padding:15px 0;z-index:2}.getCountryBox .conps .citem{height:28px;line-height:28px;padding:0 20px;color:#164D9A;cursor:pointer}.getCountryBox .conps .citem:hover{background:#DFEAFA}
\ No newline at end of file
define('map', [], function (require, exports, module) {
define('map', ['tool'], function (require, exports, module) {
var tool=require("tool")
var map = {
init: function () {
map.handle();
......@@ -17,6 +18,20 @@ define('map', [], function (require, exports, module) {
})
})
$("body").on("input", '.searchbrandx', tool.debounce(function (e) {
var str_ = $(this).val();
if(!str_){$(".brand-con .brand-group .ttc a").show();return}
str_=str_.toLocaleLowerCase();
$(".brand-con .brand-group .ttc a").each(function(){
var val_=$(this).text().toLocaleLowerCase();
if(val_.indexOf(str_)!=-1){
$(this).show()
}else{
$(this).hide();
}
})
}, 300))
}
}
module.exports = map.init();
......
......@@ -143,9 +143,10 @@ define('mallUi', ['tool', 'liexin_pop'], function (require, exports, module) {
remark: $(".allInquiryPop .inquiryremark").val()
}, function (res) {
if (res.code === 0) {
setTimeout(function () {
liexin_pop.Tip({ title: res.msg },function(){
history.go(0)
}, 1000)
})
} else {
liexin_pop.Tip({ title: res.msg })
......
define('account', ['tool', 'liexin_pop', 'form'], function (require, exports, module) {
define('account', ['tool', 'liexin_pop', 'form', 'artTemplate'], function (require, exports, module) {
var tool = require("tool");
var liexin_pop = require("liexin_pop");
var form = require("form")
var artTemplate = require("artTemplate");
var account = {
init: function () {
account.handle();
account.getData()
account.getAddress()
},
getData: function () {
$.liexin_ajax('/api/user/info', 'GET', {}, function (res) {
......@@ -29,15 +31,33 @@ define('account', ['tool', 'liexin_pop', 'form'], function (require, exports, mo
}
})
},
getAddress: function () {
$.liexin_ajax('/api/user_address/list', 'GET', {}, function (res) {
if (res.code == 0) {
var dataArr = res.data || [];
if (dataArr.length == 0) {
tool.NoData(".tbody")
return
}
var json_ = {
data: dataArr
}
var html = template('DataTmp', json_);
$(".addressbox .tbody").html(html);
} else {
liexin_pop.Tip({ title: res.msg })
}
})
},
handle: function () {
//切换盒子
$("body").on("click", ".navitemx", function () {
$(".user-right .navitemx").removeClass("act");
$(this).addClass("act");
$(".lboxs").hide();
if($(this).attr("guid")==1){
if ($(this).attr("guid") == 1) {
$(".infobase").show()
}else{
} else {
$(".addressbox").show()
}
})
......@@ -150,9 +170,9 @@ define('account', ['tool', 'liexin_pop', 'form'], function (require, exports, mo
}
$.liexin_ajax('/api/user/update', 'POST', {
account_properties: $(".changeInfoPop .check-group.act").attr("guid"),
company_name:$(".changeInfoPop .company_name_acpo").val(),
first_name:$(".changeInfoPop .first_name_acpo").val(),
last_name:$(".changeInfoPop .last_name_acpo").val(),
company_name: $(".changeInfoPop .company_name_acpo").val(),
first_name: $(".changeInfoPop .first_name_acpo").val(),
last_name: $(".changeInfoPop .last_name_acpo").val(),
}, function (res) {
if (res.code == 0) {
liexin_pop.Tip({ title: res.msg }, function () { history.go(0) })
......@@ -162,6 +182,87 @@ define('account', ['tool', 'liexin_pop', 'form'], function (require, exports, mo
})
})
//新增地址
$("body").on("click", ".popaddressbtn", function () {
var guid_ = $(this).attr("guid");
var isAdd = $(this).hasClass("addbtn") ? 1 : 0;
if ($(".list-table tr").length >= 20) {
liexin_pop.Tip({ title: "Contain At Most 20 Address" })
return
}
liexin_pop.Open({
title: (isAdd ? "Add Address" : "Change Address"),
width: 766,
height: 595,
ele: ".addressPop",
success: function () {
if (guid_) {
//编辑逻辑
$(".addressPop").find(".addressPopBtn").attr("guid",guid_)
getAddressDetail(guid_)
}
}
})
})
//地址提交
$("body").on("click", ".addressPopBtn", function () {
account.submitAddress($(this))
})
//删除地址
$("body").on("click", ".delbtns", function () {
var guid_=$(this).attr("guid");
liexin_pop.Confirm({title:"Are you sure to delete the address?",success:function(ele){
$.liexin_ajax('/api/user_address/delete', 'POST', {address_id:guid_}, function (res) {
if (res.code === 0) {
liexin_pop.Tip({ title: res.msg })
ele.fadeOut(300)
account.getAddress()
} else {
liexin_pop.Tip({ title: res.msg })
}
})
}})
})
//国家操作
$("body").on("input", '.getCountry', tool.debounce(function (e) {
var str_ = $(this).val();
$(this).attr("guid", "")
var count_ = 0;
if (str_) {
$(".countryconent").show();
$(".countryconent .citem").each(function () {
if (($(this).text().toLocaleLowerCase()).indexOf((str_.toLocaleLowerCase())) != -1) {
$(this).show()
count_++;
} else {
$(this).hide()
}
})
if (count_ == 0) {
$(".countryconent").hide();
}
} else {
$(".countryconent").hide();
}
}, 300))
$("body").on("click", ".citem", function () {
$(".getCountry").val($(this).text()).attr("guid", $(this).attr("guid"))
$(".countryconent").hide();
})
//选中默认
$("body").on("click", ".chooseaddresx", function () {
$(this).toggleClass("act")
})
//选择个人
$("body").on("click", ".check-group-addressp", function () {
$(".check-group-addressp").removeClass("act")
$(this).addClass("act")
})
//获取国家
account.getCountry()
},
getCode: function () {
//发送邮件
......@@ -175,7 +276,84 @@ define('account', ['tool', 'liexin_pop', 'form'], function (require, exports, mo
liexin_pop.Tip({ title: res.msg })
}
})
},
getAddressDetail:function(guid_){
$.liexin_ajax('/api/user_address/detail', 'GET', {address_id:guid_}, function (res) {
if (res.code === 0) {
$(".addressPop .check-group").removeClass("act")
$(".addressPop .check-group[guid='1']").addClass("act")
if(res.data.address_type==2){
$(".addressPop .check-group[guid='2']").addClass("act")
}
$(".addressPop .email6").val(res.data.email)
$(".addressPop .telephone6").val(res.data.phone)
$(".addressPop .country6").val(res.data.country).attr(res.data.country)
$(".addressPop .last_name6").val(res.data.last_name)
$(".addressPop .first_name6").val(res.data.first_name)
$(".addressPop .company_name6").val(res.data.company_name)
$(".addressPop .address6").val(res.data.detail_address)
$(".addressPop .city6").val(res.data.city)
$(".addressPop .state6").val(res.data.province)
$(".addressPop .post_code6").val(res.data.post_code)
$(".addressPop .chooseaddresx").removeClass("act")
if(res.data.is_default==1){
$(".addressPop .chooseaddresx").addClass("act")
}
} else {
liexin_pop.Tip({ title: res.msg })
}
})
},
submitAddress: function (ele) {
var url_ = "/api/user_address/add";
var obj_ = {
address_type: $(".addressPop .check-group.act").attr("guid"),
email: $(".addressPop .email6").val(),
phone: $(".addressPop .telephone6").val(),
country: $(".addressPop .country6").attr("guid"),
last_name: $(".addressPop .last_name6").val(),
first_name: $(".addressPop .first_name6").val(),
company_name: $(".addressPop .company_name6").val(),
detail_address: $(".addressPop .address6").val(),
city: $(".addressPop .city6").val(),
province: $(".addressPop .state6").val(),
post_code: $(".addressPop .post_code6").val(),
is_default: $(".addressPop .chooseaddresx").hasClass("act") ? 1 : 0,
is_register: 0
}
if (ele.attr("guid")) {
//编辑address_id
url_ = "/api/user_address/update";
obj_.address_id = ele.attr("guid");
}
if (form.test(".addressPop")) {
return
}
$.liexin_ajax(url_, 'POST', obj_, function (res) {
if (res.code == 0) {
liexin_pop.Tip({ title: res.msg },function(){
openHide()
account.getAddress()
})
} else {
liexin_pop.Tip({ title: res.msg })
}
})
},
//获取国家
getCountry: function () {
$.liexin_ajax('/api/country/list', 'GET', {}, function (res) {
if (res.code === 0) {
var html_ = "";
for (var i = 0; i < res.data.length; i++) {
html_ += '<div class="citem" guid="' + res.data[i].id + '">' + res.data[i].name + '</div>'
}
$(".countryconent").html(html_)
} else {
}
}, 1)
},
}
module.exports = account.init();
})
......
......@@ -7,6 +7,7 @@
<div class="mallpage">
@include('common.mallHeaderTop')
@include('common.mallHeaderNav')
<div class="brandmap w1200">
<div class="bread-menu row boxsiz">
<a href="">Home</a>
......@@ -16,8 +17,9 @@
<div class="cons row bothSide">
<div class="left-box boxsiz">
<p>REFINE SEARCH</p>
<input type="text">
<input type="text" class="searchbrandx">
</div>
<div class="right-box boxsiz">
<p>Manufacturers</p>
<div class="brand-head row boxsiz avarage">
......@@ -50,96 +52,9 @@
<span guid="Z">Z</span>
</div>
<div class="brand-con boxsiz">
<div class="brand-group" guid="#">
<div class="ttl">#</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="A">
<div class="ttl">A</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="B">
<div class="ttl">B</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="C">
<div class="ttl">C</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="D">
<div class="ttl">D</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="E">
<div class="ttl">E</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="F">
<div class="ttl">F</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="G">
<div class="ttl">G</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
<a href="">4D Systems</a>
</div>
</div>
<div class="brand-group" guid="H">
<div class="ttl">H</div>
@foreach ($brandList as $key=>$item)
<div class="brand-group" guid="{{$key}}">
<div class="ttl">{{$key}}</div>
<div class="ttc row boxsiz">
<a href="">3DXTECH</a>
<a href="">3G Shielding Specialties</a>
......@@ -149,6 +64,9 @@
<a href="">4D Systems</a>
</div>
</div>
@endforeach
</div>
</div>
</div>
......
......@@ -85,41 +85,20 @@
</div>
</div>
<div class="lboxs addressbox" style="display:none;">
<div class="clear">
<div class="addbtn fr popaddressbtn">Add Address</div>
</div>
<div class="list-table">
<div class="thead row boxsiz">
<div class="th w56">NO.</div>
<div class="th w150">NAME</div>
<div class="th w150">COMPANY NAME</div>
<div class="th w150">EMAIL</div>
<div class="th w150">TELEPHONE</div>
<div class="th w150">ADDRESS</div>
<div class="th w150">Options</div>
<div class="th w200">NAME/COMPANY NAME</div>
<div class="th w200">EMAIL/TELEPHONE</div>
<div class="th w200">ADDRESS</div>
<div class="th w160">CITY</div>
<div class="th w140">Options</div>
</div>
<div class="tbody">
<div class="tr row boxsiz">
<div class="td w56">1</div>
<div class="td w150">Michael Jordan</div>
<div class="td w150">ABC123456789</div>
<div class="td w150">ABCD@qq.com</div>
<div class="td w150">000-000-0000</div>
<div class="td w150">asdasdasdasdasdas</div>
<div class="td w150 row avarage">
<div class="bot editbtns">Edit</div>
<div class="bot delbtns">Delete</div>
</div>
</div>
<div class="tr row boxsiz">
<div class="td w56">1</div>
<div class="td w150">Michael Jordan</div>
<div class="td w150">ABC123456789</div>
<div class="td w150">ABCD@qq.com</div>
<div class="td w150">000-000-0000</div>
<div class="td w150">asdasdasdasdasdas</div>
<div class="td w150 row avarage">
<div class="bot editbtns">Edit</div>
<div class="bot delbtns">Delete</div>
</div>
</div>
</div>
......@@ -237,6 +216,126 @@
<div class="but gobtn gonext changeinfopopbtn">Submit</div>
</div>
</div>
<!--新增地址弹窗-->
<div class="addressPop" style="display:none;">
<div class="inputboxp">
<div class="checkbox row">
<div class="check-group row act check-group-addressp" guid="1">
<p class="row verCenter rowCenter">
<font></font>
</p>
<span>Company</span>
</div>
<div class="check-group row check-group-addressp" guid="2">
<p class="row verCenter rowCenter">
<font></font>
</p>
<span>Personal</span>
</div>
</div>
<div class="input-con">
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>EMAIL</p>
<input type="text" class="email6 verify" verifyTip='{"type":"null","text":"EMAIL"}'>
</div>
<div class="input-group-auth ml30">
<p class="labelp"><span>*</span>TELEPHONE</p>
<input type="text" class="telephone6 verify" verifyTip='{"type":"null","text":"TELEPHONE"}'>
</div>
</div>
<div class="row">
<div class="input-group-auth sm ">
<p class="labelp"><span>*</span>FIRST NAME</p>
<input type="text" class="first_name6 verify" verifyTip='{"type":"null","text":"FIRST NAME"}'>
</div>
<div class="input-group-auth sm ml30">
<p class="labelp"><span>*</span>LAST NAME</p>
<input type="text" class="last_name6 verify" verifyTip='{"type":"null","text":"LAST NAME"}'>
</div>
<div class="input-group-auth ml30">
<p class="labelp"><span>*</span>COMPANY NAME</p>
<input type="text" class="company_name6 verify" verifyTip='{"type":"null","text":"COMPANY NAME"}'>
</div>
</div>
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>ADDRESS</p>
<textarea name="" class="address6 verify" verifyTip='{"type":"null","text":"ADDRESS"}'></textarea>
</div>
</div>
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>COUNTRY/REGIONL</p>
<div class="getCountryBox">
<input type="text" class="getCountry country6 verify" verifyTip='{"type":"null","text":"COUNTRY/REGION"}'>
<div class="conps scrollbar boxsiz countryconent">
<div class="citem">ddd</div>
<div class="citem">ttt</div>
</div>
</div>
</div>
<div class="input-group-auth ml30">
<p class="labelp">STATE</p>
<input type="text" class="state6">
</div>
</div>
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>CITY</p>
<input type="text" class="city6 verify" verifyTip='{"type":"null","text":"CITY"}'>
</div>
<div class="input-group-auth ml30">
<p class="labelp"><span>*</span>POST CODE</p>
<input type="text" class="post_code6 verify" verifyTip='{"type":"null","text":"POST CODE"}'>
</div>
</div>
<div class="tips"></div>
<div class="row subbtn">
<div class="choose row act chooseaddresx">
<div class="chooseicon"></div>
<span>Default address</span>
</div>
<div class="but gobtn gonext addressPopBtn">SAVE</div>
</div>
</div>
</div>
</div>
@verbatim
<script id="DataTmp" type="text/html">
{{each data value index}}
<div class="tr row boxsiz">
<div class="td w56">{{index+1}}</div>
<div class="td w200">
<div>{{value.first_name}} {{value.last_name}}</div>
<div>{{value.company_name}}</div>
{{if (value.is_default==1) }}
<div class="default-btn">Default address</div>
{{/if}}
</div>
<div class="td w200">
<div>{{value.email}}</div>
<div>{{value.phone}}</div>
</div>
<div class="td w200">{{value.detail_address}}</div>
<div class="td w160">
<div>{{value.country}}</div>
<div>{{value.province}}</div>
<div>{{value.city}}</div>
</div>
<div class="td w140 row avarage">
<div class="bot editbtns popaddressbtn" guid="{{value.address_id}}">Edit</div>
<div class="bot delbtns" guid="{{value.address_id}}">Delete</div>
</div>
</div>
{{/each}}
</script>
@endverbatim
@section('js')
<script src="{{$public}}/assets/js/user/account.js?v={{time()}}"></script>
@endsection
\ No newline at end of file
......@@ -44,6 +44,7 @@ Route::get('/sku', 'SkuController@detail')->name('sku.detail');
Route::get('/class', 'ClassificationController@index')->name('classification.index');
Route::get('/brand/map', 'BrandController@map')->name('brand.map');
Route::get('/brand/list', 'BrandController@list')->name('brand.list');
Route::get('/brand/{id}', 'BrandController@info')->name('brand.info');
Route::get('/search', 'SearchController@index')->name('search.index');
......
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