This commit is contained in:
孟帅
2022-02-25 17:11:17 +08:00
parent 9bd05abb2c
commit 8f3d679a57
897 changed files with 95731 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
/*!
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* @author ThinkGem
* @version 2020-9-1
*/
.u-btn {
&--info {
color: #ffffff;
border-color: #01abb4;
background-color: #01abb4;
}
&--purple {
color: #ffffff;
border-color: #5d5fe7;
background-color: #5d5fe7;
}
}
.u-cell-box {
.u-cell {
font-size: 30rpx;
}
.u-cell_title {
font-size: 30rpx;
}
.u-cell__left-icon-wrap {
margin-right: 18rpx;
}
}
.search{
padding: 20rpx 20rpx 0;
background: #f8f8f8;
height: 105rpx;
}
.scroll-list {
height: calc(100vh - var(--window-top) - var(--window-bottom) - 105rpx); // 105rpx 为 .search 的高度
width: 100%;
.loadmore {
padding: 30rpx;
}
}
.box {
padding-bottom: 10rpx;
.item {
margin: 0 20rpx 20rpx;
padding: 8rpx 20rpx;
border-radius: 20rpx;
box-sizing: border-box;
background-color: #fff;
font-size: 28rpx;
.title {
display: flex;
justify-content: space-between;
background-color: #fff;
padding-left: 15rpx;
align-items: center;
.text {
margin: 0 20rpx;
font-size: 35rpx;
font-weight: bold;
}
}
}
}
.list {
.u-cell-item-box {
.u-swipe-content {
width: 750rpx;
}
.u-cell_title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
min-width: 655rpx;
}
.u-border-bottom:after {
border-bottom-width: 0;
}
}
}
.form {
display: flex;
flex-direction: column;
padding: 20rpx 30rpx;
.u-cell-item-box {
border-radius: 20rpx;
}
}
.form-footer {
display: flex;
margin: 10rpx;
padding-bottom: 30rpx;
.btn {
flex: 1;
margin: 20rpx;
margin-bottom: 10rpx;
}
}

View File

@@ -0,0 +1,33 @@
<template>
<view>
<web-view :webview-styles="webviewStyles" :src="webviewUrl"></web-view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
webviewUrl: '',
webviewStyles: {
progress: {
color: '#FF7200'
}
}
};
},
onLoad(params) {
this.webviewUrl = decodeURIComponent(params.url);
if (params.title != ''){
uni.setNavigationBarTitle({
title: params.title
})
}
}
};
</script>
<style lang="scss">
</style>

View File

@@ -0,0 +1,22 @@
/*!
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* @author ThinkGem
* @version 2020-9-1
*/
.toolbar {
padding-top: 5px;
background-color: #fff;
}
.grid {
.grid-icon {
color: #666;
}
.grid-text {
font-size: 32rpx;
padding: 15rpx;
}
}

View File

@@ -0,0 +1,225 @@
<template>
<view class="wrap">
<js-lang title="home.title" :showBtn="true"></js-lang>
<u-swiper :height="300" :list="imgList" :title="false" @click="imgListClick"></u-swiper>
<view class="toolbar u-m-b-20">
<u-grid class="grid" :col="3" :border="false">
<u-grid-item :index="0" @click="navTo('/pages/bpm/myTaskTodo')">
<u-badge :count="todoCount"></u-badge>
<u-icon class="grid-icon" name="clock" :size="80" :style="{ color: '#ea9a44' }"></u-icon>
<view class="grid-text">待办任务</view>
</u-grid-item>
<u-grid-item :index="1" @click="navTo('/pages/bpm/myTaskHistory')">
<u-icon class="grid-icon" name="checkmark-circle" :size="80" :style="{ color: '#47cb66' }"></u-icon>
<view class="grid-text">已办任务</view>
</u-grid-item>
<u-grid-item :index="2" @click="navTo('/pages/bpm/myRuntime')">
<u-icon class="grid-icon" name="order" :size="80" :style="{ color: '#5a98ea' }"></u-icon>
<view class="grid-text">我相关的</view>
</u-grid-item>
</u-grid>
</view>
<u-collapse class="box u-p-b-5" :accordion="false" :arrow="true">
<view class="item" v-for="(menu, index) in menuList" :key="menu.menuCode">
<u-collapse-item :open="true">
<view class="title" slot="title">
<u-icon :name="menu.menuIcon != '' ? menu.menuIcon : 'home'" :size="40"
:style="{ color: menu.menuColor != '' ? menu.menuColor : '#666' }"></u-icon>
<view class="text" :style="{ color: menu.menuColor != '' ? menu.menuColor : '#666' }"
>{{menu.menuName}}</view>
</view>
<u-grid class="grid u-m-t-20" :col="3" :border="false">
<u-grid-item v-for="(child, index2) in menu.childList" :key="child.menuCode" @click="navTo(child.url)">
<u-icon class="grid-icon" :name="child.menuIcon != '' ? child.menuIcon : 'order'" :size="80"
:style="{ color: child.menuColor != '' ? child.menuColor : '#666' }"></u-icon>
<view class="grid-text" :style="{ color: child.menuColor != '' ? child.menuColor : '#666' }"
>{{child.menuName}}</view>
</u-grid-item>
</u-grid>
</u-collapse-item>
</view>
</u-collapse>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
imgList: [
{image: '/static/jeesite/banner/1.svg'},
{image: '/static/jeesite/banner/2.svg'},
{image: '/static/jeesite/banner/3.svg'}
],
todoCount: 0,
menuList: [
{
menuCode: 'a-1',
menuName: '增删改查',
menuIcon: 'file-text',
menuColor: '',
url: '',
childList: [
{
menuCode: 'a13',
menuName: '列表',
menuIcon: 'thumb-up',
menuColor: '',
url: '/pages/testData/index',
},
{
menuCode: 'a11',
menuName: '新增',
menuIcon: 'plus-circle',
menuColor: '',
url: '/pages/testData/form',
},
{
menuCode: 'a10',
menuName: '请假',
menuIcon: 'calendar',
menuColor: '',
url: '/pages/oa/oaLeave/index',
},
]
},
{
menuCode: 'a',
menuName: '公文管理',
menuIcon: 'home',
menuColor: '#919328',
url: '',
childList: [
{
menuCode: 'a1',
menuName: '收文',
menuIcon: 'email',
menuColor: '#919328',
url: '/pages/testData/form',
},
{
menuCode: 'a2',
menuName: '发文',
menuIcon: 'bookmark',
menuColor: '#919328',
url: '/pages/testData/form',
},
{
menuCode: 'a3',
menuName: '查询',
menuIcon: 'search',
menuColor: '#919328',
url: '/pages/testData/index',
}
]
},
{
menuCode: 'a-2',
menuName: '功能列表',
menuIcon: '',
menuColor: '#0d9311',
url: '',
childList: [
{
menuCode: 'a21',
menuName: '找回密码',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/sys/login/forget',
},
{
menuCode: 'a22',
menuName: '注册用户',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/sys/login/reg',
},
{
menuCode: 'a23',
menuName: '个人资料',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/sys/user/info',
},{
menuCode: 'a24',
menuName: '关于我们',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/sys/user/about',
},
{
menuCode: 'a25',
menuName: '修改密码',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/sys/user/pwd',
},
{
menuCode: 'a26',
menuName: '意见反馈',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/sys/user/comment',
},
{
menuCode: 'a27',
menuName: '系统设置',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/sys/user/setting',
},
{
menuCode: 'a28',
menuName: '列表演示',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/testData/index',
},
{
menuCode: 'a29',
menuName: '表单演示',
menuIcon: '',
menuColor: '#0d9311',
url: '/pages/testData/form',
}
]
},
],
};
},
onLoad() {
//this.refreshCount();
},
onShow() {
this.refreshCount();
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
},
refreshCount() {
this.todoCount = 3;
},
imgListClick(index) {
console.log(`点击了第${index + 1}页图片`)
},
itemClick(index) {
console.log(index);
}
}
};
</script>
<style lang="scss">
@import 'index.scss';
page {
background-color: #f8f8f8;
}
</style>

