This commit is contained in:
2025-06-19 14:44:00 +08:00
commit 342c482c6c
341 changed files with 41411 additions and 0 deletions

99
pages/sys/user/about.vue Normal file
View File

@@ -0,0 +1,99 @@
<template>
<view class="wrap">
<view class="u-p-t-30 u-p-b-30 u-flex u-flex-col u-text-center">
<!-- <u-avatar size="250" src="/static/aidex/logo200.png"></u-avatar> -->
<view class="title">若依移动APP</view>
<!-- <view class="version">{{vuex_config.productVersion}}</view> -->
</view>
<u-cell-group class="form" :border="false">
<navigator url="" open-type="navigate">
<u-cell-item :arrow="true" title="公司首页"></u-cell-item>
</navigator>
<navigator>
<u-cell-item :arrow="false" title="技术服务">15389457063</u-cell-item>
</navigator>
<navigator url="" open-type="navigate">
<u-cell-item :arrow="true" title="服务条款"></u-cell-item>
</navigator>
</u-cell-group>
<u-row gutter="16" style="margin-top: 20px;">
<u-col span="6" text-align="center">
<view class="cade-box"><image src="/static/aidex/images/code01.jpg"></image></view>
<view class="cade-text">公众号</view>
</u-col>
<u-col span="6" text-align="center">
<view class="cade-box"><image src="/static/aidex/images/code02.jpg"></image></view>
<view class="cade-text">扫一扫 加我微信</view>
</u-col>
</u-row>
<view class="copyright">
<view> 版权所有</view>
<view>Copyright &copy; 2021 baidu.com</view>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
methods: {
upgrade(){
// #ifdef APP-PLUS
this.$u.api.upgradeCheck().then(res => {
if (res.result == 'true'){
uni.showModal({
title: '提示',
content: res.message + '是否下载更新?',
showCancel: true,
success: function (res2) {
if (res2.confirm) {
plus.runtime.openURL(res.data.apkUrl);
}
}
});
}else{
this.$u.toast(res.message);
}
});
// #endif
// #ifndef APP-PLUS
this.$u.toast('小程序端或H5端已是最新版无需检查更新');
// #endif
}
}
};
</script>
<style lang="scss" scoped>
page {
background-color: #f5f5f5;
}
.title {
display: flex;
margin: 30rpx 0 10px;
font-size: 50rpx;
}
.version {
margin-bottom: 10rpx;
font-size: 40rpx;
}
.copyright {
margin-top: 50rpx;
text-align: center;
line-height: 60rpx;
color: #999;
}
.cade-box{
uni-image{
width: 120px;
height:120px;
border: 1px solid #dcdcdc;
padding: 5px;
background: #ffffff;
}
}
.cade-text{
color: #999999;
font-size:12px;
}
</style>

View File

@@ -0,0 +1,46 @@
<template>
<view class="wrap">
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-group :border="false">
<u-cell-item title="清除缓存" :arrow="false">
<view solt="right-icon">
15M
</view>
</u-cell-item>
</u-cell-group>
<view class="u-m-40">
<u-button type="primary" @click="logout" :hair-line="false">清除缓存</u-button>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
};
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
}
}
};
</script>
<style lang="scss">
@import '../home/index.scss';
page {
background-color: #f8f8f8;
}
/deep/ .u-cell-title {
padding: 25rpx 30rpx;
font-size: 30rpx;
}
</style>

View File

