(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/my/inviteSellAfter/index"],{"0ad0":function(e,t,n){"use strict";(function(e,t){var a=n("4ea4");n("f331");a(n("66fd"));var r=a(n("9d2f"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"85c6":function(e,t,n){"use strict";(function(e){var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("2eee")),u=a(n("c973")),o=n("531c"),i={components:{},data:function(){return{phone:"",name:"",type:3,source:-1,status:"产业电工",award_content:"",user_id:null,range:[{value:0,text:"兑奖"},{value:1,text:"到店"},{value:2,text:"朋友"},{value:3,text:"其他"}]}},onLoad:function(e){return(0,u.default)(r.default.mark((function e(){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},methods:{postRecord:function(){var t=this;return(0,u.default)(r.default.mark((function n(){var a,u,i,c;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a={},u=/^[1][3,4,5,7,8,9][0-9]{9}$/,t.name){n.next=4;break}return n.abrupt("return",t.$toast("请输入姓名"));case 4:if(t.phone){n.next=6;break}return n.abrupt("return",t.$toast("请输入电话"));case 6:if(u.test(t.phone)){n.next=8;break}return n.abrupt("return",t.$toast("手机号格式不正确"));case 8:if(-1!=t.source){n.next=10;break}return n.abrupt("return",t.$toast("请选择来源"));case 10:return e.showLoading({title:"提交中"}),n.next=13,(0,o.getUserPhone)({phone:t.phone});case 13:if(i=n.sent,0!=i.code){n.next=24;break}return console.log("getUserPhone返回值",i.data.id),a={type:t.type,name:t.name,phone:t.phone,source:t.source+1,status:"产业电工",award_content:t.award_content,user_id:i.data.id},console.log("addAward--parmas",a),n.next=20,(0,o.addAward)(a);case 20:c=n.sent,0==c.code?(e.hideLoading(),console.log("addAward返回值",c),t.$toast("新增成功"),setTimeout((function(){e.navigateBack()}),1500)):(e.hideLoading(),e.showToast({title:c.message,icon:"none"})),n.next=26;break;case 24:e.hideLoading(),e.showToast({title:"电话号码不正确，没有查找到相应的人员",icon:"none",duration:3e3});case 26:case"end":return n.stop()}}),n)})))()}}};t.default=i}).call(this,n("543d")["default"])},9055:function(e,t,n){"use strict";n.r(t);var a=n("85c6"),r=n.n(a);for(var u in a)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(u);t["default"]=r.a},9732:function(e,t,n){"use strict";var a=n("c545"),r=n.n(a);r.a},"9d2f":function(e,t,n){"use strict";n.r(t);var a=n("f750"),r=n("9055");for(var u in r)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(u);n("9732");var o=n("f0c5"),i=Object(o["a"])(r["default"],a["b"],a["c"],!1,null,"4e679d82",null,!1,a["a"],void 0);t["default"]=i.exports},c545:function(e,t,n){},f750:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return a}));var a={"u-Input":function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u--input/u--input")]).then(n.bind(null,"d45f"))},uniDataSelect:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(n.bind(null,"0dbf"))},"u-Textarea":function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u--textarea/u--textarea")]).then(n.bind(null,"7fd8"))}},r=function(){var e=this.$createElement;this._self._c},u=[]}},[["0ad0","common/runtime","common/vendor"]]]);