View File

@@ -0,0 +1,144 @@
<template>
<view class="wrap">
<view class="list">
<view class="list-call">
<u-icon class="u-icon" size="40" name="account"></u-icon>
<input class="u-input" type="text" v-model="loginCode" maxlength="32" placeholder="请输入账号" />
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="lock"></u-icon>
<input class="u-input" type="text" v-model="password" maxlength="32" placeholder="请输入新密码" :password="!showPassword" />
<image class="u-icon-right" :src="'/static/jeesite/login/eye_' + (showPassword ? 'open' : 'close') + '.png'" @click="showPass()"></image>
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="bookmark"></u-icon>
<input class="u-input" type="text" v-model="validCode" maxlength="4" placeholder="图片验证码" />
<u-image class="img-valid-code" width="300rpx" height="90rpx" :src="imgValidCodeSrc" @click="refreshImgValidCode()"></u-image>
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="coupon"></u-icon>
<input class="u-input" type="text" v-model="fpValidCode" maxlength="6" placeholder="手机验证码" />
<u-verification-code ref="uCode" :seconds="seconds" @change="codeChange"></u-verification-code>
<view class="btn-valid-code" :class="{ 'btn-valid-codes': tips != '获取验证码' && tips != '重新获取' }"
hover-class="btn-valid-code-hover" @click="getValidCode()">{{tips}}</view>
</view>
</view>
<view class="button" hover-class="button-hover" @click="submit()"><text>修改密码</text></view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
loginCode: '',
password: '',
validCode: '',
fpValidCode: '',
showPassword: false,
imgValidCodeSrc: null,
tips: '获取验证码',
seconds: 60
};
},
onLoad() {
this.refreshImgValidCode();
},
methods: {
showPass() {
this.showPassword = !this.showPassword;
},
refreshImgValidCode(e) {
if (this.vuex_token == '') {
this.$u.api.index().then(res => {
this.imgValidCodeSrc = this.vuex_config.baseUrl + '/validCode?__sid='
+ res.sessionid + '&t=' + new Date().getTime();
});
} else {
this.imgValidCodeSrc = this.vuex_config.baseUrl + '/validCode?__sid='
+ this.vuex_token + '&t=' + new Date().getTime();
}
this.validCode = '';
},
codeChange(text) {
this.tips = text;
},
formValid() {
if (this.loginCode.length == 0) {
this.$u.toast('请输入账号');
return false;
}
if (this.password.length == 0) {
this.$u.toast('请输入新密码');
return false;
}
if (this.validCode.length == 0) {
this.$u.toast('请输入图片验证码');
return false;
}
return true;
},
getValidCode() {
if (!this.formValid()) {
return;
}
if (this.$refs.uCode.canGetCode) {
this.$u.api.validCode({
validCode: this.validCode
})
.then(res => {
if (res !== 'true') {
this.$u.toast('图片验证码错误');
return;
}
this.$u.api.getFpValidCode({
loginCode: this.loginCode,
validCode: this.validCode,
validType: 'mobile'
})
.then(res => {
this.$u.toast(res.message, 3000);
if (res.result == 'false') {
this.refreshImgValidCode();
}
});
this.$refs.uCode.start();
});
}
},
submit() {
if (!this.formValid()) {
return;
}
if (this.fpValidCode.length == 0) {
this.$u.toast('请输入手机验证码');
return false;
}
this.$u.api.savePwdByValidCode({
loginCode: this.loginCode,
fpValidCode: this.fpValidCode,
password: this.password
})
.then(res => {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
success: function () {
if (res.result == 'true') {
uni.reLaunch({
url: '/pages/sys/login/index'
});
}
}
});
});
}
}
};
</script>
<style lang="scss">
@import 'index.scss';
</style>

