1 line
7.3 KiB
JavaScript
1 line
7.3 KiB
JavaScript
(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[913],{6609:function(e,t,n){var a=n(7308);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var i=n(5472).Z;i("27319f71",a,!0,{sourceMap:!1,shadowMode:!1})},8935:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var a,i={uRow:n(7711).Z,uCol:n(4533).Z,"u-Image":n(5392).Z,"u-Form":n(2975).Z,uFormItem:n(3751).Z,"u-Input":n(469).Z,uIcon:n(5862).Z,uButton:n(7344).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(3220).Z},o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"form"},[n("v-uni-view",{staticClass:"title"},[n("u-row",{attrs:{justify:"space-between"}},[n("u-col",{attrs:{span:"6"}},[n("u--image",{attrs:{src:e.logo,width:"40",height:"40"}})],1),n("u-col",{attrs:{span:"6",textAlign:"right"}},[n("v-uni-text",{staticClass:"app-name"},[e._v(e._s(e.appName))])],1)],1)],1),n("u--form",{ref:"form",attrs:{model:e.user,labelWidth:"70"}},[n("u-form-item",{attrs:{label:"手机号",prop:"phone",required:!0}},[n("u--input",{attrs:{focus:!0,border:"bottom",placeholder:"请填写手机号"},model:{value:e.user.phone,callback:function(t){e.$set(e.user,"phone",t)},expression:"user.phone"}})],1),n("u-form-item",{attrs:{label:"密码",prop:"password",required:!0}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写密码",password:!0},model:{value:e.user.password,callback:function(t){e.$set(e.user,"password",t)},expression:"user.password"}})],1),n("u-form-item",{attrs:{label:"姓名",prop:"name"}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写姓名"},model:{value:e.user.name,callback:function(t){e.$set(e.user,"name",t)},expression:"user.name"}})],1),n("u-form-item",{attrs:{label:"性别",prop:"sex"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openGender.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"input-text"},[n("v-uni-text",[e._v(e._s(e.gender.text))]),n("u-icon",{attrs:{name:"arrow-right"}})],1)],1),n("u-form-item",{attrs:{label:"生日",prop:"birthday"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openBirthday.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"input-text"},[n("v-uni-text",{class:{"input-placeholder":!e.user.birthday}},[e._v(e._s(e.birthday.text))]),n("u-icon",{attrs:{name:"arrow-right"}})],1)],1),n("u-form-item",{attrs:{label:"住址",prop:"address"}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写地址"},model:{value:e.user.address,callback:function(t){e.$set(e.user,"address",t)},expression:"user.address"}})],1)],1),n("v-uni-view",{staticClass:"button"},[n("u-button",{attrs:{text:"注册",type:"error"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}})],1),n("u-action-sheet",{attrs:{show:e.gender.show,actions:e.gender.options,closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeGender.apply(void 0,arguments)},select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectGender.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:"date",show:e.birthday.show,closeOnClickOverlay:!0,minDate:e.birthday.minDate},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.openBirthday.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeBirthday.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.selectBirthday.apply(void 0,arguments)}},model:{value:e.birthday.value,callback:function(t){e.$set(e.birthday,"value",t)},expression:"birthday.value"}})],1),n("v-uni-view",{staticClass:"icp"},[n("v-uni-text",{on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleIcp.apply(void 0,arguments)}}},[e._v(e._s(e.setting.web_icp))])],1)],1)},s=[],r=n(8059),u={data:function(){return{user:{phone:"",password:"",openid:"",open_type:"",name:"",sex:r.Z.none.value,address:""},rules:{phone:{required:!0,message:"手机号必填",trigger:["blur","change"]},password:{required:!0,message:"密码必填",trigger:["blur","change"]}},setting:{},logo:"",appName:"",openid:"",open_type:"",gender:{show:!1,text:r.Z.none.text,options:r.Z.options},birthday:{show:!1,text:"请选择生日",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()}}},onLoad:function(e){this.user.openid=e.openid,this.user.open_type=e.open_type,console.log(this.user)},onReady:function(){var e=this;this.$refs["form"].setRules(this.rules),this.$ajax.get("/admin-api/_settings").then((function(t){0==t.status&&(e.setting=t.data,e.logo=e.setting.logo,e.appName=e.setting.app_name)}))},methods:{submit:function(){var e=this;this.$refs["form"].validate().then((function(t){uni.showLoading(),e.$ajax.post("/api/client/register",e.user).then((function(e){uni.hideLoading(),0==e.status&&(uni.showToast({title:"注册成功",icon:"success"}),setTimeout((function(){uni.setStorageSync("medical_record_client_auth_token",e.data.token),uni.redirectTo({url:"/pages/index/index"})}),800))}))})).catch((function(e){}))},handleIcp:function(){window.open("https://beian.miit.gov.cn","_blank")},openGender:function(){this.gender.show=!0},closeGender:function(){this.gender.show=!1},selectGender:function(e){this.gender.text=e.name,this.user.sex=e.value},openBirthday:function(){this.birthday.show=!0},closeBirthday:function(){this.birthday.show=!1},selectBirthday:function(e){this.user.birthday=this.birthday.text=uni.$u.timeFormat(e.value,"yyyy-mm-dd"),this.closeBirthday()}}},d=u,c=(n(6609),n(1503)),l=(0,c.Z)(d,o,s,!1,null,"d048ec5c",null,!1,i,a),p=l.exports},7308:function(e,t,n){"use strict";n.r(t);var a=n(2916),i=n.n(a),o=n(3282),s=n.n(o),r=s()(i());r.push([e.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/* 文章场景相关 */.page[data-v-d048ec5c]{background:linear-gradient(200deg,#c6e1ff,#4080ff);height:100vh;display:flex;flex-direction:column;justify-content:center}.buttom-image[data-v-d048ec5c]{position:absolute;width:100%;height:200px;bottom:0;top:80%}.form[data-v-d048ec5c]{padding:10px 20px;background-color:#fff;margin:0 10px;border-radius:10px}.title[data-v-d048ec5c]{margin:10px 0}.button[data-v-d048ec5c]{margin-top:10px}.app-name[data-v-d048ec5c]{font-size:20px}.icp[data-v-d048ec5c]{margin-top:50px;text-align:center;color:#fff}.input-text[data-v-d048ec5c]{color:#303133;font-size:15px;padding:6px 9px;border-bottom:1px solid #dadbde;width:100%;display:flex;justify-content:space-between}.input-placeholder[data-v-d048ec5c]{color:silver}',""]),t["default"]=r}}]); |