index.js 5.2 KB

12
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_module/establish/index"],{70:function(e,n,t){"use strict";(function(e,n){var r=t(4);t(26);r(t(25));var o=r(t(71));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t(1)["default"],t(2)["createPage"])},71:function(e,n,t){"use strict";t.r(n);var r=t(72),o=t(74);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);t(79);var i,c=t(32),u=Object(c["default"])(o["default"],r["render"],r["staticRenderFns"],!1,null,"fa4f4b7c",null,!1,r["components"],i);u.options.__file="pages_module/establish/index.vue",n["default"]=u.exports},72:function(e,n,t){"use strict";t.r(n);var r=t(73);t.d(n,"render",(function(){return r["render"]})),t.d(n,"staticRenderFns",(function(){return r["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return r["recyclableRender"]})),t.d(n,"components",(function(){return r["components"]}))},73:function(e,n,t){"use strict";var r;t.r(n),t.d(n,"render",(function(){return o})),t.d(n,"staticRenderFns",(function(){return i})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return r}));try{r={tuiForm:function(){return Promise.all([t.e("common/vendor"),t.e("components/thorui/tui-form/tui-form")]).then(t.bind(null,136))},tuiFormItem:function(){return t.e("components/thorui/tui-form-item/tui-form-item").then(t.bind(null,144))},tuiInput:function(){return t.e("components/thorui/tui-input/tui-input").then(t.bind(null,151))},tuiTextarea:function(){return Promise.all([t.e("common/vendor"),t.e("components/thorui/tui-textarea/tui-textarea")]).then(t.bind(null,158))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var e=this,n=e.$createElement;e._self._c},a=!1,i=[];o._withStripped=!0},74:function(e,n,t){"use strict";t.r(n);var r=t(75),o=t.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);n["default"]=o.a},75:function(e,n,t){"use strict";(function(e){var r=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=r(t(44)),a=r(t(46)),i=t(47),c=function(){Promise.all([t.e("common/vendor"),t.e("components/cardCom/index")]).then(function(){return resolve(t(126))}.bind(null,t)).catch(t.oe)},u={components:{cardCom:c},onLoad:function(e){(e.id||0==e.id)&&(this.isEdit=!0,this.cardInfo=this.$cache.getCache("cardInfo"))},data:function(){return{selectList:[{title:"one",img:t(76)},{title:"two",img:t(77)},{title:"three",img:t(78)}],cardInfo:{name:"",positions:"",company:"",head:"",mobile:"",wechat:"",address:"",personalIntroduction:"",companyIntroduction:"",style:0},isEdit:!1}},methods:{previewCard:function(n){this.$cache.setCache("cardInfo",this.cardInfo),e.navigateTo({url:"/pages_module/previewTwoCard/index"})},changeIdx:function(e){this.cardInfo.style=e},changeImg:function(){var n=this;e.chooseMedia({count:1,mediaType:["image"],sourceType:["album","camera"],sizeType:["original","compressed"],success:function(e){n.getImage(e.tempFiles[0].tempFilePath)}})},getImage:function(n){var t=this;return(0,a.default)(o.default.mark((function r(){return o.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:t.$loading.show("上传中..."),e.uploadFile({url:"https://www.zhult.com/laoa-huozhu/api/hz/business-card/third/upload",filePath:n,header:{"Content-Type":"application/json; charset=UTF-8","Auth-Token":e.getStorageSync("token")},name:"file",formData:{user:"head"},success:function(e){t.cardInfo.head=JSON.parse(e.data).data},complete:function(){t.$loading.hide()}});case 2:case"end":return r.stop()}}),r)})))()},saveCard:function(){var n=this;return(0,a.default)(o.default.mark((function t(){var r,a;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(""!==n.cardInfo.name){t.next=3;break}return n.$showToast("请输入姓名"),t.abrupt("return");case 3:if(r=/^1[3-9]\d{9}$/,r.test(n.cardInfo.mobile)){t.next=7;break}return n.$showToast("请输入正确的手机号码"),t.abrupt("return");case 7:if(!n.isEdit){t.next=13;break}return t.next=10,(0,i.updateCardApi)(n.cardInfo);case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,(0,i.createCardApi)(n.cardInfo);case 15:t.t0=t.sent;case 16:a=t.t0,2e4===a.statusCode&&(n.$showToast(n.isEdit?"更新成功...":"创建成功...","success"),setTimeout((function(){e.reLaunch({url:"/pages_module/myCard/index?id=".concat(a.data)})}),1200));case 18:case"end":return t.stop()}}),t)})))()}},onUnload:function(){this.$cache.removeCache("cardInfo")}};n.default=u}).call(this,t(2)["default"])},79:function(e,n,t){"use strict";t.r(n);var r=t(80),o=t.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);n["default"]=o.a},80:function(e,n,t){}},[[70,"common/runtime","common/vendor","pages_module/common/vendor"]]]);
  2. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages_module/establish/index.js.map