my.js 4.9 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/my/my"],{"201d":function(t,e,n){"use strict";n.r(e);var u=n("d159"),r=n.n(u);for(var a in u)"default"!==a&&function(t){n.d(e,t,(function(){return u[t]}))}(a);e["default"]=r.a},"29a5":function(t,e,n){},"5c42":function(t,e,n){"use strict";(function(t){n("630e");u(n("66fd"));var e=u(n("7a4d"));function u(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("f266")["createPage"])},"7a4d":function(t,e,n){"use strict";n.r(e);var u=n("bf7e"),r=n("201d");for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("a72c");var i,s=n("f0c5"),o=Object(s["a"])(r["default"],u["b"],u["c"],!1,null,null,null,!1,u["a"],i);e["default"]=o.exports},a72c:function(t,e,n){"use strict";var u=n("29a5"),r=n.n(u);r.a},bf7e:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return u}));var u={faNavbar:function(){return n.e("components/fa-navbar/fa-navbar").then(n.bind(null,"6858"))},uAvatar:function(){return n.e("uview-ui/components/u-avatar/u-avatar").then(n.bind(null,"3108"))},uTag:function(){return n.e("uview-ui/components/u-tag/u-tag").then(n.bind(null,"a8f0"))},uButton:function(){return n.e("uview-ui/components/u-button/u-button").then(n.bind(null,"6829"))},uCellGroup:function(){return n.e("uview-ui/components/u-cell-group/u-cell-group").then(n.bind(null,"027d"))},uCellItem:function(){return n.e("uview-ui/components/u-cell-item/u-cell-item").then(n.bind(null,"e84c"))},uTopTips:function(){return n.e("uview-ui/components/u-top-tips/u-top-tips").then(n.bind(null,"5e2a"))},faTabbar:function(){return Promise.all([n.e("common/vendor"),n.e("components/fa-tabbar/fa-tabbar")]).then(n.bind(null,"ecd8"))}},r=function(){var t=this,e=t.$createElement;t._self._c},a=[]},d159:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=a(n("a34a")),r=n("59de");function a(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,u,r,a,i){try{var s=t[a](i),o=s.value}catch(c){return void n(c)}s.done?e(o):Promise.resolve(o).then(u,r)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(u,r){var a=t.apply(e,n);function s(t){i(a,u,r,s,o,"next",t)}function o(t){i(a,u,r,s,o,"throw",t)}s(void 0)}))}}var o={mixins:[r.avatar],computed:{wavetop:function(){return this.$u.http.config.baseUrl+"/assets/addons/cms/img/wave-top.png"},wavemiddle:function(){return this.$u.http.config.baseUrl+"/assets/addons/cms/img/wave-mid.png"},wavebottom:function(){return this.$u.http.config.baseUrl+"/assets/addons/cms/img/wave-bot.png"},isBind:function(){return!1}},onShow:function(){this.vuex_token?this.getUserIndex():this.$u.vuex("vuex_user",{}),t.$off("uAvatarCropper",this.upload)},data:function(){return{statusBarHeight:t.getSystemInfoSync().statusBarHeight,navbarHeight:44,url:"",form:{avatar:""}}},methods:{getUserIndex:function(){var e=s(u.default.mark((function e(){var n;return u.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$api.getUserIndex();case 2:if(n=e.sent,t.stopPullDownRefresh(),n.code){e.next=7;break}return this.$u.toast(n.msg),e.abrupt("return");case 7:this.$u.vuex("vuex_user",n.data.userInfo||{});case 8:case"end":return e.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}(),goPage:function(){var t=s(u.default.mark((function t(e,n){var r;return u.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n||this.vuex_token){t.next=3;break}return this.$u.toast("请先登录再操作!"),t.abrupt("return");case 3:if("out"!=e){t.next=13;break}return t.next=6,this.$api.goUserLogout();case 6:if(r=t.sent,r.code){t.next=10;break}return this.$u.toast(r.msg),t.abrupt("return");case 10:return this.$u.vuex("vuex_user",{avatar:""}),this.$u.vuex("vuex_token",""),t.abrupt("return");case 13:if("/pages/my/member"!=e||this.vuex_user.is_install_vip){t.next=16;break}return this.$refs.uTips.show({title:"请先安装VIP会员插件或启用该插件",type:"error",duration:"3000"}),t.abrupt("return");case 16:if("/pages/signin/signin"!=e||this.vuex_user.is_install_signin){t.next=19;break}return this.$refs.uTips.show({title:"请先安装会员签到插件插件或启用该插件",type:"error",duration:"3000"}),t.abrupt("return");case 19:this.$Router.push(e);case 20:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),editAvatar:function(){var t=s(u.default.mark((function t(){return u.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$api.goUserAvatar({avatar:this.form.avatar});case 2:t.sent;case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},onPullDownRefresh:function(){this.vuex_token?this.getUserIndex():(t.stopPullDownRefresh(),this.$u.toast("请先登录"),this.$u.vuex("vuex_user",{}))}};e.default=o}).call(this,n("f266")["default"])}},[["5c42","common/runtime","common/vendor"]]]);