View File

@@ -0,0 +1,81 @@
/*!
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* @author ThinkGem
* @version 2020-9-1
*/
.wrap {
display: flex;
flex-direction: column;
justify-content: center;
}
.list {
display: flex;
flex-direction: column;
padding: 40rpx 70rpx 40rpx 70rpx;
}
.list-call {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding-top: 10rpx;
height: 120rpx;
font-weight: normal;
color: #333333;
border-bottom: 0.5px solid #e2e2e2;
}
.list-call .u-input {
flex: 1;
font-size: 39rpx;
text-align: left;
margin-left: 16rpx;
}
.list-call .u-icon-right {
color: #aaaaaa;
width: 50rpx;
height: 40rpx;
}
.button {
color: #ffffff;
font-size: 39rpx;
width: 470rpx;
height: 100rpx;
background: linear-gradient(-90deg, rgba(72, 156, 230, 1), rgba(15, 168, 250, 1));
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(15, 168, 250, 0.4);
border-radius: 50rpx;
line-height: 100rpx;
text-align: center;
margin: 50rpx auto 0;
}
.button-hover {
background: linear-gradient(-90deg, rgba(72, 156, 230, 0.8), rgba(15, 168, 250, 0.8));
}
.img-valid-code img {
width: 30rpx;
heigth: 50rpx;
}
.btn-valid-code {
color: #da7918;
font-size: 40rpx;
line-height: 60rpx;
padding: 0 35rpx;
border: 1rpx solid #da7918;
border-radius: 50rpx;
}
.btn-valid-code-hover {
background-color: #f3f3f3;
}
.btn-valid-codes {
color: #999999 !important;
border: 1rpx solid #999999;
}

View File

@@ -0,0 +1,192 @@
<template>
<view class="wrap">
<js-lang title="login.title" :showBtn="true"></js-lang>
<view class="logo">
<image src="/static/jeesite/logo200.png"></image>
</view>
<view class="list">
<view class="list-call">
<u-icon class="u-icon" size="40" name="account"></u-icon>
<input class="u-input" type="text" v-model="username" maxlength="32"
:placeholder="$t('login.placeholderAccount')"/>
<u-checkbox v-model="remember" active-color="#69cbff">{{$t('login.autoLogin')}}</u-checkbox>
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="lock"></u-icon>
<input class="u-input" type="text" v-model="password" maxlength="32"
:placeholder="$t('login.placeholderPassword')" :password="!showPassword"/>
<image class="u-icon-right"
:src="'/static/jeesite/login/eye_' + (showPassword ? 'open' : 'close') + '.png'"
@click="showPass()"></image>
</view>
<view class="list-call" v-if="isValidCodeLogin">
<u-icon class="u-icon" size="40" name="coupon"></u-icon>
<input class="u-input" type="text" v-model="validCode" maxlength="4" placeholder="验证码"/>
<u-image class="img-valid-code" width="300rpx" height="90rpx" :src="imgValidCodeSrc"
@click="refreshImgValidCode()"></u-image>
</view>
</view>
<view class="button" hover-class="button-hover" @click="submit()">
<text>{{$t('login.loginButton')}}</text>
</view>
<view class="footer">
<navigator url="forget" open-type="navigate">{{$t('login.forget')}}</navigator>
<text>|</text>
<navigator url="reg" open-type="navigate">{{$t('login.reg')}}</navigator>
</view>
<view class="oauth2">
<u-icon class="u-icon" size="120" color="#00d969" name="weixin-circle-fill" @click="wxLogin"></u-icon>
<u-icon class="u-icon" size="120" color="#4fa1e8" name="qq-circle-fill" @click="qqLogin"></u-icon>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
import base64 from '@/common/base64.js';
export default {
data() {
return {
username: 'admin',
password: '123456',
showPassword: false,
remember: true,
isValidCodeLogin: false,
validCode: '',
imgValidCodeSrc: null,
baseUrl: ''
};
},
onLoad() {
this.$u.api.loginCheck().then(res => {
if (typeof res === 'object' && res.data.result !== 'login') {
uni.reLaunch({
url: '/pages/sys/home/index'
});
}
});
},
methods: {
showPass() {
this.showPassword = !this.showPassword;
},
refreshImgValidCode(e) {
if (this.vuex_token == '') {
this.$u.api.index().then(res => {
this.imgValidCodeSrc = this.vuex_config.baseUrl + '/validCode?__sid='
+ res.sessionid + '&t=' + new Date().getTime();
});
} else {
this.imgValidCodeSrc = this.vuex_config.baseUrl + '/validCode?__sid='
+ this.vuex_token + '&t=' + new Date().getTime();
}
this.validCode = '';
},
submit() {
if (this.username.length == 0) {
this.$u.toast('请输入账号');
return;
}
if (this.password.length == 0) {
this.$u.toast('请输入密码');
return;
}
this.$u.api.login({
username: this.username,
password: this.password,
cid: 111,
code: this.validCode === '' ? '1234' : this.validCode,
device: 'api',
param_remember: this.remember
})
.then(res => {
this.$u.toast(res.message || '未连接服务器');
if (res.code === 0) {
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/home/index'
});
}, 500);
}
if (res.isValidCodeLogin) {
this.isValidCodeLogin = true;
this.refreshImgValidCode();
}
});
},
wxLogin(res) {
this.$u.toast('微信登录');
},
qqLogin() {
this.$u.toast('QQ 登录');
},
updateBaseUrl() {
this.vuex_config.baseUrl = this.baseUrl;
this.$u.vuex('vuex_config', this.vuex_config);
this.$u.http.setConfig({
baseUrl: this.baseUrl
});
this.$u.toast('切换成功!');
}
}
};
</script>
<style lang="scss">
@import 'index.scss';
.logo {
width: 260 rpx;
height: 260 rpx;
background: rgba(59, 121, 235, 1);
box-shadow: 0 rpx 5 rpx 20 rpx 5 rpx rgba(45, 127, 235, 0.5);
border-radius: 50%;
margin: 70 rpx auto 10 rpx auto;
}
.logo image {
width: 260 rpx;
height: 260 rpx;
border-radius: 50%;
}
.base-url js-select {
width: 100%;
}
.button {
margin: 30 rpx auto 0;
}
.footer {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
text-align: center;
color: #46afff;
height: 40 rpx;
line-height: 40 rpx;
font-size: 35 rpx;
margin-top: 60 rpx;
}
.footer text {
font-size: 30 rpx;
margin-left: 25 rpx;
margin-right: 25 rpx;
}
.oauth2 {
display: flex;
flex-direction: row;
justify-content: space-around;
margin: 55 rpx 100 rpx;
image {
height: 100 rpx;
width: 100 rpx;
}
}
</style>

