To check if your sessionStorage contains coupon or not, you need to READ value from it by(要检查sessionStorage是否包含优惠券,您需要从中读取值)
sessionStorage.getItem('flat');
to save value use(节省价值)
sessionStorage.setItem('flat', coupons.innerText )
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…