1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-my-inviteSellAfter-index"],{"479e":function(e,t,a){"use strict";var n=a("ae81"),o=a.n(n);o.a},"8b62":function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("ac1f"),a("00b4");var o=n(a("c7eb")),r=n(a("1da1")),i=a("531c"),u={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,r.default)((0,o.default)().mark((function e(){return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},methods:{postRecord:function(){var e=this;return(0,r.default)((0,o.default)().mark((function t(){var a,n,r,u;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a={},n=/^[1][3,4,5,7,8,9][0-9]{9}$/,e.name){t.next=4;break}return t.abrupt("return",e.$toast("请输入姓名"));case 4:if(e.phone){t.next=6;break}return t.abrupt("return",e.$toast("请输入电话"));case 6:if(n.test(e.phone)){t.next=8;break}return t.abrupt("return",e.$toast("手机号格式不正确"));case 8:if(-1!=e.source){t.next=10;break}return t.abrupt("return",e.$toast("请选择来源"));case 10:return uni.showLoading({title:"提交中"}),t.next=13,(0,i.getUserPhone)({phone:e.phone});case 13:if(r=t.sent,0!=r.code){t.next=24;break}return console.log("getUserPhone返回值",r.data.id),a={type:e.type,name:e.name,phone:e.phone,source:e.source+1,status:"产业电工",award_content:e.award_content,user_id:r.data.id},console.log("addAward--parmas",a),t.next=20,(0,i.addAward)(a);case 20:u=t.sent,0==u.code?(uni.hideLoading(),console.log("addAward返回值",u),e.$toast("新增成功"),setTimeout((function(){uni.navigateBack()}),1500)):(uni.hideLoading(),uni.showToast({title:u.message,icon:"none"})),t.next=26;break;case 24:uni.hideLoading(),uni.showToast({title:"电话号码不正确,没有查找到相应的人员",icon:"none",duration:3e3});case 26:case"end":return t.stop()}}),t)})))()}}};t.default=u},9055:function(e,t,a){"use strict";a.r(t);var n=a("8b62"),o=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(r);t["default"]=o.a},"9d2f":function(e,t,a){"use strict";a.r(t);var n=a("d7b3"),o=a("9055");for(var r in o)["default"].indexOf(r)<0&&function(e){a.d(t,e,(function(){return o[e]}))}(r);a("479e");var i=a("f0c5"),u=Object(i["a"])(o["default"],n["b"],n["c"],!1,null,"6824e4e5",null,!1,n["a"],void 0);t["default"]=u.exports},ae81:function(e,t,a){var n=a("d2fb");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=a("4f06").default;o("55e80fab",n,!0,{sourceMap:!1,shadowMode:!1})},d2fb:function(e,t,a){var n=a("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/* 水平间距 */\n/* 水平间距 */.content[data-v-6824e4e5]{background:#fff;min-height:100vh;padding:0 %?32?%;padding-top:%?54?%;padding-bottom:%?24?%}.content .item[data-v-6824e4e5]{margin-bottom:%?50?%}.content .item .label[data-v-6824e4e5]{margin-bottom:%?10?%}.content .orderBtn[data-v-6824e4e5]{margin-top:%?100?%;background:orange;border:none;color:#fff}',""]),e.exports=t},d7b3:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return n}));var n={"u-Input":a("d45f").default,uniDataSelect:a("0dbf").default,"u-Textarea":a("7fd8").default},o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"page"},[a("navBar",{attrs:{title:"新增兑奖记录",back:!0,color:"black",background:"white"}}),a("v-uni-view",{staticClass:"content"},[a("v-uni-view",{staticClass:"item"},[a("v-uni-view",{staticClass:"label"},[e._v("*姓名")]),a("u--input",{attrs:{clearable:!0,placeholder:"请输入姓名",border:"surround"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)}},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1),a("v-uni-view",{staticClass:"item"},[a("v-uni-view",{staticClass:"label"},[e._v("*电话")]),a("u--input",{attrs:{clearable:!0,placeholder:"请输入电话",border:"surround"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)}},model:{value:e.phone,callback:function(t){e.phone=t},expression:"phone"}})],1),a("v-uni-view",{staticClass:"item"},[a("v-uni-view",{staticClass:"label"},[e._v("*来源")]),a("uni-data-select",{attrs:{placeholder:"请选择来源",localdata:e.range},model:{value:e.source,callback:function(t){e.source=t},expression:"source"}})],1),a("v-uni-view",{staticClass:"item",staticStyle:{"margin-bottom":"24rpx",height:"auto"}},[a("v-uni-view",{staticClass:"label"},[e._v("兑奖信息")]),a("u--textarea",{attrs:{placeholder:"请输入兑奖信息"},model:{value:e.award_content,callback:function(t){e.award_content=t},expression:"award_content"}})],1),a("v-uni-button",{staticClass:"orderBtn",attrs:{plain:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.postRecord.apply(void 0,arguments)}}},[e._v("新增")])],1)],1)},r=[]}}]);
|