页面数据操作
- 1. 调用java服务进行批量推送消息
- 2. 编码服务
- 3. 调用过帐服务
- 4. 调用javadsd
- 5. 调用nodejs
- 6. 微信申请退款
- 7. 用户登录
- 8. 微信授权登录
- 9. 调用JAVA服务
- 10. 判断用户在线状态
1. 调用java服务进行批量推送消息
- 名称
batch-push
- 类型
- 执行类
- 参数
url: string
请求地址ctrlinfo: Array<{ ToId: string;[key: string]: any }>
批量推送信息
- 返回值
- 示例
import batch_push from '@feidao/web/atom/wx/app/msg/batch-push';
import {send_msg as url} from './config';
const push_data = [{ToId: 'sessionid', push_param:''}];
const code = await batch_push(url, push_data);
2. 编码服务
- 名称
doc-code-1
- 类型
- 执行类
- 参数
url: string
请求地址systemid: string
项目的systemidpname: string
编码规则setinfo: string
编码前缀n: number
编码个数
- 返回值
- {}
- 示例
import doc_code from '@feidao/web/atom/wx/app/msg/doc-code-1';
import {send_msg as url, systemid} from './config';
const code = await doc_code(url, systemid, '编码规则', '', 1);
// { result: 'GD201811300018',
// results: [ 'GD201811300018' ],
// code: '1',
// msg: '操作成功' }
const code = await doc_code(url, systemid, '编码规则', '', 2);
// { result: '',
// results: [ 'GD201811300019', 'GD201811300020' ],
// code: '1',
// msg: '操作成功' }
3. 调用过帐服务
- 名称
execute
- 类型
- 执行类
- 参数
url: string
请求地址service_name: string
服务名称condition: string
参数usercode: string
用户名spaceid: string
项目spaceidsystemid: string
项目systemidemptydataflag: string
空数据标识refsystemid: string
项目refsystemid
- 返回值
- 示例
import execute from '@feidao/web/atom/wx/app/msg/execute';
import {send_msg as url, systemid, spaceid} from './config';
const code = await execute(url, 'servce_name', 'condition', 'usercode', spaceid, systemid, '', '');
4. 调用javadsd
- 名称
javadsd
- 类型
- 执行类
- 参数
url: string
请求地址systemid: string
产品systemidrefsystemid: string
产品refsystemidmodelid: string
服务名condition: any
参数
- 返回值
- 示例
import javadsd from '@feidao/web/atom/wx/app/msg/javadsd';
import {send_msg as url, systemid} from './config';
const code = await javadsd(url, systemid, '', 'service_name', 'params');
5. 调用nodejs
- 名称
nodejs
- 类型
- 执行类
- 参数
url: string
请求地址service_name: string
服务名condition: any
[condition={}] 参数
- 返回值
- 示例
import nodejs from '@feidao/web/atom/wx/app/msg/nodejs';
import {send_msg as url, systemid, spaceid} from './config';
const code = await nodejs(url, 'servce_name', {});
6. 微信申请退款
- 名称
refunds
- 类型
- 执行类
- 参数
url: string
请求地址trade_no: string
订单单号fee: string
退款金额out_refund_no: string
退款单号
- 返回值
- 示例
import refunds from '@feidao/web/atom/wx/app/msg/refunds';
import {send_msg as url, systemid, spaceid} from './config';
const code = await refunds(url, 'trade_no', '0.2', 'out_refund_no');
7. 用户登录
- 名称
user-login
- 类型
- 执行类
- 参数
url: stirng
请求地址usr: stirng
用户名psw: stirng
密码
- 返回值
- 示例
import user_login from '@feidao/web/atom/wx/app/msg/user-login';
import {send_msg as url, systemid, spaceid} from './config';
const code = await user_login(url, 'admin', '111111');
8. 微信授权登录
- 名称
active-login
- 类型
- 执行类
- 参数
url: stirng
请求地址spaceid: stirng
项目spaceidpolicyno: stirng
策略编号(项目经理提供)wx_user_info: IUserInfo
微信用户信息
- 返回值
{ code: number; msg: string; userInfo: { _id: string; usercode: string; user_name: string; name_spell: string; is_disabled: boolean; create_time: number; productid: string; avatar_path: string; avatar_name: string; avatar_type: string; email: string; phone: string; last_login_time: string; phone_verified: boolean; email_verified: boolean; is_admin: string; sessionid: string; }; }
- 示例
import active_login from '@feidao/web/atom/wx/app/msg/active-login';
import {send_msg as url, systemid, spaceid} from './config';
const info = await active_login(url, spaceid, '001', {});
9. 调用JAVA服务
- 名称
call-service
- 类型
- 执行类
- 参数
url: stirng
请求服务(POST)的url,格式为: http(s)://host:port/sendmessage,在部署环境下,一般应固定为’./sendmessage’,开发环境下,默认配置下应为’http://127.0.0.0:8889/sendmessage’msg_type: stirng
服务名称(msgtype)msg: stirng
服务参数
- 返回值
any
- 示例
import call_service from '@feidao/web/atom/wx/app/msg/call-service';
import {send_msg as url, systemid, spaceid} from './config';
const info = await call_service(url, 'msgtype', {});
10. 判断用户在线状态
- 名称
check-isonline
- 类型
- 执行类
- 参数
url: stirng
请求服务(POST)的url,格式为: http(s)://host:port/sendmessage,在部署环境下,一般应固定为’./sendmessage’,开发环境下,默认配置下应为’http://127.0.0.0:8889/sendmessage’
- 返回值
boolean
- 示例
import check_isonline from '@feidao/web/atom/wx/app/msg/check-isonline';
import {send_msg as url} from './config';
const res = await check_isonline(url);
// true 在线
// false 不在线