new-pag2.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>活动-市场推荐王-创业帮</title>
  6. <meta name="keywords" content="活动-市场推荐王-创业帮">
  7. <meta name="description" content="活动-市场推荐王-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="活动-市场推荐王-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. <style>
  17. @keyframes rotate361 {from { transform: translate(-25%,-5%) rotate(0deg);}to { transform: translate(-25%,-5%) rotate(360deg);}}
  18. @keyframes scale1-pos{ 0% { transform: translateX(-50%) scale(1);} 50%{transform: translateX(-50%) scale(1.05);} 100% { transform: translateX(-50%) scale(1);}}
  19. @keyframes scale1-gold1{ 0% { transform: translate(0%,0%) scale(1);} 50%{transform: translate(30%,30%) scale(.7);} 100% { transform: translate(0%,0%) scale(1);}}
  20. @keyframes scale1-gold2{ 0% { transform: translate(0%,0%) scale(1);} 50%{transform: translate(-30%,30%) scale(.8);} 100% { transform: translate(0%,0%) scale(1);}}
  21. @keyframes scale1-gold3{ 0% { transform: translate(0%,0%) scale(1) rotate(0deg);} 25%{transform:rotate(10deg);} 50%{transform: translate(-30%,-30%) scale(.8) rotate(0deg);} 25%{transform:rotate(-10deg);} 100% { transform: translate(0%,0%) scale(1) rotate(0deg);}}
  22. @keyframes roatehand1{ 0% { transform: rotate(0deg);} 50%{ transform: rotate(-10deg);} 100% { transform: rotate(0deg);}}
  23. @keyframes roatehand2{ 0% { transform: rotate(0deg);} 50%{ transform: rotate(-10deg);} 100% { transform: rotate(0deg);}}
  24. @keyframes bankcard{ 0% { transform: translate(0%,0%) ;} 50%{ transform: translate(20%,-10%) scale(.95);} 100% { transform: translate(0%,0%);}}
  25. @keyframes rotatepos{ 0% { transform: translate(50%,-50%) rotate(0deg) ;} 25%{transform: translate(50%,-50%) rotate(5deg);} 50%{ transform: translate(50%,-50%) rotate(0deg);} 75%{transform: translate(50%,-50%) rotate(-5deg);} 100% { transform: translate(50%,-50%) rotate(0deg);}}
  26. .recommend .iphonetitle{background-color: #eb4920 !important;background-image: none !important;}
  27. .recommend .title{background-color: #eb4920 !important;}
  28. .recommend .van-tabs__line{height:100% !important;bottom:0;width:33.33% !important;border-radius:999px !important;border:.0533rem solid #FFB638;box-sizing:border-box;background-image:linear-gradient(to top, #E24825 0%, #E88756 100%) !important;}
  29. .van-tabs__nav{padding:0 !important; background-color: #FFF0D3;border-radius:999px !important;}
  30. .van-tab__text{z-index:10; color:#F67C45;font-weight:700;font-size:.3733rem;}
  31. .van-tab--active .van-tab__text{color:#fff;}
  32. .recommend {background-image:linear-gradient(to bottom, #E7461B 20%,#EC6224 50%) !important;min-height:100vh;}
  33. .main,.signup{width:92%;background-color:#FFF9ED;margin:0 auto;padding:.6933rem .4267rem .35rem;box-sizing:border-box;border-radius:.16rem;margin-bottom:.2667rem;}
  34. .complete{color:#F67C45;}
  35. .uncomplete{color:#F67C45;opacity:.4;}
  36. .uncompletetask{color:#B7B7B7;}
  37. .option{margin-top:-2.4rem;z-index:999;}
  38. .signup{padding:.2667rem;z-index:999;}
  39. .signup img{width:1.7067rem;}
  40. .top-bar{width:100vw;height:1.3333rem;z-index:9999;}
  41. .top-bar img{width:.7467rem;margin-left:.48rem;}
  42. .van-sticky--fixed .top-bar{background-color:#eb4920;}
  43. .signup .center .top{font-size:.64rem; color:#EA5D37;font-weight:700;font-style:italic}
  44. .signup .center .label{border-radius:.08rem;width:85%;height:.48rem; font-size:.2667rem; color:#EF8700; background-color:#FFE8A2; border:1px solid #EFAA00;margin:0 auto;margin-top:.24rem;justify-content:center;}
  45. .signup .right{width:1.4933rem;height:1.4933rem; background-image:linear-gradient(to top, #E24825 0%,#E88756 100%);border-radius:999px;justify-content:center;border:2px solid #E74924;}
  46. .signup .right2{width:1.4933rem;height:1.4933rem; background-image:linear-gradient(to top, #999999 0%,#b2b2b2 100%);border-radius:999px;justify-content:center;border:2px solid #c0c0c0;}
  47. .signup .right .font{color:#FFF3E8;line-height:1;}
  48. .tsop .productimg{width:.8533rem;margin-top:.4533rem;}
  49. .tsop .tips{font-size:.24rem;margin-top:.5867rem;}
  50. .csop .item{padding:.4267rem;margin-bottom:.2133rem;border-radius:.16rem;}
  51. .csop {padding-top:.3467rem;}
  52. .csop .photo img{width:.64rem;}
  53. .csop .photo{margin-bottom:.3467rem;}
  54. .csop .photo .name{margin-left:.16rem;}
  55. .csop .item .font{color:#FFB390;}
  56. .csop .item .num{color:#F67C45;}
  57. .csop .photo .code{margin-left:.24rem;}
  58. .csop .progress .top {z-index:1;}
  59. .csop .progress .top .block{width:1.7067rem; height:.7467rem;background-color:#FFF0D3;border-radius:999px;justify-content:center;}
  60. .csop .progress .top .block .productimg{height:.3733rem;margin-right:.1333rem;}
  61. .csop .progress .top .abs{background-color:#FFF0D3;height:.1333rem;width:100%;top:50%;transform:translateY(-50%);}
  62. .csop .progress .center{margin-top:.4267rem;background-color:#F98027;height:.2667rem;border-radius:999px;padding:0 1px;}
  63. .csop .progress .center .progressbar{background-image:linear-gradient(to top, #FFC320 0%,#FFFFFF 100%);height:.2133rem;border-radius:999px;}
  64. .csop .progress .center .progressbar img{width:.7733rem;top:50%;right:0;animation:rotatepos .5s linear infinite;}
  65. .csop .progress .bottom{margin-top:.5333rem;}
  66. .top-image{z-index:-1;}
  67. .top-image .recommend-man-right{width:2.9067rem;right:.7467rem;bottom:.5333rem ;}
  68. .top-image .recommend-woman-left{width:3.5467rem ;left:.56rem;bottom:1.3067rem;}
  69. .top-image .recommend-bottom{width:100% ;left:0;bottom:.9867rem;}
  70. .top-image .recommend-pos{width:3.2267rem;left:50%;bottom:2.4267rem;transform:translateX(-50%);animation:scale1-pos 2s 2s linear infinite;}
  71. .top-image .recommend-card{width:1.8933rem;left:0;bottom:3.7333rem;animation:bankcard 5s linear infinite;}
  72. .top-image .recomment-gold1{width:1.8667rem;left:-9%;bottom:6.7733rem;animation:scale1-gold1 5s linear infinite;}
  73. .top-image .recomment-gold2{width:.8rem;right:0;bottom:6.48rem;animation:scale1-gold2 5s linear infinite;}
  74. .top-image .recomment-gold3{width:1.4933rem;right:.72rem;bottom:2.4rem;transform-origin:left bottom;animation:scale1-gold3 5s linear infinite;}
  75. .top-image .recomment-cloud-right{width:2.56rem;right:0;bottom:2.9867rem;}
  76. .top-image .recomment-cloud-left{width:2.6933rem;left:0;bottom:2.9867rem;}
  77. .top-image .recommend-hand-left{width:1.4133rem;right:.4rem;top:1.7333rem;transform-origin:right top;animation:roatehand1 5s linear infinite;}
  78. .top-image .recommend-hand-right{width:2.1333rem;right:.4533rem;top:2.1867rem;animation:roatehand2 3s linear infinite;}
  79. .imgrotate{width:200%;animation:rotate361 10s linear infinite;}
  80. .headphoto{border-radius:50%;}
  81. </style>
  82. </head>
  83. <body class="pb0 ovh recommend">
  84. <div class="iphonetitle"></div>
  85. <div class="ovh-x panel" id="app" v-cloak ref="wrapper1">
  86. <van-sticky :offset-top="topheight" v-cloak>
  87. <div class="top-bar abs df aic">
  88. <div @click="backbtn"><img src="./static/images/active/recommend/recommend-back.png" alt=""></div>
  89. </div>
  90. </van-sticky>
  91. <div class="top-image rel df"><img src="./static/images/active/recommend/recommend-bg-image.png" alt="" style="width:100%;"><img class="imgrotate abs" src="./static/images/light.png" alt=""><img class="recommend-pos abs" src="./static/images/active/recommend/recommend-pos.png"><img class="recommend-bottom abs" src="./static/images/active/recommend/recommend-bottom.png"><img class="recomment-cloud-right abs" src="./static/images/active/recommend/recomment-cloud-right.png"><img class="recomment-gold2 abs" src="./static/images/active/recommend/recomment-gold2.png">
  92. <div class="recommend-man-right abs"><img src="./static/images/active/recommend/recommend-man-right.png" style="width:100%;">
  93. <div class="recommend-hand-right abs"><img src="./static/images/active/recommend/recommend-hand-right.png" style="width:100%;"></div>
  94. </div><img class="recomment-cloud-left abs" src="./static/images/active/recommend/recomment-cloud-left.png">
  95. <div class="recommend-woman-left abs"><img src="./static/images/active/recommend/recommend-woman-left.png" style="width:100%;">
  96. <div class="abs recommend-hand-left"><img src="./static/images/active/recommend/recommend-hand-left.png" style="width:100%;"></div>
  97. </div><img class="recommend-card abs" src="./static/images/active/recommend/recommend-card.png"><img class="recomment-gold1 abs" src="./static/images/active/recommend/recomment-gold1.png"><img class="recomment-gold3 abs" src="./static/images/active/recommend/recomment-gold3.png">
  98. </div>
  99. <div class="option">
  100. <div class="signup df jcsb"><img src="./static/images/active/recommend/recommend-purse.png">
  101. <div class="center tc">
  102. <div class="top">等你来挑战!</div>
  103. <div class="f10 label df aic">报名时间:每月1-7日</div>
  104. </div>
  105. <div class="right df aic" @click="joinactive" v-if="joinstatus === 0 &amp;&amp; loaded &amp;&amp; !isend">
  106. <div class="font f14">
  107. <div>立即</div>
  108. <div>参与</div>
  109. </div>
  110. </div>
  111. <div class="right2 df aic" v-if="joinstatus !== 0 &amp;&amp; loaded &amp;&amp; !isend">
  112. <div class="font f14 cfff">
  113. <div>已报名</div>
  114. </div>
  115. </div>
  116. <div class="right2 df aic" v-if="loaded &amp;&amp; isend">
  117. <div class="font f14 cfff tc">
  118. <div>报名</div>
  119. <div>已结束</div>
  120. </div>
  121. </div>
  122. <div class="right2 df aic" v-if="!loaded">
  123. <div class="font f14 cfff">
  124. <div>加载中</div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="main">
  129. <van-tabs v-model="active" swipeable animated line-width="50" color="#FFD500" @change="checktab" line-height="2" :ellipsis="false">
  130. <van-tab title="活动介绍">
  131. <div class="f14" v-html="articleinfo.Contents" style="line-height:1.4;"></div>
  132. </van-tab>
  133. <van-tab title="任务进度">
  134. <div class="tc c333 mt16" style="padding-bottom:8px;color:#FFB390;font-size:16px;" v-if="joinstatus === 0">暂未报名</div>
  135. <div class="tsop" style="padding-bottom:8px;" v-else>
  136. <div class="df jcsb">
  137. <div class="f10" v-for="item,index in 6"><img class="productimg" :src="index&lt;finishnum? './static/images/active/recommend/recommend-tast-pos.png':'./static/images/active/recommend/recommend-tast-pos1.png'">
  138. <div :class="index&lt;finishnum? 'complete':'uncompletetask'">{{index < finishnum ? '已完成' : '未完成'}}</div>
  139. </div>
  140. </div>
  141. <div class="complete tips">*当月直推新创客或激活未开机创客(含商户型创客)且该创客当月完成创客进度页任务计1次成功推荐,当月成功推荐达到6次即完成任务。</div>
  142. </div>
  143. </van-tab>
  144. <van-tab title="创客进度">
  145. <div class="tc c333 mt16" style="padding-bottom:8px;color:#FFB390;font-size:16px;" v-if="joinstatus === 0">暂未报名</div>
  146. <div class="csop" v-else>
  147. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  148. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
  149. <div class="item bgcfff" v-for="item,index in creatorlist">
  150. <div class="photo df jcsb aic">
  151. <div class="df aic"><img class="headphoto" :src="item.HeadPhoto">
  152. <div class="c333 name b f16" style="margin-left:6px;">{{item.Name}}</div>
  153. <div class="c333 code f12" style="margin-left:9px;">{{item.MakerCode}}</div>
  154. </div>
  155. <div> <span class="font">当前激活数:</span><span class="num">{{item.PosCount}}</span><span class="font">台</span></div>
  156. </div>
  157. <div class="progress" style="width:100%;">
  158. <div class="top rel">
  159. <div class="abs" style="z-index:-1;"></div>
  160. <div class="df jcsb">
  161. <div class="block" v-for="i,ind in 3">
  162. <div class="block df aic" :class="item.PosCount &gt;= ind+1? 'complete':'uncomplete'"><img class="productimg" src="./static/images/active/recommend/recommend-progress-pos1.png">
  163. <div class="f10">{{item.PosCount >= ind+1? '已激活' : '待激活'}}</div>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. <div class="center df aic">
  169. <div class="progressbar rel" :style="'width:' + item.progressbar + '%;'"><img class="abs" src="./static/images/active/recommend/recommend-progress-pos.png"></div>
  170. </div>
  171. <div class="bottom c333 tc f14"><span class="num b" v-if="item.PosAmount &gt;= item.PosCount * 30000 &amp;&amp; item.PosCount &gt;= 3">已达标</span>
  172. <div v-else><span class="font">当月交易额:</span><span class="num b">¥{{abs(tofixed2(item.PosAmount))}}/{{abs(tofixed2(item.PosCount === 0 ? 30000.00 : item.PosCount * 30000))}}</span></div>
  173. </div>
  174. </div>
  175. </div>
  176. </van-list>
  177. </div>
  178. </van-tab>
  179. </van-tabs>
  180. </div>
  181. </div>
  182. </div>
  183. <script src="./static/js/klm-vv.min.js"></script>
  184. <script src="./static/js/appfunc.min.js"></script>
  185. <script src="./static/js/klm-axios-config.js"></script>
  186. <script src="./static/js/publicfn.js"></script>
  187. <script src="./static/js/libpag.js"></script>
  188. <script>
  189. // 在 #app 标签下渲染一个按钮组件
  190. let app = new Vue({
  191. el: '#app',
  192. data() {
  193. return {
  194. isnodata:false,
  195. active:0,
  196. topheight:0,
  197. joinstatus:0,
  198. creatorlist:[
  199. ],
  200. loading: true,
  201. finished: false,
  202. refreshing: false,
  203. articleinfo:'',
  204. finishnum:0,
  205. pageinfo:{
  206. PageSize:10,
  207. PageNum:1,
  208. },
  209. loaded:false,
  210. isend:true,
  211. }
  212. },
  213. created() {
  214. if(new Date().getDate() < 8){
  215. this.isend = false;
  216. };
  217. this.topheightfn();
  218. this.getmakercode();
  219. this.isjoin();
  220. },
  221. mounted(){
  222. this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight - this.topheight}px`;
  223. },
  224. beforeUpdate() {
  225. },
  226. computed:{
  227. },
  228. watch:{
  229. },
  230. methods: {
  231. onLoad() {
  232. if (this.refreshing) {
  233. this.refreshing = false;
  234. }
  235. this.pageinfo.PageNum++;
  236. this.getcreatordata();
  237. },
  238. joinactive(){
  239. PublicLib.putCookieInfo('malldetailId', 29);
  240. PublicLib.Goto({Url:'mall-detail'});
  241. },
  242. async getmakercode(){
  243. const res = await getRequest('api/v1/pageinfo/detail?t='+Math.random(6),JSON.stringify({Id:12}));
  244. if(res.status !== '1') return tips('获取创客守则失败,请重试!');
  245. this.articleinfo = res.data;
  246. },
  247. //- 高度适配函数
  248. topheightfn(){
  249. const type = browsertype.versions.ios ? 'ios' : 'android';
  250. if(type === 'ios'){
  251. if(isFringe()){
  252. this.topheight = 48;
  253. }else{
  254. this.topheight = 20;
  255. };
  256. }else{
  257. this.topheight = PublicLib.getStatusBarHeight();
  258. };
  259. },
  260. createornum(arr){
  261. let num = 0;
  262. arr.forEach(item=>{
  263. if(item.progressbar >=100){
  264. num++;
  265. };
  266. });
  267. //- console.log(num);
  268. this.finishnum = num;
  269. },
  270. progressfn(count,amount){
  271. if(count === 0){
  272. return 0;
  273. };
  274. if(count === 1){
  275. if(amount >= 30000){
  276. return 33.33;
  277. }else{
  278. return (amount / (count*30000) / 3) * 100;
  279. };
  280. }else if(count === 2){
  281. if(amount >= 2000){
  282. return 66.66;
  283. }else{
  284. return (amount / (count*30000) / 2) * 100;
  285. };
  286. }else if(count >= 3){
  287. return (amount / (count*30000)) * 100;
  288. };
  289. },
  290. onConformateDate(){
  291. return fillzero(formatDate(new Date().getFullYear(),new Date().getMonth() + 1));
  292. },
  293. //- 获取创客交易数据
  294. async getcreatordata(type= 'onload'){
  295. const UserId = PublicLib.getCookieInfo('userId');
  296. const res = await getRequest('api/v1/recommendtradesummary/list?t='+Math.random(6),JSON.stringify({UserId,TradeMonth:this.onConformateDate(),...this.pageinfo}));
  297. if(res.status !== '1'){
  298. return tips(res.info);
  299. };
  300. if(res.data.length < this.pageinfo.PageSize){
  301. this.finished = true;
  302. };
  303. if(type==='onload'){
  304. this.creatorlist.push(...res.data);
  305. };
  306. this.loading = false;
  307. await this.creatorlist.forEach(item=>{
  308. item.progressbar = this.progressfn(item.PosCount,item.PosAmount);
  309. });
  310. this.createornum(this.creatorlist);
  311. },
  312. //- 获取创客参与状态
  313. async isjoin(){
  314. const UserId = PublicLib.getCookieInfo('userId');
  315. const res = await getRequest('api/v1/orders/checkjoinstatus?t='+Math.random(6),JSON.stringify({UserId}));
  316. if(res.status !== '1'){
  317. return tips(res.info);
  318. };
  319. this.loaded = true;
  320. this.joinstatus = res.data.Status;
  321. if(res.data.Status !== 0){
  322. this.getcreatordata();
  323. }
  324. },
  325. checktab(){
  326. },
  327. backbtn(){
  328. PublicLib.GoBack({Level:1});
  329. },
  330. },
  331. });
  332. </script>
  333. </body>
  334. </html>