|
|
@@ -1,32 +1,40 @@
|
|
|
<template>
|
|
|
<view id="login">
|
|
|
- <img class="logo-img" :src="imagesUrl('commonality/logo%401x.png')">
|
|
|
- <view class="title-1">欢迎使用</view>
|
|
|
- <view class="title-2">实验室安全智慧化管控系统</view>
|
|
|
+ <img class="logo-img" :src="imagesUrl('commonality/logo%401x.png')" @click="verificationButton(1)">
|
|
|
+ <view class="title-1" @click="verificationButton(2)">欢迎使用</view>
|
|
|
+ <view class="title-2" @click="verificationButton(3)">实验室安全智慧化管控系统</view>
|
|
|
<view class="null-p"></view>
|
|
|
- <img class="login-img" :src="imagesUrl('commonality/img_tyrzdl_ch%402x.png')">
|
|
|
+ <img class="login-img" @click="verificationButton(4)" :src="imagesUrl('commonality/img_tyrzdl_ch%402x.png')">
|
|
|
<view class="ssoButton" @click="goPage('ssoLogin')">统一身份认证登录</view>
|
|
|
- <view class="accountButton" @click="goPage('accountLogin')">账号密码登录</view>
|
|
|
+ <view class="accountButton" v-if="!weChatProgramVersion"
|
|
|
+ @click="goPage('accountLogin')">账号密码登录</view>
|
|
|
<view class="position-top-right-box"></view>
|
|
|
- <view class="position-bottom-left-box"></view>
|
|
|
+ <view class="position-bottom-left-box" @click="verificationButton(5)"></view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ config
|
|
|
+ } from '@/api/request/config.js'
|
|
|
+ import {
|
|
|
+ configInfo,
|
|
|
+ getConfigByType
|
|
|
+ } from '@/pages/api/index.js'
|
|
|
export default {
|
|
|
name: "ssoLogin",
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ weChatProgramVersion:true,
|
|
|
+ verificationList:[],
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
+ this.getConfigInfo();
|
|
|
},
|
|
|
-
|
|
|
methods: {
|
|
|
goPage(type){
|
|
|
if(type == 'ssoLogin'){
|
|
|
@@ -39,6 +47,50 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ //查询公共配置
|
|
|
+ async getConfigInfo() {
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await configInfo({
|
|
|
+ type: '5'
|
|
|
+ });
|
|
|
+ if (data.code == 200) {
|
|
|
+ let list = JSON.parse(data.data)
|
|
|
+ let newData = {};
|
|
|
+ list.forEach((item) => {
|
|
|
+ let obj = JSON.parse(item.configValue)
|
|
|
+ newData = {
|
|
|
+ ...newData,
|
|
|
+ ...obj
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(config.weChatProgramVersion === newData.weChatProgramVersion){
|
|
|
+ this.$set(this,'weChatProgramVersion',true);
|
|
|
+ }else{
|
|
|
+ this.$set(this,'weChatProgramVersion',false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ verificationButton(val){
|
|
|
+ if(val == 1){
|
|
|
+ this.verificationList.push(1)
|
|
|
+ }else if(val == 2){
|
|
|
+ this.verificationList.push(2)
|
|
|
+ }else if(val == 3){
|
|
|
+ this.verificationList.push(3)
|
|
|
+ }else if(val == 4){
|
|
|
+ this.verificationList.push(4)
|
|
|
+ }else if(val == 5){
|
|
|
+ const str = this.verificationList.join('');
|
|
|
+ if(str === '1423'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/views/login/accountLogin'
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.$set(this,'verificationList',[]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|