3 lines
19 KiB
JavaScript
3 lines
19 KiB
JavaScript
(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[905],{2036:function(t,e,n){var o=n(9018);o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.id,o,""]]),o.locals&&(t.exports=o.locals);var r=n(5472).Z;r("31aa6336",o,!0,{sourceMap:!1,shadowMode:!1})},7337:function(t,e,n){var o=n(2462);o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.id,o,""]]),o.locals&&(t.exports=o.locals);var r=n(5472).Z;r("276d4995",o,!0,{sourceMap:!1,shadowMode:!1})},5912:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var o,r={uPopup:n(2061).Z,uLine:n(4060).Z,uLoadingIcon:n(8264).Z},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("u-popup",{attrs:{mode:"center",zoom:t.zoom,show:t.show,customStyle:{borderRadius:"6px",overflow:"hidden",marginTop:"-"+t.$u.addUnit(t.negativeTop)},closeOnClickOverlay:t.closeOnClickOverlay,safeAreaInsetBottom:!1,duration:400},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clickHandler.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"u-modal",style:{width:t.$u.addUnit(t.width)}},[t.title?n("v-uni-text",{staticClass:"u-modal__title"},[t._v(t._s(t.title))]):t._e(),n("v-uni-view",{staticClass:"u-modal__content",style:{paddingTop:(t.title?12:25)+"px"}},[t._t("default",[n("v-uni-text",{staticClass:"u-modal__content__text"},[t._v(t._s(t.content))])])],2),t.$slots.confirmButton?n("v-uni-view",{staticClass:"u-modal__button-group--confirm-button"},[t._t("confirmButton")],2):[n("u-line"),n("v-uni-view",{staticClass:"u-modal__button-group",style:{flexDirection:t.buttonReverse?"row-reverse":"row"}},[t.showCancelButton?n("v-uni-view",{staticClass:"u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel",class:[t.showCancelButton&&!t.showConfirmButton&&"u-modal__button-group__wrapper--only-cancel"],attrs:{"hover-stay-time":150,"hover-class":"u-modal__button-group__wrapper--hover"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.cancelHandler.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"u-modal__button-group__wrapper__text",style:{color:t.cancelColor}},[t._v(t._s(t.cancelText))])],1):t._e(),t.showConfirmButton&&t.showCancelButton?n("u-line",{attrs:{direction:"column"}}):t._e(),t.showConfirmButton?n("v-uni-view",{staticClass:"u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm",class:[!t.showCancelButton&&t.showConfirmButton&&"u-modal__button-group__wrapper--only-confirm"],attrs:{"hover-stay-time":150,"hover-class":"u-modal__button-group__wrapper--hover"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmHandler.apply(void 0,arguments)}}},[t.loading?n("u-loading-icon"):n("v-uni-text",{staticClass:"u-modal__button-group__wrapper__text",style:{color:t.confirmColor}},[t._v(t._s(t.confirmText))])],1):t._e()],1)]],2)],1)},i=[],l={props:{show:{type:Boolean,default:uni.$u.props.modal.show},title:{type:[String],default:uni.$u.props.modal.title},content:{type:String,default:uni.$u.props.modal.content},confirmText:{type:String,default:uni.$u.props.modal.confirmText},cancelText:{type:String,default:uni.$u.props.modal.cancelText},showConfirmButton:{type:Boolean,default:uni.$u.props.modal.showConfirmButton},showCancelButton:{type:Boolean,default:uni.$u.props.modal.showCancelButton},confirmColor:{type:String,default:uni.$u.props.modal.confirmColor},cancelColor:{type:String,default:uni.$u.props.modal.cancelColor},buttonReverse:{type:Boolean,default:uni.$u.props.modal.buttonReverse},zoom:{type:Boolean,default:uni.$u.props.modal.zoom},asyncClose:{type:Boolean,default:uni.$u.props.modal.asyncClose},closeOnClickOverlay:{type:Boolean,default:uni.$u.props.modal.closeOnClickOverlay},negativeTop:{type:[String,Number],default:uni.$u.props.modal.negativeTop},width:{type:[String,Number],default:uni.$u.props.modal.width},confirmButtonShape:{type:String,default:uni.$u.props.modal.confirmButtonShape}}},u={name:"u-modal",mixins:[uni.$u.mpMixin,uni.$u.mixin,l],data(){return{loading:!1}},watch:{show(t){t&&this.loading&&(this.loading=!1)}},methods:{confirmHandler(){this.asyncClose&&(this.loading=!0),this.$emit("confirm")},cancelHandler(){this.$emit("cancel")},clickHandler(){this.closeOnClickOverlay&&this.$emit("close")}}},c=u,s=(n(7337),n(1503)),d=(0,s.Z)(c,a,i,!1,null,"2ec05739",null,!1,r,o),p=d.exports},4010:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var o,r={uCellGroup:n(156).Z,uCell:n(7981).Z,uAvatar:n(8125).Z,uModal:n(5912).Z,"u-Input":n(469).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(3220).Z},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("u-cell-group",[n("u-cell",{attrs:{title:"手机号",value:t.info.phone}}),n("u-cell",{attrs:{title:"头像",isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleAvatar.apply(void 0,arguments)}}},[n("u-avatar",{attrs:{slot:"value",src:t.info.avatar},slot:"value"})],1),n("u-cell",{attrs:{title:"姓名",value:t.info.name,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("姓名","name")}}}),n("u-cell",{attrs:{title:"性别",value:t.info.sex_text,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openGender.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:"生日",value:t.info.birthday_format,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openBirthday.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:"住址",value:t.info.address,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("住址","address")}}})],1),n("u-modal",{attrs:{show:t.modal.show,title:t.modal.title,showCancelButton:!0,closeOnClickOverlay:!0,asyncClose:!0},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmModal.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)},close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)}}},[n("u--input",{attrs:{border:"surround"},model:{value:t.modal.value,callback:function(e){t.$set(t.modal,"value",e)},expression:"modal.value"}})],1),n("u-action-sheet",{attrs:{show:t.gender.show,actions:t.gender.options,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeGender.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectGender.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:"date",show:t.birthday.show,closeOnClickOverlay:!0,minDate:t.birthday.minDate},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.openBirthday.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.closeBirthday.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.selectBirthday.apply(void 0,arguments)}},model:{value:t.birthday.value,callback:function(e){t.$set(t.birthday,"value",e)},expression:"birthday.value"}})],1)},i=[],l=n(3762),u=n(3062),c=n(8059),s={data:function(){return{info:{},modal:{show:!1,title:"",key:"",value:""},gender:{show:!1,options:c.Z.options},birthday:{show:!1,value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()}}},onLoad:function(){this.init()},methods:{init:function(){var t=this;this.$ajax.get("/api/client/user/profile").then((function(e){0==e.status&&(t.info=e.data)}))},handleAvatar:function(){var t=this;uni.chooseImage({count:1,success:function(){var e=(0,u.Z)((0,l.Z)().mark((function e(n){var o,r;return(0,l.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$ajax.upload("/api/web/upload",{filePath:n.tempFilePaths[0],custom:{toast:!1,loading:!1},name:"file"});case 2:if(o=e.sent,uni.showLoading(),0!=o.status){e.next=9;break}return e.next=7,t.update({avatar:o.data.file});case 7:r=e.sent,0==r.status&&(t.info.avatar=o.data.file);case 9:case"end":return e.stop()}}),e)})));function n(t){return e.apply(this,arguments)}return n}()})},openModal:function(t,e){this.modal.title=t,this.modal.key=e,this.modal.show=!0,this.modal.value=this.info[e]},confirmModal:function(){var t=this,e=this.modal.key,n=this.modal.value,o={};o[e]=n,this.update(o).then((function(o){t.modal.show=!1,0==o.status&&(t.info[e]=n)}))},closeModal:function(){this.modal.show=!1},openGender:function(){this.gender.show=!0},closeGender:function(){this.gender.show=!1},selectGender:function(t){var e=this;this.update({sex:t.value}).then((function(n){0==n.status&&(e.info.sex_text=t.name,e.info.sex=t.value)}))},openBirthday:function(){this.birthday.show=!0},closeBirthday:function(){this.birthday.show=!1},selectBirthday:function(t){var e=this,n=uni.$u.timeFormat(t.value,"yyyy-mm-dd");this.update({birthday:n}).then((function(t){0==t.status&&(e.info.birthday=e.info.birthday_format=n,e.closeBirthday())}))},update:function(t){return this.$ajax.post("/api/client/user/profile",t,{custom:{loading:!0}})}}},d=s,p=(n(2036),n(1503)),f=(0,p.Z)(d,a,i,!1,null,"6141b56a",null,!1,r,o),h=f.exports},6916:function(t,e,n){var o=n(555);o("asyncIterator")},9018:function(t,e,n){"use strict";n.r(e);var o=n(2916),r=n.n(o),a=n(3282),i=n.n(a),l=i()(r());l.push([t.id,".page[data-v-6141b56a]{padding:20px 0;box-sizing:border-box}.page[data-v-6141b56a] .u-cell-group{background:#fff}",""]),e["default"]=l},2462:function(t,e,n){"use strict";n.r(e);var o=n(2916),r=n.n(o),a=n(3282),i=n.n(a),l=i()(r());l.push([t.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-2ec05739], uni-scroll-view[data-v-2ec05739], uni-swiper-item[data-v-2ec05739]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-modal[data-v-2ec05739]{width:%?650?%;border-radius:6px;overflow:hidden}.u-modal__title[data-v-2ec05739]{font-size:16px;font-weight:700;color:#606266;text-align:center;padding-top:25px}.u-modal__content[data-v-2ec05739]{padding:12px 25px 25px 25px;\ndisplay:flex;\nflex-direction:row;justify-content:center}.u-modal__content__text[data-v-2ec05739]{font-size:15px;color:#606266;flex:1}.u-modal__button-group[data-v-2ec05739]{\ndisplay:flex;\nflex-direction:row}.u-modal__button-group--confirm-button[data-v-2ec05739]{flex-direction:column;padding:0 25px 15px 25px}.u-modal__button-group__wrapper[data-v-2ec05739]{flex:1;\ndisplay:flex;\nflex-direction:row;justify-content:center;align-items:center;height:48px}.u-modal__button-group__wrapper--confirm[data-v-2ec05739], .u-modal__button-group__wrapper--only-cancel[data-v-2ec05739]{border-bottom-right-radius:6px}.u-modal__button-group__wrapper--cancel[data-v-2ec05739], .u-modal__button-group__wrapper--only-confirm[data-v-2ec05739]{border-bottom-left-radius:6px}.u-modal__button-group__wrapper--hover[data-v-2ec05739]{background-color:#f3f4f6}.u-modal__button-group__wrapper__text[data-v-2ec05739]{color:#606266;font-size:16px;text-align:center}',""]),e["default"]=l},3062:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(5827);function o(t,e,n,o,r,a,i){try{var l=t[a](i),u=l.value}catch(c){return void n(c)}l.done?e(u):Promise.resolve(u).then(o,r)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function l(t){o(i,r,a,l,u,"next",t)}function u(t){o(i,r,a,l,u,"throw",t)}l(void 0)}))}}},3762:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(5231),n(1260),n(3575),n(5827),n(485),n(8023),n(930),n(6916),n(1229),n(7611),n(8283),n(2883),n(6007),n(7143),n(1136),n(9312);var o=n(9684);function r(){
|
||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
r=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function p(t,e,n,o){var r=e&&e.prototype instanceof g?e:g,a=Object.create(r.prototype),l=new S(o||[]);return i(a,"_invoke",{value:B(t,n,l)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var h="suspendedStart",v="suspendedYield",m="executing",y="completed",_={};function g(){}function w(){}function x(){}var b={};d(b,u,(function(){return this}));var $=Object.getPrototypeOf,k=$&&$($(j([])));k&&k!==n&&a.call(k,u)&&(b=k);var C=x.prototype=g.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(r,i,l,u){var c=f(t[r],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==(0,o.Z)(d)&&a.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,l,u)}),(function(t){n("throw",t,l,u)})):e.resolve(d).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,u)}))}u(c.arg)}var r;i(this,"_invoke",{value:function(t,o){function a(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(a,a):a()}})}function B(e,n,o){var r=h;return function(a,i){if(r===m)throw new Error("Generator is already running");if(r===y){if("throw"===a)throw i;return{value:t,done:!0}}for(o.method=a,o.arg=i;;){var l=o.delegate;if(l){var u=O(l,o);if(u){if(u===_)continue;return u}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===h)throw r=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=m;var c=f(e,n,o);if("normal"===c.type){if(r=o.done?y:v,c.arg===_)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r=y,o.method="throw",o.arg=c.arg)}}}function O(e,n){var o=n.method,r=e.iterator[o];if(r===t)return n.delegate=null,"throw"===o&&e.iterator["return"]&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),_;var a=f(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,_;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,_):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,_)}function Z(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Z,this),this.reset(!0)}function j(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(a.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError((0,o.Z)(e)+" is not iterable")}return w.prototype=x,i(C,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=d(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,d(t,s,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},E(L.prototype),d(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,o,r,a){void 0===a&&(a=Promise);var i=new L(p(t,n,o,r),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(C),d(C,s,"Generator"),d(C,u,(function(){return this})),d(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var o in e)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},e.values=j,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(o,r){return l.type="throw",l.arg=e,n.next=o,r&&(n.method="next",n.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var i=r?r.completion:{};return i.type=t,i.arg=e,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,o){return this.delegate={iterator:j(e),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),_}},e}}}]); |