Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zw_game_sdk
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
CI / CD
CI / CD
流水线
日程表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
提交
问题看板
Open sidebar
zwwl
zw_game_sdk
Commits
176aef8e
提交
176aef8e
authored
3月 03, 2022
作者:
张梦磊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加自动亮屏代码
上级
26c6da5e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
+2
-2
sdk.js
sdk.js
+2
-2
没有找到文件。
sdk.js
浏览文件 @
176aef8e
'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
;
'use strict'
;
var
__awaiter
=
this
&&
this
[
'__awaiter'
]
||
function
(
_0x2756d5
,
_0x12794f
,
_0x1d68de
,
_0x4e8e6e
){
function
_0xd7e14e
(
_0x196f03
){
return
_0x196f03
instanceof
_0x1d68de
?
_0x196f03
:
new
_0x1d68de
(
function
(
_0x412b65
){
_0x412b65
(
_0x196f03
);});}
return
new
(
_0x1d68de
||
(
_0x1d68de
=
Promise
))(
function
(
_0x3229f4
,
_0x42b04f
){
function
_0x4bf993
(
_0x377b80
){
try
{
_0x8b2256
(
_0x4e8e6e
[
'next'
](
_0x377b80
));}
catch
(
_0x43aad9
){
_0x42b04f
(
_0x43aad9
);}}
function
_0x519418
(
_0x5b75ff
){
try
{
_0x8b2256
(
_0x4e8e6e
[
'throw'
](
_0x5b75ff
));}
catch
(
_0x2c0b36
){
_0x42b04f
(
_0x2c0b36
);}}
function
_0x8b2256
(
_0x4c8738
){
_0x4c8738
[
'done'
]?
_0x3229f4
(
_0x4c8738
[
'value'
]):
_0xd7e14e
(
_0x4c8738
[
'value'
])[
'then'
](
_0x4bf993
,
_0x519418
);}
_0x8b2256
((
_0x4e8e6e
=
_0x4e8e6e
[
'apply'
](
_0x2756d5
,
_0x12794f
||
[]))[
'next'
]());});};
var
__generator
=
this
&&
this
[
'__generator'
]
||
function
(
_0x259d87
,
_0x34937a
){
var
_0x3b1a7d
=
{
'label'
:
0x0
,
'sent'
:
function
(){
if
(
_0x26c9a9
[
0x0
]
&
0x1
)
throw
_0x26c9a9
[
0x1
];
return
_0x26c9a9
[
0x1
];},
'trys'
:[],
'ops'
:[]},
_0x42e32f
,
_0x5214dd
,
_0x26c9a9
,
_0xbcf3fc
;
return
_0xbcf3fc
=
{
'next'
:
_0x4338d7
(
0x0
),
'throw'
:
_0x4338d7
(
0x1
),
'return'
:
_0x4338d7
(
0x2
)},
typeof
Symbol
===
'function'
&&
(
_0xbcf3fc
[
Symbol
[
'iterator'
]]
=
function
(){
return
this
;}),
_0xbcf3fc
;
function
_0x4338d7
(
_0x164790
){
return
function
(
_0x5026f1
){
return
_0x574ccf
([
_0x164790
,
_0x5026f1
]);};}
function
_0x574ccf
(
_0x497108
){
if
(
_0x42e32f
)
throw
new
TypeError
(
'Generator
\
x20is
\
x20already
\
x20executing.'
);
while
(
_0x3b1a7d
)
try
{
if
(
_0x42e32f
=
0x1
,
_0x5214dd
&&
(
_0x26c9a9
=
_0x497108
[
0x0
]
&
0x2
?
_0x5214dd
[
'return'
]:
_0x497108
[
0x0
]?
_0x5214dd
[
'throw'
]
||
((
_0x26c9a9
=
_0x5214dd
[
'return'
])
&&
_0x26c9a9
[
'call'
](
_0x5214dd
),
0x0
):
_0x5214dd
[
'next'
])
&&!
(
_0x26c9a9
=
_0x26c9a9
[
'call'
](
_0x5214dd
,
_0x497108
[
0x1
]))[
'done'
])
return
_0x26c9a9
;
if
(
_0x5214dd
=
0x0
,
_0x26c9a9
)
_0x497108
=
[
_0x497108
[
0x0
]
&
0x2
,
_0x26c9a9
[
'value'
]];
switch
(
_0x497108
[
0x0
]){
case
0x0
:
case
0x1
:
_0x26c9a9
=
_0x497108
;
break
;
case
0x4
:
_0x3b1a7d
[
'label'
]
++
;
return
{
'value'
:
_0x497108
[
0x1
],
'done'
:
!
[]};
case
0x5
:
_0x3b1a7d
[
'label'
]
++
;
_0x5214dd
=
_0x497108
[
0x1
];
_0x497108
=
[
0x0
];
continue
;
case
0x7
:
_0x497108
=
_0x3b1a7d
[
'ops'
][
'pop'
]();
_0x3b1a7d
[
'trys'
][
'pop'
]();
continue
;
default
:
if
(
!
(
_0x26c9a9
=
_0x3b1a7d
[
'trys'
],
_0x26c9a9
=
_0x26c9a9
[
'length'
]
>
0x0
&&
_0x26c9a9
[
_0x26c9a9
[
'length'
]
-
0x1
])
&&
(
_0x497108
[
0x0
]
===
0x6
||
_0x497108
[
0x0
]
===
0x2
)){
_0x3b1a7d
=
0x0
;
continue
;}
if
(
_0x497108
[
0x0
]
===
0x3
&&
(
!
_0x26c9a9
||
_0x497108
[
0x1
]
>
_0x26c9a9
[
0x0
]
&&
_0x497108
[
0x1
]
<
_0x26c9a9
[
0x3
])){
_0x3b1a7d
[
'label'
]
=
_0x497108
[
0x1
];
break
;}
if
(
_0x497108
[
0x0
]
===
0x6
&&
_0x3b1a7d
[
'label'
]
<
_0x26c9a9
[
0x1
]){
_0x3b1a7d
[
'label'
]
=
_0x26c9a9
[
0x1
];
_0x26c9a9
=
_0x497108
;
break
;}
if
(
_0x26c9a9
&&
_0x3b1a7d
[
'label'
]
<
_0x26c9a9
[
0x2
]){
_0x3b1a7d
[
'label'
]
=
_0x26c9a9
[
0x2
];
_0x3b1a7d
[
'ops'
][
'push'
](
_0x497108
);
break
;}
if
(
_0x26c9a9
[
0x2
])
_0x3b1a7d
[
'ops'
][
'pop'
]();
_0x3b1a7d
[
'trys'
][
'pop'
]();
continue
;}
_0x497108
=
_0x34937a
[
'call'
](
_0x259d87
,
_0x3b1a7d
);}
catch
(
_0x44565e
){
_0x497108
=
[
0x6
,
_0x44565e
];
_0x5214dd
=
0x0
;}
finally
{
_0x42e32f
=
_0x26c9a9
=
0x0
;}
if
(
_0x497108
[
0x0
]
&
0x5
)
throw
_0x497108
[
0x1
];
return
{
'value'
:
_0x497108
[
0x0
]?
_0x497108
[
0x1
]:
void
0x0
,
'done'
:
!!
[]};}};
exports
[
'__esModule'
]
=!!
[];
var
zwsdk
=
function
(){
function
_0x5c7321
(){
this
[
'VERSION'
]
=
'1.3.0'
;
var
_0x1b0e7c
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:
null
;
var
_0x2db33a
=
wx
[
'getEnterOptionsSync'
]()[
'query'
];
if
(
_0x1b0e7c
){
_0x5c7321
[
'default'
][
'appId'
]
=
_0x1b0e7c
[
'app_id'
];
_0x5c7321
[
'default'
][
'gameId'
]
=
_0x1b0e7c
[
'game_id'
];
_0x5c7321
[
'default'
][
'os'
]
=
_0x5c7321
[
'getSystemOS'
]();
_0x5c7321
[
'default'
][
'baseUrl'
]
=
_0x1b0e7c
[
'dev'
]?
'https://zs.zwwlkj03.top/api'
:
'https://zyou.wozhangwan.com/api'
;
_0x5c7321
[
'default'
][
'query'
]
=
_0x2db33a
;
_0x5c7321
[
'default'
][
'state'
]
=
_0x5c7321
[
'getState'
](
_0x2db33a
);
var
_0x168e24
=
wx
[
'getSystemInfoSync'
]()[
'SDKVersion'
];
console
[
'log'
](
'lib
\
x20version:'
+
_0x168e24
);
if
(
_0x5c7321
[
'selfCompareVersion'
](
_0x168e24
,
'1.4.0'
)
>=
0x0
){
wx
[
'setKeepScreenOn'
]({
'keepScreenOn'
:
!!
[]});
console
[
'log'
](
'设置不息屏'
);}
else
{}}}
_0x5c7321
[
'prototype'
][
'getGameConf'
]
=
function
(){
return
new
Promise
(
function
(
_0x2bbd85
,
_0x3e23c4
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/game/getConf'
,{
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'app_version'
:
'1.1'
})[
'then'
](
function
(
_0x56a427
){
_0x2bbd85
(
_0x56a427
);});});};
_0x5c7321
[
'prototype'
][
'login'
]
=
function
(){
var
_0x1c386d
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x2f80cb
,
_0x554da1
){
wx
[
'login'
]({
'success'
:
function
(
_0x5c0385
){
var
_0x1a59d8
=
_0x5c0385
[
'code'
];
_0x5c7321
[
'ajax'
](
'/mini_sdk/auth/login'
,{
'code'
:
_0x1a59d8
,
'state'
:
_0x5c7321
[
'default'
][
'state'
],
'query'
:
_0x5c7321
[
'default'
][
'query'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'os'
:
_0x5c7321
[
'default'
][
'os'
],
'device_number'
:
_0x5c7321
[
'default'
][
'device_brand'
],
'device_brand'
:
_0x5c7321
[
'default'
][
'device_brand'
]})[
'then'
](
function
(
_0x14290e
){
var
_0x5c3964
=
_0x14290e
;
if
(
_0x14290e
[
'status_code'
]
===
0x1
){
_0x5c7321
[
'default'
][
'userToken'
]
=
_0x14290e
[
'data'
][
'data'
][
'user_token'
];
_0x5c7321
[
'default'
][
'memberId'
]
=
_0x14290e
[
'data'
][
'data'
][
'member_id'
];}
_0x5c7321
[
'initShare'
]();
_0x2f80cb
(
_0x5c3964
);});}});});};
_0x5c7321
[
'prototype'
][
'updateUserInfo'
]
=
function
(){
var
_0x5038ed
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x12e70a
,
_0x3c0b57
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/member/updateInfo'
,{
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'raw_data'
:
_0x5038ed
[
'raw_data'
]
||
''
,
'signature'
:
_0x5038ed
[
'signature'
]
||
''
,
'encrypted_data'
:
_0x5038ed
[
'encrypted_data'
]
||
''
,
'iv'
:
_0x5038ed
[
'iv'
]
||
''
,
'user_info'
:
_0x5038ed
[
'user_info'
]
||
''
})[
'then'
](
function
(
_0x10634e
){
_0x5c7321
[
'default'
][
'roleId'
]
=
_0x10634e
[
'data'
][
'data'
][
'role_id'
]
||
''
;
_0x12e70a
(
_0x10634e
);});});};
_0x5c7321
[
'prototype'
][
'createOrder'
]
=
function
(){
var
_0x20e78f
=
this
;
var
_0x2b5578
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x106b29
,
_0x34264b
){
return
__awaiter
(
_0x20e78f
,
void
0x0
,
void
0x0
,
function
(){
var
_0x19260c
,
_0x5286d0
,
_0x1200ea
,
_0x345684
,
_0x42df7e
,
_0x29bfbe
,
_0x4c4707
,
_0x3f72e9
,
_0x5e9fb2
,
_0x5b02af
;
return
__generator
(
this
,
function
(
_0x3910dc
){
switch
(
_0x3910dc
[
'label'
]){
case
0x0
:
return
[
0x4
,
_0x5c7321
[
'ajax'
](
'/mini_sdk/order/create'
,{
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'os'
:
_0x5c7321
[
'default'
][
'os'
],
'device_number'
:
_0x5c7321
[
'default'
][
'device_number'
],
'device_brand'
:
_0x5c7321
[
'default'
][
'device_brand'
],
'order'
:
_0x2b5578
[
'order'
]
||
{},
'role'
:
_0x2b5578
[
'role'
]
||
{},
'role_id'
:
_0x5c7321
[
'default'
][
'roleId'
]})];
case
0x1
:
_0x19260c
=
_0x3910dc
[
'sent'
]();
if
(
_0x19260c
[
'status_code'
]
===
0x1
){
_0x106b29
({
'status_code'
:
_0x19260c
[
'status_code'
],
'msg'
:
_0x19260c
[
'msg'
],
'data'
:{
'data'
:{
'order_id'
:
_0x19260c
[
'data'
][
'data'
][
'order_id'
]}}});
_0x5286d0
=
_0x19260c
[
'data'
][
'data'
][
'pay_type'
];
if
(
_0x5286d0
===
'minipay'
){
wx
[
'navigateToMiniProgram'
]({
'appId'
:
_0x19260c
[
'data'
][
'data'
][
'mini_pay'
][
'app_id'
],
'path'
:
_0x19260c
[
'data'
][
'data'
][
'mini_pay'
][
'path'
]});}
if
(
_0x5286d0
===
'mpay'
){
_0x1200ea
=
_0x19260c
[
'data'
][
'data'
][
'mpay'
],
_0x345684
=
_0x1200ea
[
'mode'
],
_0x42df7e
=
_0x1200ea
[
'env'
],
_0x29bfbe
=
_0x1200ea
[
'offer_id'
],
_0x4c4707
=
_0x1200ea
[
'currency_type'
],
_0x3f72e9
=
_0x1200ea
[
'platform'
],
_0x5e9fb2
=
_0x1200ea
[
'buy_quantity'
],
_0x5b02af
=
_0x1200ea
[
'zone_id'
];
wx
[
'requestMidasPayment'
]({
'mode'
:
_0x345684
,
'env'
:
_0x42df7e
,
'offerId'
:
_0x29bfbe
,
'currencyType'
:
_0x4c4707
,
'buyQuantity'
:
_0x5e9fb2
,
'platform'
:
_0x3f72e9
,
'zoneId'
:
_0x5b02af
,
'complete'
:
function
(
_0x2aebdf
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/mds_pay/callback'
,{
'order_id'
:
_0x19260c
[
'data'
][
'data'
][
'order_id'
]
||
''
,
'status'
:
_0x2aebdf
[
'errCode'
]?
!
[]:
!!
[],
'code'
:
_0x2aebdf
[
'errCode'
],
'msg'
:
_0x2aebdf
[
'errMsg'
]})[
'then'
](
function
(
_0x298107
){});}});}}
else
{
_0x106b29
(
_0x19260c
);}
return
[
0x2
];}});});});};
_0x5c7321
[
'prototype'
][
'checkOrder'
]
=
function
(){
var
_0x235d5a
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x27f5c3
,
_0x5046ef
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/order/getPayStatus'
,{
'order'
:
_0x235d5a
[
'order'
]})[
'then'
](
function
(
_0x4e07fe
){
_0x27f5c3
(
_0x4e07fe
);});});};
_0x5c7321
[
'initShare'
]
=
function
(){
_0x5c7321
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
]})[
'then'
](
function
(
_0x5645ab
){
wx
[
'onShareAppMessage'
](
function
(){
_0x5c7321
[
'log'
](
'系统转发:onShareAppMessage'
,{
'params'
:{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
]},
'result'
:
_0x5645ab
});
_0x5c7321
[
'reportShare'
]({
'share_id'
:
_0x5645ab
[
'data'
][
'data'
][
'share_id'
]});
return
{
'title'
:
_0x5645ab
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0x5645ab
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0x5645ab
[
'data'
][
'data'
][
'state'
]};});
wx
[
'showShareMenu'
]({
'withShareTicket'
:
!!
[],
'menus'
:[
'shareAppMessage'
,
'shareTimeline'
]});});};
_0x5c7321
[
'prototype'
][
'getShareInfo'
]
=
function
(){
var
_0x1be5bd
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
_0x5c7321
[
'ajax'
](
'/mini_sdk/share/getShareInfo'
,{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'path'
:
_0x1be5bd
[
'params'
]
||
''
})[
'then'
](
function
(
_0x3d9b59
){
wx
[
'onShareAppMessage'
](
function
(){
_0x5c7321
[
'log'
](
'系统转发:onShareAppMessage'
,{
'params'
:{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'path'
:
_0x1be5bd
[
'params'
]
||
''
},
'result'
:
_0x3d9b59
});
_0x5c7321
[
'reportShare'
]({
'share_id'
:
_0x3d9b59
[
'data'
][
'data'
][
'share_id'
]});
return
{
'title'
:
_0x3d9b59
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0x3d9b59
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0x3d9b59
[
'data'
][
'data'
][
'state'
]};});
wx
[
'showShareMenu'
]({
'withShareTicket'
:
!!
[],
'menus'
:[
'shareAppMessage'
,
'shareTimeline'
]});
if
(
_0x1be5bd
[
'shareAppMessage'
]
||
_0x1be5bd
[
'shareAppMessage'
]
===
undefined
){
wx
[
'shareAppMessage'
]({
'title'
:
_0x3d9b59
[
'data'
][
'data'
][
'title'
],
'imageUrl'
:
_0x3d9b59
[
'data'
][
'data'
][
'share_img'
],
'query'
:
'state='
+
_0x3d9b59
[
'data'
][
'data'
][
'state'
]});
_0x5c7321
[
'reportShare'
]({
'share_id'
:
_0x3d9b59
[
'data'
][
'data'
][
'share_id'
]});
_0x5c7321
[
'log'
](
'主动转发:shareAppMessage'
,{
'share_id'
:
_0x3d9b59
[
'data'
][
'data'
][
'share_id'
]});}});};
_0x5c7321
[
'reportShare'
]
=
function
(){
var
_0x4cf745
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
_0x5c7321
[
'ajax'
](
'/mini_sdk/share/report'
,{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'share_id'
:
_0x4cf745
[
'share_id'
]
||
''
,
'ext'
:
_0x4cf745
[
'ext'
]
||
''
})[
'then'
](
function
(
_0x201063
){
console
[
'log'
](
_0x201063
);});};
_0x5c7321
[
'prototype'
][
'updateRole'
]
=
function
(){
var
_0x443ea2
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x4a41bc
,
_0x18c0b9
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/role/report'
,{
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'os'
:
_0x5c7321
[
'default'
][
'os'
],
'device_number'
:
_0x5c7321
[
'default'
][
'device_number'
],
'device_brand'
:
_0x5c7321
[
'default'
][
'device_brand'
],
'role'
:
_0x443ea2
[
'role'
]
||
{}})[
'then'
](
function
(
_0x476462
){
_0x4a41bc
(
_0x476462
);});});};
_0x5c7321
[
'prototype'
][
'checkMsg'
]
=
function
(){
var
_0x5e1dc2
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x20a4fc
,
_0x1653ac
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/check/message'
,{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'content'
:
_0x5e1dc2
[
'content'
]
||
''
})[
'then'
](
function
(
_0x23f554
){
_0x20a4fc
(
_0x23f554
);});});};
_0x5c7321
[
'prototype'
][
'checkImg'
]
=
function
(){
var
_0x36aa3f
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x651b7
,
_0x4a6860
){
wx
[
'uploadFile'
]({
'url'
:
_0x5c7321
[
'default'
][
'baseUrl'
]
+
'/mini_sdk/check/image'
,
'filePath'
:
_0x36aa3f
[
'filePath'
],
'name'
:
'image'
,
'header'
:{
'User-Token'
:
_0x5c7321
[
'default'
][
'userToken'
]},
'formData'
:{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
],
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'app_id'
:
_0x5c7321
[
'default'
][
'appId'
],
'user_token'
:
_0x5c7321
[
'default'
][
'userToken'
]},
'success'
:
function
(
_0x24a84f
){
_0x651b7
(
_0x24a84f
);}});});};
_0x5c7321
[
'prototype'
][
'customMessage'
]
=
function
(){
_0x5c7321
[
'ajax'
](
'/mini_sdk/custom_message/config'
,{
'game_id'
:
_0x5c7321
[
'default'
][
'gameId'
]})[
'then'
](
function
(
_0x4f4382
){
if
(
_0x4f4382
[
'status_code'
]
===
0x1
){
wx
[
'openCustomerServiceConversation'
]({
'sessionFrom'
:
_0x4f4382
[
'data'
][
'data'
][
'session_from'
],
'showMessageCard'
:
_0x4f4382
[
'data'
][
'data'
][
'show_message_card'
],
'sendMessageTitle'
:
_0x4f4382
[
'data'
][
'data'
][
'send_message_title'
],
'sendMessagePath'
:
_0x4f4382
[
'data'
][
'data'
][
'send_message_path'
],
'sendMessageImg'
:
_0x4f4382
[
'data'
][
'data'
][
'send_message_img'
],
'complete'
:
function
(
_0x5d33ff
){
console
[
'log'
](
'openCustomerServiceConversation:'
,
_0x5d33ff
);
_0x5c7321
[
'log'
](
'客服会话:openCustomerServiceConversation'
,
_0x5d33ff
);}});}});};
_0x5c7321
[
'prototype'
][
'sendCaptcha'
]
=
function
(){
var
_0x27b64a
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x37fc2a
,
_0x37f457
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/captcha/send'
,{
'mobile'
:
_0x27b64a
[
'mobile'
]
||
''
})[
'then'
](
function
(
_0x349a1f
){
_0x37fc2a
(
_0x349a1f
);});});};
_0x5c7321
[
'prototype'
][
'bindMobile'
]
=
function
(){
var
_0x25e214
=
arguments
[
'length'
]
>
0x0
&&
void
0x0
!==
arguments
[
0x0
]?
arguments
[
0x0
]:{};
return
new
Promise
(
function
(
_0x14e10e
,
_0x4bf72c
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/member/bindMobile'
,{
'member_id'
:
_0x5c7321
[
'default'
][
'memberId'
],
'mobile'
:
_0x25e214
[
'mobile'
]
||
''
,
'code'
:
_0x25e214
[
'code'
]
||
''
,
'key'
:
_0x25e214
[
'key'
]
||
''
})[
'then'
](
function
(
_0x474a6a
){
_0x14e10e
(
_0x474a6a
);});});};
_0x5c7321
[
'ajax'
]
=
function
(
_0x498808
,
_0x407157
){
var
_0x6e08cc
=
{
'content-type'
:
'application/json'
};
if
(
_0x5c7321
[
'default'
][
'userToken'
]){
_0x6e08cc
[
'User-Token'
]
=
_0x5c7321
[
'default'
][
'userToken'
];}
var
_0x1588a7
=
_0x407157
[
'showLoading'
],
_0x522176
=
_0x407157
[
'loadingParams'
],
_0x3dbc52
=
_0x407157
[
'showToast'
],
_0x28eb14
=
_0x407157
[
'toastParams'
];
_0x1588a7
&&
wx
[
'showLoading'
](
_0x522176
);
return
new
Promise
(
function
(
_0x30bd3c
,
_0x35c93e
){
wx
[
'request'
]({
'method'
:
'POST'
,
'url'
:
_0x5c7321
[
'default'
][
'baseUrl'
]
+
_0x498808
,
'data'
:
_0x407157
,
'header'
:
_0x6e08cc
,
'success'
:
function
(
_0x3c1df2
){
_0x1588a7
&&
wx
[
'hideLoading'
]();
if
(
_0x3dbc52
){
_0x28eb14
[
'title'
]
=
_0x3c1df2
[
'data'
][
'msg'
];
wx
[
'showToast'
](
_0x28eb14
);}
_0x30bd3c
(
_0x3c1df2
[
'data'
]);},
'fail'
:
function
(
_0x5c3504
){
_0x1588a7
&&
wx
[
'hideLoading'
]();
if
(
_0x3dbc52
){
_0x28eb14
[
'title'
]
=
_0x5c3504
[
'errMsg'
];
wx
[
'showToast'
](
_0x28eb14
);}
_0x30bd3c
(
_0x5c3504
);}});});};
_0x5c7321
[
'getSystemOS'
]
=
function
(){
var
_0x1d32b3
=
wx
[
'getSystemInfoSync'
]()[
'system'
];
if
(
_0x1d32b3
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'android'
)
>-
0x1
)
return
'android'
;
if
(
_0x1d32b3
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'ios'
)
>-
0x1
)
return
'ios'
;
if
(
_0x1d32b3
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'windows'
)
>-
0x1
)
return
'windows'
;
if
(
_0x1d32b3
[
'toLocaleLowerCase'
]()[
'indexOf'
](
'macos'
)
>-
0x1
)
return
'macos'
;
return
'other'
;};
_0x5c7321
[
'getSystemBrand'
]
=
function
(){
var
_0x20c8ed
=
wx
[
'getSystemInfoSync'
]()[
'brand'
];
return
_0x20c8ed
;};
_0x5c7321
[
'getSystemNumber'
]
=
function
(){
var
_0x17b8d4
=
wx
[
'getSystemInfoSync'
]()[
'model'
];
return
_0x17b8d4
;};
_0x5c7321
[
'midasPay'
]
=
function
(
_0x554fa0
){
return
wx
[
'requestMidasPayment'
](
_0x554fa0
);};
_0x5c7321
[
'getQueryVariable'
]
=
function
(
_0x44386b
,
_0x316000
){
var
_0x369ce2
=
_0x44386b
;
var
_0x35ac91
=
_0x369ce2
[
'split'
](
'&'
);
for
(
var
_0x3d3e46
=
0x0
;
_0x3d3e46
<
_0x35ac91
[
'length'
];
_0x3d3e46
++
){
var
_0x24554f
=
_0x35ac91
[
_0x3d3e46
][
'split'
](
'='
);
if
(
_0x24554f
[
0x0
]
===
_0x316000
){
return
_0x24554f
[
0x1
];}}
return
''
;};
_0x5c7321
[
'getState'
]
=
function
(
_0x5b015f
){
if
(
_0x5b015f
[
'state'
]){
return
_0x5b015f
[
'state'
];}
if
(
_0x5b015f
[
'scene'
]
&&
_0x5b015f
[
'scene'
][
'indexOf'
](
'state'
)
>-
0x1
){
return
_0x5c7321
[
'getQueryVariable'
](
decodeURIComponent
(
_0x5b015f
[
'scene'
]),
'state'
);}
return
''
;};
_0x5c7321
[
'log'
]
=
function
(
_0x2beace
,
_0x168054
){
_0x5c7321
[
'ajax'
](
'/mini_sdk/sdk_log/miniLog'
,{
'name'
:
_0x2beace
,
'value'
:
_0x168054
})[
'then'
](
function
(
_0x47b4de
){
console
[
'log'
](
'log:'
,
_0x47b4de
);});};
_0x5c7321
[
'default'
]
=
{
'appId'
:
''
,
'gameId'
:
''
,
'os'
:
_0x5c7321
[
'getSystemOS'
](),
'device_number'
:
_0x5c7321
[
'getSystemNumber'
](),
'device_brand'
:
_0x5c7321
[
'getSystemBrand'
](),
'memberId'
:
''
,
'roleId'
:
''
,
'playerId'
:
''
,
'userToken'
:
''
,
'baseUrl'
:
''
};
return
_0x5c7321
;}();
exports
[
'default'
]
=
zwsdk
;
\ No newline at end of file
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论