替换vue-h5

main
张涛 8 months ago
parent 4c48ac02a1
commit 0f6e9cbe4b

@ -1,5 +0,0 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

@ -1,2 +0,0 @@
## 通用环境变量

@ -1,7 +0,0 @@
## 开发环境变量
## GIS数据接口
VUE_APP_HOST_GIS = "http://39.101.188.84:8089/dev/"
## 属性数据接口
VUE_APP_HOST_PROPERTY = "/api/v3.0/"
## 照片地址
VUE_APP_IMAGE_URL = "http://180.97.207.60:8009/api/"

@ -1,7 +0,0 @@
## 开发环境变量
## GIS数据接口
VUE_APP_HOST_GIS = "http://39.101.188.84:8089/dev/"
## 属性数据接口
VUE_APP_HOST_PROPERTY = "http://180.97.207.60:8009/api/v3.0/"
## 照片地址
VUE_APP_IMAGE_URL = "http://180.97.207.60:8009/api/"

@ -1,27 +0,0 @@
/*
* @Author: 付刚
* @Date: 2021-06-03 18:19:56
* @LastEditors: 付刚
* @LastEditTime: 2021-06-03 21:11:31
* @FilePath: \RudongAPP\.eslintrc.js
*/
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/essential', 'eslint:recommended'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
//允许定义变量不使用
'no-unused-vars': 'off',
//强制使用单引号
quotes: ['error', 'single'],
//强制不使用分号结尾
semi: ['error', 'never'],
},
parserOptions: {
parser: 'babel-eslint',
},
}

31
.gitignore vendored

@ -1,21 +1,16 @@
.DS_Store
node_modules
/dist
######################################################################
# Build Tools
# local env files
.env.local
.env.*.local
/unpackage/*
/node_modules/*
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
######################################################################
# Development Tools
/.idea/*
/.vscode/*
/.hbuilderx/*
package-lock.json
yarn.lock
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

@ -1,5 +0,0 @@
{
"eslintIntegration": true,
"singleQuote": true,
"semi": false
}

@ -0,0 +1,152 @@
<script>
import config from "./config";
import store from "@/store";
import { getToken, setToken, removeToken } from "@/utils/auth";
import { getSqByaccesstoken, getUserinfo } from "@/api/jn/login.js";
import permision from "@/utils/permission.js";
export default {
onLaunch: function () {
console.log("初始化进入");
this.initApp();
//#ifdef APP-PLUS
this.requestAndroidPermission("android.permission.ACCESS_FINE_LOCATION");
this.requestAndroidPermission("android.permission.CAMERA");
this.requestAndroidPermission("android.permission.READ_EXTERNAL_STORAGE");
this.requestAndroidPermission("android.permission.RECORD_AUDIO");
//#endif
removeToken();
},
onShow() {
console.log("onShow");
},
methods: {
//
initApp() {
//
this.initConfig();
//
// // #ifdef APP || H5
this.checkLogin();
// //#endif
},
initConfig() {
this.globalData.config = config;
},
checkLogin() {
const launchOptions = uni.getLaunchOptionsSync();
const { query } = launchOptions;
console.log(query, "query");
// console.log(Object.keys(query).length,"query.lengh");
console.log(getToken(), "getToken()");
if (!getToken()) {
if (Object.keys(query).length !== 0) {
console.log("获取query");
// let params = this.getRequestParams();
// console.log(params,"params");
// if (location.href.includes("code=")) {
const code = query.code;
const token = query.token;
uni.setStorageSync("token", token);
// console.log(code,"code");
// console.log(token,"token");
getSqByaccesstoken({
code: code,
})
.then((res) => {
// console.log("accessToken");
uni.setStorageSync("accessToken", res.data.accessToken);
return getUserinfo({
accessToken: res.data.accessToken,
});
})
.then((el) => {
this.$tab.switchTab("/pages/index");
uni.setStorageSync("userInfo", el.data);
setToken(el.data.token);
// location.reload();
console.log("用户信息", el);
});
// }
} else {
// // #ifdef APP
console.log("进入APP判断");
// this.$tab.reLaunch("/pages/myLogin");
uni.reLaunch({
url: "/pages/myLogin",
});
// url
// plus.runtime.openURL( "https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324", this.openErr );
// // #endif
// // #ifdef H5
// location.href = `https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324`
// // #endif
console.log("Before navigateTo or reLaunch");
// this.$tab.reLaunch("/pages/myLogin");
// uni.navigateTo({
// url:'https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324'
// })
}
} else {
this.$tab.reLaunch("/pages/index");
}
},
openErr(err) {
console.log(err, "报错信息");
},
//
getRequestParams() {
let url = location.href;
let requestParams = {};
if (url.indexOf("?") !== -1) {
let str = url.substr(url.indexOf("?") + 1); //?
// console.log(str, '?');
let strs = str.split("&"); //&
// console.log(strs, '&');
for (let i = 0; i < strs.length; i++) {
requestParams[strs[i].split("=")[0]] = decodeURI(
strs[i].split("=")[1]
);
// '=''='
}
}
// console.log(requestParams, '');
return requestParams;
},
async requestAndroidPermission(permisionID) {
var result = await permision.requestAndroidPermission(permisionID);
var strStatus;
if (result == 1) {
strStatus = "已获得授权";
} else if (result == 0) {
strStatus = "未获得授权";
uni.showModal({
content: "请在设置中打卡相机、麦克风、相册、定位权限",
showCancel: false,
});
console.warn("权限:" + permisionID + strStatus);
// App
this.gotoAppPermissionSetting();
} else {
strStatus = "被永久拒绝权限";
uni.showModal({
content: "请在设置中打卡相机、麦克风、相册、定位权限",
showCancel: false,
});
console.warn("权限:" + permisionID + strStatus);
// App
this.gotoAppPermissionSetting();
}
},
gotoAppPermissionSetting: function () {
permision.gotoAppPermissionSetting();
},
},
};
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
@import "@/static/scss/index.scss";
</style>

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 若依
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,35 +1,52 @@
# 昆山市工业厂房 App 资源可视化平台
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
<p align="center">
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-43e3941654fa3054c9684bf53d1b1d356a1.png">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v1.1.0</h1>
<h4 align="center">基于UniApp开发的轻量级移动端框架</h4>
<p align="center">
<a href="https://gitee.com/y_project/RuoYi-App/stargazers"><img src="https://gitee.com/y_project/RuoYi-App/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/y_project/RuoYi-App"><img src="https://img.shields.io/badge/RuoYi-v1.1.0-brightgreen.svg"></a>
<a href="https://gitee.com/y_project/RuoYi-App/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
</p>
## 平台简介
RuoYi App 移动解决方案采用uniapp框架一份代码多终端适配同时支持APP、小程序、H5实现了与[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)、[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)完美对接的移动解决方案!目前已经实现登录、我的、工作台、编辑资料、头像修改、密码修改、常见问题、关于我们等基础功能。
* 配套后端代码仓库地址[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) 或 [RuoYi-Cloud](https://github.com/yangzongzhuan/RuoYi-Cloud) 版本。
* 应用框架基于[uniapp](https://uniapp.dcloud.net.cn/)支持小程序、H5、Android和IOS。
* 前端组件采用[uni-ui](https://github.com/dcloudio/uni-ui)全端兼容的高性能UI框架。
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)&nbsp;&nbsp;
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)&nbsp;&nbsp;
## 技术文档
- 官网网站:[http://ruoyi.vip](http://ruoyi.vip)
- 文档地址:[http://doc.ruoyi.vip](http://doc.ruoyi.vip)
- H5页体验[http://h5.ruoyi.vip](http://h5.ruoyi.vip)
- QQ交流群 ①133713780(满)、②146013835
- 小程序体验
<img src="https://oscimg.oschina.net/oscnet/up-26c76dc90b92acdbd9ac8cd5252f07c8ad9.jpg" alt="小程序演示"/>
## 演示图
<table>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-3ea20e447ac621a161e395fb53ccc683d84.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-a6f23cf9a371a30165e135eff6d9ae89a9d.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-ff5f62016bf6624c1ff27eee57499dccd44.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-b9a582fdb26ec69d407fabd044d2c8494df.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-96427ee08fca29d77934cfc8d1b1a637cef.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-5fdadc582d24cccd7727030d397b63185a3.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-0a36797b6bcc50c36d40c3c782665b89efc.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-d77995cc00687cedd00d5ac7d68a07ea276.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-fa8f5ab20becf59b4b38c1b92a9989e7109.png"/></td>
</tr>
</table>

@ -0,0 +1,44 @@
import request from "@/utils/request";
// 查询活动申请列表
export function listActivity(query) {
return request({
url: "/jn/activity/list",
method: "get",
params: query,
});
}
// 查询活动申请详细
export function getActivity(id) {
return request({
url: "/jn/activity/" + id,
method: "get",
});
}
// 新增活动申请
export function addActivity(data) {
return request({
url: "/jn/activity",
method: "post",
data: data,
});
}
// 修改活动申请
export function updateActivity(data) {
return request({
url: "/jn/activity",
method: "put",
data: data,
});
}
// 删除活动申请
export function delActivity(id) {
return request({
url: "/jn/activity/" + id,
method: "delete",
});
}

@ -0,0 +1,25 @@
import request from "@/utils/request";
// APP打卡
export function clock(data) {
return request({
url: "/jn/record/clock",
method: "post",
data,
});
}
// 获取打卡状态
export function getStatus(data){
return request({
url:"/jn/record/status",
method:"post",
data
})
}
// 判断用户位置
export function judgmentPosition(data){
return request({
url:"/jn/record/judgmentPosition",
method:"post",
data
})
}

@ -0,0 +1,44 @@
import request from "@/utils/request";
// 查询活动申请列表
export function listLevel(query) {
return request({
url: "/jn/level/list",
method: "get",
params: query,
});
}
// 查询活动申请详细
export function getLevel(id) {
return request({
url: "/jn/level/" + id,
method: "get",
});
}
// 新增活动申请
export function addLevel(data) {
return request({
url: "/jn/level",
method: "post",
data: data,
});
}
// 修改活动申请
export function updateLevel(data) {
return request({
url: "/jn/level",
method: "put",
data: data,
});
}
// 删除活动申请
export function delLevel(id) {
return request({
url: "/jn/level/" + id,
method: "delete",
});
}

@ -0,0 +1,38 @@
import request from "@/utils/request";
// getSqByaccesstoken
export function getSqByaccesstoken(params) {
return request({
url: "/jn/single/getSqByaccesstoken",
method: "get",
params,
});
}
export function getCode(params){
return request({
url:"/jn/single/getSq",
method: "get",
params
})
}
export function getUserinfo(params){
return request({
url:"/jn/single/getUserByaccessToken",
method: "get",
params,
// headers:{
// isToken:false,
// }
})
}
// 获取用户的考勤点
export function getUserIdByPoint(params){
return request({
url:"/jn/single/getUserByaccessToken",
method: "get",
params,
})
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询商家端消息中心列表
export function listNews(query) {
return request({
url: '/jn/news/list',
method: 'get',
params: query
})
}
// 查询商家端消息中心详细
export function getNews(id) {
return request({
url: '/jn/news/' + id,
method: 'get'
})
}
// 新增商家端消息中心
export function addNews(data) {
return request({
url: '/jn/news',
method: 'post',
data: data
})
}
// 修改商家端消息中心
export function updateNews(data) {
return request({
url: '/jn/news',
method: 'put',
data: data
})
}
// 删除商家端消息中心
export function delNews(id) {
return request({
url: '/jn/news/' + id,
method: 'delete'
})
}

@ -0,0 +1,41 @@
import request from '@/utils/request'
//分页条件查询脱岗违停统计表
export function tgwtList(params) {
return request({
url: "/jn/bTgwttj",
method:'get',
params
})
}
//新增脱岗违停统计表
export function tgwtAdd(data) {
return request({
url: `/jn/bTgwttj`,
method:'post',
data
})
}
//脱岗违停审批
export function tgwtSp(data) {
return request({
url: `/jn/bTgwttj/approval`,
method:'post',
data
})
}
//脱岗违停发起申诉
export function tgwtSs(data) {
return request({
url: `/jn/bTgwttj/complaint`,
method:'post',
data
})
}
//脱岗违停查询单条
export function tgwtGet(id) {
return request({
url: `/jn/bTgwttj/${id}`,
method:'get',
})
}

@ -0,0 +1,59 @@
import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid) {
const data = {
username,
password,
code,
uuid
}
return request({
'url': '/login',
headers: {
isToken: false
},
'method': 'post',
'data': data
})
}
// 注册方法
export function register(data) {
return request({
url: '/register',
headers: {
isToken: false
},
method: 'post',
data: data
})
}
// 获取用户详细信息
export function getInfo() {
return request({
'url': '/getInfo',
'method': 'get'
})
}
// 退出方法
export function logout() {
return request({
'url': '/logout',
'method': 'post'
})
}
// 获取验证码
export function getCodeImg() {
return request({
'url': '/captchaImage',
headers: {
isToken: false
},
method: 'get',
timeout: 20000
})
}

@ -0,0 +1,41 @@
import upload from '@/utils/upload'
import request from '@/utils/request'
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
newPassword
}
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
params: data
})
}
// 查询用户个人信息
export function getUserProfile() {
return request({
url: '/system/user/profile',
method: 'get'
})
}
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
url: '/system/user/profile',
method: 'put',
data: data
})
}
// 用户头像上传
export function uploadAvatar(data) {
return upload({
url: '/system/user/profile/avatar',
name: data.name,
filePath: data.filePath
})
}

@ -1,10 +0,0 @@
/*
* @Author: 付刚
* @Date: 2021-06-03 18:19:56
* @LastEditors: 付刚
* @LastEditTime: 2021-06-03 21:11:38
* @FilePath: \RudongAPP\babel.config.js
*/
module.exports = {
presets: ['@vue/app'],
}

