From fc6434fdd0e7661a81a6ad7f22cc54c2cf9690d9 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Wed, 26 Sep 2018 17:24:14 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=96=B0=E5=A2=9Emip-gzpd-alert=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mip-gzpd-alert业务组件 --- mip-gzpd-alert/README.md | 57 +++++++++++++ mip-gzpd-alert/mip-gzpd-alert.js | 127 +++++++++++++++++++++++++++++ mip-gzpd-alert/mip-gzpd-alert.less | 59 ++++++++++++++ mip-gzpd-alert/package.json | 8 ++ 4 files changed, 251 insertions(+) create mode 100644 mip-gzpd-alert/README.md create mode 100644 mip-gzpd-alert/mip-gzpd-alert.js create mode 100644 mip-gzpd-alert/mip-gzpd-alert.less create mode 100644 mip-gzpd-alert/package.json diff --git a/mip-gzpd-alert/README.md b/mip-gzpd-alert/README.md new file mode 100644 index 000000000..edf712bc0 --- /dev/null +++ b/mip-gzpd-alert/README.md @@ -0,0 +1,57 @@ +# mip-gzpd-alert + +提示组件 + +标题|内容 +----|---- +类型|业务 +支持布局|N/S +所需脚本|https://mipcache.bdstatic.com/static/v1/mip-gzpd-alert/mip-gzpd-alert.js + +## 示例 + +### 基本使用 + +```html + + + + +
+

文章标题

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+

bala bala bala... bala bala bala... bala bala bala...

