no message
This commit is contained in:
+13
@@ -27,6 +27,19 @@ export function register(params) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function forgotPassword(params) {
|
||||
// params.appId = APPID;
|
||||
return request({
|
||||
url: "/user/forgotPassword",
|
||||
method: "post",
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 密码登录
|
||||
* @param {Object} params
|
||||
|
||||
@@ -41,6 +41,7 @@ import { getStorageFun, TOKEN_NAME } from '@/utils/auth.js';
|
||||
|
||||
export default {
|
||||
name: "common_card",
|
||||
props:['Fimg','Bimg'],
|
||||
data() {
|
||||
return {
|
||||
uploadTemplList: [
|
||||
@@ -70,12 +71,25 @@ export default {
|
||||
fileListF: {},// 身份反面照片
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
Fimg(p,r){
|
||||
if(p){
|
||||
this.fileListZ = {accessUrl:p};
|
||||
}
|
||||
},
|
||||
Bimg(p,r){
|
||||
if(p){
|
||||
this.fileListF = {accessUrl:p};
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
deletePic(event) {
|
||||
this.fileListZ.splice(event.index, 1);
|
||||
},
|
||||
phoneFun(type) {
|
||||
let that = this;
|
||||
console.log('aaaaaaa')
|
||||
/*#ifdef MP*/
|
||||
uni.chooseMedia({
|
||||
count: 1, // 默认为1,摄像头拍照为1,录像为10,录音为1
|
||||
@@ -93,7 +107,7 @@ export default {
|
||||
}
|
||||
});
|
||||
/*#endif*/
|
||||
/*#ifdef APP-PLUS*/
|
||||
/*#ifndef MP*/
|
||||
uni.chooseImage({
|
||||
count: 1, // 默认9,设置图片的数量
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
|
||||
+16
-1
@@ -139,5 +139,20 @@
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
"vueVersion" : "3",
|
||||
"h5": {
|
||||
"devServer": {
|
||||
"disableHostCheck": true, // 禁止访问本地host文件
|
||||
"port": 8085, // 修改项目端口
|
||||
"proxy": {
|
||||
"/api": { // 配置服务器路径
|
||||
"target": "http://api.outer.tbmall.xin:6880", // 目标服务器
|
||||
"changeOrigin": true, // 重写路径
|
||||
"pathRewrite": {
|
||||
"^/api": "" // 将/api替换为空
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,6 +339,11 @@
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "login/forgotPass",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "register/register",
|
||||
"style": {
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe></TopSafe>
|
||||
<Header title="忘记密码" />
|
||||
<view class="contract-view">
|
||||
<view class="input-view">
|
||||
<up-input placeholder="请输入手机号" border="surround" v-model="form.mobile" :customStyle="inputCss"></up-input>
|
||||
</view>
|
||||
<view class="input-view">
|
||||
<up-input placeholder="请输入验证码" border="surround" v-model="form.smsCode" :customStyle="inputCss">
|
||||
<template #suffix style="margin-right: 10rpx;">
|
||||
<view v-if="countdown" class="code-warp">
|
||||
<up-count-down :time="60 * 1000" format="ss" @finish="countdown = false"></up-count-down>
|
||||
<text style="margin-left: 10rpx;">s</text>
|
||||
</view>
|
||||
<view v-else @click="getMobileCode" class="code_msg">
|
||||
获取验证码
|
||||
</view>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
<view class="input-view">
|
||||
<up-input placeholder="请输入登录密码" border="surround" v-model="form.pass" :customStyle="inputCss"
|
||||
:type="loginPasswordIsShow ? 'text' : 'password'">
|
||||
<template #suffix style="margin-right: 10rpx;">
|
||||
<up-image v-if="loginPasswordIsShow" src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"
|
||||
@click="loginPasswordIsShow = false;"></up-image>
|
||||
<up-image v-else src="/static/login/hidden.png" width="20" height="20" bgColor="#f1f6ff00"
|
||||
@click="loginPasswordIsShow = true;"></up-image>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
<view class="input-view">
|
||||
<up-input placeholder="请输入登录密码" border="surround" v-model="form.passOne" :customStyle="inputCss"
|
||||
:type="loginPassword2IsShow ? 'text' : 'password'">
|
||||
<template #suffix style="margin-right: 10rpx;">
|
||||
<up-image v-if="loginPassword2IsShow" src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"
|
||||
@click="loginPassword2IsShow = false;"></up-image>
|
||||
<up-image v-else src="/static/login/hidden.png" width="20" height="20" bgColor="#f1f6ff00"
|
||||
@click="loginPassword2IsShow = true;"></up-image>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
<view class="login_comm_but login_comm_but_yes" style="margin-top:48rpx" @click="registerFun" >
|
||||
确认修改
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserList } from '@/api/common.js';
|
||||
import { forgotPassword } from '@/api/auth.js';
|
||||
import Header from '@/components/common/header.vue';
|
||||
import TopSafe from '@/components/common/top-safe.nvue'
|
||||
import CryptoJS from 'crypto-js';
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe },
|
||||
data() {
|
||||
return {
|
||||
form:{
|
||||
mobile:'',
|
||||
smsCode:'',
|
||||
pass:'',
|
||||
passOne:''
|
||||
|
||||
},
|
||||
loginPasswordIsShow:false,
|
||||
loginPassword2IsShow:false,
|
||||
countdown: false,// 清空倒计时
|
||||
inputCss: {
|
||||
"height": '80rpx',
|
||||
"background": "#F3F3F3FF",
|
||||
"border-radius": "30rpx",
|
||||
"border": "0rpx",
|
||||
"padding-left": "16px",
|
||||
},
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
async getMobileCode() {
|
||||
const form = this.form;
|
||||
if (!form.mobile) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入手机号码",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.countdown = true;
|
||||
|
||||
const params = {
|
||||
mobile: form.mobile,
|
||||
type: 'passwd',
|
||||
}
|
||||
const response = await getUserList(params);
|
||||
if (response && response.bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: response.msg,
|
||||
});
|
||||
} else {
|
||||
this.countdown = false;
|
||||
}
|
||||
},
|
||||
registerFun(){
|
||||
if (!this.form.mobile) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入手机号码",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.form.smsCode) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入验证码",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.form.pass || !this.form.passOne) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入密码",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.form.pass !== this.form.passOne) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "两次输入的登录密码不一致",
|
||||
});
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
verificationCode:this.form.smsCode,
|
||||
newPassword:CryptoJS.MD5(this.form.pass).toString()
|
||||
}
|
||||
forgotPassword(params).then(res=>{
|
||||
console.log('params',res)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contract-view {
|
||||
width: 100%;
|
||||
height: calc(100% - 88rpx - var(--status-bar-height));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
.input-view{
|
||||
width:100%;
|
||||
height:100rpx;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 16rpx;
|
||||
margin-top:48rpx;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -46,6 +46,7 @@
|
||||
<view class="cut_way_warp">
|
||||
<view v-if="loginWay === 'password'" @click="loginWay = 'code'">验证码登录</view>
|
||||
<view v-if="loginWay === 'code'" @click="loginWay = 'password'">密码登录登录</view>
|
||||
<!-- <view @click="jumpForgot">忘记密码</view> -->
|
||||
<view @click="jumpRegister">注册</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -193,6 +194,11 @@ export default {
|
||||
this.countdown = false;
|
||||
}
|
||||
},
|
||||
jumpForgot(){
|
||||
uni.navigateTo({
|
||||
url: "/pages/login_package/login/forgotPass",
|
||||
})
|
||||
},
|
||||
jumpRegister() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login_package/register/register",
|
||||
|
||||
+4
-3
@@ -362,10 +362,11 @@ export default {
|
||||
this.serviceShow = true;
|
||||
} else if (item.id === 9) {// 实名认证
|
||||
const currentUserData = this.currentUserData;
|
||||
console.log('currentUserData',this.currentUserData)
|
||||
let path = "/pages/mine_package/mine_authentication/mine_authentication"
|
||||
if (currentUserData && Object.keys(currentUserData).length !== 0 && currentUserData.certStatus && currentUserData.certStatus !== 0) {
|
||||
path = "/pages/mine_package/mine_authentication_ok/mine_authentication_ok"
|
||||
}
|
||||
// if (currentUserData && Object.keys(currentUserData).length !== 0 && currentUserData.certStatus && currentUserData.certStatus !== 0) {
|
||||
// path = "/pages/mine_package/mine_authentication_ok/mine_authentication_ok"
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
})
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 证件照 -->
|
||||
<CommonCard @valueFunc="getValue" />
|
||||
<CommonCard @valueFunc="getValue" :Fimg="form.certFimg" :Bimg="form.certBimg" />
|
||||
<view class="add_but" @click="addAuthentication">
|
||||
提交
|
||||
</view>
|
||||
@@ -31,7 +31,7 @@
|
||||
<script>
|
||||
import CommonCard from '@/components/common_card.vue';
|
||||
import Header from '@/components/header.vue';
|
||||
import { realNameAuthentication } from '@/api/auth.js';
|
||||
import { realNameAuthentication,getUserInfo } from '@/api/auth.js';
|
||||
import { CERT_OPTION } from '@/utils/enumUtils.js';
|
||||
|
||||
export default {
|
||||
@@ -96,10 +96,34 @@ export default {
|
||||
],
|
||||
certShow: false,
|
||||
certOption: [],
|
||||
userInfo:null
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.getUserInfo();
|
||||
},
|
||||
async getUserInfo() {
|
||||
const result = await getUserInfo();
|
||||
if (result && result.bizcode === 100) {
|
||||
const data = result.data;
|
||||
this.userInfo = result.data || {};
|
||||
|
||||
this.form = {
|
||||
name:this.userInfo.name,
|
||||
certNo:this.userInfo.certNo,
|
||||
certType:this.userInfo.certType,
|
||||
certName: this.userInfo.certType == 1?'居民身份证' : '护照',
|
||||
certFimg:this.userInfo.certFimg,
|
||||
certBimg:this.userInfo.certBimg,
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
async addAuthentication() {
|
||||
const params = {
|
||||
...this.form
|
||||
@@ -111,6 +135,7 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!params.certType) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
@@ -125,6 +150,13 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(params.certNo)){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入正确的证件号码",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (params.certFimg.length === 0) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
@@ -140,12 +172,12 @@ export default {
|
||||
return;
|
||||
}
|
||||
console.log("params", params);
|
||||
const resp = await realNameAuthentication(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok',
|
||||
})
|
||||
}
|
||||
// const resp = await realNameAuthentication(params);
|
||||
// if (resp && resp.bizcode === 100) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok',
|
||||
// })
|
||||
// }
|
||||
},
|
||||
// 提交地址
|
||||
certConfirm(e) {
|
||||
|
||||
+4
-2
@@ -2,8 +2,10 @@
|
||||
// export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境
|
||||
// export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境
|
||||
|
||||
export const BASE_URL = "https://api.tbmall.xin"; //生产
|
||||
// export const BASE_URL ='http://api.hm.a-d.work' // 测试
|
||||
// export const BASE_URL = "https://api.tbmall.xin"; //生产
|
||||
// export const BASE_URL ='http://api.hm.a-d.work:6880/api' // 测试
|
||||
export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 测试
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-4
@@ -267,10 +267,11 @@ export const CERT_OPTION = [
|
||||
{
|
||||
key: 1,
|
||||
value: "居民身份证"
|
||||
}, {
|
||||
key: 2,
|
||||
value: "护照"
|
||||
},
|
||||
}
|
||||
// , {
|
||||
// key: 2,
|
||||
// value: "护照"
|
||||
// },
|
||||
]
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user