123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <!DOCTYPE html>
- <html lang="charset">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
- <title>客服微信</title>
- <link rel="stylesheet" type="text/css" href="./common/reset.css"/>
- <script type="text/javascript" src="./common/jquery-2.1.0.js"></script>
- <script type="text/javascript">
- document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
- window.onresize = function(){
- document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
- }
- </script>
- <style>
- #copy_1,#copy_2{
- position: absolute;
- left: -1000rem;
- }
- .alert-info {
- position: fixed;
- top: 3.8rem;
- right: 0;
- left: 0;
- bottom: 0;
- text-align: center;
- }
-
- .alert-info p {
- display: inline-block;
- height: 0.38rem;
- color: #fff;
- font-size: 0.14rem;
- line-height: 0.38rem;
- padding: 0 0.10rem;
- background-color: rgba(0, 0, 0, 0.7);
- border-radius: 5px;
- }
- body{
- width: 100%;min-height: 100vh;background: #FFC947;padding-top: 0.6rem;box-sizing: border-box;
- }
- .content{
- width:2.97rem;height:4.53rem;background:rgba(255,255,255,1);box-shadow:0px 0.02rem 0.09rem 0px rgba(253,174,12,1);
- border-radius:0.12rem;margin: 0 auto 0;position: relative; text-align: center;
- }
- .content .wechartImg{
- width: 0.75rem;height: 0.75rem;border-radius: 50%;position: absolute;top: -0.375rem;left: 0;right: 0;margin: auto;
- }
- .content h3{
- color: #212121;font-size: 0.2rem;line-height: 0.28rem;padding-top:0.58rem;
- }
- .content .serviceHint{
- color: #4D4D4D;font-size: 0.14rem;line-height: 0.2rem;margin-top: 0.1rem;
- }
- .content .evmImg{
- width: 1.7rem;height: 1.7rem;margin: 0.16rem auto;
- }
- #taokouling{
- color: #3A3939;font-size: 0.14rem;line-height: 0.2rem;
- }
- .content button{
- display:block;width: 1.04rem;height: 0.24rem;border-radius: 0.24rem;border:0.01rem solid #fff;background:linear-gradient(180deg,rgba(51,85,218,1) 0%,rgba(62,148,245,1) 100%);
- color: #FFFFFF;font-size: 0.14rem;line-height: 0.24rem;box-shadow:0 0.05rem 0.05rem #ccc;margin: 0.08rem auto 0;
- }
- .content .wxHint{
- color: #8A8A8A;font-size: 0.13rem;line-height: 0.18rem;margin-top: 0.23rem;
- }
- </style>
- </head>
- <body>
- <input id="copy_1" type="text" readOnly="true" value=""/>
- <div id="copy_2"></div>
-
- <div class="content">
- <img src="./other_img/serviceTopImg.png" class="wechartImg"/>
- <h3>借款小秘书</h3>
- <p class="serviceHint">客服mm,如有联系请添加客服微信<br/>欢迎与我交流</p>
- <img class="evmImg" src="./other_img/serviceEvm.png"/>
- <text id="taokouling">xiaoxiannvzuibang</text>
- <button onclick="copyPassword()">复制微信号</button>
- <p class="wxHint">微信扫码,来小花猪听我说借钱小技巧</p>
- </div>
- <div class="alert-info" style="display: none;">
- <!-- tip提示,3s后消失 -->
- <p></p>
- </div>
- </body>
- </html>
- <script>
- // 复制文字
- function copyPassword() {
- var data = document.getElementById("taokouling").innerHTML;
- copy_2.innerHTML = data;
- copy_1.value = data;
- if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
- //区分iPhone设备
- window.getSelection().removeAllRanges();//这段代码必须放在前面否则无效
- var Url2 = document.getElementById("copy_2");//要复制文字的节点
- var range = document.createRange();
- // 选中需要复制的节点
- range.selectNode(Url2);
- // 执行选中元素
- window.getSelection().addRange(range);
- // 执行 copy 操作
- var successful = document.execCommand('copy');
- // 移除选中的元素
- window.getSelection().removeAllRanges();
- } else {
- var Url2 = document.getElementById("copy_1");//要复制文字的节点
- Url2.select(); // 选择对象
- document.execCommand("Copy"); // 执行浏览器复制命令
- }
- showMsg('复制成功')
- sharePengyouquanVideo();
- }
- function showMsg(msg) {
- //弹框
- var msgBox = document.getElementsByClassName('alert-info')[0];
- msgBox.children[0].innerText = msg;
- msgBox.style.display="block";
- setTimeout(function() {
- msgBox.style.display="none";
- }, 1500);
- }
- //打开微信
- function sharePengyouquanVideo () {
- var param = {
- "open" :true
- }
- param = JSON.stringify(param)
- try {
- if(navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)){
- window.webkit.messageHandlers.xhz_h5_open_wechat.postMessage(param);
- }
- if(navigator.userAgent.match(/android/i)){
- obj4H5.xhz_h5_open_wechat(param);
- }
- } catch (error) {
- }
-
- }
- </script>
|