123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title>二维码分享</title>
- <style>
- html body {
- position: relative;
- }
- .api_layout {
- margin: 25px 12px 0 12px;
- background: #fff;
- text-align: center;
- box-shadow: 0px 0px 5px 5px rgba(0, 0, 0, 0.1);
- border-radius: 10px;
- }
- header {
- height: 58px;
- line-height: 58px;
- font-size: 18px;
- color: #333333;
- border-bottom: solid 1px #E0E1E2;
- }
- .footer {
- height: 40px;
- line-height: 40px;
- font-size: 12px;
- color: #6C6F74;
- border-top: solid 1px #E0E1E2;
- }
- .qrcode_img {
- margin: 17px;
- width: 300px;
- height: 300px;
- margin: 0 auto;
- }
- .qrcode_img img {
- display: block;
- width: 100%;
- height: 100%;
- }
- .handle_item {
- margin: 80px 20px 0 20px;
- text-align: center;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .handle_item .handle_item_contaoner {
- width: 100%;
- height: 35px;
- /*width: 145px;
- height: 35px;*/
- background: rgba(255, 255, 255, 1);
- border-radius: 5px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /*.handle_item_contaoner div:first-child {
- line-height: 16px;
- }*/
- .handle_item_contaoner div:first-child img{
- width: 16px;
- height: 16px;
- display: block;
- line-height: 16px;
- }
- .handle_item_contaoner div:last-child {
- margin-left: 8px;
- }
- </style>
- </head>
- <body style="background-color:#009FE8;">
- <div class="api_layout">
- <header>
- App下载二维码
- </header>
- <div class="qrcode_img">
- <img src="" id="qrOssImg" alt="">
- </div>
- <div class="footer" onclick="handleDownLoadQrCode()">
- 扫一扫下载
- </div>
- </div>
- <div class="handle_item">
- <div class="handle_item_contaoner" onclick="handleDownLoadQrImg()">
- <!-- -->
- <div><img src="../../image/downLoadQrCode.png" alt=""></div>
- <div>保存到手机</div>
- </div>
- <!-- <div class="handle_item_contaoner">
- <div><img src="../../image/shareImg.png" alt=""></div>
- <div>分享</div>
- </div> -->
- </div>
- </body>
- </html>
- <script type="text/javascript" src="../../script/api.js"></script>
- <!-- <script src="../../script/aui-toast.js" charset="utf-8"></script> -->
- <!-- <script src="../../script/fastclick.min.js" charset="utf-8"></script> -->
- <script src="../../script/config.js" charset="utf-8"></script>
- <script type="text/javascript">
- var token, uuid, headers,imgSrc = '',qr_oss_mg='';
- var toast = new auiToast();
- apiready = function() {
- var info = $api.getStorage('data'),
- user = JSON.parse(info).data.user;
- token = JSON.parse(info).data.access_token;
- uuid = JSON.parse(info).data.user.staff_num;
- headers = {
- "Authorization": "Bearer " + token
- };
- imgSrc = `https://jiewei-icon.oss-cn-beijing.aliyuncs.com/下载二维码/${ossImgName}.png`
- qr_oss_mg = $api.byId('qrOssImg');
- qr_oss_mg.src = imgSrc
- };
- function handleDownLoadQrImg() {
- api.saveMediaToAlbum({
- path: imgSrc
- }, function(ret, err) {
- if (ret && ret.status) {
- api.toast({
- msg: '保存成功',
- duration: 2000,
- location: 'bottom',
- });
- } else {
- alert('保存失败');
- }
- });
- }
- </script>
|