Commit fedd4dcac9b01a6ca1c25e248b2e3fa151d5d572
1 parent
ce3c48e9
Exists in
master
and in
3 other branches
X
Showing
6 changed files
with
36 additions
and
9 deletions
Show diff stats
wxsdk/http/SDKApi.ts
| ... | ... | @@ -63,8 +63,9 @@ export class SDKApi { |
| 63 | 63 | |
| 64 | 64 | public static client_log = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.client_log}`, ...args); |
| 65 | 65 | |
| 66 | + | |
| 67 | + // OrderApi | |
| 66 | 68 | public static pay = (...args) => SDKHttp.httpPost(`${DataService.I.OrderApi}${HostKeys.orderReport}`, ...args); |
| 67 | - | |
| 68 | 69 | public static orderQuery = (...args) => SDKHttp.httpPost(`${DataService.I.OrderApi}${HostKeys.orderQuery}`, ...args); |
| 69 | 70 | public static preorder = (...args) => SDKHttp.httpPost(`${DataService.I.OrderApi}${HostKeys.preorder}`, ...args); |
| 70 | 71 | } | ... | ... |
wxsdk/lib/sdk.d.ts
wxsdk/service/DataService.ts
| ... | ... | @@ -57,10 +57,16 @@ export default class DataService { |
| 57 | 57 | |
| 58 | 58 | if (data.hasOwnProperty('isnew')) |
| 59 | 59 | this.setIsnew(data.isnew); |
| 60 | - | |
| 60 | + | |
| 61 | 61 | if (data.hasOwnProperty('logindays')) |
| 62 | 62 | this.setLogindays(data.logindays); |
| 63 | 63 | |
| 64 | + if (data.hasOwnProperty('amount')) | |
| 65 | + this.setLogindays(data.amount); | |
| 66 | + | |
| 67 | + if (data.hasOwnProperty('pon')) | |
| 68 | + this.setLogindays(data.pon); | |
| 69 | + | |
| 64 | 70 | } |
| 65 | 71 | |
| 66 | 72 | get expice() { |
| ... | ... | @@ -81,7 +87,7 @@ export default class DataService { |
| 81 | 87 | return this; |
| 82 | 88 | } |
| 83 | 89 | |
| 84 | - get logindays(){ | |
| 90 | + get logindays() { | |
| 85 | 91 | return this._data.logindays; |
| 86 | 92 | } |
| 87 | 93 | |
| ... | ... | @@ -90,6 +96,13 @@ export default class DataService { |
| 90 | 96 | return this; |
| 91 | 97 | } |
| 92 | 98 | |
| 99 | + get amount() { | |
| 100 | + return this._data.amount; | |
| 101 | + } | |
| 102 | + get pon() { | |
| 103 | + return this._data.pon; | |
| 104 | + } | |
| 105 | + | |
| 93 | 106 | |
| 94 | 107 | get Scene() { |
| 95 | 108 | return this._data.scene || 0; |
| ... | ... | @@ -146,7 +159,7 @@ export default class DataService { |
| 146 | 159 | |
| 147 | 160 | setUserId(val: any) { |
| 148 | 161 | this.setValue('userId', val); |
| 149 | - StorageUtils.I.set("userId",val); | |
| 162 | + StorageUtils.I.set("userId", val); | |
| 150 | 163 | return this; |
| 151 | 164 | } |
| 152 | 165 | ... | ... |
wxsdk/service/LogService.ts
| ... | ... | @@ -38,7 +38,7 @@ export default class LogService { |
| 38 | 38 | setRegFinishState(state: number) { |
| 39 | 39 | this.regFinishState = state; |
| 40 | 40 | } |
| 41 | - | |
| 41 | + | |
| 42 | 42 | private get LaunchTime() { |
| 43 | 43 | return DataService.I.LaunchTime; |
| 44 | 44 | } |
| ... | ... | @@ -471,6 +471,8 @@ export default class LogService { |
| 471 | 471 | let uid = this.UserId; |
| 472 | 472 | let env = DataService.I.EnvEnum === 1 ? 'pre' : 'prod'; |
| 473 | 473 | let logindays = DataService.I.logindays; |
| 474 | + let amount = DataService.I.amount; | |
| 475 | + let pon = DataService.I.pon; | |
| 474 | 476 | return { |
| 475 | 477 | gameid, |
| 476 | 478 | channel, |
| ... | ... | @@ -484,7 +486,9 @@ export default class LogService { |
| 484 | 486 | scene, |
| 485 | 487 | uid, |
| 486 | 488 | env, |
| 487 | - logindays | |
| 489 | + logindays, | |
| 490 | + amount, | |
| 491 | + pon | |
| 488 | 492 | }; |
| 489 | 493 | } |
| 490 | 494 | ... | ... |
wxsdk/service/entity/SdkData.ts
| ... | ... | @@ -36,7 +36,10 @@ export default class SdkData { |
| 36 | 36 | public isCross: boolean; // 是否开启交叉悬浮框推广位 |
| 37 | 37 | public isDrawer: boolean; // 是否开启交叉抽屉推广位 |
| 38 | 38 | public isGuessLike: boolean; // 是否开启交叉猜你喜欢推广位 |
| 39 | - public logindays:number; | |
| 39 | + public logindays:number; // 登录天数 | |
| 40 | + public amount:number; // 充值金额 | |
| 41 | + public pon:number; // 用户类型 | |
| 42 | + | |
| 40 | 43 | |
| 41 | 44 | constructor() { |
| 42 | 45 | this.token = ''; |
| ... | ... | @@ -74,6 +77,8 @@ export default class SdkData { |
| 74 | 77 | this.isDrawer = false; |
| 75 | 78 | this.isGuessLike = false; |
| 76 | 79 | this.logindays = 0; |
| 80 | + this.amount = 0; | |
| 81 | + this.pon = 0; | |
| 77 | 82 | } |
| 78 | 83 | } |
| 79 | 84 | ... | ... |
wxsdk/wx/WxLogin.ts
| ... | ... | @@ -94,7 +94,7 @@ export default class WxLogin { |
| 94 | 94 | if (data) { |
| 95 | 95 | // 设置登录信息 |
| 96 | 96 | if (data.data) { |
| 97 | - let { channel, uid, firstlogin, token, reftoken, openid, expire, isnew, gameconfig,logindays } = data.data; | |
| 97 | + let { channel, uid, firstlogin, token, reftoken, openid, expire, isnew, gameconfig,logindays,amount,pon } = data.data; | |
| 98 | 98 | LogService.I.setLogind({ |
| 99 | 99 | channel, |
| 100 | 100 | userId: uid, |
| ... | ... | @@ -104,7 +104,9 @@ export default class WxLogin { |
| 104 | 104 | token, |
| 105 | 105 | refToken: reftoken, |
| 106 | 106 | expire, |
| 107 | - logindays | |
| 107 | + logindays, | |
| 108 | + amount, | |
| 109 | + pon | |
| 108 | 110 | }); |
| 109 | 111 | OnlineService.I.setData(gameconfig) |
| 110 | 112 | LogService.I.active(); | ... | ... |