| | |
| | | </view> |
| | | </uni-popup-dialog> |
| | | </uni-popup> |
| | | |
| | | |
| | | <view class="btn" @tap="submit">登 录</view> |
| | | <!-- <view class="btn apibtn" @tap="changeApi=true">服务器设置</view> --> |
| | | <view class="btn apibtn" @click="openServerSettingHandler">服务器设置</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | setLoginData, |
| | | setUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import hFormAlert from '@/components/h-form-alert/h-form-alert.vue'; |
| | | import { |
| | | CommonUtils |
| | | } from "../../utils/common"; |
| | | export default { |
| | | components: { |
| | | hFormAlert |
| | | }, |
| | | data() { |
| | | return { |
| | | CommonUtils, |
| | | arrayDataBases: [], |
| | | DataBases: '', |
| | | |
| | | |
| | | arrayServerOrganization: ["浙江智云迈思", "温州海诚"], |
| | | arrayServerOrganizationValues: [ |
| | | 'http://47.96.97.237/API/', |
| | |
| | | arrayOrganization: [], |
| | | Organization: '', |
| | | HOrgNameList: [], |
| | | |
| | | |
| | | HOrgName: '', |
| | | UserName: '', //admin 001 |
| | | PassWord: '', //123456 |
| | |
| | | serverUrlCache: '', |
| | | } |
| | | }, |
| | | onLoad() { |
| | | onShow() { |
| | | var logindata = uni.getStorageSync('loginData') || '' |
| | | // console.log(logindata) |
| | | if (logindata) { |
| | |
| | | this.UserName = logindata.UserName |
| | | this.PassWord = logindata.PassWord |
| | | } |
| | | |
| | | |
| | | this.serverUrlCache = this.serverUrl |
| | | console.log('this.serverUrlCache: ',this.serverUrlCache); |
| | | console.log('this.serverUrlCache: ', this.serverUrlCache); |
| | | let index = this.arrayServerOrganizationValues.findIndex((e) => { |
| | | return e == this.serverUrlCache |
| | | }) |
| | |
| | | await this.$nextTick(() => { |
| | | this.Organization = this.arrayOrganization[0] |
| | | this.HOrgName = this.HOrgNameList[0] |
| | | |
| | | |
| | | let org = uni.getStorageSync('Organization') |
| | | let orgName = uni.getStorageSync('OrganizationID') |
| | | let orgHas = Array.from(this.arrayOrganization).findIndex((e) => e == org) |
| | | if(org && (orgHas != -1)) { |
| | | if (org && (orgHas != -1)) { |
| | | this.Organization = org |
| | | this.HOrgName = orgName |
| | | } |
| | |
| | | this.DataBases = this.arrayDataBases[e.detail.value] |
| | | uni.setStorageSync('DataBases', this.DataBases); |
| | | }, |
| | | |
| | | |
| | | getOrganization() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetOrganizations', |
| | |
| | | uni.setStorageSync('login', "login"); |
| | | uni.setStorageSync('Organization', this.Organization); |
| | | uni.setStorageSync('OrganizationID', this.HOrgName); |
| | | |
| | | console.log('this.serverUrl: ', this.serverUrl); |
| | | this.CommonUtils.setServerUrl(this.serverUrl) |
| | | uni.reLaunch({ |
| | | url: '/pages/index/index' |
| | | }) |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | .bg-img { |
| | | position: fixed; |
| | |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | |
| | | |
| | | .container { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | |
| | | .title { |
| | | margin-top: 174rpx; |
| | | font-size: 47rpx; |
| | | font-weight: bold; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | |
| | | .box { |
| | | width: 682rpx; |
| | | position: relative; |
| | | top: 120rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | |
| | | |
| | | .logo { |
| | | width: 155rpx; |
| | | height: 155rpx; |
| | |
| | | z-index: 9; |
| | | background-color: rgba(255, 255, 255, 0.5); |
| | | border-radius: 100%; |
| | | |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | background-color: #f0f3f7; |
| | | } |
| | | } |
| | | |
| | | |
| | | .login { |
| | | width: 100%; |
| | | height: 480rpx; |
| | |
| | | border-radius: 25rpx 0 25rpx 0; |
| | | box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14); |
| | | padding-top: 160rpx; |
| | | |
| | | |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | margin-right: 38rpx; |
| | | margin-bottom: 70rpx; |
| | | |
| | | |
| | | .left { |
| | | font-size: 34rpx; |
| | | font-weight: 400; |
| | | color: #3C3C3C; |
| | | } |
| | | |
| | | |
| | | .right { |
| | | width: 441rpx; |
| | | height: 68rpx; |
| | | background: #EBEBEB; |
| | | border-radius: 10rpx; |
| | | |
| | | |
| | | input { |
| | | height: 100%; |
| | | padding: 0 30rpx; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // .api{ |
| | | // margin-left: 30rpx; |
| | | // font-size: 27rpx; |
| | |
| | | // } |
| | | } |
| | | } |
| | | |
| | | |
| | | .btn { |
| | | width: 540rpx; |
| | | height: 92rpx; |
| | |
| | | text-align: center; |
| | | font-size: 36rpx; |
| | | } |
| | | |
| | | |
| | | .apibtn { |
| | | margin-top: 50rpx; |
| | | background: #eec18e; |
| | | box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3); |
| | | } |
| | | } |
| | | |
| | | |
| | | .popup-content { |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 30rpx; |
| | | |
| | | |
| | | .pop-item { |
| | | border: #EBEBEB 2rpx solid; |
| | | border-radius: 10rpx; |
| | | padding: 14rpx 8rpx; |
| | | } |
| | | |
| | | |
| | | >picker { |
| | | background-color: #EBEBEB; |
| | | } |