king
2022-04-27 7b9e5eecd148ed819f9fb819a4507f263eaa4533
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -4,6 +4,7 @@
import { Col, Tooltip, notification } from 'antd'
import moment from 'moment'
// import Api from '@/api'
import asyncComponent from './asyncButtonComponent'
import asyncElementComponent from '@/utils/asyncComponent'
import { getMark } from '@/utils/utils.js'
@@ -104,34 +105,70 @@
      return
    }
    if (/^sso$/ig.test(url)) {
      if (!data.LinkUrl1) {
        notification.warning({
          top: 92,
          message: '链接地址不存在!',
          duration: 5
        })
        return
      }
    // positecgroup
    // if (/^sso$/ig.test(url)) {
    //   if (!data.LinkUrl1) {
    //     notification.warning({
    //       top: 92,
    //       message: '链接地址不存在!',
    //       duration: 5
    //     })
    //     return
    //   }
      let _url = data.LinkUrl1
      if (/index\.html/ig.test(_url)) {
        _url = _url.replace(/index\.html.*/ig, '')
      } else if (!/\/$/ig.test(_url)) {
        _url = _url + '/'
      }
    //   let _url = data.LinkUrl1
    //   if (/index\.html/ig.test(_url)) {
    //     _url = _url.replace(/index\.html.*/ig, '')
    //   } else if (!/\/$/ig.test(_url)) {
    //     _url = _url + '/'
    //   }
      url = _url + 'index.html#/ssologin/' + window.btoa(window.encodeURIComponent(JSON.stringify({
        UserID: sessionStorage.getItem('UserID'),
        LoginUID: sessionStorage.getItem('LoginUID'),
        User_Name: sessionStorage.getItem('User_Name'),
        Full_Name: sessionStorage.getItem('Full_Name'),
        avatar: sessionStorage.getItem('avatar'),
        dataM: data.dataM ? 'true' : '',
        debug: data.debug || '',
        role_id: data.role_id || ''
      })))
    } else {
    //   let key = (() => {
    //     let uuid = []
    //     let timestamp = new Date().getTime()
    //     let _options = '0123456789abcdefghigklmnopqrstuv'
    //     for (let i = 0; i < 19; i++) {
    //       uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
    //     }
    //     uuid = timestamp + uuid.join('')
    //     return uuid
    //   })()
    //   let _param = {
    //     func: 'webapi_scan_binding_key',
    //     binding_type: 'mk',
    //     scan_type: 'toggle',
    //     scan_appkey: data.scan_appkey || '',
    //     id: key
    //   }
    //   Api.getSystemConfig(_param).then(res => {
    //     if (!res.status) {
    //       notification.warning({
    //         top: 92,
    //         message: res.message,
    //         duration: 5
    //       })
    //     } else if (res.thd_party_appid && res.thd_party_member_id && res.thd_party_openid) {
    //       let href = _url + 'admin/index.html#/ssologin/' + window.btoa(window.encodeURIComponent(JSON.stringify({
    //         appid: res.thd_party_appid,
    //         memberId: res.thd_party_member_id,
    //         openid: res.thd_party_openid,
    //         key: key
    //       })))
    //       window.open(href)
    //     } else {
    //       notification.warning({
    //         top: 92,
    //         message: '信息缺失,请联系管理员!',
    //         duration: 5
    //       })
    //     }
    //   })
    //   return
    // }
      let Id = ''
      let con = '?'
  
@@ -147,7 +184,6 @@
      
      if (card.joint === 'true') {
        url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      }
    }
    window.open(url)