Commit 1b0130d3 by sunerhu

系统设置页面添加

parent c02d2be1
...@@ -220,5 +220,9 @@ export default { ...@@ -220,5 +220,9 @@ export default {
// 退课列表 // 退课列表
queryDropCourseList(params){ queryDropCourseList(params){
return request(`${cffpURL}/course/queryDropCourseList`, "POST", params) return request(`${cffpURL}/course/queryDropCourseList`, "POST", params)
},
// 我的团队
queryMyTeamInfo(params){
return request(`${cffpURL}/cffp/orgInfo/queryMyTeamInfo`, "POST", params)
} }
} }
<template>
<view class="content">
<view class="header">
<view class="header-box">
<view class="header-box-img">
</view>
<text>CFFP财富中心</text>
<text>V1.0.21</text>
</view>
<view class="">
</view>
</view>
<view class="footer">
<view class="">
<text>《服务协议》| 《隐私政策》</text>
<p>客服电话:400:921-9029</p>
<p>由银盾保险经纪有限公司提供</p>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
}
}
</script>
<style lang="scss">
.content{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.header{
flex: 1;
border: 1px solid aqua;
}
.footer{
flex: 1;
border: 1px solid #000;
}
// .header-box{
// height: 300rpx;
// margin: 0 50rpx;
// display: flex;
// border-bottom: 1px solid #E6E6E6;
// }
.header-box-img{
width: 124rpx;
height: 124rpx;
margin: auto auto;
background: url('../../../static/myteam/Group1633.png');
background-size: auto 100%;
}
</style>
\ No newline at end of file
<template>
<view class="">
<text>这里是手机绑定页面</text>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods:{
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view class="conent">
<view class="input-row">
<input class="m-input" maxlength="11" type="text" clearable v-model="account" placeholder="请输入手机号" />
</view>
<view class="input-row">
<input maxlength="16" type="password" clearable v-model="password" placeholder="请输入新密码" />
</view>
<view class="input-row">
<input maxlength="16" type="password" clearable v-model="newpassword" placeholder="重新输入密码" />
</view>
<view class="input-row" >
<view style="width: 65%;"><input maxlength="11" type="text" v-model="code" placeholder="请输入验证码" /></view>
<view style="width: 30%;"><text v-if="codetimecode == false" style="font-size: 26upx;color: #3971E2;" @click="getCode()">获取验证码</text>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #3971E2;" >{{countdown}}秒后重新获取</text></view>
</view>
<view class="forgetpsd"><button type="primary" class="primary log-btn" @click="registerck">修改密码</button></view>
</view>
</template>
<script>
export default {
data() {
return {
account:'',
password:'',
newpassword:'',
code:'',
countdown: '60',
timer: null,
codetimecode: false
}
},
methods:{
getCode() {
if(this.account== ''){
uni.showToast({
title: '手机号码不能为空',
icon: 'none'
});
return false
}
const data = {
phone: this.account,
codetype: '1'
};
api.code( data).then(res => {
console.log(res, 'asok')
if(res.code == 0){
this.sendCode()
this.codetimecode = true
uni.showToast({
title:'发送成功',
icon:'none'
})
}else {
uni.showToast({
title: res.msg,
icon:'none'
})
}
})
},
sendCode(){
this.loading(); //启动定时器
this.timer = setInterval(() =>{
//创建定时器
if(this.countdown === 1){
this.clearTimer(); //关闭定时器
this.skipStep();
}else{
this.loading();
}
},1000);
},
loading(){
//启动定时器
this.countdown--; //定时器减1
},
clearTimer(){
//清除定时器
clearInterval(this.timer);
this.timer = null;
this.codetimecode = false
},
registerck() {
if(this.account == ''){
uni.showToast({
title: '手机号不能为空',
icon: 'none'
});
return false
}
if(this.password == ''){
uni.showToast({
title: '密码不能为空',
icon: 'none'
});
return false
}
if(this.password != this.newpassword){
uni.showToast({
title: '2次密码输入不一致',
icon: 'none'
});
return false
}
if(this.code == ''){
uni.showToast({
title: '请输入短信验证码',
icon: 'none'
});
return false
}
if( this.newpassword == '' != this.confirmpassword == ''){
uni.showToast({
title: '新密码与确认密码不一致',
icon: 'none'
});
return false
}
const data = {
phone: this.account,
newPassword: this.password,
newPassword1: this.newpassword,
code:this.code,
codetype: '1'
}
this.$http.post('/route/appUser/forgetPassword', data).then(res=>{
if(res.code == 0 ) {
uni.showToast({
title: '修改成功',
icon: 'none'
});
uni.redirectTo({
url:'./success'
})
}else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
})
}
}
}
</script>
<style scoped>
page {
background-color: RGBA(252, 252, 252, 1);
}
.conent {
width: 100vw;
overflow: hidden;
}
.input-row {
height: 100upx;
display: flex;
margin: 20upx 0;
align-items: center;
padding: 0 20upx;
background: #FFFFFF;
border-bottom: 1upx solid #C8C7CC;
}
.input-row-password{
height: 100upx;
display: flex;
justify-content: space-around;
margin: 20upx 0;
align-items: center;
padding-left: 20upx;
background: #FFFFFF;
}
.forgetpsd{
margin: 40upx 20upx;
}
.log-btn {
border-radius: 10upx;
font-size: 34upx;
box-shadow: 0px 16upx 32upx 0px rgba(2, 168, 244, 0.24);
}
</style>
<template>
<view>
<menu-list :minorMenuLists="minorMenuLists"></menu-list>
</view>
</template>
<script>
import MenuList from "./menulist.vue"
export default {
components:{
MenuList
},
data() {
return {
minorMenuLists: [{
title: '手机号绑定',
icon: '',
link: '/pages/personalCenter/accountoperation/phonebinding',
isOpen: true,
isShow: true,
isType: false,
},
{
title: '重置密码',
icon: '',
link: '/pages/personalCenter/accountoperation/resetpassword',
isOpen: true,
isShow: true,
isType: false,
},
{
title: '注销账号',
icon: '',
link: '',
isOpen: true,
isShow: true,
isType: true,
}
]
}
}
}
</script>
<style>
</style>
<template>
<view>
<view class="personalInfo">
<view class="ulBox">
<view v-for="item in minorMenuLists.filter(v=>v.isShow)" :key="item.title" @click="goDetail(item)" class="liBox">
<view class="infoBox">
<!-- <image :src="'/static/moduleIcon/'+item.icon+'.png'" alt="" srcset="" mode="widthFix"></image> -->
<text>{{item.title}}</text>
</view>
<view class="iconBox">
<i class="iconfont icon-youjiantou"></i>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
minorMenuLists: {
type: Array
}
},
data() {
return {
}
},
mounted(){
console.log(this.minorMenuLists, 7412)
},
methods:{
goDetail(item){
if(item.isShow && item.isOpen){{
if(item.isType == true){
uni.showModal({
title: item.title,
content:'确定要进行' + item.title + '操作吗?',
showCancel:true,
success: function (res) {
if (res.confirm) {
uni.showToast({
title: '操作成功',
icon: 'none'
});
} else{
console.log('已取消')
}
}
});
}else{
uni.navigateTo({
url: item.link
});
}
}
}else{
common.errorDialog(2,'该模块正在开发中,敬请期待!','提示');
}
}
}
}
</script>
<style lang="scss">
.personalInfo{
background: #fff;
width: 95%;
margin: 6rpx auto 0;
.ulBox{
padding: 0 30rpx;
.liBox{
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
height: 92rpx;
.infoBox{
display: flex;
align-items: center;
image{
width: 52rpx !important;
height: 52rpx;
}
}
&:last-child{
border:none;
}
}
}
}
</style>
// import $http from "@/common/requestConfig.js"
import request from "./request";
// import {baseURL,apiURL,cffpURL} from "../environments/environment";
// 上传的事件
export function CommonUpload() {
return new Promise((resolve, rej) => {
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function(res) {
var urlList = []
// res.tempFiles 数组
for (var i = 0; i < res.tempFiles.length; i++) {
uni.showLoading({
title: '加载中',
mask: true
});
uni.uploadFile({
url: $http.baseUrl + '/route/appUser/updateImgUrl', // 后端api接口
filePath: res.tempFilePaths[0], // uni.chooseImage函数调用后获取的本地文件路劲
name: 'file', //后端通过'file'获取上传的文件对象
// formData: this.sendDate,
// header:{"third-session": uni.getStorageSync('thirdSession')},
header: {
// "third-session": uni.getStorageSync('thirdSession')
'Authorization': 'Bearer' + uni.getStorageSync('access_token')
},
success: (res) => {
// let data = JSON.parse(res.data)
// that.headUrl = data.data.link
let data = JSON.parse(res.data)
urlList.push({
url: data.data.link,
recordId: data.data.recordId
})
// 抛出
resolve(urlList)
uni.hideLoading();
}
});
}
}
});
})
}
export function CommonUploadFile(staffDeptId, type) {
// type ==1 可以多传照片
var sourceType = []
if(type == 2){
sourceType = ['camera']
}else {
sourceType = ['album', 'camera']
}
return new Promise((resolve, rej) => {
uni.chooseImage({
count: type== 1?9:1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: sourceType, //从相册选择
success: function(res) {
var urlList = []
// res.tempFiles 数组
for (var i = 0; i < res.tempFilePaths.length; i++) {
uni.showLoading({
title: '加载中',
mask: true
});
uni.uploadFile({
url: $http.baseUrl + '/route/fileupload/uploadForLogin', // 后端api接口
filePath: res.tempFilePaths[i], // uni.chooseImage函数调用后获取的本地文件路劲
name: 'file', //后端通过'file'获取上传的文件对象
// formData: this.sendDate,
formData: { //后台所需除图片外的参数可以写在这里面 ,单张多张都可
'isAddWaterMaker': true,
'staffDeptId': staffDeptId,
},
header: {
// "third-session": uni.getStorageSync('thirdSession')
'Authorization': 'Bearer' + uni.getStorageSync('access_token')
},
success: (res1) => {
console.log(res1, 'aaa')
let data = JSON.parse(res1.data)
setTimeout(() => {
uni.showToast({
title: '上传成功',
icon: "none",
duration: 3000
})
}, 30)
urlList.push({
url: data.data.link,
recordId: data.data.recordId
})
// 抛出
if (urlList.length == res.tempFilePaths.length) resolve(urlList)
// resolve(data,res.tempFilePaths.length)
uni.hideLoading();
}
});
}
}
});
})
}
// 外勤打开
export function CommonUploadPng(staffDeptId) {
return new Promise((resolve, rej) => {
uni.showLoading({
title: '加载中',
mask: true
});
uni.uploadFile({
url: $http.baseUrl + '/route/fileupload/upload', // 后端api接口
filePath: res.tempFilePaths[0], // uni.chooseImage函数调用后获取的本地文件路劲
name: 'file', //后端通过'file'获取上传的文件对象
// formData: this.sendDate,
formData: { //后台所需除图片外的参数可以写在这里面 ,单张多张都可
'isAddWaterMaker': true,
'staffDeptId': staffDeptId
},
// header:{"third-session": uni.getStorageSync('thirdSession')},
header: {
// "third-session": uni.getStorageSync('thirdSession')
'Authorization': 'Bearer' + uni.getStorageSync('access_token')
},
success: (res) => {
let data = JSON.parse(res.data)
if (data.code == 1) {
setTimeout(() => {
uni.showToast({
title: '上传失败',
icon: "none",
duration: 3000
})
}, 30)
} else {
urlList.push({
url: data.data.link,
recordId: data.data.recordId
})
// 抛出
resolve(urlList)
uni.hideLoading();
}
}
});
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment