1 line
5.2 KiB
JavaScript
1 line
5.2 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ba4d29e4"],{"314d":function(t,e,i){"use strict";i("830c")},"4e5d":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"task_center"},[i("c-title",{attrs:{hide:!1,text:"店商联盟"}}),i("img",{staticClass:"img",attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/taskCenter@2x.png",alt:""}}),i("div",{staticClass:"taskList"},t._l(t.listData,(function(e,a){return i("div",{key:a,staticClass:"item",on:{click:function(i){return t.choice(e)}}},[i("i",{staticClass:"iconfont icon-all_select_active icon",class:{active:t.sid==e.id}}),i("div",{staticClass:"content"},[i("div",{staticClass:"num"},[t._v("任务"+t._s(a+1))]),i("div",{staticClass:"detail"},[i("p",{staticClass:"award"},[t._v(t._s(e.task_reward_day)+"天内推广增加"+t._s(e.task_reward_stores)+"家门店,可获得"+t._s(e.task_reward_monry)+"元奖励")]),i("p",{staticClass:"pay"},[t._v("需支付定金¥"+t._s(e.deposit))])])])])})),0),i("button",{staticClass:"btn",on:{click:t.send}},[t._v("立即参加")])],1)},s=[],o=(i("e7e5"),i("d399")),n=(i("99af"),i("ac0d")),r={mixins:[n["a"]],data:function(){return{sid:0,goods_id:0,member_agent_level:0,price:0,listData:[],page:1,isLoadMore:!0,total_page:0}},created:function(){this.getDate(),window.addEventListener("scroll",this.handleScroll)},beforeDestroy:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{choice:function(t){this.sid=t.id,this.goods_id=t.goods_id,this.member_agent_level=t.agent_level,this.price=t.deposit},getDate:function(){var t=this;$http.get("plugin.store-business-alliance.frontend.index.task-list",{}).then((function(e){if(1!=e.result)return Object(o["a"])(e.msg);t.listData=e.data.data,t.isLoadMore=!0,t.total_page=e.data.last_page,t.total_page||(t.total_page=0)})).catch((function(t){}))},getMoreData:function(){var t=this;this.isLoadMore=!1,this.page>=this.total_page||(this.page+=1,$http.get("plugin.store-business-alliance.frontend.index.task-list",{page:this.page}).then((function(e){if(t.isLoadMore=!0,1===e.result){var i=e.data.data;t.listData=t.listData.concat(i)}else t.page=t.page-1,t.isLoadMore=!1})))},send:function(){var t=this;if(0==this.sid)return Object(o["a"])("请选择任务");var e={dispatch_type_id:0,goods:[{goods_id:this.goods_id,total:1}],member_agent_level:this.member_agent_level,price:this.price};$http.post("plugin.store-business-alliance.frontend.create",e,"").then((function(e){if(1!=e.result)return Object(o["a"])(e.msg);t.$router.push(t.fun.getUrl("orderpay",{status:"2",order_ids:e.data.order_ids}))}))}}},l=r,c=l,d=(i("314d"),i("2877")),h=Object(d["a"])(c,a,s,!1,null,"46b744dc",null);e["default"]=h.exports},"568e":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".img[data-v-46b744dc]{width:100%;height:auto}.taskList[data-v-46b744dc]{background-color:#fff}.taskList .item[data-v-46b744dc]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:0 1rem;padding:1rem 0;border-bottom:.031rem solid #e8e8e8}.taskList .item[data-v-46b744dc]:last-child{border:none}.taskList .item .icon[data-v-46b744dc]{color:#dbdbdb}.taskList .item .active[data-v-46b744dc]{color:#f15353}.taskList .item .content[data-v-46b744dc]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-weight:700}.taskList .item .content .num[data-v-46b744dc]{width:2.813rem;height:1.063rem;margin:0 .375rem 0 .688rem;color:#fff;font-size:11px;background-color:#3fa5f9;border-radius:.531rem}.taskList .item .content .detail[data-v-46b744dc]{text-align:left}.taskList .item .content .detail .award[data-v-46b744dc]{font-size:13px;color:#333}.taskList .item .content .detail .pay[data-v-46b744dc]{margin-top:.5rem;font-size:12px;color:#666}.btn[data-v-46b744dc]{position:absolute;left:50%;bottom:1.5rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:20.313rem;height:2.188rem;font-size:15px;font-weight:700;color:#fff;line-height:2.188rem;background-color:#3fa5f9;border-radius:1.094rem;border:none}",""]),t.exports=e},"830c":function(t,e,i){var a=i("568e");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var s=i("499e").default;s("67db0b7c",a,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var a=document.documentElement,s=document.body,o={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&a.clientHeight?Math.min(s.clientHeight,a.clientHeight):Math.max(s.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(s.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}}}]); |