@@ -0,0 +1,94 @@
<template>
<view class="wrap yjfk-form-right">
<u-form class="form" :model="model" :rules="rules" ref="uForm" label-position="top">
<u-form-item label="问题和意见" prop="content">
<u-input type="textarea" placeholder="请填写10个字以上的问题描述以便我们提供更好的帮助"
v-model="model.content" height="200" maxlength="500" />
</u-form-item>
<u-form-item label="联系方式手机、邮箱、QQ号码" prop="contact">
<u-input class="input-left-form" placeholder="选填,便于我们与你联系,进一步沟通"
v-modtel="model.contact" type="text" maxlength="200"></u-input>
</u-form-item>
</u-form>
<view class="form-footer">
<u-button class="btn" type="primary" @click="submit">提交</u-button>
<!-- <u-button class="btn" type="default" @click="cancel">关闭</u-button> -->
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
model: {
id: '',
category: '',
content: '',
contact: '',
deviceInfo: ''
},
rules: {
category: [
{
required: true,
message: '请选择问题和意见的分类',
trigger: ['change','blur'],
}
],
content: [
{
required: true,
min: 10, max: 500,
message: '问题和意见在 10 到 500 个字符之间',
trigger: ['change','blur'],
}
],
}
};
},
onReady() {
this.$refs.uForm.setRules(this.rules);
// 获取设备信息
uni.getSystemInfo({
success: res => {
this.model.deviceInfo = JSON.stringify(res);
}
});
},
methods: {
submit() {
// console.log(this.model)
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.commentSave(this.model).then(res => {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
success: function () {
if (res.result == 'true') {
uni.navigateBack();
}
}
});
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
});
},
cancel() {
uni.navigateBack();
}
}
};
</script>
<style lang="scss" scoped>
.input-placeholder{
text-align: right;
}
</style>

View File

@@ -0,0 +1,84 @@
<template>
<view class="wrap">
<u-cell-group :border="false" title="消息提醒">
<u-cell-item title="接受消息提醒" :arrow="false">
<u-switch v-model="message" slot="right-icon" class="u-m-l-20"></u-switch>
</u-cell-item>
<u-cell-item title="通知栏显示消息详情" :arrow="false">
<u-switch v-model="messageBar" slot="right-icon" class="u-m-l-20"></u-switch>
<text slot="label">关闭后当收到消息的时候只显示有提示不显示消息内容</text>
</u-cell-item>
</u-cell-group>
<u-cell-group :border="false" title="声音与振动">
<u-cell-item title="收到消息后播放声音或振动" @click="openSettings">
<text slot="label">前往系统设置中修改声音与振动</text>
</u-cell-item>
</u-cell-group>
<u-cell-group :border="false" title="软件更新提醒">
<u-cell-item title="软件更新提醒" :arrow="false">
<u-switch v-model="upgrade" slot="right-icon" class="u-m-l-20"></u-switch>
<text slot="label">当本软件有新版本发布时给予提醒</text>
</u-cell-item>
</u-cell-group>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
message: true,
messageBar: true,
upgrade: true
};
},
methods: {
openSettings() {
// #ifdef APP-PLUS
uni.getSystemInfo({
success(res) {
if(res.platform == 'ios'){
plus.runtime.openURL("app-settings://");
} else if (res.platform == 'android'){
var main = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass("android.content.Intent");
var mIntent = new Intent('android.settings.SOUND_SETTINGS');
main.startActivity(mIntent);
}
}
});
// #endif
// #ifndef APP-PLUS
this.$u.toast('小程序端或H5端已是最新版无需检查更新');
// #endif
},
logout() {
this.$u.api.logout().then(res => {
this.$u.toast(res.msg);
if (res.code == '200') {
let self = this;
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/login/index'
});
}, 500);
}
});
}
}
};
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
/deep/ .u-cell-title {
padding: 25rpx 30rpx;
font-size: 30rpx;
}
</style>

106
pages/sys/user/help.vue Normal file
View File