View File

@@ -0,0 +1,187 @@
<template>
<view class="wrap">
<view class="list">
<view class="list-call">
<u-icon class="u-icon" size="40" name="account"></u-icon>
<input class="u-input" type="text" v-model="loginCode" maxlength="32" placeholder="请输入登录账号" />
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="chat"></u-icon>
<input class="u-input" type="text" v-model="userName" maxlength="20" placeholder="请输入用户昵称" />
</view>
<!-- <view class="list-call">
<u-icon class="u-icon" size="40" name="email"></u-icon>
<input class="u-input" type="text" v-model="email" placeholder="请输入电子邮箱" />
</view> -->
<view class="list-call">
<u-icon class="u-icon" size="40" name="phone"></u-icon>
<input class="u-input" type="text" v-model="mobile" maxlength="11" placeholder="请输入手机号码" />
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="lock"></u-icon>
<input class="u-input" type="text" v-model="password" maxlength="32" placeholder="请输入登录密码" :password="!showPassword" />
<image class="u-icon-right" :src="'/static/jeesite/login/eye_' + (showPassword ? 'open' : 'close') + '.png'" @click="showPass()"></image>
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="bookmark"></u-icon>
<input class="u-input" type="text" v-model="validCode" maxlength="4" placeholder="图片验证码" />
<u-image class="img-valid-code" width="300rpx" height="90rpx" :src="imgValidCodeSrc" @click="refreshImgValidCode()"></u-image>
</view>
<view class="list-call">
<u-icon class="u-icon" size="40" name="coupon"></u-icon>
<input class="u-input" type="text" v-model="fpValidCode" maxlength="6" placeholder="手机验证码" />
<u-verification-code ref="uCode" :seconds="seconds" @change="codeChange"></u-verification-code>
<view class="btn-valid-code" :class="{ 'btn-valid-codes': tips != '获取验证码' && tips != '重新获取' }"
hover-class="btn-valid-code-hover" @click="getValidCode()">{{tips}}</view>
</view>
</view>
<view class="agreement">
<u-checkbox v-model="terms">我已阅读并同意</u-checkbox>
<navigator url="/pages/common/webview?title=软件用户协议&url=https://jeesite.com/docs/support/"
open-type="navigate">软件用户协议</navigator>
</view>
<view class="button" hover-class="button-hover" @click="submit()"><text>注册账号</text></view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
loginCode: '',
userName: '',
email: '',
mobile: '',
userType: 'member',
terms: false,
password: '',
validCode: '',
fpValidCode: '',
showPassword: false,
imgValidCodeSrc: null,
tips: '获取验证码',
seconds: 60
};
},
onLoad() {
this.refreshImgValidCode();
},
methods: {
showPass() {
this.showPassword = !this.showPassword;
},
refreshImgValidCode(e) {
if (this.vuex_token == '') {
this.$u.api.index().then(res => {
this.imgValidCodeSrc = this.vuex_config.baseUrl + '/validCode?__sid='
+ res.sessionid + '&t=' + new Date().getTime();
});
} else {
this.imgValidCodeSrc = this.vuex_config.baseUrl + '/validCode?__sid='
+ this.vuex_token + '&t=' + new Date().getTime();
}
this.validCode = '';
},
codeChange(text) {
this.tips = text;
},
formValid() {
if (this.loginCode.length == 0) {
this.$u.toast('请输入账号');
return false;
}
if (this.userName.length == 0) {
this.$u.toast('请输入昵称');
return false;
}
if (this.password.length == 0) {
this.$u.toast('请输入密码');
return false;
}
if (this.validCode.length == 0) {
this.$u.toast('请输入图片验证码');
return false;
}
return true;
},
getValidCode() {
if (!this.formValid()) {
return;
}
if (this.$refs.uCode.canGetCode) {
this.$u.api.validCode({
validCode: this.validCode
})
.then(res => {
if (res !== 'true') {
this.$u.toast('图片验证码错误');
return;
}
this.$u.api.getRegValidCode({
loginCode: this.loginCode,
userName: this.userName,
email: this.email,
mobile: this.mobile,
userType: this.userType,
validCode: this.validCode,
validType: 'mobile'
})
.then(res => {
this.$u.toast(res.message, 3000);
if (res.result == 'false') {
this.refreshImgValidCode();
}
});
this.$refs.uCode.start();
});
}
},
submit() {
if (!this.formValid()) {
return;
}
if (this.terms != true){
this.$u.toast('请阅读《用户使用协议》');
return false;
}
if (this.fpValidCode.length == 0) {
this.$u.toast('请输入手机验证码');
return false;
}
this.$u.api.saveRegByValidCode({
loginCode: this.loginCode,
userName: this.userName,
regValidCode: this.fpValidCode,
password: this.password
})
.then(res => {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
success: function () {
if (res.result == 'true') {
uni.reLaunch({
url: '/pages/sys/login/index'
});
}
}
});
});
}
}
};
</script>
<style lang="scss">
@import 'index.scss';
.agreement {
display:flex;
flex-direction:row;
align-items:center;
margin-left:90rpx;
color:#666;
}
</style>

