Commit 5269f0ae by 肖康

购物车联营商城自营商城 H5迁移完成

parent cc3d423e
......@@ -65,15 +65,26 @@ export const apis = {
*/
cartCount: productionUrlApi + 'cart/count',
/**
* 去结算行为统计
*/
confirmBehavior: productionUrlApi + '/public/confirmBehavior',
/**
* 获取购物车列表
*/
cartList: productionUrlApi + 'cart/lists',
/**
* 删除购物车
*/
cartDelete: productionUrlApi + 'cart/delete',
/**
* 获取购物各种类型数量
*/
allcount: productionUrlApi + 'cart/allcount',
/**
* 改变购物车商品数量
*/
changenum: productionUrlApi + '/cart/changenum',
/**
* 客服统计处理
*/
customsrService: productionUrlApi + 'public/customsrservice',
......@@ -480,9 +491,19 @@ export const services = {
cartList(params){
return axios.post(apis.cartList,params)
},
cartDelete(params){
return axios.post(apis.cartDelete,params)
},
allcount(params){
return axios.post(apis.allcount,params)
},
confirmBehavior(params){
return axios.post(apis.confirmBehavior,params)
},
changenum(params){
return axios.post(apis.changenum,params)
},
};
\ No newline at end of file
......@@ -136,6 +136,7 @@
.shop-but .sum p{ font-size: 12px; line-height: 16px;}
.shop-but .button{position: relative;}
.shop-but .button a{display: block; height: 44px; line-height: 44px; font-size: 16px; border-radius: 0; text-align: center; color: #fff; background:red}
.shop-but .button.dis a{background: #ccc;}
.shop-but .button span{ font-size: 12px; }
.shop-but .button .sxx{position: absolute;color:#1080d0;line-height: 44px;top:0px;left:-113%;background: #fff;display:none;}
.shop-but .checkallbox{line-height: 40px;padding-left:10px;box-sizing: border-box;}
......@@ -283,4 +284,12 @@
border-width: 4px;
margin-left: 5px;
}
.dataNo{display: none;}
\ No newline at end of file
.dataNo{display: none;}
/*微信购物车-空*/
.shop-empty{ padding: 25% 3% 10% 3%; text-align: center; }
.shop-empty dt{}
.shop-empty dt i{ font-size: 34px; }
.shop-empty dd{ padding-top: 5%; }
.shop-empty dd h4{ font-size: 16px; padding-bottom: 10%; font-weight: bold;}
.shop-empty dd p a{ font-size: 14px;color:#1080d0; }
\ No newline at end of file
.car-page{color:#333}.car-page .lxBox{padding-bottom:44px}.car-page .lxBox .logintip{top:88px}.car-page .lxBox .dataBox{padding-top:88px}.car-page .zyBox{padding-bottom:44px}.car-page .zyBox .logintip{top:44px}.car-page .zyBox .headxianhuoqihuo{height:43px;line-height:43px;border-bottom:1px solid #d6d7dc}.car-page .zyBox .headxianhuoqihuo .zyqxtype{font-size:16px}.car-page .zyBox .dataBox{padding-top:88px}.car-page .logintip{position:fixed;background:#fff6e5;height:44px;line-height:44px;color:#666;top:44px;left:0px;right:0px;font-size:14px;text-align:center;z-index:3}.car-page .logintip a{background:#e10601;border-radius:4px;text-align:center;width:70px;height:23px;color:#fff;font-size:12px;display:inline-block;line-height:23px;cursor:pointer;margin-left:10px}.car-page .editBox{position:fixed;padding:0 3%;height:44px;line-height:44px;color:#666;left:0px;right:0px;font-size:12px;border-bottom:1px solid #d6d7dc;z-index:3;background:#fff;box-sizing:border-box}.car-page .editBox .remind{color:#999}.car-page .editBox .remind i{color:#ffa200;position:relative;top:2px;left:5px}.car-page .editBox a{color:#1080d0;font-size:14px}.car-page .lyNav{color:#333;position:fixed;left:0px;top:44px;right:0px;height:44px;border-bottom:1px solid #d6d7dc;z-index:3;background-color:#fff;box-sizing:border-box}.car-page .lyNav span{cursor:pointer;width:50%;box-sizing:border-box;font-size:14px;text-align:center;line-height:44px}.car-page .lyNav span font{color:#333}.car-page .lyNav span.act{color:#1080d0}.shop-block{font-size:12px;border-bottom:1px solid #d6d7dc}.shop-block .t-r{text-align:right}.shop-block .delete-tier{position:relative;top:2px;font-size:20px}.shop-block h4{font-size:14px;padding:12px 0;font-weight:400;line-height:20px;border-bottom:1px solid #d6d7dc;word-wrap:break-word;word-break:break-all}.shop-block ul{padding:2% 3%;padding-left:0}.shop-block li{font-size:12px;word-wrap:break-word;height:22px;line-height:22px;word-break:break-all;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shop-block li span{float:left;width:50px}.shop-block li p{padding-left:50px;font-size:12px;color:#333333}.shop-block .ichunt-blue{font-size:12px;font-weight:400;padding:1px 3px;margin-left:5px;background:#1080d0;color:#fff;border-radius:3px}.shop-block .ichunt-orange{font-size:12px;font-weight:400;padding:1px 3px;margin-left:5px;background:#ffa200;color:#fff;border-radius:3px}.shop-block .add-num{padding:0 3%}.shop-block .add-num .mui-numbox{float:right;padding:0 30px;width:130px;height:30px;border:1px solid #e1e1e1;border-radius:0;box-sizing:border-box}.shop-block .add-num .mui-numbox button{height:28px;width:30px;font-size:22px;line-height:28px;background-color:#fff;color:#666;box-sizing:border-box}.shop-block .add-num .mui-numbox button i{font-size:14px}.shop-block .add-num .mui-numbox button.no_click{color:#999}.shop-block .add-num .mui-numbox input{height:28px;background:#fff;color:#333;font-size:12px;box-sizing:border-box}.shop-block .subtotal{padding:2% 3%;font-weight:bold;text-align:right}.shop-block .morePrice{margin-bottom:15px}.shop-block .more-height{font-size:12px;margin-right:10%;height:24px;margin-top:5px;line-height:24px;border:1px solid #e5e5e5;text-align:center;color:#666}.shop-block .more-height .iconfont{font-size:10px;margin-left:5px}.shop-lose{color:#999999}.shop-lose h4 a{color:#999999}.shop-lose li p{color:#999999}.shop-lose .lose-but{height:30px;padding-right:3%;margin-bottom:10px}.shop-lose .lose-but span{float:left;display:block;margin-top:3px;font-size:12px;background-color:#999;color:#fff;padding:0 10px;height:22px;line-height:22px;border-radius:14px}.shop-lose .lose-but .but-bor-red{display:block;color:#e10601;border:1px solid #e10601;height:28px;line-height:28px;padding:0 10px;border-radius:14px}.shop-but{height:44px;border-top:1px solid #d6d7dc;position:fixed;bottom:0;width:100%;background-color:#fff;z-index:99}.shop-but .mui-checkbox label{line-height:45px}.shop-but .mui-checkbox span{padding-left:20px;font-size:14px}.shop-but .sum{text-align:right;padding-right:10px;padding-bottom:0;box-sizing:border-box}.shop-but .sum h4{font-size:16px;line-height:22px;padding-top:4px}.shop-but .sum p{font-size:12px;line-height:16px}.shop-but .button{position:relative}.shop-but .button a{display:block;height:44px;line-height:44px;font-size:16px;border-radius:0;text-align:center;color:#fff;background:red}.shop-but .button span{font-size:12px}.shop-but .button .sxx{position:absolute;color:#1080d0;line-height:44px;top:0px;left:-113%;background:#fff;display:none}.shop-but .checkallbox{line-height:40px;padding-left:10px;box-sizing:border-box}.shop-but .button .but-orange{background:#ffa200}.shop-but .clearbtn{line-height:44px;font-size:14px!important;margin-right:20px}.shop-but .delbtn{width:130px}.mui-btn{font-size:14px;font-weight:400;line-height:1.42;position:relative;display:inline-block;margin-bottom:0;padding:6px 12px;cursor:pointer;-webkit-transition:all;transition:all;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:.2s;transition-duration:.2s;text-align:center;vertical-align:top;white-space:nowrap;color:#333;border:1px solid #ccc;border-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:#fff;background-clip:padding-box}.mui-numbox{position:relative;display:inline-block;overflow:hidden;width:120px;height:35px;padding:0 40px 0 40px;vertical-align:top;vertical-align:middle;border:solid 1px #bbb;border-radius:3px}.mui-numbox [class*=numbox-btn],.mui-numbox [class*=btn-numbox]{font-size:18px;font-weight:normal;line-height:100%;position:absolute;top:0;overflow:hidden;width:40px;height:100%;padding:0;color:#555;border:none;border-radius:0;background-color:#f9f9f9}.mui-numbox [class*=numbox-btn]:active,.mui-numbox [class*=btn-numbox]:active{background-color:#ccc}.mui-numbox [class*=numbox-btn][disabled],.mui-numbox [class*=btn-numbox][disabled]{color:#c0c0c0}.mui-numbox .mui-numbox-btn-plus,.mui-numbox .mui-btn-numbox-plus{right:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.mui-numbox .mui-numbox-btn-minus,.mui-numbox .mui-btn-numbox-minus{left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.mui-numbox .mui-numbox-input,.mui-numbox .mui-input-numbox{display:inline-block;overflow:hidden;padding:0 3px;width:100% !important;height:100%;margin:0;text-align:center;text-overflow:ellipsis;word-break:normal;border:none !important;border-right:solid 1px #ccc !important;border-left:solid 1px #ccc !important;border-radius:0 !important}.mui-input-row .mui-numbox{float:right;box-sizing:border-box;margin:2px 8px}.icon-bot{top:9px;position:relative;content:"";height:0;width:0;pointer-events:none;border:solid transparent;border-top-color:#4d4d4d;border-width:4px;margin-left:5px}.icon-top{bottom:9px;position:relative;content:"";height:0;width:0;pointer-events:none;border:solid transparent;border-bottom-color:#4d4d4d;border-width:4px;margin-left:5px}.dataNo{display:none}
\ No newline at end of file
.car-page{color:#333}.car-page .lxBox{padding-bottom:44px}.car-page .lxBox .logintip{top:88px}.car-page .lxBox .dataBox{padding-top:88px}.car-page .zyBox{padding-bottom:44px}.car-page .zyBox .logintip{top:44px}.car-page .zyBox .headxianhuoqihuo{height:43px;line-height:43px;border-bottom:1px solid #d6d7dc}.car-page .zyBox .headxianhuoqihuo .zyqxtype{font-size:16px}.car-page .zyBox .dataBox{padding-top:88px}.car-page .logintip{position:fixed;background:#fff6e5;height:44px;line-height:44px;color:#666;top:44px;left:0px;right:0px;font-size:14px;text-align:center;z-index:3}.car-page .logintip a{background:#e10601;border-radius:4px;text-align:center;width:70px;height:23px;color:#fff;font-size:12px;display:inline-block;line-height:23px;cursor:pointer;margin-left:10px}.car-page .editBox{position:fixed;padding:0 3%;height:44px;line-height:44px;color:#666;left:0px;right:0px;font-size:12px;border-bottom:1px solid #d6d7dc;z-index:3;background:#fff;box-sizing:border-box}.car-page .editBox .remind{color:#999}.car-page .editBox .remind i{color:#ffa200;position:relative;top:2px;left:5px}.car-page .editBox a{color:#1080d0;font-size:14px}.car-page .lyNav{color:#333;position:fixed;left:0px;top:44px;right:0px;height:44px;border-bottom:1px solid #d6d7dc;z-index:3;background-color:#fff;box-sizing:border-box}.car-page .lyNav span{cursor:pointer;width:50%;box-sizing:border-box;font-size:14px;text-align:center;line-height:44px}.car-page .lyNav span font{color:#333}.car-page .lyNav span.act{color:#1080d0}.shop-block{font-size:12px;border-bottom:1px solid #d6d7dc}.shop-block .t-r{text-align:right}.shop-block .delete-tier{position:relative;top:2px;font-size:20px}.shop-block h4{font-size:14px;padding:12px 0;font-weight:400;line-height:20px;border-bottom:1px solid #d6d7dc;word-wrap:break-word;word-break:break-all}.shop-block ul{padding:2% 3%;padding-left:0}.shop-block li{font-size:12px;word-wrap:break-word;height:22px;line-height:22px;word-break:break-all;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shop-block li span{float:left;width:50px}.shop-block li p{padding-left:50px;font-size:12px;color:#333333}.shop-block .ichunt-blue{font-size:12px;font-weight:400;padding:1px 3px;margin-left:5px;background:#1080d0;color:#fff;border-radius:3px}.shop-block .ichunt-orange{font-size:12px;font-weight:400;padding:1px 3px;margin-left:5px;background:#ffa200;color:#fff;border-radius:3px}.shop-block .add-num{padding:0 3%}.shop-block .add-num .mui-numbox{float:right;padding:0 30px;width:130px;height:30px;border:1px solid #e1e1e1;border-radius:0;box-sizing:border-box}.shop-block .add-num .mui-numbox button{height:28px;width:30px;font-size:22px;line-height:28px;background-color:#fff;color:#666;box-sizing:border-box}.shop-block .add-num .mui-numbox button i{font-size:14px}.shop-block .add-num .mui-numbox button.no_click{color:#999}.shop-block .add-num .mui-numbox input{height:28px;background:#fff;color:#333;font-size:12px;box-sizing:border-box}.shop-block .subtotal{padding:2% 3%;font-weight:bold;text-align:right}.shop-block .morePrice{margin-bottom:15px}.shop-block .more-height{font-size:12px;margin-right:10%;height:24px;margin-top:5px;line-height:24px;border:1px solid #e5e5e5;text-align:center;color:#666}.shop-block .more-height .iconfont{font-size:10px;margin-left:5px}.shop-lose{color:#999999}.shop-lose h4 a{color:#999999}.shop-lose li p{color:#999999}.shop-lose .lose-but{height:30px;padding-right:3%;margin-bottom:10px}.shop-lose .lose-but span{float:left;display:block;margin-top:3px;font-size:12px;background-color:#999;color:#fff;padding:0 10px;height:22px;line-height:22px;border-radius:14px}.shop-lose .lose-but .but-bor-red{display:block;color:#e10601;border:1px solid #e10601;height:28px;line-height:28px;padding:0 10px;border-radius:14px}.shop-but{height:44px;border-top:1px solid #d6d7dc;position:fixed;bottom:0;width:100%;background-color:#fff;z-index:99}.shop-but .mui-checkbox label{line-height:45px}.shop-but .mui-checkbox span{padding-left:20px;font-size:14px}.shop-but .sum{text-align:right;padding-right:10px;padding-bottom:0;box-sizing:border-box}.shop-but .sum h4{font-size:16px;line-height:22px;padding-top:4px}.shop-but .sum p{font-size:12px;line-height:16px}.shop-but .button{position:relative}.shop-but .button a{display:block;height:44px;line-height:44px;font-size:16px;border-radius:0;text-align:center;color:#fff;background:red}.shop-but .button.dis a{background:#ccc}.shop-but .button span{font-size:12px}.shop-but .button .sxx{position:absolute;color:#1080d0;line-height:44px;top:0px;left:-113%;background:#fff;display:none}.shop-but .checkallbox{line-height:40px;padding-left:10px;box-sizing:border-box}.shop-but .button .but-orange{background:#ffa200}.shop-but .clearbtn{line-height:44px;font-size:14px!important;margin-right:20px}.shop-but .delbtn{width:130px}.mui-btn{font-size:14px;font-weight:400;line-height:1.42;position:relative;display:inline-block;margin-bottom:0;padding:6px 12px;cursor:pointer;-webkit-transition:all;transition:all;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:.2s;transition-duration:.2s;text-align:center;vertical-align:top;white-space:nowrap;color:#333;border:1px solid #ccc;border-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:#fff;background-clip:padding-box}.mui-numbox{position:relative;display:inline-block;overflow:hidden;width:120px;height:35px;padding:0 40px 0 40px;vertical-align:top;vertical-align:middle;border:solid 1px #bbb;border-radius:3px}.mui-numbox [class*=numbox-btn],.mui-numbox [class*=btn-numbox]{font-size:18px;font-weight:normal;line-height:100%;position:absolute;top:0;overflow:hidden;width:40px;height:100%;padding:0;color:#555;border:none;border-radius:0;background-color:#f9f9f9}.mui-numbox [class*=numbox-btn]:active,.mui-numbox [class*=btn-numbox]:active{background-color:#ccc}.mui-numbox [class*=numbox-btn][disabled],.mui-numbox [class*=btn-numbox][disabled]{color:#c0c0c0}.mui-numbox .mui-numbox-btn-plus,.mui-numbox .mui-btn-numbox-plus{right:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.mui-numbox .mui-numbox-btn-minus,.mui-numbox .mui-btn-numbox-minus{left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.mui-numbox .mui-numbox-input,.mui-numbox .mui-input-numbox{display:inline-block;overflow:hidden;padding:0 3px;width:100% !important;height:100%;margin:0;text-align:center;text-overflow:ellipsis;word-break:normal;border:none !important;border-right:solid 1px #ccc !important;border-left:solid 1px #ccc !important;border-radius:0 !important}.mui-input-row .mui-numbox{float:right;box-sizing:border-box;margin:2px 8px}.icon-bot{top:9px;position:relative;content:"";height:0;width:0;pointer-events:none;border:solid transparent;border-top-color:#4d4d4d;border-width:4px;margin-left:5px}.icon-top{bottom:9px;position:relative;content:"";height:0;width:0;pointer-events:none;border:solid transparent;border-bottom-color:#4d4d4d;border-width:4px;margin-left:5px}.dataNo{display:none}.shop-empty{padding:25% 3% 10% 3%;text-align:center}.shop-empty dt i{font-size:34px}.shop-empty dd{padding-top:5%}.shop-empty dd h4{font-size:16px;padding-bottom:10%;font-weight:bold}.shop-empty dd p a{font-size:14px;color:#1080d0}
\ No newline at end of file
.zl_Detail *{box-sizing:border-box;font-family:"Helvetica Neue", Helvetica, sans-serif}.zl_Detail .details-head .head_top{border-bottom:1px solid #d6d7dc;padding:10px}.zl_Detail .details-head .head_top .head_top_left{width:56px}.zl_Detail .details-head .head_top .head_top_left img{display:block;width:56px;height:56px;border:1px solid #e5e5e5}.zl_Detail .details-head .head_top .head_top_right{padding-left:66px}.zl_Detail .details-head .head_top .head_top_right h4{padding-bottom:10px;font-size:18px;color:#333333}.zl_Detail .details-head .head_bottom{border-bottom:1px solid #d6d7dc;padding:5px 10px}.zl_Detail .details-head .head_bottom li{width:50%;line-height:20px;height:20px;font-size:12px;color:#999}.zl_Detail .details-head .head_bottom li b{display:block;float:left;line-height:20px;height:20px;font-weight:400}.zl_Detail .details-head .head_bottom li span{color:#333;line-height:20px;height:20px;display:block;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.zl_Detail .details-head .head_bottom li .f-orange{color:#ffa200;margin-left:5px}.zl_Detail .details-cont{position:absolute;top:149px;bottom:44px;width:100%;padding:10px;overflow-y:auto}.zl_Detail .details-cont .gradient{width:100%}.zl_Detail .details-cont .gradient table{width:100%;line-height:32px;font-size:12px;text-align:center;color:#666666;border:1px solid #d9d9d9}.zl_Detail .details-cont .gradient table .xs-6{width:50%}.zl_Detail .details-cont .gradient table .xs-4{width:33.33%}.zl_Detail .details-cont .gradient table .xs-3{width:25%}.zl_Detail .details-cont .gradient table th{border:1px solid #d9d9d9;font-weight:400;color:#666}.zl_Detail .details-cont .gradient table td{border:1px solid #d9d9d9;color:#333}.zl_Detail .details-cont .gradient .zkxk{font-size:12px;height:24px;line-height:24px;border:1px solid #e5e5e5;border-top:none;text-align:center;color:#666}.zl_Detail .details-cont .gradient .zkxk .icon-top{bottom:9px;position:relative;content:"";height:0;width:0;pointer-events:none;border:solid transparent;border-bottom-color:#4d4d4d;border-width:4px;margin-left:5px}.zl_Detail .details-cont .gradient .zkxk .icon-bot{top:9px;position:relative;content:"";height:0;width:0;pointer-events:none;border:solid transparent;border-top-color:#4d4d4d;border-width:4px;margin-left:5px}.zl_Detail .details-cont .price{padding-top:10px}.zl_Detail .details-cont .price .zyqhc{position:absolute;width:4.5333333333rem;height:.9333333333rem;color:#999;font-size:.2666666667rem;border:1px solid #ffa200;left:130px;line-height:.3733333333rem;padding:.0666666667rem;box-shadow:0px 0px 3px #ffd07f;border-radius:3px}.zl_Detail .details-cont .price .zyqhc .lfldiv{width:.4rem}.zl_Detail .details-cont .price .zyqhc .lfldiv font{position:relative;font-size:.2933333333rem;margin-right:.0666666667rem}.zl_Detail .details-cont .price .zyqhc .lfrdiv{width:3.8666666667rem}.zl_Detail .details-cont .price .bbiu{display:inline-block;position:absolute;border-width:6px;border-style:solid;border-color:transparent #ffa200 transparent transparent;left:118px;top:.2rem}.zl_Detail .details-cont .price .bbiu1{display:inline-block;position:absolute;border-width:6px;border-style:solid;border-color:transparent #fff transparent transparent;left:120px;top:.2rem}.zl_Detail .details-cont .price .em1{padding:0 0.5em}.zl_Detail .details-cont .price dl{font-size:12px}.zl_Detail .details-cont .price dl dt{width:5em;color:#999;float:left;line-height:30px}.zl_Detail .details-cont .price dl dd{padding-left:5em;color:#333;line-height:30px}.zl_Detail .details-cont .price dl dd.onePrice{font-size:14px}.zl_Detail .details-cont .price dl dd.totalPrice{font-weight:bold;color:red;font-size:14px}.zl_Detail .details-cont .price dl dd.tab span{display:block;float:left;margin:2px 10px 0 0;color:#333;height:23px;line-height:22px;padding:0 10px;border:1px solid #d9d9d9;border-radius:3px;background:#fff}.zl_Detail .details-cont .price dl dd.tab span.act{color:#e10601;border-color:#e10601}.zl_Detail .details-cont .price dl dd.tab span.act-blue{color:#1080d0;border-color:#1080d0}.zl_Detail .details-cont .price dl dd .number{float:left;width:118px;height:30px;border:1px solid #d9d9d9;border-radius:3px;background:#fff;position:relative}.zl_Detail .details-cont .price dl dd .number i{cursor:pointer;height:28px;width:28px;text-align:center;line-height:28px;display:block;float:left;background:none;color:#999999;font-size:18px}.zl_Detail .details-cont .price dl dd .number input{text-align:center;float:left;padding:4px 5px;line-height:20px;height:28px;width:60px;background:none;color:#333333;font-size:12px;border:none;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5}.zl_Detail .details-foot{height:43px;border-top:1px solid #d6d7dc;width:100%;position:absolute;bottom:0}.zl_Detail .details-foot span{width:50%;display:block;float:left;height:43px;line-height:43px;font-size:14px;color:#fff;text-decoration:none;text-align:center;border:none}.zl_Detail .details-foot span.but-blue{background:#1080d0}.zl_Detail .details-foot span.but-red{background:#e10601}
/*# sourceMappingURL=zyly.min.css.map */
{
"version": 3,
"mappings": "AAKE,YAAE,CACA,UAAU,CAAE,UAAU,CACtB,WAAW,CAAE,uCAAuC,CAIpD,kCAAU,CACR,aAAa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AAM,CAAE,IAAI,CAEZ,sCAAW,CACT,UAAU,CAAE,OAAO,CAGrB,qCAAU,CACR,UAAU,CAAE,OAAO",
"sources": ["zyly.scss"],
"names": [],
"file": "zyly.min.css"
}
......@@ -55,3 +55,35 @@ export const dateTimeFormate = (value, params) => {
var s = time.getSeconds();
return y + '-' + timeAdd0(m) + '-' + timeAdd0(d) + ' ' + timeAdd0(h) + ':' + timeAdd0(mm) + ':' + timeAdd0(s);
}
/**数字编码**/
export const numberCode = (value, params) => {
var str=String(value);
if (str && str.indexOf("font") != -1) {
var sff = (str.split('class="'));
sff.shift();
var numb = "";
var listb = [
['asfgdqwer', 'asfgdtyhg', 'asfgdpolk', 'asfgdpoqw'],
['asfgdrfdf', 'asfgderfd', 'asfgdwdsa', 'asfgdpoer'],
['asfgdasde', 'asfgdqwsz', 'asfgdrtgd', 'asfgdpovv'],
['asfgdwsxc', 'asfgdwsxz', 'asfgdrfvb', 'asfgdpoee'],
['asfgdqazs', 'asfgdqasd', 'asfgdqwag', 'asfgdpogh'],
['asfgdrtyh', 'asfgdyutr', 'asfgdeews', 'asfgdpotg'],
['asfgdpluj', 'asfgdikjf', 'asfgdesgj', 'asfgdpfff'],
['asfgdtrdb', 'asfgdiksf', 'asfgdsgkp', 'asfgdprty'],
['asfgdpehl', 'asfgdstgb', 'asfgderll', 'asfgdpokf'],
['asfgdpehg', 'asfgdstgf', 'asfgderlf', 'asfgdpogk']
];
for (var i = 0; i < sff.length; i++) {
var ghjk = sff[i].split(" ")[0];
for (var j = 0; j < listb.length; j++) {
if (listb[j].indexOf(ghjk) != -1) {
numb += j;
}
}
}
return Number(numb)
}else{
return Number(str)
}
}
import {dateTimeFormate, urlParams,urlPatg,urlEncode} from './formate';
import {dateTimeFormate, urlParams,urlPatg,urlEncode,numberCode} from './formate';
export default {
dateTimeFormate,
urlParams,
urlPatg,
urlEncode
urlEncode,
numberCode
};
......@@ -6,6 +6,7 @@ Vue.use(Toast);
var qs = require('qs');
const state = {
loading:false,
loading1:false,
ly1:false,//联营大陆得到数据防止切换多次请求
ly2:false,//联营香港得到数据防止切换多次请求
zy1:false,//自营得到数据防止切换多次请求
......@@ -19,7 +20,8 @@ const state = {
ly1LoseData:[],
ly2LoseData:[],
zy1LoseData:[],
priceInit:false,
totlaMState:false
}
const mutations = {
......@@ -53,19 +55,16 @@ const mutations = {
var arr_=payload.data.list;
for(var i=0;i<arr_.length;i++){
arr_[i].editState=false;
if(arr_[i].sale_type==2){
//期货 //默认不勾选
arr_[i].check=false;
}else{
//现货默认勾选
arr_[i].check=true;
}
if(arr_[i].status==-1){
state.zy1LoseData.push(arr_[i]);
}else{
if(arr_[i].sale_type==1){
//现货默认勾选
arr_[i].check=true;
state.zy1Data.push(arr_[i]);
}else{
//期货 //默认不勾选
arr_[i].check=false;
state.zy2Data.push(arr_[i])
}
......@@ -73,12 +72,105 @@ const mutations = {
}
}
},
cartDelete(state,payload){
var ids=payload.cart_id.split(",");
if(payload.types==1){
//联营
if(payload.act=='normal'){
//删除操作
var datalistp=payload.delivery==1?state.ly1Data:state.ly2Data;
for(var i=0;i<datalistp.length;i++){
for(var j=0;j<ids.length;j++){
if(datalistp[i].cart_id==ids[j]){
datalistp.splice(i,1);
}
}
}
if(payload.delivery==1){
state.ly1Data=datalistp;
state.ly1Length=Number(state.ly1Length)-ids.length;
}else{
state.ly2Data=datalistp;
state.ly2Length=Number(state.ly2Length)-ids.length;
}
}else{
//清除过期数据
if(payload.delivery==1){
state.ly1LoseData=[];
}else{
state.ly2LoseData=[];
}
}
}else{
//自营
if(payload.act=='normal'){
//删除
for(var i=0;i<state.zy1Data.length;i++){
for(var j=0;j<ids.length;j++){
if(state.zy1Data[i].cart_id==ids[j]){
state.zy1Data.splice(i,1);
}
}
}
for(var ii=0;ii<state.zy2Data.length;i++){
for(var jj=0;jj<ids.length;jj++){
if(state.zy2Data[ii].cart_id==ids[jj]){
state.zy2Data.splice(ii,1);
}
}
}
state.zy1Length=Number(state.zy1Length)-ids.length;
}else{
//清除过期数据
state.zy1LoseData=[];
}
}
},
changenum(state,payload){
if(payload.delivery_place==1||payload.delivery_place==2){
//大陆//香港
var list_=payload.delivery_place==1?state.ly1Data:state.ly2Data;
for(var i=0;i<list_.length;i++){
if(list_[i].cart_id==payload.cart_id){
list_[i].goods_number=payload.data.num;
list_[i].goods_amount=payload.data.goods_amount;
list_[i].goods_amount_format=payload.data.goods_amount_format;
list_[i].goods_price=payload.data.goods_price;
list_[i].goods_price_format=payload.data.goods_price_format;
}
}
}else{
//自营
var list_1=state.zy1Data,list_2=state.zy2Data;
for(var i=0;i<list_1.length;i++){
if(list_1[i].cart_id==payload.cart_id){
list_1[i].goods_number=payload.data.num;
list_1[i].goods_amount=payload.data.goods_amount;
list_1[i].goods_amount_format=payload.data.goods_amount_format;
list_1[i].goods_price=payload.data.goods_price;
list_1[i].goods_price_format=payload.data.goods_price_format;
}
}
for(var j=0;j<list_2.length;j++){
if(list_2[j].cart_id==payload.cart_id){
list_2[j].goods_number=payload.data.num;
list_2[j].goods_amount=payload.data.goods_amount;
list_2[j].goods_amount_format=payload.data.goods_amount_format;
list_2[j].goods_price=payload.data.goods_price;
list_2[j].goods_price_format=payload.data.goods_price_format;
}
}
}
state.totlaMState=true;
}
}
const actions = {
cartList({commit},payload){
state.loading=true;
state.loading1=true;
var params = {
delivery_place: payload.delivery_place,
order_goods_type: payload.order_goods_type
......@@ -90,8 +182,8 @@ const actions = {
types_=payload.delivery_place;
}
Services.cartList(qs.stringify(params)).then((res) => {
console.log(types_)
state.loading=false;
state.loading1=false;
let data = res.data;
if(types_==1){
//大陆
......@@ -110,13 +202,14 @@ const actions = {
types_:types_
});
}else {
Toast({
message: data.err_msg,
duration: 3000
});
// Toast({
// message: data.err_msg,
// duration: 3000
// });
}
}).catch(function (err) {
state.loading = false;
state.loading1=false;
});
},
allcount({commit},payload){
......@@ -128,7 +221,76 @@ const actions = {
state.zy1Length=Number(data.data['2']['1']||0);
}
})
}
},
cartDelete({commit},payload){
state.loading=true;
var params = {
cart_id: payload.cart_id,
act: payload.act
}
Services.cartDelete(qs.stringify(params)).then((res) => {
state.loading=false;
let data = res.data;
if (data.err_code == 0) {
commit({
type: 'cartDelete',
data: data.data,
act:payload.act,
cart_id:payload.cart_id,
types:payload.types,
delivery:payload.delivery
});
}else {
Toast({
message: data.err_msg,
duration: 3000
});
}
}).catch(function (err) {
state.loading = false;
});
},
confirmBehavior({commit},payload){
state.loading=true;
Services.confirmBehavior().then((res) => {
state.loading=false;
window.location.href=payload.url_;
}).catch(function (err) {
state.loading = false;
});
},
changenum({commit},payload){
//state.loading=true;
var params = {
cart_id: payload.cart_id,
num: payload.num,
delivery_place: payload.delivery_place
}
state.totlaMState=false;
Services.changenum(qs.stringify(params)).then((res) => {
//state.loading=false;
let data = res.data;
if (data.err_code == 0) {
commit({
type: 'changenum',
data: data.data,
cart_id: payload.cart_id,
delivery_place: payload.delivery_place
});
}else {
Toast({
message: data.err_msg,
duration: 3000
});
}
}).catch(function (err) {
state.loading = false;
});
},
}
......
......@@ -170,6 +170,7 @@ export default {
* /
*/
aggxde(str){
var str=String(str);
if (str && str.indexOf("font") != -1) {
var sff = (str.split('class="'));
sff.shift();
......@@ -195,6 +196,8 @@ export default {
}
}
return Number(numb)
}else{
return Number(str)
}
}
......
......@@ -14,7 +14,7 @@
<div class="dataBox" >
<!--编辑-->
<div class="editBox clr lyfixed" :style="{'top':(paddingTop+44)+'px'}">
<div class="editBox clr lyfixed" :style="{'top':(paddingTop+44)+'px'}" v-if="!isNoContent">
<span class="remind fl" @click="tipLy">友情提醒<i class="iconfont icon-tishi" ></i></span>
<a href="javascript:void(0)" class="edit-btn fr" @click="isEditf()" v-if="isEdit">完成</a>
<a href="javascript:void(0)" class="edit-btn fr" @click="isEditf()" v-if="!isEdit">编辑</a>
......@@ -30,7 +30,7 @@
<a :href="'/goods_'+item.goods_id+'.html'" class="f-333">{{item.sku_name}}</a>
</p>
<p class="mui-col-sm-1 mui-col-xs-1 ta-c">
<a href="javascript:void(0)" v-show="item.editState" class="icon iconfont icon-shanchu delete-tier f-333"></a>
<a href="javascript:void(0)" v-show="item.editState" @click="deleteGoods(item.cart_id)" class="icon iconfont icon-shanchu delete-tier f-333"></a>
</p>
</h4>
<ul class="mui-row">
......@@ -67,11 +67,11 @@
<div class="mui-col-sm-5 mui-col-xs-5">
<div class="clr add-num">
<div class="mui-numbox edit-input">
<button class="mui-btn mui-btn-numbox-minus " type="button">
<button class="mui-btn mui-btn-numbox-minus " type="button" @click="changeNumber(item.goods_number,item.multiple,item.min_buy,item.stock,item.cart_id,1)">
<i class="icon iconfont icon-jian"></i>
</button>
<input class="mui-input-numbox valuep" type="number" value="1">
<button class="mui-btn mui-btn-numbox-plus " type="button">
<input class="mui-input-numbox valuep" type="number" :id="'test'+item.cart_id" @blur="changeNumber(item.goods_number,item.multiple,item.min_buy,item.stock,item.cart_id,3)" :value="item.goods_number | numberCode">
<button class="mui-btn mui-btn-numbox-plus " type="button" @click="changeNumber(item.goods_number,item.multiple,item.min_buy,item.stock,item.cart_id,2)">
<i class="icon iconfont icon-jia"></i>
</button>
</div>
......@@ -83,7 +83,15 @@
</div>
</div>
</div>
<div class="shopcart content-no" v-if="isNoContent">
<dl class="shop-empty">
<dt><i class="iconfont icon-gouwuche1"></i></dt>
<dd>
<h4>您的购物车空空如也</h4>
<p><a class="muiclickbug" href="/v3/search/search_index.html">搜索型号 &gt;&gt;</a></p>
</dd>
</dl>
</div>
<div class="sxData" v-for="item in ly1LoseData">
<div class="mui-row shop-block shop-lose" >
<div class="mui-col-sm-1 mui-col-xs-1"></div>
......@@ -127,7 +135,7 @@
<a :href="'/goods_'+item.goods_id+'.html'" class="f-333">{{item.sku_name}}</a>
</p>
<p class="mui-col-sm-1 mui-col-xs-1 ta-c">
<a href="javascript:void(0)" v-show="item.editState" class="icon iconfont icon-shanchu delete-tier f-333"></a>
<a href="javascript:void(0)" v-show="item.editState" @click="deleteGoods(item.cart_id)" class="icon iconfont icon-shanchu delete-tier f-333"></a>
</p>
</h4>
<ul class="mui-row">
......@@ -164,11 +172,11 @@
<div class="mui-col-sm-5 mui-col-xs-5">
<div class="clr add-num">
<div class="mui-numbox edit-input">
<button class="mui-btn mui-btn-numbox-minus " type="button">
<button class="mui-btn mui-btn-numbox-minus " type="button" @click="changeNumber(item.goods_number,item.multiple,item.min_buy,item.stock,item.cart_id,1)">
<i class="icon iconfont icon-jian"></i>
</button>
<input class="mui-input-numbox valuep" type="number" value="1">
<button class="mui-btn mui-btn-numbox-plus " type="button">
<input class="mui-input-numbox valuep" type="number" :id="'test'+item.cart_id" @blur="changeNumber(item.goods_number,item.multiple,item.min_buy,item.stock,item.cart_id,3)" :value="item.goods_number | numberCode">
<button class="mui-btn mui-btn-numbox-plus " type="button" @click="changeNumber(item.goods_number,item.multiple,item.min_buy,item.stock,item.cart_id,2)">
<i class="icon iconfont icon-jia"></i>
</button>
</div>
......@@ -180,7 +188,15 @@
</div>
</div>
</div>
<div class="shopcart content-no" v-if="isNoContent">
<dl class="shop-empty">
<dt><i class="iconfont icon-gouwuche1"></i></dt>
<dd>
<h4>您的购物车空空如也</h4>
<p><a class="muiclickbug" href="/v3/search/search_index.html">搜索型号 &gt;&gt;</a></p>
</dd>
</dl>
</div>
<div class="sxData" v-for="item in ly2LoseData">
<div class="mui-row shop-block shop-lose" >
<div class="mui-col-sm-1 mui-col-xs-1"></div>
......@@ -226,12 +242,12 @@
<div class="dataBox">
<!--编辑-->
<div class="editBox clr zyfixed" :style="{'top':paddingTop+'px'}">
<div class="editBox clr zyfixed" :style="{'top':paddingTop+'px'}" v-if="!isNoContent">
<a href="javascript:void(0)" class="edit-btn fr" @click="isEditf()" v-if="isEdit">完成</a>
<a href="javascript:void(0)" class="edit-btn fr" @click="isEditf()" v-if="!isEdit">编辑</a>
</div>
<div class="zyDataGp">
<div class="xianhuoData" >
<div class="xianhuoData" >
<div class="mui-row headxianhuoqihuo" v-if="zy1Data.length>0">
<div class="mui-col-sm-1 mui-col-xs-1 ta-c ">
<van-checkbox v-model="zy1DataIsCheck" @click="checkWatchZy(1)"></van-checkbox>
......@@ -241,7 +257,7 @@
<template v-for="(item,indexdata) in zy1Data">
<div class="mui-row shop-block sale_type_data" >
<div class="mui-col-sm-1 mui-col-xs-1 ta-c mt-10">
<van-checkbox v-model="item.check" @click="checkWatch"></van-checkbox>
<van-checkbox v-model="item.check" @change="checkWatch"></van-checkbox>
</div>
<div class="mui-col-sm-11 mui-col-xs-11">
<h4 class="mui-row">
......@@ -249,7 +265,7 @@
<a :href="'/item/'+item.goods_id+'.html'" class="f-333" >{{item.sku_name}}</a>
</p>
<p class="mui-col-sm-1 mui-col-xs-1 ta-c">
<a href="javascript:void(0)" guid="1991" v-show="item.editState" class="icon iconfont icon-shanchu delete-tier f-333"></a>
<a href="javascript:void(0)" guid="1991" v-show="item.editState" @click="deleteGoods(item.cart_id)" class="icon iconfont icon-shanchu delete-tier f-333"></a>
</p>
</h4>
<ul class="mui-row">
......@@ -291,17 +307,17 @@
<div class="mui-col-sm-5 mui-col-xs-5">
<div class="clr add-num">
<div class="mui-numbox edit-input">
<button class="mui-btn mui-btn-numbox-minus " type="button">
<button class="mui-btn mui-btn-numbox-minus " type="button" @click="changeNumber(item.goods_number,item.mpl,item.min_buy,item.stock,item.cart_id,1)">
<i class="icon iconfont icon-jian"></i>
</button>
<input class="mui-input-numbox valuep" type="number" value="40">
<button class="mui-btn mui-btn-numbox-plus " type="button">
<input class="mui-input-numbox valuep" type="number" :id="'test'+item.cart_id" @blur="changeNumber(item.goods_number,item.mpl,item.min_buy,item.stock,item.cart_id,3)" :value="item.goods_number | numberCode">
<button class="mui-btn mui-btn-numbox-plus " type="button" @click="changeNumber(item.goods_number,item.mpl,item.min_buy,item.stock,item.cart_id,2)">
<i class="icon iconfont icon-jia"></i>
</button>
</div>
</div>
<p class="subtotal f-999">
小计:<b class="f-red rewTotal">{{item.initial_amount_format}}</b>
小计:<b class="f-red rewTotal">{{item.goods_amount_format}}</b>
</p>
</div>
</div>
......@@ -309,7 +325,7 @@
</div>
</template>
</div>
<div class="qihuoData" >
<div class="qihuoData" >
<div class="mui-row headxianhuoqihuo" v-if="zy2Data.length>0" >
<div class="mui-col-sm-1 mui-col-xs-1 ta-c ">
<van-checkbox v-model="zy2DataIsCheck" @click="checkWatchZy(2)"></van-checkbox>
......@@ -319,7 +335,7 @@
<template v-for="(item,indexdata) in zy2Data">
<div class="mui-row shop-block sale_type_data" >
<div class="mui-col-sm-1 mui-col-xs-1 ta-c mt-10">
<van-checkbox v-model="item.check" @click="checkWatch"></van-checkbox>
<van-checkbox v-model="item.check" @change="checkWatch"></van-checkbox>
</div>
<div class="mui-col-sm-11 mui-col-xs-11">
<h4 class="mui-row">
......@@ -327,7 +343,7 @@
<a :href="'/item/'+item.goods_id+'.html'" class="f-333" >{{item.sku_name}}</a>
</p>
<p class="mui-col-sm-1 mui-col-xs-1 ta-c">
<a href="javascript:void(0)" v-show="item.editState" class="icon iconfont icon-shanchu delete-tier f-333"></a>
<a href="javascript:void(0)" v-show="item.editState" @click="deleteGoods(item.cart_id)" class="icon iconfont icon-shanchu delete-tier f-333"></a>
</p>
</h4>
<ul class="mui-row">
......@@ -369,17 +385,17 @@
<div class="mui-col-sm-5 mui-col-xs-5">
<div class="clr add-num">
<div class="mui-numbox edit-input">
<button class="mui-btn mui-btn-numbox-minus " type="button">
<button class="mui-btn mui-btn-numbox-minus " type="button" @click="changeNumber(item.goods_number,item.mpl,item.min_buy,item.stock,item.cart_id,1)">
<i class="icon iconfont icon-jian"></i>
</button>
<input class="mui-input-numbox valuep" type="number" value="40">
<button class="mui-btn mui-btn-numbox-plus " type="button">
<input class="mui-input-numbox valuep" type="number" :id="'test'+item.cart_id" @blur="changeNumber(item.goods_number,item.mpl,item.min_buy,item.stock,item.cart_id,3)" :value="item.goods_number | numberCode">
<button class="mui-btn mui-btn-numbox-plus " type="button" @click="changeNumber(item.goods_number,item.mpl,item.min_buy,item.stock,item.cart_id,2)">
<i class="icon iconfont icon-jia"></i>
</button>
</div>
</div>
<p class="subtotal f-999">
小计:<b class="f-red rewTotal">{{item.initial_amount_format}}</b>
小计:<b class="f-red rewTotal">{{item.goods_amount_format}}</b>
</p>
</div>
</div>
......@@ -387,6 +403,15 @@
</div>
</template>
</div>
<div class="shopcart content-no" v-if="isNoContent">
<dl class="shop-empty">
<dt><i class="iconfont icon-gouwuche1"></i></dt>
<dd>
<h4>您的购物车空空如也</h4>
<p><a class="muiclickbug" href="/v3/search/search_index.html">搜索型号 &gt;&gt;</a></p>
</dd>
</dl>
</div>
<div class="sxData" v-for="item in zy1LoseData">
<div class="mui-row shop-block shop-lose" >
<div class="mui-col-sm-1 mui-col-xs-1"></div>
......@@ -424,20 +449,20 @@
</div>
<!--购物车底部-->
<div class="mui-row shop-but">
<div class="mui-row shop-but" v-if="!isNoContent">
<div class="mui-col-sm-3 mui-col-xs-3 checkallbox">
<van-checkbox v-model="isAll" @click="checkAll">全选</van-checkbox>
</div>
<div class="mui-col-sm-6 mui-col-xs-6 sum" v-if="!isEdit">
<h4 class="fw">总金额:<span class="f-red ">¥<span class="moneyTot ">42.6493</span></span></h4>
<h4 class="fw">总金额:<span class="f-red ">{{totalMoney}}</span></h4>
<p class="f-999">(不含运费)</p>
</div>
<div class="mui-col-sm-3 mui-col-xs-3 button" v-if="!isEdit">
<a href="javascript:void('0')" class="but-red goBuy gbo">去结算<span>(<span class="carNum">2</span>)</span></a>
<div class="mui-col-sm-3 mui-col-xs-3 button" :class="{'dis':(totalNum==0)}" v-if="!isEdit">
<a href="javascript:void('0')" class="but-red" @click="goSubmit">去结算<span>(<span class="carNum">{{totalNum}}</span>)</span></a>
</div>
<div class="mui-col-sm-9 mui-col-xs-9 button " v-if="isEdit">
<a href="javascript:void(0)" class="but-orange fr delbtn" >删除</a>
<span class="f-blue fr clearbtn">清除失效商品</span>
<a href="javascript:void(0)" class="but-orange fr delbtn" @click="deleteGoods(0)">删除</a>
<span class="f-blue fr clearbtn" @click="deleteGoods(0,1)">清除失效商品</span>
</div>
</div>
<Header :isCar="isCar" :ly1Length="ly1Length" :ly2Length="ly2Length" :zy1Length="zy1Length" :meaushow="meaushow" :bgcolor="bgcolor" @listTab="listTab"></Header>
......@@ -469,11 +494,15 @@
zy1DataIsCheck:true,//现货全部选中状态
zy2DataIsCheck:false,//期货全部选中状态
isAll:true,//商品全部选中
totalMoney:0,//总金额
totalNum:0,//总数量
isNoContent:false,//没有数据展示
}
},
computed:{
...mapState({
loading: state => state.car.loading,
loading1: state => state.car.loading1,
ly1: state => state.car.ly1,
ly2: state => state.car.ly2,
zy1: state => state.car.zy1,
......@@ -487,6 +516,9 @@
ly1LoseData: state => state.car.ly1LoseData,
ly2LoseData: state => state.car.ly2LoseData,
zy1LoseData: state => state.car.zy1LoseData,
totlaMState: state => state.car.totlaMState,
})
},
......@@ -494,11 +526,109 @@
this.loginTip();
this.getCarCount();
this.getData();
this.priceInit();
},
watch:{
totlaMState(val){
if(val){
this.priceInit();
}
},
loading1(val){
this.isNoContent=false;
if(!val){
this.priceInit();
this.isNOD();
}
},
isEdit(val){
var list_1=this.ly1Data,list_2=this.ly2Data,list_3=this.zy1Data,list_4=this.zy2Data
for(var i=0;i<list_1.length;i++){
list_1[i].editState=val;
}
for(var i=0;i<list_2.length;i++){
list_2[i].editState=val;
}
for(var i=0;i<list_3.length;i++){
list_3[i].editState=val;
}
for(var i=0;i<list_4.length;i++){
list_4[i].editState=val;
}
},
ly1Data(val){
this.priceInit();
if(val.length==0){
this.isNOD();
}
},
ly2Data(val){
this.priceInit();
if(val.length==0){
this.isNOD();
}
},
zy1Data(val){
this.priceInit();
this.checkWatch();
if(val.length==0){
this.isNOD();
}
},
zy2Data(val){
this.priceInit();
this.checkWatch();
if(val.length==0){
this.isNOD();
}
},
ly1LoseData(val){
if(val.length==0){
this.isNOD();
}
},
ly2LoseData(val){
if(val.length==0){
this.isNOD();
}
},
zy1LoseData(val){
if(val.length==0){
this.isNOD();
}
},
},
methods:{
isNOD:function(){
//没数据展示
if(this.type==1){
//联营
if(this.delivery==1){
//大陆
if(this.ly1Data.length==0&&this.ly1LoseData.length==0){
this.isNoContent=true;
}else{
this.isNoContent=false;
}
}else{
//香港
if(this.ly2Data.length==0&&this.ly2LoseData.length==0){
this.isNoContent=true;
}else{
this.isNoContent=false;
}
}
}else{
//自营
if(this.zy1Data.length==0&&this.zy2Data.length==0&&this.zy1LoseData.length==0){
this.isNoContent=true;
}else{
this.isNoContent=false;
}
}
},
//是否登录UI
loginTip:function(){
if(this.isLogingo){
this.paddingTop=44;
......@@ -506,6 +636,7 @@
this.paddingTop=88;
}
},
//友情提示
tipLy:function(){
Dialog.alert({
messageAlign:"left",
......@@ -533,9 +664,13 @@
});
},
//自营联营切换
listTab:function(type){
this.type=type;
this.checkWatch();
this.priceInit();
this.isNOD();
this.isEdit=false;
if(type==2&&this.zy1){
return
}
......@@ -549,6 +684,7 @@
}
this.getData();
},
//获取数据
getData:function(){
this.$store.dispatch({
type: 'cartList',
......@@ -556,22 +692,29 @@
order_goods_type: this.type
})
},
//获取购物车数量
getCarCount:function(){
this.$store.dispatch({
type: 'allcount'
})
},
//大陆香港切换
deliveryTab:function(delivery){
this.delivery=delivery;
this.checkWatch();
this.priceInit();
this.isNOD();
this.isEdit=false;
if(this.delivery==1&&this.ly1){
return
}
if(this.delivery==2&&this.ly2){
return
}
this.getData();
},
//阶梯价格处理
priceRow: function(dataList,index) {
if (dataList[index]["priceCheck"]) {
this.$set(dataList[index], "priceCheck", false);
......@@ -589,41 +732,47 @@
);
}
},
//编辑
isEditf:function(){
this.isEdit=!this.isEdit;
},
//基础复选框
checkWatch:function(){
var self=this;
if(self.type==1){
//联营
var list_=self.delivery==1?this.ly1Data:this.ly2Data;
self.isAll=true;
if(list_.length<=0){return}
for(var i=0;i<list_.length;i++){
if(!list_[i].check){
self.isAll=false;
}
}
}else{
self.isAll=true;
//自营
var list_1=this.zy1Data;
self.zy1DataIsCheck=true;
if(list_1.length<=0){return}
for(var i=0;i<list_1.length;i++){
if(!list_1[i].check){
self.zy1DataIsCheck=false;
self.isAll=false;
}
}
var list_2=this.zy2Data;
self.zy2DataIsCheck=true;
if(list_2.length<=0){return}
for(var i=0;i<list_2.length;i++){
if(!list_2[i].check){
for(var j=0;j<list_2.length;j++){
if(!list_2[j].check){
self.zy2DataIsCheck=false;
self.isAll=false;
}
}
}
this.priceInit();
},
//期货现货复选框
checkWatchZy:function(tp){
var self=this;
var list_1=this.zy1Data;
......@@ -647,7 +796,9 @@
}
}
}
this.priceInit();
},
//全选
checkAll:function(){
var self=this;
if(self.type==1){
......@@ -686,6 +837,254 @@
}
}
this.priceInit();
},
//渲染价格
priceInit:function(){
if(this.type==1){
//联营
var list_=this.delivery==1?this.ly1Data:this.ly2Data,num=0,totalnum=0;
for(var i=0;i<list_.length;i++){
if(list_[i].check){
num+=Number(Number((list_[i].goods_amount_format).slice(1)).toFixed(4));
totalnum++;
}
}
this.totalNum=totalnum;
this.totalMoney=(this.delivery==1?"¥":"$")+num.toFixed(4);
}else{
//自营
var list_1=this.zy1Data,list_2=this.zy2Data,num=0,totalnum=0;
for(var i=0;i<list_1.length;i++){
if(list_1[i].check){
num+=Number(Number((list_1[i].goods_amount_format).slice(1)).toFixed(4));
totalnum++;
}
}
for(var i=0;i<list_2.length;i++){
if(list_2[i].check){
num+=Number(Number((list_2[i].goods_amount_format).slice(1)).toFixed(4));
totalnum++;
}
}
this.totalNum=totalnum;
this.totalMoney="¥"+num.toFixed(4);
}
},
//删除
deleteGoods:function(arr,act){
var cart_id,self=this;
var act=act?'faild':'normal';
if(act=='normal'){
//删除
if(arr==0){
//多个删除逻辑
var arrp=this.getIDs();
cart_id=arrp.join(",");
}else{
//单个删除
cart_id=arr;
}
if(cart_id==""){
Toast({
message: "请选中至少一个商品",
duration: 1500
});
return;
}
}else{
//清除
var arrp=[];
if(self.type==1){
var list_=self.delivery==1?this.ly1LoseData:this.ly2LoseData;
for(var i=0;i<list_.length;i++){
arrp.push(list_[i].cart_id)
}
}else{
var list_=this.zy1LoseData;
for(var i=0;i<list_.length;i++){
arrp.push(list_[i].cart_id)
}
}
cart_id=arrp.join(",");
if(cart_id==""){
Toast({
message: "当前没有要清除的商品",
duration: 1500
});
return;
}
}
Dialog.confirm({
message: '您确定要'+(act?'清除':'删除')+'当前商品吗',
cancelButtonText:'再看看'
}).then(() => {
self.$store.dispatch({
type: 'cartDelete',
cart_id:cart_id,
act: act,
types:self.type,
delivery:self.delivery
})
}).catch(() => {
});
},
//获取当前选中ID数组f
getIDs:function(){
var self=this;
var arrp=[];
if(this.type==1){
var list_=self.delivery==1?this.ly1Data:this.ly2Data;
for(var i=0;i<list_.length;i++){
if(list_[i].check){
arrp.push(list_[i].cart_id)
}
}
}else{
//自营
var list_1=this.zy1Data,list_2=this.zy2Data;
if(list_1.length>0){
for(var i=0;i<list_1.length;i++){
if(list_1[i].check){
arrp.push(list_1[i].cart_id)
}
}
}
if(list_2.length>0){
for(var l=0;l<list_2.length;l++){
if(list_2[l].check){
arrp.push(list_2[l].cart_id)
}
}
}
}
return arrp;
},
//结算提交
goSubmit:function(){
var self=this;
var arrp=self.getIDs();
if(arrp.length==0){
Toast({
message: "当前没有选中商品",
duration: 1500
});
return;
}
if(self.type==2){
var arr1 = self.zy1Data,arr2=self.zy2Data,arr3=[];
for(var i=0;i<arrp.length;i++){
var indeval=arrp[i];
for(var p=0;p<arr1.length;p++){
if(indeval==arr1[p].cart_id){
arr3.push(arr1[p].sale_type)
}
}
for(var j=0;j<arr2.length;j++){
if(indeval==arr2[j].cart_id){
arr3.push(arr2[j].sale_type)
}
}
}
if(arr3.indexOf('1')!=-1 && arr3.indexOf('2')!=-1){
Toast({
message: "请分开结算期货订单和现货订单",
duration: 1500
});
return;
}
}
var confirm_=(self.type==2)?window.location.origin+"/v3/order/confirm?type=zy":window.location.origin+"/v3/order/confirm?type=other"
window.sessionStorage.setItem("car_xk",arrp.join(","));
self.$store.dispatch({
type: 'confirmBehavior',
url_:confirm_
})
},
changeNumber:function(number,mpq,min,stock,cart_id,type){
var self=this;
var num=Util.aggxde(number),
mpq=Util.aggxde(mpq),//包装数或者倍数
min=Util.aggxde(min),//最小购买数量
stock=Util.aggxde(stock),//最大购买数量
summitNum=num;
if(min>mpq){
if(min%mpq){
min=Math.ceil(min/mpq)*mpq;
}
}else{
min=mpq;
}
if(stock%mpq){
stock=Math.floor(stock/mpq)*mpq;
}
if(type==1){
//减小
summitNum=summitNum-mpq;
if(summitNum<min){
summitNum=min;
Toast({
message: "购买数量不能小于最小购买数量!",
duration: 1500
});
return;
}
}else if(type==2){
//增加
summitNum=summitNum+mpq;
if(summitNum>stock&&self.type==1){
summitNum=stock;
Toast({
message: "购买数量不能大于最大购买数量!",
duration: 1500
});
return;
}
}else{
//失去焦点改变
var thisNum=Number(document.getElementById('test'+cart_id).value);
summitNum=Math.ceil(thisNum/mpq)*mpq;
document.getElementById('test'+cart_id).value=summitNum;
if(summitNum<min){
summitNum=min;
Toast({
message: "购买数量不能小于最小购买数量!",
duration: 1500
});
document.getElementById('test'+cart_id).value=summitNum;
return;
}
if(summitNum>stock&&self.type==1){
summitNum=stock;
Toast({
message: "购买数量不能大于最大购买数量!",
duration: 1500
});
document.getElementById('test'+cart_id).value=summitNum;
return;
}
}
this.$store.dispatch({
type: 'changenum',
cart_id:cart_id,
num: summitNum,
delivery_place:(self.type==1)?self.delivery:""
})
}
},
components:{
......
......@@ -106,6 +106,13 @@ export default {
this.scrollFn();
}
},
created(){
if(this.carshow){
this.$store.dispatch({
type: 'cartCount'
})
}
},
methods: {
customsrService() {
this.$store.dispatch({
......
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