This commit is contained in:
Vinjor 2024-09-24 22:41:07 +08:00
parent 7408339b73
commit 1ee334a032
3 changed files with 58 additions and 15 deletions

View File

@ -1,8 +1,8 @@
// 应用全局配置
module.exports = {
//baseUrl: 'https://www.nuoyunr.com/admin-api',
// baseUrl: 'https://3w823u8516.vicp.fun',
baseUrl: 'http://192.168.1.4:48080',
baseUrl: 'https://3w823u8516.vicp.fun',
// baseUrl: 'http://192.168.1.4:48080',
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'http://122.51.230.86:9000/',
//wsUrl: 'wss://www.nuoyunr.com/admin-api',

View File

@ -67,7 +67,9 @@ export default {
yzm: '',
wrod: '',
activeid: 0,
tenantCode: 'lanan'
tenantCode: 'lanan',
// false
isFirstLoad: false
}
},
computed: {
@ -88,14 +90,41 @@ export default {
mounted() {
},
created(){
this.checkIfLogin()
//
if (!this.isFirstLoad) {
this.isFirstLoad = true;
//
this.checkIfLogin()
}
},
onShow() {
//
if (this.isFirstLoad) {
//
if(getToken()){
//
uni.reLaunch({
url: '/pages/home/home'
})
}else {
uni.showModal({
title: '提示',
content: '请关闭本页面重新打开',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
//
} else if (res.cancel) {
console.log('用户点击取消');
//
}
}
});
}
}
},
methods: {
checkIfLogin(){
if(getToken()){
//
@ -104,7 +133,7 @@ export default {
})
}else{
//
// this.checkIfCode()
this.checkIfCode()
}
},
/**

View File

@ -1,6 +1,6 @@
<template>
<view class="container">
<VNavigationBar title-color="#333" background-color="#fff" title="信息填写"></VNavigationBar>
<VNavigationBar title-color="#333" background-color="#fff" title="注册会员"></VNavigationBar>
<view class="body">
<view class="formItem">
<view class="formLabel">姓名</view>
@ -25,13 +25,14 @@
<input placeholder="请填写你的身份证号" v-model="formData.idCard" type="text"/>
</view>
</view>
<!-- <view class="formItem">-->
<!-- <view class="formLabel">生日</view>-->
<!-- <view class="formContainer">-->
<!-- <picker mode="date" :value="formData.birthday" start="1900-01-01" end="2050-12-12" :bindchange="bindDateChange">-->
<!-- </picker>-->
<!-- </view>-->
<!-- </view>-->
<view class="formItem">
<view class="formLabel">生日</view>
<view class="formContainer">
<picker mode="date" :value="formData.birthday" @change="bindDateChange">
<view>{{formData.birthday}}</view>
</picker>
</view>
</view>
<view class="formItem">
<view class="formLabel">手机号</view>
<view class="formContainer">
@ -69,6 +70,7 @@ export default {
cusName: "",
sex: "",
idCard:"",
birthday:"请选择你的生日",
phoneNumber:"",
address:"",
},
@ -136,6 +138,13 @@ export default {
})
return false
}
if("请选择你的生日"==this.formData.birthday){
uni.showToast({
title: '请选择生日',
icon: 'none'
})
return false
}
if(""==this.formData.phoneNumber || !this.isValidPhoneNumber(this.formData.phoneNumber)){
uni.showToast({
title: '请填写手机号',
@ -172,6 +181,7 @@ export default {
},
bindDateChange(e) {
this.formData.birthday = e.detail.value;
this.$forceUpdate()
},
radioChange: function(e) {
let radioItems = this.radioSexItems;
@ -254,6 +264,10 @@ export default {
color: #333333;
padding-bottom: 20rpx;
}
.formLabel:before {
content: "*";
color: red;
}
.radioGroup {
display: flex;