View File

@@ -0,0 +1,77 @@
<template>
<view class="wrap">
<view class="article-title">{{banner.title}}</view>
<view class="article-meta">
{{banner.author_name}} 发起于 {{banner.published_at}}</text>
</view>
<view class="article-content">
<rich-text :nodes="content"></rich-text>
</view>
<view class="u-p-t-5"></view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
banner: {
cover: '/static/jeesite/banner/2.svg',
title: '最好用的快速开发平台',
author_name: '系统管理员',
published_at: '2021-4-20 12:30'
},
content: `<p>
JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,基于经典技术组合 Spring Boot、Spring MVC、Apache Shiro、MyBatis、Beetl、Bootstrap、AdminLTE 采用经典开发模式让初学者能够更快的入门并投入到团队开发中去。在线代码生成功能包括模块如组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计模块增减便捷界面无刷新一键换肤众多账号安全设置密码策略文件在线预览消息推送多元化第三方登录在线定时任务配置支持集群支持SAAS支持多数据源支持读写分离、分库分表支持微服务应用。
</p><p>
JeeSite 快速开发平台的主要目的是能够让初级的研发人员快速的开发出复杂的业务功能(经典架构会的人多),让开发者注重专注业务,其余有平台来封装技术细节,降低技术难度,从而节省人力成本,缩短项目周期,提高软件安全质量。
</p><p>
JeeSite 自 2013 年发布以来已被广大爱好者用到了企业、政府、医疗、金融、互联网等各个领域中JeeSite 架构精良、易于扩展、大众思维的设计模式、工匠精神打磨每一个细节,深入开发者的内心,并荣获开源中国《最受欢迎中国开源软件》奖杯,期间也帮助了不少刚毕业的大学生,教师作为入门教材,快速的去实践。
</p><p>
JeeSite4 的升级,作者结合了多年总结和经验,以及各方面的应用案例,对架构完成了一次全部重构,也纳入很多新的思想。不管是从开发者模式、底层架构、逻辑处理还是到用户界面,用户交互体验上都有很大的进步,在不忘学习成本、提高开发效率的情况下,安全方面也做和很多工作,包括:身份认证、密码策略、安全审计、日志收集等众多安全选项供你选择。努力为大中小微企业打造全方位企业级快速开发解决方案。
</p>`
};
},
onLoad() {
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
}
}
};
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.article-title {
font-size: 38rpx;
font-weight: 400;
text-align: center;
padding-bottom: 30rpx;
margin: 30rpx;
border-bottom: 1px solid #c0c4cb;
color: #51a0d5;
}
.article-meta {
padding: 10rpx 50upx 30rpx;
color: gray;
}
.article-content {
padding: 0 30upx;
overflow: hidden;
font-size: 30rpx;
line-height: 50rpx;
margin-bottom: 30rpx;
text-indent: 60rpx;
/deep/ p {
margin-bottom: 20rpx;
}
}
</style>

View File

@@ -0,0 +1,163 @@
<template>
<view class="wrap">
<js-lang title="msg.title"></js-lang>
<view class="search">
<u-search v-model="keywords" @custom="search" @search="search"></u-search>
</view>
<scroll-view class="scroll-list" scroll-y="true">
<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>
<u-badge v-if="item.count && item.count > 0" :count="item.count"></u-badge>
</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}} | 时间{{child.createDate}}</text>
</u-cell-item>
</u-cell-group>
</u-collapse-item>
</view>
</u-collapse>
</scroll-view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
keywords: '',
list: [
{
code: 'a',
name: '重要消息',
icon: 'error-circle',
count: 3,
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: 'chat',
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-2',
name: '系统通知',
icon: 'bell',
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-3',
name: '已读消息',
icon: 'volume',
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'
}
]
},
],
};
},
onLoad() {
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
},
search(value) {
this.$u.toast('搜索内容为:' + value)
}
}
};
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
</style>

View File

@@ -0,0 +1,78 @@
<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/jeesite/logo200.png"></u-avatar>
<view class="title">{{vuex_config.productName}}</view>
<view class="version">{{vuex_config.productVersion}}</view>
</view>
<u-cell-group class="form" :border="false">
<u-cell-item :arrow="true" title="检查更新" @click="upgrade()"></u-cell-item>
<navigator url="comment" open-type="navigate">
<u-cell-item :arrow="true" title="意见反馈"></u-cell-item>
</navigator>
<navigator url="/pages/common/webview?title=公司首页&url=https://jeesite.com" open-type="navigate">
<u-cell-item :arrow="true" title="公司首页">https://jeesite.com</u-cell-item>
</navigator>
<navigator url="/pages/common/webview?title=服务条款&url=http://s.jeesite.com/" open-type="navigate">
<u-cell-item :arrow="true" title="服务条款">http://s.jeesite.com/</u-cell-item>
</navigator>
</u-cell-group>
<view class="copyright">
<view>卓源软件 版权所有</view>
<view>Copyright &copy; 2021 jeesite.com</view>
<view>All Rights Reserved</view>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com 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">
page {
background-color: #f8f8f8;
}
.title {
display: flex;
margin: 30rpx 0;
font-size: 50rpx;
}
.version {
margin-bottom: 10rpx;
font-size: 40rpx;
}
.copyright {
margin-top: 50rpx;
text-align: center;
line-height: 60rpx;
color: #999;
}
</style>

View File

