| | |
| | | |
| | | if (window.GLOB.WXAppID && window.GLOB.nginx && !wxTemps) { |
| | | Api.wxAccessToken().then(res => { |
| | | let wxtoken = res.oa_access_token || '' |
| | | // let minitoken = res.mini_access_token || '' |
| | | |
| | | if (wxtoken) { |
| | | Api.wxNginxRequest(`cgi-bin/template/get_all_private_template?access_token=${wxtoken}`, 'get').then(res => { |
| | | if (res.access_token) { |
| | | Api.wxNginxRequest(`cgi-bin/template/get_all_private_template?access_token=${res.access_token}`, 'get').then(res => { |
| | | let temps = [] |
| | | if (res.template_list) { |
| | | temps = res.template_list.filter(item => { |
| | |
| | | |
| | | localStorage.removeItem('wxTemplates') |
| | | } |
| | | // if (minitoken) { |
| | | // Api.wxNginxRequest(`wxaapi/newtmpl/gettemplate?access_token=${minitoken}`, 'get').then(res => { |
| | | // if (res.errmsg === 'ok' && res.data) { |
| | | // sessionStorage.setItem('wxMiniTemplates', JSON.stringify(res.data)) |
| | | // } else { |
| | | // sessionStorage.setItem('wxMiniTemplates', JSON.stringify([])) |
| | | // } |
| | | // }) |
| | | // } else { |
| | | // sessionStorage.setItem('wxMiniTemplates', JSON.stringify([])) |
| | | // } |
| | | }) |
| | | } else if (wxTemps) { |
| | | wxTemps = JSON.parse(wxTemps) |
| | | |
| | | this.resetTemps(wxTemps) |
| | | } else { |
| | | this.resetTemps([]) |
| | | } |
| | | } |
| | | |
| | |
| | | content: '订单类型:{{keyword1.DATA}}\n订单号:{{keyword2.DATA}}\n订单状态:{{keyword3.DATA}}', |
| | | example: '订单类型:退租申请\r\n订单号:TZ16101909\r\n订单状态:待取货' |
| | | }, |
| | | { |
| | | template_id: 'mk_category_temp', |
| | | title: '类目模板', |
| | | primary_industry: '', |
| | | deputy_industry: '', |
| | | content: '', |
| | | example: '' |
| | | } |
| | | // { |
| | | // template_id: 'mk_category_temp', |
| | | // title: '类目模板', |
| | | // primary_industry: '', |
| | | // deputy_industry: '', |
| | | // content: '', |
| | | // example: '' |
| | | // } |
| | | ] |
| | | |
| | | let _wxTemps = [...wxTemps, ...sysTemps] |
| | |
| | | <Col span={24}></Col> |
| | | <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title={'请在服务器完成公众号配置。'}> |
| | | <Tooltip placement="bottomLeft" title="请在服务器完成公众号配置。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 公众号消息 |
| | | </Tooltip> |