king
2025-04-09 8ed37f50b3b834dd874587c83bdb4b9c44004897
src/views/appcheck/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import { withRouter } from 'react-router-dom'
import { Spin, notification, Table, Typography, Row, Col, Tooltip } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import { Spin, notification, Table, Typography, Row, Col, Tooltip, Button, Modal } from 'antd'
import { QuestionCircleOutlined, LinkOutlined } from '@ant-design/icons'
import Api from '@/api'
import { langs } from '@/store/options.js'
@@ -9,6 +9,7 @@
import './index.scss'
const { Paragraph } = Typography
const { confirm } = Modal
const Header = asyncComponent(() => import('./header'))
@@ -147,6 +148,47 @@
    this.setState({ selectApp: record })
  }
  updateLink = (item) => {
    let link = `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}`
    let param = {
      func: 's_miniapp_kei_linkurl_upt',
      id: item.ID,
      linkurl: link
    }
    if (window.GLOB.mainSystemApi) {
      param.rduri = window.GLOB.mainSystemApi
    }
    confirm({
      content: '确定更新应用链接地址吗?',
      onOk() {
        return new Promise(resolve => {
          Api.genericInterface(param).then(result => {
            if (result.status) {
              notification.success({
                top: 92,
                message: '操作成功!',
                duration: 3
              })
            } else {
              notification.warning({
                top: 92,
                message: result.message,
                duration: 5
              })
            }
            resolve()
          }, () => {
            resolve()
          })
        })
      },
      onCancel() {}
    })
  }
  render () {
    const { loading, columns, applist, selectApp } = this.state
@@ -259,6 +301,7 @@
                    </Col>
                  </Row>
                  <div className="action">
                    <Button type="link" onClick={() => this.updateLink(item)}><LinkOutlined style={{color: 'orange'}}/></Button>
                    <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${window.GLOB.baseurl}${item.typename === 'pad' ? 'mob' : item.typename}/index.html#/index/${this.state.selectApp.kei_no}/${item.typename !== 'pc' ? item.typename + '/' : ''}${item.lang}${item.wxAppId ? '/' + item.wxAppId : ''}` }}></Paragraph>
                  </div>
                </div>