@@ -0,0 +1,98 @@
<template>
<view class="wrap">
<u-form class="form" :model="model" :rules="rules" ref="uForm" label-position="top">
<u-form-item label="分类:" prop="category" label-position="left" label-width="100">
<js-select v-model="model.category" dict-type="app_comment_category"
placeholder="请选择分类"></js-select>
</u-form-item>
<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="上传图片(选填,提供问题截图)" prop="images">
<js-uploadfile v-model="model" biz-type="appComment_image"></js-uploadfile>
</u-form-item>
<u-form-item label="联系方式手机、邮箱、QQ号码" prop="contact">
<u-input placeholder="选填,便于我们与你联系,进一步沟通"
v-model="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://jeesite.com 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">
</style>

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://jeesite.com 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: #f8f8f8;
}
</style>

View File

@@ -0,0 +1,98 @@
/*!
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* @author ThinkGem
* @version 2020-9-1
*/
.header {
background-color: #4094ff;
.userinfo {
display: flex;
padding: 40rpx;
.image {
flex-shrink: 0;
width: 120rpx;
height: 120rpx;
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;
padding-top: 8rpx;
}
.usercode {
height: 48rpx;
padding: 0 20rpx;
margin-top: 10rpx;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 20rpx;
font-size: 30rpx;
}
}
}
.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;
}
}
}

View File

