| | |
| | | cell.statusBarColor = _param.statusBarColor || 'black' |
| | | cell.sysBgColor = _param.sysBgColor || '#ffffff' |
| | | cell.adapter = _param.adapter || '' |
| | | cell.share = _param.share || 'false' // 分享 |
| | | cell.share_des = _param.share_des || '' // 分享描述 |
| | | cell.share_url = _param.share_url || '' // 分享图片 |
| | | cell.share_link = _param.share_link || '' // 分享链接 |
| | | |
| | | if (cell.adapter && (cell.adapter === 'true' || cell.adapter === 'false')) { |
| | | cell.adapter = '' |
| | | } |
| | |
| | | |
| | | if (cell.user_binding !== 'true') { |
| | | cell.user_binding = 'false' |
| | | } |
| | | if (cell.share !== 'true') { |
| | | cell.share = 'false' |
| | | } |
| | | |
| | | if (!cell.adapter && cell.apptype) { |
| | |
| | | |
| | | return item |
| | | }) |
| | | |
| | | if (!selectApp && applist[0]) { |
| | | let _href = window.location.href.split('#')[0] + 'app_record' |
| | | let record = localStorage.getItem(_href) |
| | | record = record ? JSON.parse(record) : null |
| | | |
| | | if (record) { |
| | | if (record.activeId) { |
| | | let index = applist.findIndex(item => item.ID === record.activeId) |
| | | if (index === -1) { |
| | | localStorage.setItem(_href, JSON.stringify({preId: '', activeId: ''})) |
| | | } else if (index !== 0) { |
| | | applist.unshift(...applist.splice(index, 1)) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!selectApp && applist[0]) { |
| | | selectApp = applist[0] |
| | |
| | | }) |
| | | |
| | | // 子应用ID、typename、应用ID、CloudUserID、appkey、login_types(是否需要登录,已弃用)、link_type(是否使用短连接,已弃用)、role_type(是否使用角色管理)、lang、css(皮肤)、title(标题)、favicon(图标)、user_binding(用户绑定)、sms_id(短信模板ID)、自定义 |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || ''})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | |
| | | jumpApp = (item) => { |
| | | const { selectApp } = this.state |
| | | |
| | | let _href = window.location.href.split('#')[0] + 'app_record' |
| | | let record = localStorage.getItem(_href) |
| | | record = record ? JSON.parse(record) : null |
| | | |
| | | if (!record) { |
| | | localStorage.setItem(_href, JSON.stringify({preId: selectApp.ID, activeId: ''})) |
| | | } else { |
| | | if (record.preId === selectApp.ID) { |
| | | localStorage.setItem(_href, JSON.stringify({preId: selectApp.ID, activeId: selectApp.ID})) |
| | | } else { |
| | | localStorage.setItem(_href, JSON.stringify({...record, preId: selectApp.ID})) |
| | | } |
| | | } |
| | | |
| | | let route = 'mobdesign' |
| | | if (item.typename === 'pc') { |
| | |
| | | return item |
| | | }) |
| | | |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || ''})))}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | |
| | | return item |
| | | }) |
| | | |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || ''})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', sysBgColor: item.sysBgColor || '#ffffff', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | let color = skinStyle[item.css] ? skinStyle[item.css].color : '#e8e8e8' |
| | | let binding = '' |
| | | if (item.user_binding === 'true') { |
| | | binding = '需要' |
| | | binding = '用户绑定' |
| | | } |
| | | if (item.share === 'true') { |
| | | binding = binding ? binding + '、分享' : '分享' |
| | | } |
| | | |
| | | return ( |
| | | <div className="sub-app" key={index} style={{borderColor: color}}> |
| | | <Row> |
| | |
| | | </Col> |
| | | <Col span={12}> |
| | | <div className="app-item"> |
| | | {binding ? <div className="label"> |
| | | {/* {binding ? <div className="label"> |
| | | <Tooltip placement="topLeft" title="微信公众号登录时,系统用户与微信用户的绑定方式。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 用户绑定: |
| | | </Tooltip> |
| | | </div> : null} */} |
| | | {binding ? <div className="label"> |
| | | <Tooltip placement="topLeft" title="微信公众号或小程序中,绑定系统用户、自定义分享等功能。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 扩展功能: |
| | | </Tooltip> |
| | | </div> : null} |
| | | <div className="content">{binding}</div> |
| | |
| | | <Col span={12}> |
| | | <div className="app-item"> |
| | | <div className="label">网站头像:</div> |
| | | <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px'}} src={item.favicon} alt="" /> : '无'}</div> |
| | | <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px', borderRadius: '4px'}} src={item.favicon} alt="" /> : '无'}</div> |
| | | </div> |
| | | </Col> |
| | | </Row> |