@ -0,0 +1,49 @@
<template>
<view class="fixedButtom view-global">
<u-button :text="title" :color="color" @click="clickBtn" :customStyle="{
height:'88rpx',
borderRadius: '16rpx'
}"></u-button>
</view>
</template>
<script>
export default {
props: {
color: {
type: String,
default: 'linear-gradient(90deg, #3976F1 0%, #3CA0F6 100%)'
},
title: {
type: String,
default: '申请复核'
}
},
name: "fixedButtom",
data() {
return {
};
},
methods: {
clickBtn() {
this.$emit('click')
}
},
}
</script>
<style lang="scss">
.fixedButtom {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
padding: 20rpx 20rpx calc(20rpx + constant(safe-area-inset-bottom));
/* 兼容 iOS < 11.2 */
padding: 20rpx 20rpx calc(20rpx + env(safe-area-inset-bottom));
/* 兼容 iOS >= 11.2 */
border-top: 1px solid #DCE3EC;
}
</style>

@ -0,0 +1,167 @@
<template>
<view class="uni-section">
<view class="uni-section-header" @click="onClick">
<view class="uni-section-header__decoration" v-if="type" :class="type" />
<slot v-else name="decoration"></slot>
<view class="uni-section-header__content">
<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
</view>
<view class="uni-section-header__slot-right">
<slot name="right"></slot>
</view>
</view>
<view class="uni-section-content" :style="{padding: _padding}">
<slot />
</view>
</view>
</template>
<script>
/**
* Section 标题栏
* @description 标题栏
* @property {String} type = [line|circle|square] 标题装饰类型
* @value line 竖线
* @value circle 圆形
* @value square 正方形
* @property {String} title 主标题
* @property {String} titleFontSize 主标题字体大小
* @property {String} titleColor 主标题字体颜色
* @property {String} subTitle 副标题
* @property {String} subTitleFontSize 副标题字体大小
* @property {String} subTitleColor 副标题字体颜色
* @property {String} padding 默认插槽 padding
*/
export default {
name: 'UniSection',
emits:['click'],
props: {
type: {
type: String,
default: ''
},
title: {
type: String,
required: true,
default: ''
},
titleFontSize: {
type: String,
default: '14px'
},
titleColor:{
type: String,
default: '#333'
},
subTitle: {
type: String,
default: ''
},
subTitleFontSize: {
type: String,
default: '12px'
},
subTitleColor: {
type: String,
default: '#999'
},
padding: {
type: [Boolean, String],
default: false
}
},
computed:{
_padding(){
if(typeof this.padding === 'string'){
return this.padding
}
return this.padding?'10px':''
}
},
watch: {
title(newVal) {
if (uni.report && newVal !== '') {
uni.report('title', newVal)
}
}
},
methods: {
onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss" >
$uni-primary: #2979ff !default;
.uni-section {
background-color: #fff;
.uni-section-header {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
padding: 12px 10px;
font-weight: normal;
&__decoration{
margin-right: 6px;
background-color: $uni-primary;
&.line {
width: 4px;
height: 12px;
border-radius: 10px;
}
&.circle {
width: 8px;
height: 8px;
border-top-right-radius: 50px;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
}
&.square {
width: 8px;
height: 8px;
}
}
&__content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
flex: 1;
color: #333;
.distraction {
flex-direction: row;
align-items: center;
}
&-sub {
margin-top: 2px;
}
}
&__slot-right{
font-size: 14px;
}
}
.uni-section-content{
font-size: 14px;
}
}
</style>

@ -0,0 +1,29 @@
// 应用全局配置
module.exports = {
// baseUrl: "http://39.101.188.84:9037",
TEST_LOGIN:"https://t-jn-development-manager.jsszkd.com/login", // ?clientId=
baseUrl: "https://t-jn-bjh-admin-server.jsszkd.com",
// 应用信息
appInfo: {
// 应用名称
name: "JiangNingUmale-App",
// 应用版本
version: "1.1.0",
// 应用logo
logo: "/static/logo.png",
// 官方网站
site_url: "http://ruoyi.vip",
// 政策协议
agreements: [
{
title: "隐私政策",
url: "https://ruoyi.vip/protocol.html",
},
{
title: "用户服务协议",
url: "https://ruoyi.vip/protocol.html",
},
],
},
};

@ -0,0 +1,30 @@
import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
// import './permission' // permission
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
// import Videojs from 'video.js'
// import 'video.js/dist/video-js.css'
// Vue.prototype.$video = Videojs
import 'mui-player/dist/mui-player.min.css'
import fixedButtom from '@/components/fixedButtom/fixedButtom.vue'
Vue.component('fixedButtom', fixedButtom)
Vue.use(plugins)
Vue.config.productionTip = false
Vue.prototype.$store = store
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()

@ -0,0 +1,119 @@
{
"name" : "江宁城管app",
"appid" : "__UNI__EE8CBC2",
"description" : "",
"versionName" : "1.1.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"statusbar" : {
"immersed" : false
},
"modules" : {
"Geolocation" : {}
},
"distribute" : {
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios" : {
"dSYMs" : false
},
"sdkConfigs" : {
"ad" : {},
"maps" : {
"amap" : {
"name" : "",
"appkey_ios" : "23a2faa38e7407639db125c7f2cbc571",
"appkey_android" : ""
}
},
"geolocation" : {
"amap" : {
"name" : "amapIryswz1c",
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "19574081fa49df82bdabebfe2146c118",
"appkey_android" : "23a2faa38e7407639db125c7f2cbc571"
}
}
},
"icons" : {
"android" : {
"hdpi" : "static/images/umale/logo2.png",
"xhdpi" : "static/images/umale/logo2.png",
"xxhdpi" : "static/images/umale/logo2.png",
"xxxhdpi" : "static/images/umale/logo2.png"
}
}
}
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wxceab52cfb9a87f72",
"setting" : {
"urlCheck" : false,
"es6" : false,
"minified" : true,
"postcss" : true
},
"optimization" : {
"subPackages" : true
},
"usingComponents" : true,
"permission" : {}
},
"vueVersion" : "2",
"h5" : {
"template" : "static/index.html",
"devServer" : {
"port" : 9090,
"https" : false
},
"title" : "RuoYi-App",
"router" : {
"mode" : "hash",
"base" : "./"
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "TYBBZ-A2AKV-MLZPW-UFNQI-HKNVE-BEFZH"
}
}
}
}
}