@@ -0,0 +1,106 @@
<template>
<view class="wrap">
<view class="search">
<u-search v-model="keywords" @custom="search" @search="search"></u-search>
</view>
<view class="u-p-t-5 u-p-b-5">
<u-collapse class="box" :accordion="false" :arrow="false">
<view class="item" v-for="(item, index) in list" :key="item.code">
<u-collapse-item :open="true">
<view class="title" slot="title">
<u-icon :name="item.icon != '' ? item.icon : 'home'" :size="35"></u-icon>
<view class="text">{{item.name}}</view>
</view>
<u-cell-group class="list" :border="false">
<u-cell-item :arrow="true" v-for="(child, index2) in item.childList" :key="child.code" @click="navTo('/pages/sys/msg/form')">
<text slot="title">{{child.name}}</text>
<text slot="label">发送者{{child.createByName}} &nbsp;|&nbsp; 时间{{child.createDate}}</text>
</u-cell-item>
</u-cell-group>
</u-collapse-item>
</view>
</u-collapse>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
keywords: '',
list: [
{
code: 'a',
name: '常见问题',
icon: 'error-circle',
childList: [
{
code: 'a1',
name: '为什么没有消息提醒?',
createByName: '管理员',
createDate: '2021-4-6 12:10'
},
{
code: 'a2',
name: '怎么关闭消息提醒?',
createByName: '管理员',
createDate: '2021-4-6 12:10'
},
{
code: 'a3',
name: '怎么办理工单?',
createByName: '管理员',
createDate: '2021-4-6 12:10'
}
]
},
{
code: 'a-1',
name: '任务相关',
icon: 'clock',
childList: [
{
code: 'a1',
name: '怎么办理任务?',
createByName: '管理员',
createDate: '2021-4-6 12:10'
},
{
code: 'a2',
name: '怎么完成任务?',
createByName: '管理员',
createDate: '2021-4-6 12:10'
},
{
code: 'a3',
name: '怎么查询任务?',
createByName: '管理员',
createDate: '2021-4-6 12:10'
}
]
}
],
};
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
},
search(value) {
this.$u.toast('搜索内容为:' + value)
}
}
};
</script>
<style lang="scss">
page {
background-color: #f5f5f5;
}
</style>

130
pages/sys/user/index.scss Normal file
View File

@@ -0,0 +1,130 @@
/*!
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
* @author aidex
* @version 2020-9-1
*/
.header {
background-color: #5b95ff;
.userinfo {
display: flex;
padding: 0rpx 30rpx 10rpx;
.image {
flex-shrink: 0;
width: 100rpx;
height: 100rpx;
image {
border-radius: 100%;
width: 100%;
height: 100%;
}
}
.info {
display: flex;
flex-flow: wrap;
padding-left: 30rpx;
color: #fff;
.username {
width: 100%;
font-size: 40rpx;
}
.usercode {
height: 36rpx;
padding: 0 20rpx;
margin-top: 10rpx;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 20rpx;
font-size: 20rpx;
}
}
}
.logout {
flex-shrink: 0;
position: absolute;
right: 70rpx;
top: 65rpx;
.u-btn {
font-size: 30rpx;
}
}
}
.toolbar {
padding: 0 4%;
margin-bottom: 5rpx;
border-radius: 0 0 100% 100%;
background-color: #4094ff;
.box {
display: flex;
flex-direction: row;
justify-content: space-around;
padding: 10rpx;
border-radius: 15rpx;
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.15);
background-color: #fefefe;
.item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
// flex-flow: wrap;
height: 120rpx;
color: #666666;
font-size: 30rpx;
padding: 10rpx 10rpx;
.icon {
font-size: 50rpx;
}
.label {
padding: 10rpx;
}
}
.hover {
background-color: #f6f6f6;
border-radius: 15rpx;
}
}
}
.uni-input-input{
border: 1px solid red;
}
.userinfo-topbox{
padding: 10px 15px;
color: #ffffff;
.number{
font-size: 20px;
em{
font-style: normal;
font-size: 12px;
}
}
}
.user-order-top{
padding: 10px 15px;
background: #ffffff;
}
.user-order-box{
padding: 10px 15px;
background: #ffffff;
border-bottom: 1px solid #ededed;
.u-col{
position: relative;
}
.u-badge{
top:-8px!important;
right:5px!important;
background: #ff7001;
border: 1px solid #ffffff;
box-sizing: content-box;
}
}

134
pages/sys/user/index.vue Normal file
View File

