1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/info/datum"],{7589:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={TopBar:function(){return n.e("components/TopBar/TopBar").then(n.bind(null,"f619"))}},a=function(){var t=this,e=t.$createElement;t._self._c},s=[]},"812d":function(t,e,n){"use strict";n.r(e);var i=n("c6fa"),a=n.n(i);for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},"8c5b":function(t,e,n){"use strict";(function(t){n("39a3");i(n("66fd"));var e=i(n("c38a"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},b133:function(t,e,n){},c38a:function(t,e,n){"use strict";n.r(e);var i=n("7589"),a=n("812d");for(var s in a)"default"!==s&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("e319");var o,r=n("f0c5"),c=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"2a120675",null,!1,i["a"],o);e["default"]=c.exports},c6fa:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){n.e("components/TopBar/TopBar").then(function(){return resolve(n("f619"))}.bind(null,n)).catch(n.oe)},a={components:{TopBar:i},data:function(){return{assetsUrl:this.$util.assetsUrl,heights:[],height:"选择身高",weights:[],weight:"选择体重",age:"选择年龄",jobs:[],careersData:[],job:"选择职业",saveOption:{birthday:"",completeUser:null},userInfo:null}},mounted:function(){this.userInfo=JSON.parse(t.getStorageSync("userInfo"));for(var e=[],n=150;n<210;n++)e.push("".concat(n,"cm"));this.heights=e,e=[];for(var i=30;i<200;i++)e.push("".concat(i,"kg"));this.weights=e,this.getCareersConfig()},methods:{getCareersConfig:function(){var t=this;this.$api.public.config({tscsj:["Careers"]}).then((function(e){t.careersData=e.data.careers;var n=[],i=[];for(var a in e.data.careers)i.push(a);n.push(i),n.push(e.data.careers[i[0]]),t.jobs=n})).catch((function(t){console.log(t)}))},sure:function(){if("选择身高"!==this.height)if("选择体重"!==this.weight)if("选择年龄"!==this.age)if("选择职业"!==this.job){var e=JSON.parse(t.getStorageSync("user"));e.career=this.job,e.height=Number(this.height.substring(0,2)),e.weight=Number(this.weight.split("kg")[0]),this.saveOption.completeUser=e,this.saveOption.birthday=this.age,t.showLoading({title:"保存中",mask:!0}),this.$api.login.saveDatum(this.saveOption).then((function(n){n.data.succ&&(t.setStorageSync("regStep","CityStay"),t.setStorageSync("user",JSON.stringify(e)),t.hideLoading(),t.reLaunch({url:"/pages/info/city"}))})).catch((function(){}))}else t.showToast({title:"请选择职业",icon:"none"});else t.showToast({title:"请选择出生年月",icon:"none"});else t.showToast({title:"请选择体重",icon:"none"});else t.showToast({title:"请选择身高",icon:"none"})},heightsChange:function(t){this.height=this.heights[t.detail.value]},weightsChange:function(t){this.weight=this.weights[t.detail.value]},agesChange:function(t){this.age=t.detail.value},jobsChange:function(t){var e=this.jobs[1][t.detail.value[1]];this.job=e},jobsColumnChange:function(t){var e=this.jobs[t.detail.column][t.detail.value];0===t.detail.column&&(this.jobs[1]=this.careersData[e],this.$forceUpdate())}}};e.default=a}).call(this,n("543d")["default"])},e319:function(t,e,n){"use strict";var i=n("b133"),a=n.n(i);a.a}},[["8c5b","common/runtime","common/vendor"]]]);
|