index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="divport" content="width=device-width, initial-scale=1.0">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  8. <link rel="stylesheet" href="/assets/frontend/recharge/reset.css">
  9. <link rel="stylesheet" href="/assets/frontend/recharge/icon.css">
  10. <title>充值</title>
  11. <style>
  12. .page {
  13. height: 100vh;
  14. width: 100%;
  15. overflow: hidden;
  16. }
  17. .content{
  18. padding-top: 0.40rem;
  19. display: flex;
  20. flex-direction: column;
  21. align-items: center;
  22. height: 100%;
  23. margin:0 auto;
  24. width: 8.00rem;
  25. background-color: #f8f8f8;
  26. }
  27. .phone-wrap {
  28. width: 7.50rem;
  29. padding:0 0.15rem 0.15rem;
  30. }
  31. .phone-item {
  32. width: 100%;
  33. height: 0.35rem;
  34. border-bottom: 2px solid #eee;
  35. justify-content: space-between;
  36. }
  37. .phone-item input {
  38. flex:1;
  39. font-size: 0.16rem;
  40. background-color: #f8f8f8;
  41. }
  42. .phone-item .phone-nick{
  43. color:#999999;
  44. font-size: 0.13rem;
  45. }
  46. .recharge-wrap {
  47. width: 7.50rem;
  48. padding: 0.15rem;
  49. padding-top: 0rpx;
  50. padding-bottom: 0rpx;
  51. }
  52. .recharge-title {
  53. font-size: 0.16rem;
  54. font-weight: bold;
  55. }
  56. .exchange-section {
  57. margin-top: 0.10rem;
  58. display: flex;
  59. flex-wrap: wrap;
  60. /* justify-content: space-between; */
  61. }
  62. .exchange-box {
  63. width: 1.25rem;
  64. height: 0.71rem;
  65. border: 0.01rem solid #7D73DC;
  66. border-radius: 0.10rem;
  67. margin-bottom: 0.15rem;
  68. color: #999999;
  69. align-items: center;
  70. justify-content: center;
  71. cursor: pointer;
  72. margin-right: 0.40rem;
  73. }
  74. .exchange-box:nth-child(4n){
  75. margin-right: 0;
  76. }
  77. .exchange-top {
  78. display: flex;
  79. align-items: center;
  80. }
  81. .exchange-pic {
  82. height: auto;
  83. width: 0.18rem;
  84. margin-right: 0.07rem;
  85. }
  86. .diamonds-num {
  87. font-size: 0.16rem;
  88. color: #261A00;
  89. }
  90. /* .actvie {
  91. color: #FFFFFF;
  92. } */
  93. .diamonds-name {
  94. font-size: 0.12rem;
  95. margin-left: 0.04rem;
  96. }
  97. .exchange-price {
  98. font-size: 0.12rem;
  99. margin-top: 0.10rem;
  100. }
  101. .current {
  102. background: linear-gradient(90deg, #629CFF, #7870F1);
  103. box-shadow: 0px 3px 5px 0px rgba(126, 114, 220, 0.59);
  104. color: #FFFFFF !important;
  105. }
  106. .current .diamonds-num{
  107. color: #FFFFFF;
  108. }
  109. .mode-wrap{
  110. width: 7.50rem;
  111. height: 1.15rem;
  112. padding: 0.15rem;
  113. padding-top:0rpx;
  114. }
  115. .mode-wrap .mode-title{
  116. font-size: 0.16rem;
  117. font-weight: bold;
  118. }
  119. .mode-item{
  120. width: 7.50rem;
  121. height: 0.20rem;
  122. justify-content: space-between;
  123. margin-top: 0.10rem;
  124. cursor: pointer;
  125. }
  126. .mode-left{
  127. font-size: 0.14rem;
  128. }
  129. .mode-left .zicon-weixin{
  130. font-size: 0.27rem;
  131. color: #46BB36;
  132. margin-right: 0.07rem;
  133. }
  134. .mode-left .zicon-alipay{
  135. color:#02A9F1;
  136. font-size: 0.27rem;
  137. margin-right: 0.07rem;
  138. }
  139. .pay-ic{
  140. font-size: 0.20rem;
  141. }
  142. .zicon-xuanze{
  143. color: #46BB36;
  144. }
  145. .zicon-xuanze1{
  146. color: #999;
  147. }
  148. .mode-tips{
  149. width: 7.50rem;
  150. align-items: flex-start;
  151. margin-top: 0.20rem;
  152. }
  153. .mode-tips .zicon-tishi{
  154. font-size: 0.14rem;
  155. color: #FFCE00;
  156. margin-top: 8rpx;
  157. }
  158. .mode-tips .mode-txt{
  159. /* width: 2.25rem; */
  160. margin-left: 0.05rem;
  161. color: #999999;
  162. font-size: 0.12rem;
  163. }
  164. .recharge-btn{
  165. width: 2.90rem;
  166. height: 0.40rem;
  167. background: #EEEEEE;
  168. border-radius: 0.20rem;
  169. margin: 0.50rem auto 0.10rem;
  170. font-size: 0.15rem;
  171. font-family: PingFang SC;
  172. font-weight: 500;
  173. cursor: pointer;
  174. }
  175. .recharge-btn.active{
  176. background: linear-gradient(90deg, #629CFF, #7870F1);
  177. color: #FFFFFF;
  178. }
  179. @media(max-width: 500px) {
  180. .content{
  181. width: 100%;
  182. }
  183. .phone-wrap{
  184. width: 100%;
  185. }
  186. .recharge-wrap{
  187. width: 100%;
  188. }
  189. .mode-wrap{
  190. width: 100%;
  191. }
  192. .mode-item{
  193. width: 100%;
  194. }
  195. }
  196. </style>
  197. <script>
  198. !(function(win, doc) {
  199. function setFontSize() {
  200. var docEl = doc.documentElement;
  201. var winWidth = docEl.clientWidth;
  202. doc.documentElement.style.fontSize = (winWidth / 1920) * 100 + "px";
  203. }
  204. var userAgent = navigator.userAgent;
  205. win.addEventListener("resize", function() {
  206. if (navigator.userAgent !== userAgent) {
  207. location.reload();
  208. }
  209. });
  210. setFontSize();
  211. })(window, document);
  212. </script>
  213. </head>
  214. <body>
  215. <div class="page">
  216. <div class="content">
  217. <form method="post" action="/index/recharge/recharge_pc">
  218. <div class="phone-wrap row">
  219. <div class="phone-item row">
  220. <input type="text" name="mobile" placeholder="请输入注册手机号" autofocus="true"/>
  221. <!--<span class="phone-nick" >昵称: 李大娃</span>-->
  222. </div>
  223. </div>
  224. <div class="recharge-wrap">
  225. <div class="recharge-title">充值金额</div>
  226. <div class="exchange-section">
  227. <!-- current为激活状态 @click="clickBox(index)"-->
  228. {volist name='conf_list' id='vo'}
  229. <div class="exchange-box column <?php if($i==1){echo 'current';}?>" data-id="{$vo.id}">
  230. <div class="exchange-top">
  231. <img class="exchange-pic" src="/assets/frontend/recharge/images/b-b.png"></img>
  232. <div class="diamonds-num" >{$vo.gold}</div>
  233. <div class="diamonds-name">金币</div>
  234. </div>
  235. <div class="exchange-price">¥{$vo.money}</div>
  236. </div>
  237. {/volist}
  238. </div>
  239. </div>
  240. <div class="mode-wrap" >
  241. <div class="mode-title">充值方式</div>
  242. <!--<div class="mode-item row" data-type="wechat">
  243. <div class="mode-left row">
  244. <div class="zicon zicon-weixin"></div>
  245. <div>微信充值</div>
  246. </div>
  247. <div class="zicon pay-ic zicon-xuanze1"></div>
  248. </div>-->
  249. <div class="mode-item row" data-type="alipay">
  250. <div class="mode-left row">
  251. <div class="zicon zicon-alipay"></div>
  252. <div>支付宝充值</div>
  253. </div>
  254. <!-- <div class="zicon" :class="choosed ? 'zicon-xuanze' : 'zicon-xuanze1'" @click="changeIcon"></div> -->
  255. <div class="zicon pay-ic zicon-xuanze"></div>
  256. </div>
  257. <div class="mode-tips row">
  258. <div class="zicon zicon-tishi"></div>
  259. <div class="mode-txt">说明:充值前请确认您已满18周岁,金币充值成功后无法退款,不可提现。</div>
  260. </div>
  261. </div>
  262. <input type="submit" class="recharge-btn center active" value="立即充值" />
  263. <input type="hidden" name="pay_type" value="alipay" class="payType">
  264. <input type="hidden" name="rc_id" value="1" class="rcId">
  265. <!--<div class="recharge-btn center active">立即充值</div>-->
  266. </form>
  267. </div>
  268. </div>
  269. </body>
  270. </html>
  271. <script src="/assets/frontend/recharge/jquery.min.js"></script>
  272. <script>
  273. $(".mode-item").click(function (e) {
  274. $(this).find(".pay-ic").removeClass("zicon-xuanze1").addClass("zicon-xuanze");
  275. $(this).siblings().find(".pay-ic").removeClass("zicon-xuanze").addClass("zicon-xuanze1");
  276. var type = $(this).data("type");
  277. $(".payType").val(type);
  278. console.log($(".payType").val());
  279. });
  280. $(".exchange-box").click(function (e) {
  281. $(this).addClass("current").siblings().removeClass("current")
  282. var id = $(this).data("id");
  283. $(".rcId").val(id);
  284. console.log($(".rcId").val());
  285. });
  286. </script>
  287. <script>
  288. !(function(win, doc) {
  289. function $_getDevice() {
  290. var docEl = doc.documentElement;
  291. const winWidth = docEl.clientWidth;
  292. if(winWidth - 1 < 750){
  293. return 'mobile'
  294. }else if(winWidth - 1 < 1400){
  295. return 'book'
  296. }else {
  297. return 'pc'
  298. }
  299. }
  300. function setFontSize() {
  301. var docEl = doc.documentElement;
  302. var winWidth = docEl.clientWidth;
  303. var device = $_getDevice();
  304. var designSize =  device == 'mobile' ? 750 : (device == 'book' ? 1400 : 1920);
  305. var scaleV = 100;
  306. if(device == 'mobile'){
  307. scaleV = 200
  308. }
  309. doc.documentElement.style.fontSize = (winWidth / designSize) * scaleV + "px";
  310. }
  311. var userAgent = navigator.userAgent;
  312. win.addEventListener("resize", function() {
  313. if (navigator.userAgent !== userAgent) {
  314. location.reload();
  315. }
  316. });
  317. setFontSize();
  318. })(window, document);
  319. </script>