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 = {
// baseUrl:'/prod-api',
// http://192.168.0.14:19999
loginBaseUrl: 'http://112.29.103.165:1616',
// loginBaseUrl: 'http://192.168.0.14:27018',
// loginBaseUrl: 'http://112.29.103.165:1616',
loginBaseUrl: 'http://192.168.0.14:27018',
// loginBaseUrl:'http://192.168.0.14:19999',
// baseUrl:'http://192.168.0.14:2900',
baseUrl: 'http://192.168.0.14:19999',

View File

@ -1,258 +1,262 @@
{
"name": "作业管控智慧平台",
"appid": "__UNI__5A28908",
"description": "作业管控智慧平台",
"versionName": "1.0.11",
"versionCode": 111,
"transformPx": false,
"app-plus": {
"runmode": "liberate",
"compatible": {
"ignoreVersion": true
},
"popGesture": "none",
"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",
"concatenate": true //true false
},
"usingComponents": true,
"nvueCompiler": "uni-app",
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"nvueLaunchMode": "fast",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"modules": {
"Camera": {},
"VideoPlayer": {},
"Barcode": {},
"FaceID": {},
"Geolocation": {}
},
"distribute": {
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"schemes": "blob"
},
"ios": {
"permissions": {
"WRITE_EXTERNAL_STORAGE": {
"description": "允许应用保存文件到外部存储",
"permission": "YES"
},
"READ_EXTERNAL_STORAGE": {
"description": "允许应用从外部存储读取文件",
"permission": "YES"
}
"name" : "作业管控智慧平台",
"appid" : "__UNI__4165875",
"description" : "作业管控智慧平台",
"versionName" : "1.0.11",
"versionCode" : 111,
"transformPx" : false,
"app-plus" : {
"runmode" : "liberate",
"compatible" : {
"ignoreVersion" : true
},
"urlschemewhitelist": ["baidumap", "iosamap"],
"dSYMs": false,
"privacyDescription": {
"NSAppleMusicUsageDescription": "库该应用需要访问你的媒体资料,以便为你编辑个人信息",
"NSPhotoLibraryUsageDescription": "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置",
"NSPhotoLibraryAddUsageDescription": "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置",
"NSCameraUsageDescription": "该应用需要你的相机,以便你拍摄上传个人信息,更新头像设置,验证是否为本人",
"NSMicrophoneUsageDescription": "",
"NSLocationWhenInUseUsageDescription": "该应用需要你的位置信息,以便为你编辑个人信息",
"NSLocationAlwaysUsageDescription": "该应用需要你的位置信息,以便为你编辑个人信息",
"NSLocationAlwaysAndWhenInUseUsageDescription": "该应用需要你的位置信息,以便为你编辑个人信息",
"NSCalendarsUsageDescription": "该应用需要你的日历,以便为你编辑个人信息",
"NSContactsUsageDescription": "",
"NSLocalNetworkUsageDescription": "该应用需要你的网络,以便为你编辑个人信息"
"popGesture" : "none",
"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",
"concatenate" : true //true false
},
"idfa": false
},
"sdkConfigs": {
"ad": {},
"geolocation": {
"system": {
"__platform__": ["ios", "android"]
},
"baidu": {
"__platform__": ["android"],
"appkey_ios": "",
"appkey_android": "MCuOO39EDhdgg9vvkEE2eOyba201oQOF"
}
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"nvueLaunchMode" : "fast",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"maps": {
"baidu": {
"appkey_ios": "",
"appkey_android": ""
}
"modules" : {
"Camera" : {},
"VideoPlayer" : {},
"Barcode" : {},
"FaceID" : {},
"Geolocation" : {}
},
"distribute" : {
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"schemes" : "blob"
},
"ios" : {
"permissions" : {
"WRITE_EXTERNAL_STORAGE" : {
"description" : "允许应用保存文件到外部存储",
"permission" : "YES"
},
"READ_EXTERNAL_STORAGE" : {
"description" : "允许应用从外部存储读取文件",
"permission" : "YES"
}
},
"urlschemewhitelist" : [ "baidumap", "iosamap" ],
"dSYMs" : false,
"privacyDescription" : {
"NSAppleMusicUsageDescription" : "库该应用需要访问你的媒体资料,以便为你编辑个人信息",
"NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置",
"NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便为你编辑个人信息,更新头像设置",
"NSCameraUsageDescription" : "该应用需要你的相机,以便你拍摄上传个人信息,更新头像设置,验证是否为本人",
"NSMicrophoneUsageDescription" : "",
"NSLocationWhenInUseUsageDescription" : "该应用需要你的位置信息,以便为你编辑个人信息",
"NSLocationAlwaysUsageDescription" : "该应用需要你的位置信息,以便为你编辑个人信息",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的位置信息,以便为你编辑个人信息",
"NSCalendarsUsageDescription" : "该应用需要你的日历,以便为你编辑个人信息",
"NSContactsUsageDescription" : "",
"NSLocalNetworkUsageDescription" : "该应用需要你的网络,以便为你编辑个人信息"
},
"idfa" : false
},
"sdkConfigs" : {
"ad" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "ios", "android" ]
},
"baidu" : {
"__platform__" : [ "android" ],
"appkey_ios" : "",
"appkey_android" : "MCuOO39EDhdgg9vvkEE2eOyba201oQOF"
}
},
"maps" : {
"baidu" : {
"appkey_ios" : "",
"appkey_android" : ""
}
}
},
"orientation" : [ "portrait-primary" ],
"icons" : {
"ios" : {
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
},
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
}
},
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
}
},
"splashscreen" : {
"iosStyle" : "common"
}
},
"uniStatistics" : {
"enable" : true
}
},
"orientation": ["portrait-primary"],
"icons": {
"ios": {
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
},
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
}
},
"quickapp" : {},
"quickapp-native" : {
"icon" : "/static/logo.png",
"package" : "com.example.demo",
"features" : [
{
"name" : "system.clipboard"
}
]
},
"quickapp-webview" : {
"icon" : "/static/logo.png",
"package" : "com.example.demo",
"minPlatformVersion" : 1070,
"versionName" : "1.0.0",
"versionCode" : 100
},
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "演示定位能力"
}
},
"uniStatistics" : {
"enable" : true
}
},
"splashscreen": {
"iosStyle": "common"
}
},
"uniStatistics": {
"enable": true
}
},
"quickapp": {},
"quickapp-native": {
"icon": "/static/logo.png",
"package": "com.example.demo",
"features": [
{
"name": "system.clipboard"
}
]
},
"quickapp-webview": {
"icon": "/static/logo.png",
"package": "com.example.demo",
"minPlatformVersion": 1070,
"versionName": "1.0.0",
"versionCode": 100
},
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "演示定位能力"
}
},
"uniStatistics": {
"enable": true
}
},
"mp-alipay": {
"usingComponents": true,
"uniStatistics": {
"enable": true
}
},
"mp-baidu": {
"usingComponents": true,
"uniStatistics": {
"enable": true
},
"dynamicLib": {
"editorLib": {
"provider": "swan-editor"
}
}
},
"mp-toutiao": {
"usingComponents": true,
"uniStatistics": {
"enable": true
}
},
"mp-jd": {
"usingComponents": true,
"uniStatistics": {
"enable": true
}
},
"h5": {
"template": "template.h5.html",
"router": {
"mode": "history",
"base": ""
},
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU"
"mp-alipay" : {
"usingComponents" : true,
"uniStatistics" : {
"enable" : true
}
}
},
"async": {
"timeout": 20000
"mp-baidu" : {
"usingComponents" : true,
"uniStatistics" : {
"enable" : true
},
"dynamicLib" : {
"editorLib" : {
"provider" : "swan-editor"
}
}
},
"uniStatistics": {
"enable": true
"mp-toutiao" : {
"usingComponents" : true,
"uniStatistics" : {
"enable" : true
}
},
"mp-jd" : {
"usingComponents" : true,
"uniStatistics" : {
"enable" : true
}
},
"h5" : {
"template" : "",
"router" : {
"mode" : "hash",
"base" : "./"
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU"
}
}
},
"async" : {
"timeout" : 20000
},
"uniStatistics" : {
"enable" : true
},
"title" : "作业管控智慧平台",
"devServer" : {
"https" : true
}
},
"vueVersion" : "2",
"mp-kuaishou" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-lark" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-qq" : {
"uniStatistics" : {
"enable" : true
}
},
"quickapp-webview-huawei" : {
"uniStatistics" : {
"enable" : true
}
},
"quickapp-webview-union" : {
"uniStatistics" : {
"enable" : true
}
},
"uniStatistics" : {
"version" : "2",
"enable" : true
}
},
"vueVersion": "2",
"mp-kuaishou": {
"uniStatistics": {
"enable": true
}
},
"mp-lark": {
"uniStatistics": {
"enable": true
}
},
"mp-qq": {
"uniStatistics": {
"enable": true
}
},
"quickapp-webview-huawei": {
"uniStatistics": {
"enable": true
}
},
"quickapp-webview-union": {
"uniStatistics": {
"enable": true
}
},
"uniStatistics": {
"version": "2",
"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.random2)
if (this.answerTime / 1000 == this.random1) {
console.log('🚀 ~ changeCountDown ~ 人脸识别')
// this.openFaceScan() // Android
this.openPhotograph() // IOS
} else if (this.answerTime / 1000 == this.random2) {
// this.openFaceScan()
this.openPhotograph()
} else if (this.answerTime == this.time) {
// if (this.answerTime / 1000 == this.random1) {
// console.log('🚀 ~ changeCountDown ~ ')
// // this.openFaceScan() // Android
// this.openPhotograph() // IOS
// } else if (this.answerTime / 1000 == this.random2) {
// // this.openFaceScan()
// this.openPhotograph()
// } else
if (this.answerTime == this.time) {
// : ,
this.$refs.uToast.show({
message: '考试时间结束, 系统将自动提交',

View File

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

View File

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

View File

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

View File

@ -1,7 +1,15 @@
<template>
<view class="page">
<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
v-for="(item, index) in statusList"
:key="item.id"
@ -10,12 +18,13 @@
>
{{ item.text }}
</view>
</view>
</view> -->
<uni-easyinput
prefixIcon="search"
v-model="totalStatus.keyword"
placeholder="请输入项目名称"
@iconClick="toggleSearch"
style="margin-bottom: 10px"
></uni-easyinput>
<view class="project-cont">
@ -47,6 +56,10 @@
</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>
</template>
@ -58,6 +71,7 @@ import config from '@/config'
export default {
data() {
return {
activeIndex: 0,
statusList: [
// status -1: 1: 0:
{ text: '全部', id: 0 },
@ -176,7 +190,8 @@ export default {
// this.projList = res.data
this.getStudentStudyWorkList(params)
},
async chooseStatus(count) {
async chooseStatus(count, index) {
this.activeIndex = index
this.projList = []
//
this.totalStatus.keyword = ''
@ -184,12 +199,12 @@ export default {
userId: uni.getStorageSync('userId'),
status: '-1'
}
this.totalStatus.statusCount = count
if (count === 0) {
this.totalStatus.statusCount = count.id
if (count.id === 0) {
params.status = '-1'
} else if (count === 1) {
} else if (count.id === 1) {
params.status = '1'
} else if (count === 2) {
} else if (count.id === 2) {
params.status = '0'
}
// const res = await getStudentStudyWorkList(params)
@ -265,6 +280,38 @@ export default {
</script>
<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 {
width: 100vw;
height: 100vh;

View File

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

View File

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

View File

@ -2,7 +2,7 @@
<view class="page">
<view class="user-edit">
<view class="user-avatar">
<image :src="facePath"></image>
<image src="/static/images/user.png"></image>
</view>
<view class="user-info" style="height: 120px;">
<span style="font-size: 24px">{{ userName }}</span>
@ -59,7 +59,7 @@ export default {
value: 0, //
secList: [
// { 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: 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'
})
}
},
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'
})
}
})
}
// 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'
// })
// }
// },
// 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'
// })
// }
// })
// }
if (name === '作业计划移动端') {
const paramsWork = {
username: uni.getStorageSync('userPhone'),
password: 'YNsbd@123456'
// jwtToken: uni.getStorageSync('App-Token')
}
// if (name === '') {
// const paramsWork = {
// username: uni.getStorageSync('userPhone'),
// password: 'YNsbd@123456'
// // jwtToken: uni.getStorageSync('App-Token')
// }
console.log('请求参数', paramsWork)
// 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('realNamePermissions', res.data.data.loginUser.permissions)
// uni.removeStorageSync('hasChosenPro')
// 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('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'
})
}
})
}
// 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({}).then(response => {

View File

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