You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.4 KiB
1 line
5.4 KiB
5 months ago
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["dynamic/pages/technician/edit"],{"0a31":function(e,t,r){"use strict";var n=r("5faa"),i=r.n(n);i.a},"5faa":function(e,t,r){},b573:function(e,t,r){"use strict";r.r(t);var n=r("d92e"),i=r.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){r.d(t,e,(function(){return n[e]}))}(a);t["default"]=i.a},c939:function(e,t,r){"use strict";(function(e,t){var n=r("47a9");r("7043");n(r("3240"));var i=n(r("d253"));e.__webpack_require_UNI_MP_PLUGIN__=r,t(i.default)}).call(this,r("3223")["default"],r("df3c")["createPage"])},d253:function(e,t,r){"use strict";r.r(t);var n=r("ffe8"),i=r("b573");for(var a in i)["default"].indexOf(a)<0&&function(e){r.d(t,e,(function(){return i[e]}))}(a);r("0a31");var o=r("828b"),u=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=u.exports},d92e:function(e,t,r){"use strict";(function(e){var n=r("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r("7eb4")),a=n(r("34cf")),o=n(r("ee10")),u=n(r("7ca3")),c=r("8f59");function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,u.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f={data:function(){return{options:{},subForm:{id:0,cover:[],imgs:[],type:1,title:"",text:"",lat:"",lng:"",address:""},rule:[{name:"cover",checkType:"isNotNull",errorMsg:"请上传封面图"},{name:"imgs",checkType:"isNotNull",errorMsg:""},{name:"title",checkType:"isNotNull",errorMsg:"请输入标题",regType:2},{name:"text",checkType:"isNotNull",errorMsg:"请输入正文内容",regType:2},{name:"address",checkType:"isNotNull",errorMsg:"请选择定位地点"}],lockTap:!1}},computed:(0,c.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},subColor:function(e){return e.config.configInfo.subColor},configInfo:function(e){return e.config.configInfo},userInfo:function(e){return e.user.userInfo},location:function(e){return e.user.location},haveShieldOper:function(e){return e.user.haveShieldOper}}),onLoad:function(e){var t=e.type;t*=1,this.options=e,this.subForm.type=t,this.rule[1].errorMsg=1==t?"请上传图片":"请上传视频",this.initIndex(),this.$util.setNavigationBarColor({bg:this.primaryColor})},methods:l(l({},(0,c.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var e=this;return(0,o.default)(i.default.mark((function t(){var r,n,a,o;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e.options.id,n=void 0===r?0:r,n){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,e.$api.dynamic.coachDynamicInfo({id:n});case 5:for(o in a=t.sent,a.cover=[{path:a.cover}],a.imgs=a.imgs.map((function(e){return{path:e}})),e.subForm)e.subForm[o]=a[o];case 9:case"end":return t.stop()}}),t)})))()},imgUpload:function(e){var t=e.imagelist,r=e.imgtype;this.subForm[r]=t},toChooseLocation:function(t){var r=this;return(0,o.default)(i.default.mark((function t(){var n,o,u,c,s,l,f,d,p,m,v,h,g,b,y,k;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,r.$util.checkAuth({type:"userLocation"});case 2:return n=r.location,o=n.lat,void 0===o?"":o,u=n.lng,void 0===u?"":u,c=r.subForm,s=c.id,l=void 0===s?0:s,f=c.lat,d=c.lng,l&&(f,d),p={},t.next=9,e.chooseLocation(p);case 9:if(m=t.sent,v=(0,a.default)(m,2),h=v[1],g=h.address,b=void 0===g?"":g,y=h.longitude,k=h.latitude,y){t.next=18;break}return t.abrupt("return");case 18:r.subForm.address=b,r.subForm.lat=k,r.subForm.lng=y;case 21:case"end":return t.stop()}}),t)})))()},validate:function(e){var t=new this.$util.Validate;this.rule.map((function(r){var n=r.name;t.add(e[n],r)
|