| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <template>
- <view class="wrap">
- <view></view>
- <view class="header">
- <view>
- <image @click="logShow" src="/static/login-icon.png"></image>
- </view>
- <view style="margin-top: 40px;">郑州人民医院综合服务保障调度平台</view>
- </view>
-
- </view>
- </template>
- <script>
- import { getCode } from '@/utils/dd'
- import { getToken } from '@/utils/auth'
- import { http } from '@/utils/request';
- //#ifdef H5
- import VConsole from 'vconsole'
- //#endif
- export default {
- data() {
- return {
- isAllow:"",
- type: -1,
- wid: '',
- sms_id: '',
- orderId: '',
- segmenter: 0,
- logoImage: '/static/login-icon.png',
- bannnerData: [],
- }
- },
- onLoad(optioin) {
- //#ifdef H5
- const deBug = localStorage.getItem('isDeBug');
- if(deBug === 'true'){
-
- const vConsole = new VConsole();
-
- }
- //#endif
-
- this.init(optioin)
-
- },
- methods: {
- init() {
- // 钉钉免登录
-
- getCode((type,code) => {
-
- console.log(type,code)
- if(type == 'H5' && code === 'fail' ){
-
- const userInfo = {code: code,loginway:"phoneDing"}
- uni.showLoading()
- http.post("Home/DingNewlogin", userInfo).then((response) => {
- // uni.setStorageSync('token', response.data)
- console.log(response.data)
- setToken(response.data)
-
- uni.setStorageSync('loginway','phoneDing')
- this.$mStore.dispatch("GetInfo").then((e)=>{
-
- uni.setStorageSync('roleCode', e.data.Role.F_RoleCode)
- uni.setStorageSync('userName', e.data.User.F_UserName)
- uni.setStorageSync('userId', e.data.User.F_UserId.toString())
- if(e.data.Dept){
- uni.setStorageSync('deptId', e.data.Dept.F_DeptId)
- uni.setStorageSync('deptName', e.data.Dept.F_DeptName)
- }
- uni.setStorageSync('userCode', e.data.User.F_UserCode)
- uni.setStorageSync('storageAllowUserDept', e.data.User.F_AllowDepartment)
- if(e.data.User.F_AllowDepartment.indexOf(",") >= 0){
- this.isAllow = "1"
- }else{
- this.isAllow = "0"
- }
- uni.setStorageSync('isAllow', this.isAllow)
-
- const code = uni.getStorageSync("roleCode");
- uni.reLaunch({
-
- url: '/pages/dingidngRepair/dingidngRepair?orderType='+ option.orderType
- });
- })
-
- })
- .catch((e) => {
-
- reject(e)
- })
- } else {
- uni.reLaunch({
- url: '/pages/noDing/noDing'
- });
- }
-
- })
- },
-
- logShow(){
- if(this.logShow.index){
- this.logShow.index += 1;
- }else{
- this.logShow.index = 1;
- }
-
- clearTimeout(this.logShow.timeOut)
-
- this.logShow.timeOut = setTimeout(()=>{
- this.logShow.index = 0;
- console.log(this.logShow.index)
- },1000)
-
- if(this.logShow.index >= 5){
- //#ifdef H5
- localStorage.setItem('isDeBug' , 'true');
-
- const vConsole = new VConsole();
- //#endif
- }
- }
- },
- }
- </script>
- <style lang="scss">
- .wrap{
- width: 100%;
- height: 100vh;
- // background-color: #fff;
- // background-image: url('/static/home.png');
- }
- .header{
- // position: absolute;
- // left: 36%;
- // top: 25%;
- text-align: center;
- padding-top: 150px;
- // color: #fff;
- font-family: cursive;
- font-size: 21px;
- }
- .header image{
- width:340rpx;
- height:340rpx;
- // margin-bottom: 40px;
- /* border-radius:50%; */
- }
- .title{
- width: 20px;
- position: absolute;
- top: 15%;
- left: 18%;
- font-family: cursive;
- font-size: 19px;
- }
- </style>
|