@@ -0,0 +1,134 @@
<template>
<view class="wrap">
<view class="header">
<view class="userinfo">
<view class="image" @click="navTo('info')">
<!-- <image :src="avatarUrl"></image> -->
<u-avatar size="100" src="/static/aidex/images/user01.png"></u-avatar>
</view>
<view class="info" style="display: flex;justify-content: space-between;">
<view>
<view class="username">管理员</view>
<view class="usercode">普通会员</view>
</view>
<view class="sign-in-images"><image src="/static/aidex/images/sign-in.png"></image></view>
</view>
</view>
<u-row class="userinfo-topbox" gutter="16" justify="center">
<u-col span="4" text-align="center">
<view class="number">9,999<em></em></view>
<view>余额</view>
</u-col>
<u-col span="4" text-align="center" @click="navTo('/pages/sys/application/recharge')">
<view><u-icon size="28px" color="#ffffff" name="rmb-circle"></u-icon></view>
<view>充值</view>
</u-col>
<u-col span="4" text-align="center" @click="navTo('/pages/sys/application/balance-details')">
<view>
<view class="iconfont icon-faan" style="font-size: 24px;color:#ffffff;"></view>
</view>
<view>余额明细</view>
</u-col>
</u-row>
</view>
<view class="list">
<view>
<u-cell-group class="personal-list">
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item icon="question-circle" :iconStyle="{ color: '#ff8d06' }" title="常见问题" @click="navTo('problem')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#5f8dff' }" title="意见反馈" @click="navTo('comment')"></u-cell-item>
<u-cell-item icon="map" :iconStyle="{ color: '#316ede' }" title="账号安全" @click="navTo('pwd')"></u-cell-item>
<u-cell-item icon="order" :iconStyle="{ color: '#59bdf9' }" title="清除缓存" @click="navTo('clear-cache')"></u-cell-item>
<u-cell-item icon="account" :iconStyle="{ color: '#27c0dc' }" title="关于我们" @click="navTo('about')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#ff8a00' }" title="联系客服" @click="navTo('service')"></u-cell-item>
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" @click="navTo('setting')"></u-cell-item>
</u-cell-group>
</view>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
iconSize: 38
};
},
computed: {
avatarUrl() {
// let url = this.vuex_user.avatarUrl || '/ctxPath/static/images/user1.jpg';
// url = url.replace('/ctxPath/', this.vuex_config.baseUrl + '/');
let url = this.vuex_config.baseUrl+ this.vuex_user.avatar || '/static/aidex/tabbar/my_2.png';
url = this.replaceAll(url,'\\','/');
return url + '?t=' + new Date().getTime();
}
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
},
logout() {
this.$u.api.logout().then(res => {
this.$u.toast(res.msg);
if (res.code == '200' || res.code == '401') {
let self = this;
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/login/index'
});
}, 500);
}
});
},
upgrade(){
// #ifdef APP-PLUS
this.$u.api.upgradeCheck().then(res => {
if (res.result == 'true'){
uni.showModal({
title: '提示',
content: res.message + '是否下载更新?',
showCancel: true,
success: function (res2) {
if (res2.confirm) {
plus.runtime.openURL(res.data.apkUrl);
}
}
});
}else{
this.$u.toast(res.message);
}
});
// #endif
// #ifndef APP-PLUS
this.$u.toast('小程序端或H5端无需检查更新')
// #endif
}
}
};
</script>
<style lang="scss">
@import 'index.scss';
page {
background-color: #f5f5f5;
}
.wrap .u-cell-box .u-cell_title{
color:#202328;
}
.sign-in-images{
width: 125rpx;
height:50rpx;
position: absolute;
right: 0;
top:5px;
uni-image{
width: 125rpx;
height:50rpx;
}
}
</style>

151
pages/sys/user/info.vue Normal file
View File

