taskdetail.js 12 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tasksquare/taskdetail"],{5908:function(t,e,o){"use strict";(function(t){o("a87f");n(o("66fd"));var e=n(o("70f4"));function n(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=o,t(e.default)}).call(this,o("543d")["createPage"])},"5ab7":function(t,e,o){},"70f4":function(t,e,o){"use strict";o.r(e);var n=o("7ab8"),i=o("a838");for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("7697"),o("9cf2");var r,s=o("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"2bc3a7fe",null,!1,n["a"],r);e["default"]=c.exports},7635:function(t,e,o){},7697:function(t,e,o){"use strict";var n=o("5ab7"),i=o.n(n);i.a},"7ab8":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={uniPopup:function(){return o.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(o.bind(null,"7ae8"))},uniDataCheckbox:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox")]).then(o.bind(null,"c24e"))}},i=function(){var t=this,e=t.$createElement;t._self._c},a=[]},"9cf2":function(t,e,o){"use strict";var n=o("7635"),i=o.n(n);i.a},a1df:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(o("a34a")),i=o("a2ce"),a=r(o("a970"));function r(t){return t&&t.__esModule?t:{default:t}}function s(t,e,o,n,i,a,r){try{var s=t[a](r),c=s.value}catch(u){return void o(u)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,o=arguments;return new Promise((function(n,i){var a=t.apply(e,o);function r(t){s(a,n,i,r,c,"next",t)}function c(t){s(a,n,i,r,c,"throw",t)}r(void 0)}))}}var u=function(){o.e("components/mys_navBar/mysNavBar").then(function(){return resolve(o("7857"))}.bind(null,o)).catch(o.oe)},p=function(){o.e("components/z-swiper/index").then(function(){return resolve(o("b672"))}.bind(null,o)).catch(o.oe)},l=null,f={components:{mvBar:u,zSwiper:p},data:function(){return{share:{title:"",path:"",imageUrl:"",desc:"",content:""},poster:{},posterImg:"",canvasId:"myCanvas",img:"",title:"[东鑫记港式茶餐厅]南京东路|魔都新晋爆款茶餐厅来袭!99元抢门",price:"",tips:"识别二维码\n立即申请任务",head:"https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task15.png",big:"",tyy:!0,tabBarStyle:{},activeTab:0,hei:"",hei1:"",topp0:"",topp1:"",topp2:"",scrollTop:"",activeColor:"#FCCF41",value:"",value1:"",sex:[],coop_choice:[],type:"center",type1:"center",type2:"center",item:{title:"0"},fullScreen:!0,topFloat:!0,fotterFloat:!0,mode:"circle",indicatorPos:"bottomCenter",list1:[{type:"video",poster:"https://img2.baidu.com/it/u=2141851239,1037607188&fm=26&fmt=auto&gp=0.jpg",src:"https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/a876efc0-4f35-11eb-97b7-0dc4655d6e68.mp4"},{type:"image",src:"https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png"},{type:"video",poster:"https://img1.baidu.com/it/u=1297253752,1185196455&fm=26&fmt=auto&gp=0.jpg",src:"https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/a876efc0-4f35-11eb-97b7-0dc4655d6e68.mp4"},{type:"image",src:"https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png"}],carousel_images:["https://img2.baidu.com/it/u=2141851239,1037607188&fm=26&fmt=auto&gp=0.jpg","https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png"],dotIndex:0,dotFloatIndex:0,swiper:{margin:"150rpx",index:0,list:[]},tar:!1,mysNavConfig:{isHome:!1,navFixed:!0,navTitle:{text:"任务详情",color:"",fontSize:"32rpx",fontWeight:""},btnType:"type2",type2Config:{leftPath:"https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png2.png",rightPath:"https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png4.png",radius:"40rpx"}},projectid:"",information:{},token:"",fensishu:"",Registered:"0",zhanghaocode:"",product_detail_images:[],codeImg:"",queryAll:""}},created:function(){return c(n.default.mark((function t(){return n.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()},onShow:function(){this.fensishu="",this.token=t.getStorageSync("token"),this.getProjectDetail(),console.log(this.token)},onLoad:function(t){this.projectid=t.id;var e=decodeURIComponent(t.scene);"undefined"!=e&&(this.projectid=e),this.share.path="/pages/tasksquare/taskdetail?id="+this.projectid,this.postlist()},onReady:function(){},methods:{postlist:function(){var t=this;this.$http.post("/youngee/c/p/get-qrcode",{scene:this.projectid,page:"pages/tasksquare/taskdetails"}).then((function(e){console.log(e),t.head="data:image/png;base64,"+e.data.data}))},getProjectDetail:function(){var t=this;this.$http.get("/youngee/c/t/g/get-project-detail?projectid="+this.projectid).then((function(e){console.log(e),t.information=e.data.data;for(var o=0;o<t.information.Product.ProductPhoto.length;o++)1===t.information.Product.ProductPhoto[o].symbol&&(t.img=t.information.Product.ProductPhoto[o].photo_url,t.share.imageUrl=t.information.Product.ProductPhoto[o].photo_url);t.title=t.information.project_name,t.share.title=t.information.project_name,t.carousel_images=[],t.product_detail_images=[];for(var n=0;n<t.information.Product.ProductPhoto.length;n++)3!==t.information.Product.ProductPhoto[n].symbol&&(t.carousel_images.push(t.information.Product.ProductPhoto[n].photo_url),1!==t.information.Product.ProductPhoto[n].symbol&&t.product_detail_images.push(t.information.Product.ProductPhoto[n].photo_url));t.information.taskNum=0;for(var i=0;i<t.information.RecruitStrategy.length;i++)t.information.taskNum=Number(t.information.taskNum)+Number(t.information.RecruitStrategy[i].recruit_number);t.information.Numfensi=[];for(var a=0;a<t.information.RecruitStrategy.length;++a){var r=t.information.RecruitStrategy[a].followers_low+" - "+t.information.RecruitStrategy[a].followers_up;t.information.Numfensi.push(r)}1==t.information.content_type?t.information.content="图文":2==t.information.content_type&&(t.information.content="视频"),t.information.recruit_ddl=t.information.recruit_ddl.substr(0,10);for(var s=[],c=0;c<t.information.RecruitStrategy.length;++c){var u=t.information.RecruitStrategy[c].fee_form,p="粉丝量"+t.information.RecruitStrategy[c].followers_low+" - "+t.information.RecruitStrategy[c].followers_up+" 稿费:",l=1==u?"产品置换":2==u?"稿费":"创作者自报价",f=2==u?t.information.RecruitStrategy[c].offer+"元/人":"",h=p+l+f,d={value:t.information.RecruitStrategy[c].strategy_id,fee_form:u,text:h};s.push(d)}t.coop_choice=s,t.tyy=!1}))},getlist2:function(){var e=this;this.$https.get("/talent/t/g/get-platform-fans-count?pid="+this.information.task_platform+"&task_id="+this.information.task_id).then((function(o){e.tyy=!1;var n=e;if(setTimeout((function(){n.getInfo()}),10),console.log(o),e.zhanghaocode=o.data.code,0==o.data.code){if(null!==o.data.data.fans_count_info){e.Registered=o.data.data.is_signup_task,e.fensishu=o.data.data.fans_count_info.fans_count;for(var i=0;i<e.coop_choice.length;i++)e.fensishu>=e.information.NeedTalentCount[i].fans_count_min||(e.coop_choice[i].disable=!0)}}else 403==o.data.code&&(t.clearStorage(),e.token)}))},contentFormToString:function(t){var e="",o=128,n=t&o;if(n>0)e+="直播";else{var i=15,a=48,r=1,s=2,c=4,u=8,p=16,l=32,f=t&i;f==r?e+="原创图片":f==s?e+="指定图片":f==c?e+="原创视频":f==u&&(e+="指定视频");var h=t&a;h==p?e+="+ 原创文案":h==l&&(e+="+ 指定文案")}return e},anniu:function(){t.pageScrollTo({scrollTop:this.topp0}),this.activeTab=0},anniu1:function(){t.pageScrollTo({scrollTop:this.topp1-this.hei1+this.hei+this.hei}),this.activeTab=1},anniu2:function(){t.pageScrollTo({scrollTop:this.topp2-this.hei}),this.activeTab=2},onPageScroll:function(e){t.$emit("onPageScroll",e.scrollTop),this.scrollTop=e.scrollTop,e.scrollTop<=this.topp1-this.hei1&&(this.activeTab=0),e.scrollTop>this.topp1-this.hei1&&e.scrollTop<this.topp2-this.hei1&&(this.activeTab=1),e.scrollTop>this.topp2-this.hei1&&(this.activeTab=2)},getInfo:function(){var e=this,o=t.createSelectorQuery().in(this);o.select("#wrap0").boundingClientRect((function(t){e.topp0=t.top})).exec(),o.select("#wrap1").boundingClientRect((function(t){e.topp1=t.top})).exec(),o.select("#wrap2").boundingClientRect((function(t){e.topp2=t.top})).exec(),o.select("#wap").boundingClientRect((function(t){e.hei=t.height,e.tabBarStyle={height:t.height+t.height+"px",width:"100%"}})).exec(),o.select("#wa").boundingClientRect((function(t){e.hei1=t.height})).exec()},effect3dMarginMethed:function(){this.effect3dMargin++},swiperChange:function(t){this.swiper.index=t.detail.current},change:function(t){console.log("当前模式:"+t.type+",状态:"+t.show)},toggle:function(e){if(""==this.token)t.showModal({content:"请先登录",success:function(e){e.confirm?t.navigateTo({url:"/pages/index/login"}):e.cancel&&console.log("用户点击取消")}});else if(-5==this.zhanghaocode)t.showToast({title:"平台账号正在等待审核",icon:"none",duration:2e3});else if(""==this.fensishu){var o=this;t.showLoading({title:"加载中"}),setTimeout((function(){t.hideLoading(),""==o.fensishu?t.showModal({content:"请先绑定平台账号",success:function(e){e.confirm?t.navigateTo({url:"/pages/gameplayer/gameplayer"}):e.cancel&&console.log("用户点击取消")}}):""==o.fensishu?(t.showLoading({title:"加载中"}),setTimeout((function(){t.hideLoading(),o.type=e,o.$refs.popup.open(e)}),1e3)):(o.type=e,o.$refs.popup.open(e))}),1e3)}else if(""==this.fensishu)t.showModal({content:"请先绑定平台账号",success:function(e){e.confirm?t.navigateTo({url:"/pages/gameplayer/gameplayer"}):e.cancel&&console.log("用户点击取消")}});else{var n=this;""==this.fensishu?(t.showLoading({title:"加载中"}),setTimeout((function(){t.hideLoading(),n.type=e,n.$refs.popup.open(e)}),1e3)):(n.type=e,n.$refs.popup.open(e))}},createdPoster:function(){var t=this;return c(n.default.mark((function e(){var o,i,r,s,c,u,p;return n.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t.canvasId,i=t.img,r=t.title,s=t.price,c=t.head,u=t.tips,l=new a.default({width:375,height:580,canvasId:o,_this:t,background:{type:"color",color:"white",w:375,h:580}}),e.next=4,l.createdSharePoster((function(e){var o=e.bgObj,n=o.width;o.height;return t.poster=o,[{type:"image",x:0,y:0,src:i,w:n,h:n},{type:"text",w:n-40,text:r,color:"#333333",font:{size:22,weight:600},line:{num:1},callBack:function(t){var e=t.sx,o=(t.ex,t.sy,t.ey);return{x:e+20,y:o+20}}},{type:"text",text:s,color:"#333333",font:{size:16},callBack:function(t){var e=t.sx,o=(t.ex,t.sy,t.ey);return{x:e,w:n-2*e,y:o+15}}},{type:"qrcode",x:20,size:110,text:"",image:{src:c,size:110,r:10,borderWidth:7,borderColor:"#ffffff"},callBack:function(t){t.sx,t.ex,t.sy;var e=t.ey;return{y:e+15}}},{type:"text",w:200,text:u,color:"#333333",font:{size:17},line:{height:22},callBack:function(t,e){var o=t.sx,n=(t.ex,t.sy),i=(t.ey,t.w);return{x:o+i+50,y:n+50}}}]}));case 4:if(p=e.sent,console.log("res",p),p.success){e.next=8;break}return e.abrupt("return");case 8:t.posterImg=p.data,t.isShow=!0;case 10:case"end":return e.stop()}}),e)})))()},saveImage:function(){var t=this;return c(n.default.mark((function e(){var o,a;return n.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t.posterImg,e.next=3,(0,i.saveImageToPhotosAlbum)(o);case 3:if(a=e.sent,a.success){e.next=6;break}return e.abrupt("return");case 6:(0,i.showToast)("保存成功"),t.isShow=!1,t.$refs.popup2.close();case 9:case"end":return e.stop()}}),e)})))()},toggle1:function(t){this.type1=t,this.$refs.popup1.open(t)},toggle2:function(e){""!==this.posterImg?(t.hideLoading(),this.type2=e,this.$refs.popup2.open(e),this.$refs.popup1.close()):(this.createdPoster(),t.hideLoading(),this.type2=e,this.$refs.popup2.open(e),this.$refs.popup1.close())},preservation:function(){t.showToast({title:"保存成功",duration:1e3})},cancel:function(){this.$refs.popup1.close()},Reset:function(){t.showToast({title:"更新成功",duration:1e3})},determine:function(){if(""===this.value||""===this.value1)t.showToast({title:"请选择产品规格和合作选择",icon:"none",duration:2e3});else{this.$refs.popup.close();var e={projectid:this.projectid,guige:this.value,dengji:this.value1};e=JSON.stringify(e);t.navigateTo({url:"/pages/task/information?textObj="+e})}}}};e.default=f}).call(this,o("543d")["default"])},a838:function(t,e,o){"use strict";o.r(e);var n=o("a1df"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a}},[["5908","common/runtime","common/vendor"]]]);