| | |
| | | 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' |
| | |
| | | import './index.scss' |
| | | |
| | | const { Paragraph } = Typography |
| | | const { confirm } = Modal |
| | | |
| | | const Header = asyncComponent(() => import('./header')) |
| | | |
| | |
| | | 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 |
| | | |
| | |
| | | </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> |