2023-2-22
完善功能
This commit is contained in:
@@ -17,10 +17,11 @@
|
|||||||
"placeholder": "请输入要查询的信息",
|
"placeholder": "请输入要查询的信息",
|
||||||
"disabled": true,
|
"disabled": true,
|
||||||
"placeholderColor": "#606266"
|
"placeholderColor": "#606266"
|
||||||
},
|
}
|
||||||
|
,
|
||||||
"buttons": [{
|
"buttons": [{
|
||||||
"fontSrc": "/static/yticon.ttf",
|
"fontSrc": "/static/yticon.ttf",
|
||||||
"text": "\ue60d",
|
"text": "",
|
||||||
"fontSize": "26",
|
"fontSize": "26",
|
||||||
"color": "#303133",
|
"color": "#303133",
|
||||||
"float": "left",
|
"float": "left",
|
||||||
@@ -28,11 +29,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fontSrc": "/static/yticon.ttf",
|
"fontSrc": "/static/yticon.ttf",
|
||||||
"text": "\ue744",
|
"text": "",
|
||||||
"fontSize": "27",
|
"fontSize": "27",
|
||||||
"color": "#303133",
|
"color": "#303133",
|
||||||
"background": "rgba(0,0,0,0)",
|
"background": "rgba(0,0,0,0)"
|
||||||
"redDot": true
|
// "redDot": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -785,25 +785,25 @@
|
|||||||
url: '/pages/search/search'
|
url: '/pages/search/search'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//点击导航栏 buttons 时触发
|
// //点击导航栏 buttons 时触发
|
||||||
onNavigationBarButtonTap(e) {
|
// onNavigationBarButtonTap(e) {
|
||||||
const index = e.index;
|
// const index = e.index;
|
||||||
if (index === 0) {
|
// if (index === 0) {
|
||||||
this.$api.msg('点击了扫描');
|
// this.$api.msg('点击了扫描');
|
||||||
} else if (index === 1) {
|
// } else if (index === 1) {
|
||||||
// #ifdef APP-PLUS
|
// // #ifdef APP-PLUS
|
||||||
const pages = getCurrentPages();
|
// const pages = getCurrentPages();
|
||||||
const page = pages[pages.length - 1];
|
// const page = pages[pages.length - 1];
|
||||||
const currentWebview = page.$getAppWebview();
|
// const currentWebview = page.$getAppWebview();
|
||||||
currentWebview.hideTitleNViewButtonRedDot({
|
// currentWebview.hideTitleNViewButtonRedDot({
|
||||||
index
|
// index
|
||||||
});
|
// });
|
||||||
// #endif
|
// // #endif
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: '../../pagesU/notice/notice'
|
// url: '../../pagesU/notice/notice'
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -785,7 +785,7 @@
|
|||||||
line-height: 76upx;
|
line-height: 76upx;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
margin-top: 70upx;
|
margin-top: 70upx;
|
||||||
background: $uni-color-primary;
|
background: $uni-color-warning;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
|
|
||||||
@@ -797,13 +797,12 @@
|
|||||||
.login_bot {
|
.login_bot {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 25upx;
|
margin-top: 25upx;
|
||||||
margin-left: 70upx;
|
align-items: center;
|
||||||
margin-right: 70upx;
|
flex-direction: column;
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.forget-section {
|
.forget-section {
|
||||||
|
margin-top: 30px;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-spec;
|
color: $font-color-spec;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -811,6 +810,7 @@
|
|||||||
|
|
||||||
.register-section {
|
.register-section {
|
||||||
bottom: 50upx;
|
bottom: 50upx;
|
||||||
|
margin-top: 20px;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -21,13 +21,13 @@
|
|||||||
<input type="password" placeholder="请输入确认密码" v-model="confimpassword" @confirm="reg" />
|
<input type="password" placeholder="请输入确认密码" v-model="confimpassword" @confirm="reg" />
|
||||||
</view>
|
</view>
|
||||||
<view class="input-item">
|
<view class="input-item">
|
||||||
<text class="tit">邀请码</text>
|
<text class="tit">汇融乡村振兴卡号</text>
|
||||||
<input type="number" v-model="invitecode" placeholder="请输入邀请码" />
|
<input type="number" v-model="invitecode" maxlength="19" placeholder="请输入汇融乡村振兴卡号" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="confirm-btn" @click="reg" :disabled="logining">注册</button>
|
<button class="confirm-btn" @click="reg" :disabled="logining">注册</button>
|
||||||
|
|
||||||
<view class="forget-section" @click="toForget">忘记密码?</view>
|
<!-- <view class="forget-section" @click="toForget">忘记密码?</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="register-section">
|
<view class="register-section">
|
||||||
已经有账号?
|
已经有账号?
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
},
|
},
|
||||||
async reg() {
|
async reg() {
|
||||||
var that = this;
|
var that = this;
|
||||||
let phoneReg = /^1[1-9][0-9]\d{8}$/;
|
let phoneReg = /^1[3456789]\d{9}$/;
|
||||||
try {
|
try {
|
||||||
if (this.phone == '') {
|
if (this.phone == '') {
|
||||||
throw '请填写手机号';
|
throw '请填写手机号';
|
||||||
@@ -99,11 +99,37 @@
|
|||||||
if (this.password == '') {
|
if (this.password == '') {
|
||||||
throw '请填写密码';
|
throw '请填写密码';
|
||||||
}
|
}
|
||||||
|
if (this.confimpassword == '') {
|
||||||
|
throw '请填写确认密码';
|
||||||
|
}
|
||||||
|
if (this.password != this.confimpassword) {
|
||||||
|
throw '俩次密码不一致';
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.$api.msg(err);
|
this.$api.msg(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!this.invitecode.includes("62350109317")) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '汇融乡村振兴卡号输入有误,将无法享受惠农价。是否继续注册?',
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.aaa(false);
|
||||||
|
} else if (res.cancel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
that.aaa(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async aaa(vel) {
|
||||||
|
let that = this
|
||||||
let params;
|
let params;
|
||||||
//有推荐码的话,带上
|
//有推荐码的话,带上
|
||||||
var invitecode = this.$db.get('invitecode')
|
var invitecode = this.$db.get('invitecode')
|
||||||
@@ -127,12 +153,19 @@
|
|||||||
}
|
}
|
||||||
let data = await Api.apiCall('post', Api.index.simpleReg, params);
|
let data = await Api.apiCall('post', Api.index.simpleReg, params);
|
||||||
|
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
mask: true,
|
||||||
|
title: vel ? "恭喜您注册成功,并成为惠农会员。" : "恭喜您注册成功。",
|
||||||
|
duration: 2000
|
||||||
|
|
||||||
// uni.navigateTo({
|
});
|
||||||
// url: '/pages/public/login'
|
setTimeout(function() {
|
||||||
// });
|
that.request();
|
||||||
|
}, 3000);
|
||||||
// 注册成功 直接默认登录
|
},
|
||||||
|
async request() {
|
||||||
|
var that = this;
|
||||||
|
|
||||||
let params2 = {
|
let params2 = {
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
@@ -151,7 +184,6 @@
|
|||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 2
|
delta: 2
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -301,9 +333,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.register-section {
|
.register-section {
|
||||||
position: absolute;
|
margin-top: 40upx;
|
||||||
left: 0;
|
|
||||||
bottom: 40upx;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
|
|||||||
Reference in New Issue
Block a user