From 9f1fdfacd47695e633e43d7d820272c7e87a78df Mon Sep 17 00:00:00 2001
From: unknown <331404948@qq.com>
Date: Fri, 22 Sep 2023 19:30:39 +0800
Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/js/mixins.js | 1 +
components/UserTab/UserTab - 副本.vue | 130 --------------
config/api.js | 1 +
config/request - 副本.js | 52 ------
config/site.config.js | 8 +-
manifest.json | 5 +-
pages/login/login.vue | 90 +++++++---
pages/login/loginByPhone.vue | 194 ---------------------
pages/tabbar/appointmenRecord/index.vue | 17 --
pages/tabbar/examSimulation/index.vue | 5 +-
pages/tabbar/statistics/index.vue | 5 +-
pages/userCenter/teachingData/teachingData.vue | 74 +++++++-
static/images/bigImg/indexTopBanner.png | Bin 403631 -> 0 bytes
static/images/bigImg/topPageBg.png | Bin 5069 -> 0 bytes
static/images/logo.png | Bin 10347 -> 4023 bytes
static/images/userCenter/loginTopBg.png | Bin 36319 -> 0 bytes
.../__MACOSX/登录流程切图/._.DS_Store | Bin 120 -> 0 bytes
.../__MACOSX/登录流程切图/._btn_1.png | Bin 233 -> 0 bytes
.../登录流程切图/.DS_Store | Bin 6148 -> 0 bytes
.../登录流程切图/登录流程切图/bg_1.png | Bin 36319 -> 0 bytes
.../登录流程切图/btn_1.png | Bin 461 -> 0 bytes
.../登录流程切图/btn_2.png | Bin 567 -> 0 bytes
.../登录流程切图/title_1.png | Bin 8982 -> 0 bytes
static/logo.png | Bin 4023 -> 0 bytes
store/index.js | 2 -
store/modules/add.js | 91 ----------
store/modules/user.js | 4 +-
27 files changed, 157 insertions(+), 522 deletions(-)
delete mode 100644 components/UserTab/UserTab - 副本.vue
delete mode 100644 config/request - 副本.js
delete mode 100644 pages/login/loginByPhone.vue
delete mode 100644 pages/tabbar/appointmenRecord/index.vue
delete mode 100644 static/images/bigImg/indexTopBanner.png
delete mode 100644 static/images/bigImg/topPageBg.png
delete mode 100644 static/images/userCenter/loginTopBg.png
delete mode 100644 static/images/登录流程切图/__MACOSX/登录流程切图/._.DS_Store
delete mode 100644 static/images/登录流程切图/__MACOSX/登录流程切图/._btn_1.png
delete mode 100644 static/images/登录流程切图/登录流程切图/.DS_Store
delete mode 100644 static/images/登录流程切图/登录流程切图/bg_1.png
delete mode 100644 static/images/登录流程切图/登录流程切图/btn_1.png
delete mode 100644 static/images/登录流程切图/登录流程切图/btn_2.png
delete mode 100644 static/images/登录流程切图/登录流程切图/title_1.png
delete mode 100644 static/logo.png
delete mode 100644 store/modules/add.js
diff --git a/common/js/mixins.js b/common/js/mixins.js
index 09c8274..c248b2d 100644
--- a/common/js/mixins.js
+++ b/common/js/mixins.js
@@ -5,6 +5,7 @@ export default {
computed: {
...mapState({
identity: state=> state.user.identity,
+ role: state=>state.user.vuex_userInfo.roles
}),
},
data() {
diff --git a/components/UserTab/UserTab - 副本.vue b/components/UserTab/UserTab - 副本.vue
deleted file mode 100644
index d5f7ebd..0000000
--- a/components/UserTab/UserTab - 副本.vue
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/config/api.js b/config/api.js
index a68ade9..e02a20d 100644
--- a/config/api.js
+++ b/config/api.js
@@ -19,3 +19,4 @@ export const tenantPage = (params) => http.get('system/tenant/pages', {params: p
+
diff --git a/config/request - 副本.js b/config/request - 副本.js
deleted file mode 100644
index 9e7c0a2..0000000
--- a/config/request - 副本.js
+++ /dev/null
@@ -1,52 +0,0 @@
-
-// 此vm参数为页面的实例,可以通过它引用vuex中的变量
-module.exports = (vm) => {
- // 初始化请求配置
- uni.$u.http.setConfig((config) => {
- /* config 为默认全局配置*/
- config.baseURL = 'http://121.41.97.244:8090'; /* 根域名 */
- config.header['content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
- return config
- })
-
- // 请求拦截
- uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
- // 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
- config.data = config.data || {}
- // 根据custom参数中配置的是否需要token,添加对应的请求头
- if(config?.custom?.auth) {
- // 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
- config.header.token = vm.$store.state.userInfo.token
- }
- return config
- }, config => { // 可使用async await 做异步操作
- return Promise.reject(config)
- })
-
- // 响应拦截
- uni.$u.http.interceptors.response.use((response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/
- const data = response.data
- console.log('response')
- console.log(data)
- // 自定义参数
- const custom = response.config?.custom
- if (data.code !== 0) {
- // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
- if (custom.toast !== false) {
- uni.$u.toast(data.message)
- }
-
- // 如果需要catch返回,则进行reject
- if (custom?.catch) {
- return Promise.reject(data)
- } else {
- // 否则返回一个pending中的promise,请求不会进入catch中
- return new Promise(() => { })
- }
- }
- return data === undefined ? {} : data
- }, (response) => {
- // 对响应错误做点什么 (statusCode !== 200)
- return Promise.reject(response)
- })
-}
\ No newline at end of file
diff --git a/config/site.config.js b/config/site.config.js
index a4a3c31..d0ec742 100644
--- a/config/site.config.js
+++ b/config/site.config.js
@@ -1,8 +1,8 @@
const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false
module.exports = {
- H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
- WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/',//非代理地址
- TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/',
- httpPrefix: '/admin-api/'
+ H5_API: VUE_APP_PLATFORM === 'h5' ? '/api/' : '',//h5代理
+ WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',//非代理地址
+ TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',
+ httpPrefix: 'admin-api/'
};
diff --git a/manifest.json b/manifest.json
index 1e45a30..99cec3a 100644
--- a/manifest.json
+++ b/manifest.json
@@ -53,7 +53,8 @@
"appid" : "wx2d71605af3b620e6",
"setting" : {
"urlCheck" : false,
- "es6" : true
+ "es6" : true,
+ "minified" : true
},
"usingComponents" : true,
"permission" : {
@@ -81,7 +82,7 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
- "target" : "http://192.168.1.26:48080/",
+ "target" : "http://192.168.1.26:48082/",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 45a45ae..adc713f 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -34,6 +34,7 @@
-->
+
@@ -51,7 +52,14 @@
},
codeOn: false,
show: false,
- columnsArea: []
+ columnsArea: [],
+ list: [],
+ title: '请选择您要登录的角色',
+ showRole: false,
+ roleObj: {
+ app_school_principal: '校长',
+ xinghuiSchoolManager: '实操教练'
+ }
}
},
onLoad() {
@@ -65,6 +73,48 @@
}
},
methods: {
+ selectClick(item) {
+ this.showRole = false
+ this.chooseIdentity(item.name)
+ },
+ chooseIdentity(name) {
+ // let val = ''
+ // if(this.FormData.username=='18267103167') {
+ // val = '实操教练'
+ // }else if(this.FormData.username=='18267103168') {
+ // val = '校长'
+ // }else if (this.FormData.username=='18267103169'){
+ // val = '考场模拟教练'
+ // }else {
+ // val = '模拟器老师'
+ // this.$store.commit('upDateIdentity', val)
+ // uni.reLaunch({
+ // url: '/pages/tabbar/examSimulation/index'
+ // })
+ // return false
+ // }
+ // if(this.FormData.username=='18267103167') {
+ // val = '实操教练'
+ // }else if(this.FormData.username=='18267103168') {
+ // val = '校长'
+ // }else if (this.FormData.username=='18267103169'){
+ // val = '考场模拟教练'
+ // }else {
+ // val = '模拟器老师'
+
+ // }
+ if(name=='模拟器老师') {
+ this.$store.commit('upDateIdentity', val)
+ uni.reLaunch({
+ url: '/pages/tabbar/examSimulation/index'
+ })
+ return false
+ }
+ this.$store.commit('upDateIdentity', name)
+ uni.reLaunch({
+ url: '/pages/tabbar/statistics/index'
+ })
+ },
confirmArea(val) {
let item = val.value[0]
this.FormData.tenantName =item.name
@@ -112,30 +162,26 @@
}
}, 1000);
},
+
async submitFn() {
if(!this.btnHighlight) return
const {data: res} = await loginPwd(this.FormData)
- this.$store.commit('update_vuex_loginInfo')
- this.$store.dispatch('getUserInfo')
- let val = ''
- if(this.FormData.phone=='18267103167') {
- val = '实操教练'
- }else if(this.FormData.phone=='18267103168') {
- val = '校长'
- }else if (this.FormData.phone=='18267103169'){
- val = '考场模拟教练'
- }else {
- val = '模拟器老师'
- this.$store.commit('upDateIdentity', val)
- uni.reLaunch({
- url: '/pages/tabbar/examSimulation/index'
- })
- return false
- }
- this.$store.commit('upDateIdentity', val)
- uni.reLaunch({
- url: '/pages/tabbar/statistics/index'
+ this.$store.commit('update_vuex_loginInfo', res)
+ await this.$store.dispatch('getUserInfo')
+
+ console.log(this.role)
+ this.role.forEach((item)=>{
+ let obj = {
+ name: this.roleObj[item]
+ }
+ this.list.push(obj)
})
+ if(this.list.length>1) {
+ this.showRole = true
+ }
+ console.log(this.list)
+ return
+
}
}
}
@@ -146,7 +192,7 @@
.main {
width: 100%;
min-height: 100vh;
- background: url('../../static/images/userCenter/loginTopBg.png') no-repeat;
+ background: url('http://192.168.1.20:81/zhili/image/20230922/f5e2cfaf05f441c1b9f897e7dc284f1d.png') no-repeat;
background-size: 100% 360rpx;
.u-back-top {
padding: 32rpx 0 0 0;
diff --git a/pages/login/loginByPhone.vue b/pages/login/loginByPhone.vue
deleted file mode 100644
index 8f2bb70..0000000
--- a/pages/login/loginByPhone.vue
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 忘记密码
- 登 录
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/tabbar/appointmenRecord/index.vue b/pages/tabbar/appointmenRecord/index.vue
deleted file mode 100644
index 514938f..0000000
--- a/pages/tabbar/appointmenRecord/index.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- 预约记录
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/tabbar/examSimulation/index.vue b/pages/tabbar/examSimulation/index.vue
index a965bce..1c90bc4 100644
--- a/pages/tabbar/examSimulation/index.vue
+++ b/pages/tabbar/examSimulation/index.vue
@@ -19,7 +19,10 @@
return {
}
- }
+ },
+ onShow() {
+ uni.hideTabBar();
+ },
}
diff --git a/pages/tabbar/statistics/index.vue b/pages/tabbar/statistics/index.vue
index 8a5265b..6fa6493 100644
--- a/pages/tabbar/statistics/index.vue
+++ b/pages/tabbar/statistics/index.vue
@@ -21,7 +21,10 @@
return {
}
- }
+ },
+ onShow() {
+ uni.hideTabBar();
+ },
}
diff --git a/pages/userCenter/teachingData/teachingData.vue b/pages/userCenter/teachingData/teachingData.vue
index 56491d3..3867235 100644
--- a/pages/userCenter/teachingData/teachingData.vue
+++ b/pages/userCenter/teachingData/teachingData.vue
@@ -1,11 +1,11 @@
-
-
+
+
专属您的
教学数据
-
+
@@ -50,11 +50,77 @@
平均拿证时间
47天
- 立即分享
+