1
2
App.vue
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
|
||||||
|
|
||||||
this.initApp()
|
this.initApp()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
21
LICENSE
@ -1,21 +0,0 @@
|
|||||||
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.
|
|
82
api/employee/login.js
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 登录方法
|
||||||
|
export function login(username, password, code, uuid) {
|
||||||
|
const data = {
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
code,
|
||||||
|
uuid
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/login',
|
||||||
|
headers: {
|
||||||
|
isToken: false
|
||||||
|
},
|
||||||
|
'method': 'post',
|
||||||
|
'data': data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 登录方法
|
||||||
|
export function wxlogin(phoneCode, loginCode) {
|
||||||
|
const data = {
|
||||||
|
phoneCode,
|
||||||
|
loginCode,
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/wxlogin',
|
||||||
|
headers: {
|
||||||
|
isToken: false
|
||||||
|
},
|
||||||
|
'method': 'post',
|
||||||
|
'data': data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 注册方法
|
||||||
|
export function register(data) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/register',
|
||||||
|
headers: {
|
||||||
|
isToken: false
|
||||||
|
},
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取用户详细信息
|
||||||
|
export function getInfo() {
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/getInfo',
|
||||||
|
'method': 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function verifyToken() {
|
||||||
|
console.log("verifyToken")
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/verifyToken',
|
||||||
|
'method': 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 退出方法
|
||||||
|
export function logout() {
|
||||||
|
return request({
|
||||||
|
url: '/employee/logout',
|
||||||
|
'method': 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取验证码
|
||||||
|
export function getCodeImg() {
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/captchaImage',
|
||||||
|
headers: {
|
||||||
|
isToken: false
|
||||||
|
},
|
||||||
|
method: 'get',
|
||||||
|
timeout: 20000
|
||||||
|
})
|
||||||
|
}
|
41
api/employee/system/user.js
Normal file
@ -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: '/employee/system/user/profile/updatePwd',
|
||||||
|
method: 'put',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询用户个人信息
|
||||||
|
export function getUserProfile() {
|
||||||
|
return request({
|
||||||
|
url: '/employee/system/user/profile',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改用户个人信息
|
||||||
|
export function updateUserProfile(data) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/profile',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户头像上传
|
||||||
|
export function uploadAvatar(data) {
|
||||||
|
return upload({
|
||||||
|
url: '/employee/system/user/profile/avatar',
|
||||||
|
name: data.name,
|
||||||
|
filePath: data.filePath
|
||||||
|
})
|
||||||
|
}
|
50
api/employee/task.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
export function getTaskList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/task/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getTaskDetails(param) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/task/details/' + param.id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function setSign(data) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/task/editSign' ,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function baoming(param) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/task/baoming' ,
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cancelBaoming(param) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/task/cancelBaoming' ,
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getTask(param) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/task/getTask' ,
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
41
api/employee/user.js
Normal file
@ -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: '/employee/system/user/profile/updatePwd',
|
||||||
|
method: 'put',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询用户个人信息
|
||||||
|
export function getUserProfile() {
|
||||||
|
return request({
|
||||||
|
url: '/employee/system/user/profile',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改用户个人信息
|
||||||
|
export function updateUserProfile(data) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/user/profile',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户头像上传
|
||||||
|
export function uploadAvatar(data) {
|
||||||
|
return upload({
|
||||||
|
url: '/employee/system/user/profile/avatar',
|
||||||
|
name: data.name,
|
||||||
|
filePath: data.filePath
|
||||||
|
})
|
||||||
|
}
|
10588
api/jq.min.js
vendored
28
api/login.js
@ -1,5 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import store from '@/store'
|
||||||
// 登录方法
|
// 登录方法
|
||||||
export function login(username, password, code, uuid) {
|
export function login(username, password, code, uuid) {
|
||||||
const data = {
|
const data = {
|
||||||
@ -9,7 +9,7 @@ export function login(username, password, code, uuid) {
|
|||||||
uuid
|
uuid
|
||||||
}
|
}
|
||||||
return request({
|
return request({
|
||||||
'url': '/user/login',
|
'url': '/merchant/user/login',
|
||||||
headers: {
|
headers: {
|
||||||
isToken: false
|
isToken: false
|
||||||
},
|
},
|
||||||
@ -18,13 +18,13 @@ export function login(username, password, code, uuid) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 登录方法
|
// 登录方法
|
||||||
export function wxlogin(phoneCode, loginCode) {
|
export function wxlogin(data) {
|
||||||
const data = {
|
// const data = {
|
||||||
phoneCode,
|
// phoneCode,
|
||||||
loginCode,
|
// loginCode,
|
||||||
}
|
// }
|
||||||
return request({
|
return request({
|
||||||
'url': '/user/wxlogin',
|
'url': '/merchant/user/wxlogin',
|
||||||
headers: {
|
headers: {
|
||||||
isToken: false
|
isToken: false
|
||||||
},
|
},
|
||||||
@ -45,15 +45,19 @@ export function register(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取用户详细信息
|
// 获取用户详细信息
|
||||||
export function getInfo() {
|
export function getInfo(stage) {
|
||||||
|
let url = "/merchant";
|
||||||
|
if (stage.roleType == 1){
|
||||||
|
url = "/employee";
|
||||||
|
}
|
||||||
return request({
|
return request({
|
||||||
'url': '/user/getInfo',
|
'url': url + '/user/getInfo',
|
||||||
'method': 'get'
|
'method': 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 退出方法
|
// 退出方法
|
||||||
export function logout() {
|
export function logout(token) {
|
||||||
return request({
|
return request({
|
||||||
'url': '/logout',
|
'url': '/logout',
|
||||||
'method': 'post'
|
'method': 'post'
|
||||||
@ -63,7 +67,7 @@ export function logout() {
|
|||||||
// 获取验证码
|
// 获取验证码
|
||||||
export function getCodeImg() {
|
export function getCodeImg() {
|
||||||
return request({
|
return request({
|
||||||
'url': '/user/captchaImage',
|
'url': '/merchant/user/captchaImage',
|
||||||
headers: {
|
headers: {
|
||||||
isToken: false
|
isToken: false
|
||||||
},
|
},
|
||||||
|
10
api/task.js
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
|
|
||||||
export function getTaskList(param) {
|
export function getTaskList(param) {
|
||||||
return request({
|
return request({
|
||||||
url: '/task/list',
|
url: '/merchant/task/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: param
|
params: param
|
||||||
})
|
})
|
||||||
@ -11,27 +11,27 @@ export function getTaskList(param) {
|
|||||||
|
|
||||||
export function getTaskDetails(param) {
|
export function getTaskDetails(param) {
|
||||||
return request({
|
return request({
|
||||||
url: '/task/details/' + param.id,
|
url: '/merchant/task/details/' + param.id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getFxDetails(param) {
|
export function getFxDetails(param) {
|
||||||
return request({
|
return request({
|
||||||
url: '/task/fxInfo/' + param.id,
|
url: '/merchant/task/fxInfo/' + param.id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function setSign(data) {
|
export function setSign(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/task/editSign' ,
|
url: '/merchant/task/editSign' ,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function fx(data) {
|
export function fx(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/fund/fx' ,
|
url: '/merchant/fund/fx' ,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
11
config.js
@ -1,7 +1,8 @@
|
|||||||
// 应用全局配置
|
// 应用全局配置
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// baseUrl: 'https://vue.t.vip/prod-api',
|
// baseUrl: 'http://192.168.18.69:8080',
|
||||||
baseUrl: 'http://192.168.18.18:8080/merchant',
|
// baseUrl: 'http://8.155.21.176/prod-api',
|
||||||
|
baseUrl: 'https://www.tulkj.cn/prod-api',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
appInfo: {
|
appInfo: {
|
||||||
// 应用名称
|
// 应用名称
|
||||||
@ -11,15 +12,15 @@ module.exports = {
|
|||||||
// 应用logo
|
// 应用logo
|
||||||
logo: "/static/logo.png",
|
logo: "/static/logo.png",
|
||||||
// 官方网站
|
// 官方网站
|
||||||
site_url: "http://t.vip",
|
site_url: "",
|
||||||
// 政策协议
|
// 政策协议
|
||||||
agreements: [{
|
agreements: [{
|
||||||
title: "隐私政策",
|
title: "隐私政策",
|
||||||
url: "https://t.vip/protocol.html"
|
url: "l"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "用户服务协议",
|
title: "用户服务协议",
|
||||||
url: "https://t.vip/protocol.html"
|
url: ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name" : "若依移动端",
|
"name" : "用工移动端",
|
||||||
"appid" : "__UNI__25A9D80",
|
"appid" : "__UNI__25A9D80",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.1.0",
|
"versionName" : "1.1.0",
|
||||||
@ -41,7 +41,7 @@
|
|||||||
},
|
},
|
||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "wx7bc7df6eb945a84f",
|
"appid" : "wx26e952dad7a8aae5",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"es6" : false,
|
"es6" : false,
|
||||||
|
128
pages.json
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/index",
|
"path": "pages/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "任务",
|
"navigationBarTitleText": "任务",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/taskDetails"
|
"path": "pages/taskDetails"
|
||||||
@ -21,16 +21,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "登录"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/register",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "注册"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"path": "pages/work/index",
|
"path": "pages/work/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "薪酬管理",
|
"navigationBarTitleText": "薪酬管理",
|
||||||
@ -57,72 +47,76 @@
|
|||||||
"navigationBarTitleText": "pay"
|
"navigationBarTitleText": "pay"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/mine/index",
|
"path": "pages/employee/taskDetails"
|
||||||
"style": {
|
},
|
||||||
"navigationBarTitleText": "我的"
|
|
||||||
|
{
|
||||||
|
"path": "pages/employee/fundDetails",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "发薪明细"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "pages/employee/my",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/employee/setInfo",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "个人信息"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/baoming",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "报名"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/baomingSuccess",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "报名成功"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/mine/avatar/index",
|
,
|
||||||
"style": {
|
{
|
||||||
"navigationBarTitleText": "修改头像"
|
"path": "pages/ys",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "隐私政策"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, {
|
,
|
||||||
"path": "pages/mine/info/index",
|
{
|
||||||
"style": {
|
"path": "pages/fw",
|
||||||
"navigationBarTitleText": "个人信息"
|
"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": "浏览文本"
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#000000",
|
"color": "#000000",
|
||||||
"selectedColor": "#000000",
|
"selectedColor": "#000000",
|
||||||
"borderStyle": "white",
|
"borderStyle": "white",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"list": [{
|
"list": [
|
||||||
|
{
|
||||||
"pagePath": "pages/index",
|
"pagePath": "pages/index",
|
||||||
"iconPath": "static/images/tabbar/task.png",
|
"iconPath": "static/images/tabbar/task.png",
|
||||||
"selectedIconPath": "static/images/tabbar/task_.png",
|
"selectedIconPath": "static/images/tabbar/task_.png",
|
||||||
"text": "任务"
|
"text": "任务",
|
||||||
|
"visible": true
|
||||||
}, {
|
}, {
|
||||||
"pagePath": "pages/work/index",
|
"pagePath": "pages/work/index",
|
||||||
"iconPath": "static/images/tabbar/xc.png",
|
"iconPath": "static/images/tabbar/xc.png",
|
||||||
"selectedIconPath": "static/images/tabbar/xc_.png",
|
"selectedIconPath": "static/images/tabbar/xc_.png",
|
||||||
"text": "薪酬"
|
"text": "薪酬",
|
||||||
|
"visible": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
206
pages/baoming.vue
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="task-name">
|
||||||
|
{{param.taskName}}
|
||||||
|
</view>
|
||||||
|
<view class="bm-info">
|
||||||
|
<view class="line">
|
||||||
|
<view class="label">
|
||||||
|
<!-- <i><i><p>姓 名:<i></i></p></i></i>-->
|
||||||
|
姓名<i></i>
|
||||||
|
</view>
|
||||||
|
:<input type="input" v-model="param.employeeName" placeholder="请输入姓名"/>
|
||||||
|
</view>
|
||||||
|
<view class="line">
|
||||||
|
<view class="label">
|
||||||
|
手机号<i></i>
|
||||||
|
</view>
|
||||||
|
:<input type="input" class="phone-input" v-model="param.phone" placeholder="请输入手机号" disabled/>
|
||||||
|
</view>
|
||||||
|
<view class="line">
|
||||||
|
<view class="label">
|
||||||
|
身份证号<i></i>
|
||||||
|
</view>
|
||||||
|
:<input type="input" v-model="param.idCard" placeholder="请输入身份证号"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bm-bottom">
|
||||||
|
<view class="bm-btn" @click="baoming">报名</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { baoming,getTask } from "@/api/employee/task";
|
||||||
|
import { verifyToken } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
param: {
|
||||||
|
taskName: "",
|
||||||
|
taskId: null,
|
||||||
|
employeeName: null,
|
||||||
|
phone: null,
|
||||||
|
idCard: null
|
||||||
|
},
|
||||||
|
q: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function(query) {
|
||||||
|
var noLogin = false;
|
||||||
|
var that = this;
|
||||||
|
verifyToken().then(response => {
|
||||||
|
if (response.code == 401){
|
||||||
|
noLogin = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.param.employeeName = this.$store.state.user.nickName == '微信用户' ? null : this.$store.state.user.nickName
|
||||||
|
this.param.idCard = this.$store.state.user.idCard
|
||||||
|
this.param.phone = this.$store.state.user.phone
|
||||||
|
|
||||||
|
const qrUrl = decodeURIComponent(query.q) // 获取到二维码原始链接内容
|
||||||
|
// const scancode_time = parseInt(query.scancode_time) // 获取用户扫码时间 UNIX 时间戳
|
||||||
|
|
||||||
|
let jsonUrl = this.getWxUrlParam(qrUrl);
|
||||||
|
var taskId = jsonUrl.id // 获取用户扫码时间 UNIX 时间戳
|
||||||
|
this.param.taskId = taskId;
|
||||||
|
|
||||||
|
if(this.param.taskId != null){
|
||||||
|
if (noLogin || this.$store.state.user.roleType == 0){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/wxlogin?baoming=" + this.param.taskId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.getTask();
|
||||||
|
}else{
|
||||||
|
this.param.taskName = query.taskName;
|
||||||
|
this.param.taskId = query.taskId;
|
||||||
|
this.getTask();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getTask(){
|
||||||
|
getTask(this.param).then(response => {
|
||||||
|
this.param.taskName = response.data.taskName
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
baoming(){
|
||||||
|
console.log(this.param.employeeName)
|
||||||
|
var that = this;
|
||||||
|
if (this.param.employeeName == null || this.param.employeeName == ''){
|
||||||
|
wx.showToast({
|
||||||
|
title: '请填写姓名',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.param.idCard == null || this.param.idCard.length != 18){
|
||||||
|
wx.showToast({
|
||||||
|
title: '请填写正确的身份证号',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
baoming(this.param).then(response => {
|
||||||
|
// 设置用户信息
|
||||||
|
this.$store.dispatch('GetInfo').then(res => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "baomingSuccess"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getWxUrlParam(url) {
|
||||||
|
let theRequest = {};
|
||||||
|
if (url.indexOf('#') != -1) {
|
||||||
|
const str = url.split('#')[1];
|
||||||
|
const strs = str.split('&');
|
||||||
|
for (let i = 0; i < strs.length; i++) {
|
||||||
|
theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
|
||||||
|
}
|
||||||
|
} else if (url.indexOf('?') != -1) {
|
||||||
|
const str = url.split('?')[1];
|
||||||
|
const strs = str.split('&');
|
||||||
|
for (let i = 0; i < strs.length; i++) {
|
||||||
|
theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return theRequest;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
.task-name{
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
.bm-info{
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 10rpx 30rpx 10rpx 30rpx;
|
||||||
|
.line{
|
||||||
|
border-bottom: 1rpx solid #dbdbdb;
|
||||||
|
height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.label{
|
||||||
|
width: 18%;
|
||||||
|
height: 40rpx;
|
||||||
|
text-align: justify;
|
||||||
|
|
||||||
|
i{
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input{
|
||||||
|
/*width: 80%;*/
|
||||||
|
margin-left: 40rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
.phone-input{
|
||||||
|
color: #979595;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.line:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bm-bottom{
|
||||||
|
position: absolute;
|
||||||
|
bottom: calc(env(safe-area-inset-bottom) + 100rpx);
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
.bm-btn{
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #107ff6;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 7rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
97
pages/baomingSuccess.vue
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="icon">
|
||||||
|
<img src="http://8.155.21.176:9000/yonggong/images/task/u23.png"/>
|
||||||
|
</view>
|
||||||
|
<view class="line">
|
||||||
|
<view class="text">报名成功</view>
|
||||||
|
</view>
|
||||||
|
<view class="line">
|
||||||
|
<view class="btn1" @click="backTask(true)">查看我的任务</view>
|
||||||
|
</view>
|
||||||
|
<view class="line">
|
||||||
|
<view class="btn2" @click="backTask(false)">返回任务列表</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { baoming } from "@/api/employee/task";
|
||||||
|
// import { getCodeImg } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
param: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
backTask(self){
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "index?self=" + self
|
||||||
|
// })
|
||||||
|
console.log(self)
|
||||||
|
uni.reLaunch({ url: "index?self=" + self })
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
html, body {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
margin-top: 150rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
img{
|
||||||
|
width: 250rpx;
|
||||||
|
height: 250rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.line{
|
||||||
|
margin-top: 30rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
.text{
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn1{
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
width: 80%;
|
||||||
|
background-color: #107ff6;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 7rpx;
|
||||||
|
height: 85rpx;
|
||||||
|
text-align: center;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
|
.btn2{
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
width: 80%;
|
||||||
|
color: #107ff6;
|
||||||
|
border: 1rpx solid #107ff6;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 7rpx;
|
||||||
|
height: 85rpx;
|
||||||
|
text-align: center;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
<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>
|
|
@ -1,34 +0,0 @@
|
|||||||
<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>
|
|
1147
pages/components/employeeTask.vue
Normal file
494
pages/components/employeeXc.vue
Normal file
@ -0,0 +1,494 @@
|
|||||||
|
<template>
|
||||||
|
<view :style="{marginTop: titleTop + 'px', backgroundColor:'#ffffff', width: '100%', position: 'relative', height: 'calc(100% - ' + titleTop+'px)'}"
|
||||||
|
class="xinchou-container">
|
||||||
|
<view class="title">薪酬明细</view>
|
||||||
|
<view class="topView">
|
||||||
|
<view class="headImg" @click="my()"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<scroll-view class="fund-record"
|
||||||
|
:scroll-top="scrollTop"
|
||||||
|
scroll-y="true"
|
||||||
|
:refresher-enabled="isOpenRefresh"
|
||||||
|
:refresher-triggered="triggered"
|
||||||
|
@refresherrefresh="refresh"
|
||||||
|
@scrolltoupper="upper"
|
||||||
|
@scroll="scroll"
|
||||||
|
@scrolltolower="loadMore"
|
||||||
|
@refresherpulling="onPulling">
|
||||||
|
|
||||||
|
<view class="fund-item">
|
||||||
|
<view class="fund-item-title">
|
||||||
|
<view>我的薪酬</view>
|
||||||
|
</view>
|
||||||
|
<view class="fund-item-tbl">
|
||||||
|
<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
|
||||||
|
<uni-tr>
|
||||||
|
<uni-th width="100" align="center">任务名称</uni-th>
|
||||||
|
<uni-th width="100" align="center">任务日期</uni-th>
|
||||||
|
<uni-th width="100" align="center">日结单价</uni-th>
|
||||||
|
<uni-th width="100" align="center">发薪状态</uni-th>
|
||||||
|
<!-- <uni-th width="100" align="center">实发金额</uni-th>-->
|
||||||
|
<uni-th width="100" align="center">应发金额</uni-th>
|
||||||
|
<uni-th width="130" align="center">二次核验备注</uni-th>
|
||||||
|
</uni-tr>
|
||||||
|
<uni-tr v-for="(task, i) in taskList" :key="i">
|
||||||
|
<uni-td align="center">{{ task.taskName }}</uni-td>
|
||||||
|
<uni-td align="center">{{ task.taskDate }}</uni-td>
|
||||||
|
<uni-td align="center">{{ task.dayPrice }}</uni-td>
|
||||||
|
<uni-td align="center"><view :class="'status' + getPayStatus(task.selfSign).status">{{getPayStatus(task.selfSign).text }}</view></uni-td>
|
||||||
|
<uni-td align="center">{{ task.selfSign.stEmployeeFundRecord == null ? 0 : task.selfSign.stEmployeeFundRecord.realPrice }}</uni-td>
|
||||||
|
<!-- <uni-td align="center">{{ task.dayPrice }}</uni-td>-->
|
||||||
|
<uni-td align="center">{{ task.selfSign.remark == null ? "无" : task.selfSign.remark}}</uni-td>
|
||||||
|
</uni-tr>
|
||||||
|
</uni-table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view v-if="showLoading" class="load-more">加载中...</view>
|
||||||
|
<view v-if="showNoMore" class="no-more">没有更多数据了</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskList } from "@/api/employee/task";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
titleTop: {type: Number},
|
||||||
|
nowTab1: {type: Number},
|
||||||
|
statusBarHeight: {type: Number}
|
||||||
|
},
|
||||||
|
nowTab1(newValue) {
|
||||||
|
// 处理逻辑
|
||||||
|
this.nowTab = newValue
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// titleTop: 0,
|
||||||
|
// statusBarHeight: 0,
|
||||||
|
fundRecord: [],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
dateStatus: 0,
|
||||||
|
taskName: null,
|
||||||
|
taskDate: null,
|
||||||
|
xinchou: true,
|
||||||
|
},
|
||||||
|
taskList: [],
|
||||||
|
nowTab: this.nowTab1,
|
||||||
|
realName: "",
|
||||||
|
// 是否显示加载更多的loading
|
||||||
|
showLoading: false,
|
||||||
|
// 是否显示无更多数据提示
|
||||||
|
showNoMore: false,
|
||||||
|
triggered: false,
|
||||||
|
isOpenRefresh: true,
|
||||||
|
containerScrollTop: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created: function() {
|
||||||
|
this.getList();
|
||||||
|
this.realName = this.$store.state.user.nickName
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onPageScroll(e){
|
||||||
|
this.containerScrollTop = e.scrollTop
|
||||||
|
if (this.containerScrollTop > 0){
|
||||||
|
this.isOpenRefresh = false
|
||||||
|
}else{
|
||||||
|
this.isOpenRefresh = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom(e){
|
||||||
|
if (this.showLoading || this.showNoMore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 显示加载更多的loading
|
||||||
|
this.showLoading = true;
|
||||||
|
// 请求数据
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
// 刷新函数
|
||||||
|
refresh() {
|
||||||
|
// 请求数据
|
||||||
|
this.triggered = true;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
upper(){
|
||||||
|
// console.log("upper")
|
||||||
|
},
|
||||||
|
scroll(e){
|
||||||
|
// console.log("scroll", e.detail)
|
||||||
|
},
|
||||||
|
onPulling(e) {
|
||||||
|
// console.log("onpulling", e.detail);
|
||||||
|
if (e.detail.dy < 8) return // 防止上滑页面也触发下拉
|
||||||
|
this.triggered = true;
|
||||||
|
},
|
||||||
|
// 加载更多函数
|
||||||
|
loadMore() {
|
||||||
|
// console.log("loadMore")
|
||||||
|
// 判断是否正在加载更多或已经没有更多数据
|
||||||
|
if (this.showLoading || this.showNoMore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 显示加载更多的loading
|
||||||
|
this.showLoading = true;
|
||||||
|
// 请求数据
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
if (this.showNoMore && this.queryParams.pageNum > 1){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var that = this;
|
||||||
|
this.queryParams.self = true;
|
||||||
|
getTaskList(this.queryParams).then(response => {
|
||||||
|
if (that.queryParams.pageNum > 1){
|
||||||
|
that.taskList = that.taskList.concat(response.rows);
|
||||||
|
}else{
|
||||||
|
that.taskList = response.rows;
|
||||||
|
}
|
||||||
|
that.queryParams.pageNum++;
|
||||||
|
if (response.rows.length < this.queryParams.pageSize){
|
||||||
|
that.showNoMore = true;
|
||||||
|
}else{
|
||||||
|
that.showNoMore = false;
|
||||||
|
}
|
||||||
|
that.showLoading = false;
|
||||||
|
that.triggered = false;
|
||||||
|
|
||||||
|
that.total = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
filterOpen(){
|
||||||
|
this.$refs.popup.open('center')
|
||||||
|
},
|
||||||
|
search(){
|
||||||
|
this.getList();
|
||||||
|
this.$refs.popup.close();
|
||||||
|
},
|
||||||
|
reset(){
|
||||||
|
this.queryParams.taskName = null;
|
||||||
|
this.queryParams.taskDate = null;
|
||||||
|
this.getList();
|
||||||
|
this.$refs.popup.close();
|
||||||
|
},
|
||||||
|
timeChange(e) {
|
||||||
|
this.queryParams.taskDate = e;
|
||||||
|
},
|
||||||
|
tabChange(tab){
|
||||||
|
this.nowTab = tab;
|
||||||
|
},
|
||||||
|
getPayStatus(sign){
|
||||||
|
if (sign.stEmployeeFundRecord == null || sign.stEmployeeFundRecord.payStatus == 0){
|
||||||
|
return {"text": "未发放", "status": 0};
|
||||||
|
}
|
||||||
|
if (sign.stEmployeeFundRecord.payStatus == 1){
|
||||||
|
return {"text": "已发放", "status": 1};
|
||||||
|
}
|
||||||
|
if (sign.stEmployeeFundRecord.payStatus == 2){
|
||||||
|
return {"text": "发放失败", "status": 2};
|
||||||
|
}
|
||||||
|
return {"text": "未发放", "status": 0};
|
||||||
|
},
|
||||||
|
my(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "../employee/my"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
html, body {
|
||||||
|
background-color: #ffffff;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
page{
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
.load-more, .no-more {
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
padding: 10rpx;
|
||||||
|
color: #999;
|
||||||
|
height: 80rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.table-thead {
|
||||||
|
/*background-color: #FFFAF2 !important;*/
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
.uni-table-th{
|
||||||
|
background-color: #f3f3f3 ;
|
||||||
|
}
|
||||||
|
.uni-table-td{
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
/deep/ .uni-table-tr {
|
||||||
|
overflow: visible;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
//固定表头第一列
|
||||||
|
/deep/ .uni-table-tr .uni-table-th:first-child, {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
/*background-color: #FFFAF2;*/
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
//固定表头第2列(需计算第一列宽度,我这里是200rpx)
|
||||||
|
/*/deep/ .uni-table-tr .uni-table-th:nth-child(2), {*/
|
||||||
|
/* position: sticky;*/
|
||||||
|
/* left: 200rpx;*/
|
||||||
|
/* top: 0;*/
|
||||||
|
/* background-color: #FFFAF2;*/
|
||||||
|
/* z-index: 10;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
//冻结thead第一列
|
||||||
|
/deep/ .uni-table-tr .uni-table-td:first-child {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
//冻结thead第二列(需计算第一列宽度)
|
||||||
|
/*/deep/ .uni-table-tr .uni-table-td:nth-child(2) {*/
|
||||||
|
/* position: sticky;*/
|
||||||
|
/* left: 200rpx;*/
|
||||||
|
/* top: 0;*/
|
||||||
|
/* background-color: #fff;*/
|
||||||
|
/* z-index: 10;*/
|
||||||
|
/*}*/
|
||||||
|
.title {
|
||||||
|
font-size: 25rpx;
|
||||||
|
color: #000000;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 90rpx;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.topView{
|
||||||
|
display: flex;
|
||||||
|
width: 120rpx;
|
||||||
|
padding: 0 10rpx 0 20rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
|
.headImg{
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/images/wode.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.xinchou-container{
|
||||||
|
background-image:url('http://8.155.21.176:9000/yonggong/images/bg.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 100%;
|
||||||
|
.top-tab{
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
margin-top: 5rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.tab{
|
||||||
|
width: 90%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.item-container{
|
||||||
|
width: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.item{
|
||||||
|
width: 50%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
|
||||||
|
.tab-title-focus{
|
||||||
|
/*width: 100%;*/
|
||||||
|
height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #519fef;
|
||||||
|
}
|
||||||
|
.bottom-line-focus{
|
||||||
|
height: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #519fef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-title{
|
||||||
|
/*width: 100%;*/
|
||||||
|
height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.bottom-line{
|
||||||
|
height: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-btn{
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*<view class="fund-record">*/
|
||||||
|
/*<view class="fund-item">*/
|
||||||
|
/*<view class="fund-item-title">*/
|
||||||
|
/*<view>任务名称 {{1}} </view>*/
|
||||||
|
/*<view>日结单价 {{1}}</view>*/
|
||||||
|
/*</view>*/
|
||||||
|
|
||||||
|
.fund-record{
|
||||||
|
margin: 0rpx 0rpx 0rpx 10rpx;
|
||||||
|
height: calc(100% - 70rpx);
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
.fund-item{
|
||||||
|
.fund-item-title{
|
||||||
|
display: flex;
|
||||||
|
color: #454545;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
view{
|
||||||
|
margin-right: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popup__wrapper{
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.dialog {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 50rpx;
|
||||||
|
display: grid;
|
||||||
|
/*place-items: flex-start;*/
|
||||||
|
|
||||||
|
.filter-line1{
|
||||||
|
width: 80%;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.label{
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
width: 70%;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
height: 55rpx !important;
|
||||||
|
line-height: 55rpx !important;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.uni-date-x{
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
.uni-date__x-input{
|
||||||
|
height: 55rpx !important;
|
||||||
|
line-height: 55rpx !important;
|
||||||
|
}
|
||||||
|
.uni-date-x--border{
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
.example-body{
|
||||||
|
width: 70%;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.filter-line2{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
border-top: 1rpx solid #cecece;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
.reset-btn{
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 180rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.submit-btn{
|
||||||
|
background-color: #11a9ee;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 250rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: auto; /* 推动元素到右边 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.status0{
|
||||||
|
color: #3a8ee6;
|
||||||
|
}
|
||||||
|
.status1{
|
||||||
|
color: #00ce07;
|
||||||
|
}
|
||||||
|
.status2{
|
||||||
|
color: #ea0c0c;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
677
pages/components/merchantTask.vue
Normal file
@ -0,0 +1,677 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<!-- pages/index/index.wxml -->
|
||||||
|
<view :style="{marginTop: titleTop + 'px', height: 'calc(100% - ' + titleTop+'px)' }" class="sy-container">
|
||||||
|
|
||||||
|
|
||||||
|
<view class="topView" @click="my()">
|
||||||
|
<!-- <view class="headImg" >{{realName.charAt(0)}}</view>-->
|
||||||
|
<view class="headImg"></view>
|
||||||
|
</view>
|
||||||
|
<view class="title">任务</view>
|
||||||
|
|
||||||
|
<view class="search-container" >
|
||||||
|
<view class="search">
|
||||||
|
<uni-icons class="icon" type="search" size="30" @click="search"></uni-icons>
|
||||||
|
|
||||||
|
<input class="search-input" id="search-input" v-model="searchVal" type="text" placeholder="请输入任务名称" maxlength="30" @confirm="search" @input="search"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="filter">
|
||||||
|
<view class="select" @click="openSelect">
|
||||||
|
{{nowSelect}}
|
||||||
|
<view class="more-icon"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="dateSelect">
|
||||||
|
<uni-datetime-picker type="date" v-model="queryParams.taskDate" @maskClick="maskClick" @change="timeChange($event)">
|
||||||
|
{{queryParams.taskDate == null ? "全部日期" : queryParams.taskDate}}
|
||||||
|
<view v-if="queryParams.taskDate == null" class="more-icon"></view>
|
||||||
|
</uni-datetime-picker>
|
||||||
|
|
||||||
|
<uni-icons v-if="queryParams.taskDate != null" class="icon more-icon2" type="closeempty" size="10" @click="resetTime"></uni-icons>
|
||||||
|
<!-- <view type="date" v-model="single" @click="maskClick" @change="timeChange($event)">全部日期</view>-->
|
||||||
|
</view>
|
||||||
|
<!-- <uni-icons class="icon" type="arrow-down" size="10"></uni-icons>-->
|
||||||
|
|
||||||
|
<!-- <view class="dateSelect" @maskClick="maskClick">-->
|
||||||
|
<!-- 全部日期-->
|
||||||
|
<!-- <uni-icons class="icon" type="arrow-down" size="10"></uni-icons>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<uni-popup style="z-index: 10000" ref="popup" type="bottom" border-radius="10px 10px 0 0">
|
||||||
|
<view class="selectContext">
|
||||||
|
<view class="select-item" @click="filter(0)">全部任务</view>
|
||||||
|
<view class="select-item" @click="filter(1)">进行中的任务</view>
|
||||||
|
<view class="select-item" @click="filter(2)">已结束的任务</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<scroll-view class="list"
|
||||||
|
:scroll-top="scrollTop"
|
||||||
|
scroll-y="true"
|
||||||
|
:refresher-enabled="isOpenRefresh"
|
||||||
|
:refresher-triggered="triggered"
|
||||||
|
@refresherrefresh="refresh"
|
||||||
|
@scrolltoupper="upper"
|
||||||
|
@scroll="scroll"
|
||||||
|
@scrolltolower="loadMore"
|
||||||
|
@refresherpulling="onPulling"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="item" @click="goDetails(task)" v-for="(task, index) in taskList" :key="index">
|
||||||
|
<view class="line1">
|
||||||
|
|
||||||
|
|
||||||
|
<view class="name-status">
|
||||||
|
<view class="task-name">
|
||||||
|
{{task.taskName}}
|
||||||
|
</view>
|
||||||
|
<view class="status-base" :class="toDate(task.taskDate) == '已结束' ? 'task-status-end' : 'task-status'"/>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="price">
|
||||||
|
<view class="num">¥{{task.dayPrice}}元</view>
|
||||||
|
<view class="unit">/天</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="line3">
|
||||||
|
<view class="num-container" style="background-color: #f1f0f0;">
|
||||||
|
<view class="num-label">
|
||||||
|
用工日期
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.taskDate}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="num-container" style="background-color: #e4e4fd;">
|
||||||
|
<view class="num-label">
|
||||||
|
用工人数
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.useNum}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="num-container" style="background-color: #fce6ea;">
|
||||||
|
<view class="num-label">
|
||||||
|
报名人数
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.baomingNum}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="num-container" style="background-color: #def9fc;">
|
||||||
|
<view class="num-label">
|
||||||
|
点名人数
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.signNum + task.noSignNum}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="line4">
|
||||||
|
<view class="date-label">
|
||||||
|
<view class="icon"></view>
|
||||||
|
发布时间: {{task.createTime}}
|
||||||
|
</view>
|
||||||
|
<view class="button"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view v-if="showLoading" class="load-more">加载中...</view>
|
||||||
|
<view v-if="showNoMore" class="no-more">没有更多数据了</view>
|
||||||
|
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskList } from "@/api/task";
|
||||||
|
// import { getCodeImg } from '@/api/login'
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
titleTop: {type: Number},
|
||||||
|
nowTab1: {type: Number},
|
||||||
|
statusBarHeight: {type: Number}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
dateStatus: 0,
|
||||||
|
taskName: null,
|
||||||
|
taskDate: null,
|
||||||
|
},
|
||||||
|
taskList: [],
|
||||||
|
nowSelect: "全部任务",
|
||||||
|
searchVal: null,
|
||||||
|
realName: "",
|
||||||
|
|
||||||
|
// 是否显示加载更多的loading
|
||||||
|
showLoading: false,
|
||||||
|
// 是否显示无更多数据提示
|
||||||
|
showNoMore: true,
|
||||||
|
triggered: false,
|
||||||
|
isOpenRefresh: true,
|
||||||
|
containerScrollTop: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created: function() {
|
||||||
|
this.realName = this.$store.state.user.nickName
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
reload(){
|
||||||
|
this.refresh();
|
||||||
|
},
|
||||||
|
openSelect(){
|
||||||
|
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||||
|
this.$refs.popup.open('bottom')
|
||||||
|
},
|
||||||
|
closeSelect(){
|
||||||
|
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||||
|
this.$refs.popup.close()
|
||||||
|
},
|
||||||
|
filter(type){
|
||||||
|
this.closeSelect()
|
||||||
|
this.queryParams.dateStatus = type;
|
||||||
|
if (type == 0){
|
||||||
|
this.nowSelect = "查看全部";
|
||||||
|
}else if (type == 1){
|
||||||
|
this.nowSelect = "进行中的任务";
|
||||||
|
}else if (type == 2){
|
||||||
|
this.nowSelect = "已结束的任务";
|
||||||
|
}
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
timeChange(e) {
|
||||||
|
this.single = e;
|
||||||
|
console.log("-change事件:", e);
|
||||||
|
this.queryParams.taskDate = e;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
toDate(str){
|
||||||
|
var strArray = str.split(" ");
|
||||||
|
var strDate = strArray[0].split("-");
|
||||||
|
// var strTime = strArray[1].split(":");
|
||||||
|
var taskFinishTime = new Date(strDate[0], (strDate[1]-parseInt(1)), (strDate[2]));//任务结束的晚上0点
|
||||||
|
taskFinishTime.setDate(taskFinishTime.getDate() + 1);
|
||||||
|
|
||||||
|
// console.log("date", taskFinishTime, this.getTomorrowZeroTime())
|
||||||
|
return new Date() > taskFinishTime ? "已结束" : "进行中"
|
||||||
|
},
|
||||||
|
getTomorrowZeroTime() {
|
||||||
|
const now = new Date(); // 获取当前时间
|
||||||
|
const tomorrow = new Date(now); // 复制当前时间对象
|
||||||
|
tomorrow.setDate(now.getDate() + 1); // 日期加1,得到明天
|
||||||
|
tomorrow.setHours(0, 0, 0, 0); // 将小时、分钟、秒和毫秒都设置为0
|
||||||
|
return tomorrow;
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
if (this.showNoMore && this.queryParams.pageNum > 1){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var that = this;
|
||||||
|
getTaskList(this.queryParams).then(response => {
|
||||||
|
|
||||||
|
if (that.queryParams.pageNum > 1){
|
||||||
|
that.taskList = that.taskList.concat(response.rows);
|
||||||
|
}else{
|
||||||
|
that.taskList = response.rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
that.queryParams.pageNum++;
|
||||||
|
if (response.rows.length < this.queryParams.pageSize){
|
||||||
|
that.showNoMore = true;
|
||||||
|
}else{
|
||||||
|
that.showNoMore = false;
|
||||||
|
}
|
||||||
|
that.showLoading = false;
|
||||||
|
that.triggered = false;
|
||||||
|
that.total = response.total;
|
||||||
|
console.log(response)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
search(){
|
||||||
|
// this.queryParams.taskName = e.detail.value;
|
||||||
|
// this.queryParams.taskName = $(".search-input").val();
|
||||||
|
this.queryParams.taskName = this.searchVal;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
goDetails(task){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "taskDetails?id=" + task.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
my(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "my"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetTime(){
|
||||||
|
this.queryParams.taskDate = null;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
onPageScroll(e){
|
||||||
|
console.log(e.scrollTop)
|
||||||
|
this.containerScrollTop = e.scrollTop
|
||||||
|
if (this.containerScrollTop > 0){
|
||||||
|
this.isOpenRefresh = false
|
||||||
|
}else{
|
||||||
|
this.isOpenRefresh = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom(e){
|
||||||
|
console.log("onReachBottom", e)
|
||||||
|
if (this.showLoading || this.showNoMore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 显示加载更多的loading
|
||||||
|
this.showLoading = true;
|
||||||
|
// 请求数据
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
// 刷新函数
|
||||||
|
refresh() {
|
||||||
|
// 请求数据
|
||||||
|
this.triggered = true;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
upper(){
|
||||||
|
// console.log("upper")
|
||||||
|
},
|
||||||
|
scroll(e){
|
||||||
|
// console.log("scroll", e.detail)
|
||||||
|
},
|
||||||
|
onPulling(e) {
|
||||||
|
// console.log("onpulling", e.detail);
|
||||||
|
if (e.detail.dy < 8) return // 防止上滑页面也触发下拉
|
||||||
|
this.triggered = true;
|
||||||
|
},
|
||||||
|
// 加载更多函数
|
||||||
|
loadMore() {
|
||||||
|
// console.log("loadMore")
|
||||||
|
// 判断是否正在加载更多或已经没有更多数据
|
||||||
|
if (this.showLoading || this.showNoMore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 显示加载更多的loading
|
||||||
|
this.showLoading = true;
|
||||||
|
// 请求数据
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang='scss'>
|
||||||
|
page{
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
background-color: #ffffff;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.load-more, .no-more {
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
padding: 10rpx;
|
||||||
|
color: #999;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.uni-datetime-picker-reset-btn{*/
|
||||||
|
/* background-color: #ffffff !important;*/
|
||||||
|
/* color: #1f2d3d !important;*/
|
||||||
|
/* border: #1f2d3d 1rpx solid;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.uni-datetime-picker--btn{*/
|
||||||
|
/* width: 40%;*/
|
||||||
|
/* margin-left: auto;*/
|
||||||
|
/* margin-right: auto;*/
|
||||||
|
/*}*/
|
||||||
|
/*.uni-date-changed{*/
|
||||||
|
/* display: flex;*/
|
||||||
|
/* justify-items: center;*/
|
||||||
|
/*}*/
|
||||||
|
.sy-container{
|
||||||
|
position: relative;
|
||||||
|
/*height: calc(100% - 47px);*/
|
||||||
|
|
||||||
|
.title {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
font-size: 25rpx;
|
||||||
|
color: #000000;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 90rpx;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
.topView{
|
||||||
|
display: flex;
|
||||||
|
width: 120rpx;
|
||||||
|
padding: 0 10rpx 0 20rpx;
|
||||||
|
z-index: 1;
|
||||||
|
position: relative;
|
||||||
|
.headImg{
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/wode.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.search-container{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
border-top: 1rpx solid #dbdbdb;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 20rpx 30rpx 0rpx 30rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
.search{
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 450px;
|
||||||
|
border: 1px solid #6c6c6c;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
/*justify-content: center;*/
|
||||||
|
.icon{
|
||||||
|
width: 15%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.search-input{
|
||||||
|
width: 82%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
width: 80%;
|
||||||
|
height: 80rpx;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
.select{
|
||||||
|
width: 50%;
|
||||||
|
height: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #939393;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.more-icon{
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/index/more-icon.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
margin-left: 5rpx;
|
||||||
|
margin-top: 3rpx;
|
||||||
|
}
|
||||||
|
.more-icon2{
|
||||||
|
margin-left: 0rpx;
|
||||||
|
}
|
||||||
|
.dateSelect{
|
||||||
|
width: 50%;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
.uni-date{
|
||||||
|
.uni-date-editor{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #939393;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectContext{
|
||||||
|
background-color: #ffffff;
|
||||||
|
width: 100%;
|
||||||
|
/*height: 500rpx;*/
|
||||||
|
margin-bottom: 0px;
|
||||||
|
border-radius: 10rpx 10rpx 0 0;
|
||||||
|
.select-item{
|
||||||
|
height: 100rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
font-size: 35rpx;
|
||||||
|
border-bottom: 1rpx solid #dbdbdb;
|
||||||
|
}
|
||||||
|
.select-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.vue-ref{
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-date-x{
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #000000 !important;
|
||||||
|
width: 80%;
|
||||||
|
justify-content: right;
|
||||||
|
}
|
||||||
|
.uni-date__x-input{
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
/*justify-content: flex-end !important;*/
|
||||||
|
/*margin-left: auto; !* 推动元素到右边 *!*/
|
||||||
|
}
|
||||||
|
.uni-date__icon-clear{
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
.uni-date-x--border{
|
||||||
|
border: 0 solid #dbdbdb !important;
|
||||||
|
}
|
||||||
|
.icon-calendar{
|
||||||
|
display: none; /* 隐藏图标 */
|
||||||
|
}
|
||||||
|
/*.uni-date__x-input{*/
|
||||||
|
/* display: flex;*/
|
||||||
|
/* align-items: center;*/
|
||||||
|
/* justify-content: center;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
|
||||||
|
.list{
|
||||||
|
padding: 0rpx 15rpx 0rpx 15rpx;
|
||||||
|
/*background-color: #e3e3e3;*/
|
||||||
|
height: calc(100% - 270rpx);
|
||||||
|
background-image:url('http://8.155.21.176:9000/yonggong/images/bg.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
.item{
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
width: 95%;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
|
||||||
|
padding: 10rpx 25rpx 35rpx 25rpx;
|
||||||
|
margin: 20rpx auto 20rpx auto;
|
||||||
|
.line1{
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
/*justify-content: center;*/
|
||||||
|
/*border-bottom: 1rpx solid #dbdbdb;*/
|
||||||
|
|
||||||
|
|
||||||
|
.name-status{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.task-name{
|
||||||
|
font-size: 33rpx;
|
||||||
|
font-weight: 590;
|
||||||
|
max-width: 350rpx; /* 设置div的宽度 */
|
||||||
|
white-space: nowrap; /* 防止文本换行 */
|
||||||
|
overflow: hidden; /* 隐藏超出div的内容 */
|
||||||
|
text-overflow: ellipsis; /* 显示省略号来代表被截断的内容 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-base{
|
||||||
|
margin-left: 5rpx;
|
||||||
|
width: 80rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-status{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/index/task-status-1.png");
|
||||||
|
}
|
||||||
|
.task-status-end{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/index/task-status-2.png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.day-price{
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.price{
|
||||||
|
margin-left: auto;
|
||||||
|
color: #FF0000;
|
||||||
|
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC', sans-serif;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
height: 38rpx;
|
||||||
|
.num{
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 38rpx;
|
||||||
|
line-height: 38rpx;
|
||||||
|
}
|
||||||
|
.unit{
|
||||||
|
font-weight: 450;
|
||||||
|
font-size: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.line3{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 15rpx 20rpx 0 20rpx;
|
||||||
|
.num-container{
|
||||||
|
width: 24%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
margin-right: 1.33%;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 15rpx;
|
||||||
|
.num-label{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 23rpx;
|
||||||
|
color: #979696;
|
||||||
|
}
|
||||||
|
.num{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #131313;
|
||||||
|
overflow: hidden; /* 隐藏超出div的内容 */
|
||||||
|
text-overflow: ellipsis; /* 显示省略号来代表被截断的内容 */
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.num-container:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.line4{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
/*justify-content: center;*/
|
||||||
|
margin-top: 40rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
.date-label{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-top: #f1f1f1 solid 1rpx;
|
||||||
|
height: 100%;
|
||||||
|
width: 70%;
|
||||||
|
.icon{
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/index/clock.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
.button{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/index/dm-btn.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
margin-left: auto; /* 推动元素到右边 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
929
pages/components/merchantXc.vue
Normal file
@ -0,0 +1,929 @@
|
|||||||
|
<template>
|
||||||
|
<view :style="{marginTop: titleTop + 'px', backgroundColor:'#ffffff', width: '100%', position: 'relative', height: 'calc(100% - ' + titleTop+'px)' }" class="xinchou-container">
|
||||||
|
<view class="title">薪酬管理</view>
|
||||||
|
<view class="topView">
|
||||||
|
<view class="headImg" @click="my()"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="top-tab">
|
||||||
|
<view class="tab">
|
||||||
|
<view class="item-container" @click="tabChange(1)">
|
||||||
|
<view class="item" >
|
||||||
|
<view :class="nowTab == 1 ? 'tab-title-focus' : 'tab-title'">
|
||||||
|
任务薪酬列表
|
||||||
|
</view>
|
||||||
|
<view :class="nowTab == 1 ? 'bottom-line-focus' : 'bottom-line'" ></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="item-container" @click="tabChange(2)">
|
||||||
|
<view class="item" >
|
||||||
|
<view :class="nowTab == 2 ? 'tab-title-focus' : 'tab-title'">
|
||||||
|
资金流水
|
||||||
|
</view>
|
||||||
|
<view :class="nowTab == 2 ? 'bottom-line-focus' : 'bottom-line'"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter-btn" @click="filterOpen">
|
||||||
|
筛选
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 普通弹窗 -->
|
||||||
|
<uni-popup ref="popup" style="z-index: 10000" type="bottom" >
|
||||||
|
<view class="popup-content dialog" :class="{'popup-height': type === 'left' || type === 'right' }">
|
||||||
|
<view class="filter-line1">
|
||||||
|
<view class="label">任务名称</view>
|
||||||
|
<input type="text" v-model="queryParams.taskName"></input>
|
||||||
|
</view>
|
||||||
|
<view class="filter-line1">
|
||||||
|
<view class="label">日期</view>
|
||||||
|
<view class="example-body">
|
||||||
|
<uni-datetime-picker type="date" :clear-icon="true" v-model="queryParams.taskDate" @maskClick="maskClick" @change="timeChange($event)"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter-line2">
|
||||||
|
<view class="reset-btn" @click="reset()">重置</view>
|
||||||
|
<view class="submit-btn" @click="search">确定</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
<!-- <uni-popup style="z-index: 10000" ref="popup" type="bottom" border-radius="10px 10px 0 0">-->
|
||||||
|
<!-- <view class="selectContext">-->
|
||||||
|
<!-- <view class="select-item" @click="filter(0)">全部任务</view>-->
|
||||||
|
<!-- <view class="select-item" @click="filter(1)">进行中的任务</view>-->
|
||||||
|
<!-- <view class="select-item" @click="filter(2)">已结束的任务</view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </uni-popup>-->
|
||||||
|
|
||||||
|
<!-- <uni-collapse-item>-->
|
||||||
|
<!-- <view class="content">-->
|
||||||
|
<!-- <text class="text">折叠内容主体,这是一段比较长内容。默认折叠主要内容,只显示当前项标题。点击标题展开,才能看到这段文字。再次点击标题,折叠内容。</text>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </uni-collapse-item>-->
|
||||||
|
|
||||||
|
<scroll-view v-if="nowTab==1" class="xinchou-list"
|
||||||
|
:scroll-top="scrollTop"
|
||||||
|
scroll-y="true"
|
||||||
|
:refresher-enabled="isOpenRefresh"
|
||||||
|
:refresher-triggered="triggered"
|
||||||
|
@refresherrefresh="refresh"
|
||||||
|
@scrolltoupper="upper"
|
||||||
|
@scroll="scroll"
|
||||||
|
@scrolltolower="loadMore"
|
||||||
|
@refresherpulling="onPulling">
|
||||||
|
<view class="card" @click="goDetails(task)" v-for="(task, index) in taskList" :key="index">
|
||||||
|
<view class="line1">
|
||||||
|
<view class="task-name">
|
||||||
|
{{task.taskName}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="line2">
|
||||||
|
<view class="date-icon"></view>
|
||||||
|
<view class="date">用工日期:{{task.taskDate}}</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="day-price">
|
||||||
|
<view class="day-price-icon"></view>
|
||||||
|
日结单价
|
||||||
|
</view>
|
||||||
|
<view class="price">
|
||||||
|
¥{{task.dayPrice}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="card-container">
|
||||||
|
<view class="line3">
|
||||||
|
|
||||||
|
<view class="num-container">
|
||||||
|
<view class="num-label">
|
||||||
|
签到人数
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.signNum}}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="num-container">
|
||||||
|
<view class="num-label">
|
||||||
|
应发总额
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.yfPrice}}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="num-container">
|
||||||
|
<view class="num-label">
|
||||||
|
实发总额
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.sfPrice}}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="num-container">
|
||||||
|
<view class="num-label">
|
||||||
|
待发总额
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{task.dfPrice}}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="line4">
|
||||||
|
<view class="line4-1">
|
||||||
|
<view class="line4-1-1">
|
||||||
|
<view class="icon"></view>
|
||||||
|
<view class="text">发薪笔数 {{task.yfNum}}</view>
|
||||||
|
<view class="text">实发笔数 {{task.sfNum}}</view>
|
||||||
|
<view class="text">待发笔数 {{task.dfNum}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="line4-1-2">
|
||||||
|
<view class="icon"></view>
|
||||||
|
<view class="date-label">发布时间: {{task.createTime}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="showLoading" class="load-more">加载中...</view>
|
||||||
|
<view v-if="showNoMore" class="no-more">没有更多数据了</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<scroll-view v-if="nowTab == 2" class="fund-record"
|
||||||
|
:scroll-top="scrollTop"
|
||||||
|
scroll-y="true"
|
||||||
|
:refresher-enabled="isOpenRefresh"
|
||||||
|
:refresher-triggered="triggered"
|
||||||
|
@refresherrefresh="refresh"
|
||||||
|
@scrolltoupper="upper"
|
||||||
|
@scroll="scroll"
|
||||||
|
@scrolltolower="loadMore"
|
||||||
|
@refresherpulling="onPulling">
|
||||||
|
|
||||||
|
<view class="fund-item" v-for="(task, index) in taskList">
|
||||||
|
<view class="fund-item-title">
|
||||||
|
<view class="task-name"> {{task.taskName}} </view>
|
||||||
|
<view class="date"> {{task.taskDate}}</view>
|
||||||
|
<view class="dj">日结单价(元):<view>{{task.dayPrice}}</view></view>
|
||||||
|
</view>
|
||||||
|
<view class="fund-item-tbl">
|
||||||
|
|
||||||
|
<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
|
||||||
|
<uni-tr>
|
||||||
|
<uni-th width="80" align="center">用工姓名</uni-th>
|
||||||
|
<uni-th width="107" align="center">手机号码</uni-th>
|
||||||
|
<uni-th width="80" align="center">发薪状态</uni-th>
|
||||||
|
<!-- <uni-th width="80" align="center">实发金额</uni-th>-->
|
||||||
|
<uni-th width="80" align="center">应发金额</uni-th>
|
||||||
|
<uni-th width="162" align="center">身份证号</uni-th>
|
||||||
|
<uni-th width="200" align="center">备注</uni-th>
|
||||||
|
</uni-tr>
|
||||||
|
<uni-tr v-for="(sign, i) in task.listSign" :key="i" v-if="sign.status == 1">
|
||||||
|
<uni-td width="80" align="center">{{ sign.employeeName }}</uni-td>
|
||||||
|
<uni-td width="90" align="center">{{ sign.phone }}</uni-td>
|
||||||
|
<uni-td width="80" align="center"><view class="status"><view :class="'status' + getPayStatus(sign).status"></view></view></uni-td>
|
||||||
|
<uni-td width="80" align="center">{{ sign.stEmployeeFundRecord == null ? 0 : sign.stEmployeeFundRecord.realPrice }}</uni-td>
|
||||||
|
<!-- <uni-td width="80" align="center">{{ task.dayPrice }}</uni-td>-->
|
||||||
|
<uni-td width="162" align="center">{{ sign.idCard }}</uni-td>
|
||||||
|
<uni-td width="200" align="center">{{ sign.remark == null ? "无" : sign.remark}}</uni-td>
|
||||||
|
<!-- <uni-td>-->
|
||||||
|
<!-- <view class="name">{{ item.name }}</view>-->
|
||||||
|
<!-- </uni-td>-->
|
||||||
|
<!-- <uni-td align="center">{{ item.address }}</uni-td>-->
|
||||||
|
<!-- <uni-td>-->
|
||||||
|
<!-- <view class="uni-group">-->
|
||||||
|
<!-- <button class="uni-button" size="mini" type="primary">修改</button>-->
|
||||||
|
<!-- <button class="uni-button" size="mini" type="warn">删除</button>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </uni-td>-->
|
||||||
|
</uni-tr>
|
||||||
|
</uni-table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view v-if="showLoading" class="load-more">加载中...</view>
|
||||||
|
<view v-if="showNoMore" class="no-more">没有更多数据了</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskList } from "@/api/task";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
titleTop: {type: Number},
|
||||||
|
nowTab1: {type: Number},
|
||||||
|
statusBarHeight: {type: Number}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
nowTab1(newValue) {
|
||||||
|
// 处理逻辑
|
||||||
|
this.nowTab = newValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// titleTop: 0,
|
||||||
|
// statusBarHeight: 0,
|
||||||
|
fundRecord: [],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
dateStatus: 0,
|
||||||
|
taskName: null,
|
||||||
|
taskDate: null,
|
||||||
|
},
|
||||||
|
taskList: [],
|
||||||
|
nowTab: this.nowTab1,
|
||||||
|
realName: "",
|
||||||
|
// 是否显示加载更多的loading
|
||||||
|
showLoading: false,
|
||||||
|
// 是否显示无更多数据提示
|
||||||
|
showNoMore: false,
|
||||||
|
triggered: false,
|
||||||
|
isOpenRefresh: true,
|
||||||
|
containerScrollTop: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created: function() {
|
||||||
|
this.getList();
|
||||||
|
this.realName = this.$store.state.user.nickName
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onPageScroll(e){
|
||||||
|
this.containerScrollTop = e.scrollTop
|
||||||
|
if (this.containerScrollTop > 0){
|
||||||
|
this.isOpenRefresh = false
|
||||||
|
}else{
|
||||||
|
this.isOpenRefresh = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom(e){
|
||||||
|
if (this.showLoading || this.showNoMore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 显示加载更多的loading
|
||||||
|
this.showLoading = true;
|
||||||
|
// 请求数据
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
// 刷新函数
|
||||||
|
refresh() {
|
||||||
|
// 请求数据
|
||||||
|
this.triggered = true;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
upper(){
|
||||||
|
// console.log("upper")
|
||||||
|
},
|
||||||
|
scroll(e){
|
||||||
|
// console.log("scroll", e.detail)
|
||||||
|
},
|
||||||
|
onPulling(e) {
|
||||||
|
// console.log("onpulling", e.detail);
|
||||||
|
if (e.detail.dy < 8) return // 防止上滑页面也触发下拉
|
||||||
|
this.triggered = true;
|
||||||
|
},
|
||||||
|
// 加载更多函数
|
||||||
|
loadMore() {
|
||||||
|
// console.log("loadMore")
|
||||||
|
// 判断是否正在加载更多或已经没有更多数据
|
||||||
|
if (this.showLoading || this.showNoMore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 显示加载更多的loading
|
||||||
|
this.showLoading = true;
|
||||||
|
// 请求数据
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
goDetails(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "../fundDetails?id=" + item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
if (this.showNoMore && this.queryParams.pageNum > 1){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var that = this;
|
||||||
|
getTaskList(this.queryParams).then(response => {
|
||||||
|
if (that.queryParams.pageNum > 1){
|
||||||
|
that.taskList = that.taskList.concat(response.rows);
|
||||||
|
}else{
|
||||||
|
that.taskList = response.rows;
|
||||||
|
}
|
||||||
|
that.queryParams.pageNum++;
|
||||||
|
if (response.rows.length < this.queryParams.pageSize){
|
||||||
|
that.showNoMore = true;
|
||||||
|
}else{
|
||||||
|
that.showNoMore = false;
|
||||||
|
}
|
||||||
|
that.showLoading = false;
|
||||||
|
that.triggered = false;
|
||||||
|
|
||||||
|
that.total = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
filterOpen(){
|
||||||
|
this.$refs.popup.open('bottom')
|
||||||
|
},
|
||||||
|
search(){
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
this.$refs.popup.close();
|
||||||
|
},
|
||||||
|
reset(){
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.taskName = null;
|
||||||
|
this.queryParams.taskDate = null;
|
||||||
|
this.getList();
|
||||||
|
this.$refs.popup.close();
|
||||||
|
},
|
||||||
|
timeChange(e) {
|
||||||
|
this.queryParams.taskDate = e;
|
||||||
|
},
|
||||||
|
tabChange(tab){
|
||||||
|
this.nowTab = tab;
|
||||||
|
},
|
||||||
|
getPayStatus(sign){
|
||||||
|
if (sign.stEmployeeFundRecord == null || sign.stEmployeeFundRecord.payStatus == 0){
|
||||||
|
return {"text": "未发放", "status": 0};
|
||||||
|
}
|
||||||
|
if (sign.stEmployeeFundRecord.payStatus == 1){
|
||||||
|
return {"text": "已发放", "status": 1};
|
||||||
|
}
|
||||||
|
if (sign.stEmployeeFundRecord.payStatus == 2){
|
||||||
|
return {"text": "发放失败", "status": 2};
|
||||||
|
}
|
||||||
|
return {"text": "未发放", "status": 0};
|
||||||
|
},
|
||||||
|
my(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "../my"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.table-thead {
|
||||||
|
/*background-color: #FFFAF2 !important;*/
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
.uni-table-th{
|
||||||
|
background-color: #f3f3f3 ;
|
||||||
|
}
|
||||||
|
.uni-table-td{
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
/deep/ .uni-table-tr {
|
||||||
|
overflow: visible;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
//固定表头第一列
|
||||||
|
/deep/ .uni-table-tr .uni-table-th:first-child, {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
/*background-color: #FFFAF2;*/
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
//固定表头第2列(需计算第一列宽度,我这里是200rpx)
|
||||||
|
/*/deep/ .uni-table-tr .uni-table-th:nth-child(2), {*/
|
||||||
|
/* position: sticky;*/
|
||||||
|
/* left: 200rpx;*/
|
||||||
|
/* top: 0;*/
|
||||||
|
/* background-color: #FFFAF2;*/
|
||||||
|
/* z-index: 10;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
//冻结thead第一列
|
||||||
|
/deep/ .uni-table-tr .uni-table-td:first-child {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
//冻结thead第二列(需计算第一列宽度)
|
||||||
|
/*/deep/ .uni-table-tr .uni-table-td:nth-child(2) {*/
|
||||||
|
/* position: sticky;*/
|
||||||
|
/* left: 200rpx;*/
|
||||||
|
/* top: 0;*/
|
||||||
|
/* background-color: #fff;*/
|
||||||
|
/* z-index: 10;*/
|
||||||
|
/*}*/
|
||||||
|
html, body {
|
||||||
|
background-color: #ffffff;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
page{
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
.load-more, .no-more {
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
padding: 10rpx;
|
||||||
|
color: #999;
|
||||||
|
height: 80rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: 25rpx;
|
||||||
|
color: #000000;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 90rpx;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.topView{
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 10rpx 0 20rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: #ffffff;
|
||||||
|
.headImg{
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/wode.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.xinchou-container{
|
||||||
|
background-image:url('http://8.155.21.176:9000/yonggong/images/bg.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
.top-tab{
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding-left: 30rpx;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
border-top: #dcdcdc solid 1rpx;
|
||||||
|
/*margin-bottom: 10rpx;*/
|
||||||
|
.tab{
|
||||||
|
width: 90%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 80rpx;
|
||||||
|
/*justify-content: center;*/
|
||||||
|
|
||||||
|
.item-container{
|
||||||
|
width: 200rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.item{
|
||||||
|
width: 190rpx;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
|
||||||
|
.tab-title-focus{
|
||||||
|
/*width: 100%;*/
|
||||||
|
height: 50rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 550;
|
||||||
|
font-size: 30rpx;
|
||||||
|
/*color: #519fef;*/
|
||||||
|
}
|
||||||
|
.bottom-line-focus{
|
||||||
|
height: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 90rpx;
|
||||||
|
/*background-color: #519fef;*/
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/now-page-line.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-title{
|
||||||
|
/*width: 100%;*/
|
||||||
|
height: 50rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 550;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.bottom-line{
|
||||||
|
height: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-btn{
|
||||||
|
width: 10%;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 550;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.xinchou-list{
|
||||||
|
width: 100%;
|
||||||
|
padding: 0rpx 15rpx 0rpx 15rpx;
|
||||||
|
/*background-color: #e3e3e3;*/
|
||||||
|
height: calc(100% - 170rpx);
|
||||||
|
.card{
|
||||||
|
background-image:url('http://8.155.21.176:9000/yonggong/m-images/fxlist/item-bg.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
/*box-shadow: 2px 2px 5px rgba(0,0,0,0.5);*/
|
||||||
|
padding: 40rpx 25rpx 40rpx 25rpx;
|
||||||
|
margin: 10rpx 0rpx 10rpx 0rpx;
|
||||||
|
.line1{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 30rpx 0 30rpx;
|
||||||
|
/*justify-content: center;*/
|
||||||
|
.task-name{
|
||||||
|
font-size: 40rpx;
|
||||||
|
width: 80%; /* 设置div的宽度 */
|
||||||
|
white-space: nowrap; /* 防止文本换行 */
|
||||||
|
overflow: hidden; /* 隐藏超出div的内容 */
|
||||||
|
text-overflow: ellipsis; /* 显示省略号来代表被截断的内容 */
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 550rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.line2{
|
||||||
|
width: 100%;
|
||||||
|
/*height: 100rpx;*/
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
margin-top: -10rpx;
|
||||||
|
padding: 0 30rpx 0 30rpx;
|
||||||
|
/*justify-content: center;*/
|
||||||
|
.date-icon{
|
||||||
|
width: 23rpx;
|
||||||
|
height: 23rpx;
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/date-icon.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
margin-bottom: 5rpx;
|
||||||
|
}
|
||||||
|
.date{
|
||||||
|
font-size: 23rpx;
|
||||||
|
color: #e2e2e2;
|
||||||
|
font-weight: 100rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.day-price{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 23rpx;
|
||||||
|
.day-price-icon{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/dj-icon.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 23rpx;
|
||||||
|
height: 23rpx;
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 23rpx;
|
||||||
|
color: #e2e2e2;
|
||||||
|
font-weight: 100rpx;
|
||||||
|
line-height: 23rpx;
|
||||||
|
}
|
||||||
|
.price{
|
||||||
|
margin-left: 10rpx;
|
||||||
|
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC', sans-serif;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 58rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-container{
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
.line3{
|
||||||
|
height: 130rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-bottom: 1rpx solid #dbdbdb;
|
||||||
|
padding-bottom: 15rpx;
|
||||||
|
|
||||||
|
.num-container{
|
||||||
|
width: 25%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
.num-label{
|
||||||
|
margin-top: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 23rpx;
|
||||||
|
color: #979696;
|
||||||
|
}
|
||||||
|
.num{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 40rpx;
|
||||||
|
overflow: hidden; /* 隐藏超出div的内容 */
|
||||||
|
text-overflow: ellipsis; /* 显示省略号来代表被截断的内容 */
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.line4{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
.line4-1{
|
||||||
|
.line4-1-1{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
/*justify-content: center;*/
|
||||||
|
.icon{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/clock-icon.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 23rpx;
|
||||||
|
height: 23rpx;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
margin-left: 5rpx;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
font-size: 23rpx;
|
||||||
|
color: #979696;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.line4-1-2{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
/*justify-content: center;*/
|
||||||
|
margin-top: 10rpx;
|
||||||
|
.icon{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/clock-icon.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 23rpx;
|
||||||
|
height: 23rpx;
|
||||||
|
}
|
||||||
|
.date-label{
|
||||||
|
color: #979696;
|
||||||
|
margin-left: 5rpx;
|
||||||
|
font-size: 23rpx;
|
||||||
|
color: #979696;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.button{
|
||||||
|
/*background-color: #11a9ee;*/
|
||||||
|
/*color: #ffffff;*/
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
/*border-radius: 10rpx;*/
|
||||||
|
width: 170rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: auto; /* 推动元素到右边 */
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/js-btn.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fund-record{
|
||||||
|
|
||||||
|
height: calc(100% - 170rpx);
|
||||||
|
width: 100%;
|
||||||
|
.fund-item{
|
||||||
|
margin-top: 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 30rpx 30rpx 30rpx 30rpx;
|
||||||
|
.fund-item-title{
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
color: #454545;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.task-name{
|
||||||
|
font-weight: 550;
|
||||||
|
font-size: 30rpx;
|
||||||
|
max-width: 300rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden; /* 隐藏超出div的内容 */
|
||||||
|
text-overflow: ellipsis; /* 显示省略号来代表被截断的内容 */
|
||||||
|
}
|
||||||
|
.date{
|
||||||
|
margin-left: 10rpx;
|
||||||
|
color: #979797;
|
||||||
|
font-size: 23rpx;
|
||||||
|
}
|
||||||
|
.dj{
|
||||||
|
margin-left: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 25rpx;
|
||||||
|
view{
|
||||||
|
color: #FF0000;
|
||||||
|
line-height: 25rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popup__wrapper{
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.dialog {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 50rpx;
|
||||||
|
display: grid;
|
||||||
|
/*place-items: flex-start;*/
|
||||||
|
border-radius: 10rpx 10rpx 0 0 ;
|
||||||
|
background-color: #ffffff;
|
||||||
|
.filter-line1{
|
||||||
|
width: 80%;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.label{
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
width: 70%;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
height: 55rpx !important;
|
||||||
|
line-height: 55rpx !important;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.uni-date-x{
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
.uni-date__x-input{
|
||||||
|
height: 55rpx !important;
|
||||||
|
line-height: 55rpx !important;
|
||||||
|
}
|
||||||
|
.uni-date-x--border{
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
.example-body{
|
||||||
|
width: 70%;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.filter-line2{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
border-top: 1rpx solid #cecece;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
.reset-btn{
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 180rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.submit-btn{
|
||||||
|
background-color: #11a9ee;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 250rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: auto; /* 推动元素到右边 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.status{
|
||||||
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
.status0{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fundrecord/wf.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
}
|
||||||
|
.status1{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fundrecord/yf.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
}
|
||||||
|
.status2{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fundrecord/paystatus-2.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
}
|
||||||
|
.status3{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fundrecord/paystatus-3.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.vue-ref{
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
320
pages/employee/fundDetails.vue
Normal file
@ -0,0 +1,320 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<!-- pages/index/index.wxml -->
|
||||||
|
<view class="fund-details">
|
||||||
|
|
||||||
|
<checkbox-group @change="checkbox">
|
||||||
|
<view class="fund-card" v-for="(sign, index) in listSign" >
|
||||||
|
<view class="fc-line1">
|
||||||
|
<view class="fc-head">
|
||||||
|
{{sign.employeeName.charAt(0)}}
|
||||||
|
</view>
|
||||||
|
<view class="fc-line1-right">
|
||||||
|
<view class="fc-line1-right-line1">
|
||||||
|
<view class="em-name">
|
||||||
|
{{sign.employeeName}}
|
||||||
|
</view>
|
||||||
|
<view :class="'pay-status' + getPayStatus(sign).status" class="pay-status">
|
||||||
|
{{getPayStatus(sign).text}}
|
||||||
|
</view>
|
||||||
|
<checkbox v-if="getPayStatus(sign).status == 0" class="checkbox" :value="sign.id" :checked="sign.c"></checkbox>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="fc-line1-right-line2">
|
||||||
|
<view>手机: {{sign.phone}}</view>
|
||||||
|
<view>身份证: {{sign.idCard}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="fc-line2">
|
||||||
|
<view>
|
||||||
|
任务日期:{{task.taskDate}}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
日结单价:¥{{task.dayPrice}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="fc-line2">
|
||||||
|
<view>
|
||||||
|
应发金额:¥{{task.dayPrice}}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
实发金额:¥{{ sign.stEmployeeFundRecord == null ? 0 : sign.stEmployeeFundRecord.realPrice }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="fc-line3">
|
||||||
|
{{sign.remark}}
|
||||||
|
</view>
|
||||||
|
<view class="fc-line4">
|
||||||
|
<view class="fx-btn" :class="getPayStatus(sign).status == 0 ? 'btn-status1': 'btn-status2'" @click="faxin(sign)">发薪</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</checkbox-group>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="fd-bottom">
|
||||||
|
<view class="all-select" @click="allSelect">全选</view>
|
||||||
|
<view class="all-pay" @click="allPay">批量发薪</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskDetails, setSign } from "@/api/employee/task";
|
||||||
|
// import { getCodeImg } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
id: null,
|
||||||
|
},
|
||||||
|
task: {
|
||||||
|
},
|
||||||
|
listSign:[],
|
||||||
|
signInfo: {},
|
||||||
|
items: [{"id":1, "checked": false}, {"id":2, "checked": false}, {"id":3, "checked": false}],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function(options) {
|
||||||
|
this.queryParams.id = options.id;
|
||||||
|
this.getInfo();
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getInfo() {
|
||||||
|
var that = this;
|
||||||
|
getTaskDetails(this.queryParams).then(response => {
|
||||||
|
that.task = response.data;
|
||||||
|
that.listSign = that.task.listSign;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
allSelect() {
|
||||||
|
let checked = !this.listSign[0].c
|
||||||
|
for (let i = 0; i < this.listSign.length; i++) {
|
||||||
|
if (this.getPayStatus(this.listSign[i]).status == 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
this.listSign[i].c = checked;
|
||||||
|
this.listSign[i].employeeName = this.listSign[i].employeeName + " ";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
allPay() {
|
||||||
|
for (let i = 0; i < this.listSign.length; i++) {
|
||||||
|
if (this.getPayStatus(this.listSign[i]).status == 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (this.listSign[i].c){
|
||||||
|
console.log("掉起支付" + this.listSign[i].employeeName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getPayStatus(sign) {
|
||||||
|
if (sign.stEmployeeFundRecord == null || sign.stEmployeeFundRecord.payStatus == 0) {
|
||||||
|
return {"text": "待发放", "status": 0};
|
||||||
|
}
|
||||||
|
if (sign.stEmployeeFundRecord.payStatus == 1) {
|
||||||
|
return {"text": "发放成功", "status": 1};
|
||||||
|
}
|
||||||
|
if (sign.stEmployeeFundRecord.payStatus == 2) {
|
||||||
|
return {"text": "发放失败", "status": 2};
|
||||||
|
}
|
||||||
|
return {"text": "待发放", "status": 0};
|
||||||
|
},
|
||||||
|
checkbox(e) {
|
||||||
|
console.log(e.detail.value); // 输出选中的值
|
||||||
|
},
|
||||||
|
faxin(sign) {
|
||||||
|
if(this.getPayStatus(sign).status == 1){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//掉起支付
|
||||||
|
console.log("掉起支付" + sign.employeeName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
.fund-details{
|
||||||
|
padding: 0rpx 20rpx 0rpx 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fund-card{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
.fc-line1{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 150rpx;
|
||||||
|
border-bottom: 1rpx solid #dbdbdb;
|
||||||
|
.fc-head{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 38rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 60rpx;
|
||||||
|
background-color: #4ac5f6;
|
||||||
|
}
|
||||||
|
.fc-line1-right{
|
||||||
|
width: 80%;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
.fc-line1-right-line1{
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.em-name{
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
.pay-status{
|
||||||
|
margin-left: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
/*font-weight: 650;*/
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.pay-status0{
|
||||||
|
color: #f58c18;
|
||||||
|
background-color: #efe1ca;
|
||||||
|
}
|
||||||
|
.pay-status1{
|
||||||
|
color: #55b46a;
|
||||||
|
background-color: #e6efca;
|
||||||
|
}
|
||||||
|
.pay-status2{
|
||||||
|
color: #d90101;
|
||||||
|
background-color: #c2a4a4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox{
|
||||||
|
margin-left: auto;
|
||||||
|
transform: scale(0.7);
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.fc-line1-right-line2{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #787878;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
view{
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.fc-line2{
|
||||||
|
margin-top: 15rpx;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #787878;
|
||||||
|
view{
|
||||||
|
width: 50%;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fc-line3{
|
||||||
|
color: #908f8f;
|
||||||
|
background-color: #efefef;
|
||||||
|
margin: 20rpx 0 20rpx 0;
|
||||||
|
padding: 20rpx 40rpx 20rpx 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.fc-line4{
|
||||||
|
.fx-btn{
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 200rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: auto; /* 推动元素到右边 */
|
||||||
|
}
|
||||||
|
.btn-status1{
|
||||||
|
background-color: #107ff6;
|
||||||
|
}
|
||||||
|
.btn-status2{
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*<view class="fd-bottom">*/
|
||||||
|
/*<view class="all-select">全选</view>*/
|
||||||
|
/*<view class="all-pay">批量发薪</view>*/
|
||||||
|
/*</view>*/
|
||||||
|
.fd-bottom{
|
||||||
|
background-color: #ffffff;
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
position: absolute;
|
||||||
|
bottom: env(safe-area-inset-bottom);
|
||||||
|
left: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
padding: 0rpx 70rpx 0rpx 70rpx;
|
||||||
|
.all-select{
|
||||||
|
width: 50%;
|
||||||
|
color: #107ff6;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 200rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 1rpx solid #107ff6;
|
||||||
|
}
|
||||||
|
.all-pay{
|
||||||
|
width: 50%;
|
||||||
|
background-color: #107ff6;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 200rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: auto; /* 推动元素到右边 */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
166
pages/employee/my.vue
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
|
||||||
|
<view class="info">
|
||||||
|
<view class="head">
|
||||||
|
{{param.realName == null ? "" : param.realName.charAt(0)}}
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<view class="name">
|
||||||
|
{{param.realName}}
|
||||||
|
</view>
|
||||||
|
<view class="phone" @click="setInfo">
|
||||||
|
个人信息 >
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="menu-list">
|
||||||
|
<view class="list-cell list-cell-arrow" @click="jumpFw()">
|
||||||
|
<view class="menu-item-box">
|
||||||
|
<view>服务协议</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list-cell list-cell-arrow" @click="jumpYs()">
|
||||||
|
<view class="menu-item-box">
|
||||||
|
<!-- <view class="iconfont icon-help menu-icon"></view>-->
|
||||||
|
<view>隐私政策</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="exit" @click="logout">退出登录</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskList } from "@/api/employee/task";
|
||||||
|
import { logout } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
param: {
|
||||||
|
realName: null,
|
||||||
|
phone: null,
|
||||||
|
idCard: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function() {
|
||||||
|
this.param.realName = this.$store.state.user.nickName
|
||||||
|
this.param.idCard = this.$store.state.user.idCard
|
||||||
|
this.param.phone = this.$store.state.user.phone
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
this.param.realName = this.$store.state.user.nickName
|
||||||
|
this.param.idCard = this.$store.state.user.idCard
|
||||||
|
this.param.phone = this.$store.state.user.phone
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
toDate(str){
|
||||||
|
|
||||||
|
},
|
||||||
|
setInfo(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "setInfo"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
logout(){
|
||||||
|
logout().then(response => {
|
||||||
|
uni.reLaunch({ url: "../wxlogin" })
|
||||||
|
});
|
||||||
|
}
|
||||||
|
,
|
||||||
|
jumpFw(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/fw"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
jumpYs(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/ys"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
/*<view class="info">*/
|
||||||
|
/* <view class="head">*/
|
||||||
|
|
||||||
|
/* </view>*/
|
||||||
|
/* <view class="right">*/
|
||||||
|
/* <view class="name">*/
|
||||||
|
/* 员工姓名*/
|
||||||
|
/* </view>*/
|
||||||
|
/* <view class="phone">*/
|
||||||
|
/* 13184998794*/
|
||||||
|
/* </view>*/
|
||||||
|
/* </view>*/
|
||||||
|
/*</view>*/
|
||||||
|
|
||||||
|
|
||||||
|
.info {
|
||||||
|
height: 180rpx;
|
||||||
|
/*background-color: #d7d6d6;*/
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
padding: 0rpx 40rpx 0rpx 40rpx;
|
||||||
|
.head{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 47rpx;
|
||||||
|
border-radius: 60rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #4ac5f6;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
display: grid;
|
||||||
|
align-items: start; /* 垂直靠左 */
|
||||||
|
justify-content: center; /* 水平居中 */
|
||||||
|
height: 100rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
grid-template-rows: 50% 50%;
|
||||||
|
.name{
|
||||||
|
font-weight: 350;
|
||||||
|
font-size: 38rpx;
|
||||||
|
}
|
||||||
|
.phone{
|
||||||
|
margin-top: 18rpx;
|
||||||
|
color: #717171;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.exit{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
height: 100rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
color: #d00303;
|
||||||
|
font-size: 35rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-list {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
163
pages/employee/setInfo.vue
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
|
||||||
|
<view class="bm-info">
|
||||||
|
<view class="line">
|
||||||
|
<view class="label">
|
||||||
|
姓名<i></i>
|
||||||
|
</view>
|
||||||
|
:<input type="input" v-model="param.realName" placeholder="请输入姓名"/>
|
||||||
|
</view>
|
||||||
|
<view class="line">
|
||||||
|
<view class="label">
|
||||||
|
手机号<i></i>
|
||||||
|
</view>
|
||||||
|
:<input type="input" class="phone-input" v-model="param.phone" placeholder="请输入手机号" disabled/>
|
||||||
|
</view>
|
||||||
|
<view class="line">
|
||||||
|
<view class="label">
|
||||||
|
身份证号<i></i>
|
||||||
|
</view>
|
||||||
|
:<input type="input" v-model="param.idCard" placeholder="请输入身份证号"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bm-bottom">
|
||||||
|
<view class="bm-btn" @click="save">保存</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<!-- 提示信息弹窗 -->
|
||||||
|
<uni-popup ref="message" type="message">
|
||||||
|
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateUserProfile } from "@/api/employee/system/user";
|
||||||
|
// import { getCodeImg } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
param: {
|
||||||
|
realName: null,
|
||||||
|
phone: null,
|
||||||
|
idCard: null,
|
||||||
|
},
|
||||||
|
type: 'center',
|
||||||
|
msgType: 'success',
|
||||||
|
messageText: '这是一条成功提示',
|
||||||
|
value: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function(options) {
|
||||||
|
this.param.realName = this.$store.state.user.nickName
|
||||||
|
this.param.idCard = this.$store.state.user.idCard
|
||||||
|
this.param.phone = this.$store.state.user.phone
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
save(){
|
||||||
|
if (this.param.realName == null || this.param.realName == ''){
|
||||||
|
wx.showToast({
|
||||||
|
title: '请填写姓名',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.param.idCard == null || this.param.idCard.length != 18){
|
||||||
|
wx.showToast({
|
||||||
|
title: '请填写正确的身份证号',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
updateUserProfile(this.param).then(response => {
|
||||||
|
this.messageToggle('success')
|
||||||
|
// 设置用户信息
|
||||||
|
this.$store.dispatch('GetInfo').then(res => {
|
||||||
|
this.param.realName = this.$store.state.user.nickName
|
||||||
|
this.param.idCard = this.$store.state.user.idCard
|
||||||
|
this.param.phone = this.$store.state.user.phone
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
messageToggle(type) {
|
||||||
|
this.msgType = type
|
||||||
|
this.messageText = `保存成功`
|
||||||
|
this.$refs.message.open()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
.task-name{
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
.bm-info{
|
||||||
|
margin-top: 70rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 10rpx 30rpx 10rpx 30rpx;
|
||||||
|
.line{
|
||||||
|
border-bottom: 1rpx solid #dbdbdb;
|
||||||
|
height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.label{
|
||||||
|
width: 18%;
|
||||||
|
height: 40rpx;
|
||||||
|
text-align: justify;
|
||||||
|
|
||||||
|
i{
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input{
|
||||||
|
/*width: 80%;*/
|
||||||
|
margin-left: 40rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.line:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.phone-input{
|
||||||
|
color: #979595;
|
||||||
|
}
|
||||||
|
.bm-bottom{
|
||||||
|
position: absolute;
|
||||||
|
bottom: calc(env(safe-area-inset-bottom) + 40rpx);
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
.bm-btn{
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #107ff6;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 7rpx;
|
||||||
|
height: 75rpx;
|
||||||
|
text-align: center;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
330
pages/employee/taskDetails.vue
Normal file
@ -0,0 +1,330 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<!-- pages/index/index.wxml -->
|
||||||
|
<view class="container-details">
|
||||||
|
|
||||||
|
<view class="head">
|
||||||
|
<view class="bm-num">
|
||||||
|
<view class="num">
|
||||||
|
{{task.baomingNum}}
|
||||||
|
</view>
|
||||||
|
<view class="num-label">
|
||||||
|
报名人数
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="sign-num">
|
||||||
|
<view class="num">
|
||||||
|
{{task.signNum}}
|
||||||
|
</view>
|
||||||
|
<view class="num-label">
|
||||||
|
已到人数
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="no-num">
|
||||||
|
<view class="num">
|
||||||
|
{{task.baomingNum - task.signNum}}
|
||||||
|
</view>
|
||||||
|
<view class="num-label">
|
||||||
|
未到人数
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<view v-for="(item, index) in task.listSign" :key="index" class="item" @click="setInfo(item)">
|
||||||
|
|
||||||
|
<view class="status">
|
||||||
|
<uni-icons v-if="item.status == 1" class="icon" color="#11dc03" type="checkbox-filled" size="20" @click="search"></uni-icons>
|
||||||
|
<uni-icons v-if="item.status == 0" class="icon" color="red" type="clear" size="20" @click="search"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="headImg">
|
||||||
|
{{item.employeeName}}
|
||||||
|
</view>
|
||||||
|
<view class="phone">
|
||||||
|
{{item.phone}}
|
||||||
|
</view>
|
||||||
|
<view class="remark">
|
||||||
|
{{item.remark == null ? "备注说明文案" : item.remark}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<!-- 普通弹窗 -->
|
||||||
|
<uni-popup ref="popup" background-color="#fff">
|
||||||
|
<view class="popup-content dialog" :class="{'popup-height': type === 'left' || type === 'right' }">
|
||||||
|
<view class="name">
|
||||||
|
{{signInfo.employeeName}}
|
||||||
|
</view>
|
||||||
|
<view class="phone">
|
||||||
|
{{signInfo.phone}}
|
||||||
|
</view>
|
||||||
|
<view class="remark">
|
||||||
|
<textarea placeholder="请输入备注说明" v-model="signInfo.remark" >
|
||||||
|
|
||||||
|
</textarea>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="weidao" @click="sign(0)">
|
||||||
|
未到
|
||||||
|
</view>
|
||||||
|
<view class="yidao" @click="sign(1)">
|
||||||
|
已到
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskDetails, setSign } from "@/api/employee/task";
|
||||||
|
// import { getCodeImg } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
id: null,
|
||||||
|
},
|
||||||
|
task: {},
|
||||||
|
title: "任务名称",
|
||||||
|
signInfo: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function(options) {
|
||||||
|
this.queryParams.id = options.id;
|
||||||
|
this.getInfo();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods:{
|
||||||
|
getInfo() {
|
||||||
|
var that = this;
|
||||||
|
getTaskDetails(this.queryParams).then(response => {
|
||||||
|
console.log(response)
|
||||||
|
that.task = response.data;
|
||||||
|
|
||||||
|
let title = "【"+ that.task.taskName +"】人员详情";
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: title
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setInfo(item){
|
||||||
|
this.$refs.popup.open('center')
|
||||||
|
this.signInfo = item;
|
||||||
|
},
|
||||||
|
sign(status){
|
||||||
|
this.signInfo.status = status;
|
||||||
|
setSign(this.signInfo);
|
||||||
|
this.$refs.popup.close()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
.container-details{
|
||||||
|
background-color: #e3e3e3;
|
||||||
|
}
|
||||||
|
.head{
|
||||||
|
margin-top: 10rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
height: 200rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.no-num{
|
||||||
|
width: 33%;
|
||||||
|
.num{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #ff0008;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 40rpx;
|
||||||
|
}
|
||||||
|
.num-label{
|
||||||
|
margin-top: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bm-num{
|
||||||
|
width: 33%;
|
||||||
|
.num{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #3a8ee6;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 40rpx;
|
||||||
|
}
|
||||||
|
.num-label{
|
||||||
|
margin-top: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sign-num{
|
||||||
|
width: 33%;
|
||||||
|
.num{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #f19b60;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 40rpx;
|
||||||
|
}
|
||||||
|
.num-label{
|
||||||
|
margin-top: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr); /* 创建3个等宽的列 */
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0rpx 10rpx 10rpx 10rpx;
|
||||||
|
place-items: center;
|
||||||
|
.item{
|
||||||
|
position: relative;
|
||||||
|
width: 230rpx;
|
||||||
|
height: 230rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
margin: 10rpx 0 0 0;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
padding: 15rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
.status{
|
||||||
|
position: absolute;
|
||||||
|
top: 7rpx;
|
||||||
|
right: 7rpx;
|
||||||
|
}
|
||||||
|
.headImg{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
font-weight: 650;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 60rpx;
|
||||||
|
background-color: #3a8ee6;
|
||||||
|
}
|
||||||
|
.phone{
|
||||||
|
color: #868686;
|
||||||
|
}
|
||||||
|
.remark{
|
||||||
|
color: #868686;
|
||||||
|
background-color: #e3e3e3;
|
||||||
|
width: 90%;
|
||||||
|
display: grid;
|
||||||
|
text-align: center;
|
||||||
|
place-items: center;
|
||||||
|
font-size: 20rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
white-space: nowrap; /* 防止文本换行 */
|
||||||
|
overflow: hidden; /* 隐藏超出div的内容 */
|
||||||
|
text-overflow: ellipsis; /* 显示省略号来代表被截断的内容 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popup__wrapper{
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
.dialog{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
.name{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 950;
|
||||||
|
font-size: 58rpx;
|
||||||
|
}
|
||||||
|
.phone{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #868686;
|
||||||
|
}
|
||||||
|
.remark{
|
||||||
|
margin-top: 10rpx;
|
||||||
|
width: 92%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #ececec;
|
||||||
|
padding: 20rpx;
|
||||||
|
textarea{
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottom{
|
||||||
|
width: 100%;
|
||||||
|
height: 150rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.weidao{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 70rpx;
|
||||||
|
width: 50%;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
color: #54a0f1;
|
||||||
|
border: 1px solid #54a0f1;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 50rpx 0 50rpx ;
|
||||||
|
}
|
||||||
|
.yidao{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 70rpx;
|
||||||
|
width: 50%;
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #54a0f1;
|
||||||
|
margin: 0 50rpx 0 50rpx ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
@ -6,7 +6,7 @@
|
|||||||
<view class="login-form-content">
|
<view class="login-form-content">
|
||||||
|
|
||||||
<view class="xieyi text-center">
|
<view class="xieyi text-center">
|
||||||
<radio></radio>
|
<radio @click="radioChange" v-model="radio" :checked="radio" ></radio>
|
||||||
<view>
|
<view>
|
||||||
<text class="text-grey1"> 已阅读并同意灵活用工平台 <text>《服务协议》</text> <text>《隐私政策》</text></text>
|
<text class="text-grey1"> 已阅读并同意灵活用工平台 <text>《服务协议》</text> <text>《隐私政策》</text></text>
|
||||||
<text class="text-grey1"> 若您的手机号未注册,将为您注册。</text>
|
<text class="text-grey1"> 若您的手机号未注册,将为您注册。</text>
|
||||||
@ -16,18 +16,19 @@
|
|||||||
|
|
||||||
|
|
||||||
<view class="action-btn">
|
<view class="action-btn">
|
||||||
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">微信授权登录</button>
|
<button v-if="radio" class="login-btn cu-btn block bg-blue lg round" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信授权登录</button>
|
||||||
|
<button v-else="radio" class="login-btn cu-btn block bg-blue lg round" @click="checkgetPhoneNumber">微信授权登录</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCodeImg } from '@/api/login'
|
import { getCodeImg, wxlogin } from '@/api/employee/login'
|
||||||
|
const wxloginApi = require('../utils/wxlogin.js');
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -41,11 +42,16 @@
|
|||||||
password: "admin123",
|
password: "admin123",
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ''
|
uuid: ''
|
||||||
}
|
},
|
||||||
|
radio: false,
|
||||||
|
baoming: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad: function(query) {
|
||||||
|
this.baoming = query.baoming;
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCode()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 用户注册
|
// 用户注册
|
||||||
@ -72,22 +78,84 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取用户授权信息
|
||||||
|
getAuthSetting() {
|
||||||
|
wxloginApi.getAuthSetting()
|
||||||
|
.then((authSetting) => {
|
||||||
|
// 获取到用户授权信息
|
||||||
|
console.log(authSetting);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getPhoneNumber (e) {
|
||||||
|
console.log(e.detail.code) // 动态令牌
|
||||||
|
console.log(e.detail.errMsg) // 回调信息(成功失败都会返回)
|
||||||
|
console.log(e.detail.errno) // 错误码(失败时返回)
|
||||||
|
if (e.detail.errMsg == 'getPhoneNumber:fail user deny'){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var that = this;
|
||||||
|
this.$modal.loading("登录中,请耐心等待...")
|
||||||
|
wxloginApi.login().then((code) => {
|
||||||
|
// 获取到用户的code,发送给服务器进行登录验证
|
||||||
|
console.log("loginCode=", code);
|
||||||
|
that.wxLogin(e.detail.code, code);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log("loginCode=", error);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
checkgetPhoneNumber() {
|
||||||
|
wx.showToast({
|
||||||
|
title: '请阅读并同意用户协议与隐私协议',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
})
|
||||||
|
// this.$modal.msgError("请阅读并同意用户协议与隐私协议")
|
||||||
|
},
|
||||||
|
radioChange(e){
|
||||||
|
this.radio = !this.radio;
|
||||||
|
},
|
||||||
|
|
||||||
// 登录方法
|
// 登录方法
|
||||||
async handleLogin() {
|
async handleLogin() {
|
||||||
if (this.loginForm.username === "") {
|
// if (this.loginForm.radio === false) {
|
||||||
this.$modal.msgError("请输入您的账号")
|
// this.$modal.msgError("请阅读并同意用户协议与隐私协议")
|
||||||
} else if (this.loginForm.password === "") {
|
// } else {
|
||||||
this.$modal.msgError("请输入您的密码")
|
//
|
||||||
} else if (this.loginForm.code === "" && this.captchaEnabled) {
|
// wxloginApi.login().then((code) => {
|
||||||
this.$modal.msgError("请输入验证码")
|
// // 获取到用户的code,发送给服务器进行登录验证
|
||||||
} else {
|
// console.log(code);
|
||||||
this.$modal.loading("登录中,请耐心等待...")
|
// })
|
||||||
this.pwdLogin()
|
// .catch((error) => {
|
||||||
}
|
// console.log(error);
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// wxloginApi.getUserInfo()
|
||||||
|
// .then((userInfo) => {
|
||||||
|
// // 获取到用户信息
|
||||||
|
// console.log(userInfo);
|
||||||
|
// })
|
||||||
|
// .catch((error) => {
|
||||||
|
// console.log(error);
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// this.$modal.loading("登录中,请耐心等待...")
|
||||||
|
// this.pwdLogin()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
// 密码登录
|
// 密码登录
|
||||||
async pwdLogin() {
|
async wxLogin(phoneCode, loginCode) {
|
||||||
this.$store.dispatch('Login', this.loginForm).then(() => {
|
this.$store.dispatch('WxLogin', {"phoneCode":phoneCode, "loginCode": loginCode}).then(() => {
|
||||||
this.$modal.closeLoading()
|
this.$modal.closeLoading()
|
||||||
this.loginSuccess()
|
this.loginSuccess()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -99,8 +167,17 @@
|
|||||||
// 登录成功后,处理函数
|
// 登录成功后,处理函数
|
||||||
loginSuccess(result) {
|
loginSuccess(result) {
|
||||||
// 设置用户信息
|
// 设置用户信息
|
||||||
|
var that = this;
|
||||||
this.$store.dispatch('GetInfo').then(res => {
|
this.$store.dispatch('GetInfo').then(res => {
|
||||||
this.$tab.reLaunch('/pages/index')
|
|
||||||
|
if (that.baoming > 0){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "baoming?taskId="+that.baoming
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$tab.reLaunch('/pages/index')
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -162,11 +239,11 @@
|
|||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reg {
|
.reg {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xieyi {
|
.xieyi {
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
@ -192,7 +269,7 @@
|
|||||||
.login-code {
|
.login-code {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
position: absolute;
|
position: absolute;
|
34
pages/fw.vue
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<img style="width: 100%; height: 4500rpx" src="http://8.155.21.176:9000/yonggong/images/fwxy.jpg"/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskList } from "@/api/employee/task";
|
||||||
|
import { logout } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
param: {
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
698
pages/index.vue
@ -1,75 +0,0 @@
|
|||||||
<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">t@xx.com</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="list-cell list-cell-arrow">
|
|
||||||
<view class="menu-item-box">
|
|
||||||
<view>服务热线</view>
|
|
||||||
<view class="text-right">123456</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 © 2022 ip 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>
|
|
@ -1,631 +0,0 @@
|
|||||||
<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>
|
|
@ -1,96 +0,0 @@
|
|||||||
<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-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>
|
|
@ -1,198 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="mine-container" :style="{height: `${windowHeight}px`}">
|
|
||||||
<!--顶部个人信息栏-->
|
|
||||||
<view class="header-section">
|
|
||||||
<view class="flex padding justify-between">
|
|
||||||
<view class="flex align-center">
|
|
||||||
<view v-if="!avatar" class="cu-avatar xl round bg-white">
|
|
||||||
<view class="iconfont icon-people text-gray icon"></view>
|
|
||||||
</view>
|
|
||||||
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
|
|
||||||
</image>
|
|
||||||
<view v-if="!name" @click="handleToLogin" class="login-tip">
|
|
||||||
点击登录
|
|
||||||
</view>
|
|
||||||
<view v-if="name" @click="handleToInfo" class="user-info">
|
|
||||||
<view class="u_title">
|
|
||||||
用户名:{{ name }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view @click="handleToInfo" class="flex align-center">
|
|
||||||
<text>个人信息</text>
|
|
||||||
<view class="iconfont icon-right"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="content-section">
|
|
||||||
<view class="mine-actions grid col-4 text-center">
|
|
||||||
<view class="action-item" @click="handleJiaoLiuQun">
|
|
||||||
<view class="iconfont icon-friendfill text-pink icon"></view>
|
|
||||||
<text class="text">交流群</text>
|
|
||||||
</view>
|
|
||||||
<view class="action-item" @click="handleBuilding">
|
|
||||||
<view class="iconfont icon-service text-blue icon"></view>
|
|
||||||
<text class="text">在线客服</text>
|
|
||||||
</view>
|
|
||||||
<view class="action-item" @click="handleBuilding">
|
|
||||||
<view class="iconfont icon-community text-mauve icon"></view>
|
|
||||||
<text class="text">反馈社区</text>
|
|
||||||
</view>
|
|
||||||
<view class="action-item" @click="handleBuilding">
|
|
||||||
<view class="iconfont icon-dianzan text-green icon"></view>
|
|
||||||
<text class="text">点赞我们</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="menu-list">
|
|
||||||
<view class="list-cell list-cell-arrow" @click="handleToEditInfo">
|
|
||||||
<view class="menu-item-box">
|
|
||||||
<view class="iconfont icon-user menu-icon"></view>
|
|
||||||
<view>编辑资料</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="list-cell list-cell-arrow" @click="handleHelp">
|
|
||||||
<view class="menu-item-box">
|
|
||||||
<view class="iconfont icon-help menu-icon"></view>
|
|
||||||
<view>常见问题</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="list-cell list-cell-arrow" @click="handleAbout">
|
|
||||||
<view class="menu-item-box">
|
|
||||||
<view class="iconfont icon-aixin menu-icon"></view>
|
|
||||||
<view>关于我们</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="list-cell list-cell-arrow" @click="handleToSetting">
|
|
||||||
<view class="menu-item-box">
|
|
||||||
<view class="iconfont icon-setting menu-icon"></view>
|
|
||||||
<view>应用设置</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import storage from '@/utils/storage'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
name: this.$store.state.user.name,
|
|
||||||
version: getApp().globalData.config.appInfo.version
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
avatar() {
|
|
||||||
return this.$store.state.user.avatar
|
|
||||||
},
|
|
||||||
windowHeight() {
|
|
||||||
return uni.getSystemInfoSync().windowHeight - 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleToInfo() {
|
|
||||||
this.$tab.navigateTo('/pages/mine/info/index')
|
|
||||||
},
|
|
||||||
handleToEditInfo() {
|
|
||||||
this.$tab.navigateTo('/pages/mine/info/edit')
|
|
||||||
},
|
|
||||||
handleToSetting() {
|
|
||||||
this.$tab.navigateTo('/pages/mine/setting/index')
|
|
||||||
},
|
|
||||||
handleToLogin() {
|
|
||||||
this.$tab.reLaunch('/pages/login')
|
|
||||||
},
|
|
||||||
handleToAvatar() {
|
|
||||||
this.$tab.navigateTo('/pages/mine/avatar/index')
|
|
||||||
},
|
|
||||||
handleLogout() {
|
|
||||||
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
|
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
|
||||||
this.$tab.reLaunch('/pages/index')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleHelp() {
|
|
||||||
this.$tab.navigateTo('/pages/mine/help/index')
|
|
||||||
},
|
|
||||||
handleAbout() {
|
|
||||||
this.$tab.navigateTo('/pages/mine/about/index')
|
|
||||||
},
|
|
||||||
handleJiaoLiuQun() {
|
|
||||||
this.$modal.showToast('QQ群:①133713780、②146013835')
|
|
||||||
},
|
|
||||||
handleBuilding() {
|
|
||||||
this.$modal.showToast('模块建设中~')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page {
|
|
||||||
background-color: #f5f6f7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mine-container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
|
|
||||||
.header-section {
|
|
||||||
padding: 15px 15px 45px 15px;
|
|
||||||
background-color: #3c96f3;
|
|
||||||
color: white;
|
|
||||||
|
|
||||||
.login-tip {
|
|
||||||
font-size: 18px;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cu-avatar {
|
|
||||||
border: 2px solid #eaeaea;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info {
|
|
||||||
margin-left: 15px;
|
|
||||||
|
|
||||||
.u_title {
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-section {
|
|
||||||
position: relative;
|
|
||||||
top: -50px;
|
|
||||||
|
|
||||||
.mine-actions {
|
|
||||||
margin: 15px 15px;
|
|
||||||
padding: 20px 0px;
|
|
||||||
border-radius: 8px;
|
|
||||||
background-color: white;
|
|
||||||
|
|
||||||
.action-item {
|
|
||||||
.icon {
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
display: block;
|
|
||||||
font-size: 13px;
|
|
||||||
margin: 8px 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,127 +0,0 @@
|
|||||||
<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>
|
|
@ -1,44 +0,0 @@
|
|||||||
<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>
|
|
@ -1,85 +0,0 @@
|
|||||||
<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>
|
|
@ -1,78 +0,0 @@
|
|||||||
<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>
|
|
18
pages/my.vue
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
{{param.realName.charAt(0)}}
|
<!-- {{param.realName.charAt(0)}}-->
|
||||||
|
{{param.realName == null ? "" : param.realName.charAt(0)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
@ -18,12 +19,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<view class="menu-list">
|
<view class="menu-list">
|
||||||
<view class="list-cell list-cell-arrow" @click="handleToEditInfo">
|
<view class="list-cell list-cell-arrow" @click="jumpFw()">
|
||||||
<view class="menu-item-box">
|
<view class="menu-item-box">
|
||||||
<view>服务协议</view>
|
<view>服务协议</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell list-cell-arrow" @click="handleHelp">
|
<view class="list-cell list-cell-arrow" @click="jumpYs()">
|
||||||
<view class="menu-item-box">
|
<view class="menu-item-box">
|
||||||
<!-- <view class="iconfont icon-help menu-icon"></view>-->
|
<!-- <view class="iconfont icon-help menu-icon"></view>-->
|
||||||
<view>隐私政策</view>
|
<view>隐私政策</view>
|
||||||
@ -68,6 +69,17 @@
|
|||||||
uni.reLaunch({ url: "wxlogin" })
|
uni.reLaunch({ url: "wxlogin" })
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
jumpFw(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/fw"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
jumpYs(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/ys"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,197 +0,0 @@
|
|||||||
<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>
|
|
@ -4,11 +4,21 @@
|
|||||||
<text class="title">灵活用工平台</text>
|
<text class="title">灵活用工平台</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="login-form-content">
|
<view class="login-form-content">
|
||||||
|
<view class="role-select">
|
||||||
|
<view class="role-item" @click="selectRole(1)">
|
||||||
|
<view class="role-icon" :class="'role-icon1' + (roleType == 1 ? '' : '_')"></view>
|
||||||
|
<view>我是劳动者</view>
|
||||||
|
</view>
|
||||||
|
<view class="role-item" @click="selectRole(0)">
|
||||||
|
<view class="role-icon" :class="'role-icon0' + (roleType == 0? '' : '_')"></view>
|
||||||
|
<view>我是用工方</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="xieyi text-center">
|
<view class="xieyi text-center">
|
||||||
<radio @click="radioChange" v-model="radio" :checked="radio" ></radio>
|
<radio @click="radioChange" v-model="radio" :checked="radio" ></radio>
|
||||||
<view>
|
<view>
|
||||||
<text class="text-grey1"> 已阅读并同意灵活用工平台 <text>《服务协议》</text> <text>《隐私政策》</text></text>
|
<text class="text-grey1"> 已阅读并同意灵活用工平台 <text @click="jumpFw()">《服务协议》</text> <text @click="jumpYs()">《隐私政策》</text></text>
|
||||||
<text class="text-grey1"> 若您的手机号未注册,将为您注册。</text>
|
<text class="text-grey1"> 若您的手机号未注册,将为您注册。</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -43,9 +53,14 @@
|
|||||||
code: "",
|
code: "",
|
||||||
uuid: ''
|
uuid: ''
|
||||||
},
|
},
|
||||||
radio: false
|
radio: false,
|
||||||
|
roleType: 1,
|
||||||
|
baoming: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad: function(query) {
|
||||||
|
this.baoming = query.baoming;
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.getCode()
|
// this.getCode()
|
||||||
},
|
},
|
||||||
@ -151,7 +166,7 @@
|
|||||||
},
|
},
|
||||||
// 密码登录
|
// 密码登录
|
||||||
async wxLogin(phoneCode, loginCode) {
|
async wxLogin(phoneCode, loginCode) {
|
||||||
this.$store.dispatch('WxLogin', {"phoneCode":phoneCode, "loginCode": loginCode}).then(() => {
|
this.$store.dispatch('WxLogin', {"phoneCode":phoneCode, "loginCode": loginCode, "type": this.roleType}).then(() => {
|
||||||
this.$modal.closeLoading()
|
this.$modal.closeLoading()
|
||||||
this.loginSuccess()
|
this.loginSuccess()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -163,8 +178,35 @@
|
|||||||
// 登录成功后,处理函数
|
// 登录成功后,处理函数
|
||||||
loginSuccess(result) {
|
loginSuccess(result) {
|
||||||
// 设置用户信息
|
// 设置用户信息
|
||||||
|
// this.$store.dispatch('GetInfo').then(res => {
|
||||||
|
// this.$tab.reLaunch('/pages/index')
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
var that = this;
|
||||||
this.$store.dispatch('GetInfo').then(res => {
|
this.$store.dispatch('GetInfo').then(res => {
|
||||||
this.$tab.reLaunch('/pages/index')
|
|
||||||
|
if (that.baoming > 0 && this.$store.state.user.roleType == 1){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "baoming?taskId="+that.baoming
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$tab.reLaunch('/pages/index')
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectRole(role){
|
||||||
|
this.roleType = role;
|
||||||
|
},
|
||||||
|
jumpFw(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/fw"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
jumpYs(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/ys"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -200,6 +242,40 @@
|
|||||||
margin-top: 15%;
|
margin-top: 15%;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
|
||||||
|
.role-select{
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
.role-item{
|
||||||
|
width: 50%;
|
||||||
|
.role-icon{
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.role-icon0{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/images/login/role0.png");
|
||||||
|
}
|
||||||
|
.role-icon0_{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/images/login/role0_.png");
|
||||||
|
}
|
||||||
|
.role-icon1{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/images/login/role1.png");
|
||||||
|
}
|
||||||
|
.role-icon1_{
|
||||||
|
background-image: url("http://8.155.21.176:9000/yonggong/images/login/role1_.png");
|
||||||
|
}
|
||||||
|
view{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.input-item {
|
.input-item {
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
background-color: #f5f6f7;
|
background-color: #f5f6f7;
|
||||||
|
34
pages/ys.vue
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<img style="width: 100%; height: 2000rpx" src="http://8.155.21.176:9000/yonggong/images/ysxy.jpg"/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTaskList } from "@/api/employee/task";
|
||||||
|
import { logout } from '@/api/employee/login'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
param: {
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
@ -6,7 +6,7 @@ const loginPage = "/pages/wxlogin"
|
|||||||
|
|
||||||
// 页面白名单
|
// 页面白名单
|
||||||
const whiteList = [
|
const whiteList = [
|
||||||
'/pages/login', '/pages/wxlogin', '/pages/register', '/pages/common/webview/index', '/pages/index',
|
'/pages/login', '/pages/wxlogin', '/pages/register', '/pages/common/webview/index', '/pages/index', '/pages/ys', '/pages/fw',
|
||||||
]
|
]
|
||||||
|
|
||||||
// 检查地址白名单
|
// 检查地址白名单
|
||||||
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 257 B |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 940 B |
Before Width: | Height: | Size: 1009 B |
Before Width: | Height: | Size: 977 B |
Before Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 633 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 893 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 776 B |
Before Width: | Height: | Size: 830 B |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 596 B |
BIN
static/logo.png
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 7.8 KiB |
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
.text-center {
|
.text-center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@ -88,3 +90,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.vue-ref{
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
.uni-date-editor{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #939393;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.uni-date-x{
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
.uni-date-editor--x{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.uni-date__x-input{
|
||||||
|
height: 55rpx !important;
|
||||||
|
line-height: 55rpx !important;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.uni-date-x--border{
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
@ -15,9 +15,9 @@ const user = {
|
|||||||
permissions: storage.get(constant.permissions),
|
permissions: storage.get(constant.permissions),
|
||||||
phone: storage.get(constant.phone),
|
phone: storage.get(constant.phone),
|
||||||
idCard: storage.get(constant.idCard),
|
idCard: storage.get(constant.idCard),
|
||||||
nickName: storage.get(constant.nickName)
|
nickName: storage.get(constant.nickName),
|
||||||
|
roleType: storage.get(constant.roleType)
|
||||||
},
|
},
|
||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_TOKEN: (state, token) => {
|
SET_TOKEN: (state, token) => {
|
||||||
state.token = token
|
state.token = token
|
||||||
@ -50,6 +50,10 @@ const user = {
|
|||||||
state.nickName = nickName
|
state.nickName = nickName
|
||||||
storage.set(constant.nickName, nickName)
|
storage.set(constant.nickName, nickName)
|
||||||
},
|
},
|
||||||
|
SET_ROLETYPE: (state, v) => {
|
||||||
|
state.roleType = v
|
||||||
|
storage.set(constant.roleType, v)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
@ -71,9 +75,11 @@ const user = {
|
|||||||
},
|
},
|
||||||
WxLogin({ commit }, userInfo) {
|
WxLogin({ commit }, userInfo) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wxlogin(userInfo.phoneCode, userInfo.loginCode).then(res => {
|
wxlogin(userInfo).then(res => {
|
||||||
setToken(res.token)
|
setToken(res.token)
|
||||||
commit('SET_TOKEN', res.token)
|
commit('SET_TOKEN', res.token)
|
||||||
|
console.log("abvvvv")
|
||||||
|
commit('SET_ROLETYPE', res.role)
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
@ -84,7 +90,7 @@ const user = {
|
|||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
GetInfo({ commit, state }) {
|
GetInfo({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo().then(res => {
|
getInfo(state).then(res => {
|
||||||
const user = res.user
|
const user = res.user
|
||||||
const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar
|
const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar
|
||||||
const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
|
const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
|
||||||
@ -103,7 +109,6 @@ const user = {
|
|||||||
commit('SET_PHONE', phonenumber)
|
commit('SET_PHONE', phonenumber)
|
||||||
commit('SET_IDCARD', idCard)
|
commit('SET_IDCARD', idCard)
|
||||||
commit('SET_NICKNAME', nickName)
|
commit('SET_NICKNAME', nickName)
|
||||||
console.log("nickName", nickName)
|
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
@ -114,7 +119,7 @@ const user = {
|
|||||||
// 退出系统
|
// 退出系统
|
||||||
LogOut({ commit, state }) {
|
LogOut({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
logout(state.token).then(() => {
|
logout(state.token, state).then(() => {
|
||||||
commit('SET_TOKEN', '')
|
commit('SET_TOKEN', '')
|
||||||
commit('SET_ROLES', [])
|
commit('SET_ROLES', [])
|
||||||
commit('SET_PERMISSIONS', [])
|
commit('SET_PERMISSIONS', [])
|
||||||
|
@ -1023,4 +1023,5 @@
|
|||||||
margin-left: -6px;
|
margin-left: -6px;
|
||||||
border-bottom-color: #fff;
|
border-bottom-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -6,6 +6,7 @@ const constant = {
|
|||||||
phone: 'vuex_phone',
|
phone: 'vuex_phone',
|
||||||
idCard: 'vuex_idCard',
|
idCard: 'vuex_idCard',
|
||||||
nickName: 'vuex_nickName',
|
nickName: 'vuex_nickName',
|
||||||
|
roleType: 'vuex_roleType',
|
||||||
}
|
}
|
||||||
|
|
||||||
export default constant
|
export default constant
|
||||||
|
@ -49,9 +49,14 @@ const request = config => {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
|
|
||||||
store.dispatch('LogOut').then(res => {
|
if (config.url.indexOf("/user/verifyToken") != -1){
|
||||||
uni.reLaunch({ url: '/pages/wxlogin' })
|
resolve(res.data)
|
||||||
})
|
}else{
|
||||||
|
store.dispatch('LogOut').then(res => {
|
||||||
|
uni.reLaunch({ url: '/pages/wxlogin' })
|
||||||
|
})
|
||||||
|
reject('无效的会话,或者会话已过期,请重新登录。')
|
||||||
|
}
|
||||||
|
|
||||||
reject('无效的会话,或者会话已过期,请重新登录。')
|
reject('无效的会话,或者会话已过期,请重新登录。')
|
||||||
} else if (code === 500) {
|
} else if (code === 500) {
|
||||||
|
@ -4,16 +4,16 @@ import constant from './constant'
|
|||||||
let storageKey = 'storage_data'
|
let storageKey = 'storage_data'
|
||||||
|
|
||||||
// 存储节点变量名
|
// 存储节点变量名
|
||||||
let storageNodeKeys = [constant.avatar, constant.name, constant.roles, constant.permissions, constant.phone, constant.idCard, constant.nickName]
|
let storageNodeKeys = [constant.avatar, constant.name, constant.roles, constant.permissions, constant.phone, constant.idCard, constant.nickName, constant.roleType]
|
||||||
|
|
||||||
const storage = {
|
const storage = {
|
||||||
set: function(key, value) {
|
set: function(key, value) {
|
||||||
if (storageNodeKeys.indexOf(key) != -1) {
|
// if (storageNodeKeys.indexOf(key) != -1) {
|
||||||
let tmp = uni.getStorageSync(storageKey)
|
let tmp = uni.getStorageSync(storageKey)
|
||||||
tmp = tmp ? tmp : {}
|
tmp = tmp ? tmp : {}
|
||||||
tmp[key] = value
|
tmp[key] = value
|
||||||
uni.setStorageSync(storageKey, tmp)
|
uni.setStorageSync(storageKey, tmp)
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
get: function(key) {
|
get: function(key) {
|
||||||
let storageData = uni.getStorageSync(storageKey) || {}
|
let storageData = uni.getStorageSync(storageKey) || {}
|
||||||
|