Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zw_game_sdk
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
CI / CD
CI / CD
流水线
日程表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
提交
问题看板
Open sidebar
zwwl
zw_game_sdk
Commits
1a96d18d
提交
1a96d18d
authored
11月 23, 2021
作者:
黄程泽
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分享朋友圈
上级
5b825a90
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
4 行删除
+7
-4
SDK对接说明.md
SDK对接说明.md
+5
-2
sdk.js
sdk.js
+2
-2
没有找到文件。
SDK对接说明.md
浏览文件 @
1a96d18d
# 游戏
SDK 对接文档-v1.0.1
# 游戏
SDK 对接文档-v1.0.1
...
@@ -1043,7 +1043,10 @@ zwsdk
...
@@ -1043,7 +1043,10 @@ zwsdk
query
:
`state=
${
res
.
data
.
data
.
state
}
`
query
:
`state=
${
res
.
data
.
data
.
state
}
`
}
}
})
})
wx
.
showShareMenu
()
wx
.
showShareMenu
({
withShareTicket
:
true
,
menus
:
[
'shareAppMessage'
,
'shareTimeline'
],
})
})
})
})
})
```
```
...
...
sdk.js
浏览文件 @
1a96d18d
'use strict'
;
var
__awaiter
=
this
&&
this
[
'__awaiter'
]
||
function
(
_0x4ea632
,
_0x115dab
,
_0x18e67f
,
_0x1450ca
){
function
_0xf9dcd6
(
_0x8be719
){
return
_0x8be719
instanceof
_0x18e67f
?
_0x8be719
:
new
_0x18e67f
(
function
(
_0x44c8d6
){
_0x44c8d6
(
_0x8be719
);});}
return
new
(
_0x18e67f
||
(
_0x18e67f
=
Promise
))(
function
(
_0x4cb26f
,
_0x94e37f
){
function
_0x11c901
(
_0xf73cf5
){
try
{
_0xd9210a
(
_0x1450ca
[
'next'
](
_0xf73cf5
));}
catch
(
_0x36d61d
){
_0x94e37f
(
_0x36d61d
);}}
function
_0x505ae5
(
_0x2cf514
){
try
{
_0xd9210a
(
_0x1450ca
[
'throw'
](
_0x2cf514
));}
catch
(
_0x2f6df4
){
_0x94e37f
(
_0x2f6df4
);}}
function
_0xd9210a
(
_0x520b14
){
_0x520b14
[
'done'
]?
_0x4cb26f
(
_0x520b14
[
'value'
]):
_0xf9dcd6
(
_0x520b14
[
'value'
])[
'then'
](
_0x11c901
,
_0x505ae5
);}
_0xd9210a
((
_0x1450ca
=
_0x1450ca
[
'apply'
](
_0x4ea632
,
_0x115dab
||
[]))[
'next'
]());});};
var
__generator
=
this
&&
this
[
'__generator'
]
||
function
(
_0x2f731d
,
_0x23b839
){
var
_0x59add9
=
{
'label'
:
0x0
,
'sent'
:
function
(){
if
(
_0x296552
[
0x0
]
&
0x1
)
throw
_0x296552
[
0x1
];
return
_0x296552
[
0x1
];},
'trys'
:[],
'ops'
:[]},
_0x34d991
,
_0x1b020d
,
_0x296552
,
_0x2d4db2
;
return
_0x2d4db2
=
{
'next'
:
_0x441a41
(
0x0
),
'throw'
:
_0x441a41
(
0x1
),
'return'
:
_0x441a41
(
0x2
)},
typeof
Symbol
===
'function'
&&
(
_0x2d4db2
[
Symbol
[
'iterator'
]]
=
function
(){
return
this
;}),
_0x2d4db2
;
function
_0x441a41
(
_0x5eef3c
){
return
function
(
_0x5412b3
){
return
_0x5da80d
([
_0x5eef3c
,
_0x5412b3
]);};}
function
_0x5da80d
(
_0x4243ec
){
if
(
_0x34d991
)
throw
new
TypeError
(
'Generator
\
x20is
\
x20already
\
x20executing.'
);
while
(
_0x59add9
)
try
{
if
(
_0x34d991
=
0x1
,
_0x1b020d
&&
(
_0x296552
=
_0x4243ec
[
0x0
]
&
0x2
?
_0x1b020d
[
'return'
]:
_0x4243ec
[
0x0
]?
_0x1b020d
[
'throw'
]
||
((
_0x296552
=
_0x1b020d
[
'return'
])
&&
_0x296552
[
'call'
](
_0x1b020d
),
0x0
):
_0x1b020d
[
'next'
])
&&!
(
_0x296552
=
_0x296552
[
'call'
](
_0x1b020d
,
_0x4243ec
[
0x1
]))[
'done'
])
return
_0x296552
;
if
(
_0x1b020d
=
0x0
,
_0x296552
)
_0x4243ec
=
[
_0x4243ec
[
0x0
]
&
0x2
,
_0x296552
[
'value'
]];
switch
(
_0x4243ec
[
0x0
]){
case
0x0
:
case
0x1
:
_0x296552
=
_0x4243ec
;
break
;
case
0x4
:
_0x59add9
[
'label'
]
++
;
return
{
'value'
:
_0x4243ec
[
0x1
],
'done'
:
!
[]};
case
0x5
:
_0x59add9
[
'label'
]
++
;
_0x1b020d
=
_0x4243ec
[
0x1
];
_0x4243ec
=
[
0x0
];
continue
;
case
0x7
:
_0x4243ec
=
_0x59add9
[
'ops'
][
'pop'
]();
_0x59add9
[
'trys'
][
'pop'
]();
continue
;
default
:
if
(
!
(
_0x296552
=
_0x59add9
[
'trys'
],
_0x296552
=
_0x296552
[
'length'
]
>
0x0
&&
_0x296552
[
_0x296552
[
'length'
]
-
0x1
])
&&
(
_0x4243ec
[
0x0
]
===
0x6
||
_0x4243ec
[
0x0
]
===
0x2
)){
_0x59add9
=
0x0
;
continue
;}
if
(
_0x4243ec
[
0x0
]
===
0x3
&&
(
!
_0x296552
||
_0x4243ec
[
0x1
]
>
_0x296552
[
0x0
]
&&
_0x4243ec
[
0x1
]
<
_0x296552
[
0x3
])){
_0x59add9
[
'label'
]
=
_0x4243ec
[
0x1
];
break
;}
if
(
_0x4243ec
[
0x0
]
===
0x6
&&
_0x59add9
[
'label'
]
<
_0x296552
[
0x1
]){
_0x59add9
[
'label'
]
=
_0x296552
[
0x1
];
_0x296552
=
_0x4243ec
;
break
;}
if
(
_0x296552
&&
_0x59add9
[
'label'
]
<
_0x296552
[
0x2
]){
_0x59add9
[
'label'
]
=
_0x296552
[
0x2
];
_0x59add9
[
'ops'
][
'push'
](
_0x4243ec
);
break
;}
if
(
_0x296552
[
0x2
])
_0x59add9
[
'ops'
][
'pop'
]();
_0x59add9
[
'trys'
][
'pop'
]();
continue
;}
_0x4243ec
=
_0x23b839
[
'call'
](
_0x2f731d
,
_0x59add9
);}
catch
(
_0x19d326
){
_0x4243ec
=
[
0x6
,
_0x19d326
];
_0x1b020d
=
0x0
;}
finally
{
_0x34d991
=
_0x296552
=
0x0
;}
if
(
_0x4243ec
[
0x0
]
&
0x5
)
throw
_0x4243ec
[
0x1
];
return
{
'value'
:
_0x4243ec
[
0x0
]?
_0x4243ec
[
0x1
]:
void
0x0
,
'done'
:
!!
[]};}};
exports
[
'__esModule'
]
=!!
[];
var
zwsdk
=
function
(){
function
_0xd9a9c4
(){
this
[
'VERSION'
]
=
'1.1'
;
var
_0x258d35
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:
null
;
var
_0x1d4b41
=
wx
[
'getEnterOptionsSync'
]()[
'query'
];
if
(
_0x258d35
){
_0xd9a9c4
[
'default'
][
'appId'
]
=
_0x258d35
[
'app_id'
];
_0xd9a9c4
[
'default'
][
'gameId'
]
=
_0x258d35
[
'game_id'
];
_0xd9a9c4
[
'default'
][
'os'
]
=
_0xd9a9c4
[
'getSystemOS'
]();
_0xd9a9c4
[
'default'
][
'baseUrl'
]
=
_0x258d35
[
'dev'
]?
'https://zs.zwwlkj03.top/api'
:
'https://zyou.wozhangwan.com/api'
;
_0xd9a9c4
[
'default'
][
'query'
]
=
_0x1d4b41
;
_0xd9a9c4
[
'default'
][
'state'
]
=
_0xd9a9c4
[
'getState'
](
_0x1d4b41
);}}
_0xd9a9c4
[
'prototype'
][
'getGameConf'
]
=
function
(){
return
new
Promise
(
function
(
_0x4527b3
,
_0x140aff
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/game/getConf'
,{
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'app_version'
:
'1.1'
})[
'then'
](
function
(
_0x271350
){
_0x4527b3
(
_0x271350
);});});};
_0xd9a9c4
[
'prototype'
][
'login'
]
=
function
(){
var
_0x376e47
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x687ca7
,
_0xd60f1f
){
wx
[
'login'
]({
'success'
:
function
(
_0x42bcb5
){
var
_0x4dd629
=
_0x42bcb5
[
'code'
];
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/auth/login'
,{
'code'
:
_0x4dd629
,
'state'
:
_0xd9a9c4
[
'default'
][
'state'
],
'query'
:
_0xd9a9c4
[
'default'
][
'query'
],
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'os'
:
_0xd9a9c4
[
'default'
][
'os'
],
'device_number'
:
_0xd9a9c4
[
'default'
][
'device_brand'
],
'device_brand'
:
_0xd9a9c4
[
'default'
][
'device_brand'
]})[
'then'
](
function
(
_0xa3e4f0
){
var
_0x4b35d2
=
_0xa3e4f0
;
if
(
_0xa3e4f0
[
'status_code'
]
===
0x1
){
_0xd9a9c4
[
'default'
][
'userToken'
]
=
_0xa3e4f0
[
'data'
][
'data'
][
'user_token'
];
_0xd9a9c4
[
'default'
][
'memberId'
]
=
_0xa3e4f0
[
'data'
][
'data'
][
'member_id'
];}
_0x687ca7
(
_0x4b35d2
);});}});});};
_0xd9a9c4
[
'prototype'
][
'updateUserInfo'
]
=
function
(){
var
_0x2203fb
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x5d4023
,
_0x57db7b
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/member/updateInfo'
,{
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'member_id'
:
_0xd9a9c4
[
'default'
][
'memberId'
],
'raw_data'
:
_0x2203fb
[
'raw_data'
]
||
''
,
'signature'
:
_0x2203fb
[
'signature'
]
||
''
,
'encrypted_data'
:
_0x2203fb
[
'encrypted_data'
]
||
''
,
'iv'
:
_0x2203fb
[
'iv'
]
||
''
,
'user_info'
:
_0x2203fb
[
'user_info'
]
||
''
})[
'then'
](
function
(
_0x2f4483
){
_0xd9a9c4
[
'default'
][
'roleId'
]
=
_0x2f4483
[
'data'
][
'data'
][
'role_id'
]
||
''
;
_0x5d4023
(
_0x2f4483
);});});};
_0xd9a9c4
[
'prototype'
][
'createOrder'
]
=
function
(){
var
_0x893179
=
this
;
var
_0x37444e
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x4aafdf
,
_0x579f76
){
return
__awaiter
(
_0x893179
,
void
0x0
,
void
0x0
,
function
(){
var
_0x59f146
,
_0x28ef8a
,
_0x5619d9
,
_0x5381c2
,
_0x1b8452
,
_0x31de8f
,
_0x44ae66
,
_0x229f35
,
_0x2a61a7
,
_0x3a1997
;
return
__generator
(
this
,
function
(
_0x284acb
){
switch
(
_0x284acb
[
'label'
]){
case
0x0
:
return
[
0x4
,
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/order/create'
,{
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'member_id'
:
_0xd9a9c4
[
'default'
][
'memberId'
],
'os'
:
_0xd9a9c4
[
'default'
][
'os'
],
'device_number'
:
_0xd9a9c4
[
'default'
][
'device_number'
],
'device_brand'
:
_0xd9a9c4
[
'default'
][
'device_brand'
],
'order'
:
_0x37444e
[
'order'
]
||
{},
'role'
:
_0x37444e
[
'role'
]
||
{},
'role_id'
:
_0xd9a9c4
[
'default'
][
'roleId'
]})];
case
0x1
:
_0x59f146
=
_0x284acb
[
'sent'
]();
if
(
_0x59f146
[
'status_code'
]
===
0x1
){
_0x4aafdf
({
'status_code'
:
_0x59f146
[
'status_code'
],
'msg'
:
_0x59f146
[
'msg'
],
'data'
:{
'data'
:{
'order_id'
:
_0x59f146
[
'data'
][
'data'
][
'order_id'
]}}});
_0x28ef8a
=
_0x59f146
[
'data'
][
'data'
][
'pay_type'
];
if
(
_0x28ef8a
===
'minipay'
){
wx
[
'navigateToMiniProgram'
]({
'appId'
:
_0x59f146
[
'data'
][
'data'
][
'mini_pay'
][
'app_id'
],
'path'
:
_0x59f146
[
'data'
][
'data'
][
'mini_pay'
][
'path'
]});}
if
(
_0x28ef8a
===
'mpay'
){
_0x5619d9
=
_0x59f146
[
'data'
][
'data'
][
'mpay'
],
_0x5381c2
=
_0x5619d9
[
'mode'
],
_0x1b8452
=
_0x5619d9
[
'env'
],
_0x31de8f
=
_0x5619d9
[
'offer_id'
],
_0x44ae66
=
_0x5619d9
[
'currency_type'
],
_0x229f35
=
_0x5619d9
[
'platform'
],
_0x2a61a7
=
_0x5619d9
[
'buy_quantity'
],
_0x3a1997
=
_0x5619d9
[
'zone_id'
];
wx
[
'requestMidasPayment'
]({
'mode'
:
_0x5381c2
,
'env'
:
_0x1b8452
,
'offerId'
:
_0x31de8f
,
'currencyType'
:
_0x44ae66
,
'buyQuantity'
:
_0x2a61a7
,
'platform'
:
_0x229f35
,
'zoneId'
:
_0x3a1997
,
'complete'
:
function
(
_0x355141
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/mds_pay/callback'
,{
'order_id'
:
_0x59f146
[
'data'
][
'data'
][
'order_id'
]
||
''
,
'status'
:
_0x355141
[
'errCode'
]?
!
[]:
!!
[],
'code'
:
_0x355141
[
'errCode'
],
'msg'
:
_0x355141
[
'errMsg'
]})[
'then'
](
function
(
_0x591855
){});}});}}
else
{
_0x4aafdf
(
_0x59f146
);}
return
[
0x2
];}});});});};
_0xd9a9c4
[
'prototype'
][
'checkOrder'
]
=
function
(){
var
_0x496b92
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x2000e0
,
_0x4757c6
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/order/getPayStatus'
,{
'order'
:
_0x496b92
[
'order'
]})[
'then'
](
function
(
_0x1de5de
){
_0x2000e0
(
_0x1de5de
);});});};
_0xd9a9c4
[
'prototype'
][
'getShareInfo'
]
=
function
(){
var
_0xeb51ab
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x438f77
,
_0x55bfba
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'member_id'
:
_0xd9a9c4
[
'default'
][
'memberId'
],
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'path'
:
_0xeb51ab
[
'path'
]
||
''
})[
'then'
](
function
(
_0x5f4726
){
_0x438f77
(
_0x5f4726
);});});};
_0xd9a9c4
[
'prototype'
][
'reportShare'
]
=
function
(){
var
_0x2890d2
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x568551
,
_0x5b6371
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/share/report'
,{
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'member_id'
:
_0xd9a9c4
[
'default'
][
'memberId'
],
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'share_id'
:
_0x2890d2
[
'share_id'
]
||
''
,
'ext'
:
_0x2890d2
[
'ext'
]
||
''
})[
'then'
](
function
(
_0x1fc25a
){
_0x568551
(
_0x1fc25a
);});});};
_0xd9a9c4
[
'prototype'
][
'updateRole'
]
=
function
(){
var
_0x56a81b
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x5aae4a
,
_0x91004b
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/role/report'
,{
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'member_id'
:
_0xd9a9c4
[
'default'
][
'memberId'
],
'os'
:
_0xd9a9c4
[
'default'
][
'os'
],
'device_number'
:
_0xd9a9c4
[
'default'
][
'device_number'
],
'device_brand'
:
_0xd9a9c4
[
'default'
][
'device_brand'
],
'role'
:
_0x56a81b
[
'role'
]
||
{}})[
'then'
](
function
(
_0x2b67ac
){
_0x5aae4a
(
_0x2b67ac
);});});};
_0xd9a9c4
[
'prototype'
][
'checkMsg'
]
=
function
(){
var
_0x4baa54
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x2e1d18
,
_0x513bae
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/check/message'
,{
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'member_id'
:
_0xd9a9c4
[
'default'
][
'memberId'
],
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'content'
:
_0x4baa54
[
'content'
]
||
''
})[
'then'
](
function
(
_0x3a7c46
){
_0x2e1d18
(
_0x3a7c46
);});});};
_0xd9a9c4
[
'prototype'
][
'checkImg'
]
=
function
(){
var
_0x2ebdcf
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x21d700
,
_0x5492b0
){
wx
[
'uploadFile'
]({
'url'
:
_0xd9a9c4
[
'default'
][
'baseUrl'
]
+
'/mini_sdk/check/image'
,
'filePath'
:
_0x2ebdcf
[
'filePath'
],
'name'
:
'image'
,
'header'
:{
'User-Token'
:
_0xd9a9c4
[
'default'
][
'userToken'
]},
'formData'
:{
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
],
'member_id'
:
_0xd9a9c4
[
'default'
][
'memberId'
],
'app_id'
:
_0xd9a9c4
[
'default'
][
'appId'
],
'user_token'
:
_0xd9a9c4
[
'default'
][
'userToken'
]},
'success'
:
function
(
_0x32a48c
){
_0x21d700
(
_0x32a48c
);}});});};
_0xd9a9c4
[
'prototype'
][
'customMessage'
]
=
function
(){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/custom_message/config'
,{
'game_id'
:
_0xd9a9c4
[
'default'
][
'gameId'
]})[
'then'
](
function
(
_0x3ba8fd
){
if
(
_0x3ba8fd
[
'status_code'
]
===
0x1
){
wx
[
'openCustomerServiceConversation'
]({
'sessionFrom'
:
_0x3ba8fd
[
'data'
][
'data'
][
'session_from'
],
'showMessageCard'
:
_0x3ba8fd
[
'data'
][
'data'
][
'show_message_card'
],
'sendMessageTitle'
:
_0x3ba8fd
[
'data'
][
'data'
][
'send_message_title'
],
'sendMessagePath'
:
_0x3ba8fd
[
'data'
][
'data'
][
'send_message_path'
],
'sendMessageImg'
:
_0x3ba8fd
[
'data'
][
'data'
][
'send_message_img'
],
'complete'
:
function
(
_0xc14a8a
){
console
[
'log'
](
'openCustomerServiceConversation:'
,
_0xc14a8a
);
_0xd9a9c4
[
'log'
](
'客服会话:openCustomerServiceConversation'
,
_0xc14a8a
);}});}});};
_0xd9a9c4
[
'ajax'
]
=
function
(
_0x4794da
,
_0x1b1e95
){
var
_0x36544a
=
{
'content-type'
:
'application/json'
};
if
(
_0xd9a9c4
[
'default'
][
'userToken'
]){
_0x36544a
[
'User-Token'
]
=
_0xd9a9c4
[
'default'
][
'userToken'
];}
var
_0x2be76e
=
_0x1b1e95
[
'showLoading'
],
_0x470dde
=
_0x1b1e95
[
'loadingParams'
],
_0x264208
=
_0x1b1e95
[
'showToast'
],
_0x22c516
=
_0x1b1e95
[
'toastParams'
];
_0x2be76e
&&
wx
[
'showLoading'
](
_0x470dde
);
return
new
Promise
(
function
(
_0x3a21d5
,
_0x2fdacc
){
wx
[
'request'
]({
'method'
:
'POST'
,
'url'
:
_0xd9a9c4
[
'default'
][
'baseUrl'
]
+
_0x4794da
,
'data'
:
_0x1b1e95
,
'header'
:
_0x36544a
,
'success'
:
function
(
_0x50a4d8
){
_0x2be76e
&&
wx
[
'hideLoading'
]();
if
(
_0x264208
){
_0x22c516
[
'title'
]
=
_0x50a4d8
[
'data'
][
'msg'
];
wx
[
'showToast'
](
_0x22c516
);}
_0x3a21d5
(
_0x50a4d8
[
'data'
]);},
'fail'
:
function
(
_0x4d2fe5
){
_0x2be76e
&&
wx
[
'hideLoading'
]();
if
(
_0x264208
){
_0x22c516
[
'title'
]
=
_0x4d2fe5
[
'errMsg'
];
wx
[
'showToast'
](
_0x22c516
);}
_0x3a21d5
(
_0x4d2fe5
);}});});};
_0xd9a9c4
[
'getSystemOS'
]
=
function
(){
var
_0x1fd515
=
wx
[
'getSystemInfoSync'
]()[
'system'
];
if
(
_0x1fd515
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'android'
)
>-
0x1
)
return
'android'
;
if
(
_0x1fd515
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'ios'
)
>-
0x1
)
return
'ios'
;
if
(
_0x1fd515
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'windows'
)
>-
0x1
)
return
'windows'
;
if
(
_0x1fd515
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'macos'
)
>-
0x1
)
return
'macos'
;
return
'other'
;};
_0xd9a9c4
[
'getSystemBrand'
]
=
function
(){
var
_0x1d627c
=
wx
[
'getSystemInfoSync'
]()[
'brand'
];
return
_0x1d627c
;};
_0xd9a9c4
[
'getSystemNumber'
]
=
function
(){
var
_0x450efd
=
wx
[
'getSystemInfoSync'
]()[
'model'
];
return
_0x450efd
;};
_0xd9a9c4
[
'midasPay'
]
=
function
(
_0x6351d7
){
return
wx
[
'requestMidasPayment'
](
_0x6351d7
);};
_0xd9a9c4
[
'getQueryVariable'
]
=
function
(
_0x31bf22
,
_0x595f37
){
var
_0x5a9440
=
_0x31bf22
;
var
_0x1cfd3e
=
_0x5a9440
[
'split'
](
'&'
);
for
(
var
_0x4fa96b
=
0x0
;
_0x4fa96b
<
_0x1cfd3e
[
'length'
];
_0x4fa96b
++
){
var
_0x10f469
=
_0x1cfd3e
[
_0x4fa96b
][
'split'
](
'='
);
if
(
_0x10f469
[
0x0
]
===
_0x595f37
){
return
_0x10f469
[
0x1
];}}
return
''
;};
_0xd9a9c4
[
'getState'
]
=
function
(
_0x45908f
){
if
(
_0x45908f
[
'state'
]){
return
_0x45908f
[
'state'
];}
if
(
_0x45908f
[
'scene'
]
&&
_0x45908f
[
'scene'
][
'indexOf'
](
'state'
)
>-
0x1
){
return
_0xd9a9c4
[
'getQueryVariable'
](
decodeURIComponent
(
_0x45908f
[
'scene'
]),
'state'
);}
return
''
;};
_0xd9a9c4
[
'log'
]
=
function
(
_0x490dfa
,
_0x5712a4
){
_0xd9a9c4
[
'ajax'
](
'/mini_sdk/sdk_log/miniLog'
,{
'name'
:
_0x490dfa
,
'value'
:
_0x5712a4
})[
'then'
](
function
(
_0x494e23
){
console
[
'log'
](
'log:'
,
_0x494e23
);});};
_0xd9a9c4
[
'default'
]
=
{
'appId'
:
''
,
'gameId'
:
''
,
'os'
:
_0xd9a9c4
[
'getSystemOS'
](),
'device_number'
:
_0xd9a9c4
[
'getSystemNumber'
](),
'device_brand'
:
_0xd9a9c4
[
'getSystemBrand'
](),
'memberId'
:
''
,
'roleId'
:
''
,
'playerId'
:
''
,
'userToken'
:
''
,
'baseUrl'
:
''
};
return
_0xd9a9c4
;}();
exports
[
'default'
]
=
zwsdk
;
'use strict'
;
var
__awaiter
=
this
&&
this
[
'__awaiter'
]
||
function
(
_0x2c9021
,
_0x4e42d9
,
_0x447b15
,
_0x5cd90f
){
function
_0x16cf35
(
_0x44c7f4
){
return
_0x44c7f4
instanceof
_0x447b15
?
_0x44c7f4
:
new
_0x447b15
(
function
(
_0x446c5a
){
_0x446c5a
(
_0x44c7f4
);});}
return
new
(
_0x447b15
||
(
_0x447b15
=
Promise
))(
function
(
_0x5b2d2e
,
_0x197edc
){
function
_0x4734db
(
_0x401ef2
){
try
{
_0x76719b
(
_0x5cd90f
[
'next'
](
_0x401ef2
));}
catch
(
_0x17502f
){
_0x197edc
(
_0x17502f
);}}
function
_0x2db448
(
_0xd8f545
){
try
{
_0x76719b
(
_0x5cd90f
[
'throw'
](
_0xd8f545
));}
catch
(
_0x4ef13b
){
_0x197edc
(
_0x4ef13b
);}}
function
_0x76719b
(
_0x12fd91
){
_0x12fd91
[
'done'
]?
_0x5b2d2e
(
_0x12fd91
[
'value'
]):
_0x16cf35
(
_0x12fd91
[
'value'
])[
'then'
](
_0x4734db
,
_0x2db448
);}
_0x76719b
((
_0x5cd90f
=
_0x5cd90f
[
'apply'
](
_0x2c9021
,
_0x4e42d9
||
[]))[
'next'
]());});};
var
__generator
=
this
&&
this
[
'__generator'
]
||
function
(
_0x512923
,
_0x4fe398
){
var
_0x4891f2
=
{
'label'
:
0x0
,
'sent'
:
function
(){
if
(
_0x5bb861
[
0x0
]
&
0x1
)
throw
_0x5bb861
[
0x1
];
return
_0x5bb861
[
0x1
];},
'trys'
:[],
'ops'
:[]},
_0x4538fc
,
_0x412070
,
_0x5bb861
,
_0x5919a5
;
return
_0x5919a5
=
{
'next'
:
_0x3d5dda
(
0x0
),
'throw'
:
_0x3d5dda
(
0x1
),
'return'
:
_0x3d5dda
(
0x2
)},
typeof
Symbol
===
'function'
&&
(
_0x5919a5
[
Symbol
[
'iterator'
]]
=
function
(){
return
this
;}),
_0x5919a5
;
function
_0x3d5dda
(
_0x79ba84
){
return
function
(
_0x8d6351
){
return
_0x20d0f5
([
_0x79ba84
,
_0x8d6351
]);};}
function
_0x20d0f5
(
_0x377eba
){
if
(
_0x4538fc
)
throw
new
TypeError
(
'Generator
\
x20is
\
x20already
\
x20executing.'
);
while
(
_0x4891f2
)
try
{
if
(
_0x4538fc
=
0x1
,
_0x412070
&&
(
_0x5bb861
=
_0x377eba
[
0x0
]
&
0x2
?
_0x412070
[
'return'
]:
_0x377eba
[
0x0
]?
_0x412070
[
'throw'
]
||
((
_0x5bb861
=
_0x412070
[
'return'
])
&&
_0x5bb861
[
'call'
](
_0x412070
),
0x0
):
_0x412070
[
'next'
])
&&!
(
_0x5bb861
=
_0x5bb861
[
'call'
](
_0x412070
,
_0x377eba
[
0x1
]))[
'done'
])
return
_0x5bb861
;
if
(
_0x412070
=
0x0
,
_0x5bb861
)
_0x377eba
=
[
_0x377eba
[
0x0
]
&
0x2
,
_0x5bb861
[
'value'
]];
switch
(
_0x377eba
[
0x0
]){
case
0x0
:
case
0x1
:
_0x5bb861
=
_0x377eba
;
break
;
case
0x4
:
_0x4891f2
[
'label'
]
++
;
return
{
'value'
:
_0x377eba
[
0x1
],
'done'
:
!
[]};
case
0x5
:
_0x4891f2
[
'label'
]
++
;
_0x412070
=
_0x377eba
[
0x1
];
_0x377eba
=
[
0x0
];
continue
;
case
0x7
:
_0x377eba
=
_0x4891f2
[
'ops'
][
'pop'
]();
_0x4891f2
[
'trys'
][
'pop'
]();
continue
;
default
:
if
(
!
(
_0x5bb861
=
_0x4891f2
[
'trys'
],
_0x5bb861
=
_0x5bb861
[
'length'
]
>
0x0
&&
_0x5bb861
[
_0x5bb861
[
'length'
]
-
0x1
])
&&
(
_0x377eba
[
0x0
]
===
0x6
||
_0x377eba
[
0x0
]
===
0x2
)){
_0x4891f2
=
0x0
;
continue
;}
if
(
_0x377eba
[
0x0
]
===
0x3
&&
(
!
_0x5bb861
||
_0x377eba
[
0x1
]
>
_0x5bb861
[
0x0
]
&&
_0x377eba
[
0x1
]
<
_0x5bb861
[
0x3
])){
_0x4891f2
[
'label'
]
=
_0x377eba
[
0x1
];
break
;}
if
(
_0x377eba
[
0x0
]
===
0x6
&&
_0x4891f2
[
'label'
]
<
_0x5bb861
[
0x1
]){
_0x4891f2
[
'label'
]
=
_0x5bb861
[
0x1
];
_0x5bb861
=
_0x377eba
;
break
;}
if
(
_0x5bb861
&&
_0x4891f2
[
'label'
]
<
_0x5bb861
[
0x2
]){
_0x4891f2
[
'label'
]
=
_0x5bb861
[
0x2
];
_0x4891f2
[
'ops'
][
'push'
](
_0x377eba
);
break
;}
if
(
_0x5bb861
[
0x2
])
_0x4891f2
[
'ops'
][
'pop'
]();
_0x4891f2
[
'trys'
][
'pop'
]();
continue
;}
_0x377eba
=
_0x4fe398
[
'call'
](
_0x512923
,
_0x4891f2
);}
catch
(
_0x39e763
){
_0x377eba
=
[
0x6
,
_0x39e763
];
_0x412070
=
0x0
;}
finally
{
_0x4538fc
=
_0x5bb861
=
0x0
;}
if
(
_0x377eba
[
0x0
]
&
0x5
)
throw
_0x377eba
[
0x1
];
return
{
'value'
:
_0x377eba
[
0x0
]?
_0x377eba
[
0x1
]:
void
0x0
,
'done'
:
!!
[]};}};
exports
[
'__esModule'
]
=!!
[];
var
zwsdk
=
function
(){
function
_0x2c3cb6
(){
this
[
'VERSION'
]
=
'1.1.1'
;
var
_0x4031d1
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:
null
;
var
_0x1635b5
=
wx
[
'getEnterOptionsSync'
]()[
'query'
];
if
(
_0x4031d1
){
_0x2c3cb6
[
'default'
][
'appId'
]
=
_0x4031d1
[
'app_id'
];
_0x2c3cb6
[
'default'
][
'gameId'
]
=
_0x4031d1
[
'game_id'
];
_0x2c3cb6
[
'default'
][
'os'
]
=
_0x2c3cb6
[
'getSystemOS'
]();
_0x2c3cb6
[
'default'
][
'baseUrl'
]
=
_0x4031d1
[
'dev'
]?
'https://zs.zwwlkj03.top/api'
:
'https://zyou.wozhangwan.com/api'
;
_0x2c3cb6
[
'default'
][
'query'
]
=
_0x1635b5
;
_0x2c3cb6
[
'default'
][
'state'
]
=
_0x2c3cb6
[
'getState'
](
_0x1635b5
);}}
_0x2c3cb6
[
'prototype'
][
'getGameConf'
]
=
function
(){
return
new
Promise
(
function
(
_0x50d150
,
_0x2df1aa
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/game/getConf'
,{
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'app_version'
:
'1.1'
})[
'then'
](
function
(
_0x39820b
){
_0x50d150
(
_0x39820b
);});});};
_0x2c3cb6
[
'prototype'
][
'login'
]
=
function
(){
var
_0x1d44d9
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x56f89a
,
_0x4579a2
){
wx
[
'login'
]({
'success'
:
function
(
_0xe6602
){
var
_0x18bb33
=
_0xe6602
[
'code'
];
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/auth/login'
,{
'code'
:
_0x18bb33
,
'state'
:
_0x2c3cb6
[
'default'
][
'state'
],
'query'
:
_0x2c3cb6
[
'default'
][
'query'
],
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'os'
:
_0x2c3cb6
[
'default'
][
'os'
],
'device_number'
:
_0x2c3cb6
[
'default'
][
'device_brand'
],
'device_brand'
:
_0x2c3cb6
[
'default'
][
'device_brand'
]})[
'then'
](
function
(
_0x53d63e
){
var
_0x221936
=
_0x53d63e
;
if
(
_0x53d63e
[
'status_code'
]
===
0x1
){
_0x2c3cb6
[
'default'
][
'userToken'
]
=
_0x53d63e
[
'data'
][
'data'
][
'user_token'
];
_0x2c3cb6
[
'default'
][
'memberId'
]
=
_0x53d63e
[
'data'
][
'data'
][
'member_id'
];}
_0x56f89a
(
_0x221936
);});}});});};
_0x2c3cb6
[
'prototype'
][
'updateUserInfo'
]
=
function
(){
var
_0x1feefc
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x29fa25
,
_0x87c2d1
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/member/updateInfo'
,{
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'member_id'
:
_0x2c3cb6
[
'default'
][
'memberId'
],
'raw_data'
:
_0x1feefc
[
'raw_data'
]
||
''
,
'signature'
:
_0x1feefc
[
'signature'
]
||
''
,
'encrypted_data'
:
_0x1feefc
[
'encrypted_data'
]
||
''
,
'iv'
:
_0x1feefc
[
'iv'
]
||
''
,
'user_info'
:
_0x1feefc
[
'user_info'
]
||
''
})[
'then'
](
function
(
_0x28d99b
){
_0x2c3cb6
[
'default'
][
'roleId'
]
=
_0x28d99b
[
'data'
][
'data'
][
'role_id'
]
||
''
;
_0x29fa25
(
_0x28d99b
);});});};
_0x2c3cb6
[
'prototype'
][
'createOrder'
]
=
function
(){
var
_0x515445
=
this
;
var
_0x34314b
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x165a45
,
_0x5a9df6
){
return
__awaiter
(
_0x515445
,
void
0x0
,
void
0x0
,
function
(){
var
_0x3fe141
,
_0x36cef3
,
_0xf96bed
,
_0x5b5fc0
,
_0x154abf
,
_0xe7ac9a
,
_0x18eb6a
,
_0x187e69
,
_0x5264ec
,
_0x424a8e
;
return
__generator
(
this
,
function
(
_0x25a7c5
){
switch
(
_0x25a7c5
[
'label'
]){
case
0x0
:
return
[
0x4
,
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/order/create'
,{
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'member_id'
:
_0x2c3cb6
[
'default'
][
'memberId'
],
'os'
:
_0x2c3cb6
[
'default'
][
'os'
],
'device_number'
:
_0x2c3cb6
[
'default'
][
'device_number'
],
'device_brand'
:
_0x2c3cb6
[
'default'
][
'device_brand'
],
'order'
:
_0x34314b
[
'order'
]
||
{},
'role'
:
_0x34314b
[
'role'
]
||
{},
'role_id'
:
_0x2c3cb6
[
'default'
][
'roleId'
]})];
case
0x1
:
_0x3fe141
=
_0x25a7c5
[
'sent'
]();
if
(
_0x3fe141
[
'status_code'
]
===
0x1
){
_0x165a45
({
'status_code'
:
_0x3fe141
[
'status_code'
],
'msg'
:
_0x3fe141
[
'msg'
],
'data'
:{
'data'
:{
'order_id'
:
_0x3fe141
[
'data'
][
'data'
][
'order_id'
]}}});
_0x36cef3
=
_0x3fe141
[
'data'
][
'data'
][
'pay_type'
];
if
(
_0x36cef3
===
'minipay'
){
wx
[
'navigateToMiniProgram'
]({
'appId'
:
_0x3fe141
[
'data'
][
'data'
][
'mini_pay'
][
'app_id'
],
'path'
:
_0x3fe141
[
'data'
][
'data'
][
'mini_pay'
][
'path'
]});}
if
(
_0x36cef3
===
'mpay'
){
_0xf96bed
=
_0x3fe141
[
'data'
][
'data'
][
'mpay'
],
_0x5b5fc0
=
_0xf96bed
[
'mode'
],
_0x154abf
=
_0xf96bed
[
'env'
],
_0xe7ac9a
=
_0xf96bed
[
'offer_id'
],
_0x18eb6a
=
_0xf96bed
[
'currency_type'
],
_0x187e69
=
_0xf96bed
[
'platform'
],
_0x5264ec
=
_0xf96bed
[
'buy_quantity'
],
_0x424a8e
=
_0xf96bed
[
'zone_id'
];
wx
[
'requestMidasPayment'
]({
'mode'
:
_0x5b5fc0
,
'env'
:
_0x154abf
,
'offerId'
:
_0xe7ac9a
,
'currencyType'
:
_0x18eb6a
,
'buyQuantity'
:
_0x5264ec
,
'platform'
:
_0x187e69
,
'zoneId'
:
_0x424a8e
,
'complete'
:
function
(
_0x28bbab
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/mds_pay/callback'
,{
'order_id'
:
_0x3fe141
[
'data'
][
'data'
][
'order_id'
]
||
''
,
'status'
:
_0x28bbab
[
'errCode'
]?
!
[]:
!!
[],
'code'
:
_0x28bbab
[
'errCode'
],
'msg'
:
_0x28bbab
[
'errMsg'
]})[
'then'
](
function
(
_0x18923f
){});}});}}
else
{
_0x165a45
(
_0x3fe141
);}
return
[
0x2
];}});});});};
_0x2c3cb6
[
'prototype'
][
'checkOrder'
]
=
function
(){
var
_0x4bf10e
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x1b9279
,
_0x1a42ab
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/order/getPayStatus'
,{
'order'
:
_0x4bf10e
[
'order'
]})[
'then'
](
function
(
_0x4561c3
){
_0x1b9279
(
_0x4561c3
);});});};
_0x2c3cb6
[
'prototype'
][
'getShareInfo'
]
=
function
(){
var
_0x256b35
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x3602d2
,
_0x4dc78f
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'member_id'
:
_0x2c3cb6
[
'default'
][
'memberId'
],
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'path'
:
_0x256b35
[
'path'
]
||
''
})[
'then'
](
function
(
_0x301464
){
wx
[
'showShareMenu'
]({
'withShareTicket'
:
!!
[],
'menus'
:[
'shareAppMessage'
,
'shareTimeline'
]});
_0x3602d2
(
_0x301464
);});});};
_0x2c3cb6
[
'prototype'
][
'reportShare'
]
=
function
(){
var
_0x43a462
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x3ca591
,
_0x196578
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/share/report'
,{
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'member_id'
:
_0x2c3cb6
[
'default'
][
'memberId'
],
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'share_id'
:
_0x43a462
[
'share_id'
]
||
''
,
'ext'
:
_0x43a462
[
'ext'
]
||
''
})[
'then'
](
function
(
_0x2b72cd
){
_0x3ca591
(
_0x2b72cd
);});});};
_0x2c3cb6
[
'prototype'
][
'updateRole'
]
=
function
(){
var
_0x526733
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x62d4b7
,
_0x41064e
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/role/report'
,{
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'member_id'
:
_0x2c3cb6
[
'default'
][
'memberId'
],
'os'
:
_0x2c3cb6
[
'default'
][
'os'
],
'device_number'
:
_0x2c3cb6
[
'default'
][
'device_number'
],
'device_brand'
:
_0x2c3cb6
[
'default'
][
'device_brand'
],
'role'
:
_0x526733
[
'role'
]
||
{}})[
'then'
](
function
(
_0x55bfef
){
_0x62d4b7
(
_0x55bfef
);});});};
_0x2c3cb6
[
'prototype'
][
'checkMsg'
]
=
function
(){
var
_0x340cbf
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x300df9
,
_0x582a16
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/check/message'
,{
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'member_id'
:
_0x2c3cb6
[
'default'
][
'memberId'
],
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'content'
:
_0x340cbf
[
'content'
]
||
''
})[
'then'
](
function
(
_0x3aaddc
){
_0x300df9
(
_0x3aaddc
);});});};
_0x2c3cb6
[
'prototype'
][
'checkImg'
]
=
function
(){
var
_0x406db4
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x597203
,
_0x378f8f
){
wx
[
'uploadFile'
]({
'url'
:
_0x2c3cb6
[
'default'
][
'baseUrl'
]
+
'/mini_sdk/check/image'
,
'filePath'
:
_0x406db4
[
'filePath'
],
'name'
:
'image'
,
'header'
:{
'User-Token'
:
_0x2c3cb6
[
'default'
][
'userToken'
]},
'formData'
:{
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
],
'member_id'
:
_0x2c3cb6
[
'default'
][
'memberId'
],
'app_id'
:
_0x2c3cb6
[
'default'
][
'appId'
],
'user_token'
:
_0x2c3cb6
[
'default'
][
'userToken'
]},
'success'
:
function
(
_0x3f1932
){
_0x597203
(
_0x3f1932
);}});});};
_0x2c3cb6
[
'prototype'
][
'customMessage'
]
=
function
(){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/custom_message/config'
,{
'game_id'
:
_0x2c3cb6
[
'default'
][
'gameId'
]})[
'then'
](
function
(
_0x48196c
){
if
(
_0x48196c
[
'status_code'
]
===
0x1
){
wx
[
'openCustomerServiceConversation'
]({
'sessionFrom'
:
_0x48196c
[
'data'
][
'data'
][
'session_from'
],
'showMessageCard'
:
_0x48196c
[
'data'
][
'data'
][
'show_message_card'
],
'sendMessageTitle'
:
_0x48196c
[
'data'
][
'data'
][
'send_message_title'
],
'sendMessagePath'
:
_0x48196c
[
'data'
][
'data'
][
'send_message_path'
],
'sendMessageImg'
:
_0x48196c
[
'data'
][
'data'
][
'send_message_img'
],
'complete'
:
function
(
_0x5caa3e
){
console
[
'log'
](
'openCustomerServiceConversation:'
,
_0x5caa3e
);
_0x2c3cb6
[
'log'
](
'客服会话:openCustomerServiceConversation'
,
_0x5caa3e
);}});}});};
_0x2c3cb6
[
'ajax'
]
=
function
(
_0x261f52
,
_0x100266
){
var
_0x49f599
=
{
'content-type'
:
'application/json'
};
if
(
_0x2c3cb6
[
'default'
][
'userToken'
]){
_0x49f599
[
'User-Token'
]
=
_0x2c3cb6
[
'default'
][
'userToken'
];}
var
_0x339f3a
=
_0x100266
[
'showLoading'
],
_0x1627c2
=
_0x100266
[
'loadingParams'
],
_0xcfbb59
=
_0x100266
[
'showToast'
],
_0x5aabca
=
_0x100266
[
'toastParams'
];
_0x339f3a
&&
wx
[
'showLoading'
](
_0x1627c2
);
return
new
Promise
(
function
(
_0x2862fe
,
_0x55b83b
){
wx
[
'request'
]({
'method'
:
'POST'
,
'url'
:
_0x2c3cb6
[
'default'
][
'baseUrl'
]
+
_0x261f52
,
'data'
:
_0x100266
,
'header'
:
_0x49f599
,
'success'
:
function
(
_0x338720
){
_0x339f3a
&&
wx
[
'hideLoading'
]();
if
(
_0xcfbb59
){
_0x5aabca
[
'title'
]
=
_0x338720
[
'data'
][
'msg'
];
wx
[
'showToast'
](
_0x5aabca
);}
_0x2862fe
(
_0x338720
[
'data'
]);},
'fail'
:
function
(
_0x403189
){
_0x339f3a
&&
wx
[
'hideLoading'
]();
if
(
_0xcfbb59
){
_0x5aabca
[
'title'
]
=
_0x403189
[
'errMsg'
];
wx
[
'showToast'
](
_0x5aabca
);}
_0x2862fe
(
_0x403189
);}});});};
_0x2c3cb6
[
'getSystemOS'
]
=
function
(){
var
_0x208fee
=
wx
[
'getSystemInfoSync'
]()[
'system'
];
if
(
_0x208fee
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'android'
)
>-
0x1
)
return
'android'
;
if
(
_0x208fee
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'ios'
)
>-
0x1
)
return
'ios'
;
if
(
_0x208fee
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'windows'
)
>-
0x1
)
return
'windows'
;
if
(
_0x208fee
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'macos'
)
>-
0x1
)
return
'macos'
;
return
'other'
;};
_0x2c3cb6
[
'getSystemBrand'
]
=
function
(){
var
_0x176e76
=
wx
[
'getSystemInfoSync'
]()[
'brand'
];
return
_0x176e76
;};
_0x2c3cb6
[
'getSystemNumber'
]
=
function
(){
var
_0x313aba
=
wx
[
'getSystemInfoSync'
]()[
'model'
];
return
_0x313aba
;};
_0x2c3cb6
[
'midasPay'
]
=
function
(
_0x48e26d
){
return
wx
[
'requestMidasPayment'
](
_0x48e26d
);};
_0x2c3cb6
[
'getQueryVariable'
]
=
function
(
_0x2bd794
,
_0x3cb5d3
){
var
_0x540b64
=
_0x2bd794
;
var
_0x3df972
=
_0x540b64
[
'split'
](
'&'
);
for
(
var
_0x5a30c3
=
0x0
;
_0x5a30c3
<
_0x3df972
[
'length'
];
_0x5a30c3
++
){
var
_0x1c1c6e
=
_0x3df972
[
_0x5a30c3
][
'split'
](
'='
);
if
(
_0x1c1c6e
[
0x0
]
===
_0x3cb5d3
){
return
_0x1c1c6e
[
0x1
];}}
return
''
;};
_0x2c3cb6
[
'getState'
]
=
function
(
_0x226cf7
){
if
(
_0x226cf7
[
'state'
]){
return
_0x226cf7
[
'state'
];}
if
(
_0x226cf7
[
'scene'
]
&&
_0x226cf7
[
'scene'
][
'indexOf'
](
'state'
)
>-
0x1
){
return
_0x2c3cb6
[
'getQueryVariable'
](
decodeURIComponent
(
_0x226cf7
[
'scene'
]),
'state'
);}
return
''
;};
_0x2c3cb6
[
'log'
]
=
function
(
_0x786d2
,
_0x37c63f
){
_0x2c3cb6
[
'ajax'
](
'/mini_sdk/sdk_log/miniLog'
,{
'name'
:
_0x786d2
,
'value'
:
_0x37c63f
})[
'then'
](
function
(
_0xb2a9f5
){
console
[
'log'
](
'log:'
,
_0xb2a9f5
);});};
_0x2c3cb6
[
'default'
]
=
{
'appId'
:
''
,
'gameId'
:
''
,
'os'
:
_0x2c3cb6
[
'getSystemOS'
](),
'device_number'
:
_0x2c3cb6
[
'getSystemNumber'
](),
'device_brand'
:
_0x2c3cb6
[
'getSystemBrand'
](),
'memberId'
:
''
,
'roleId'
:
''
,
'playerId'
:
''
,
'userToken'
:
''
,
'baseUrl'
:
''
};
return
_0x2c3cb6
;}();
exports
[
'default'
]
=
zwsdk
;
\ No newline at end of file
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论