| | |
| | | import React, {Component} from 'react' |
| | | import { fromJS } from 'immutable' |
| | | import { Spin, notification, Input, Button, Table, Modal, Typography, Row, Col, Tooltip } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | import { QuestionCircleOutlined, LinkOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | |
| | |
| | | }) |
| | | } |
| | | if (applangList.length) { |
| | | applangList.unshift('zh-CN') |
| | | applangList = JSON.stringify(applangList) |
| | | } else { |
| | | applangList = '' |
| | |
| | | }) |
| | | } |
| | | if (applangList.length) { |
| | | applangList.unshift('zh-CN') |
| | | applangList = JSON.stringify(applangList) |
| | | } else { |
| | | applangList = '' |
| | |
| | | }) |
| | | } |
| | | |
| | | 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 |
| | | } |
| | | |
| | | confirm({ |
| | | content: '确定更新应用链接地址吗?', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | Api.getCloudConfig(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, visible, subVisible, columns, transcolumns, applist, translist, transVisible, selectApp, selectTran, selectSubApp, scriptVisible, scriptlist, scriptcolumns, selectScriptKeys } = this.state |
| | | |
| | |
| | | <Button type="link" onClick={() => this.setState({ selectSubApp: item, subVisible: 'edit' })} style={{color: '#8E44AD'}}>修改</Button> |
| | | <Button type="link" onClick={() => this.deleteSubApp(item)} style={{color: '#ff4d4f'}}>删除</Button> |
| | | <Button type="link" onClick={() => this.jumpApp(item)}>编辑应用</Button> |
| | | <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> |