正在显示
5 个修改的文件
包含
198 行增加
和
3 行删除
| @@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
| 3 | return [ | 3 | return [ |
| 4 | 'Id' => 'ID', | 4 | 'Id' => 'ID', |
| 5 | 'App_type' => 'app类型', | 5 | 'App_type' => 'app类型', |
| 6 | + 'User_type' => '用户端_Android_APP', | ||
| 7 | + 'Admin_type' => '管理端_Android_APP', | ||
| 6 | 'Version' => '内部版本号', | 8 | 'Version' => '内部版本号', |
| 7 | 'Version_code' => '外部版本号例如12.3', | 9 | 'Version_code' => '外部版本号例如12.3', |
| 8 | 'Is_force' => '是否强制更新', | 10 | 'Is_force' => '是否强制更新', |
| @@ -34,7 +34,7 @@ class Appversion extends Model | @@ -34,7 +34,7 @@ class Appversion extends Model | ||
| 34 | 34 | ||
| 35 | public function getAppTypeList() | 35 | public function getAppTypeList() |
| 36 | { | 36 | { |
| 37 | - return ['xunjian' => __('Xunjian'), 'jianguan' => __('Jianguan'), 'iosjianguan' => __('Iosjianguan')]; | 37 | + return ['user_type' => __('User_type'), 'admin_type' => __('Admin_type')]; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | public function getIsForceList() | 40 | public function getIsForceList() |
application/app/controller/User.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 | + * Class Jg | ||
| 11 | + */ | ||
| 12 | +class User extends Frontend | ||
| 13 | +{ | ||
| 14 | + | ||
| 15 | + protected $noNeedLogin = '*'; | ||
| 16 | + protected $noNeedRight = '*'; | ||
| 17 | + protected $layout = ''; | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 用户端APP下载new | ||
| 23 | + * | ||
| 24 | + */ | ||
| 25 | + public function index() | ||
| 26 | + { | ||
| 27 | + $row = Db::name('appversion') | ||
| 28 | + ->where(['app_type' => 'user']) | ||
| 29 | + ->order('id desc') | ||
| 30 | + ->find(); | ||
| 31 | + if(!empty($row)){ | ||
| 32 | + $row['apk_url'] = full_image($row['apk_url']); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + $this->assign('row', $row); | ||
| 36 | + return $this->view->fetch('appv3'); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | +} |
application/app/view/jg/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> |
| @@ -26,11 +26,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -26,11 +26,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
| 26 | [ | 26 | [ |
| 27 | {checkbox: true}, | 27 | {checkbox: true}, |
| 28 | {field: 'id', title: __('Id')}, | 28 | {field: 'id', title: __('Id')}, |
| 29 | - {field: 'app_type', title: __('App_type'), searchList: {"xunjian":__('Xunjian'),"jianguan":__('Jianguan')}, formatter: Table.api.formatter.normal}, | 29 | + {field: 'app_type', title: __('App_type'), searchList: {"user_type":__('User_type'),"admin_type":__('Admin_type')}, formatter: Table.api.formatter.normal}, |
| 30 | {field: 'version', title: __('Version')}, | 30 | {field: 'version', title: __('Version')}, |
| 31 | {field: 'version_code', title: __('Version_code'), operate: 'LIKE'}, | 31 | {field: 'version_code', title: __('Version_code'), operate: 'LIKE'}, |
| 32 | {field: 'is_force', title: __('Is_force'), searchList: {"0":__('Is_force 0'),"1":__('Is_force 1')}, formatter: Table.api.formatter.normal}, | 32 | {field: 'is_force', title: __('Is_force'), searchList: {"0":__('Is_force 0'),"1":__('Is_force 1')}, formatter: Table.api.formatter.normal}, |
| 33 | - {field: 'apk_url', title: __('Hot_apk_url'), operate: 'LIKE', formatter: Table.api.formatter.url}, | 33 | + {field: 'apk_url', title: __('Apk_url'), operate: 'LIKE', formatter: Table.api.formatter.url}, |
| 34 | {field: 'hot_version', title: __('Hot_version')}, | 34 | {field: 'hot_version', title: __('Hot_version')}, |
| 35 | {field: 'hot_version_code', title: __('Hot_version_code'), operate: 'LIKE'}, | 35 | {field: 'hot_version_code', title: __('Hot_version_code'), operate: 'LIKE'}, |
| 36 | {field: 'hot_apk_url', title: __('Hot_apk_url'), operate: 'LIKE', formatter: Table.api.formatter.url}, | 36 | {field: 'hot_apk_url', title: __('Hot_apk_url'), operate: 'LIKE', formatter: Table.api.formatter.url}, |
-
请 注册 或 登录 后发表评论