diff --git a/css/common.css b/css/common.css index ea07635..a2edabb 100644 --- a/css/common.css +++ b/css/common.css @@ -83,7 +83,29 @@ button,input,select,textarea { .font44{ font-size: .44rem;} .font46{ font-size: .46rem;} .font48{ font-size: .48rem;} +.font50{ font-size: .50rem;} .font60{ font-size: .60rem;} +.font70{ font-size: .70rem;} +.font80{ font-size: .80rem;} +.font90{ font-size: .90rem;} +.font100{ font-size: 1.0rem;} +.font110{ font-size: 1.1rem;} + +/* 文字颜色 */ +.color-ff{ color: #ffffff;} +.color-af{ color: #afafaf;} +.color-99{ color: #999999;} +.color-ae{ color: #aeaeae;} +.color-86{ color: #868686;} +.color-66{ color: #666666;} +.color-00{ color: #000000;} +.color-f35{ color: #f35b00;} + +/* 背景颜色 */ +.background-00{ background-color: #000000;} +.background-ff{ background-color: #ffffff;} +.background-f35{ background-color: #f35b00;} +.background-ae{ background-color: #aeaeae;} /* 文字行数 */ .clips1{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} diff --git a/css/style.css b/css/style.css index d1f96c5..9b6a0ad 100644 --- a/css/style.css +++ b/css/style.css @@ -3,8 +3,6 @@ align-items: center; width: 7.5rem; height: .94rem; - background-color: #000000; - color: #ffffff; position: fixed; left: 50%; top: 0; @@ -30,12 +28,11 @@ } /* 尾部 */ -.footer{ +.footer { width: 7.5rem; height: .96rem; - box-shadow: 0 0 .4rem rgba(243,91,0,.4); + box-shadow: 0 0 .4rem rgba(243, 91, 0, .4); padding: 0 .2rem; - background-color: #ffffff; overflow-x: hidden; position: fixed; left: 50%; @@ -43,38 +40,44 @@ z-index: 99; transform: translateX(-50%); } -.foot{ + +.foot { justify-content: space-between; align-items: center; width: 100%; height: .96rem; } -.foot>.item{ +.foot>.item { flex-wrap: wrap; justify-content: center; width: 25%; } -.foot>.item img{ + +.foot>.item img { height: .34rem; margin-top: .06rem; } -.foot>.item img:nth-of-type(2){ + +.foot>.item img:nth-of-type(2) { display: none; } -.foot>.item span{ + +.foot>.item span { width: 100%; text-align: center; margin-top: .06rem; } -.foot>.item.active img:nth-of-type(1){ +.foot>.item.active img:nth-of-type(1) { display: none; } -.foot>.item.active img:nth-of-type(2){ + +.foot>.item.active img:nth-of-type(2) { display: block; } -.foot>.item.active span{ + +.foot>.item.active span { color: #f35b00; } @@ -110,9 +113,11 @@ padding: .48rem .36rem; background-color: #ffffff; } -.activity{ + +.activity { justify-content: space-between; } + .activity .envelopes { width: 2.8rem; height: 3.66rem; @@ -129,7 +134,7 @@ color: #ffebac; } -.activity .envelopes>a { +.activity .envelopes>p { justify-content: center; align-items: center; width: calc(100% - .52rem); @@ -161,7 +166,7 @@ } /* 商家推荐 */ -.recommend-title{ +.recommend-title { justify-content: center; align-items: center; width: 3.2rem; @@ -169,7 +174,6 @@ background-color: #ff353f; border: .1rem solid #ffde77; border-radius: .44rem; - color: #ffffff; text-indent: .04rem; letter-spacing: .04rem; position: absolute; @@ -177,29 +181,131 @@ top: -0.49rem; transform: translateX(-50%); } -.recommend .item{ + +.recommend .item { width: calc(33.33% - .16rem); margin: .25rem .24rem 0 0; } -.recommend .item:nth-of-type(3n){ + +.recommend .item:nth-of-type(3n) { margin-right: 0; } -.recommend .item>.img{ + +.recommend .item>.img { width: 100%; height: 1.9rem; overflow: hidden; } -.recommend .item>.img img{ + +.recommend .item>.img img { width: 100%; min-height: 1.9rem; } -.recommend .item>.txt{ + +.recommend .item>.txt { margin: .2rem 0 .1rem; text-align: center; } +/* 抽奖 */ +.luck-draw{ + width: 100%; + min-height: calc(100vh - 1.92rem); + background-image: url(../images/luck-draw-bg.jpg); + background-size: cover; +} + +.turntable-title{ + width: 5.25rem; + height: 2.17rem; + padding: .5rem 0 .45rem; + margin: 0 auto; +} +.turntable-title>img{ + width: 100%; +} + +.turntable-bg{ + width: 6.73rem; + height: 7.69rem; + margin: 0 auto; + position: relative; +} + +.lamp{ + width: 5.6rem; + height: 5.6rem; + position: absolute; + left: 50%; + top: .59rem; + z-index: 1; + transform: translateX(-50%); + animation: lamp-opacity .3s linear alternate infinite; +} + +@keyframes lamp-opacity { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +.turntable{ + width: 4.4rem; + height: 4.4rem; + position: absolute; + left: 50%; + top: 1.2rem; + margin-left: -2.2rem; + z-index: 9; + transition: all 3s; +} + +.pointer{ + width: 1.92rem; + height: 2.06rem; + position: absolute; + left: 50%; + top: 2.34rem; + transform: translateX(-50%); + z-index: 99; +} + +.turntable-bg img{ + width: 100%; +} + +/* 结果提示 */ +.result-tips{ + display: none; + width: 5.4rem; + padding: .5rem; + position: fixed; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + z-index: 999; +} +.result-tips.show{ + display: block; +} +.tips-msg{ + text-align: center; + padding: .46rem 0; +} +.tips-btn{ + justify-content: center; + align-items: center; + width: 3.64rem; + height: .98rem; + margin: .1rem auto 0; +} + /* 商户展示 */ -.search{ +.search { justify-content: space-between; align-items: center; width: calc(100% - .5rem); @@ -209,137 +315,260 @@ border: .02rem solid #868686; } -.search-input{ +.search-input { width: calc(100% - .6rem); line-height: .8rem; } + .search-input::-webkit-input-placeholder { color: #868686; } -.search img{ + +.search img { width: .4rem; height: .4rem; } /* 商户列表 */ -.business-list{ +.business-list { padding: 0 .25rem .3rem; } -.business-list .item{ + +.business-list .item { justify-content: space-between; border: .04rem solid #ffb285; padding: .18rem; margin-top: .3rem; } -.business-list .item .img{ + +.business-list .item .img { width: 1.9rem; height: 1.9rem; overflow: hidden; } -.business-list .item .img img{ + +.business-list .item .img img { width: 100%; min-height: 1.9rem; } -.business-list .item .txt{ +.business-list .item .txt { width: calc(100% - 2.15rem); } -.business-list .item .txt>a{ + +.business-list .item .txt>a { display: block; height: 1.4rem; } -.business-list .item .txt p{ - color: #868686; +.business-list .item .txt p { margin-top: .1rem; } -.navigation-btn{ +.navigation-btn { justify-content: center; align-items: center; width: 1.9rem; height: .5rem; - background-color: #f35b00; - color: #ffffff; } /* 我的 */ -.my-info-bg{ +.my-info-bg { align-items: center; width: 100%; height: 3.85rem; background-image: url(../images/my-bg.jpg); background-size: 100%; } -.my-info{ + +.my-info { width: 100%; - color: #ffffff; text-align: center; } -.my-info .cover{ + +.my-info .cover { justify-content: center; align-items: center; width: 1.9rem; height: 1.9rem; - background-color: #ffffff; margin: 0 auto; + overflow: hidden; } -.my-info .cover img{ + +.my-info .cover img { max-width: 100%; + max-height: 100%; } -.my-info .nick-name{ + +.my-info .nick-name { margin: .12rem 0; } /* 内容 */ -.my-content{ +.my-content { padding: 0 .5rem .3rem; margin-top: .12rem; } -.my-content .item{ + +.my-content .item { justify-content: space-between; align-items: center; width: 100%; height: .92rem; border-bottom: .02rem solid #d6d6d6; } -.my-content .item>span{ + +.my-content .item>span { justify-content: center; width: .6rem; } -.my-content .item>p{ + +.my-content .item>p { width: calc(100% - .74rem); } -.my-content .item>img{ + +.my-content .item>img { width: .14rem; } /* 绑定手机号 */ -.bind-content{ +.bind-content { padding: 0 .4rem; } -.bind-phone-title{ + +.bind-phone-title { margin: .7rem 0; text-align: center; } -.bind-content .sub-title{ - color: #868686; -} -.phone-input{ + +.phone-input { width: 100%; height: .76rem; border-bottom: .02rem solid #d6d6d6; } + .phone-input::-webkit-input-placeholder { color: #000000; } -.bind-btn{ + +.bind-btn { justify-content: center; align-items: center; width: 5.6rem; height: .96rem; - background-color: #f35b00; - color: #ffffff; margin: .7rem auto 0; -} \ No newline at end of file +} + +/* 待使用/已核销卡券 */ +.card-list { + padding: 0 .2rem .3rem; + margin-top: .15rem; +} + +.card-list .item { + justify-content: space-between; + align-items: center; + width: 100%; + padding: .3rem .35rem .3rem .25rem; + margin-top: .35rem; + box-shadow: 0 0 .16rem rgba(243, 91, 0, .17); +} + +.card-list .item>.info { + width: calc(100% - 1.12rem); +} + +.card-list .item>.info .price { + margin-right: .3rem; +} + +.card-list .item>.info .price span { + display: inline-block; + width: .4rem; + height: .4rem; + text-align: center; + line-height: .4rem; +} + +.card-list .item>.info .txt>span { + display: block; +} + +.card-list .item>.info .txt>p { + margin-top: .1rem; +} + +.card-list .item>.info .used-txt>span { + line-height: 1.2; +} + +.card-list .item>.info .used-txt>p { + margin-top: .03rem; +} + +.card-list .item>.line { + width: .02rem; + height: 1.64rem; + margin-right: .3rem; + background-color: #dedede; +} + +.card-btn { + justify-content: center; + align-items: center; + width: .8rem; + height: 1.64rem; + padding: 0 .25rem; + text-align: center; +} + +/* 核销 */ +.pull-bg { + display: none; + width: 7.5rem; + height: 100%; + background-color: rgba(0, 0, 0, .3); + position: fixed; + left: 50%; + top: 0; + z-index: 666; + transform: translateX(-50%); +} +.pull-bg.show{ + display: block; +} + +.card-window { + display: none; + width: 6.5rem; + padding: .48rem .48rem .6rem; + position: fixed; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + z-index: 999; +} + +.card-window.show{ + display: block; +} + +.window-title { + text-align: center; +} + +.card-code { + width: 2.8rem; + margin: .48rem auto; +} + +.card-code>img { + width: 100%; +} + +.code-btn{ + justify-content: center; + align-items: center; + height: .98rem; +} diff --git a/images/code.png b/images/code.png new file mode 100644 index 0000000..d9ccdce Binary files /dev/null and b/images/code.png differ diff --git a/images/lamp.png b/images/lamp.png new file mode 100644 index 0000000..64cee7a Binary files /dev/null and b/images/lamp.png differ diff --git a/images/logo.png b/images/logo.png index 102f4f0..f5aae25 100644 Binary files a/images/logo.png and b/images/logo.png differ diff --git a/images/luck-draw-bg.jpg b/images/luck-draw-bg.jpg new file mode 100644 index 0000000..a56c484 Binary files /dev/null and b/images/luck-draw-bg.jpg differ diff --git a/images/pointer.png b/images/pointer.png new file mode 100644 index 0000000..41276f8 Binary files /dev/null and b/images/pointer.png differ diff --git a/images/turntable-bg.png b/images/turntable-bg.png new file mode 100644 index 0000000..ca23d76 Binary files /dev/null and b/images/turntable-bg.png differ diff --git a/images/turntable-title.png b/images/turntable-title.png new file mode 100644 index 0000000..68b171b Binary files /dev/null and b/images/turntable-title.png differ diff --git a/images/turntable.png b/images/turntable.png new file mode 100644 index 0000000..13df7ee Binary files /dev/null and b/images/turntable.png differ diff --git a/js/script.js b/js/script.js index e69de29..e533b46 100644 --- a/js/script.js +++ b/js/script.js @@ -0,0 +1,71 @@ +jQuery(function($){ + // 轮播 + if($('.banner-swiper').length){ + var bannerSwiper = new Swiper('.banner-swiper', { + loop:true,//开启循环播放 + autoplay: {//开启自动播放 + delay:3000, + disableOnInteraction: false,//触摸后不会停止自动滚动 + pauseOnMouseEnter: true,//鼠标置于swiper时暂停自动切换,鼠标离开时恢复自动切换。 + } + }) + } + + // 抽奖 + var turntableFlag = true; + if($('.pointer').length){ + // 开始抽奖 + $('.pointer').click(function(){ + if(turntableFlag){ + turntableFlag = false; + var ran = Math.ceil(Math.random()*100); //外层100以内的随机整数 + if(ran<=55){ //通过概率判断选取数字 + var needNum= 360*4-120; //选取需求数字 + }else if(55 - - -
+
@@ -30,11 +28,11 @@
手机号绑定
-
手机号
+
手机号
-
立即绑定
+
立即绑定
\ No newline at end of file diff --git a/user/business.html b/user/business.html index 653568f..ffb04d2 100644 --- a/user/business.html +++ b/user/business.html @@ -10,16 +10,14 @@ - - - -