detail.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  6. <meta name="format-detection" content="email=no" />
  7. <meta name="format-detection" content="telephone=no" />
  8. <title>提成明细</title>
  9. <link rel="stylesheet" href="../../css/reset.css">
  10. <style>
  11. html{font-size:10px}
  12. html,body{
  13. height: 100%;
  14. }
  15. .flex-wrap{
  16. display: -webkit-box;
  17. display: -webkit-flex;
  18. display: flex;
  19. }
  20. .flex-con{
  21. -webkit-box-flex: 1;
  22. -webkit-flex: 1;
  23. flex: 1;
  24. }
  25. body{
  26. display: -webkit-box;
  27. display: -webkit-flex;
  28. display: flex;
  29. -webkit-box-orient: vertical;
  30. -webkit-flex-flow: column;
  31. flex-flow: column;
  32. }
  33. header{
  34. width: 100%;
  35. height: 4rem;
  36. line-height: 4rem;
  37. background-color: #252736;
  38. position: fixed;
  39. top: 0;
  40. left: 0;
  41. z-index: 999;
  42. }
  43. header h2{
  44. width: 100%;
  45. height: 100%;
  46. font-size: 1.8rem;
  47. color: #fff;
  48. font-weight: lighter;
  49. text-align: center;
  50. position: relative;
  51. }
  52. header i{
  53. display: inline-block;
  54. width: 4.3rem;
  55. height: 4.3rem;
  56. background: url("../../img/index/backBtn.png") no-repeat 30%/60%;
  57. position: absolute;
  58. left: 0;
  59. bottom: 0;
  60. }
  61. header a{
  62. display: inline-block;
  63. font-size: 1.2rem;
  64. color: #fff;
  65. position: absolute;
  66. right: 1.2rem;
  67. top: 0;
  68. }
  69. main{
  70. background-color: #f7f7f7;
  71. padding-top: 8rem;
  72. padding-bottom: 5rem;
  73. overflow: auto;
  74. }
  75. .selDate{
  76. width: 100%;
  77. height: 4rem;
  78. line-height: 4rem;
  79. text-align: center;
  80. background-color: #fff;
  81. border-bottom: 1px solid #efefef;
  82. padding: 0 2rem;
  83. position: fixed;
  84. top: 4rem;
  85. left: 0;
  86. z-index: 999;
  87. }
  88. .detailList li{
  89. height: 5rem;
  90. font-size: 1.5rem;
  91. background-color: #fff;
  92. padding: 0 .6rem;
  93. border-bottom: 1px solid #f7f7f7;
  94. display: -webkit-box;
  95. display: -webkit-flex;
  96. display: flex;
  97. }
  98. .detailList li>div{
  99. height: 100%;
  100. }
  101. .subordinate{
  102. white-space: nowrap;
  103. -webkit-box-flex: 1;
  104. -webkit-flex: 1;
  105. flex: 1;
  106. }
  107. .subordinate span{
  108. display: inline-block;
  109. }
  110. .sUser{
  111. font-size: 1.1rem;
  112. padding: .5rem .6rem .5rem 0;
  113. }
  114. .sData{
  115. font-size: 1rem;
  116. }
  117. select{
  118. margin-right: .2rem;
  119. }
  120. .content{
  121. width: 8rem;
  122. line-height: 5rem;
  123. text-align: center;
  124. color: #ff5001;
  125. font-weight: 900;
  126. margin-left: 1rem;
  127. white-space: nowrap;
  128. }
  129. .timeBox>p{
  130. height: 5rem;
  131. line-height: 5rem;
  132. color: #8e8e8e;
  133. text-align: center;
  134. font-size: 1.5rem;
  135. border-bottom: 2px solid #3ecdf1;
  136. }
  137. #time>input{
  138. border: none;
  139. outline: none;
  140. }
  141. #search{
  142. padding: .5rem 1rem;
  143. color: #fff;
  144. background-color: #3d90db;
  145. border-radius: .2rem;
  146. margin-top: 1rem;
  147. }
  148. .btnDiv>div{
  149. width: 50%;
  150. height: 4rem;
  151. line-height: 4rem;
  152. text-align: center;
  153. font-size: 1.4rem;
  154. border-top: 1px solid #efefef;
  155. }
  156. .waitDiv{
  157. width: 1rem;
  158. height: 1rem;
  159. background: url("../../img/order/waiting.gif") round;
  160. position: absolute;
  161. left: calc(50% - .5rem);
  162. top: calc(50% - .5rem);
  163. display: none;
  164. }
  165. .mainPB{
  166. width: 100%;
  167. height: 9rem;
  168. }
  169. .detailList ul.hid{
  170. display: none;
  171. }
  172. .remindDiv{
  173. height: 3rem;
  174. line-height: 3rem;
  175. text-align: center;
  176. font-size: 1.2rem;
  177. color: #fff;
  178. padding: 0 1rem;
  179. border-radius: 2rem;
  180. background-color: rgba(0,0,0,0.7);
  181. position: fixed;
  182. bottom: 20%;
  183. left: 50%;
  184. -webkit-transform: translateX(-50%);
  185. transform: translateX(-50%);
  186. opacity: 0;
  187. -webkit-transition: .5s;
  188. transition: .5s;
  189. z-index: -99;
  190. }
  191. .remindDiv.active{
  192. opacity: 1;
  193. z-index: 99;
  194. }
  195. footer{
  196. width: 100%;
  197. height: 5rem;
  198. color: rgba(0,0,0,0.7);
  199. background-color: #fff;
  200. position: fixed;
  201. left: 0;
  202. bottom: 0;
  203. }
  204. .footNav>li{
  205. font-size: 1rem;
  206. text-align: center;
  207. padding-top: .7rem;
  208. -webkit-box-flex: 1;
  209. -webkit-flex: 1;
  210. flex: 1;
  211. }
  212. .footNav>li.active{
  213. color: #609f25;
  214. }
  215. .footNav>li i{
  216. display: inline-block;
  217. width: 2rem;
  218. height: 2rem;
  219. background-size: 100%;
  220. margin-bottom: .1rem;
  221. }
  222. .footNav>li:nth-of-type(1) i{
  223. background: url("../../img/index/home.png") round;
  224. }
  225. .footNav>li:nth-of-type(2) i{
  226. background: url("../../img/index/shop.png") round;
  227. }
  228. .footNav>li:nth-of-type(3) i{
  229. background: url("../../img/index/car.png") round;
  230. }
  231. .footNav>li:nth-of-type(4) i{
  232. background: url("../../img/index/order.png") round;
  233. }
  234. .footNav>li:nth-of-type(5) i{
  235. background: url("../../img/index/my2.png") round;
  236. }
  237. .footNav>li:nth-of-type(3){
  238. position: relative;
  239. }
  240. .shopCarTag{
  241. width: 1.8rem;
  242. height: 1.8rem;
  243. line-height: 1.8rem;
  244. text-align: center;
  245. white-space: nowrap;
  246. background: url("../../img/index/shopYuan.png") round;
  247. color: #fff;
  248. font-size: 1rem;
  249. border-radius: 50%;
  250. position: absolute;
  251. top: 0;
  252. right: .6rem;
  253. display: none;
  254. }
  255. @media screen and (min-width:321px) and (max-width:375px){html{font-size:11px}}
  256. @media screen and (min-width:376px) and (max-width:414px){html{font-size:12px}}
  257. @media screen and (min-width:415px) and (max-width:639px){html{font-size:13px}}
  258. @media screen and (min-width:640px) and (max-width:719px){html{font-size:18px}}
  259. @media screen and (min-width:720px) and (max-width:749px){html{font-size:19px}}
  260. @media screen and (min-width:750px) and (max-width:799px){html{font-size:20px}}
  261. @media screen and (min-width:800px){html{font-size:21px}}
  262. </style>
  263. </head>
  264. <body>
  265. <header>
  266. <h2><i id="backBtn" onclick="toBack()"></i>提成明细<a href="../my.html">我的</a></h2>
  267. </header>
  268. <main class="flex-con">
  269. <div class="selDate clearFix">
  270. <span id="time" class="left">选择日期:
  271. <select id="timeY">
  272. <option value="2017">2017</option>
  273. </select>
  274. <select id="timeM">
  275. <option value="01">01</option>
  276. <option value="02">02</option>
  277. <option value="03">03</option>
  278. <option value="04">04</option>
  279. <option value="05">05</option>
  280. <option value="06">06</option>
  281. <option value="07">07</option>
  282. <option value="08">08</option>
  283. <option value="09">09</option>
  284. <option value="10">10</option>
  285. <option value="11">11</option>
  286. <option value="12">12</option>
  287. </select>
  288. </span>
  289. <button id="search" class="right">搜索</button>
  290. </div>
  291. <div class="detailList">
  292. <ul class="hid">
  293. <li>
  294. <div class="subordinate">
  295. <p class="sUser clearFix"><span class="SUName left">昵称:{{name}}</span><span class="SUPhone right">电话:{{phone}}</span></p>
  296. <p class="sData"><span class="SUNZFB">支付宝:{{ZFB}}</span></p>
  297. </div>
  298. <div class="content">+{{money}}</div>
  299. </li>
  300. </ul>
  301. </div>
  302. <div class="waitDiv"></div>
  303. <div class="mainPB"></div>
  304. <div class="remindDiv"></div>
  305. </main>
  306. <footer>
  307. <nav>
  308. <ul class="footNav flex-wrap">
  309. <li>
  310. <i></i>
  311. <p>首页</p>
  312. </li>
  313. <li>
  314. <i></i>
  315. <p>商城</p>
  316. </li>
  317. <li>
  318. <i></i>
  319. <p>购物车</p>
  320. <div class="shopCarTag">0</div>
  321. </li>
  322. <li>
  323. <i></i>
  324. <p>订单</p>
  325. </li>
  326. <li class="active">
  327. <i></i>
  328. <p>我的</p>
  329. </li>
  330. </ul>
  331. </nav>
  332. </footer>
  333. <script src="../../js/publicData.js"></script>
  334. <script src="../../js/modules.js"></script>
  335. <script>
  336. window.onload=function () {
  337. var aFooterLi=document.getElementsByClassName("footNav")[0].getElementsByTagName("li"),
  338. detailList=document.getElementsByClassName("detailList")[0],
  339. waitDiv=document.getElementsByClassName("waitDiv")[0],
  340. shopCarTag=document.getElementsByClassName("shopCarTag")[0],
  341. remindDiv=document.getElementsByClassName("remindDiv")[0],
  342. clBtn=document.getElementsByClassName("clBtn")[0],
  343. suBtn=document.getElementsByClassName("suBtn")[0],
  344. selDate=document.getElementById("selDate"),
  345. timeY=document.getElementById("timeY"),
  346. timeM=document.getElementById("timeM"),
  347. oTimeBtn=document.getElementById("search");
  348. var pageList=["index.html","shopPage.html","shopCar.html","order.html","my.html"],
  349. liModel=detailList.getElementsByTagName("ul")[0].innerHTML,oRemindTime;
  350. if(is_weixin()){
  351. var mainPB=document.getElementsByClassName("mainPB")[0];
  352. mainPB.style.display="none";
  353. }
  354. Ajax("get",pageUrl+"/Api/Index/shopCar","",function (data) {
  355. if(data.status=="999"){
  356. window.location.href="../login.html";
  357. }
  358. if(data.data&&!data.data.length) return;
  359. shopCarTag.innerText=data.data.length;
  360. shopCarTag.style.display="block";
  361. sessionStorage.setItem("carNum",data.data.length||0);
  362. })
  363. var nowTime=new Date();
  364. var nowYear=nowTime.getFullYear()-0;
  365. var nowMonth=nowTime.getMonth();
  366. var str="",num=0;
  367. if(location.search.slice(1).split("=")[1]){
  368. var monNum=location.search.slice(1).split("=")[1].slice(4)-0;
  369. timeM.getElementsByTagName("option")[monNum-1].setAttribute("selected","selected");
  370. getData(location.search.slice(1).split("=")[1]);
  371. }else {
  372. timeM.getElementsByTagName("option")[nowMonth-1].setAttribute("selected","selected");
  373. }
  374. for(var year=0;year<=5;year++){
  375. num=nowYear-year;
  376. if(num==nowTime.getFullYear()){
  377. str+="<option value='"+num+"' selected>"+num+"</option>";
  378. }else {
  379. str+="<option value='"+num+"'>"+num+"</option>";
  380. }
  381. }
  382. timeY.innerHTML=str;
  383. oTimeBtn.onclick=function () {
  384. var time=[];
  385. if(!timeY.value||!timeM.value){
  386. remindMes('请选择日期');
  387. return;
  388. }
  389. time[0]=timeY.value;
  390. time[1]=timeM.value;
  391. if(time[1].length==1){
  392. time[1]="0"+time[1];
  393. }
  394. getData(time[0]+time[1])
  395. }
  396. function getData(val) {
  397. waitDiv.style.display="block";
  398. Ajax("get",pageUrl+"/Fencheng/vipfc","month="+val,function (data) {
  399. if(data.status==999) window.location.href="../login.html";
  400. var data=data.data;
  401. detailList.innerHTML="";
  402. var str="<ul>";
  403. if(data.length){
  404. for(var i in data){
  405. str+=liModel.replace("{{name}}",data[i].nickname).replace("{{phone}}",data[i].mobile).replace("{{ZFB}}",data[i].txcard)
  406. .replace("{{money}}",data[i].total);
  407. }
  408. str+="</ul>";
  409. waitDiv.style.display="none";
  410. detailList.innerHTML=str;
  411. }else {
  412. waitDiv.style.display="none";
  413. remindMes("无该月数据")
  414. }
  415. })
  416. }
  417. for(var i=0,len=aFooterLi.length;i<len;i++){
  418. !function (i) {
  419. aFooterLi[i].onclick=function () {
  420. var url=location.href;
  421. if(url.indexOf("?")!=-1){
  422. if(pageList[i]==url.slice(url.lastIndexOf("/")+1,url.indexOf("?"))) return;
  423. }else {
  424. if(pageList[i]==url.slice(url.lastIndexOf("/")+1)) return;
  425. }
  426. if(!i){
  427. location.href="../../index.html";
  428. }else {
  429. location.href="../"+pageList[i];
  430. }
  431. }
  432. }(i)
  433. }
  434. function remindMes(val) {
  435. if(oRemindTime) clearTimeout(oRemindTime);
  436. remindDiv.innerText=val;
  437. addCls(remindDiv,'active');
  438. oRemindTime=setTimeout(function () {
  439. removeCls(remindDiv,'active');
  440. oRemindTime=undefined;
  441. },2000)
  442. }
  443. }
  444. function is_weixin(){
  445. var ua = navigator.userAgent;
  446. if(/(MicroMessenger)/i.test(ua)) {
  447. return true;
  448. } else {
  449. return false;
  450. }
  451. }
  452. function toBack() {
  453. window.history.back();
  454. }
  455. </script>
  456. </body>
  457. </html>