let content = parseInt(obj.parent().next().find(".cont").html());
// console.log(content)
if(x != null){
price *= -1 ;
}
let money= parseInt($("#money").html());
money += price * content;
// console.log(price)
$("#money").html(money);
}
function che(){
let ches = $(".checks");
// console.log(ches.size())
}
function quan() {
if($("#quan").attr("index") == 0){
$("#quan").attr("index","1")
$(".checks").css({ "background": "red" })
$(".checks").html("√");
$("#quan").css({ "background": "red" })
$("#quan").html("√");
$(".btn span").html("11")
}else{
$("#quan").attr("index", "0")
$(".checks").css({ "background": "white" })
$(".checks").html("");
$("#quan").css({ "background": "white" })
$("#quan").html("");
$(".btn span").html("0")
}
}
css
@charset "utf-8";
*{
margin:0;
padding:0;
}
html{
font-size:22.67vw;
/* font-family: "黑体"; */
}
html,body{
height: 100%;
background-color: #f4f4f4;
}
body{
height: 100%;
background-color: #f4f4f4;
font-family:"微软雅黑";
display: -webkit-flex;
flex-direction: column;
}
a{
text-decoration:none;
}
ul,ol{
list-style:none;
}
img{
border:0;
display: block;
}
header{
background: #fff9eb;
height: 0.4rem;
font-size: 12px;
padding-left: .1rem;
display: flex;
align-items: center;
border-bottom: 1px solid #ffd6a0;
}
header h3{
font-weight: normal;
}
header h3 span{
color: #ff695a;
}
/* main--------------------------*/
.main{
display: flex;
flex:1;
overflow: auto;
margin-top: .1rem;
background: #ffffff;
}
.main_shop{
width: 100%;
flex-direction: column;
}
.shop_list{
width: 100%;
height: 1.3rem;
border-bottom:1px solid #dddddd;
display: flex;
justify-content: space-between;
align-items: center;
}
.checked{
width: 10%;
height: 100%;
}
.checked div{
width: 0.17rem;
height: 0.17rem;
border:1px solid #cdcdcd;
border-radius: 50%;
margin-top: .43rem;
margin-left: .1rem;
font-size: 12px;
color: white;
text-align: center;
line-height: .17rem;
}
.content{
flex: 1;
height: 100%;
}
.content_top{
width:100%;
height: 1rem;
display: flex;
}
.img , img{
width: .75rem;
height: 100%;
}
.text{
flex: 1;
height: 100%;
font-size: 12px;
padding-right:.16rem;
padding-left: .15rem;
}
.tit{
display: flex;
align-items: center;
justify-content: space-between;