+
+
+``` diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js new file mode 100644 index 000000000..ec7a88157 --- /dev/null +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -0,0 +1,127 @@ +define(function(require) { + var $ = require('zepto'); + var util = require('util'); + var CustomStorage = util.customStorage; + var storage = new CustomStorage(0); + var customElem = require('customElement').create(); + var alt = JSON.parse($('#mip-gzpd-alert-data').html()); + + var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?id='+alt.id+'&rd=' + encodeURI(window.location.href.split('?')[0]); + var zhezhao = "
" + + "
" + + '
' + + "
"+alt.alert.title+"
" + + "
"+alt.alert.art+"
" + + "
" + + "

"+alt.alert.detail[0]+"

"+alt.alert.detail[1]+"
" + + "
"+alt.alert.btn+"
" + + "
联系客服
" + + "
"; + var payAlert = '
' + + '
' + + '
'+alt.alertWx.title+'
' + + '
' + + '
' + + '
' + + '
' + + '
'+alt.alertWx.detail[0]+''+alt.alertWx.detail[1]+'
' + + '
' + + '
' + + '
' + + '
' + + ' ' + + ' '+alt.alertOk.title+'' + + ' '+alt.alertOk.detail[0]+'' + + ' ' + + '
' + + '
' + + '
' + + '
'; + var copySuccess = '
' + + '' + + ''+alt.alertCopy.title+'
'; + var customerService = '
' + + '
' + + '
' + + '
' + + '

客服微信号: '+alt.kefu+'

' + + ' 复制微信号' + + ' 打开微信' + + '
' + + '
' + + ' 付费成功后,若无法使用请联系客服' + + ' 在线时间:周一至周五' + + ' 8:30~12:30 14:00~18:00' + + ' ' + + '
' + + '
' + + '
'; + + var hashCode = function(s) { + var h = 0, l = s.length, i = 0; + if ( l > 0 ) + while (i < l) + h = (h << 5) - h + s.charCodeAt(i++) | 0; + return h; + } + var cookieKey = hashCode(window.location.pathname.substr(window.location.pathname.lastIndexOf('/') + 1)).toString(); + var buyInterval,copyTimeout; + + // build 方法,元素插入到文档时执行,仅会执行一次 + customElem.prototype.build = function () { + $('.content').append(zhezhao + payAlert + copySuccess + customerService); + document.addEventListener('copy', function(e){ + if(!storage.get(cookieKey)){ + if($('.mip-gzpd-alert-marks').css('display') !== 'block'){ + e.clipboardData.setData('text/plain', ''); + e.preventDefault(); + } + $('.mip-gzpd-alert-marks').css('display', 'block'); + }else{ + window.clearTimeout(copyTimeout); + $('.mip-gzpd-alert-success').css('display', 'block'); + copyTimeout = window.setTimeout(function(){ + $('.mip-gzpd-alert-success').css('display', 'none'); + }, 1000); + } + }); + if(window.location.href.indexOf('order=') > -1){ + $('.mip-gzpd-alert-marks-wxpay').css('display', 'block'); + $('.payqr_box').css('display', 'block'); + $('.payqr_success_box').css('display', 'none'); + buyInterval = window.setInterval(function(){ + $.getJSON("//my.yjbys.com/company/wxpay/trade_copy.php"+window.location.search,function(data){ + if(data.state === "OK"){ + $('.claos').css('display', 'none'); + $('.payqr_box').css('display', 'none'); + $('.payqr_success_box').css('display', 'block'); + $('.wx_top span').text('支付成功'); + storage.set(cookieKey, 1, 7*86400*1000); + window.clearInterval(buyInterval); + } + }); + },1500); + } + + document.getElementsByClassName("copy-txt-btn")[0].addEventListener("click", function() { + var copyText = document.querySelector("#kefu-name-input"); + copyText.select(); + document.execCommand("copy"); + }) + + $(document).on('click', '.mip-gzpd-alert-cservice-marks .claos', function(){ + $('.mip-gzpd-alert-cservice-marks').css('display', 'none'); + }); + $(document).on('click', '.mip-gzpd-alert-marks .claos', function(){ + $('.mip-gzpd-alert-marks').css('display', 'none'); + }); + $(document).on('click', '.mip-gzpd-alert-marks .paybox-cservice', function(){ + $('.mip-gzpd-alert-cservice-marks').css('display', 'block'); + }); + $(document).on('click', '.payqr_success_text .btn', function(){ + window.location.href = window.location.href.split('?')[0]; + }); + }; + + return customElem; +}); diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less new file mode 100644 index 000000000..6bec3de52 --- /dev/null +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -0,0 +1,59 @@ + +div.mip-gzpd-alert-marks .claos,div.mip-gzpd-alert-cservice-marks .claos + {position: absolute;right: -10px;background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px;width: 30px;height: 30px;text-indent: -9999px;top: -10px;cursor: pointer;} +div.mip-gzpd-alert-marks .claos:hover,div.mip-gzpd-alert-cservice-marks .claos:hover + {background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px;} + +div.mip-gzpd-alert-marks{float: left;z-index: 10;width: 100%;height: 100%;display: none;position: fixed;top: 0;background: rgba(19, 19, 19, 0.6);} +div.mip-gzpd-alert-marks .paybox {text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;} +div.mip-gzpd-alert-marks .paybox-title{color: #44b549;font-size: 30px;display: inline-block;font-weight: 700;line-height: 40px;height: 40px;width: 100%;} +div.mip-gzpd-alert-marks .paybox-img{width: 100px;display: inline-block;margin: 10% 0 0;} +div.mip-gzpd-alert-marks .paybox-img img{width: 100%} +div.mip-gzpd-alert-marks .paybox-money{height: 60px;line-height: 60px;} +div.mip-gzpd-alert-marks .paybox-money h2{color: #ff6600;font-size: 16px;display: inline-block;font-weight: 700;} +div.mip-gzpd-alert-marks .paybox-money span{text-decoration: line-through;color: #949494;margin-left: 10px;font-size: 14px;} +div.mip-gzpd-alert-marks .paybox-bottom{cursor: pointer;background: #44b549;height: 45px;line-height: 45px;border-radius: 6px;margin: 6px auto;width:230px;} +div.mip-gzpd-alert-marks .paybox-bottom-a{font-size: 18px;color: #fff;font-weight: 700;} +div.mip-gzpd-alert-marks .paybox-art{color: #a0a0a0;font-size: 18px;line-height: 50px;height: 50px;float: left;width: 100%;} +div.mip-gzpd-alert-marks .paybox-cservice{font-size: 14px;margin-top: 10px;cursor: pointer;color: #a2a2a2;} + +div.mip-gzpd-alert-marks-wxpay{display: none;float: left;z-index: 10;width: 100%;height: 100%;position: fixed;top: 0;background: rgba(19,19,19,0.6);} +div.mip-gzpd-alert-marks-wxpay .block_ad_qr {display: inline-block;margin: 30px 50px;font-size: 19px;color: red;} +div.mip-gzpd-alert-marks-wxpay .payqr_success_text .text {display: block;font-size: 30px;color: #44b549;} +div.mip-gzpd-alert-marks-wxpay .payqr_success_text .icon {padding-top: 30px;fill: #44b549;width: 80px;display: inline-block;margin-bottom: 10px;} +div.mip-gzpd-alert-marks-wxpay .payqr_success_box {display: none;} +div.mip-gzpd-alert-marks-wxpay .payqr_success_box button.btn {font-weight: 700;background: #38ad3a;border: none;width: 230px;height: 46px;font-size: 18px;color: #fff;border-radius: 6px;margin-top: 25px;cursor: pointer;} +div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text {display: block;font-size: 30px;color: #44b549;margin-bottom: 6px;} +div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text.small {color: #999;font-size: 16px;} + +div.mip-gzpd-alert-marks-wxpay .my_wxpay {width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.6);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} +div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm{display: block;margin-top: 8px;font-size: 18px;color: #6d6d6d;} +div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm span{color: #FF7800;padding: 6px 11px;font-weight: 700;} +div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos{position: absolute;right: -10px;background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px;width: 30px;height: 30px;text-indent: -9999px;top: -10px;cursor: pointer;} +div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos:hover{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px;} +div.mip-gzpd-alert-marks-wxpay .wx_pic_img {text-align: center;background: #fff;z-index: 10;border-radius: 6px;width: 75%;margin: auto;margin-top: 40%;height: 360px;} +div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont{color: #FFFFFF;font-size: 16px;line-height: 28px;background: #38ad3a;width: 171px;margin: auto;} +div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont span{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.png) no-repeat 0px center;padding-left: 28px;} +div.mip-gzpd-alert-marks-wxpay .cg{width: 300px;margin: auto;height: 250px;display:none;} +div.mip-gzpd-alert-marks-wxpay .cg img{width: 176px;margin-top: 50px;} +div.mip-gzpd-alert-marks-wxpay .wx_top{background: #38AD3A;height: 60px;border-radius: 6px 6px 0 0;color: #fff;font-size: 24px;line-height: 60px;} +div.mip-gzpd-alert-marks-wxpay .zhifu{width: 100%;} +div.mip-gzpd-alert-marks-wxpay .zhifu img{width: 170px; height: 170px;} +div.mip-gzpd-alert-marks-wxpay .hc{margin-top: 10px;} +div.mip-gzpd-alert-marks-wxpay .hc img{width: 200px;} + +div.mip-gzpd-alert-success{display: none;} +div.mip-gzpd-alert-success .icon{width: 1.8em;height: 2.5em;vertical-align: middle;fill: #00ba9b;overflow: hidden;margin-right: 6px;} +div.mip-gzpd-alert-success {border: 1px solid #d3d4d3;padding: 4px;margin: auto;width: 33%;text-align: center;color: #333;font-size: 16px;background: #fff;} +div.mip-gzpd-alert-bounceIn{animation-name: mip-gzpd-alert-bounceIn;animation-duration: .3s;} + +div.mip-gzpd-alert-cservice-marks{width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.2);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} +div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} +div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} +div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;} +div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} +div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} +div.mip-gzpd-alert-cservice-marks .phone-art{text-align: center;display: inline-block;font-size: 16px;line-height: 30px;margin-top: 40px;} +div.mip-gzpd-alert-cservice-marks .phone-art span{display: block;margin-top: 3px;color: #666;} + +@-webkit-keyframes mip-gzpd-alert-bounceIn { 0% {opacity: 0;transform: scale(.5)} 100% {opacity: 1;transform: scale(1)} } diff --git a/mip-gzpd-alert/package.json b/mip-gzpd-alert/package.json new file mode 100644 index 000000000..77993c2a4 --- /dev/null +++ b/mip-gzpd-alert/package.json @@ -0,0 +1,8 @@ +{ + "name": "mip-gzpd-alert", + "version": "1.0.0", + "description": "提示功能", + "engines": { + "mip": ">=1.1.0" + } +} From d6409eb0c67e98a8e83203828fc560fc8d1a9ef2 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Wed, 26 Sep 2018 18:53:24 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E7=BB=84=E4=BB=B6bug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 轻微错误修正; 兼容性问题修正; --- mip-gzpd-alert/mip-gzpd-alert.js | 5 ++--- mip-gzpd-alert/mip-gzpd-alert.less | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js index ec7a88157..7d796b215 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -45,14 +45,13 @@ define(function(require) { '
' + '
' + '

客服微信号: '+alt.kefu+'

' + - ' 复制微信号' + - ' 打开微信' + + ' 打开微信' + '
' + '
' + ' 付费成功后,若无法使用请联系客服' + ' 在线时间:周一至周五' + ' 8:30~12:30 14:00~18:00' + - ' ' + + ' ' + '
' + '' + ''; diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index 6bec3de52..5c522a972 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -52,6 +52,7 @@ div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;} div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} +div.mip-gzpd-alert-cservice-marks .copy-txt-btn a{color: #fff;font-size: 16px;} div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} div.mip-gzpd-alert-cservice-marks .phone-art{text-align: center;display: inline-block;font-size: 16px;line-height: 30px;margin-top: 40px;} div.mip-gzpd-alert-cservice-marks .phone-art span{display: block;margin-top: 3px;color: #666;} From 6ee250b52914a236cd28a36e29a9d3ed91153177 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Wed, 26 Sep 2018 18:57:48 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mip-gzpd-alert/mip-gzpd-alert.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js index 7d796b215..46d184add 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -102,12 +102,6 @@ define(function(require) { },1500); } - document.getElementsByClassName("copy-txt-btn")[0].addEventListener("click", function() { - var copyText = document.querySelector("#kefu-name-input"); - copyText.select(); - document.execCommand("copy"); - }) - $(document).on('click', '.mip-gzpd-alert-cservice-marks .claos', function(){ $('.mip-gzpd-alert-cservice-marks').css('display', 'none'); }); From ca96551cb5b2f90e2d36abc93b36598727b9e275 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Wed, 26 Sep 2018 18:59:41 +0800 Subject: [PATCH 04/11] =?UTF-8?q?Revert=20"=E7=BB=84=E4=BB=B6bug=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d6409eb0c67e98a8e83203828fc560fc8d1a9ef2. --- mip-gzpd-alert/mip-gzpd-alert.js | 5 +++-- mip-gzpd-alert/mip-gzpd-alert.less | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js index 46d184add..3e6722925 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -45,13 +45,14 @@ define(function(require) { '
' + '
' + '

客服微信号: '+alt.kefu+'

' + - ' 打开微信' + + ' 复制微信号' + + ' 打开微信' + '
' + '
' + ' 付费成功后,若无法使用请联系客服' + ' 在线时间:周一至周五' + ' 8:30~12:30 14:00~18:00' + - ' ' + + ' ' + '
' + '' + ''; diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index 5c522a972..6bec3de52 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -52,7 +52,6 @@ div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;} div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} -div.mip-gzpd-alert-cservice-marks .copy-txt-btn a{color: #fff;font-size: 16px;} div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} div.mip-gzpd-alert-cservice-marks .phone-art{text-align: center;display: inline-block;font-size: 16px;line-height: 30px;margin-top: 40px;} div.mip-gzpd-alert-cservice-marks .phone-art span{display: block;margin-top: 3px;color: #666;} From e518cb68a3542272c51152419853b27e7b925500 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Wed, 26 Sep 2018 19:00:27 +0800 Subject: [PATCH 05/11] =?UTF-8?q?Revert=20"Revert=20"=E7=BB=84=E4=BB=B6bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ca96551cb5b2f90e2d36abc93b36598727b9e275. --- mip-gzpd-alert/mip-gzpd-alert.js | 5 ++--- mip-gzpd-alert/mip-gzpd-alert.less | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js index 3e6722925..46d184add 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -45,14 +45,13 @@ define(function(require) { '
' + '
' + '

客服微信号: '+alt.kefu+'

' + - ' 复制微信号' + - ' 打开微信' + + ' 打开微信' + '
' + '
' + ' 付费成功后,若无法使用请联系客服' + ' 在线时间:周一至周五' + ' 8:30~12:30 14:00~18:00' + - ' ' + + ' ' + '
' + '' + ''; diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index 6bec3de52..5c522a972 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -52,6 +52,7 @@ div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;} div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} +div.mip-gzpd-alert-cservice-marks .copy-txt-btn a{color: #fff;font-size: 16px;} div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} div.mip-gzpd-alert-cservice-marks .phone-art{text-align: center;display: inline-block;font-size: 16px;line-height: 30px;margin-top: 40px;} div.mip-gzpd-alert-cservice-marks .phone-art span{display: block;margin-top: 3px;color: #666;} From 9f27bb19ff4a41b8f4f3c8d4ecb75dabbe472e34 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Wed, 26 Sep 2018 19:08:45 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mip-gzpd-alert/mip-gzpd-alert.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index 5c522a972..2f4c30f89 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -50,7 +50,7 @@ div.mip-gzpd-alert-bounceIn{animation-name: mip-gzpd-alert-bounceIn;animation-du div.mip-gzpd-alert-cservice-marks{width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.2);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} -div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;} +div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;font-weight: 700;} div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} div.mip-gzpd-alert-cservice-marks .copy-txt-btn a{color: #fff;font-size: 16px;} div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} From c1ecc02ae5e66a4490b7bb473e910cefd0adbff1 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Thu, 27 Sep 2018 10:38:25 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mip-gzpd-alert/mip-gzpd-alert.less | 115 +++++++++++++++-------------- mip-gzpd-alert/package.json | 16 ++-- 2 files changed, 69 insertions(+), 62 deletions(-) diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index 2f4c30f89..a5681d525 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -1,60 +1,63 @@ +mip-gzpd-alert { + div.mip-gzpd-alert-marks .claos,div.mip-gzpd-alert-cservice-marks .claos -div.mip-gzpd-alert-marks .claos,div.mip-gzpd-alert-cservice-marks .claos {position: absolute;right: -10px;background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px;width: 30px;height: 30px;text-indent: -9999px;top: -10px;cursor: pointer;} -div.mip-gzpd-alert-marks .claos:hover,div.mip-gzpd-alert-cservice-marks .claos:hover + div.mip-gzpd-alert-marks .claos:hover,div.mip-gzpd-alert-cservice-marks .claos:hover {background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px;} -div.mip-gzpd-alert-marks{float: left;z-index: 10;width: 100%;height: 100%;display: none;position: fixed;top: 0;background: rgba(19, 19, 19, 0.6);} -div.mip-gzpd-alert-marks .paybox {text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;} -div.mip-gzpd-alert-marks .paybox-title{color: #44b549;font-size: 30px;display: inline-block;font-weight: 700;line-height: 40px;height: 40px;width: 100%;} -div.mip-gzpd-alert-marks .paybox-img{width: 100px;display: inline-block;margin: 10% 0 0;} -div.mip-gzpd-alert-marks .paybox-img img{width: 100%} -div.mip-gzpd-alert-marks .paybox-money{height: 60px;line-height: 60px;} -div.mip-gzpd-alert-marks .paybox-money h2{color: #ff6600;font-size: 16px;display: inline-block;font-weight: 700;} -div.mip-gzpd-alert-marks .paybox-money span{text-decoration: line-through;color: #949494;margin-left: 10px;font-size: 14px;} -div.mip-gzpd-alert-marks .paybox-bottom{cursor: pointer;background: #44b549;height: 45px;line-height: 45px;border-radius: 6px;margin: 6px auto;width:230px;} -div.mip-gzpd-alert-marks .paybox-bottom-a{font-size: 18px;color: #fff;font-weight: 700;} -div.mip-gzpd-alert-marks .paybox-art{color: #a0a0a0;font-size: 18px;line-height: 50px;height: 50px;float: left;width: 100%;} -div.mip-gzpd-alert-marks .paybox-cservice{font-size: 14px;margin-top: 10px;cursor: pointer;color: #a2a2a2;} - -div.mip-gzpd-alert-marks-wxpay{display: none;float: left;z-index: 10;width: 100%;height: 100%;position: fixed;top: 0;background: rgba(19,19,19,0.6);} -div.mip-gzpd-alert-marks-wxpay .block_ad_qr {display: inline-block;margin: 30px 50px;font-size: 19px;color: red;} -div.mip-gzpd-alert-marks-wxpay .payqr_success_text .text {display: block;font-size: 30px;color: #44b549;} -div.mip-gzpd-alert-marks-wxpay .payqr_success_text .icon {padding-top: 30px;fill: #44b549;width: 80px;display: inline-block;margin-bottom: 10px;} -div.mip-gzpd-alert-marks-wxpay .payqr_success_box {display: none;} -div.mip-gzpd-alert-marks-wxpay .payqr_success_box button.btn {font-weight: 700;background: #38ad3a;border: none;width: 230px;height: 46px;font-size: 18px;color: #fff;border-radius: 6px;margin-top: 25px;cursor: pointer;} -div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text {display: block;font-size: 30px;color: #44b549;margin-bottom: 6px;} -div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text.small {color: #999;font-size: 16px;} - -div.mip-gzpd-alert-marks-wxpay .my_wxpay {width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.6);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} -div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm{display: block;margin-top: 8px;font-size: 18px;color: #6d6d6d;} -div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm span{color: #FF7800;padding: 6px 11px;font-weight: 700;} -div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos{position: absolute;right: -10px;background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px;width: 30px;height: 30px;text-indent: -9999px;top: -10px;cursor: pointer;} -div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos:hover{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px;} -div.mip-gzpd-alert-marks-wxpay .wx_pic_img {text-align: center;background: #fff;z-index: 10;border-radius: 6px;width: 75%;margin: auto;margin-top: 40%;height: 360px;} -div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont{color: #FFFFFF;font-size: 16px;line-height: 28px;background: #38ad3a;width: 171px;margin: auto;} -div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont span{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.png) no-repeat 0px center;padding-left: 28px;} -div.mip-gzpd-alert-marks-wxpay .cg{width: 300px;margin: auto;height: 250px;display:none;} -div.mip-gzpd-alert-marks-wxpay .cg img{width: 176px;margin-top: 50px;} -div.mip-gzpd-alert-marks-wxpay .wx_top{background: #38AD3A;height: 60px;border-radius: 6px 6px 0 0;color: #fff;font-size: 24px;line-height: 60px;} -div.mip-gzpd-alert-marks-wxpay .zhifu{width: 100%;} -div.mip-gzpd-alert-marks-wxpay .zhifu img{width: 170px; height: 170px;} -div.mip-gzpd-alert-marks-wxpay .hc{margin-top: 10px;} -div.mip-gzpd-alert-marks-wxpay .hc img{width: 200px;} - -div.mip-gzpd-alert-success{display: none;} -div.mip-gzpd-alert-success .icon{width: 1.8em;height: 2.5em;vertical-align: middle;fill: #00ba9b;overflow: hidden;margin-right: 6px;} -div.mip-gzpd-alert-success {border: 1px solid #d3d4d3;padding: 4px;margin: auto;width: 33%;text-align: center;color: #333;font-size: 16px;background: #fff;} -div.mip-gzpd-alert-bounceIn{animation-name: mip-gzpd-alert-bounceIn;animation-duration: .3s;} - -div.mip-gzpd-alert-cservice-marks{width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.2);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} -div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} -div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} -div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;font-weight: 700;} -div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} -div.mip-gzpd-alert-cservice-marks .copy-txt-btn a{color: #fff;font-size: 16px;} -div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} -div.mip-gzpd-alert-cservice-marks .phone-art{text-align: center;display: inline-block;font-size: 16px;line-height: 30px;margin-top: 40px;} -div.mip-gzpd-alert-cservice-marks .phone-art span{display: block;margin-top: 3px;color: #666;} - -@-webkit-keyframes mip-gzpd-alert-bounceIn { 0% {opacity: 0;transform: scale(.5)} 100% {opacity: 1;transform: scale(1)} } + div.mip-gzpd-alert-marks{float: left;z-index: 10;width: 100%;height: 100%;display: none;position: fixed;top: 0;background: rgba(19, 19, 19, 0.6);} + div.mip-gzpd-alert-marks .paybox {text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;} + div.mip-gzpd-alert-marks .paybox-title{color: #44b549;font-size: 30px;display: inline-block;font-weight: 700;line-height: 40px;height: 40px;width: 100%;} + div.mip-gzpd-alert-marks .paybox-img{width: 100px;display: inline-block;margin: 10% 0 0;} + div.mip-gzpd-alert-marks .paybox-img img{width: 100%} + div.mip-gzpd-alert-marks .paybox-money{height: 60px;line-height: 60px;} + div.mip-gzpd-alert-marks .paybox-money h2{color: #ff6600;font-size: 16px;display: inline-block;font-weight: 700;} + div.mip-gzpd-alert-marks .paybox-money span{text-decoration: line-through;color: #949494;margin-left: 10px;font-size: 14px;} + div.mip-gzpd-alert-marks .paybox-bottom{cursor: pointer;background: #44b549;height: 45px;line-height: 45px;border-radius: 6px;margin: 6px auto;width:230px;} + div.mip-gzpd-alert-marks .paybox-bottom-a{font-size: 18px;color: #fff;font-weight: 700;} + div.mip-gzpd-alert-marks .paybox-art{color: #a0a0a0;font-size: 18px;line-height: 50px;height: 50px;float: left;width: 100%;} + div.mip-gzpd-alert-marks .paybox-cservice{font-size: 14px;margin-top: 10px;cursor: pointer;color: #a2a2a2;} + + div.mip-gzpd-alert-marks-wxpay{display: none;float: left;z-index: 10;width: 100%;height: 100%;position: fixed;top: 0;background: rgba(19,19,19,0.6);} + div.mip-gzpd-alert-marks-wxpay .block_ad_qr {display: inline-block;margin: 30px 50px;font-size: 19px;color: red;} + div.mip-gzpd-alert-marks-wxpay .payqr_success_text .text {display: block;font-size: 30px;color: #44b549;} + div.mip-gzpd-alert-marks-wxpay .payqr_success_text .icon {padding-top: 30px;fill: #44b549;width: 80px;display: inline-block;margin-bottom: 10px;} + div.mip-gzpd-alert-marks-wxpay .payqr_success_box {display: none;} + div.mip-gzpd-alert-marks-wxpay .payqr_success_box button.btn {font-weight: 700;background: #38ad3a;border: none;width: 230px;height: 46px;font-size: 18px;color: #fff;border-radius: 6px;margin-top: 25px;cursor: pointer;} + div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text {display: block;font-size: 30px;color: #44b549;margin-bottom: 6px;} + div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text.small {color: #999;font-size: 16px;} + + div.mip-gzpd-alert-marks-wxpay .my_wxpay {width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.6);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} + div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm{display: block;margin-top: 8px;font-size: 18px;color: #6d6d6d;} + div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm span{color: #FF7800;padding: 6px 11px;font-weight: 700;} + div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos{position: absolute;right: -10px;background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px;width: 30px;height: 30px;text-indent: -9999px;top: -10px;cursor: pointer;} + div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos:hover{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px;} + div.mip-gzpd-alert-marks-wxpay .wx_pic_img {text-align: center;background: #fff;z-index: 10;border-radius: 6px;width: 75%;margin: auto;margin-top: 40%;height: 360px;} + div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont{color: #FFFFFF;font-size: 16px;line-height: 28px;background: #38ad3a;width: 171px;margin: auto;} + div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont span{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.png) no-repeat 0px center;padding-left: 28px;} + div.mip-gzpd-alert-marks-wxpay .cg{width: 300px;margin: auto;height: 250px;display:none;} + div.mip-gzpd-alert-marks-wxpay .cg img{width: 176px;margin-top: 50px;} + div.mip-gzpd-alert-marks-wxpay .wx_top{background: #38AD3A;height: 60px;border-radius: 6px 6px 0 0;color: #fff;font-size: 24px;line-height: 60px;} + div.mip-gzpd-alert-marks-wxpay .zhifu{width: 100%;} + div.mip-gzpd-alert-marks-wxpay .zhifu img{width: 170px; height: 170px;} + div.mip-gzpd-alert-marks-wxpay .hc{margin-top: 10px;} + div.mip-gzpd-alert-marks-wxpay .hc img{width: 200px;} + + div.mip-gzpd-alert-success{display: none;} + div.mip-gzpd-alert-success .icon{width: 1.8em;height: 2.5em;vertical-align: middle;fill: #00ba9b;overflow: hidden;margin-right: 6px;} + div.mip-gzpd-alert-success {border: 1px solid #d3d4d3;padding: 4px;margin: auto;width: 33%;text-align: center;color: #333;font-size: 16px;background: #fff;} + div.mip-gzpd-alert-bounceIn{animation-name: mip-gzpd-alert-bounceIn;animation-duration: .3s;} + + div.mip-gzpd-alert-cservice-marks{width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.2);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} + div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} + div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} + div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;font-weight: 700;} + div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} + div.mip-gzpd-alert-cservice-marks .copy-txt-btn a{color: #fff;font-size: 16px;} + div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} + div.mip-gzpd-alert-cservice-marks .phone-art{text-align: center;display: inline-block;font-size: 16px;line-height: 30px;margin-top: 40px;} + div.mip-gzpd-alert-cservice-marks .phone-art span{display: block;margin-top: 3px;color: #666;} + + @-webkit-keyframes mip-gzpd-alert-bounceIn { 0% {opacity: 0;transform: scale(.5)} 100% {opacity: 1;transform: scale(1)} } + +} diff --git a/mip-gzpd-alert/package.json b/mip-gzpd-alert/package.json index 77993c2a4..d61285b8c 100644 --- a/mip-gzpd-alert/package.json +++ b/mip-gzpd-alert/package.json @@ -1,8 +1,12 @@ { - "name": "mip-gzpd-alert", - "version": "1.0.0", - "description": "提示功能", - "engines": { - "mip": ">=1.1.0" - } + "name": "mip-gzpd-alert", + "version": "1.0.0", + "description": "提示功能", + "author": { + "name": "jfdsies", + "email": "jfdsies@gmail.com" + }, + "engines": { + "mip": ">=1.1.0" + } } From 990ae6b5f411cc210cdad4f7801f076bb1ac1d12 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Thu, 27 Sep 2018 11:33:57 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=A6=81=E6=B1=82=E8=A7=84=E8=8C=83=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mip-gzpd-alert.zip | Bin 0 -> 5746 bytes mip-gzpd-alert/README.md | 2 +- mip-gzpd-alert/mip-gzpd-alert.js | 174 ++++++++----- mip-gzpd-alert/mip-gzpd-alert.less | 403 +++++++++++++++++++++++++---- mip-gzpd-alert/package.json | 2 +- 5 files changed, 453 insertions(+), 128 deletions(-) create mode 100644 mip-gzpd-alert.zip diff --git a/mip-gzpd-alert.zip b/mip-gzpd-alert.zip new file mode 100644 index 0000000000000000000000000000000000000000..021c638143e2cfdb436107c065da980759d61c08 GIT binary patch literal 5746 zcmai&1yodB*T;vDknWTQnE@QSyCjBY=*?X_Qx-tstL%^@&)=)&{Ul0Gj;oVzjdp8c-7j9M@ z=1$hnJizMror&*1V*ncNJNGOXD&yUcjiLhp?yo;P|9$Ke2UrV*q3go*l@HPht?Hav z;@Z)h3uTLj-9>RL6*4oEs@LY6b|(rJkT`4~E5jvG5Au)?h9A8Q=dq=N`KaKV<_cJO zdNVA}caiU(tNp;b!37h_DOG1Wi-mP}!dh?kjbl_9M3VBY)Jh&I zC0B#ck;S;I1Uk8$uUF)g9R7h`s$2SSyFP&mNCEof=^*}|KbjdVcC4~Zu5&kWy+9wh?XCwFE)s_Fmf9jPP+w%(T z=UV9|>P$Yr*@fM*D=)8>r?wgBbVB18PVn{9!Mq8x#1D*Tt{VXARwr$ zJ%5R2?!dQvmx%fdks|tWIG2wF_1x&|(Q;G`0iobK<)zEdQ$4L@^{e9NGQBpc9WALI zZiH7f&PU+m;cU1BTM2BI@wJ$U6>?eA63sI|5yg2Uxp%FP4p|n_vRA9>__6TD4?@wC zFbKV*-(WxEE3~M7NJ0U<`gS`FK&@Jc2!cLMqGyP1*}mVrBLf(GR!ml zS@?@*a^@-O3#as)+_kJ1-`vyx)(wId7~*aril?M0=~$+srs_JgW+1svdh@9cKCY~!k3PD`O_?k;^(ztjO1H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ME!fzb@gPR~E}$KO$MoHMR8n5ruyA=3i>n|{c2 zzbbzn`2TDE6bK*wOEm-lknWeS{nykyLY+yZzpRaKaP>Rw$@~5N3-I4G$G-q{_W+Lj z_IJq<{P)-UZT~y*%ff>GFXCU;rA=)4PvSod)8C0N?*0Bd;!onQGWB=nK*HS&!9DXY zE7`)0S@MUM|BPe5Gu!Ux@(n|&NMfh*huZkW3cyNEx+(#<$U;h#CKa!C&%m4rY literal 0 HcmV?d00001 diff --git a/mip-gzpd-alert/README.md b/mip-gzpd-alert/README.md index edf712bc0..9cd0bb6f9 100644 --- a/mip-gzpd-alert/README.md +++ b/mip-gzpd-alert/README.md @@ -6,7 +6,7 @@ ----|---- 类型|业务 支持布局|N/S -所需脚本|https://mipcache.bdstatic.com/static/v1/mip-gzpd-alert/mip-gzpd-alert.js +所需脚本|https://mipcache.bdstatic.com/static/v1/mip-___/mip-___.js ## 示例 diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js index 46d184add..0ec432b33 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -1,4 +1,10 @@ -define(function(require) { +/** + * @file mip-gzpd-alert.js + * @description mip-gzpd-alert函数 + * @author jfdsies + */ + +define(function (require) { var $ = require('zepto'); var util = require('util'); var CustomStorage = util.customStorage; @@ -6,112 +12,138 @@ define(function(require) { var customElem = require('customElement').create(); var alt = JSON.parse($('#mip-gzpd-alert-data').html()); - var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?id='+alt.id+'&rd=' + encodeURI(window.location.href.split('?')[0]); - var zhezhao = "
" + - "
" + - '
' + - "
"+alt.alert.title+"
" + - "
"+alt.alert.art+"
" + - "
" + - "

"+alt.alert.detail[0]+"

"+alt.alert.detail[1]+"
" + - "
"+alt.alert.btn+"
" + - "
联系客服
" + - "
"; - var payAlert = '
' + - '
' + - '
'+alt.alertWx.title+'
' + - '
' + - '
' + - '
' + - '
' + - '
'+alt.alertWx.detail[0]+''+alt.alertWx.detail[1]+'
' + - '
' + - '
' + - '
' + - '
' + - ' ' + - ' '+alt.alertOk.title+'' + - ' '+alt.alertOk.detail[0]+'' + - ' ' + - '
' + - '
' + - '
' + - '
'; - var copySuccess = '
' + - '' + - ''+alt.alertCopy.title+'
'; - var customerService = '
' + - '
' + - '
' + - '
' + - '

客服微信号: '+alt.kefu+'

' + - ' 打开微信' + - '
' + - '
' + - ' 付费成功后,若无法使用请联系客服' + - ' 在线时间:周一至周五' + - ' 8:30~12:30 14:00~18:00' + - ' ' + - '
' + - '
' + - '
'; + var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?id=' + alt.id + '&rd=' + encodeURI(window.location.href.split('?')[0]); + var zhezhao = '
' + + '
' + + '
' + + '
' + alt.alert.title + '
' + + '
' + alt.alert.art + '
' + + '
' + + '
' + + '
' + + '

' + alt.alert.detail[0] + '

' + + ' ' + alt.alert.detail[1] + '
' + + ' ' + + '
' + alt.alert.btn + '
' + + '
联系客服
' + + '
'; + var payAlert = '
' + + '
' + + '
' + alt.alertWx.title + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + alt.alertWx.detail[0] + + ' ' + alt.alertWx.detail[1] + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + ' ' + alt.alertOk.title + '' + + ' ' + alt.alertOk.detail[0] + '' + + ' ' + + '
' + + '
' + + '
' + + '
'; + var copySuccess = '
' + + '' + + '' + + '' + alt.alertCopy.title + '
'; + var customerService = '
' + + '
' + + '
' + + '
' + + '

客服微信号: ' + alt.kefu + '

' + + ' 打开微信' + + '
' + + '
' + + ' 付费成功后,若无法使用请联系客服' + + ' 在线时间:周一至周五' + + ' 8:30~12:30 14:00~18:00' + + ' ' + + '
' + + '
' + + '
'; - var hashCode = function(s) { - var h = 0, l = s.length, i = 0; - if ( l > 0 ) - while (i < l) + var hashCode = function (s) { + var h = 0; + var l = s.length; + var i = 0; + if (l > 0) { + while (i < l) { h = (h << 5) - h + s.charCodeAt(i++) | 0; + } + } return h; - } + }; var cookieKey = hashCode(window.location.pathname.substr(window.location.pathname.lastIndexOf('/') + 1)).toString(); - var buyInterval,copyTimeout; + var buyInterval; + var copyTimeout; // build 方法,元素插入到文档时执行,仅会执行一次 customElem.prototype.build = function () { $('.content').append(zhezhao + payAlert + copySuccess + customerService); - document.addEventListener('copy', function(e){ - if(!storage.get(cookieKey)){ - if($('.mip-gzpd-alert-marks').css('display') !== 'block'){ + document.addEventListener('copy', function (e) { + if (!storage.get(cookieKey)) { + if ($('.mip-gzpd-alert-marks').css('display') !== 'block') { e.clipboardData.setData('text/plain', ''); e.preventDefault(); } $('.mip-gzpd-alert-marks').css('display', 'block'); - }else{ + } + else { window.clearTimeout(copyTimeout); $('.mip-gzpd-alert-success').css('display', 'block'); - copyTimeout = window.setTimeout(function(){ + copyTimeout = window.setTimeout(function () { $('.mip-gzpd-alert-success').css('display', 'none'); }, 1000); } }); - if(window.location.href.indexOf('order=') > -1){ + if (window.location.href.indexOf('order=') > -1) { $('.mip-gzpd-alert-marks-wxpay').css('display', 'block'); $('.payqr_box').css('display', 'block'); $('.payqr_success_box').css('display', 'none'); - buyInterval = window.setInterval(function(){ - $.getJSON("//my.yjbys.com/company/wxpay/trade_copy.php"+window.location.search,function(data){ - if(data.state === "OK"){ + buyInterval = window.setInterval(function () { + $.getJSON('//my.yjbys.com/company/wxpay/trade_copy.php' + window.location.search, function (data) { + if (data.state === 'OK') { $('.claos').css('display', 'none'); $('.payqr_box').css('display', 'none'); $('.payqr_success_box').css('display', 'block'); $('.wx_top span').text('支付成功'); - storage.set(cookieKey, 1, 7*86400*1000); + storage.set(cookieKey, 1, 7 * 86400 * 1000); window.clearInterval(buyInterval); } }); - },1500); + }, 1500); } - $(document).on('click', '.mip-gzpd-alert-cservice-marks .claos', function(){ + $(document).on('click', '.mip-gzpd-alert-cservice-marks .claos', function () { $('.mip-gzpd-alert-cservice-marks').css('display', 'none'); }); - $(document).on('click', '.mip-gzpd-alert-marks .claos', function(){ + $(document).on('click', '.mip-gzpd-alert-marks .claos', function () { $('.mip-gzpd-alert-marks').css('display', 'none'); }); - $(document).on('click', '.mip-gzpd-alert-marks .paybox-cservice', function(){ + $(document).on('click', '.mip-gzpd-alert-marks .paybox-cservice', function () { $('.mip-gzpd-alert-cservice-marks').css('display', 'block'); }); - $(document).on('click', '.payqr_success_text .btn', function(){ + $(document).on('click', '.payqr_success_text .btn', function () { window.location.href = window.location.href.split('?')[0]; }); }; diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index a5681d525..3d6056462 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -1,63 +1,356 @@ mip-gzpd-alert { - div.mip-gzpd-alert-marks .claos,div.mip-gzpd-alert-cservice-marks .claos + div.mip-gzpd-alert-marks .claos, + div.mip-gzpd-alert-cservice-marks .claos { + position: absolute; + right: -10px; + background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px; + width: 30px; + height: 30px; + text-indent: -9999px; + top: -10px; + cursor: pointer; + } + div.mip-gzpd-alert-marks .claos:hover, + div.mip-gzpd-alert-cservice-marks .claos:hover { + background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px; + } - {position: absolute;right: -10px;background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px;width: 30px;height: 30px;text-indent: -9999px;top: -10px;cursor: pointer;} - div.mip-gzpd-alert-marks .claos:hover,div.mip-gzpd-alert-cservice-marks .claos:hover - {background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px;} + div.mip-gzpd-alert-marks { + float: left; + z-index: 10; + width: 100%; + height: 100%; + display: none; + position: fixed; + top: 0; + background: rgba(19, 19, 19, 0.6); + } + div.mip-gzpd-alert-marks .paybox { + text-align: center; + background: #fff; + width: 75%; + margin: auto; + margin-top: 40%; + padding: 6% 0; + border-radius: 6px; + position: relative; + } + div.mip-gzpd-alert-marks .paybox-title { + color: #44b549; + font-size: 30px; + display: inline-block; + font-weight: 700; + line-height: 40px; + height: 40px; + width: 100%; + } + div.mip-gzpd-alert-marks .paybox-img { + width: 100px; + display: inline-block; + margin: 10% 0 0; + } + div.mip-gzpd-alert-marks .paybox-img img { + width: 100% + } + div.mip-gzpd-alert-marks .paybox-money { + height: 60px; + line-height: 60px; + } + div.mip-gzpd-alert-marks .paybox-money h2 { + color: #ff6600; + font-size: 16px; + display: inline-block; + font-weight: 700; + } + div.mip-gzpd-alert-marks .paybox-money span { + text-decoration: line-through; + color: #949494; + margin-left: 10px; + font-size: 14px; + } + div.mip-gzpd-alert-marks .paybox-bottom { + cursor: pointer; + background: #44b549; + height: 45px; + line-height: 45px; + border-radius: 6px; + margin: 6px auto; + width: 230px; + } + div.mip-gzpd-alert-marks .paybox-bottom-a { + font-size: 18px; + color: #fff; + font-weight: 700; + } + div.mip-gzpd-alert-marks .paybox-art { + color: #a0a0a0; + font-size: 18px; + line-height: 50px; + height: 50px; + float: left; + width: 100%; + } + div.mip-gzpd-alert-marks .paybox-cservice { + font-size: 14px; + margin-top: 10px; + cursor: pointer; + color: #a2a2a2; + } - div.mip-gzpd-alert-marks{float: left;z-index: 10;width: 100%;height: 100%;display: none;position: fixed;top: 0;background: rgba(19, 19, 19, 0.6);} - div.mip-gzpd-alert-marks .paybox {text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;} - div.mip-gzpd-alert-marks .paybox-title{color: #44b549;font-size: 30px;display: inline-block;font-weight: 700;line-height: 40px;height: 40px;width: 100%;} - div.mip-gzpd-alert-marks .paybox-img{width: 100px;display: inline-block;margin: 10% 0 0;} - div.mip-gzpd-alert-marks .paybox-img img{width: 100%} - div.mip-gzpd-alert-marks .paybox-money{height: 60px;line-height: 60px;} - div.mip-gzpd-alert-marks .paybox-money h2{color: #ff6600;font-size: 16px;display: inline-block;font-weight: 700;} - div.mip-gzpd-alert-marks .paybox-money span{text-decoration: line-through;color: #949494;margin-left: 10px;font-size: 14px;} - div.mip-gzpd-alert-marks .paybox-bottom{cursor: pointer;background: #44b549;height: 45px;line-height: 45px;border-radius: 6px;margin: 6px auto;width:230px;} - div.mip-gzpd-alert-marks .paybox-bottom-a{font-size: 18px;color: #fff;font-weight: 700;} - div.mip-gzpd-alert-marks .paybox-art{color: #a0a0a0;font-size: 18px;line-height: 50px;height: 50px;float: left;width: 100%;} - div.mip-gzpd-alert-marks .paybox-cservice{font-size: 14px;margin-top: 10px;cursor: pointer;color: #a2a2a2;} + div.mip-gzpd-alert-marks-wxpay { + display: none; + float: left; + z-index: 10; + width: 100%; + height: 100%; + position: fixed; + top: 0; + background: rgba(19, 19, 19, 0.6); + } + div.mip-gzpd-alert-marks-wxpay .block_ad_qr { + display: inline-block; + margin: 30px 50px; + font-size: 19px; + color: #ff0000; + } + div.mip-gzpd-alert-marks-wxpay .payqr_success_text .text { + display: block; + font-size: 30px; + color: #44b549; + } + div.mip-gzpd-alert-marks-wxpay .payqr_success_text .icon { + padding-top: 30px; + fill: #44b549; + width: 80px; + display: inline-block; + margin-bottom: 10px; + } + div.mip-gzpd-alert-marks-wxpay .payqr_success_box { + display: none; + } + div.mip-gzpd-alert-marks-wxpay .payqr_success_box button.btn { + font-weight: 700; + background: #38ad3a; + border: none; + width: 230px; + height: 46px; + font-size: 18px; + color: #fff; + border-radius: 6px; + margin-top: 25px; + cursor: pointer; + } + div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text { + display: block; + font-size: 30px; + color: #44b549; + margin-bottom: 6px; + } + div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text.small { + color: #999; + font-size: 16px; + } - div.mip-gzpd-alert-marks-wxpay{display: none;float: left;z-index: 10;width: 100%;height: 100%;position: fixed;top: 0;background: rgba(19,19,19,0.6);} - div.mip-gzpd-alert-marks-wxpay .block_ad_qr {display: inline-block;margin: 30px 50px;font-size: 19px;color: red;} - div.mip-gzpd-alert-marks-wxpay .payqr_success_text .text {display: block;font-size: 30px;color: #44b549;} - div.mip-gzpd-alert-marks-wxpay .payqr_success_text .icon {padding-top: 30px;fill: #44b549;width: 80px;display: inline-block;margin-bottom: 10px;} - div.mip-gzpd-alert-marks-wxpay .payqr_success_box {display: none;} - div.mip-gzpd-alert-marks-wxpay .payqr_success_box button.btn {font-weight: 700;background: #38ad3a;border: none;width: 230px;height: 46px;font-size: 18px;color: #fff;border-radius: 6px;margin-top: 25px;cursor: pointer;} - div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text {display: block;font-size: 30px;color: #44b549;margin-bottom: 6px;} - div.mip-gzpd-alert-marks-wxpay .payqr_success_box .payqr_success_text span.text.small {color: #999;font-size: 16px;} + div.mip-gzpd-alert-marks-wxpay .my_wxpay { + width: 100%; + height: 100%; + position: fixed; + margin: auto; + background: rgba(0, 0, 0, 0.6); + cursor: pointer; + visibility: visible; + z-index: 10; + top: 0; + left: 0; + display: none; + } + div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm { + display: block; + margin-top: 8px; + font-size: 18px; + color: #6d6d6d; + } + div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm span { + color: #FF7800; + padding: 6px 11px; + font-weight: 700; + } + div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos { + position: absolute; + right: -10px; + background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px; + width: 30px; + height: 30px; + text-indent: -9999px; + top: -10px; + cursor: pointer; + } + div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos:hover { + background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px; + } + div.mip-gzpd-alert-marks-wxpay .wx_pic_img { + text-align: center; + background: #fff; + z-index: 10; + border-radius: 6px; + width: 75%; + margin: auto; + margin-top: 40%; + height: 360px; + } + div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont { + color: #FFFFFF; + font-size: 16px; + line-height: 28px; + background: #38ad3a; + width: 171px; + margin: auto; + } + div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont span { + background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.png) no-repeat 0 center; + padding-left: 28px; + } + div.mip-gzpd-alert-marks-wxpay .cg { + width: 300px; + margin: auto; + height: 250px; + display: none; + } + div.mip-gzpd-alert-marks-wxpay .cg img { + width: 176px; + margin-top: 50px; + } + div.mip-gzpd-alert-marks-wxpay .wx_top { + background: #38AD3A; + height: 60px; + border-radius: 6px 6px 0 0; + color: #fff; + font-size: 24px; + line-height: 60px; + } + div.mip-gzpd-alert-marks-wxpay .zhifu { + width: 100%; + } + div.mip-gzpd-alert-marks-wxpay .zhifu img { + width: 170px; + height: 170px; + } + div.mip-gzpd-alert-marks-wxpay .hc { + margin-top: 10px; + } + div.mip-gzpd-alert-marks-wxpay .hc img { + width: 200px; + } - div.mip-gzpd-alert-marks-wxpay .my_wxpay {width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.6);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} - div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm{display: block;margin-top: 8px;font-size: 18px;color: #6d6d6d;} - div.mip-gzpd-alert-marks-wxpay .my_wxpay .sm span{color: #FF7800;padding: 6px 11px;font-weight: 700;} - div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos{position: absolute;right: -10px;background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -149px -31px;width: 30px;height: 30px;text-indent: -9999px;top: -10px;cursor: pointer;} - div.mip-gzpd-alert-marks-wxpay .my_wxpay .claos:hover{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.2.png) no-repeat -180px -31px;} - div.mip-gzpd-alert-marks-wxpay .wx_pic_img {text-align: center;background: #fff;z-index: 10;border-radius: 6px;width: 75%;margin: auto;margin-top: 40%;height: 360px;} - div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont{color: #FFFFFF;font-size: 16px;line-height: 28px;background: #38ad3a;width: 171px;margin: auto;} - div.mip-gzpd-alert-marks-wxpay .my_wxpay .iconfont span{background: url(https://static.yjbys.com/img/company/pay/zhifu_icon.png) no-repeat 0px center;padding-left: 28px;} - div.mip-gzpd-alert-marks-wxpay .cg{width: 300px;margin: auto;height: 250px;display:none;} - div.mip-gzpd-alert-marks-wxpay .cg img{width: 176px;margin-top: 50px;} - div.mip-gzpd-alert-marks-wxpay .wx_top{background: #38AD3A;height: 60px;border-radius: 6px 6px 0 0;color: #fff;font-size: 24px;line-height: 60px;} - div.mip-gzpd-alert-marks-wxpay .zhifu{width: 100%;} - div.mip-gzpd-alert-marks-wxpay .zhifu img{width: 170px; height: 170px;} - div.mip-gzpd-alert-marks-wxpay .hc{margin-top: 10px;} - div.mip-gzpd-alert-marks-wxpay .hc img{width: 200px;} + div.mip-gzpd-alert-success { + display: none; + } + div.mip-gzpd-alert-success .icon { + width: 1.8em; + height: 2.5em; + vertical-align: middle; + fill: #00ba9b; + overflow: hidden; + margin-right: 6px; + } + div.mip-gzpd-alert-success { + border: 1px solid #d3d4d3; + padding: 4px; + margin: auto; + width: 33%; + text-align: center; + color: #333; + font-size: 16px; + background: #fff; + } + div.mip-gzpd-alert-bounceIn { + animation-name: mip-gzpd-alert-bounceIn; + animation-duration: .3s; + } - div.mip-gzpd-alert-success{display: none;} - div.mip-gzpd-alert-success .icon{width: 1.8em;height: 2.5em;vertical-align: middle;fill: #00ba9b;overflow: hidden;margin-right: 6px;} - div.mip-gzpd-alert-success {border: 1px solid #d3d4d3;padding: 4px;margin: auto;width: 33%;text-align: center;color: #333;font-size: 16px;background: #fff;} - div.mip-gzpd-alert-bounceIn{animation-name: mip-gzpd-alert-bounceIn;animation-duration: .3s;} - - div.mip-gzpd-alert-cservice-marks{width: 100%;height: 100%;position: fixed;margin: auto;background:rgba(0, 0, 0, 0.2);cursor: pointer;visibility: visible;z-index: 10;top: 0;left: 0;display: none;} - div.mip-gzpd-alert-cservice-marks .phone-pic{width: 90%;display: inline-block;} - div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice{text-align: center;background: #fff;width: 75%;margin: auto;margin-top: 40%;padding: 6% 0;border-radius: 6px;position: relative;height: 350px;} - div.mip-gzpd-alert-cservice-marks .kefu-name{color: #44b549; font-size: 22px; margin-top: 40px;font-weight: 700;} - div.mip-gzpd-alert-cservice-marks .copy-txt-btn{display: inline-block;background: #4c84da;color: #fff;padding: 12px 40px;border-radius: 4px;margin-top: 42px;} - div.mip-gzpd-alert-cservice-marks .copy-txt-btn a{color: #fff;font-size: 16px;} - div.mip-gzpd-alert-cservice-marks .open-wechat{width: 100%;float: left;height: 60px;line-height: 60px;color: #215cb7;font-size: 16px;margin-top: 10px;} - div.mip-gzpd-alert-cservice-marks .phone-art{text-align: center;display: inline-block;font-size: 16px;line-height: 30px;margin-top: 40px;} - div.mip-gzpd-alert-cservice-marks .phone-art span{display: block;margin-top: 3px;color: #666;} - - @-webkit-keyframes mip-gzpd-alert-bounceIn { 0% {opacity: 0;transform: scale(.5)} 100% {opacity: 1;transform: scale(1)} } + div.mip-gzpd-alert-cservice-marks { + width: 100%; + height: 100%; + position: fixed; + margin: auto; + background: rgba(0, 0, 0, 0.2); + cursor: pointer; + visibility: visible; + z-index: 10; + top: 0; + left: 0; + display: none; + } + div.mip-gzpd-alert-cservice-marks .phone-pic { + width: 90%; + display: inline-block; + } + div.mip-gzpd-alert-cservice-marks .mip-gzpd-alert-cservice { + text-align: center; + background: #fff; + width: 75%; + margin: auto; + margin-top: 40%; + padding: 6% 0; + border-radius: 6px; + position: relative; + height: 350px; + } + div.mip-gzpd-alert-cservice-marks .kefu-name { + color: #44b549; + font-size: 22px; + margin-top: 40px; + font-weight: 700; + } + div.mip-gzpd-alert-cservice-marks .copy-txt-btn { + display: inline-block; + background: #4c84da; + color: #fff; + padding: 12px 40px; + border-radius: 4px; + margin-top: 42px; + } + div.mip-gzpd-alert-cservice-marks .copy-txt-btn a { + color: #fff; + font-size: 16px; + } + div.mip-gzpd-alert-cservice-marks .open-wechat { + width: 100%; + float: left; + height: 60px; + line-height: 60px; + color: #215cb7; + font-size: 16px; + margin-top: 10px; + } + div.mip-gzpd-alert-cservice-marks .phone-art { + text-align: center; + display: inline-block; + font-size: 16px; + line-height: 30px; + margin-top: 40px; + } + div.mip-gzpd-alert-cservice-marks .phone-art span { + display: block; + margin-top: 3px; + color: #666; + } + div.mip-gzpd-alert-cservice-marks #kefu-name-input { + width: 1px; + height: 1px; + border: 0; + color: rgba(255, 255, 255, 0); + background-color: rgba(255, 255, 255, 0); + } + @-webkit-keyframes mip-gzpd-alert-bounceIn { + 0% { + opacity: 0; + transform: scale(.5) + } + 100% { + opacity: 1; + transform: scale(1) + } + } } diff --git a/mip-gzpd-alert/package.json b/mip-gzpd-alert/package.json index d61285b8c..06ff21c11 100644 --- a/mip-gzpd-alert/package.json +++ b/mip-gzpd-alert/package.json @@ -1,7 +1,7 @@ { "name": "mip-gzpd-alert", "version": "1.0.0", - "description": "提示功能", + "description": "用户服务登陆并支付后使用提示功能", "author": { "name": "jfdsies", "email": "jfdsies@gmail.com" From 037a3ab26f96a8578f9907682b3cfc81bc9efa74 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Thu, 27 Sep 2018 15:13:26 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E7=99=BB=E9=99=86=E9=AA=8C=E8=AF=81bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mip-gzpd-alert.zip | Bin 5746 -> 0 bytes mip-gzpd-alert/mip-gzpd-alert.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 mip-gzpd-alert.zip diff --git a/mip-gzpd-alert.zip b/mip-gzpd-alert.zip deleted file mode 100644 index 021c638143e2cfd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100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -12,7 +12,7 @@ define(function (require) { var customElem = require('customElement').create(); var alt = JSON.parse($('#mip-gzpd-alert-data').html()); - var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?id=' + alt.id + '&rd=' + encodeURI(window.location.href.split('?')[0]); + var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?mip&id=' + alt.id + '&rd=' + encodeURI(window.location.href.split('?')[0]); var zhezhao = '
' + '
' + '
' From d4175e5c88af579bef429fd53f1f5fa97fba090b Mon Sep 17 00:00:00 2001 From: jfdsies Date: Thu, 27 Sep 2018 18:06:21 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=A6=81=E6=B1=82=E8=A7=84=E8=8C=83=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mip-gzpd-alert/README.md | 46 +++--- mip-gzpd-alert/mip-gzpd-alert.js | 241 +++++++++++++++++------------ mip-gzpd-alert/mip-gzpd-alert.less | 20 ++- 3 files changed, 177 insertions(+), 130 deletions(-) diff --git a/mip-gzpd-alert/README.md b/mip-gzpd-alert/README.md index 9cd0bb6f9..15eb29808 100644 --- a/mip-gzpd-alert/README.md +++ b/mip-gzpd-alert/README.md @@ -15,30 +15,30 @@ ```html - +

文章标题

bala bala bala... bala bala bala... bala bala bala...

diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js index 4c22937d3..d4c8d07fe 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -10,123 +10,159 @@ define(function (require) { var CustomStorage = util.customStorage; var storage = new CustomStorage(0); var customElem = require('customElement').create(); - var alt = JSON.parse($('#mip-gzpd-alert-data').html()); - - var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?mip&id=' + alt.id + '&rd=' + encodeURI(window.location.href.split('?')[0]); - var zhezhao = '
' - + '
' - + '
' - + '
' + alt.alert.title + '
' - + '
' + alt.alert.art + '
' - + '
' - + '
' - + '
' - + '

' + alt.alert.detail[0] + '

' - + ' ' + alt.alert.detail[1] + '
' - + ' ' - + '
' + alt.alert.btn + '
' - + '
联系客服
' - + '
'; - var payAlert = '
' - + '
' - + '
' + alt.alertWx.title + '
' - + '
' - + '
' - + '
' - + '
' - + '
' - + '
' + alt.alertWx.detail[0] - + ' ' + alt.alertWx.detail[1] + '
' - + '
' - + '
' - + '
' - + '
' - + '' - + '' - + ' ' + alt.alertOk.title + '' - + ' ' + alt.alertOk.detail[0] + '' - + ' ' - + '
' - + '
' - + '
' - + '
'; - var copySuccess = '
' - + '' - + '' - + '' + alt.alertCopy.title + '
'; - var customerService = '
' - + '
' - + '
' - + '
' - + '

客服微信号: ' + alt.kefu + '

' - + ' 打开微信' - + '
' - + '
' - + ' 付费成功后,若无法使用请联系客服' - + ' 在线时间:周一至周五' - + ' 8:30~12:30 14:00~18:00' - + ' ' - + '
' - + '
' - + '
'; - - var hashCode = function (s) { - var h = 0; - var l = s.length; + var buyInterval; + var copyTimeout; + + var hashCode = function (str) { + var hash = 0; + var len = str.length; var i = 0; - if (l > 0) { - while (i < l) { - h = (h << 5) - h + s.charCodeAt(i++) | 0; + if (len > 0) { + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; } } - return h; + return hash; + }; + var marksHtml = function (config) { + var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?mip&id=' + config.id + '&rd=' + encodeURI(window.location.href.split('?')[0]); + return '
' + + '
' + + '
' + + '
' + config.alert.title + '
' + + '
' + config.alert.art + '
' + + '
' + + ' ' + + '
' + + '
' + + '

' + config.alert.detail[0] + '

' + + ' ' + config.alert.detail[1] + '
' + + ' ' + + '
' + config.alert.btn + '
' + + '
联系客服
' + + '
'; + }; + var payAlertHtml = function (config) { + return '
' + + '
' + + '
' + config.alertWx.title + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + config.alertWx.detail[0] + + ' ' + config.alertWx.detail[1] + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + ' ' + config.alertOk.title + '' + + ' ' + config.alertOk.detail[0] + '' + + ' ' + + '
' + + '
' + + '
' + + '
'; + }; + var copySuccessHtml = function (config) { + return '
' + + '' + + '' + + '' + config.alertCopy.title + '
'; + }; + var customerServiceHtml = function (config) { + return '
' + + '
' + + '
' + + '
' + + '

客服微信号: ' + config.kefu + '

' + + ' 打开微信' + + '
' + + '
' + + ' 付费成功后,若无法使用请联系客服' + + ' 在线时间:周一至周五' + + ' 8:30~12:30 14:00~18:00' + + ' ' + + '
' + + '
' + + '
'; }; - var cookieKey = hashCode(window.location.pathname.substr(window.location.pathname.lastIndexOf('/') + 1)).toString(); - var buyInterval; - var copyTimeout; // build 方法,元素插入到文档时执行,仅会执行一次 customElem.prototype.build = function () { - $('.content').append(zhezhao + payAlert + copySuccess + customerService); + var ele = this.element; + + var pathname = window.location.pathname; + var cookieKey = hashCode(pathname.substr(pathname.lastIndexOf('/') + 1)).toString(); + + var configEle = ele.querySelectorAll('#mip-gzpd-alert-data')[0]; + var config = JSON.parse($(configEle).html()); + + var marks = marksHtml(config); + var payAlert = payAlertHtml(config); + var copySuccess = copySuccessHtml(config); + var customerService = customerServiceHtml(config); + + var content = ele.querySelectorAll('.content')[0]; + $(content).append(marks + payAlert + copySuccess + customerService); + + var cserviceMarks = ele.querySelectorAll('.mip-gzpd-alert-cservice-marks')[0]; + var cserviceMarksCloseBtn = cserviceMarks.querySelectorAll('.claos')[0]; + + var alertMarks = ele.querySelectorAll('.mip-gzpd-alert-marks')[0]; + var alertMarksCloseBtn = alertMarks.querySelectorAll('.claos')[0]; + var alertMarksPayBox = alertMarks.querySelectorAll('.paybox-cservice')[0]; + + var alertWxpay = ele.querySelectorAll('.mip-gzpd-alert-marks-wxpay')[0]; + var alertWxpaySuccessBtn = alertWxpay.querySelectorAll('.payqr_success_text .btn')[0]; + document.addEventListener('copy', function (e) { if (!storage.get(cookieKey)) { - if ($('.mip-gzpd-alert-marks').css('display') !== 'block') { + if ($(alertMarks).css('display') !== 'block') { e.clipboardData.setData('text/plain', ''); e.preventDefault(); } - $('.mip-gzpd-alert-marks').css('display', 'block'); + $(alertMarks).css('display', 'block'); } else { window.clearTimeout(copyTimeout); - $('.mip-gzpd-alert-success').css('display', 'block'); + var alertSuccess = ele.querySelectorAll('.mip-gzpd-alert-success')[0]; + $(alertSuccess).css('display', 'block'); copyTimeout = window.setTimeout(function () { - $('.mip-gzpd-alert-success').css('display', 'none'); + $(alertSuccess).css('display', 'none'); }, 1000); } }); if (window.location.href.indexOf('order=') > -1) { - $('.mip-gzpd-alert-marks-wxpay').css('display', 'block'); - $('.payqr_box').css('display', 'block'); - $('.payqr_success_box').css('display', 'none'); + var payBox = ele.querySelectorAll('.payqr_box')[0]; + var payBoxSuccess = ele.querySelectorAll('.payqr_success_box')[0]; + var wxTopSpan = ele.querySelectorAll('.wx_top span')[0]; + + $(alertWxpay).css('display', 'block'); + $(payBox).css('display', 'block'); + $(payBoxSuccess).css('display', 'none'); buyInterval = window.setInterval(function () { $.getJSON('//my.yjbys.com/company/wxpay/trade_copy.php' + window.location.search, function (data) { if (data.state === 'OK') { - $('.claos').css('display', 'none'); - $('.payqr_box').css('display', 'none'); - $('.payqr_success_box').css('display', 'block'); - $('.wx_top span').text('支付成功'); + $(alertMarksCloseBtn).css('display', 'none'); + $(payBox).css('display', 'none'); + $(payBoxSuccess).css('display', 'block'); + $(wxTopSpan).text('支付成功'); storage.set(cookieKey, 1, 7 * 86400 * 1000); window.clearInterval(buyInterval); } @@ -134,16 +170,19 @@ define(function (require) { }, 1500); } - $(document).on('click', '.mip-gzpd-alert-cservice-marks .claos', function () { - $('.mip-gzpd-alert-cservice-marks').css('display', 'none'); + $(cserviceMarksCloseBtn).click(function () { + $(cserviceMarks).css('display', 'none'); }); - $(document).on('click', '.mip-gzpd-alert-marks .claos', function () { - $('.mip-gzpd-alert-marks').css('display', 'none'); + + $(alertMarksCloseBtn).click(function () { + $(alertMarks).css('display', 'none'); }); - $(document).on('click', '.mip-gzpd-alert-marks .paybox-cservice', function () { - $('.mip-gzpd-alert-cservice-marks').css('display', 'block'); + + $(alertMarksPayBox).click(function () { + $(cserviceMarks).css('display', 'block'); }); - $(document).on('click', '.payqr_success_text .btn', function () { + + $(alertWxpaySuccessBtn).click(function () { window.location.href = window.location.href.split('?')[0]; }); }; diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index 3d6056462..5278f4336 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -49,7 +49,7 @@ mip-gzpd-alert { display: inline-block; margin: 10% 0 0; } - div.mip-gzpd-alert-marks .paybox-img img { + div.mip-gzpd-alert-marks .paybox-img .qrimg { width: 100% } div.mip-gzpd-alert-marks .paybox-money { @@ -216,7 +216,7 @@ mip-gzpd-alert { height: 250px; display: none; } - div.mip-gzpd-alert-marks-wxpay .cg img { + div.mip-gzpd-alert-marks-wxpay .cg .cg-img { width: 176px; margin-top: 50px; } @@ -231,15 +231,23 @@ mip-gzpd-alert { div.mip-gzpd-alert-marks-wxpay .zhifu { width: 100%; } - div.mip-gzpd-alert-marks-wxpay .zhifu img { - width: 170px; - height: 170px; + div.mip-gzpd-alert-marks-wxpay .zhifu .sm { + display: block; + margin-top: 8px; + font-size: 18px; + color: #6d6d6d; + } + div.mip-gzpd-alert-marks-wxpay .zhifu .sm span { + color: #FF7800; + padding: 6px 11px; + font-weight: 700; } div.mip-gzpd-alert-marks-wxpay .hc { margin-top: 10px; } - div.mip-gzpd-alert-marks-wxpay .hc img { + div.mip-gzpd-alert-marks-wxpay .hc .hc-img { width: 200px; + margin: auto; } div.mip-gzpd-alert-success { From 51c88668e33fd3f429ba046511a2f90459677e64 Mon Sep 17 00:00:00 2001 From: jfdsies Date: Mon, 8 Oct 2018 17:04:47 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=20,=E6=8C=89=E7=85=A7=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mip-gzpd-alert/README.md | 12 ++- mip-gzpd-alert/mip-gzpd-alert.js | 59 +++++++++------ mip-gzpd-alert/mip-gzpd-alert.less | 118 +++++++++++++++++++++-------- 3 files changed, 133 insertions(+), 56 deletions(-) diff --git a/mip-gzpd-alert/README.md b/mip-gzpd-alert/README.md index 15eb29808..5da4a3064 100644 --- a/mip-gzpd-alert/README.md +++ b/mip-gzpd-alert/README.md @@ -20,11 +20,21 @@ { "id": 105, "kefu": "kefu-8002", + "cookieKey": "scan_ok", + "cookieTtl": 86400, + "showBox": [true, false], "alert": { "title": "用户服务", "art": "登陆并支付后使用", "detail": ["", ""], - "btn": "跳转查看" + "btn": "跳转查看", + "service": "联系客服" + }, + "alertFree": { + "title": "", + "detail": [""], + "placeholder": "", + "btn": "确认" }, "alertWx": { "title": "付费提醒", diff --git a/mip-gzpd-alert/mip-gzpd-alert.js b/mip-gzpd-alert/mip-gzpd-alert.js index d4c8d07fe..38d25054c 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.js +++ b/mip-gzpd-alert/mip-gzpd-alert.js @@ -13,33 +13,34 @@ define(function (require) { var buyInterval; var copyTimeout; - var hashCode = function (str) { - var hash = 0; - var len = str.length; - var i = 0; - if (len > 0) { - while (i < len) { - hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; - } - } - return hash; - }; var marksHtml = function (config) { var payUrl = 'https://my.yjbys.com/company/wxpay/native_middle.php?mip&id=' + config.id + '&rd=' + encodeURI(window.location.href.split('?')[0]); + var freeboxDetail = config.alertFree.detail.map(function (item) { + return '

' + item + '

'; + }).join(''); return '
' - + '
' - + '
' + + '
' + + '
' + + '' + + '' + + '
' + config.alert.service + '
' + '
'; }; var payAlertHtml = function (config) { @@ -104,12 +105,9 @@ define(function (require) { }; // build 方法,元素插入到文档时执行,仅会执行一次 - customElem.prototype.build = function () { + customElem.prototype.firstInviewCallback = function () { var ele = this.element; - var pathname = window.location.pathname; - var cookieKey = hashCode(pathname.substr(pathname.lastIndexOf('/') + 1)).toString(); - var configEle = ele.querySelectorAll('#mip-gzpd-alert-data')[0]; var config = JSON.parse($(configEle).html()); @@ -131,8 +129,11 @@ define(function (require) { var alertWxpay = ele.querySelectorAll('.mip-gzpd-alert-marks-wxpay')[0]; var alertWxpaySuccessBtn = alertWxpay.querySelectorAll('.payqr_success_text .btn')[0]; + var freeboxBtn = ele.querySelectorAll('.freebox-btn')[0]; + var freeboxInput = ele.querySelectorAll('.freebox-input')[0]; + document.addEventListener('copy', function (e) { - if (!storage.get(cookieKey)) { + if (!storage.get(config.cookieKey)) { if ($(alertMarks).css('display') !== 'block') { e.clipboardData.setData('text/plain', ''); e.preventDefault(); @@ -163,7 +164,7 @@ define(function (require) { $(payBox).css('display', 'none'); $(payBoxSuccess).css('display', 'block'); $(wxTopSpan).text('支付成功'); - storage.set(cookieKey, 1, 7 * 86400 * 1000); + storage.set(config.cookieKey, 1, config.cookieTtl * 1000); window.clearInterval(buyInterval); } }); @@ -182,8 +183,20 @@ define(function (require) { $(cserviceMarks).css('display', 'block'); }); + $(freeboxBtn).click(function () { + var userInput = parseInt($(freeboxInput).val(), 10); + if (userInput < 1000) { + alert('输入不正确!'); + } + + if (userInput > 8000 && userInput < 9999) { + storage.set(config.cookieKey, 1, config.cookieTtl * 1000); + $(alertMarks).css('display', 'none'); + } + }); + $(alertWxpaySuccessBtn).click(function () { - window.location.href = window.location.href.split('?')[0]; + window.top.location.href = window.location.href.split('?')[0]; }); }; diff --git a/mip-gzpd-alert/mip-gzpd-alert.less b/mip-gzpd-alert/mip-gzpd-alert.less index 5278f4336..8d567076f 100644 --- a/mip-gzpd-alert/mip-gzpd-alert.less +++ b/mip-gzpd-alert/mip-gzpd-alert.less @@ -1,4 +1,5 @@ mip-gzpd-alert { + div.mip-gzpd-alert-marks .claos, div.mip-gzpd-alert-cservice-marks .claos { position: absolute; @@ -25,50 +26,53 @@ mip-gzpd-alert { top: 0; background: rgba(19, 19, 19, 0.6); } - div.mip-gzpd-alert-marks .paybox { - text-align: center; - background: #fff; - width: 75%; + div.mip-gzpd-alert-marks .alert-box { + width: 85%; + position: relative; margin: auto; - margin-top: 40%; - padding: 6% 0; + margin-top: 20%; border-radius: 6px; - position: relative; + background: #fff; + text-align: center; } - div.mip-gzpd-alert-marks .paybox-title { - color: #44b549; - font-size: 30px; + div.mip-gzpd-alert-marks .alert-box .paybox { + width: 100%; + padding: 6% 0; + border-bottom: 1px solid #ccc; + } + div.mip-gzpd-alert-marks .paybox .paybox-title { + color: #3c3c3c; + font-size: 22px; display: inline-block; font-weight: 700; - line-height: 40px; - height: 40px; + line-height: 30px; + height: 30px; width: 100%; + margin-bottom: 5px; } - div.mip-gzpd-alert-marks .paybox-img { + div.mip-gzpd-alert-marks .paybox .paybox-img { width: 100px; display: inline-block; - margin: 10% 0 0; } - div.mip-gzpd-alert-marks .paybox-img .qrimg { + div.mip-gzpd-alert-marks .paybox .paybox-img .qrimg { width: 100% } - div.mip-gzpd-alert-marks .paybox-money { - height: 60px; - line-height: 60px; + div.mip-gzpd-alert-marks .paybox .paybox-money { + height: 30px; + line-height: 30px; } - div.mip-gzpd-alert-marks .paybox-money h2 { + div.mip-gzpd-alert-marks .paybox .paybox-money span:first-child { color: #ff6600; font-size: 16px; - display: inline-block; - font-weight: 700; + font-weight: 400; } - div.mip-gzpd-alert-marks .paybox-money span { + div.mip-gzpd-alert-marks .paybox .paybox-money span:last-child { text-decoration: line-through; color: #949494; margin-left: 10px; font-size: 14px; } - div.mip-gzpd-alert-marks .paybox-bottom { + div.mip-gzpd-alert-marks .paybox .paybox-bottom { cursor: pointer; background: #44b549; height: 45px; @@ -77,22 +81,72 @@ mip-gzpd-alert { margin: 6px auto; width: 230px; } - div.mip-gzpd-alert-marks .paybox-bottom-a { + div.mip-gzpd-alert-marks .paybox .paybox-bottom-a { font-size: 18px; color: #fff; font-weight: 700; } - div.mip-gzpd-alert-marks .paybox-art { - color: #a0a0a0; - font-size: 18px; - line-height: 50px; - height: 50px; - float: left; + + div.mip-gzpd-alert-marks .alert-box .freebox { width: 100%; + padding: 6% 0; + } + div.mip-gzpd-alert-marks .freebox .freebox-description { + text-align: left; + color: #3c3c3c; + margin: 0 3%; + } + div.mip-gzpd-alert-marks .freebox .freebox-title { + color: #3c3c3c; + font-size: 22px; + display: inline-block; + font-weight: 700; + line-height: 30px; + height: 30px; + width: 100%; + margin-bottom: 5px; } - div.mip-gzpd-alert-marks .paybox-cservice { + div.mip-gzpd-alert-marks .freebox .freebox-description p { + margin: 10px; font-size: 14px; - margin-top: 10px; + } + div.mip-gzpd-alert-marks .freebox .freebox-description p .text-focus { + color: #FF5722; + } + div.mip-gzpd-alert-marks .freebox .freebox-code { + display: inline-block; + margin-top: 7px; + width: 80%; + border: 1px solid #44b549; + height: 32px; + line-height: 30px; + } + div.mip-gzpd-alert-marks .freebox .freebox-code .freebox-input { + line-height: 32px; + width: 78%; + font-size: 14px; + float: left; + border: none; + color: #bdbdbd; + padding-left: 3%; + } + div.mip-gzpd-alert-marks .freebox .freebox-code .freebox-btn { + line-height: 32px; + width: 19%; + background: #44b549; + color: #fff; + text-align: center; + font-size: 16px; + border: 0 none; + cursor: pointer; + float: right; + -webkit-appearance: none; + border-radius: 0; + } + + div.mip-gzpd-alert-marks .alert-box .paybox-cservice { + font-size: 14px; + padding-bottom: 10px; cursor: pointer; color: #a2a2a2; }