Commit fd97a6a7 authored by 劳工's avatar 劳工

Merge branch 'feature/190419-dynamic' into 'master'

feat(change the api component params to dynamic)

See merge request !3
parents 9b7bd77a 61292177
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* 简单的api组件 * 简单的api组件
*/ */
import {utils} from 'scilla' import {utils, dynamic} from 'scilla'
import ApiComponent from "./ApiComponent"; import ApiComponent from "./ApiComponent";
import {callApi} from "./webService"; import {callApi} from "./webService";
...@@ -13,7 +13,7 @@ export default class SampleApi extends ApiComponent { ...@@ -13,7 +13,7 @@ export default class SampleApi extends ApiComponent {
name: string; name: string;
uri: string; uri: string;
method: string = 'POST'; method: string = 'POST';
params: any = {}; params: dynamic;
async callApi(name, paramsInput, ...args){ async callApi(name, paramsInput, ...args){
if(this.name == name){ if(this.name == name){
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* 简单的api组件 * 简单的api组件
*/ */
import {utils} from 'scilla' import {utils, dynamic} from 'scilla'
import ApiComponent from "./ApiComponent"; import ApiComponent from "./ApiComponent";
import {callApi, polling} from "./webService"; import {callApi, polling} from "./webService";
...@@ -14,7 +14,7 @@ export default class SamplePollingApi extends ApiComponent { ...@@ -14,7 +14,7 @@ export default class SamplePollingApi extends ApiComponent {
successValues: any[]; successValues: any[];
uri: string; uri: string;
method: string = 'GET'; method: string = 'GET';
params: any = {}; params: dynamic;
maxTimes: number = 5; maxTimes: number = 5;
delay: number = 500; delay: number = 500;
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 获取渲染数据 * 获取渲染数据
...@@ -11,9 +11,9 @@ export default class AjaxElementComponent extends SampleApi { ...@@ -11,9 +11,9 @@ export default class AjaxElementComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'GET'; method: string = 'GET';
//duiba活动ID //duiba活动ID
duibaId: string; duibaId: dynamic;
//入库活动ID //入库活动ID
activityId: string; activityId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { duibaId: this.duibaId, activityId: this.activityId }); utils.injectProp(this.params, { duibaId: this.duibaId, activityId: this.activityId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 获取渲染数据 * 获取渲染数据
...@@ -11,19 +11,19 @@ export default class DoJoinComponent extends SampleApi { ...@@ -11,19 +11,19 @@ export default class DoJoinComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'GET'; method: string = 'GET';
//入库活动ID //入库活动ID
activityId: string; activityId: dynamic;
//token //token
token: string; token: dynamic;
//再来一次订单ID //再来一次订单ID
againOrderId: string; againOrderId: dynamic;
//活动类型 //活动类型
activityType: string; activityType: dynamic;
//用户ID //用户ID
consumerId: string; consumerId: dynamic;
//积分 //积分
credits: number; credits: dynamic;
//分数 分段发奖 //分数 分段发奖
score: number; score: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { utils.injectProp(this.params, {
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 查询订单状态 * 查询订单状态
...@@ -11,7 +11,7 @@ export default class GetOrderStatusComponent extends SampleApi { ...@@ -11,7 +11,7 @@ export default class GetOrderStatusComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId }); utils.injectProp(this.params, { orderId: this.orderId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 查询奖品信息 * 查询奖品信息
...@@ -11,11 +11,11 @@ export default class PrizeDetailComponent extends SampleApi { ...@@ -11,11 +11,11 @@ export default class PrizeDetailComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'GET'; method: string = 'GET';
// //
appItemId: string; appItemId: dynamic;
// //
itemId: string; itemId: dynamic;
// //
appId: string; appId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { appItemId: this.appItemId, itemId: this.itemId, appId: this.appId }); utils.injectProp(this.params, { appItemId: this.appItemId, itemId: this.itemId, appId: this.appId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SamplePollingApi from "../../../SamplePollingApi"; import SamplePollingApi from "../../../SamplePollingApi";
export default class SubCreditsStatusComponent extends SamplePollingApi { export default class SubCreditsStatusComponent extends SamplePollingApi {
...@@ -9,7 +9,7 @@ export default class SubCreditsStatusComponent extends SamplePollingApi { ...@@ -9,7 +9,7 @@ export default class SubCreditsStatusComponent extends SamplePollingApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId }); utils.injectProp(this.params, { orderId: this.orderId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
export default class DatapashComponent extends SampleApi { export default class DatapashComponent extends SampleApi {
...@@ -9,11 +9,11 @@ export default class DatapashComponent extends SampleApi { ...@@ -9,11 +9,11 @@ export default class DatapashComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
//防作弊数据 //防作弊数据
dynamicData: any; dynamicData: dynamic;
//duiba活动ID //duiba活动ID
duibaId: any; duibaId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId, duibaId: this.duibaId, dynamicData: this.dynamicData }); utils.injectProp(this.params, { orderId: this.orderId, duibaId: this.duibaId, dynamicData: this.dynamicData });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SamplePollingApi from "../../../SamplePollingApi"; import SamplePollingApi from "../../../SamplePollingApi";
/** /**
* 查询游戏开始订单状态 * 查询游戏开始订单状态
...@@ -11,7 +11,7 @@ export default class GetNgameStartStatusComponent extends SamplePollingApi { ...@@ -11,7 +11,7 @@ export default class GetNgameStartStatusComponent extends SamplePollingApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId }); utils.injectProp(this.params, { orderId: this.orderId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 游戏提交成绩接口 * 游戏提交成绩接口
...@@ -11,15 +11,15 @@ export default class NgameManySubmitComponent extends SampleApi { ...@@ -11,15 +11,15 @@ export default class NgameManySubmitComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
//分数 //分数
score: string; score: dynamic;
//无用 //无用
gameData: any; gameData: dynamic;
//签名 //签名
sgin: string; sgin: dynamic;
//防作弊数据 //防作弊数据
dynamicData: any; dynamicData: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { utils.injectProp(this.params, {
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 游戏提交成绩接口 * 游戏提交成绩接口
...@@ -11,15 +11,15 @@ export default class NgameSubmitComponent extends SampleApi { ...@@ -11,15 +11,15 @@ export default class NgameSubmitComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
//分数 //分数
score: string; score: dynamic;
//无用 //无用
gameData: any; gameData: dynamic;
//签名 //签名
sgin: string; sgin: dynamic;
//防作弊数据 //防作弊数据
dynamicData: any; dynamicData: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { utils.injectProp(this.params, {
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 游戏复活接口 * 游戏复活接口
...@@ -11,7 +11,7 @@ export default class ResurrectionComponent extends SampleApi { ...@@ -11,7 +11,7 @@ export default class ResurrectionComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId }); utils.injectProp(this.params, { orderId: this.orderId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SamplePollingApi from "../../../SamplePollingApi"; import SamplePollingApi from "../../../SamplePollingApi";
/** /**
* 查询复活状态 * 查询复活状态
...@@ -11,9 +11,9 @@ export default class ResurrectionStatusComponent extends SamplePollingApi { ...@@ -11,9 +11,9 @@ export default class ResurrectionStatusComponent extends SamplePollingApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//doJoin订单ID //doJoin订单ID
orderId: string; orderId: dynamic;
//resurrec订单ID //resurrec订单ID
resurrecOrderId: string; resurrecOrderId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId, resurrecOrderId: this.resurrecOrderId }); utils.injectProp(this.params, { orderId: this.orderId, resurrecOrderId: this.resurrecOrderId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SamplePollingApi from "../../../SamplePollingApi"; import SamplePollingApi from "../../../SamplePollingApi";
/** /**
* 查询前置开奖结果 * 查询前置开奖结果
...@@ -11,7 +11,7 @@ export default class GetGameOrderInfoComponent extends SamplePollingApi { ...@@ -11,7 +11,7 @@ export default class GetGameOrderInfoComponent extends SamplePollingApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId }); utils.injectProp(this.params, { orderId: this.orderId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 前置开奖提交成绩接口 * 前置开奖提交成绩接口
...@@ -11,9 +11,9 @@ export default class GetGameSubmitComponent extends SampleApi { ...@@ -11,9 +11,9 @@ export default class GetGameSubmitComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//订单ID //订单ID
orderId: string; orderId: dynamic;
//价值 //价值
facePrice: number; facePrice: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId, facePrice: this.facePrice }); utils.injectProp(this.params, { orderId: this.orderId, facePrice: this.facePrice });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 检查题目答案是否正确 * 检查题目答案是否正确
...@@ -11,9 +11,9 @@ export default class CheckOutAnswerComponent extends SampleApi { ...@@ -11,9 +11,9 @@ export default class CheckOutAnswerComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'GET'; method: string = 'GET';
//订单ID //订单ID
orderId: string; orderId: dynamic;
//答案 //答案
answerData: string; answerData: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId, answerData: this.answerData }); utils.injectProp(this.params, { orderId: this.orderId, answerData: this.answerData });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 获取题目数据 * 获取题目数据
...@@ -11,7 +11,7 @@ export default class GetQuestionComponent extends SampleApi { ...@@ -11,7 +11,7 @@ export default class GetQuestionComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'GET'; method: string = 'GET';
//入库活动ID //入库活动ID
activityId: string; activityId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { activityId: this.activityId }); utils.injectProp(this.params, { activityId: this.activityId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 获取题目数据 * 获取题目数据
...@@ -11,9 +11,9 @@ export default class QuestionSubmitComponent extends SampleApi { ...@@ -11,9 +11,9 @@ export default class QuestionSubmitComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'POST'; method: string = 'POST';
//doJoin订单ID //doJoin订单ID
orderId: string; orderId: dynamic;
//答案 //答案
answerData: string; answerData: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId, answerData: this.answerData }); utils.injectProp(this.params, { orderId: this.orderId, answerData: this.answerData });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 获取渲染数据 * 获取渲染数据
...@@ -11,9 +11,9 @@ export default class AjaxThroughInfoComponent extends SampleApi { ...@@ -11,9 +11,9 @@ export default class AjaxThroughInfoComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'GET'; method: string = 'GET';
//duiba活动ID //duiba活动ID
duibaId: string; duibaId: dynamic;
//关卡ID //关卡ID
throughId: string; throughId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { duibaId: this.duibaId, throughId: this.throughId }); utils.injectProp(this.params, { duibaId: this.duibaId, throughId: this.throughId });
......
import { utils } from "scilla"; import { utils, dynamic } from "scilla";
import SampleApi from "../../../SampleApi"; import SampleApi from "../../../SampleApi";
/** /**
* 获取渲染数据 * 获取渲染数据
...@@ -11,7 +11,7 @@ export default class ThroughSubmitComponent extends SampleApi { ...@@ -11,7 +11,7 @@ export default class ThroughSubmitComponent extends SampleApi {
//请求方式 //请求方式
method: string = 'GET'; method: string = 'GET';
//duiba活动ID //duiba活动ID
orderId: string; orderId: dynamic;
protected async execute() { protected async execute() {
utils.injectProp(this.params, { orderId: this.orderId }); utils.injectProp(this.params, { orderId: this.orderId });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment