Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zw_game_sdk
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
CI / CD
CI / CD
流水线
日程表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
提交
问题看板
Open sidebar
zwwl
zw_game_sdk
Commits
1862fe6c
提交
1862fe6c
authored
11月 30, 2021
作者:
黄程泽
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://git.wozhangwan.com/zwwl/zw_game_sdk
上级
24c283c5
9ede8733
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
+2
-2
sdk.js
sdk.js
+2
-2
没有找到文件。
sdk.js
浏览文件 @
1862fe6c
'use strict'
;
var
__awaiter
=
this
&&
this
[
'__awaiter'
]
||
function
(
_0x342159
,
_0xc9b2e5
,
_0x29c6d
,
_0x4cc862
){
function
_0xb93610
(
_0xa064c5
){
return
_0xa064c5
instanceof
_0x29c6d
?
_0xa064c5
:
new
_0x29c6d
(
function
(
_0x1f7178
){
_0x1f7178
(
_0xa064c5
);});}
return
new
(
_0x29c6d
||
(
_0x29c6d
=
Promise
))(
function
(
_0x373e1b
,
_0x289d89
){
function
_0x245749
(
_0x38afcc
){
try
{
_0x3dd776
(
_0x4cc862
[
'next'
](
_0x38afcc
));}
catch
(
_0x3df2a5
){
_0x289d89
(
_0x3df2a5
);}}
function
_0x1c2c26
(
_0x66e75f
){
try
{
_0x3dd776
(
_0x4cc862
[
'throw'
](
_0x66e75f
));}
catch
(
_0x18dbc8
){
_0x289d89
(
_0x18dbc8
);}}
function
_0x3dd776
(
_0x4fdcd5
){
_0x4fdcd5
[
'done'
]?
_0x373e1b
(
_0x4fdcd5
[
'value'
]):
_0xb93610
(
_0x4fdcd5
[
'value'
])[
'then'
](
_0x245749
,
_0x1c2c26
);}
_0x3dd776
((
_0x4cc862
=
_0x4cc862
[
'apply'
](
_0x342159
,
_0xc9b2e5
||
[]))[
'next'
]());});};
var
__generator
=
this
&&
this
[
'__generator'
]
||
function
(
_0x406387
,
_0x68ecb2
){
var
_0x518622
=
{
'label'
:
0x0
,
'sent'
:
function
(){
if
(
_0x3ecc61
[
0x0
]
&
0x1
)
throw
_0x3ecc61
[
0x1
];
return
_0x3ecc61
[
0x1
];},
'trys'
:[],
'ops'
:[]},
_0x287533
,
_0x63881f
,
_0x3ecc61
,
_0x49b604
;
return
_0x49b604
=
{
'next'
:
_0x451749
(
0x0
),
'throw'
:
_0x451749
(
0x1
),
'return'
:
_0x451749
(
0x2
)},
typeof
Symbol
===
'function'
&&
(
_0x49b604
[
Symbol
[
'iterator'
]]
=
function
(){
return
this
;}),
_0x49b604
;
function
_0x451749
(
_0x56d9ff
){
return
function
(
_0x55b725
){
return
_0x516411
([
_0x56d9ff
,
_0x55b725
]);};}
function
_0x516411
(
_0x18da3e
){
if
(
_0x287533
)
throw
new
TypeError
(
'Generator
\
x20is
\
x20already
\
x20executing.'
);
while
(
_0x518622
)
try
{
if
(
_0x287533
=
0x1
,
_0x63881f
&&
(
_0x3ecc61
=
_0x18da3e
[
0x0
]
&
0x2
?
_0x63881f
[
'return'
]:
_0x18da3e
[
0x0
]?
_0x63881f
[
'throw'
]
||
((
_0x3ecc61
=
_0x63881f
[
'return'
])
&&
_0x3ecc61
[
'call'
](
_0x63881f
),
0x0
):
_0x63881f
[
'next'
])
&&!
(
_0x3ecc61
=
_0x3ecc61
[
'call'
](
_0x63881f
,
_0x18da3e
[
0x1
]))[
'done'
])
return
_0x3ecc61
;
if
(
_0x63881f
=
0x0
,
_0x3ecc61
)
_0x18da3e
=
[
_0x18da3e
[
0x0
]
&
0x2
,
_0x3ecc61
[
'value'
]];
switch
(
_0x18da3e
[
0x0
]){
case
0x0
:
case
0x1
:
_0x3ecc61
=
_0x18da3e
;
break
;
case
0x4
:
_0x518622
[
'label'
]
++
;
return
{
'value'
:
_0x18da3e
[
0x1
],
'done'
:
!
[]};
case
0x5
:
_0x518622
[
'label'
]
++
;
_0x63881f
=
_0x18da3e
[
0x1
];
_0x18da3e
=
[
0x0
];
continue
;
case
0x7
:
_0x18da3e
=
_0x518622
[
'ops'
][
'pop'
]();
_0x518622
[
'trys'
][
'pop'
]();
continue
;
default
:
if
(
!
(
_0x3ecc61
=
_0x518622
[
'trys'
],
_0x3ecc61
=
_0x3ecc61
[
'length'
]
>
0x0
&&
_0x3ecc61
[
_0x3ecc61
[
'length'
]
-
0x1
])
&&
(
_0x18da3e
[
0x0
]
===
0x6
||
_0x18da3e
[
0x0
]
===
0x2
)){
_0x518622
=
0x0
;
continue
;}
if
(
_0x18da3e
[
0x0
]
===
0x3
&&
(
!
_0x3ecc61
||
_0x18da3e
[
0x1
]
>
_0x3ecc61
[
0x0
]
&&
_0x18da3e
[
0x1
]
<
_0x3ecc61
[
0x3
])){
_0x518622
[
'label'
]
=
_0x18da3e
[
0x1
];
break
;}
if
(
_0x18da3e
[
0x0
]
===
0x6
&&
_0x518622
[
'label'
]
<
_0x3ecc61
[
0x1
]){
_0x518622
[
'label'
]
=
_0x3ecc61
[
0x1
];
_0x3ecc61
=
_0x18da3e
;
break
;}
if
(
_0x3ecc61
&&
_0x518622
[
'label'
]
<
_0x3ecc61
[
0x2
]){
_0x518622
[
'label'
]
=
_0x3ecc61
[
0x2
];
_0x518622
[
'ops'
][
'push'
](
_0x18da3e
);
break
;}
if
(
_0x3ecc61
[
0x2
])
_0x518622
[
'ops'
][
'pop'
]();
_0x518622
[
'trys'
][
'pop'
]();
continue
;}
_0x18da3e
=
_0x68ecb2
[
'call'
](
_0x406387
,
_0x518622
);}
catch
(
_0x344230
){
_0x18da3e
=
[
0x6
,
_0x344230
];
_0x63881f
=
0x0
;}
finally
{
_0x287533
=
_0x3ecc61
=
0x0
;}
if
(
_0x18da3e
[
0x0
]
&
0x5
)
throw
_0x18da3e
[
0x1
];
return
{
'value'
:
_0x18da3e
[
0x0
]?
_0x18da3e
[
0x1
]:
void
0x0
,
'done'
:
!!
[]};}};
exports
[
'__esModule'
]
=!!
[];
var
zwsdk
=
function
(){
function
_0x3467e2
(){
this
[
'VERSION'
]
=
'1.2.3'
;
var
_0x555eba
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:
null
;
var
_0x5eb45b
=
wx
[
'getEnterOptionsSync'
]()[
'query'
];
if
(
_0x555eba
){
_0x3467e2
[
'default'
][
'appId'
]
=
_0x555eba
[
'app_id'
];
_0x3467e2
[
'default'
][
'gameId'
]
=
_0x555eba
[
'game_id'
];
_0x3467e2
[
'default'
][
'os'
]
=
_0x3467e2
[
'getSystemOS'
]();
_0x3467e2
[
'default'
][
'baseUrl'
]
=
_0x555eba
[
'dev'
]?
'https://zs.zwwlkj03.top/api'
:
'https://zyou.wozhangwan.com/api'
;
_0x3467e2
[
'default'
][
'query'
]
=
_0x5eb45b
;
_0x3467e2
[
'default'
][
'state'
]
=
_0x3467e2
[
'getState'
](
_0x5eb45b
);}}
_0x3467e2
[
'prototype'
][
'getGameConf'
]
=
function
(){
return
new
Promise
(
function
(
_0x3fcd4c
,
_0x2e4cf9
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/game/getConf'
,{
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'app_version'
:
'1.1'
})[
'then'
](
function
(
_0x1c4cdc
){
_0x3fcd4c
(
_0x1c4cdc
);});});};
_0x3467e2
[
'prototype'
][
'login'
]
=
function
(){
var
_0x10072e
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x45ed31
,
_0x5af53a
){
wx
[
'login'
]({
'success'
:
function
(
_0x27c355
){
var
_0x4ccc92
=
_0x27c355
[
'code'
];
_0x3467e2
[
'ajax'
](
'/mini_sdk/auth/login'
,{
'code'
:
_0x4ccc92
,
'state'
:
_0x3467e2
[
'default'
][
'state'
],
'query'
:
_0x3467e2
[
'default'
][
'query'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'os'
:
_0x3467e2
[
'default'
][
'os'
],
'device_number'
:
_0x3467e2
[
'default'
][
'device_brand'
],
'device_brand'
:
_0x3467e2
[
'default'
][
'device_brand'
]})[
'then'
](
function
(
_0x4dfc6f
){
var
_0x1c64eb
=
_0x4dfc6f
;
if
(
_0x4dfc6f
[
'status_code'
]
===
0x1
){
_0x3467e2
[
'default'
][
'userToken'
]
=
_0x4dfc6f
[
'data'
][
'data'
][
'user_token'
];
_0x3467e2
[
'default'
][
'memberId'
]
=
_0x4dfc6f
[
'data'
][
'data'
][
'member_id'
];}
_0x3467e2
[
'initShare'
]();
_0x45ed31
(
_0x1c64eb
);});}});});};
_0x3467e2
[
'prototype'
][
'updateUserInfo'
]
=
function
(){
var
_0x54b3e6
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x1a068a
,
_0x4aa3db
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/member/updateInfo'
,{
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'raw_data'
:
_0x54b3e6
[
'raw_data'
]
||
''
,
'signature'
:
_0x54b3e6
[
'signature'
]
||
''
,
'encrypted_data'
:
_0x54b3e6
[
'encrypted_data'
]
||
''
,
'iv'
:
_0x54b3e6
[
'iv'
]
||
''
,
'user_info'
:
_0x54b3e6
[
'user_info'
]
||
''
})[
'then'
](
function
(
_0x39eea4
){
_0x3467e2
[
'default'
][
'roleId'
]
=
_0x39eea4
[
'data'
][
'data'
][
'role_id'
]
||
''
;
_0x1a068a
(
_0x39eea4
);});});};
_0x3467e2
[
'prototype'
][
'createOrder'
]
=
function
(){
var
_0x5f110d
=
this
;
var
_0x539f59
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x2e60c8
,
_0x5105b1
){
return
__awaiter
(
_0x5f110d
,
void
0x0
,
void
0x0
,
function
(){
var
_0x575b9e
,
_0x446495
,
_0x2ae8a2
,
_0x230ffc
,
_0x56ca5a
,
_0xf73358
,
_0x8fd792
,
_0x4686a9
,
_0x469d3b
,
_0x448c33
;
return
__generator
(
this
,
function
(
_0x298c77
){
switch
(
_0x298c77
[
'label'
]){
case
0x0
:
return
[
0x4
,
_0x3467e2
[
'ajax'
](
'/mini_sdk/order/create'
,{
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'os'
:
_0x3467e2
[
'default'
][
'os'
],
'device_number'
:
_0x3467e2
[
'default'
][
'device_number'
],
'device_brand'
:
_0x3467e2
[
'default'
][
'device_brand'
],
'order'
:
_0x539f59
[
'order'
]
||
{},
'role'
:
_0x539f59
[
'role'
]
||
{},
'role_id'
:
_0x3467e2
[
'default'
][
'roleId'
]})];
case
0x1
:
_0x575b9e
=
_0x298c77
[
'sent'
]();
if
(
_0x575b9e
[
'status_code'
]
===
0x1
){
_0x2e60c8
({
'status_code'
:
_0x575b9e
[
'status_code'
],
'msg'
:
_0x575b9e
[
'msg'
],
'data'
:{
'data'
:{
'order_id'
:
_0x575b9e
[
'data'
][
'data'
][
'order_id'
]}}});
_0x446495
=
_0x575b9e
[
'data'
][
'data'
][
'pay_type'
];
if
(
_0x446495
===
'minipay'
){
wx
[
'navigateToMiniProgram'
]({
'appId'
:
_0x575b9e
[
'data'
][
'data'
][
'mini_pay'
][
'app_id'
],
'path'
:
_0x575b9e
[
'data'
][
'data'
][
'mini_pay'
][
'path'
]});}
if
(
_0x446495
===
'mpay'
){
_0x2ae8a2
=
_0x575b9e
[
'data'
][
'data'
][
'mpay'
],
_0x230ffc
=
_0x2ae8a2
[
'mode'
],
_0x56ca5a
=
_0x2ae8a2
[
'env'
],
_0xf73358
=
_0x2ae8a2
[
'offer_id'
],
_0x8fd792
=
_0x2ae8a2
[
'currency_type'
],
_0x4686a9
=
_0x2ae8a2
[
'platform'
],
_0x469d3b
=
_0x2ae8a2
[
'buy_quantity'
],
_0x448c33
=
_0x2ae8a2
[
'zone_id'
];
wx
[
'requestMidasPayment'
]({
'mode'
:
_0x230ffc
,
'env'
:
_0x56ca5a
,
'offerId'
:
_0xf73358
,
'currencyType'
:
_0x8fd792
,
'buyQuantity'
:
_0x469d3b
,
'platform'
:
_0x4686a9
,
'zoneId'
:
_0x448c33
,
'complete'
:
function
(
_0x1f2767
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/mds_pay/callback'
,{
'order_id'
:
_0x575b9e
[
'data'
][
'data'
][
'order_id'
]
||
''
,
'status'
:
_0x1f2767
[
'errCode'
]?
!
[]:
!!
[],
'code'
:
_0x1f2767
[
'errCode'
],
'msg'
:
_0x1f2767
[
'errMsg'
]})[
'then'
](
function
(
_0x28c849
){});}});}}
else
{
_0x2e60c8
(
_0x575b9e
);}
return
[
0x2
];}});});});};
_0x3467e2
[
'prototype'
][
'checkOrder'
]
=
function
(){
var
_0x223136
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x257f5c
,
_0x5cf396
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/order/getPayStatus'
,{
'order'
:
_0x223136
[
'order'
]})[
'then'
](
function
(
_0x4e7892
){
_0x257f5c
(
_0x4e7892
);});});};
_0x3467e2
[
'initShare'
]
=
function
(){
_0x3467e2
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
]})[
'then'
](
function
(
_0x1ab834
){
wx
[
'onShareAppMessage'
](
function
(){
_0x3467e2
[
'log'
](
'系统转发:onShareAppMessage'
,{
'params'
:{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
]},
'result'
:
_0x1ab834
});
_0x3467e2
[
'reportShare'
]({
'share_id'
:
_0x1ab834
[
'data'
][
'data'
][
'share_id'
]});
return
{
'title'
:
_0x1ab834
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0x1ab834
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0x1ab834
[
'data'
][
'data'
][
'state'
]};});
wx
[
'showShareMenu'
]({
'withShareTicket'
:
!!
[],
'menus'
:[
'shareAppMessage'
,
'shareTimeline'
]});});};
_0x3467e2
[
'prototype'
][
'getShareInfo'
]
=
function
(){
var
_0x2cf48b
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
_0x3467e2
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'path'
:
_0x2cf48b
[
'params'
]
||
''
})[
'then'
](
function
(
_0x58609f
){
wx
[
'onShareAppMessage'
](
function
(){
_0x3467e2
[
'log'
](
'系统转发:onShareAppMessage'
,{
'params'
:{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'path'
:
_0x2cf48b
[
'params'
]
||
''
},
'result'
:
_0x58609f
});
_0x3467e2
[
'reportShare'
]({
'share_id'
:
_0x58609f
[
'data'
][
'data'
][
'share_id'
]});
return
{
'title'
:
_0x58609f
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0x58609f
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0x58609f
[
'data'
][
'data'
][
'state'
]};});
wx
[
'showShareMenu'
]({
'withShareTicket'
:
!!
[],
'menus'
:[
'shareAppMessage'
,
'shareTimeline'
]});
if
(
_0x2cf48b
[
'shareAppMessage'
]
||
_0x2cf48b
[
'shareAppMessage'
]
===
undefined
){
wx
[
'shareAppMessage'
]({
'title'
:
_0x58609f
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0x58609f
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0x58609f
[
'data'
][
'data'
][
'state'
]});
_0x3467e2
[
'reportShare'
]({
'share_id'
:
_0x58609f
[
'data'
][
'data'
][
'share_id'
]});
_0x3467e2
[
'log'
](
'主动转发:shareAppMessage'
,{
'share_id'
:
_0x58609f
[
'data'
][
'data'
][
'share_id'
]});}});};
_0x3467e2
[
'reportShare'
]
=
function
(){
var
_0x3d086e
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
_0x3467e2
[
'ajax'
](
'/mini_sdk/share/report'
,{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'share_id'
:
_0x3d086e
[
'share_id'
]
||
''
,
'ext'
:
_0x3d086e
[
'ext'
]
||
''
})[
'then'
](
function
(
_0x50262a
){
console
[
'log'
](
_0x50262a
);});};
_0x3467e2
[
'prototype'
][
'updateRole'
]
=
function
(){
var
_0x21e6d
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x4e26f1
,
_0x5df36c
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/role/report'
,{
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'os'
:
_0x3467e2
[
'default'
][
'os'
],
'device_number'
:
_0x3467e2
[
'default'
][
'device_number'
],
'device_brand'
:
_0x3467e2
[
'default'
][
'device_brand'
],
'role'
:
_0x21e6d
[
'role'
]
||
{}})[
'then'
](
function
(
_0x1496cd
){
_0x4e26f1
(
_0x1496cd
);});});};
_0x3467e2
[
'prototype'
][
'checkMsg'
]
=
function
(){
var
_0x423d24
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x4d4d0a
,
_0x59eadf
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/check/message'
,{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'content'
:
_0x423d24
[
'content'
]
||
''
})[
'then'
](
function
(
_0x364af9
){
_0x4d4d0a
(
_0x364af9
);});});};
_0x3467e2
[
'prototype'
][
'checkImg'
]
=
function
(){
var
_0x12c2a7
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x202c2d
,
_0x2ddd58
){
wx
[
'uploadFile'
]({
'url'
:
_0x3467e2
[
'default'
][
'baseUrl'
]
+
'/mini_sdk/check/image'
,
'filePath'
:
_0x12c2a7
[
'filePath'
],
'name'
:
'image'
,
'header'
:{
'User-Token'
:
_0x3467e2
[
'default'
][
'userToken'
]},
'formData'
:{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
],
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'app_id'
:
_0x3467e2
[
'default'
][
'appId'
],
'user_token'
:
_0x3467e2
[
'default'
][
'userToken'
]},
'success'
:
function
(
_0x38121a
){
_0x202c2d
(
_0x38121a
);}});});};
_0x3467e2
[
'prototype'
][
'customMessage'
]
=
function
(){
_0x3467e2
[
'ajax'
](
'/mini_sdk/custom_message/config'
,{
'game_id'
:
_0x3467e2
[
'default'
][
'gameId'
]})[
'then'
](
function
(
_0x32d2e9
){
if
(
_0x32d2e9
[
'status_code'
]
===
0x1
){
wx
[
'openCustomerServiceConversation'
]({
'sessionFrom'
:
_0x32d2e9
[
'data'
][
'data'
][
'session_from'
],
'showMessageCard'
:
_0x32d2e9
[
'data'
][
'data'
][
'show_message_card'
],
'sendMessageTitle'
:
_0x32d2e9
[
'data'
][
'data'
][
'send_message_title'
],
'sendMessagePath'
:
_0x32d2e9
[
'data'
][
'data'
][
'send_message_path'
],
'sendMessageImg'
:
_0x32d2e9
[
'data'
][
'data'
][
'send_message_img'
],
'complete'
:
function
(
_0x332d7c
){
console
[
'log'
](
'openCustomerServiceConversation:'
,
_0x332d7c
);
_0x3467e2
[
'log'
](
'客服会话:openCustomerServiceConversation'
,
_0x332d7c
);}});}});};
_0x3467e2
[
'prototype'
][
'sendCaptcha'
]
=
function
(){
var
_0xc5b343
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x5df232
,
_0x300d04
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/captcha/send'
,{
'mobile'
:
_0xc5b343
[
'mobile'
]
||
''
})[
'then'
](
function
(
_0x4c10d0
){
_0x5df232
(
_0x4c10d0
);});});};
_0x3467e2
[
'prototype'
][
'bindMobile'
]
=
function
(){
var
_0x4f87e8
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x1f0f81
,
_0x194964
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/member/bindMobile'
,{
'member_id'
:
_0x3467e2
[
'default'
][
'memberId'
],
'mobile'
:
_0x4f87e8
[
'mobile'
]
||
''
,
'code'
:
_0x4f87e8
[
'code'
]
||
''
,
'key'
:
_0x4f87e8
[
'key'
]
||
''
})[
'then'
](
function
(
_0x403b1c
){
_0x1f0f81
(
_0x403b1c
);});});};
_0x3467e2
[
'ajax'
]
=
function
(
_0x2e9bed
,
_0x761f58
){
var
_0x911c0b
=
{
'content-type'
:
'application/json'
};
if
(
_0x3467e2
[
'default'
][
'userToken'
]){
_0x911c0b
[
'User-Token'
]
=
_0x3467e2
[
'default'
][
'userToken'
];}
var
_0x3e6a86
=
_0x761f58
[
'showLoading'
],
_0x573c67
=
_0x761f58
[
'loadingParams'
],
_0xf4971
=
_0x761f58
[
'showToast'
],
_0x11f77e
=
_0x761f58
[
'toastParams'
];
_0x3e6a86
&&
wx
[
'showLoading'
](
_0x573c67
);
return
new
Promise
(
function
(
_0x22eb6d
,
_0x58f158
){
wx
[
'request'
]({
'method'
:
'POST'
,
'url'
:
_0x3467e2
[
'default'
][
'baseUrl'
]
+
_0x2e9bed
,
'data'
:
_0x761f58
,
'header'
:
_0x911c0b
,
'success'
:
function
(
_0x3b2a3f
){
_0x3e6a86
&&
wx
[
'hideLoading'
]();
if
(
_0xf4971
){
_0x11f77e
[
'title'
]
=
_0x3b2a3f
[
'data'
][
'msg'
];
wx
[
'showToast'
](
_0x11f77e
);}
_0x22eb6d
(
_0x3b2a3f
[
'data'
]);},
'fail'
:
function
(
_0x13f14c
){
_0x3e6a86
&&
wx
[
'hideLoading'
]();
if
(
_0xf4971
){
_0x11f77e
[
'title'
]
=
_0x13f14c
[
'errMsg'
];
wx
[
'showToast'
](
_0x11f77e
);}
_0x22eb6d
(
_0x13f14c
);}});});};
_0x3467e2
[
'getSystemOS'
]
=
function
(){
var
_0x40b01d
=
wx
[
'getSystemInfoSync'
]()[
'system'
];
if
(
_0x40b01d
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'android'
)
>-
0x1
)
return
'android'
;
if
(
_0x40b01d
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'ios'
)
>-
0x1
)
return
'ios'
;
if
(
_0x40b01d
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'windows'
)
>-
0x1
)
return
'windows'
;
if
(
_0x40b01d
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'macos'
)
>-
0x1
)
return
'macos'
;
return
'other'
;};
_0x3467e2
[
'getSystemBrand'
]
=
function
(){
var
_0x317159
=
wx
[
'getSystemInfoSync'
]()[
'brand'
];
return
_0x317159
;};
_0x3467e2
[
'getSystemNumber'
]
=
function
(){
var
_0x16b55f
=
wx
[
'getSystemInfoSync'
]()[
'model'
];
return
_0x16b55f
;};
_0x3467e2
[
'midasPay'
]
=
function
(
_0x457231
){
return
wx
[
'requestMidasPayment'
](
_0x457231
);};
_0x3467e2
[
'getQueryVariable'
]
=
function
(
_0x1030ab
,
_0x30cc34
){
var
_0x2c5340
=
_0x1030ab
;
var
_0x108263
=
_0x2c5340
[
'split'
](
'&'
);
for
(
var
_0x30766f
=
0x0
;
_0x30766f
<
_0x108263
[
'length'
];
_0x30766f
++
){
var
_0x31cf66
=
_0x108263
[
_0x30766f
][
'split'
](
'='
);
if
(
_0x31cf66
[
0x0
]
===
_0x30cc34
){
return
_0x31cf66
[
0x1
];}}
return
''
;};
_0x3467e2
[
'getState'
]
=
function
(
_0x41ae3c
){
if
(
_0x41ae3c
[
'state'
]){
return
_0x41ae3c
[
'state'
];}
if
(
_0x41ae3c
[
'scene'
]
&&
_0x41ae3c
[
'scene'
][
'indexOf'
](
'state'
)
>-
0x1
){
return
_0x3467e2
[
'getQueryVariable'
](
decodeURIComponent
(
_0x41ae3c
[
'scene'
]),
'state'
);}
return
''
;};
_0x3467e2
[
'log'
]
=
function
(
_0x1bdf59
,
_0x520efc
){
_0x3467e2
[
'ajax'
](
'/mini_sdk/sdk_log/miniLog'
,{
'name'
:
_0x1bdf59
,
'value'
:
_0x520efc
})[
'then'
](
function
(
_0x77fd52
){
console
[
'log'
](
'log:'
,
_0x77fd52
);});};
_0x3467e2
[
'default'
]
=
{
'appId'
:
''
,
'gameId'
:
''
,
'os'
:
_0x3467e2
[
'getSystemOS'
](),
'device_number'
:
_0x3467e2
[
'getSystemNumber'
](),
'device_brand'
:
_0x3467e2
[
'getSystemBrand'
](),
'memberId'
:
''
,
'roleId'
:
''
,
'playerId'
:
''
,
'userToken'
:
''
,
'baseUrl'
:
''
};
return
_0x3467e2
;}();
exports
[
'default'
]
=
zwsdk
;
\ No newline at end of file
'use strict'
;
var
__awaiter
=
this
&&
this
[
'__awaiter'
]
||
function
(
_0x232a62
,
_0x3b236f
,
_0x1299fb
,
_0x4a6bd3
){
function
_0x393cf5
(
_0x2abe03
){
return
_0x2abe03
instanceof
_0x1299fb
?
_0x2abe03
:
new
_0x1299fb
(
function
(
_0x14bb70
){
_0x14bb70
(
_0x2abe03
);});}
return
new
(
_0x1299fb
||
(
_0x1299fb
=
Promise
))(
function
(
_0x22a463
,
_0x1038c0
){
function
_0x556487
(
_0xac184f
){
try
{
_0xecf832
(
_0x4a6bd3
[
'next'
](
_0xac184f
));}
catch
(
_0x54608b
){
_0x1038c0
(
_0x54608b
);}}
function
_0x110161
(
_0x57ea04
){
try
{
_0xecf832
(
_0x4a6bd3
[
'throw'
](
_0x57ea04
));}
catch
(
_0xcf965c
){
_0x1038c0
(
_0xcf965c
);}}
function
_0xecf832
(
_0x15a62e
){
_0x15a62e
[
'done'
]?
_0x22a463
(
_0x15a62e
[
'value'
]):
_0x393cf5
(
_0x15a62e
[
'value'
])[
'then'
](
_0x556487
,
_0x110161
);}
_0xecf832
((
_0x4a6bd3
=
_0x4a6bd3
[
'apply'
](
_0x232a62
,
_0x3b236f
||
[]))[
'next'
]());});};
var
__generator
=
this
&&
this
[
'__generator'
]
||
function
(
_0x55127a
,
_0x5a8ade
){
var
_0x3aa889
=
{
'label'
:
0x0
,
'sent'
:
function
(){
if
(
_0x5ac4f0
[
0x0
]
&
0x1
)
throw
_0x5ac4f0
[
0x1
];
return
_0x5ac4f0
[
0x1
];},
'trys'
:[],
'ops'
:[]},
_0x5ea091
,
_0x3e0adf
,
_0x5ac4f0
,
_0x16cbb0
;
return
_0x16cbb0
=
{
'next'
:
_0x83a3e9
(
0x0
),
'throw'
:
_0x83a3e9
(
0x1
),
'return'
:
_0x83a3e9
(
0x2
)},
typeof
Symbol
===
'function'
&&
(
_0x16cbb0
[
Symbol
[
'iterator'
]]
=
function
(){
return
this
;}),
_0x16cbb0
;
function
_0x83a3e9
(
_0x280253
){
return
function
(
_0x40624f
){
return
_0x36531c
([
_0x280253
,
_0x40624f
]);};}
function
_0x36531c
(
_0x5679c6
){
if
(
_0x5ea091
)
throw
new
TypeError
(
'Generator
\
x20is
\
x20already
\
x20executing.'
);
while
(
_0x3aa889
)
try
{
if
(
_0x5ea091
=
0x1
,
_0x3e0adf
&&
(
_0x5ac4f0
=
_0x5679c6
[
0x0
]
&
0x2
?
_0x3e0adf
[
'return'
]:
_0x5679c6
[
0x0
]?
_0x3e0adf
[
'throw'
]
||
((
_0x5ac4f0
=
_0x3e0adf
[
'return'
])
&&
_0x5ac4f0
[
'call'
](
_0x3e0adf
),
0x0
):
_0x3e0adf
[
'next'
])
&&!
(
_0x5ac4f0
=
_0x5ac4f0
[
'call'
](
_0x3e0adf
,
_0x5679c6
[
0x1
]))[
'done'
])
return
_0x5ac4f0
;
if
(
_0x3e0adf
=
0x0
,
_0x5ac4f0
)
_0x5679c6
=
[
_0x5679c6
[
0x0
]
&
0x2
,
_0x5ac4f0
[
'value'
]];
switch
(
_0x5679c6
[
0x0
]){
case
0x0
:
case
0x1
:
_0x5ac4f0
=
_0x5679c6
;
break
;
case
0x4
:
_0x3aa889
[
'label'
]
++
;
return
{
'value'
:
_0x5679c6
[
0x1
],
'done'
:
!
[]};
case
0x5
:
_0x3aa889
[
'label'
]
++
;
_0x3e0adf
=
_0x5679c6
[
0x1
];
_0x5679c6
=
[
0x0
];
continue
;
case
0x7
:
_0x5679c6
=
_0x3aa889
[
'ops'
][
'pop'
]();
_0x3aa889
[
'trys'
][
'pop'
]();
continue
;
default
:
if
(
!
(
_0x5ac4f0
=
_0x3aa889
[
'trys'
],
_0x5ac4f0
=
_0x5ac4f0
[
'length'
]
>
0x0
&&
_0x5ac4f0
[
_0x5ac4f0
[
'length'
]
-
0x1
])
&&
(
_0x5679c6
[
0x0
]
===
0x6
||
_0x5679c6
[
0x0
]
===
0x2
)){
_0x3aa889
=
0x0
;
continue
;}
if
(
_0x5679c6
[
0x0
]
===
0x3
&&
(
!
_0x5ac4f0
||
_0x5679c6
[
0x1
]
>
_0x5ac4f0
[
0x0
]
&&
_0x5679c6
[
0x1
]
<
_0x5ac4f0
[
0x3
])){
_0x3aa889
[
'label'
]
=
_0x5679c6
[
0x1
];
break
;}
if
(
_0x5679c6
[
0x0
]
===
0x6
&&
_0x3aa889
[
'label'
]
<
_0x5ac4f0
[
0x1
]){
_0x3aa889
[
'label'
]
=
_0x5ac4f0
[
0x1
];
_0x5ac4f0
=
_0x5679c6
;
break
;}
if
(
_0x5ac4f0
&&
_0x3aa889
[
'label'
]
<
_0x5ac4f0
[
0x2
]){
_0x3aa889
[
'label'
]
=
_0x5ac4f0
[
0x2
];
_0x3aa889
[
'ops'
][
'push'
](
_0x5679c6
);
break
;}
if
(
_0x5ac4f0
[
0x2
])
_0x3aa889
[
'ops'
][
'pop'
]();
_0x3aa889
[
'trys'
][
'pop'
]();
continue
;}
_0x5679c6
=
_0x5a8ade
[
'call'
](
_0x55127a
,
_0x3aa889
);}
catch
(
_0x578dac
){
_0x5679c6
=
[
0x6
,
_0x578dac
];
_0x3e0adf
=
0x0
;}
finally
{
_0x5ea091
=
_0x5ac4f0
=
0x0
;}
if
(
_0x5679c6
[
0x0
]
&
0x5
)
throw
_0x5679c6
[
0x1
];
return
{
'value'
:
_0x5679c6
[
0x0
]?
_0x5679c6
[
0x1
]:
void
0x0
,
'done'
:
!!
[]};}};
exports
[
'__esModule'
]
=!!
[];
var
zwsdk
=
function
(){
function
_0x5568ae
(){
this
[
'VERSION'
]
=
'1.2.3'
;
var
_0x38f1d4
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:
null
;
var
_0x34d840
=
wx
[
'getEnterOptionsSync'
]()[
'query'
];
if
(
_0x38f1d4
){
_0x5568ae
[
'default'
][
'appId'
]
=
_0x38f1d4
[
'app_id'
];
_0x5568ae
[
'default'
][
'gameId'
]
=
_0x38f1d4
[
'game_id'
];
_0x5568ae
[
'default'
][
'os'
]
=
_0x5568ae
[
'getSystemOS'
]();
_0x5568ae
[
'default'
][
'baseUrl'
]
=
_0x38f1d4
[
'dev'
]?
'https://zs.zwwlkj03.top/api'
:
'https://zyou.wozhangwan.com/api'
;
_0x5568ae
[
'default'
][
'query'
]
=
_0x34d840
;
_0x5568ae
[
'default'
][
'state'
]
=
_0x5568ae
[
'getState'
](
_0x34d840
);}}
_0x5568ae
[
'prototype'
][
'getGameConf'
]
=
function
(){
return
new
Promise
(
function
(
_0x1d150f
,
_0x22c4ea
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/game/getConf'
,{
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'app_version'
:
'1.0'
})[
'then'
](
function
(
_0x4a7d15
){
_0x1d150f
(
_0x4a7d15
);});});};
_0x5568ae
[
'prototype'
][
'login'
]
=
function
(){
var
_0x9d564e
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x18eca2
,
_0x12a781
){
wx
[
'login'
]({
'success'
:
function
(
_0x4685cb
){
var
_0x32fe37
=
_0x4685cb
[
'code'
];
_0x5568ae
[
'ajax'
](
'/mini_sdk/auth/login'
,{
'code'
:
_0x32fe37
,
'state'
:
_0x5568ae
[
'default'
][
'state'
],
'query'
:
_0x5568ae
[
'default'
][
'query'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'os'
:
_0x5568ae
[
'default'
][
'os'
],
'device_number'
:
_0x5568ae
[
'default'
][
'device_brand'
],
'device_brand'
:
_0x5568ae
[
'default'
][
'device_brand'
]})[
'then'
](
function
(
_0x2f4b18
){
var
_0x455c89
=
_0x2f4b18
;
if
(
_0x2f4b18
[
'status_code'
]
===
0x1
){
_0x5568ae
[
'default'
][
'userToken'
]
=
_0x2f4b18
[
'data'
][
'data'
][
'user_token'
];
_0x5568ae
[
'default'
][
'memberId'
]
=
_0x2f4b18
[
'data'
][
'data'
][
'member_id'
];}
_0x5568ae
[
'initShare'
]();
_0x18eca2
(
_0x455c89
);});}});});};
_0x5568ae
[
'prototype'
][
'updateUserInfo'
]
=
function
(){
var
_0x1db837
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x31bc4a
,
_0x2fba70
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/member/updateInfo'
,{
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'raw_data'
:
_0x1db837
[
'raw_data'
]
||
''
,
'signature'
:
_0x1db837
[
'signature'
]
||
''
,
'encrypted_data'
:
_0x1db837
[
'encrypted_data'
]
||
''
,
'iv'
:
_0x1db837
[
'iv'
]
||
''
,
'user_info'
:
_0x1db837
[
'user_info'
]
||
''
})[
'then'
](
function
(
_0x42173d
){
_0x5568ae
[
'default'
][
'roleId'
]
=
_0x42173d
[
'data'
][
'data'
][
'role_id'
]
||
''
;
_0x31bc4a
(
_0x42173d
);});});};
_0x5568ae
[
'prototype'
][
'createOrder'
]
=
function
(){
var
_0x4eb6c4
=
this
;
var
_0x22faa2
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x18a717
,
_0x4c7413
){
return
__awaiter
(
_0x4eb6c4
,
void
0x0
,
void
0x0
,
function
(){
var
_0x555d7c
,
_0x473237
,
_0x3ffd31
,
_0x3b5bef
,
_0x301667
,
_0x9b7606
,
_0x2253ac
,
_0x42cabe
,
_0xffa584
,
_0x3deb95
;
return
__generator
(
this
,
function
(
_0xb25db4
){
switch
(
_0xb25db4
[
'label'
]){
case
0x0
:
return
[
0x4
,
_0x5568ae
[
'ajax'
](
'/mini_sdk/order/create'
,{
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'os'
:
_0x5568ae
[
'default'
][
'os'
],
'device_number'
:
_0x5568ae
[
'default'
][
'device_number'
],
'device_brand'
:
_0x5568ae
[
'default'
][
'device_brand'
],
'order'
:
_0x22faa2
[
'order'
]
||
{},
'role'
:
_0x22faa2
[
'role'
]
||
{},
'role_id'
:
_0x5568ae
[
'default'
][
'roleId'
]})];
case
0x1
:
_0x555d7c
=
_0xb25db4
[
'sent'
]();
if
(
_0x555d7c
[
'status_code'
]
===
0x1
){
_0x18a717
({
'status_code'
:
_0x555d7c
[
'status_code'
],
'msg'
:
_0x555d7c
[
'msg'
],
'data'
:{
'data'
:{
'order_id'
:
_0x555d7c
[
'data'
][
'data'
][
'order_id'
]}}});
_0x473237
=
_0x555d7c
[
'data'
][
'data'
][
'pay_type'
];
if
(
_0x473237
===
'minipay'
){
wx
[
'navigateToMiniProgram'
]({
'appId'
:
_0x555d7c
[
'data'
][
'data'
][
'mini_pay'
][
'app_id'
],
'path'
:
_0x555d7c
[
'data'
][
'data'
][
'mini_pay'
][
'path'
]});}
if
(
_0x473237
===
'mpay'
){
_0x3ffd31
=
_0x555d7c
[
'data'
][
'data'
][
'mpay'
],
_0x3b5bef
=
_0x3ffd31
[
'mode'
],
_0x301667
=
_0x3ffd31
[
'env'
],
_0x9b7606
=
_0x3ffd31
[
'offer_id'
],
_0x2253ac
=
_0x3ffd31
[
'currency_type'
],
_0x42cabe
=
_0x3ffd31
[
'platform'
],
_0xffa584
=
_0x3ffd31
[
'buy_quantity'
],
_0x3deb95
=
_0x3ffd31
[
'zone_id'
];
wx
[
'requestMidasPayment'
]({
'mode'
:
_0x3b5bef
,
'env'
:
_0x301667
,
'offerId'
:
_0x9b7606
,
'currencyType'
:
_0x2253ac
,
'buyQuantity'
:
_0xffa584
,
'platform'
:
_0x42cabe
,
'zoneId'
:
_0x3deb95
,
'complete'
:
function
(
_0x417701
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/mds_pay/callback'
,{
'order_id'
:
_0x555d7c
[
'data'
][
'data'
][
'order_id'
]
||
''
,
'status'
:
_0x417701
[
'errCode'
]?
!
[]:
!!
[],
'code'
:
_0x417701
[
'errCode'
],
'msg'
:
_0x417701
[
'errMsg'
]})[
'then'
](
function
(
_0x24d915
){});}});}}
else
{
_0x18a717
(
_0x555d7c
);}
return
[
0x2
];}});});});};
_0x5568ae
[
'prototype'
][
'checkOrder'
]
=
function
(){
var
_0x340620
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x536b44
,
_0x3bbe2b
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/order/getPayStatus'
,{
'order'
:
_0x340620
[
'order'
]})[
'then'
](
function
(
_0x11b796
){
_0x536b44
(
_0x11b796
);});});};
_0x5568ae
[
'initShare'
]
=
function
(){
_0x5568ae
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
]})[
'then'
](
function
(
_0x480e7a
){
wx
[
'onShareAppMessage'
](
function
(){
_0x5568ae
[
'log'
](
'系统转发:onShareAppMessage'
,{
'params'
:{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
]},
'result'
:
_0x480e7a
});
_0x5568ae
[
'reportShare'
]({
'share_id'
:
_0x480e7a
[
'data'
][
'data'
][
'share_id'
]});
return
{
'title'
:
_0x480e7a
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0x480e7a
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0x480e7a
[
'data'
][
'data'
][
'state'
]};});
wx
[
'showShareMenu'
]({
'withShareTicket'
:
!!
[],
'menus'
:[
'shareAppMessage'
,
'shareTimeline'
]});});};
_0x5568ae
[
'prototype'
][
'getShareInfo'
]
=
function
(){
var
_0x302031
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
_0x5568ae
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'path'
:
_0x302031
[
'params'
]
||
''
})[
'then'
](
function
(
_0xae1945
){
wx
[
'onShareAppMessage'
](
function
(){
_0x5568ae
[
'log'
](
'系统转发:onShareAppMessage'
,{
'params'
:{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'path'
:
_0x302031
[
'params'
]
||
''
},
'result'
:
_0xae1945
});
_0x5568ae
[
'reportShare'
]({
'share_id'
:
_0xae1945
[
'data'
][
'data'
][
'share_id'
]});
return
{
'title'
:
_0xae1945
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0xae1945
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0xae1945
[
'data'
][
'data'
][
'state'
]};});
wx
[
'showShareMenu'
]({
'withShareTicket'
:
!!
[],
'menus'
:[
'shareAppMessage'
,
'shareTimeline'
]});
if
(
_0x302031
[
'shareAppMessage'
]
||
_0x302031
[
'shareAppMessage'
]
===
undefined
){
wx
[
'shareAppMessage'
]({
'title'
:
_0xae1945
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0xae1945
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0xae1945
[
'data'
][
'data'
][
'state'
]});
_0x5568ae
[
'reportShare'
]({
'share_id'
:
_0xae1945
[
'data'
][
'data'
][
'share_id'
]});
_0x5568ae
[
'log'
](
'主动转发:shareAppMessage'
,{
'share_id'
:
_0xae1945
[
'data'
][
'data'
][
'share_id'
]});}});};
_0x5568ae
[
'reportShare'
]
=
function
(){
var
_0x2e64ed
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
_0x5568ae
[
'ajax'
](
'/mini_sdk/share/report'
,{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'share_id'
:
_0x2e64ed
[
'share_id'
]
||
''
,
'ext'
:
_0x2e64ed
[
'ext'
]
||
''
})[
'then'
](
function
(
_0x367136
){
console
[
'log'
](
_0x367136
);});};
_0x5568ae
[
'prototype'
][
'updateRole'
]
=
function
(){
var
_0x42537e
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x5053d2
,
_0x3e0cea
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/role/report'
,{
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'os'
:
_0x5568ae
[
'default'
][
'os'
],
'device_number'
:
_0x5568ae
[
'default'
][
'device_number'
],
'device_brand'
:
_0x5568ae
[
'default'
][
'device_brand'
],
'role'
:
_0x42537e
[
'role'
]
||
{}})[
'then'
](
function
(
_0x18b76f
){
_0x5053d2
(
_0x18b76f
);});});};
_0x5568ae
[
'prototype'
][
'checkMsg'
]
=
function
(){
var
_0x4ff05e
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x1650bd
,
_0x277392
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/check/message'
,{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'content'
:
_0x4ff05e
[
'content'
]
||
''
})[
'then'
](
function
(
_0x2b5883
){
_0x1650bd
(
_0x2b5883
);});});};
_0x5568ae
[
'prototype'
][
'checkImg'
]
=
function
(){
var
_0x36ca67
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x5343b7
,
_0x248153
){
wx
[
'uploadFile'
]({
'url'
:
_0x5568ae
[
'default'
][
'baseUrl'
]
+
'/mini_sdk/check/image'
,
'filePath'
:
_0x36ca67
[
'filePath'
],
'name'
:
'image'
,
'header'
:{
'User-Token'
:
_0x5568ae
[
'default'
][
'userToken'
]},
'formData'
:{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
],
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'app_id'
:
_0x5568ae
[
'default'
][
'appId'
],
'user_token'
:
_0x5568ae
[
'default'
][
'userToken'
]},
'success'
:
function
(
_0x26f33f
){
_0x5343b7
(
_0x26f33f
);}});});};
_0x5568ae
[
'prototype'
][
'customMessage'
]
=
function
(){
_0x5568ae
[
'ajax'
](
'/mini_sdk/custom_message/config'
,{
'game_id'
:
_0x5568ae
[
'default'
][
'gameId'
]})[
'then'
](
function
(
_0x4d3e0a
){
if
(
_0x4d3e0a
[
'status_code'
]
===
0x1
){
wx
[
'openCustomerServiceConversation'
]({
'sessionFrom'
:
_0x4d3e0a
[
'data'
][
'data'
][
'session_from'
],
'showMessageCard'
:
_0x4d3e0a
[
'data'
][
'data'
][
'show_message_card'
],
'sendMessageTitle'
:
_0x4d3e0a
[
'data'
][
'data'
][
'send_message_title'
],
'sendMessagePath'
:
_0x4d3e0a
[
'data'
][
'data'
][
'send_message_path'
],
'sendMessageImg'
:
_0x4d3e0a
[
'data'
][
'data'
][
'send_message_img'
],
'complete'
:
function
(
_0x52f5b3
){
console
[
'log'
](
'openCustomerServiceConversation:'
,
_0x52f5b3
);
_0x5568ae
[
'log'
](
'客服会话:openCustomerServiceConversation'
,
_0x52f5b3
);}});}});};
_0x5568ae
[
'prototype'
][
'sendCaptcha'
]
=
function
(){
var
_0x4fa88d
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x595717
,
_0x1d8699
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/captcha/send'
,{
'mobile'
:
_0x4fa88d
[
'mobile'
]
||
''
})[
'then'
](
function
(
_0xd73217
){
_0x595717
(
_0xd73217
);});});};
_0x5568ae
[
'prototype'
][
'bindMobile'
]
=
function
(){
var
_0x208777
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x32c869
,
_0x28185d
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/member/bindMobile'
,{
'member_id'
:
_0x5568ae
[
'default'
][
'memberId'
],
'mobile'
:
_0x208777
[
'mobile'
]
||
''
,
'code'
:
_0x208777
[
'code'
]
||
''
,
'key'
:
_0x208777
[
'key'
]
||
''
})[
'then'
](
function
(
_0x2872c0
){
_0x32c869
(
_0x2872c0
);});});};
_0x5568ae
[
'ajax'
]
=
function
(
_0x3a4891
,
_0xf27848
){
var
_0x43cba3
=
{
'content-type'
:
'application/json'
};
if
(
_0x5568ae
[
'default'
][
'userToken'
]){
_0x43cba3
[
'User-Token'
]
=
_0x5568ae
[
'default'
][
'userToken'
];}
var
_0x45715f
=
_0xf27848
[
'showLoading'
],
_0x2776c9
=
_0xf27848
[
'loadingParams'
],
_0x215c8e
=
_0xf27848
[
'showToast'
],
_0x3951fa
=
_0xf27848
[
'toastParams'
];
_0x45715f
&&
wx
[
'showLoading'
](
_0x2776c9
);
return
new
Promise
(
function
(
_0x582c40
,
_0x3af1ab
){
wx
[
'request'
]({
'method'
:
'POST'
,
'url'
:
_0x5568ae
[
'default'
][
'baseUrl'
]
+
_0x3a4891
,
'data'
:
_0xf27848
,
'header'
:
_0x43cba3
,
'success'
:
function
(
_0x258c9f
){
_0x45715f
&&
wx
[
'hideLoading'
]();
if
(
_0x215c8e
){
_0x3951fa
[
'title'
]
=
_0x258c9f
[
'data'
][
'msg'
];
wx
[
'showToast'
](
_0x3951fa
);}
_0x582c40
(
_0x258c9f
[
'data'
]);},
'fail'
:
function
(
_0x1f765c
){
_0x45715f
&&
wx
[
'hideLoading'
]();
if
(
_0x215c8e
){
_0x3951fa
[
'title'
]
=
_0x1f765c
[
'errMsg'
];
wx
[
'showToast'
](
_0x3951fa
);}
_0x582c40
(
_0x1f765c
);}});});};
_0x5568ae
[
'getSystemOS'
]
=
function
(){
var
_0x2527b4
=
wx
[
'getSystemInfoSync'
]()[
'system'
];
if
(
_0x2527b4
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'android'
)
>-
0x1
)
return
'android'
;
if
(
_0x2527b4
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'ios'
)
>-
0x1
)
return
'ios'
;
if
(
_0x2527b4
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'windows'
)
>-
0x1
)
return
'windows'
;
if
(
_0x2527b4
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'macos'
)
>-
0x1
)
return
'macos'
;
return
'other'
;};
_0x5568ae
[
'getSystemBrand'
]
=
function
(){
var
_0x4e20aa
=
wx
[
'getSystemInfoSync'
]()[
'brand'
];
return
_0x4e20aa
;};
_0x5568ae
[
'getSystemNumber'
]
=
function
(){
var
_0x2b1810
=
wx
[
'getSystemInfoSync'
]()[
'model'
];
return
_0x2b1810
;};
_0x5568ae
[
'midasPay'
]
=
function
(
_0x212670
){
return
wx
[
'requestMidasPayment'
](
_0x212670
);};
_0x5568ae
[
'getQueryVariable'
]
=
function
(
_0x6117b5
,
_0x4fbd76
){
var
_0x3fb7c6
=
_0x6117b5
;
var
_0x59bdcf
=
_0x3fb7c6
[
'split'
](
'&'
);
for
(
var
_0x13dc7b
=
0x0
;
_0x13dc7b
<
_0x59bdcf
[
'length'
];
_0x13dc7b
++
){
var
_0x396824
=
_0x59bdcf
[
_0x13dc7b
][
'split'
](
'='
);
if
(
_0x396824
[
0x0
]
===
_0x4fbd76
){
return
_0x396824
[
0x1
];}}
return
''
;};
_0x5568ae
[
'getState'
]
=
function
(
_0x505be7
){
if
(
_0x505be7
[
'state'
]){
return
_0x505be7
[
'state'
];}
if
(
_0x505be7
[
'scene'
]
&&
_0x505be7
[
'scene'
][
'indexOf'
](
'state'
)
>-
0x1
){
return
_0x5568ae
[
'getQueryVariable'
](
decodeURIComponent
(
_0x505be7
[
'scene'
]),
'state'
);}
return
''
;};
_0x5568ae
[
'log'
]
=
function
(
_0xe43977
,
_0x4f8a67
){
_0x5568ae
[
'ajax'
](
'/mini_sdk/sdk_log/miniLog'
,{
'name'
:
_0xe43977
,
'value'
:
_0x4f8a67
})[
'then'
](
function
(
_0x4daf4a
){
console
[
'log'
](
'log:'
,
_0x4daf4a
);});};
_0x5568ae
[
'default'
]
=
{
'appId'
:
''
,
'gameId'
:
''
,
'os'
:
_0x5568ae
[
'getSystemOS'
](),
'device_number'
:
_0x5568ae
[
'getSystemNumber'
](),
'device_brand'
:
_0x5568ae
[
'getSystemBrand'
](),
'memberId'
:
''
,
'roleId'
:
''
,
'playerId'
:
''
,
'userToken'
:
''
,
'baseUrl'
:
''
};
return
_0x5568ae
;}();
exports
[
'default'
]
=
zwsdk
;
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论