This commit is contained in:
parent
f7037c0643
commit
0041cc0e15
|
|
@ -30,3 +30,14 @@ export const registerCode = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改密码
|
||||||
|
*/
|
||||||
|
export const forgetPwd = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/Login/forgetPwd',
|
||||||
|
method: 'POST',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,11 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人资料"
|
"navigationBarTitleText": "个人资料"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/privacy",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "隐私协议"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/index/search/index",
|
"path": "pages/index/search/index",
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad} from '@dcloudio/uni-app'
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
import http from '@/http/http.js';
|
import {setSendMsg,forgetPwd} from '@/api/login/login.js';
|
||||||
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
code: '',
|
code: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
|
|
@ -116,7 +115,7 @@
|
||||||
/**
|
/**
|
||||||
* 注册
|
* 注册
|
||||||
*/
|
*/
|
||||||
function reset() {
|
async function reset() {
|
||||||
|
|
||||||
if (!data.mobile) {
|
if (!data.mobile) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -141,33 +140,31 @@
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在修改密码中...'
|
title: '正在修改密码中...'
|
||||||
})
|
})
|
||||||
http.request({
|
let res = await forgetPwd({
|
||||||
url: 'app/Login/forgetPwd?pwd=' + data.password + '&phone=' + data.mobile + '&msg=' + data.code,
|
pwd: data.password,
|
||||||
method: 'post'
|
phone: data.mobile,
|
||||||
}).then(
|
msg: data.code,
|
||||||
res => {
|
})
|
||||||
|
uni.hideLoading();
|
||||||
uni.hideLoading();
|
if (res.code === 0) {
|
||||||
if (res.code === 0) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '密码找回成功',
|
||||||
title: '密码找回成功',
|
icon: 'none'
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
setTimeout(function() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
});
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
uni.showModal({
|
|
||||||
showCancel: false,
|
|
||||||
title: '密码找回失败',
|
|
||||||
content: res.msg,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
uni.showModal({
|
||||||
|
showCancel: false,
|
||||||
|
title: '密码找回失败',
|
||||||
|
content: res.msg,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
<view>同意</view>
|
<view>同意</view>
|
||||||
<!-- 协议地址 -->
|
<!-- 协议地址 -->
|
||||||
<navigator url="/me/setting/mimi" open-type="navigate">《隐私政策》</navigator>
|
<navigator url="/pages/me/privacy" open-type="navigate">《隐私政策》</navigator>
|
||||||
和
|
和
|
||||||
<navigator url="/me/setting/xieyi" open-type="navigate">《用户服务协议》</navigator>
|
<navigator url="/me/setting/xieyi" open-type="navigate">《用户服务协议》</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -193,10 +193,7 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
position: absolute;
|
margin-top: 50rpx;
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 78rpx;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad} from '@dcloudio/uni-app'
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
import http from '@/http/http.js';
|
|
||||||
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
||||||
import {commonType} from '@/api/login/login.js';
|
import {commonType} from '@/api/init.js';
|
||||||
|
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
|
|
@ -65,18 +64,15 @@
|
||||||
checked: false,
|
checked: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(( options ) => {
|
onLoad(async ( options ) => {
|
||||||
if (uni.getStorageSync('qdCodeion')) { data.qdCodeion = uni.getStorageSync('qdCodeion') }
|
if (uni.getStorageSync('qdCodeion')) { data.qdCodeion = uni.getStorageSync('qdCodeion') }
|
||||||
if (options.qdCode) { data.qdCodeion = options.qdCode }
|
if (options.qdCode) { data.qdCodeion = options.qdCode }
|
||||||
if (options.invitation ) { data.invitation = options.invitation }
|
if (options.invitation ) { data.invitation = options.invitation }
|
||||||
|
|
||||||
http.request({
|
let res = await commonType(3)
|
||||||
url:'app/common/type/3',
|
if (res.code == 0) {
|
||||||
}).then(res => {
|
data.registerCode = res.data.value
|
||||||
if (res.code == 0) {
|
}
|
||||||
data.registerCode = res.data.value
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -179,7 +175,7 @@
|
||||||
invitation,
|
invitation,
|
||||||
registerCode,
|
registerCode,
|
||||||
qdCodeion
|
qdCodeion
|
||||||
} = this;
|
} = data;
|
||||||
if (!mobile) {
|
if (!mobile) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入账号',
|
title: '请输入账号',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
<template>
|
||||||
|
<view style="font-size: 14px;line-height: 26px;padding: 32upx;" class="home1 ">
|
||||||
|
<view style="font-size: 28upx;" v-html="content"></view>
|
||||||
|
<view class="btn-box u-flex u-row-center" v-if="!isLogin">
|
||||||
|
<view class="btn cancel" @click="cancel">拒绝</view>
|
||||||
|
<view class="btn" @click="back">同意</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from 'vue';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import config from '@/commons/config.js';
|
||||||
|
import {selectUserById} from '@/api/user/user.js';
|
||||||
|
import {commonType} from '@/api/init.js';
|
||||||
|
|
||||||
|
let data = reactive({
|
||||||
|
content: '',
|
||||||
|
isLogin:false
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
getGuize()
|
||||||
|
data.isLogin=uni.getStorageSync('token')?true:false
|
||||||
|
})
|
||||||
|
|
||||||
|
async function getGuize() {
|
||||||
|
let res = await commonType(155)
|
||||||
|
this.content = res.data.value
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancel(){
|
||||||
|
// #ifdef H5
|
||||||
|
uni.navigateBack()
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP
|
||||||
|
plus.runtime.quit();
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
|
||||||
|
function back(){
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
border-radius: 30px;
|
||||||
|
background: #ff7581;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.btn-box{
|
||||||
|
gap: 20px;
|
||||||
|
padding: 30rpx 130rpx;
|
||||||
|
}
|
||||||
|
.cancel{
|
||||||
|
background-color: #eee;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
page{
|
||||||
|
/* background: #1c1b20; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<template>
|
||||||
|
<view style="line-height: 26px;padding: 32upx;" class="home1 ">
|
||||||
|
<view style="font-size: 28upx;" v-html="content"></view>
|
||||||
|
<view class="btn-box u-flex u-row-center" v-if="!isLogin">
|
||||||
|
<view class="btn cancel" @click="cancel">拒绝</view>
|
||||||
|
<view class="btn" @click="back">同意</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
content:'',
|
||||||
|
isLogin:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getGuize();
|
||||||
|
this.isLogin=uni.getStorageSync('token')?true:false
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cancel(){
|
||||||
|
// #ifdef H5
|
||||||
|
uni.navigateBack()
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP
|
||||||
|
plus.runtime.quit();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
back(){
|
||||||
|
uni.navigateBack()
|
||||||
|
},
|
||||||
|
getGuize(){
|
||||||
|
// this.$Request.getT('/agreement/find?id=1').then(res =>{
|
||||||
|
// if(res.status === 0){
|
||||||
|
// this.content = res.data.content;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
this.$u.get('app/common/type/154').then(res => {
|
||||||
|
this.content = res.data.value
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
border-radius: 30px;
|
||||||
|
background: #ff7581;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.btn-box{
|
||||||
|
gap: 20px;
|
||||||
|
padding: 30rpx 130rpx;
|
||||||
|
}
|
||||||
|
.cancel{
|
||||||
|
background-color: #eee;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
page{
|
||||||
|
/* background: #1c1b20; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue