| | |
| | | $res=$actInfo->run_countRecruitAct(); |
| | | $this->success('执行完成',$res); |
| | | } |
| | | /** |
| | | * 获取邀请码 |
| | | */ |
| | | public function getInviteUrl() |
| | | { |
| | | $user = $this->auth->getUser(); |
| | | $this->success('获取成功',$user->invitation_code); |
| | | } |
| | | } |
| | |
| | | <meta content="yes" name="apple-mobile-web-app-capable"><meta content="yes" name="apple-touch-fullscreen"> |
| | | <meta content="telephone=no,email=no" name="format-detection"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"> |
| | | <script type="text/javascript" src="../js/vue.js"></script> |
| | | <script type="text/javascript" src="https://public.ffquan.cn/lib/jquery-1.12.4.min.js"></script> |
| | | <script type="text/javascript" src="https://public.ffquan.cn/lib/vue-lazyload.js"></script> |
| | | <script type="text/javascript" src="https://public.ffquan.cn/lib/swiper/js/swiper.min.js"></script> |
| | |
| | | </p> |
| | | <p>2、活动奖励会在结算后直接发放到用户【我的】-【余额】中</p> |
| | | <p>3、有效粉丝定义:指活动期间,报名该活动后邀请注册并填写您邀请码的用户</p> |
| | | <!-- <p class="share" v-on:click="copyBtn('.share')">邀请好友</p> --> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </body> |
| | | |
| | | </html> |
| | | <script type="text/javascript" src="https://cdn.staticfile.org/vue/2.6.11/vue.min.js"></script> |
| | | |
| | | <script> |
| | | |
| | | (function () { |
| | |
| | | showType:false, |
| | | isShowcj:false, |
| | | joinInfo:{}, |
| | | ranklist:[] |
| | | ranklist:[], |
| | | inviteUrl:'', |
| | | }, |
| | | methods:{ |
| | | topBack:function() |
| | |
| | | _this.loading=false; |
| | | if(res.code==0) |
| | | { |
| | | alert("参加成功!"); |
| | | _this.msgFun("活动参加成功!"); |
| | | _this.isShowcj=false; |
| | | _this.getActMember(); |
| | | } |
| | | else |
| | | { |
| | | alert("活动参加失败,请联系客服"); |
| | | _this.msgFun("活动参加失败,请联系客服"); |
| | | } |
| | | }) |
| | | }, |
| | | getInviteCode() |
| | | {//获取邀请码 |
| | | var _this = this; |
| | | $.ajax({ |
| | | headers:{ |
| | | "token":_this.getUrlPar("token") |
| | | }, |
| | | url:_this.posturl+'/api/Activity/getInviteUrl', |
| | | type:"post", |
| | | dataType:"json", |
| | | data:{ |
| | | |
| | | } |
| | | }).done(function(res){ |
| | | if(res.code==0) |
| | | { |
| | | _this.inviteUrl='http://dfgapp.ushopvip.com/index/user/register?code='+res.data; |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | getPaiHang:function() |
| | |
| | | let top = list.offsetTop |
| | | if (top > 70) { |
| | | // 在此处调用刷新后的回调 |
| | | console.log('刷新'); |
| | | |
| | | location.reload(); |
| | | } |
| | | if(top<0) |
| | |
| | | } |
| | | }) |
| | | }, |
| | | copyBtn: function(dom) { //复制公共方法 |
| | | var that = this; |
| | | var clipboard = new ClipboardJS(dom, { |
| | | text: function(target) { |
| | | return that.inviteUrl; |
| | | } |
| | | }); |
| | | clipboard.on("success", function(e) { |
| | | layer.closeAll(); |
| | | that.msgFun("邀请链接已复制~快去分享给好友吧!"); |
| | | e.clearSelection(); |
| | | clipboard.destroy(); |
| | | }); |
| | | clipboard.on("error", function(e) { |
| | | layer.msg("邀请链接复制失败!请到APP中 [我的]-[实用功能]-[分享app] 复制", { |
| | | shade: 0.4, |
| | | time: 1000, |
| | | shadeClose: false |
| | | }, function() { |
| | | }); |
| | | |
| | | }); |
| | | }, |
| | | msgFun: function(val) { |
| | | layer.msg(val, { |
| | | time: 2000, |
| | | shade: 0.1, |
| | | shadeClose: true |
| | | }); |
| | | }, |
| | | }, |
| | | mounted:function(){ |
| | | this.getActivity(); |
| | | this.getInviteCode(); |
| | | this.touch(); |
| | | } |
| | | }) |