text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-supplysj"],{1072:function(a,t,e){var s=e("481f");"string"===typeof s&&(s=[[a.i,s,""]]),s.locals&&(a.exports=s.locals);var i=e("4f06").default;i("7b915498",s,!0,{sourceMap:!1,shadowMode:!1})},"481f":function(a,t,e){var s=e("24fb");t=s(!1),t.push([a.i,".rztitle[data-v-3db3279e]{position:fixed;left:0;right:0;font-size:4.5vw;font-weight:700;background-color:#fff;height:44px;line-height:44px;text-indent:3vw}.cu-bar[data-v-3db3279e]{position:static}.hongren[data-v-3db3279e]{bottom:0}.platform_list[data-v-3db3279e]{margin:3vw;background-color:#fff;border-radius:2vw}.platform_list .list[data-v-3db3279e]{overflow:hidden;border-radius:2vw;box-shadow:1px 1px 2px rgba(26,26,26,.1)}.cu-form-group[data-v-3db3279e]{margin:.5px 15px;padding:0}.cu-form-group .title[data-v-3db3279e]{width:24vw}.cor-e8.text-lg[data-v-3db3279e]{position:relative;left:-1vw;top:1vw}.cu-btn.lg[data-v-3db3279e]{padding:0 3vw}.nothave[data-v-3db3279e]{font-size:3.5vw;padding-bottom:3vw;color:#999}.op-0[data-v-3db3279e]{opacity:0}.bg-img[data-v-3db3279e]:first-child{margin:1vw 3vw}.bg-img[data-v-3db3279e]{margin-right:1vw 3vw 1vw 0;box-shadow:1px 1px 2px rgba(26,26,26,.1)}.cu-btn.img[data-v-3db3279e]{height:24px;font-size:12px;background-color:#e71d36;color:#fff;padding:0 2vw}.text-orange[data-v-3db3279e], .line-orange[data-v-3db3279e], .lines-orange[data-v-3db3279e]{color:#999}.bg-orange[data-v-3db3279e]{background-color:#e71d36;color:#fff;border-radius:2px}.confirm[data-v-3db3279e]{background-color:#e71d36}uni-radio-group[data-v-3db3279e]{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box!important;display:-webkit-flex!important;display:flex!important;font-size:3.5vw;-webkit-justify-content:space-around;justify-content:space-around}uni-radio-group span[data-v-3db3279e]{margin-right:1vw}.coent[data-v-3db3279e]{-webkit-box-flex:1;-webkit-flex:1;flex:1}.cu-form-group uni-picker[data-v-3db3279e]::after{display:none}.cu-form-group uni-picker[data-v-3db3279e]{-webkit-box-flex:0;-webkit-flex:none;flex:none;border-radius:5px}.remarks[data-v-3db3279e]{text-align:center;padding:3vw 3vw;color:#e71d36;line-height:5vw;font-size:3.5vw;background-color:#fff}",""]),a.exports=t},"76c1":function(a,t,e){"use strict";e.r(t);var s=e("94aa"),i=e("9772");for(var n in i)"default"!==n&&function(a){e.d(t,a,(function(){return i[a]}))}(n);e("ec9a");var o,d=e("f0c5"),r=Object(d["a"])(i["default"],s["b"],s["c"],!1,null,"3db3279e",null,!1,s["a"],o);t["default"]=r.exports},"94aa":function(a,t,e){"use strict";var s,i=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("v-uni-view",[e("uni-top-bar"),e("v-uni-view",{staticClass:"hongren",style:{top:a.height+43+"px"}},[3==a.examine&&a.remarks?e("v-uni-view",{staticClass:"remarks"},[a._v("未通过原因："+a._s(a.remarks))]):a._e(),e("v-uni-view",{staticClass:"platform_list clearfix"},[e("v-uni-view",{staticClass:"list clearfix"},[e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("标题")]),e("v-uni-input",{attrs:{type:"text",placeholder:"请输入标题"},model:{value:a.addressData.title,callback:function(t){a.$set(a.addressData,"title",t)},expression:"addressData.title"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("产品品牌")]),e("v-uni-input",{attrs:{type:"text",placeholder:"请输入产品品牌"},model:{value:a.addressData.brand,callback:function(t){a.$set(a.addressData,"brand",t)},expression:"addressData.brand"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("产品图片")]),e("v-uni-view",{staticClass:"coent",staticStyle:{color:"red","font-size":"3.5vw"}},[a._v("请上传正方形图片")]),e("v-uni-button",{staticClass:"img cu-btn shadow",on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.avatarImage.apply(void 0,arguments)}}},[a._v("上传图片")])],1),a.addressData.img?e("v-uni-view",{staticClass:"grid col-4 grid-square flex-sub"},[e("v-uni-view",{staticClass:"bg-img"},[e("v-uni-image",{attrs:{src:a.addressData.img,mode:"aspectFill"}}),e("v-uni-view",{staticClass:"cu-tag bg-red",on:{click:function(t){t.stopPropagation(),arguments[0]=t=a.$handleEvent(t),a.DelImg()}}},[e("v-uni-text",{staticClass:"cuIcon-close"})],1)],1)],1):a._e(),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("劵后价格")]),e("v-uni-input",{attrs:{type:"number",placeholder:"请输入劵后价格"},model:{value:a.addressData.nowprice,callback:function(t){a.$set(a.addressData,"nowprice",t)},expression:"addressData.nowprice"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("平台要求")]),e("v-uni-view",{staticClass:"coent"},[a._v(a._s(a.addressData.platform))]),e("v-uni-button",{staticClass:"img cu-btn shadow",attrs:{"data-target":"platformModal"},on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.showModal.apply(void 0,arguments)}}},[a._v("选择平台")])],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("领域要求")]),e("v-uni-view",{staticClass:"coent"},[a._v(a._s(a.addressData.category))]),e("v-uni-button",{staticClass:"img cu-btn shadow",attrs:{"data-target":"categoryModal"},on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.showModal.apply(void 0,arguments)}}},[a._v("选择领域")])],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("收费形式")]),e("v-uni-radio-group",{staticClass:"block",on:{change:function(t){arguments[0]=t=a.$handleEvent(t),a.RadioCharge.apply(void 0,arguments)}}},[e("v-uni-view",[e("span",[a._v("预付费")]),e("v-uni-radio",{staticClass:"blue radio sm",class:1==a.addressData.pay_type?"checked":"",attrs:{checked:1==a.addressData.pay_type,value:"1"}})],1),e("v-uni-view",[e("span",[a._v("纯佣金")]),e("v-uni-radio",{staticClass:"blue radio sm",class:2==a.addressData.pay_type?"checked":"",attrs:{checked:2==a.addressData.pay_type,value:"2"}})],1),e("v-uni-view",[e("span",[a._v("预付+纯佣")]),e("v-uni-radio",{staticClass:"blue radio sm",class:3==a.addressData.pay_type?"checked":"",attrs:{checked:3==a.addressData.pay_type,value:"3"}})],1)],1)],1),1==a.addressData.pay_type||3==a.addressData.pay_type?e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("预付费(w)")]),e("v-uni-input",{attrs:{type:"number",placeholder:"请输入预付费"},model:{value:a.addressData.advance,callback:function(t){a.$set(a.addressData,"advance",t)},expression:"addressData.advance"}})],1):a._e(),2==a.addressData.pay_type||3==a.addressData.pay_type?e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("佣金")]),e("v-uni-input",{attrs:{type:"number",placeholder:"请输入佣金"},model:{value:a.addressData.commission,callback:function(t){a.$set(a.addressData,"commission",t)},expression:"addressData.commission"}})],1):a._e(),e("v-uni-view",{staticClass:"cu-form-group align-start"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("产品详情")]),e("v-uni-textarea",{attrs:{placeholder:"多行文本输入框"},model:{value:a.addressData.details,callback:function(t){a.$set(a.addressData,"details",t)},expression:"addressData.details"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("粉丝要求")]),e("v-uni-input",{attrs:{type:"text",placeholder:"请输入粉丝要求;单位(w)"},model:{value:a.addressData.fans,callback:function(t){a.$set(a.addressData,"fans",t)},expression:"addressData.fans"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("对接商务")]),e("v-uni-input",{attrs:{type:"text",placeholder:"请输入联系人"},model:{value:a.addressData.contact,callback:function(t){a.$set(a.addressData,"contact",t)},expression:"addressData.contact"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("联系电话")]),e("v-uni-input",{attrs:{type:"number",placeholder:"请输入联系电话"},model:{value:a.addressData.mobile,callback:function(t){a.$set(a.addressData,"mobile",t)},expression:"addressData.mobile"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("微信号码")]),e("v-uni-input",{attrs:{type:"text",placeholder:"请输入微信号"},model:{value:a.addressData.wechat_work,callback:function(t){a.$set(a.addressData,"wechat_work",t)},expression:"addressData.wechat_work"}})],1),e("v-uni-view",{staticClass:"cu-form-group"},[e("v-uni-view",{staticClass:"title"},[e("span",{staticClass:"cor-e8 text-lg"},[a._v("*")]),a._v("截止日期")]),e("v-uni-input",{attrs:{type:"text",disabled:"disabled",placeholder:"请输入开始时间"},model:{value:a.addressData.endtime,callback:function(t){a.$set(a.addressData,"endtime",t)},expression:"addressData.endtime"}}),e("v-uni-picker",{staticClass:"img cu-btn shadow",attrs:{mode:"date",value:a.addressData.endtime,start:"2015-09-01",end:"2020-09-01"},on:{change:function(t){arguments[0]=t=a.$handleEvent(t),a.endtime.apply(void 0,arguments)}}},[a._v("选择时间")])],1)],1)],1),e("v-uni-view",{staticClass:"padding-xl"},[e("v-uni-button",{staticClass:"cu-btn confirm block bg-blue margin-tb-sm lg",on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.confirm.apply(void 0,arguments)}}},[a._v(a._s(a.confirmbtn))])],1)],1),e("v-uni-view",{staticClass:"cu-modal top-modal",class:"categoryModal"==a.modalName?"show":"",on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.chkcategory.apply(void 0,arguments)}}},[e("v-uni-view",{staticClass:"cu-dialog",on:{click:function(t){t.stopPropagation(),arguments[0]=t=a.$handleEvent(t)}}},[e("v-uni-view",{staticClass:"cu-bar bg-white"},[e("v-uni-view",{staticClass:"action text-blue"}),e("v-uni-view",{staticClass:"action text-green",on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.chkcategory.apply(void 0,arguments)}}},[a._v("确定")])],1),e("v-uni-view",{staticClass:"grid col-3 padding-sm"},a._l(a.category,(function(t,s){return e("v-uni-view",{key:s,staticClass:"padding-xs"},[e("v-uni-button",{staticClass:"cu-btn orange block",class:t.checked?"bg-orange":"line-orange",attrs:{"data-value":t.name},on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.ChooseCheckbox(t)}}},[a._v(a._s(t.name))])],1)})),1),e("v-uni-view",{staticClass:"nothave"},[a._v("没有找到？联系客服添加分类")])],1)],1),e("v-uni-view",{staticClass:"cu-modal top-modal",class:"platformModal"==a.modalName?"show":"",on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.chkplatform.apply(void 0,arguments)}}},[e("v-uni-view",{staticClass:"cu-dialog",on:{click:function(t){t.stopPropagation(),arguments[0]=t=a.$handleEvent(t)}}},[e("v-uni-view",{staticClass:"cu-bar bg-white"},[e("v-uni-view",{staticClass:"action text-blue"}),e("v-uni-view",{staticClass:"action text-green",on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.chkplatform.apply(void 0,arguments)}}},[a._v("确定")])],1),e("v-uni-view",{staticClass:"grid col-3 padding-sm"},a._l(a.platform,(function(t,s){return e("v-uni-view",{key:s,staticClass:"padding-xs"},[e("v-uni-button",{staticClass:"cu-btn orange block",class:t.checked?"bg-orange":"line-orange",attrs:{"data-value":t.name},on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.ChooseCheckbox(t)}}},[a._v(a._s(t.name))])],1)})),1),e("v-uni-view",{staticClass:"nothave"},[a._v("没有找到？联系客服添加分类")])],1)],1)],1)},n=[];e.d(t,"b",(function(){return i})),e.d(t,"c",(function(){return n})),e.d(t,"a",(function(){return s}))},9772:function(a,t,e){"use strict";e.r(t);var s=e("ba5e"),i=e.n(s);for(var n in s)"default"!==n&&function(a){e.d(t,a,(function(){return s[a]}))}(n);t["default"]=i.a},ba5e:function(a,t,e){"use strict";var s=e("ee27");e("4160"),e("4d63"),e("ac1f"),e("25f0"),e("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(e("9dcd")),n={components:{uniTopBar:i.default},filters:{formatDate:function(a){var t=new Date(1e3*a),e=t.getFullYear(),s=t.getMonth()+1;s=s<10?"0"+s:s;var i=t.getDate();i=i<10?"0"+i:i;var n=t.getHours();n=n<10?"0"+n:n;var o=t.getMinutes();o=o<10?"0"+o:o;var d=t.getSeconds();return d=d<10?"0"+d:d,e+"-"+s+"-"+i}},data:function(){return{modalName:null,confirmbtn:"发布",taobaourl:!1,jingdongurl:!1,pinduoduourl:!1,kuaishouurl:!1,addressData:{title:"",brand:"",img:"",category:"",platform:"",pay_type:2,advance:"",commission:"",nowprice:"",details:"",endtime:"",fans:"",contact:"",mobile:"",wechat_work:"",type:1},category:"",platform:"",userInfo:"",height:"",examine:"",remarks:""}},onLoad:function(a){var t=this;t.height=this.StatusBar,uni.getStorage({key:"userInfo",success:function(e){e.data&&""!=e.data&&(t.userInfo=e.data,t.addressData.mid=t.userInfo.id,a.id&&(t.supplysj(a.id),t.addressData.id=a.id,t.confirmbtn="修改"))}}),t.servertime(),t.cewebritycategory(),t.supplyplatform()},methods:{confirm:function(){return this.addressData.title?this.addressData.brand?this.addressData.img?this.addressData.nowprice?this.addressData.platform?this.addressData.category?this.addressData.contact?"1"!=this.addressData.pay_type||this.addressData.advance?"2"!=this.addressData.pay_type||this.addressData.commission?"3"!=this.addressData.pay_type||this.addressData.advance?"3"!=this.addressData.pay_type||this.addressData.commission?this.addressData.mobile?this.checkMobile(this.addressData.mobile)?this.addressData.wechat_work?void uni.request({url:"https://www.hongrensutui.com/api/index/supplysjadd",data:this.addressData,method:"post",header:{"Content-Type":"application/x-www-form-urlencoded"},dataType:"json",success:function(a){200==a.data.data.code?(uni.showToast({icon:"none",title:a.data.data.info}),setTimeout((function(){uni.navigateBack({delta:1})}),2e3)):uni.showToast({icon:"none",title:"发布失败！"})},fail:function(a){uni.showToast({icon:"none",title:"发布失败！"})}}):(uni.showToast({title:"微信号不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"联系电话格式不正确",icon:"none",duration:3e3}),!1):(uni.showToast({title:"联系电话不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"佣金不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"预付费不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"佣金不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"预付费不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"联系人不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"红人领域不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"平台要求不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"卷后价格不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"产品图片不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"产品品牌不能为空",icon:"none",duration:3e3}),!1):(uni.showToast({title:"标题不能为空",icon:"none",duration:3e3}),!1)},supplysj:function(a){var t=this;uni.request({url:"https://www.hongrensutui.com/api/index/supplyedit",data:{id:a},method:"POST",success:function(a){if(a.data.data.info){var e=a.data.data.info;t.addressData.mid=e.mid,t.addressData.title=e.title,t.addressData.brand=e.brand,t.addressData.img=e.img,t.addressData.pay_type=e.pay_type,t.addressData.advance=e.advance,t.addressData.commission=e.commission,t.addressData.nowprice=e.nowprice,t.addressData.category=e.category,t.addressData.platform=e.platform,t.addressData.details=e.details,t.addressData.endtime=e.endtime,t.addressData.fans=e.fans,t.addressData.contact=e.contact,t.addressData.mobile=e.mobile,t.addressData.wechat_work=e.wechat_work,t.addressData.type=e.type,t.examine=e.examine,t.remarks=e.remarks,t.cewebritycategory(e.category),t.supplyplatform(e.platform)}else t.cewebritycategory(),t.supplyplatform()}})},servertime:function(){var a=this;uni.request({url:"https://www.hongrensutui.com/api/index/servertime",method:"POST",success:function(t){a.addressData.endtime=a.formatDate(t.data.data.time)}})},formatDate:function(a){var t=new Date(1e3*a),e=t.getFullYear(),s=t.getMonth()+1;s=s<10?"0"+s:s;var i=t.getDate();i=i<10?"0"+i:i;var n=t.getHours();n=n<10?"0"+n:n;var o=t.getMinutes();o=o<10?"0"+o:o;var d=t.getSeconds();return d=d<10?"0"+d:d,e+"-"+s+"-"+i},cewebritycategory:function(a){var t=this;uni.request({url:"https://www.hongrensutui.com/api/index/cewebritycategory",data:{category:a},method:"POST",success:function(a){t.category=a.data.data.list}})},supplyplatform:function(a){var t=this;uni.request({url:"https://www.hongrensutui.com/api/index/supplyplatform",data:{platform:a},method:"POST",success:function(a){t.platform=a.data.data.list}})},checkMobile:function(a){return RegExp(/^1[34578]\d{9}$/).test(a)},endtime:function(a){this.addressData.endtime=a.detail.value},showModal:function(a){this.modalName=a.currentTarget.dataset.target},hideModal:function(a){this.modalName=null},avatarImage:function(){var a=this;uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album"],success:function(t){var e=t.tempFilePaths;uni.uploadFile({url:"https://www.hongrensutui.com/api/upload/index",filePath:e[0],name:"image",success:function(t){var e=JSON.parse(t.data);a.addressData.img=e.data.url}})}})},DelImg:function(){var a=this;uni.showModal({title:"",content:"确定要删除图片么？",cancelText:"取消",confirmText:"确认",success:function(t){t.confirm&&(a.addressData.img="")}})},chkcategory:function(a){var t=this,e=0,s=0;this.addressData.category="",this.category.forEach((function(a,t){1==a.checked&&e++})),this.category.forEach((function(a,i){1==a.checked&&(s++,t.addressData.category+=s!=e?a.name+",":a.name)})),this.modalName=null},chkplatform:function(a){var t=this,e=0,s=0;this.addressData.platform="",this.platform.forEach((function(a,t){1==a.checked&&e++})),this.platform.forEach((function(a,i){1==a.checked&&(s++,t.addressData.platform+=s!=e?a.name+",":a.name)})),this.modalName=null},RadioCharge:function(a){this.addressData.pay_type=a.detail.value,"1"==this.addressData.pay_type&&(this.addressData.commission=""),"2"==this.addressData.pay_type&&(this.addressData.advance="")},ChooseCheckbox:function(a){a.checked=!a.checked}}};t.default=n},ec9a:function(a,t,e){"use strict";var s=e("1072"),i=e.n(s);i.a}}]);