@@ -0,0 +1,128 @@
<template>
<view class="wrap">
<js-lang title="user.title"></js-lang>
<view class="header">
<view class="userinfo">
<view class="image" @click="navTo('info')"><image :src="avatarUrl"></image></view>
<view class="info">
<view class="username">{{ vuex_user.username || $t('login.noLogin') }}</view>
<view class="realname">{{ vuex_user.realname || $t('login.noLogin') }}</view>
</view>
</view>
<view class="logout"><u-button type="success" shape="circle" size="mini" @click="logout">{{$t('login.logoutButton')}}</u-button></view>
</view>
<!-- <view class="toolbar">
<view class="box">
<navigator class="item" hover-class="hover" url="info">
<view class="icon"><u-icon class="u-icon" :style="{ color: '#ea9a44' }" name="account"></u-icon></view>
<text class="label">个人信息</text>
</navigator>
<navigator class="item" hover-class="hover" url="help">
<view class="icon"><u-icon class="u-icon" :style="{ color: '#a571fd' }" name="question-circle"></u-icon></view>
<text class="label">帮助中心</text>
</navigator>
<navigator class="item" hover-class="hover" url="info">
<view class="icon"><u-icon class="u-icon" :style="{ color: '#ea9a44' }" name="account"></u-icon></view>
<text class="label">个人信息</text>
</navigator>
<navigator class="item" hover-class="hover" url="help">
<view class="icon"><u-icon class="u-icon" :style="{ color: '#a571fd' }" name="question-circle"></u-icon></view>
<text class="label">帮助中心</text>
</navigator>
</view>
</view> -->
<view class="u-p-t-10 u-p-b-20">
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="account" :iconSize="iconSize" :iconStyle="{color:'#266bff'}"
title="个人信息" @click="navTo('info')"></u-cell-item>
<u-cell-item icon="lock" :iconSize="iconSize" :iconStyle="{ color: '#1bca6a' }"
title="修改密码" @click="navTo('pwd')"></u-cell-item>
<u-cell-item icon="question-circle" :iconSize="iconSize" :iconStyle="{ color: '#d99e59' }"
title="帮助中心" @click="navTo('help')"></u-cell-item>
</u-cell-group>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="heart" :iconSize="iconSize" :iconStyle="{ color: '#0a1aff' }"
title="关于我们" @click="navTo('about')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconSize="iconSize" :iconStyle="{ color: '#a571fd' }"
title="意见反馈" @click="navTo('comment')"></u-cell-item>
<u-cell-item icon="clock" :iconSize="iconSize" :iconStyle="{ color: '#ff6f27' }"
title="检查更新" @click="upgrade()"></u-cell-item>
</u-cell-group>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="setting" :iconSize="iconSize" :iconStyle="{ color: '#1a94ff' }"
title="系统设置" @click="navTo('setting')"></u-cell-item>
</u-cell-group>
</view>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
iconSize: 38
};
},
computed: {
avatarUrl() {
let url = this.vuex_user.avatar || '/ctxPath/static/images/user1.jpg';
url = url.replace('/ctxPath/', this.vuex_config.baseUrl + '/');
return url + '?t=' + new Date().getTime();
}
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
});
},
logout() {
this.$u.api.logout().then(res => {
this.$u.toast(res.message);
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: #f8f8f8;
}
</style>

View File

@@ -0,0 +1,224 @@
<template>
<view class="wrap">
<view class="u-m-t-50 u-flex u-flex-col u-text-center">
<u-avatar size="150" :src="avatarUrl"></u-avatar>
<u-button size="medium" shape="circle" class="u-m-t-40"
style="font-size:34rpx" @click="chooseAvatar">选择头像</u-button>
</view>
<u-form class="form" :model="model" :rules="rules" ref="uForm">
<u-form-item label="昵称" prop="realname" label-width="120">
<u-input placeholder="请输入用户昵称" v-model="model.realname" type="text"></u-input>
</u-form-item>
<u-form-item label="性别" prop="sex" label-width="120">
<js-radio v-model="model.sex" dict-type="sys_user_sex"></js-radio>
</u-form-item>
<u-form-item label="邮箱" prop="email" label-width="120">
<u-input placeholder="请输入电子邮箱" v-model="model.email" type="text"></u-input>
</u-form-item>
<u-form-item label="手机" prop="mobile" label-width="120">
<u-input placeholder="请输入手机号码" v-model="model.mobile" type="number" maxlength="11"></u-input>
</u-form-item>
<u-form-item label="QQ" prop="qq" label-width="120">
<u-input placeholder="请输入QQ" v-model="model.qq" type="text"></u-input>
</u-form-item>
<u-form-item label="地址" prop="address" label-width="120">
<u-input type="textarea" placeholder="请输入你的地址" v-model="model.address" height="128" />
</u-form-item>
<u-form-item label="上次登录时间" label-width="250">
{{this.$u.date(model.last_time, 'yyyy-mm-dd hh:MM:ss')}}
</u-form-item>
<u-form-item label="上次登录地址" label-width="250">
{{model.last_ip}}
</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://jeesite.com All rights reserved.
*/
export default {
data() {
return {
model: {
sex: '1'
},
rules: {
realname: [
{
required: true,
message: '请输入姓名',
trigger: 'blur' ,
},
{
min: 2,
max: 32,
message: '姓名长度在 2 到 32 个字符',
trigger: ['change', 'blur'],
},
// {
// // 此为同步验证可以直接返回true或者false如果是异步验证稍微不同见下方说明
// validator: (rule, value, callback) => {
// // 调用uView自带的js验证规则详见https://www.uviewui.com/js/test.html
// return this.$u.test.chinese(value);
// },
// message: '姓名必须为中文',
// // 触发器可以同时用blur和change二者之间用英文逗号隔开
// trigger: ['change', 'blur'],
// },
// {
// // 异步验证,用途:比如用户注册时输入完账号,后端检查账号是否已存在
// // 异步验证需要通过调用 callback(),并且在里面抛出 new Error()
// // 抛出的内容为需要提示的信息,和其他方式的 message 属性的提示一样
// asyncValidator: (rule, value, callback) => {
// this.$u.post('/ebapi/public_api/index').then(res => {
// if(res.error) {
// // 如果验证出错需要在callback()抛出new Error('错误提示信息')
// callback(new Error('姓名重复'));
// } else {
// // 如果没有错误,也要执行 callback() 回调
// callback();
// }
// })
// },
// trigger: ['blur'],
// },
// {
// // 正则校验示例此处用正则校验是否中文此处仅为示例因为uView有this.$u.test.chinese可以判断是否中文
// pattern: /^[\u4e00-\u9fa5]+$/gi,
// message: '简介只能为中文',
// trigger: 'change',
// },
],
mobile: [
// {
// required: true,
// message: '请输入手机号',
// trigger: ['change','blur'],
// },
{
validator: (rule, value, callback) => {
return value === '' || this.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['change','blur'],
}
],
// password: [
// {
// 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'],
// }
// ],
// rePassword: [
// {
// required: true,
// message: '请重新输入密码',
// trigger: ['change','blur'],
// },
// {
// validator: (rule, value, callback) => {
// return value === this.model.password;
// },
// message: '两次输入的密码不相等',
// trigger: ['change','blur'],
// }
// ],
},
avatarBase64: ''
};
},
onLoad() {
this.$u.api.memberProfile().then(res => {
this.model = res.data.user;
});
uni.$on('uAvatarCropper', path => {
this.avatarBase64 = path;
if (this.avatarBase64 != '' && !this.avatarBase64.startsWith('data:')){
// #ifdef APP-PLUS
let self = this, fileUrl = this.avatarBase64;
plus.io.resolveLocalFileSystemURL(path, function(entry) {
entry.file(function(file) {
var fileReader = new plus.io.FileReader()
fileReader.onload = function(data) {
// console.log(data.target.result);
self.avatarBase64 = data.target.result;
}
fileReader.onerror = function(error) { }
fileReader.readAsDataURL(file)
}, function(error) { })
}, function(error) { });
// #endif
// #ifndef APP-PLUS
this.avatarBase64 = 'data:image/jpeg;base64,' + uni.getFileSystemManager()
.readFileSync(this.avatarBase64, "base64");
// #endif
}
})
},
computed: {
avatarUrl() {
if (this.avatarBase64 != ''){
return this.avatarBase64;
}
let url = this.vuex_user.avatarUrl || '/ctxPath/static/images/user1.jpg';
url = url.replace('/ctxPath/', this.vuex_config.baseUrl + '/');
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: 800, // 输出图片宽高
rectWidth: 200, // 裁剪框的宽高
fileType: 'jpg', // 输出的图片类型,如果'png'类型发现裁剪的图片太大,改成"jpg"即可
}
})
},
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
this.model.avatarBase64 = this.avatarBase64;
this.$u.api.user.infoSaveBase(this.model).then(res => {
this.$u.api.index(); // 保存后更新用户信息
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">
</style>

View File

@@ -0,0 +1,106 @@
<template>
<view class="wrap">
<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="confirmNewPassword" label-width="180">
<u-input type="password" v-model="model.confirmNewPassword" 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://jeesite.com 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'],
}
],
confirmNewPassword: [
{
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: base64.btoa(this.model.oldPassword),
newPassword: base64.btoa(this.model.newPassword),
confirmNewPassword: base64.btoa(this.model.confirmNewPassword)
}).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">
</style>

View File

@@ -0,0 +1,87 @@
<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 class="u-m-40">
<u-button type="primary" @click="logout" :hair-line="false">退出登录</u-button>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com 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.message);
if (res.result == 'true') {
let self = this;
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/login/index'
});
}, 500);
}
});
}
}
};
</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,129 @@
<template>
<view class="wrap">
<u-form class="form" :model="model" :rules="rules" ref="uForm" label-position="left">
<u-form-item label="编号" prop="id" label-width="180" v-if="model.id">
<u-input placeholder="请输入编号" v-model="model.id" type="text" maxlength="64"></u-input>
</u-form-item>
<u-form-item label="单行文本" prop="testInput" label-width="180">
<u-input placeholder="请输入单行文本" v-model="model.testInput" type="text" maxlength="200"></u-input>
</u-form-item>
<u-form-item label="多行文本" prop="testTextarea" label-width="180" label-position="top">
<u-input type="textarea" placeholder="请输入多行文本" v-model="model.testTextarea" height="100" maxlength="500" />
</u-form-item>
<u-form-item label="下拉框" prop="testSelect" label-width="180">
<js-select v-model="model.testSelect" dict-type="sys_menu_type" placeholder="请选择选项"></js-select>
</u-form-item>
<!-- <u-form-item label="下拉框(树结构)" prop="testSelectMultiple" label-width="260">
<js-select v-model="model.testSelectMultiple" dict-type="app_tree_test" placeholder="请选择选项" :tree="true"
:label-value="model.testSelectMultipleLabel" @label-input="model.testSelectMultipleLabel = $event"></js-select>
</u-form-item> -->
<u-form-item label="单选框" prop="testRadio" label-width="180">
<js-radio v-model="model.testRadio" dict-type="sys_menu_type"></js-radio>
</u-form-item>
<u-form-item label="复选框" prop="testCheckbox" label-width="180">
<js-checkbox v-model="model.testCheckbox" dict-type="sys_menu_type"></js-checkbox>
</u-form-item>
<u-form-item label="机构选择" prop="testOffice" label-width="180">
<js-select v-model="model.testOffice.officeCode" :items="officeSelectList" placeholder="请选择机构" :tree="true"
:label-value="model.testOffice.officeName" @label-input="model.testOffice.officeName = $event"></js-select>
</u-form-item>
<u-form-item label="人员选择" prop="testUser" label-width="180">
<js-select v-model="model.testUser.userCode" :items="userSelectList" placeholder="请选择人员" :tree="true"
:label-value="model.testUser.userName" @label-input="model.testUser.userName = $event"></js-select>
</u-form-item>
<u-form-item label="上传图片(选填)" prop="images" label-position="top">
<js-uploadfile v-model="model.dataMap" :biz-key="model.id" biz-type="testData_image"></js-uploadfile>
</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://jeesite.com All rights reserved.
*/
export default {
data() {
return {
model: {
id: '',
testInput: '',
testTextarea: '',
testSelect: '',
testSelectMultiple: '',
testSelectMultipleLabel: '',
testRadio: '',
testCheckbox: '',
testUser: {
userCode: '',
userName: ''
},
testOffice: {
officeCode: '',
officeName: ''
}
},
rules: {
testInput: [
{
required: true,
message: '请输入单行文本',
trigger: ['change','blur'],
}
]
},
officeSelectList: [],
userSelectList: [],
};
},
onLoad(params){
this.$u.api.testData.form(params).then(res => {
Object.assign(this.model, res.testData);
});
},
onReady() {
this.$refs.uForm.setRules(this.rules);
// 机构数据
this.$u.api.office.treeData().then(res => {
this.officeSelectList = res;
});
// 人员和机构数据
this.$u.api.office.treeData({isLoadUser: true}).then(res => {
this.userSelectList = res;
});
},
methods: {
submit() {
//console.log(this.model)
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.testData.save(this.model).then(res => {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
success: function () {
if (res.result == 'true') {
uni.setStorageSync('refreshList', true);
uni.navigateBack();
}
}
});
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
});
},
cancel() {
uni.navigateBack();
}
}
};
</script>
<style lang="scss">
</style>