@@ -0,0 +1,151 @@
<template>
<view class="wrap" style="padding-bottom: 60px;">
<u-cell-group :border="false">
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item title="头像" :arrow="true">
<u-avatar size="60" bg-color='#000;' :src="avatarUrl" @click="chooseAvatar" style="position: absolute;right: 35px;top:12px;"></u-avatar>
</u-cell-item>
<u-cell-item title="公司" value="科技有限公司" :title-width="180" :arrow="false"></u-cell-item>
<u-cell-item title="所属部门" value="人事部" :title-width="180" :arrow="false"></u-cell-item>
<u-cell-item title="岗位" value="秘书" :title-width="180" :arrow="false"></u-cell-item>
<u-cell-item title="手机" value="15389457063" :title-width="180" @click="navTo('/pages/sys/user/modify')"></u-cell-item>
<u-cell-item title="邮箱" :title-width="180"></u-cell-item>
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
</u-cell-group>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
model: {
sex: '1'
},
rules: {
},
avatarBase64: ''
};
},
onLoad() {
this.$u.api.getUserInfo().then(res => {
if (res.code == '200'){
this.model = {
id: res.user.id,
name: res.user.name,
sex: res.user.sex,
email: res.user.email,
phonenumber: res.user.phonenumber,
officeTel: res.user.officeTel,
loginDate: res.user.loginDate,
loginIp: res.user.loginIp
}
}else if (res.result == 'login'){
uni.reLaunch({
url: '/pages/sys/login/index'
});
}else{
this.$u.toast(res.message);
}
});
uni.$on('uAvatarCropper', path => {
this.avatarBase64 = path;
})
},
computed: {
avatarUrl() {
if (this.avatarBase64 != ''){
return this.avatarBase64;
}
let url = this.vuex_config.baseUrl+ this.vuex_user.avatar || '/static/aidex/tabbar/my_2.png';
url = this.replaceAll(url,'\\','/');
//url = url.replace('/aidex/', this.vuex_config.baseUrl + '/');
/* alert(url); */
return url;
}
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
methods: {
chooseAvatar() {
this.$u.route({
url: '/uview-ui/components/u-avatar-cropper/u-avatar-cropper',
params: {
destWidth: 200, // 输出图片宽高
rectWidth: 200, // 裁剪框的宽高
fileType: 'jpg', // 输出的图片类型,如果'png'类型发现裁剪的图片太大,改成"jpg"即可
}
})
},
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
// #ifdef MP-WEIXIN || MP-TOUTIAO
this.$u.toast('您填写的信息有误11。');
if (this.avatarBase64 != '' && !this.avatarBase64.startsWith('data:')){
this.avatarBase64 = 'data:image/jpeg;base64,' + uni.getFileSystemManager()
.readFileSync(this.avatarBase64, "base64")
}
// #endif
this.model.avatarBase64 = this.avatarBase64;
this.$u.api.user.saveUserInfo(this.model).then(res => {
if(res.code == '200'){
this.vuex_user.avatar = res.imgUrl;
this.$u.vuex('vuex_user', this.vuex_user);
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: function () {
uni.navigateBack();
}
});
}else{
this.$u.toast(res.msg);
}
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
});
},
cancel() {
uni.navigateBack();
}
}
};
</script>
<style lang="scss" scoped>
page{
background: #f5f5f5;
}
.u-form{
background: #fff;
padding:0 15px;
}
.u-size-medium{
height: 60rpx;
line-height: 60rpx;
padding: 0 20px;
font-size:28rpx;
background-color: rgba(0, 0, 0, 0.1);
color:#fff;
border: 1px solid #5186e7;
}
.u-hairline-border:after{
border: 1px solid #5186e7!important;
}
.input-placeholder{
text-align: right;
}
.u-input{
text-align: right !important;
}
.u-form-item{
font-size:36rpx;
}
</style>

112
pages/sys/user/modify.vue Normal file
View File

