index.js 5.3 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/index"],{"35b8":function(e,t,n){},"5c6a":function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return a}));var a={uAvatar:function(){return n.e("uview-ui/components/u-avatar/u-avatar").then(n.bind(null,"c457"))},uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,"0fb0"))},uImage:function(){return n.e("uview-ui/components/u-image/u-image").then(n.bind(null,"3965"))},uModal:function(){return n.e("uview-ui/components/u-modal/u-modal").then(n.bind(null,"01b1"))},uButton:function(){return n.e("uview-ui/components/u-button/u-button").then(n.bind(null,"2a4a"))},uTopTips:function(){return n.e("uview-ui/components/u-top-tips/u-top-tips").then(n.bind(null,"18d2"))}},u=function(){var e=this,t=e.$createElement,n=(e._self._c,Object.assign({},e.handleDefaultCustomStyle,{marginLeft:"",marginTop:"20px"}));e.$mp.data=Object.assign({},{$root:{a0:n}})},r=[]},b750:function(e,t,n){"use strict";n.r(t);var a=n("5c6a"),u=n("c201");for(var r in u)"default"!==r&&function(e){n.d(t,e,(function(){return u[e]}))}(r);n("d353");var i,o=n("f0c5"),s=Object(o["a"])(u["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);t["default"]=s.exports},c201:function(e,t,n){"use strict";n.r(t);var a=n("ef43"),u=n.n(a);for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=u.a},c2f4:function(e,t,n){"use strict";(function(e){n("cf96");a(n("66fd"));var t=a(n("b750"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},d353:function(e,t,n){"use strict";var a=n("35b8"),u=n.n(a);u.a},ef43:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("2f62");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n("6903"),s=n("f271"),c={computed:r({},(0,a.mapGetters)(["handleDefaultCustomStyle"])),data:function(){return{userData:{headImage:"",userId:"",nickName:"",userName:"",phone:""},userInfoShow:!1,memberInfo:{lastDays:0,status:0},handleList:[{label:"订单管理",path:"orderList",icon:s.getServerImg+"dingdanguanli.png"},{label:"学员信息",path:"studentList",icon:s.getServerImg+"xueyuanxinxi.png"},{label:"我的优惠券",path:"couponList",icon:s.getServerImg+"youhiquan.png"},{label:"分享有礼",path:"shareInfo",icon:s.getServerImg+"liwu.png"},{label:"我的评价",path:"evaluateList",icon:s.getServerImg+"pingjia.png"},{label:"预约体验",path:"subscribeList",icon:s.getServerImg+"yuyue.png"},{label:"订阅通知",path:"sendMessage",icon:s.getServerImg+"yuyue.png"},{label:"退出登录",path:"logout",icon:s.getServerImg+"yuyue.png"}],studentList:[],templateList:[]}},onShow:function(){var t=this;e.getStorageSync("userData")&&(this.userData=e.getStorageSync("userData")),this.userData.headImage&&this.userData.nickName||(this.userInfoShow=!0),o.request(s.getAllStudentList,{},"POST").then((function(e){t.studentList=e.data})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})})),o.request(s.getMemberInfo,{},"POST").then((function(e){t.memberInfo=e.data})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})})),o.request(s.getTemplate,{},"POST").then((function(e){t.templateList=e.data||[]})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})}))},methods:{goToMemberCard:function(t){e.navigateTo({url:"/pagesMain/memberCardList"+(0==this.memberInfo.status?"":"?studentId="+t.studentId+"&studentName="+t.studentName+(t.venueId?"&venueId="+t.venueId+"&venueName="+t.venueName:""))})},goToHandle:function(t){"sendMessage"==t.path?wx.requestSubscribeMessage({tmplIds:this.templateList,success:function(e){},fail:function(e){}}):"logout"==t.path?(e.removeStorageSync("token"),e.navigateTo({url:"/pages/login/index"})):e.navigateTo({url:"/pagesMain/"+t.path})},share:function(){e.share({provider:"weixin",scene:"WXSceneSession",type:1,summary:"我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",success:function(e){console.log("success:"+JSON.stringify(e))},fail:function(e){console.log("fail:"+JSON.stringify(e))}})},changeWxInfo:function(t){var n=this;o.request(s.changeWxInfo,{avatarUrl:t.target.userInfo.avatarUrl,nickName:t.target.userInfo.nickName},"POST").then((function(t){n.$refs.uTips.show({title:"设置成功",type:"success"}),n.userInfoShow=!1,e.setStorage({key:"userData",data:r(r({},e.getStorageSync("userData")),{},{headImage:t.data.avatarUrl,nickName:t.data.nickName})}),n.userData.headImage=t.data.avatarUrl,n.userData.nickName=t.data.nickName})).catch((function(e){n.$refs.uTips.show({title:e.message,type:"warning"})}))}}};t.default=c}).call(this,n("543d")["default"])}},[["c2f4","common/runtime","common/vendor"]]]);