View File

@@ -0,0 +1,123 @@
<template>
<view class="wrap">
<view class="search">
<u-search v-model="keywords" @custom="search" @search="search"></u-search>
</view>
<scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore">
<u-cell-group class="list" :border="false">
<u-swipe-action :options="options" v-for="(item, index) in list" :key="item.id" :index="index" @click="optionsClick">
<u-cell-item :arrow="true" @click="navTo('form?id='+item.id)">
<text slot="title">ID: {{item.testInput || item.id}}</text>
<text slot="label">访问路径{{item.url}} &nbsp;|&nbsp; 时间{{item.created_at}}</text>
</u-cell-item>
</u-swipe-action>
</u-cell-group>
<view class="loadmore" @click="loadMore">
<u-loadmore :status="loadStatus"></u-loadmore>
</view>
</scroll-view>
<view class="btn-plus" @click="navTo('form')">
<u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
keywords: '',
query: {
pageNo: 1,
pageSize: 20
},
list: [],
count: 0,
loadStatus: 'loadmore',
options: [
{text: '删除', style: { background: '#dd524d'}}
]
};
},
onLoad() {
this.loadList();
},
onShow() {
if (uni.getStorageSync('refreshList') === true){
uni.removeStorageSync('refreshList');
this.search('');
}
},
methods: {
loadMore() {
this.loadStatus = "loading";
setTimeout(() => {
this.query.pageNo += 1;
this.loadList();
}, 100);
},
loadList() {
this.$u.api.testData.list(this.query).then(res => {
if (!res.data.list || res.data.list.length === 0){
this.loadStatus = "nomore";
return;
}
this.list = this.list.concat(res.data.list);
this.count = res.data.total_count;
this.query.pageNo = res.data.page;
this.query.pageSize = res.data.limit;
this.loadStatus = "loadmore";
});
},
optionsClick(rowIndex, btnIndex) {
if(btnIndex == 0) {
let self = this;
uni.showModal({
title: '提示',
content: '确认要删除该数据吗?',
showCancel: true,
success: function (res2) {
if (res2.confirm) {
let row = self.list[rowIndex];
self.$u.api.testData.delete({id: row.id}).then(res => {
self.$u.toast(res.message);
if (res.result == 'true'){
self.list.splice(rowIndex, 1);
}
});
}
}
});
}
},
search(value) {
this.list = [];
this.query.pageNo = 0;
this.query.testInput = value;
this.loadList();
},
navTo(url) {
uni.navigateTo({
url: url
});
}
}
};
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.btn-plus {
position: absolute;
bottom: 50rpx;
right: 50rpx;
z-index: 1;
opacity: 0.6;
}
.btn-plus:hover {
opacity: 1;
}
</style>