@@ -0,0 +1,112 @@
<template>
<view class="wrap">
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-form class="task-form-field" :model="model" :rules="rules" ref="uForm">
<u-form-item label="修改姓名" label-width="180">
<u-input placeholder="请输入姓名"></u-input>
</u-form-item>
</u-form>
<view class="form-footer">
<u-button class="btn" type="primary" @click="submit">保存</u-button>
<!-- <u-button class="btn" type="default" @click="cancel">关闭</u-button> -->
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
import base64 from '@/common/base64.js';
export default {
data() {
return {
model: {
oldPassword: '',
newPassword: '',
confirmNewPassword: ''
},
rules: {
oldPassword: [
{
required: true,
message: '请输入旧密码',
trigger: ['change','blur'],
}
],
newPassword: [
{
required: true,
message: '请输入新密码',
trigger: ['change','blur'],
},
{
pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/,
message: '需同时含有字母和数字长度在6-12之间',
trigger: ['change','blur'],
}
],
confirmPassword: [
{
required: true,
message: '请重新输入密码',
trigger: ['change','blur'],
},
{
validator: (rule, value, callback) => {
return value === this.model.newPassword;
},
message: '两次输入的密码不相等',
trigger: ['change','blur'],
}
],
}
};
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
methods: {
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.user.infoSavePwd({
oldPassword: this.model.oldPassword,
newPassword: this.model.newPassword
}).then(res => {
if(res.code == '200'){
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: function () {
uni.navigateBack();
}
});
}else{
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
}
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
});
},
cancel() {
uni.navigateBack();
}
}
};
</script>
<style lang="scss">
page{
background: #f5f5f5;
}
.remind-text{
padding: 20rpx 30rpx;
color: #666666;
}
</style>

View File

@@ -0,0 +1,76 @@
<template>
<view class="wrap">
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-group :border="false">
<u-cell-item title="如何切换用户?" @click="navTo('')" :arrow="true"></u-cell-item>
<u-cell-item title="如何修改密码?" @click="navTo('')" :arrow="true"></u-cell-item>
<u-cell-item title="如何找回密码?" @click="navTo('')" :arrow="true"></u-cell-item>
<u-cell-item title="如何更新系统?" @click="navTo('')" :arrow="true"></u-cell-item>
</u-cell-group>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
message: true,
messageBar: true,
upgrade: true
};
},
methods: {
openSettings() {
// #ifdef APP-PLUS
uni.getSystemInfo({
success(res) {
if(res.platform == 'ios'){
plus.runtime.openURL("app-settings://");
} else if (res.platform == 'android'){
var main = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass("android.content.Intent");
var mIntent = new Intent('android.settings.SOUND_SETTINGS');
main.startActivity(mIntent);
}
}
});
// #endif
// #ifndef APP-PLUS
this.$u.toast('小程序端或H5端已是最新版无需检查更新');
// #endif
},
logout() {
this.$u.api.logout().then(res => {
this.$u.toast(res.msg);
if (res.code == '200') {
let self = this;
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/login/index'
});
}, 500);
}
});
},
navTo(url) {
uni.navigateTo({
url: url
});
}
}
};
</script>
<style lang="scss">
page {
background-color: #f5f5f5;
}
/deep/ .u-cell-title {
padding: 25rpx 30rpx;
font-size: 30rpx;
}
</style>

126
pages/sys/user/pwd.vue Normal file
View File