12429
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,63 +0,0 @@
{
"name": "JiangNingUmale-h5",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@vant/touch-emulator": "^1.2.0",
"axios": "^0.19.0",
"core-js": "^2.6.5",
"crypto-js": "^3.1.9-1",
"echarts": "^4.8.0",
"echarts-gl": "^1.1.1",
"highcharts": "^8.1.2",
"leaflet": "^1.5.1",
"moment": "^2.24.0",
"vant": "^2.0.3",
"vconsole": "^3.15.1",
"vue": "^2.6.10",
"vue-cropper": "^0.4.9",
"vue-router": "^3.0.3",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-service": "^3.8.0",
"@vue/eslint-config-standard": "^4.0.0",
"aes": "^0.1.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"@vue/prettier"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

@ -0,0 +1,452 @@
{
"pages": [
// {
// "path": "pages/login",
// "style": {
// "navigationBarTitleText": "首页",
// "navigationStyle": "custom"
// }
// },
// {
// "path": "pages/register",
// "style": {
// "navigationBarTitleText": "注册"
// }
// },
{
"path": "pages/index",
"style": {
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/msg/index",
"style": {
"navigationBarTitleText": "消息列表",
"navigationStyle": "custom"
}
},
{
"path": "pages/msg/index2",
"style": {
"navigationBarTitleText": "消息列表",
"navigationStyle": "custom"
}
},
{
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/mine/avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
},
{
"path": "pages/mine/info/index",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path": "pages/mine/info/edit",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "pages/mine/pwd/index",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/mine/setting/index",
"style": {
"navigationBarTitleText": "应用设置"
}
},
{
"path": "pages/mine/help/index",
"style": {
"navigationBarTitleText": "常见问题"
}
},
{
"path": "pages/mine/about/index",
"style": {
"navigationBarTitleText": "关于我们"
}
},
{
"path": "pages/common/webview/index",
"style": {
"navigationBarTitleText": "浏览网页"
}
},
{
"path": "pages/common/textview/index",
"style": {
"navigationBarTitleText": "浏览文本"
}
},
{
"path" : "pages/myLogin",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}
],
"subPackages": [
{
"root": "subcontract/work/",
"pages": [
{
"path": "videocenter/index",
"style": {
"navigationBarTitleText": "视频中心",
"navigationStyle": "custom"
}
},
{
"path": "videocenter/play",
"style": {
"navigationBarTitleText": "播放",
"navigationStyle": "custom"
}
},
{
"path": "event/index",
"style": {
"navigationBarTitleText": "事件管理",
"navigationStyle": "custom"
}
},
{
"path": "event/add",
"style": {
"navigationBarTitleText": "事件上报",
"navigationStyle": "custom"
}
},
{
"path": "event/deal",
"style": {
"navigationBarTitleText": "处理结果上报",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/deal",
"style": {
"navigationBarTitleText": "处理结果上报",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/exam",
"style": {
"navigationBarTitleText": "任务审核",
"navigationStyle": "custom"
}
},
{
"path": "attence/index",
"style": {
"navigationBarTitleText": "考勤打卡",
"navigationStyle": "custom"
}
},
{
"path": "attence/leaveappli",
"style": {
"navigationBarTitleText": "请假申请",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/index",
"style": {
"navigationBarTitleText": "任务管理",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/info",
"style": {
"navigationBarTitleText": "任务详情",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/infoexam",
"style": {
"navigationBarTitleText": "任务详情",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/back",
"style": {
"navigationBarTitleText": "任务详情",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/ledger",
"style": {
"navigationBarTitleText": "任务台账",
"navigationStyle": "custom"
}
},
{
"path": "taskmanage/create",
"style": {
"navigationBarTitleText": "任务创建",
"navigationStyle": "custom"
}
}
]
},
{
"root": "subcontract/mine/",
"pages": [
{
"path": "event/index"
},
{
"path": "ChangePassword/ChangePassword",
"style": {
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path": "ChangeProfile/ChangeProfile",
"style": {
"navigationBarTitleText": "修改头像",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "subViolation",
"pages": [
{
"path": "ViolationList/ViolationList",
"style": {
"navigationBarTitleText": "违停记录",
"enablePullDownRefresh": false
}
},
{
"path": "ViolationList/info",
"style": {
"navigationBarTitleText": "违章详情",
"enablePullDownRefresh": false
}
},
{
"path": "ViolationList/complaint",
"style": {
"navigationBarTitleText": "违章申诉",
"enablePullDownRefresh": false
}
},
{
"path": "TuogangList/TuogangList",
"style": {
"navigationBarTitleText": "脱岗记录",
"enablePullDownRefresh": false
}
},
{
"path": "TuogangList/info",
"style": {
"navigationBarTitleText": "脱岗详情",
"enablePullDownRefresh": false
}
},
{
"path": "TuogangList/complaint",
"style": {
"navigationBarTitleText": "脱岗申诉",
"enablePullDownRefresh": false
}
},
{
"path": "AddressBook/AddressBook",
"style": {
"navigationBarTitleText": "通讯录",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "ShengchanJiandu/ShengchanJiandu",
"style": {
"navigationBarTitleText": "安全生产监督",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/CodesInfo",
"style": {
"navigationBarTitleText": "店铺检查记录",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/FieldTest/FieldTest",
"style": {
"navigationBarTitleText": "现场检查记录",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/FieldTest/add",
"style": {
"navigationBarTitleText": "现场检查录入",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/WorkOrder/WorkOrder",
"style": {
"navigationBarTitleText": "整改工单",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/WorkOrder/info",
"style": {
"navigationBarTitleText": "整改复查",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/WorkOrder/postpone",
"style": {
"navigationBarTitleText": "申请延期",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/MsgIssue/MsgIssue",
"style": {
"navigationBarTitleText": "信息发布",
"enablePullDownRefresh": false
}
},
{
"path": "ShengchanJiandu/MsgIssue/add",
"style": {
"navigationBarTitleText": "新增信息",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "subPublic",
"pages": [
{
"path": "Store/Store",
"style": {
"navigationBarTitleText": "店铺详细信息",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "subEnterprise",
"pages": [
{
"path": "activity/activity",
"style": {
"navigationBarTitleText": "店铺活动管理",
"enablePullDownRefresh": false
}
},
{
"path": "activity/add",
"style": {
"navigationBarTitleText": "新增店铺活动",
"enablePullDownRefresh": false
}
},
{
"path": "threeGuarantees/index",
"style": {
"navigationBarTitleText": "三包等级凭证",
"enablePullDownRefresh": false
}
},
{
"path": "WorkOrder/WorkOrder",
"style": {
"navigationBarTitleText": "整改工单管理",
"enablePullDownRefresh": false
}
},
{
"path": "WorkOrder/handle",
"style": {
"navigationBarTitleText": "整改工单处理",
"enablePullDownRefresh": false
}
}
]
}
],
"preloadRule": {
"pages/index": {
"network": "all",
"packages": ["subcontract/work/"]
},
"pages/mine/index": {
"network": "all",
"packages": ["subcontract/mine/"]
}
},
"tabBar": {
"color": "#000000",
"selectedColor": "#000000",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home_.png",
"text": "首页"
},
{
"pagePath": "pages/msg/index2",
"iconPath": "static/images/tabbar/work.png",
"selectedIconPath": "static/images/tabbar/work_.png",
"text": "消息"
},
{
"pagePath": "pages/mine/index",
"iconPath": "static/images/tabbar/mine.png",
"selectedIconPath": "static/images/tabbar/mine_.png",
"text": "我的"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "RuoYi",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationStyle": "custom"
}
}

@ -0,0 +1,43 @@
<template>
<view>
<uni-card class="view-title" :title="title">
<text class="uni-body view-content">{{ content }}</text>
</uni-card>
</view>
</template>
<script>
export default {
data() {
return {
title: '',
content: ''
}
},
onLoad(options) {
this.title = options.title
this.content = options.content
uni.setNavigationBarTitle({
title: options.title
})
}
}
</script>
<style scoped>
page {
background-color: #ffffff;
}
.view-title {
font-weight: bold;
}
.view-content {
font-size: 26rpx;
padding: 12px 5px 0;
color: #333;
line-height: 24px;
font-weight: normal;
}
</style>

@ -0,0 +1,34 @@
<template>
<view v-if="params.url">
<web-view :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
params: {},
webviewStyles: {
progress: {
color: "#FF3333"
}
}
}
},
props: {
src: {
type: [String],
default: null
}
},
onLoad(event) {
this.params = event
if (event.title) {
uni.setNavigationBarTitle({
title: event.title
})
}
}
}
</script>

@ -0,0 +1,367 @@
<!--
* @Author: 张涛
* @Date: 2023-11-06 14:04:41
* @LastEditors: JC9527
* @LastEditTime: 2024-01-12 19:29:54
* @FilePath: \JiangNingUmale-App\pages\index.vue
-->
<template>
<view class="page">
<u-navbar title="首页" :placeholder="true" :isBack="false" :is-fixed='false' />
<view class="welcome">
<text class="title">欢迎登录城市精细化治理系统</text>
<text class="name">{{ userInfo ? userInfo.account : '' }}</text>
<view class="date-weather">
<text class="date"> {{ time ? time : "" }} </text>
<text class="weather"> 天气晴 </text>
</view>
</view>
<view class="main-content">
<view class="work-center">
<view v-for="(item, index) in grids" :key="index" @click="goPath(item)" style="position: relative">
<image :src="item.gridImg" mode="" class="grid-img"></image>
<text class="grid-name" :style="{ color: item.color }">{{ item.name }}
</text>
</view>
</view>
</view>
</view>
</template>
<script>
// import booleanPointInPolygon from '@turf/boolean-point-in-polygon';
// import { point, feature } from '@turf/helpers';
// import circle from '@turf/circle';
import { getUserIdByPoint } from "@/api/jn/login.js"
import { clock, getStatus, judgmentPosition } from "@/api/jn/clock.js"
import { listNews } from "@/api/jn/news";
// import chujie from "@/plugins/mapJson/chujie.json"
export default {
data() {
return {
grids: [
// {
// name: "",
// gridImg: "/static/images/umale/gr1.png",
// color: "#0D306B",
// subcolor: "#BE9085",
// disable: false,
// toPage: "/subcontract/work/videocenter/index",
// },
{
name: "事件管理",
gridImg: "/static/images/umale/gr2.png",
color: "#0D516B",
subcolor: "",
disable: false,
toPage: "/subcontract/work/event/index",
},
{
name: "考勤打卡",
gridImg: "/static/images/umale/gr3.png",
color: "#6B480D",
subcolor: "",
disable: false,
toPage: "/subcontract/work/attence/index",
},
{
name: "任务管理",
gridImg: "/static/images/umale/gr4.png",
color: "#154F06",
subcolor: "#C5A071",
disable: false,
toPage: "/subcontract/work/taskmanage/index",
},
{
name: "违停记录",
gridImg: "/static/images/umale/gr5.png",
color: "#0D516B",
subcolor: "#6E89B1",
disable: false,
toPage: "/subViolation/ViolationList/ViolationList",
},
{
name: "脱岗记录",
gridImg: "/static/images/umale/gr6.png",
color: "#6B0D0D",
subcolor: "",
disable: false,
toPage: "/subViolation/TuogangList/TuogangList",
},
// {
// name: "",
// gridImg: "/static/images/umale/gr7.png",
// color: "#025629",
// subcolor: "",
// disable: false,
// toPage: "/subViolation/AddressBook/AddressBook",
// },
// {
// name: "",
// gridImg: "/static/images/umale/gr8.png",
// color: "#0D306B",
// subcolor: "",
// disable: false,
// toPage: "/subViolation/ShengchanJiandu/ShengchanJiandu",
// },
// {
// name: "()",
// gridImg: "/static/images/umale/gr8.png",
// color: "#0D306B",
// subcolor: "",
// disable: false,
// toPage: "/subPublic/Store/Store",
// },
// {
// name: "()",
// gridImg: "/static/images/umale/gr8.png",
// color: "#0D306B",
// subcolor: "",
// disable: false,
// toPage: "/subEnterprise/threeGuarantees/index",
// },
{
name: "活动管理(企业)",
gridImg: "/static/images/umale/gr8.png",
color: "#0D306B",
subcolor: "",
disable: false,
toPage: "/subEnterprise/activity/activity",
},
// {
// name: "()",
// gridImg: "/static/images/umale/gr8.png",
// color: "#0D306B",
// subcolor: "",
// disable: false,
// toPage: "/subEnterprise/WorkOrder/WorkOrder",
// },
],
userInfo: null,
time: null,
lat:null,
lng:null,
circleLat:null,
circleLng:null,
circleClock:null,
times:null,
queryParams: {
pageNum: 1,
pageSize: 10,
title: "",
status: 0
},
};
},
// ...
onBackPress(options) {
console.log("返回",options);
if (options.from == 'backbutton' || options.from == 'navigateBack') {
//
uni.showModal({
title: '退出应用',
content: '您确定要退出应用吗?',
success: function(res) {
if (res.confirm) {
//
uni.exit();
} else if (res.cancel) {
//
}
}
});
return true; //
}
return false;
},
onLoad(){
// this.getCircle();
this.getUserLocation();
this.times = setInterval(()=>{
console.log("获取用户位置信息");
this.getUserLocation();
},10000)
},
mounted() {
this.userInfo = uni.getStorageSync("userInfo")
console.log(JSON.stringify(this.userInfo),"用户信息");
const currentDate = new Date();
const year = currentDate.getFullYear(); //
const month = currentDate.getMonth() + 1; // 01
const day = currentDate.getDate(); //
this.time = year + "年" + month + "月" + day + "日";
},
onShow() {
this.getNumber();
},
methods: {
getNumber(){
listNews({status: 0}).then((res) => {
if(res.code == 200) {
this.$nextTick(()=>{
uni.setTabBarBadge({
//
index: 1, //tabbar
text: res.total + '', //
});
})
}
})
},
goPath(item) {
this.$tab.navigateTo(item.toPage);
},
getUserLocation(){
let that = this;
uni.getLocation({
type: 'gcj02', //apigcj02
geocode :true,
success: function(res) {
that.$modal.closeLoading();
that.lat = res.latitude;
that.lng = res.longitude;
judgmentPosition({userId:that.userInfo.userId,latitude:res.latitude + '',longitude:res.longitude + ''}).then(position=>{
// console.log(position,"position");
if(position.code == 200 && position.data){
getStatus({userId:that.userInfo.userId}).then(status=>{
if(status.code == 200){
if(res.data.status == 0) {
let data = {userId:that.userInfo.userId,latitude:res.latitude + '',longitude:res.longitude + ''}
return clock(data)
}
}
}).then(daka=>{
if(data == 200) {
clearInterval(that.times)
}
})
}
}).catch(err=>{
console.log(err,"position失败");
if(err == "未设置考勤组") {
// clearInterval(that.times)
}
})
//
},
fail: function (err) {
console.log("获取定位失败",err);
uni.showToast({
title: '获取地址失败,将导致部分功能不可用',
icon:'none'
});
clearInterval(that.times)
}
});
},
// getCircle(){
// console.log(this.userInfo,"userInfo");
// getUserIdByPoint({id:this.userInfo.userId}).then(res=>{
// console.log(res,"");
// if(res.data.length > 0) {
// this.circleLat = res.data[0].lat;
// this.circleLng = res.data[0].lng;
// this.circleClock = res.data[0].clock;
// }
// })
// },
},
};
</script>
<style lang="scss">
.page {
background-color: #f6f7f8;
.welcome {
margin: 20rpx;
height: 281rpx;
background-size: 100%;
background-image: url("@/static/images/umale/intr.png");
background-repeat: no-repeat;
display: flex;
flex-direction: column;
padding-left: 31rpx;
padding-top: 45rpx;
.title {
font-size: 36rpx;
font-family: Source Han Sans CN;
color: #ffffff;
text-shadow: 0px 3rpx 6rpx rgba(0, 42, 128, 0.4);
}
.name {
margin-top: 40rpx;
font-size: 40rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #ffffff;
text-shadow: 0px 3rpx 6rpx rgba(0, 42, 128, 0.4);
}
.date-weather {
margin-top: 40rpx;
.date {
font-size: 24rpx;
font-family: Source Han Sans CN;
color: #f0f2f6;
text-shadow: 0px 3rpx 6rpx rgba(0, 42, 128, 0.4);
}
.weather {
margin-left: 50rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
color: #f0f2f6;
text-shadow: 0rpx 3rpx 6rpx rgba(0, 42, 128, 0.4);
}
}
}
.main-content {
position: relative;
.work-center {
// position: absolute;
// top: 10rpx;
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
display: flex;
flex-wrap: wrap;
&>view {
width: 48%;
height: 210rpx;
margin-bottom: 22rpx;
position: relative;
.grid-img {
height: 100%;
width: 100%;
display: block;
}
.grid-name {
position: absolute;
top: 27rpx;
left: 26rpx;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
}
}
&>view:nth-child(odd) {
margin-right: 4%;
}
}
}
}
</style>

@ -0,0 +1,309 @@
<template>
<!-- <view class="normal-login-container">
<view class="view-title">
<text class="title">你好欢迎登录</text>
</view>
<view class="logo-content align-center justify-center flex">
<image
style="width: 100rpx; height: 100rpx"
src="/static/images/umale/logo2.png"
mode="widthFix"
>
</image>
<text class="sutitle">城市精细化治理系统</text>
</view>
<view class="login-form-content">
<view class="input-item flex align-center">
<view class="iconfont icon-users icon"></view>
<input
v-model="loginForm.username"
class="input"
type="text"
placeholder="请输入账号"
maxlength="30"
placeholder-class="input-placeholder"
/>
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-passwords icon"></view>
<input
v-model="loginForm.password"
type="password"
class="input"
placeholder="请输入密码"
maxlength="20"
placeholder-class="input-placeholder"
/>
</view>
<view
class="input-item flex align-center"
style="width: 60%; margin: 0px"
v-if="captchaEnabled"
>
<view class="iconfont icon-code icon"></view>
<input
v-model="loginForm.code"
type="number"
class="input"
placeholder="请输入验证码"
maxlength="4"
/>
<view class="login-code">
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
</view>
<view class="action-btn">
<button
@click="handleLogin"
class="login-btn cu-btn block bg-blue lg round"
>
登录
</button>
</view>
</view>
</view> -->
<web-view :src="urlParams" ></web-view>
</template>
<script>
import { getCodeImg } from "@/api/login";
export default {
data() {
return {
codeUrl: "",
captchaEnabled: true,
//
register: false,
globalConfig: getApp().globalData.config,
loginForm: {
username: "admin",
password: "admin123",
code: "",
uuid: "",
},
urlParams: null,
};
},
created() {
// this.getCode();
},
methods: {
//
getRequestParams() {
let url = location.href;
let requestParams = {};
if (url.indexOf("?") !== -1) {
let str = url.substr(url.indexOf("?") + 1); //?
// console.log(str, '?');
let strs = str.split("&"); //&
// console.log(strs, '&');
for (let i = 0; i < strs.length; i++) {
requestParams[strs[i].split("=")[0]] = decodeURI(
strs[i].split("=")[1]
);
// '=''='
}
}
// console.log(requestParams, '');
return requestParams;
},
//
handleUserRegister() {
this.$tab.redirectTo(`/pages/register`);
},
//
handlePrivacy() {
let site = this.globalConfig.appInfo.agreements[0];
this.$tab.navigateTo(
`/pages/common/webview/index?title=${site.title}&url=${site.url}`
);
},
//
handleUserAgrement() {
let site = this.globalConfig.appInfo.agreements[1];
this.$tab.navigateTo(
`/pages/common/webview/index?title=${site.title}&url=${site.url}`
);
},
//
getCode() {
getCodeImg().then((res) => {
this.captchaEnabled =
res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
});
},
//
async handleLogin() {
if (this.loginForm.username === "") {
this.$modal.msgError("请输入您的账号");
} else if (this.loginForm.password === "") {
this.$modal.msgError("请输入您的密码");
} else if (this.loginForm.code === "" && this.captchaEnabled) {
this.$modal.msgError("请输入验证码");
} else {
this.$modal.loading("登录中,请耐心等待...");
this.pwdLogin();
}
},
//
async pwdLogin() {
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
this.$modal.closeLoading();
this.loginSuccess();
})
.catch(() => {
if (this.captchaEnabled) {
this.getCode();
}
});
},
//
loginSuccess(result) {
//
this.$store.dispatch("GetInfo").then((res) => {
this.$tab.reLaunch("/pages/index");
});
},
},
};
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.normal-login-container {
width: 100vw;
height: 100vh;
background-image: url("@/static/images/umale/login_bg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
background-position-x: 0rpx;
background-position-y: 0rpx;
padding-top: 256rpx;
.view-title {
margin-left: 45rpx;
.title {
font-size: 56rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #2e2f31;
letter-spacing: 4rpx;
}
}
.logo-content {
width: 100%;
font-size: 21px;
text-align: center;
padding-top: 15%;
image {
border-radius: 4px;
}
.sutitle {
margin-left: 10px;
font-size: 40rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #367bef;
letter-spacing: 4rpx;
}
}
.login-form-content {
text-align: center;
margin: 20px auto;
margin-top: 15%;
width: 80%;
.input-item {
margin: 20px auto;
height: 98rpx;
background: #ffffff;
border: 2rpx solid #dce3ec;
box-shadow: 0rpx 0rpx 20rpx rgba(57, 118, 241, 0.06);
opacity: 1;
border-radius: 49rpx;
.icon {
font-size: 38rpx;
margin-left: 36rpx;
color: #999;
}
.icon-users {
width: 36rpx;
height: 36rpx;
background-image: url("@/static/images/umale/user.png");
background-size: cover;
background-repeat: no-repeat;
}
.icon-passwords {
width: 36rpx;
height: 36rpx;
background-image: url("@/static/images/umale/pwd.png");
background-size: cover;
background-repeat: no-repeat;
}
.input {
width: 100%;
font-size: 36rpx;
line-height: 20px;
font-family: PingFang SC;
font-weight: 400;
letter-spacing: 4rpx;
text-align: left;
padding-left: 15px;
}
.input-placeholder {
color: #bcbcbc;
}
}
.login-btn {
margin-top: 40px;
height: 98rpx;
background: linear-gradient(180deg, #4787f3 0%, #1868ef 100%);
box-shadow: 0 14rpx 25rpx -10rpx rgba(57, 118, 241, 1);
border-radius: 49rpx;
}
.reg {
margin-top: 15px;
}
.xieyi {
color: #333;
margin-top: 20px;
}
.login-code {
height: 38px;
float: right;
.login-code-img {
height: 38px;
position: absolute;
margin-left: 10px;
width: 200rpx;
}
}
}
}
</style>

@ -0,0 +1,75 @@
<template>
<view class="about-container">
<view class="header-section text-center">
<image style="width: 150rpx;height: 150rpx;" src="/static/logo200.png" mode="widthFix">
</image>
<uni-title type="h2" title="若依移动端"></uni-title>
</view>
<view class="content-section">
<view class="menu-list">
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>版本信息</view>
<view class="text-right">v{{version}}</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>官方邮箱</view>
<view class="text-right">ruoyi@xx.com</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>服务热线</view>
<view class="text-right">400-999-9999</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>公司网站</view>
<view class="text-right">
<uni-link :href="url" :text="url" showUnderLine="false"></uni-link>
</view>
</view>
</view>
</view>
</view>
<view class="copyright">
<view>Copyright &copy; 2022 ruoyi.vip All Rights Reserved.</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
url: getApp().globalData.config.appInfo.site_url,
version: getApp().globalData.config.appInfo.version
}
}
}
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.copyright {
margin-top: 50rpx;
text-align: center;
line-height: 60rpx;
color: #999;
}
.header-section {
display: flex;
padding: 30rpx 0 0;
flex-direction: column;
align-items: center;
}
</style>

@ -0,0 +1,631 @@
<template>
<view class="container">
<view class="page-body uni-content-info">
<view class='cropper-content'>
<view v-if="isShowImg" class="uni-corpper" :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
<view class="uni-corpper-content" :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
<image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove" @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
:style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
<view class="uni-cropper-view-box">
<view class="uni-cropper-dashed-h"></view>
<view class="uni-cropper-dashed-v"></view>
<view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-tr" data-drag="topTight"></view>
<view class="uni-cropper-point point-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-rb" data-drag="rightBottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove" @touchend.stop="dragEnd"></view>
<view class="uni-cropper-point point-bl" data-drag="bottomLeft"></view>
<view class="uni-cropper-point point-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-lt" data-drag="leftTop"></view>
</view>
</view>
</view>
</view>
</view>
<view class='cropper-config'>
<button type="primary reverse" @click="getImage" style='margin-top: 30rpx;'> 选择头像 </button>
<button type="warn" @click="getImageInfo" style='margin-top: 30rpx;'> 提交 </button>
</view>
<canvas canvas-id="myCanvas" :style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
</view>
</view>
</template>
<script>
import config from '@/config'
import store from "@/store"
import { uploadAvatar } from "@/api/system/user"
const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync()
let SCREEN_WIDTH = sysInfo.screenWidth
let PAGE_X, // x
PAGE_Y, // y
PR = sysInfo.pixelRatio, // dpi
T_PAGE_X, // x
T_PAGE_Y, // Y
CUT_L, // left
CUT_T, // top
CUT_R, //
CUT_B, //
CUT_W, //
CUT_H, //
IMG_RATIO, //
IMG_REAL_W, //
IMG_REAL_H, //
DRAFG_MOVE_RATIO = 1, //,
INIT_DRAG_POSITION = 100, //
DRAW_IMAGE_W = sysInfo.screenWidth //
export default {
/**
* 页面的初始数据
*/
data() {
return {
imageSrc: store.getters.avatar,
isShowImg: false,
//
cropperInitW: SCREEN_WIDTH,
cropperInitH: SCREEN_WIDTH,
//
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH,
// left top
cropperL: 0,
cropperT: 0,
transL: 0,
transT: 0,
//
scaleP: 0,
imageW: 0,
imageH: 0,
//
cutL: 0,
cutT: 0,
cutB: SCREEN_WIDTH,
cutR: '100%',
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: DRAFG_MOVE_RATIO
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.loadImage()
},
methods: {
setData: function (obj) {
let that = this
Object.keys(obj).forEach(function (key) {
that.$set(that.$data, key, obj[key])
})
},
getImage: function () {
var _this = this
uni.chooseImage({
success: function (res) {
_this.setData({
imageSrc: res.tempFilePaths[0],
})
_this.loadImage()
},
})
},
loadImage: function () {
var _this = this
uni.getImageInfo({
src: _this.imageSrc,
success: function success(res) {
IMG_RATIO = 1 / 1
if (IMG_RATIO >= 1) {
IMG_REAL_W = SCREEN_WIDTH
IMG_REAL_H = SCREEN_WIDTH / IMG_RATIO
} else {
IMG_REAL_W = SCREEN_WIDTH * IMG_RATIO
IMG_REAL_H = SCREEN_WIDTH
}
let minRange = IMG_REAL_W > IMG_REAL_H ? IMG_REAL_W : IMG_REAL_H
INIT_DRAG_POSITION = minRange > INIT_DRAG_POSITION ? INIT_DRAG_POSITION : minRange
//
if (IMG_RATIO >= 1) {
let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO - INIT_DRAG_POSITION)) / 2)
let cutB = cutT
let cutL = Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH + INIT_DRAG_POSITION) / 2)
let cutR = cutL
_this.setData({
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH / IMG_RATIO,
// left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
//
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
} else {
let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) / 2)
let cutR = cutL
let cutT = Math.ceil((SCREEN_WIDTH - INIT_DRAG_POSITION) / 2)
let cutB = cutT
_this.setData({
cropperW: SCREEN_WIDTH * IMG_RATIO,
cropperH: SCREEN_WIDTH,
// left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
//
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
}
_this.setData({
isShowImg: true
})
uni.hideLoading()
}
})
},
// touchStart
contentStartMove(e) {
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
// touchMove
contentMoveing(e) {
var _this = this
var dragLengthX = (PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
//
if (dragLengthX > 0) {
if (this.cutL - dragLengthX < 0) dragLengthX = this.cutL
} else {
if (this.cutR + dragLengthX < 0) dragLengthX = -this.cutR
}
if (dragLengthY > 0) {
if (this.cutT - dragLengthY < 0) dragLengthY = this.cutT
} else {
if (this.cutB + dragLengthY < 0) dragLengthY = -this.cutB
}
this.setData({
cutL: this.cutL - dragLengthX,
cutT: this.cutT - dragLengthY,
cutR: this.cutR + dragLengthX,
cutB: this.cutB + dragLengthY
})
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
contentTouchEnd() {
},
//
getImageInfo() {
var _this = this
uni.showLoading({
title: '图片生成中...',
})
//
const ctx = uni.createCanvasContext('myCanvas')
ctx.drawImage(_this.imageSrc, 0, 0, IMG_REAL_W, IMG_REAL_H)
ctx.draw(true, () => {
// * canvasT = (_this.cutT / _this.cropperH) * (_this.imageH / pixelRatio)
var canvasW = ((_this.cropperW - _this.cutL - _this.cutR) / _this.cropperW) * IMG_REAL_W
var canvasH = ((_this.cropperH - _this.cutT - _this.cutB) / _this.cropperH) * IMG_REAL_H
var canvasL = (_this.cutL / _this.cropperW) * IMG_REAL_W
var canvasT = (_this.cutT / _this.cropperH) * IMG_REAL_H
uni.canvasToTempFilePath({
x: canvasL,
y: canvasT,
width: canvasW,
height: canvasH,
destWidth: canvasW,
destHeight: canvasH,
quality: 0.5,
canvasId: 'myCanvas',
success: function (res) {
uni.hideLoading()
let data = {name: 'avatarfile', filePath: res.tempFilePath}
uploadAvatar(data).then(response => {
store.commit('SET_AVATAR', baseUrl + response.imgUrl)
uni.showToast({ title: "修改成功", icon: 'success' })
uni.navigateBack()
})
}
})
})
},
// touchStart
dragStart(e) {
T_PAGE_X = e.touches[0].pageX
T_PAGE_Y = e.touches[0].pageY
CUT_L = this.cutL
CUT_R = this.cutR
CUT_B = this.cutB
CUT_T = this.cutT
},
// touchMove
dragMove(e) {
var _this = this
var dragType = e.target.dataset.drag
switch (dragType) {
case 'right':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_R + dragLength < 0) dragLength = -CUT_R
this.setData({
cutR: CUT_R + dragLength
})
break
case 'left':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_L - dragLength < 0) dragLength = CUT_L
if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this.cutR)
this.setData({
cutL: CUT_L - dragLength
})
break
case 'top':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_T - dragLength < 0) dragLength = CUT_T
if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this.cutB)
this.setData({
cutT: CUT_T - dragLength
})
break
case 'bottom':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLength < 0) dragLength = -CUT_B
this.setData({
cutB: CUT_B + dragLength
})
break
case 'rightBottom':
var dragLengthX = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLengthY < 0) dragLengthY = -CUT_B
if (CUT_R + dragLengthX < 0) dragLengthX = -CUT_R
let cutB = CUT_B + dragLengthY
let cutR = CUT_R + dragLengthX
this.setData({
cutB: cutB,
cutR: cutR
})
break
default:
break
}
}
}
}
</script>
<style>
/* pages/uni-cropper/index.wxss */
.uni-content-info {
/* position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
align-items: center;
flex-direction: column; */
}
.cropper-config {
padding: 20rpx 40rpx;
}
.cropper-content {
min-height: 750rpx;
width: 100%;
}
.uni-corpper {
position: relative;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
box-sizing: border-box;
}
.uni-corpper-content {
position: relative;
}
.uni-corpper-content image {
display: block;
width: 100%;
min-width: 0 !important;
max-width: none !important;
height: 100%;
min-height: 0 !important;
max-height: none !important;
image-orientation: 0deg !important;
margin: 0 auto;
}
/* 移动图片效果 */
.uni-cropper-drag-box {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: move;
background: rgba(0, 0, 0, 0.6);
z-index: 1;
}
/* 内部的信息 */
.uni-corpper-crop-box {
position: absolute;
background: rgba(255, 255, 255, 0.3);
z-index: 2;
}
.uni-corpper-crop-box .uni-cropper-view-box {
position: relative;
display: block;
width: 100%;
height: 100%;
overflow: visible;
outline: 1rpx solid #69f;
outline-color: rgba(102, 153, 255, .75)
}
/* 横向虚线 */
.uni-cropper-dashed-h {
position: absolute;
top: 33.33333333%;
left: 0;
width: 100%;
height: 33.33333333%;
border-top: 1rpx dashed rgba(255, 255, 255, 0.5);
border-bottom: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 纵向虚线 */
.uni-cropper-dashed-v {
position: absolute;
left: 33.33333333%;
top: 0;
width: 33.33333333%;
height: 100%;
border-left: 1rpx dashed rgba(255, 255, 255, 0.5);
border-right: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 四个方向的线 为了之后的拖动事件*/
.uni-cropper-line-t {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
top: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: n-resize;
}
.uni-cropper-line-t::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-r {
position: absolute;
display: block;
background-color: #69f;
top: 0;
right: 0rpx;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: e-resize;
}
.uni-cropper-line-r::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-line-b {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
bottom: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: s-resize;
}
.uni-cropper-line-b::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-l {
position: absolute;
display: block;
background-color: #69f;
top: 0;
left: 0;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: w-resize;
}
.uni-cropper-line-l::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-point {
width: 5rpx;
height: 5rpx;
background-color: #69f;
opacity: .75;
position: absolute;
z-index: 3;
}
.point-t {
top: -3rpx;
left: 50%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-tr {
top: -3rpx;
left: 100%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-r {
top: 50%;
left: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-rb {
left: 100%;
top: 100%;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
cursor: n-resize;
width: 36rpx;
height: 36rpx;
background-color: #69f;
position: absolute;
z-index: 1112;
opacity: 1;
}
.point-b {
left: 50%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-bl {
left: 0%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-l {
left: 0%;
top: 50%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-lt {
left: 0%;
top: 0%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
/* 裁剪框预览内容 */
.uni-cropper-viewer {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.uni-cropper-viewer image {
position: absolute;
z-index: 2;
}
</style>

@ -0,0 +1,112 @@
<template>
<view class="help-container">
<view v-for="(item, findex) in list" :key="findex" :title="item.title" class="list-title">
<view class="text-title">
<view :class="item.icon"></view>{{ item.title }}
</view>
<view class="childList">
<view v-for="(child, zindex) in item.childList" :key="zindex" class="question" hover-class="hover"
@click="handleText(child)">
<view class="text-item">{{ child.title }}</view>
<view class="line" v-if="zindex !== item.childList.length - 1"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
icon: 'iconfont icon-github',
title: '若依问题',
childList: [{
title: '若依开源吗?',
content: '开源'
}, {
title: '若依可以商用吗?',
content: '可以'
}, {
title: '若依官网地址多少?',
content: 'http://ruoyi.vip'
}, {
title: '若依文档地址多少?',
content: 'http://doc.ruoyi.vip'
}]
},
{
icon: 'iconfont icon-help',
title: '其他问题',
childList: [{
title: '如何退出登录?',
content: '请点击[我的] - [应用设置] - [退出登录]即可退出登录',
}, {
title: '如何修改用户头像?',
content: '请点击[我的] - [选择头像] - [点击提交]即可更换用户头像',
}, {
title: '如何修改登录密码?',
content: '请点击[我的] - [应用设置] - [修改密码]即可修改登录密码',
}]
}
]
}
},
methods: {
handleText(item) {
this.$tab.navigateTo(`/pages/common/textview/index?title=${item.title}&content=${item.content}`)
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #f8f8f8;
}
.help-container {
margin-bottom: 100rpx;
padding: 30rpx;
}
.list-title {
margin-bottom: 30rpx;
}
.childList {
background: #ffffff;
box-shadow: 0px 0px 10rpx rgba(193, 193, 193, 0.2);
border-radius: 16rpx;
margin-top: 10rpx;
}
.line {
width: 100%;
height: 1rpx;
background-color: #F5F5F5;
}
.text-title {
color: #303133;
font-size: 32rpx;
font-weight: bold;
margin-left: 10rpx;
.iconfont {
font-size: 16px;
margin-right: 10rpx;
}
}
.text-item {
font-size: 28rpx;
padding: 24rpx;
}
.question {
color: #606266;
font-size: 28rpx;
}
</style>

@ -0,0 +1,258 @@
<template>
<view class="mine-container">
<view class="mine-bg"></view>
<view class="mine-main" :style="{ top: statusBarHeight + 'px' }">
<view class="mine-name">我的</view>
<view class="user-cell">
<image
class="user-image"
src="/static/images/user-image.png"
mode="aspectFill"
@click="handleProfile()"
></image>
<view class="user-systeam">
<view class="user-isLogin">{{ userInfo ? userInfo.account : "登录/注册" }}</view>
<view class="user-hint">欢迎来到系统</view>
</view>
</view>
<view class="mine-cell-group">
<u-cell-group :border="false">
<u-cell icon="setting-fill" title="我的事件" :isLink="true" @click="myEvent">
<image
src="/static/images/cell1-mine.png"
mode="aspectFill"
slot="icon"
class="cell-icon"
>
</image>
</u-cell>
<u-cell icon="setting-fill" title="我的任务" :isLink="true" @click="myTask">
<image
src="/static/images/cell2-mine.png"
mode="aspectFill"
slot="icon"
class="cell-icon"
>
</image>
</u-cell>
<!-- <u-cell icon="setting-fill" title="我的考勤" :isLink="true">
<image
src="/static/images/cell3-mine.png"
mode="aspectFill"
slot="icon"
class="cell-icon"
>
</image>
</u-cell>
<u-cell icon="setting-fill" title="我的请假" :isLink="true">
<image
src="/static/images/cell4-mine.png"
mode="aspectFill"
slot="icon"
class="cell-icon"
>
</image>
</u-cell>
<u-cell
icon="setting-fill"
title="修改密码"
:isLink="true"
url="/subcontract/mine/ChangePassword/ChangePassword"
>
<image
src="/static/images/cell5-mine.png"
mode="aspectFill"
slot="icon"
class="cell-icon"
>
</image>
</u-cell> -->
<u-cell
:border="false"
icon="setting-fill"
title="检查更新"
:isLink="true"
value="版本1.0.1"
>
<image
src="/static/images/cell6-mine.png"
mode="aspectFill"
slot="icon"
class="cell-icon"
>
</image>
</u-cell>
</u-cell-group>
</view>
<u-button
@click="editCG"
class="view-global"
:text="userInfo ? '退出登录' : '前往登录'"
:color="userInfo ? 'linear-gradient(90deg, #EA3330 0%, #F8404C 100%)' : 'linear-gradient(90deg, #3976F1 0%, #3CA0F6 100%)'"
:customStyle="{
height: '88rpx',
borderRadius: '24rpx',
}"
></u-button>
</view>
</view>
</template>
<script>
import {
removeToken
} from '@/utils/auth'
import { listNews } from "@/api/jn/news";
export default {
data() {
return {
statusBarHeight: null,
userInfo:null,
};
},
onLoad() {
this.statusBarHeight = uni.$u.sys().statusBarHeight; //
},
mounted() {
this.userInfo = uni.getStorageSync("userInfo")
},
onShow() {
this.getNumber();
},
methods: {
getNumber(){
listNews({status: 0}).then((res) => {
if(res.code == 200) {
this.$nextTick(()=>{
uni.setTabBarBadge({
//
index: 1, //tabbar
text: res.total + '', //
});
})
}
})
},
//
handleProfile() {
uni.$u.route({
url: "/subcontract/mine/ChangeProfile/ChangeProfile",
});
},
// 退,
editCG(){
if(this.userInfo) {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
removeToken();
this.$tab.reLaunch("/pages/myLogin");
})
}
},
//
myEvent(){
uni.$u.route({
url: "/subcontract/mine/event/index",
});
},
//
myTask(){
uni.$u.route({
url: "/subcontract/mine/task/task",
});
}
},
};
</script>
<style lang="scss" scoped>
.mine-bg {
height: 380rpx;
width: 100%;
background: url("@/static/images/mineBg.png");
background-size: 100% 100%;
}
.mine-main {
position: fixed;
top: 0;
left: 0;
z-index: 10;
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
.mine-name {
height: 44px;
line-height: 44px;
font-size: 40rpx;
font-weight: bold;
color: #ffffff;
text-align: center;
letter-spacing: 2px;
margin-bottom: 130rpx;
}
.user-cell {
display: flex;
align-items: center;
box-sizing: border-box;
padding: 25rpx 45rpx;
background-color: #ffffff;
border-radius: 24rpx;
box-shadow: 0rpx 6rpx 20rpx rgba(57, 118, 241, 0.1);
.user-image {
height: 128rpx;
width: 128rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.user-isLogin {
font-size: 44rpx;
font-weight: bold;
color: #34373b;
}
.user-hint {
font-size: 28rpx;
font-weight: 400;
color: #aec1d9;
margin-top: 20rpx;
}
}
.mine-cell-group {
margin-top: 50rpx;
background: #ffffff;
box-shadow: 0rpx 6rpx 20rpx rgba(57, 118, 241, 0.1);
border-radius: 24rpx;
box-sizing: border-box;
padding: 0rpx 20rpx;
overflow: hidden;
margin-bottom: 39rpx;
}
}
.cell-icon {
display: inline-block;
height: 39rpx;
width: 37rpx;
margin-right: 25rpx;
}
/deep/.u-cell .u-cell__body {
padding: 30rpx 20rpx;
}
/deep/.u-cell__title .u-cell__title-text {
font-size: 34rpx;
font-weight: 500;
color: #34373b;
}
/deep/.u-cell__body .u-cell__value {
font-size: 28rpx;
font-weight: 400;
color: #616367;
}
</style>

@ -0,0 +1,127 @@
<template>
<view class="container">
<view class="example">
<uni-forms ref="form" :model="user" labelWidth="80px">
<uni-forms-item label="用户昵称" name="nickName">
<uni-easyinput v-model="user.nickName" placeholder="请输入昵称" />
</uni-forms-item>
<uni-forms-item label="手机号码" name="phonenumber">
<uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
</uni-forms-item>
<uni-forms-item label="邮箱" name="email">
<uni-easyinput v-model="user.email" placeholder="请输入邮箱" />
</uni-forms-item>
<uni-forms-item label="性别" name="sex" required>
<uni-data-checkbox v-model="user.sex" :localdata="sexs" />
</uni-forms-item>
</uni-forms>
<button type="primary" @click="submit"></button>
</view>
</view>
</template>
<script>
import { getUserProfile } from "@/api/system/user"
import { updateUserProfile } from "@/api/system/user"
export default {
data() {
return {
user: {
nickName: "",
phonenumber: "",
email: "",
sex: ""
},
sexs: [{
text: '男',
value: "0"
}, {
text: '女',
value: "1"
}],
rules: {
nickName: {
rules: [{
required: true,
errorMessage: '用户昵称不能为空'
}]
},
phonenumber: {
rules: [{
required: true,
errorMessage: '手机号码不能为空'
}, {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
errorMessage: '请输入正确的手机号码'
}]
},
email: {
rules: [{
required: true,
errorMessage: '邮箱地址不能为空'
}, {
format: 'email',
errorMessage: '请输入正确的邮箱地址'
}]
}
}
}
},
onLoad() {
this.getUser()
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data
})
},
submit(ref) {
this.$refs.form.validate().then(res => {
updateUserProfile(this.user).then(response => {
this.$modal.msgSuccess("修改成功")
})
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.example {
padding: 15px;
background-color: #fff;
}
.segmented-control {
margin-bottom: 15px;
}
.button-group {
margin-top: 15px;
display: flex;
justify-content: space-around;
}
.form-item {
display: flex;
align-items: center;
flex: 1;
}
.button {
display: flex;
align-items: center;
height: 35px;
line-height: 35px;
margin-left: 10px;
}
</style>

@ -0,0 +1,44 @@
<template>
<view class="container">
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.nickName" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.phonenumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" />
</uni-list>
</view>
</template>
<script>
import { getUserProfile } from "@/api/system/user"
export default {
data() {
return {
user: {},
roleGroup: "",
postGroup: ""
}
},
onLoad() {
this.getUser()
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data
this.roleGroup = response.roleGroup
this.postGroup = response.postGroup
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
</style>

@ -0,0 +1,85 @@
<template>
<view class="pwd-retrieve-container">
<uni-forms ref="form" :value="user" labelWidth="80px">
<uni-forms-item name="oldPassword" label="旧密码">
<uni-easyinput type="password" v-model="user.oldPassword" placeholder="请输入旧密码" />
</uni-forms-item>
<uni-forms-item name="newPassword" label="新密码">
<uni-easyinput type="password" v-model="user.newPassword" placeholder="请输入新密码" />
</uni-forms-item>
<uni-forms-item name="confirmPassword" label="确认密码">
<uni-easyinput type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
</uni-forms-item>
<button type="primary" @click="submit"></button>
</uni-forms>
</view>
</template>
<script>
import { updateUserPwd } from "@/api/system/user"
export default {
data() {
return {
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
},
rules: {
oldPassword: {
rules: [{
required: true,
errorMessage: '旧密码不能为空'
}]
},
newPassword: {
rules: [{
required: true,
errorMessage: '新密码不能为空',
},
{
minLength: 6,
maxLength: 20,
errorMessage: '长度在 6 到 20 个字符'
}
]
},
confirmPassword: {
rules: [{
required: true,
errorMessage: '确认密码不能为空'
}, {
validateFunction: (rule, value, data) => data.newPassword === value,
errorMessage: '两次输入的密码不一致'
}
]
}
}
}
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
submit() {
this.$refs.form.validate().then(res => {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
this.$modal.msgSuccess("修改成功")
})
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.pwd-retrieve-container {
padding-top: 36rpx;
padding: 15px;
}
</style>

@ -0,0 +1,78 @@
<template>
<view class="setting-container" :style="{height: `${windowHeight}px`}">
<view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToPwd">
<view class="menu-item-box">
<view class="iconfont icon-password menu-icon"></view>
<view>修改密码</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToUpgrade">
<view class="menu-item-box">
<view class="iconfont icon-refresh menu-icon"></view>
<view>检查更新</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleCleanTmp">
<view class="menu-item-box">
<view class="iconfont icon-clean menu-icon"></view>
<view>清理缓存</view>
</view>
</view>
</view>
<view class="cu-list menu">
<view class="cu-item item-box">
<view class="content text-center" @click="handleLogout">
<text class="text-black">退出登录</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
windowHeight: uni.getSystemInfoSync().windowHeight
}
},
methods: {
handleToPwd() {
this.$tab.navigateTo('/pages/mine/pwd/index')
},
handleToUpgrade() {
this.$modal.showToast('模块建设中~')
},
handleCleanTmp() {
this.$modal.showToast('模块建设中~')
},
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$tab.reLaunch('/pages/index')
})
})
}
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #f8f8f8;
}
.item-box {
background-color: #FFFFFF;
margin: 30rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10rpx;
border-radius: 8rpx;
color: #303133;
font-size: 32rpx;
}
</style>

@ -0,0 +1,135 @@
<template>
<view class="app-container">
<u-navbar title="消息列表" :autoBack="true" :placeholder="true" leftIcon="">
<view slot="right">
<text class="nav-right">全部清空</text>
</view>
</u-navbar>
<u-search
height="75rpx"
placeholder="搜索关键词"
v-model="keyword"
shape="square"
:showAction="false"
class="view-global"
bgColor="#fff"
></u-search>
<view class="msg-list">
<view class="msg-item view-global">
<view class="msg-icon" style="background-color: #367bef">
<u-badge
bgColor="#FE3434"
max="99"
value="9"
:absolute="true"
:offset="[0, 0]"
></u-badge>
<image src="/static/images/msg3.png" mode="aspectFill"></image>
</view>
<view class="msg-middle">
<view class="middle-main">执法二队-李小强</view>
<view class="middle-sub">这是一条普通的消息详情</view>
</view>
<view class="msg-date">19:18</view>
</view>
<view class="msg-item view-global">
<view class="msg-icon" style="background-color: #32b78b">
<u-badge
bgColor="#FE3434"
max="99"
value="99"
:absolute="true"
:offset="[0, 0]"
></u-badge>
<image src="/static/images/msg2.png" mode="aspectFill"></image>
</view>
<view class="msg-middle">
<view class="middle-main">消息通知</view>
<view class="middle-sub">这是一条普通的消息详情</view>
</view>
<view class="msg-date">19:18</view>
</view>
<view class="msg-item view-global">
<view class="msg-icon" style="background-color: #f08941">
<u-badge
bgColor="#FE3434"
max="99"
value="0"
:absolute="true"
:offset="[0, 0]"
></u-badge>
<image src="/static/images/msg1.png" mode="aspectFill"></image>
</view>
<view class="msg-middle">
<view class="middle-main">告警消息</view>
<view class="middle-sub">这是一条普通的消息详情</view>
</view>
<view class="msg-date">19:18</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
keyword: "",
};
},
onLoad() {},
};
</script>
<style lang="scss" scoped>
.msg-list {
.msg-item {
display: flex;
align-items: center;
background-color: #fff;
border-radius: 16rpx;
margin-top: 30rpx;
box-sizing: border-box;
padding: 20rpx;
.msg-icon {
position: relative;
height: 94rpx;
width: 94rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
image {
height: 44rpx;
width: 44rpx;
}
}
.msg-middle {
flex: 1;
box-sizing: border-box;
padding-left: 20rpx;
.middle-main {
font-size: 32rpx;
font-weight: bold;
color: #2e2f31;
}
.middle-sub {
margin-top: 12rpx;
font-size: 28rpx;
font-weight: 400;
color: #616367;
}
}
.msg-date {
font-size: 24rpx;
font-weight: 400;
color: #9da2ab;
}
}
}
</style>

@ -0,0 +1,196 @@
<template>
<view class="app-container">
<u-navbar title="消息列表" :autoBack="true" :placeholder="true" leftIcon="">
<view slot="right" @click="onAllclear">
<text class="nav-right">全部清空</text>
</view>
</u-navbar>
<u-search
height="75rpx"
placeholder="搜索关键词"
v-model="queryParams.title"
shape="square"
:showAction="false"
:clearabled="true"
class="view-global"
bgColor="#fff"
@search="onSearch"
@clear="onClear"
></u-search>
<view class="msg-list">
<view
class="msg-item view-global"
v-for="(item, index) in listMsgs"
:key="index"
>
<view class="msg-icon" style="background-color: #367bef">
<!-- value="9" -->
<u-badge
bgColor="#FE3434"
max="99"
:absolute="true"
:offset="[0, 0]"
></u-badge>
<image src="/static/images/msg3.png" mode="aspectFill"></image>
</view>
<view class="msg-middle">
<view class="middle-main">{{ item.title }}</view>
<view class="middle-sub">{{ item.content }}</view>
</view>
<view class="msg-date">{{ item.createTime }}</view>
</view>
<!-- <view class="msg-item view-global">
<view class="msg-icon" style="background-color: #32b78b">
<u-badge
bgColor="#FE3434"
max="99"
value="99"
:absolute="true"
:offset="[0, 0]"
></u-badge>
<image src="/static/images/msg2.png" mode="aspectFill"></image>
</view>
<view class="msg-middle">
<view class="middle-main">消息通知</view>
<view class="middle-sub">这是一条普通的消息详情</view>
</view>
<view class="msg-date">19:18</view>
</view>
<view class="msg-item view-global">
<view class="msg-icon" style="background-color: #f08941">
<u-badge
bgColor="#FE3434"
max="99"
value="0"
:absolute="true"
:offset="[0, 0]"
></u-badge>
<image src="/static/images/msg1.png" mode="aspectFill"></image>
</view>
<view class="msg-middle">
<view class="middle-main">告警消息</view>
<view class="middle-sub">这是一条普通的消息详情</view>
</view>
<view class="msg-date">19:18</view>
</view> -->
</view>
</view>
</template>
<script>
import { listNews, delNews } from "../../api/jn/news";
export default {
data() {
return {
listMsgs: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
title: "",
status: 0
},
};
},
onLoad() {
},
onShow() {
this.ListMsg();
},
methods: {
onAllclear() {
this.$modal.confirm('确定删除所有消息吗?').then(() => {
let ids = [];
this.listMsgs.forEach(element => {
ids.push(element.id);
});
if(ids.length == 0) {
return;
} else {
delNews(ids).then((res) => {
console.log(JSON.stringify(res),"删除接口");
if(res.code == 200) {
this.ListMsg();
}
});
}
})
},
onSearch() {
this.ListMsg();
},
onClear() {
this.queryParams.title = "";
this.ListMsg();
},
ListMsg() {
listNews(this.queryParams).then((res) => {
// console.log(res);
this.listMsgs = res.rows;
if(res.code == 200) {
uni.setTabBarBadge({
//
index: 1, //tabbar
text: res.total + '', //
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.msg-list {
.msg-item {
display: flex;
align-items: center;
background-color: #fff;
border-radius: 16rpx;
margin-top: 30rpx;
box-sizing: border-box;
padding: 20rpx;
.msg-icon {
position: relative;
height: 94rpx;
width: 94rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
image {
height: 44rpx;
width: 44rpx;
}
}
.msg-middle {
flex: 1;
box-sizing: border-box;
padding-left: 20rpx;
.middle-main {
font-size: 32rpx;
font-weight: bold;
color: #2e2f31;
}
.middle-sub {
margin-top: 12rpx;
font-size: 28rpx;
font-weight: 400;
color: #616367;
}
}
.msg-date {
font-size: 24rpx;
font-weight: 400;
color: #9da2ab;
}
}
}
</style>

@ -0,0 +1,88 @@
<template>
<view class="content">
<view class="param">{{ param }}</view>
</view>
</template>
<script>
import { getToken, setToken, removeToken } from "@/utils/auth";
import { getSqByaccesstoken, getUserinfo } from "@/api/jn/login.js";
export default {
data() {
return {
style: {
"padding-top": 0,
},
statusBarHeight: 0,
isApp: true,
webview: null,
param: "",
};
},
created() {},
mounted() {},
onLoad(options) {
let _this = this;
// #ifdef APP-PLUS
let curwebview = this.$mp.page.$getAppWebview();
this.webview = plus.webview.open(
"https://t-jn-development-manager.jsszkd.com/login?clientId=641775453324",
""
);
curwebview.append(this.webview);
this.webview.show();
this.webview.overrideUrlLoading({ mode: "reject" }, (e) => {
//,!url,.OK.json
console.warn("参数为:" + e.url);
// http://39.101.188.84:9999/demo/JiangNingUmale-App/#/?code=ckyb2r&clientId=641775453324&token=pygHmfvDNt4YxbucxXiIm0dN8d0IuLmd
// URL
var url = e.url;
console.warn("1:" + url);
//
var code = _this.getQueryString("code", url);
var clientId = _this.getQueryString("clientId", url);
var token = _this.getQueryString("token", url);
console.warn("code:" + _this.getQueryString("code", url));
console.warn("clientId:" + _this.getQueryString("clientId", url));
console.warn("token:" + _this.getQueryString("token", url));
if (token) {
uni.setStorageSync("token", token);
getSqByaccesstoken({ code: code,}).then((res) => {
// console.log("accessToken");
uni.setStorageSync("accessToken", res.data.accessToken);
return getUserinfo({accessToken: res.data.accessToken});
}).then((el) => {
this.$tab.switchTab("/pages/index");
uni.setStorageSync("userInfo", el.data);
setToken(el.data.token);
// location.reload();
console.log("用户信息", el);
});
}
});
// #endif
},
methods: {
getQueryString(name, url) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
const lastIndex = url.lastIndexOf("/");
const result = url.substring(lastIndex + 1);
const newUrl = result.replace(/\?/g, "&");
let r = newUrl.match(reg);
// console.log(r);
if (r != null) {
return decodeURIComponent(r[2]);
}
return null;
},
},
};
</script>
<style lang="less">
.content {
text-align: center;
}
</style>

@ -0,0 +1,196 @@
<template>
<view class="normal-login-container">
<view class="logo-content align-center justify-center flex">
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
</image>
<text class="title">若依移动端注册</text>
</view>
<view class="login-form-content">
<view class="input-item flex align-center">
<view class="iconfont icon-user icon"></view>
<input v-model="registerForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input v-model="registerForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input v-model="registerForm.confirmPassword" type="password" class="input" placeholder="请输入重复密码" maxlength="20" />
</view>
<view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input v-model="registerForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<view class="login-code">
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
</view>
<view class="action-btn">
<button @click="handleRegister()" class="register-btn cu-btn block bg-blue lg round">注册</button>
</view>
</view>
<view class="xieyi text-center">
<text @click="handleUserLogin" class="text-blue">使用已有账号登录</text>
</view>
</view>
</template>
<script>
import { getCodeImg, register } from '@/api/login'
export default {
data() {
return {
codeUrl: "",
captchaEnabled: true,
globalConfig: getApp().globalData.config,
registerForm: {
username: "",
password: "",
confirmPassword: "",
code: "",
uuid: ''
}
}
},
created() {
this.getCode()
},
methods: {
//
handleUserLogin() {
this.$tab.navigateTo(`/pages/login`)
},
//
getCode() {
getCodeImg().then(res => {
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.img
this.registerForm.uuid = res.uuid
}
})
},
//
async handleRegister() {
if (this.registerForm.username === "") {
this.$modal.msgError("请输入您的账号")
} else if (this.registerForm.password === "") {
this.$modal.msgError("请输入您的密码")
} else if (this.registerForm.confirmPassword === "") {
this.$modal.msgError("请再次输入您的密码")
} else if (this.registerForm.password !== this.registerForm.confirmPassword) {
this.$modal.msgError("两次输入的密码不一致")
} else if (this.registerForm.code === "" && this.captchaEnabled) {
this.$modal.msgError("请输入验证码")
} else {
this.$modal.loading("注册中,请耐心等待...")
this.register()
}
},
//
async register() {
register(this.registerForm).then(res => {
this.$modal.closeLoading()
uni.showModal({
title: "系统提示",
content: "恭喜你,您的账号 " + this.registerForm.username + " 注册成功!",
success: function (res) {
if (res.confirm) {
uni.redirectTo({ url: `/pages/login` });
}
}
})
}).catch(() => {
if (this.captchaEnabled) {
this.getCode()
}
})
},
//
registerSuccess(result) {
//
this.$store.dispatch('GetInfo').then(res => {
this.$tab.reLaunch('/pages/index')
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.normal-login-container {
width: 100%;
.logo-content {
width: 100%;
font-size: 21px;
text-align: center;
padding-top: 15%;
image {
border-radius: 4px;
}
.title {
margin-left: 10px;
}
}
.login-form-content {
text-align: center;
margin: 20px auto;
margin-top: 15%;
width: 80%;
.input-item {
margin: 20px auto;
background-color: #f5f6f7;
height: 45px;
border-radius: 20px;
.icon {
font-size: 38rpx;
margin-left: 10px;
color: #999;
}
.input {
width: 100%;
font-size: 14px;
line-height: 20px;
text-align: left;
padding-left: 15px;
}
}
.register-btn {
margin-top: 40px;
height: 45px;
}
.xieyi {
color: #333;
margin-top: 20px;
}
.login-code {
height: 38px;
float: right;
.login-code-img {
height: 38px;
position: absolute;
margin-left: 10px;
width: 200rpx;
}
}
}
}
</style>

@ -0,0 +1,39 @@
import { getToken, setToken, removeToken } from '@/utils/auth'
// 登录页面
const loginPage = "/pages/myLogin"
// 页面白名单
const whiteList = [
'/pages/myLogin', '/pages/index', '/pages/login', '/pages/register', '/pages/common/webview/index'
]
// 检查地址白名单
function checkWhite(url) {
const path = url.split('?')[0]
return whiteList.indexOf(path) !== -1
}
// 页面跳转验证拦截器
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
list.forEach(item => {
uni.addInterceptor(item, {
invoke(to) {
console.log(to,"去往的页面");
if (getToken()) {
if (to.url === loginPage) {
uni.reLaunch({ url: "/" })
}
return true
} else {
if (checkWhite(to.url)) {
return true
}
uni.reLaunch({ url: loginPage })
return false
}
},
fail(err) {
console.log(err)
}
})
})

@ -0,0 +1,60 @@
import store from '@/store'
function authPermission(permission) {
const all_permission = "*:*:*"
const permissions = store.getters && store.getters.permissions
if (permission && permission.length > 0) {
return permissions.some(v => {
return all_permission === v || v === permission
})
} else {
return false
}
}
function authRole(role) {
const super_admin = "admin"
const roles = store.getters && store.getters.roles
if (role && role.length > 0) {
return roles.some(v => {
return super_admin === v || v === role
})
} else {
return false
}
}
export default {
// 验证用户是否具备某权限
hasPermi(permission) {
return authPermission(permission)
},
// 验证用户是否含有指定权限,只需包含其中一个
hasPermiOr(permissions) {
return permissions.some(item => {
return authPermission(item)
})
},
// 验证用户是否含有指定权限,必须全部拥有
hasPermiAnd(permissions) {
return permissions.every(item => {
return authPermission(item)
})
},
// 验证用户是否具备某角色
hasRole(role) {
return authRole(role)
},
// 验证用户是否含有指定角色,只需包含其中一个
hasRoleOr(roles) {
return roles.some(item => {
return authRole(item)
})
},
// 验证用户是否含有指定角色,必须全部拥有
hasRoleAnd(roles) {
return roles.every(item => {
return authRole(item)
})
}
}

@ -0,0 +1,14 @@
import tab from './tab'
import auth from './auth'
import modal from './modal'
export default {
install(Vue) {
// 页签操作
Vue.prototype.$tab = tab
// 认证对象
Vue.prototype.$auth = auth
// 模态框对象
Vue.prototype.$modal = modal
}
}

@ -0,0 +1,34 @@
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
120.73261373376607,
31.25073977461639
],
[
120.74078042393268,
31.25402113805667
],
[
120.74372043239208,
31.246387719524122
],
[
120.73541763072382,
31.244013786751168
],
[
120.73261373376607,
31.25073977461639
],
[
120.7328587344706,
31.250832864512475
]
],
"type": "LineString"
}
}
}

@ -0,0 +1,34 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
120.72749571970576,
31.258029375430894
],
[
120.73064263167993,
31.253765297491498
],
[
120.73807247779501,
31.256410834495384
],
[
120.7349777967234,
31.260395743950383
],
[
120.72746960425354,
31.258029375430894
]
],
"type": "LineString"
}
}
]
}

@ -0,0 +1,74 @@
export default {
// 消息提示
msg(content) {
uni.showToast({
title: content,
icon: 'none'
})
},
// 错误消息
msgError(content) {
uni.showToast({
title: content,
icon: 'error'
})
},
// 成功消息
msgSuccess(content) {
uni.showToast({
title: content,
icon: 'success'
})
},
// 隐藏消息
hideMsg(content) {
uni.hideToast()
},
// 弹出提示
alert(content, title) {
uni.showModal({
title: title || '系统提示',
content: content,
showCancel: false
})
},
// 确认窗体
confirm(content, title) {
return new Promise((resolve, reject) => {
uni.showModal({
title: title || '系统提示',
content: content,
cancelText: '取消',
confirmText: '确定',
success: function(res) {
if (res.confirm) {
resolve(res.confirm)
}
}
})
})
},
// 提示信息
showToast(option) {
if (typeof option === "object") {
uni.showToast(option)
} else {
uni.showToast({
title: option,
icon: "none",
duration: 2500
})
}
},
// 打开遮罩层
loading(content) {
uni.showLoading({
title: content,
icon: 'none'
})
},
// 关闭遮罩层
closeLoading() {
uni.hideLoading()
}
}

@ -0,0 +1,30 @@
export default {
// 关闭所有页面,打开到应用内的某个页面
reLaunch(url) {
return uni.reLaunch({
url: url
})
},
// 跳转到tabBar页面并关闭其他所有非tabBar页面
switchTab(url) {
return uni.switchTab({
url: url
})
},
// 关闭当前页面,跳转到应用内的某个页面
redirectTo(url) {
return uni.redirectTo({
url: url
})
},
// 保留当前页面,跳转到应用内的某个页面
navigateTo(url) {
return uni.navigateTo({
url: url
})
},
// 关闭当前页面,返回上一页面或多级页面
navigateBack() {
return uni.navigateBack()
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

@ -1,34 +0,0 @@
<!--
* @Author: 付刚
* @Date: 2020-12-15 09:41:19
* @LastEditors: 付刚
* @LastEditTime: 2021-07-23 16:52:44
* @FilePath: \LujiachangfangPhone\public\index.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=no,viewport-fit=cover"
/>
<meta name="flexible" content="initial-dpr=2" />
<link rel="icon" href="<%= BASE_URL %>logo.png" />
<title>H5移动端</title>
</head>
<body>
<noscript>
<strong>
We're sorry but yuanlintreeapp doesn't work properly without JavaScript
enabled. Please enable it to continue.
</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

@ -1,62 +0,0 @@
<!--
* @Description:
* @Author: Fugang
* @Date: 2019-07-04 15:46:28
* @LastEditors: 付刚
* @LastEditTime: 2021-07-22 14:28:53
-->
<template>
<div id="app">
<div
class="status-bar"
:style="{ height: config.barHeight + 'px', backgroundColor: bac }"
></div>
<router-view />
</div>
</template>
<script>
export default {
data() {
return {
bac: 'transparent',
h: 20,
}
},
created() {
let _this = this
},
mounted() {
// rempx/36
var offWidth = window.screen.width / 30
document.getElementsByTagName('html')[0].style.fontSize = offWidth + 'px'
},
watch: {
$route(val) {
//
window.scroll(0, 0)
},
},
}
</script>
<style lang="scss">
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
user-select: none;
}
body {
background-color: #f2f2f2;
}
.status-bar {
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
background-color: #050505;
}
</style>

@ -1,18 +0,0 @@
/*
* @Author: 付刚
* @Date: 2020-12-15 09:41:19
* @LastEditors: 付刚
* @LastEditTime: 2021-07-22 11:37:15
* @FilePath: \LujiachangfangPhone\src\api\gisData.js
*/
import { request } from '@/api/gisRequest.js'
// 获取宗地数据
export function getLand(params) {
return request.get('land/', { params: params })
}
// 获取指定id宗地数据
export function getLandById(id) {
return request.get('land/' + id)
}

@ -1,61 +0,0 @@
/*
* @Description: 接口封装
* @Author: Fugang
* @Date: 2019-07-23 15:58:50
* @LastEditors: Fugang
* @LastEditTime: 2019-10-14 16:02:32
*/
import axios from 'axios'
import { Toast } from 'vant'
// 实例化axios
const request = axios.create({
baseURL: process.env.VUE_APP_HOST_GIS,
timeout: 50000
})
// request--请求 拦截器
request.interceptors.request.use(
config => {
// POST和PUT的请求参数转为formData
if (config.method === 'post' || config.method === 'put') {
config.headers['Content-Type'] = 'multipart/form-data'
let params = config.data
const formData = new FormData()
Object.keys(params).forEach(key => {
formData.append(key, params[key])
})
config.data = formData
}
return config
},
error => {
Promise.reject(error)
}
)
// response--响应 拦截器
request.interceptors.response.use(
response => {
// 系统返回状态判断
if (response.data.status !== 200) {
Toast({ message: response.data.message, position: 'bottom' })
return Promise.reject(response.data)
}
// 以下是正确的数据判断
return response.data
},
error => {
Toast({
message: error.response
? error.response.data.message
: '网络异常,请稍后重试',
position: 'bottom'
})
return Promise.reject(error)
}
)
export { request }

@ -1,123 +0,0 @@
import { request } from '@/api/propertyRequest.js'
// 登录获取token
export function login(data) {
return request.post('secret/token', data)
}
// 根据条件查询宗地列表
export function getmapparcellist(params) {
// return request.get('mapdata/getmapparcellist', { params: params })
return request.get('mapdata/getmapparcelshortlist', { params: params })
}
// 根据宗地id查询宗地详情
export function getparcel(id) {
return request.get('parcel/' + id)
}
// 获取宗地下的所有企业(房东+租客)统计(新增的方法)
export function getparcelallyearbusiness(id) {
return request.get('parcel/getparcelallyearbusiness?parcelID=' + id)
}
// 根据宗地编号查询宗地详情
export function getparcelbycode(params) {
return request.get('parcel/getparcelbycode', { params: params })
}
// 根据企业编号查询企业详情
export function getenterprisebyid(id) {
return request.get('enterprise/' + id)
}
// 获取厂房信息和楼幢,楼层列表信息,包括总面积和使用面积(根据楼层填报的界面合计)
export function getfactory(id) {
return request.get('factory/getfactory/' + id)
}
// 获取关联ID的附件集合
export function getattachmentimg(id) {
return request.get('attachment/getattachmentimg/' + id)
}
// 大数据分析
// 历年总税收变化(年份) 历年总销售额变化(年份)
export function getreport1() {
return request.get('parcel/getreport1')
}
// 厂房租赁情况(空闲、自用、租赁)
export function getreport2() {
return request.get('parcel/getreport2')
}
// 厂房总数
export function getreport3() {
return request.get('parcel/getreport3')
}
// 闲置厂房总数
export function getreport4() {
return request.get('parcel/getreport4')
}
// 租客企业总数
export function getreport5() {
return request.get('parcel/getreport5')
}
// 总销售额
export function getreport6() {
return request.get('parcel/getreport6')
}
// 总税收
export function getreport7() {
return request.get('parcel/getreport7')
}
// 亩均税收
export function getreport8() {
return request.get('parcel/getreport8')
}
// 租赁总面积
export function getreport9() {
return request.get('parcel/getreport9')
}
// 闲置面积
export function getreport10() {
return request.get('parcel/getreport10')
}
// 空置率
export function getreport11() {
return request.get('parcel/getreport11')
}
// 去年厂房税收TOP10
export function getreport12() {
return request.get('parcel/getreport12')
}
// 去年租客税收TOP10
export function getreport13() {
return request.get('parcel/getreport13')
}
// 租客产业分类
export function getreport14() {
return request.get('parcel/getreport14')
}
// 宗地总面积
export function getreport15() {
return request.get('parcel/getreport15')
}
// 亩均销售
export function getreport16() {
return request.get('parcel/getreport16')
}

@ -1,70 +0,0 @@
/*
* @Description: 接口封装
* @Author: Fugang
* @Date: 2019-07-23 15:58:50
* @LastEditors: 付刚
* @LastEditTime: 2021-07-22 11:36:56
*/
import axios from 'axios'
import { Toast } from 'vant'
import router from '../router'
// 实例化axios
const request = axios.create({
baseURL: process.env.VUE_APP_HOST_PROPERTY,
timeout: 50000
})
// request--请求 拦截器
request.interceptors.request.use(
config => {
if (config.url !== 'secret/token') {
let token = localStorage.getItem('lj_token')
let authToken = 'Bearer ' + token
config.headers['Authorization'] = authToken
}
// POST和PUT的请求参数转为formData
if (config.method === 'post' || config.method === 'put') {
config.headers['Content-Type'] = 'multipart/form-data'
let params = config.data
const formData = new FormData()
Object.keys(params).forEach(key => {
formData.append(key, params[key])
})
config.data = formData
}
return config
},
error => {
Promise.reject(error)
}
)
// response--响应 拦截器
request.interceptors.response.use(
response => {
// 系统返回状态判断
if (response.data.code !== 200) {
Toast({
message: response.data.message,
position: 'bottom'
})
router.replace('/')
return Promise.reject(response.data)
}
// 以下是正确的数据判断
return response.data
},
error => {
Toast({
message: '网络异常,请重新登录',
position: 'bottom'
})
router.replace('/')
return Promise.reject(error)
}
)
export { request }

@ -1,92 +0,0 @@
/* 字体 */
@font-face {
font-family: 'PuHuiTi-Bold';
src: url('../font/Alibaba-PuHuiTi-Bold.otf');
}
@font-face {
font-family: 'PuHuiTi-Medium';
src: url('../font/Alibaba-PuHuiTi-Medium.otf');
}
@font-face {
font-family: 'PuHuiTi-Regular';
src: url('../font/Alibaba-PuHuiTi-Regular.otf');
}
@font-face {
font-family: 'ROBOTO-BOLD';
src: url('../font/ROBOTOMONO-BOLD-2.TTF');
}
@font-face {
font-family: 'ROBOTO-REGULAR';
src: url('../font/ROBOTOMONO-REGULAR-9.TTF');
}
@font-face {
font-family: 'Baron Neue';
src: url('../font/Baron Neue.otf');
}
@font-face {
font-family: 'FZZhengHeiS-DB-GB Regular';
src: url('../font/FZZhengHeiS-DB-GB.TTF');
}
@font-face {
font-family: 'DIN Alternate Bold';
src: url('../font/DIN ALTERNATE BOLD.TTF');
}
/* 滚动条 */
::-webkit-scrollbar-track-piece {
background-color: rgba(0, 0, 0, 0);
border-left: 1px solid rgba(0, 0, 0, 0);
}
::-webkit-scrollbar {
width: 4px;
height: 0px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.4);
background-clip: padding-box;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
min-height: 10px;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/* 地图 */
.land-name{
font-size: 30px;
font-family: 'PuHuiTi-Medium';
font-weight: bold;
text-align: center;
color: #ffffff;
line-height: 24px;
letter-spacing: 2px;
white-space: nowrap;
text-shadow: #000000 1px 0 0, #000000 0 1px 0, #000000 -1px 0 0, #000000 0 -1px 0;
/* -webkit-text-stroke: 1px #000000; */
}
.text-hide .land-name{
display: none;
}
.text-18 .land-name{
font-size: 30px;
}
.text-17 .land-name{
font-size: 20px;
}
.text-16 .land-name{
font-size: 10px;
}
/* .location-icon{
background-color: white;
border-radius: 30px;
box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.49);
} */

@ -1,38 +0,0 @@
.van-picker {
position: relative;
background-color: #fff;
-webkit-user-select: none;
user-select: none;
bottom: 0;
position: absolute;
left: 0;
width: 100%;
padding-bottom: 1rem;
height: 100%;
}
.van-picker__toolbar{
height: 3.3rem;
background: #06127e;
}
.van-picker__title{
color: white;
font-size: 1.4rem;
line-height: 3.3rem;
font-weight: bold;
}
.van-picker__cancel, .van-picker__confirm{
font-size: 1.3rem;
color: white;
line-height: 3.3rem;
}
.van-picker-column {
font-size: 1.3rem;
}
.van-image-preview__index{
font-size: 1.3rem;
line-height: 3.3rem;
text-shadow: 0 0.1rem 0.1rem #323233;
}
.van-toast--bottom{
bottom: 0%;
}

Binary file not shown.

Binary file not shown.

@ -1,57 +0,0 @@
/*
* @Description:
* @Author: Fugang
* @Date: 2019-07-16 09:20:44
* @LastEditors: 付刚
* @LastEditTime: 2021-08-16 11:11:40
*/
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Vant from 'vant'
import '@vant/touch-emulator'
import 'vant/lib/index.css'
import './assets/css/vant-ui.scss'
import './assets/css/style.css'
import VConsole from 'vconsole'
import moment from 'moment'
import 'moment/locale/zh-cn'
import 'leaflet/dist/leaflet.css'
Vue.use(Vant)
Vue.config.productionTip = false
moment.locale('zh-cn')
Vue.prototype.$moment = moment
const vConsole = new VConsole({ theme: 'dark' })
Vue.use(vConsole)
Vue.prototype.config = {
barHeight: 20,
setBarHeight(h) {
this.barHeight = h
},
}
// PC调式版本
new Vue({
router,
render: (h) => h(App),
}).$mount('#app')
// 手机打包版本
// document.addEventListener(
// 'plusready',
// function() {
// new Vue({
// router,
// render: h => h(App)
// }).$mount('#app')
// },
// false
// )

@ -1,46 +0,0 @@
/*
* @Author: 付刚
* @Date: 2020-12-15 09:41:20
* @LastEditors: 付刚
* @LastEditTime: 2021-07-22 11:36:46
* @FilePath: \LujiachangfangPhone\src\router.js
*/
import Vue from 'vue'
import Router from 'vue-router'
import Login from './views/Login.vue'
import Home from './views/Home.vue'
Vue.use(Router)
const router = new Router({
base: process.env.BASE_URL,
routes: [
{
path: '/',
name: '登录页',
component: Login
},
{
path: '/home',
name: '地图首页',
component: Home
}
]
})
// 路由拦截
router.beforeEach((to, from, next) => {
let token = localStorage.getItem('lj_token')
if (token) {
next()
} else {
if (to.name === '登录页') {
next()
} else {
// 没有登录,返回登录页
router.replace('/')
}
}
})
export default router

@ -1,15 +0,0 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

@ -1,15 +0,0 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save