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.
jiaojiu/dist/js/chunk-76299de4.de5fe503.js

2 lines
6.3 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76299de4"],{"1de2":function(t,e,n){"use strict";var r=n("bcc3"),a=n.n(r);a.a},"3b42":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"profile"},[r("nav-bar",{staticClass:"nav-bar"},[r("div",{attrs:{slot:"center"},slot:"center"},[t._v("个人中心")])]),this.isallrefresh?r("user-info",{staticClass:"user-info"},[r("div",{staticClass:"user-icon",attrs:{slot:"user-icon"},slot:"user-icon"},[this.avatarexit?r("img",{attrs:{alt:"上传成功",src:this.avatar}}):r("img",{attrs:{alt:"未上传",src:n("7df3")}}),r("van-uploader",{staticClass:"uploading",attrs:{"after-read":t.afterRead,"preview-size":"60px",accept:"image/png,image/jpeg,image/jpg,image/svg,image/gif"}})],1),r("div",{staticClass:"user-nickname",attrs:{slot:"user-nickname"},slot:"user-nickname"},[this.name?r("div",[t._v(t._s(t.name))]):r("div",[r("a",{on:{click:t.infoLogin}},[t._v("登陆")]),r("a",[t._v("/")]),r("a",{on:{click:t.infoRegister}},[t._v("注册")])])]),r("div",{staticClass:"info-sign",attrs:{slot:"sign"},slot:"sign"},[t._v(" 个性签名: "),r("span",[t._v(t._s(t.sign))])])]):t._e(),r("section",{staticClass:"account"},[r("div",{staticClass:"item imte2",on:{click:t.mineOrder}},[r("img",{attrs:{src:n("b157"),alt:""}}),r("span",[t._v("我的订单")])]),r("div",{staticClass:"item imte3"},[r("img",{attrs:{src:n("af67"),alt:""},on:{click:t.successOrder}}),r("span",[t._v("送货中")])]),r("div",{staticClass:"item imte4"},[r("img",{attrs:{src:n("ea85"),alt:""},on:{click:t.overOrder}}),r("span",[t._v("已完成")])])]),r("section",{staticClass:"footer"},[r("div",{on:{click:t.messageinfo}},[t._v("设置")]),r("div",{on:{click:t.AboutInfo}},[t._v("关于我们")]),r("div",{on:{click:function(e){return t.logout()}}},[t._v("退出")])])],1)},a=[],s=(n("b0c0"),n("96cf"),n("1da1")),i=n("a7ac"),o=n("8d33"),c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"user-info"}},[n("a",{staticClass:"clear-fix",attrs:{href:"#"}},[t._t("user-icon",[n("div",{staticClass:"privateImage-svg"})]),n("div",{staticClass:"login-info left"},[t._t("user-nickname"),t._t("sign")],2)],2)])},u=[],l={name:"UserInfo",data:function(){return{isLogin:"登陆/注册",name:""}},created:function(){},methods:{}},f=l,v=(n("1de2"),n("2877")),g=Object(v["a"])(f,c,u,!1,null,"67a3f016",null),h=g.exports,d=n("6251"),m={name:"Profile",components:{NavBar:i["a"],Scroll:o["a"],UserInfo:h},data:function(){return{name:"",isLogin:"",id:"",url:"",avatar:"",avatarexit:!1,isshow:!0,sign:"",token:"",isrefresh:!0,isallrefresh:!0}},mounted:function(){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.token=window.localStorage.getItem("token"),!t.token){e.next=11;break}return t.getAvatar(),e.next=5,Object(d["b"])();case 5:return n=e.sent,t.sign=n.data,e.next=9,Object(d["c"])();case 9:r=e.sent,t.name=r.data;case 11:t.$bus.$on("isrefreshinfo",t.isrefreshinfo),t.$bus.$on("isallrefreshInfo",t.isallrefreshInfo);case 13:case"end":return e.stop()}}),e)})))()},methods:{isallrefreshInfo:function(){this.isallrefresh=!1;var t=this;setTimeout(Object(s["a"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(d["b"])();case 2:return n=e.sent,t.sign=n.data,e.next=6,Object(d["c"])();case 6:r=e.sent,t.name=r.data,t.getAvatar(),t.isallrefresh=!0;case 10:case"end":return e.stop()}}),e)}))),300)},isrefreshinfo:function(){this.isrefresh=!1;var t=this;setTimeout(Object(s["a"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(d["c"])();case 2:return n=e.sent,t.name=n.data,e.next=6,Object(d["b"])();case 6:r=e.sent,t.sign=r.data,t.isrefresh=!0;case 9:case"end":return e.stop()}}),e)}))),300)},overOrder:function(){this.$router.push("/overorder")},successOrder:function(){this.$router.push("/successorder")},mineOrder:function(){this.$router.push("/mineorder")},AboutInfo:function(){this.$router.push("/about")},messageinfo:function(){this.$router.push("/message")},logout:function(){this.token=window.localStorage.getItem("token"),this.token?(window.localStorage.clear(),this.$router.push("/login"),this.$message("退出成功"),this.avatarexit=!1,this.name=!1,this.sign=""):this.$router.push("/login")},Default:function(){return"~assets/img/profile/avatar.svg"},infoLogin:function(){this.$router.push("/login")},infoRegister:function(){this.$router.push("/register")},afterRead:function(t){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.token=window.localStorage.getItem("token"),e.token||e.$router.push("/login"),e.url="/upload/"+e.id+"/avatar",r=new FormData,r.append("avatar",t.file),n.next=7,e.$http.post(e.url,r);case 7:e.getAvatar(),e.avatarexit=!1,e.$nextTick((function(){e.avatarexit=!0}),3e3);case 10:case"end":return n.stop()}}),n)})))()},getAvatar:function(){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.id=window.localStorage.getItem("userId"),e.next=4,t.$http.get("/users/"+t.id+"/avatar");case 4:n=e.sent,t.avatar=n.config.url,t.avatarexit=!0,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),t.avatarexit=!1;case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))()},pullingDown:function(){this.$refs.scroll.finishPullDown()}},created:function(){}},p=m,b=(n("92e1"),Object(v["a"])(p,r,a,!1,null,"9bf7be42",null));e["default"]=b.exports},"7df3":function(t,e,n){t.exports=n.p+"img/avatar.69aa8d36.svg"},"92e1":function(t,e,n){"use strict";var r=n("bee5"),a=n.n(r);a.a},af67:function(t,e,n){t.exports=n.p+"img/cart.bfc58f5a.svg"},b0c0:function(t,e,n){var r=n("83ab"),a=n("9bf2").f,s=Function.prototype,i=s.toString,o=/^\s*function ([^ (]*)/,c="name";r&&!(c in s)&&a(s,c,{configurable:!0,get:function(){try{return i.call(this).match(o)[1]}catch(t){return""}}})},b157:function(t,e,n){t.exports=n.p+"img/order.6b86a973.svg"},bcc3:function(t,e,n){},bee5:function(t,e,n){},ea85:function(t,e,n){t.exports=n.p+"img/success.1c672800.svg"}}]);
//# sourceMappingURL=chunk-76299de4.de5fe503.js.map