@@ -0,0 +1,126 @@
<template>
<view class="wrap">
<view class="remind-text">请设置登录密码<br>
定期更新密码提高安全性</view>
<u-form class="form" :model="model" :rules="rules" ref="uForm">
<u-form-item label="旧密码" prop="oldPassword" label-width="180">
<u-input type="password" v-model="model.oldPassword" placeholder="请输入旧密码"></u-input>
</u-form-item>
<u-form-item label="新密码" prop="newPassword" label-width="180">
<u-input type="password" v-model="model.newPassword" placeholder="请输入新密码"></u-input>
</u-form-item>
<u-form-item label="确认密码" prop="confirmPassword" label-width="180">
<u-input type="password" v-model="model.confirmPassword" placeholder="请确认新密码"></u-input>
</u-form-item>
</u-form>
<view class="remind-text">
<u-icon name="question-circle" color="#2767dc" size="28"></u-icon>
密码必须是8-16位的数字字符组合不能是纯数字</view>
<view class="form-footer">
<u-button class="btn" type="primary" @click="submit">提交</u-button>
<!-- <u-button class="btn" type="default" @click="cancel">关闭</u-button> -->
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
import base64 from '@/common/base64.js';
export default {
data() {
return {
model: {
oldPassword: '',
newPassword: '',
confirmNewPassword: ''
},
rules: {
oldPassword: [
{
required: true,
message: '请输入旧密码',
trigger: ['change','blur'],
}
],
newPassword: [
{
required: true,
message: '请输入新密码',
trigger: ['change','blur'],
},
{
pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/,
message: '需同时含有字母和数字长度在6-12之间',
trigger: ['change','blur'],
}
],
confirmPassword: [
{
required: true,
message: '请重新输入密码',
trigger: ['change','blur'],
},
{
validator: (rule, value, callback) => {
return value === this.model.newPassword;
},
message: '两次输入的密码不相等',
trigger: ['change','blur'],
}
],
}
};
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
methods: {
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.user.infoSavePwd({
oldPassword: this.model.oldPassword,
newPassword: this.model.newPassword
}).then(res => {
if(res.code == '200'){
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: function () {
uni.navigateBack();
}
});
}else{
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
}
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
});
},
cancel() {
uni.navigateBack();
}
}
};
</script>
<style lang="scss">
page{
background: #f5f5f5;
}
.u-form{
background: #fff;
padding: 0px 15px;
}
.remind-text{
padding: 20rpx 30rpx;
color: #666666;
}
</style>

View File

@@ -0,0 +1,19 @@
<template>
<view class="wrap">
<view class="service-banner">
<image class="" src="/static/aidex/images/service02.png"></image>
</view>
<u-gap height="20" bg-color="#ffffff"></u-gap>
<u-cell-group class="service-box">
<u-cell-item icon="phone-fill" title="联系电话" label="15389457063" :arrow="true"></u-cell-item>
<u-cell-item icon="weixin-circle-fill" title="官方微信" label="识别二维码,关注官方微信" :arrow="true"></u-cell-item>
<u-cell-item icon="qq-circle-fill" title="官方QQ" label="1125373337、487477889" :arrow="true"></u-cell-item>
</u-cell-group>
</view>
</template>
<script>
</script>
<style lang="scss">
</style>

View File

@@ -0,0 +1,79 @@
<template>
<view class="wrap">
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-group :border="false">
<u-cell-item title="通用" @click="navTo('/pages/sys/user/currency')" :arrow="true"></u-cell-item>
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item title="版本更新" @click="navTo('')" :arrow="true"></u-cell-item>
<u-cell-item title="隐私政策" @click="navTo('')" :arrow="true"></u-cell-item>
<u-cell-item title="用户协议" @click="navTo('')" :arrow="true"></u-cell-item>
</u-cell-group>
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<view>
<u-button class="sign-out" @click="logout" :hair-line="false">退出登录</u-button>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
data() {
return {
};
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
},
openSettings() {
// #ifdef APP-PLUS
uni.getSystemInfo({
success(res) {
if(res.platform == 'ios'){
plus.runtime.openURL("app-settings://");
} else if (res.platform == 'android'){
var main = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass("android.content.Intent");
var mIntent = new Intent('android.settings.SOUND_SETTINGS');
main.startActivity(mIntent);
}
}
});
// #endif
// #ifndef APP-PLUS
this.$u.toast('小程序端或H5端已是最新版无需检查更新');
// #endif
},
logout() {
this.$u.api.logout().then(res => {
this.$u.toast(res.msg);
if (res.code == '200') {
let self = this;
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/login/index'
});
}, 500);
}
});
}
}
};
</script>
<style lang="scss">
page {
background-color: #f5f5f5;
}
/deep/ .u-cell-title {
padding: 25rpx 30rpx;
font-size: 30rpx;
}
</style>