正在显示
4 个修改的文件
包含
193 行增加
和
2 行删除
application/app/controller/Admin.php
0 → 100644
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace app\app\controller; | ||
| 4 | + | ||
| 5 | +use app\common\controller\Frontend; | ||
| 6 | +use think\Db; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 管理端APP下载页 | ||
| 10 | + */ | ||
| 11 | +class Admin extends Frontend | ||
| 12 | +{ | ||
| 13 | + | ||
| 14 | + protected $noNeedLogin = '*'; | ||
| 15 | + protected $noNeedRight = '*'; | ||
| 16 | + protected $layout = ''; | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 管理端APP下载new | ||
| 22 | + * | ||
| 23 | + */ | ||
| 24 | + public function index() | ||
| 25 | + { | ||
| 26 | + $row = Db::name('appversion') | ||
| 27 | + ->where(['app_type' => 'admin_type']) | ||
| 28 | + ->order('id desc') | ||
| 29 | + ->find(); | ||
| 30 | + if(!empty($row)){ | ||
| 31 | + $row['apk_url'] = full_image($row['apk_url']); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + $this->assign('row', $row); | ||
| 35 | + return $this->view->fetch('appv3'); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | +} |
application/app/view/admin/appv3.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html> | ||
| 3 | + <head> | ||
| 4 | + <meta charset="utf-8"> | ||
| 5 | + <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
| 6 | + <title>元阳水务管理端APP下载</title> | ||
| 7 | + <!-- 引入相关的 css 文件 --> | ||
| 8 | + <link href="https://cdn.bootcdn.net/ajax/libs/Swiper/4.5.1/css/swiper.css" rel="stylesheet" /> | ||
| 9 | + <!-- 引入相关的 js 文件 --> | ||
| 10 | + <script src="https://cdn.bootcdn.net/ajax/libs/Swiper/4.5.1/js/swiper.js"></script> | ||
| 11 | + <style> | ||
| 12 | + * { | ||
| 13 | + margin: 0; | ||
| 14 | + padding: 0; | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + .app_one { | ||
| 18 | + position: relative; | ||
| 19 | + width: 100%; | ||
| 20 | + height: 100%; | ||
| 21 | + overflow: hidden; | ||
| 22 | + | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + .app_two { | ||
| 26 | + position: relative; | ||
| 27 | + width: 100%; | ||
| 28 | + height: 100%; | ||
| 29 | + overflow: hidden; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + .app_three { | ||
| 33 | + position: relative; | ||
| 34 | + width: 100%; | ||
| 35 | + height: 100%; | ||
| 36 | + overflow: hidden; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + | ||
| 40 | + .app_image { | ||
| 41 | + width: 100%; | ||
| 42 | + height: 100%; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + .app_div { | ||
| 46 | + height: 40px; | ||
| 47 | + width: 100%; | ||
| 48 | + position: absolute; | ||
| 49 | + bottom: 1%; | ||
| 50 | + left: 0%; | ||
| 51 | + display: flex; | ||
| 52 | + justify-content: center; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + .app_div1 { | ||
| 56 | + height: 40px; | ||
| 57 | + width: 100%; | ||
| 58 | + position: absolute; | ||
| 59 | + top: 1%; | ||
| 60 | + left: 0%; | ||
| 61 | + display: flex; | ||
| 62 | + justify-content: center; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + .app_image1 { | ||
| 66 | + width: 40px; | ||
| 67 | + height: 40px; | ||
| 68 | + | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + .app_image2 { | ||
| 72 | + width: 40px; | ||
| 73 | + height: 40px; | ||
| 74 | + transform: scaleY(-1); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + .app_btn { | ||
| 80 | + position: absolute; | ||
| 81 | + bottom: 10%; | ||
| 82 | + left: 20%; | ||
| 83 | + width: 60%; | ||
| 84 | + height: 35px; | ||
| 85 | + background: #3F7DF7; | ||
| 86 | + border: none; | ||
| 87 | + border-radius: 28px; | ||
| 88 | + color: #ffffff; | ||
| 89 | + font-size: 14px; | ||
| 90 | + font-weight: 400; | ||
| 91 | + } | ||
| 92 | + </style> | ||
| 93 | + </head> | ||
| 94 | + <body> | ||
| 95 | + <div id="app" class="swiper-container app_box" direction="vertical"> | ||
| 96 | + <div class="swiper-wrapper"> | ||
| 97 | + <div class="swiper-slide app_one" id="appOne"> | ||
| 98 | + <img src="app2/img/1086.jpg" class="app_image" /> | ||
| 99 | + <button onclick="location.href='<?php echo $row['apk_url']; ?>'" class="app_btn">立即下载</button> | ||
| 100 | + <div class="app_div"> | ||
| 101 | + <img src="app2/img/icon.png" class="app_image1" /> | ||
| 102 | + </div> | ||
| 103 | + </div> | ||
| 104 | + <div class="swiper-slide app_two" id="appTwo"> | ||
| 105 | + <div class="app_div1"> | ||
| 106 | + <img src="app2/img/icon.png" class="app_image2" /> | ||
| 107 | + </div> | ||
| 108 | + <img src="app2/img/1087.jpg" class="app_image" /> | ||
| 109 | + <button onclick="location.href='<?php echo $row['apk_url']; ?>'" class="app_btn">立即下载</button> | ||
| 110 | + <div class="app_div"> | ||
| 111 | + <img src="app2/img/icon.png" class="app_image1" /> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + <div class="swiper-slide app_three" id="appThree"> | ||
| 115 | + <div class="app_div1"> | ||
| 116 | + <img src="app2/img/icon.png" class="app_image2" /> | ||
| 117 | + </div> | ||
| 118 | + <img src="app2/img/1088.jpg" class="app_image" /> | ||
| 119 | + <button onclick="location.href='<?php echo $row['apk_url']; ?>'" class="app_btn">立即下载</button> | ||
| 120 | + </div> | ||
| 121 | + </div> | ||
| 122 | + </div> | ||
| 123 | + </body> | ||
| 124 | + <script> | ||
| 125 | + document.addEventListener('plusready', function() { | ||
| 126 | + //console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。") | ||
| 127 | + | ||
| 128 | + }); | ||
| 129 | + var deviceWidth = window.innerWidth; | ||
| 130 | + var deviceHeight = window.innerHeight; | ||
| 131 | + // console.log("设备宽度:" + deviceWidth, "设备高度:" + deviceHeight); | ||
| 132 | + // 获取元素 | ||
| 133 | + var element = document.getElementById("app"); | ||
| 134 | + // 设置宽高 | ||
| 135 | + element.style.width = deviceWidth + "px"; | ||
| 136 | + element.style.height = deviceHeight + "px"; | ||
| 137 | + // 第一种 通过方法响应点击事件 | ||
| 138 | + function download() { | ||
| 139 | + // alert("点击事件"); | ||
| 140 | + // console.log(index) | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + var mySwiper = new Swiper('.swiper-container', { | ||
| 144 | + direction: 'vertical', // 垂直切换选项 | ||
| 145 | + loop: false, // 循环模式选项 | ||
| 146 | + // 如果需要前进后退按钮 | ||
| 147 | + navigation: { | ||
| 148 | + nextEl: '.app_image1', | ||
| 149 | + prevEl: '.app_image2', | ||
| 150 | + }, | ||
| 151 | + resistanceRatio: 0 | ||
| 152 | + }); | ||
| 153 | + </script> | ||
| 154 | +</html> |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <head> | 3 | <head> |
| 4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | 5 | <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
| 6 | - <title>一河五库水库APP下载</title> | 6 | + <title>元阳水务用户端APP下载</title> |
| 7 | <!-- 引入相关的 css 文件 --> | 7 | <!-- 引入相关的 css 文件 --> |
| 8 | <link href="https://cdn.bootcdn.net/ajax/libs/Swiper/4.5.1/css/swiper.css" rel="stylesheet" /> | 8 | <link href="https://cdn.bootcdn.net/ajax/libs/Swiper/4.5.1/css/swiper.css" rel="stylesheet" /> |
| 9 | <!-- 引入相关的 js 文件 --> | 9 | <!-- 引入相关的 js 文件 --> |
-
请 注册 或 登录 后发表评论