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.
83 lines
2.0 KiB
83 lines
2.0 KiB
<template>
|
|
<view>
|
|
<view class="box_dg">
|
|
<view class="aml_30 amr_30">
|
|
<view class="amt_30 tji_wp">
|
|
<view class="an_t_1">注册新用户</view>
|
|
<view class=" pjia_time">
|
|
已有账号,马上
|
|
<text @tap="goToPage" class="lg_tit_tips">登录</text>
|
|
</view>
|
|
</view>
|
|
<view class="amt_60 lg_bx_2">
|
|
<view class="at_t amt_60">用户名</view>
|
|
<view class="lg_2_l"><input v-model="lognameValue" class="uni-input" placeholder="请输入用户名" /></view>
|
|
|
|
<view class="at_t amt_60">密码</view>
|
|
<view class="lg_2_l"><input v-model="passwordValue" class="uni-input" password type="text" placeholder="请输入密码" /></view>
|
|
|
|
<view class="at_t amt_60">确认密码</view>
|
|
<view class="lg_2_l"><input v-model="password2Value" class="uni-input" password type="text" placeholder="请再次输入密码" /></view>
|
|
|
|
<view class="amt_60 box_dg lg_btn_bd"><button @tap="registerFun" form-type="submit" class="yue_fm_btn yue_e_bun">注册</button></view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
lognameValue:"",
|
|
passwordValue:"",
|
|
password2Value:""
|
|
};
|
|
},
|
|
methods: {
|
|
goToPage:function(){
|
|
uni.navigateTo({
|
|
url:"/subPage/index/an_login/an_login"
|
|
})
|
|
},
|
|
registerFun:function(){
|
|
var that = this;
|
|
var data = {
|
|
loginname:that.lognameValue,
|
|
password:that.passwordValue,
|
|
password2:that.password2Value,
|
|
userkey:that.$param.userkey
|
|
}
|
|
this.$Request.post(this.$config.registerUserApp,data).then(res => {
|
|
console.log(res);
|
|
if (res.status == 200) {
|
|
uni.showModal({
|
|
title:"提示",
|
|
content:"注册成功",
|
|
showCancel:false,
|
|
success() {
|
|
uni.redirectTo({
|
|
url:"/subPage/index/an_login/an_login"
|
|
})
|
|
}
|
|
})
|
|
}else{
|
|
uni.showToast({
|
|
title:res.msg,
|
|
icon:"none"
|
|
})
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
page {
|
|
background-color: #fff;
|
|
}
|
|
</style>
|
|
|