This commit is contained in:
binbin_pan 2024-11-13 16:21:21 +08:00
parent 1cda80d56e
commit 6989d93f17
12 changed files with 464 additions and 411 deletions

View File

@ -41,8 +41,8 @@
module.exports = { module.exports = {
// baseUrl:'/prod-api', // baseUrl:'/prod-api',
// http://192.168.0.14:19999 // http://192.168.0.14:19999
loginBaseUrl: 'http://112.29.103.165:1616', // loginBaseUrl: 'http://112.29.103.165:1616',
// loginBaseUrl: 'http://192.168.0.14:27018', loginBaseUrl: 'http://192.168.0.14:27018',
// loginBaseUrl:'http://192.168.0.14:19999', // loginBaseUrl:'http://192.168.0.14:19999',
// baseUrl:'http://192.168.0.14:2900', // baseUrl:'http://192.168.0.14:2900',
baseUrl: 'http://192.168.0.14:19999', baseUrl: 'http://192.168.0.14:19999',

View File

@ -1,41 +1,41 @@
{ {
"name": "作业管控智慧平台", "name" : "作业管控智慧平台",
"appid": "__UNI__5A28908", "appid" : "__UNI__4165875",
"description": "作业管控智慧平台", "description" : "作业管控智慧平台",
"versionName": "1.0.11", "versionName" : "1.0.11",
"versionCode": 111, "versionCode" : 111,
"transformPx": false, "transformPx" : false,
"app-plus": { "app-plus" : {
"runmode": "liberate", "runmode" : "liberate",
"compatible": { "compatible" : {
"ignoreVersion": true "ignoreVersion" : true
}, },
"popGesture": "none", "popGesture" : "none",
"useragent": { "useragent" : {
"value": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/20) uni-app", "value" : "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/20) uni-app",
"concatenate": true //true false "concatenate" : true //true false
}, },
"usingComponents": true, "usingComponents" : true,
"nvueCompiler": "uni-app", "nvueCompiler" : "uni-app",
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"nvueLaunchMode": "fast", "nvueLaunchMode" : "fast",
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
"modules": { "modules" : {
"Camera": {}, "Camera" : {},
"VideoPlayer": {}, "VideoPlayer" : {},
"Barcode": {}, "Barcode" : {},
"FaceID": {}, "FaceID" : {},
"Geolocation": {} "Geolocation" : {}
}, },
"distribute": { "distribute" : {
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -54,205 +54,209 @@
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>" "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
], ],
"schemes": "blob" "schemes" : "blob"
}, },
"ios": { "ios" : {
"permissions": { "permissions" : {
"WRITE_EXTERNAL_STORAGE": { "WRITE_EXTERNAL_STORAGE" : {
"description": "允许应用保存文件到外部存储", "description" : "允许应用保存文件到外部存储",
"permission": "YES" "permission" : "YES"
}, },
"READ_EXTERNAL_STORAGE": { "READ_EXTERNAL_STORAGE" : {
"description": "允许应用从外部存储读取文件", "description" : "允许应用从外部存储读取文件",
"permission": "YES" "permission" : "YES"
} }
}, },
"urlschemewhitelist": ["baidumap", "iosamap"], "urlschemewhitelist" : [ "baidumap", "iosamap" ],
"dSYMs": false, "dSYMs" : false,
"privacyDescription": { "privacyDescription" : {
"NSAppleMusicUsageDescription": "库该应用需要访问你的媒体资料,以便为你编辑个人信息", "NSAppleMusicUsageDescription" : "库该应用需要访问你的媒体资料,以便为你编辑个人信息",
"NSPhotoLibraryUsageDescription": "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置", "NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置",
"NSPhotoLibraryAddUsageDescription": "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置", "NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置",
"NSCameraUsageDescription": "该应用需要你的相机,以便你拍摄上传个人信息,更新头像设置,验证是否为本人", "NSCameraUsageDescription" : "该应用需要你的相机,以便你拍摄上传个人信息,更新头像设置,验证是否为本人",
"NSMicrophoneUsageDescription": "", "NSMicrophoneUsageDescription" : "",
"NSLocationWhenInUseUsageDescription": "该应用需要你的位置信息,以便为你编辑个人信息", "NSLocationWhenInUseUsageDescription" : "该应用需要你的位置信息,以便为你编辑个人信息",
"NSLocationAlwaysUsageDescription": "该应用需要你的位置信息,以便为你编辑个人信息", "NSLocationAlwaysUsageDescription" : "该应用需要你的位置信息,以便为你编辑个人信息",
"NSLocationAlwaysAndWhenInUseUsageDescription": "该应用需要你的位置信息,以便为你编辑个人信息", "NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的位置信息,以便为你编辑个人信息",
"NSCalendarsUsageDescription": "该应用需要你的日历,以便为你编辑个人信息", "NSCalendarsUsageDescription" : "该应用需要你的日历,以便为你编辑个人信息",
"NSContactsUsageDescription": "", "NSContactsUsageDescription" : "",
"NSLocalNetworkUsageDescription": "该应用需要你的网络,以便为你编辑个人信息" "NSLocalNetworkUsageDescription" : "该应用需要你的网络,以便为你编辑个人信息"
}, },
"idfa": false "idfa" : false
}, },
"sdkConfigs": { "sdkConfigs" : {
"ad": {}, "ad" : {},
"geolocation": { "geolocation" : {
"system": { "system" : {
"__platform__": ["ios", "android"] "__platform__" : [ "ios", "android" ]
}, },
"baidu": { "baidu" : {
"__platform__": ["android"], "__platform__" : [ "android" ],
"appkey_ios": "", "appkey_ios" : "",
"appkey_android": "MCuOO39EDhdgg9vvkEE2eOyba201oQOF" "appkey_android" : "MCuOO39EDhdgg9vvkEE2eOyba201oQOF"
} }
}, },
"maps": { "maps" : {
"baidu": { "baidu" : {
"appkey_ios": "", "appkey_ios" : "",
"appkey_android": "" "appkey_android" : ""
} }
} }
}, },
"orientation": ["portrait-primary"], "orientation" : [ "portrait-primary" ],
"icons": { "icons" : {
"ios": { "ios" : {
"iphone": { "iphone" : {
"app@2x": "unpackage/res/icons/120x120.png", "app@2x" : "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png", "app@3x" : "unpackage/res/icons/180x180.png",
"spotlight@2x": "unpackage/res/icons/80x80.png", "spotlight@2x" : "unpackage/res/icons/80x80.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png", "notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png", "settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@3x": "unpackage/res/icons/120x120.png" "spotlight@3x" : "unpackage/res/icons/120x120.png"
}, },
"appstore": "unpackage/res/icons/1024x1024.png", "appstore" : "unpackage/res/icons/1024x1024.png",
"ipad": { "ipad" : {
"app": "unpackage/res/icons/76x76.png", "app" : "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png", "app@2x" : "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png", "notification" : "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png", "proapp@2x" : "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png", "settings" : "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png", "spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png" "spotlight@2x" : "unpackage/res/icons/80x80.png"
} }
}, },
"android": { "android" : {
"hdpi": "unpackage/res/icons/72x72.png", "hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png", "xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png", "xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png" "xxxhdpi" : "unpackage/res/icons/192x192.png"
} }
}, },
"splashscreen": { "splashscreen" : {
"iosStyle": "common" "iosStyle" : "common"
} }
}, },
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"quickapp": {}, "quickapp" : {},
"quickapp-native": { "quickapp-native" : {
"icon": "/static/logo.png", "icon" : "/static/logo.png",
"package": "com.example.demo", "package" : "com.example.demo",
"features": [ "features" : [
{ {
"name": "system.clipboard" "name" : "system.clipboard"
} }
] ]
}, },
"quickapp-webview": { "quickapp-webview" : {
"icon": "/static/logo.png", "icon" : "/static/logo.png",
"package": "com.example.demo", "package" : "com.example.demo",
"minPlatformVersion": 1070, "minPlatformVersion" : 1070,
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": 100 "versionCode" : 100
}, },
"mp-weixin": { "mp-weixin" : {
"appid": "", "appid" : "",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true, "usingComponents" : true,
"permission": { "permission" : {
"scope.userLocation": { "scope.userLocation" : {
"desc": "演示定位能力" "desc" : "演示定位能力"
} }
}, },
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true, "usingComponents" : true,
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true, "usingComponents" : true,
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
}, },
"dynamicLib": { "dynamicLib" : {
"editorLib": { "editorLib" : {
"provider": "swan-editor" "provider" : "swan-editor"
} }
} }
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true, "usingComponents" : true,
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"mp-jd": { "mp-jd" : {
"usingComponents": true, "usingComponents" : true,
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"h5": { "h5" : {
"template": "template.h5.html", "template" : "",
"router": { "router" : {
"mode": "history", "mode" : "hash",
"base": "" "base" : "./"
}, },
"sdkConfigs": { "sdkConfigs" : {
"maps": { "maps" : {
"qqmap": { "qqmap" : {
"key": "TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU" "key" : "TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU"
} }
} }
}, },
"async": { "async" : {
"timeout": 20000 "timeout" : 20000
}, },
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
},
"title" : "作业管控智慧平台",
"devServer" : {
"https" : true
} }
}, },
"vueVersion": "2", "vueVersion" : "2",
"mp-kuaishou": { "mp-kuaishou" : {
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"mp-lark": { "mp-lark" : {
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"mp-qq": { "mp-qq" : {
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"quickapp-webview-huawei": { "quickapp-webview-huawei" : {
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"quickapp-webview-union": { "quickapp-webview-union" : {
"uniStatistics": { "uniStatistics" : {
"enable": true "enable" : true
} }
}, },
"uniStatistics": { "uniStatistics" : {
"version": "2", "version" : "2",
"enable": true "enable" : true
} }
} }

View File

@ -284,14 +284,15 @@ export default {
) )
console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random1) console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random1)
console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random2) console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random2)
if (this.answerTime / 1000 == this.random1) { // if (this.answerTime / 1000 == this.random1) {
console.log('🚀 ~ changeCountDown ~ 人脸识别') // console.log('🚀 ~ changeCountDown ~ ')
// this.openFaceScan() // Android // // this.openFaceScan() // Android
this.openPhotograph() // IOS // this.openPhotograph() // IOS
} else if (this.answerTime / 1000 == this.random2) { // } else if (this.answerTime / 1000 == this.random2) {
// this.openFaceScan() // // this.openFaceScan()
this.openPhotograph() // this.openPhotograph()
} else if (this.answerTime == this.time) { // } else
if (this.answerTime == this.time) {
// : , // : ,
this.$refs.uToast.show({ this.$refs.uToast.show({
message: '考试时间结束, 系统将自动提交', message: '考试时间结束, 系统将自动提交',

View File

@ -247,7 +247,7 @@ export default {
.search { .search {
width: 100%; width: 100%;
margin: 0 auto; margin: 10px auto 0;
display: flex; display: flex;
align-items: center; align-items: center;
} }

View File

@ -112,13 +112,13 @@ export default {
console.log('🚀 ~ 视频总时长: ~ this.allStudyDuration:', this.allStudyDuration) console.log('🚀 ~ 视频总时长: ~ this.allStudyDuration:', this.allStudyDuration)
console.log('🚀 ~ videoTimeUpdate ~ random1-2:', this.random1, this.random2) console.log('🚀 ~ videoTimeUpdate ~ random1-2:', this.random1, this.random2)
if (this.currentTime != this.oldTime) { // if (this.currentTime != this.oldTime) {
if (this.currentTime == this.random2 || this.currentTime == this.random1) { // if (this.currentTime == this.random2 || this.currentTime == this.random1) {
this.oldTime = this.currentTime // , , , // this.oldTime = this.currentTime // , , ,
this.video.pause() // this.video.pause()
this.openPhotograph() // this.openPhotograph()
} // }
} // }
}, },
openModal() { openModal() {
this.showModal = true this.showModal = true

View File

@ -97,11 +97,11 @@ export default {
this.allStudyDuration-- this.allStudyDuration--
this.params.studyDuration++ this.params.studyDuration++
} }
if (this.allStudyDuration == this.random) { // if (this.allStudyDuration == this.random) {
this.isShow = false // this.isShow = false
clearInterval(this.timer) // clearInterval(this.timer)
this.openPhotograph() // this.openPhotograph()
} // }
console.log('🚀 ~ countDown ~ this.params.studyDuration:', this.params.studyDuration) console.log('🚀 ~ countDown ~ this.params.studyDuration:', this.params.studyDuration)
if (this.allStudyDuration <= 0) { if (this.allStudyDuration <= 0) {
this.params.studyDuration = this.params.allStudyDuration this.params.studyDuration = this.params.allStudyDuration

View File

@ -1,7 +1,15 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="学习项目" @leftClick="leftClick" placeholder /> <u-navbar title="学习项目" @leftClick="leftClick" placeholder />
<view class="status-secs"> <div class="tab-wrapper">
<div v-for="(item, index) in statusList" :key="index" class="tab-item" @click="chooseStatus(item, index)">
<div :style="{ color: activeIndex === index ? '#409eff' : '#333' }">
{{ item.text }}
</div>
<div :class="{ 'tab-line': activeIndex === index }"></div>
</div>
</div>
<!-- <view class="status-secs">
<view <view
v-for="(item, index) in statusList" v-for="(item, index) in statusList"
:key="item.id" :key="item.id"
@ -10,12 +18,13 @@
> >
{{ item.text }} {{ item.text }}
</view> </view>
</view> </view> -->
<uni-easyinput <uni-easyinput
prefixIcon="search" prefixIcon="search"
v-model="totalStatus.keyword" v-model="totalStatus.keyword"
placeholder="请输入项目名称" placeholder="请输入项目名称"
@iconClick="toggleSearch" @iconClick="toggleSearch"
style="margin-bottom: 10px"
></uni-easyinput> ></uni-easyinput>
<view class="project-cont"> <view class="project-cont">
@ -47,6 +56,10 @@
</view> </view>
</view> </view>
</view> </view>
<div class="no-data" v-if="projList.length == 0">
<image src="/static/images/zanwuneirong.png" mode="aspectFit" />
<view class="no-data-text">暂无内容</view>
</div>
</view> </view>
</view> </view>
</template> </template>
@ -58,6 +71,7 @@ import config from '@/config'
export default { export default {
data() { data() {
return { return {
activeIndex: 0,
statusList: [ statusList: [
// status -1: 1: 0: // status -1: 1: 0:
{ text: '全部', id: 0 }, { text: '全部', id: 0 },
@ -176,7 +190,8 @@ export default {
// this.projList = res.data // this.projList = res.data
this.getStudentStudyWorkList(params) this.getStudentStudyWorkList(params)
}, },
async chooseStatus(count) { async chooseStatus(count, index) {
this.activeIndex = index
this.projList = [] this.projList = []
// //
this.totalStatus.keyword = '' this.totalStatus.keyword = ''
@ -184,12 +199,12 @@ export default {
userId: uni.getStorageSync('userId'), userId: uni.getStorageSync('userId'),
status: '-1' status: '-1'
} }
this.totalStatus.statusCount = count this.totalStatus.statusCount = count.id
if (count === 0) { if (count.id === 0) {
params.status = '-1' params.status = '-1'
} else if (count === 1) { } else if (count.id === 1) {
params.status = '1' params.status = '1'
} else if (count === 2) { } else if (count.id === 2) {
params.status = '0' params.status = '0'
} }
// const res = await getStudentStudyWorkList(params) // const res = await getStudentStudyWorkList(params)
@ -265,6 +280,38 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.tab-wrapper {
display: flex;
justify-content: space-around;
/* background: #fff; */
margin-bottom: 10px;
.tab-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
padding: 10px 0;
.tab-line {
margin-top: 5px;
width: 30%;
height: 2px;
background-color: #409eff;
transition: width 0.3s;
}
}
}
.no-data {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 100px;
.no-data-text {
margin-top: 10px;
color: #999;
}
}
.page { .page {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;

View File

@ -87,16 +87,16 @@ export default {
this.allStudyDuration-- this.allStudyDuration--
this.params.studyDuration++ this.params.studyDuration++
} }
if (this.allStudyDuration == this.random1) { // if (this.allStudyDuration == this.random1) {
this.isShow = false // this.isShow = false
clearInterval(this.timer) // clearInterval(this.timer)
this.openPhotograph() // this.openPhotograph()
} // }
if (this.allStudyDuration == this.random2) { // if (this.allStudyDuration == this.random2) {
this.isShow = false // this.isShow = false
clearInterval(this.timer) // clearInterval(this.timer)
this.openPhotograph() // this.openPhotograph()
} // }
console.log('🚀 ~ countDown ~ this.params.studyDuration:', this.params.studyDuration) console.log('🚀 ~ countDown ~ this.params.studyDuration:', this.params.studyDuration)
if (this.allStudyDuration <= 0) { if (this.allStudyDuration <= 0) {
this.params.studyDuration = this.params.allStudyDuration this.params.studyDuration = this.params.allStudyDuration

View File

@ -15,7 +15,6 @@
:isLink="true" :isLink="true"
:border="false" :border="false"
style="border-bottom: 1px solid #E9E9E9" style="border-bottom: 1px solid #E9E9E9"
@click="handleAvatar"
> >
<image <image
:src="infos.avatar" :src="infos.avatar"
@ -59,7 +58,8 @@ import config from '@/config'
data() { data() {
return { return {
infos: { infos: {
avatar: config.fileUrl + uni.getStorageSync('facePath'), // avatar: config.fileUrl + uni.getStorageSync('facePath'),
avatar: '/static/images/user.png',
username: '', username: '',
unit: '' unit: ''
} }

View File

@ -2,7 +2,7 @@
<view class="page"> <view class="page">
<view class="user-edit"> <view class="user-edit">
<view class="user-avatar"> <view class="user-avatar">
<image :src="facePath"></image> <image src="/static/images/user.png"></image>
</view> </view>
<view class="user-info" style="height: 120px;"> <view class="user-info" style="height: 120px;">
<span style="font-size: 24px">{{ userName }}</span> <span style="font-size: 24px">{{ userName }}</span>
@ -59,7 +59,7 @@ export default {
value: 0, // value: 0, //
secList: [ secList: [
// { id: 1, title: '', src: '/static/eduImg/changeGate.png', path: 'changeGate' }, // { id: 1, title: '', src: '/static/eduImg/changeGate.png', path: 'changeGate' },
{ id: 2, title: '人脸识别', src: '/static/eduImg/faceScan.png', path: 'faceScan' }, // { id: 2, title: '', src: '/static/eduImg/faceScan.png', path: 'faceScan' },
{ id: 3, title: '我的消息', src: '/static/eduImg/myMsg.png', path: 'myMsg' }, { id: 3, title: '我的消息', src: '/static/eduImg/myMsg.png', path: 'myMsg' },
// { id: 4, title: '', src: '/static/eduImg/settings.png', path: 'settings' } // { id: 4, title: '', src: '/static/eduImg/settings.png', path: 'settings' }
], ],

View File

@ -282,131 +282,132 @@ export default {
}) })
} }
}) })
} else if (name == '实名制移动端') {
uni.request({
url: config.realLoginUrl + 'login',
method: 'POST',
data: JSON.stringify(realParams),
header: {
'Content-Type': 'application/json'
},
success: res => {
console.log('🚀 ~ gotoYy ~ res:', res)
// console.log('🚀 ~ gotoYy ~ res:', res.data.token)
if (res.data.code == 200) {
// uni.setStorageSync('tjToken', res.data.token)
uni.setStorageSync('realNameToken', res.data.data.access_token)
uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
uni.removeStorageSync('hasChosenPro')
uni.removeStorageSync('hasViewAccess')
setTimeout(() => {
uni.reLaunch({
url: '/pages/realName/index/index'
})
}, 500)
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
} }
}, // else if (name == '') {
fail: err => { // uni.request({
console.log('🚀 ~ gotoYy ~ err:', err) // url: config.realLoginUrl + 'login',
uni.showToast({ // method: 'POST',
title: '无权限访问', // data: JSON.stringify(realParams),
icon: 'none' // header: {
}) // 'Content-Type': 'application/json'
} // },
}) // success: res => {
} else if (name == '健康体检移动端') { // console.log('🚀 ~ gotoYy ~ res:', res)
uni.request({ // // console.log('🚀 ~ gotoYy ~ res:', res.data.token)
url: config.tjBaseUrl + '/app/loginNoPassword', // if (res.data.code == 200) {
method: 'POST', // // uni.setStorageSync('tjToken', res.data.token)
data: tjparams, // uni.setStorageSync('realNameToken', res.data.data.access_token)
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: res => {
console.log('🚀 ~ gotoYy ~ res:', res)
console.log('🚀 ~ gotoYy ~ res:', res.data.obj)
if (res.statusCode == 200) {
uni.removeStorageSync('tjToken')
uni.removeStorageSync('tjPhone')
uni.setStorageSync('tjToken', res.data.obj)
uni.setStorageSync('tjPhone', tjparams.telephone)
setTimeout(() => {
uni.reLaunch({
url: '/pages/HealthExaminationApp/index/index'
})
}, 500)
} else {
uni.showToast({
title: '无权限访问',
icon: 'none'
})
}
},
fail: err => {
console.log('🚀 ~ gotoYy ~ err:', err)
uni.showToast({
title: '无权限访问',
icon: 'none'
})
}
})
}
if (name === '作业计划移动端') {
const paramsWork = {
username: uni.getStorageSync('userPhone'),
password: 'YNsbd@123456'
// jwtToken: uni.getStorageSync('App-Token')
}
console.log('请求参数', paramsWork)
uni.request({
url: config.workPlanNewYnUrl + '/ynPlanApp/login',
method: 'POST',
data: paramsWork,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: res => {
console.log('登录成功!', res)
// console.log('🚀 ~ gotoYy ~ res:', res.data.token)
if (res.statusCode == 200) {
uni.setStorageSync('wkToken', res.data.user.token)
uni.setStorageSync('wkName', res.data.user.username)
uni.setStorageSync('wkRole', res.data.user.role)
uni.setStorageSync('wkPermissions', res.data.permissions)
// uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser) // uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
// uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions) // uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
// uni.removeStorageSync('hasChosenPro') // uni.removeStorageSync('hasChosenPro')
// uni.removeStorageSync('hasViewAccess')
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/realName/index/index'
// })
// }, 500)
// } else {
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
// }
// },
// fail: err => {
// console.log('🚀 ~ gotoYy ~ err:', err)
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// })
// } else if (name == '') {
// uni.request({
// url: config.tjBaseUrl + '/app/loginNoPassword',
// method: 'POST',
// data: tjparams,
// header: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// },
// success: res => {
// console.log('🚀 ~ gotoYy ~ res:', res)
// console.log('🚀 ~ gotoYy ~ res:', res.data.obj)
// if (res.statusCode == 200) {
// uni.removeStorageSync('tjToken')
// uni.removeStorageSync('tjPhone')
// uni.setStorageSync('tjToken', res.data.obj)
// uni.setStorageSync('tjPhone', tjparams.telephone)
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/HealthExaminationApp/index/index'
// })
// }, 500)
// } else {
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// },
// fail: err => {
// console.log('🚀 ~ gotoYy ~ err:', err)
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// })
// }
setTimeout(() => { // if (name === '') {
uni.reLaunch({ // const paramsWork = {
url: '/pages/workPlan/index/index' // username: uni.getStorageSync('userPhone'),
}) // password: 'YNsbd@123456'
}, 500) // // jwtToken: uni.getStorageSync('App-Token')
} else { // }
uni.showToast({
title: res.message, // console.log('', paramsWork)
icon: 'none'
}) // uni.request({
} // url: config.workPlanNewYnUrl + '/ynPlanApp/login',
}, // method: 'POST',
fail: err => { // data: paramsWork,
console.log('🚀 ~ gotoYy ~ err:', err) // header: {
uni.showToast({ // 'Content-Type': 'application/x-www-form-urlencoded'
title: '无权限访问', // },
icon: 'none' // success: res => {
}) // console.log('', res)
} // // console.log('🚀 ~ gotoYy ~ res:', res.data.token)
}) // if (res.statusCode == 200) {
} // uni.setStorageSync('wkToken', res.data.user.token)
// uni.setStorageSync('wkName', res.data.user.username)
// uni.setStorageSync('wkRole', res.data.user.role)
// uni.setStorageSync('wkPermissions', res.data.permissions)
// // uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
// // uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
// // uni.removeStorageSync('hasChosenPro')
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/workPlan/index/index'
// })
// }, 500)
// } else {
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
// }
// },
// fail: err => {
// console.log('🚀 ~ gotoYy ~ err:', err)
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// })
// }
}, },
getDayNoticeAnnoByUserId() { getDayNoticeAnnoByUserId() {
getDayNoticeAnnoByUserId({}).then(response => { getDayNoticeAnnoByUserId({}).then(response => {

View File

@ -241,8 +241,8 @@ export default {
// globalConfig: getApp().globalData.config, // globalConfig: getApp().globalData.config,
selectTab: 1, selectTab: 1,
loginForm: { loginForm: {
phone: '', // 18955734761 18700000001 17681010134 15955147005 phone: '15955147005', // 18955734761 18700000001 17681010134 15955147005
pd: '' //YNsbd@123456 Lv@200018 pd: 'YNsbd@123456' //YNsbd@123456 Lv@200018
}, },
loginForm0: { loginForm0: {
phone: this.$store.state.user.phone, phone: this.$store.state.user.phone,